diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..050e23b --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +node_modules +.svelte-kit +.vercel +build +.DS_Store +dist +.env +.env.* +!.env.example +vite.config.js.timestamp-* +vite.config.ts.timestamp-* diff --git a/node_modules/.bin/acorn b/node_modules/.bin/acorn new file mode 120000 index 0000000..cf76760 --- /dev/null +++ b/node_modules/.bin/acorn @@ -0,0 +1 @@ +../acorn/bin/acorn \ No newline at end of file diff --git a/node_modules/.bin/esbuild b/node_modules/.bin/esbuild new file mode 120000 index 0000000..c83ac07 --- /dev/null +++ b/node_modules/.bin/esbuild @@ -0,0 +1 @@ +../esbuild/bin/esbuild \ No newline at end of file diff --git a/node_modules/.bin/glob b/node_modules/.bin/glob new file mode 120000 index 0000000..85c9c1d --- /dev/null +++ b/node_modules/.bin/glob @@ -0,0 +1 @@ +../glob/dist/esm/bin.mjs \ No newline at end of file diff --git a/node_modules/.bin/jiti b/node_modules/.bin/jiti new file mode 120000 index 0000000..18f28cf --- /dev/null +++ b/node_modules/.bin/jiti @@ -0,0 +1 @@ +../jiti/lib/jiti-cli.mjs \ No newline at end of file diff --git a/node_modules/.bin/mkdirp b/node_modules/.bin/mkdirp new file mode 120000 index 0000000..0fd5193 --- /dev/null +++ b/node_modules/.bin/mkdirp @@ -0,0 +1 @@ +../mkdirp/dist/cjs/src/bin.js \ No newline at end of file diff --git a/node_modules/.bin/nanoid b/node_modules/.bin/nanoid new file mode 120000 index 0000000..e2be547 --- /dev/null +++ b/node_modules/.bin/nanoid @@ -0,0 +1 @@ +../nanoid/bin/nanoid.cjs \ No newline at end of file diff --git a/node_modules/.bin/nft b/node_modules/.bin/nft new file mode 120000 index 0000000..1906c1c --- /dev/null +++ b/node_modules/.bin/nft @@ -0,0 +1 @@ +../@vercel/nft/out/cli.js \ No newline at end of file diff --git a/node_modules/.bin/node-gyp-build b/node_modules/.bin/node-gyp-build new file mode 120000 index 0000000..671c6eb --- /dev/null +++ b/node_modules/.bin/node-gyp-build @@ -0,0 +1 @@ +../node-gyp-build/bin.js \ No newline at end of file diff --git a/node_modules/.bin/node-gyp-build-optional b/node_modules/.bin/node-gyp-build-optional new file mode 120000 index 0000000..46d347e --- /dev/null +++ b/node_modules/.bin/node-gyp-build-optional @@ -0,0 +1 @@ +../node-gyp-build/optional.js \ No newline at end of file diff --git a/node_modules/.bin/node-gyp-build-test b/node_modules/.bin/node-gyp-build-test new file mode 120000 index 0000000..d11de1b --- /dev/null +++ b/node_modules/.bin/node-gyp-build-test @@ -0,0 +1 @@ +../node-gyp-build/build-test.js \ No newline at end of file diff --git a/node_modules/.bin/node-pre-gyp b/node_modules/.bin/node-pre-gyp new file mode 120000 index 0000000..2946e6a --- /dev/null +++ b/node_modules/.bin/node-pre-gyp @@ -0,0 +1 @@ +../@mapbox/node-pre-gyp/bin/node-pre-gyp \ No newline at end of file diff --git a/node_modules/.bin/node-which b/node_modules/.bin/node-which new file mode 120000 index 0000000..6f8415e --- /dev/null +++ b/node_modules/.bin/node-which @@ -0,0 +1 @@ +../which/bin/node-which \ No newline at end of file diff --git a/node_modules/.bin/nopt b/node_modules/.bin/nopt new file mode 120000 index 0000000..6b6566e --- /dev/null +++ b/node_modules/.bin/nopt @@ -0,0 +1 @@ +../nopt/bin/nopt.js \ No newline at end of file diff --git a/node_modules/.bin/prettier b/node_modules/.bin/prettier new file mode 120000 index 0000000..92267ed --- /dev/null +++ b/node_modules/.bin/prettier @@ -0,0 +1 @@ +../prettier/bin/prettier.cjs \ No newline at end of file diff --git a/node_modules/.bin/rollup b/node_modules/.bin/rollup new file mode 120000 index 0000000..5939621 --- /dev/null +++ b/node_modules/.bin/rollup @@ -0,0 +1 @@ +../rollup/dist/bin/rollup \ No newline at end of file diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver new file mode 120000 index 0000000..5aaadf4 --- /dev/null +++ b/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/.bin/svelte-kit b/node_modules/.bin/svelte-kit new file mode 120000 index 0000000..faccdd4 --- /dev/null +++ b/node_modules/.bin/svelte-kit @@ -0,0 +1 @@ +../@sveltejs/kit/svelte-kit.js \ No newline at end of file diff --git a/node_modules/.bin/vite b/node_modules/.bin/vite new file mode 120000 index 0000000..6d1e3be --- /dev/null +++ b/node_modules/.bin/vite @@ -0,0 +1 @@ +../vite/bin/vite.js \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 0000000..82437b3 --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,1819 @@ +{ + "name": "portfolio", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.9.tgz", + "integrity": "sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/fs-minipass": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", + "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", + "license": "ISC", + "dependencies": { + "minipass": "^7.0.4" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@mapbox/node-pre-gyp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-2.0.0.tgz", + "integrity": "sha512-llMXd39jtP0HpQLVI37Bf1m2ADlEb35GYSh1SDSLsBhR+5iCxiNGlT31yqbNtVHygHAtMy6dWFERpU2JgufhPg==", + "license": "BSD-3-Clause", + "dependencies": { + "consola": "^3.2.3", + "detect-libc": "^2.0.0", + "https-proxy-agent": "^7.0.5", + "node-fetch": "^2.6.7", + "nopt": "^8.0.0", + "semver": "^7.5.3", + "tar": "^7.4.0" + }, + "bin": { + "node-pre-gyp": "bin/node-pre-gyp" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@polka/url": { + "version": "1.0.0-next.29", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.29.tgz", + "integrity": "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==", + "license": "MIT" + }, + "node_modules/@rollup/pluginutils": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.2.0.tgz", + "integrity": "sha512-qWJ2ZTbmumwiLFomfzTyt5Kng4hwPi9rwCYN4SHb6eaRU1KNO4ccxINHr/VhH4GgPlt1XfSTLX2LBTme8ne4Zw==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.40.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.40.1.tgz", + "integrity": "sha512-XiK5z70PEFEFqcNj3/zRSz/qX4bp4QIraTy9QjwJAb/Z8GM7kVUsD0Uk8maIPeTyPCP03ChdI+VVmJriKYbRHQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.40.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.40.1.tgz", + "integrity": "sha512-2BRORitq5rQ4Da9blVovzNCMaUlyKrzMSvkVR0D4qPuOy/+pMCrh1d7o01RATwVy+6Fa1WBw+da7QPeLWU/1mQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@sveltejs/acorn-typescript": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@sveltejs/acorn-typescript/-/acorn-typescript-1.0.5.tgz", + "integrity": "sha512-IwQk4yfwLdibDlrXVE04jTZYlLnwsTT2PIOQQGNLWfjavGifnk1JD1LcZjZaBTRcxZu2FfPfNLOE04DSu9lqtQ==", + "license": "MIT", + "peerDependencies": { + "acorn": "^8.9.0" + } + }, + "node_modules/@sveltejs/adapter-auto": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@sveltejs/adapter-auto/-/adapter-auto-6.0.1.tgz", + "integrity": "sha512-mcWud3pYGPWM2Pphdj8G9Qiq24nZ8L4LB7coCUckUEy5Y7wOWGJ/enaZ4AtJTcSm5dNK1rIkBRoqt+ae4zlxcQ==", + "license": "MIT", + "peerDependencies": { + "@sveltejs/kit": "^2.0.0" + } + }, + "node_modules/@sveltejs/adapter-static": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@sveltejs/adapter-static/-/adapter-static-3.0.8.tgz", + "integrity": "sha512-YaDrquRpZwfcXbnlDsSrBQNCChVOT9MGuSg+dMAyfsAa1SmiAhrA5jUYUiIMC59G92kIbY/AaQOWcBdq+lh+zg==", + "license": "MIT", + "peerDependencies": { + "@sveltejs/kit": "^2.0.0" + } + }, + "node_modules/@sveltejs/adapter-vercel": { + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@sveltejs/adapter-vercel/-/adapter-vercel-5.10.2.tgz", + "integrity": "sha512-uWm0jtXbwvXxmELiIXSQ7tcPjlG8roadujxImIxqbKKZ64itZDwTbUsVXYEfUX59LvLjolW9jaODhL6sBTh5NQ==", + "license": "MIT", + "dependencies": { + "@vercel/nft": "^0.30.0", + "esbuild": "^0.25.4" + }, + "peerDependencies": { + "@sveltejs/kit": "^2.4.0" + } + }, + "node_modules/@sveltejs/kit": { + "version": "2.21.1", + "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.21.1.tgz", + "integrity": "sha512-vLbtVwtDcK8LhJKnFkFYwM0uCdFmzioQnif0bjEYH1I24Arz22JPr/hLUiXGVYAwhu8INKx5qrdvr4tHgPwX6w==", + "license": "MIT", + "dependencies": { + "@sveltejs/acorn-typescript": "^1.0.5", + "@types/cookie": "^0.6.0", + "acorn": "^8.14.1", + "cookie": "^0.6.0", + "devalue": "^5.1.0", + "esm-env": "^1.2.2", + "kleur": "^4.1.5", + "magic-string": "^0.30.5", + "mrmime": "^2.0.0", + "sade": "^1.8.1", + "set-cookie-parser": "^2.6.0", + "sirv": "^3.0.0" + }, + "bin": { + "svelte-kit": "svelte-kit.js" + }, + "engines": { + "node": ">=18.13" + }, + "peerDependencies": { + "@sveltejs/vite-plugin-svelte": "^3.0.0 || ^4.0.0-next.1 || ^5.0.0", + "svelte": "^4.0.0 || ^5.0.0-next.0", + "vite": "^5.0.3 || ^6.0.0" + } + }, + "node_modules/@sveltejs/vite-plugin-svelte": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-5.0.3.tgz", + "integrity": "sha512-MCFS6CrQDu1yGwspm4qtli0e63vaPCehf6V7pIMP15AsWgMKrqDGCPFF/0kn4SP0ii4aySu4Pa62+fIRGFMjgw==", + "license": "MIT", + "dependencies": { + "@sveltejs/vite-plugin-svelte-inspector": "^4.0.1", + "debug": "^4.4.0", + "deepmerge": "^4.3.1", + "kleur": "^4.1.5", + "magic-string": "^0.30.15", + "vitefu": "^1.0.4" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22" + }, + "peerDependencies": { + "svelte": "^5.0.0", + "vite": "^6.0.0" + } + }, + "node_modules/@sveltejs/vite-plugin-svelte-inspector": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-4.0.1.tgz", + "integrity": "sha512-J/Nmb2Q2y7mck2hyCX4ckVHcR5tu2J+MtBEQqpDrrgELZ2uvraQcK/ioCV61AqkdXFgriksOKIceDcQmqnGhVw==", + "license": "MIT", + "dependencies": { + "debug": "^4.3.7" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22" + }, + "peerDependencies": { + "@sveltejs/vite-plugin-svelte": "^5.0.0", + "svelte": "^5.0.0", + "vite": "^6.0.0" + } + }, + "node_modules/@tailwindcss/node": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.5.tgz", + "integrity": "sha512-CBhSWo0vLnWhXIvpD0qsPephiaUYfHUX3U9anwDaHZAeuGpTiB3XmsxPAN6qX7bFhipyGBqOa1QYQVVhkOUGxg==", + "license": "MIT", + "dependencies": { + "enhanced-resolve": "^5.18.1", + "jiti": "^2.4.2", + "lightningcss": "1.29.2", + "tailwindcss": "4.1.5" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.5.tgz", + "integrity": "sha512-1n4br1znquEvyW/QuqMKQZlBen+jxAbvyduU87RS8R3tUSvByAkcaMTkJepNIrTlYhD+U25K4iiCIxE6BGdRYA==", + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.1.5", + "@tailwindcss/oxide-darwin-arm64": "4.1.5", + "@tailwindcss/oxide-darwin-x64": "4.1.5", + "@tailwindcss/oxide-freebsd-x64": "4.1.5", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.5", + "@tailwindcss/oxide-linux-arm64-gnu": "4.1.5", + "@tailwindcss/oxide-linux-arm64-musl": "4.1.5", + "@tailwindcss/oxide-linux-x64-gnu": "4.1.5", + "@tailwindcss/oxide-linux-x64-musl": "4.1.5", + "@tailwindcss/oxide-wasm32-wasi": "4.1.5", + "@tailwindcss/oxide-win32-arm64-msvc": "4.1.5", + "@tailwindcss/oxide-win32-x64-msvc": "4.1.5" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.5.tgz", + "integrity": "sha512-SO+F2YEIAHa1AITwc8oPwMOWhgorPzzcbhWEb+4oLi953h45FklDmM8dPSZ7hNHpIk9p/SCZKUYn35t5fjGtHA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.1.5.tgz", + "integrity": "sha512-6UbBBplywkk/R+PqqioskUeXfKcBht3KU7juTi1UszJLx0KPXUo10v2Ok04iBJIaDPkIFkUOVboXms5Yxvaz+g==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/vite": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.1.5.tgz", + "integrity": "sha512-FE1stRoqdHSb7RxesMfCXE8icwI1W6zGE/512ae3ZDrpkQYTTYeSyUJPRCjZd8CwVAhpDUbi1YR8pcZioFJQ/w==", + "license": "MIT", + "dependencies": { + "@tailwindcss/node": "4.1.5", + "@tailwindcss/oxide": "4.1.5", + "tailwindcss": "4.1.5" + }, + "peerDependencies": { + "vite": "^5.2.0 || ^6" + } + }, + "node_modules/@types/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==", + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", + "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "license": "MIT" + }, + "node_modules/@vercel/nft": { + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vercel/nft/-/nft-0.30.1.tgz", + "integrity": "sha512-2mgJZv4AYBFkD/nJ4QmiX5Ymxi+AisPLPcS/KPXVqniyQNqKXX+wjieAbDXQP3HcogfEbpHoRMs49Cd4pfkk8g==", + "license": "MIT", + "dependencies": { + "@mapbox/node-pre-gyp": "^2.0.0", + "@rollup/pluginutils": "^5.1.3", + "acorn": "^8.6.0", + "acorn-import-attributes": "^1.9.5", + "async-sema": "^3.1.1", + "bindings": "^1.4.0", + "estree-walker": "2.0.2", + "glob": "^10.4.5", + "graceful-fs": "^4.2.9", + "node-gyp-build": "^4.2.2", + "picomatch": "^4.0.2", + "resolve-from": "^5.0.0" + }, + "bin": { + "nft": "out/cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/abbrev": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-3.0.1.tgz", + "integrity": "sha512-AO2ac6pjRB3SJmGJo+v5/aK6Omggp6fsLrs6wN9bd35ulu4cCwaAU9+7ZhXjeqHVkaHThLuzH0nZr0YpCDhygg==", + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/acorn": { + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", + "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", + "license": "MIT", + "peerDependencies": { + "acorn": "^8" + } + }, + "node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/ansi-regex": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.0.tgz", + "integrity": "sha512-TKY5pyBkHyADOPYlRT9Lx6F544mPl0vS5Ew7BJ45hA08Q+t3GjbueLliBWN3sMICk6+y7HdyxSzC4bWS8baBdg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/aria-query": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", + "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/async-sema": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/async-sema/-/async-sema-3.1.1.tgz", + "integrity": "sha512-tLRNUXati5MFePdAk8dw7Qt7DpxPB60ofAgn8WRhW6a2rcimZnYBP9oxHiv0OHy+Wz7kPMG+t4LGdt31+4EmGg==", + "license": "MIT" + }, + "node_modules/axobject-query": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", + "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" + } + }, + "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==", + "license": "MIT" + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "license": "MIT", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/chownr": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", + "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/consola": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", + "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, + "node_modules/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/detect-libc": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz", + "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/devalue": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.1.1.tgz", + "integrity": "sha512-maua5KUiapvEwiEAe+XnlZ3Rh0GD+qI1J/nb9vrJc3muPXvcF/8gXYTWF76+5DAqHyDUtOIImEuo0YKE9mshVw==", + "license": "MIT" + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "license": "MIT" + }, + "node_modules/enhanced-resolve": { + "version": "5.18.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz", + "integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/esbuild": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.9.tgz", + "integrity": "sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==", + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.9", + "@esbuild/android-arm": "0.25.9", + "@esbuild/android-arm64": "0.25.9", + "@esbuild/android-x64": "0.25.9", + "@esbuild/darwin-arm64": "0.25.9", + "@esbuild/darwin-x64": "0.25.9", + "@esbuild/freebsd-arm64": "0.25.9", + "@esbuild/freebsd-x64": "0.25.9", + "@esbuild/linux-arm": "0.25.9", + "@esbuild/linux-arm64": "0.25.9", + "@esbuild/linux-ia32": "0.25.9", + "@esbuild/linux-loong64": "0.25.9", + "@esbuild/linux-mips64el": "0.25.9", + "@esbuild/linux-ppc64": "0.25.9", + "@esbuild/linux-riscv64": "0.25.9", + "@esbuild/linux-s390x": "0.25.9", + "@esbuild/linux-x64": "0.25.9", + "@esbuild/netbsd-arm64": "0.25.9", + "@esbuild/netbsd-x64": "0.25.9", + "@esbuild/openbsd-arm64": "0.25.9", + "@esbuild/openbsd-x64": "0.25.9", + "@esbuild/openharmony-arm64": "0.25.9", + "@esbuild/sunos-x64": "0.25.9", + "@esbuild/win32-arm64": "0.25.9", + "@esbuild/win32-ia32": "0.25.9", + "@esbuild/win32-x64": "0.25.9" + } + }, + "node_modules/esm-env": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.2.2.tgz", + "integrity": "sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==", + "license": "MIT" + }, + "node_modules/esrap": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/esrap/-/esrap-1.4.6.tgz", + "integrity": "sha512-F/D2mADJ9SHY3IwksD4DAXjTt7qt7GWUf3/8RhCNWmC/67tyb55dpimHmy7EplakFaflV0R/PC+fdSPqrRHAQw==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "license": "MIT" + }, + "node_modules/fdir": { + "version": "6.4.4", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.4.tgz", + "integrity": "sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==", + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "license": "MIT" + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-reference": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.3.tgz", + "integrity": "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.6" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC" + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jiti": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.2.tgz", + "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==", + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/lightningcss": { + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.29.2.tgz", + "integrity": "sha512-6b6gd/RUXKaw5keVdSEtqFVdzWnU5jMxTUjA2bVcMNPLwSQ08Sv/UodBVtETLCn7k4S1Ibxwh7k68IwLZPgKaA==", + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-darwin-arm64": "1.29.2", + "lightningcss-darwin-x64": "1.29.2", + "lightningcss-freebsd-x64": "1.29.2", + "lightningcss-linux-arm-gnueabihf": "1.29.2", + "lightningcss-linux-arm64-gnu": "1.29.2", + "lightningcss-linux-arm64-musl": "1.29.2", + "lightningcss-linux-x64-gnu": "1.29.2", + "lightningcss-linux-x64-musl": "1.29.2", + "lightningcss-win32-arm64-msvc": "1.29.2", + "lightningcss-win32-x64-msvc": "1.29.2" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.29.2.tgz", + "integrity": "sha512-0v6idDCPG6epLXtBH/RPkHvYx74CVziHo6TMYga8O2EiQApnUPZsbR9nFNrg2cgBzk1AYqEd95TlrsL7nYABQg==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.29.2.tgz", + "integrity": "sha512-rMpz2yawkgGT8RULc5S4WiZopVMOFWjiItBT7aSfDX4NQav6M44rhn5hjtkKzB+wMTRlLLqxkeYEtQ3dd9696w==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/locate-character": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz", + "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==", + "license": "MIT" + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "license": "ISC" + }, + "node_modules/magic-string": { + "version": "0.30.17", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minizlib": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.0.2.tgz", + "integrity": "sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==", + "license": "MIT", + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/mkdirp": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "license": "MIT", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/mrmime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz", + "integrity": "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "license": "MIT", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/nopt": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-8.1.0.tgz", + "integrity": "sha512-ieGu42u/Qsa4TFktmaKEwM6MQH0pOWnaB3htzh0JRtx84+Mebc0cbZYN5bC+6WTZ4+77xrL9Pn5m7CV6VIkV7A==", + "license": "ISC", + "dependencies": { + "abbrev": "^3.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "license": "BlueOak-1.0.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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.3", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", + "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.8", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/prettier": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", + "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-plugin-tailwindcss": { + "version": "0.6.11", + "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.6.11.tgz", + "integrity": "sha512-YxaYSIvZPAqhrrEpRtonnrXdghZg1irNg4qrjboCXrpybLWVs55cW2N3juhspVJiO0JBvYJT8SYsJpc8OQSnsA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.21.3" + }, + "peerDependencies": { + "@ianvs/prettier-plugin-sort-imports": "*", + "@prettier/plugin-pug": "*", + "@shopify/prettier-plugin-liquid": "*", + "@trivago/prettier-plugin-sort-imports": "*", + "@zackad/prettier-plugin-twig": "*", + "prettier": "^3.0", + "prettier-plugin-astro": "*", + "prettier-plugin-css-order": "*", + "prettier-plugin-import-sort": "*", + "prettier-plugin-jsdoc": "*", + "prettier-plugin-marko": "*", + "prettier-plugin-multiline-arrays": "*", + "prettier-plugin-organize-attributes": "*", + "prettier-plugin-organize-imports": "*", + "prettier-plugin-sort-imports": "*", + "prettier-plugin-style-order": "*", + "prettier-plugin-svelte": "*" + }, + "peerDependenciesMeta": { + "@ianvs/prettier-plugin-sort-imports": { + "optional": true + }, + "@prettier/plugin-pug": { + "optional": true + }, + "@shopify/prettier-plugin-liquid": { + "optional": true + }, + "@trivago/prettier-plugin-sort-imports": { + "optional": true + }, + "@zackad/prettier-plugin-twig": { + "optional": true + }, + "prettier-plugin-astro": { + "optional": true + }, + "prettier-plugin-css-order": { + "optional": true + }, + "prettier-plugin-import-sort": { + "optional": true + }, + "prettier-plugin-jsdoc": { + "optional": true + }, + "prettier-plugin-marko": { + "optional": true + }, + "prettier-plugin-multiline-arrays": { + "optional": true + }, + "prettier-plugin-organize-attributes": { + "optional": true + }, + "prettier-plugin-organize-imports": { + "optional": true + }, + "prettier-plugin-sort-imports": { + "optional": true + }, + "prettier-plugin-style-order": { + "optional": true + }, + "prettier-plugin-svelte": { + "optional": true + } + } + }, + "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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/rollup": { + "version": "4.40.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.40.1.tgz", + "integrity": "sha512-C5VvvgCCyfyotVITIAv+4efVytl5F7wt+/I2i9q9GZcEXW9BP52YYOXC58igUi+LFZVHukErIIqQSWwv/M3WRw==", + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.7" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.40.1", + "@rollup/rollup-android-arm64": "4.40.1", + "@rollup/rollup-darwin-arm64": "4.40.1", + "@rollup/rollup-darwin-x64": "4.40.1", + "@rollup/rollup-freebsd-arm64": "4.40.1", + "@rollup/rollup-freebsd-x64": "4.40.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.40.1", + "@rollup/rollup-linux-arm-musleabihf": "4.40.1", + "@rollup/rollup-linux-arm64-gnu": "4.40.1", + "@rollup/rollup-linux-arm64-musl": "4.40.1", + "@rollup/rollup-linux-loongarch64-gnu": "4.40.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.40.1", + "@rollup/rollup-linux-riscv64-gnu": "4.40.1", + "@rollup/rollup-linux-riscv64-musl": "4.40.1", + "@rollup/rollup-linux-s390x-gnu": "4.40.1", + "@rollup/rollup-linux-x64-gnu": "4.40.1", + "@rollup/rollup-linux-x64-musl": "4.40.1", + "@rollup/rollup-win32-arm64-msvc": "4.40.1", + "@rollup/rollup-win32-ia32-msvc": "4.40.1", + "@rollup/rollup-win32-x64-msvc": "4.40.1", + "fsevents": "~2.3.2" + } + }, + "node_modules/sade": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", + "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", + "license": "MIT", + "dependencies": { + "mri": "^1.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/set-cookie-parser": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", + "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==", + "license": "MIT" + }, + "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==", + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sirv": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.1.tgz", + "integrity": "sha512-FoqMu0NCGBLCcAkS1qA+XJIQTR6/JHfQXl+uGteNCQ76T91DMUjPa9xfmeqMY3z80nLSg9yQmNjK0Px6RWsH/A==", + "license": "MIT", + "dependencies": { + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", + "totalist": "^3.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/string-width-cjs/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==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/svelte": { + "version": "5.28.2", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.28.2.tgz", + "integrity": "sha512-FbWBxgWOpQfhKvoGJv/TFwzqb4EhJbwCD17dB0tEpQiw1XyUEKZJtgm4nA4xq3LLsMo7hu5UY/BOFmroAxKTMg==", + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.3.0", + "@jridgewell/sourcemap-codec": "^1.5.0", + "@sveltejs/acorn-typescript": "^1.0.5", + "@types/estree": "^1.0.5", + "acorn": "^8.12.1", + "aria-query": "^5.3.1", + "axobject-query": "^4.1.0", + "clsx": "^2.1.1", + "esm-env": "^1.2.1", + "esrap": "^1.4.6", + "is-reference": "^3.0.3", + "locate-character": "^3.0.0", + "magic-string": "^0.30.11", + "zimmerframe": "^1.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/svelte-routing": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/svelte-routing/-/svelte-routing-2.13.0.tgz", + "integrity": "sha512-/NTxqTwLc7Dq306hARJrH2HLXOBtKd7hu8nxgoFDlK0AC4SOKnzisiX/9m8Uksei1QAWtlAEdF91YphNM8iDMg==", + "license": "MIT" + }, + "node_modules/tailwindcss": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.5.tgz", + "integrity": "sha512-nYtSPfWGDiWgCkwQG/m+aX83XCwf62sBgg3bIlNiiOcggnS1x3uVRDAuyelBFL+vJdOPPCGElxv9DjHJjRHiVA==", + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/tar": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.4.3.tgz", + "integrity": "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==", + "license": "ISC", + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.0.1", + "mkdirp": "^3.0.1", + "yallist": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.13.tgz", + "integrity": "sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw==", + "license": "MIT", + "dependencies": { + "fdir": "^6.4.4", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/totalist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", + "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" + }, + "node_modules/vite": { + "version": "6.3.4", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.4.tgz", + "integrity": "sha512-BiReIiMS2fyFqbqNT/Qqt4CVITDU9M9vE+DKcVAsB+ZV0wvTKd+3hMbkpxz1b+NmEDMegpVbisKiAZOnvO92Sw==", + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.4.4", + "picomatch": "^4.0.2", + "postcss": "^8.5.3", + "rollup": "^4.34.9", + "tinyglobby": "^0.2.13" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vitefu": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.0.6.tgz", + "integrity": "sha512-+Rex1GlappUyNN6UfwbVZne/9cYC4+R2XDk9xkNXBKMw6HQagdX9PgZ8V2v1WUSK1wfBLp7qbI1+XSNIlB1xmA==", + "license": "MIT", + "workspaces": [ + "tests/deps/*", + "tests/projects/*" + ], + "peerDependencies": { + "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" + }, + "peerDependenciesMeta": { + "vite": { + "optional": true + } + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/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==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/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==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yallist": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", + "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/zimmerframe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/zimmerframe/-/zimmerframe-1.1.2.tgz", + "integrity": "sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w==", + "license": "MIT" + } + } +} diff --git a/node_modules/@ampproject/remapping/LICENSE b/node_modules/@ampproject/remapping/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/node_modules/@ampproject/remapping/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@ampproject/remapping/README.md b/node_modules/@ampproject/remapping/README.md new file mode 100644 index 0000000..1463c9f --- /dev/null +++ b/node_modules/@ampproject/remapping/README.md @@ -0,0 +1,218 @@ +# @ampproject/remapping + +> Remap sequential sourcemaps through transformations to point at the original source code + +Remapping allows you to take the sourcemaps generated through transforming your code and "remap" +them to the original source locations. Think "my minified code, transformed with babel and bundled +with webpack", all pointing to the correct location in your original source code. + +With remapping, none of your source code transformations need to be aware of the input's sourcemap, +they only need to generate an output sourcemap. This greatly simplifies building custom +transformations (think a find-and-replace). + +## Installation + +```sh +npm install @ampproject/remapping +``` + +## Usage + +```typescript +function remapping( + map: SourceMap | SourceMap[], + loader: (file: string, ctx: LoaderContext) => (SourceMap | null | undefined), + options?: { excludeContent: boolean, decodedMappings: boolean } +): SourceMap; + +// LoaderContext gives the loader the importing sourcemap, tree depth, the ability to override the +// "source" location (where child sources are resolved relative to, or the location of original +// source), and the ability to override the "content" of an original source for inclusion in the +// output sourcemap. +type LoaderContext = { + readonly importer: string; + readonly depth: number; + source: string; + content: string | null | undefined; +} +``` + +`remapping` takes the final output sourcemap, and a `loader` function. For every source file pointer +in the sourcemap, the `loader` will be called with the resolved path. If the path itself represents +a transformed file (it has a sourcmap associated with it), then the `loader` should return that +sourcemap. If not, the path will be treated as an original, untransformed source code. + +```js +// Babel transformed "helloworld.js" into "transformed.js" +const transformedMap = JSON.stringify({ + file: 'transformed.js', + // 1st column of 2nd line of output file translates into the 1st source + // file, line 3, column 2 + mappings: ';CAEE', + sources: ['helloworld.js'], + version: 3, +}); + +// Uglify minified "transformed.js" into "transformed.min.js" +const minifiedTransformedMap = JSON.stringify({ + file: 'transformed.min.js', + // 0th column of 1st line of output file translates into the 1st source + // file, line 2, column 1. + mappings: 'AACC', + names: [], + sources: ['transformed.js'], + version: 3, +}); + +const remapped = remapping( + minifiedTransformedMap, + (file, ctx) => { + + // The "transformed.js" file is an transformed file. + if (file === 'transformed.js') { + // The root importer is empty. + console.assert(ctx.importer === ''); + // The depth in the sourcemap tree we're currently loading. + // The root `minifiedTransformedMap` is depth 0, and its source children are depth 1, etc. + console.assert(ctx.depth === 1); + + return transformedMap; + } + + // Loader will be called to load transformedMap's source file pointers as well. + console.assert(file === 'helloworld.js'); + // `transformed.js`'s sourcemap points into `helloworld.js`. + console.assert(ctx.importer === 'transformed.js'); + // This is a source child of `transformed`, which is a source child of `minifiedTransformedMap`. + console.assert(ctx.depth === 2); + return null; + } +); + +console.log(remapped); +// { +// file: 'transpiled.min.js', +// mappings: 'AAEE', +// sources: ['helloworld.js'], +// version: 3, +// }; +``` + +In this example, `loader` will be called twice: + +1. `"transformed.js"`, the first source file pointer in the `minifiedTransformedMap`. We return the + associated sourcemap for it (its a transformed file, after all) so that sourcemap locations can + be traced through it into the source files it represents. +2. `"helloworld.js"`, our original, unmodified source code. This file does not have a sourcemap, so + we return `null`. + +The `remapped` sourcemap now points from `transformed.min.js` into locations in `helloworld.js`. If +you were to read the `mappings`, it says "0th column of the first line output line points to the 1st +column of the 2nd line of the file `helloworld.js`". + +### Multiple transformations of a file + +As a convenience, if you have multiple single-source transformations of a file, you may pass an +array of sourcemap files in the order of most-recent transformation sourcemap first. Note that this +changes the `importer` and `depth` of each call to our loader. So our above example could have been +written as: + +```js +const remapped = remapping( + [minifiedTransformedMap, transformedMap], + () => null +); + +console.log(remapped); +// { +// file: 'transpiled.min.js', +// mappings: 'AAEE', +// sources: ['helloworld.js'], +// version: 3, +// }; +``` + +### Advanced control of the loading graph + +#### `source` + +The `source` property can overridden to any value to change the location of the current load. Eg, +for an original source file, it allows us to change the location to the original source regardless +of what the sourcemap source entry says. And for transformed files, it allows us to change the +relative resolving location for child sources of the loaded sourcemap. + +```js +const remapped = remapping( + minifiedTransformedMap, + (file, ctx) => { + + if (file === 'transformed.js') { + // We pretend the transformed.js file actually exists in the 'src/' directory. When the nested + // source files are loaded, they will now be relative to `src/`. + ctx.source = 'src/transformed.js'; + return transformedMap; + } + + console.assert(file === 'src/helloworld.js'); + // We could futher change the source of this original file, eg, to be inside a nested directory + // itself. This will be reflected in the remapped sourcemap. + ctx.source = 'src/nested/transformed.js'; + return null; + } +); + +console.log(remapped); +// { +// …, +// sources: ['src/nested/helloworld.js'], +// }; +``` + + +#### `content` + +The `content` property can be overridden when we encounter an original source file. Eg, this allows +you to manually provide the source content of the original file regardless of whether the +`sourcesContent` field is present in the parent sourcemap. It can also be set to `null` to remove +the source content. + +```js +const remapped = remapping( + minifiedTransformedMap, + (file, ctx) => { + + if (file === 'transformed.js') { + // transformedMap does not include a `sourcesContent` field, so usually the remapped sourcemap + // would not include any `sourcesContent` values. + return transformedMap; + } + + console.assert(file === 'helloworld.js'); + // We can read the file to provide the source content. + ctx.content = fs.readFileSync(file, 'utf8'); + return null; + } +); + +console.log(remapped); +// { +// …, +// sourcesContent: [ +// 'console.log("Hello world!")', +// ], +// }; +``` + +### Options + +#### excludeContent + +By default, `excludeContent` is `false`. Passing `{ excludeContent: true }` will exclude the +`sourcesContent` field from the returned sourcemap. This is mainly useful when you want to reduce +the size out the sourcemap. + +#### decodedMappings + +By default, `decodedMappings` is `false`. Passing `{ decodedMappings: true }` will leave the +`mappings` field in a [decoded state](https://github.com/rich-harris/sourcemap-codec) instead of +encoding into a VLQ string. diff --git a/node_modules/@ampproject/remapping/dist/remapping.mjs b/node_modules/@ampproject/remapping/dist/remapping.mjs new file mode 100644 index 0000000..f387599 --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/remapping.mjs @@ -0,0 +1,197 @@ +import { decodedMappings, traceSegment, TraceMap } from '@jridgewell/trace-mapping'; +import { GenMapping, maybeAddSegment, setSourceContent, setIgnore, toDecodedMap, toEncodedMap } from '@jridgewell/gen-mapping'; + +const SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null, false); +const EMPTY_SOURCES = []; +function SegmentObject(source, line, column, name, content, ignore) { + return { source, line, column, name, content, ignore }; +} +function Source(map, sources, source, content, ignore) { + return { + map, + sources, + source, + content, + ignore, + }; +} +/** + * MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes + * (which may themselves be SourceMapTrees). + */ +function MapSource(map, sources) { + return Source(map, sources, '', null, false); +} +/** + * A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive + * segment tracing ends at the `OriginalSource`. + */ +function OriginalSource(source, content, ignore) { + return Source(null, EMPTY_SOURCES, source, content, ignore); +} +/** + * traceMappings is only called on the root level SourceMapTree, and begins the process of + * resolving each mapping in terms of the original source files. + */ +function traceMappings(tree) { + // TODO: Eventually support sourceRoot, which has to be removed because the sources are already + // fully resolved. We'll need to make sources relative to the sourceRoot before adding them. + const gen = new GenMapping({ file: tree.map.file }); + const { sources: rootSources, map } = tree; + const rootNames = map.names; + const rootMappings = decodedMappings(map); + for (let i = 0; i < rootMappings.length; i++) { + const segments = rootMappings[i]; + for (let j = 0; j < segments.length; j++) { + const segment = segments[j]; + const genCol = segment[0]; + let traced = SOURCELESS_MAPPING; + // 1-length segments only move the current generated column, there's no source information + // to gather from it. + if (segment.length !== 1) { + const source = rootSources[segment[1]]; + traced = originalPositionFor(source, segment[2], segment[3], segment.length === 5 ? rootNames[segment[4]] : ''); + // If the trace is invalid, then the trace ran into a sourcemap that doesn't contain a + // respective segment into an original source. + if (traced == null) + continue; + } + const { column, line, name, content, source, ignore } = traced; + maybeAddSegment(gen, i, genCol, source, line, column, name); + if (source && content != null) + setSourceContent(gen, source, content); + if (ignore) + setIgnore(gen, source, true); + } + } + return gen; +} +/** + * originalPositionFor is only called on children SourceMapTrees. It recurses down into its own + * child SourceMapTrees, until we find the original source map. + */ +function originalPositionFor(source, line, column, name) { + if (!source.map) { + return SegmentObject(source.source, line, column, name, source.content, source.ignore); + } + const segment = traceSegment(source.map, line, column); + // If we couldn't find a segment, then this doesn't exist in the sourcemap. + if (segment == null) + return null; + // 1-length segments only move the current generated column, there's no source information + // to gather from it. + if (segment.length === 1) + return SOURCELESS_MAPPING; + return originalPositionFor(source.sources[segment[1]], segment[2], segment[3], segment.length === 5 ? source.map.names[segment[4]] : name); +} + +function asArray(value) { + if (Array.isArray(value)) + return value; + return [value]; +} +/** + * Recursively builds a tree structure out of sourcemap files, with each node + * being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of + * `OriginalSource`s and `SourceMapTree`s. + * + * Every sourcemap is composed of a collection of source files and mappings + * into locations of those source files. When we generate a `SourceMapTree` for + * the sourcemap, we attempt to load each source file's own sourcemap. If it + * does not have an associated sourcemap, it is considered an original, + * unmodified source file. + */ +function buildSourceMapTree(input, loader) { + const maps = asArray(input).map((m) => new TraceMap(m, '')); + const map = maps.pop(); + for (let i = 0; i < maps.length; i++) { + if (maps[i].sources.length > 1) { + throw new Error(`Transformation map ${i} must have exactly one source file.\n` + + 'Did you specify these with the most recent transformation maps first?'); + } + } + let tree = build(map, loader, '', 0); + for (let i = maps.length - 1; i >= 0; i--) { + tree = MapSource(maps[i], [tree]); + } + return tree; +} +function build(map, loader, importer, importerDepth) { + const { resolvedSources, sourcesContent, ignoreList } = map; + const depth = importerDepth + 1; + const children = resolvedSources.map((sourceFile, i) => { + // The loading context gives the loader more information about why this file is being loaded + // (eg, from which importer). It also allows the loader to override the location of the loaded + // sourcemap/original source, or to override the content in the sourcesContent field if it's + // an unmodified source file. + const ctx = { + importer, + depth, + source: sourceFile || '', + content: undefined, + ignore: undefined, + }; + // Use the provided loader callback to retrieve the file's sourcemap. + // TODO: We should eventually support async loading of sourcemap files. + const sourceMap = loader(ctx.source, ctx); + const { source, content, ignore } = ctx; + // If there is a sourcemap, then we need to recurse into it to load its source files. + if (sourceMap) + return build(new TraceMap(sourceMap, source), loader, source, depth); + // Else, it's an unmodified source file. + // The contents of this unmodified source file can be overridden via the loader context, + // allowing it to be explicitly null or a string. If it remains undefined, we fall back to + // the importing sourcemap's `sourcesContent` field. + const sourceContent = content !== undefined ? content : sourcesContent ? sourcesContent[i] : null; + const ignored = ignore !== undefined ? ignore : ignoreList ? ignoreList.includes(i) : false; + return OriginalSource(source, sourceContent, ignored); + }); + return MapSource(map, children); +} + +/** + * A SourceMap v3 compatible sourcemap, which only includes fields that were + * provided to it. + */ +class SourceMap { + constructor(map, options) { + const out = options.decodedMappings ? toDecodedMap(map) : toEncodedMap(map); + this.version = out.version; // SourceMap spec says this should be first. + this.file = out.file; + this.mappings = out.mappings; + this.names = out.names; + this.ignoreList = out.ignoreList; + this.sourceRoot = out.sourceRoot; + this.sources = out.sources; + if (!options.excludeContent) { + this.sourcesContent = out.sourcesContent; + } + } + toString() { + return JSON.stringify(this); + } +} + +/** + * Traces through all the mappings in the root sourcemap, through the sources + * (and their sourcemaps), all the way back to the original source location. + * + * `loader` will be called every time we encounter a source file. If it returns + * a sourcemap, we will recurse into that sourcemap to continue the trace. If + * it returns a falsey value, that source file is treated as an original, + * unmodified source file. + * + * Pass `excludeContent` to exclude any self-containing source file content + * from the output sourcemap. + * + * Pass `decodedMappings` to receive a SourceMap with decoded (instead of + * VLQ encoded) mappings. + */ +function remapping(input, loader, options) { + const opts = typeof options === 'object' ? options : { excludeContent: !!options, decodedMappings: false }; + const tree = buildSourceMapTree(input, loader); + return new SourceMap(traceMappings(tree), opts); +} + +export { remapping as default }; +//# sourceMappingURL=remapping.mjs.map diff --git a/node_modules/@ampproject/remapping/dist/remapping.mjs.map b/node_modules/@ampproject/remapping/dist/remapping.mjs.map new file mode 100644 index 0000000..0eb007b --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/remapping.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"remapping.mjs","sources":["../src/source-map-tree.ts","../src/build-source-map-tree.ts","../src/source-map.ts","../src/remapping.ts"],"sourcesContent":["import { GenMapping, maybeAddSegment, setIgnore, setSourceContent } from '@jridgewell/gen-mapping';\nimport { traceSegment, decodedMappings } from '@jridgewell/trace-mapping';\n\nimport type { TraceMap } from '@jridgewell/trace-mapping';\n\nexport type SourceMapSegmentObject = {\n column: number;\n line: number;\n name: string;\n source: string;\n content: string | null;\n ignore: boolean;\n};\n\nexport type OriginalSource = {\n map: null;\n sources: Sources[];\n source: string;\n content: string | null;\n ignore: boolean;\n};\n\nexport type MapSource = {\n map: TraceMap;\n sources: Sources[];\n source: string;\n content: null;\n ignore: false;\n};\n\nexport type Sources = OriginalSource | MapSource;\n\nconst SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null, false);\nconst EMPTY_SOURCES: Sources[] = [];\n\nfunction SegmentObject(\n source: string,\n line: number,\n column: number,\n name: string,\n content: string | null,\n ignore: boolean\n): SourceMapSegmentObject {\n return { source, line, column, name, content, ignore };\n}\n\nfunction Source(\n map: TraceMap,\n sources: Sources[],\n source: '',\n content: null,\n ignore: false\n): MapSource;\nfunction Source(\n map: null,\n sources: Sources[],\n source: string,\n content: string | null,\n ignore: boolean\n): OriginalSource;\nfunction Source(\n map: TraceMap | null,\n sources: Sources[],\n source: string | '',\n content: string | null,\n ignore: boolean\n): Sources {\n return {\n map,\n sources,\n source,\n content,\n ignore,\n } as any;\n}\n\n/**\n * MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes\n * (which may themselves be SourceMapTrees).\n */\nexport function MapSource(map: TraceMap, sources: Sources[]): MapSource {\n return Source(map, sources, '', null, false);\n}\n\n/**\n * A \"leaf\" node in the sourcemap tree, representing an original, unmodified source file. Recursive\n * segment tracing ends at the `OriginalSource`.\n */\nexport function OriginalSource(\n source: string,\n content: string | null,\n ignore: boolean\n): OriginalSource {\n return Source(null, EMPTY_SOURCES, source, content, ignore);\n}\n\n/**\n * traceMappings is only called on the root level SourceMapTree, and begins the process of\n * resolving each mapping in terms of the original source files.\n */\nexport function traceMappings(tree: MapSource): GenMapping {\n // TODO: Eventually support sourceRoot, which has to be removed because the sources are already\n // fully resolved. We'll need to make sources relative to the sourceRoot before adding them.\n const gen = new GenMapping({ file: tree.map.file });\n const { sources: rootSources, map } = tree;\n const rootNames = map.names;\n const rootMappings = decodedMappings(map);\n\n for (let i = 0; i < rootMappings.length; i++) {\n const segments = rootMappings[i];\n\n for (let j = 0; j < segments.length; j++) {\n const segment = segments[j];\n const genCol = segment[0];\n let traced: SourceMapSegmentObject | null = SOURCELESS_MAPPING;\n\n // 1-length segments only move the current generated column, there's no source information\n // to gather from it.\n if (segment.length !== 1) {\n const source = rootSources[segment[1]];\n traced = originalPositionFor(\n source,\n segment[2],\n segment[3],\n segment.length === 5 ? rootNames[segment[4]] : ''\n );\n\n // If the trace is invalid, then the trace ran into a sourcemap that doesn't contain a\n // respective segment into an original source.\n if (traced == null) continue;\n }\n\n const { column, line, name, content, source, ignore } = traced;\n\n maybeAddSegment(gen, i, genCol, source, line, column, name);\n if (source && content != null) setSourceContent(gen, source, content);\n if (ignore) setIgnore(gen, source, true);\n }\n }\n\n return gen;\n}\n\n/**\n * originalPositionFor is only called on children SourceMapTrees. It recurses down into its own\n * child SourceMapTrees, until we find the original source map.\n */\nexport function originalPositionFor(\n source: Sources,\n line: number,\n column: number,\n name: string\n): SourceMapSegmentObject | null {\n if (!source.map) {\n return SegmentObject(source.source, line, column, name, source.content, source.ignore);\n }\n\n const segment = traceSegment(source.map, line, column);\n\n // If we couldn't find a segment, then this doesn't exist in the sourcemap.\n if (segment == null) return null;\n // 1-length segments only move the current generated column, there's no source information\n // to gather from it.\n if (segment.length === 1) return SOURCELESS_MAPPING;\n\n return originalPositionFor(\n source.sources[segment[1]],\n segment[2],\n segment[3],\n segment.length === 5 ? source.map.names[segment[4]] : name\n );\n}\n","import { TraceMap } from '@jridgewell/trace-mapping';\n\nimport { OriginalSource, MapSource } from './source-map-tree';\n\nimport type { Sources, MapSource as MapSourceType } from './source-map-tree';\nimport type { SourceMapInput, SourceMapLoader, LoaderContext } from './types';\n\nfunction asArray(value: T | T[]): T[] {\n if (Array.isArray(value)) return value;\n return [value];\n}\n\n/**\n * Recursively builds a tree structure out of sourcemap files, with each node\n * being either an `OriginalSource` \"leaf\" or a `SourceMapTree` composed of\n * `OriginalSource`s and `SourceMapTree`s.\n *\n * Every sourcemap is composed of a collection of source files and mappings\n * into locations of those source files. When we generate a `SourceMapTree` for\n * the sourcemap, we attempt to load each source file's own sourcemap. If it\n * does not have an associated sourcemap, it is considered an original,\n * unmodified source file.\n */\nexport default function buildSourceMapTree(\n input: SourceMapInput | SourceMapInput[],\n loader: SourceMapLoader\n): MapSourceType {\n const maps = asArray(input).map((m) => new TraceMap(m, ''));\n const map = maps.pop()!;\n\n for (let i = 0; i < maps.length; i++) {\n if (maps[i].sources.length > 1) {\n throw new Error(\n `Transformation map ${i} must have exactly one source file.\\n` +\n 'Did you specify these with the most recent transformation maps first?'\n );\n }\n }\n\n let tree = build(map, loader, '', 0);\n for (let i = maps.length - 1; i >= 0; i--) {\n tree = MapSource(maps[i], [tree]);\n }\n return tree;\n}\n\nfunction build(\n map: TraceMap,\n loader: SourceMapLoader,\n importer: string,\n importerDepth: number\n): MapSourceType {\n const { resolvedSources, sourcesContent, ignoreList } = map;\n\n const depth = importerDepth + 1;\n const children = resolvedSources.map((sourceFile: string | null, i: number): Sources => {\n // The loading context gives the loader more information about why this file is being loaded\n // (eg, from which importer). It also allows the loader to override the location of the loaded\n // sourcemap/original source, or to override the content in the sourcesContent field if it's\n // an unmodified source file.\n const ctx: LoaderContext = {\n importer,\n depth,\n source: sourceFile || '',\n content: undefined,\n ignore: undefined,\n };\n\n // Use the provided loader callback to retrieve the file's sourcemap.\n // TODO: We should eventually support async loading of sourcemap files.\n const sourceMap = loader(ctx.source, ctx);\n\n const { source, content, ignore } = ctx;\n\n // If there is a sourcemap, then we need to recurse into it to load its source files.\n if (sourceMap) return build(new TraceMap(sourceMap, source), loader, source, depth);\n\n // Else, it's an unmodified source file.\n // The contents of this unmodified source file can be overridden via the loader context,\n // allowing it to be explicitly null or a string. If it remains undefined, we fall back to\n // the importing sourcemap's `sourcesContent` field.\n const sourceContent =\n content !== undefined ? content : sourcesContent ? sourcesContent[i] : null;\n const ignored = ignore !== undefined ? ignore : ignoreList ? ignoreList.includes(i) : false;\n return OriginalSource(source, sourceContent, ignored);\n });\n\n return MapSource(map, children);\n}\n","import { toDecodedMap, toEncodedMap } from '@jridgewell/gen-mapping';\n\nimport type { GenMapping } from '@jridgewell/gen-mapping';\nimport type { DecodedSourceMap, EncodedSourceMap, Options } from './types';\n\n/**\n * A SourceMap v3 compatible sourcemap, which only includes fields that were\n * provided to it.\n */\nexport default class SourceMap {\n declare file?: string | null;\n declare mappings: EncodedSourceMap['mappings'] | DecodedSourceMap['mappings'];\n declare sourceRoot?: string;\n declare names: string[];\n declare sources: (string | null)[];\n declare sourcesContent?: (string | null)[];\n declare version: 3;\n declare ignoreList: number[] | undefined;\n\n constructor(map: GenMapping, options: Options) {\n const out = options.decodedMappings ? toDecodedMap(map) : toEncodedMap(map);\n this.version = out.version; // SourceMap spec says this should be first.\n this.file = out.file;\n this.mappings = out.mappings as SourceMap['mappings'];\n this.names = out.names as SourceMap['names'];\n this.ignoreList = out.ignoreList as SourceMap['ignoreList'];\n this.sourceRoot = out.sourceRoot;\n\n this.sources = out.sources as SourceMap['sources'];\n if (!options.excludeContent) {\n this.sourcesContent = out.sourcesContent as SourceMap['sourcesContent'];\n }\n }\n\n toString(): string {\n return JSON.stringify(this);\n }\n}\n","import buildSourceMapTree from './build-source-map-tree';\nimport { traceMappings } from './source-map-tree';\nimport SourceMap from './source-map';\n\nimport type { SourceMapInput, SourceMapLoader, Options } from './types';\nexport type {\n SourceMapSegment,\n EncodedSourceMap,\n EncodedSourceMap as RawSourceMap,\n DecodedSourceMap,\n SourceMapInput,\n SourceMapLoader,\n LoaderContext,\n Options,\n} from './types';\nexport type { SourceMap };\n\n/**\n * Traces through all the mappings in the root sourcemap, through the sources\n * (and their sourcemaps), all the way back to the original source location.\n *\n * `loader` will be called every time we encounter a source file. If it returns\n * a sourcemap, we will recurse into that sourcemap to continue the trace. If\n * it returns a falsey value, that source file is treated as an original,\n * unmodified source file.\n *\n * Pass `excludeContent` to exclude any self-containing source file content\n * from the output sourcemap.\n *\n * Pass `decodedMappings` to receive a SourceMap with decoded (instead of\n * VLQ encoded) mappings.\n */\nexport default function remapping(\n input: SourceMapInput | SourceMapInput[],\n loader: SourceMapLoader,\n options?: boolean | Options\n): SourceMap {\n const opts =\n typeof options === 'object' ? options : { excludeContent: !!options, decodedMappings: false };\n const tree = buildSourceMapTree(input, loader);\n return new SourceMap(traceMappings(tree), opts);\n}\n"],"names":[],"mappings":";;;AAgCA,MAAM,kBAAkB,mBAAmB,aAAa,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AACtF,MAAM,aAAa,GAAc,EAAE,CAAC;AAEpC,SAAS,aAAa,CACpB,MAAc,EACd,IAAY,EACZ,MAAc,EACd,IAAY,EACZ,OAAsB,EACtB,MAAe,EAAA;AAEf,IAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;AACzD,CAAC;AAgBD,SAAS,MAAM,CACb,GAAoB,EACpB,OAAkB,EAClB,MAAmB,EACnB,OAAsB,EACtB,MAAe,EAAA;IAEf,OAAO;QACL,GAAG;QACH,OAAO;QACP,MAAM;QACN,OAAO;QACP,MAAM;KACA,CAAC;AACX,CAAC;AAED;;;AAGG;AACa,SAAA,SAAS,CAAC,GAAa,EAAE,OAAkB,EAAA;AACzD,IAAA,OAAO,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AAC/C,CAAC;AAED;;;AAGG;SACa,cAAc,CAC5B,MAAc,EACd,OAAsB,EACtB,MAAe,EAAA;AAEf,IAAA,OAAO,MAAM,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAC9D,CAAC;AAED;;;AAGG;AACG,SAAU,aAAa,CAAC,IAAe,EAAA;;;AAG3C,IAAA,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EA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C3B,QAAA,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;AACrB,QAAA,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAiC,CAAC;AACtD,QAAA,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAA2B,CAAC;AAC7C,QAAA,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,UAAqC,CAAC;AAC5D,QAAA,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,UAAU,CAAC;AAEjC,QAAA,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,OAA+B,CAAC;AACnD,QAAA,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE;AAC3B,YAAA,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC,cAA6C,CAAC;AACzE,SAAA;KACF;IAED,QAAQ,GAAA;AACN,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;KAC7B;AACF;;ACpBD;;;;;;;;;;;;;;AAcG;AACqB,SAAA,SAAS,CAC/B,KAAwC,EACxC,MAAuB,EACvB,OAA2B,EAAA;IAE3B,MAAM,IAAI,GACR,OAAO,OAAO,KAAK,QAAQ,GAAG,OAAO,GAAG,EAAE,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC;IAChG,MAAM,IAAI,GAAG,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC/C,OAAO,IAAI,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;AAClD;;;;"} \ No newline at end of file diff --git a/node_modules/@ampproject/remapping/dist/remapping.umd.js b/node_modules/@ampproject/remapping/dist/remapping.umd.js new file mode 100644 index 0000000..6b7b3bb --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/remapping.umd.js @@ -0,0 +1,202 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@jridgewell/trace-mapping'), require('@jridgewell/gen-mapping')) : + typeof define === 'function' && define.amd ? define(['@jridgewell/trace-mapping', '@jridgewell/gen-mapping'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.remapping = factory(global.traceMapping, global.genMapping)); +})(this, (function (traceMapping, genMapping) { 'use strict'; + + const SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null, false); + const EMPTY_SOURCES = []; + function SegmentObject(source, line, column, name, content, ignore) { + return { source, line, column, name, content, ignore }; + } + function Source(map, sources, source, content, ignore) { + return { + map, + sources, + source, + content, + ignore, + }; + } + /** + * MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes + * (which may themselves be SourceMapTrees). + */ + function MapSource(map, sources) { + return Source(map, sources, '', null, false); + } + /** + * A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive + * segment tracing ends at the `OriginalSource`. + */ + function OriginalSource(source, content, ignore) { + return Source(null, EMPTY_SOURCES, source, content, ignore); + } + /** + * traceMappings is only called on the root level SourceMapTree, and begins the process of + * resolving each mapping in terms of the original source files. + */ + function traceMappings(tree) { + // TODO: Eventually support sourceRoot, which has to be removed because the sources are already + // fully resolved. We'll need to make sources relative to the sourceRoot before adding them. + const gen = new genMapping.GenMapping({ file: tree.map.file }); + const { sources: rootSources, map } = tree; + const rootNames = map.names; + const rootMappings = traceMapping.decodedMappings(map); + for (let i = 0; i < rootMappings.length; i++) { + const segments = rootMappings[i]; + for (let j = 0; j < segments.length; j++) { + const segment = segments[j]; + const genCol = segment[0]; + let traced = SOURCELESS_MAPPING; + // 1-length segments only move the current generated column, there's no source information + // to gather from it. + if (segment.length !== 1) { + const source = rootSources[segment[1]]; + traced = originalPositionFor(source, segment[2], segment[3], segment.length === 5 ? rootNames[segment[4]] : ''); + // If the trace is invalid, then the trace ran into a sourcemap that doesn't contain a + // respective segment into an original source. + if (traced == null) + continue; + } + const { column, line, name, content, source, ignore } = traced; + genMapping.maybeAddSegment(gen, i, genCol, source, line, column, name); + if (source && content != null) + genMapping.setSourceContent(gen, source, content); + if (ignore) + genMapping.setIgnore(gen, source, true); + } + } + return gen; + } + /** + * originalPositionFor is only called on children SourceMapTrees. It recurses down into its own + * child SourceMapTrees, until we find the original source map. + */ + function originalPositionFor(source, line, column, name) { + if (!source.map) { + return SegmentObject(source.source, line, column, name, source.content, source.ignore); + } + const segment = traceMapping.traceSegment(source.map, line, column); + // If we couldn't find a segment, then this doesn't exist in the sourcemap. + if (segment == null) + return null; + // 1-length segments only move the current generated column, there's no source information + // to gather from it. + if (segment.length === 1) + return SOURCELESS_MAPPING; + return originalPositionFor(source.sources[segment[1]], segment[2], segment[3], segment.length === 5 ? source.map.names[segment[4]] : name); + } + + function asArray(value) { + if (Array.isArray(value)) + return value; + return [value]; + } + /** + * Recursively builds a tree structure out of sourcemap files, with each node + * being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of + * `OriginalSource`s and `SourceMapTree`s. + * + * Every sourcemap is composed of a collection of source files and mappings + * into locations of those source files. When we generate a `SourceMapTree` for + * the sourcemap, we attempt to load each source file's own sourcemap. If it + * does not have an associated sourcemap, it is considered an original, + * unmodified source file. + */ + function buildSourceMapTree(input, loader) { + const maps = asArray(input).map((m) => new traceMapping.TraceMap(m, '')); + const map = maps.pop(); + for (let i = 0; i < maps.length; i++) { + if (maps[i].sources.length > 1) { + throw new Error(`Transformation map ${i} must have exactly one source file.\n` + + 'Did you specify these with the most recent transformation maps first?'); + } + } + let tree = build(map, loader, '', 0); + for (let i = maps.length - 1; i >= 0; i--) { + tree = MapSource(maps[i], [tree]); + } + return tree; + } + function build(map, loader, importer, importerDepth) { + const { resolvedSources, sourcesContent, ignoreList } = map; + const depth = importerDepth + 1; + const children = resolvedSources.map((sourceFile, i) => { + // The loading context gives the loader more information about why this file is being loaded + // (eg, from which importer). It also allows the loader to override the location of the loaded + // sourcemap/original source, or to override the content in the sourcesContent field if it's + // an unmodified source file. + const ctx = { + importer, + depth, + source: sourceFile || '', + content: undefined, + ignore: undefined, + }; + // Use the provided loader callback to retrieve the file's sourcemap. + // TODO: We should eventually support async loading of sourcemap files. + const sourceMap = loader(ctx.source, ctx); + const { source, content, ignore } = ctx; + // If there is a sourcemap, then we need to recurse into it to load its source files. + if (sourceMap) + return build(new traceMapping.TraceMap(sourceMap, source), loader, source, depth); + // Else, it's an unmodified source file. + // The contents of this unmodified source file can be overridden via the loader context, + // allowing it to be explicitly null or a string. If it remains undefined, we fall back to + // the importing sourcemap's `sourcesContent` field. + const sourceContent = content !== undefined ? content : sourcesContent ? sourcesContent[i] : null; + const ignored = ignore !== undefined ? ignore : ignoreList ? ignoreList.includes(i) : false; + return OriginalSource(source, sourceContent, ignored); + }); + return MapSource(map, children); + } + + /** + * A SourceMap v3 compatible sourcemap, which only includes fields that were + * provided to it. + */ + class SourceMap { + constructor(map, options) { + const out = options.decodedMappings ? genMapping.toDecodedMap(map) : genMapping.toEncodedMap(map); + this.version = out.version; // SourceMap spec says this should be first. + this.file = out.file; + this.mappings = out.mappings; + this.names = out.names; + this.ignoreList = out.ignoreList; + this.sourceRoot = out.sourceRoot; + this.sources = out.sources; + if (!options.excludeContent) { + this.sourcesContent = out.sourcesContent; + } + } + toString() { + return JSON.stringify(this); + } + } + + /** + * Traces through all the mappings in the root sourcemap, through the sources + * (and their sourcemaps), all the way back to the original source location. + * + * `loader` will be called every time we encounter a source file. If it returns + * a sourcemap, we will recurse into that sourcemap to continue the trace. If + * it returns a falsey value, that source file is treated as an original, + * unmodified source file. + * + * Pass `excludeContent` to exclude any self-containing source file content + * from the output sourcemap. + * + * Pass `decodedMappings` to receive a SourceMap with decoded (instead of + * VLQ encoded) mappings. + */ + function remapping(input, loader, options) { + const opts = typeof options === 'object' ? options : { excludeContent: !!options, decodedMappings: false }; + const tree = buildSourceMapTree(input, loader); + return new SourceMap(traceMappings(tree), opts); + } + + return remapping; + +})); +//# sourceMappingURL=remapping.umd.js.map diff --git a/node_modules/@ampproject/remapping/dist/remapping.umd.js.map b/node_modules/@ampproject/remapping/dist/remapping.umd.js.map new file mode 100644 index 0000000..d3f0f87 --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/remapping.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"remapping.umd.js","sources":["../src/source-map-tree.ts","../src/build-source-map-tree.ts","../src/source-map.ts","../src/remapping.ts"],"sourcesContent":["import { GenMapping, maybeAddSegment, setIgnore, setSourceContent } from '@jridgewell/gen-mapping';\nimport { traceSegment, decodedMappings } from '@jridgewell/trace-mapping';\n\nimport type { TraceMap } from '@jridgewell/trace-mapping';\n\nexport type SourceMapSegmentObject = {\n column: number;\n line: number;\n name: string;\n source: string;\n content: string | null;\n ignore: boolean;\n};\n\nexport type OriginalSource = {\n map: null;\n sources: Sources[];\n source: string;\n content: string | null;\n ignore: boolean;\n};\n\nexport type MapSource = {\n map: TraceMap;\n sources: Sources[];\n source: string;\n content: null;\n ignore: false;\n};\n\nexport type Sources = OriginalSource | MapSource;\n\nconst SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null, false);\nconst EMPTY_SOURCES: Sources[] = [];\n\nfunction SegmentObject(\n source: string,\n line: number,\n column: number,\n name: string,\n content: string | null,\n ignore: boolean\n): SourceMapSegmentObject {\n return { source, line, column, name, content, ignore };\n}\n\nfunction Source(\n map: TraceMap,\n sources: Sources[],\n source: '',\n content: null,\n ignore: false\n): MapSource;\nfunction Source(\n map: null,\n sources: Sources[],\n source: string,\n content: string | null,\n ignore: boolean\n): OriginalSource;\nfunction Source(\n map: TraceMap | null,\n sources: Sources[],\n source: string | '',\n content: string | null,\n ignore: boolean\n): Sources {\n return {\n map,\n sources,\n source,\n content,\n ignore,\n } as any;\n}\n\n/**\n * MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes\n * (which may themselves be SourceMapTrees).\n */\nexport function MapSource(map: TraceMap, sources: Sources[]): MapSource {\n return Source(map, sources, '', null, false);\n}\n\n/**\n * A \"leaf\" node in the sourcemap tree, representing an original, unmodified source file. Recursive\n * segment tracing ends at the `OriginalSource`.\n */\nexport function OriginalSource(\n source: string,\n content: string | null,\n ignore: boolean\n): OriginalSource {\n return Source(null, EMPTY_SOURCES, source, content, ignore);\n}\n\n/**\n * traceMappings is only called on the root level SourceMapTree, and begins the process of\n * resolving each mapping in terms of the original source files.\n */\nexport function traceMappings(tree: MapSource): GenMapping {\n // TODO: Eventually support sourceRoot, which has to be removed because the sources are already\n // fully resolved. We'll need to make sources relative to the sourceRoot before adding them.\n const gen = new GenMapping({ file: tree.map.file });\n const { sources: rootSources, map } = tree;\n const rootNames = map.names;\n const rootMappings = decodedMappings(map);\n\n for (let i = 0; i < rootMappings.length; i++) {\n const segments = rootMappings[i];\n\n for (let j = 0; j < segments.length; j++) {\n const segment = segments[j];\n const genCol = segment[0];\n let traced: SourceMapSegmentObject | null = SOURCELESS_MAPPING;\n\n // 1-length segments only move the current generated column, there's no source information\n // to gather from it.\n if (segment.length !== 1) {\n const source = rootSources[segment[1]];\n traced = originalPositionFor(\n source,\n segment[2],\n segment[3],\n segment.length === 5 ? rootNames[segment[4]] : ''\n );\n\n // If the trace is invalid, then the trace ran into a sourcemap that doesn't contain a\n // respective segment into an original source.\n if (traced == null) continue;\n }\n\n const { column, line, name, content, source, ignore } = traced;\n\n maybeAddSegment(gen, i, genCol, source, line, column, name);\n if (source && content != null) setSourceContent(gen, source, content);\n if (ignore) setIgnore(gen, source, true);\n }\n }\n\n return gen;\n}\n\n/**\n * originalPositionFor is only called on children SourceMapTrees. It recurses down into its own\n * child SourceMapTrees, until we find the original source map.\n */\nexport function originalPositionFor(\n source: Sources,\n line: number,\n column: number,\n name: string\n): SourceMapSegmentObject | null {\n if (!source.map) {\n return SegmentObject(source.source, line, column, name, source.content, source.ignore);\n }\n\n const segment = traceSegment(source.map, line, column);\n\n // If we couldn't find a segment, then this doesn't exist in the sourcemap.\n if (segment == null) return null;\n // 1-length segments only move the current generated column, there's no source information\n // to gather from it.\n if (segment.length === 1) return SOURCELESS_MAPPING;\n\n return originalPositionFor(\n source.sources[segment[1]],\n segment[2],\n segment[3],\n segment.length === 5 ? source.map.names[segment[4]] : name\n );\n}\n","import { TraceMap } from '@jridgewell/trace-mapping';\n\nimport { OriginalSource, MapSource } from './source-map-tree';\n\nimport type { Sources, MapSource as MapSourceType } from './source-map-tree';\nimport type { SourceMapInput, SourceMapLoader, LoaderContext } from './types';\n\nfunction asArray(value: T | T[]): T[] {\n if (Array.isArray(value)) return value;\n return [value];\n}\n\n/**\n * Recursively builds a tree structure out of sourcemap files, with each node\n * being either an `OriginalSource` \"leaf\" or a `SourceMapTree` composed of\n * `OriginalSource`s and `SourceMapTree`s.\n *\n * Every sourcemap is composed of a collection of source files and mappings\n * into locations of those source files. When we generate a `SourceMapTree` for\n * the sourcemap, we attempt to load each source file's own sourcemap. If it\n * does not have an associated sourcemap, it is considered an original,\n * unmodified source file.\n */\nexport default function buildSourceMapTree(\n input: SourceMapInput | SourceMapInput[],\n loader: SourceMapLoader\n): MapSourceType {\n const maps = asArray(input).map((m) => new TraceMap(m, ''));\n const map = maps.pop()!;\n\n for (let i = 0; i < maps.length; i++) {\n if (maps[i].sources.length > 1) {\n throw new Error(\n `Transformation map ${i} must have exactly one source file.\\n` +\n 'Did you specify these with the most recent transformation maps first?'\n );\n }\n }\n\n let tree = build(map, loader, '', 0);\n for (let i = maps.length - 1; i >= 0; i--) {\n tree = MapSource(maps[i], [tree]);\n }\n return tree;\n}\n\nfunction build(\n map: TraceMap,\n loader: SourceMapLoader,\n importer: string,\n importerDepth: number\n): MapSourceType {\n const { resolvedSources, sourcesContent, ignoreList } = map;\n\n const depth = importerDepth + 1;\n const children = resolvedSources.map((sourceFile: string | null, i: number): Sources => {\n // The loading context gives the loader more information about why this file is being loaded\n // (eg, from which importer). It also allows the loader to override the location of the loaded\n // sourcemap/original source, or to override the content in the sourcesContent field if it's\n // an unmodified source file.\n const ctx: LoaderContext = {\n importer,\n depth,\n source: sourceFile || '',\n content: undefined,\n ignore: undefined,\n };\n\n // Use the provided loader callback to retrieve the file's sourcemap.\n // TODO: We should eventually support async loading of sourcemap files.\n const sourceMap = loader(ctx.source, ctx);\n\n const { source, content, ignore } = ctx;\n\n // If there is a sourcemap, then we need to recurse into it to load its source files.\n if (sourceMap) return build(new TraceMap(sourceMap, source), loader, source, depth);\n\n // Else, it's an unmodified source file.\n // The contents of this unmodified source file can be overridden via the loader context,\n // allowing it to be explicitly null or a string. If it remains undefined, we fall back to\n // the importing sourcemap's `sourcesContent` field.\n const sourceContent =\n content !== undefined ? content : sourcesContent ? sourcesContent[i] : null;\n const ignored = ignore !== undefined ? ignore : ignoreList ? ignoreList.includes(i) : false;\n return OriginalSource(source, sourceContent, ignored);\n });\n\n return MapSource(map, children);\n}\n","import { toDecodedMap, toEncodedMap } from '@jridgewell/gen-mapping';\n\nimport type { GenMapping } from '@jridgewell/gen-mapping';\nimport type { DecodedSourceMap, EncodedSourceMap, Options } from './types';\n\n/**\n * A SourceMap v3 compatible sourcemap, which only includes fields that were\n * provided to it.\n */\nexport default class SourceMap {\n declare file?: string | null;\n declare mappings: EncodedSourceMap['mappings'] | DecodedSourceMap['mappings'];\n declare sourceRoot?: string;\n declare names: string[];\n declare sources: (string | null)[];\n declare sourcesContent?: (string | null)[];\n declare version: 3;\n declare ignoreList: number[] | undefined;\n\n constructor(map: GenMapping, options: Options) {\n const out = options.decodedMappings ? toDecodedMap(map) : toEncodedMap(map);\n this.version = out.version; // SourceMap spec says this should be first.\n this.file = out.file;\n this.mappings = out.mappings as SourceMap['mappings'];\n this.names = out.names as SourceMap['names'];\n this.ignoreList = out.ignoreList as SourceMap['ignoreList'];\n this.sourceRoot = out.sourceRoot;\n\n this.sources = out.sources as SourceMap['sources'];\n if (!options.excludeContent) {\n this.sourcesContent = out.sourcesContent as SourceMap['sourcesContent'];\n }\n }\n\n toString(): string {\n return JSON.stringify(this);\n }\n}\n","import buildSourceMapTree from './build-source-map-tree';\nimport { traceMappings } from './source-map-tree';\nimport SourceMap from './source-map';\n\nimport type { SourceMapInput, SourceMapLoader, Options } from './types';\nexport type {\n SourceMapSegment,\n EncodedSourceMap,\n EncodedSourceMap as RawSourceMap,\n DecodedSourceMap,\n SourceMapInput,\n SourceMapLoader,\n LoaderContext,\n Options,\n} from './types';\nexport type { SourceMap };\n\n/**\n * Traces through all the mappings in the root sourcemap, through the sources\n * (and their sourcemaps), all the way back to the original source location.\n *\n * `loader` will be called every time we encounter a source file. If it returns\n * a sourcemap, we will recurse into that sourcemap to continue the trace. If\n * it returns a falsey value, that source file is treated as an original,\n * unmodified source file.\n *\n * Pass `excludeContent` to exclude any self-containing source file content\n * from the output sourcemap.\n *\n * Pass `decodedMappings` to receive a SourceMap with decoded (instead of\n * VLQ encoded) mappings.\n */\nexport default function remapping(\n input: SourceMapInput | SourceMapInput[],\n loader: SourceMapLoader,\n options?: boolean | Options\n): SourceMap {\n const opts =\n typeof options === 'object' ? options : { excludeContent: !!options, decodedMappings: false };\n const tree = buildSourceMapTree(input, loader);\n return new SourceMap(traceMappings(tree), opts);\n}\n"],"names":["GenMapping","decodedMappings","maybeAddSegment","setSourceContent","setIgnore","traceSegment","TraceMap","toDecodedMap","toEncodedMap"],"mappings":";;;;;;IAgCA,MAAM,kBAAkB,mBAAmB,aAAa,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IACtF,MAAM,aAAa,GAAc,EAAE,CAAC;IAEpC,SAAS,aAAa,CACpB,MAAc,EACd,IAAY,EACZ,MAAc,EACd,IAAY,EACZ,OAAsB,EACtB,MAAe,EAAA;IAEf,IAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IACzD,CAAC;IAgBD,SAAS,MAAM,CACb,GAAoB,EACpB,OAAkB,EAClB,MAAmB,EACnB,OAAsB,EACtB,MAAe,EAAA;QAEf,OAAO;YACL,GAAG;YACH,OAAO;YAC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AM,IAAI,GACR,OAAO,OAAO,KAAK,QAAQ,GAAG,OAAO,GAAG,EAAE,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC;QAChG,MAAM,IAAI,GAAG,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAC/C,OAAO,IAAI,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;IAClD;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@ampproject/remapping/dist/types/build-source-map-tree.d.ts b/node_modules/@ampproject/remapping/dist/types/build-source-map-tree.d.ts new file mode 100644 index 0000000..f87fcea --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/types/build-source-map-tree.d.ts @@ -0,0 +1,14 @@ +import type { MapSource as MapSourceType } from './source-map-tree'; +import type { SourceMapInput, SourceMapLoader } from './types'; +/** + * Recursively builds a tree structure out of sourcemap files, with each node + * being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of + * `OriginalSource`s and `SourceMapTree`s. + * + * Every sourcemap is composed of a collection of source files and mappings + * into locations of those source files. When we generate a `SourceMapTree` for + * the sourcemap, we attempt to load each source file's own sourcemap. If it + * does not have an associated sourcemap, it is considered an original, + * unmodified source file. + */ +export default function buildSourceMapTree(input: SourceMapInput | SourceMapInput[], loader: SourceMapLoader): MapSourceType; diff --git a/node_modules/@ampproject/remapping/dist/types/remapping.d.ts b/node_modules/@ampproject/remapping/dist/types/remapping.d.ts new file mode 100644 index 0000000..771fe30 --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/types/remapping.d.ts @@ -0,0 +1,20 @@ +import SourceMap from './source-map'; +import type { SourceMapInput, SourceMapLoader, Options } from './types'; +export type { SourceMapSegment, EncodedSourceMap, EncodedSourceMap as RawSourceMap, DecodedSourceMap, SourceMapInput, SourceMapLoader, LoaderContext, Options, } from './types'; +export type { SourceMap }; +/** + * Traces through all the mappings in the root sourcemap, through the sources + * (and their sourcemaps), all the way back to the original source location. + * + * `loader` will be called every time we encounter a source file. If it returns + * a sourcemap, we will recurse into that sourcemap to continue the trace. If + * it returns a falsey value, that source file is treated as an original, + * unmodified source file. + * + * Pass `excludeContent` to exclude any self-containing source file content + * from the output sourcemap. + * + * Pass `decodedMappings` to receive a SourceMap with decoded (instead of + * VLQ encoded) mappings. + */ +export default function remapping(input: SourceMapInput | SourceMapInput[], loader: SourceMapLoader, options?: boolean | Options): SourceMap; diff --git a/node_modules/@ampproject/remapping/dist/types/source-map-tree.d.ts b/node_modules/@ampproject/remapping/dist/types/source-map-tree.d.ts new file mode 100644 index 0000000..935bc69 --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/types/source-map-tree.d.ts @@ -0,0 +1,45 @@ +import { GenMapping } from '@jridgewell/gen-mapping'; +import type { TraceMap } from '@jridgewell/trace-mapping'; +export declare type SourceMapSegmentObject = { + column: number; + line: number; + name: string; + source: string; + content: string | null; + ignore: boolean; +}; +export declare type OriginalSource = { + map: null; + sources: Sources[]; + source: string; + content: string | null; + ignore: boolean; +}; +export declare type MapSource = { + map: TraceMap; + sources: Sources[]; + source: string; + content: null; + ignore: false; +}; +export declare type Sources = OriginalSource | MapSource; +/** + * MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes + * (which may themselves be SourceMapTrees). + */ +export declare function MapSource(map: TraceMap, sources: Sources[]): MapSource; +/** + * A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive + * segment tracing ends at the `OriginalSource`. + */ +export declare function OriginalSource(source: string, content: string | null, ignore: boolean): OriginalSource; +/** + * traceMappings is only called on the root level SourceMapTree, and begins the process of + * resolving each mapping in terms of the original source files. + */ +export declare function traceMappings(tree: MapSource): GenMapping; +/** + * originalPositionFor is only called on children SourceMapTrees. It recurses down into its own + * child SourceMapTrees, until we find the original source map. + */ +export declare function originalPositionFor(source: Sources, line: number, column: number, name: string): SourceMapSegmentObject | null; diff --git a/node_modules/@ampproject/remapping/dist/types/source-map.d.ts b/node_modules/@ampproject/remapping/dist/types/source-map.d.ts new file mode 100644 index 0000000..cbd7f0a --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/types/source-map.d.ts @@ -0,0 +1,18 @@ +import type { GenMapping } from '@jridgewell/gen-mapping'; +import type { DecodedSourceMap, EncodedSourceMap, Options } from './types'; +/** + * A SourceMap v3 compatible sourcemap, which only includes fields that were + * provided to it. + */ +export default class SourceMap { + file?: string | null; + mappings: EncodedSourceMap['mappings'] | DecodedSourceMap['mappings']; + sourceRoot?: string; + names: string[]; + sources: (string | null)[]; + sourcesContent?: (string | null)[]; + version: 3; + ignoreList: number[] | undefined; + constructor(map: GenMapping, options: Options); + toString(): string; +} diff --git a/node_modules/@ampproject/remapping/dist/types/types.d.ts b/node_modules/@ampproject/remapping/dist/types/types.d.ts new file mode 100644 index 0000000..4d78c4b --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/types/types.d.ts @@ -0,0 +1,15 @@ +import type { SourceMapInput } from '@jridgewell/trace-mapping'; +export type { SourceMapSegment, DecodedSourceMap, EncodedSourceMap, } from '@jridgewell/trace-mapping'; +export type { SourceMapInput }; +export declare type LoaderContext = { + readonly importer: string; + readonly depth: number; + source: string; + content: string | null | undefined; + ignore: boolean | undefined; +}; +export declare type SourceMapLoader = (file: string, ctx: LoaderContext) => SourceMapInput | null | undefined | void; +export declare type Options = { + excludeContent?: boolean; + decodedMappings?: boolean; +}; diff --git a/node_modules/@ampproject/remapping/package.json b/node_modules/@ampproject/remapping/package.json new file mode 100644 index 0000000..091224c --- /dev/null +++ b/node_modules/@ampproject/remapping/package.json @@ -0,0 +1,75 @@ +{ + "name": "@ampproject/remapping", + "version": "2.3.0", + "description": "Remap sequential sourcemaps through transformations to point at the original source code", + "keywords": [ + "source", + "map", + "remap" + ], + "main": "dist/remapping.umd.js", + "module": "dist/remapping.mjs", + "types": "dist/types/remapping.d.ts", + "exports": { + ".": [ + { + "types": "./dist/types/remapping.d.ts", + "browser": "./dist/remapping.umd.js", + "require": "./dist/remapping.umd.js", + "import": "./dist/remapping.mjs" + }, + "./dist/remapping.umd.js" + ], + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "author": "Justin Ridgewell ", + "repository": { + "type": "git", + "url": "git+https://github.com/ampproject/remapping.git" + }, + "license": "Apache-2.0", + "engines": { + "node": ">=6.0.0" + }, + "scripts": { + "build": "run-s -n build:*", + "build:rollup": "rollup -c rollup.config.js", + "build:ts": "tsc --project tsconfig.build.json", + "lint": "run-s -n lint:*", + "lint:prettier": "npm run test:lint:prettier -- --write", + "lint:ts": "npm run test:lint:ts -- --fix", + "prebuild": "rm -rf dist", + "prepublishOnly": "npm run preversion", + "preversion": "run-s test build", + "test": "run-s -n test:lint test:only", + "test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand", + "test:lint": "run-s -n test:lint:*", + "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", + "test:lint:ts": "eslint '{src,test}/**/*.ts'", + "test:only": "jest --coverage", + "test:watch": "jest --coverage --watch" + }, + "devDependencies": { + "@rollup/plugin-typescript": "8.3.2", + "@types/jest": "27.4.1", + "@typescript-eslint/eslint-plugin": "5.20.0", + "@typescript-eslint/parser": "5.20.0", + "eslint": "8.14.0", + "eslint-config-prettier": "8.5.0", + "jest": "27.5.1", + "jest-config": "27.5.1", + "npm-run-all": "4.1.5", + "prettier": "2.6.2", + "rollup": "2.70.2", + "ts-jest": "27.1.4", + "tslib": "2.4.0", + "typescript": "4.6.3" + }, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } +} diff --git a/node_modules/@esbuild/linux-x64/README.md b/node_modules/@esbuild/linux-x64/README.md new file mode 100644 index 0000000..b2f1930 --- /dev/null +++ b/node_modules/@esbuild/linux-x64/README.md @@ -0,0 +1,3 @@ +# esbuild + +This is the Linux 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details. diff --git a/node_modules/@esbuild/linux-x64/bin/esbuild b/node_modules/@esbuild/linux-x64/bin/esbuild new file mode 100755 index 0000000..6a456f3 Binary files /dev/null and b/node_modules/@esbuild/linux-x64/bin/esbuild differ diff --git a/node_modules/@esbuild/linux-x64/package.json b/node_modules/@esbuild/linux-x64/package.json new file mode 100644 index 0000000..8d0ec96 --- /dev/null +++ b/node_modules/@esbuild/linux-x64/package.json @@ -0,0 +1,20 @@ +{ + "name": "@esbuild/linux-x64", + "version": "0.25.9", + "description": "The Linux 64-bit binary for esbuild, a JavaScript bundler.", + "repository": { + "type": "git", + "url": "git+https://github.com/evanw/esbuild.git" + }, + "license": "MIT", + "preferUnplugged": true, + "engines": { + "node": ">=18" + }, + "os": [ + "linux" + ], + "cpu": [ + "x64" + ] +} diff --git a/node_modules/@isaacs/cliui/LICENSE.txt b/node_modules/@isaacs/cliui/LICENSE.txt new file mode 100644 index 0000000..c7e2747 --- /dev/null +++ b/node_modules/@isaacs/cliui/LICENSE.txt @@ -0,0 +1,14 @@ +Copyright (c) 2015, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/@isaacs/cliui/README.md b/node_modules/@isaacs/cliui/README.md new file mode 100644 index 0000000..4880642 --- /dev/null +++ b/node_modules/@isaacs/cliui/README.md @@ -0,0 +1,143 @@ +# @isaacs/cliui + +Temporary fork of [cliui](http://npm.im/cliui). + +![ci](https://github.com/yargs/cliui/workflows/ci/badge.svg) +[![NPM version](https://img.shields.io/npm/v/cliui.svg)](https://www.npmjs.com/package/cliui) +[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) +![nycrc config on GitHub](https://img.shields.io/nycrc/yargs/cliui) + +easily create complex multi-column command-line-interfaces. + +## Example + +```js +const ui = require('cliui')() + +ui.div('Usage: $0 [command] [options]') + +ui.div({ + text: 'Options:', + padding: [2, 0, 1, 0] +}) + +ui.div( + { + text: "-f, --file", + width: 20, + padding: [0, 4, 0, 4] + }, + { + text: "the file to load." + + chalk.green("(if this description is long it wraps).") + , + width: 20 + }, + { + text: chalk.red("[required]"), + align: 'right' + } +) + +console.log(ui.toString()) +``` + +## Deno/ESM Support + +As of `v7` `cliui` supports [Deno](https://github.com/denoland/deno) and +[ESM](https://nodejs.org/api/esm.html#esm_ecmascript_modules): + +```typescript +import cliui from "https://deno.land/x/cliui/deno.ts"; + +const ui = cliui({}) + +ui.div('Usage: $0 [command] [options]') + +ui.div({ + text: 'Options:', + padding: [2, 0, 1, 0] +}) + +ui.div({ + text: "-f, --file", + width: 20, + padding: [0, 4, 0, 4] +}) + +console.log(ui.toString()) +``` + + + +## Layout DSL + +cliui exposes a simple layout DSL: + +If you create a single `ui.div`, passing a string rather than an +object: + +* `\n`: characters will be interpreted as new rows. +* `\t`: characters will be interpreted as new columns. +* `\s`: characters will be interpreted as padding. + +**as an example...** + +```js +var ui = require('./')({ + width: 60 +}) + +ui.div( + 'Usage: node ./bin/foo.js\n' + + ' \t provide a regex\n' + + ' \t provide a glob\t [required]' +) + +console.log(ui.toString()) +``` + +**will output:** + +```shell +Usage: node ./bin/foo.js + provide a regex + provide a glob [required] +``` + +## Methods + +```js +cliui = require('cliui') +``` + +### cliui({width: integer}) + +Specify the maximum width of the UI being generated. +If no width is provided, cliui will try to get the current window's width and use it, and if that doesn't work, width will be set to `80`. + +### cliui({wrap: boolean}) + +Enable or disable the wrapping of text in a column. + +### cliui.div(column, column, column) + +Create a row with any number of columns, a column +can either be a string, or an object with the following +options: + +* **text:** some text to place in the column. +* **width:** the width of a column. +* **align:** alignment, `right` or `center`. +* **padding:** `[top, right, bottom, left]`. +* **border:** should a border be placed around the div? + +### cliui.span(column, column, column) + +Similar to `div`, except the next row will be appended without +a new line being created. + +### cliui.resetOutput() + +Resets the UI elements of the current cliui instance, maintaining the values +set for `width` and `wrap`. diff --git a/node_modules/@isaacs/cliui/build/index.cjs b/node_modules/@isaacs/cliui/build/index.cjs new file mode 100644 index 0000000..aca2b85 --- /dev/null +++ b/node_modules/@isaacs/cliui/build/index.cjs @@ -0,0 +1,317 @@ +'use strict'; + +const align = { + right: alignRight, + center: alignCenter +}; +const top = 0; +const right = 1; +const bottom = 2; +const left = 3; +class UI { + constructor(opts) { + var _a; + this.width = opts.width; + /* c8 ignore start */ + this.wrap = (_a = opts.wrap) !== null && _a !== void 0 ? _a : true; + /* c8 ignore stop */ + this.rows = []; + } + span(...args) { + const cols = this.div(...args); + cols.span = true; + } + resetOutput() { + this.rows = []; + } + div(...args) { + if (args.length === 0) { + this.div(''); + } + if (this.wrap && this.shouldApplyLayoutDSL(...args) && typeof args[0] === 'string') { + return this.applyLayoutDSL(args[0]); + } + const cols = args.map(arg => { + if (typeof arg === 'string') { + return this.colFromString(arg); + } + return arg; + }); + this.rows.push(cols); + return cols; + } + shouldApplyLayoutDSL(...args) { + return args.length === 1 && typeof args[0] === 'string' && + /[\t\n]/.test(args[0]); + } + applyLayoutDSL(str) { + const rows = str.split('\n').map(row => row.split('\t')); + let leftColumnWidth = 0; + // simple heuristic for layout, make sure the + // second column lines up along the left-hand. + // don't allow the first column to take up more + // than 50% of the screen. + rows.forEach(columns => { + if (columns.length > 1 && mixin.stringWidth(columns[0]) > leftColumnWidth) { + leftColumnWidth = Math.min(Math.floor(this.width * 0.5), mixin.stringWidth(columns[0])); + } + }); + // generate a table: + // replacing ' ' with padding calculations. + // using the algorithmically generated width. + rows.forEach(columns => { + this.div(...columns.map((r, i) => { + return { + text: r.trim(), + padding: this.measurePadding(r), + width: (i === 0 && columns.length > 1) ? leftColumnWidth : undefined + }; + })); + }); + return this.rows[this.rows.length - 1]; + } + colFromString(text) { + return { + text, + padding: this.measurePadding(text) + }; + } + measurePadding(str) { + // measure padding without ansi escape codes + const noAnsi = mixin.stripAnsi(str); + return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length]; + } + toString() { + const lines = []; + this.rows.forEach(row => { + this.rowToString(row, lines); + }); + // don't display any lines with the + // hidden flag set. + return lines + .filter(line => !line.hidden) + .map(line => line.text) + .join('\n'); + } + rowToString(row, lines) { + this.rasterize(row).forEach((rrow, r) => { + let str = ''; + rrow.forEach((col, c) => { + const { width } = row[c]; // the width with padding. + const wrapWidth = this.negatePadding(row[c]); // the width without padding. + let ts = col; // temporary string used during alignment/padding. + if (wrapWidth > mixin.stringWidth(col)) { + ts += ' '.repeat(wrapWidth - mixin.stringWidth(col)); + } + // align the string within its column. + if (row[c].align && row[c].align !== 'left' && this.wrap) { + const fn = align[row[c].align]; + ts = fn(ts, wrapWidth); + if (mixin.stringWidth(ts) < wrapWidth) { + /* c8 ignore start */ + const w = width || 0; + /* c8 ignore stop */ + ts += ' '.repeat(w - mixin.stringWidth(ts) - 1); + } + } + // apply border and padding to string. + const padding = row[c].padding || [0, 0, 0, 0]; + if (padding[left]) { + str += ' '.repeat(padding[left]); + } + str += addBorder(row[c], ts, '| '); + str += ts; + str += addBorder(row[c], ts, ' |'); + if (padding[right]) { + str += ' '.repeat(padding[right]); + } + // if prior row is span, try to render the + // current row on the prior line. + if (r === 0 && lines.length > 0) { + str = this.renderInline(str, lines[lines.length - 1]); + } + }); + // remove trailing whitespace. + lines.push({ + text: str.replace(/ +$/, ''), + span: row.span + }); + }); + return lines; + } + // if the full 'source' can render in + // the target line, do so. + renderInline(source, previousLine) { + const match = source.match(/^ */); + /* c8 ignore start */ + const leadingWhitespace = match ? match[0].length : 0; + /* c8 ignore stop */ + const target = previousLine.text; + const targetTextWidth = mixin.stringWidth(target.trimEnd()); + if (!previousLine.span) { + return source; + } + // if we're not applying wrapping logic, + // just always append to the span. + if (!this.wrap) { + previousLine.hidden = true; + return target + source; + } + if (leadingWhitespace < targetTextWidth) { + return source; + } + previousLine.hidden = true; + return target.trimEnd() + ' '.repeat(leadingWhitespace - targetTextWidth) + source.trimStart(); + } + rasterize(row) { + const rrows = []; + const widths = this.columnWidths(row); + let wrapped; + // word wrap all columns, and create + // a data-structure that is easy to rasterize. + row.forEach((col, c) => { + // leave room for left and right padding. + col.width = widths[c]; + if (this.wrap) { + wrapped = mixin.wrap(col.text, this.negatePadding(col), { hard: true }).split('\n'); + } + else { + wrapped = col.text.split('\n'); + } + if (col.border) { + wrapped.unshift('.' + '-'.repeat(this.negatePadding(col) + 2) + '.'); + wrapped.push("'" + '-'.repeat(this.negatePadding(col) + 2) + "'"); + } + // add top and bottom padding. + if (col.padding) { + wrapped.unshift(...new Array(col.padding[top] || 0).fill('')); + wrapped.push(...new Array(col.padding[bottom] || 0).fill('')); + } + wrapped.forEach((str, r) => { + if (!rrows[r]) { + rrows.push([]); + } + const rrow = rrows[r]; + for (let i = 0; i < c; i++) { + if (rrow[i] === undefined) { + rrow.push(''); + } + } + rrow.push(str); + }); + }); + return rrows; + } + negatePadding(col) { + /* c8 ignore start */ + let wrapWidth = col.width || 0; + /* c8 ignore stop */ + if (col.padding) { + wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0); + } + if (col.border) { + wrapWidth -= 4; + } + return wrapWidth; + } + columnWidths(row) { + if (!this.wrap) { + return row.map(col => { + return col.width || mixin.stringWidth(col.text); + }); + } + let unset = row.length; + let remainingWidth = this.width; + // column widths can be set in config. + const widths = row.map(col => { + if (col.width) { + unset--; + remainingWidth -= col.width; + return col.width; + } + return undefined; + }); + // any unset widths should be calculated. + /* c8 ignore start */ + const unsetWidth = unset ? Math.floor(remainingWidth / unset) : 0; + /* c8 ignore stop */ + return widths.map((w, i) => { + if (w === undefined) { + return Math.max(unsetWidth, _minWidth(row[i])); + } + return w; + }); + } +} +function addBorder(col, ts, style) { + if (col.border) { + if (/[.']-+[.']/.test(ts)) { + return ''; + } + if (ts.trim().length !== 0) { + return style; + } + return ' '; + } + return ''; +} +// calculates the minimum width of +// a column, based on padding preferences. +function _minWidth(col) { + const padding = col.padding || []; + const minWidth = 1 + (padding[left] || 0) + (padding[right] || 0); + if (col.border) { + return minWidth + 4; + } + return minWidth; +} +function getWindowWidth() { + /* c8 ignore start */ + if (typeof process === 'object' && process.stdout && process.stdout.columns) { + return process.stdout.columns; + } + return 80; +} +/* c8 ignore stop */ +function alignRight(str, width) { + str = str.trim(); + const strWidth = mixin.stringWidth(str); + if (strWidth < width) { + return ' '.repeat(width - strWidth) + str; + } + return str; +} +function alignCenter(str, width) { + str = str.trim(); + const strWidth = mixin.stringWidth(str); + /* c8 ignore start */ + if (strWidth >= width) { + return str; + } + /* c8 ignore stop */ + return ' '.repeat((width - strWidth) >> 1) + str; +} +let mixin; +function cliui(opts, _mixin) { + mixin = _mixin; + return new UI({ + /* c8 ignore start */ + width: (opts === null || opts === void 0 ? void 0 : opts.width) || getWindowWidth(), + wrap: opts === null || opts === void 0 ? void 0 : opts.wrap + /* c8 ignore stop */ + }); +} + +// Bootstrap cliui with CommonJS dependencies: +const stringWidth = require('string-width-cjs'); +const stripAnsi = require('strip-ansi-cjs'); +const wrap = require('wrap-ansi-cjs'); +function ui(opts) { + return cliui(opts, { + stringWidth, + stripAnsi, + wrap + }); +} + +module.exports = ui; diff --git a/node_modules/@isaacs/cliui/build/index.d.cts b/node_modules/@isaacs/cliui/build/index.d.cts new file mode 100644 index 0000000..4567f94 --- /dev/null +++ b/node_modules/@isaacs/cliui/build/index.d.cts @@ -0,0 +1,43 @@ +interface UIOptions { + width: number; + wrap?: boolean; + rows?: string[]; +} +interface Column { + text: string; + width?: number; + align?: "right" | "left" | "center"; + padding: number[]; + border?: boolean; +} +interface ColumnArray extends Array { + span: boolean; +} +interface Line { + hidden?: boolean; + text: string; + span?: boolean; +} +declare class UI { + width: number; + wrap: boolean; + rows: ColumnArray[]; + constructor(opts: UIOptions); + span(...args: ColumnArray): void; + resetOutput(): void; + div(...args: (Column | string)[]): ColumnArray; + private shouldApplyLayoutDSL; + private applyLayoutDSL; + private colFromString; + private measurePadding; + toString(): string; + rowToString(row: ColumnArray, lines: Line[]): Line[]; + // if the full 'source' can render in + // the target line, do so. + private renderInline; + private rasterize; + private negatePadding; + private columnWidths; +} +declare function ui(opts: UIOptions): UI; +export { ui as default }; diff --git a/node_modules/@isaacs/cliui/build/lib/index.js b/node_modules/@isaacs/cliui/build/lib/index.js new file mode 100644 index 0000000..587b5ec --- /dev/null +++ b/node_modules/@isaacs/cliui/build/lib/index.js @@ -0,0 +1,302 @@ +'use strict'; +const align = { + right: alignRight, + center: alignCenter +}; +const top = 0; +const right = 1; +const bottom = 2; +const left = 3; +export class UI { + constructor(opts) { + var _a; + this.width = opts.width; + /* c8 ignore start */ + this.wrap = (_a = opts.wrap) !== null && _a !== void 0 ? _a : true; + /* c8 ignore stop */ + this.rows = []; + } + span(...args) { + const cols = this.div(...args); + cols.span = true; + } + resetOutput() { + this.rows = []; + } + div(...args) { + if (args.length === 0) { + this.div(''); + } + if (this.wrap && this.shouldApplyLayoutDSL(...args) && typeof args[0] === 'string') { + return this.applyLayoutDSL(args[0]); + } + const cols = args.map(arg => { + if (typeof arg === 'string') { + return this.colFromString(arg); + } + return arg; + }); + this.rows.push(cols); + return cols; + } + shouldApplyLayoutDSL(...args) { + return args.length === 1 && typeof args[0] === 'string' && + /[\t\n]/.test(args[0]); + } + applyLayoutDSL(str) { + const rows = str.split('\n').map(row => row.split('\t')); + let leftColumnWidth = 0; + // simple heuristic for layout, make sure the + // second column lines up along the left-hand. + // don't allow the first column to take up more + // than 50% of the screen. + rows.forEach(columns => { + if (columns.length > 1 && mixin.stringWidth(columns[0]) > leftColumnWidth) { + leftColumnWidth = Math.min(Math.floor(this.width * 0.5), mixin.stringWidth(columns[0])); + } + }); + // generate a table: + // replacing ' ' with padding calculations. + // using the algorithmically generated width. + rows.forEach(columns => { + this.div(...columns.map((r, i) => { + return { + text: r.trim(), + padding: this.measurePadding(r), + width: (i === 0 && columns.length > 1) ? leftColumnWidth : undefined + }; + })); + }); + return this.rows[this.rows.length - 1]; + } + colFromString(text) { + return { + text, + padding: this.measurePadding(text) + }; + } + measurePadding(str) { + // measure padding without ansi escape codes + const noAnsi = mixin.stripAnsi(str); + return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length]; + } + toString() { + const lines = []; + this.rows.forEach(row => { + this.rowToString(row, lines); + }); + // don't display any lines with the + // hidden flag set. + return lines + .filter(line => !line.hidden) + .map(line => line.text) + .join('\n'); + } + rowToString(row, lines) { + this.rasterize(row).forEach((rrow, r) => { + let str = ''; + rrow.forEach((col, c) => { + const { width } = row[c]; // the width with padding. + const wrapWidth = this.negatePadding(row[c]); // the width without padding. + let ts = col; // temporary string used during alignment/padding. + if (wrapWidth > mixin.stringWidth(col)) { + ts += ' '.repeat(wrapWidth - mixin.stringWidth(col)); + } + // align the string within its column. + if (row[c].align && row[c].align !== 'left' && this.wrap) { + const fn = align[row[c].align]; + ts = fn(ts, wrapWidth); + if (mixin.stringWidth(ts) < wrapWidth) { + /* c8 ignore start */ + const w = width || 0; + /* c8 ignore stop */ + ts += ' '.repeat(w - mixin.stringWidth(ts) - 1); + } + } + // apply border and padding to string. + const padding = row[c].padding || [0, 0, 0, 0]; + if (padding[left]) { + str += ' '.repeat(padding[left]); + } + str += addBorder(row[c], ts, '| '); + str += ts; + str += addBorder(row[c], ts, ' |'); + if (padding[right]) { + str += ' '.repeat(padding[right]); + } + // if prior row is span, try to render the + // current row on the prior line. + if (r === 0 && lines.length > 0) { + str = this.renderInline(str, lines[lines.length - 1]); + } + }); + // remove trailing whitespace. + lines.push({ + text: str.replace(/ +$/, ''), + span: row.span + }); + }); + return lines; + } + // if the full 'source' can render in + // the target line, do so. + renderInline(source, previousLine) { + const match = source.match(/^ */); + /* c8 ignore start */ + const leadingWhitespace = match ? match[0].length : 0; + /* c8 ignore stop */ + const target = previousLine.text; + const targetTextWidth = mixin.stringWidth(target.trimEnd()); + if (!previousLine.span) { + return source; + } + // if we're not applying wrapping logic, + // just always append to the span. + if (!this.wrap) { + previousLine.hidden = true; + return target + source; + } + if (leadingWhitespace < targetTextWidth) { + return source; + } + previousLine.hidden = true; + return target.trimEnd() + ' '.repeat(leadingWhitespace - targetTextWidth) + source.trimStart(); + } + rasterize(row) { + const rrows = []; + const widths = this.columnWidths(row); + let wrapped; + // word wrap all columns, and create + // a data-structure that is easy to rasterize. + row.forEach((col, c) => { + // leave room for left and right padding. + col.width = widths[c]; + if (this.wrap) { + wrapped = mixin.wrap(col.text, this.negatePadding(col), { hard: true }).split('\n'); + } + else { + wrapped = col.text.split('\n'); + } + if (col.border) { + wrapped.unshift('.' + '-'.repeat(this.negatePadding(col) + 2) + '.'); + wrapped.push("'" + '-'.repeat(this.negatePadding(col) + 2) + "'"); + } + // add top and bottom padding. + if (col.padding) { + wrapped.unshift(...new Array(col.padding[top] || 0).fill('')); + wrapped.push(...new Array(col.padding[bottom] || 0).fill('')); + } + wrapped.forEach((str, r) => { + if (!rrows[r]) { + rrows.push([]); + } + const rrow = rrows[r]; + for (let i = 0; i < c; i++) { + if (rrow[i] === undefined) { + rrow.push(''); + } + } + rrow.push(str); + }); + }); + return rrows; + } + negatePadding(col) { + /* c8 ignore start */ + let wrapWidth = col.width || 0; + /* c8 ignore stop */ + if (col.padding) { + wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0); + } + if (col.border) { + wrapWidth -= 4; + } + return wrapWidth; + } + columnWidths(row) { + if (!this.wrap) { + return row.map(col => { + return col.width || mixin.stringWidth(col.text); + }); + } + let unset = row.length; + let remainingWidth = this.width; + // column widths can be set in config. + const widths = row.map(col => { + if (col.width) { + unset--; + remainingWidth -= col.width; + return col.width; + } + return undefined; + }); + // any unset widths should be calculated. + /* c8 ignore start */ + const unsetWidth = unset ? Math.floor(remainingWidth / unset) : 0; + /* c8 ignore stop */ + return widths.map((w, i) => { + if (w === undefined) { + return Math.max(unsetWidth, _minWidth(row[i])); + } + return w; + }); + } +} +function addBorder(col, ts, style) { + if (col.border) { + if (/[.']-+[.']/.test(ts)) { + return ''; + } + if (ts.trim().length !== 0) { + return style; + } + return ' '; + } + return ''; +} +// calculates the minimum width of +// a column, based on padding preferences. +function _minWidth(col) { + const padding = col.padding || []; + const minWidth = 1 + (padding[left] || 0) + (padding[right] || 0); + if (col.border) { + return minWidth + 4; + } + return minWidth; +} +function getWindowWidth() { + /* c8 ignore start */ + if (typeof process === 'object' && process.stdout && process.stdout.columns) { + return process.stdout.columns; + } + return 80; +} +/* c8 ignore stop */ +function alignRight(str, width) { + str = str.trim(); + const strWidth = mixin.stringWidth(str); + if (strWidth < width) { + return ' '.repeat(width - strWidth) + str; + } + return str; +} +function alignCenter(str, width) { + str = str.trim(); + const strWidth = mixin.stringWidth(str); + /* c8 ignore start */ + if (strWidth >= width) { + return str; + } + /* c8 ignore stop */ + return ' '.repeat((width - strWidth) >> 1) + str; +} +let mixin; +export function cliui(opts, _mixin) { + mixin = _mixin; + return new UI({ + /* c8 ignore start */ + width: (opts === null || opts === void 0 ? void 0 : opts.width) || getWindowWidth(), + wrap: opts === null || opts === void 0 ? void 0 : opts.wrap + /* c8 ignore stop */ + }); +} diff --git a/node_modules/@isaacs/cliui/index.mjs b/node_modules/@isaacs/cliui/index.mjs new file mode 100644 index 0000000..5177519 --- /dev/null +++ b/node_modules/@isaacs/cliui/index.mjs @@ -0,0 +1,14 @@ +// Bootstrap cliui with ESM dependencies: +import { cliui } from './build/lib/index.js' + +import stringWidth from 'string-width' +import stripAnsi from 'strip-ansi' +import wrap from 'wrap-ansi' + +export default function ui (opts) { + return cliui(opts, { + stringWidth, + stripAnsi, + wrap + }) +} diff --git a/node_modules/@isaacs/cliui/package.json b/node_modules/@isaacs/cliui/package.json new file mode 100644 index 0000000..7a95253 --- /dev/null +++ b/node_modules/@isaacs/cliui/package.json @@ -0,0 +1,86 @@ +{ + "name": "@isaacs/cliui", + "version": "8.0.2", + "description": "easily create complex multi-column command-line-interfaces", + "main": "build/index.cjs", + "exports": { + ".": [ + { + "import": "./index.mjs", + "require": "./build/index.cjs" + }, + "./build/index.cjs" + ] + }, + "type": "module", + "module": "./index.mjs", + "scripts": { + "check": "standardx '**/*.ts' && standardx '**/*.js' && standardx '**/*.cjs'", + "fix": "standardx --fix '**/*.ts' && standardx --fix '**/*.js' && standardx --fix '**/*.cjs'", + "pretest": "rimraf build && tsc -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs", + "test": "c8 mocha ./test/*.cjs", + "test:esm": "c8 mocha ./test/**/*.mjs", + "postest": "check", + "coverage": "c8 report --check-coverage", + "precompile": "rimraf build", + "compile": "tsc", + "postcompile": "npm run build:cjs", + "build:cjs": "rollup -c", + "prepare": "npm run compile" + }, + "repository": "yargs/cliui", + "standard": { + "ignore": [ + "**/example/**" + ], + "globals": [ + "it" + ] + }, + "keywords": [ + "cli", + "command-line", + "layout", + "design", + "console", + "wrap", + "table" + ], + "author": "Ben Coe ", + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "devDependencies": { + "@types/node": "^14.0.27", + "@typescript-eslint/eslint-plugin": "^4.0.0", + "@typescript-eslint/parser": "^4.0.0", + "c8": "^7.3.0", + "chai": "^4.2.0", + "chalk": "^4.1.0", + "cross-env": "^7.0.2", + "eslint": "^7.6.0", + "eslint-plugin-import": "^2.22.0", + "eslint-plugin-node": "^11.1.0", + "gts": "^3.0.0", + "mocha": "^10.0.0", + "rimraf": "^3.0.2", + "rollup": "^2.23.1", + "rollup-plugin-ts": "^3.0.2", + "standardx": "^7.0.0", + "typescript": "^4.0.0" + }, + "files": [ + "build", + "index.mjs", + "!*.d.ts" + ], + "engines": { + "node": ">=12" + } +} diff --git a/node_modules/@isaacs/fs-minipass/LICENSE b/node_modules/@isaacs/fs-minipass/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/@isaacs/fs-minipass/README.md b/node_modules/@isaacs/fs-minipass/README.md new file mode 100644 index 0000000..dac96e7 --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/README.md @@ -0,0 +1,71 @@ +# fs-minipass + +Filesystem streams based on [minipass](http://npm.im/minipass). + +4 classes are exported: + +- ReadStream +- ReadStreamSync +- WriteStream +- WriteStreamSync + +When using `ReadStreamSync`, all of the data is made available +immediately upon consuming the stream. Nothing is buffered in memory +when the stream is constructed. If the stream is piped to a writer, +then it will synchronously `read()` and emit data into the writer as +fast as the writer can consume it. (That is, it will respect +backpressure.) If you call `stream.read()` then it will read the +entire file and return the contents. + +When using `WriteStreamSync`, every write is flushed to the file +synchronously. If your writes all come in a single tick, then it'll +write it all out in a single tick. It's as synchronous as you are. + +The async versions work much like their node builtin counterparts, +with the exception of introducing significantly less Stream machinery +overhead. + +## USAGE + +It's just streams, you pipe them or read() them or write() to them. + +```js +import { ReadStream, WriteStream } from 'fs-minipass' +// or: const { ReadStream, WriteStream } = require('fs-minipass') +const readStream = new ReadStream('file.txt') +const writeStream = new WriteStream('output.txt') +writeStream.write('some file header or whatever\n') +readStream.pipe(writeStream) +``` + +## ReadStream(path, options) + +Path string is required, but somewhat irrelevant if an open file +descriptor is passed in as an option. + +Options: + +- `fd` Pass in a numeric file descriptor, if the file is already open. +- `readSize` The size of reads to do, defaults to 16MB +- `size` The size of the file, if known. Prevents zero-byte read() + call at the end. +- `autoClose` Set to `false` to prevent the file descriptor from being + closed when the file is done being read. + +## WriteStream(path, options) + +Path string is required, but somewhat irrelevant if an open file +descriptor is passed in as an option. + +Options: + +- `fd` Pass in a numeric file descriptor, if the file is already open. +- `mode` The mode to create the file with. Defaults to `0o666`. +- `start` The position in the file to start reading. If not + specified, then the file will start writing at position zero, and be + truncated by default. +- `autoClose` Set to `false` to prevent the file descriptor from being + closed when the stream is ended. +- `flags` Flags to use when opening the file. Irrelevant if `fd` is + passed in, since file won't be opened in that case. Defaults to + `'a'` if a `pos` is specified, or `'w'` otherwise. diff --git a/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts b/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts new file mode 100644 index 0000000..38e8ccd --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts @@ -0,0 +1,118 @@ +/// +/// +/// +import EE from 'events'; +import { Minipass } from 'minipass'; +declare const _autoClose: unique symbol; +declare const _close: unique symbol; +declare const _ended: unique symbol; +declare const _fd: unique symbol; +declare const _finished: unique symbol; +declare const _flags: unique symbol; +declare const _flush: unique symbol; +declare const _handleChunk: unique symbol; +declare const _makeBuf: unique symbol; +declare const _mode: unique symbol; +declare const _needDrain: unique symbol; +declare const _onerror: unique symbol; +declare const _onopen: unique symbol; +declare const _onread: unique symbol; +declare const _onwrite: unique symbol; +declare const _open: unique symbol; +declare const _path: unique symbol; +declare const _pos: unique symbol; +declare const _queue: unique symbol; +declare const _read: unique symbol; +declare const _readSize: unique symbol; +declare const _reading: unique symbol; +declare const _remain: unique symbol; +declare const _size: unique symbol; +declare const _write: unique symbol; +declare const _writing: unique symbol; +declare const _defaultFlag: unique symbol; +declare const _errored: unique symbol; +export type ReadStreamOptions = Minipass.Options & { + fd?: number; + readSize?: number; + size?: number; + autoClose?: boolean; +}; +export type ReadStreamEvents = Minipass.Events & { + open: [fd: number]; +}; +export declare class ReadStream extends Minipass { + [_errored]: boolean; + [_fd]?: number; + [_path]: string; + [_readSize]: number; + [_reading]: boolean; + [_size]: number; + [_remain]: number; + [_autoClose]: boolean; + constructor(path: string, opt: ReadStreamOptions); + get fd(): number | undefined; + get path(): string; + write(): void; + end(): void; + [_open](): void; + [_onopen](er?: NodeJS.ErrnoException | null, fd?: number): void; + [_makeBuf](): Buffer; + [_read](): void; + [_onread](er?: NodeJS.ErrnoException | null, br?: number, buf?: Buffer): void; + [_close](): void; + [_onerror](er: NodeJS.ErrnoException): void; + [_handleChunk](br: number, buf: Buffer): boolean; + emit(ev: Event, ...args: ReadStreamEvents[Event]): boolean; +} +export declare class ReadStreamSync extends ReadStream { + [_open](): void; + [_read](): void; + [_close](): void; +} +export type WriteStreamOptions = { + fd?: number; + autoClose?: boolean; + mode?: number; + captureRejections?: boolean; + start?: number; + flags?: string; +}; +export declare class WriteStream extends EE { + readable: false; + writable: boolean; + [_errored]: boolean; + [_writing]: boolean; + [_ended]: boolean; + [_queue]: Buffer[]; + [_needDrain]: boolean; + [_path]: string; + [_mode]: number; + [_autoClose]: boolean; + [_fd]?: number; + [_defaultFlag]: boolean; + [_flags]: string; + [_finished]: boolean; + [_pos]?: number; + constructor(path: string, opt: WriteStreamOptions); + emit(ev: string, ...args: any[]): boolean; + get fd(): number | undefined; + get path(): string; + [_onerror](er: NodeJS.ErrnoException): void; + [_open](): void; + [_onopen](er?: null | NodeJS.ErrnoException, fd?: number): void; + end(buf: string, enc?: BufferEncoding): this; + end(buf?: Buffer, enc?: undefined): this; + write(buf: string, enc?: BufferEncoding): boolean; + write(buf: Buffer, enc?: undefined): boolean; + [_write](buf: Buffer): void; + [_onwrite](er?: null | NodeJS.ErrnoException, bw?: number): void; + [_flush](): void; + [_close](): void; +} +export declare class WriteStreamSync extends WriteStream { + [_open](): void; + [_close](): void; + [_write](buf: Buffer): void; +} +export {}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts.map b/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts.map new file mode 100644 index 0000000..3e2c703 --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,OAAO,EAAE,MAAM,QAAQ,CAAA;AAEvB,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAInC,QAAA,MAAM,UAAU,eAAuB,CAAA;AACvC,QAAA,MAAM,MAAM,eAAmB,CAAA;AAC/B,QAAA,MAAM,MAAM,eAAmB,CAAA;AAC/B,QAAA,MAAM,GAAG,eAAgB,CAAA;AACzB,QAAA,MAAM,SAAS,eAAsB,CAAA;AACrC,QAAA,MAAM,MAAM,eAAmB,CAAA;AAC/B,QAAA,MAAM,MAAM,eAAmB,CAAA;AAC/B,QAAA,MAAM,YAAY,eAAyB,CAAA;AAC3C,QAAA,MAAM,QAAQ,eAAqB,CAAA;AACnC,QAAA,MAAM,KAAK,eAAkB,CAAA;AAC7B,QAAA,MAAM,UAAU,eAAuB,CAAA;AACvC,QAAA,MAA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GAAG,IAAI;IAC5C,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,GAAG,IAAI;IAoBxC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,cAAc,GAAG,OAAO;IACjD,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,GAAG,OAAO;IAsB5C,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM;IAWpB,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,cAAc,EAAE,EAAE,CAAC,EAAE,MAAM;IAwBzD,CAAC,MAAM,CAAC;IAgBR,CAAC,MAAM,CAAC;CAST;AAED,qBAAa,eAAgB,SAAQ,WAAW;IAC9C,CAAC,KAAK,CAAC,IAAI,IAAI;IAsBf,CAAC,MAAM,CAAC;IASR,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM;CAmBrB"} \ No newline at end of file diff --git a/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js b/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js new file mode 100644 index 0000000..2b3178c --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js @@ -0,0 +1,430 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WriteStreamSync = exports.WriteStream = exports.ReadStreamSync = exports.ReadStream = void 0; +const events_1 = __importDefault(require("events")); +const fs_1 = __importDefault(require("fs")); +const minipass_1 = require("minipass"); +const writev = fs_1.default.writev; +const _autoClose = Symbol('_autoClose'); +const _close = Symbol('_close'); +const _ended = Symbol('_ended'); +const _fd = Symbol('_fd'); +const _finished = Symbol('_finished'); +const _flags = Symbol('_flags'); +const _flush = Symbol('_flush'); +const _handleChunk = Symbol('_handleChunk'); +const _makeBuf = Symbol('_makeBuf'); +const _mode = Symbol('_mode'); +const _needDrain = Symbol('_needDrain'); +const _onerror = Symbol('_onerror'); +const _onopen = Symbol('_onopen'); +const _onread = Symbol('_onread'); +const _onwrite = Symbol('_onwrite'); +const _open = Symbol('_open'); +const _path = Symbol('_path'); +const _pos = Symbol('_pos'); +const _queue = Symbol('_queue'); +const _read = Symbol('_read'); +const _readSize = Symbol('_readSize'); +const _reading = Symbol('_reading'); +const _remain = Symbol('_remain'); +const _size = Symbol('_size'); +const _write = Symbol('_write'); +const _writing = Symbol('_writing'); +const _defaultFlag = Symbol('_defaultFlag'); +const _errored = Symbol('_errored'); +class ReadStream extends minipass_1.Minipass { + [_errored] = false; + [_fd]; + [_path]; + [_readSize]; + [_reading] = false; + [_size]; + [_remain]; + [_autoClose]; + constructor(path, opt) { + opt = opt || {}; + super(opt); + this.readable = true; + this.writable = false; + if (typeof path !== 'string') { + throw new TypeError('path must be a string'); + } + this[_errored] = false; + this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined; + this[_path] = path; + this[_readSize] = opt.readSize || 16 * 1024 * 1024; + this[_reading] = false; + this[_size] = typeof opt.size === 'number' ? opt.size : Infinity; + this[_remain] = this[_size]; + this[_autoClose] = + typeof opt.autoClose === 'boolean' ? opt.autoClose : true; + if (typeof this[_fd] === 'number') { + this[_read](); + } + else { + this[_open](); + } + } + get fd() { + return this[_fd]; + } + get path() { + return this[_path]; + } + //@ts-ignore + write() { + throw new TypeError('this is a readable stream'); + } + //@ts-ignore + end() { + throw new TypeError('this is a readable stream'); + } + [_open]() { + fs_1.default.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd)); + } + [_onopen](er, fd) { + if (er) { + this[_onerror](er); + } + else { + this[_fd] = fd; + this.emit('open', fd); + this[_read](); + } + } + [_makeBuf]() { + return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain])); + } + [_read]() { + if (!this[_reading]) { + this[_reading] = true; + const buf = this[_makeBuf](); + /* c8 ignore start */ + if (buf.length === 0) { + return process.nextTick(() => this[_onread](null, 0, buf)); + } + /* c8 ignore stop */ + fs_1.default.read(this[_fd], buf, 0, buf.length, null, (er, br, b) => this[_onread](er, br, b)); + } + } + [_onread](er, br, buf) { + this[_reading] = false; + if (er) { + this[_onerror](er); + } + else if (this[_handleChunk](br, buf)) { + this[_read](); + } + } + [_close]() { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd]; + this[_fd] = undefined; + fs_1.default.close(fd, er => er ? this.emit('error', er) : this.emit('close')); + } + } + [_onerror](er) { + this[_reading] = true; + this[_close](); + this.emit('error', er); + } + [_handleChunk](br, buf) { + let ret = false; + // no effect if infinite + this[_remain] -= br; + if (br > 0) { + ret = super.write(br < buf.length ? buf.subarray(0, br) : buf); + } + if (br === 0 || this[_remain] <= 0) { + ret = false; + this[_close](); + super.end(); + } + return ret; + } + emit(ev, ...args) { + switch (ev) { + case 'prefinish': + case 'finish': + return false; + case 'drain': + if (typeof this[_fd] === 'number') { + this[_read](); + } + return false; + case 'error': + if (this[_errored]) { + return false; + } + this[_errored] = true; + return super.emit(ev, ...args); + default: + return super.emit(ev, ...args); + } + } +} +exports.ReadStream = ReadStream; +class ReadStreamSync extends ReadStream { + [_open]() { + let threw = true; + try { + this[_onopen](null, fs_1.default.openSync(this[_path], 'r')); + threw = false; + } + finally { + if (threw) { + this[_close](); + } + } + } + [_read]() { + let threw = true; + try { + if (!this[_reading]) { + this[_reading] = true; + do { + const buf = this[_makeBuf](); + /* c8 ignore start */ + const br = buf.length === 0 + ? 0 + : fs_1.default.readSync(this[_fd], buf, 0, buf.length, null); + /* c8 ignore stop */ + if (!this[_handleChunk](br, buf)) { + break; + } + } while (true); + this[_reading] = false; + } + threw = false; + } + finally { + if (threw) { + this[_close](); + } + } + } + [_close]() { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd]; + this[_fd] = undefined; + fs_1.default.closeSync(fd); + this.emit('close'); + } + } +} +exports.ReadStreamSync = ReadStreamSync; +class WriteStream extends events_1.default { + readable = false; + writable = true; + [_errored] = false; + [_writing] = false; + [_ended] = false; + [_queue] = []; + [_needDrain] = false; + [_path]; + [_mode]; + [_autoClose]; + [_fd]; + [_defaultFlag]; + [_flags]; + [_finished] = false; + [_pos]; + constructor(path, opt) { + opt = opt || {}; + super(opt); + this[_path] = path; + this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined; + this[_mode] = opt.mode === undefined ? 0o666 : opt.mode; + this[_pos] = typeof opt.start === 'number' ? opt.start : undefined; + this[_autoClose] = + typeof opt.autoClose === 'boolean' ? opt.autoClose : true; + // truncating makes no sense when writing into the middle + const defaultFlag = this[_pos] !== undefined ? 'r+' : 'w'; + this[_defaultFlag] = opt.flags === undefined; + this[_flags] = opt.flags === undefined ? defaultFlag : opt.flags; + if (this[_fd] === undefined) { + this[_open](); + } + } + emit(ev, ...args) { + if (ev === 'error') { + if (this[_errored]) { + return false; + } + this[_errored] = true; + } + return super.emit(ev, ...args); + } + get fd() { + return this[_fd]; + } + get path() { + return this[_path]; + } + [_onerror](er) { + this[_close](); + this[_writing] = true; + this.emit('error', er); + } + [_open]() { + fs_1.default.open(this[_path], this[_flags], this[_mode], (er, fd) => this[_onopen](er, fd)); + } + [_onopen](er, fd) { + if (this[_defaultFlag] && + this[_flags] === 'r+' && + er && + er.code === 'ENOENT') { + this[_flags] = 'w'; + this[_open](); + } + else if (er) { + this[_onerror](er); + } + else { + this[_fd] = fd; + this.emit('open', fd); + if (!this[_writing]) { + this[_flush](); + } + } + } + end(buf, enc) { + if (buf) { + //@ts-ignore + this.write(buf, enc); + } + this[_ended] = true; + // synthetic after-write logic, where drain/finish live + if (!this[_writing] && + !this[_queue].length && + typeof this[_fd] === 'number') { + this[_onwrite](null, 0); + } + return this; + } + write(buf, enc) { + if (typeof buf === 'string') { + buf = Buffer.from(buf, enc); + } + if (this[_ended]) { + this.emit('error', new Error('write() after end()')); + return false; + } + if (this[_fd] === undefined || this[_writing] || this[_queue].length) { + this[_queue].push(buf); + this[_needDrain] = true; + return false; + } + this[_writing] = true; + this[_write](buf); + return true; + } + [_write](buf) { + fs_1.default.write(this[_fd], buf, 0, buf.length, this[_pos], (er, bw) => this[_onwrite](er, bw)); + } + [_onwrite](er, bw) { + if (er) { + this[_onerror](er); + } + else { + if (this[_pos] !== undefined && typeof bw === 'number') { + this[_pos] += bw; + } + if (this[_queue].length) { + this[_flush](); + } + else { + this[_writing] = false; + if (this[_ended] && !this[_finished]) { + this[_finished] = true; + this[_close](); + this.emit('finish'); + } + else if (this[_needDrain]) { + this[_needDrain] = false; + this.emit('drain'); + } + } + } + } + [_flush]() { + if (this[_queue].length === 0) { + if (this[_ended]) { + this[_onwrite](null, 0); + } + } + else if (this[_queue].length === 1) { + this[_write](this[_queue].pop()); + } + else { + const iovec = this[_queue]; + this[_queue] = []; + writev(this[_fd], iovec, this[_pos], (er, bw) => this[_onwrite](er, bw)); + } + } + [_close]() { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd]; + this[_fd] = undefined; + fs_1.default.close(fd, er => er ? this.emit('error', er) : this.emit('close')); + } + } +} +exports.WriteStream = WriteStream; +class WriteStreamSync extends WriteStream { + [_open]() { + let fd; + // only wrap in a try{} block if we know we'll retry, to avoid + // the rethrow obscuring the error's source frame in most cases. + if (this[_defaultFlag] && this[_flags] === 'r+') { + try { + fd = fs_1.default.openSync(this[_path], this[_flags], this[_mode]); + } + catch (er) { + if (er?.code === 'ENOENT') { + this[_flags] = 'w'; + return this[_open](); + } + else { + throw er; + } + } + } + else { + fd = fs_1.default.openSync(this[_path], this[_flags], this[_mode]); + } + this[_onopen](null, fd); + } + [_close]() { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd]; + this[_fd] = undefined; + fs_1.default.closeSync(fd); + this.emit('close'); + } + } + [_write](buf) { + // throw the original, but try to close if it fails + let threw = true; + try { + this[_onwrite](null, fs_1.default.writeSync(this[_fd], buf, 0, buf.length, this[_pos])); + threw = false; + } + finally { + if (threw) { + try { + this[_close](); + } + catch { + // ok error + } + } + } + } +} +exports.WriteStreamSync = WriteStreamSync; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js.map b/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js.map new file mode 100644 index 0000000..caee495 --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;AACvB,4CAAmB;AACnB,uCAAmC;AAEnC,MAAM,MAAM,GAAG,YAAE,CAAC,MAAM,CAAA;AAExB,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAA;AACvC,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC/B,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC/B,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;AACzB,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,CAAA;AACrC,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC/B,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC/B,MAAM,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,CAAA;AAC3C,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;AACnC,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;AAC7B,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAA;AACvC,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;AACnC,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;AACjC,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;AACjC,MAAM,QAAQ,GAAG,MA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CAAA;QACpB,CAAC;IACH,CAAC;IAED,CAAC,MAAM,CAAC,CAAC,GAAW;QAClB,mDAAmD;QACnD,IAAI,KAAK,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC;YACH,IAAI,CAAC,QAAQ,CAAC,CACZ,IAAI,EACJ,YAAE,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAW,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAClE,CAAA;YACD,KAAK,GAAG,KAAK,CAAA;QACf,CAAC;gBAAS,CAAC;YACT,IAAI,KAAK,EAAE,CAAC;gBACV,IAAI,CAAC;oBACH,IAAI,CAAC,MAAM,CAAC,EAAE,CAAA;gBAChB,CAAC;gBAAC,MAAM,CAAC;oBACP,WAAW;gBACb,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAnDD,0CAmDC","sourcesContent":["import EE from 'events'\nimport fs from 'fs'\nimport { Minipass } from 'minipass'\n\nconst writev = fs.writev\n\nconst _autoClose = Symbol('_autoClose')\nconst _close = Symbol('_close')\nconst _ended = Symbol('_ended')\nconst _fd = Symbol('_fd')\nconst _finished = Symbol('_finished')\nconst _flags = Symbol('_flags')\nconst _flush = Symbol('_flush')\nconst _handleChunk = Symbol('_handleChunk')\nconst _makeBuf = Symbol('_makeBuf')\nconst _mode = Symbol('_mode')\nconst _needDrain = Symbol('_needDrain')\nconst _onerror = Symbol('_onerror')\nconst _onopen = Symbol('_onopen')\nconst _onread = Symbol('_onread')\nconst _onwrite = Symbol('_onwrite')\nconst _open = Symbol('_open')\nconst _path = Symbol('_path')\nconst _pos = Symbol('_pos')\nconst _queue = Symbol('_queue')\nconst _read = Symbol('_read')\nconst _readSize = Symbol('_readSize')\nconst _reading = Symbol('_reading')\nconst _remain = Symbol('_remain')\nconst _size = Symbol('_size')\nconst _write = Symbol('_write')\nconst _writing = Symbol('_writing')\nconst _defaultFlag = Symbol('_defaultFlag')\nconst _errored = Symbol('_errored')\n\nexport type ReadStreamOptions =\n Minipass.Options & {\n fd?: number\n readSize?: number\n size?: number\n autoClose?: boolean\n }\n\nexport type ReadStreamEvents = Minipass.Events & {\n open: [fd: number]\n}\n\nexport class ReadStream extends Minipass<\n Minipass.ContiguousData,\n Buffer,\n ReadStreamEvents\n> {\n [_errored]: boolean = false;\n [_fd]?: number;\n [_path]: string;\n [_readSize]: number;\n [_reading]: boolean = false;\n [_size]: number;\n [_remain]: number;\n [_autoClose]: boolean\n\n constructor(path: string, opt: ReadStreamOptions) {\n opt = opt || {}\n super(opt)\n\n this.readable = true\n this.writable = false\n\n if (typeof path !== 'string') {\n throw new TypeError('path must be a string')\n }\n\n this[_errored] = false\n this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined\n this[_path] = path\n this[_readSize] = opt.readSize || 16 * 1024 * 1024\n this[_reading] = false\n this[_size] = typeof opt.size === 'number' ? opt.size : Infinity\n this[_remain] = this[_size]\n this[_autoClose] =\n typeof opt.autoClose === 'boolean' ? opt.autoClose : true\n\n if (typeof this[_fd] === 'number') {\n this[_read]()\n } else {\n this[_open]()\n }\n }\n\n get fd() {\n return this[_fd]\n }\n\n get path() {\n return this[_path]\n }\n\n //@ts-ignore\n write() {\n throw new TypeError('this is a readable stream')\n }\n\n //@ts-ignore\n end() {\n throw new TypeError('this is a readable stream')\n }\n\n [_open]() {\n fs.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd))\n }\n\n [_onopen](er?: NodeJS.ErrnoException | null, fd?: number) {\n if (er) {\n this[_onerror](er)\n } else {\n this[_fd] = fd\n this.emit('open', fd as number)\n this[_read]()\n }\n }\n\n [_makeBuf]() {\n return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain]))\n }\n\n [_read]() {\n if (!this[_reading]) {\n this[_reading] = true\n const buf = this[_makeBuf]()\n /* c8 ignore start */\n if (buf.length === 0) {\n return process.nextTick(() => this[_onread](null, 0, buf))\n }\n /* c8 ignore stop */\n fs.read(this[_fd] as number, buf, 0, buf.length, null, (er, br, b) =>\n this[_onread](er, br, b),\n )\n }\n }\n\n [_onread](er?: NodeJS.ErrnoException | null, br?: number, buf?: Buffer) {\n this[_reading] = false\n if (er) {\n this[_onerror](er)\n } else if (this[_handleChunk](br as number, buf as Buffer)) {\n this[_read]()\n }\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.close(fd, er =>\n er ? this.emit('error', er) : this.emit('close'),\n )\n }\n }\n\n [_onerror](er: NodeJS.ErrnoException) {\n this[_reading] = true\n this[_close]()\n this.emit('error', er)\n }\n\n [_handleChunk](br: number, buf: Buffer) {\n let ret = false\n // no effect if infinite\n this[_remain] -= br\n if (br > 0) {\n ret = super.write(br < buf.length ? buf.subarray(0, br) : buf)\n }\n\n if (br === 0 || this[_remain] <= 0) {\n ret = false\n this[_close]()\n super.end()\n }\n\n return ret\n }\n\n emit(\n ev: Event,\n ...args: ReadStreamEvents[Event]\n ): boolean {\n switch (ev) {\n case 'prefinish':\n case 'finish':\n return false\n\n case 'drain':\n if (typeof this[_fd] === 'number') {\n this[_read]()\n }\n return false\n\n case 'error':\n if (this[_errored]) {\n return false\n }\n this[_errored] = true\n return super.emit(ev, ...args)\n\n default:\n return super.emit(ev, ...args)\n }\n }\n}\n\nexport class ReadStreamSync extends ReadStream {\n [_open]() {\n let threw = true\n try {\n this[_onopen](null, fs.openSync(this[_path], 'r'))\n threw = false\n } finally {\n if (threw) {\n this[_close]()\n }\n }\n }\n\n [_read]() {\n let threw = true\n try {\n if (!this[_reading]) {\n this[_reading] = true\n do {\n const buf = this[_makeBuf]()\n /* c8 ignore start */\n const br =\n buf.length === 0\n ? 0\n : fs.readSync(this[_fd] as number, buf, 0, buf.length, null)\n /* c8 ignore stop */\n if (!this[_handleChunk](br, buf)) {\n break\n }\n } while (true)\n this[_reading] = false\n }\n threw = false\n } finally {\n if (threw) {\n this[_close]()\n }\n }\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.closeSync(fd)\n this.emit('close')\n }\n }\n}\n\nexport type WriteStreamOptions = {\n fd?: number\n autoClose?: boolean\n mode?: number\n captureRejections?: boolean\n start?: number\n flags?: string\n}\n\nexport class WriteStream extends EE {\n readable: false = false\n writable: boolean = true;\n [_errored]: boolean = false;\n [_writing]: boolean = false;\n [_ended]: boolean = false;\n [_queue]: Buffer[] = [];\n [_needDrain]: boolean = false;\n [_path]: string;\n [_mode]: number;\n [_autoClose]: boolean;\n [_fd]?: number;\n [_defaultFlag]: boolean;\n [_flags]: string;\n [_finished]: boolean = false;\n [_pos]?: number\n\n constructor(path: string, opt: WriteStreamOptions) {\n opt = opt || {}\n super(opt)\n this[_path] = path\n this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined\n this[_mode] = opt.mode === undefined ? 0o666 : opt.mode\n this[_pos] = typeof opt.start === 'number' ? opt.start : undefined\n this[_autoClose] =\n typeof opt.autoClose === 'boolean' ? opt.autoClose : true\n\n // truncating makes no sense when writing into the middle\n const defaultFlag = this[_pos] !== undefined ? 'r+' : 'w'\n this[_defaultFlag] = opt.flags === undefined\n this[_flags] = opt.flags === undefined ? defaultFlag : opt.flags\n\n if (this[_fd] === undefined) {\n this[_open]()\n }\n }\n\n emit(ev: string, ...args: any[]) {\n if (ev === 'error') {\n if (this[_errored]) {\n return false\n }\n this[_errored] = true\n }\n return super.emit(ev, ...args)\n }\n\n get fd() {\n return this[_fd]\n }\n\n get path() {\n return this[_path]\n }\n\n [_onerror](er: NodeJS.ErrnoException) {\n this[_close]()\n this[_writing] = true\n this.emit('error', er)\n }\n\n [_open]() {\n fs.open(this[_path], this[_flags], this[_mode], (er, fd) =>\n this[_onopen](er, fd),\n )\n }\n\n [_onopen](er?: null | NodeJS.ErrnoException, fd?: number) {\n if (\n this[_defaultFlag] &&\n this[_flags] === 'r+' &&\n er &&\n er.code === 'ENOENT'\n ) {\n this[_flags] = 'w'\n this[_open]()\n } else if (er) {\n this[_onerror](er)\n } else {\n this[_fd] = fd\n this.emit('open', fd)\n if (!this[_writing]) {\n this[_flush]()\n }\n }\n }\n\n end(buf: string, enc?: BufferEncoding): this\n end(buf?: Buffer, enc?: undefined): this\n end(buf?: Buffer | string, enc?: BufferEncoding): this {\n if (buf) {\n //@ts-ignore\n this.write(buf, enc)\n }\n\n this[_ended] = true\n\n // synthetic after-write logic, where drain/finish live\n if (\n !this[_writing] &&\n !this[_queue].length &&\n typeof this[_fd] === 'number'\n ) {\n this[_onwrite](null, 0)\n }\n return this\n }\n\n write(buf: string, enc?: BufferEncoding): boolean\n write(buf: Buffer, enc?: undefined): boolean\n write(buf: Buffer | string, enc?: BufferEncoding): boolean {\n if (typeof buf === 'string') {\n buf = Buffer.from(buf, enc)\n }\n\n if (this[_ended]) {\n this.emit('error', new Error('write() after end()'))\n return false\n }\n\n if (this[_fd] === undefined || this[_writing] || this[_queue].length) {\n this[_queue].push(buf)\n this[_needDrain] = true\n return false\n }\n\n this[_writing] = true\n this[_write](buf)\n return true\n }\n\n [_write](buf: Buffer) {\n fs.write(\n this[_fd] as number,\n buf,\n 0,\n buf.length,\n this[_pos],\n (er, bw) => this[_onwrite](er, bw),\n )\n }\n\n [_onwrite](er?: null | NodeJS.ErrnoException, bw?: number) {\n if (er) {\n this[_onerror](er)\n } else {\n if (this[_pos] !== undefined && typeof bw === 'number') {\n this[_pos] += bw\n }\n if (this[_queue].length) {\n this[_flush]()\n } else {\n this[_writing] = false\n\n if (this[_ended] && !this[_finished]) {\n this[_finished] = true\n this[_close]()\n this.emit('finish')\n } else if (this[_needDrain]) {\n this[_needDrain] = false\n this.emit('drain')\n }\n }\n }\n }\n\n [_flush]() {\n if (this[_queue].length === 0) {\n if (this[_ended]) {\n this[_onwrite](null, 0)\n }\n } else if (this[_queue].length === 1) {\n this[_write](this[_queue].pop() as Buffer)\n } else {\n const iovec = this[_queue]\n this[_queue] = []\n writev(this[_fd] as number, iovec, this[_pos] as number, (er, bw) =>\n this[_onwrite](er, bw),\n )\n }\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.close(fd, er =>\n er ? this.emit('error', er) : this.emit('close'),\n )\n }\n }\n}\n\nexport class WriteStreamSync extends WriteStream {\n [_open](): void {\n let fd\n // only wrap in a try{} block if we know we'll retry, to avoid\n // the rethrow obscuring the error's source frame in most cases.\n if (this[_defaultFlag] && this[_flags] === 'r+') {\n try {\n fd = fs.openSync(this[_path], this[_flags], this[_mode])\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') {\n this[_flags] = 'w'\n return this[_open]()\n } else {\n throw er\n }\n }\n } else {\n fd = fs.openSync(this[_path], this[_flags], this[_mode])\n }\n\n this[_onopen](null, fd)\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.closeSync(fd)\n this.emit('close')\n }\n }\n\n [_write](buf: Buffer) {\n // throw the original, but try to close if it fails\n let threw = true\n try {\n this[_onwrite](\n null,\n fs.writeSync(this[_fd] as number, buf, 0, buf.length, this[_pos]),\n )\n threw = false\n } finally {\n if (threw) {\n try {\n this[_close]()\n } catch {\n // ok error\n }\n }\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json b/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json new file mode 100644 index 0000000..5bbefff --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts b/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts new file mode 100644 index 0000000..54aebe1 --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts @@ -0,0 +1,118 @@ +/// +/// +/// +import EE from 'events'; +import { Minipass } from 'minipass'; +declare const _autoClose: unique symbol; +declare const _close: unique symbol; +declare const _ended: unique symbol; +declare const _fd: unique symbol; +declare const _finished: unique symbol; +declare const _flags: unique symbol; +declare const _flush: unique symbol; +declare const _handleChunk: unique symbol; +declare const _makeBuf: unique symbol; +declare const _mode: unique symbol; +declare const _needDrain: unique symbol; +declare const _onerror: unique symbol; +declare const _onopen: unique symbol; +declare const _onread: unique symbol; +declare const _onwrite: unique symbol; +declare const _open: unique symbol; +declare const _path: unique symbol; +declare const _pos: unique symbol; +declare const _queue: unique symbol; +declare const _read: unique symbol; +declare const _readSize: unique symbol; +declare const _reading: unique symbol; +declare const _remain: unique symbol; +declare const _size: unique symbol; +declare const _write: unique symbol; +declare const _writing: unique symbol; +declare const _defaultFlag: unique symbol; +declare const _errored: unique symbol; +export type ReadStreamOptions = Minipass.Options & { + fd?: number; + readSize?: number; + size?: number; + autoClose?: boolean; +}; +export type ReadStreamEvents = Minipass.Events & { + open: [fd: number]; +}; +export declare class ReadStream extends Minipass { + [_errored]: boolean; + [_fd]?: number; + [_path]: string; + [_readSize]: number; + [_reading]: boolean; + [_size]: number; + [_remain]: number; + [_autoClose]: boolean; + constructor(path: string, opt: ReadStreamOptions); + get fd(): number | undefined; + get path(): string; + write(): void; + end(): void; + [_open](): void; + [_onopen](er?: NodeJS.ErrnoException | null, fd?: number): void; + [_makeBuf](): Buffer; + [_read](): void; + [_onread](er?: NodeJS.ErrnoException | null, br?: number, buf?: Buffer): void; + [_close](): void; + [_onerror](er: NodeJS.ErrnoException): void; + [_handleChunk](br: number, buf: Buffer): boolean; + emit(ev: Event, ...args: ReadStreamEvents[Event]): boolean; +} +export declare class ReadStreamSync extends ReadStream { + [_open](): void; + [_read](): void; + [_close](): void; +} +export type WriteStreamOptions = { + fd?: number; + autoClose?: boolean; + mode?: number; + captureRejections?: boolean; + start?: number; + flags?: string; +}; +export declare class WriteStream extends EE { + readable: false; + writable: boolean; + [_errored]: boolean; + [_writing]: boolean; + [_ended]: boolean; + [_queue]: Buffer[]; + [_needDrain]: boolean; + [_path]: string; + [_mode]: number; + [_autoClose]: boolean; + [_fd]?: number; + [_defaultFlag]: boolean; + [_flags]: string; + [_finished]: boolean; + [_pos]?: number; + constructor(path: string, opt: WriteStreamOptions); + emit(ev: string, ...args: any[]): boolean; + get fd(): number | undefined; + get path(): string; + [_onerror](er: NodeJS.ErrnoException): void; + [_open](): void; + [_onopen](er?: null | NodeJS.ErrnoException, fd?: number): void; + end(buf: string, enc?: BufferEncoding): this; + end(buf?: Buffer, enc?: undefined): this; + write(buf: string, enc?: BufferEncoding): boolean; + write(buf: Buffer, enc?: undefined): boolean; + [_write](buf: Buffer): void; + [_onwrite](er?: null | NodeJS.ErrnoException, bw?: number): void; + [_flush](): void; + [_close](): void; +} +export declare class WriteStreamSync extends WriteStream { + [_open](): void; + [_close](): void; + [_write](buf: Buffer): void; +} +export {}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts.map b/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts.map new file mode 100644 index 0000000..3e2c703 --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,OAAO,EAAE,MAAM,QAAQ,CAAA;AAEvB,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAInC,QAAA,MAAM,UAAU,eAAuB,CAAA;AACvC,QAAA,MAAM,MAAM,eAAmB,CAAA;AAC/B,QAAA,MAAM,MAAM,eAAmB,CAAA;AAC/B,QAAA,MAAM,GAAG,eAAgB,CAAA;AACzB,QAAA,MAAM,SAAS,eAAsB,CAAA;AACrC,QAAA,MAAM,MAAM,eAAmB,CAAA;AAC/B,QAAA,MAAM,MAAM,eAAmB,CAAA;AAC/B,QAAA,MAAM,YAAY,eAA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CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,cAAc,EAAE,EAAE,CAAC,EAAE,MAAM;IAoBxD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,cAAc,GAAG,IAAI;IAC5C,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,GAAG,IAAI;IAoBxC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,cAAc,GAAG,OAAO;IACjD,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,GAAG,OAAO;IAsB5C,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM;IAWpB,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,cAAc,EAAE,EAAE,CAAC,EAAE,MAAM;IAwBzD,CAAC,MAAM,CAAC;IAgBR,CAAC,MAAM,CAAC;CAST;AAED,qBAAa,eAAgB,SAAQ,WAAW;IAC9C,CAAC,KAAK,CAAC,IAAI,IAAI;IAsBf,CAAC,MAAM,CAAC;IASR,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM;CAmBrB"} \ No newline at end of file diff --git a/node_modules/@isaacs/fs-minipass/dist/esm/index.js b/node_modules/@isaacs/fs-minipass/dist/esm/index.js new file mode 100644 index 0000000..287a0f6 --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/dist/esm/index.js @@ -0,0 +1,420 @@ +import EE from 'events'; +import fs from 'fs'; +import { Minipass } from 'minipass'; +const writev = fs.writev; +const _autoClose = Symbol('_autoClose'); +const _close = Symbol('_close'); +const _ended = Symbol('_ended'); +const _fd = Symbol('_fd'); +const _finished = Symbol('_finished'); +const _flags = Symbol('_flags'); +const _flush = Symbol('_flush'); +const _handleChunk = Symbol('_handleChunk'); +const _makeBuf = Symbol('_makeBuf'); +const _mode = Symbol('_mode'); +const _needDrain = Symbol('_needDrain'); +const _onerror = Symbol('_onerror'); +const _onopen = Symbol('_onopen'); +const _onread = Symbol('_onread'); +const _onwrite = Symbol('_onwrite'); +const _open = Symbol('_open'); +const _path = Symbol('_path'); +const _pos = Symbol('_pos'); +const _queue = Symbol('_queue'); +const _read = Symbol('_read'); +const _readSize = Symbol('_readSize'); +const _reading = Symbol('_reading'); +const _remain = Symbol('_remain'); +const _size = Symbol('_size'); +const _write = Symbol('_write'); +const _writing = Symbol('_writing'); +const _defaultFlag = Symbol('_defaultFlag'); +const _errored = Symbol('_errored'); +export class ReadStream extends Minipass { + [_errored] = false; + [_fd]; + [_path]; + [_readSize]; + [_reading] = false; + [_size]; + [_remain]; + [_autoClose]; + constructor(path, opt) { + opt = opt || {}; + super(opt); + this.readable = true; + this.writable = false; + if (typeof path !== 'string') { + throw new TypeError('path must be a string'); + } + this[_errored] = false; + this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined; + this[_path] = path; + this[_readSize] = opt.readSize || 16 * 1024 * 1024; + this[_reading] = false; + this[_size] = typeof opt.size === 'number' ? opt.size : Infinity; + this[_remain] = this[_size]; + this[_autoClose] = + typeof opt.autoClose === 'boolean' ? opt.autoClose : true; + if (typeof this[_fd] === 'number') { + this[_read](); + } + else { + this[_open](); + } + } + get fd() { + return this[_fd]; + } + get path() { + return this[_path]; + } + //@ts-ignore + write() { + throw new TypeError('this is a readable stream'); + } + //@ts-ignore + end() { + throw new TypeError('this is a readable stream'); + } + [_open]() { + fs.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd)); + } + [_onopen](er, fd) { + if (er) { + this[_onerror](er); + } + else { + this[_fd] = fd; + this.emit('open', fd); + this[_read](); + } + } + [_makeBuf]() { + return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain])); + } + [_read]() { + if (!this[_reading]) { + this[_reading] = true; + const buf = this[_makeBuf](); + /* c8 ignore start */ + if (buf.length === 0) { + return process.nextTick(() => this[_onread](null, 0, buf)); + } + /* c8 ignore stop */ + fs.read(this[_fd], buf, 0, buf.length, null, (er, br, b) => this[_onread](er, br, b)); + } + } + [_onread](er, br, buf) { + this[_reading] = false; + if (er) { + this[_onerror](er); + } + else if (this[_handleChunk](br, buf)) { + this[_read](); + } + } + [_close]() { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd]; + this[_fd] = undefined; + fs.close(fd, er => er ? this.emit('error', er) : this.emit('close')); + } + } + [_onerror](er) { + this[_reading] = true; + this[_close](); + this.emit('error', er); + } + [_handleChunk](br, buf) { + let ret = false; + // no effect if infinite + this[_remain] -= br; + if (br > 0) { + ret = super.write(br < buf.length ? buf.subarray(0, br) : buf); + } + if (br === 0 || this[_remain] <= 0) { + ret = false; + this[_close](); + super.end(); + } + return ret; + } + emit(ev, ...args) { + switch (ev) { + case 'prefinish': + case 'finish': + return false; + case 'drain': + if (typeof this[_fd] === 'number') { + this[_read](); + } + return false; + case 'error': + if (this[_errored]) { + return false; + } + this[_errored] = true; + return super.emit(ev, ...args); + default: + return super.emit(ev, ...args); + } + } +} +export class ReadStreamSync extends ReadStream { + [_open]() { + let threw = true; + try { + this[_onopen](null, fs.openSync(this[_path], 'r')); + threw = false; + } + finally { + if (threw) { + this[_close](); + } + } + } + [_read]() { + let threw = true; + try { + if (!this[_reading]) { + this[_reading] = true; + do { + const buf = this[_makeBuf](); + /* c8 ignore start */ + const br = buf.length === 0 + ? 0 + : fs.readSync(this[_fd], buf, 0, buf.length, null); + /* c8 ignore stop */ + if (!this[_handleChunk](br, buf)) { + break; + } + } while (true); + this[_reading] = false; + } + threw = false; + } + finally { + if (threw) { + this[_close](); + } + } + } + [_close]() { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd]; + this[_fd] = undefined; + fs.closeSync(fd); + this.emit('close'); + } + } +} +export class WriteStream extends EE { + readable = false; + writable = true; + [_errored] = false; + [_writing] = false; + [_ended] = false; + [_queue] = []; + [_needDrain] = false; + [_path]; + [_mode]; + [_autoClose]; + [_fd]; + [_defaultFlag]; + [_flags]; + [_finished] = false; + [_pos]; + constructor(path, opt) { + opt = opt || {}; + super(opt); + this[_path] = path; + this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined; + this[_mode] = opt.mode === undefined ? 0o666 : opt.mode; + this[_pos] = typeof opt.start === 'number' ? opt.start : undefined; + this[_autoClose] = + typeof opt.autoClose === 'boolean' ? opt.autoClose : true; + // truncating makes no sense when writing into the middle + const defaultFlag = this[_pos] !== undefined ? 'r+' : 'w'; + this[_defaultFlag] = opt.flags === undefined; + this[_flags] = opt.flags === undefined ? defaultFlag : opt.flags; + if (this[_fd] === undefined) { + this[_open](); + } + } + emit(ev, ...args) { + if (ev === 'error') { + if (this[_errored]) { + return false; + } + this[_errored] = true; + } + return super.emit(ev, ...args); + } + get fd() { + return this[_fd]; + } + get path() { + return this[_path]; + } + [_onerror](er) { + this[_close](); + this[_writing] = true; + this.emit('error', er); + } + [_open]() { + fs.open(this[_path], this[_flags], this[_mode], (er, fd) => this[_onopen](er, fd)); + } + [_onopen](er, fd) { + if (this[_defaultFlag] && + this[_flags] === 'r+' && + er && + er.code === 'ENOENT') { + this[_flags] = 'w'; + this[_open](); + } + else if (er) { + this[_onerror](er); + } + else { + this[_fd] = fd; + this.emit('open', fd); + if (!this[_writing]) { + this[_flush](); + } + } + } + end(buf, enc) { + if (buf) { + //@ts-ignore + this.write(buf, enc); + } + this[_ended] = true; + // synthetic after-write logic, where drain/finish live + if (!this[_writing] && + !this[_queue].length && + typeof this[_fd] === 'number') { + this[_onwrite](null, 0); + } + return this; + } + write(buf, enc) { + if (typeof buf === 'string') { + buf = Buffer.from(buf, enc); + } + if (this[_ended]) { + this.emit('error', new Error('write() after end()')); + return false; + } + if (this[_fd] === undefined || this[_writing] || this[_queue].length) { + this[_queue].push(buf); + this[_needDrain] = true; + return false; + } + this[_writing] = true; + this[_write](buf); + return true; + } + [_write](buf) { + fs.write(this[_fd], buf, 0, buf.length, this[_pos], (er, bw) => this[_onwrite](er, bw)); + } + [_onwrite](er, bw) { + if (er) { + this[_onerror](er); + } + else { + if (this[_pos] !== undefined && typeof bw === 'number') { + this[_pos] += bw; + } + if (this[_queue].length) { + this[_flush](); + } + else { + this[_writing] = false; + if (this[_ended] && !this[_finished]) { + this[_finished] = true; + this[_close](); + this.emit('finish'); + } + else if (this[_needDrain]) { + this[_needDrain] = false; + this.emit('drain'); + } + } + } + } + [_flush]() { + if (this[_queue].length === 0) { + if (this[_ended]) { + this[_onwrite](null, 0); + } + } + else if (this[_queue].length === 1) { + this[_write](this[_queue].pop()); + } + else { + const iovec = this[_queue]; + this[_queue] = []; + writev(this[_fd], iovec, this[_pos], (er, bw) => this[_onwrite](er, bw)); + } + } + [_close]() { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd]; + this[_fd] = undefined; + fs.close(fd, er => er ? this.emit('error', er) : this.emit('close')); + } + } +} +export class WriteStreamSync extends WriteStream { + [_open]() { + let fd; + // only wrap in a try{} block if we know we'll retry, to avoid + // the rethrow obscuring the error's source frame in most cases. + if (this[_defaultFlag] && this[_flags] === 'r+') { + try { + fd = fs.openSync(this[_path], this[_flags], this[_mode]); + } + catch (er) { + if (er?.code === 'ENOENT') { + this[_flags] = 'w'; + return this[_open](); + } + else { + throw er; + } + } + } + else { + fd = fs.openSync(this[_path], this[_flags], this[_mode]); + } + this[_onopen](null, fd); + } + [_close]() { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd]; + this[_fd] = undefined; + fs.closeSync(fd); + this.emit('close'); + } + } + [_write](buf) { + // throw the original, but try to close if it fails + let threw = true; + try { + this[_onwrite](null, fs.writeSync(this[_fd], buf, 0, buf.length, this[_pos])); + threw = false; + } + finally { + if (threw) { + try { + this[_close](); + } + catch { + // ok error + } + } + } + } +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@isaacs/fs-minipass/dist/esm/index.js.map b/node_modules/@isaacs/fs-minipass/dist/esm/index.js.map new file mode 100644 index 0000000..2ef8b14 --- /dev/null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IAAI,EACJ,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAW,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAClE,CAAA;YACD,KAAK,GAAG,KAAK,CAAA;QACf,CAAC;gBAAS,CAAC;YACT,IAAI,KAAK,EAAE,CAAC;gBACV,IAAI,CAAC;oBACH,IAAI,CAAC,MAAM,CAAC,EAAE,CAAA;gBAChB,CAAC;gBAAC,MAAM,CAAC;oBACP,WAAW;gBACb,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;CACF","sourcesContent":["import EE from 'events'\nimport fs from 'fs'\nimport { Minipass } from 'minipass'\n\nconst writev = fs.writev\n\nconst _autoClose = Symbol('_autoClose')\nconst _close = Symbol('_close')\nconst _ended = Symbol('_ended')\nconst _fd = Symbol('_fd')\nconst _finished = Symbol('_finished')\nconst _flags = Symbol('_flags')\nconst _flush = Symbol('_flush')\nconst _handleChunk = Symbol('_handleChunk')\nconst _makeBuf = Symbol('_makeBuf')\nconst _mode = Symbol('_mode')\nconst _needDrain = Symbol('_needDrain')\nconst _onerror = Symbol('_onerror')\nconst _onopen = Symbol('_onopen')\nconst _onread = Symbol('_onread')\nconst _onwrite = Symbol('_onwrite')\nconst _open = Symbol('_open')\nconst _path = Symbol('_path')\nconst _pos = Symbol('_pos')\nconst _queue = Symbol('_queue')\nconst _read = Symbol('_read')\nconst _readSize = Symbol('_readSize')\nconst _reading = Symbol('_reading')\nconst _remain = Symbol('_remain')\nconst _size = Symbol('_size')\nconst _write = Symbol('_write')\nconst _writing = Symbol('_writing')\nconst _defaultFlag = Symbol('_defaultFlag')\nconst _errored = Symbol('_errored')\n\nexport type ReadStreamOptions =\n Minipass.Options & {\n fd?: number\n readSize?: number\n size?: number\n autoClose?: boolean\n }\n\nexport type ReadStreamEvents = Minipass.Events & {\n open: [fd: number]\n}\n\nexport class ReadStream extends Minipass<\n Minipass.ContiguousData,\n Buffer,\n ReadStreamEvents\n> {\n [_errored]: boolean = false;\n [_fd]?: number;\n [_path]: string;\n [_readSize]: number;\n [_reading]: boolean = false;\n [_size]: number;\n [_remain]: number;\n [_autoClose]: boolean\n\n constructor(path: string, opt: ReadStreamOptions) {\n opt = opt || {}\n super(opt)\n\n this.readable = true\n this.writable = false\n\n if (typeof path !== 'string') {\n throw new TypeError('path must be a string')\n }\n\n this[_errored] = false\n this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined\n this[_path] = path\n this[_readSize] = opt.readSize || 16 * 1024 * 1024\n this[_reading] = false\n this[_size] = typeof opt.size === 'number' ? opt.size : Infinity\n this[_remain] = this[_size]\n this[_autoClose] =\n typeof opt.autoClose === 'boolean' ? opt.autoClose : true\n\n if (typeof this[_fd] === 'number') {\n this[_read]()\n } else {\n this[_open]()\n }\n }\n\n get fd() {\n return this[_fd]\n }\n\n get path() {\n return this[_path]\n }\n\n //@ts-ignore\n write() {\n throw new TypeError('this is a readable stream')\n }\n\n //@ts-ignore\n end() {\n throw new TypeError('this is a readable stream')\n }\n\n [_open]() {\n fs.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd))\n }\n\n [_onopen](er?: NodeJS.ErrnoException | null, fd?: number) {\n if (er) {\n this[_onerror](er)\n } else {\n this[_fd] = fd\n this.emit('open', fd as number)\n this[_read]()\n }\n }\n\n [_makeBuf]() {\n return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain]))\n }\n\n [_read]() {\n if (!this[_reading]) {\n this[_reading] = true\n const buf = this[_makeBuf]()\n /* c8 ignore start */\n if (buf.length === 0) {\n return process.nextTick(() => this[_onread](null, 0, buf))\n }\n /* c8 ignore stop */\n fs.read(this[_fd] as number, buf, 0, buf.length, null, (er, br, b) =>\n this[_onread](er, br, b),\n )\n }\n }\n\n [_onread](er?: NodeJS.ErrnoException | null, br?: number, buf?: Buffer) {\n this[_reading] = false\n if (er) {\n this[_onerror](er)\n } else if (this[_handleChunk](br as number, buf as Buffer)) {\n this[_read]()\n }\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.close(fd, er =>\n er ? this.emit('error', er) : this.emit('close'),\n )\n }\n }\n\n [_onerror](er: NodeJS.ErrnoException) {\n this[_reading] = true\n this[_close]()\n this.emit('error', er)\n }\n\n [_handleChunk](br: number, buf: Buffer) {\n let ret = false\n // no effect if infinite\n this[_remain] -= br\n if (br > 0) {\n ret = super.write(br < buf.length ? buf.subarray(0, br) : buf)\n }\n\n if (br === 0 || this[_remain] <= 0) {\n ret = false\n this[_close]()\n super.end()\n }\n\n return ret\n }\n\n emit(\n ev: Event,\n ...args: ReadStreamEvents[Event]\n ): boolean {\n switch (ev) {\n case 'prefinish':\n case 'finish':\n return false\n\n case 'drain':\n if (typeof this[_fd] === 'number') {\n this[_read]()\n }\n return false\n\n case 'error':\n if (this[_errored]) {\n return false\n }\n this[_errored] = true\n return super.emit(ev, ...args)\n\n default:\n return super.emit(ev, ...args)\n }\n }\n}\n\nexport class ReadStreamSync extends ReadStream {\n [_open]() {\n let threw = true\n try {\n this[_onopen](null, fs.openSync(this[_path], 'r'))\n threw = false\n } finally {\n if (threw) {\n this[_close]()\n }\n }\n }\n\n [_read]() {\n let threw = true\n try {\n if (!this[_reading]) {\n this[_reading] = true\n do {\n const buf = this[_makeBuf]()\n /* c8 ignore start */\n const br =\n buf.length === 0\n ? 0\n : fs.readSync(this[_fd] as number, buf, 0, buf.length, null)\n /* c8 ignore stop */\n if (!this[_handleChunk](br, buf)) {\n break\n }\n } while (true)\n this[_reading] = false\n }\n threw = false\n } finally {\n if (threw) {\n this[_close]()\n }\n }\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.closeSync(fd)\n this.emit('close')\n }\n }\n}\n\nexport type WriteStreamOptions = {\n fd?: number\n autoClose?: boolean\n mode?: number\n captureRejections?: boolean\n start?: number\n flags?: string\n}\n\nexport class WriteStream extends EE {\n readable: false = false\n writable: boolean = true;\n [_errored]: boolean = false;\n [_writing]: boolean = false;\n [_ended]: boolean = false;\n [_queue]: Buffer[] = [];\n [_needDrain]: boolean = false;\n [_path]: string;\n [_mode]: number;\n [_autoClose]: boolean;\n [_fd]?: number;\n [_defaultFlag]: boolean;\n [_flags]: string;\n [_finished]: boolean = false;\n [_pos]?: number\n\n constructor(path: string, opt: WriteStreamOptions) {\n opt = opt || {}\n super(opt)\n this[_path] = path\n this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined\n this[_mode] = opt.mode === undefined ? 0o666 : opt.mode\n this[_pos] = typeof opt.start === 'number' ? opt.start : undefined\n this[_autoClose] =\n typeof opt.autoClose === 'boolean' ? opt.autoClose : true\n\n // truncating makes no sense when writing into the middle\n const defaultFlag = this[_pos] !== undefined ? 'r+' : 'w'\n this[_defaultFlag] = opt.flags === undefined\n this[_flags] = opt.flags === undefined ? defaultFlag : opt.flags\n\n if (this[_fd] === undefined) {\n this[_open]()\n }\n }\n\n emit(ev: string, ...args: any[]) {\n if (ev === 'error') {\n if (this[_errored]) {\n return false\n }\n this[_errored] = true\n }\n return super.emit(ev, ...args)\n }\n\n get fd() {\n return this[_fd]\n }\n\n get path() {\n return this[_path]\n }\n\n [_onerror](er: NodeJS.ErrnoException) {\n this[_close]()\n this[_writing] = true\n this.emit('error', er)\n }\n\n [_open]() {\n fs.open(this[_path], this[_flags], this[_mode], (er, fd) =>\n this[_onopen](er, fd),\n )\n }\n\n [_onopen](er?: null | NodeJS.ErrnoException, fd?: number) {\n if (\n this[_defaultFlag] &&\n this[_flags] === 'r+' &&\n er &&\n er.code === 'ENOENT'\n ) {\n this[_flags] = 'w'\n this[_open]()\n } else if (er) {\n this[_onerror](er)\n } else {\n this[_fd] = fd\n this.emit('open', fd)\n if (!this[_writing]) {\n this[_flush]()\n }\n }\n }\n\n end(buf: string, enc?: BufferEncoding): this\n end(buf?: Buffer, enc?: undefined): this\n end(buf?: Buffer | string, enc?: BufferEncoding): this {\n if (buf) {\n //@ts-ignore\n this.write(buf, enc)\n }\n\n this[_ended] = true\n\n // synthetic after-write logic, where drain/finish live\n if (\n !this[_writing] &&\n !this[_queue].length &&\n typeof this[_fd] === 'number'\n ) {\n this[_onwrite](null, 0)\n }\n return this\n }\n\n write(buf: string, enc?: BufferEncoding): boolean\n write(buf: Buffer, enc?: undefined): boolean\n write(buf: Buffer | string, enc?: BufferEncoding): boolean {\n if (typeof buf === 'string') {\n buf = Buffer.from(buf, enc)\n }\n\n if (this[_ended]) {\n this.emit('error', new Error('write() after end()'))\n return false\n }\n\n if (this[_fd] === undefined || this[_writing] || this[_queue].length) {\n this[_queue].push(buf)\n this[_needDrain] = true\n return false\n }\n\n this[_writing] = true\n this[_write](buf)\n return true\n }\n\n [_write](buf: Buffer) {\n fs.write(\n this[_fd] as number,\n buf,\n 0,\n buf.length,\n this[_pos],\n (er, bw) => this[_onwrite](er, bw),\n )\n }\n\n [_onwrite](er?: null | NodeJS.ErrnoException, bw?: number) {\n if (er) {\n this[_onerror](er)\n } else {\n if (this[_pos] !== undefined && typeof bw === 'number') {\n this[_pos] += bw\n }\n if (this[_queue].length) {\n this[_flush]()\n } else {\n this[_writing] = false\n\n if (this[_ended] && !this[_finished]) {\n this[_finished] = true\n this[_close]()\n this.emit('finish')\n } else if (this[_needDrain]) {\n this[_needDrain] = false\n this.emit('drain')\n }\n }\n }\n }\n\n [_flush]() {\n if (this[_queue].length === 0) {\n if (this[_ended]) {\n this[_onwrite](null, 0)\n }\n } else if (this[_queue].length === 1) {\n this[_write](this[_queue].pop() as Buffer)\n } else {\n const iovec = this[_queue]\n this[_queue] = []\n writev(this[_fd] as number, iovec, this[_pos] as number, (er, bw) =>\n this[_onwrite](er, bw),\n )\n }\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.close(fd, er =>\n er ? this.emit('error', er) : this.emit('close'),\n )\n }\n }\n}\n\nexport class WriteStreamSync extends WriteStream {\n [_open](): void {\n let fd\n // only wrap in a try{} block if we know we'll retry, to avoid\n // the rethrow obscuring the error's source frame in most cases.\n if (this[_defaultFlag] && this[_flags] === 'r+') {\n try {\n fd = fs.openSync(this[_path], this[_flags], this[_mode])\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') {\n this[_flags] = 'w'\n return this[_open]()\n } else {\n throw er\n }\n }\n } else {\n fd = fs.openSync(this[_path], this[_flags], this[_mode])\n }\n\n this[_onopen](null, fd)\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.closeSync(fd)\n this.emit('close')\n }\n }\n\n [_write](buf: Buffer) {\n // throw the original, but try to close if it fails\n let threw = true\n try {\n this[_onwrite](\n null,\n fs.writeSync(this[_fd] as number, buf, 0, buf.length, this[_pos]),\n )\n threw = false\n } finally {\n if (threw) {\n try {\n this[_close]()\n } catch {\n // ok error\n }\n }\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@isaacs/fs-minipass/dist/esm/package.json b/node_modules/@isaacs/fs-minipass/dist/esm/package.json new file mode 100644 index 0000000..3dbc1ca --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/dist/esm/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/node_modules/@isaacs/fs-minipass/package.json b/node_modules/@isaacs/fs-minipass/package.json new file mode 100644 index 0000000..cc4576c --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/package.json @@ -0,0 +1,72 @@ +{ + "name": "@isaacs/fs-minipass", + "version": "4.0.1", + "main": "./dist/commonjs/index.js", + "scripts": { + "prepare": "tshy", + "pretest": "npm run prepare", + "test": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "format": "prettier --write . --loglevel warn", + "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts" + }, + "keywords": [], + "author": "Isaac Z. Schlueter", + "license": "ISC", + "repository": { + "type": "git", + "url": "https://github.com/npm/fs-minipass.git" + }, + "description": "fs read and write streams based on minipass", + "dependencies": { + "minipass": "^7.0.4" + }, + "devDependencies": { + "@types/node": "^20.11.30", + "mutate-fs": "^2.1.1", + "prettier": "^3.2.5", + "tap": "^18.7.1", + "tshy": "^1.12.0", + "typedoc": "^0.25.12" + }, + "files": [ + "dist" + ], + "engines": { + "node": ">=18.0.0" + }, + "tshy": { + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + } + }, + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + } + }, + "types": "./dist/commonjs/index.d.ts", + "type": "module", + "prettier": { + "semi": false, + "printWidth": 75, + "tabWidth": 2, + "useTabs": false, + "singleQuote": true, + "jsxSingleQuote": false, + "bracketSameLine": true, + "arrowParens": "avoid", + "endOfLine": "lf" + } +} diff --git a/node_modules/@jridgewell/gen-mapping/LICENSE b/node_modules/@jridgewell/gen-mapping/LICENSE new file mode 100644 index 0000000..352f071 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/LICENSE @@ -0,0 +1,19 @@ +Copyright 2022 Justin Ridgewell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@jridgewell/gen-mapping/README.md b/node_modules/@jridgewell/gen-mapping/README.md new file mode 100644 index 0000000..4066cdb --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/README.md @@ -0,0 +1,227 @@ +# @jridgewell/gen-mapping + +> Generate source maps + +`gen-mapping` allows you to generate a source map during transpilation or minification. +With a source map, you're able to trace the original location in the source file, either in Chrome's +DevTools or using a library like [`@jridgewell/trace-mapping`][trace-mapping]. + +You may already be familiar with the [`source-map`][source-map] package's `SourceMapGenerator`. This +provides the same `addMapping` and `setSourceContent` API. + +## Installation + +```sh +npm install @jridgewell/gen-mapping +``` + +## Usage + +```typescript +import { GenMapping, addMapping, setSourceContent, toEncodedMap, toDecodedMap } from '@jridgewell/gen-mapping'; + +const map = new GenMapping({ + file: 'output.js', + sourceRoot: 'https://example.com/', +}); + +setSourceContent(map, 'input.js', `function foo() {}`); + +addMapping(map, { + // Lines start at line 1, columns at column 0. + generated: { line: 1, column: 0 }, + source: 'input.js', + original: { line: 1, column: 0 }, +}); + +addMapping(map, { + generated: { line: 1, column: 9 }, + source: 'input.js', + original: { line: 1, column: 9 }, + name: 'foo', +}); + +assert.deepEqual(toDecodedMap(map), { + version: 3, + file: 'output.js', + names: ['foo'], + sourceRoot: 'https://example.com/', + sources: ['input.js'], + sourcesContent: ['function foo() {}'], + mappings: [ + [ [0, 0, 0, 0], [9, 0, 0, 9, 0] ] + ], +}); + +assert.deepEqual(toEncodedMap(map), { + version: 3, + file: 'output.js', + names: ['foo'], + sourceRoot: 'https://example.com/', + sources: ['input.js'], + sourcesContent: ['function foo() {}'], + mappings: 'AAAA,SAASA', +}); +``` + +### Smaller Sourcemaps + +Not everything needs to be added to a sourcemap, and needless markings can cause signficantly +larger file sizes. `gen-mapping` exposes `maybeAddSegment`/`maybeAddMapping` APIs that will +intelligently determine if this marking adds useful information. If not, the marking will be +skipped. + +```typescript +import { maybeAddMapping } from '@jridgewell/gen-mapping'; + +const map = new GenMapping(); + +// Adding a sourceless marking at the beginning of a line isn't useful. +maybeAddMapping(map, { + generated: { line: 1, column: 0 }, +}); + +// Adding a new source marking is useful. +maybeAddMapping(map, { + generated: { line: 1, column: 0 }, + source: 'input.js', + original: { line: 1, column: 0 }, +}); + +// But adding another marking pointing to the exact same original location isn't, even if the +// generated column changed. +maybeAddMapping(map, { + generated: { line: 1, column: 9 }, + source: 'input.js', + original: { line: 1, column: 0 }, +}); + +assert.deepEqual(toEncodedMap(map), { + version: 3, + names: [], + sources: ['input.js'], + sourcesContent: [null], + mappings: 'AAAA', +}); +``` + +## Benchmarks + +``` +node v18.0.0 + +amp.js.map +Memory Usage: +gen-mapping: addSegment 5852872 bytes +gen-mapping: addMapping 7716042 bytes +source-map-js 6143250 bytes +source-map-0.6.1 6124102 bytes +source-map-0.8.0 6121173 bytes +Smallest memory usage is gen-mapping: addSegment + +Adding speed: +gen-mapping: addSegment x 441 ops/sec ±2.07% (90 runs sampled) +gen-mapping: addMapping x 350 ops/sec ±2.40% (86 runs sampled) +source-map-js: addMapping x 169 ops/sec ±2.42% (80 runs sampled) +source-map-0.6.1: addMapping x 167 ops/sec ±2.56% (80 runs sampled) +source-map-0.8.0: addMapping x 168 ops/sec ±2.52% (80 runs sampled) +Fastest is gen-mapping: addSegment + +Generate speed: +gen-mapping: decoded output x 150,824,370 ops/sec ±0.07% (102 runs sampled) +gen-mapping: encoded output x 663 ops/sec ±0.22% (98 runs sampled) +source-map-js: encoded output x 197 ops/sec ±0.45% (84 runs sampled) +source-map-0.6.1: encoded output x 198 ops/sec ±0.33% (85 runs sampled) +source-map-0.8.0: encoded output x 197 ops/sec ±0.06% (93 runs sampled) +Fastest is gen-mapping: decoded output + + +*** + + +babel.min.js.map +Memory Usage: +gen-mapping: addSegment 37578063 bytes +gen-mapping: addMapping 37212897 bytes +source-map-js 47638527 bytes +source-map-0.6.1 47690503 bytes +source-map-0.8.0 47470188 bytes +Smallest memory usage is gen-mapping: addMapping + +Adding speed: +gen-mapping: addSegment x 31.05 ops/sec ±8.31% (43 runs sampled) +gen-mapping: addMapping x 29.83 ops/sec ±7.36% (51 runs sampled) +source-map-js: addMapping x 20.73 ops/sec ±6.22% (38 runs sampled) +source-map-0.6.1: addMapping x 20.03 ops/sec ±10.51% (38 runs sampled) +source-map-0.8.0: addMapping x 19.30 ops/sec ±8.27% (37 runs sampled) +Fastest is gen-mapping: addSegment + +Generate speed: +gen-mapping: decoded output x 381,379,234 ops/sec ±0.29% (96 runs sampled) +gen-mapping: encoded output x 95.15 ops/sec ±2.98% (72 runs sampled) +source-map-js: encoded output x 15.20 ops/sec ±7.41% (33 runs sampled) +source-map-0.6.1: encoded output x 16.36 ops/sec ±10.46% (31 runs sampled) +source-map-0.8.0: encoded output x 16.06 ops/sec ±6.45% (31 runs sampled) +Fastest is gen-mapping: decoded output + + +*** + + +preact.js.map +Memory Usage: +gen-mapping: addSegment 416247 bytes +gen-mapping: addMapping 419824 bytes +source-map-js 1024619 bytes +source-map-0.6.1 1146004 bytes +source-map-0.8.0 1113250 bytes +Smallest memory usage is gen-mapping: addSegment + +Adding speed: +gen-mapping: addSegment x 13,755 ops/sec ±0.15% (98 runs sampled) +gen-mapping: addMapping x 13,013 ops/sec ±0.11% (101 runs sampled) +source-map-js: addMapping x 4,564 ops/sec ±0.21% (98 runs sampled) +source-map-0.6.1: addMapping x 4,562 ops/sec ±0.11% (99 runs sampled) +source-map-0.8.0: addMapping x 4,593 ops/sec ±0.11% (100 runs sampled) +Fastest is gen-mapping: addSegment + +Generate speed: +gen-mapping: decoded output x 379,864,020 ops/sec ±0.23% (93 runs sampled) +gen-mapping: encoded output x 14,368 ops/sec ±4.07% (82 runs sampled) +source-map-js: encoded output x 5,261 ops/sec ±0.21% (99 runs sampled) +source-map-0.6.1: encoded output x 5,124 ops/sec ±0.58% (99 runs sampled) +source-map-0.8.0: encoded output x 5,434 ops/sec ±0.33% (96 runs sampled) +Fastest is gen-mapping: decoded output + + +*** + + +react.js.map +Memory Usage: +gen-mapping: addSegment 975096 bytes +gen-mapping: addMapping 1102981 bytes +source-map-js 2918836 bytes +source-map-0.6.1 2885435 bytes +source-map-0.8.0 2874336 bytes +Smallest memory usage is gen-mapping: addSegment + +Adding speed: +gen-mapping: addSegment x 4,772 ops/sec ±0.15% (100 runs sampled) +gen-mapping: addMapping x 4,456 ops/sec ±0.13% (97 runs sampled) +source-map-js: addMapping x 1,618 ops/sec ±0.24% (97 runs sampled) +source-map-0.6.1: addMapping x 1,622 ops/sec ±0.12% (99 runs sampled) +source-map-0.8.0: addMapping x 1,631 ops/sec ±0.12% (100 runs sampled) +Fastest is gen-mapping: addSegment + +Generate speed: +gen-mapping: decoded output x 379,107,695 ops/sec ±0.07% (99 runs sampled) +gen-mapping: encoded output x 5,421 ops/sec ±1.60% (89 runs sampled) +source-map-js: encoded output x 2,113 ops/sec ±1.81% (98 runs sampled) +source-map-0.6.1: encoded output x 2,126 ops/sec ±0.10% (100 runs sampled) +source-map-0.8.0: encoded output x 2,176 ops/sec ±0.39% (98 runs sampled) +Fastest is gen-mapping: decoded output +``` + +[source-map]: https://www.npmjs.com/package/source-map +[trace-mapping]: https://github.com/jridgewell/trace-mapping diff --git a/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs new file mode 100644 index 0000000..5d38e38 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs @@ -0,0 +1,230 @@ +import { SetArray, put, remove } from '@jridgewell/set-array'; +import { encode } from '@jridgewell/sourcemap-codec'; +import { TraceMap, decodedMappings } from '@jridgewell/trace-mapping'; + +const COLUMN = 0; +const SOURCES_INDEX = 1; +const SOURCE_LINE = 2; +const SOURCE_COLUMN = 3; +const NAMES_INDEX = 4; + +const NO_NAME = -1; +/** + * Provides the state to generate a sourcemap. + */ +class GenMapping { + constructor({ file, sourceRoot } = {}) { + this._names = new SetArray(); + this._sources = new SetArray(); + this._sourcesContent = []; + this._mappings = []; + this.file = file; + this.sourceRoot = sourceRoot; + this._ignoreList = new SetArray(); + } +} +/** + * Typescript doesn't allow friend access to private fields, so this just casts the map into a type + * with public access modifiers. + */ +function cast(map) { + return map; +} +function addSegment(map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { + return addSegmentInternal(false, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content); +} +function addMapping(map, mapping) { + return addMappingInternal(false, map, mapping); +} +/** + * Same as `addSegment`, but will only add the segment if it generates useful information in the + * resulting map. This only works correctly if segments are added **in order**, meaning you should + * not add a segment with a lower generated line/column than one that came before. + */ +const maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => { + return addSegmentInternal(true, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content); +}; +/** + * Same as `addMapping`, but will only add the mapping if it generates useful information in the + * resulting map. This only works correctly if mappings are added **in order**, meaning you should + * not add a mapping with a lower generated line/column than one that came before. + */ +const maybeAddMapping = (map, mapping) => { + return addMappingInternal(true, map, mapping); +}; +/** + * Adds/removes the content of the source file to the source map. + */ +function setSourceContent(map, source, content) { + const { _sources: sources, _sourcesContent: sourcesContent } = cast(map); + const index = put(sources, source); + sourcesContent[index] = content; +} +function setIgnore(map, source, ignore = true) { + const { _sources: sources, _sourcesContent: sourcesContent, _ignoreList: ignoreList } = cast(map); + const index = put(sources, source); + if (index === sourcesContent.length) + sourcesContent[index] = null; + if (ignore) + put(ignoreList, index); + else + remove(ignoreList, index); +} +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +function toDecodedMap(map) { + const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, _ignoreList: ignoreList, } = cast(map); + removeEmptyFinalLines(mappings); + return { + version: 3, + file: map.file || undefined, + names: names.array, + sourceRoot: map.sourceRoot || undefined, + sources: sources.array, + sourcesContent, + mappings, + ignoreList: ignoreList.array, + }; +} +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +function toEncodedMap(map) { + const decoded = toDecodedMap(map); + return Object.assign(Object.assign({}, decoded), { mappings: encode(decoded.mappings) }); +} +/** + * Constructs a new GenMapping, using the already present mappings of the input. + */ +function fromMap(input) { + const map = new TraceMap(input); + const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot }); + putAll(cast(gen)._names, map.names); + putAll(cast(gen)._sources, map.sources); + cast(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null); + cast(gen)._mappings = decodedMappings(map); + if (map.ignoreList) + putAll(cast(gen)._ignoreList, map.ignoreList); + return gen; +} +/** + * Returns an array of high-level mapping objects for every recorded segment, which could then be + * passed to the `source-map` library. + */ +function allMappings(map) { + const out = []; + const { _mappings: mappings, _sources: sources, _names: names } = cast(map); + for (let i = 0; i < mappings.length; i++) { + const line = mappings[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const generated = { line: i + 1, column: seg[COLUMN] }; + let source = undefined; + let original = undefined; + let name = undefined; + if (seg.length !== 1) { + source = sources.array[seg[SOURCES_INDEX]]; + original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] }; + if (seg.length === 5) + name = names.array[seg[NAMES_INDEX]]; + } + out.push({ generated, source, original, name }); + } + } + return out; +} +// This split declaration is only so that terser can elminiate the static initialization block. +function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { + const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = cast(map); + const line = getLine(mappings, genLine); + const index = getColumnIndex(line, genColumn); + if (!source) { + if (skipable && skipSourceless(line, index)) + return; + return insert(line, index, [genColumn]); + } + const sourcesIndex = put(sources, source); + const namesIndex = name ? put(names, name) : NO_NAME; + if (sourcesIndex === sourcesContent.length) + sourcesContent[sourcesIndex] = content !== null && content !== void 0 ? content : null; + if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) { + return; + } + return insert(line, index, name + ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] + : [genColumn, sourcesIndex, sourceLine, sourceColumn]); +} +function getLine(mappings, index) { + for (let i = mappings.length; i <= index; i++) { + mappings[i] = []; + } + return mappings[index]; +} +function getColumnIndex(line, genColumn) { + let index = line.length; + for (let i = index - 1; i >= 0; index = i--) { + const current = line[i]; + if (genColumn >= current[COLUMN]) + break; + } + return index; +} +function insert(array, index, value) { + for (let i = array.length; i > index; i--) { + array[i] = array[i - 1]; + } + array[index] = value; +} +function removeEmptyFinalLines(mappings) { + const { length } = mappings; + let len = length; + for (let i = len - 1; i >= 0; len = i, i--) { + if (mappings[i].length > 0) + break; + } + if (len < length) + mappings.length = len; +} +function putAll(setarr, array) { + for (let i = 0; i < array.length; i++) + put(setarr, array[i]); +} +function skipSourceless(line, index) { + // The start of a line is already sourceless, so adding a sourceless segment to the beginning + // doesn't generate any useful information. + if (index === 0) + return true; + const prev = line[index - 1]; + // If the previous segment is also sourceless, then adding another sourceless segment doesn't + // genrate any new information. Else, this segment will end the source/named segment and point to + // a sourceless position, which is useful. + return prev.length === 1; +} +function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) { + // A source/named segment at the start of a line gives position at that genColumn + if (index === 0) + return false; + const prev = line[index - 1]; + // If the previous segment is sourceless, then we're transitioning to a source. + if (prev.length === 1) + return false; + // If the previous segment maps to the exact same source position, then this segment doesn't + // provide any new position information. + return (sourcesIndex === prev[SOURCES_INDEX] && + sourceLine === prev[SOURCE_LINE] && + sourceColumn === prev[SOURCE_COLUMN] && + namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME)); +} +function addMappingInternal(skipable, map, mapping) { + const { generated, source, original, name, content } = mapping; + if (!source) { + return addSegmentInternal(skipable, map, generated.line - 1, generated.column, null, null, null, null, null); + } + return addSegmentInternal(skipable, map, generated.line - 1, generated.column, source, original.line - 1, original.column, name, content); +} + +export { GenMapping, addMapping, addSegment, allMappings, fromMap, maybeAddMapping, maybeAddSegment, setIgnore, setSourceContent, toDecodedMap, toEncodedMap }; +//# sourceMappingURL=gen-mapping.mjs.map diff --git a/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map new file mode 100644 index 0000000..6290b97 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"gen-mapping.mjs","sources":["../src/sourcemap-segment.ts","../src/gen-mapping.ts"],"sourcesContent":["type GeneratedColumn = number;\ntype SourcesIndex = number;\ntype SourceLine = number;\ntype SourceColumn = number;\ntype NamesIndex = number;\n\nexport type SourceMapSegment =\n | [GeneratedColumn]\n | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn]\n | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];\n\nexport const COLUMN = 0;\nexport const SOURCES_INDEX = 1;\nexport const SOURCE_LINE = 2;\nexport const SOURCE_COLUMN = 3;\nexport const NAMES_INDEX = 4;\n","import { SetArray, put, remove } from '@jridgewell/set-array';\nimport { encode } from '@jridgewell/sourcemap-codec';\nimport { TraceMap, decodedMappings } from '@jridgewell/trace-mapping';\n\nimport {\n COLUMN,\n SOURCES_INDEX,\n SOURCE_LINE,\n SOURCE_COLUMN,\n NAMES_INDEX,\n} from './sourcemap-segment';\n\nimport type { SourceMapInput } from '@jridgewell/trace-mapping';\nimport type { SourceMapSegment } from './sourcemap-segment';\nimport type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types';\n\nexport type { DecodedSourceMap, EncodedSourceMap, Mapping };\n\nexport type Options = {\n file?: string | null;\n sourceRoot?: string | null;\n};\n\nconst NO_NAME = -1;\n\n/**\n * Provides the state to generate a sourcemap.\n */\nexport class GenMapping {\n private declare _names: SetArray;\n private declare _sources: SetArray;\n private declare _sourcesContent: (string | null)[];\n private declare _mappings: SourceMapSegment[][];\n private declare _ignoreList: SetArray;\n declare file: string | null | undefined;\n declare sourceRoot: string | null | undefined;\n\n constructor({ file, sourceRoot }: Options = {}) {\n this._names = new SetArray();\n this._sources = new SetArray();\n this._sourcesContent = [];\n this._mappings = [];\n this.file = file;\n this.sourceRoot = sourceRoot;\n this._ignoreList = new SetArray();\n }\n}\n\ninterface PublicMap {\n _names: GenMapping['_names'];\n _sources: GenMapping['_sources'];\n _sourcesContent: GenMapping['_sourcesContent'];\n _mappings: GenMapping['_mappings'];\n _ignoreList: GenMapping['_ignoreList'];\n}\n\n/**\n * Typescript doesn't allow friend access to private fields, so this just casts the map into a type\n * with public access modifiers.\n */\nfunction cast(map: unknown): PublicMap {\n return map as any;\n}\n\n/**\n * A low-level API to associate a generated position with an original source position. Line and\n * column here are 0-based, unlike `addMapping`.\n */\nexport function addSegment(\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source?: null,\n sourceLine?: null,\n sourceColumn?: null,\n name?: null,\n content?: null,\n): void;\nexport function addSegment(\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source: string,\n sourceLine: number,\n sourceColumn: number,\n name?: null,\n content?: string | null,\n): void;\nexport function addSegment(\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source: string,\n sourceLine: number,\n sourceColumn: number,\n name: string,\n content?: string | null,\n): void;\nexport function addSegment(\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source?: string | null,\n sourceLine?: number | null,\n sourceColumn?: number | null,\n name?: string | null,\n content?: string | null,\n): void {\n return addSegmentInternal(\n false,\n map,\n genLine,\n genColumn,\n source,\n sourceLine,\n sourceColumn,\n name,\n content,\n );\n}\n\n/**\n * A high-level API to associate a generated position with an original source position. Line is\n * 1-based, but column is 0-based, due to legacy behavior in `source-map` library.\n */\nexport function addMapping(\n map: GenMapping,\n mapping: {\n generated: Pos;\n source?: null;\n original?: null;\n name?: null;\n content?: null;\n },\n): void;\nexport function addMapping(\n map: GenMapping,\n mapping: {\n generated: Pos;\n source: string;\n original: Pos;\n name?: null;\n content?: string | null;\n },\n): void;\nexport function addMapping(\n map: GenMapping,\n mapping: {\n generated: Pos;\n source: string;\n original: Pos;\n name: string;\n content?: string | null;\n },\n): void;\nexport function addMapping(\n map: GenMapping,\n mapping: {\n generated: Pos;\n source?: string | null;\n original?: Pos | null;\n name?: string | null;\n content?: string | null;\n },\n): void {\n return addMappingInternal(false, map, mapping as Parameters[2]);\n}\n\n/**\n * Same as `addSegment`, but will only add the segment if it generates useful information in the\n * resulting map. This only works correctly if segments are added **in order**, meaning you should\n * not add a segment with a lower generated line/column than one that came before.\n */\nexport const maybeAddSegment: typeof addSegment = (\n map,\n genLine,\n genColumn,\n source,\n sourceLine,\n sourceColumn,\n name,\n content,\n) => {\n return addSegmentInternal(\n true,\n map,\n genLine,\n genColumn,\n source,\n sourceLine,\n sourceColumn,\n name,\n content,\n );\n};\n\n/**\n * Same as `addMapping`, but will only add the mapping if it generates useful information in the\n * resulting map. This only works correctly if mappings are added **in order**, meaning you should\n * not add a mapping with a lower generated line/column than one that came before.\n */\nexport const maybeAddMapping: typeof addMapping = (map, mapping) => {\n return addMappingInternal(true, map, mapping as Parameters[2]);\n};\n\n/**\n * Adds/removes the content of the source file to the source map.\n */\nexport function setSourceContent(map: GenMapping, source: string, content: string | null): void {\n const { _sources: sources, _sourcesContent: sourcesContent } = cast(map);\n const index = put(sources, source);\n sourcesContent[index] = content;\n}\n\nexport function setIgnore(map: GenMapping, source: string, ignore = true) {\n const { _sources: sources, _sourcesContent: sourcesContent, _ignoreList: ignoreList } = cast(map);\n const index = put(sources, source);\n if (index === sourcesContent.length) sourcesContent[index] = null;\n if (ignore) put(ignoreList, index);\n else remove(ignoreList, index);\n}\n\n/**\n * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nexport function toDecodedMap(map: GenMapping): DecodedSourceMap {\n const {\n _mappings: mappings,\n _sources: sources,\n _sourcesContent: sourcesContent,\n _names: names,\n _ignoreList: ignoreList,\n } = cast(map);\n removeEmptyFinalLines(mappings);\n\n return {\n version: 3,\n file: map.file || undefined,\n names: names.array,\n sourceRoot: map.sourceRoot || undefined,\n sources: sources.array,\n sourcesContent,\n mappings,\n ignoreList: ignoreList.array,\n };\n}\n\n/**\n * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nexport function toEncodedMap(map: GenMapping): EncodedSourceMap {\n const decoded = toDecodedMap(map);\n return {\n ...decoded,\n mappings: encode(decoded.mappings as SourceMapSegment[][]),\n };\n}\n\n/**\n * Constructs a new GenMapping, using the already present mappings of the input.\n */\nexport function fromMap(input: SourceMapInput): GenMapping {\n const map = new TraceMap(input);\n const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot });\n\n putAll(cast(gen)._names, map.names);\n putAll(cast(gen)._sources, map.sources as string[]);\n cast(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null);\n cast(gen)._mappings = decodedMappings(map) as GenMapping['_mappings'];\n if (map.ignoreList) putAll(cast(gen)._ignoreList, map.ignoreList);\n\n return gen;\n}\n\n/**\n * Returns an array of high-level mapping objects for every recorded segment, which could then be\n * passed to the `source-map` library.\n */\nexport function allMappings(map: GenMapping): Mapping[] {\n const out: Mapping[] = [];\n const { _mappings: mappings, _sources: sources, _names: names } = cast(map);\n\n for (let i = 0; i < mappings.length; i++) {\n const line = mappings[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n\n const generated = { line: i + 1, column: seg[COLUMN] };\n let source: string | undefined = undefined;\n let original: Pos | undefined = undefined;\n let name: string | undefined = undefined;\n\n if (seg.length !== 1) {\n source = sources.array[seg[SOURCES_INDEX]];\n original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] };\n\n if (seg.length === 5) name = names.array[seg[NAMES_INDEX]];\n }\n\n out.push({ generated, source, original, name } as Mapping);\n }\n }\n\n return out;\n}\n\n// This split declaration is only so that terser can elminiate the static initialization block.\nfunction addSegmentInternal(\n skipable: boolean,\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source: S,\n sourceLine: S extends string ? number : null | undefined,\n sourceColumn: S extends string ? number : null | undefined,\n name: S extends string ? string | null | undefined : null | undefined,\n content: S extends string ? string | null | undefined : null | undefined,\n): void {\n const {\n _mappings: mappings,\n _sources: sources,\n _sourcesContent: sourcesContent,\n _names: names,\n } = cast(map);\n const line = getLine(mappings, genLine);\n const index = getColumnIndex(line, genColumn);\n\n if (!source) {\n if (skipable && skipSourceless(line, index)) return;\n return insert(line, index, [genColumn]);\n }\n\n // Sigh, TypeScript can't figure out sourceLine and sourceColumn aren't nullish if source\n // isn't nullish.\n assert(sourceLine);\n assert(sourceColumn);\n\n const sourcesIndex = put(sources, source);\n const namesIndex = name ? put(names, name) : NO_NAME;\n if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content ?? null;\n\n if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) {\n return;\n }\n\n return insert(\n line,\n index,\n name\n ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]\n : [genColumn, sourcesIndex, sourceLine, sourceColumn],\n );\n}\n\nfunction assert(_val: unknown): asserts _val is T {\n // noop.\n}\n\nfunction getLine(mappings: SourceMapSegment[][], index: number): SourceMapSegment[] {\n for (let i = mappings.length; i <= index; i++) {\n mappings[i] = [];\n }\n return mappings[index];\n}\n\nfunction getColumnIndex(line: SourceMapSegment[], genColumn: number): number {\n let index = line.length;\n for (let i = index - 1; i >= 0; index = i--) {\n const current = line[i];\n if (genColumn >= current[COLUMN]) break;\n }\n return index;\n}\n\nfunction insert(array: T[], index: number, value: T) {\n for (let i = array.length; i > index; i--) {\n array[i] = array[i - 1];\n }\n array[index] = value;\n}\n\nfunction removeEmptyFinalLines(mappings: SourceMapSegment[][]) {\n const { length } = mappings;\n let len = length;\n for (let i = len - 1; i >= 0; len = i, i--) {\n if (mappings[i].length > 0) break;\n }\n if (len < length) mappings.length = len;\n}\n\nfunction putAll(setarr: SetArray, array: T[]) {\n for (let i = 0; i < array.length; i++) put(setarr, array[i]);\n}\n\nfunction skipSourceless(line: SourceMapSegment[], index: number): boolean {\n // The start of a line is already sourceless, so adding a sourceless segment to the beginning\n // doesn't generate any useful information.\n if (index === 0) return true;\n\n const prev = line[index - 1];\n // If the previous segment is also sourceless, then adding another sourceless segment doesn't\n // genrate any new information. Else, this segment will end the source/named segment and point to\n // a sourceless position, which is useful.\n return prev.length === 1;\n}\n\nfunction skipSource(\n line: SourceMapSegment[],\n index: number,\n sourcesIndex: number,\n sourceLine: number,\n sourceColumn: number,\n namesIndex: number,\n): boolean {\n // A source/named segment at the start of a line gives position at that genColumn\n if (index === 0) return false;\n\n const prev = line[index - 1];\n\n // If the previous segment is sourceless, then we're transitioning to a source.\n if (prev.length === 1) return false;\n\n // If the previous segment maps to the exact same source position, then this segment doesn't\n // provide any new position information.\n return (\n sourcesIndex === prev[SOURCES_INDEX] &&\n sourceLine === prev[SOURCE_LINE] &&\n sourceColumn === prev[SOURCE_COLUMN] &&\n namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME)\n );\n}\n\nfunction addMappingInternal(\n skipable: boolean,\n map: GenMapping,\n mapping: {\n generated: Pos;\n source: S;\n original: S extends string ? Pos : null | undefined;\n name: S extends string ? string | null | undefined : null | undefined;\n content: S extends string ? string | null | undefined : null | undefined;\n },\n) {\n const { generated, source, original, name, content } = mapping;\n if (!source) {\n return addSegmentInternal(\n skipable,\n map,\n generated.line - 1,\n generated.column,\n null,\n null,\n null,\n null,\n null,\n );\n }\n assert(original);\n return addSegmentInternal(\n skipable,\n map,\n generated.line - 1,\n generated.column,\n source as string,\n original.line - 1,\n original.column,\n name,\n content,\n );\n}\n"],"names":[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I,GAAG,CAAC,EACjB,QAAQ,CAAC,MAAM,EACf,IAAI,EACJ,OAAO,CACR,CAAC;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js new file mode 100644 index 0000000..3bf18f3 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js @@ -0,0 +1,246 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@jridgewell/set-array'), require('@jridgewell/sourcemap-codec'), require('@jridgewell/trace-mapping')) : + typeof define === 'function' && define.amd ? define(['exports', '@jridgewell/set-array', '@jridgewell/sourcemap-codec', '@jridgewell/trace-mapping'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.genMapping = {}, global.setArray, global.sourcemapCodec, global.traceMapping)); +})(this, (function (exports, setArray, sourcemapCodec, traceMapping) { 'use strict'; + + const COLUMN = 0; + const SOURCES_INDEX = 1; + const SOURCE_LINE = 2; + const SOURCE_COLUMN = 3; + const NAMES_INDEX = 4; + + const NO_NAME = -1; + /** + * Provides the state to generate a sourcemap. + */ + class GenMapping { + constructor({ file, sourceRoot } = {}) { + this._names = new setArray.SetArray(); + this._sources = new setArray.SetArray(); + this._sourcesContent = []; + this._mappings = []; + this.file = file; + this.sourceRoot = sourceRoot; + this._ignoreList = new setArray.SetArray(); + } + } + /** + * Typescript doesn't allow friend access to private fields, so this just casts the map into a type + * with public access modifiers. + */ + function cast(map) { + return map; + } + function addSegment(map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { + return addSegmentInternal(false, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content); + } + function addMapping(map, mapping) { + return addMappingInternal(false, map, mapping); + } + /** + * Same as `addSegment`, but will only add the segment if it generates useful information in the + * resulting map. This only works correctly if segments are added **in order**, meaning you should + * not add a segment with a lower generated line/column than one that came before. + */ + const maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => { + return addSegmentInternal(true, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content); + }; + /** + * Same as `addMapping`, but will only add the mapping if it generates useful information in the + * resulting map. This only works correctly if mappings are added **in order**, meaning you should + * not add a mapping with a lower generated line/column than one that came before. + */ + const maybeAddMapping = (map, mapping) => { + return addMappingInternal(true, map, mapping); + }; + /** + * Adds/removes the content of the source file to the source map. + */ + function setSourceContent(map, source, content) { + const { _sources: sources, _sourcesContent: sourcesContent } = cast(map); + const index = setArray.put(sources, source); + sourcesContent[index] = content; + } + function setIgnore(map, source, ignore = true) { + const { _sources: sources, _sourcesContent: sourcesContent, _ignoreList: ignoreList } = cast(map); + const index = setArray.put(sources, source); + if (index === sourcesContent.length) + sourcesContent[index] = null; + if (ignore) + setArray.put(ignoreList, index); + else + setArray.remove(ignoreList, index); + } + /** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ + function toDecodedMap(map) { + const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, _ignoreList: ignoreList, } = cast(map); + removeEmptyFinalLines(mappings); + return { + version: 3, + file: map.file || undefined, + names: names.array, + sourceRoot: map.sourceRoot || undefined, + sources: sources.array, + sourcesContent, + mappings, + ignoreList: ignoreList.array, + }; + } + /** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ + function toEncodedMap(map) { + const decoded = toDecodedMap(map); + return Object.assign(Object.assign({}, decoded), { mappings: sourcemapCodec.encode(decoded.mappings) }); + } + /** + * Constructs a new GenMapping, using the already present mappings of the input. + */ + function fromMap(input) { + const map = new traceMapping.TraceMap(input); + const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot }); + putAll(cast(gen)._names, map.names); + putAll(cast(gen)._sources, map.sources); + cast(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null); + cast(gen)._mappings = traceMapping.decodedMappings(map); + if (map.ignoreList) + putAll(cast(gen)._ignoreList, map.ignoreList); + return gen; + } + /** + * Returns an array of high-level mapping objects for every recorded segment, which could then be + * passed to the `source-map` library. + */ + function allMappings(map) { + const out = []; + const { _mappings: mappings, _sources: sources, _names: names } = cast(map); + for (let i = 0; i < mappings.length; i++) { + const line = mappings[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const generated = { line: i + 1, column: seg[COLUMN] }; + let source = undefined; + let original = undefined; + let name = undefined; + if (seg.length !== 1) { + source = sources.array[seg[SOURCES_INDEX]]; + original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] }; + if (seg.length === 5) + name = names.array[seg[NAMES_INDEX]]; + } + out.push({ generated, source, original, name }); + } + } + return out; + } + // This split declaration is only so that terser can elminiate the static initialization block. + function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { + const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = cast(map); + const line = getLine(mappings, genLine); + const index = getColumnIndex(line, genColumn); + if (!source) { + if (skipable && skipSourceless(line, index)) + return; + return insert(line, index, [genColumn]); + } + const sourcesIndex = setArray.put(sources, source); + const namesIndex = name ? setArray.put(names, name) : NO_NAME; + if (sourcesIndex === sourcesContent.length) + sourcesContent[sourcesIndex] = content !== null && content !== void 0 ? content : null; + if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) { + return; + } + return insert(line, index, name + ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] + : [genColumn, sourcesIndex, sourceLine, sourceColumn]); + } + function getLine(mappings, index) { + for (let i = mappings.length; i <= index; i++) { + mappings[i] = []; + } + return mappings[index]; + } + function getColumnIndex(line, genColumn) { + let index = line.length; + for (let i = index - 1; i >= 0; index = i--) { + const current = line[i]; + if (genColumn >= current[COLUMN]) + break; + } + return index; + } + function insert(array, index, value) { + for (let i = array.length; i > index; i--) { + array[i] = array[i - 1]; + } + array[index] = value; + } + function removeEmptyFinalLines(mappings) { + const { length } = mappings; + let len = length; + for (let i = len - 1; i >= 0; len = i, i--) { + if (mappings[i].length > 0) + break; + } + if (len < length) + mappings.length = len; + } + function putAll(setarr, array) { + for (let i = 0; i < array.length; i++) + setArray.put(setarr, array[i]); + } + function skipSourceless(line, index) { + // The start of a line is already sourceless, so adding a sourceless segment to the beginning + // doesn't generate any useful information. + if (index === 0) + return true; + const prev = line[index - 1]; + // If the previous segment is also sourceless, then adding another sourceless segment doesn't + // genrate any new information. Else, this segment will end the source/named segment and point to + // a sourceless position, which is useful. + return prev.length === 1; + } + function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) { + // A source/named segment at the start of a line gives position at that genColumn + if (index === 0) + return false; + const prev = line[index - 1]; + // If the previous segment is sourceless, then we're transitioning to a source. + if (prev.length === 1) + return false; + // If the previous segment maps to the exact same source position, then this segment doesn't + // provide any new position information. + return (sourcesIndex === prev[SOURCES_INDEX] && + sourceLine === prev[SOURCE_LINE] && + sourceColumn === prev[SOURCE_COLUMN] && + namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME)); + } + function addMappingInternal(skipable, map, mapping) { + const { generated, source, original, name, content } = mapping; + if (!source) { + return addSegmentInternal(skipable, map, generated.line - 1, generated.column, null, null, null, null, null); + } + return addSegmentInternal(skipable, map, generated.line - 1, generated.column, source, original.line - 1, original.column, name, content); + } + + exports.GenMapping = GenMapping; + exports.addMapping = addMapping; + exports.addSegment = addSegment; + exports.allMappings = allMappings; + exports.fromMap = fromMap; + exports.maybeAddMapping = maybeAddMapping; + exports.maybeAddSegment = maybeAddSegment; + exports.setIgnore = setIgnore; + exports.setSourceContent = setSourceContent; + exports.toDecodedMap = toDecodedMap; + exports.toEncodedMap = toEncodedMap; + + Object.defineProperty(exports, '__esModule', { value: true }); + +})); +//# sourceMappingURL=gen-mapping.umd.js.map diff --git a/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map new file mode 100644 index 0000000..72172ac --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"gen-mapping.umd.js","sources":["../src/sourcemap-segment.ts","../src/gen-mapping.ts"],"sourcesContent":["type GeneratedColumn = number;\ntype SourcesIndex = number;\ntype SourceLine = number;\ntype SourceColumn = number;\ntype NamesIndex = number;\n\nexport type SourceMapSegment =\n | [GeneratedColumn]\n | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn]\n | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];\n\nexport const COLUMN = 0;\nexport const SOURCES_INDEX = 1;\nexport const SOURCE_LINE = 2;\nexport const SOURCE_COLUMN = 3;\nexport const NAMES_INDEX = 4;\n","import { SetArray, put, remove } from '@jridgewell/set-array';\nimport { encode } from '@jridgewell/sourcemap-codec';\nimport { TraceMap, decodedMappings } from '@jridgewell/trace-mapping';\n\nimport {\n COLUMN,\n SOURCES_INDEX,\n SOURCE_LINE,\n SOURCE_COLUMN,\n NAMES_INDEX,\n} from './sourcemap-segment';\n\nimport type { SourceMapInput } from '@jridgewell/trace-mapping';\nimport type { SourceMapSegment } from './sourcemap-segment';\nimport type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types';\n\nexport type { DecodedSourceMap, EncodedSourceMap, Mapping };\n\nexport type Options = {\n file?: string | null;\n sourceRoot?: string | null;\n};\n\nconst NO_NAME = -1;\n\n/**\n * Provides the state to generate a sourcemap.\n */\nexport class GenMapping {\n private declare _names: SetArray;\n private declare _sources: SetArray;\n private declare _sourcesContent: (string | null)[];\n private declare _mappings: SourceMapSegment[][];\n private declare _ignoreList: SetArray;\n declare file: string | null | undefined;\n declare sourceRoot: string | null | undefined;\n\n constructor({ file, sourceRoot }: Options = {}) {\n this._names = new SetArray();\n this._sources = new SetArray();\n this._sourcesContent = [];\n this._mappings = [];\n this.file = file;\n this.sourceRoot = sourceRoot;\n this._ignoreList = new SetArray();\n }\n}\n\ninterface PublicMap {\n _names: GenMapping['_names'];\n _sources: GenMapping['_sources'];\n _sourcesContent: GenMapping['_sourcesContent'];\n _mappings: GenMapping['_mappings'];\n _ignoreList: GenMapping['_ignoreList'];\n}\n\n/**\n * Typescript doesn't allow friend access to private fields, so this just casts the map into a type\n * with public access modifiers.\n */\nfunction cast(map: unknown): PublicMap {\n return map as any;\n}\n\n/**\n * A low-level API to associate a generated position with an original source position. Line and\n * column here are 0-based, unlike `addMapping`.\n */\nexport function addSegment(\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source?: null,\n sourceLine?: null,\n sourceColumn?: null,\n name?: null,\n content?: null,\n): void;\nexport function addSegment(\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source: string,\n sourceLine: number,\n sourceColumn: number,\n name?: null,\n content?: string | null,\n): void;\nexport function addSegment(\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source: string,\n sourceLine: number,\n sourceColumn: number,\n name: string,\n content?: string | null,\n): void;\nexport function addSegment(\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source?: string | null,\n sourceLine?: number | null,\n sourceColumn?: number | null,\n name?: string | null,\n content?: string | null,\n): void {\n return addSegmentInternal(\n false,\n map,\n genLine,\n genColumn,\n source,\n sourceLine,\n sourceColumn,\n name,\n content,\n );\n}\n\n/**\n * A high-level API to associate a generated position with an original source position. Line is\n * 1-based, but column is 0-based, due to legacy behavior in `source-map` library.\n */\nexport function addMapping(\n map: GenMapping,\n mapping: {\n generated: Pos;\n source?: null;\n original?: null;\n name?: null;\n content?: null;\n },\n): void;\nexport function addMapping(\n map: GenMapping,\n mapping: {\n generated: Pos;\n source: string;\n original: Pos;\n name?: null;\n content?: string | null;\n },\n): void;\nexport function addMapping(\n map: GenMapping,\n mapping: {\n generated: Pos;\n source: string;\n original: Pos;\n name: string;\n content?: string | null;\n },\n): void;\nexport function addMapping(\n map: GenMapping,\n mapping: {\n generated: Pos;\n source?: string | null;\n original?: Pos | null;\n name?: string | null;\n content?: string | null;\n },\n): void {\n return addMappingInternal(false, map, mapping as Parameters[2]);\n}\n\n/**\n * Same as `addSegment`, but will only add the segment if it generates useful information in the\n * resulting map. This only works correctly if segments are added **in order**, meaning you should\n * not add a segment with a lower generated line/column than one that came before.\n */\nexport const maybeAddSegment: typeof addSegment = (\n map,\n genLine,\n genColumn,\n source,\n sourceLine,\n sourceColumn,\n name,\n content,\n) => {\n return addSegmentInternal(\n true,\n map,\n genLine,\n genColumn,\n source,\n sourceLine,\n sourceColumn,\n name,\n content,\n );\n};\n\n/**\n * Same as `addMapping`, but will only add the mapping if it generates useful information in the\n * resulting map. This only works correctly if mappings are added **in order**, meaning you should\n * not add a mapping with a lower generated line/column than one that came before.\n */\nexport const maybeAddMapping: typeof addMapping = (map, mapping) => {\n return addMappingInternal(true, map, mapping as Parameters[2]);\n};\n\n/**\n * Adds/removes the content of the source file to the source map.\n */\nexport function setSourceContent(map: GenMapping, source: string, content: string | null): void {\n const { _sources: sources, _sourcesContent: sourcesContent } = cast(map);\n const index = put(sources, source);\n sourcesContent[index] = content;\n}\n\nexport function setIgnore(map: GenMapping, source: string, ignore = true) {\n const { _sources: sources, _sourcesContent: sourcesContent, _ignoreList: ignoreList } = cast(map);\n const index = put(sources, source);\n if (index === sourcesContent.length) sourcesContent[index] = null;\n if (ignore) put(ignoreList, index);\n else remove(ignoreList, index);\n}\n\n/**\n * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nexport function toDecodedMap(map: GenMapping): DecodedSourceMap {\n const {\n _mappings: mappings,\n _sources: sources,\n _sourcesContent: sourcesContent,\n _names: names,\n _ignoreList: ignoreList,\n } = cast(map);\n removeEmptyFinalLines(mappings);\n\n return {\n version: 3,\n file: map.file || undefined,\n names: names.array,\n sourceRoot: map.sourceRoot || undefined,\n sources: sources.array,\n sourcesContent,\n mappings,\n ignoreList: ignoreList.array,\n };\n}\n\n/**\n * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nexport function toEncodedMap(map: GenMapping): EncodedSourceMap {\n const decoded = toDecodedMap(map);\n return {\n ...decoded,\n mappings: encode(decoded.mappings as SourceMapSegment[][]),\n };\n}\n\n/**\n * Constructs a new GenMapping, using the already present mappings of the input.\n */\nexport function fromMap(input: SourceMapInput): GenMapping {\n const map = new TraceMap(input);\n const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot });\n\n putAll(cast(gen)._names, map.names);\n putAll(cast(gen)._sources, map.sources as string[]);\n cast(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null);\n cast(gen)._mappings = decodedMappings(map) as GenMapping['_mappings'];\n if (map.ignoreList) putAll(cast(gen)._ignoreList, map.ignoreList);\n\n return gen;\n}\n\n/**\n * Returns an array of high-level mapping objects for every recorded segment, which could then be\n * passed to the `source-map` library.\n */\nexport function allMappings(map: GenMapping): Mapping[] {\n const out: Mapping[] = [];\n const { _mappings: mappings, _sources: sources, _names: names } = cast(map);\n\n for (let i = 0; i < mappings.length; i++) {\n const line = mappings[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n\n const generated = { line: i + 1, column: seg[COLUMN] };\n let source: string | undefined = undefined;\n let original: Pos | undefined = undefined;\n let name: string | undefined = undefined;\n\n if (seg.length !== 1) {\n source = sources.array[seg[SOURCES_INDEX]];\n original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] };\n\n if (seg.length === 5) name = names.array[seg[NAMES_INDEX]];\n }\n\n out.push({ generated, source, original, name } as Mapping);\n }\n }\n\n return out;\n}\n\n// This split declaration is only so that terser can elminiate the static initialization block.\nfunction addSegmentInternal(\n skipable: boolean,\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source: S,\n sourceLine: S extends string ? number : null | undefined,\n sourceColumn: S extends string ? number : null | undefined,\n name: S extends string ? string | null | undefined : null | undefined,\n content: S extends string ? string | null | undefined : null | undefined,\n): void {\n const {\n _mappings: mappings,\n _sources: sources,\n _sourcesContent: sourcesContent,\n _names: names,\n } = cast(map);\n const line = getLine(mappings, genLine);\n const index = getColumnIndex(line, genColumn);\n\n if (!source) {\n if (skipable && skipSourceless(line, index)) return;\n return insert(line, index, [genColumn]);\n }\n\n // Sigh, TypeScript can't figure out sourceLine and sourceColumn aren't nullish if source\n // isn't nullish.\n assert(sourceLine);\n assert(sourceColumn);\n\n const sourcesIndex = put(sources, source);\n const namesIndex = name ? put(names, name) : NO_NAME;\n if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content ?? null;\n\n if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) {\n return;\n }\n\n return insert(\n line,\n index,\n name\n ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]\n : [genColumn, sourcesIndex, sourceLine, sourceColumn],\n );\n}\n\nfunction assert(_val: unknown): asserts _val is T {\n // noop.\n}\n\nfunction getLine(mappings: SourceMapSegment[][], index: number): SourceMapSegment[] {\n for (let i = mappings.length; i <= index; i++) {\n mappings[i] = [];\n }\n return mappings[index];\n}\n\nfunction getColumnIndex(line: SourceMapSegment[], genColumn: number): number {\n let index = line.length;\n for (let i = index - 1; i >= 0; index = i--) {\n const current = line[i];\n if (genColumn >= current[COLUMN]) break;\n }\n return index;\n}\n\nfunction insert(array: T[], index: number, value: T) {\n for (let i = array.length; i > index; i--) {\n array[i] = array[i - 1];\n }\n array[index] = value;\n}\n\nfunction removeEmptyFinalLines(mappings: SourceMapSegment[][]) {\n const { length } = mappings;\n let len = length;\n for (let i = len - 1; i >= 0; len = i, i--) {\n if (mappings[i].length > 0) break;\n }\n if (len < length) mappings.length = len;\n}\n\nfunction putAll(setarr: SetArray, array: T[]) {\n for (let i = 0; i < array.length; i++) put(setarr, array[i]);\n}\n\nfunction skipSourceless(line: SourceMapSegment[], index: number): boolean {\n // The start of a line is already sourceless, so adding a sourceless segment to the beginning\n // doesn't generate any useful information.\n if (index === 0) return true;\n\n const prev = line[index - 1];\n // If the previous segment is also sourceless, then adding another sourceless segment doesn't\n // genrate any new information. Else, this segment will end the source/named segment and point to\n // a sourceless position, which is useful.\n return prev.length === 1;\n}\n\nfunction skipSource(\n line: SourceMapSegment[],\n index: number,\n sourcesIndex: number,\n sourceLine: number,\n sourceColumn: number,\n namesIndex: number,\n): boolean {\n // A source/named segment at the start of a line gives position at that genColumn\n if (index === 0) return false;\n\n const prev = line[index - 1];\n\n // If the previous segment is sourceless, then we're transitioning to a source.\n if (prev.length === 1) return false;\n\n // If the previous segment maps to the exact same source position, then this segment doesn't\n // provide any new position information.\n return (\n sourcesIndex === prev[SOURCES_INDEX] &&\n sourceLine === prev[SOURCE_LINE] &&\n sourceColumn === prev[SOURCE_COLUMN] &&\n namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME)\n );\n}\n\nfunction addMappingInternal(\n skipable: boolean,\n map: GenMapping,\n mapping: {\n generated: Pos;\n source: S;\n original: S extends string ? Pos : null | undefined;\n name: S extends string ? string | null | undefined : null | undefined;\n content: S extends string ? string | null | undefined : null | undefined;\n },\n) {\n const { generated, source, original, name, content } = mapping;\n if (!source) {\n return addSegmentInternal(\n skipable,\n map,\n generated.line - 1,\n generated.column,\n null,\n null,\n null,\n null,\n null,\n );\n }\n assert(original);\n return addSegmentInternal(\n skipable,\n map,\n generated.line - 1,\n generated.column,\n source as string,\n original.line - 1,\n original.column,\n name,\n content,\n );\n}\n"],"names":["SetArray","put","remove","encode","TraceMap","decodedMappings"],"mappings":";;;;;;IAWO,MAAM,MAAM,GAAG,CAAC,CAAC;IACjB,MAAM,aAAa,GAAG,CAAC,CAAC;IACxB,MAAM,WAAW,GAAG,CAAC,CAAC;IACtB,MAAM,aAAa,GAAG,CAAC,CAAC;IACxB,MAAM,WAAW,GAAG,CAAC;;ICQ5B,MAAM,OAAO,GAAG,CAAC,CAAC,CAAC;IAEnB;;IAEG;UACU,UAAU,CAAA;IASrB,IAAA,WAAA,CAA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AK,CAAC;IAAE,QAAA,OAAO,KAAK,CAAC;QAE9B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;;IAG7B,IAAA,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;IAAE,QAAA,OAAO,KAAK,CAAC;;;IAIpC,IAAA,QACE,YAAY,KAAK,IAAI,CAAC,aAAa,CAAC;IACpC,QAAA,UAAU,KAAK,IAAI,CAAC,WAAW,CAAC;IAChC,QAAA,YAAY,KAAK,IAAI,CAAC,aAAa,CAAC;YACpC,UAAU,MAAM,IAAI,CAAC,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,EAChE;IACJ,CAAC;IAED,SAAS,kBAAkB,CACzB,QAAiB,EACjB,GAAe,EACf,OAMC,EAAA;IAED,IAAA,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;QAC/D,IAAI,CAAC,MAAM,EAAE;YACX,OAAO,kBAAkB,CACvB,QAAQ,EACR,GAAG,EACH,SAAS,CAAC,IAAI,GAAG,CAAC,EAClB,SAAS,CAAC,MAAM,EAChB,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,CACL,CAAC;IACH,KAAA;IAED,IAAA,OAAO,kBAAkB,CACvB,QAAQ,EACR,GAAG,EACH,SAAS,CAAC,IAAI,GAAG,CAAC,EAClB,SAAS,CAAC,MAAM,EAChB,MAAgB,EAChB,QAAQ,CAAC,IAAI,GAAG,CAAC,EACjB,QAAQ,CAAC,MAAM,EACf,IAAI,EACJ,OAAO,CACR,CAAC;IACJ;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts b/node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts new file mode 100644 index 0000000..398a695 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts @@ -0,0 +1,88 @@ +import type { SourceMapInput } from '@jridgewell/trace-mapping'; +import type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types'; +export type { DecodedSourceMap, EncodedSourceMap, Mapping }; +export declare type Options = { + file?: string | null; + sourceRoot?: string | null; +}; +/** + * Provides the state to generate a sourcemap. + */ +export declare class GenMapping { + private _names; + private _sources; + private _sourcesContent; + private _mappings; + private _ignoreList; + file: string | null | undefined; + sourceRoot: string | null | undefined; + constructor({ file, sourceRoot }?: Options); +} +/** + * A low-level API to associate a generated position with an original source position. Line and + * column here are 0-based, unlike `addMapping`. + */ +export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source?: null, sourceLine?: null, sourceColumn?: null, name?: null, content?: null): void; +export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name?: null, content?: string | null): void; +export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name: string, content?: string | null): void; +/** + * A high-level API to associate a generated position with an original source position. Line is + * 1-based, but column is 0-based, due to legacy behavior in `source-map` library. + */ +export declare function addMapping(map: GenMapping, mapping: { + generated: Pos; + source?: null; + original?: null; + name?: null; + content?: null; +}): void; +export declare function addMapping(map: GenMapping, mapping: { + generated: Pos; + source: string; + original: Pos; + name?: null; + content?: string | null; +}): void; +export declare function addMapping(map: GenMapping, mapping: { + generated: Pos; + source: string; + original: Pos; + name: string; + content?: string | null; +}): void; +/** + * Same as `addSegment`, but will only add the segment if it generates useful information in the + * resulting map. This only works correctly if segments are added **in order**, meaning you should + * not add a segment with a lower generated line/column than one that came before. + */ +export declare const maybeAddSegment: typeof addSegment; +/** + * Same as `addMapping`, but will only add the mapping if it generates useful information in the + * resulting map. This only works correctly if mappings are added **in order**, meaning you should + * not add a mapping with a lower generated line/column than one that came before. + */ +export declare const maybeAddMapping: typeof addMapping; +/** + * Adds/removes the content of the source file to the source map. + */ +export declare function setSourceContent(map: GenMapping, source: string, content: string | null): void; +export declare function setIgnore(map: GenMapping, source: string, ignore?: boolean): void; +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare function toDecodedMap(map: GenMapping): DecodedSourceMap; +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare function toEncodedMap(map: GenMapping): EncodedSourceMap; +/** + * Constructs a new GenMapping, using the already present mappings of the input. + */ +export declare function fromMap(input: SourceMapInput): GenMapping; +/** + * Returns an array of high-level mapping objects for every recorded segment, which could then be + * passed to the `source-map` library. + */ +export declare function allMappings(map: GenMapping): Mapping[]; diff --git a/node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts b/node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts new file mode 100644 index 0000000..e187ba9 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts @@ -0,0 +1,12 @@ +declare type GeneratedColumn = number; +declare type SourcesIndex = number; +declare type SourceLine = number; +declare type SourceColumn = number; +declare type NamesIndex = number; +export declare type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; +export declare const COLUMN = 0; +export declare const SOURCES_INDEX = 1; +export declare const SOURCE_LINE = 2; +export declare const SOURCE_COLUMN = 3; +export declare const NAMES_INDEX = 4; +export {}; diff --git a/node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts b/node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts new file mode 100644 index 0000000..7f0ab15 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts @@ -0,0 +1,36 @@ +import type { SourceMapSegment } from './sourcemap-segment'; +export interface SourceMapV3 { + file?: string | null; + names: readonly string[]; + sourceRoot?: string; + sources: readonly (string | null)[]; + sourcesContent?: readonly (string | null)[]; + version: 3; + ignoreList?: readonly number[]; +} +export interface EncodedSourceMap extends SourceMapV3 { + mappings: string; +} +export interface DecodedSourceMap extends SourceMapV3 { + mappings: readonly SourceMapSegment[][]; +} +export interface Pos { + line: number; + column: number; +} +export declare type Mapping = { + generated: Pos; + source: undefined; + original: undefined; + name: undefined; +} | { + generated: Pos; + source: string; + original: Pos; + name: string; +} | { + generated: Pos; + source: string; + original: Pos; + name: undefined; +}; diff --git a/node_modules/@jridgewell/gen-mapping/package.json b/node_modules/@jridgewell/gen-mapping/package.json new file mode 100644 index 0000000..9b8f0bb --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/package.json @@ -0,0 +1,76 @@ +{ + "name": "@jridgewell/gen-mapping", + "version": "0.3.8", + "description": "Generate source maps", + "keywords": [ + "source", + "map" + ], + "author": "Justin Ridgewell ", + "license": "MIT", + "repository": "https://github.com/jridgewell/gen-mapping", + "main": "dist/gen-mapping.umd.js", + "module": "dist/gen-mapping.mjs", + "types": "dist/types/gen-mapping.d.ts", + "exports": { + ".": [ + { + "types": "./dist/types/gen-mapping.d.ts", + "browser": "./dist/gen-mapping.umd.js", + "require": "./dist/gen-mapping.umd.js", + "import": "./dist/gen-mapping.mjs" + }, + "./dist/gen-mapping.umd.js" + ], + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "engines": { + "node": ">=6.0.0" + }, + "scripts": { + "benchmark": "run-s build:rollup benchmark:*", + "benchmark:install": "cd benchmark && npm install", + "benchmark:only": "node benchmark/index.mjs", + "prebuild": "rm -rf dist", + "build": "run-s -n build:*", + "build:rollup": "rollup -c rollup.config.js", + "build:ts": "tsc --project tsconfig.build.json", + "lint": "run-s -n lint:*", + "lint:prettier": "npm run test:lint:prettier -- --write", + "lint:ts": "npm run test:lint:ts -- --fix", + "test": "run-s -n test:lint test:only", + "test:debug": "mocha --inspect-brk", + "test:lint": "run-s -n test:lint:*", + "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", + "test:lint:ts": "eslint '{src,test}/**/*.ts'", + "test:only": "c8 mocha", + "test:watch": "mocha --watch", + "prepublishOnly": "npm run preversion", + "preversion": "run-s test build" + }, + "devDependencies": { + "@rollup/plugin-typescript": "8.3.2", + "@types/mocha": "9.1.1", + "@types/node": "17.0.29", + "@typescript-eslint/eslint-plugin": "5.21.0", + "@typescript-eslint/parser": "5.21.0", + "benchmark": "2.1.4", + "c8": "7.11.2", + "eslint": "8.14.0", + "eslint-config-prettier": "8.5.0", + "mocha": "9.2.2", + "npm-run-all": "4.1.5", + "prettier": "2.6.2", + "rollup": "2.70.2", + "tsx": "4.7.1", + "typescript": "4.6.3" + }, + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + } +} diff --git a/node_modules/@jridgewell/resolve-uri/LICENSE b/node_modules/@jridgewell/resolve-uri/LICENSE new file mode 100644 index 0000000..0a81b2a --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/LICENSE @@ -0,0 +1,19 @@ +Copyright 2019 Justin Ridgewell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/README.md b/node_modules/@jridgewell/resolve-uri/README.md new file mode 100644 index 0000000..2fe70df --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/README.md @@ -0,0 +1,40 @@ +# @jridgewell/resolve-uri + +> Resolve a URI relative to an optional base URI + +Resolve any combination of absolute URIs, protocol-realtive URIs, absolute paths, or relative paths. + +## Installation + +```sh +npm install @jridgewell/resolve-uri +``` + +## Usage + +```typescript +function resolve(input: string, base?: string): string; +``` + +```js +import resolve from '@jridgewell/resolve-uri'; + +resolve('foo', 'https://example.com'); // => 'https://example.com/foo' +``` + +| Input | Base | Resolution | Explanation | +|-----------------------|-------------------------|--------------------------------|--------------------------------------------------------------| +| `https://example.com` | _any_ | `https://example.com/` | Input is normalized only | +| `//example.com` | `https://base.com/` | `https://example.com/` | Input inherits the base's protocol | +| `//example.com` | _rest_ | `//example.com/` | Input is normalized only | +| `/example` | `https://base.com/` | `https://base.com/example` | Input inherits the base's origin | +| `/example` | `//base.com/` | `//base.com/example` | Input inherits the base's host and remains protocol relative | +| `/example` | _rest_ | `/example` | Input is normalized only | +| `example` | `https://base.com/dir/` | `https://base.com/dir/example` | Input is joined with the base | +| `example` | `https://base.com/file` | `https://base.com/example` | Input is joined with the base without its file | +| `example` | `//base.com/dir/` | `//base.com/dir/example` | Input is joined with the base's last directory | +| `example` | `//base.com/file` | `//base.com/example` | Input is joined with the base without its file | +| `example` | `/base/dir/` | `/base/dir/example` | Input is joined with the base's last directory | +| `example` | `/base/file` | `/base/example` | Input is joined with the base without its file | +| `example` | `base/dir/` | `base/dir/example` | Input is joined with the base's last directory | +| `example` | `base/file` | `base/example` | Input is joined with the base without its file | diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs new file mode 100644 index 0000000..e958e88 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs @@ -0,0 +1,232 @@ +// Matches the scheme of a URL, eg "http://" +const schemeRegex = /^[\w+.-]+:\/\//; +/** + * Matches the parts of a URL: + * 1. Scheme, including ":", guaranteed. + * 2. User/password, including "@", optional. + * 3. Host, guaranteed. + * 4. Port, including ":", optional. + * 5. Path, including "/", optional. + * 6. Query, including "?", optional. + * 7. Hash, including "#", optional. + */ +const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; +/** + * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start + * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive). + * + * 1. Host, optional. + * 2. Path, which may include "/", guaranteed. + * 3. Query, including "?", optional. + * 4. Hash, including "#", optional. + */ +const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; +function isAbsoluteUrl(input) { + return schemeRegex.test(input); +} +function isSchemeRelativeUrl(input) { + return input.startsWith('//'); +} +function isAbsolutePath(input) { + return input.startsWith('/'); +} +function isFileUrl(input) { + return input.startsWith('file:'); +} +function isRelative(input) { + return /^[.?#]/.test(input); +} +function parseAbsoluteUrl(input) { + const match = urlRegex.exec(input); + return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); +} +function parseFileUrl(input) { + const match = fileRegex.exec(input); + const path = match[2]; + return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); +} +function makeUrl(scheme, user, host, port, path, query, hash) { + return { + scheme, + user, + host, + port, + path, + query, + hash, + type: 7 /* Absolute */, + }; +} +function parseUrl(input) { + if (isSchemeRelativeUrl(input)) { + const url = parseAbsoluteUrl('http:' + input); + url.scheme = ''; + url.type = 6 /* SchemeRelative */; + return url; + } + if (isAbsolutePath(input)) { + const url = parseAbsoluteUrl('http://foo.com' + input); + url.scheme = ''; + url.host = ''; + url.type = 5 /* AbsolutePath */; + return url; + } + if (isFileUrl(input)) + return parseFileUrl(input); + if (isAbsoluteUrl(input)) + return parseAbsoluteUrl(input); + const url = parseAbsoluteUrl('http://foo.com/' + input); + url.scheme = ''; + url.host = ''; + url.type = input + ? input.startsWith('?') + ? 3 /* Query */ + : input.startsWith('#') + ? 2 /* Hash */ + : 4 /* RelativePath */ + : 1 /* Empty */; + return url; +} +function stripPathFilename(path) { + // If a path ends with a parent directory "..", then it's a relative path with excess parent + // paths. It's not a file, so we can't strip it. + if (path.endsWith('/..')) + return path; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); +} +function mergePaths(url, base) { + normalizePath(base, base.type); + // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative + // path). + if (url.path === '/') { + url.path = base.path; + } + else { + // Resolution happens relative to the base path's directory, not the file. + url.path = stripPathFilename(base.path) + url.path; + } +} +/** + * The path can have empty directories "//", unneeded parents "foo/..", or current directory + * "foo/.". We need to normalize to a standard representation. + */ +function normalizePath(url, type) { + const rel = type <= 4 /* RelativePath */; + const pieces = url.path.split('/'); + // We need to preserve the first piece always, so that we output a leading slash. The item at + // pieces[0] is an empty string. + let pointer = 1; + // Positive is the number of real directories we've output, used for popping a parent directory. + // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". + let positive = 0; + // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will + // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a + // real directory, we won't need to append, unless the other conditions happen again. + let addTrailingSlash = false; + for (let i = 1; i < pieces.length; i++) { + const piece = pieces[i]; + // An empty directory, could be a trailing slash, or just a double "//" in the path. + if (!piece) { + addTrailingSlash = true; + continue; + } + // If we encounter a real directory, then we don't need to append anymore. + addTrailingSlash = false; + // A current directory, which we can always drop. + if (piece === '.') + continue; + // A parent directory, we need to see if there are any real directories we can pop. Else, we + // have an excess of parents, and we'll need to keep the "..". + if (piece === '..') { + if (positive) { + addTrailingSlash = true; + positive--; + pointer--; + } + else if (rel) { + // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute + // URL, protocol relative URL, or an absolute path, we don't need to keep excess. + pieces[pointer++] = piece; + } + continue; + } + // We've encountered a real directory. Move it to the next insertion pointer, which accounts for + // any popped or dropped directories. + pieces[pointer++] = piece; + positive++; + } + let path = ''; + for (let i = 1; i < pointer; i++) { + path += '/' + pieces[i]; + } + if (!path || (addTrailingSlash && !path.endsWith('/..'))) { + path += '/'; + } + url.path = path; +} +/** + * Attempts to resolve `input` URL/path relative to `base`. + */ +function resolve(input, base) { + if (!input && !base) + return ''; + const url = parseUrl(input); + let inputType = url.type; + if (base && inputType !== 7 /* Absolute */) { + const baseUrl = parseUrl(base); + const baseType = baseUrl.type; + switch (inputType) { + case 1 /* Empty */: + url.hash = baseUrl.hash; + // fall through + case 2 /* Hash */: + url.query = baseUrl.query; + // fall through + case 3 /* Query */: + case 4 /* RelativePath */: + mergePaths(url, baseUrl); + // fall through + case 5 /* AbsolutePath */: + // The host, user, and port are joined, you can't copy one without the others. + url.user = baseUrl.user; + url.host = baseUrl.host; + url.port = baseUrl.port; + // fall through + case 6 /* SchemeRelative */: + // The input doesn't have a schema at least, so we need to copy at least that over. + url.scheme = baseUrl.scheme; + } + if (baseType > inputType) + inputType = baseType; + } + normalizePath(url, inputType); + const queryHash = url.query + url.hash; + switch (inputType) { + // This is impossible, because of the empty checks at the start of the function. + // case UrlType.Empty: + case 2 /* Hash */: + case 3 /* Query */: + return queryHash; + case 4 /* RelativePath */: { + // The first char is always a "/", and we need it to be relative. + const path = url.path.slice(1); + if (!path) + return queryHash || '.'; + if (isRelative(base || input) && !isRelative(path)) { + // If base started with a leading ".", or there is no base and input started with a ".", + // then we need to ensure that the relative path starts with a ".". We don't know if + // relative starts with a "..", though, so check before prepending. + return './' + path + queryHash; + } + return path + queryHash; + } + case 5 /* AbsolutePath */: + return url.path + queryHash; + default: + return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; + } +} + +export { resolve as default }; +//# sourceMappingURL=resolve-uri.mjs.map diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map new file mode 100644 index 0000000..1de97d0 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"resolve-uri.mjs","sources":["../src/resolve-uri.ts"],"sourcesContent":["// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n\n/**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\nconst fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n\ntype Url = {\n scheme: string;\n user: string;\n host: string;\n port: string;\n path: string;\n query: string;\n hash: string;\n type: UrlType;\n};\n\nconst enum UrlType {\n Empty = 1,\n Hash = 2,\n Query = 3,\n RelativePath = 4,\n AbsolutePath = 5,\n SchemeRelative = 6,\n Absolute = 7,\n}\n\nfunction isAbsoluteUrl(input: string): boolean {\n return schemeRegex.test(input);\n}\n\nfunction isSchemeRelativeUrl(input: string): boolean {\n return input.startsWith('//');\n}\n\nfunction isAbsolutePath(input: string): boolean {\n return input.startsWith('/');\n}\n\nfunction isFileUrl(input: string): boolean {\n return input.startsWith('file:');\n}\n\nfunction isRelative(input: string): boolean {\n return /^[.?#]/.test(input);\n}\n\nfunction parseAbsoluteUrl(input: string): Url {\n const match = urlRegex.exec(input)!;\n return makeUrl(\n match[1],\n match[2] || '',\n match[3],\n match[4] || '',\n match[5] || '/',\n match[6] || '',\n match[7] || '',\n );\n}\n\nfunction parseFileUrl(input: string): Url {\n const match = fileRegex.exec(input)!;\n const path = match[2];\n return makeUrl(\n 'file:',\n '',\n match[1] || '',\n '',\n isAbsolutePath(path) ? path : '/' + path,\n match[3] || '',\n match[4] || '',\n );\n}\n\nfunction makeUrl(\n scheme: string,\n user: string,\n host: string,\n port: string,\n path: string,\n query: string,\n hash: string,\n): Url {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: UrlType.Absolute,\n };\n}\n\nfunction parseUrl(input: string): Url {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = UrlType.SchemeRelative;\n return url;\n }\n\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = UrlType.AbsolutePath;\n return url;\n }\n\n if (isFileUrl(input)) return parseFileUrl(input);\n\n if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);\n\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? UrlType.Query\n : input.startsWith('#')\n ? UrlType.Hash\n : UrlType.RelativePath\n : UrlType.Empty;\n return url;\n}\n\nfunction stripPathFilename(path: string): string {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..')) return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n\nfunction mergePaths(url: Url, base: Url) {\n normalizePath(base, base.type);\n\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n } else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n}\n\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url: Url, type: UrlType) {\n const rel = type <= UrlType.RelativePath;\n const pieces = url.path.split('/');\n\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n\n // A current directory, which we can always drop.\n if (piece === '.') continue;\n\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n } else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n}\n\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nexport default function resolve(input: string, base: string | undefined): string {\n if (!input && !base) return '';\n\n const url = parseUrl(input);\n let inputType = url.type;\n\n if (base && inputType !== UrlType.Absolute) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n\n switch (inputType) {\n case UrlType.Empty:\n url.hash = baseUrl.hash;\n // fall through\n\n case UrlType.Hash:\n url.query = baseUrl.query;\n // fall through\n\n case UrlType.Query:\n case UrlType.RelativePath:\n mergePaths(url, baseUrl);\n // fall through\n\n case UrlType.AbsolutePath:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n\n case UrlType.SchemeRelative:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType) inputType = baseType;\n }\n\n normalizePath(url, inputType);\n\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n\n case UrlType.Hash:\n case UrlType.Query:\n return queryHash;\n\n case UrlType.RelativePath: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n\n if (!path) return queryHash || '.';\n\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n\n return path + queryHash;\n }\n\n case UrlType.AbsolutePath:\n return url.path + queryHash;\n\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n}\n"],"names":[],"mappings":"AAAA;AACA,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAErC;;;;;;;;;;AAUA,MAAM,QAAQ,GAAG,0EAA0E,CAAC;AAE5F;;;;;;;;;AASA,MAAM,SAAS,GAAG,iEAAiE,CAAC;A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/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js new file mode 100644 index 0000000..a783049 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js @@ -0,0 +1,240 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.resolveURI = factory()); +})(this, (function () { 'use strict'; + + // Matches the scheme of a URL, eg "http://" + const schemeRegex = /^[\w+.-]+:\/\//; + /** + * Matches the parts of a URL: + * 1. Scheme, including ":", guaranteed. + * 2. User/password, including "@", optional. + * 3. Host, guaranteed. + * 4. Port, including ":", optional. + * 5. Path, including "/", optional. + * 6. Query, including "?", optional. + * 7. Hash, including "#", optional. + */ + const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; + /** + * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start + * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive). + * + * 1. Host, optional. + * 2. Path, which may include "/", guaranteed. + * 3. Query, including "?", optional. + * 4. Hash, including "#", optional. + */ + const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; + function isAbsoluteUrl(input) { + return schemeRegex.test(input); + } + function isSchemeRelativeUrl(input) { + return input.startsWith('//'); + } + function isAbsolutePath(input) { + return input.startsWith('/'); + } + function isFileUrl(input) { + return input.startsWith('file:'); + } + function isRelative(input) { + return /^[.?#]/.test(input); + } + function parseAbsoluteUrl(input) { + const match = urlRegex.exec(input); + return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); + } + function parseFileUrl(input) { + const match = fileRegex.exec(input); + const path = match[2]; + return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); + } + function makeUrl(scheme, user, host, port, path, query, hash) { + return { + scheme, + user, + host, + port, + path, + query, + hash, + type: 7 /* Absolute */, + }; + } + function parseUrl(input) { + if (isSchemeRelativeUrl(input)) { + const url = parseAbsoluteUrl('http:' + input); + url.scheme = ''; + url.type = 6 /* SchemeRelative */; + return url; + } + if (isAbsolutePath(input)) { + const url = parseAbsoluteUrl('http://foo.com' + input); + url.scheme = ''; + url.host = ''; + url.type = 5 /* AbsolutePath */; + return url; + } + if (isFileUrl(input)) + return parseFileUrl(input); + if (isAbsoluteUrl(input)) + return parseAbsoluteUrl(input); + const url = parseAbsoluteUrl('http://foo.com/' + input); + url.scheme = ''; + url.host = ''; + url.type = input + ? input.startsWith('?') + ? 3 /* Query */ + : input.startsWith('#') + ? 2 /* Hash */ + : 4 /* RelativePath */ + : 1 /* Empty */; + return url; + } + function stripPathFilename(path) { + // If a path ends with a parent directory "..", then it's a relative path with excess parent + // paths. It's not a file, so we can't strip it. + if (path.endsWith('/..')) + return path; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); + } + function mergePaths(url, base) { + normalizePath(base, base.type); + // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative + // path). + if (url.path === '/') { + url.path = base.path; + } + else { + // Resolution happens relative to the base path's directory, not the file. + url.path = stripPathFilename(base.path) + url.path; + } + } + /** + * The path can have empty directories "//", unneeded parents "foo/..", or current directory + * "foo/.". We need to normalize to a standard representation. + */ + function normalizePath(url, type) { + const rel = type <= 4 /* RelativePath */; + const pieces = url.path.split('/'); + // We need to preserve the first piece always, so that we output a leading slash. The item at + // pieces[0] is an empty string. + let pointer = 1; + // Positive is the number of real directories we've output, used for popping a parent directory. + // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". + let positive = 0; + // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will + // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a + // real directory, we won't need to append, unless the other conditions happen again. + let addTrailingSlash = false; + for (let i = 1; i < pieces.length; i++) { + const piece = pieces[i]; + // An empty directory, could be a trailing slash, or just a double "//" in the path. + if (!piece) { + addTrailingSlash = true; + continue; + } + // If we encounter a real directory, then we don't need to append anymore. + addTrailingSlash = false; + // A current directory, which we can always drop. + if (piece === '.') + continue; + // A parent directory, we need to see if there are any real directories we can pop. Else, we + // have an excess of parents, and we'll need to keep the "..". + if (piece === '..') { + if (positive) { + addTrailingSlash = true; + positive--; + pointer--; + } + else if (rel) { + // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute + // URL, protocol relative URL, or an absolute path, we don't need to keep excess. + pieces[pointer++] = piece; + } + continue; + } + // We've encountered a real directory. Move it to the next insertion pointer, which accounts for + // any popped or dropped directories. + pieces[pointer++] = piece; + positive++; + } + let path = ''; + for (let i = 1; i < pointer; i++) { + path += '/' + pieces[i]; + } + if (!path || (addTrailingSlash && !path.endsWith('/..'))) { + path += '/'; + } + url.path = path; + } + /** + * Attempts to resolve `input` URL/path relative to `base`. + */ + function resolve(input, base) { + if (!input && !base) + return ''; + const url = parseUrl(input); + let inputType = url.type; + if (base && inputType !== 7 /* Absolute */) { + const baseUrl = parseUrl(base); + const baseType = baseUrl.type; + switch (inputType) { + case 1 /* Empty */: + url.hash = baseUrl.hash; + // fall through + case 2 /* Hash */: + url.query = baseUrl.query; + // fall through + case 3 /* Query */: + case 4 /* RelativePath */: + mergePaths(url, baseUrl); + // fall through + case 5 /* AbsolutePath */: + // The host, user, and port are joined, you can't copy one without the others. + url.user = baseUrl.user; + url.host = baseUrl.host; + url.port = baseUrl.port; + // fall through + case 6 /* SchemeRelative */: + // The input doesn't have a schema at least, so we need to copy at least that over. + url.scheme = baseUrl.scheme; + } + if (baseType > inputType) + inputType = baseType; + } + normalizePath(url, inputType); + const queryHash = url.query + url.hash; + switch (inputType) { + // This is impossible, because of the empty checks at the start of the function. + // case UrlType.Empty: + case 2 /* Hash */: + case 3 /* Query */: + return queryHash; + case 4 /* RelativePath */: { + // The first char is always a "/", and we need it to be relative. + const path = url.path.slice(1); + if (!path) + return queryHash || '.'; + if (isRelative(base || input) && !isRelative(path)) { + // If base started with a leading ".", or there is no base and input started with a ".", + // then we need to ensure that the relative path starts with a ".". We don't know if + // relative starts with a "..", though, so check before prepending. + return './' + path + queryHash; + } + return path + queryHash; + } + case 5 /* AbsolutePath */: + return url.path + queryHash; + default: + return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; + } + } + + return resolve; + +})); +//# sourceMappingURL=resolve-uri.umd.js.map diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map new file mode 100644 index 0000000..70a37f2 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"resolve-uri.umd.js","sources":["../src/resolve-uri.ts"],"sourcesContent":["// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n\n/**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\nconst fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n\ntype Url = {\n scheme: string;\n user: string;\n host: string;\n port: string;\n path: string;\n query: string;\n hash: string;\n type: UrlType;\n};\n\nconst enum UrlType {\n Empty = 1,\n Hash = 2,\n Query = 3,\n RelativePath = 4,\n AbsolutePath = 5,\n SchemeRelative = 6,\n Absolute = 7,\n}\n\nfunction isAbsoluteUrl(input: string): boolean {\n return schemeRegex.test(input);\n}\n\nfunction isSchemeRelativeUrl(input: string): boolean {\n return input.startsWith('//');\n}\n\nfunction isAbsolutePath(input: string): boolean {\n return input.startsWith('/');\n}\n\nfunction isFileUrl(input: string): boolean {\n return input.startsWith('file:');\n}\n\nfunction isRelative(input: string): boolean {\n return /^[.?#]/.test(input);\n}\n\nfunction parseAbsoluteUrl(input: string): Url {\n const match = urlRegex.exec(input)!;\n return makeUrl(\n match[1],\n match[2] || '',\n match[3],\n match[4] || '',\n match[5] || '/',\n match[6] || '',\n match[7] || '',\n );\n}\n\nfunction parseFileUrl(input: string): Url {\n const match = fileRegex.exec(input)!;\n const path = match[2];\n return makeUrl(\n 'file:',\n '',\n match[1] || '',\n '',\n isAbsolutePath(path) ? path : '/' + path,\n match[3] || '',\n match[4] || '',\n );\n}\n\nfunction makeUrl(\n scheme: string,\n user: string,\n host: string,\n port: string,\n path: string,\n query: string,\n hash: string,\n): Url {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: UrlType.Absolute,\n };\n}\n\nfunction parseUrl(input: string): Url {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = UrlType.SchemeRelative;\n return url;\n }\n\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = UrlType.AbsolutePath;\n return url;\n }\n\n if (isFileUrl(input)) return parseFileUrl(input);\n\n if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);\n\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? UrlType.Query\n : input.startsWith('#')\n ? UrlType.Hash\n : UrlType.RelativePath\n : UrlType.Empty;\n return url;\n}\n\nfunction stripPathFilename(path: string): string {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..')) return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n\nfunction mergePaths(url: Url, base: Url) {\n normalizePath(base, base.type);\n\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n } else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n}\n\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url: Url, type: UrlType) {\n const rel = type <= UrlType.RelativePath;\n const pieces = url.path.split('/');\n\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n\n // A current directory, which we can always drop.\n if (piece === '.') continue;\n\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n } else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n}\n\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nexport default function resolve(input: string, base: string | undefined): string {\n if (!input && !base) return '';\n\n const url = parseUrl(input);\n let inputType = url.type;\n\n if (base && inputType !== UrlType.Absolute) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n\n switch (inputType) {\n case UrlType.Empty:\n url.hash = baseUrl.hash;\n // fall through\n\n case UrlType.Hash:\n url.query = baseUrl.query;\n // fall through\n\n case UrlType.Query:\n case UrlType.RelativePath:\n mergePaths(url, baseUrl);\n // fall through\n\n case UrlType.AbsolutePath:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n\n case UrlType.SchemeRelative:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType) inputType = baseType;\n }\n\n normalizePath(url, inputType);\n\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n\n case UrlType.Hash:\n case UrlType.Query:\n return queryHash;\n\n case UrlType.RelativePath: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n\n if (!path) return queryHash || '.';\n\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n\n return path + queryHash;\n }\n\n case UrlType.AbsolutePath:\n return url.path + queryHash;\n\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n}\n"],"names":[],"mappings":";;;;;;IAAA;IACA,MAAM,WAAW,GAAG,gBAAgB,CAAC;IAErC;;;;;;;;;;IAUA,MAAM,QAAQ,GAAG,0EAA0E,CAAC;IAE5F;;;;;;;;;IASA,MAAM,SAAS,GAAG,iEAAiE,CAAC;IAuBpF,SAAS,aAAa,CAAC,KAAa;QAClC,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAED,SAAS,mBAAmB,CAAC,KAAa;QACxC,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,SAAS,cAAc,CAAC,KAAa;QACnC,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED,SAAS,SAAS,CAAC,KAAa;QAC9B,OAAO,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAED,SAAS,UAAU,CAAC,KAAa;QAC/B,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,SAAS,gBAAgB,CAAC,KAAa;QACrC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAE,CAAC;QACpC,OAAO,OAAO,CACZ,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,EACf,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CACf,CAAC;IACJ,CAAC;IAED,SAAS,YAAY,CAAC,KAAa;QACjC,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,KAAK,CAAE,C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AAO,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;YAE9B;gBACE,OAAO,GAAG,CAAC,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;SACpF;IACH;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts b/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts new file mode 100644 index 0000000..b7f0b3b --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts @@ -0,0 +1,4 @@ +/** + * Attempts to resolve `input` URL/path relative to `base`. + */ +export default function resolve(input: string, base: string | undefined): string; diff --git a/node_modules/@jridgewell/resolve-uri/package.json b/node_modules/@jridgewell/resolve-uri/package.json new file mode 100644 index 0000000..02a4c51 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/package.json @@ -0,0 +1,69 @@ +{ + "name": "@jridgewell/resolve-uri", + "version": "3.1.2", + "description": "Resolve a URI relative to an optional base URI", + "keywords": [ + "resolve", + "uri", + "url", + "path" + ], + "author": "Justin Ridgewell ", + "license": "MIT", + "repository": "https://github.com/jridgewell/resolve-uri", + "main": "dist/resolve-uri.umd.js", + "module": "dist/resolve-uri.mjs", + "types": "dist/types/resolve-uri.d.ts", + "exports": { + ".": [ + { + "types": "./dist/types/resolve-uri.d.ts", + "browser": "./dist/resolve-uri.umd.js", + "require": "./dist/resolve-uri.umd.js", + "import": "./dist/resolve-uri.mjs" + }, + "./dist/resolve-uri.umd.js" + ], + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "engines": { + "node": ">=6.0.0" + }, + "scripts": { + "prebuild": "rm -rf dist", + "build": "run-s -n build:*", + "build:rollup": "rollup -c rollup.config.js", + "build:ts": "tsc --project tsconfig.build.json", + "lint": "run-s -n lint:*", + "lint:prettier": "npm run test:lint:prettier -- --write", + "lint:ts": "npm run test:lint:ts -- --fix", + "pretest": "run-s build:rollup", + "test": "run-s -n test:lint test:only", + "test:debug": "mocha --inspect-brk", + "test:lint": "run-s -n test:lint:*", + "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", + "test:lint:ts": "eslint '{src,test}/**/*.ts'", + "test:only": "mocha", + "test:coverage": "c8 mocha", + "test:watch": "mocha --watch", + "prepublishOnly": "npm run preversion", + "preversion": "run-s test build" + }, + "devDependencies": { + "@jridgewell/resolve-uri-latest": "npm:@jridgewell/resolve-uri@*", + "@rollup/plugin-typescript": "8.3.0", + "@typescript-eslint/eslint-plugin": "5.10.0", + "@typescript-eslint/parser": "5.10.0", + "c8": "7.11.0", + "eslint": "8.7.0", + "eslint-config-prettier": "8.3.0", + "mocha": "9.2.0", + "npm-run-all": "4.1.5", + "prettier": "2.5.1", + "rollup": "2.66.0", + "typescript": "4.5.5" + } +} diff --git a/node_modules/@jridgewell/set-array/LICENSE b/node_modules/@jridgewell/set-array/LICENSE new file mode 100644 index 0000000..352f071 --- /dev/null +++ b/node_modules/@jridgewell/set-array/LICENSE @@ -0,0 +1,19 @@ +Copyright 2022 Justin Ridgewell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@jridgewell/set-array/README.md b/node_modules/@jridgewell/set-array/README.md new file mode 100644 index 0000000..2ed155f --- /dev/null +++ b/node_modules/@jridgewell/set-array/README.md @@ -0,0 +1,37 @@ +# @jridgewell/set-array + +> Like a Set, but provides the index of the `key` in the backing array + +This is designed to allow synchronizing a second array with the contents of the backing array, like +how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`, and there +are never duplicates. + +## Installation + +```sh +npm install @jridgewell/set-array +``` + +## Usage + +```js +import { SetArray, get, put, pop } from '@jridgewell/set-array'; + +const sa = new SetArray(); + +let index = put(sa, 'first'); +assert.strictEqual(index, 0); + +index = put(sa, 'second'); +assert.strictEqual(index, 1); + +assert.deepEqual(sa.array, [ 'first', 'second' ]); + +index = get(sa, 'first'); +assert.strictEqual(index, 0); + +pop(sa); +index = get(sa, 'second'); +assert.strictEqual(index, undefined); +assert.deepEqual(sa.array, [ 'first' ]); +``` diff --git a/node_modules/@jridgewell/set-array/dist/set-array.mjs b/node_modules/@jridgewell/set-array/dist/set-array.mjs new file mode 100644 index 0000000..8a2d60b --- /dev/null +++ b/node_modules/@jridgewell/set-array/dist/set-array.mjs @@ -0,0 +1,69 @@ +/** + * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the + * index of the `key` in the backing array. + * + * This is designed to allow synchronizing a second array with the contents of the backing array, + * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`, + * and there are never duplicates. + */ +class SetArray { + constructor() { + this._indexes = { __proto__: null }; + this.array = []; + } +} +/** + * Typescript doesn't allow friend access to private fields, so this just casts the set into a type + * with public access modifiers. + */ +function cast(set) { + return set; +} +/** + * Gets the index associated with `key` in the backing array, if it is already present. + */ +function get(setarr, key) { + return cast(setarr)._indexes[key]; +} +/** + * Puts `key` into the backing array, if it is not already present. Returns + * the index of the `key` in the backing array. + */ +function put(setarr, key) { + // The key may or may not be present. If it is present, it's a number. + const index = get(setarr, key); + if (index !== undefined) + return index; + const { array, _indexes: indexes } = cast(setarr); + const length = array.push(key); + return (indexes[key] = length - 1); +} +/** + * Pops the last added item out of the SetArray. + */ +function pop(setarr) { + const { array, _indexes: indexes } = cast(setarr); + if (array.length === 0) + return; + const last = array.pop(); + indexes[last] = undefined; +} +/** + * Removes the key, if it exists in the set. + */ +function remove(setarr, key) { + const index = get(setarr, key); + if (index === undefined) + return; + const { array, _indexes: indexes } = cast(setarr); + for (let i = index + 1; i < array.length; i++) { + const k = array[i]; + array[i - 1] = k; + indexes[k]--; + } + indexes[key] = undefined; + array.pop(); +} + +export { SetArray, get, pop, put, remove }; +//# sourceMappingURL=set-array.mjs.map diff --git a/node_modules/@jridgewell/set-array/dist/set-array.mjs.map b/node_modules/@jridgewell/set-array/dist/set-array.mjs.map new file mode 100644 index 0000000..9276dfa --- /dev/null +++ b/node_modules/@jridgewell/set-array/dist/set-array.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"set-array.mjs","sources":["../src/set-array.ts"],"sourcesContent":["type Key = string | number | symbol;\n\n/**\n * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the\n * index of the `key` in the backing array.\n *\n * This is designed to allow synchronizing a second array with the contents of the backing array,\n * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,\n * and there are never duplicates.\n */\nexport class SetArray {\n private declare _indexes: Record;\n declare array: readonly T[];\n\n constructor() {\n this._indexes = { __proto__: null } as any;\n this.array = [];\n }\n}\n\ninterface PublicSet {\n array: T[];\n _indexes: SetArray['_indexes'];\n}\n\n/**\n * Typescript doesn't allow friend access to private fields, so this just casts the set into a type\n * with public access modifiers.\n */\nfunction cast(set: SetArray): PublicSet {\n return set as any;\n}\n\n/**\n * Gets the index associated with `key` in the backing array, if it is already present.\n */\nexport function get(setarr: SetArray, key: T): number | undefined {\n return cast(setarr)._indexes[key];\n}\n\n/**\n * Puts `key` into the backing array, if it is not already present. Returns\n * the index of the `key` in the backing array.\n */\nexport function put(setarr: SetArray, key: T): number {\n // The key may or may not be present. If it is present, it's a number.\n const index = get(setarr, key);\n if (index !== undefined) return index;\n\n const { array, _indexes: indexes } = cast(setarr);\n\n const length = array.push(key);\n return (indexes[key] = length - 1);\n}\n\n/**\n * Pops the last added item out of the SetArray.\n */\nexport function pop(setarr: SetArray): void {\n const { array, _indexes: indexes } = cast(setarr);\n if (array.length === 0) return;\n\n const last = array.pop()!;\n indexes[last] = undefined;\n}\n\n/**\n * Removes the key, if it exists in the set.\n */\nexport function remove(setarr: SetArray, key: T): void {\n const index = get(setarr, key);\n if (index === undefined) return;\n\n const { array, _indexes: indexes } = cast(setarr);\n for (let i = index + 1; i < array.length; i++) {\n const k = array[i];\n array[i - 1] = k;\n indexes[k]!--;\n }\n indexes[key] = undefined;\n array.pop();\n}\n"],"names":[],"mappings":"AAEA;;;;;;;;MAQa,QAAQ;IAInB;QACE,IAAI,CAAC,QAAQ,GAAG,EAAE,SAAS,EAAE,IAAI,EAAS,CAAC;QAC3C,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;KACjB;CACF;AAOD;;;;AAIA,SAAS,IAAI,CAAgB,GAAgB;IAC3C,OAAO,GAAU,CAAC;AACpB,CAAC;AAED;;;SAGgB,GAAG,CAAgB,MAAmB,EAAE,GAAM;IAC5D,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACpC,CAAC;AAED;;;;SAIgB,GAAG,CAAgB,MAAmB,EAAE,GAAM;;IAE5D,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/B,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAEtC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;IAElD,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/B,QAAQ,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,CAAC,EAAE;AACrC,CAAC;AAED;;;SAGgB,GAAG,CAAgB,MAAmB;IACpD,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;IAClD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAE/B,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAG,CAAC;IAC1B,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;AAC5B,CAAC;AAED;;;SAGgB,MAAM,CAAgB,MAAmB,EAAE,GAAM;IAC/D,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/B,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO;IAEhC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;IAClD,KAAK,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC7C,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACnB,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;QACjB,OAAO,CAAC,CAAC,CAAE,EAAE,CAAC;KACf;IACD,OAAO,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;IACzB,KAAK,CAAC,GAAG,EAAE,CAAC;AACd;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/set-array/dist/set-array.umd.js b/node_modules/@jridgewell/set-array/dist/set-array.umd.js new file mode 100644 index 0000000..ab498cc --- /dev/null +++ b/node_modules/@jridgewell/set-array/dist/set-array.umd.js @@ -0,0 +1,83 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.setArray = {})); +})(this, (function (exports) { 'use strict'; + + /** + * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the + * index of the `key` in the backing array. + * + * This is designed to allow synchronizing a second array with the contents of the backing array, + * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`, + * and there are never duplicates. + */ + class SetArray { + constructor() { + this._indexes = { __proto__: null }; + this.array = []; + } + } + /** + * Typescript doesn't allow friend access to private fields, so this just casts the set into a type + * with public access modifiers. + */ + function cast(set) { + return set; + } + /** + * Gets the index associated with `key` in the backing array, if it is already present. + */ + function get(setarr, key) { + return cast(setarr)._indexes[key]; + } + /** + * Puts `key` into the backing array, if it is not already present. Returns + * the index of the `key` in the backing array. + */ + function put(setarr, key) { + // The key may or may not be present. If it is present, it's a number. + const index = get(setarr, key); + if (index !== undefined) + return index; + const { array, _indexes: indexes } = cast(setarr); + const length = array.push(key); + return (indexes[key] = length - 1); + } + /** + * Pops the last added item out of the SetArray. + */ + function pop(setarr) { + const { array, _indexes: indexes } = cast(setarr); + if (array.length === 0) + return; + const last = array.pop(); + indexes[last] = undefined; + } + /** + * Removes the key, if it exists in the set. + */ + function remove(setarr, key) { + const index = get(setarr, key); + if (index === undefined) + return; + const { array, _indexes: indexes } = cast(setarr); + for (let i = index + 1; i < array.length; i++) { + const k = array[i]; + array[i - 1] = k; + indexes[k]--; + } + indexes[key] = undefined; + array.pop(); + } + + exports.SetArray = SetArray; + exports.get = get; + exports.pop = pop; + exports.put = put; + exports.remove = remove; + + Object.defineProperty(exports, '__esModule', { value: true }); + +})); +//# sourceMappingURL=set-array.umd.js.map diff --git a/node_modules/@jridgewell/set-array/dist/set-array.umd.js.map b/node_modules/@jridgewell/set-array/dist/set-array.umd.js.map new file mode 100644 index 0000000..9edb8bc --- /dev/null +++ b/node_modules/@jridgewell/set-array/dist/set-array.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"set-array.umd.js","sources":["../src/set-array.ts"],"sourcesContent":["type Key = string | number | symbol;\n\n/**\n * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the\n * index of the `key` in the backing array.\n *\n * This is designed to allow synchronizing a second array with the contents of the backing array,\n * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,\n * and there are never duplicates.\n */\nexport class SetArray {\n private declare _indexes: Record;\n declare array: readonly T[];\n\n constructor() {\n this._indexes = { __proto__: null } as any;\n this.array = [];\n }\n}\n\ninterface PublicSet {\n array: T[];\n _indexes: SetArray['_indexes'];\n}\n\n/**\n * Typescript doesn't allow friend access to private fields, so this just casts the set into a type\n * with public access modifiers.\n */\nfunction cast(set: SetArray): PublicSet {\n return set as any;\n}\n\n/**\n * Gets the index associated with `key` in the backing array, if it is already present.\n */\nexport function get(setarr: SetArray, key: T): number | undefined {\n return cast(setarr)._indexes[key];\n}\n\n/**\n * Puts `key` into the backing array, if it is not already present. Returns\n * the index of the `key` in the backing array.\n */\nexport function put(setarr: SetArray, key: T): number {\n // The key may or may not be present. If it is present, it's a number.\n const index = get(setarr, key);\n if (index !== undefined) return index;\n\n const { array, _indexes: indexes } = cast(setarr);\n\n const length = array.push(key);\n return (indexes[key] = length - 1);\n}\n\n/**\n * Pops the last added item out of the SetArray.\n */\nexport function pop(setarr: SetArray): void {\n const { array, _indexes: indexes } = cast(setarr);\n if (array.length === 0) return;\n\n const last = array.pop()!;\n indexes[last] = undefined;\n}\n\n/**\n * Removes the key, if it exists in the set.\n */\nexport function remove(setarr: SetArray, key: T): void {\n const index = get(setarr, key);\n if (index === undefined) return;\n\n const { array, _indexes: indexes } = cast(setarr);\n for (let i = index + 1; i < array.length; i++) {\n const k = array[i];\n array[i - 1] = k;\n indexes[k]!--;\n }\n indexes[key] = undefined;\n array.pop();\n}\n"],"names":[],"mappings":";;;;;;IAEA;;;;;;;;UAQa,QAAQ;QAInB;YACE,IAAI,CAAC,QAAQ,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,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;QAClD,KAAK,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC7C,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACnB,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;YACjB,OAAO,CAAC,CAAC,CAAE,EAAE,CAAC;SACf;QACD,OAAO,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;QACzB,KAAK,CAAC,GAAG,EAAE,CAAC;IACd;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/set-array/dist/types/set-array.d.ts b/node_modules/@jridgewell/set-array/dist/types/set-array.d.ts new file mode 100644 index 0000000..5f68e5d --- /dev/null +++ b/node_modules/@jridgewell/set-array/dist/types/set-array.d.ts @@ -0,0 +1,32 @@ +declare type Key = string | number | symbol; +/** + * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the + * index of the `key` in the backing array. + * + * This is designed to allow synchronizing a second array with the contents of the backing array, + * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`, + * and there are never duplicates. + */ +export declare class SetArray { + private _indexes; + array: readonly T[]; + constructor(); +} +/** + * Gets the index associated with `key` in the backing array, if it is already present. + */ +export declare function get(setarr: SetArray, key: T): number | undefined; +/** + * Puts `key` into the backing array, if it is not already present. Returns + * the index of the `key` in the backing array. + */ +export declare function put(setarr: SetArray, key: T): number; +/** + * Pops the last added item out of the SetArray. + */ +export declare function pop(setarr: SetArray): void; +/** + * Removes the key, if it exists in the set. + */ +export declare function remove(setarr: SetArray, key: T): void; +export {}; diff --git a/node_modules/@jridgewell/set-array/package.json b/node_modules/@jridgewell/set-array/package.json new file mode 100644 index 0000000..f652ca5 --- /dev/null +++ b/node_modules/@jridgewell/set-array/package.json @@ -0,0 +1,65 @@ +{ + "name": "@jridgewell/set-array", + "version": "1.2.1", + "description": "Like a Set, but provides the index of the `key` in the backing array", + "keywords": [], + "author": "Justin Ridgewell ", + "license": "MIT", + "repository": "https://github.com/jridgewell/set-array", + "main": "dist/set-array.umd.js", + "module": "dist/set-array.mjs", + "typings": "dist/types/set-array.d.ts", + "exports": { + ".": [ + { + "types": "./dist/types/set-array.d.ts", + "browser": "./dist/set-array.umd.js", + "require": "./dist/set-array.umd.js", + "import": "./dist/set-array.mjs" + }, + "./dist/set-array.umd.js" + ], + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "engines": { + "node": ">=6.0.0" + }, + "scripts": { + "prebuild": "rm -rf dist", + "build": "run-s -n build:*", + "build:rollup": "rollup -c rollup.config.js", + "build:ts": "tsc --project tsconfig.build.json", + "lint": "run-s -n lint:*", + "lint:prettier": "npm run test:lint:prettier -- --write", + "lint:ts": "npm run test:lint:ts -- --fix", + "test": "run-s -n test:lint test:only", + "test:debug": "mocha --inspect-brk", + "test:lint": "run-s -n test:lint:*", + "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", + "test:lint:ts": "eslint '{src,test}/**/*.ts'", + "test:only": "mocha", + "test:coverage": "c8 mocha", + "test:watch": "mocha --watch", + "prepublishOnly": "npm run preversion", + "preversion": "run-s test build" + }, + "devDependencies": { + "@rollup/plugin-typescript": "8.3.0", + "@types/mocha": "9.1.1", + "@types/node": "17.0.29", + "@typescript-eslint/eslint-plugin": "5.10.0", + "@typescript-eslint/parser": "5.10.0", + "c8": "7.11.0", + "eslint": "8.7.0", + "eslint-config-prettier": "8.3.0", + "mocha": "9.2.0", + "npm-run-all": "4.1.5", + "prettier": "2.5.1", + "rollup": "2.66.0", + "tsx": "4.7.1", + "typescript": "4.5.5" + } +} diff --git a/node_modules/@jridgewell/sourcemap-codec/LICENSE b/node_modules/@jridgewell/sourcemap-codec/LICENSE new file mode 100644 index 0000000..a331065 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2015 Rich Harris + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/@jridgewell/sourcemap-codec/README.md b/node_modules/@jridgewell/sourcemap-codec/README.md new file mode 100644 index 0000000..b3e0708 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/README.md @@ -0,0 +1,264 @@ +# @jridgewell/sourcemap-codec + +Encode/decode the `mappings` property of a [sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit). + + +## Why? + +Sourcemaps are difficult to generate and manipulate, because the `mappings` property – the part that actually links the generated code back to the original source – is encoded using an obscure method called [Variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity). On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap. + +This package makes the process slightly easier. + + +## Installation + +```bash +npm install @jridgewell/sourcemap-codec +``` + + +## Usage + +```js +import { encode, decode } from '@jridgewell/sourcemap-codec'; + +var decoded = decode( ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); + +assert.deepEqual( decoded, [ + // the first line (of the generated code) has no mappings, + // as shown by the starting semi-colon (which separates lines) + [], + + // the second line contains four (comma-separated) segments + [ + // segments are encoded as you'd expect: + // [ generatedCodeColumn, sourceIndex, sourceCodeLine, sourceCodeColumn, nameIndex ] + + // i.e. the first segment begins at column 2, and maps back to the second column + // of the second line (both zero-based) of the 0th source, and uses the 0th + // name in the `map.names` array + [ 2, 0, 2, 2, 0 ], + + // the remaining segments are 4-length rather than 5-length, + // because they don't map a name + [ 4, 0, 2, 4 ], + [ 6, 0, 2, 5 ], + [ 7, 0, 2, 7 ] + ], + + // the final line contains two segments + [ + [ 2, 1, 10, 19 ], + [ 12, 1, 11, 20 ] + ] +]); + +var encoded = encode( decoded ); +assert.equal( encoded, ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); +``` + +## Benchmarks + +``` +node v20.10.0 + +amp.js.map - 45120 segments + +Decode Memory Usage: +local code 5815135 bytes +@jridgewell/sourcemap-codec 1.4.15 5868160 bytes +sourcemap-codec 5492584 bytes +source-map-0.6.1 13569984 bytes +source-map-0.8.0 6390584 bytes +chrome dev tools 8011136 bytes +Smallest memory usage is sourcemap-codec + +Decode speed: +decode: local code x 492 ops/sec ±1.22% (90 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 499 ops/sec ±1.16% (89 runs sampled) +decode: sourcemap-codec x 376 ops/sec ±1.66% (89 runs sampled) +decode: source-map-0.6.1 x 34.99 ops/sec ±0.94% (48 runs sampled) +decode: source-map-0.8.0 x 351 ops/sec ±0.07% (95 runs sampled) +chrome dev tools x 165 ops/sec ±0.91% (86 runs sampled) +Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 + +Encode Memory Usage: +local code 444248 bytes +@jridgewell/sourcemap-codec 1.4.15 623024 bytes +sourcemap-codec 8696280 bytes +source-map-0.6.1 8745176 bytes +source-map-0.8.0 8736624 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 796 ops/sec ±0.11% (97 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 795 ops/sec ±0.25% (98 runs sampled) +encode: sourcemap-codec x 231 ops/sec ±0.83% (86 runs sampled) +encode: source-map-0.6.1 x 166 ops/sec ±0.57% (86 runs sampled) +encode: source-map-0.8.0 x 203 ops/sec ±0.45% (88 runs sampled) +Fastest is encode: local code,encode: @jridgewell/sourcemap-codec 1.4.15 + + +*** + + +babel.min.js.map - 347793 segments + +Decode Memory Usage: +local code 35424960 bytes +@jridgewell/sourcemap-codec 1.4.15 35424696 bytes +sourcemap-codec 36033464 bytes +source-map-0.6.1 62253704 bytes +source-map-0.8.0 43843920 bytes +chrome dev tools 45111400 bytes +Smallest memory usage is @jridgewell/sourcemap-codec 1.4.15 + +Decode speed: +decode: local code x 38.18 ops/sec ±5.44% (52 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 38.36 ops/sec ±5.02% (52 runs sampled) +decode: sourcemap-codec x 34.05 ops/sec ±4.45% (47 runs sampled) +decode: source-map-0.6.1 x 4.31 ops/sec ±2.76% (15 runs sampled) +decode: source-map-0.8.0 x 55.60 ops/sec ±0.13% (73 runs sampled) +chrome dev tools x 16.94 ops/sec ±3.78% (46 runs sampled) +Fastest is decode: source-map-0.8.0 + +Encode Memory Usage: +local code 2606016 bytes +@jridgewell/sourcemap-codec 1.4.15 2626440 bytes +sourcemap-codec 21152576 bytes +source-map-0.6.1 25023928 bytes +source-map-0.8.0 25256448 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 127 ops/sec ±0.18% (83 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 128 ops/sec ±0.26% (83 runs sampled) +encode: sourcemap-codec x 29.31 ops/sec ±2.55% (53 runs sampled) +encode: source-map-0.6.1 x 18.85 ops/sec ±3.19% (36 runs sampled) +encode: source-map-0.8.0 x 19.34 ops/sec ±1.97% (36 runs sampled) +Fastest is encode: @jridgewell/sourcemap-codec 1.4.15 + + +*** + + +preact.js.map - 1992 segments + +Decode Memory Usage: +local code 261696 bytes +@jridgewell/sourcemap-codec 1.4.15 244296 bytes +sourcemap-codec 302816 bytes +source-map-0.6.1 939176 bytes +source-map-0.8.0 336 bytes +chrome dev tools 587368 bytes +Smallest memory usage is source-map-0.8.0 + +Decode speed: +decode: local code x 17,782 ops/sec ±0.32% (97 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 17,863 ops/sec ±0.40% (100 runs sampled) +decode: sourcemap-codec x 12,453 ops/sec ±0.27% (101 runs sampled) +decode: source-map-0.6.1 x 1,288 ops/sec ±1.05% (96 runs sampled) +decode: source-map-0.8.0 x 9,289 ops/sec ±0.27% (101 runs sampled) +chrome dev tools x 4,769 ops/sec ±0.18% (100 runs sampled) +Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 + +Encode Memory Usage: +local code 262944 bytes +@jridgewell/sourcemap-codec 1.4.15 25544 bytes +sourcemap-codec 323048 bytes +source-map-0.6.1 507808 bytes +source-map-0.8.0 507480 bytes +Smallest memory usage is @jridgewell/sourcemap-codec 1.4.15 + +Encode speed: +encode: local code x 24,207 ops/sec ±0.79% (95 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 24,288 ops/sec ±0.48% (96 runs sampled) +encode: sourcemap-codec x 6,761 ops/sec ±0.21% (100 runs sampled) +encode: source-map-0.6.1 x 5,374 ops/sec ±0.17% (99 runs sampled) +encode: source-map-0.8.0 x 5,633 ops/sec ±0.32% (99 runs sampled) +Fastest is encode: @jridgewell/sourcemap-codec 1.4.15,encode: local code + + +*** + + +react.js.map - 5726 segments + +Decode Memory Usage: +local code 678816 bytes +@jridgewell/sourcemap-codec 1.4.15 678816 bytes +sourcemap-codec 816400 bytes +source-map-0.6.1 2288864 bytes +source-map-0.8.0 721360 bytes +chrome dev tools 1012512 bytes +Smallest memory usage is local code + +Decode speed: +decode: local code x 6,178 ops/sec ±0.19% (98 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 6,261 ops/sec ±0.22% (100 runs sampled) +decode: sourcemap-codec x 4,472 ops/sec ±0.90% (99 runs sampled) +decode: source-map-0.6.1 x 449 ops/sec ±0.31% (95 runs sampled) +decode: source-map-0.8.0 x 3,219 ops/sec ±0.13% (100 runs sampled) +chrome dev tools x 1,743 ops/sec ±0.20% (99 runs sampled) +Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 + +Encode Memory Usage: +local code 140960 bytes +@jridgewell/sourcemap-codec 1.4.15 159808 bytes +sourcemap-codec 969304 bytes +source-map-0.6.1 930520 bytes +source-map-0.8.0 930248 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 8,013 ops/sec ±0.19% (100 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 7,989 ops/sec ±0.20% (101 runs sampled) +encode: sourcemap-codec x 2,472 ops/sec ±0.21% (99 runs sampled) +encode: source-map-0.6.1 x 2,200 ops/sec ±0.17% (99 runs sampled) +encode: source-map-0.8.0 x 2,220 ops/sec ±0.37% (99 runs sampled) +Fastest is encode: local code + + +*** + + +vscode.map - 2141001 segments + +Decode Memory Usage: +local code 198955264 bytes +@jridgewell/sourcemap-codec 1.4.15 199175352 bytes +sourcemap-codec 199102688 bytes +source-map-0.6.1 386323432 bytes +source-map-0.8.0 244116432 bytes +chrome dev tools 293734280 bytes +Smallest memory usage is local code + +Decode speed: +decode: local code x 3.90 ops/sec ±22.21% (15 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 3.95 ops/sec ±23.53% (15 runs sampled) +decode: sourcemap-codec x 3.82 ops/sec ±17.94% (14 runs sampled) +decode: source-map-0.6.1 x 0.61 ops/sec ±7.81% (6 runs sampled) +decode: source-map-0.8.0 x 9.54 ops/sec ±0.28% (28 runs sampled) +chrome dev tools x 2.18 ops/sec ±10.58% (10 runs sampled) +Fastest is decode: source-map-0.8.0 + +Encode Memory Usage: +local code 13509880 bytes +@jridgewell/sourcemap-codec 1.4.15 13537648 bytes +sourcemap-codec 32540104 bytes +source-map-0.6.1 127531040 bytes +source-map-0.8.0 127535312 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 20.10 ops/sec ±0.19% (38 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 20.26 ops/sec ±0.32% (38 runs sampled) +encode: sourcemap-codec x 5.44 ops/sec ±1.64% (18 runs sampled) +encode: source-map-0.6.1 x 2.30 ops/sec ±4.79% (10 runs sampled) +encode: source-map-0.8.0 x 2.46 ops/sec ±6.53% (10 runs sampled) +Fastest is encode: @jridgewell/sourcemap-codec 1.4.15 +``` + +# License + +MIT diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs new file mode 100644 index 0000000..60e17b3 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs @@ -0,0 +1,424 @@ +const comma = ','.charCodeAt(0); +const semicolon = ';'.charCodeAt(0); +const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; +const intToChar = new Uint8Array(64); // 64 possible chars. +const charToInt = new Uint8Array(128); // z is 122 in ASCII +for (let i = 0; i < chars.length; i++) { + const c = chars.charCodeAt(i); + intToChar[i] = c; + charToInt[c] = i; +} +function decodeInteger(reader, relative) { + let value = 0; + let shift = 0; + let integer = 0; + do { + const c = reader.next(); + integer = charToInt[c]; + value |= (integer & 31) << shift; + shift += 5; + } while (integer & 32); + const shouldNegate = value & 1; + value >>>= 1; + if (shouldNegate) { + value = -0x80000000 | -value; + } + return relative + value; +} +function encodeInteger(builder, num, relative) { + let delta = num - relative; + delta = delta < 0 ? (-delta << 1) | 1 : delta << 1; + do { + let clamped = delta & 0b011111; + delta >>>= 5; + if (delta > 0) + clamped |= 0b100000; + builder.write(intToChar[clamped]); + } while (delta > 0); + return num; +} +function hasMoreVlq(reader, max) { + if (reader.pos >= max) + return false; + return reader.peek() !== comma; +} + +const bufLength = 1024 * 16; +// Provide a fallback for older environments. +const td = typeof TextDecoder !== 'undefined' + ? /* #__PURE__ */ new TextDecoder() + : typeof Buffer !== 'undefined' + ? { + decode(buf) { + const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); + return out.toString(); + }, + } + : { + decode(buf) { + let out = ''; + for (let i = 0; i < buf.length; i++) { + out += String.fromCharCode(buf[i]); + } + return out; + }, + }; +class StringWriter { + constructor() { + this.pos = 0; + this.out = ''; + this.buffer = new Uint8Array(bufLength); + } + write(v) { + const { buffer } = this; + buffer[this.pos++] = v; + if (this.pos === bufLength) { + this.out += td.decode(buffer); + this.pos = 0; + } + } + flush() { + const { buffer, out, pos } = this; + return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; + } +} +class StringReader { + constructor(buffer) { + this.pos = 0; + this.buffer = buffer; + } + next() { + return this.buffer.charCodeAt(this.pos++); + } + peek() { + return this.buffer.charCodeAt(this.pos); + } + indexOf(char) { + const { buffer, pos } = this; + const idx = buffer.indexOf(char, pos); + return idx === -1 ? buffer.length : idx; + } +} + +const EMPTY = []; +function decodeOriginalScopes(input) { + const { length } = input; + const reader = new StringReader(input); + const scopes = []; + const stack = []; + let line = 0; + for (; reader.pos < length; reader.pos++) { + line = decodeInteger(reader, line); + const column = decodeInteger(reader, 0); + if (!hasMoreVlq(reader, length)) { + const last = stack.pop(); + last[2] = line; + last[3] = column; + continue; + } + const kind = decodeInteger(reader, 0); + const fields = decodeInteger(reader, 0); + const hasName = fields & 0b0001; + const scope = (hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]); + let vars = EMPTY; + if (hasMoreVlq(reader, length)) { + vars = []; + do { + const varsIndex = decodeInteger(reader, 0); + vars.push(varsIndex); + } while (hasMoreVlq(reader, length)); + } + scope.vars = vars; + scopes.push(scope); + stack.push(scope); + } + return scopes; +} +function encodeOriginalScopes(scopes) { + const writer = new StringWriter(); + for (let i = 0; i < scopes.length;) { + i = _encodeOriginalScopes(scopes, i, writer, [0]); + } + return writer.flush(); +} +function _encodeOriginalScopes(scopes, index, writer, state) { + const scope = scopes[index]; + const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; + if (index > 0) + writer.write(comma); + state[0] = encodeInteger(writer, startLine, state[0]); + encodeInteger(writer, startColumn, 0); + encodeInteger(writer, kind, 0); + const fields = scope.length === 6 ? 0b0001 : 0; + encodeInteger(writer, fields, 0); + if (scope.length === 6) + encodeInteger(writer, scope[5], 0); + for (const v of vars) { + encodeInteger(writer, v, 0); + } + for (index++; index < scopes.length;) { + const next = scopes[index]; + const { 0: l, 1: c } = next; + if (l > endLine || (l === endLine && c >= endColumn)) { + break; + } + index = _encodeOriginalScopes(scopes, index, writer, state); + } + writer.write(comma); + state[0] = encodeInteger(writer, endLine, state[0]); + encodeInteger(writer, endColumn, 0); + return index; +} +function decodeGeneratedRanges(input) { + const { length } = input; + const reader = new StringReader(input); + const ranges = []; + const stack = []; + let genLine = 0; + let definitionSourcesIndex = 0; + let definitionScopeIndex = 0; + let callsiteSourcesIndex = 0; + let callsiteLine = 0; + let callsiteColumn = 0; + let bindingLine = 0; + let bindingColumn = 0; + do { + const semi = reader.indexOf(';'); + let genColumn = 0; + for (; reader.pos < semi; reader.pos++) { + genColumn = decodeInteger(reader, genColumn); + if (!hasMoreVlq(reader, semi)) { + const last = stack.pop(); + last[2] = genLine; + last[3] = genColumn; + continue; + } + const fields = decodeInteger(reader, 0); + const hasDefinition = fields & 0b0001; + const hasCallsite = fields & 0b0010; + const hasScope = fields & 0b0100; + let callsite = null; + let bindings = EMPTY; + let range; + if (hasDefinition) { + const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex); + definitionScopeIndex = decodeInteger(reader, definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0); + definitionSourcesIndex = defSourcesIndex; + range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex]; + } + else { + range = [genLine, genColumn, 0, 0]; + } + range.isScope = !!hasScope; + if (hasCallsite) { + const prevCsi = callsiteSourcesIndex; + const prevLine = callsiteLine; + callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex); + const sameSource = prevCsi === callsiteSourcesIndex; + callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0); + callsiteColumn = decodeInteger(reader, sameSource && prevLine === callsiteLine ? callsiteColumn : 0); + callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn]; + } + range.callsite = callsite; + if (hasMoreVlq(reader, semi)) { + bindings = []; + do { + bindingLine = genLine; + bindingColumn = genColumn; + const expressionsCount = decodeInteger(reader, 0); + let expressionRanges; + if (expressionsCount < -1) { + expressionRanges = [[decodeInteger(reader, 0)]]; + for (let i = -1; i > expressionsCount; i--) { + const prevBl = bindingLine; + bindingLine = decodeInteger(reader, bindingLine); + bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0); + const expression = decodeInteger(reader, 0); + expressionRanges.push([expression, bindingLine, bindingColumn]); + } + } + else { + expressionRanges = [[expressionsCount]]; + } + bindings.push(expressionRanges); + } while (hasMoreVlq(reader, semi)); + } + range.bindings = bindings; + ranges.push(range); + stack.push(range); + } + genLine++; + reader.pos = semi + 1; + } while (reader.pos < length); + return ranges; +} +function encodeGeneratedRanges(ranges) { + if (ranges.length === 0) + return ''; + const writer = new StringWriter(); + for (let i = 0; i < ranges.length;) { + i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]); + } + return writer.flush(); +} +function _encodeGeneratedRanges(ranges, index, writer, state) { + const range = ranges[index]; + const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, isScope, callsite, bindings, } = range; + if (state[0] < startLine) { + catchupLine(writer, state[0], startLine); + state[0] = startLine; + state[1] = 0; + } + else if (index > 0) { + writer.write(comma); + } + state[1] = encodeInteger(writer, range[1], state[1]); + const fields = (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0); + encodeInteger(writer, fields, 0); + if (range.length === 6) { + const { 4: sourcesIndex, 5: scopesIndex } = range; + if (sourcesIndex !== state[2]) { + state[3] = 0; + } + state[2] = encodeInteger(writer, sourcesIndex, state[2]); + state[3] = encodeInteger(writer, scopesIndex, state[3]); + } + if (callsite) { + const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite; + if (sourcesIndex !== state[4]) { + state[5] = 0; + state[6] = 0; + } + else if (callLine !== state[5]) { + state[6] = 0; + } + state[4] = encodeInteger(writer, sourcesIndex, state[4]); + state[5] = encodeInteger(writer, callLine, state[5]); + state[6] = encodeInteger(writer, callColumn, state[6]); + } + if (bindings) { + for (const binding of bindings) { + if (binding.length > 1) + encodeInteger(writer, -binding.length, 0); + const expression = binding[0][0]; + encodeInteger(writer, expression, 0); + let bindingStartLine = startLine; + let bindingStartColumn = startColumn; + for (let i = 1; i < binding.length; i++) { + const expRange = binding[i]; + bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine); + bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn); + encodeInteger(writer, expRange[0], 0); + } + } + } + for (index++; index < ranges.length;) { + const next = ranges[index]; + const { 0: l, 1: c } = next; + if (l > endLine || (l === endLine && c >= endColumn)) { + break; + } + index = _encodeGeneratedRanges(ranges, index, writer, state); + } + if (state[0] < endLine) { + catchupLine(writer, state[0], endLine); + state[0] = endLine; + state[1] = 0; + } + else { + writer.write(comma); + } + state[1] = encodeInteger(writer, endColumn, state[1]); + return index; +} +function catchupLine(writer, lastLine, line) { + do { + writer.write(semicolon); + } while (++lastLine < line); +} + +function decode(mappings) { + const { length } = mappings; + const reader = new StringReader(mappings); + const decoded = []; + let genColumn = 0; + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + do { + const semi = reader.indexOf(';'); + const line = []; + let sorted = true; + let lastCol = 0; + genColumn = 0; + while (reader.pos < semi) { + let seg; + genColumn = decodeInteger(reader, genColumn); + if (genColumn < lastCol) + sorted = false; + lastCol = genColumn; + if (hasMoreVlq(reader, semi)) { + sourcesIndex = decodeInteger(reader, sourcesIndex); + sourceLine = decodeInteger(reader, sourceLine); + sourceColumn = decodeInteger(reader, sourceColumn); + if (hasMoreVlq(reader, semi)) { + namesIndex = decodeInteger(reader, namesIndex); + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; + } + else { + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; + } + } + else { + seg = [genColumn]; + } + line.push(seg); + reader.pos++; + } + if (!sorted) + sort(line); + decoded.push(line); + reader.pos = semi + 1; + } while (reader.pos <= length); + return decoded; +} +function sort(line) { + line.sort(sortComparator); +} +function sortComparator(a, b) { + return a[0] - b[0]; +} +function encode(decoded) { + const writer = new StringWriter(); + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + if (i > 0) + writer.write(semicolon); + if (line.length === 0) + continue; + let genColumn = 0; + for (let j = 0; j < line.length; j++) { + const segment = line[j]; + if (j > 0) + writer.write(comma); + genColumn = encodeInteger(writer, segment[0], genColumn); + if (segment.length === 1) + continue; + sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); + sourceLine = encodeInteger(writer, segment[2], sourceLine); + sourceColumn = encodeInteger(writer, segment[3], sourceColumn); + if (segment.length === 4) + continue; + namesIndex = encodeInteger(writer, segment[4], namesIndex); + } + } + return writer.flush(); +} + +export { decode, decodeGeneratedRanges, decodeOriginalScopes, encode, encodeGeneratedRanges, encodeOriginalScopes }; +//# sourceMappingURL=sourcemap-codec.mjs.map diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map new file mode 100644 index 0000000..7388228 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-codec.mjs","sources":["../src/vlq.ts","../src/strings.ts","../src/scopes.ts","../src/sourcemap-codec.ts"],"sourcesContent":["import type { StringReader, StringWriter } from './strings';\n\nexport const comma = ','.charCodeAt(0);\nexport const semicolon = ';'.charCodeAt(0);\n\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst intToChar = new Uint8Array(64); // 64 possible chars.\nconst charToInt = new Uint8Array(128); // z is 122 in ASCII\n\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\n\nexport function decodeInteger(reader: StringReader, relative: number): number {\n let value = 0;\n let shift = 0;\n let integer = 0;\n\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n\n const shouldNegate = value & 1;\n value >>>= 1;\n\n if (shouldNegate) {\n value = -0x80000000 | -value;\n }\n\n return relative + value;\n}\n\nexport function encodeInteger(builder: StringWriter, num: number, relative: number): number {\n let delta = num - relative;\n\n delta = delta < 0 ? (-delta << 1) | 1 : delta << 1;\n do {\n let clamped = delta & 0b011111;\n delta >>>= 5;\n if (delta > 0) clamped |= 0b100000;\n builder.write(intToChar[clamped]);\n } while (delta > 0);\n\n return num;\n}\n\nexport function hasMoreVlq(reader: StringReader, max: number) {\n if (reader.pos >= max) return false;\n return reader.peek() !== comma;\n}\n","const bufLength = 1024 * 16;\n\n// Provide a fallback for older environments.\nconst td =\n typeof TextDecoder !== 'undefined'\n ? /* #__PURE__ */ new TextDecoder()\n : typeof Buffer !== 'undefined'\n ? {\n decode(buf: Uint8Array): string {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n },\n }\n : {\n decode(buf: Uint8Array): string {\n let out = '';\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n },\n };\n\nexport class StringWriter {\n pos = 0;\n private out = '';\n private buffer = new Uint8Array(bufLength);\n\n write(v: number): void {\n const { buffer } = this;\n buffer[this.pos++] = v;\n if (this.pos === bufLength) {\n this.out += td.decode(buffer);\n this.pos = 0;\n }\n }\n\n flush(): string {\n const { buffer, out, pos } = this;\n return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;\n }\n}\n\nexport class StringReader {\n pos = 0;\n private declare buffer: string;\n\n constructor(buffer: string) {\n this.buffer = buffer;\n }\n\n next(): number {\n return this.buffer.charCodeAt(this.pos++);\n }\n\n peek(): number {\n return this.buffer.charCodeAt(this.pos);\n }\n\n indexOf(char: string): number {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n}\n","import { StringReader, StringWriter } from './strings';\nimport { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq';\n\nconst EMPTY: any[] = [];\n\ntype Line = number;\ntype Column = number;\ntype Kind = number;\ntype Name = number;\ntype Var = number;\ntype SourcesIndex = number;\ntype ScopesIndex = number;\n\ntype Mix = (A & O) | (B & O);\n\nexport type OriginalScope = Mix<\n [Line, Column, Line, Column, Kind],\n [Line, Column, Line, Column, Kind, Name],\n { vars: Var[] }\n>;\n\nexport type GeneratedRange = Mix<\n [Line, Column, Line, Column],\n [Line, Column, Line, Column, SourcesIndex, ScopesIndex],\n {\n callsite: CallSite | null;\n bindings: Binding[];\n isScope: boolean;\n }\n>;\nexport type CallSite = [SourcesIndex, Line, Column];\ntype Binding = BindingExpressionRange[];\nexport type BindingExpressionRange = [Name] | [Name, Line, Column];\n\nexport function decodeOriginalScopes(input: string): OriginalScope[] {\n const { length } = input;\n const reader = new StringReader(input);\n const scopes: OriginalScope[] = [];\n const stack: OriginalScope[] = [];\n let line = 0;\n\n for (; reader.pos < length; reader.pos++) {\n line = decodeInteger(reader, line);\n const column = decodeInteger(reader, 0);\n\n if (!hasMoreVlq(reader, length)) {\n const last = stack.pop()!;\n last[2] = line;\n last[3] = column;\n continue;\n }\n\n const kind = decodeInteger(reader, 0);\n const fields = decodeInteger(reader, 0);\n const hasName = fields & 0b0001;\n\n const scope: OriginalScope = (\n hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]\n ) as OriginalScope;\n\n let vars: Var[] = EMPTY;\n if (hasMoreVlq(reader, length)) {\n vars = [];\n do {\n const varsIndex = decodeInteger(reader, 0);\n vars.push(varsIndex);\n } while (hasMoreVlq(reader, length));\n }\n scope.vars = vars;\n\n scopes.push(scope);\n stack.push(scope);\n }\n\n return scopes;\n}\n\nexport function encodeOriginalScopes(scopes: OriginalScope[]): string {\n const writer = new StringWriter();\n\n for (let i = 0; i < scopes.length; ) {\n i = _encodeOriginalScopes(scopes, i, writer, [0]);\n }\n\n return writer.flush();\n}\n\nfunction _encodeOriginalScopes(\n scopes: OriginalScope[],\n index: number,\n writer: StringWriter,\n state: [\n number, // GenColumn\n ],\n): number {\n const scope = scopes[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;\n\n if (index > 0) writer.write(comma);\n\n state[0] = encodeInteger(writer, startLine, state[0]);\n encodeInteger(writer, startColumn, 0);\n encodeInteger(writer, kind, 0);\n\n const fields = scope.length === 6 ? 0b0001 : 0;\n encodeInteger(writer, fields, 0);\n if (scope.length === 6) encodeInteger(writer, scope[5], 0);\n\n for (const v of vars) {\n encodeInteger(writer, v, 0);\n }\n\n for (index++; index < scopes.length; ) {\n const next = scopes[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeOriginalScopes(scopes, index, writer, state);\n }\n\n writer.write(comma);\n state[0] = encodeInteger(writer, endLine, state[0]);\n encodeInteger(writer, endColumn, 0);\n\n return index;\n}\n\nexport function decodeGeneratedRanges(input: string): GeneratedRange[] {\n const { length } = input;\n const reader = new StringReader(input);\n const ranges: GeneratedRange[] = [];\n const stack: GeneratedRange[] = [];\n\n let genLine = 0;\n let definitionSourcesIndex = 0;\n let definitionScopeIndex = 0;\n let callsiteSourcesIndex = 0;\n let callsiteLine = 0;\n let callsiteColumn = 0;\n let bindingLine = 0;\n let bindingColumn = 0;\n\n do {\n const semi = reader.indexOf(';');\n let genColumn = 0;\n\n for (; reader.pos < semi; reader.pos++) {\n genColumn = decodeInteger(reader, genColumn);\n\n if (!hasMoreVlq(reader, semi)) {\n const last = stack.pop()!;\n last[2] = genLine;\n last[3] = genColumn;\n continue;\n }\n\n const fields = decodeInteger(reader, 0);\n const hasDefinition = fields & 0b0001;\n const hasCallsite = fields & 0b0010;\n const hasScope = fields & 0b0100;\n\n let callsite: CallSite | null = null;\n let bindings: Binding[] = EMPTY;\n let range: GeneratedRange;\n if (hasDefinition) {\n const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);\n definitionScopeIndex = decodeInteger(\n reader,\n definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0,\n );\n\n definitionSourcesIndex = defSourcesIndex;\n range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex] as GeneratedRange;\n } else {\n range = [genLine, genColumn, 0, 0] as GeneratedRange;\n }\n\n range.isScope = !!hasScope;\n\n if (hasCallsite) {\n const prevCsi = callsiteSourcesIndex;\n const prevLine = callsiteLine;\n callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);\n const sameSource = prevCsi === callsiteSourcesIndex;\n callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);\n callsiteColumn = decodeInteger(\n reader,\n sameSource && prevLine === callsiteLine ? callsiteColumn : 0,\n );\n\n callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];\n }\n range.callsite = callsite;\n\n if (hasMoreVlq(reader, semi)) {\n bindings = [];\n do {\n bindingLine = genLine;\n bindingColumn = genColumn;\n const expressionsCount = decodeInteger(reader, 0);\n let expressionRanges: BindingExpressionRange[];\n if (expressionsCount < -1) {\n expressionRanges = [[decodeInteger(reader, 0)]];\n for (let i = -1; i > expressionsCount; i--) {\n const prevBl = bindingLine;\n bindingLine = decodeInteger(reader, bindingLine);\n bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);\n const expression = decodeInteger(reader, 0);\n expressionRanges.push([expression, bindingLine, bindingColumn]);\n }\n } else {\n expressionRanges = [[expressionsCount]];\n }\n bindings.push(expressionRanges);\n } while (hasMoreVlq(reader, semi));\n }\n range.bindings = bindings;\n\n ranges.push(range);\n stack.push(range);\n }\n\n genLine++;\n reader.pos = semi + 1;\n } while (reader.pos < length);\n\n return ranges;\n}\n\nexport function encodeGeneratedRanges(ranges: GeneratedRange[]): string {\n if (ranges.length === 0) return '';\n\n const writer = new StringWriter();\n\n for (let i = 0; i < ranges.length; ) {\n i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);\n }\n\n return writer.flush();\n}\n\nfunction _encodeGeneratedRanges(\n ranges: GeneratedRange[],\n index: number,\n writer: StringWriter,\n state: [\n number, // GenLine\n number, // GenColumn\n number, // DefSourcesIndex\n number, // DefScopesIndex\n number, // CallSourcesIndex\n number, // CallLine\n number, // CallColumn\n ],\n): number {\n const range = ranges[index];\n const {\n 0: startLine,\n 1: startColumn,\n 2: endLine,\n 3: endColumn,\n isScope,\n callsite,\n bindings,\n } = range;\n\n if (state[0] < startLine) {\n catchupLine(writer, state[0], startLine);\n state[0] = startLine;\n state[1] = 0;\n } else if (index > 0) {\n writer.write(comma);\n }\n\n state[1] = encodeInteger(writer, range[1], state[1]);\n\n const fields =\n (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0);\n encodeInteger(writer, fields, 0);\n\n if (range.length === 6) {\n const { 4: sourcesIndex, 5: scopesIndex } = range;\n if (sourcesIndex !== state[2]) {\n state[3] = 0;\n }\n state[2] = encodeInteger(writer, sourcesIndex, state[2]);\n state[3] = encodeInteger(writer, scopesIndex, state[3]);\n }\n\n if (callsite) {\n const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite!;\n if (sourcesIndex !== state[4]) {\n state[5] = 0;\n state[6] = 0;\n } else if (callLine !== state[5]) {\n state[6] = 0;\n }\n state[4] = encodeInteger(writer, sourcesIndex, state[4]);\n state[5] = encodeInteger(writer, callLine, state[5]);\n state[6] = encodeInteger(writer, callColumn, state[6]);\n }\n\n if (bindings) {\n for (const binding of bindings) {\n if (binding.length > 1) encodeInteger(writer, -binding.length, 0);\n const expression = binding[0][0];\n encodeInteger(writer, expression, 0);\n let bindingStartLine = startLine;\n let bindingStartColumn = startColumn;\n for (let i = 1; i < binding.length; i++) {\n const expRange = binding[i];\n bindingStartLine = encodeInteger(writer, expRange[1]!, bindingStartLine);\n bindingStartColumn = encodeInteger(writer, expRange[2]!, bindingStartColumn);\n encodeInteger(writer, expRange[0]!, 0);\n }\n }\n }\n\n for (index++; index < ranges.length; ) {\n const next = ranges[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeGeneratedRanges(ranges, index, writer, state);\n }\n\n if (state[0] < endLine) {\n catchupLine(writer, state[0], endLine);\n state[0] = endLine;\n state[1] = 0;\n } else {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, endColumn, state[1]);\n\n return index;\n}\n\nfunction catchupLine(writer: StringWriter, lastLine: number, line: number) {\n do {\n writer.write(semicolon);\n } while (++lastLine < line);\n}\n","import { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq';\nimport { StringWriter, StringReader } from './strings';\n\nexport {\n decodeOriginalScopes,\n encodeOriginalScopes,\n decodeGeneratedRanges,\n encodeGeneratedRanges,\n} from './scopes';\nexport type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes';\n\nexport type SourceMapSegment =\n | [number]\n | [number, number, number, number]\n | [number, number, number, number, number];\nexport type SourceMapLine = SourceMapSegment[];\nexport type SourceMapMappings = SourceMapLine[];\n\nexport function decode(mappings: string): SourceMapMappings {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded: SourceMapMappings = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n\n do {\n const semi = reader.indexOf(';');\n const line: SourceMapLine = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n\n while (reader.pos < semi) {\n let seg: SourceMapSegment;\n\n genColumn = decodeInteger(reader, genColumn);\n if (genColumn < lastCol) sorted = false;\n lastCol = genColumn;\n\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex = decodeInteger(reader, sourcesIndex);\n sourceLine = decodeInteger(reader, sourceLine);\n sourceColumn = decodeInteger(reader, sourceColumn);\n\n if (hasMoreVlq(reader, semi)) {\n namesIndex = decodeInteger(reader, namesIndex);\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n } else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n } else {\n seg = [genColumn];\n }\n\n line.push(seg);\n reader.pos++;\n }\n\n if (!sorted) sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n\n return decoded;\n}\n\nfunction sort(line: SourceMapSegment[]) {\n line.sort(sortComparator);\n}\n\nfunction sortComparator(a: SourceMapSegment, b: SourceMapSegment): number {\n return a[0] - b[0];\n}\n\nexport function encode(decoded: SourceMapMappings): string;\nexport function encode(decoded: Readonly): string;\nexport function encode(decoded: Readonly): string {\n const writer = new StringWriter();\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0) writer.write(semicolon);\n if (line.length === 0) continue;\n\n let genColumn = 0;\n\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n if (j > 0) writer.write(comma);\n\n genColumn = encodeInteger(writer, segment[0], genColumn);\n\n if (segment.length === 1) continue;\n sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);\n sourceLine = encodeInteger(writer, segment[2], sourceLine);\n sourceColumn = encodeInteger(writer, segment[3], sourceColumn);\n\n if (segment.length === 4) continue;\n namesIndex = encodeInteger(writer, segment[4], namesIndex);\n }\n }\n\n return writer.flush();\n}\n"],"names":[],"mappings":"AAEO,MAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAChC,MAAM,SAAS,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAE3C,MAAM,KAAK,GAAG,kEAAkE,CAAC;AACjF,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AACrC,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;AAEtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACrC,MAAM,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAC9B,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACjB,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CAClB;SAEe,aAAa,CAAC,MAAoB,EAAE,QAAgB;IAClE,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,OAAO,GAAG,CAAC,CAAC;IAEhB,GAAG;QACD,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;QACxB,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QACvB,KAAK,IAAI,CAAC,OAAO,GAAG,EAAE,KAAK,KAAK,CAAC;QACjC,KAAK,IAAI,CAAC,CAAC;KACZ,QAAQ,OAAO,GAAG,EAAE,EAAE;IAEvB,MAAM,YAAY,GAAG,KAAK,GAAG,CAAC,CAAC;IAC/B,KAAK,MAAM,CAAC,CAAC;IAEb,IAAI,YAAY,EAAE;QAChB,KAAK,GAAG,CAAC,UAAU,GAAG,CAAC,KAAK,CAAC;KAC9B;IAED,OAAO,QAAQ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Y,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;YAC/D,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;YAC3D,YAAY,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;YAE/D,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;gBAAE,SAAS;YACnC,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;SAC5D;KACF;IAED,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC;AACxB;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js new file mode 100644 index 0000000..93caf17 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js @@ -0,0 +1,439 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.sourcemapCodec = {})); +})(this, (function (exports) { 'use strict'; + + const comma = ','.charCodeAt(0); + const semicolon = ';'.charCodeAt(0); + const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + const intToChar = new Uint8Array(64); // 64 possible chars. + const charToInt = new Uint8Array(128); // z is 122 in ASCII + for (let i = 0; i < chars.length; i++) { + const c = chars.charCodeAt(i); + intToChar[i] = c; + charToInt[c] = i; + } + function decodeInteger(reader, relative) { + let value = 0; + let shift = 0; + let integer = 0; + do { + const c = reader.next(); + integer = charToInt[c]; + value |= (integer & 31) << shift; + shift += 5; + } while (integer & 32); + const shouldNegate = value & 1; + value >>>= 1; + if (shouldNegate) { + value = -0x80000000 | -value; + } + return relative + value; + } + function encodeInteger(builder, num, relative) { + let delta = num - relative; + delta = delta < 0 ? (-delta << 1) | 1 : delta << 1; + do { + let clamped = delta & 0b011111; + delta >>>= 5; + if (delta > 0) + clamped |= 0b100000; + builder.write(intToChar[clamped]); + } while (delta > 0); + return num; + } + function hasMoreVlq(reader, max) { + if (reader.pos >= max) + return false; + return reader.peek() !== comma; + } + + const bufLength = 1024 * 16; + // Provide a fallback for older environments. + const td = typeof TextDecoder !== 'undefined' + ? /* #__PURE__ */ new TextDecoder() + : typeof Buffer !== 'undefined' + ? { + decode(buf) { + const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); + return out.toString(); + }, + } + : { + decode(buf) { + let out = ''; + for (let i = 0; i < buf.length; i++) { + out += String.fromCharCode(buf[i]); + } + return out; + }, + }; + class StringWriter { + constructor() { + this.pos = 0; + this.out = ''; + this.buffer = new Uint8Array(bufLength); + } + write(v) { + const { buffer } = this; + buffer[this.pos++] = v; + if (this.pos === bufLength) { + this.out += td.decode(buffer); + this.pos = 0; + } + } + flush() { + const { buffer, out, pos } = this; + return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; + } + } + class StringReader { + constructor(buffer) { + this.pos = 0; + this.buffer = buffer; + } + next() { + return this.buffer.charCodeAt(this.pos++); + } + peek() { + return this.buffer.charCodeAt(this.pos); + } + indexOf(char) { + const { buffer, pos } = this; + const idx = buffer.indexOf(char, pos); + return idx === -1 ? buffer.length : idx; + } + } + + const EMPTY = []; + function decodeOriginalScopes(input) { + const { length } = input; + const reader = new StringReader(input); + const scopes = []; + const stack = []; + let line = 0; + for (; reader.pos < length; reader.pos++) { + line = decodeInteger(reader, line); + const column = decodeInteger(reader, 0); + if (!hasMoreVlq(reader, length)) { + const last = stack.pop(); + last[2] = line; + last[3] = column; + continue; + } + const kind = decodeInteger(reader, 0); + const fields = decodeInteger(reader, 0); + const hasName = fields & 0b0001; + const scope = (hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]); + let vars = EMPTY; + if (hasMoreVlq(reader, length)) { + vars = []; + do { + const varsIndex = decodeInteger(reader, 0); + vars.push(varsIndex); + } while (hasMoreVlq(reader, length)); + } + scope.vars = vars; + scopes.push(scope); + stack.push(scope); + } + return scopes; + } + function encodeOriginalScopes(scopes) { + const writer = new StringWriter(); + for (let i = 0; i < scopes.length;) { + i = _encodeOriginalScopes(scopes, i, writer, [0]); + } + return writer.flush(); + } + function _encodeOriginalScopes(scopes, index, writer, state) { + const scope = scopes[index]; + const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; + if (index > 0) + writer.write(comma); + state[0] = encodeInteger(writer, startLine, state[0]); + encodeInteger(writer, startColumn, 0); + encodeInteger(writer, kind, 0); + const fields = scope.length === 6 ? 0b0001 : 0; + encodeInteger(writer, fields, 0); + if (scope.length === 6) + encodeInteger(writer, scope[5], 0); + for (const v of vars) { + encodeInteger(writer, v, 0); + } + for (index++; index < scopes.length;) { + const next = scopes[index]; + const { 0: l, 1: c } = next; + if (l > endLine || (l === endLine && c >= endColumn)) { + break; + } + index = _encodeOriginalScopes(scopes, index, writer, state); + } + writer.write(comma); + state[0] = encodeInteger(writer, endLine, state[0]); + encodeInteger(writer, endColumn, 0); + return index; + } + function decodeGeneratedRanges(input) { + const { length } = input; + const reader = new StringReader(input); + const ranges = []; + const stack = []; + let genLine = 0; + let definitionSourcesIndex = 0; + let definitionScopeIndex = 0; + let callsiteSourcesIndex = 0; + let callsiteLine = 0; + let callsiteColumn = 0; + let bindingLine = 0; + let bindingColumn = 0; + do { + const semi = reader.indexOf(';'); + let genColumn = 0; + for (; reader.pos < semi; reader.pos++) { + genColumn = decodeInteger(reader, genColumn); + if (!hasMoreVlq(reader, semi)) { + const last = stack.pop(); + last[2] = genLine; + last[3] = genColumn; + continue; + } + const fields = decodeInteger(reader, 0); + const hasDefinition = fields & 0b0001; + const hasCallsite = fields & 0b0010; + const hasScope = fields & 0b0100; + let callsite = null; + let bindings = EMPTY; + let range; + if (hasDefinition) { + const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex); + definitionScopeIndex = decodeInteger(reader, definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0); + definitionSourcesIndex = defSourcesIndex; + range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex]; + } + else { + range = [genLine, genColumn, 0, 0]; + } + range.isScope = !!hasScope; + if (hasCallsite) { + const prevCsi = callsiteSourcesIndex; + const prevLine = callsiteLine; + callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex); + const sameSource = prevCsi === callsiteSourcesIndex; + callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0); + callsiteColumn = decodeInteger(reader, sameSource && prevLine === callsiteLine ? callsiteColumn : 0); + callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn]; + } + range.callsite = callsite; + if (hasMoreVlq(reader, semi)) { + bindings = []; + do { + bindingLine = genLine; + bindingColumn = genColumn; + const expressionsCount = decodeInteger(reader, 0); + let expressionRanges; + if (expressionsCount < -1) { + expressionRanges = [[decodeInteger(reader, 0)]]; + for (let i = -1; i > expressionsCount; i--) { + const prevBl = bindingLine; + bindingLine = decodeInteger(reader, bindingLine); + bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0); + const expression = decodeInteger(reader, 0); + expressionRanges.push([expression, bindingLine, bindingColumn]); + } + } + else { + expressionRanges = [[expressionsCount]]; + } + bindings.push(expressionRanges); + } while (hasMoreVlq(reader, semi)); + } + range.bindings = bindings; + ranges.push(range); + stack.push(range); + } + genLine++; + reader.pos = semi + 1; + } while (reader.pos < length); + return ranges; + } + function encodeGeneratedRanges(ranges) { + if (ranges.length === 0) + return ''; + const writer = new StringWriter(); + for (let i = 0; i < ranges.length;) { + i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]); + } + return writer.flush(); + } + function _encodeGeneratedRanges(ranges, index, writer, state) { + const range = ranges[index]; + const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, isScope, callsite, bindings, } = range; + if (state[0] < startLine) { + catchupLine(writer, state[0], startLine); + state[0] = startLine; + state[1] = 0; + } + else if (index > 0) { + writer.write(comma); + } + state[1] = encodeInteger(writer, range[1], state[1]); + const fields = (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0); + encodeInteger(writer, fields, 0); + if (range.length === 6) { + const { 4: sourcesIndex, 5: scopesIndex } = range; + if (sourcesIndex !== state[2]) { + state[3] = 0; + } + state[2] = encodeInteger(writer, sourcesIndex, state[2]); + state[3] = encodeInteger(writer, scopesIndex, state[3]); + } + if (callsite) { + const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite; + if (sourcesIndex !== state[4]) { + state[5] = 0; + state[6] = 0; + } + else if (callLine !== state[5]) { + state[6] = 0; + } + state[4] = encodeInteger(writer, sourcesIndex, state[4]); + state[5] = encodeInteger(writer, callLine, state[5]); + state[6] = encodeInteger(writer, callColumn, state[6]); + } + if (bindings) { + for (const binding of bindings) { + if (binding.length > 1) + encodeInteger(writer, -binding.length, 0); + const expression = binding[0][0]; + encodeInteger(writer, expression, 0); + let bindingStartLine = startLine; + let bindingStartColumn = startColumn; + for (let i = 1; i < binding.length; i++) { + const expRange = binding[i]; + bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine); + bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn); + encodeInteger(writer, expRange[0], 0); + } + } + } + for (index++; index < ranges.length;) { + const next = ranges[index]; + const { 0: l, 1: c } = next; + if (l > endLine || (l === endLine && c >= endColumn)) { + break; + } + index = _encodeGeneratedRanges(ranges, index, writer, state); + } + if (state[0] < endLine) { + catchupLine(writer, state[0], endLine); + state[0] = endLine; + state[1] = 0; + } + else { + writer.write(comma); + } + state[1] = encodeInteger(writer, endColumn, state[1]); + return index; + } + function catchupLine(writer, lastLine, line) { + do { + writer.write(semicolon); + } while (++lastLine < line); + } + + function decode(mappings) { + const { length } = mappings; + const reader = new StringReader(mappings); + const decoded = []; + let genColumn = 0; + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + do { + const semi = reader.indexOf(';'); + const line = []; + let sorted = true; + let lastCol = 0; + genColumn = 0; + while (reader.pos < semi) { + let seg; + genColumn = decodeInteger(reader, genColumn); + if (genColumn < lastCol) + sorted = false; + lastCol = genColumn; + if (hasMoreVlq(reader, semi)) { + sourcesIndex = decodeInteger(reader, sourcesIndex); + sourceLine = decodeInteger(reader, sourceLine); + sourceColumn = decodeInteger(reader, sourceColumn); + if (hasMoreVlq(reader, semi)) { + namesIndex = decodeInteger(reader, namesIndex); + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; + } + else { + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; + } + } + else { + seg = [genColumn]; + } + line.push(seg); + reader.pos++; + } + if (!sorted) + sort(line); + decoded.push(line); + reader.pos = semi + 1; + } while (reader.pos <= length); + return decoded; + } + function sort(line) { + line.sort(sortComparator); + } + function sortComparator(a, b) { + return a[0] - b[0]; + } + function encode(decoded) { + const writer = new StringWriter(); + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + if (i > 0) + writer.write(semicolon); + if (line.length === 0) + continue; + let genColumn = 0; + for (let j = 0; j < line.length; j++) { + const segment = line[j]; + if (j > 0) + writer.write(comma); + genColumn = encodeInteger(writer, segment[0], genColumn); + if (segment.length === 1) + continue; + sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); + sourceLine = encodeInteger(writer, segment[2], sourceLine); + sourceColumn = encodeInteger(writer, segment[3], sourceColumn); + if (segment.length === 4) + continue; + namesIndex = encodeInteger(writer, segment[4], namesIndex); + } + } + return writer.flush(); + } + + exports.decode = decode; + exports.decodeGeneratedRanges = decodeGeneratedRanges; + exports.decodeOriginalScopes = decodeOriginalScopes; + exports.encode = encode; + exports.encodeGeneratedRanges = encodeGeneratedRanges; + exports.encodeOriginalScopes = encodeOriginalScopes; + + Object.defineProperty(exports, '__esModule', { value: true }); + +})); +//# sourceMappingURL=sourcemap-codec.umd.js.map diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map new file mode 100644 index 0000000..65b3674 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-codec.umd.js","sources":["../src/vlq.ts","../src/strings.ts","../src/scopes.ts","../src/sourcemap-codec.ts"],"sourcesContent":["import type { StringReader, StringWriter } from './strings';\n\nexport const comma = ','.charCodeAt(0);\nexport const semicolon = ';'.charCodeAt(0);\n\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst intToChar = new Uint8Array(64); // 64 possible chars.\nconst charToInt = new Uint8Array(128); // z is 122 in ASCII\n\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\n\nexport function decodeInteger(reader: StringReader, relative: number): number {\n let value = 0;\n let shift = 0;\n let integer = 0;\n\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n\n const shouldNegate = value & 1;\n value >>>= 1;\n\n if (shouldNegate) {\n value = -0x80000000 | -value;\n }\n\n return relative + value;\n}\n\nexport function encodeInteger(builder: StringWriter, num: number, relative: number): number {\n let delta = num - relative;\n\n delta = delta < 0 ? (-delta << 1) | 1 : delta << 1;\n do {\n let clamped = delta & 0b011111;\n delta >>>= 5;\n if (delta > 0) clamped |= 0b100000;\n builder.write(intToChar[clamped]);\n } while (delta > 0);\n\n return num;\n}\n\nexport function hasMoreVlq(reader: StringReader, max: number) {\n if (reader.pos >= max) return false;\n return reader.peek() !== comma;\n}\n","const bufLength = 1024 * 16;\n\n// Provide a fallback for older environments.\nconst td =\n typeof TextDecoder !== 'undefined'\n ? /* #__PURE__ */ new TextDecoder()\n : typeof Buffer !== 'undefined'\n ? {\n decode(buf: Uint8Array): string {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n },\n }\n : {\n decode(buf: Uint8Array): string {\n let out = '';\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n },\n };\n\nexport class StringWriter {\n pos = 0;\n private out = '';\n private buffer = new Uint8Array(bufLength);\n\n write(v: number): void {\n const { buffer } = this;\n buffer[this.pos++] = v;\n if (this.pos === bufLength) {\n this.out += td.decode(buffer);\n this.pos = 0;\n }\n }\n\n flush(): string {\n const { buffer, out, pos } = this;\n return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;\n }\n}\n\nexport class StringReader {\n pos = 0;\n private declare buffer: string;\n\n constructor(buffer: string) {\n this.buffer = buffer;\n }\n\n next(): number {\n return this.buffer.charCodeAt(this.pos++);\n }\n\n peek(): number {\n return this.buffer.charCodeAt(this.pos);\n }\n\n indexOf(char: string): number {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n}\n","import { StringReader, StringWriter } from './strings';\nimport { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq';\n\nconst EMPTY: any[] = [];\n\ntype Line = number;\ntype Column = number;\ntype Kind = number;\ntype Name = number;\ntype Var = number;\ntype SourcesIndex = number;\ntype ScopesIndex = number;\n\ntype Mix = (A & O) | (B & O);\n\nexport type OriginalScope = Mix<\n [Line, Column, Line, Column, Kind],\n [Line, Column, Line, Column, Kind, Name],\n { vars: Var[] }\n>;\n\nexport type GeneratedRange = Mix<\n [Line, Column, Line, Column],\n [Line, Column, Line, Column, SourcesIndex, ScopesIndex],\n {\n callsite: CallSite | null;\n bindings: Binding[];\n isScope: boolean;\n }\n>;\nexport type CallSite = [SourcesIndex, Line, Column];\ntype Binding = BindingExpressionRange[];\nexport type BindingExpressionRange = [Name] | [Name, Line, Column];\n\nexport function decodeOriginalScopes(input: string): OriginalScope[] {\n const { length } = input;\n const reader = new StringReader(input);\n const scopes: OriginalScope[] = [];\n const stack: OriginalScope[] = [];\n let line = 0;\n\n for (; reader.pos < length; reader.pos++) {\n line = decodeInteger(reader, line);\n const column = decodeInteger(reader, 0);\n\n if (!hasMoreVlq(reader, length)) {\n const last = stack.pop()!;\n last[2] = line;\n last[3] = column;\n continue;\n }\n\n const kind = decodeInteger(reader, 0);\n const fields = decodeInteger(reader, 0);\n const hasName = fields & 0b0001;\n\n const scope: OriginalScope = (\n hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]\n ) as OriginalScope;\n\n let vars: Var[] = EMPTY;\n if (hasMoreVlq(reader, length)) {\n vars = [];\n do {\n const varsIndex = decodeInteger(reader, 0);\n vars.push(varsIndex);\n } while (hasMoreVlq(reader, length));\n }\n scope.vars = vars;\n\n scopes.push(scope);\n stack.push(scope);\n }\n\n return scopes;\n}\n\nexport function encodeOriginalScopes(scopes: OriginalScope[]): string {\n const writer = new StringWriter();\n\n for (let i = 0; i < scopes.length; ) {\n i = _encodeOriginalScopes(scopes, i, writer, [0]);\n }\n\n return writer.flush();\n}\n\nfunction _encodeOriginalScopes(\n scopes: OriginalScope[],\n index: number,\n writer: StringWriter,\n state: [\n number, // GenColumn\n ],\n): number {\n const scope = scopes[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;\n\n if (index > 0) writer.write(comma);\n\n state[0] = encodeInteger(writer, startLine, state[0]);\n encodeInteger(writer, startColumn, 0);\n encodeInteger(writer, kind, 0);\n\n const fields = scope.length === 6 ? 0b0001 : 0;\n encodeInteger(writer, fields, 0);\n if (scope.length === 6) encodeInteger(writer, scope[5], 0);\n\n for (const v of vars) {\n encodeInteger(writer, v, 0);\n }\n\n for (index++; index < scopes.length; ) {\n const next = scopes[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeOriginalScopes(scopes, index, writer, state);\n }\n\n writer.write(comma);\n state[0] = encodeInteger(writer, endLine, state[0]);\n encodeInteger(writer, endColumn, 0);\n\n return index;\n}\n\nexport function decodeGeneratedRanges(input: string): GeneratedRange[] {\n const { length } = input;\n const reader = new StringReader(input);\n const ranges: GeneratedRange[] = [];\n const stack: GeneratedRange[] = [];\n\n let genLine = 0;\n let definitionSourcesIndex = 0;\n let definitionScopeIndex = 0;\n let callsiteSourcesIndex = 0;\n let callsiteLine = 0;\n let callsiteColumn = 0;\n let bindingLine = 0;\n let bindingColumn = 0;\n\n do {\n const semi = reader.indexOf(';');\n let genColumn = 0;\n\n for (; reader.pos < semi; reader.pos++) {\n genColumn = decodeInteger(reader, genColumn);\n\n if (!hasMoreVlq(reader, semi)) {\n const last = stack.pop()!;\n last[2] = genLine;\n last[3] = genColumn;\n continue;\n }\n\n const fields = decodeInteger(reader, 0);\n const hasDefinition = fields & 0b0001;\n const hasCallsite = fields & 0b0010;\n const hasScope = fields & 0b0100;\n\n let callsite: CallSite | null = null;\n let bindings: Binding[] = EMPTY;\n let range: GeneratedRange;\n if (hasDefinition) {\n const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);\n definitionScopeIndex = decodeInteger(\n reader,\n definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0,\n );\n\n definitionSourcesIndex = defSourcesIndex;\n range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex] as GeneratedRange;\n } else {\n range = [genLine, genColumn, 0, 0] as GeneratedRange;\n }\n\n range.isScope = !!hasScope;\n\n if (hasCallsite) {\n const prevCsi = callsiteSourcesIndex;\n const prevLine = callsiteLine;\n callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);\n const sameSource = prevCsi === callsiteSourcesIndex;\n callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);\n callsiteColumn = decodeInteger(\n reader,\n sameSource && prevLine === callsiteLine ? callsiteColumn : 0,\n );\n\n callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];\n }\n range.callsite = callsite;\n\n if (hasMoreVlq(reader, semi)) {\n bindings = [];\n do {\n bindingLine = genLine;\n bindingColumn = genColumn;\n const expressionsCount = decodeInteger(reader, 0);\n let expressionRanges: BindingExpressionRange[];\n if (expressionsCount < -1) {\n expressionRanges = [[decodeInteger(reader, 0)]];\n for (let i = -1; i > expressionsCount; i--) {\n const prevBl = bindingLine;\n bindingLine = decodeInteger(reader, bindingLine);\n bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);\n const expression = decodeInteger(reader, 0);\n expressionRanges.push([expression, bindingLine, bindingColumn]);\n }\n } else {\n expressionRanges = [[expressionsCount]];\n }\n bindings.push(expressionRanges);\n } while (hasMoreVlq(reader, semi));\n }\n range.bindings = bindings;\n\n ranges.push(range);\n stack.push(range);\n }\n\n genLine++;\n reader.pos = semi + 1;\n } while (reader.pos < length);\n\n return ranges;\n}\n\nexport function encodeGeneratedRanges(ranges: GeneratedRange[]): string {\n if (ranges.length === 0) return '';\n\n const writer = new StringWriter();\n\n for (let i = 0; i < ranges.length; ) {\n i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);\n }\n\n return writer.flush();\n}\n\nfunction _encodeGeneratedRanges(\n ranges: GeneratedRange[],\n index: number,\n writer: StringWriter,\n state: [\n number, // GenLine\n number, // GenColumn\n number, // DefSourcesIndex\n number, // DefScopesIndex\n number, // CallSourcesIndex\n number, // CallLine\n number, // CallColumn\n ],\n): number {\n const range = ranges[index];\n const {\n 0: startLine,\n 1: startColumn,\n 2: endLine,\n 3: endColumn,\n isScope,\n callsite,\n bindings,\n } = range;\n\n if (state[0] < startLine) {\n catchupLine(writer, state[0], startLine);\n state[0] = startLine;\n state[1] = 0;\n } else if (index > 0) {\n writer.write(comma);\n }\n\n state[1] = encodeInteger(writer, range[1], state[1]);\n\n const fields =\n (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0);\n encodeInteger(writer, fields, 0);\n\n if (range.length === 6) {\n const { 4: sourcesIndex, 5: scopesIndex } = range;\n if (sourcesIndex !== state[2]) {\n state[3] = 0;\n }\n state[2] = encodeInteger(writer, sourcesIndex, state[2]);\n state[3] = encodeInteger(writer, scopesIndex, state[3]);\n }\n\n if (callsite) {\n const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite!;\n if (sourcesIndex !== state[4]) {\n state[5] = 0;\n state[6] = 0;\n } else if (callLine !== state[5]) {\n state[6] = 0;\n }\n state[4] = encodeInteger(writer, sourcesIndex, state[4]);\n state[5] = encodeInteger(writer, callLine, state[5]);\n state[6] = encodeInteger(writer, callColumn, state[6]);\n }\n\n if (bindings) {\n for (const binding of bindings) {\n if (binding.length > 1) encodeInteger(writer, -binding.length, 0);\n const expression = binding[0][0];\n encodeInteger(writer, expression, 0);\n let bindingStartLine = startLine;\n let bindingStartColumn = startColumn;\n for (let i = 1; i < binding.length; i++) {\n const expRange = binding[i];\n bindingStartLine = encodeInteger(writer, expRange[1]!, bindingStartLine);\n bindingStartColumn = encodeInteger(writer, expRange[2]!, bindingStartColumn);\n encodeInteger(writer, expRange[0]!, 0);\n }\n }\n }\n\n for (index++; index < ranges.length; ) {\n const next = ranges[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeGeneratedRanges(ranges, index, writer, state);\n }\n\n if (state[0] < endLine) {\n catchupLine(writer, state[0], endLine);\n state[0] = endLine;\n state[1] = 0;\n } else {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, endColumn, state[1]);\n\n return index;\n}\n\nfunction catchupLine(writer: StringWriter, lastLine: number, line: number) {\n do {\n writer.write(semicolon);\n } while (++lastLine < line);\n}\n","import { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq';\nimport { StringWriter, StringReader } from './strings';\n\nexport {\n decodeOriginalScopes,\n encodeOriginalScopes,\n decodeGeneratedRanges,\n encodeGeneratedRanges,\n} from './scopes';\nexport type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes';\n\nexport type SourceMapSegment =\n | [number]\n | [number, number, number, number]\n | [number, number, number, number, number];\nexport type SourceMapLine = SourceMapSegment[];\nexport type SourceMapMappings = SourceMapLine[];\n\nexport function decode(mappings: string): SourceMapMappings {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded: SourceMapMappings = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n\n do {\n const semi = reader.indexOf(';');\n const line: SourceMapLine = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n\n while (reader.pos < semi) {\n let seg: SourceMapSegment;\n\n genColumn = decodeInteger(reader, genColumn);\n if (genColumn < lastCol) sorted = false;\n lastCol = genColumn;\n\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex = decodeInteger(reader, sourcesIndex);\n sourceLine = decodeInteger(reader, sourceLine);\n sourceColumn = decodeInteger(reader, sourceColumn);\n\n if (hasMoreVlq(reader, semi)) {\n namesIndex = decodeInteger(reader, namesIndex);\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n } else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n } else {\n seg = [genColumn];\n }\n\n line.push(seg);\n reader.pos++;\n }\n\n if (!sorted) sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n\n return decoded;\n}\n\nfunction sort(line: SourceMapSegment[]) {\n line.sort(sortComparator);\n}\n\nfunction sortComparator(a: SourceMapSegment, b: SourceMapSegment): number {\n return a[0] - b[0];\n}\n\nexport function encode(decoded: SourceMapMappings): string;\nexport function encode(decoded: Readonly): string;\nexport function encode(decoded: Readonly): string {\n const writer = new StringWriter();\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0) writer.write(semicolon);\n if (line.length === 0) continue;\n\n let genColumn = 0;\n\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n if (j > 0) writer.write(comma);\n\n genColumn = encodeInteger(writer, segment[0], genColumn);\n\n if (segment.length === 1) continue;\n sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);\n sourceLine = encodeInteger(writer, segment[2], sourceLine);\n sourceColumn = encodeInteger(writer, segment[3], sourceColumn);\n\n if (segment.length === 4) continue;\n namesIndex = encodeInteger(writer, segment[4], namesIndex);\n }\n }\n\n return writer.flush();\n}\n"],"names":[],"mappings":";;;;;;IAEO,MAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAChC,MAAM,SAAS,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAE3C,MAAM,KAAK,GAAG,kEAAkE,CAAC;IACjF,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;IACrC,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;IAEtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,MAAM,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC9B,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACjB,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;KAClB;aAEe,aAAa,CAAC,MAAoB,EAAE,QAAgB;QAClE,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,IAAI,KAAK,GAAG,CAAC,CAAC;QAC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C;gBAAE,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;YACnC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;gBAAE,SAAS;YAEhC,IAAI,SAAS,GAAG,CAAC,CAAC;YAElB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACpC,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;gBACxB,IAAI,CAAC,GAAG,CAAC;oBAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBAE/B,SAAS,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;gBAEzD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;oBAAE,SAAS;gBACnC,YAAY,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;gBAC/D,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;gBAC3D,YAAY,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;gBAE/D,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;oBAAE,SAAS;gBACnC,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;aAC5D;SACF;QAED,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC;IACxB;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/types/scopes.d.ts b/node_modules/@jridgewell/sourcemap-codec/dist/types/scopes.d.ts new file mode 100644 index 0000000..d156fab --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/types/scopes.d.ts @@ -0,0 +1,49 @@ +declare type Line = number; +declare type Column = number; +declare type Kind = number; +declare type Name = number; +declare type Var = number; +declare type SourcesIndex = number; +declare type ScopesIndex = number; +declare type Mix = (A & O) | (B & O); +export declare type OriginalScope = Mix<[ + Line, + Column, + Line, + Column, + Kind +], [ + Line, + Column, + Line, + Column, + Kind, + Name +], { + vars: Var[]; +}>; +export declare type GeneratedRange = Mix<[ + Line, + Column, + Line, + Column +], [ + Line, + Column, + Line, + Column, + SourcesIndex, + ScopesIndex +], { + callsite: CallSite | null; + bindings: Binding[]; + isScope: boolean; +}>; +export declare type CallSite = [SourcesIndex, Line, Column]; +declare type Binding = BindingExpressionRange[]; +export declare type BindingExpressionRange = [Name] | [Name, Line, Column]; +export declare function decodeOriginalScopes(input: string): OriginalScope[]; +export declare function encodeOriginalScopes(scopes: OriginalScope[]): string; +export declare function decodeGeneratedRanges(input: string): GeneratedRange[]; +export declare function encodeGeneratedRanges(ranges: GeneratedRange[]): string; +export {}; diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts b/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts new file mode 100644 index 0000000..336e658 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts @@ -0,0 +1,8 @@ +export { decodeOriginalScopes, encodeOriginalScopes, decodeGeneratedRanges, encodeGeneratedRanges, } from './scopes'; +export type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes'; +export declare type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number]; +export declare type SourceMapLine = SourceMapSegment[]; +export declare type SourceMapMappings = SourceMapLine[]; +export declare function decode(mappings: string): SourceMapMappings; +export declare function encode(decoded: SourceMapMappings): string; +export declare function encode(decoded: Readonly): string; diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/types/strings.d.ts b/node_modules/@jridgewell/sourcemap-codec/dist/types/strings.d.ts new file mode 100644 index 0000000..78bd88e --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/types/strings.d.ts @@ -0,0 +1,15 @@ +export declare class StringWriter { + pos: number; + private out; + private buffer; + write(v: number): void; + flush(): string; +} +export declare class StringReader { + pos: number; + private buffer; + constructor(buffer: string); + next(): number; + peek(): number; + indexOf(char: string): number; +} diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/types/vlq.d.ts b/node_modules/@jridgewell/sourcemap-codec/dist/types/vlq.d.ts new file mode 100644 index 0000000..450ee57 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/types/vlq.d.ts @@ -0,0 +1,6 @@ +import type { StringReader, StringWriter } from './strings'; +export declare const comma: number; +export declare const semicolon: number; +export declare function decodeInteger(reader: StringReader, relative: number): number; +export declare function encodeInteger(builder: StringWriter, num: number, relative: number): number; +export declare function hasMoreVlq(reader: StringReader, max: number): boolean; diff --git a/node_modules/@jridgewell/sourcemap-codec/package.json b/node_modules/@jridgewell/sourcemap-codec/package.json new file mode 100644 index 0000000..7168efc --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/package.json @@ -0,0 +1,75 @@ +{ + "name": "@jridgewell/sourcemap-codec", + "version": "1.5.0", + "description": "Encode/decode sourcemap mappings", + "keywords": [ + "sourcemap", + "vlq" + ], + "main": "dist/sourcemap-codec.umd.js", + "module": "dist/sourcemap-codec.mjs", + "types": "dist/types/sourcemap-codec.d.ts", + "files": [ + "dist" + ], + "exports": { + ".": [ + { + "types": "./dist/types/sourcemap-codec.d.ts", + "browser": "./dist/sourcemap-codec.umd.js", + "require": "./dist/sourcemap-codec.umd.js", + "import": "./dist/sourcemap-codec.mjs" + }, + "./dist/sourcemap-codec.umd.js" + ], + "./package.json": "./package.json" + }, + "scripts": { + "benchmark": "run-s build:rollup benchmark:*", + "benchmark:install": "cd benchmark && npm install", + "benchmark:only": "node --expose-gc benchmark/index.js", + "build": "run-s -n build:*", + "build:rollup": "rollup -c rollup.config.js", + "build:ts": "tsc --project tsconfig.build.json", + "lint": "run-s -n lint:*", + "lint:prettier": "npm run test:lint:prettier -- --write", + "lint:ts": "npm run test:lint:ts -- --fix", + "prebuild": "rm -rf dist", + "prepublishOnly": "npm run preversion", + "preversion": "run-s test build", + "test": "run-s -n test:lint test:only", + "test:debug": "mocha --inspect-brk", + "test:lint": "run-s -n test:lint:*", + "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", + "test:lint:ts": "eslint '{src,test}/**/*.ts'", + "test:only": "mocha", + "test:coverage": "c8 mocha", + "test:watch": "mocha --watch" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/jridgewell/sourcemap-codec.git" + }, + "author": "Rich Harris", + "license": "MIT", + "devDependencies": { + "@rollup/plugin-typescript": "8.3.0", + "@types/mocha": "10.0.6", + "@types/node": "17.0.15", + "@typescript-eslint/eslint-plugin": "5.10.0", + "@typescript-eslint/parser": "5.10.0", + "benchmark": "2.1.4", + "c8": "7.11.2", + "eslint": "8.7.0", + "eslint-config-prettier": "8.3.0", + "mocha": "9.2.0", + "npm-run-all": "4.1.5", + "prettier": "2.5.1", + "rollup": "2.64.0", + "source-map": "0.6.1", + "source-map-js": "1.0.2", + "sourcemap-codec": "1.4.8", + "tsx": "4.7.1", + "typescript": "4.5.4" + } +} diff --git a/node_modules/@jridgewell/trace-mapping/LICENSE b/node_modules/@jridgewell/trace-mapping/LICENSE new file mode 100644 index 0000000..37bb488 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/LICENSE @@ -0,0 +1,19 @@ +Copyright 2022 Justin Ridgewell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@jridgewell/trace-mapping/README.md b/node_modules/@jridgewell/trace-mapping/README.md new file mode 100644 index 0000000..969558d --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/README.md @@ -0,0 +1,257 @@ +# @jridgewell/trace-mapping + +> Trace the original position through a source map + +`trace-mapping` allows you to take the line and column of an output file and trace it to the +original location in the source file through a source map. + +You may already be familiar with the [`source-map`][source-map] package's `SourceMapConsumer`. This +provides the same `originalPositionFor` and `generatedPositionFor` API, without requiring WASM. + +## Installation + +```sh +npm install @jridgewell/trace-mapping +``` + +## Usage + +```typescript +import { + TraceMap, + originalPositionFor, + generatedPositionFor, + sourceContentFor, + isIgnored, +} from '@jridgewell/trace-mapping'; + +const tracer = new TraceMap({ + version: 3, + sources: ['input.js'], + sourcesContent: ['content of input.js'], + names: ['foo'], + mappings: 'KAyCIA', + ignoreList: [], +}); + +// Lines start at line 1, columns at column 0. +const traced = originalPositionFor(tracer, { line: 1, column: 5 }); +assert.deepEqual(traced, { + source: 'input.js', + line: 42, + column: 4, + name: 'foo', +}); + +const content = sourceContentFor(tracer, traced.source); +assert.strictEqual(content, 'content for input.js'); + +const generated = generatedPositionFor(tracer, { + source: 'input.js', + line: 42, + column: 4, +}); +assert.deepEqual(generated, { + line: 1, + column: 5, +}); + +const ignored = isIgnored(tracer, 'input.js'); +assert.equal(ignored, false); +``` + +We also provide a lower level API to get the actual segment that matches our line and column. Unlike +`originalPositionFor`, `traceSegment` uses a 0-base for `line`: + +```typescript +import { traceSegment } from '@jridgewell/trace-mapping'; + +// line is 0-base. +const traced = traceSegment(tracer, /* line */ 0, /* column */ 5); + +// Segments are [outputColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] +// Again, line is 0-base and so is sourceLine +assert.deepEqual(traced, [5, 0, 41, 4, 0]); +``` + +### SectionedSourceMaps + +The sourcemap spec defines a special `sections` field that's designed to handle concatenation of +output code with associated sourcemaps. This type of sourcemap is rarely used (no major build tool +produces it), but if you are hand coding a concatenation you may need it. We provide an `AnyMap` +helper that can receive either a regular sourcemap or a `SectionedSourceMap` and returns a +`TraceMap` instance: + +```typescript +import { AnyMap } from '@jridgewell/trace-mapping'; +const fooOutput = 'foo'; +const barOutput = 'bar'; +const output = [fooOutput, barOutput].join('\n'); + +const sectioned = new AnyMap({ + version: 3, + sections: [ + { + // 0-base line and column + offset: { line: 0, column: 0 }, + // fooOutput's sourcemap + map: { + version: 3, + sources: ['foo.js'], + names: ['foo'], + mappings: 'AAAAA', + }, + }, + { + // barOutput's sourcemap will not affect the first line, only the second + offset: { line: 1, column: 0 }, + map: { + version: 3, + sources: ['bar.js'], + names: ['bar'], + mappings: 'AAAAA', + }, + }, + ], +}); + +const traced = originalPositionFor(sectioned, { + line: 2, + column: 0, +}); + +assert.deepEqual(traced, { + source: 'bar.js', + line: 1, + column: 0, + name: 'bar', +}); +``` + +## Benchmarks + +``` +node v18.0.0 + +amp.js.map - 45120 segments + +Memory Usage: +trace-mapping decoded 562400 bytes +trace-mapping encoded 5706544 bytes +source-map-js 10717664 bytes +source-map-0.6.1 17446384 bytes +source-map-0.8.0 9701757 bytes +Smallest memory usage is trace-mapping decoded + +Init speed: +trace-mapping: decoded JSON input x 180 ops/sec ±0.34% (85 runs sampled) +trace-mapping: encoded JSON input x 364 ops/sec ±1.77% (89 runs sampled) +trace-mapping: decoded Object input x 3,116 ops/sec ±0.50% (96 runs sampled) +trace-mapping: encoded Object input x 410 ops/sec ±2.62% (85 runs sampled) +source-map-js: encoded Object input x 84.23 ops/sec ±0.91% (73 runs sampled) +source-map-0.6.1: encoded Object input x 37.21 ops/sec ±2.08% (51 runs sampled) +Fastest is trace-mapping: decoded Object input + +Trace speed: +trace-mapping: decoded originalPositionFor x 3,952,212 ops/sec ±0.17% (98 runs sampled) +trace-mapping: encoded originalPositionFor x 3,487,468 ops/sec ±1.58% (90 runs sampled) +source-map-js: encoded originalPositionFor x 827,730 ops/sec ±0.78% (97 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 748,991 ops/sec ±0.53% (94 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 2,532,894 ops/sec ±0.57% (95 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + + +*** + + +babel.min.js.map - 347793 segments + +Memory Usage: +trace-mapping decoded 89832 bytes +trace-mapping encoded 35474640 bytes +source-map-js 51257176 bytes +source-map-0.6.1 63515664 bytes +source-map-0.8.0 42933752 bytes +Smallest memory usage is trace-mapping decoded + +Init speed: +trace-mapping: decoded JSON input x 15.41 ops/sec ±8.65% (34 runs sampled) +trace-mapping: encoded JSON input x 28.20 ops/sec ±12.87% (42 runs sampled) +trace-mapping: decoded Object input x 964 ops/sec ±0.36% (99 runs sampled) +trace-mapping: encoded Object input x 31.77 ops/sec ±13.79% (45 runs sampled) +source-map-js: encoded Object input x 6.45 ops/sec ±5.16% (21 runs sampled) +source-map-0.6.1: encoded Object input x 4.07 ops/sec ±5.24% (15 runs sampled) +Fastest is trace-mapping: decoded Object input + +Trace speed: +trace-mapping: decoded originalPositionFor x 7,183,038 ops/sec ±0.58% (95 runs sampled) +trace-mapping: encoded originalPositionFor x 5,192,185 ops/sec ±0.41% (100 runs sampled) +source-map-js: encoded originalPositionFor x 4,259,489 ops/sec ±0.79% (94 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 3,742,629 ops/sec ±0.71% (95 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 6,270,211 ops/sec ±0.64% (94 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + + +*** + + +preact.js.map - 1992 segments + +Memory Usage: +trace-mapping decoded 37128 bytes +trace-mapping encoded 247280 bytes +source-map-js 1143536 bytes +source-map-0.6.1 1290992 bytes +source-map-0.8.0 96544 bytes +Smallest memory usage is trace-mapping decoded + +Init speed: +trace-mapping: decoded JSON input x 3,483 ops/sec ±0.30% (98 runs sampled) +trace-mapping: encoded JSON input x 6,092 ops/sec ±0.18% (97 runs sampled) +trace-mapping: decoded Object input x 249,076 ops/sec ±0.24% (98 runs sampled) +trace-mapping: encoded Object input x 14,555 ops/sec ±0.48% (100 runs sampled) +source-map-js: encoded Object input x 2,447 ops/sec ±0.36% (99 runs sampled) +source-map-0.6.1: encoded Object input x 1,201 ops/sec ±0.57% (96 runs sampled) +Fastest is trace-mapping: decoded Object input + +Trace speed: +trace-mapping: decoded originalPositionFor x 7,620,192 ops/sec ±0.09% (99 runs sampled) +trace-mapping: encoded originalPositionFor x 6,872,554 ops/sec ±0.30% (97 runs sampled) +source-map-js: encoded originalPositionFor x 2,489,570 ops/sec ±0.35% (94 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 1,698,633 ops/sec ±0.28% (98 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 4,015,644 ops/sec ±0.22% (98 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + + +*** + + +react.js.map - 5726 segments + +Memory Usage: +trace-mapping decoded 16176 bytes +trace-mapping encoded 681552 bytes +source-map-js 2418352 bytes +source-map-0.6.1 2443672 bytes +source-map-0.8.0 111768 bytes +Smallest memory usage is trace-mapping decoded + +Init speed: +trace-mapping: decoded JSON input x 1,720 ops/sec ±0.34% (98 runs sampled) +trace-mapping: encoded JSON input x 4,406 ops/sec ±0.35% (100 runs sampled) +trace-mapping: decoded Object input x 92,122 ops/sec ±0.10% (99 runs sampled) +trace-mapping: encoded Object input x 5,385 ops/sec ±0.37% (99 runs sampled) +source-map-js: encoded Object input x 794 ops/sec ±0.40% (98 runs sampled) +source-map-0.6.1: encoded Object input x 416 ops/sec ±0.54% (91 runs sampled) +Fastest is trace-mapping: decoded Object input + +Trace speed: +trace-mapping: decoded originalPositionFor x 32,759,519 ops/sec ±0.33% (100 runs sampled) +trace-mapping: encoded originalPositionFor x 31,116,306 ops/sec ±0.33% (97 runs sampled) +source-map-js: encoded originalPositionFor x 17,458,435 ops/sec ±0.44% (97 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 12,687,097 ops/sec ±0.43% (95 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 23,538,275 ops/sec ±0.38% (95 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor +``` + +[source-map]: https://www.npmjs.com/package/source-map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs new file mode 100644 index 0000000..8238e0a --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs @@ -0,0 +1,580 @@ +import { encode, decode } from '@jridgewell/sourcemap-codec'; +import resolveUri from '@jridgewell/resolve-uri'; + +function resolve(input, base) { + // The base is always treated as a directory, if it's not empty. + // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327 + // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401 + if (base && !base.endsWith('/')) + base += '/'; + return resolveUri(input, base); +} + +/** + * Removes everything after the last "/", but leaves the slash. + */ +function stripFilename(path) { + if (!path) + return ''; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); +} + +const COLUMN = 0; +const SOURCES_INDEX = 1; +const SOURCE_LINE = 2; +const SOURCE_COLUMN = 3; +const NAMES_INDEX = 4; +const REV_GENERATED_LINE = 1; +const REV_GENERATED_COLUMN = 2; + +function maybeSort(mappings, owned) { + const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); + if (unsortedIndex === mappings.length) + return mappings; + // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If + // not, we do not want to modify the consumer's input array. + if (!owned) + mappings = mappings.slice(); + for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { + mappings[i] = sortSegments(mappings[i], owned); + } + return mappings; +} +function nextUnsortedSegmentLine(mappings, start) { + for (let i = start; i < mappings.length; i++) { + if (!isSorted(mappings[i])) + return i; + } + return mappings.length; +} +function isSorted(line) { + for (let j = 1; j < line.length; j++) { + if (line[j][COLUMN] < line[j - 1][COLUMN]) { + return false; + } + } + return true; +} +function sortSegments(line, owned) { + if (!owned) + line = line.slice(); + return line.sort(sortComparator); +} +function sortComparator(a, b) { + return a[COLUMN] - b[COLUMN]; +} + +let found = false; +/** + * A binary search implementation that returns the index if a match is found. + * If no match is found, then the left-index (the index associated with the item that comes just + * before the desired index) is returned. To maintain proper sort order, a splice would happen at + * the next index: + * + * ```js + * const array = [1, 3]; + * const needle = 2; + * const index = binarySearch(array, needle, (item, needle) => item - needle); + * + * assert.equal(index, 0); + * array.splice(index + 1, 0, needle); + * assert.deepEqual(array, [1, 2, 3]); + * ``` + */ +function binarySearch(haystack, needle, low, high) { + while (low <= high) { + const mid = low + ((high - low) >> 1); + const cmp = haystack[mid][COLUMN] - needle; + if (cmp === 0) { + found = true; + return mid; + } + if (cmp < 0) { + low = mid + 1; + } + else { + high = mid - 1; + } + } + found = false; + return low - 1; +} +function upperBound(haystack, needle, index) { + for (let i = index + 1; i < haystack.length; index = i++) { + if (haystack[i][COLUMN] !== needle) + break; + } + return index; +} +function lowerBound(haystack, needle, index) { + for (let i = index - 1; i >= 0; index = i--) { + if (haystack[i][COLUMN] !== needle) + break; + } + return index; +} +function memoizedState() { + return { + lastKey: -1, + lastNeedle: -1, + lastIndex: -1, + }; +} +/** + * This overly complicated beast is just to record the last tested line/column and the resulting + * index, allowing us to skip a few tests if mappings are monotonically increasing. + */ +function memoizedBinarySearch(haystack, needle, state, key) { + const { lastKey, lastNeedle, lastIndex } = state; + let low = 0; + let high = haystack.length - 1; + if (key === lastKey) { + if (needle === lastNeedle) { + found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; + return lastIndex; + } + if (needle >= lastNeedle) { + // lastIndex may be -1 if the previous needle was not found. + low = lastIndex === -1 ? 0 : lastIndex; + } + else { + high = lastIndex; + } + } + state.lastKey = key; + state.lastNeedle = needle; + return (state.lastIndex = binarySearch(haystack, needle, low, high)); +} + +// Rebuilds the original source files, with mappings that are ordered by source line/column instead +// of generated line/column. +function buildBySources(decoded, memos) { + const sources = memos.map(buildNullArray); + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + if (seg.length === 1) + continue; + const sourceIndex = seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + const originalSource = sources[sourceIndex]; + const originalLine = (originalSource[sourceLine] || (originalSource[sourceLine] = [])); + const memo = memos[sourceIndex]; + // The binary search either found a match, or it found the left-index just before where the + // segment should go. Either way, we want to insert after that. And there may be multiple + // generated segments associated with an original location, so there may need to move several + // indexes before we find where we need to insert. + let index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine)); + memo.lastIndex = ++index; + insert(originalLine, index, [sourceColumn, i, seg[COLUMN]]); + } + } + return sources; +} +function insert(array, index, value) { + for (let i = array.length; i > index; i--) { + array[i] = array[i - 1]; + } + array[index] = value; +} +// Null arrays allow us to use ordered index keys without actually allocating contiguous memory like +// a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations. +// Numeric properties on objects are magically sorted in ascending order by the engine regardless of +// the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending +// order when iterating with for-in. +function buildNullArray() { + return { __proto__: null }; +} + +const AnyMap = function (map, mapUrl) { + const parsed = parse(map); + if (!('sections' in parsed)) { + return new TraceMap(parsed, mapUrl); + } + const mappings = []; + const sources = []; + const sourcesContent = []; + const names = []; + const ignoreList = []; + recurse(parsed, mapUrl, mappings, sources, sourcesContent, names, ignoreList, 0, 0, Infinity, Infinity); + const joined = { + version: 3, + file: parsed.file, + names, + sources, + sourcesContent, + mappings, + ignoreList, + }; + return presortedDecodedMap(joined); +}; +function parse(map) { + return typeof map === 'string' ? JSON.parse(map) : map; +} +function recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { + const { sections } = input; + for (let i = 0; i < sections.length; i++) { + const { map, offset } = sections[i]; + let sl = stopLine; + let sc = stopColumn; + if (i + 1 < sections.length) { + const nextOffset = sections[i + 1].offset; + sl = Math.min(stopLine, lineOffset + nextOffset.line); + if (sl === stopLine) { + sc = Math.min(stopColumn, columnOffset + nextOffset.column); + } + else if (sl < stopLine) { + sc = columnOffset + nextOffset.column; + } + } + addSection(map, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset + offset.line, columnOffset + offset.column, sl, sc); + } +} +function addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { + const parsed = parse(input); + if ('sections' in parsed) + return recurse(...arguments); + const map = new TraceMap(parsed, mapUrl); + const sourcesOffset = sources.length; + const namesOffset = names.length; + const decoded = decodedMappings(map); + const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map; + append(sources, resolvedSources); + append(names, map.names); + if (contents) + append(sourcesContent, contents); + else + for (let i = 0; i < resolvedSources.length; i++) + sourcesContent.push(null); + if (ignores) + for (let i = 0; i < ignores.length; i++) + ignoreList.push(ignores[i] + sourcesOffset); + for (let i = 0; i < decoded.length; i++) { + const lineI = lineOffset + i; + // We can only add so many lines before we step into the range that the next section's map + // controls. When we get to the last line, then we'll start checking the segments to see if + // they've crossed into the column range. But it may not have any columns that overstep, so we + // still need to check that we don't overstep lines, too. + if (lineI > stopLine) + return; + // The out line may already exist in mappings (if we're continuing the line started by a + // previous section). Or, we may have jumped ahead several lines to start this section. + const out = getLine(mappings, lineI); + // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the + // map can be multiple lines), it doesn't. + const cOffset = i === 0 ? columnOffset : 0; + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const column = cOffset + seg[COLUMN]; + // If this segment steps into the column range that the next section's map controls, we need + // to stop early. + if (lineI === stopLine && column >= stopColumn) + return; + if (seg.length === 1) { + out.push([column]); + continue; + } + const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + out.push(seg.length === 4 + ? [column, sourcesIndex, sourceLine, sourceColumn] + : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]); + } + } +} +function append(arr, other) { + for (let i = 0; i < other.length; i++) + arr.push(other[i]); +} +function getLine(arr, index) { + for (let i = arr.length; i <= index; i++) + arr[i] = []; + return arr[index]; +} + +const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)'; +const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)'; +const LEAST_UPPER_BOUND = -1; +const GREATEST_LOWER_BOUND = 1; +class TraceMap { + constructor(map, mapUrl) { + const isString = typeof map === 'string'; + if (!isString && map._decodedMemo) + return map; + const parsed = (isString ? JSON.parse(map) : map); + const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; + this.version = version; + this.file = file; + this.names = names || []; + this.sourceRoot = sourceRoot; + this.sources = sources; + this.sourcesContent = sourcesContent; + this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || undefined; + const from = resolve(sourceRoot || '', stripFilename(mapUrl)); + this.resolvedSources = sources.map((s) => resolve(s || '', from)); + const { mappings } = parsed; + if (typeof mappings === 'string') { + this._encoded = mappings; + this._decoded = undefined; + } + else { + this._encoded = undefined; + this._decoded = maybeSort(mappings, isString); + } + this._decodedMemo = memoizedState(); + this._bySources = undefined; + this._bySourceMemos = undefined; + } +} +/** + * Typescript doesn't allow friend access to private fields, so this just casts the map into a type + * with public access modifiers. + */ +function cast(map) { + return map; +} +/** + * Returns the encoded (VLQ string) form of the SourceMap's mappings field. + */ +function encodedMappings(map) { + var _a; + var _b; + return ((_a = (_b = cast(map))._encoded) !== null && _a !== void 0 ? _a : (_b._encoded = encode(cast(map)._decoded))); +} +/** + * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. + */ +function decodedMappings(map) { + var _a; + return ((_a = cast(map))._decoded || (_a._decoded = decode(cast(map)._encoded))); +} +/** + * A low-level API to find the segment associated with a generated line/column (think, from a + * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. + */ +function traceSegment(map, line, column) { + const decoded = decodedMappings(map); + // It's common for parent source maps to have pointers to lines that have no + // mapping (like a "//# sourceMappingURL=") at the end of the child file. + if (line >= decoded.length) + return null; + const segments = decoded[line]; + const index = traceSegmentInternal(segments, cast(map)._decodedMemo, line, column, GREATEST_LOWER_BOUND); + return index === -1 ? null : segments[index]; +} +/** + * A higher-level API to find the source/line/column associated with a generated line/column + * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in + * `source-map` library. + */ +function originalPositionFor(map, needle) { + let { line, column, bias } = needle; + line--; + if (line < 0) + throw new Error(LINE_GTR_ZERO); + if (column < 0) + throw new Error(COL_GTR_EQ_ZERO); + const decoded = decodedMappings(map); + // It's common for parent source maps to have pointers to lines that have no + // mapping (like a "//# sourceMappingURL=") at the end of the child file. + if (line >= decoded.length) + return OMapping(null, null, null, null); + const segments = decoded[line]; + const index = traceSegmentInternal(segments, cast(map)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND); + if (index === -1) + return OMapping(null, null, null, null); + const segment = segments[index]; + if (segment.length === 1) + return OMapping(null, null, null, null); + const { names, resolvedSources } = map; + return OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null); +} +/** + * Finds the generated line/column position of the provided source/line/column source position. + */ +function generatedPositionFor(map, needle) { + const { source, line, column, bias } = needle; + return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false); +} +/** + * Finds all generated line/column positions of the provided source/line/column source position. + */ +function allGeneratedPositionsFor(map, needle) { + const { source, line, column, bias } = needle; + // SourceMapConsumer uses LEAST_UPPER_BOUND for some reason, so we follow suit. + return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true); +} +/** + * Iterates each mapping in generated position order. + */ +function eachMapping(map, cb) { + const decoded = decodedMappings(map); + const { names, resolvedSources } = map; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const generatedLine = i + 1; + const generatedColumn = seg[0]; + let source = null; + let originalLine = null; + let originalColumn = null; + let name = null; + if (seg.length !== 1) { + source = resolvedSources[seg[1]]; + originalLine = seg[2] + 1; + originalColumn = seg[3]; + } + if (seg.length === 5) + name = names[seg[4]]; + cb({ + generatedLine, + generatedColumn, + source, + originalLine, + originalColumn, + name, + }); + } + } +} +function sourceIndex(map, source) { + const { sources, resolvedSources } = map; + let index = sources.indexOf(source); + if (index === -1) + index = resolvedSources.indexOf(source); + return index; +} +/** + * Retrieves the source content for a particular source, if its found. Returns null if not. + */ +function sourceContentFor(map, source) { + const { sourcesContent } = map; + if (sourcesContent == null) + return null; + const index = sourceIndex(map, source); + return index === -1 ? null : sourcesContent[index]; +} +/** + * Determines if the source is marked to ignore by the source map. + */ +function isIgnored(map, source) { + const { ignoreList } = map; + if (ignoreList == null) + return false; + const index = sourceIndex(map, source); + return index === -1 ? false : ignoreList.includes(index); +} +/** + * A helper that skips sorting of the input map's mappings array, which can be expensive for larger + * maps. + */ +function presortedDecodedMap(map, mapUrl) { + const tracer = new TraceMap(clone(map, []), mapUrl); + cast(tracer)._decoded = map.mappings; + return tracer; +} +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +function decodedMap(map) { + return clone(map, decodedMappings(map)); +} +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +function encodedMap(map) { + return clone(map, encodedMappings(map)); +} +function clone(map, mappings) { + return { + version: map.version, + file: map.file, + names: map.names, + sourceRoot: map.sourceRoot, + sources: map.sources, + sourcesContent: map.sourcesContent, + mappings, + ignoreList: map.ignoreList || map.x_google_ignoreList, + }; +} +function OMapping(source, line, column, name) { + return { source, line, column, name }; +} +function GMapping(line, column) { + return { line, column }; +} +function traceSegmentInternal(segments, memo, line, column, bias) { + let index = memoizedBinarySearch(segments, column, memo, line); + if (found) { + index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); + } + else if (bias === LEAST_UPPER_BOUND) + index++; + if (index === -1 || index === segments.length) + return -1; + return index; +} +function sliceGeneratedPositions(segments, memo, line, column, bias) { + let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND); + // We ignored the bias when tracing the segment so that we're guarnateed to find the first (in + // insertion order) segment that matched. Even if we did respect the bias when tracing, we would + // still need to call `lowerBound()` to find the first segment, which is slower than just looking + // for the GREATEST_LOWER_BOUND to begin with. The only difference that matters for us is when the + // binary search didn't match, in which case GREATEST_LOWER_BOUND just needs to increment to + // match LEAST_UPPER_BOUND. + if (!found && bias === LEAST_UPPER_BOUND) + min++; + if (min === -1 || min === segments.length) + return []; + // We may have found the segment that started at an earlier column. If this is the case, then we + // need to slice all generated segments that match _that_ column, because all such segments span + // to our desired column. + const matchedColumn = found ? column : segments[min][COLUMN]; + // The binary search is not guaranteed to find the lower bound when a match wasn't found. + if (!found) + min = lowerBound(segments, matchedColumn, min); + const max = upperBound(segments, matchedColumn, min); + const result = []; + for (; min <= max; min++) { + const segment = segments[min]; + result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN])); + } + return result; +} +function generatedPosition(map, source, line, column, bias, all) { + var _a; + line--; + if (line < 0) + throw new Error(LINE_GTR_ZERO); + if (column < 0) + throw new Error(COL_GTR_EQ_ZERO); + const { sources, resolvedSources } = map; + let sourceIndex = sources.indexOf(source); + if (sourceIndex === -1) + sourceIndex = resolvedSources.indexOf(source); + if (sourceIndex === -1) + return all ? [] : GMapping(null, null); + const generated = ((_a = cast(map))._bySources || (_a._bySources = buildBySources(decodedMappings(map), (cast(map)._bySourceMemos = sources.map(memoizedState))))); + const segments = generated[sourceIndex][line]; + if (segments == null) + return all ? [] : GMapping(null, null); + const memo = cast(map)._bySourceMemos[sourceIndex]; + if (all) + return sliceGeneratedPositions(segments, memo, line, column, bias); + const index = traceSegmentInternal(segments, memo, line, column, bias); + if (index === -1) + return GMapping(null, null); + const segment = segments[index]; + return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]); +} + +export { AnyMap, GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap, allGeneratedPositionsFor, decodedMap, decodedMappings, eachMapping, encodedMap, encodedMappings, generatedPositionFor, isIgnored, originalPositionFor, presortedDecodedMap, sourceContentFor, traceSegment }; +//# sourceMappingURL=trace-mapping.mjs.map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map new file mode 100644 index 0000000..016e4ee --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"trace-mapping.mjs","sources":["../src/resolve.ts","../src/strip-filename.ts","../src/sourcemap-segment.ts","../src/sort.ts","../src/binary-search.ts","../src/by-source.ts","../src/any-map.ts","../src/trace-mapping.ts"],"sourcesContent":["import resolveUri from '@jridgewell/resolve-uri';\n\nexport default function resolve(input: string, base: string | undefined): string {\n // The base is always treated as a directory, if it's not empty.\n // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327\n // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401\n if (base && !base.endsWith('/')) base += '/';\n\n return resolveUri(input, base);\n}\n","/**\n * Removes everything after the last \"/\", but leaves the slash.\n */\nexport default function stripFilename(path: string | undefined | null): string {\n if (!path) return '';\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n","type GeneratedColumn = number;\ntype SourcesIndex = number;\ntype SourceLine = number;\ntype SourceColumn = number;\ntype NamesIndex = number;\n\ntype GeneratedLine = number;\n\nexport type SourceMapSegment =\n | [GeneratedColumn]\n | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn]\n | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];\n\nexport type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn];\n\nexport const COLUMN = 0;\nexport const SOURCES_INDEX = 1;\nexport const SOURCE_LINE = 2;\nexport const SOURCE_COLUMN = 3;\nexport const NAMES_INDEX = 4;\n\nexport const REV_GENERATED_LINE = 1;\nexport const REV_GENERATED_COLUMN = 2;\n","import { COLUMN } from './sourcemap-segment';\n\nimport type { SourceMapSegment } from './sourcemap-segment';\n\nexport default function maybeSort(\n mappings: SourceMapSegment[][],\n owned: boolean,\n): SourceMapSegment[][] {\n const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);\n if (unsortedIndex === mappings.length) return mappings;\n\n // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If\n // not, we do not want to modify the consumer's input array.\n if (!owned) mappings = mappings.slice();\n\n for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {\n mappings[i] = sortSegments(mappings[i], owned);\n }\n return mappings;\n}\n\nfunction nextUnsortedSegmentLine(mappings: SourceMapSegment[][], start: number): number {\n for (let i = start; i < mappings.length; i++) {\n if (!isSorted(mappings[i])) return i;\n }\n return mappings.length;\n}\n\nfunction isSorted(line: SourceMapSegment[]): boolean {\n for (let j = 1; j < line.length; j++) {\n if (line[j][COLUMN] < line[j - 1][COLUMN]) {\n return false;\n }\n }\n return true;\n}\n\nfunction sortSegments(line: SourceMapSegment[], owned: boolean): SourceMapSegment[] {\n if (!owned) line = line.slice();\n return line.sort(sortComparator);\n}\n\nfunction sortComparator(a: SourceMapSegment, b: SourceMapSegment): number {\n return a[COLUMN] - b[COLUMN];\n}\n","import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment';\nimport { COLUMN } from './sourcemap-segment';\n\nexport type MemoState = {\n lastKey: number;\n lastNeedle: number;\n lastIndex: number;\n};\n\nexport let found = false;\n\n/**\n * A binary search implementation that returns the index if a match is found.\n * If no match is found, then the left-index (the index associated with the item that comes just\n * before the desired index) is returned. To maintain proper sort order, a splice would happen at\n * the next index:\n *\n * ```js\n * const array = [1, 3];\n * const needle = 2;\n * const index = binarySearch(array, needle, (item, needle) => item - needle);\n *\n * assert.equal(index, 0);\n * array.splice(index + 1, 0, needle);\n * assert.deepEqual(array, [1, 2, 3]);\n * ```\n */\nexport function binarySearch(\n haystack: SourceMapSegment[] | ReverseSegment[],\n needle: number,\n low: number,\n high: number,\n): number {\n while (low <= high) {\n const mid = low + ((high - low) >> 1);\n const cmp = haystack[mid][COLUMN] - needle;\n\n if (cmp === 0) {\n found = true;\n return mid;\n }\n\n if (cmp < 0) {\n low = mid + 1;\n } else {\n high = mid - 1;\n }\n }\n\n found = false;\n return low - 1;\n}\n\nexport function upperBound(\n haystack: SourceMapSegment[] | ReverseSegment[],\n needle: number,\n index: number,\n): number {\n for (let i = index + 1; i < haystack.length; index = i++) {\n if (haystack[i][COLUMN] !== needle) break;\n }\n return index;\n}\n\nexport function lowerBound(\n haystack: SourceMapSegment[] | ReverseSegment[],\n needle: number,\n index: number,\n): number {\n for (let i = index - 1; i >= 0; index = i--) {\n if (haystack[i][COLUMN] !== needle) break;\n }\n return index;\n}\n\nexport function memoizedState(): MemoState {\n return {\n lastKey: -1,\n lastNeedle: -1,\n lastIndex: -1,\n };\n}\n\n/**\n * This overly complicated beast is just to record the last tested line/column and the resulting\n * index, allowing us to skip a few tests if mappings are monotonically increasing.\n */\nexport function memoizedBinarySearch(\n haystack: SourceMapSegment[] | ReverseSegment[],\n needle: number,\n state: MemoState,\n key: number,\n): number {\n const { lastKey, lastNeedle, lastIndex } = state;\n\n let low = 0;\n let high = haystack.length - 1;\n if (key === lastKey) {\n if (needle === lastNeedle) {\n found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;\n return lastIndex;\n }\n\n if (needle >= lastNeedle) {\n // lastIndex may be -1 if the previous needle was not found.\n low = lastIndex === -1 ? 0 : lastIndex;\n } else {\n high = lastIndex;\n }\n }\n state.lastKey = key;\n state.lastNeedle = needle;\n\n return (state.lastIndex = binarySearch(haystack, needle, low, high));\n}\n","import { COLUMN, SOURCES_INDEX, SOURCE_LINE, SOURCE_COLUMN } from './sourcemap-segment';\nimport { memoizedBinarySearch, upperBound } from './binary-search';\n\nimport type { ReverseSegment, SourceMapSegment } from './sourcemap-segment';\nimport type { MemoState } from './binary-search';\n\nexport type Source = {\n __proto__: null;\n [line: number]: Exclude[];\n};\n\n// Rebuilds the original source files, with mappings that are ordered by source line/column instead\n// of generated line/column.\nexport default function buildBySources(\n decoded: readonly SourceMapSegment[][],\n memos: MemoState[],\n): Source[] {\n const sources: Source[] = memos.map(buildNullArray);\n\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n if (seg.length === 1) continue;\n\n const sourceIndex = seg[SOURCES_INDEX];\n const sourceLine = seg[SOURCE_LINE];\n const sourceColumn = seg[SOURCE_COLUMN];\n const originalSource = sources[sourceIndex];\n const originalLine = (originalSource[sourceLine] ||= []);\n const memo = memos[sourceIndex];\n\n // The binary search either found a match, or it found the left-index just before where the\n // segment should go. Either way, we want to insert after that. And there may be multiple\n // generated segments associated with an original location, so there may need to move several\n // indexes before we find where we need to insert.\n let index = upperBound(\n originalLine,\n sourceColumn,\n memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine),\n );\n\n memo.lastIndex = ++index;\n insert(originalLine, index, [sourceColumn, i, seg[COLUMN]]);\n }\n }\n\n return sources;\n}\n\nfunction insert(array: T[], index: number, value: T) {\n for (let i = array.length; i > index; i--) {\n array[i] = array[i - 1];\n }\n array[index] = value;\n}\n\n// Null arrays allow us to use ordered index keys without actually allocating contiguous memory like\n// a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations.\n// Numeric properties on objects are magically sorted in ascending order by the engine regardless of\n// the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending\n// order when iterating with for-in.\nfunction buildNullArray(): T {\n return { __proto__: null } as T;\n}\n","import { TraceMap, presortedDecodedMap, decodedMappings } from './trace-mapping';\nimport {\n COLUMN,\n SOURCES_INDEX,\n SOURCE_LINE,\n SOURCE_COLUMN,\n NAMES_INDEX,\n} from './sourcemap-segment';\n\nimport type {\n DecodedSourceMap,\n DecodedSourceMapXInput,\n EncodedSourceMapXInput,\n SectionedSourceMapXInput,\n SectionedSourceMapInput,\n SectionXInput,\n} from './types';\nimport type { SourceMapSegment } from './sourcemap-segment';\n\ntype AnyMap = {\n new (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap;\n (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap;\n};\n\nexport const AnyMap: AnyMap = function (map, mapUrl) {\n const parsed = parse(map);\n\n if (!('sections' in parsed)) {\n return new TraceMap(parsed as DecodedSourceMapXInput | EncodedSourceMapXInput, mapUrl);\n }\n\n const mappings: SourceMapSegment[][] = [];\n const sources: string[] = [];\n const sourcesContent: (string | null)[] = [];\n const names: string[] = [];\n const ignoreList: number[] = [];\n\n recurse(\n parsed,\n mapUrl,\n mappings,\n sources,\n sourcesContent,\n names,\n ignoreList,\n 0,\n 0,\n Infinity,\n Infinity,\n );\n\n const joined: DecodedSourceMap = {\n version: 3,\n file: parsed.file,\n names,\n sources,\n sourcesContent,\n mappings,\n ignoreList,\n };\n\n return presortedDecodedMap(joined);\n} as AnyMap;\n\nfunction parse(map: T): Exclude {\n return typeof map === 'string' ? JSON.parse(map) : map;\n}\n\nfunction recurse(\n input: SectionedSourceMapXInput,\n mapUrl: string | null | undefined,\n mappings: SourceMapSegment[][],\n sources: string[],\n sourcesContent: (string | null)[],\n names: string[],\n ignoreList: number[],\n lineOffset: number,\n columnOffset: number,\n stopLine: number,\n stopColumn: number,\n) {\n const { sections } = input;\n for (let i = 0; i < sections.length; i++) {\n const { map, offset } = sections[i];\n\n let sl = stopLine;\n let sc = stopColumn;\n if (i + 1 < sections.length) {\n const nextOffset = sections[i + 1].offset;\n sl = Math.min(stopLine, lineOffset + nextOffset.line);\n\n if (sl === stopLine) {\n sc = Math.min(stopColumn, columnOffset + nextOffset.column);\n } else if (sl < stopLine) {\n sc = columnOffset + nextOffset.column;\n }\n }\n\n addSection(\n map,\n mapUrl,\n mappings,\n sources,\n sourcesContent,\n names,\n ignoreList,\n lineOffset + offset.line,\n columnOffset + offset.column,\n sl,\n sc,\n );\n }\n}\n\nfunction addSection(\n input: SectionXInput['map'],\n mapUrl: string | null | undefined,\n mappings: SourceMapSegment[][],\n sources: string[],\n sourcesContent: (string | null)[],\n names: string[],\n ignoreList: number[],\n lineOffset: number,\n columnOffset: number,\n stopLine: number,\n stopColumn: number,\n) {\n const parsed = parse(input);\n if ('sections' in parsed) return recurse(...(arguments as unknown as Parameters));\n\n const map = new TraceMap(parsed, mapUrl);\n const sourcesOffset = sources.length;\n const namesOffset = names.length;\n const decoded = decodedMappings(map);\n const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map;\n\n append(sources, resolvedSources);\n append(names, map.names);\n\n if (contents) append(sourcesContent, contents);\n else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null);\n\n if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset);\n\n for (let i = 0; i < decoded.length; i++) {\n const lineI = lineOffset + i;\n\n // We can only add so many lines before we step into the range that the next section's map\n // controls. When we get to the last line, then we'll start checking the segments to see if\n // they've crossed into the column range. But it may not have any columns that overstep, so we\n // still need to check that we don't overstep lines, too.\n if (lineI > stopLine) return;\n\n // The out line may already exist in mappings (if we're continuing the line started by a\n // previous section). Or, we may have jumped ahead several lines to start this section.\n const out = getLine(mappings, lineI);\n // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the\n // map can be multiple lines), it doesn't.\n const cOffset = i === 0 ? columnOffset : 0;\n\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n const column = cOffset + seg[COLUMN];\n\n // If this segment steps into the column range that the next section's map controls, we need\n // to stop early.\n if (lineI === stopLine && column >= stopColumn) return;\n\n if (seg.length === 1) {\n out.push([column]);\n continue;\n }\n\n const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX];\n const sourceLine = seg[SOURCE_LINE];\n const sourceColumn = seg[SOURCE_COLUMN];\n out.push(\n seg.length === 4\n ? [column, sourcesIndex, sourceLine, sourceColumn]\n : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]],\n );\n }\n }\n}\n\nfunction append(arr: T[], other: T[]) {\n for (let i = 0; i < other.length; i++) arr.push(other[i]);\n}\n\nfunction getLine(arr: T[][], index: number): T[] {\n for (let i = arr.length; i <= index; i++) arr[i] = [];\n return arr[index];\n}\n","import { encode, decode } from '@jridgewell/sourcemap-codec';\n\nimport resolve from './resolve';\nimport stripFilename from './strip-filename';\nimport maybeSort from './sort';\nimport buildBySources from './by-source';\nimport {\n memoizedState,\n memoizedBinarySearch,\n upperBound,\n lowerBound,\n found as bsFound,\n} from './binary-search';\nimport {\n COLUMN,\n SOURCES_INDEX,\n SOURCE_LINE,\n SOURCE_COLUMN,\n NAMES_INDEX,\n REV_GENERATED_LINE,\n REV_GENERATED_COLUMN,\n} from './sourcemap-segment';\n\nimport type { SourceMapSegment, ReverseSegment } from './sourcemap-segment';\nimport type {\n SourceMapV3,\n DecodedSourceMap,\n EncodedSourceMap,\n InvalidOriginalMapping,\n OriginalMapping,\n InvalidGeneratedMapping,\n GeneratedMapping,\n SourceMapInput,\n Needle,\n SourceNeedle,\n SourceMap,\n EachMapping,\n Bias,\n XInput,\n} from './types';\nimport type { Source } from './by-source';\nimport type { MemoState } from './binary-search';\n\nexport type { SourceMapSegment } from './sourcemap-segment';\nexport type {\n SourceMap,\n DecodedSourceMap,\n EncodedSourceMap,\n Section,\n SectionedSourceMap,\n SourceMapV3,\n Bias,\n EachMapping,\n GeneratedMapping,\n InvalidGeneratedMapping,\n InvalidOriginalMapping,\n Needle,\n OriginalMapping,\n OriginalMapping as Mapping,\n SectionedSourceMapInput,\n SourceMapInput,\n SourceNeedle,\n XInput,\n EncodedSourceMapXInput,\n DecodedSourceMapXInput,\n SectionedSourceMapXInput,\n SectionXInput,\n} from './types';\n\ninterface PublicMap {\n _encoded: TraceMap['_encoded'];\n _decoded: TraceMap['_decoded'];\n _decodedMemo: TraceMap['_decodedMemo'];\n _bySources: TraceMap['_bySources'];\n _bySourceMemos: TraceMap['_bySourceMemos'];\n}\n\nconst LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)';\nconst COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)';\n\nexport const LEAST_UPPER_BOUND = -1;\nexport const GREATEST_LOWER_BOUND = 1;\n\nexport { AnyMap } from './any-map';\n\nexport class TraceMap implements SourceMap {\n declare version: SourceMapV3['version'];\n declare file: SourceMapV3['file'];\n declare names: SourceMapV3['names'];\n declare sourceRoot: SourceMapV3['sourceRoot'];\n declare sources: SourceMapV3['sources'];\n declare sourcesContent: SourceMapV3['sourcesContent'];\n declare ignoreList: SourceMapV3['ignoreList'];\n\n declare resolvedSources: string[];\n private declare _encoded: string | undefined;\n\n private declare _decoded: SourceMapSegment[][] | undefined;\n private declare _decodedMemo: MemoState;\n\n private declare _bySources: Source[] | undefined;\n private declare _bySourceMemos: MemoState[] | undefined;\n\n constructor(map: SourceMapInput, mapUrl?: string | null) {\n const isString = typeof map === 'string';\n\n if (!isString && (map as unknown as { _decodedMemo: any })._decodedMemo) return map as TraceMap;\n\n const parsed = (isString ? JSON.parse(map) : map) as DecodedSourceMap | EncodedSourceMap;\n\n const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;\n this.version = version;\n this.file = file;\n this.names = names || [];\n this.sourceRoot = sourceRoot;\n this.sources = sources;\n this.sourcesContent = sourcesContent;\n this.ignoreList = parsed.ignoreList || (parsed as XInput).x_google_ignoreList || undefined;\n\n const from = resolve(sourceRoot || '', stripFilename(mapUrl));\n this.resolvedSources = sources.map((s) => resolve(s || '', from));\n\n const { mappings } = parsed;\n if (typeof mappings === 'string') {\n this._encoded = mappings;\n this._decoded = undefined;\n } else {\n this._encoded = undefined;\n this._decoded = maybeSort(mappings, isString);\n }\n\n this._decodedMemo = memoizedState();\n this._bySources = undefined;\n this._bySourceMemos = undefined;\n }\n}\n\n/**\n * Typescript doesn't allow friend access to private fields, so this just casts the map into a type\n * with public access modifiers.\n */\nfunction cast(map: unknown): PublicMap {\n return map as any;\n}\n\n/**\n * Returns the encoded (VLQ string) form of the SourceMap's mappings field.\n */\nexport function encodedMappings(map: TraceMap): EncodedSourceMap['mappings'] {\n return (cast(map)._encoded ??= encode(cast(map)._decoded!));\n}\n\n/**\n * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.\n */\nexport function decodedMappings(map: TraceMap): Readonly {\n return (cast(map)._decoded ||= decode(cast(map)._encoded!));\n}\n\n/**\n * A low-level API to find the segment associated with a generated line/column (think, from a\n * stack trace). Line and column here are 0-based, unlike `originalPositionFor`.\n */\nexport function traceSegment(\n map: TraceMap,\n line: number,\n column: number,\n): Readonly | null {\n const decoded = decodedMappings(map);\n\n // It's common for parent source maps to have pointers to lines that have no\n // mapping (like a \"//# sourceMappingURL=\") at the end of the child file.\n if (line >= decoded.length) return null;\n\n const segments = decoded[line];\n const index = traceSegmentInternal(\n segments,\n cast(map)._decodedMemo,\n line,\n column,\n GREATEST_LOWER_BOUND,\n );\n\n return index === -1 ? null : segments[index];\n}\n\n/**\n * A higher-level API to find the source/line/column associated with a generated line/column\n * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in\n * `source-map` library.\n */\nexport function originalPositionFor(\n map: TraceMap,\n needle: Needle,\n): OriginalMapping | InvalidOriginalMapping {\n let { line, column, bias } = needle;\n line--;\n if (line < 0) throw new Error(LINE_GTR_ZERO);\n if (column < 0) throw new Error(COL_GTR_EQ_ZERO);\n\n const decoded = decodedMappings(map);\n\n // It's common for parent source maps to have pointers to lines that have no\n // mapping (like a \"//# sourceMappingURL=\") at the end of the child file.\n if (line >= decoded.length) return OMapping(null, null, null, null);\n\n const segments = decoded[line];\n const index = traceSegmentInternal(\n segments,\n cast(map)._decodedMemo,\n line,\n column,\n bias || GREATEST_LOWER_BOUND,\n );\n\n if (index === -1) return OMapping(null, null, null, null);\n\n const segment = segments[index];\n if (segment.length === 1) return OMapping(null, null, null, null);\n\n const { names, resolvedSources } = map;\n return OMapping(\n resolvedSources[segment[SOURCES_INDEX]],\n segment[SOURCE_LINE] + 1,\n segment[SOURCE_COLUMN],\n segment.length === 5 ? names[segment[NAMES_INDEX]] : null,\n );\n}\n\n/**\n * Finds the generated line/column position of the provided source/line/column source position.\n */\nexport function generatedPositionFor(\n map: TraceMap,\n needle: SourceNeedle,\n): GeneratedMapping | InvalidGeneratedMapping {\n const { source, line, column, bias } = needle;\n return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false);\n}\n\n/**\n * Finds all generated line/column positions of the provided source/line/column source position.\n */\nexport function allGeneratedPositionsFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping[] {\n const { source, line, column, bias } = needle;\n // SourceMapConsumer uses LEAST_UPPER_BOUND for some reason, so we follow suit.\n return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true);\n}\n\n/**\n * Iterates each mapping in generated position order.\n */\nexport function eachMapping(map: TraceMap, cb: (mapping: EachMapping) => void): void {\n const decoded = decodedMappings(map);\n const { names, resolvedSources } = map;\n\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n\n const generatedLine = i + 1;\n const generatedColumn = seg[0];\n let source = null;\n let originalLine = null;\n let originalColumn = null;\n let name = null;\n if (seg.length !== 1) {\n source = resolvedSources[seg[1]];\n originalLine = seg[2] + 1;\n originalColumn = seg[3];\n }\n if (seg.length === 5) name = names[seg[4]];\n\n cb({\n generatedLine,\n generatedColumn,\n source,\n originalLine,\n originalColumn,\n name,\n } as EachMapping);\n }\n }\n}\n\nfunction sourceIndex(map: TraceMap, source: string): number {\n const { sources, resolvedSources } = map;\n let index = sources.indexOf(source);\n if (index === -1) index = resolvedSources.indexOf(source);\n return index;\n}\n\n/**\n * Retrieves the source content for a particular source, if its found. Returns null if not.\n */\nexport function sourceContentFor(map: TraceMap, source: string): string | null {\n const { sourcesContent } = map;\n if (sourcesContent == null) return null;\n const index = sourceIndex(map, source);\n return index === -1 ? null : sourcesContent[index];\n}\n\n/**\n * Determines if the source is marked to ignore by the source map.\n */\nexport function isIgnored(map: TraceMap, source: string): boolean {\n const { ignoreList } = map;\n if (ignoreList == null) return false;\n const index = sourceIndex(map, source);\n return index === -1 ? false : ignoreList.includes(index);\n}\n\n/**\n * A helper that skips sorting of the input map's mappings array, which can be expensive for larger\n * maps.\n */\nexport function presortedDecodedMap(map: DecodedSourceMap, mapUrl?: string): TraceMap {\n const tracer = new TraceMap(clone(map, []), mapUrl);\n cast(tracer)._decoded = map.mappings;\n return tracer;\n}\n\n/**\n * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nexport function decodedMap(\n map: TraceMap,\n): Omit & { mappings: readonly SourceMapSegment[][] } {\n return clone(map, decodedMappings(map));\n}\n\n/**\n * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nexport function encodedMap(map: TraceMap): EncodedSourceMap {\n return clone(map, encodedMappings(map));\n}\n\nfunction clone(\n map: TraceMap | DecodedSourceMap,\n mappings: T,\n): T extends string ? EncodedSourceMap : DecodedSourceMap {\n return {\n version: map.version,\n file: map.file,\n names: map.names,\n sourceRoot: map.sourceRoot,\n sources: map.sources,\n sourcesContent: map.sourcesContent,\n mappings,\n ignoreList: map.ignoreList || (map as XInput).x_google_ignoreList,\n } as any;\n}\n\nfunction OMapping(source: null, line: null, column: null, name: null): InvalidOriginalMapping;\nfunction OMapping(\n source: string,\n line: number,\n column: number,\n name: string | null,\n): OriginalMapping;\nfunction OMapping(\n source: string | null,\n line: number | null,\n column: number | null,\n name: string | null,\n): OriginalMapping | InvalidOriginalMapping {\n return { source, line, column, name } as any;\n}\n\nfunction GMapping(line: null, column: null): InvalidGeneratedMapping;\nfunction GMapping(line: number, column: number): GeneratedMapping;\nfunction GMapping(\n line: number | null,\n column: number | null,\n): GeneratedMapping | InvalidGeneratedMapping {\n return { line, column } as any;\n}\n\nfunction traceSegmentInternal(\n segments: SourceMapSegment[],\n memo: MemoState,\n line: number,\n column: number,\n bias: Bias,\n): number;\nfunction traceSegmentInternal(\n segments: ReverseSegment[],\n memo: MemoState,\n line: number,\n column: number,\n bias: Bias,\n): number;\nfunction traceSegmentInternal(\n segments: SourceMapSegment[] | ReverseSegment[],\n memo: MemoState,\n line: number,\n column: number,\n bias: Bias,\n): number {\n let index = memoizedBinarySearch(segments, column, memo, line);\n if (bsFound) {\n index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);\n } else if (bias === LEAST_UPPER_BOUND) index++;\n\n if (index === -1 || index === segments.length) return -1;\n return index;\n}\n\nfunction sliceGeneratedPositions(\n segments: ReverseSegment[],\n memo: MemoState,\n line: number,\n column: number,\n bias: Bias,\n): GeneratedMapping[] {\n let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND);\n\n // We ignored the bias when tracing the segment so that we're guarnateed to find the first (in\n // insertion order) segment that matched. Even if we did respect the bias when tracing, we would\n // still need to call `lowerBound()` to find the first segment, which is slower than just looking\n // for the GREATEST_LOWER_BOUND to begin with. The only difference that matters for us is when the\n // binary search didn't match, in which case GREATEST_LOWER_BOUND just needs to increment to\n // match LEAST_UPPER_BOUND.\n if (!bsFound && bias === LEAST_UPPER_BOUND) min++;\n\n if (min === -1 || min === segments.length) return [];\n\n // We may have found the segment that started at an earlier column. If this is the case, then we\n // need to slice all generated segments that match _that_ column, because all such segments span\n // to our desired column.\n const matchedColumn = bsFound ? column : segments[min][COLUMN];\n\n // The binary search is not guaranteed to find the lower bound when a match wasn't found.\n if (!bsFound) min = lowerBound(segments, matchedColumn, min);\n const max = upperBound(segments, matchedColumn, min);\n\n const result = [];\n for (; min <= max; min++) {\n const segment = segments[min];\n result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));\n }\n return result;\n}\n\nfunction generatedPosition(\n map: TraceMap,\n source: string,\n line: number,\n column: number,\n bias: Bias,\n all: false,\n): GeneratedMapping | InvalidGeneratedMapping;\nfunction generatedPosition(\n map: TraceMap,\n source: string,\n line: number,\n column: number,\n bias: Bias,\n all: true,\n): GeneratedMapping[];\nfunction generatedPosition(\n map: TraceMap,\n source: string,\n line: number,\n column: number,\n bias: Bias,\n all: boolean,\n): GeneratedMapping | InvalidGeneratedMapping | GeneratedMapping[] {\n line--;\n if (line < 0) throw new Error(LINE_GTR_ZERO);\n if (column < 0) throw new Error(COL_GTR_EQ_ZERO);\n\n const { sources, resolvedSources } = map;\n let sourceIndex = sources.indexOf(source);\n if (sourceIndex === -1) sourceIndex = resolvedSources.indexOf(source);\n if (sourceIndex === -1) return all ? [] : GMapping(null, null);\n\n const generated = (cast(map)._bySources ||= buildBySources(\n decodedMappings(map),\n (cast(map)._bySourceMemos = sources.map(memoizedState)),\n ));\n\n const segments = generated[sourceIndex][line];\n if (segments == null) return all ? [] : GMapping(null, null);\n\n const memo = cast(map)._bySourceMemos![sourceIndex];\n\n if (all) return sliceGeneratedPositions(segments, memo, line, column, bias);\n\n const index = traceSegmentInternal(segments, memo, line, column, bias);\n if (index === -1) return GMapping(null, null);\n\n const segment = segments[index];\n return GMapping(segment[REV_GENERATED_LINE] + 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,CAAA,EAAA,GAAC,IAAI,CAAC,GAAG,CAAC,EAAC,UAAU,KAAA,EAAA,CAAV,UAAU,GAAK,cAAc,CACxD,eAAe,CAAC,GAAG,CAAC,GACnB,IAAI,CAAC,GAAG,CAAC,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,EACvD,EAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC;IAC9C,IAAI,QAAQ,IAAI,IAAI;AAAE,QAAA,OAAO,GAAG,GAAG,EAAE,GAAG,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAE7D,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,cAAe,CAAC,WAAW,CAAC,CAAC;AAEpD,IAAA,IAAI,GAAG;AAAE,QAAA,OAAO,uBAAuB,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;AAE5E,IAAA,MAAM,KAAK,GAAG,oBAAoB,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACvE,IAAI,KAAK,KAAK,CAAC,CAAC;AAAE,QAAA,OAAO,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAE9C,IAAA,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;AAChC,IAAA,OAAO,QAAQ,CAAC,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC;AAClF;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js new file mode 100644 index 0000000..3be0f36 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js @@ -0,0 +1,600 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@jridgewell/sourcemap-codec'), require('@jridgewell/resolve-uri')) : + typeof define === 'function' && define.amd ? define(['exports', '@jridgewell/sourcemap-codec', '@jridgewell/resolve-uri'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.traceMapping = {}, global.sourcemapCodec, global.resolveURI)); +})(this, (function (exports, sourcemapCodec, resolveUri) { 'use strict'; + + function resolve(input, base) { + // The base is always treated as a directory, if it's not empty. + // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327 + // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401 + if (base && !base.endsWith('/')) + base += '/'; + return resolveUri(input, base); + } + + /** + * Removes everything after the last "/", but leaves the slash. + */ + function stripFilename(path) { + if (!path) + return ''; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); + } + + const COLUMN = 0; + const SOURCES_INDEX = 1; + const SOURCE_LINE = 2; + const SOURCE_COLUMN = 3; + const NAMES_INDEX = 4; + const REV_GENERATED_LINE = 1; + const REV_GENERATED_COLUMN = 2; + + function maybeSort(mappings, owned) { + const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); + if (unsortedIndex === mappings.length) + return mappings; + // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If + // not, we do not want to modify the consumer's input array. + if (!owned) + mappings = mappings.slice(); + for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { + mappings[i] = sortSegments(mappings[i], owned); + } + return mappings; + } + function nextUnsortedSegmentLine(mappings, start) { + for (let i = start; i < mappings.length; i++) { + if (!isSorted(mappings[i])) + return i; + } + return mappings.length; + } + function isSorted(line) { + for (let j = 1; j < line.length; j++) { + if (line[j][COLUMN] < line[j - 1][COLUMN]) { + return false; + } + } + return true; + } + function sortSegments(line, owned) { + if (!owned) + line = line.slice(); + return line.sort(sortComparator); + } + function sortComparator(a, b) { + return a[COLUMN] - b[COLUMN]; + } + + let found = false; + /** + * A binary search implementation that returns the index if a match is found. + * If no match is found, then the left-index (the index associated with the item that comes just + * before the desired index) is returned. To maintain proper sort order, a splice would happen at + * the next index: + * + * ```js + * const array = [1, 3]; + * const needle = 2; + * const index = binarySearch(array, needle, (item, needle) => item - needle); + * + * assert.equal(index, 0); + * array.splice(index + 1, 0, needle); + * assert.deepEqual(array, [1, 2, 3]); + * ``` + */ + function binarySearch(haystack, needle, low, high) { + while (low <= high) { + const mid = low + ((high - low) >> 1); + const cmp = haystack[mid][COLUMN] - needle; + if (cmp === 0) { + found = true; + return mid; + } + if (cmp < 0) { + low = mid + 1; + } + else { + high = mid - 1; + } + } + found = false; + return low - 1; + } + function upperBound(haystack, needle, index) { + for (let i = index + 1; i < haystack.length; index = i++) { + if (haystack[i][COLUMN] !== needle) + break; + } + return index; + } + function lowerBound(haystack, needle, index) { + for (let i = index - 1; i >= 0; index = i--) { + if (haystack[i][COLUMN] !== needle) + break; + } + return index; + } + function memoizedState() { + return { + lastKey: -1, + lastNeedle: -1, + lastIndex: -1, + }; + } + /** + * This overly complicated beast is just to record the last tested line/column and the resulting + * index, allowing us to skip a few tests if mappings are monotonically increasing. + */ + function memoizedBinarySearch(haystack, needle, state, key) { + const { lastKey, lastNeedle, lastIndex } = state; + let low = 0; + let high = haystack.length - 1; + if (key === lastKey) { + if (needle === lastNeedle) { + found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; + return lastIndex; + } + if (needle >= lastNeedle) { + // lastIndex may be -1 if the previous needle was not found. + low = lastIndex === -1 ? 0 : lastIndex; + } + else { + high = lastIndex; + } + } + state.lastKey = key; + state.lastNeedle = needle; + return (state.lastIndex = binarySearch(haystack, needle, low, high)); + } + + // Rebuilds the original source files, with mappings that are ordered by source line/column instead + // of generated line/column. + function buildBySources(decoded, memos) { + const sources = memos.map(buildNullArray); + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + if (seg.length === 1) + continue; + const sourceIndex = seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + const originalSource = sources[sourceIndex]; + const originalLine = (originalSource[sourceLine] || (originalSource[sourceLine] = [])); + const memo = memos[sourceIndex]; + // The binary search either found a match, or it found the left-index just before where the + // segment should go. Either way, we want to insert after that. And there may be multiple + // generated segments associated with an original location, so there may need to move several + // indexes before we find where we need to insert. + let index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine)); + memo.lastIndex = ++index; + insert(originalLine, index, [sourceColumn, i, seg[COLUMN]]); + } + } + return sources; + } + function insert(array, index, value) { + for (let i = array.length; i > index; i--) { + array[i] = array[i - 1]; + } + array[index] = value; + } + // Null arrays allow us to use ordered index keys without actually allocating contiguous memory like + // a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations. + // Numeric properties on objects are magically sorted in ascending order by the engine regardless of + // the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending + // order when iterating with for-in. + function buildNullArray() { + return { __proto__: null }; + } + + const AnyMap = function (map, mapUrl) { + const parsed = parse(map); + if (!('sections' in parsed)) { + return new TraceMap(parsed, mapUrl); + } + const mappings = []; + const sources = []; + const sourcesContent = []; + const names = []; + const ignoreList = []; + recurse(parsed, mapUrl, mappings, sources, sourcesContent, names, ignoreList, 0, 0, Infinity, Infinity); + const joined = { + version: 3, + file: parsed.file, + names, + sources, + sourcesContent, + mappings, + ignoreList, + }; + return presortedDecodedMap(joined); + }; + function parse(map) { + return typeof map === 'string' ? JSON.parse(map) : map; + } + function recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { + const { sections } = input; + for (let i = 0; i < sections.length; i++) { + const { map, offset } = sections[i]; + let sl = stopLine; + let sc = stopColumn; + if (i + 1 < sections.length) { + const nextOffset = sections[i + 1].offset; + sl = Math.min(stopLine, lineOffset + nextOffset.line); + if (sl === stopLine) { + sc = Math.min(stopColumn, columnOffset + nextOffset.column); + } + else if (sl < stopLine) { + sc = columnOffset + nextOffset.column; + } + } + addSection(map, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset + offset.line, columnOffset + offset.column, sl, sc); + } + } + function addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { + const parsed = parse(input); + if ('sections' in parsed) + return recurse(...arguments); + const map = new TraceMap(parsed, mapUrl); + const sourcesOffset = sources.length; + const namesOffset = names.length; + const decoded = decodedMappings(map); + const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map; + append(sources, resolvedSources); + append(names, map.names); + if (contents) + append(sourcesContent, contents); + else + for (let i = 0; i < resolvedSources.length; i++) + sourcesContent.push(null); + if (ignores) + for (let i = 0; i < ignores.length; i++) + ignoreList.push(ignores[i] + sourcesOffset); + for (let i = 0; i < decoded.length; i++) { + const lineI = lineOffset + i; + // We can only add so many lines before we step into the range that the next section's map + // controls. When we get to the last line, then we'll start checking the segments to see if + // they've crossed into the column range. But it may not have any columns that overstep, so we + // still need to check that we don't overstep lines, too. + if (lineI > stopLine) + return; + // The out line may already exist in mappings (if we're continuing the line started by a + // previous section). Or, we may have jumped ahead several lines to start this section. + const out = getLine(mappings, lineI); + // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the + // map can be multiple lines), it doesn't. + const cOffset = i === 0 ? columnOffset : 0; + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const column = cOffset + seg[COLUMN]; + // If this segment steps into the column range that the next section's map controls, we need + // to stop early. + if (lineI === stopLine && column >= stopColumn) + return; + if (seg.length === 1) { + out.push([column]); + continue; + } + const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + out.push(seg.length === 4 + ? [column, sourcesIndex, sourceLine, sourceColumn] + : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]); + } + } + } + function append(arr, other) { + for (let i = 0; i < other.length; i++) + arr.push(other[i]); + } + function getLine(arr, index) { + for (let i = arr.length; i <= index; i++) + arr[i] = []; + return arr[index]; + } + + const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)'; + const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)'; + const LEAST_UPPER_BOUND = -1; + const GREATEST_LOWER_BOUND = 1; + class TraceMap { + constructor(map, mapUrl) { + const isString = typeof map === 'string'; + if (!isString && map._decodedMemo) + return map; + const parsed = (isString ? JSON.parse(map) : map); + const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; + this.version = version; + this.file = file; + this.names = names || []; + this.sourceRoot = sourceRoot; + this.sources = sources; + this.sourcesContent = sourcesContent; + this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || undefined; + const from = resolve(sourceRoot || '', stripFilename(mapUrl)); + this.resolvedSources = sources.map((s) => resolve(s || '', from)); + const { mappings } = parsed; + if (typeof mappings === 'string') { + this._encoded = mappings; + this._decoded = undefined; + } + else { + this._encoded = undefined; + this._decoded = maybeSort(mappings, isString); + } + this._decodedMemo = memoizedState(); + this._bySources = undefined; + this._bySourceMemos = undefined; + } + } + /** + * Typescript doesn't allow friend access to private fields, so this just casts the map into a type + * with public access modifiers. + */ + function cast(map) { + return map; + } + /** + * Returns the encoded (VLQ string) form of the SourceMap's mappings field. + */ + function encodedMappings(map) { + var _a; + var _b; + return ((_a = (_b = cast(map))._encoded) !== null && _a !== void 0 ? _a : (_b._encoded = sourcemapCodec.encode(cast(map)._decoded))); + } + /** + * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. + */ + function decodedMappings(map) { + var _a; + return ((_a = cast(map))._decoded || (_a._decoded = sourcemapCodec.decode(cast(map)._encoded))); + } + /** + * A low-level API to find the segment associated with a generated line/column (think, from a + * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. + */ + function traceSegment(map, line, column) { + const decoded = decodedMappings(map); + // It's common for parent source maps to have pointers to lines that have no + // mapping (like a "//# sourceMappingURL=") at the end of the child file. + if (line >= decoded.length) + return null; + const segments = decoded[line]; + const index = traceSegmentInternal(segments, cast(map)._decodedMemo, line, column, GREATEST_LOWER_BOUND); + return index === -1 ? null : segments[index]; + } + /** + * A higher-level API to find the source/line/column associated with a generated line/column + * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in + * `source-map` library. + */ + function originalPositionFor(map, needle) { + let { line, column, bias } = needle; + line--; + if (line < 0) + throw new Error(LINE_GTR_ZERO); + if (column < 0) + throw new Error(COL_GTR_EQ_ZERO); + const decoded = decodedMappings(map); + // It's common for parent source maps to have pointers to lines that have no + // mapping (like a "//# sourceMappingURL=") at the end of the child file. + if (line >= decoded.length) + return OMapping(null, null, null, null); + const segments = decoded[line]; + const index = traceSegmentInternal(segments, cast(map)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND); + if (index === -1) + return OMapping(null, null, null, null); + const segment = segments[index]; + if (segment.length === 1) + return OMapping(null, null, null, null); + const { names, resolvedSources } = map; + return OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null); + } + /** + * Finds the generated line/column position of the provided source/line/column source position. + */ + function generatedPositionFor(map, needle) { + const { source, line, column, bias } = needle; + return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false); + } + /** + * Finds all generated line/column positions of the provided source/line/column source position. + */ + function allGeneratedPositionsFor(map, needle) { + const { source, line, column, bias } = needle; + // SourceMapConsumer uses LEAST_UPPER_BOUND for some reason, so we follow suit. + return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true); + } + /** + * Iterates each mapping in generated position order. + */ + function eachMapping(map, cb) { + const decoded = decodedMappings(map); + const { names, resolvedSources } = map; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const generatedLine = i + 1; + const generatedColumn = seg[0]; + let source = null; + let originalLine = null; + let originalColumn = null; + let name = null; + if (seg.length !== 1) { + source = resolvedSources[seg[1]]; + originalLine = seg[2] + 1; + originalColumn = seg[3]; + } + if (seg.length === 5) + name = names[seg[4]]; + cb({ + generatedLine, + generatedColumn, + source, + originalLine, + originalColumn, + name, + }); + } + } + } + function sourceIndex(map, source) { + const { sources, resolvedSources } = map; + let index = sources.indexOf(source); + if (index === -1) + index = resolvedSources.indexOf(source); + return index; + } + /** + * Retrieves the source content for a particular source, if its found. Returns null if not. + */ + function sourceContentFor(map, source) { + const { sourcesContent } = map; + if (sourcesContent == null) + return null; + const index = sourceIndex(map, source); + return index === -1 ? null : sourcesContent[index]; + } + /** + * Determines if the source is marked to ignore by the source map. + */ + function isIgnored(map, source) { + const { ignoreList } = map; + if (ignoreList == null) + return false; + const index = sourceIndex(map, source); + return index === -1 ? false : ignoreList.includes(index); + } + /** + * A helper that skips sorting of the input map's mappings array, which can be expensive for larger + * maps. + */ + function presortedDecodedMap(map, mapUrl) { + const tracer = new TraceMap(clone(map, []), mapUrl); + cast(tracer)._decoded = map.mappings; + return tracer; + } + /** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ + function decodedMap(map) { + return clone(map, decodedMappings(map)); + } + /** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ + function encodedMap(map) { + return clone(map, encodedMappings(map)); + } + function clone(map, mappings) { + return { + version: map.version, + file: map.file, + names: map.names, + sourceRoot: map.sourceRoot, + sources: map.sources, + sourcesContent: map.sourcesContent, + mappings, + ignoreList: map.ignoreList || map.x_google_ignoreList, + }; + } + function OMapping(source, line, column, name) { + return { source, line, column, name }; + } + function GMapping(line, column) { + return { line, column }; + } + function traceSegmentInternal(segments, memo, line, column, bias) { + let index = memoizedBinarySearch(segments, column, memo, line); + if (found) { + index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); + } + else if (bias === LEAST_UPPER_BOUND) + index++; + if (index === -1 || index === segments.length) + return -1; + return index; + } + function sliceGeneratedPositions(segments, memo, line, column, bias) { + let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND); + // We ignored the bias when tracing the segment so that we're guarnateed to find the first (in + // insertion order) segment that matched. Even if we did respect the bias when tracing, we would + // still need to call `lowerBound()` to find the first segment, which is slower than just looking + // for the GREATEST_LOWER_BOUND to begin with. The only difference that matters for us is when the + // binary search didn't match, in which case GREATEST_LOWER_BOUND just needs to increment to + // match LEAST_UPPER_BOUND. + if (!found && bias === LEAST_UPPER_BOUND) + min++; + if (min === -1 || min === segments.length) + return []; + // We may have found the segment that started at an earlier column. If this is the case, then we + // need to slice all generated segments that match _that_ column, because all such segments span + // to our desired column. + const matchedColumn = found ? column : segments[min][COLUMN]; + // The binary search is not guaranteed to find the lower bound when a match wasn't found. + if (!found) + min = lowerBound(segments, matchedColumn, min); + const max = upperBound(segments, matchedColumn, min); + const result = []; + for (; min <= max; min++) { + const segment = segments[min]; + result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN])); + } + return result; + } + function generatedPosition(map, source, line, column, bias, all) { + var _a; + line--; + if (line < 0) + throw new Error(LINE_GTR_ZERO); + if (column < 0) + throw new Error(COL_GTR_EQ_ZERO); + const { sources, resolvedSources } = map; + let sourceIndex = sources.indexOf(source); + if (sourceIndex === -1) + sourceIndex = resolvedSources.indexOf(source); + if (sourceIndex === -1) + return all ? [] : GMapping(null, null); + const generated = ((_a = cast(map))._bySources || (_a._bySources = buildBySources(decodedMappings(map), (cast(map)._bySourceMemos = sources.map(memoizedState))))); + const segments = generated[sourceIndex][line]; + if (segments == null) + return all ? [] : GMapping(null, null); + const memo = cast(map)._bySourceMemos[sourceIndex]; + if (all) + return sliceGeneratedPositions(segments, memo, line, column, bias); + const index = traceSegmentInternal(segments, memo, line, column, bias); + if (index === -1) + return GMapping(null, null); + const segment = segments[index]; + return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]); + } + + exports.AnyMap = AnyMap; + exports.GREATEST_LOWER_BOUND = GREATEST_LOWER_BOUND; + exports.LEAST_UPPER_BOUND = LEAST_UPPER_BOUND; + exports.TraceMap = TraceMap; + exports.allGeneratedPositionsFor = allGeneratedPositionsFor; + exports.decodedMap = decodedMap; + exports.decodedMappings = decodedMappings; + exports.eachMapping = eachMapping; + exports.encodedMap = encodedMap; + exports.encodedMappings = encodedMappings; + exports.generatedPositionFor = generatedPositionFor; + exports.isIgnored = isIgnored; + exports.originalPositionFor = originalPositionFor; + exports.presortedDecodedMap = presortedDecodedMap; + exports.sourceContentFor = sourceContentFor; + exports.traceSegment = traceSegment; + +})); +//# sourceMappingURL=trace-mapping.umd.js.map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map new file mode 100644 index 0000000..c6716ea --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"trace-mapping.umd.js","sources":["../src/resolve.ts","../src/strip-filename.ts","../src/sourcemap-segment.ts","../src/sort.ts","../src/binary-search.ts","../src/by-source.ts","../src/any-map.ts","../src/trace-mapping.ts"],"sourcesContent":["import resolveUri from '@jridgewell/resolve-uri';\n\nexport default function resolve(input: string, base: string | undefined): string {\n // The base is always treated as a directory, if it's not empty.\n // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327\n // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401\n if (base && !base.endsWith('/')) base += '/';\n\n return resolveUri(input, base);\n}\n","/**\n * Removes everything after the last \"/\", but leaves the slash.\n */\nexport default function stripFilename(path: string | undefined | null): string {\n if (!path) return '';\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n","type GeneratedColumn = number;\ntype SourcesIndex = number;\ntype SourceLine = number;\ntype SourceColumn = number;\ntype NamesIndex = number;\n\ntype GeneratedLine = number;\n\nexport type SourceMapSegment =\n | [GeneratedColumn]\n | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn]\n | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];\n\nexport type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn];\n\nexport const COLUMN = 0;\nexport const SOURCES_INDEX = 1;\nexport const SOURCE_LINE = 2;\nexport const SOURCE_COLUMN = 3;\nexport const NAMES_INDEX = 4;\n\nexport const REV_GENERATED_LINE = 1;\nexport const REV_GENERATED_COLUMN = 2;\n","import { COLUMN } from './sourcemap-segment';\n\nimport type { SourceMapSegment } from './sourcemap-segment';\n\nexport default function maybeSort(\n mappings: SourceMapSegment[][],\n owned: boolean,\n): SourceMapSegment[][] {\n const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);\n if (unsortedIndex === mappings.length) return mappings;\n\n // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If\n // not, we do not want to modify the consumer's input array.\n if (!owned) mappings = mappings.slice();\n\n for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {\n mappings[i] = sortSegments(mappings[i], owned);\n }\n return mappings;\n}\n\nfunction nextUnsortedSegmentLine(mappings: SourceMapSegment[][], start: number): number {\n for (let i = start; i < mappings.length; i++) {\n if (!isSorted(mappings[i])) return i;\n }\n return mappings.length;\n}\n\nfunction isSorted(line: SourceMapSegment[]): boolean {\n for (let j = 1; j < line.length; j++) {\n if (line[j][COLUMN] < line[j - 1][COLUMN]) {\n return false;\n }\n }\n return true;\n}\n\nfunction sortSegments(line: SourceMapSegment[], owned: boolean): SourceMapSegment[] {\n if (!owned) line = line.slice();\n return line.sort(sortComparator);\n}\n\nfunction sortComparator(a: SourceMapSegment, b: SourceMapSegment): number {\n return a[COLUMN] - b[COLUMN];\n}\n","import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment';\nimport { COLUMN } from './sourcemap-segment';\n\nexport type MemoState = {\n lastKey: number;\n lastNeedle: number;\n lastIndex: number;\n};\n\nexport let found = false;\n\n/**\n * A binary search implementation that returns the index if a match is found.\n * If no match is found, then the left-index (the index associated with the item that comes just\n * before the desired index) is returned. To maintain proper sort order, a splice would happen at\n * the next index:\n *\n * ```js\n * const array = [1, 3];\n * const needle = 2;\n * const index = binarySearch(array, needle, (item, needle) => item - needle);\n *\n * assert.equal(index, 0);\n * array.splice(index + 1, 0, needle);\n * assert.deepEqual(array, [1, 2, 3]);\n * ```\n */\nexport function binarySearch(\n haystack: SourceMapSegment[] | ReverseSegment[],\n needle: number,\n low: number,\n high: number,\n): number {\n while (low <= high) {\n const mid = low + ((high - low) >> 1);\n const cmp = haystack[mid][COLUMN] - needle;\n\n if (cmp === 0) {\n found = true;\n return mid;\n }\n\n if (cmp < 0) {\n low = mid + 1;\n } else {\n high = mid - 1;\n }\n }\n\n found = false;\n return low - 1;\n}\n\nexport function upperBound(\n haystack: SourceMapSegment[] | ReverseSegment[],\n needle: number,\n index: number,\n): number {\n for (let i = index + 1; i < haystack.length; index = i++) {\n if (haystack[i][COLUMN] !== needle) break;\n }\n return index;\n}\n\nexport function lowerBound(\n haystack: SourceMapSegment[] | ReverseSegment[],\n needle: number,\n index: number,\n): number {\n for (let i = index - 1; i >= 0; index = i--) {\n if (haystack[i][COLUMN] !== needle) break;\n }\n return index;\n}\n\nexport function memoizedState(): MemoState {\n return {\n lastKey: -1,\n lastNeedle: -1,\n lastIndex: -1,\n };\n}\n\n/**\n * This overly complicated beast is just to record the last tested line/column and the resulting\n * index, allowing us to skip a few tests if mappings are monotonically increasing.\n */\nexport function memoizedBinarySearch(\n haystack: SourceMapSegment[] | ReverseSegment[],\n needle: number,\n state: MemoState,\n key: number,\n): number {\n const { lastKey, lastNeedle, lastIndex } = state;\n\n let low = 0;\n let high = haystack.length - 1;\n if (key === lastKey) {\n if (needle === lastNeedle) {\n found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;\n return lastIndex;\n }\n\n if (needle >= lastNeedle) {\n // lastIndex may be -1 if the previous needle was not found.\n low = lastIndex === -1 ? 0 : lastIndex;\n } else {\n high = lastIndex;\n }\n }\n state.lastKey = key;\n state.lastNeedle = needle;\n\n return (state.lastIndex = binarySearch(haystack, needle, low, high));\n}\n","import { COLUMN, SOURCES_INDEX, SOURCE_LINE, SOURCE_COLUMN } from './sourcemap-segment';\nimport { memoizedBinarySearch, upperBound } from './binary-search';\n\nimport type { ReverseSegment, SourceMapSegment } from './sourcemap-segment';\nimport type { MemoState } from './binary-search';\n\nexport type Source = {\n __proto__: null;\n [line: number]: Exclude[];\n};\n\n// Rebuilds the original source files, with mappings that are ordered by source line/column instead\n// of generated line/column.\nexport default function buildBySources(\n decoded: readonly SourceMapSegment[][],\n memos: MemoState[],\n): Source[] {\n const sources: Source[] = memos.map(buildNullArray);\n\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n if (seg.length === 1) continue;\n\n const sourceIndex = seg[SOURCES_INDEX];\n const sourceLine = seg[SOURCE_LINE];\n const sourceColumn = seg[SOURCE_COLUMN];\n const originalSource = sources[sourceIndex];\n const originalLine = (originalSource[sourceLine] ||= []);\n const memo = memos[sourceIndex];\n\n // The binary search either found a match, or it found the left-index just before where the\n // segment should go. Either way, we want to insert after that. And there may be multiple\n // generated segments associated with an original location, so there may need to move several\n // indexes before we find where we need to insert.\n let index = upperBound(\n originalLine,\n sourceColumn,\n memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine),\n );\n\n memo.lastIndex = ++index;\n insert(originalLine, index, [sourceColumn, i, seg[COLUMN]]);\n }\n }\n\n return sources;\n}\n\nfunction insert(array: T[], index: number, value: T) {\n for (let i = array.length; i > index; i--) {\n array[i] = array[i - 1];\n }\n array[index] = value;\n}\n\n// Null arrays allow us to use ordered index keys without actually allocating contiguous memory like\n// a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations.\n// Numeric properties on objects are magically sorted in ascending order by the engine regardless of\n// the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending\n// order when iterating with for-in.\nfunction buildNullArray(): T {\n return { __proto__: null } as T;\n}\n","import { TraceMap, presortedDecodedMap, decodedMappings } from './trace-mapping';\nimport {\n COLUMN,\n SOURCES_INDEX,\n SOURCE_LINE,\n SOURCE_COLUMN,\n NAMES_INDEX,\n} from './sourcemap-segment';\n\nimport type {\n DecodedSourceMap,\n DecodedSourceMapXInput,\n EncodedSourceMapXInput,\n SectionedSourceMapXInput,\n SectionedSourceMapInput,\n SectionXInput,\n} from './types';\nimport type { SourceMapSegment } from './sourcemap-segment';\n\ntype AnyMap = {\n new (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap;\n (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap;\n};\n\nexport const AnyMap: AnyMap = function (map, mapUrl) {\n const parsed = parse(map);\n\n if (!('sections' in parsed)) {\n return new TraceMap(parsed as DecodedSourceMapXInput | EncodedSourceMapXInput, mapUrl);\n }\n\n const mappings: SourceMapSegment[][] = [];\n const sources: string[] = [];\n const sourcesContent: (string | null)[] = [];\n const names: string[] = [];\n const ignoreList: number[] = [];\n\n recurse(\n parsed,\n mapUrl,\n mappings,\n sources,\n sourcesContent,\n names,\n ignoreList,\n 0,\n 0,\n Infinity,\n Infinity,\n );\n\n const joined: DecodedSourceMap = {\n version: 3,\n file: parsed.file,\n names,\n sources,\n sourcesContent,\n mappings,\n ignoreList,\n };\n\n return presortedDecodedMap(joined);\n} as AnyMap;\n\nfunction parse(map: T): Exclude {\n return typeof map === 'string' ? JSON.parse(map) : map;\n}\n\nfunction recurse(\n input: SectionedSourceMapXInput,\n mapUrl: string | null | undefined,\n mappings: SourceMapSegment[][],\n sources: string[],\n sourcesContent: (string | null)[],\n names: string[],\n ignoreList: number[],\n lineOffset: number,\n columnOffset: number,\n stopLine: number,\n stopColumn: number,\n) {\n const { sections } = input;\n for (let i = 0; i < sections.length; i++) {\n const { map, offset } = sections[i];\n\n let sl = stopLine;\n let sc = stopColumn;\n if (i + 1 < sections.length) {\n const nextOffset = sections[i + 1].offset;\n sl = Math.min(stopLine, lineOffset + nextOffset.line);\n\n if (sl === stopLine) {\n sc = Math.min(stopColumn, columnOffset + nextOffset.column);\n } else if (sl < stopLine) {\n sc = columnOffset + nextOffset.column;\n }\n }\n\n addSection(\n map,\n mapUrl,\n mappings,\n sources,\n sourcesContent,\n names,\n ignoreList,\n lineOffset + offset.line,\n columnOffset + offset.column,\n sl,\n sc,\n );\n }\n}\n\nfunction addSection(\n input: SectionXInput['map'],\n mapUrl: string | null | undefined,\n mappings: SourceMapSegment[][],\n sources: string[],\n sourcesContent: (string | null)[],\n names: string[],\n ignoreList: number[],\n lineOffset: number,\n columnOffset: number,\n stopLine: number,\n stopColumn: number,\n) {\n const parsed = parse(input);\n if ('sections' in parsed) return recurse(...(arguments as unknown as Parameters));\n\n const map = new TraceMap(parsed, mapUrl);\n const sourcesOffset = sources.length;\n const namesOffset = names.length;\n const decoded = decodedMappings(map);\n const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map;\n\n append(sources, resolvedSources);\n append(names, map.names);\n\n if (contents) append(sourcesContent, contents);\n else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null);\n\n if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset);\n\n for (let i = 0; i < decoded.length; i++) {\n const lineI = lineOffset + i;\n\n // We can only add so many lines before we step into the range that the next section's map\n // controls. When we get to the last line, then we'll start checking the segments to see if\n // they've crossed into the column range. But it may not have any columns that overstep, so we\n // still need to check that we don't overstep lines, too.\n if (lineI > stopLine) return;\n\n // The out line may already exist in mappings (if we're continuing the line started by a\n // previous section). Or, we may have jumped ahead several lines to start this section.\n const out = getLine(mappings, lineI);\n // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the\n // map can be multiple lines), it doesn't.\n const cOffset = i === 0 ? columnOffset : 0;\n\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n const column = cOffset + seg[COLUMN];\n\n // If this segment steps into the column range that the next section's map controls, we need\n // to stop early.\n if (lineI === stopLine && column >= stopColumn) return;\n\n if (seg.length === 1) {\n out.push([column]);\n continue;\n }\n\n const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX];\n const sourceLine = seg[SOURCE_LINE];\n const sourceColumn = seg[SOURCE_COLUMN];\n out.push(\n seg.length === 4\n ? [column, sourcesIndex, sourceLine, sourceColumn]\n : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]],\n );\n }\n }\n}\n\nfunction append(arr: T[], other: T[]) {\n for (let i = 0; i < other.length; i++) arr.push(other[i]);\n}\n\nfunction getLine(arr: T[][], index: number): T[] {\n for (let i = arr.length; i <= index; i++) arr[i] = [];\n return arr[index];\n}\n","import { encode, decode } from '@jridgewell/sourcemap-codec';\n\nimport resolve from './resolve';\nimport stripFilename from './strip-filename';\nimport maybeSort from './sort';\nimport buildBySources from './by-source';\nimport {\n memoizedState,\n memoizedBinarySearch,\n upperBound,\n lowerBound,\n found as bsFound,\n} from './binary-search';\nimport {\n COLUMN,\n SOURCES_INDEX,\n SOURCE_LINE,\n SOURCE_COLUMN,\n NAMES_INDEX,\n REV_GENERATED_LINE,\n REV_GENERATED_COLUMN,\n} from './sourcemap-segment';\n\nimport type { SourceMapSegment, ReverseSegment } from './sourcemap-segment';\nimport type {\n SourceMapV3,\n DecodedSourceMap,\n EncodedSourceMap,\n InvalidOriginalMapping,\n OriginalMapping,\n InvalidGeneratedMapping,\n GeneratedMapping,\n SourceMapInput,\n Needle,\n SourceNeedle,\n SourceMap,\n EachMapping,\n Bias,\n XInput,\n} from './types';\nimport type { Source } from './by-source';\nimport type { MemoState } from './binary-search';\n\nexport type { SourceMapSegment } from './sourcemap-segment';\nexport type {\n SourceMap,\n DecodedSourceMap,\n EncodedSourceMap,\n Section,\n SectionedSourceMap,\n SourceMapV3,\n Bias,\n EachMapping,\n GeneratedMapping,\n InvalidGeneratedMapping,\n InvalidOriginalMapping,\n Needle,\n OriginalMapping,\n OriginalMapping as Mapping,\n SectionedSourceMapInput,\n SourceMapInput,\n SourceNeedle,\n XInput,\n EncodedSourceMapXInput,\n DecodedSourceMapXInput,\n SectionedSourceMapXInput,\n SectionXInput,\n} from './types';\n\ninterface PublicMap {\n _encoded: TraceMap['_encoded'];\n _decoded: TraceMap['_decoded'];\n _decodedMemo: TraceMap['_decodedMemo'];\n _bySources: TraceMap['_bySources'];\n _bySourceMemos: TraceMap['_bySourceMemos'];\n}\n\nconst LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)';\nconst COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)';\n\nexport const LEAST_UPPER_BOUND = -1;\nexport const GREATEST_LOWER_BOUND = 1;\n\nexport { AnyMap } from './any-map';\n\nexport class TraceMap implements SourceMap {\n declare version: SourceMapV3['version'];\n declare file: SourceMapV3['file'];\n declare names: SourceMapV3['names'];\n declare sourceRoot: SourceMapV3['sourceRoot'];\n declare sources: SourceMapV3['sources'];\n declare sourcesContent: SourceMapV3['sourcesContent'];\n declare ignoreList: SourceMapV3['ignoreList'];\n\n declare resolvedSources: string[];\n private declare _encoded: string | undefined;\n\n private declare _decoded: SourceMapSegment[][] | undefined;\n private declare _decodedMemo: MemoState;\n\n private declare _bySources: Source[] | undefined;\n private declare _bySourceMemos: MemoState[] | undefined;\n\n constructor(map: SourceMapInput, mapUrl?: string | null) {\n const isString = typeof map === 'string';\n\n if (!isString && (map as unknown as { _decodedMemo: any })._decodedMemo) return map as TraceMap;\n\n const parsed = (isString ? JSON.parse(map) : map) as DecodedSourceMap | EncodedSourceMap;\n\n const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;\n this.version = version;\n this.file = file;\n this.names = names || [];\n this.sourceRoot = sourceRoot;\n this.sources = sources;\n this.sourcesContent = sourcesContent;\n this.ignoreList = parsed.ignoreList || (parsed as XInput).x_google_ignoreList || undefined;\n\n const from = resolve(sourceRoot || '', stripFilename(mapUrl));\n this.resolvedSources = sources.map((s) => resolve(s || '', from));\n\n const { mappings } = parsed;\n if (typeof mappings === 'string') {\n this._encoded = mappings;\n this._decoded = undefined;\n } else {\n this._encoded = undefined;\n this._decoded = maybeSort(mappings, isString);\n }\n\n this._decodedMemo = memoizedState();\n this._bySources = undefined;\n this._bySourceMemos = undefined;\n }\n}\n\n/**\n * Typescript doesn't allow friend access to private fields, so this just casts the map into a type\n * with public access modifiers.\n */\nfunction cast(map: unknown): PublicMap {\n return map as any;\n}\n\n/**\n * Returns the encoded (VLQ string) form of the SourceMap's mappings field.\n */\nexport function encodedMappings(map: TraceMap): EncodedSourceMap['mappings'] {\n return (cast(map)._encoded ??= encode(cast(map)._decoded!));\n}\n\n/**\n * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.\n */\nexport function decodedMappings(map: TraceMap): Readonly {\n return (cast(map)._decoded ||= decode(cast(map)._encoded!));\n}\n\n/**\n * A low-level API to find the segment associated with a generated line/column (think, from a\n * stack trace). Line and column here are 0-based, unlike `originalPositionFor`.\n */\nexport function traceSegment(\n map: TraceMap,\n line: number,\n column: number,\n): Readonly | null {\n const decoded = decodedMappings(map);\n\n // It's common for parent source maps to have pointers to lines that have no\n // mapping (like a \"//# sourceMappingURL=\") at the end of the child file.\n if (line >= decoded.length) return null;\n\n const segments = decoded[line];\n const index = traceSegmentInternal(\n segments,\n cast(map)._decodedMemo,\n line,\n column,\n GREATEST_LOWER_BOUND,\n );\n\n return index === -1 ? null : segments[index];\n}\n\n/**\n * A higher-level API to find the source/line/column associated with a generated line/column\n * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in\n * `source-map` library.\n */\nexport function originalPositionFor(\n map: TraceMap,\n needle: Needle,\n): OriginalMapping | InvalidOriginalMapping {\n let { line, column, bias } = needle;\n line--;\n if (line < 0) throw new Error(LINE_GTR_ZERO);\n if (column < 0) throw new Error(COL_GTR_EQ_ZERO);\n\n const decoded = decodedMappings(map);\n\n // It's common for parent source maps to have pointers to lines that have no\n // mapping (like a \"//# sourceMappingURL=\") at the end of the child file.\n if (line >= decoded.length) return OMapping(null, null, null, null);\n\n const segments = decoded[line];\n const index = traceSegmentInternal(\n segments,\n cast(map)._decodedMemo,\n line,\n column,\n bias || GREATEST_LOWER_BOUND,\n );\n\n if (index === -1) return OMapping(null, null, null, null);\n\n const segment = segments[index];\n if (segment.length === 1) return OMapping(null, null, null, null);\n\n const { names, resolvedSources } = map;\n return OMapping(\n resolvedSources[segment[SOURCES_INDEX]],\n segment[SOURCE_LINE] + 1,\n segment[SOURCE_COLUMN],\n segment.length === 5 ? names[segment[NAMES_INDEX]] : null,\n );\n}\n\n/**\n * Finds the generated line/column position of the provided source/line/column source position.\n */\nexport function generatedPositionFor(\n map: TraceMap,\n needle: SourceNeedle,\n): GeneratedMapping | InvalidGeneratedMapping {\n const { source, line, column, bias } = needle;\n return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false);\n}\n\n/**\n * Finds all generated line/column positions of the provided source/line/column source position.\n */\nexport function allGeneratedPositionsFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping[] {\n const { source, line, column, bias } = needle;\n // SourceMapConsumer uses LEAST_UPPER_BOUND for some reason, so we follow suit.\n return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true);\n}\n\n/**\n * Iterates each mapping in generated position order.\n */\nexport function eachMapping(map: TraceMap, cb: (mapping: EachMapping) => void): void {\n const decoded = decodedMappings(map);\n const { names, resolvedSources } = map;\n\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n\n const generatedLine = i + 1;\n const generatedColumn = seg[0];\n let source = null;\n let originalLine = null;\n let originalColumn = null;\n let name = null;\n if (seg.length !== 1) {\n source = resolvedSources[seg[1]];\n originalLine = seg[2] + 1;\n originalColumn = seg[3];\n }\n if (seg.length === 5) name = names[seg[4]];\n\n cb({\n generatedLine,\n generatedColumn,\n source,\n originalLine,\n originalColumn,\n name,\n } as EachMapping);\n }\n }\n}\n\nfunction sourceIndex(map: TraceMap, source: string): number {\n const { sources, resolvedSources } = map;\n let index = sources.indexOf(source);\n if (index === -1) index = resolvedSources.indexOf(source);\n return index;\n}\n\n/**\n * Retrieves the source content for a particular source, if its found. Returns null if not.\n */\nexport function sourceContentFor(map: TraceMap, source: string): string | null {\n const { sourcesContent } = map;\n if (sourcesContent == null) return null;\n const index = sourceIndex(map, source);\n return index === -1 ? null : sourcesContent[index];\n}\n\n/**\n * Determines if the source is marked to ignore by the source map.\n */\nexport function isIgnored(map: TraceMap, source: string): boolean {\n const { ignoreList } = map;\n if (ignoreList == null) return false;\n const index = sourceIndex(map, source);\n return index === -1 ? false : ignoreList.includes(index);\n}\n\n/**\n * A helper that skips sorting of the input map's mappings array, which can be expensive for larger\n * maps.\n */\nexport function presortedDecodedMap(map: DecodedSourceMap, mapUrl?: string): TraceMap {\n const tracer = new TraceMap(clone(map, []), mapUrl);\n cast(tracer)._decoded = map.mappings;\n return tracer;\n}\n\n/**\n * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nexport function decodedMap(\n map: TraceMap,\n): Omit & { mappings: readonly SourceMapSegment[][] } {\n return clone(map, decodedMappings(map));\n}\n\n/**\n * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nexport function encodedMap(map: TraceMap): EncodedSourceMap {\n return clone(map, encodedMappings(map));\n}\n\nfunction clone(\n map: TraceMap | DecodedSourceMap,\n mappings: T,\n): T extends string ? EncodedSourceMap : DecodedSourceMap {\n return {\n version: map.version,\n file: map.file,\n names: map.names,\n sourceRoot: map.sourceRoot,\n sources: map.sources,\n sourcesContent: map.sourcesContent,\n mappings,\n ignoreList: map.ignoreList || (map as XInput).x_google_ignoreList,\n } as any;\n}\n\nfunction OMapping(source: null, line: null, column: null, name: null): InvalidOriginalMapping;\nfunction OMapping(\n source: string,\n line: number,\n column: number,\n name: string | null,\n): OriginalMapping;\nfunction OMapping(\n source: string | null,\n line: number | null,\n column: number | null,\n name: string | null,\n): OriginalMapping | InvalidOriginalMapping {\n return { source, line, column, name } as any;\n}\n\nfunction GMapping(line: null, column: null): InvalidGeneratedMapping;\nfunction GMapping(line: number, column: number): GeneratedMapping;\nfunction GMapping(\n line: number | null,\n column: number | null,\n): GeneratedMapping | InvalidGeneratedMapping {\n return { line, column } as any;\n}\n\nfunction traceSegmentInternal(\n segments: SourceMapSegment[],\n memo: MemoState,\n line: number,\n column: number,\n bias: Bias,\n): number;\nfunction traceSegmentInternal(\n segments: ReverseSegment[],\n memo: MemoState,\n line: number,\n column: number,\n bias: Bias,\n): number;\nfunction traceSegmentInternal(\n segments: SourceMapSegment[] | ReverseSegment[],\n memo: MemoState,\n line: number,\n column: number,\n bias: Bias,\n): number {\n let index = memoizedBinarySearch(segments, column, memo, line);\n if (bsFound) {\n index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);\n } else if (bias === LEAST_UPPER_BOUND) index++;\n\n if (index === -1 || index === segments.length) return -1;\n return index;\n}\n\nfunction sliceGeneratedPositions(\n segments: ReverseSegment[],\n memo: MemoState,\n line: number,\n column: number,\n bias: Bias,\n): GeneratedMapping[] {\n let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND);\n\n // We ignored the bias when tracing the segment so that we're guarnateed to find the first (in\n // insertion order) segment that matched. Even if we did respect the bias when tracing, we would\n // still need to call `lowerBound()` to find the first segment, which is slower than just looking\n // for the GREATEST_LOWER_BOUND to begin with. The only difference that matters for us is when the\n // binary search didn't match, in which case GREATEST_LOWER_BOUND just needs to increment to\n // match LEAST_UPPER_BOUND.\n if (!bsFound && bias === LEAST_UPPER_BOUND) min++;\n\n if (min === -1 || min === segments.length) return [];\n\n // We may have found the segment that started at an earlier column. If this is the case, then we\n // need to slice all generated segments that match _that_ column, because all such segments span\n // to our desired column.\n const matchedColumn = bsFound ? column : segments[min][COLUMN];\n\n // The binary search is not guaranteed to find the lower bound when a match wasn't found.\n if (!bsFound) min = lowerBound(segments, matchedColumn, min);\n const max = upperBound(segments, matchedColumn, min);\n\n const result = [];\n for (; min <= max; min++) {\n const segment = segments[min];\n result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));\n }\n return result;\n}\n\nfunction generatedPosition(\n map: TraceMap,\n source: string,\n line: number,\n column: number,\n bias: Bias,\n all: false,\n): GeneratedMapping | InvalidGeneratedMapping;\nfunction generatedPosition(\n map: TraceMap,\n source: string,\n line: number,\n column: number,\n bias: Bias,\n all: true,\n): GeneratedMapping[];\nfunction generatedPosition(\n map: TraceMap,\n source: string,\n line: number,\n column: number,\n bias: Bias,\n all: boolean,\n): GeneratedMapping | InvalidGeneratedMapping | GeneratedMapping[] {\n line--;\n if (line < 0) throw new Error(LINE_GTR_ZERO);\n if (column < 0) throw new Error(COL_GTR_EQ_ZERO);\n\n const { sources, resolvedSources } = map;\n let sourceIndex = sources.indexOf(source);\n if (sourceIndex === -1) sourceIndex = resolvedSources.indexOf(source);\n if (sourceIndex === -1) return all ? [] : GMapping(null, null);\n\n const generated = (cast(map)._bySources ||= buildBySources(\n decodedMappings(map),\n (cast(map)._bySourceMemos = sources.map(memoizedState)),\n ));\n\n const segments = generated[sourceIndex][line];\n if (segments == null) return all ? [] : GMapping(null, null);\n\n const memo = cast(map)._bySourceMemos![sourceIndex];\n\n if (all) return sliceGeneratedPositions(segments, memo, line, column, bias);\n\n const index = traceSegmentInternal(segments, memo, line, column, bias);\n if (index === -1) return GMapping(null, null);\n\n const segment = segments[index];\n return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);\n}\n"],"names":["encode","decode","bsFound"],"mappings":";;;;;;IAE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C,GAAG,CAAC,EAAC,UAAU,KAAA,EAAA,CAAV,UAAU,GAAK,cAAc,CACxD,eAAe,CAAC,GAAG,CAAC,GACnB,IAAI,CAAC,GAAG,CAAC,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,EACvD,EAAC,CAAC;QAEH,MAAM,QAAQ,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC;QAC9C,IAAI,QAAQ,IAAI,IAAI;IAAE,QAAA,OAAO,GAAG,GAAG,EAAE,GAAG,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAE7D,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,cAAe,CAAC,WAAW,CAAC,CAAC;IAEpD,IAAA,IAAI,GAAG;IAAE,QAAA,OAAO,uBAAuB,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAE5E,IAAA,MAAM,KAAK,GAAG,oBAAoB,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;QACvE,IAAI,KAAK,KAAK,CAAC,CAAC;IAAE,QAAA,OAAO,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAE9C,IAAA,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChC,IAAA,OAAO,QAAQ,CAAC,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAClF;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts new file mode 100644 index 0000000..ec775fb --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts @@ -0,0 +1,8 @@ +import { TraceMap } from './trace-mapping'; +import type { SectionedSourceMapInput } from './types'; +type AnyMap = { + new (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap; + (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap; +}; +export declare const AnyMap: AnyMap; +export {}; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts new file mode 100644 index 0000000..ecb2873 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts @@ -0,0 +1,32 @@ +import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment'; +export type MemoState = { + lastKey: number; + lastNeedle: number; + lastIndex: number; +}; +export declare let found: boolean; +/** + * A binary search implementation that returns the index if a match is found. + * If no match is found, then the left-index (the index associated with the item that comes just + * before the desired index) is returned. To maintain proper sort order, a splice would happen at + * the next index: + * + * ```js + * const array = [1, 3]; + * const needle = 2; + * const index = binarySearch(array, needle, (item, needle) => item - needle); + * + * assert.equal(index, 0); + * array.splice(index + 1, 0, needle); + * assert.deepEqual(array, [1, 2, 3]); + * ``` + */ +export declare function binarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, low: number, high: number): number; +export declare function upperBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; +export declare function lowerBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; +export declare function memoizedState(): MemoState; +/** + * This overly complicated beast is just to record the last tested line/column and the resulting + * index, allowing us to skip a few tests if mappings are monotonically increasing. + */ +export declare function memoizedBinarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, state: MemoState, key: number): number; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts new file mode 100644 index 0000000..a91751c --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts @@ -0,0 +1,7 @@ +import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment'; +import type { MemoState } from './binary-search'; +export type Source = { + __proto__: null; + [line: number]: Exclude[]; +}; +export default function buildBySources(decoded: readonly SourceMapSegment[][], memos: MemoState[]): Source[]; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts new file mode 100644 index 0000000..cf7d4f8 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts @@ -0,0 +1 @@ +export default function resolve(input: string, base: string | undefined): string; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts new file mode 100644 index 0000000..2bfb5dc --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts @@ -0,0 +1,2 @@ +import type { SourceMapSegment } from './sourcemap-segment'; +export default function maybeSort(mappings: SourceMapSegment[][], owned: boolean): SourceMapSegment[][]; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts new file mode 100644 index 0000000..6d4d318 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts @@ -0,0 +1,16 @@ +type GeneratedColumn = number; +type SourcesIndex = number; +type SourceLine = number; +type SourceColumn = number; +type NamesIndex = number; +type GeneratedLine = number; +export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; +export type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn]; +export declare const COLUMN = 0; +export declare const SOURCES_INDEX = 1; +export declare const SOURCE_LINE = 2; +export declare const SOURCE_COLUMN = 3; +export declare const NAMES_INDEX = 4; +export declare const REV_GENERATED_LINE = 1; +export declare const REV_GENERATED_COLUMN = 2; +export {}; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts new file mode 100644 index 0000000..bead5c1 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts @@ -0,0 +1,4 @@ +/** + * Removes everything after the last "/", but leaves the slash. + */ +export default function stripFilename(path: string | undefined | null): string; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts new file mode 100644 index 0000000..f618ec3 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts @@ -0,0 +1,79 @@ +import type { SourceMapSegment } from './sourcemap-segment'; +import type { SourceMapV3, DecodedSourceMap, EncodedSourceMap, InvalidOriginalMapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, SourceMapInput, Needle, SourceNeedle, SourceMap, EachMapping } from './types'; +export type { SourceMapSegment } from './sourcemap-segment'; +export type { SourceMap, DecodedSourceMap, EncodedSourceMap, Section, SectionedSourceMap, SourceMapV3, Bias, EachMapping, GeneratedMapping, InvalidGeneratedMapping, InvalidOriginalMapping, Needle, OriginalMapping, OriginalMapping as Mapping, SectionedSourceMapInput, SourceMapInput, SourceNeedle, XInput, EncodedSourceMapXInput, DecodedSourceMapXInput, SectionedSourceMapXInput, SectionXInput, } from './types'; +export declare const LEAST_UPPER_BOUND = -1; +export declare const GREATEST_LOWER_BOUND = 1; +export { AnyMap } from './any-map'; +export declare class TraceMap implements SourceMap { + version: SourceMapV3['version']; + file: SourceMapV3['file']; + names: SourceMapV3['names']; + sourceRoot: SourceMapV3['sourceRoot']; + sources: SourceMapV3['sources']; + sourcesContent: SourceMapV3['sourcesContent']; + ignoreList: SourceMapV3['ignoreList']; + resolvedSources: string[]; + private _encoded; + private _decoded; + private _decodedMemo; + private _bySources; + private _bySourceMemos; + constructor(map: SourceMapInput, mapUrl?: string | null); +} +/** + * Returns the encoded (VLQ string) form of the SourceMap's mappings field. + */ +export declare function encodedMappings(map: TraceMap): EncodedSourceMap['mappings']; +/** + * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. + */ +export declare function decodedMappings(map: TraceMap): Readonly; +/** + * A low-level API to find the segment associated with a generated line/column (think, from a + * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. + */ +export declare function traceSegment(map: TraceMap, line: number, column: number): Readonly | null; +/** + * A higher-level API to find the source/line/column associated with a generated line/column + * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in + * `source-map` library. + */ +export declare function originalPositionFor(map: TraceMap, needle: Needle): OriginalMapping | InvalidOriginalMapping; +/** + * Finds the generated line/column position of the provided source/line/column source position. + */ +export declare function generatedPositionFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping | InvalidGeneratedMapping; +/** + * Finds all generated line/column positions of the provided source/line/column source position. + */ +export declare function allGeneratedPositionsFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping[]; +/** + * Iterates each mapping in generated position order. + */ +export declare function eachMapping(map: TraceMap, cb: (mapping: EachMapping) => void): void; +/** + * Retrieves the source content for a particular source, if its found. Returns null if not. + */ +export declare function sourceContentFor(map: TraceMap, source: string): string | null; +/** + * Determines if the source is marked to ignore by the source map. + */ +export declare function isIgnored(map: TraceMap, source: string): boolean; +/** + * A helper that skips sorting of the input map's mappings array, which can be expensive for larger + * maps. + */ +export declare function presortedDecodedMap(map: DecodedSourceMap, mapUrl?: string): TraceMap; +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare function decodedMap(map: TraceMap): Omit & { + mappings: readonly SourceMapSegment[][]; +}; +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare function encodedMap(map: TraceMap): EncodedSourceMap; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts new file mode 100644 index 0000000..a94e6b2 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts @@ -0,0 +1,99 @@ +import type { SourceMapSegment } from './sourcemap-segment'; +import type { GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap } from './trace-mapping'; +export interface SourceMapV3 { + file?: string | null; + names: string[]; + sourceRoot?: string; + sources: (string | null)[]; + sourcesContent?: (string | null)[]; + version: 3; + ignoreList?: number[]; +} +export interface EncodedSourceMap extends SourceMapV3 { + mappings: string; +} +export interface DecodedSourceMap extends SourceMapV3 { + mappings: SourceMapSegment[][]; +} +export interface Section { + offset: { + line: number; + column: number; + }; + map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap; +} +export interface SectionedSourceMap { + file?: string | null; + sections: Section[]; + version: 3; +} +export type OriginalMapping = { + source: string | null; + line: number; + column: number; + name: string | null; +}; +export type InvalidOriginalMapping = { + source: null; + line: null; + column: null; + name: null; +}; +export type GeneratedMapping = { + line: number; + column: number; +}; +export type InvalidGeneratedMapping = { + line: null; + column: null; +}; +export type Bias = typeof GREATEST_LOWER_BOUND | typeof LEAST_UPPER_BOUND; +export type XInput = { + x_google_ignoreList?: SourceMapV3['ignoreList']; +}; +export type EncodedSourceMapXInput = EncodedSourceMap & XInput; +export type DecodedSourceMapXInput = DecodedSourceMap & XInput; +export type SectionedSourceMapXInput = Omit & { + sections: SectionXInput[]; +}; +export type SectionXInput = Omit & { + map: SectionedSourceMapInput; +}; +export type SourceMapInput = string | EncodedSourceMapXInput | DecodedSourceMapXInput | TraceMap; +export type SectionedSourceMapInput = SourceMapInput | SectionedSourceMapXInput; +export type Needle = { + line: number; + column: number; + bias?: Bias; +}; +export type SourceNeedle = { + source: string; + line: number; + column: number; + bias?: Bias; +}; +export type EachMapping = { + generatedLine: number; + generatedColumn: number; + source: null; + originalLine: null; + originalColumn: null; + name: null; +} | { + generatedLine: number; + generatedColumn: number; + source: string | null; + originalLine: number; + originalColumn: number; + name: string | null; +}; +export declare abstract class SourceMap { + version: SourceMapV3['version']; + file: SourceMapV3['file']; + names: SourceMapV3['names']; + sourceRoot: SourceMapV3['sourceRoot']; + sources: SourceMapV3['sources']; + sourcesContent: SourceMapV3['sourcesContent']; + resolvedSources: SourceMapV3['sources']; + ignoreList: SourceMapV3['ignoreList']; +} diff --git a/node_modules/@jridgewell/trace-mapping/package.json b/node_modules/@jridgewell/trace-mapping/package.json new file mode 100644 index 0000000..454a1bd --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/package.json @@ -0,0 +1,77 @@ +{ + "name": "@jridgewell/trace-mapping", + "version": "0.3.25", + "description": "Trace the original position through a source map", + "keywords": [ + "source", + "map" + ], + "main": "dist/trace-mapping.umd.js", + "module": "dist/trace-mapping.mjs", + "types": "dist/types/trace-mapping.d.ts", + "files": [ + "dist" + ], + "exports": { + ".": [ + { + "types": "./dist/types/trace-mapping.d.ts", + "browser": "./dist/trace-mapping.umd.js", + "require": "./dist/trace-mapping.umd.js", + "import": "./dist/trace-mapping.mjs" + }, + "./dist/trace-mapping.umd.js" + ], + "./package.json": "./package.json" + }, + "author": "Justin Ridgewell ", + "repository": { + "type": "git", + "url": "git+https://github.com/jridgewell/trace-mapping.git" + }, + "license": "MIT", + "scripts": { + "benchmark": "run-s build:rollup benchmark:*", + "benchmark:install": "cd benchmark && npm install", + "benchmark:only": "node --expose-gc benchmark/index.mjs", + "build": "run-s -n build:*", + "build:rollup": "rollup -c rollup.config.mjs", + "build:ts": "tsc --project tsconfig.build.json", + "lint": "run-s -n lint:*", + "lint:prettier": "npm run test:lint:prettier -- --write", + "lint:ts": "npm run test:lint:ts -- --fix", + "prebuild": "rm -rf dist", + "prepublishOnly": "npm run preversion", + "preversion": "run-s test build", + "test": "run-s -n test:lint test:only", + "test:debug": "mocha --inspect-brk", + "test:lint": "run-s -n test:lint:*", + "test:lint:prettier": "prettier --check '{src,test}/**/*.ts' '**/*.md'", + "test:lint:ts": "eslint '{src,test}/**/*.ts'", + "test:only": "c8 mocha", + "test:watch": "mocha --watch" + }, + "devDependencies": { + "@rollup/plugin-typescript": "11.1.6", + "@types/mocha": "10.0.6", + "@types/node": "20.11.20", + "@typescript-eslint/eslint-plugin": "6.18.1", + "@typescript-eslint/parser": "6.18.1", + "benchmark": "2.1.4", + "c8": "9.0.0", + "esbuild": "0.19.11", + "eslint": "8.56.0", + "eslint-config-prettier": "9.1.0", + "eslint-plugin-no-only-tests": "3.1.0", + "mocha": "10.3.0", + "npm-run-all": "4.1.5", + "prettier": "3.1.1", + "rollup": "4.9.4", + "tsx": "4.7.0", + "typescript": "5.3.3" + }, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } +} diff --git a/node_modules/@mapbox/node-pre-gyp/.github/dependabot.yml b/node_modules/@mapbox/node-pre-gyp/.github/dependabot.yml new file mode 100644 index 0000000..4aa56b5 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/.github/dependabot.yml @@ -0,0 +1,20 @@ +# For all possible configuration options see: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +# Note that limitations on version updates applied in this file don't apply to security updates, +# which are separately managed by dependabot + +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "daily" + open-pull-requests-limit: 20 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-minor", "version-update:semver-patch"] + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/node_modules/@mapbox/node-pre-gyp/.github/workflows/ci.yml b/node_modules/@mapbox/node-pre-gyp/.github/workflows/ci.yml new file mode 100644 index 0000000..7f11af1 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: ci +on: + pull_request: + push: + branches: + - master + workflow_dispatch: +jobs: + ci: + strategy: + fail-fast: false + max-parallel: 9 + matrix: + node-version: ['18.x', '20.x', '22.x'] + os: [macos-latest, ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm audit + - run: npm run lint + # - run: npm run update-crosswalk # To support newer versions of Node.js + - run: npm run build --if-present + - run: npm test diff --git a/node_modules/@mapbox/node-pre-gyp/.github/workflows/codeql.yml b/node_modules/@mapbox/node-pre-gyp/.github/workflows/codeql.yml new file mode 100644 index 0000000..28c7422 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/.github/workflows/codeql.yml @@ -0,0 +1,74 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ "master" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "master" ] + schedule: + - cron: '24 5 * * 4' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'javascript' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v3 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" diff --git a/node_modules/@mapbox/node-pre-gyp/.github/workflows/release.yml b/node_modules/@mapbox/node-pre-gyp/.github/workflows/release.yml new file mode 100644 index 0000000..4e4d773 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/.github/workflows/release.yml @@ -0,0 +1,105 @@ +name: release + +on: + push: + branches: [master] + workflow_dispatch: + +jobs: + release-check: + name: Check if version is published + runs-on: ubuntu-latest + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: Check if version is published + id: check + run: | + currentVersion="$( node -e "console.log(require('./package.json').version)" )" + isPublished="$( npm view @mapbox/node-pre-gyp versions --json | jq -c --arg cv "$currentVersion" 'any(. == $cv)' )" + echo "version=$currentVersion" >> "$GITHUB_OUTPUT" + echo "published=$isPublished" >> "$GITHUB_OUTPUT" + echo "currentVersion: $currentVersion" + echo "isPublished: $isPublished" + outputs: + published: ${{ steps.check.outputs.published }} + version: ${{ steps.check.outputs.version }} + + publish: + needs: release-check + if: ${{ needs.release-check.outputs.published == 'false' }} + runs-on: ubuntu-latest + permissions: + contents: write + defaults: + run: + shell: bash + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 22 + + - run: npm ci + + - run: npm audit + + - run: npm run lint + + - run: npm run update-crosswalk # To support newer versions of Node.js + + - run: npm run build --if-present + + - run: npm test + + - name: Prepare release changelog + id: prepare_release + run: | + RELEASE_TYPE="$(node -e "console.log(require('semver').prerelease('${{ needs.release-check.outputs.version }}') ? 'prerelease' : 'regular')")" + if [[ $RELEASE_TYPE == 'regular' ]]; then + echo "prerelease=false" >> "$GITHUB_OUTPUT" + else + echo "prerelease=true" >> "$GITHUB_OUTPUT" + fi + + - name: Extract changelog for version + run: | + awk '/^##/ { p = 0 }; p == 1 { print }; $0 == "## ${{ needs.release-check.outputs.version }}" { p = 1 };' CHANGELOG.md > changelog_for_version.md + cat changelog_for_version.md + + - name: Publish to Github + uses: ncipollo/release-action@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag: v${{ needs.release-check.outputs.version }} + name: v${{ needs.release-check.outputs.version }} + bodyFile: changelog_for_version.md + allowUpdates: true + draft: false + prerelease: ${{ steps.prepare_release.outputs.prerelease }} + + - name: Publish to NPM (release) + if: ${{ steps.prepare_release.outputs.prerelease == 'false' }} + run: | + npm config set //registry.npmjs.org/:_authToken "${NPM_TOKEN}" + npm publish --access public + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish to NPM (prerelease) + if: ${{ steps.prepare_release.outputs.prerelease == 'true' }} + run: | + npm config set //registry.npmjs.org/:_authToken "${NPM_TOKEN}" + npm publish --tag next --access public + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/node_modules/@mapbox/node-pre-gyp/CHANGELOG.md b/node_modules/@mapbox/node-pre-gyp/CHANGELOG.md new file mode 100644 index 0000000..aab5e4c --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/CHANGELOG.md @@ -0,0 +1,517 @@ +# node-pre-gyp changelog + +## 2.0.0 +- Supported Node versions are now stable versions of Node 18+. We will attempt to track the [Node.js release schedule](https://github.com/nodejs/release#release-schedule) and will regularly retire support for versions that have reached EOL. +- Fixed use of `s3ForcePathStyle` for installation [#650](https://github.com/mapbox/node-pre-gyp/pull/650) +- Upgraded to https-proxy-agent 7.0.5, nopt 8.0.0, semver 7.5.3, and tar 7.4.0 +- Replaced npmlog with consola +- Removed rimraf and make-dir as dependencies + +## 1.0.11 +- Fixes dependabot alert [CVE-2021-44906](https://nvd.nist.gov/vuln/detail/CVE-2021-44906) + +## 1.0.10 +- Upgraded minimist to 1.2.6 to address dependabot alert [CVE-2021-44906](https://nvd.nist.gov/vuln/detail/CVE-2021-44906) + +## 1.0.9 +- Upgraded node-fetch to 2.6.7 to address [CVE-2022-0235](https://www.cve.org/CVERecord?id=CVE-2022-0235) +- Upgraded detect-libc to 2.0.0 to use non-blocking NodeJS(>=12) Report API + +## 1.0.8 +- Downgraded npmlog to maintain node v10 and v8 support (https://github.com/mapbox/node-pre-gyp/pull/624) + +## 1.0.7 +- Upgraded nyc and npmlog to address https://github.com/advisories/GHSA-93q8-gq69-wqmw + +## 1.0.6 +- Added node v17 to the internal node releases listing +- Upgraded various dependencies declared in package.json to latest major versions (node-fetch from 2.6.1 to 2.6.5, npmlog from 4.1.2 to 5.01, semver from 7.3.4 to 7.3.5, and tar from 6.1.0 to 6.1.11) +- Fixed bug in `staging_host` parameter (https://github.com/mapbox/node-pre-gyp/pull/590) + + +## 1.0.5 +- Fix circular reference warning with node >= v14 + +## 1.0.4 +- Added node v16 to the internal node releases listing + +## 1.0.3 +- Improved support configuring s3 uploads (solves https://github.com/mapbox/node-pre-gyp/issues/571) + - New options added in https://github.com/mapbox/node-pre-gyp/pull/576: 'bucket', 'region', and `s3ForcePathStyle` + +## 1.0.2 +- Fixed regression in proxy support (https://github.com/mapbox/node-pre-gyp/issues/572) + +## 1.0.1 +- Switched from mkdirp@1.0.4 to make-dir@3.1.0 to avoid this bug: https://github.com/isaacs/node-mkdirp/issues/31 + +## 1.0.0 +- Module is now name-spaced at `@mapbox/node-pre-gyp` and the original `node-pre-gyp` is deprecated. +- New: support for staging and production s3 targets (see README.md) +- BREAKING: no longer supporting `node_pre_gyp_accessKeyId` & `node_pre_gyp_secretAccessKey`, use `AWS_ACCESS_KEY_ID` & `AWS_SECRET_ACCESS_KEY` instead to authenticate against s3 for `info`, `publish`, and `unpublish` commands. +- Dropped node v6 support, added node v14 support +- Switched tests to use mapbox-owned bucket for testing +- Added coverage tracking and linting with eslint +- Added back support for symlinks inside the tarball +- Upgraded all test apps to N-API/node-addon-api +- New: support for staging and production s3 targets (see README.md) +- Added `node_pre_gyp_s3_host` env var which has priority over the `--s3_host` option or default. +- Replaced needle with node-fetch +- Added proxy support for node-fetch +- Upgraded to mkdirp@1.x + +## 0.17.0 +- Got travis + appveyor green again +- Added support for more node versions + +## 0.16.0 + +- Added Node 15 support in the local database (https://github.com/mapbox/node-pre-gyp/pull/520) + +## 0.15.0 + +- Bump dependency on `mkdirp` from `^0.5.1` to `^0.5.3` (https://github.com/mapbox/node-pre-gyp/pull/492) +- Bump dependency on `needle` from `^2.2.1` to `^2.5.0` (https://github.com/mapbox/node-pre-gyp/pull/502) +- Added Node 14 support in the local database (https://github.com/mapbox/node-pre-gyp/pull/501) + +## 0.14.0 + +- Defer modules requires in napi.js (https://github.com/mapbox/node-pre-gyp/pull/434) +- Bump dependency on `tar` from `^4` to `^4.4.2` (https://github.com/mapbox/node-pre-gyp/pull/454) +- Support extracting compiled binary from local offline mirror (https://github.com/mapbox/node-pre-gyp/pull/459) +- Added Node 13 support in the local database (https://github.com/mapbox/node-pre-gyp/pull/483) + +## 0.13.0 + +- Added Node 12 support in the local database (https://github.com/mapbox/node-pre-gyp/pull/449) + +## 0.12.0 + +- Fixed double-build problem with node v10 (https://github.com/mapbox/node-pre-gyp/pull/428) +- Added node 11 support in the local database (https://github.com/mapbox/node-pre-gyp/pull/422) + +## 0.11.0 + +- Fixed double-install problem with node v10 +- Significant N-API improvements (https://github.com/mapbox/node-pre-gyp/pull/405) + +## 0.10.3 + +- Now will use `request` over `needle` if request is installed. By default `needle` is used for `https`. This should unbreak proxy support that regressed in v0.9.0 + +## 0.10.2 + +- Fixed rc/deep-extent security vulnerability +- Fixed broken reinstall script do to incorrectly named get_best_napi_version + +## 0.10.1 + +- Fix needle error event (@medns) + +## 0.10.0 + +- Allow for a single-level module path when packing @allenluce (https://github.com/mapbox/node-pre-gyp/pull/371) +- Log warnings instead of errors when falling back @xzyfer (https://github.com/mapbox/node-pre-gyp/pull/366) +- Add Node.js v10 support to tests (https://github.com/mapbox/node-pre-gyp/pull/372) +- Remove retire.js from CI (https://github.com/mapbox/node-pre-gyp/pull/372) +- Remove support for Node.js v4 due to [EOL on April 30th, 2018](https://github.com/nodejs/Release/blob/7dd52354049cae99eed0e9fe01345b0722a86fde/schedule.json#L14) +- Update appveyor tests to install default NPM version instead of NPM v2.x for all Windows builds (https://github.com/mapbox/node-pre-gyp/pull/375) + +## 0.9.1 + +- Fixed regression (in v0.9.0) with support for http redirects @allenluce (https://github.com/mapbox/node-pre-gyp/pull/361) + +## 0.9.0 + +- Switched from using `request` to `needle` to reduce size of module deps (https://github.com/mapbox/node-pre-gyp/pull/350) + +## 0.8.0 + +- N-API support (@inspiredware) + +## 0.7.1 + +- Upgraded to tar v4.x + +## 0.7.0 + + - Updated request and hawk (#347) + - Dropped node v0.10.x support + +## 0.6.40 + + - Improved error reporting if an install fails + +## 0.6.39 + + - Support for node v9 + - Support for versioning on `{libc}` to allow binaries to work on non-glic linux systems like alpine linux + + +## 0.6.38 + + - Maintaining compatibility (for v0.6.x series) with node v0.10.x + +## 0.6.37 + + - Solved one part of #276: now now deduce the node ABI from the major version for node >= 2 even when not stored in the abi_crosswalk.json + - Fixed docs to avoid mentioning the deprecated and dangerous `prepublish` in package.json (#291) + - Add new node versions to crosswalk + - Ported tests to use tape instead of mocha + - Got appveyor tests passing by downgrading npm and node-gyp + +## 0.6.36 + + - Removed the running of `testbinary` during install. Because this was regressed for so long, it is too dangerous to re-enable by default. Developers needing validation can call `node-pre-gyp testbinary` directory. + - Fixed regression in v0.6.35 for electron installs (now skipping binary validation which is not yet supported for electron) + +## 0.6.35 + + - No longer recommending `npm ls` in `prepublish` (#291) + - Fixed testbinary command (#283) @szdavid92 + +## 0.6.34 + + - Added new node versions to crosswalk, including v8 + - Upgraded deps to latest versions, started using `^` instead of `~` for all deps. + +## 0.6.33 + + - Improved support for yarn + +## 0.6.32 + + - Honor npm configuration for CA bundles (@heikkipora) + - Add node-pre-gyp and npm versions to user agent (@addaleax) + - Updated various deps + - Add known node version for v7.x + +## 0.6.31 + + - Updated various deps + +## 0.6.30 + + - Update to npmlog@4.x and semver@5.3.x + - Add known node version for v6.5.0 + +## 0.6.29 + + - Add known node versions for v0.10.45, v0.12.14, v4.4.4, v5.11.1, and v6.1.0 + +## 0.6.28 + + - Now more verbose when remote binaries are not available. This is needed since npm is increasingly more quiet by default + and users need to know why builds are falling back to source compiles that might then error out. + +## 0.6.27 + + - Add known node version for node v6 + - Stopped bundling dependencies + - Documented method for module authors to avoid bundling node-pre-gyp + - See https://github.com/mapbox/node-pre-gyp/tree/master#configuring for details + +## 0.6.26 + + - Skip validation for nw runtime (https://github.com/mapbox/node-pre-gyp/pull/181) via @fleg + +## 0.6.25 + + - Improved support for auto-detection of electron runtime in `node-pre-gyp.find()` + - Pull request from @enlight - https://github.com/mapbox/node-pre-gyp/pull/187 + - Add known node version for 4.4.1 and 5.9.1 + +## 0.6.24 + + - Add known node version for 5.8.0, 5.9.0, and 4.4.0. + +## 0.6.23 + + - Add known node version for 0.10.43, 0.12.11, 4.3.2, and 5.7.1. + +## 0.6.22 + + - Add known node version for 4.3.1, and 5.7.0. + +## 0.6.21 + + - Add known node version for 0.10.42, 0.12.10, 4.3.0, and 5.6.0. + +## 0.6.20 + + - Add known node version for 4.2.5, 4.2.6, 5.4.0, 5.4.1,and 5.5.0. + +## 0.6.19 + + - Add known node version for 4.2.4 + +## 0.6.18 + + - Add new known node versions for 0.10.x, 0.12.x, 4.x, and 5.x + +## 0.6.17 + + - Re-tagged to fix packaging problem of `Error: Cannot find module 'isarray'` + +## 0.6.16 + + - Added known version in crosswalk for 5.1.0. + +## 0.6.15 + + - Upgraded tar-pack (https://github.com/mapbox/node-pre-gyp/issues/182) + - Support custom binary hosting mirror (https://github.com/mapbox/node-pre-gyp/pull/170) + - Added known version in crosswalk for 4.2.2. + +## 0.6.14 + + - Added node 5.x version + +## 0.6.13 + + - Added more known node 4.x versions + +## 0.6.12 + + - Added support for [Electron](http://electron.atom.io/). Just pass the `--runtime=electron` flag when building/installing. Thanks @zcbenz + +## 0.6.11 + + - Added known node and io.js versions including more 3.x and 4.x versions + +## 0.6.10 + + - Added known node and io.js versions including 3.x and 4.x versions + - Upgraded `tar` dep + +## 0.6.9 + + - Upgraded `rc` dep + - Updated known io.js version: v2.4.0 + +## 0.6.8 + + - Upgraded `semver` and `rimraf` deps + - Updated known node and io.js versions + +## 0.6.7 + + - Fixed `node_abi` versions for io.js 1.1.x -> 1.8.x (should be 43, but was stored as 42) (refs https://github.com/iojs/build/issues/94) + +## 0.6.6 + + - Updated with known io.js 2.0.0 version + +## 0.6.5 + + - Now respecting `npm_config_node_gyp` (https://github.com/npm/npm/pull/4887) + - Updated to semver@4.3.2 + - Updated known node v0.12.x versions and io.js 1.x versions. + +## 0.6.4 + + - Improved support for `io.js` (@fengmk2) + - Test coverage improvements (@mikemorris) + - Fixed support for `--dist-url` that regressed in 0.6.3 + +## 0.6.3 + + - Added support for passing raw options to node-gyp using `--` separator. Flags passed after + the `--` to `node-pre-gyp configure` will be passed directly to gyp while flags passed + after the `--` will be passed directly to make/visual studio. + - Added `node-pre-gyp configure` command to be able to call `node-gyp configure` directly + - Fix issue with require validation not working on windows 7 (@edgarsilva) + +## 0.6.2 + + - Support for io.js >= v1.0.2 + - Deferred require of `request` and `tar` to help speed up command line usage of `node-pre-gyp`. + +## 0.6.1 + + - Fixed bundled `tar` version + +## 0.6.0 + + - BREAKING: node odd releases like v0.11.x now use `major.minor.patch` for `{node_abi}` instead of `NODE_MODULE_VERSION` (#124) + - Added support for `toolset` option in versioning. By default is an empty string but `--toolset` can be passed to publish or install to select alternative binaries that target a custom toolset like C++11. For example to target Visual Studio 2014 modules like node-sqlite3 use `--toolset=v140`. + - Added support for `--no-rollback` option to request that a failed binary test does not remove the binary module leaves it in place. + - Added support for `--update-binary` option to request an existing binary be re-installed and the check for a valid local module be skipped. + - Added support for passing build options from `npm` through `node-pre-gyp` to `node-gyp`: `--nodedir`, `--disturl`, `--python`, and `--msvs_version` + +## 0.5.31 + + - Added support for deducing node_abi for node.js runtime from previous release if the series is even + - Added support for --target=0.10.33 + +## 0.5.30 + + - Repackaged with latest bundled deps + +## 0.5.29 + + - Added support for semver `build`. + - Fixed support for downloading from urls that include `+`. + +## 0.5.28 + + - Now reporting unix style paths only in reveal command + +## 0.5.27 + + - Fixed support for auto-detecting s3 bucket name when it contains `.` - @taavo + - Fixed support for installing when path contains a `'` - @halfdan + - Ported tests to mocha + +## 0.5.26 + + - Fix node-webkit support when `--target` option is not provided + +## 0.5.25 + + - Fix bundling of deps + +## 0.5.24 + + - Updated ABI crosswalk to include node v0.10.30 and v0.10.31 + +## 0.5.23 + + - Added `reveal` command. Pass no options to get all versioning data as json. Pass a second arg to grab a single versioned property value + - Added support for `--silent` (shortcut for `--loglevel=silent`) + +## 0.5.22 + + - Fixed node-webkit versioning name (NOTE: node-webkit support still experimental) + +## 0.5.21 + + - New package to fix `shasum check failed` error with v0.5.20 + +## 0.5.20 + + - Now versioning node-webkit binaries based on major.minor.patch - assuming no compatible ABI across versions (#90) + +## 0.5.19 + + - Updated to know about more node-webkit releases + +## 0.5.18 + + - Updated to know about more node-webkit releases + +## 0.5.17 + + - Updated to know about node v0.10.29 release + +## 0.5.16 + + - Now supporting all aws-sdk configuration parameters (http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html) (#86) + +## 0.5.15 + + - Fixed installation of windows packages sub directories on unix systems (#84) + +## 0.5.14 + + - Finished support for cross building using `--target_platform` option (#82) + - Now skipping binary validation on install if target arch/platform do not match the host. + - Removed multi-arch validating for macOS since it required a FAT node.js binary + +## 0.5.13 + + - Fix problem in 0.5.12 whereby the wrong versions of mkdirp and semver where bundled. + +## 0.5.12 + + - Improved support for node-webkit (@Mithgol) + +## 0.5.11 + + - Updated target versions listing + +## 0.5.10 + + - Fixed handling of `-debug` flag passed directory to node-pre-gyp (#72) + - Added optional second arg to `node_pre_gyp.find` to customize the default versioning options used to locate the runtime binary + - Failed install due to `testbinary` check failure no longer leaves behind binary (#70) + +## 0.5.9 + + - Fixed regression in `testbinary` command causing installs to fail on windows with 0.5.7 (#60) + +## 0.5.8 + + - Started bundling deps + +## 0.5.7 + + - Fixed the `testbinary` check, which is used to determine whether to re-download or source compile, to work even in complex dependency situations (#63) + - Exposed the internal `testbinary` command in node-pre-gyp command line tool + - Fixed minor bug so that `fallback_to_build` option is always respected + +## 0.5.6 + + - Added support for versioning on the `name` value in `package.json` (#57). + - Moved to using streams for reading tarball when publishing (#52) + +## 0.5.5 + + - Improved binary validation that also now works with node-webkit (@Mithgol) + - Upgraded test apps to work with node v0.11.x + - Improved test coverage + +## 0.5.4 + + - No longer depends on external install of node-gyp for compiling builds. + +## 0.5.3 + + - Reverted fix for debian/nodejs since it broke windows (#45) + +## 0.5.2 + + - Support for debian systems where the node binary is named `nodejs` (#45) + - Added `bin/node-pre-gyp.cmd` to be able to run command on windows locally (npm creates an .npm automatically when globally installed) + - Updated abi-crosswalk with node v0.10.26 entry. + +## 0.5.1 + + - Various minor bug fixes, several improving windows support for publishing. + +## 0.5.0 + + - Changed property names in `binary` object: now required are `module_name`, `module_path`, and `host`. + - Now `module_path` supports versioning, which allows developers to opt-in to using a versioned install path (#18). + - Added `remote_path` which also supports versioning. + - Changed `remote_uri` to `host`. + +## 0.4.2 + + - Added support for `--target` flag to request cross-compile against a specific node/node-webkit version. + - Added preliminary support for node-webkit + - Fixed support for `--target_arch` option being respected in all cases. + +## 0.4.1 + + - Fixed exception when only stderr is available in binary test (@bendi / #31) + +## 0.4.0 + + - Enforce only `https:` based remote publishing access. + - Added `node-pre-gyp info` command to display listing of published binaries + - Added support for changing the directory node-pre-gyp should build in with the `-C/--directory` option. + - Added support for S3 prefixes. + +## 0.3.1 + + - Added `unpublish` command. + - Fixed module path construction in tests. + - Added ability to disable falling back to build behavior via `npm install --fallback-to-build=false` which overrides setting in a dependencies package.json `install` target. + +## 0.3.0 + + - Support for packaging all files in `module_path` directory - see `app4` for example + - Added `testpackage` command. + - Changed `clean` command to only delete `.node` not entire `build` directory since node-gyp will handle that. + - `.node` modules must be in a folder of there own since tar-pack will remove everything when it unpacks. diff --git a/node_modules/@mapbox/node-pre-gyp/CODEOWNERS b/node_modules/@mapbox/node-pre-gyp/CODEOWNERS new file mode 100644 index 0000000..1c3c506 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/CODEOWNERS @@ -0,0 +1 @@ +* @mapbox/maps-api diff --git a/node_modules/@mapbox/node-pre-gyp/LICENSE b/node_modules/@mapbox/node-pre-gyp/LICENSE new file mode 100644 index 0000000..8f5fce9 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/LICENSE @@ -0,0 +1,27 @@ +Copyright (c), Mapbox + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of node-pre-gyp nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@mapbox/node-pre-gyp/README.md b/node_modules/@mapbox/node-pre-gyp/README.md new file mode 100644 index 0000000..175d922 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/README.md @@ -0,0 +1,744 @@ +# @mapbox/node-pre-gyp + +#### @mapbox/node-pre-gyp makes it easy to publish and install Node.js C++ addons from binaries + +[![Build status](https://ci.appveyor.com/api/projects/status/3nxewb425y83c0gv)](https://ci.appveyor.com/project/Mapbox/node-pre-gyp) + +`@mapbox/node-pre-gyp` stands between [npm](https://github.com/npm/npm) and [node-gyp](https://github.com/Tootallnate/node-gyp) and offers a cross-platform method of binary deployment. + +### Special note on previous package + +On Feb 9th, 2021 `@mapbox/node-pre-gyp@1.0.0` was [released](./CHANGELOG.md). Older, unscoped versions that are not part of the `@mapbox` org are deprecated and only `@mapbox/node-pre-gyp` will see updates going forward. To upgrade to the new package do: + +``` +npm uninstall node-pre-gyp --save +npm install @mapbox/node-pre-gyp --save +``` + +### Features + + - A command line tool called `node-pre-gyp` that can install your package's C++ module from a binary. + - A variety of developer targeted commands for packaging, testing, and publishing binaries. + - A JavaScript module that can dynamically require your installed binary: `require('@mapbox/node-pre-gyp').find` + +For a hello world example of a module packaged with `node-pre-gyp` see and [the wiki ](https://github.com/mapbox/node-pre-gyp/wiki/Modules-using-node-pre-gyp) for real world examples. + +## Credits + + - The module is modeled after [node-gyp](https://github.com/Tootallnate/node-gyp) by [@Tootallnate](https://github.com/Tootallnate) + - Motivation for initial development came from [@ErisDS](https://github.com/ErisDS) and the [Ghost Project](https://github.com/TryGhost/Ghost). + - Development is sponsored by [Mapbox](https://www.mapbox.com/) + +## FAQ + +See the [Frequently Ask Questions](https://github.com/mapbox/node-pre-gyp/wiki/FAQ). + +## Depends + +We will attempt to track the [Node.js release schedule](https://github.com/nodejs/release#release-schedule) and will regularly retire support for versions that have reached EOL. + + - v2: Node.js >= 18.x (unreleased) + - v1: Node.js >= 8.x + +## Install + +`node-pre-gyp` is designed to be installed as a local dependency of your Node.js C++ addon and accessed like: + + ./node_modules/.bin/node-pre-gyp --help + +But you can also install it globally: + + npm install @mapbox/node-pre-gyp -g + +## Usage + +### Commands + +View all possible commands: + + node-pre-gyp --help + +- clean - Remove the entire folder containing the compiled .node module +- install - Install pre-built binary for module +- reinstall - Run "clean" and "install" at once +- build - Compile the module by dispatching to node-gyp or nw-gyp +- rebuild - Run "clean" and "build" at once +- package - Pack binary into tarball +- testpackage - Test that the staged package is valid +- publish - Publish pre-built binary +- unpublish - Unpublish pre-built binary +- info - Fetch info on published binaries + +You can also chain commands: + + node-pre-gyp clean build unpublish publish info + +### Options + +Options include: + + - `-C/--directory`: run the command in this directory + - `--build-from-source`: build from source instead of using pre-built binary + - `--update-binary`: reinstall by replacing previously installed local binary with remote binary + - `--runtime=node-webkit`: customize the runtime: `node`, `electron` and `node-webkit` are the valid options + - `--fallback-to-build`: fallback to building from source if pre-built binary is not available + - `--target=0.4.0`: Pass the target node or node-webkit version to compile against + - `--target_arch=ia32`: Pass the target arch and override the host `arch`. Any value that is [supported by Node.js](https://nodejs.org/api/os.html#osarch) is valid. + - `--target_platform=win32`: Pass the target platform and override the host `platform`. Valid values are `linux`, `darwin`, `win32`, `sunos`, `freebsd`, `openbsd`, and `aix`. + +Both `--build-from-source` and `--fallback-to-build` can be passed alone or they can provide values. You can pass `--fallback-to-build=false` to override the option as declared in package.json. In addition to being able to pass `--build-from-source` you can also pass `--build-from-source=myapp` where `myapp` is the name of your module. + +For example: `npm install --build-from-source=myapp`. This is useful if: + + - `myapp` is referenced in the package.json of a larger app and therefore `myapp` is being installed as a dependency with `npm install`. + - The larger app also depends on other modules installed with `node-pre-gyp` + - You only want to trigger a source compile for `myapp` and the other modules. + +### Configuring + +This is a guide to configuring your module to use node-pre-gyp. + +#### 1) Add new entries to your `package.json` + + - Add `@mapbox/node-pre-gyp` to `dependencies` + - Add `aws-sdk` as a `devDependency` + - Add a custom `install` script + - Declare a `binary` object + +This looks like: + +```js + "dependencies" : { + "@mapbox/node-pre-gyp": "1.x" + }, + "devDependencies": { + "aws-sdk": "2.x" + } + "scripts": { + "install": "node-pre-gyp install --fallback-to-build" + }, + "binary": { + "module_name": "your_module", + "module_path": "./lib/binding/", + "host": "https://your_module.s3-us-west-1.amazonaws.com" + } +``` + +For a full example see [node-addon-examples's package.json](https://github.com/springmeyer/node-addon-example/blob/master/package.json). + +Let's break this down: + + - Dependencies need to list `node-pre-gyp` + - Your devDependencies should list `aws-sdk` so that you can run `node-pre-gyp publish` locally or a CI system. We recommend using `devDependencies` only since `aws-sdk` is large and not needed for `node-pre-gyp install` since it only uses http to fetch binaries + - Your `scripts` section should override the `install` target with `"install": "node-pre-gyp install --fallback-to-build"`. This allows node-pre-gyp to be used instead of the default npm behavior of always source compiling with `node-gyp` directly. + - Your package.json should contain a `binary` section describing key properties you provide to allow node-pre-gyp to package optimally. They are detailed below. + +Note: in the past we recommended putting `@mapbox/node-pre-gyp` in the `bundledDependencies`, but we no longer recommend this. In the past there were npm bugs (with node versions 0.10.x) that could lead to node-pre-gyp not being available at the right time during install (unless we bundled). This should no longer be the case. Also, for a time we recommended using `"preinstall": "npm install @mapbox/node-pre-gyp"` as an alternative method to avoid needing to bundle. But this did not behave predictably across all npm versions - see https://github.com/mapbox/node-pre-gyp/issues/260 for the details. So we do not recommend using `preinstall` to install `@mapbox/node-pre-gyp`. More history on this at https://github.com/strongloop/fsevents/issues/157#issuecomment-265545908. + +##### The `binary` object has three required properties + +###### module_name + +The name of your native node module. This value must: + + - Match the name passed to [the NODE_MODULE macro](http://nodejs.org/api/addons.html#addons_hello_world) + - Must be a valid C variable name (e.g. it cannot contain `-`) + - Should not include the `.node` extension. + +###### module_path + +The location your native module is placed after a build. This should be an empty directory without other Javascript files. This entire directory will be packaged in the binary tarball. When installing from a remote package this directory will be overwritten with the contents of the tarball. + +Note: This property supports variables based on [Versioning](#versioning). + +###### host + +A url to the remote location where you've published tarball binaries (must be `https` not `http`). + +It is highly recommended that you use Amazon S3. The reasons are: + + - Various node-pre-gyp commands like `publish` and `info` only work with an S3 host. + - S3 is a very solid hosting platform for distributing large files. + - We provide detail documentation for using [S3 hosting](#s3-hosting) with node-pre-gyp. + +Why then not require S3? Because while some applications using node-pre-gyp need to distribute binaries as large as 20-30 MB, others might have very small binaries and might wish to store them in a GitHub repo. This is not recommended, but if an author really wants to host in a non-S3 location then it should be possible. + +It should also be mentioned that there is an optional and entirely separate npm module called [node-pre-gyp-github](https://github.com/bchr02/node-pre-gyp-github) which is intended to complement node-pre-gyp and be installed along with it. It provides the ability to store and publish your binaries within your repositories GitHub Releases if you would rather not use S3 directly. Installation and usage instructions can be found [here](https://github.com/bchr02/node-pre-gyp-github), but the basic premise is that instead of using the ```node-pre-gyp publish``` command you would use ```node-pre-gyp-github publish```. + +##### The `binary` object other optional S3 properties + +If you are not using a standard s3 path like `bucket_name.s3(.-)region.amazonaws.com`, you might get an error on `publish` because node-pre-gyp extracts the region and bucket from the `host` url. For example, you may have an on-premises s3-compatible storage server, or may have configured a specific dns redirecting to an s3 endpoint. In these cases, you can explicitly set the `region` and `bucket` properties to tell node-pre-gyp to use these values instead of guessing from the `host` property. The following values can be used in the `binary` section: + +###### host + +The url to the remote server root location (must be `https` not `http`). + +###### bucket + +The bucket name where your tarball binaries should be located. + +###### region + +Your S3 server region. + +###### s3ForcePathStyle + +Set `s3ForcePathStyle` to true if the endpoint url should not be prefixed with the bucket name. If false (default), the server endpoint would be constructed as `bucket_name.your_server.com`. + +##### The `binary` object has optional properties + +###### remote_path + +It **is recommended** that you customize this property. This is an extra path to use for publishing and finding remote tarballs. The default value for `remote_path` is `""` meaning that if you do not provide it then all packages will be published at the base of the `host`. It is recommended to provide a value like `./{name}/v{version}` to help organize remote packages in the case that you choose to publish multiple node addons to the same `host`. + +Note: This property supports variables based on [Versioning](#versioning). + +###### package_name + +It is **not recommended** to override this property unless you are also overriding the `remote_path`. This is the versioned name of the remote tarball containing the binary `.node` module and any supporting files you've placed inside the `module_path` directory. Unless you specify `package_name` in your `package.json` then it defaults to `{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz` which allows your binary to work across node versions, platforms, and architectures. If you are using `remote_path` that is also versioned by `./{module_name}/v{version}` then you could remove these variables from the `package_name` and just use: `{node_abi}-{platform}-{arch}.tar.gz`. Then your remote tarball will be looked up at, for example, `https://example.com/your-module/v0.1.0/node-v11-linux-x64.tar.gz`. + +Avoiding the version of your module in the `package_name` and instead only embedding in a directory name can be useful when you want to make a quick tag of your module that does not change any C++ code. In this case you can just copy binaries to the new version behind the scenes like: + +```sh +aws s3 sync --acl public-read s3://mapbox-node-binary/sqlite3/v3.0.3/ s3://mapbox-node-binary/sqlite3/v3.0.4/ +``` + +Note: This property supports variables based on [Versioning](#versioning). + +#### 2) Add a new target to binding.gyp + +`node-pre-gyp` calls out to `node-gyp` to compile the module and passes variables along like [module_name](#module_name) and [module_path](#module_path). + +A new target must be added to `binding.gyp` that moves the compiled `.node` module from `./build/Release/module_name.node` into the directory specified by `module_path`. + +Add a target like this at the end of your `targets` list: + +```js + { + "target_name": "action_after_build", + "type": "none", + "dependencies": [ "<(module_name)" ], + "copies": [ + { + "files": [ "<(PRODUCT_DIR)/<(module_name).node" ], + "destination": "<(module_path)" + } + ] + } +``` + +For a full example see [node-addon-example's binding.gyp](https://github.com/springmeyer/node-addon-example/blob/2ff60a8ded7f042864ad21db00c3a5a06cf47075/binding.gyp). + +#### 3) Dynamically require your `.node` + +Inside the main js file that requires your addon module you are likely currently doing: + +```js +var binding = require('../build/Release/binding.node'); +``` + +or: + +```js +var bindings = require('./bindings') +``` + +Change those lines to: + +```js +var binary = require('@mapbox/node-pre-gyp'); +var path = require('path'); +var binding_path = binary.find(path.resolve(path.join(__dirname,'./package.json'))); +var binding = require(binding_path); +``` + +For a full example see [node-addon-example's index.js](https://github.com/springmeyer/node-addon-example/blob/2ff60a8ded7f042864ad21db00c3a5a06cf47075/index.js#L1-L4) + +#### 4) Build and package your app + +Now build your module from source: + + npm install --build-from-source + +The `--build-from-source` tells `node-pre-gyp` to not look for a remote package and instead dispatch to node-gyp to build. + +Now `node-pre-gyp` should now also be installed as a local dependency so the command line tool it offers can be found at `./node_modules/.bin/node-pre-gyp`. + +#### 5) Test + +Now `npm test` should work just as it did before. + +#### 6) Publish the tarball + +Then package your app: + + ./node_modules/.bin/node-pre-gyp package + +Once packaged, now you can publish: + + ./node_modules/.bin/node-pre-gyp publish + +Currently the `publish` command pushes your binary to S3. This requires: + + - You have installed `aws-sdk` with `npm install aws-sdk` + - You have created a bucket already. + - The `host` points to an S3 http or https endpoint. + - You have configured node-pre-gyp to read your S3 credentials (see [S3 hosting](#s3-hosting) for details). + +You can also host your binaries elsewhere. To do this requires: + + - You manually publish the binary created by the `package` command to an `https` endpoint + - Ensure that the `host` value points to your custom `https` endpoint. + +#### 7) Automate builds + +Now you need to publish builds for all the platforms and node versions you wish to support. This is best automated. + + - See [Appveyor Automation](#appveyor-automation) for how to auto-publish builds on Windows. + - See [Travis Automation](#travis-automation) for how to auto-publish builds on OS X and Linux. + +#### 8) You're done! + +Now publish your module to the npm registry. Users will now be able to install your module from a binary. + +What will happen is this: + +1. `npm install ` will pull from the npm registry +2. npm will run the `install` script which will call out to `node-pre-gyp` +3. `node-pre-gyp` will fetch the binary `.node` module and unpack in the right place +4. Assuming that all worked, you are done + +If a a binary was not available for a given platform and `--fallback-to-build` was used then `node-gyp rebuild` will be called to try to source compile the module. + +#### 9) One more option + +It may be that you want to work with two s3 buckets, one for staging and one for production; this +arrangement makes it less likely to accidentally overwrite a production binary. It also allows the production +environment to have more restrictive permissions than staging while still enabling publishing when +developing and testing. + +The binary.host property can be set at execution time. In order to do so all of the following conditions +must be true. + +- binary.host is falsey or not present +- binary.staging_host is not empty +- binary.production_host is not empty + +If any of these checks fail then the operation will not perform execution time determination of the s3 target. + +If the command being executed is either "publish" or "unpublish" then the default is set to `binary.staging_host`. In all other cases +the default is `binary.production_host`. + +The command-line options `--s3_host=staging` or `--s3_host=production` override the default. If `s3_host` +is present and not `staging` or `production` an exception is thrown. + +This allows installing from staging by specifying `--s3_host=staging`. And it requires specifying +`--s3_option=production` in order to publish to, or unpublish from, production, making accidental errors less likely. + +## Node-API Considerations + +[Node-API](https://nodejs.org/api/n-api.html#n_api_node_api), which was previously known as N-API, is an ABI-stable alternative to previous technologies such as [nan](https://github.com/nodejs/nan) which are tied to a specific Node runtime engine. Node-API is Node runtime engine agnostic and guarantees modules created today will continue to run, without changes, into the future. + +Using `node-pre-gyp` with Node-API projects requires a handful of additional configuration values and imposes some additional requirements. + +The most significant difference is that an Node-API module can be coded to target multiple Node-API versions. Therefore, an Node-API module must declare in its `package.json` file which Node-API versions the module is designed to run against. In addition, since multiple builds may be required for a single module, path and file names must be specified in way that avoids naming conflicts. + +### The `napi_versions` array property + +A Node-API module must declare in its `package.json` file, the Node-API versions the module is intended to support. This is accomplished by including an `napi-versions` array property in the `binary` object. For example: + +```js +"binary": { + "module_name": "your_module", + "module_path": "your_module_path", + "host": "https://your_bucket.s3-us-west-1.amazonaws.com", + "napi_versions": [1,3] + } +``` + +If the `napi_versions` array property is *not* present, `node-pre-gyp` operates as it always has. Including the `napi_versions` array property instructs `node-pre-gyp` that this is a Node-API module build. + +When the `napi_versions` array property is present, `node-pre-gyp` fires off multiple operations, one for each of the Node-API versions in the array. In the example above, two operations are initiated, one for Node-API version 1 and second for Node-API version 3. How this version number is communicated is described next. + +### The `napi_build_version` value + +For each of the Node-API module operations `node-pre-gyp` initiates, it ensures that the `napi_build_version` is set appropriately. + +This value is of importance in two areas: + +1. The C/C++ code which needs to know against which Node-API version it should compile. +2. `node-pre-gyp` itself which must assign appropriate path and file names to avoid collisions. + +### Defining `NAPI_VERSION` for the C/C++ code + +The `napi_build_version` value is communicated to the C/C++ code by adding this code to the `binding.gyp` file: + +``` +"defines": [ + "NAPI_VERSION=<(napi_build_version)", +] +``` + +This ensures that `NAPI_VERSION`, an integer value, is declared appropriately to the C/C++ code for each build. + +> Note that earlier versions of this document recommended defining the symbol `NAPI_BUILD_VERSION`. `NAPI_VERSION` is preferred because it used by the Node-API C/C++ headers to configure the specific Node-API versions being requested. + +### Path and file naming requirements in `package.json` + +Since `node-pre-gyp` fires off multiple operations for each request, it is essential that path and file names be created in such a way as to avoid collisions. This is accomplished by imposing additional path and file naming requirements. + +Specifically, when performing Node-API builds, the `{napi_build_version}` text configuration value *must* be present in the `module_path` property. In addition, the `{napi_build_version}` text configuration value *must* be present in either the `remote_path` or `package_name` property. (No problem if it's in both.) + +Here's an example: + +```js +"binary": { + "module_name": "your_module", + "module_path": "./lib/binding/napi-v{napi_build_version}", + "remote_path": "./{module_name}/v{version}/{configuration}/", + "package_name": "{platform}-{arch}-napi-v{napi_build_version}.tar.gz", + "host": "https://your_bucket.s3-us-west-1.amazonaws.com", + "napi_versions": [1,3] + } +``` + +## Supporting both Node-API and NAN builds + +You may have a legacy native add-on that you wish to continue supporting for those versions of Node that do not support Node-API, as you add Node-API support for later Node versions. This can be accomplished by specifying the `node_napi_label` configuration value in the package.json `binary.package_name` property. + +Placing the configuration value `node_napi_label` in the package.json `binary.package_name` property instructs `node-pre-gyp` to build all viable Node-API binaries supported by the current Node instance. If the current Node instance does not support Node-API, `node-pre-gyp` will request a traditional, non-Node-API build. + +The configuration value `node_napi_label` is set by `node-pre-gyp` to the type of build created, `napi` or `node`, and the version number. For Node-API builds, the string contains the Node-API version nad has values like `napi-v3`. For traditional, non-Node-API builds, the string contains the ABI version with values like `node-v46`. + +Here's how the `binary` configuration above might be changed to support both Node-API and NAN builds: + +```js +"binary": { + "module_name": "your_module", + "module_path": "./lib/binding/{node_napi_label}", + "remote_path": "./{module_name}/v{version}/{configuration}/", + "package_name": "{platform}-{arch}-{node_napi_label}.tar.gz", + "host": "https://your_bucket.s3-us-west-1.amazonaws.com", + "napi_versions": [1,3] + } +``` + +The C/C++ symbol `NAPI_VERSION` can be used to distinguish Node-API and non-Node-API builds. The value of `NAPI_VERSION` is set to the integer Node-API version for Node-API builds and is set to `0` for non-Node-API builds. + +For example: + +```C +#if NAPI_VERSION +// Node-API code goes here +#else +// NAN code goes here +#endif +``` + +### Two additional configuration values + +The following two configuration values, which were implemented in previous versions of `node-pre-gyp`, continue to exist, but have been replaced by the `node_napi_label` configuration value described above. + +1. `napi_version` If Node-API is supported by the currently executing Node instance, this value is the Node-API version number supported by Node. If Node-API is not supported, this value is an empty string. + +2. `node_abi_napi` If the value returned for `napi_version` is non empty, this value is `'napi'`. If the value returned for `napi_version` is empty, this value is the value returned for `node_abi`. + +These values are present for use in the `binding.gyp` file and may be used as `{napi_version}` and `{node_abi_napi}` for text substitution in the `binary` properties of the `package.json` file. + +## S3 Hosting + +You can host wherever you choose but S3 is cheap, `node-pre-gyp publish` expects it, and S3 can be integrated well with [Travis.ci](http://travis-ci.org) to automate builds for OS X and Ubuntu, and with [Appveyor](http://appveyor.com) to automate builds for Windows. Here is an approach to do this: + +First, get setup locally and test the workflow: + +#### 1) Create an S3 bucket + +And have your **key** and **secret key** ready for writing to the bucket. + +It is recommended to create a IAM user with a policy that only gives permissions to the specific bucket you plan to publish to. This can be done in the [IAM console](https://console.aws.amazon.com/iam/) by: 1) adding a new user, 2) choosing `Attach User Policy`, 3) Using the `Policy Generator`, 4) selecting `Amazon S3` for the service, 5) adding the actions: `DeleteObject`, `GetObject`, `GetObjectAcl`, `ListBucket`, `HeadBucket`, `PutObject`, `PutObjectAcl`, 6) adding an ARN of `arn:aws:s3:::bucket/*` (replacing `bucket` with your bucket name), and finally 7) clicking `Add Statement` and saving the policy. It should generate a policy like: + +```js +{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "objects", + "Effect": "Allow", + "Action": [ + "s3:PutObject", + "s3:GetObjectAcl", + "s3:GetObject", + "s3:DeleteObject", + "s3:PutObjectAcl" + ], + "Resource": "arn:aws:s3:::your-bucket-name/*" + }, + { + "Sid": "bucket", + "Effect": "Allow", + "Action": "s3:ListBucket", + "Resource": "arn:aws:s3:::your-bucket-name" + }, + { + "Sid": "buckets", + "Effect": "Allow", + "Action": "s3:HeadBucket", + "Resource": "*" + } + ] +} +``` + +#### 2) Install node-pre-gyp + +Either install it globally: + + npm install node-pre-gyp -g + +Or put the local version on your PATH + + export PATH=`pwd`/node_modules/.bin/:$PATH + +#### 3) Configure AWS credentials + +It is recommended to configure the AWS JS SDK v2 used internally by `node-pre-gyp` by setting these environment variables: + +- AWS_ACCESS_KEY_ID +- AWS_SECRET_ACCESS_KEY + +But also you can also use the `Shared Config File` mentioned [in the AWS JS SDK v2 docs](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/configuring-the-jssdk.html) + +#### 4) Package and publish your build + +Install the `aws-sdk`: + + npm install aws-sdk + +Then publish: + + node-pre-gyp package publish + +Note: if you hit an error like `Hostname/IP doesn't match certificate's altnames` it may mean that you need to provide the `region` option in your config. + +## Appveyor Automation + +[Appveyor](http://www.appveyor.com/) can build binaries and publish the results per commit and supports: + + - Windows Visual Studio 2013 and related compilers + - Both 64 bit (x64) and 32 bit (x86) build configurations + - Multiple Node.js versions + +For an example of doing this see [node-sqlite3's appveyor.yml](https://github.com/mapbox/node-sqlite3/blob/master/appveyor.yml). + +Below is a guide to getting set up: + +#### 1) Create a free Appveyor account + +Go to https://ci.appveyor.com/signup/free and sign in with your GitHub account. + +#### 2) Create a new project + +Go to https://ci.appveyor.com/projects/new and select the GitHub repo for your module + +#### 3) Add appveyor.yml and push it + +Once you have committed an `appveyor.yml` ([appveyor.yml reference](http://www.appveyor.com/docs/appveyor-yml)) to your GitHub repo and pushed it AppVeyor should automatically start building your project. + +#### 4) Create secure variables + +Encrypt your S3 AWS keys by going to and hitting the `encrypt` button. + +Then paste the result into your `appveyor.yml` + +```yml +environment: + AWS_ACCESS_KEY_ID: + secure: Dn9HKdLNYvDgPdQOzRq/DqZ/MPhjknRHB1o+/lVU8MA= + AWS_SECRET_ACCESS_KEY: + secure: W1rwNoSnOku1r+28gnoufO8UA8iWADmL1LiiwH9IOkIVhDTNGdGPJqAlLjNqwLnL +``` + +NOTE: keys are per account but not per repo (this is difference than Travis where keys are per repo but not related to the account used to encrypt them). + +#### 5) Hook up publishing + +Just put `node-pre-gyp package publish` in your `appveyor.yml` after `npm install`. + +#### 6) Publish when you want + +You might wish to publish binaries only on a specific commit. To do this you could borrow from the [Travis CI idea of commit keywords](http://about.travis-ci.org/docs/user/how-to-skip-a-build/) and add special handling for commit messages with `[publish binary]`: + + SET CM=%APPVEYOR_REPO_COMMIT_MESSAGE% + if not "%CM%" == "%CM:[publish binary]=%" node-pre-gyp --msvs_version=2013 publish + +If your commit message contains special characters (e.g. `&`) this method might fail. An alternative is to use PowerShell, which gives you additional possibilities, like ignoring case by using `ToLower()`: + + ps: if($env:APPVEYOR_REPO_COMMIT_MESSAGE.ToLower().Contains('[publish binary]')) { node-pre-gyp --msvs_version=2013 publish } + +Remember this publishing is not the same as `npm publish`. We're just talking about the binary module here and not your entire npm package. + +## Travis Automation + +[Travis](https://travis-ci.org/) can push to S3 after a successful build and supports both: + + - Ubuntu Precise and OS X (64 bit) + - Multiple Node.js versions + +For an example of doing this see [node-add-example's .travis.yml](https://github.com/springmeyer/node-addon-example/blob/2ff60a8ded7f042864ad21db00c3a5a06cf47075/.travis.yml). + +Note: if you need 32 bit binaries, this can be done from a 64 bit Travis machine. See [the node-sqlite3 scripts for an example of doing this](https://github.com/mapbox/node-sqlite3/blob/bae122aa6a2b8a45f6b717fab24e207740e32b5d/scripts/build_against_node.sh#L54-L74). + +Below is a guide to getting set up: + +#### 1) Install the Travis gem + + gem install travis + +#### 2) Create secure variables + +Make sure you run this command from within the directory of your module. + +Use `travis-encrypt` like: + + travis encrypt AWS_ACCESS_KEY_ID=${node_pre_gyp_accessKeyId} + travis encrypt AWS_SECRET_ACCESS_KEY=${node_pre_gyp_secretAccessKey} + +Then put those values in your `.travis.yml` like: + +```yaml +env: + global: + - secure: F+sEL/v56CzHqmCSSES4pEyC9NeQlkoR0Gs/ZuZxX1ytrj8SKtp3MKqBj7zhIclSdXBz4Ev966Da5ctmcTd410p0b240MV6BVOkLUtkjZJyErMBOkeb8n8yVfSoeMx8RiIhBmIvEn+rlQq+bSFis61/JkE9rxsjkGRZi14hHr4M= + - secure: o2nkUQIiABD139XS6L8pxq3XO5gch27hvm/gOdV+dzNKc/s2KomVPWcOyXNxtJGhtecAkABzaW8KHDDi5QL1kNEFx6BxFVMLO8rjFPsMVaBG9Ks6JiDQkkmrGNcnVdxI/6EKTLHTH5WLsz8+J7caDBzvKbEfTux5EamEhxIWgrI= +``` + +More details on Travis encryption at http://about.travis-ci.org/docs/user/encryption-keys/. + +#### 3) Hook up publishing + +Just put `node-pre-gyp package publish` in your `.travis.yml` after `npm install`. + +##### OS X publishing + +If you want binaries for OS X in addition to linux you can enable [multi-os for Travis](http://docs.travis-ci.com/user/multi-os/#Setting-.travis.yml) + +Use a configuration like: + +```yml + +language: cpp + +os: +- linux +- osx + +env: + matrix: + - NODE_VERSION="4" + - NODE_VERSION="6" + +before_install: +- rm -rf ~/.nvm/ && git clone --depth 1 https://github.com/creationix/nvm.git ~/.nvm +- source ~/.nvm/nvm.sh +- nvm install $NODE_VERSION +- nvm use $NODE_VERSION +``` + +See [Travis OS X Gotchas](#travis-os-x-gotchas) for why we replace `language: node_js` and `node_js:` sections with `language: cpp` and a custom matrix. + +Also create platform specific sections for any deps that need install. For example if you need libpng: + +```yml +- if [ $(uname -s) == 'Linux' ]; then apt-get install libpng-dev; fi; +- if [ $(uname -s) == 'Darwin' ]; then brew install libpng; fi; +``` + +For detailed multi-OS examples see [node-mapnik](https://github.com/mapnik/node-mapnik/blob/master/.travis.yml) and [node-sqlite3](https://github.com/mapbox/node-sqlite3/blob/master/.travis.yml). + +##### Travis OS X Gotchas + +First, unlike the Travis Linux machines, the OS X machines do not put `node-pre-gyp` on PATH by default. To do so you will need to: + +```sh +export PATH=$(pwd)/node_modules/.bin:${PATH} +``` + +Second, the OS X machines do not support using a matrix for installing different Node.js versions. So you need to bootstrap the installation of Node.js in a cross platform way. + +By doing: + +```yml +env: + matrix: + - NODE_VERSION="4" + - NODE_VERSION="6" + +before_install: + - rm -rf ~/.nvm/ && git clone --depth 1 https://github.com/creationix/nvm.git ~/.nvm + - source ~/.nvm/nvm.sh + - nvm install $NODE_VERSION + - nvm use $NODE_VERSION +``` + +You can easily recreate the previous behavior of this matrix: + +```yml +node_js: + - "4" + - "6" +``` + +#### 4) Publish when you want + +You might wish to publish binaries only on a specific commit. To do this you could borrow from the [Travis CI idea of commit keywords](http://about.travis-ci.org/docs/user/how-to-skip-a-build/) and add special handling for commit messages with `[publish binary]`: + + COMMIT_MESSAGE=$(git log --format=%B --no-merges -n 1 | tr -d '\n') + if [[ ${COMMIT_MESSAGE} =~ "[publish binary]" ]]; then node-pre-gyp publish; fi; + +Then you can trigger new binaries to be built like: + + git commit -a -m "[publish binary]" + +Or, if you don't have any changes to make simply run: + + git commit --allow-empty -m "[publish binary]" + +WARNING: if you are working in a pull request and publishing binaries from there then you will want to avoid double publishing when Travis CI builds both the `push` and `pr`. You only want to run the publish on the `push` commit. See https://github.com/Project-OSRM/node-osrm/blob/8eb837abe2e2e30e595093d16e5354bc5c573575/scripts/is_pr_merge.sh which is called from https://github.com/Project-OSRM/node-osrm/blob/8eb837abe2e2e30e595093d16e5354bc5c573575/scripts/publish.sh for an example of how to do this. + +Remember this publishing is not the same as `npm publish`. We're just talking about the binary module here and not your entire npm package. To automate the publishing of your entire package to npm on Travis see http://about.travis-ci.org/docs/user/deployment/npm/ + +# Versioning + +The `binary` properties of `module_path`, `remote_path`, and `package_name` support variable substitution. The strings are evaluated by `node-pre-gyp` depending on your system and any custom build flags you passed. + + - `node_abi`: The node C++ `ABI` number. This value is available in Javascript as `process.versions.modules` as of [`>= v0.10.4 >= v0.11.7`](https://github.com/joyent/node/commit/ccabd4a6fa8a6eb79d29bc3bbe9fe2b6531c2d8e) and in C++ as the `NODE_MODULE_VERSION` define much earlier. For versions of Node before this was available we fallback to the V8 major and minor version. + - `platform` matches node's `process.platform` like `linux`, `darwin`, and `win32` unless the user passed the `--target_platform` option to override. + - `arch` matches node's `process.arch` like `x64` or `ia32` unless the user passes the `--target_arch` option to override. + - `libc` matches `require('detect-libc').family` like `glibc` or `musl` unless the user passes the `--target_libc` option to override. + - `configuration` - Either 'Release' or 'Debug' depending on if `--debug` is passed during the build. + - `module_name` - the `binary.module_name` attribute from `package.json`. + - `version` - the semver `version` value for your module from `package.json` (NOTE: ignores the `semver.build` property). + - `major`, `minor`, `patch`, and `prelease` match the individual semver values for your module's `version` + - `build` - the sevmer `build` value. For example it would be `this.that` if your package.json `version` was `v1.0.0+this.that` + - `prerelease` - the semver `prerelease` value. For example it would be `alpha.beta` if your package.json `version` was `v1.0.0-alpha.beta` + + +The options are visible in the code at + +# Download binary files from a mirror + +S3 is broken in China for the well known reason. + +Using the `npm` config argument: `--{module_name}_binary_host_mirror` can download binary files through a mirror, `-` in `module_name` will be replaced with `_`. + +e.g.: Install [v8-profiler](https://www.npmjs.com/package/v8-profiler) from `npm`. + +```bash +$ npm install v8-profiler --profiler_binary_host_mirror=https://npm.taobao.org/mirrors/node-inspector/ +``` + +e.g.: Install [canvas-prebuilt](https://www.npmjs.com/package/canvas-prebuilt) from `npm`. + +```bash +$ npm install canvas-prebuilt --canvas_prebuilt_binary_host_mirror=https://npm.taobao.org/mirrors/canvas-prebuilt/ +``` diff --git a/node_modules/@mapbox/node-pre-gyp/RELEASE.md b/node_modules/@mapbox/node-pre-gyp/RELEASE.md new file mode 100644 index 0000000..050e34e --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/RELEASE.md @@ -0,0 +1,23 @@ +# Instructions for making a release + +1. Change the version number in `package.json`. Run the following command in the package root directory, replacing with one of the semantic versioning release types (prerelease, prepatch, preminor, premajor, patch, minor, major): + +``` +npm version --preid pre --no-git-tag-version +``` + +`--preid` specifies which suffix to use in the release such as `pre`, `next`, `beta`, `rc`, etc. + +`prepatch`, `preminor`, and `premajor` start a new series of pre-releases while bumping the patch, minor, or major version. E.g. `premajor` with `--preid pre` would do a prerelease for a new major using the `-pre` suffix (i.e. it would be a new major with `-pre.0`) + +You can use `prerelease` to bump the version for a new pre-release version. E.g. you could run `npm version prerelease --preid pre --no-git-tag-version` to go from `-pre.0` to `-pre.1`. + +For regular versions, you can use `patch`, `minor`, or `major`. E.g. `npm version major --no-git-tag-version`. + +2. Update the changelog, which can be found in `CHANGELOG.md`. The heading must match `## ` exactly, or it will not be picked up. For example, for version 1.0.11: + +``` +## 1.0.11 +``` + +3. Commit and push the changes. On push the release workflow will automaticlly check if the release has been published on npm. If the release has not yet been published, the workflow will update the abi crosswalk file and publish a new npm release. \ No newline at end of file diff --git a/node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp b/node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp new file mode 100755 index 0000000..c38d34d --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp @@ -0,0 +1,4 @@ +#!/usr/bin/env node +'use strict'; + +require('../lib/main'); diff --git a/node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp.cmd b/node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp.cmd new file mode 100644 index 0000000..46e14b5 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp.cmd @@ -0,0 +1,2 @@ +@echo off +node "%~dp0\node-pre-gyp" %* diff --git a/node_modules/@mapbox/node-pre-gyp/changelog_for_version.md b/node_modules/@mapbox/node-pre-gyp/changelog_for_version.md new file mode 100644 index 0000000..f0474f0 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/changelog_for_version.md @@ -0,0 +1,6 @@ +- Supported Node versions are now stable versions of Node 18+. We will attempt to track the [Node.js release schedule](https://github.com/nodejs/release#release-schedule) and will regularly retire support for versions that have reached EOL. +- Fixed use of `s3ForcePathStyle` for installation [#650](https://github.com/mapbox/node-pre-gyp/pull/650) +- Upgraded to https-proxy-agent 7.0.5, nopt 8.0.0, semver 7.5.3, and tar 7.4.0 +- Replaced npmlog with consola +- Removed rimraf and make-dir as dependencies + diff --git a/node_modules/@mapbox/node-pre-gyp/contributing.md b/node_modules/@mapbox/node-pre-gyp/contributing.md new file mode 100644 index 0000000..4038fa6 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/contributing.md @@ -0,0 +1,10 @@ +# Contributing + + +### Releasing a new version: + +- Ensure tests are passing on travis and appveyor +- Run `node scripts/abi_crosswalk.js` and commit any changes +- Update the changelog +- Tag a new release like: `git tag -a v0.6.34 -m "tagging v0.6.34" && git push --tags` +- Run `npm publish` diff --git a/node_modules/@mapbox/node-pre-gyp/lib/build.js b/node_modules/@mapbox/node-pre-gyp/lib/build.js new file mode 100644 index 0000000..e8a1459 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/build.js @@ -0,0 +1,51 @@ +'use strict'; + +module.exports = exports = build; + +exports.usage = 'Attempts to compile the module by dispatching to node-gyp or nw-gyp'; + +const napi = require('./util/napi.js'); +const compile = require('./util/compile.js'); +const handle_gyp_opts = require('./util/handle_gyp_opts.js'); +const configure = require('./configure.js'); + +function do_build(gyp, argv, callback) { + handle_gyp_opts(gyp, argv, (err, result) => { + let final_args = ['build'].concat(result.gyp).concat(result.pre); + if (result.unparsed.length > 0) { + final_args = final_args. + concat(['--']). + concat(result.unparsed); + } + if (!err && result.opts.napi_build_version) { + napi.swap_build_dir_in(result.opts.napi_build_version); + } + compile.run_gyp(final_args, result.opts, (err2) => { + if (result.opts.napi_build_version) { + napi.swap_build_dir_out(result.opts.napi_build_version); + } + return callback(err2); + }); + }); +} + +function build(gyp, argv, callback) { + + // Form up commands to pass to node-gyp: + // We map `node-pre-gyp build` to `node-gyp configure build` so that we do not + // trigger a clean and therefore do not pay the penalty of a full recompile + if (argv.length && (argv.indexOf('rebuild') > -1)) { + argv.shift(); // remove `rebuild` + // here we map `node-pre-gyp rebuild` to `node-gyp rebuild` which internally means + // "clean + configure + build" and triggers a full recompile + compile.run_gyp(['clean'], {}, (err3) => { + if (err3) return callback(err3); + configure(gyp, argv, (err4) => { + if (err4) return callback(err4); + return do_build(gyp, argv, callback); + }); + }); + } else { + return do_build(gyp, argv, callback); + } +} diff --git a/node_modules/@mapbox/node-pre-gyp/lib/clean.js b/node_modules/@mapbox/node-pre-gyp/lib/clean.js new file mode 100644 index 0000000..f3e9058 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/clean.js @@ -0,0 +1,31 @@ +'use strict'; + +module.exports = exports = clean; + +exports.usage = 'Removes the entire folder containing the compiled .node module'; + +const fs = require('fs'); +const exists = fs.exists || require('path').exists; +const versioning = require('./util/versioning.js'); +const napi = require('./util/napi.js'); +const path = require('path'); + +function clean(gyp, argv, callback) { + const package_json = gyp.package_json; + const napi_build_version = napi.get_napi_build_version_from_command_args(argv); + const opts = versioning.evaluate(package_json, gyp.opts, napi_build_version); + const to_delete = opts.module_path; + if (!to_delete) { + return callback(new Error('module_path is empty, refusing to delete')); + } else if (path.normalize(to_delete) === path.normalize(process.cwd())) { + return callback(new Error('module_path is not set, refusing to delete')); + } else { + exists(to_delete, (found) => { + if (found) { + if (!gyp.opts.silent_clean) console.log('[' + package_json.name + '] Removing "%s"', to_delete); + return fs.rm(to_delete, { recursive: true, force: true }, callback); + } + return callback(); + }); + } +} diff --git a/node_modules/@mapbox/node-pre-gyp/lib/configure.js b/node_modules/@mapbox/node-pre-gyp/lib/configure.js new file mode 100644 index 0000000..1337c0c --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/configure.js @@ -0,0 +1,52 @@ +'use strict'; + +module.exports = exports = configure; + +exports.usage = 'Attempts to configure node-gyp or nw-gyp build'; + +const napi = require('./util/napi.js'); +const compile = require('./util/compile.js'); +const handle_gyp_opts = require('./util/handle_gyp_opts.js'); + +function configure(gyp, argv, callback) { + handle_gyp_opts(gyp, argv, (err, result) => { + let final_args = result.gyp.concat(result.pre); + // pull select node-gyp configure options out of the npm environ + const known_gyp_args = ['dist-url', 'python', 'nodedir', 'msvs_version']; + known_gyp_args.forEach((key) => { + const val = gyp.opts[key] || gyp.opts[key.replace('-', '_')]; + if (val) { + final_args.push('--' + key + '=' + val); + } + }); + // --ensure=false tell node-gyp to re-install node development headers + // but it is only respected by node-gyp install, so we have to call install + // as a separate step if the user passes it + if (gyp.opts.ensure === false) { + const install_args = final_args.concat(['install', '--ensure=false']); + compile.run_gyp(install_args, result.opts, (err2) => { + if (err2) return callback(err2); + if (result.unparsed.length > 0) { + final_args = final_args. + concat(['--']). + concat(result.unparsed); + } + compile.run_gyp(['configure'].concat(final_args), result.opts, (err3) => { + return callback(err3); + }); + }); + } else { + if (result.unparsed.length > 0) { + final_args = final_args. + concat(['--']). + concat(result.unparsed); + } + compile.run_gyp(['configure'].concat(final_args), result.opts, (err4) => { + if (!err4 && result.opts.napi_build_version) { + napi.swap_build_dir_out(result.opts.napi_build_version); + } + return callback(err4); + }); + } + }); +} diff --git a/node_modules/@mapbox/node-pre-gyp/lib/info.js b/node_modules/@mapbox/node-pre-gyp/lib/info.js new file mode 100644 index 0000000..3e5c63c --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/info.js @@ -0,0 +1,37 @@ +'use strict'; + +module.exports = exports = info; + +exports.usage = 'Lists all published binaries (requires aws-sdk)'; + +const log = require('./util/log.js'); +const versioning = require('./util/versioning.js'); +const s3_setup = require('./util/s3_setup.js'); + +function info(gyp, argv, callback) { + const package_json = gyp.package_json; + const opts = versioning.evaluate(package_json, gyp.opts); + const config = s3_setup.detect(opts); + const s3 = s3_setup.get_s3(config); + const s3_opts = { + Bucket: config.bucket, + Prefix: config.prefix + }; + s3.listObjects(s3_opts, (err, meta) => { + if (err && err.code === 'NotFound') { + return callback(new Error('[' + package_json.name + '] Not found: https://' + opts.hosted_path)); + } else if (err) { + return callback(err); + } else { + log.verbose(JSON.stringify(meta, null, 1)); + if (meta && meta.Contents.length) { + meta.Contents.forEach((obj) => { + console.log(obj.Key); + }); + } else { + console.error('[' + package_json.name + '] Not found: No objects at https://' + opts.hosted_path); + } + return callback(); + } + }); +} diff --git a/node_modules/@mapbox/node-pre-gyp/lib/install.js b/node_modules/@mapbox/node-pre-gyp/lib/install.js new file mode 100644 index 0000000..d3a8d04 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/install.js @@ -0,0 +1,234 @@ +'use strict'; + +module.exports = exports = install; + +exports.usage = 'Attempts to install pre-built binary for module'; + +const fs = require('fs'); +const path = require('path'); +const log = require('./util/log.js'); +const existsAsync = fs.exists || path.exists; +const versioning = require('./util/versioning.js'); +const napi = require('./util/napi.js'); +// for fetching binaries +const fetch = require('node-fetch'); +const tar = require('tar'); + +let npgVersion = 'unknown'; +try { + // Read own package.json to get the current node-pre-pyp version. + const ownPackageJSON = fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8'); + npgVersion = JSON.parse(ownPackageJSON).version; +} catch (e) { + // do nothing +} + +function place_binary(uri, targetDir, opts, callback) { + log.log('GET', uri); + + // Try getting version info from the currently running npm. + const envVersionInfo = process.env.npm_config_user_agent || + 'node ' + process.version; + + const sanitized = uri.replace('+', '%2B'); + const requestOpts = { + uri: sanitized, + headers: { + 'User-Agent': 'node-pre-gyp (v' + npgVersion + ', ' + envVersionInfo + ')' + }, + follow_max: 10 + }; + + if (opts.cafile) { + try { + requestOpts.ca = fs.readFileSync(opts.cafile); + } catch (e) { + return callback(e); + } + } else if (opts.ca) { + requestOpts.ca = opts.ca; + } + + const proxyUrl = opts.proxy || + process.env.http_proxy || + process.env.HTTP_PROXY || + process.env.npm_config_proxy; + let agent; + if (proxyUrl) { + const { HttpsProxyAgent } = require('https-proxy-agent'); + agent = new HttpsProxyAgent(proxyUrl); + log.log('download', `proxy agent configured using: "${proxyUrl}"`); + } + + fetch(sanitized, { agent }) + .then((res) => { + if (!res.ok) { + throw new Error(`response status ${res.status} ${res.statusText} on ${sanitized}`); + } + const dataStream = res.body; + + return new Promise((resolve, reject) => { + let extractions = 0; + const countExtractions = (entry) => { + extractions += 1; + log.info('install', `unpacking ${entry.path}`); + }; + + dataStream.pipe(extract(targetDir, countExtractions)) + .on('error', (e) => { + reject(e); + }); + dataStream.on('end', () => { + resolve(`extracted file count: ${extractions}`); + }); + dataStream.on('error', (e) => { + reject(e); + }); + }); + }) + .then((text) => { + log.info(text); + callback(); + }) + .catch((e) => { + log.error(`install ${e.message}`); + callback(e); + }); +} + +function extract(to, onentry) { + return tar.extract({ + cwd: to, + strip: 1, + onentry + }); +} + +function extract_from_local(from, targetDir, callback) { + if (!fs.existsSync(from)) { + return callback(new Error('Cannot find file ' + from)); + } + log.info('Found local file to extract from ' + from); + + // extract helpers + let extractCount = 0; + function countExtractions(entry) { + extractCount += 1; + log.info('install', 'unpacking ' + entry.path); + } + function afterExtract(err) { + if (err) return callback(err); + if (extractCount === 0) { + return callback(new Error('There was a fatal problem while extracting the tarball')); + } + log.info('tarball', 'done parsing tarball'); + callback(); + } + + fs.createReadStream(from).pipe(extract(targetDir, countExtractions)) + .on('close', afterExtract) + .on('error', afterExtract); +} + +function do_build(gyp, argv, callback) { + const args = ['rebuild'].concat(argv); + gyp.todo.push({ name: 'build', args: args }); + process.nextTick(callback); +} + +function print_fallback_error(err, opts, package_json) { + const fallback_message = ' (falling back to source compile with node-gyp)'; + let full_message = ''; + if (err.statusCode !== undefined) { + // If we got a network response it but failed to download + // it means remote binaries are not available, so let's try to help + // the user/developer with the info to debug why + full_message = 'Pre-built binaries not found for ' + package_json.name + '@' + package_json.version; + full_message += ' and ' + opts.runtime + '@' + (opts.target || process.versions.node) + ' (' + opts.node_abi + ' ABI, ' + opts.libc + ')'; + full_message += fallback_message; + log.warn('Tried to download(' + err.statusCode + '): ' + opts.hosted_tarball); + log.warn(full_message); + log.error(err.message); + } else { + // If we do not have a statusCode that means an unexpected error + // happened and prevented an http response, so we output the exact error + full_message = 'Pre-built binaries not installable for ' + package_json.name + '@' + package_json.version; + full_message += ' and ' + opts.runtime + '@' + (opts.target || process.versions.node) + ' (' + opts.node_abi + ' ABI, ' + opts.libc + ')'; + full_message += fallback_message; + log.warn(full_message); + log.warn('Hit error ' + err.message); + } +} + +// +// install +// +function install(gyp, argv, callback) { + const package_json = gyp.package_json; + const napi_build_version = napi.get_napi_build_version_from_command_args(argv); + const source_build = gyp.opts['build-from-source'] || gyp.opts.build_from_source; + const update_binary = gyp.opts['update-binary'] || gyp.opts.update_binary; + const should_do_source_build = source_build === package_json.name || (source_build === true || source_build === 'true'); + if (should_do_source_build) { + log.info('build', 'requesting source compile'); + return do_build(gyp, argv, callback); + } else { + const fallback_to_build = gyp.opts['fallback-to-build'] || gyp.opts.fallback_to_build; + let should_do_fallback_build = fallback_to_build === package_json.name || (fallback_to_build === true || fallback_to_build === 'true'); + // but allow override from npm + if (process.env.npm_config_argv) { + const cooked = JSON.parse(process.env.npm_config_argv).cooked; + const match = cooked.indexOf('--fallback-to-build'); + if (match > -1 && cooked.length > match && cooked[match + 1] === 'false') { + should_do_fallback_build = false; + log.info('install', 'Build fallback disabled via npm flag: --fallback-to-build=false'); + } + } + let opts; + try { + opts = versioning.evaluate(package_json, gyp.opts, napi_build_version); + } catch (err) { + return callback(err); + } + + opts.ca = gyp.opts.ca; + opts.cafile = gyp.opts.cafile; + + const from = opts.hosted_tarball; + const to = opts.module_path; + const binary_module = path.join(to, opts.module_name + '.node'); + existsAsync(binary_module, (found) => { + if (!update_binary) { + if (found) { + console.log('[' + package_json.name + '] Success: "' + binary_module + '" already installed'); + console.log('Pass --update-binary to reinstall or --build-from-source to recompile'); + return callback(); + } + log.info('check', 'checked for "' + binary_module + '" (not found)'); + } + + fs.promises.mkdir(to, { recursive: true }).then(() => { + const fileName = from.startsWith('file://') && from.slice('file://'.length); + if (fileName) { + extract_from_local(fileName, to, after_place); + } else { + place_binary(from, to, opts, after_place); + } + }).catch((err) => { + after_place(err); + }); + + function after_place(err) { + if (err && should_do_fallback_build) { + print_fallback_error(err, opts, package_json); + return do_build(gyp, argv, callback); + } else if (err) { + return callback(err); + } else { + console.log('[' + package_json.name + '] Success: "' + binary_module + '" is installed via remote'); + return callback(); + } + } + }); + } +} diff --git a/node_modules/@mapbox/node-pre-gyp/lib/main.js b/node_modules/@mapbox/node-pre-gyp/lib/main.js new file mode 100644 index 0000000..f46ea32 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/main.js @@ -0,0 +1,125 @@ +'use strict'; + +/** + * Set the title. + */ + +process.title = 'node-pre-gyp'; + +const node_pre_gyp = require('../'); +const log = require('./util/log.js'); + +/** + * Process and execute the selected commands. + */ + +const prog = new node_pre_gyp.Run({ argv: process.argv }); +let completed = false; + +if (prog.todo.length === 0) { + if (~process.argv.indexOf('-v') || ~process.argv.indexOf('--version')) { + console.log('v%s', prog.version); + process.exit(0); + } else if (~process.argv.indexOf('-h') || ~process.argv.indexOf('--help')) { + console.log('%s', prog.usage()); + process.exit(0); + } + console.log('%s', prog.usage()); + process.exit(1); +} + +// if --no-color is passed +if (prog.opts && Object.hasOwnProperty.call(prog, 'color') && !prog.opts.color) { + log.disableColor(); +} + +log.info('it worked if it ends with', 'ok'); +log.verbose('cli', process.argv); +log.info(`using ${process.title}@${prog.version}`); +log.info(`using node@${process.versions.node} | ${process.platform} | ${process.arch} `); + + +/** + * Change dir if -C/--directory was passed. + */ + +const dir = prog.opts.directory; +if (dir) { + const fs = require('fs'); + try { + const stat = fs.statSync(dir); + if (stat.isDirectory()) { + log.info('chdir', dir); + process.chdir(dir); + } else { + log.warn('chdir', dir + ' is not a directory'); + } + } catch (e) { + if (e.code === 'ENOENT') { + log.warn('chdir', dir + ' is not a directory'); + } else { + log.warn('chdir', `error during chdir() "${e.message}"`); + } + } +} + +function run() { + const command = prog.todo.shift(); + if (!command) { + // done! + completed = true; + log.info('ok'); + return; + } + + // set binary.host when appropriate. host determines the s3 target bucket. + const target = prog.setBinaryHostProperty(command.name); + if (target && ['install', 'publish', 'unpublish', 'info'].indexOf(command.name) >= 0) { + log.info('using binary.host: ' + prog.package_json.binary.host); + } + + prog.commands[command.name](command.args, function(err) { + if (err) { + log.error(command.name + ' error'); + log.error('stack', err.stack); + errorMessage(); + log.error('not ok'); + console.log(err.message); + return process.exit(1); + } + const args_array = [].slice.call(arguments, 1); + if (args_array.length) { + console.log.apply(console, args_array); + } + // now run the next command in the queue + process.nextTick(run); + }); +} + +process.on('exit', (code) => { + if (!completed && !code) { + log.error('Completion callback never invoked!'); + errorMessage(); + process.exit(6); + } +}); + +process.on('uncaughtException', (err) => { + log.error('UNCAUGHT EXCEPTION'); + log.error('stack', err.stack); + errorMessage(); + process.exit(7); +}); + +function errorMessage() { + // copied from npm's lib/util/error-handler.js + const os = require('os'); + log.error('System', os.type() + ' ' + os.release()); + log.error('command', process.argv.map(JSON.stringify).join(' ')); + log.error('cwd', process.cwd()); + log.error('node -v', process.version); + log.error(process.title + ' -v', 'v' + prog.package.version); +} + +// start running the given commands! +run(); diff --git a/node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js b/node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js new file mode 100644 index 0000000..0c30087 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js @@ -0,0 +1,305 @@ +'use strict'; + +/** + * Module exports. + */ + +module.exports = exports; + +/** + * Module dependencies. + */ + +// load mocking control function for accessing s3 via https. the function is a noop always returning +// false if not mocking. +exports.mockS3Http = require('./util/s3_setup').get_mockS3Http(); +exports.mockS3Http('on'); +const mocking = exports.mockS3Http('get'); + + +const fs = require('fs'); +const path = require('path'); +const nopt = require('nopt'); +const log = require('./util/log.js'); +const napi = require('./util/napi.js'); + +const EE = require('events').EventEmitter; +const inherits = require('util').inherits; +const cli_commands = [ + 'clean', + 'install', + 'reinstall', + 'build', + 'rebuild', + 'package', + 'testpackage', + 'publish', + 'unpublish', + 'info', + 'testbinary', + 'reveal', + 'configure' +]; +const aliases = {}; + +if (mocking) { + log.warn(`mocking s3 to ${process.env.node_pre_gyp_mock_s3}`); +} + +// this is a getter to avoid circular reference warnings with node v14. +Object.defineProperty(exports, 'find', { + get: function() { + return require('./pre-binding').find; + }, + enumerable: true +}); + +// in the following, "my_module" is using node-pre-gyp to +// prebuild and install pre-built binaries. "main_module" +// is using "my_module". +// +// "bin/node-pre-gyp" invokes Run() without a path. the +// expectation is that the working directory is the package +// root "my_module". this is true because in all cases npm is +// executing a script in the context of "my_module". +// +// "pre-binding.find()" is executed by "my_module" but in the +// context of "main_module". this is because "main_module" is +// executing and requires "my_module" which is then executing +// "pre-binding.find()" via "node-pre-gyp.find()", so the working +// directory is that of "main_module". +// +// that's why "find()" must pass the path to package.json. +// +function Run({ package_json_path = './package.json', argv }) { + this.package_json_path = package_json_path; + this.commands = {}; + + const self = this; + cli_commands.forEach((command) => { + self.commands[command] = function(argvx, callback) { + log.verbose('command', command, argvx); + return require('./' + command)(self, argvx, callback); + }; + }); + + this.parseArgv(argv); + + // this is set to true after the binary.host property was set to + // either staging_host or production_host. + this.binaryHostSet = false; +} +inherits(Run, EE); +exports.Run = Run; +const proto = Run.prototype; + +/** + * Export the contents of the package.json. + */ + +proto.package = require('../package.json'); + +/** + * nopt configuration definitions + */ + +proto.configDefs = { + help: Boolean, // everywhere + arch: String, // 'configure' + debug: Boolean, // 'build' + directory: String, // bin + proxy: String, // 'install' + loglevel: String // everywhere +}; + +/** + * nopt shorthands + */ + +proto.shorthands = { + release: '--no-debug', + C: '--directory', + debug: '--debug', + j: '--jobs', + silent: '--loglevel=silent', + silly: '--loglevel=silly', + verbose: '--loglevel=verbose' +}; + +/** + * expose the command aliases for the bin file to use. + */ + +proto.aliases = aliases; + +/** + * Parses the given argv array and sets the 'opts', 'argv', + * 'command', and 'package_json' properties. + */ + +proto.parseArgv = function parseOpts(argv) { + this.opts = nopt(this.configDefs, this.shorthands, argv); + this.argv = this.opts.argv.remain.slice(); + const commands = this.todo = []; + + // create a copy of the argv array with aliases mapped + argv = this.argv.map((arg) => { + // is this an alias? + if (arg in this.aliases) { + arg = this.aliases[arg]; + } + return arg; + }); + + // process the mapped args into "command" objects ("name" and "args" props) + argv.slice().forEach((arg) => { + if (arg in this.commands) { + const args = argv.splice(0, argv.indexOf(arg)); + argv.shift(); + if (commands.length > 0) { + commands[commands.length - 1].args = args; + } + commands.push({ name: arg, args: [] }); + } + }); + if (commands.length > 0) { + commands[commands.length - 1].args = argv.splice(0); + } + + + // if a directory was specified package.json is assumed to be relative + // to it. + let package_json_path = this.package_json_path; + if (this.opts.directory) { + package_json_path = path.join(this.opts.directory, package_json_path); + } + + this.package_json = JSON.parse(fs.readFileSync(package_json_path)); + + // expand commands entries for multiple napi builds + this.todo = napi.expand_commands(this.package_json, this.opts, commands); + + // support for inheriting config env variables from npm + const npm_config_prefix = 'npm_config_'; + Object.keys(process.env).forEach((name) => { + if (name.indexOf(npm_config_prefix) !== 0) return; + const val = process.env[name]; + if (name === npm_config_prefix + 'loglevel') { + log.level = val; + } else { + // add the user-defined options to the config + name = name.substring(npm_config_prefix.length); + // avoid npm argv clobber already present args + // which avoids problem of 'npm test' calling + // script that runs unique npm install commands + if (name === 'argv') { + if (this.opts.argv && + this.opts.argv.remain && + this.opts.argv.remain.length) { + // do nothing + } else { + this.opts[name] = val; + } + } else { + this.opts[name] = val; + } + } + }); + + if (this.opts.loglevel) { + log.level = this.opts.loglevel; + } + log.resume(); +}; + +/** + * allow the binary.host property to be set at execution time. + * + * for this to take effect requires all the following to be true. + * - binary is a property in package.json + * - binary.host is falsey + * - binary.staging_host is not empty + * - binary.production_host is not empty + * + * if any of the previous checks fail then the function returns an empty string + * and makes no changes to package.json's binary property. + * + * + * if command is "publish" then the default is set to "binary.staging_host" + * if command is not "publish" the the default is set to "binary.production_host" + * + * if the command-line option '--s3_host' is set to "staging" or "production" then + * "binary.host" is set to the specified "staging_host" or "production_host". if + * '--s3_host' is any other value an exception is thrown. + * + * if '--s3_host' is not present then "binary.host" is set to the default as above. + * + * this strategy was chosen so that any command other than "publish" or "unpublish" uses "production" + * as the default without requiring any command-line options but that "publish" and "unpublish" require + * '--s3_host production_host' to be specified in order to *really* publish (or unpublish). publishing + * to staging can be done freely without worrying about disturbing any production releases. + */ +proto.setBinaryHostProperty = function(command) { + if (this.binaryHostSet) { + return this.package_json.binary.host; + } + const p = this.package_json; + // don't set anything if host is present. it must be left blank to trigger this. + if (!p || !p.binary || p.binary.host) { + return ''; + } + // and both staging and production must be present. errors will be reported later. + if (!p.binary.staging_host || !p.binary.production_host) { + return ''; + } + let target = 'production_host'; + if (command === 'publish' || command === 'unpublish') { + target = 'staging_host'; + } + // the environment variable has priority over the default or the command line. if + // either the env var or the command line option are invalid throw an error. + const npg_s3_host = process.env.node_pre_gyp_s3_host; + if (npg_s3_host === 'staging' || npg_s3_host === 'production') { + target = `${npg_s3_host}_host`; + } else if (this.opts['s3_host'] === 'staging' || this.opts['s3_host'] === 'production') { + target = `${this.opts['s3_host']}_host`; + } else if (this.opts['s3_host'] || npg_s3_host) { + throw new Error(`invalid s3_host ${this.opts['s3_host'] || npg_s3_host}`); + } + + p.binary.host = p.binary[target]; + this.binaryHostSet = true; + + return p.binary.host; +}; + +/** + * Returns the usage instructions for node-pre-gyp. + */ + +proto.usage = function usage() { + const str = [ + '', + ' Usage: node-pre-gyp [options]', + '', + ' where is one of:', + cli_commands.map((c) => { + return ' - ' + c + ' - ' + require('./' + c).usage; + }).join('\n'), + '', + 'node-pre-gyp@' + this.version + ' ' + path.resolve(__dirname, '..'), + 'node@' + process.versions.node + ].join('\n'); + return str; +}; + +/** + * Version number getter. + */ + +Object.defineProperty(proto, 'version', { + get: function() { + return this.package.version; + }, + enumerable: true +}); diff --git a/node_modules/@mapbox/node-pre-gyp/lib/package.js b/node_modules/@mapbox/node-pre-gyp/lib/package.js new file mode 100644 index 0000000..5a8a759 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/package.js @@ -0,0 +1,72 @@ +'use strict'; + +module.exports = exports = _package; + +exports.usage = 'Packs binary (and enclosing directory) into locally staged tarball'; + +const fs = require('fs'); +const path = require('path'); +const log = require('./util/log.js'); +const versioning = require('./util/versioning.js'); +const napi = require('./util/napi.js'); +const existsAsync = fs.exists || path.exists; +const tar = require('tar'); + +function readdirSync(dir) { + let list = []; + const files = fs.readdirSync(dir); + + files.forEach((file) => { + const stats = fs.lstatSync(path.join(dir, file)); + if (stats.isDirectory()) { + list = list.concat(readdirSync(path.join(dir, file))); + } else { + list.push(path.join(dir, file)); + } + }); + return list; +} + +function _package(gyp, argv, callback) { + const package_json = gyp.package_json; + const napi_build_version = napi.get_napi_build_version_from_command_args(argv); + const opts = versioning.evaluate(package_json, gyp.opts, napi_build_version); + const from = opts.module_path; + const binary_module = path.join(from, opts.module_name + '.node'); + existsAsync(binary_module, (found) => { + if (!found) { + return callback(new Error('Cannot package because ' + binary_module + ' missing: run `node-pre-gyp rebuild` first')); + } + const tarball = opts.staged_tarball; + const filter_func = function(entry) { + const basename = path.basename(entry); + if (basename.length && basename[0] !== '.') { + console.log('packing ' + entry); + return true; + } else { + console.log('skipping ' + entry); + } + return false; + }; + fs.promises.mkdir(path.dirname(tarball), { recursive: true }).then(() => { + let files = readdirSync(from); + const base = path.basename(from); + files = files.map((file) => { + return path.join(base, path.relative(from, file)); + }); + tar.create({ + portable: false, + gzip: true, + filter: filter_func, + file: tarball, + cwd: path.dirname(from) + }, files, (err2) => { + if (err2) console.error('[' + package_json.name + '] ' + err2.message); + else log.info('package', 'Binary staged at "' + tarball + '"'); + return callback(err2); + }); + }).catch((err) => { + return callback(err); + }); + }); +} diff --git a/node_modules/@mapbox/node-pre-gyp/lib/pre-binding.js b/node_modules/@mapbox/node-pre-gyp/lib/pre-binding.js new file mode 100644 index 0000000..e110fe3 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/pre-binding.js @@ -0,0 +1,34 @@ +'use strict'; + +const npg = require('..'); +const versioning = require('../lib/util/versioning.js'); +const napi = require('../lib/util/napi.js'); +const existsSync = require('fs').existsSync || require('path').existsSync; +const path = require('path'); + +module.exports = exports; + +exports.usage = 'Finds the require path for the node-pre-gyp installed module'; + +exports.validate = function(package_json, opts) { + versioning.validate_config(package_json, opts); +}; + +exports.find = function(package_json_path, opts) { + if (!existsSync(package_json_path)) { + throw new Error(package_json_path + 'does not exist'); + } + const prog = new npg.Run({ package_json_path, argv: process.argv }); + prog.setBinaryHostProperty(); + const package_json = prog.package_json; + + versioning.validate_config(package_json, opts); + let napi_build_version; + if (napi.get_napi_build_versions(package_json, opts)) { + napi_build_version = napi.get_best_napi_build_version(package_json, opts); + } + opts = opts || {}; + if (!opts.module_root) opts.module_root = path.dirname(package_json_path); + const meta = versioning.evaluate(package_json, opts, napi_build_version); + return meta.module; +}; diff --git a/node_modules/@mapbox/node-pre-gyp/lib/publish.js b/node_modules/@mapbox/node-pre-gyp/lib/publish.js new file mode 100644 index 0000000..3b2e08c --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/publish.js @@ -0,0 +1,80 @@ +'use strict'; + +module.exports = exports = publish; + +exports.usage = 'Publishes pre-built binary (requires aws-sdk)'; + +const fs = require('fs'); +const path = require('path'); +const log = require('./util/log.js'); +const versioning = require('./util/versioning.js'); +const napi = require('./util/napi.js'); +const s3_setup = require('./util/s3_setup.js'); +const existsAsync = fs.exists || path.exists; +const url = require('url'); + +function publish(gyp, argv, callback) { + const package_json = gyp.package_json; + const napi_build_version = napi.get_napi_build_version_from_command_args(argv); + const opts = versioning.evaluate(package_json, gyp.opts, napi_build_version); + const tarball = opts.staged_tarball; + existsAsync(tarball, (found) => { + if (!found) { + return callback(new Error('Cannot publish because ' + tarball + ' missing: run `node-pre-gyp package` first')); + } + + log.info('publish', 'Detecting s3 credentials'); + const config = s3_setup.detect(opts); + const s3 = s3_setup.get_s3(config); + + const key_name = url.resolve(config.prefix, opts.package_name); + const s3_opts = { + Bucket: config.bucket, + Key: key_name + }; + log.info('publish', 'Authenticating with s3'); + log.info('publish', config); + + log.info('publish', 'Checking for existing binary at ' + opts.hosted_path); + s3.headObject(s3_opts, (err, meta) => { + if (meta) log.info('publish', JSON.stringify(meta)); + if (err && err.code === 'NotFound') { + // we are safe to publish because + // the object does not already exist + log.info('publish', 'Preparing to put object'); + const s3_put_opts = { + ACL: 'public-read', + Body: fs.createReadStream(tarball), + Key: key_name, + Bucket: config.bucket + }; + log.info('publish', 'Putting object', s3_put_opts.ACL, s3_put_opts.Bucket, s3_put_opts.Key); + try { + s3.putObject(s3_put_opts, (err2, resp) => { + log.info('publish', 'returned from putting object'); + if (err2) { + log.info('publish', 's3 putObject error: "' + err2 + '"'); + return callback(err2); + } + if (resp) log.info('publish', 's3 putObject response: "' + JSON.stringify(resp) + '"'); + log.info('publish', 'successfully put object'); + console.log('[' + package_json.name + '] Success: published to ' + opts.hosted_path); + return callback(); + }); + } catch (err3) { + log.info('publish', 's3 putObject error: "' + err3 + '"'); + return callback(err3); + } + } else if (err) { + log.info('publish', 's3 headObject error: "' + err + '"'); + return callback(err); + } else { + log.error('publish', 'Cannot publish over existing version'); + log.error('publish', "Update the 'version' field in package.json and try again"); + log.error('publish', 'If the previous version was published in error see:'); + log.error('publish', '\t node-pre-gyp unpublish'); + return callback(new Error('Failed publishing to ' + opts.hosted_path)); + } + }); + }); +} diff --git a/node_modules/@mapbox/node-pre-gyp/lib/rebuild.js b/node_modules/@mapbox/node-pre-gyp/lib/rebuild.js new file mode 100644 index 0000000..31510fb --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/rebuild.js @@ -0,0 +1,20 @@ +'use strict'; + +module.exports = exports = rebuild; + +exports.usage = 'Runs "clean" and "build" at once'; + +const napi = require('./util/napi.js'); + +function rebuild(gyp, argv, callback) { + const package_json = gyp.package_json; + let commands = [ + { name: 'clean', args: [] }, + { name: 'build', args: ['rebuild'] } + ]; + commands = napi.expand_commands(package_json, gyp.opts, commands); + for (let i = commands.length; i !== 0; i--) { + gyp.todo.unshift(commands[i - 1]); + } + process.nextTick(callback); +} diff --git a/node_modules/@mapbox/node-pre-gyp/lib/reinstall.js b/node_modules/@mapbox/node-pre-gyp/lib/reinstall.js new file mode 100644 index 0000000..a29b5c9 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/reinstall.js @@ -0,0 +1,19 @@ +'use strict'; + +module.exports = exports = rebuild; + +exports.usage = 'Runs "clean" and "install" at once'; + +const napi = require('./util/napi.js'); + +function rebuild(gyp, argv, callback) { + const package_json = gyp.package_json; + let installArgs = []; + const napi_build_version = napi.get_best_napi_build_version(package_json, gyp.opts); + if (napi_build_version != null) installArgs = [napi.get_command_arg(napi_build_version)]; + gyp.todo.unshift( + { name: 'clean', args: [] }, + { name: 'install', args: installArgs } + ); + process.nextTick(callback); +} diff --git a/node_modules/@mapbox/node-pre-gyp/lib/reveal.js b/node_modules/@mapbox/node-pre-gyp/lib/reveal.js new file mode 100644 index 0000000..7255e5f --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/reveal.js @@ -0,0 +1,32 @@ +'use strict'; + +module.exports = exports = reveal; + +exports.usage = 'Reveals data on the versioned binary'; + +const versioning = require('./util/versioning.js'); +const napi = require('./util/napi.js'); + +function unix_paths(key, val) { + return val && val.replace ? val.replace(/\\/g, '/') : val; +} + +function reveal(gyp, argv, callback) { + const package_json = gyp.package_json; + const napi_build_version = napi.get_napi_build_version_from_command_args(argv); + const opts = versioning.evaluate(package_json, gyp.opts, napi_build_version); + let hit = false; + // if a second arg is passed look to see + // if it is a known option + // console.log(JSON.stringify(gyp.opts,null,1)) + const remain = gyp.opts.argv.remain[gyp.opts.argv.remain.length - 1]; + if (remain && Object.hasOwnProperty.call(opts, remain)) { + console.log(opts[remain].replace(/\\/g, '/')); + hit = true; + } + // otherwise return all options as json + if (!hit) { + console.log(JSON.stringify(opts, unix_paths, 2)); + } + return callback(); +} diff --git a/node_modules/@mapbox/node-pre-gyp/lib/testbinary.js b/node_modules/@mapbox/node-pre-gyp/lib/testbinary.js new file mode 100644 index 0000000..bc4883d --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/testbinary.js @@ -0,0 +1,79 @@ +'use strict'; + +module.exports = exports = testbinary; + +exports.usage = 'Tests that the binary.node can be required'; + +const path = require('path'); +const log = require('./util/log.js'); +const cp = require('child_process'); +const versioning = require('./util/versioning.js'); +const napi = require('./util/napi.js'); + +function testbinary(gyp, argv, callback) { + const args = []; + const options = {}; + let shell_cmd = process.execPath; + const package_json = gyp.package_json; + const napi_build_version = napi.get_napi_build_version_from_command_args(argv); + const opts = versioning.evaluate(package_json, gyp.opts, napi_build_version); + // skip validation for runtimes we don't explicitly support (like electron) + if (opts.runtime && + opts.runtime !== 'node-webkit' && + opts.runtime !== 'node') { + return callback(); + } + const nw = (opts.runtime && opts.runtime === 'node-webkit'); + // ensure on windows that / are used for require path + const binary_module = opts.module.replace(/\\/g, '/'); + if ((process.arch !== opts.target_arch) || + (process.platform !== opts.target_platform)) { + let msg = 'skipping validation since host platform/arch ('; + msg += process.platform + '/' + process.arch + ')'; + msg += ' does not match target ('; + msg += opts.target_platform + '/' + opts.target_arch + ')'; + log.info('validate', msg); + return callback(); + } + if (nw) { + options.timeout = 5000; + if (process.platform === 'darwin') { + shell_cmd = 'node-webkit'; + } else if (process.platform === 'win32') { + shell_cmd = 'nw.exe'; + } else { + shell_cmd = 'nw'; + } + const modulePath = path.resolve(binary_module); + const appDir = path.join(__dirname, 'util', 'nw-pre-gyp'); + args.push(appDir); + args.push(modulePath); + log.info('validate', "Running test command: '" + shell_cmd + ' ' + args.join(' ') + "'"); + cp.execFile(shell_cmd, args, options, (err, stdout, stderr) => { + // check for normal timeout for node-webkit + if (err) { + if (err.killed === true && err.signal && err.signal.indexOf('SIG') > -1) { + return callback(); + } + const stderrLog = stderr.toString(); + log.info('stderr', stderrLog); + if (/^\s*Xlib:\s*extension\s*"RANDR"\s*missing\s*on\s*display\s*":\d+\.\d+"\.\s*$/.test(stderrLog)) { + log.info('RANDR', 'stderr contains only RANDR error, ignored'); + return callback(); + } + return callback(err); + } + return callback(); + }); + return; + } + args.push('--eval'); + args.push("require('" + binary_module.replace(/'/g, '\'') + "')"); + log.info('validate', "Running test command: '" + shell_cmd + ' ' + args.join(' ') + "'"); + cp.execFile(shell_cmd, args, options, (err, stdout, stderr) => { + if (err) { + return callback(err, { stdout: stdout, stderr: stderr }); + } + return callback(); + }); +} diff --git a/node_modules/@mapbox/node-pre-gyp/lib/testpackage.js b/node_modules/@mapbox/node-pre-gyp/lib/testpackage.js new file mode 100644 index 0000000..e6be5bb --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/testpackage.js @@ -0,0 +1,52 @@ +'use strict'; + +module.exports = exports = testpackage; + +exports.usage = 'Tests that the staged package is valid'; + +const fs = require('fs'); +const path = require('path'); +const log = require('./util/log.js'); +const existsAsync = fs.exists || path.exists; +const versioning = require('./util/versioning.js'); +const napi = require('./util/napi.js'); +const testbinary = require('./testbinary.js'); +const tar = require('tar'); + +function testpackage(gyp, argv, callback) { + const package_json = gyp.package_json; + const napi_build_version = napi.get_napi_build_version_from_command_args(argv); + const opts = versioning.evaluate(package_json, gyp.opts, napi_build_version); + const tarball = opts.staged_tarball; + existsAsync(tarball, (found) => { + if (!found) { + return callback(new Error('Cannot test package because ' + tarball + ' missing: run `node-pre-gyp package` first')); + } + const to = opts.module_path; + function filter_func(entry) { + log.info('install', 'unpacking [' + entry.path + ']'); + } + + fs.promises.mkdir(to, { recursive: true }).then(() => { + tar.extract({ + file: tarball, + cwd: to, + strip: 1, + onentry: filter_func + }).then(after_extract, callback); + }).catch((err) => { + return callback(err); + }); + + function after_extract() { + testbinary(gyp, argv, (err) => { + if (err) { + return callback(err); + } else { + console.log('[' + package_json.name + '] Package appears valid'); + return callback(); + } + }); + } + }); +} diff --git a/node_modules/@mapbox/node-pre-gyp/lib/unpublish.js b/node_modules/@mapbox/node-pre-gyp/lib/unpublish.js new file mode 100644 index 0000000..b8e1b55 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/unpublish.js @@ -0,0 +1,40 @@ +'use strict'; + +module.exports = exports = unpublish; + +exports.usage = 'Unpublishes pre-built binary (requires aws-sdk)'; + +const log = require('./util/log.js'); +const versioning = require('./util/versioning.js'); +const napi = require('./util/napi.js'); +const s3_setup = require('./util/s3_setup.js'); +const url = require('url'); + +function unpublish(gyp, argv, callback) { + const package_json = gyp.package_json; + const napi_build_version = napi.get_napi_build_version_from_command_args(argv); + const opts = versioning.evaluate(package_json, gyp.opts, napi_build_version); + const config = s3_setup.detect(opts); + const s3 = s3_setup.get_s3(config); + const key_name = url.resolve(config.prefix, opts.package_name); + const s3_opts = { + Bucket: config.bucket, + Key: key_name + }; + s3.headObject(s3_opts, (err, meta) => { + if (err && err.code === 'NotFound') { + console.log('[' + package_json.name + '] Not found: ' + opts.hosted_tarball); + return callback(); + } else if (err) { + return callback(err); + } else { + log.info('unpublish', JSON.stringify(meta)); + s3.deleteObject(s3_opts, (err2, resp) => { + if (err2) return callback(err2); + log.info(JSON.stringify(resp)); + console.log('[' + package_json.name + '] Success: removed ' + opts.hosted_tarball); + return callback(); + }); + } + }); +} diff --git a/node_modules/@mapbox/node-pre-gyp/lib/util/abi_crosswalk.json b/node_modules/@mapbox/node-pre-gyp/lib/util/abi_crosswalk.json new file mode 100644 index 0000000..e2d26ae --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/util/abi_crosswalk.json @@ -0,0 +1,3254 @@ +{ + "0.1.14": { + "node_abi": null, + "v8": "1.3" + }, + "0.1.15": { + "node_abi": null, + "v8": "1.3" + }, + "0.1.16": { + "node_abi": null, + "v8": "1.3" + }, + "0.1.17": { + "node_abi": null, + "v8": "1.3" + }, + "0.1.18": { + "node_abi": null, + "v8": "1.3" + }, + "0.1.19": { + "node_abi": null, + "v8": "2.0" + }, + "0.1.20": { + "node_abi": null, + "v8": "2.0" + }, + "0.1.21": { + "node_abi": null, + "v8": "2.0" + }, + "0.1.22": { + "node_abi": null, + "v8": "2.0" + }, + "0.1.23": { + "node_abi": null, + "v8": "2.0" + }, + "0.1.24": { + "node_abi": null, + "v8": "2.0" + }, + "0.1.25": { + "node_abi": null, + "v8": "2.0" + }, + "0.1.26": { + "node_abi": null, + "v8": "2.0" + }, + "0.1.27": { + "node_abi": null, + "v8": "2.1" + }, + "0.1.28": { + "node_abi": null, + "v8": "2.1" + }, + "0.1.29": { + "node_abi": null, + "v8": "2.1" + }, + "0.1.30": { + "node_abi": null, + "v8": "2.1" + }, + "0.1.31": { + "node_abi": null, + "v8": "2.1" + }, + "0.1.32": { + "node_abi": null, + "v8": "2.1" + }, + "0.1.33": { + "node_abi": null, + "v8": "2.1" + }, + "0.1.90": { + "node_abi": null, + "v8": "2.2" + }, + "0.1.91": { + "node_abi": null, + "v8": "2.2" + }, + "0.1.92": { + "node_abi": null, + "v8": "2.2" + }, + "0.1.93": { + "node_abi": null, + "v8": "2.2" + }, + "0.1.94": { + "node_abi": null, + "v8": "2.2" + }, + "0.1.95": { + "node_abi": null, + "v8": "2.2" + }, + "0.1.96": { + "node_abi": null, + "v8": "2.2" + }, + "0.1.97": { + "node_abi": null, + "v8": "2.2" + }, + "0.1.98": { + "node_abi": null, + "v8": "2.2" + }, + "0.1.99": { + "node_abi": null, + "v8": "2.2" + }, + "0.1.100": { + "node_abi": null, + "v8": "2.2" + }, + "0.1.101": { + "node_abi": null, + "v8": "2.3" + }, + "0.1.102": { + "node_abi": null, + "v8": "2.3" + }, + "0.1.103": { + "node_abi": null, + "v8": "2.3" + }, + "0.1.104": { + "node_abi": null, + "v8": "2.3" + }, + "0.2.0": { + "node_abi": 1, + "v8": "2.3" + }, + "0.2.1": { + "node_abi": 1, + "v8": "2.3" + }, + "0.2.2": { + "node_abi": 1, + "v8": "2.3" + }, + "0.2.3": { + "node_abi": 1, + "v8": "2.3" + }, + "0.2.4": { + "node_abi": 1, + "v8": "2.3" + }, + "0.2.5": { + "node_abi": 1, + "v8": "2.3" + }, + "0.2.6": { + "node_abi": 1, + "v8": "2.3" + }, + "0.3.0": { + "node_abi": 1, + "v8": "2.5" + }, + "0.3.1": { + "node_abi": 1, + "v8": "2.5" + }, + "0.3.2": { + "node_abi": 1, + "v8": "3.0" + }, + "0.3.3": { + "node_abi": 1, + "v8": "3.0" + }, + "0.3.4": { + "node_abi": 1, + "v8": "3.0" + }, + "0.3.5": { + "node_abi": 1, + "v8": "3.0" + }, + "0.3.6": { + "node_abi": 1, + "v8": "3.0" + }, + "0.3.7": { + "node_abi": 1, + "v8": "3.0" + }, + "0.3.8": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.0": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.1": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.2": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.3": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.4": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.5": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.6": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.7": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.8": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.9": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.10": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.11": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.12": { + "node_abi": 1, + "v8": "3.1" + }, + "0.5.0": { + "node_abi": 1, + "v8": "3.1" + }, + "0.5.1": { + "node_abi": 1, + "v8": "3.4" + }, + "0.5.2": { + "node_abi": 1, + "v8": "3.4" + }, + "0.5.3": { + "node_abi": 1, + "v8": "3.4" + }, + "0.5.4": { + "node_abi": 1, + "v8": "3.5" + }, + "0.5.5": { + "node_abi": 1, + "v8": "3.5" + }, + "0.5.6": { + "node_abi": 1, + "v8": "3.6" + }, + "0.5.7": { + "node_abi": 1, + "v8": "3.6" + }, + "0.5.8": { + "node_abi": 1, + "v8": "3.6" + }, + "0.5.9": { + "node_abi": 1, + "v8": "3.6" + }, + "0.5.10": { + "node_abi": 1, + "v8": "3.7" + }, + "0.6.0": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.1": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.2": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.3": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.4": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.5": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.6": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.7": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.8": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.9": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.10": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.11": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.12": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.13": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.14": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.15": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.16": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.17": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.18": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.19": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.20": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.21": { + "node_abi": 1, + "v8": "3.6" + }, + "0.7.0": { + "node_abi": 1, + "v8": "3.8" + }, + "0.7.1": { + "node_abi": 1, + "v8": "3.8" + }, + "0.7.2": { + "node_abi": 1, + "v8": "3.8" + }, + "0.7.3": { + "node_abi": 1, + "v8": "3.9" + }, + "0.7.4": { + "node_abi": 1, + "v8": "3.9" + }, + "0.7.5": { + "node_abi": 1, + "v8": "3.9" + }, + "0.7.6": { + "node_abi": 1, + "v8": "3.9" + }, + "0.7.7": { + "node_abi": 1, + "v8": "3.9" + }, + "0.7.8": { + "node_abi": 1, + "v8": "3.9" + }, + "0.7.9": { + "node_abi": 1, + "v8": "3.11" + }, + "0.7.10": { + "node_abi": 1, + "v8": "3.9" + }, + "0.7.11": { + "node_abi": 1, + "v8": "3.11" + }, + "0.7.12": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.0": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.1": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.2": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.3": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.4": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.5": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.6": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.7": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.8": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.9": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.10": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.11": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.12": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.13": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.14": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.15": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.16": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.17": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.18": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.19": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.20": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.21": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.22": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.23": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.24": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.25": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.26": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.27": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.28": { + "node_abi": 1, + "v8": "3.11" + }, + "0.9.0": { + "node_abi": 1, + "v8": "3.11" + }, + "0.9.1": { + "node_abi": 10, + "v8": "3.11" + }, + "0.9.2": { + "node_abi": 10, + "v8": "3.11" + }, + "0.9.3": { + "node_abi": 10, + "v8": "3.13" + }, + "0.9.4": { + "node_abi": 10, + "v8": "3.13" + }, + "0.9.5": { + "node_abi": 10, + "v8": "3.13" + }, + "0.9.6": { + "node_abi": 10, + "v8": "3.15" + }, + "0.9.7": { + "node_abi": 10, + "v8": "3.15" + }, + "0.9.8": { + "node_abi": 10, + "v8": "3.15" + }, + "0.9.9": { + "node_abi": 11, + "v8": "3.15" + }, + "0.9.10": { + "node_abi": 11, + "v8": "3.15" + }, + "0.9.11": { + "node_abi": 11, + "v8": "3.14" + }, + "0.9.12": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.0": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.1": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.2": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.3": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.4": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.5": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.6": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.7": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.8": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.9": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.10": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.11": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.12": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.13": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.14": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.15": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.16": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.17": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.18": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.19": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.20": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.21": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.22": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.23": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.24": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.25": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.26": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.27": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.28": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.29": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.30": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.31": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.32": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.33": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.34": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.35": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.36": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.37": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.38": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.39": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.40": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.41": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.42": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.43": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.44": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.45": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.46": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.47": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.48": { + "node_abi": 11, + "v8": "3.14" + }, + "0.11.0": { + "node_abi": 12, + "v8": "3.17" + }, + "0.11.1": { + "node_abi": 12, + "v8": "3.18" + }, + "0.11.2": { + "node_abi": 12, + "v8": "3.19" + }, + "0.11.3": { + "node_abi": 12, + "v8": "3.19" + }, + "0.11.4": { + "node_abi": 12, + "v8": "3.20" + }, + "0.11.5": { + "node_abi": 12, + "v8": "3.20" + }, + "0.11.6": { + "node_abi": 12, + "v8": "3.20" + }, + "0.11.7": { + "node_abi": 12, + "v8": "3.20" + }, + "0.11.8": { + "node_abi": 13, + "v8": "3.21" + }, + "0.11.9": { + "node_abi": 13, + "v8": "3.22" + }, + "0.11.10": { + "node_abi": 13, + "v8": "3.22" + }, + "0.11.11": { + "node_abi": 14, + "v8": "3.22" + }, + "0.11.12": { + "node_abi": 14, + "v8": "3.22" + }, + "0.11.13": { + "node_abi": 14, + "v8": "3.25" + }, + "0.11.14": { + "node_abi": 14, + "v8": "3.26" + }, + "0.11.15": { + "node_abi": 14, + "v8": "3.28" + }, + "0.11.16": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.0": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.1": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.2": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.3": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.4": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.5": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.6": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.7": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.8": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.9": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.10": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.11": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.12": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.13": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.14": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.15": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.16": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.17": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.18": { + "node_abi": 14, + "v8": "3.28" + }, + "1.0.0": { + "node_abi": 42, + "v8": "3.31" + }, + "1.0.1": { + "node_abi": 42, + "v8": "3.31" + }, + "1.0.2": { + "node_abi": 42, + "v8": "3.31" + }, + "1.0.3": { + "node_abi": 42, + "v8": "4.1" + }, + "1.0.4": { + "node_abi": 42, + "v8": "4.1" + }, + "1.1.0": { + "node_abi": 43, + "v8": "4.1" + }, + "1.2.0": { + "node_abi": 43, + "v8": "4.1" + }, + "1.3.0": { + "node_abi": 43, + "v8": "4.1" + }, + "1.4.1": { + "node_abi": 43, + "v8": "4.1" + }, + "1.4.2": { + "node_abi": 43, + "v8": "4.1" + }, + "1.4.3": { + "node_abi": 43, + "v8": "4.1" + }, + "1.5.0": { + "node_abi": 43, + "v8": "4.1" + }, + "1.5.1": { + "node_abi": 43, + "v8": "4.1" + }, + "1.6.0": { + "node_abi": 43, + "v8": "4.1" + }, + "1.6.1": { + "node_abi": 43, + "v8": "4.1" + }, + "1.6.2": { + "node_abi": 43, + "v8": "4.1" + }, + "1.6.3": { + "node_abi": 43, + "v8": "4.1" + }, + "1.6.4": { + "node_abi": 43, + "v8": "4.1" + }, + "1.7.1": { + "node_abi": 43, + "v8": "4.1" + }, + "1.8.1": { + "node_abi": 43, + "v8": "4.1" + }, + "1.8.2": { + "node_abi": 43, + "v8": "4.1" + }, + "1.8.3": { + "node_abi": 43, + "v8": "4.1" + }, + "1.8.4": { + "node_abi": 43, + "v8": "4.1" + }, + "2.0.0": { + "node_abi": 44, + "v8": "4.2" + }, + "2.0.1": { + "node_abi": 44, + "v8": "4.2" + }, + "2.0.2": { + "node_abi": 44, + "v8": "4.2" + }, + "2.1.0": { + "node_abi": 44, + "v8": "4.2" + }, + "2.2.0": { + "node_abi": 44, + "v8": "4.2" + }, + "2.2.1": { + "node_abi": 44, + "v8": "4.2" + }, + "2.3.0": { + "node_abi": 44, + "v8": "4.2" + }, + "2.3.1": { + "node_abi": 44, + "v8": "4.2" + }, + "2.3.2": { + "node_abi": 44, + "v8": "4.2" + }, + "2.3.3": { + "node_abi": 44, + "v8": "4.2" + }, + "2.3.4": { + "node_abi": 44, + "v8": "4.2" + }, + "2.4.0": { + "node_abi": 44, + "v8": "4.2" + }, + "2.5.0": { + "node_abi": 44, + "v8": "4.2" + }, + "3.0.0": { + "node_abi": 45, + "v8": "4.4" + }, + "3.1.0": { + "node_abi": 45, + "v8": "4.4" + }, + "3.2.0": { + "node_abi": 45, + "v8": "4.4" + }, + "3.3.0": { + "node_abi": 45, + "v8": "4.4" + }, + "3.3.1": { + "node_abi": 45, + "v8": "4.4" + }, + "4.0.0": { + "node_abi": 46, + "v8": "4.5" + }, + "4.1.0": { + "node_abi": 46, + "v8": "4.5" + }, + "4.1.1": { + "node_abi": 46, + "v8": "4.5" + }, + "4.1.2": { + "node_abi": 46, + "v8": "4.5" + }, + "4.2.0": { + "node_abi": 46, + "v8": "4.5" + }, + "4.2.1": { + "node_abi": 46, + "v8": "4.5" + }, + "4.2.2": { + "node_abi": 46, + "v8": "4.5" + }, + "4.2.3": { + "node_abi": 46, + "v8": "4.5" + }, + "4.2.4": { + "node_abi": 46, + "v8": "4.5" + }, + "4.2.5": { + "node_abi": 46, + "v8": "4.5" + }, + "4.2.6": { + "node_abi": 46, + "v8": "4.5" + }, + "4.3.0": { + "node_abi": 46, + "v8": "4.5" + }, + "4.3.1": { + "node_abi": 46, + "v8": "4.5" + }, + "4.3.2": { + "node_abi": 46, + "v8": "4.5" + }, + "4.4.0": { + "node_abi": 46, + "v8": "4.5" + }, + "4.4.1": { + "node_abi": 46, + "v8": "4.5" + }, + "4.4.2": { + "node_abi": 46, + "v8": "4.5" + }, + "4.4.3": { + "node_abi": 46, + "v8": "4.5" + }, + "4.4.4": { + "node_abi": 46, + "v8": "4.5" + }, + "4.4.5": { + "node_abi": 46, + "v8": "4.5" + }, + "4.4.6": { + "node_abi": 46, + "v8": "4.5" + }, + "4.4.7": { + "node_abi": 46, + "v8": "4.5" + }, + "4.5.0": { + "node_abi": 46, + "v8": "4.5" + }, + "4.6.0": { + "node_abi": 46, + "v8": "4.5" + }, + "4.6.1": { + "node_abi": 46, + "v8": "4.5" + }, + "4.6.2": { + "node_abi": 46, + "v8": "4.5" + }, + "4.7.0": { + "node_abi": 46, + "v8": "4.5" + }, + "4.7.1": { + "node_abi": 46, + "v8": "4.5" + }, + "4.7.2": { + "node_abi": 46, + "v8": "4.5" + }, + "4.7.3": { + "node_abi": 46, + "v8": "4.5" + }, + "4.8.0": { + "node_abi": 46, + "v8": "4.5" + }, + "4.8.1": { + "node_abi": 46, + "v8": "4.5" + }, + "4.8.2": { + "node_abi": 46, + "v8": "4.5" + }, + "4.8.3": { + "node_abi": 46, + "v8": "4.5" + }, + "4.8.4": { + "node_abi": 46, + "v8": "4.5" + }, + "4.8.5": { + "node_abi": 46, + "v8": "4.5" + }, + "4.8.6": { + "node_abi": 46, + "v8": "4.5" + }, + "4.8.7": { + "node_abi": 46, + "v8": "4.5" + }, + "4.9.0": { + "node_abi": 46, + "v8": "4.5" + }, + "4.9.1": { + "node_abi": 46, + "v8": "4.5" + }, + "5.0.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.1.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.1.1": { + "node_abi": 47, + "v8": "4.6" + }, + "5.2.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.3.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.4.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.4.1": { + "node_abi": 47, + "v8": "4.6" + }, + "5.5.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.6.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.7.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.7.1": { + "node_abi": 47, + "v8": "4.6" + }, + "5.8.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.9.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.9.1": { + "node_abi": 47, + "v8": "4.6" + }, + "5.10.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.10.1": { + "node_abi": 47, + "v8": "4.6" + }, + "5.11.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.11.1": { + "node_abi": 47, + "v8": "4.6" + }, + "5.12.0": { + "node_abi": 47, + "v8": "4.6" + }, + "6.0.0": { + "node_abi": 48, + "v8": "5.0" + }, + "6.1.0": { + "node_abi": 48, + "v8": "5.0" + }, + "6.2.0": { + "node_abi": 48, + "v8": "5.0" + }, + "6.2.1": { + "node_abi": 48, + "v8": "5.0" + }, + "6.2.2": { + "node_abi": 48, + "v8": "5.0" + }, + "6.3.0": { + "node_abi": 48, + "v8": "5.0" + }, + "6.3.1": { + "node_abi": 48, + "v8": "5.0" + }, + "6.4.0": { + "node_abi": 48, + "v8": "5.0" + }, + "6.5.0": { + "node_abi": 48, + "v8": "5.1" + }, + "6.6.0": { + "node_abi": 48, + "v8": "5.1" + }, + "6.7.0": { + "node_abi": 48, + "v8": "5.1" + }, + "6.8.0": { + "node_abi": 48, + "v8": "5.1" + }, + "6.8.1": { + "node_abi": 48, + "v8": "5.1" + }, + "6.9.0": { + "node_abi": 48, + "v8": "5.1" + }, + "6.9.1": { + "node_abi": 48, + "v8": "5.1" + }, + "6.9.2": { + "node_abi": 48, + "v8": "5.1" + }, + "6.9.3": { + "node_abi": 48, + "v8": "5.1" + }, + "6.9.4": { + "node_abi": 48, + "v8": "5.1" + }, + "6.9.5": { + "node_abi": 48, + "v8": "5.1" + }, + "6.10.0": { + "node_abi": 48, + "v8": "5.1" + }, + "6.10.1": { + "node_abi": 48, + "v8": "5.1" + }, + "6.10.2": { + "node_abi": 48, + "v8": "5.1" + }, + "6.10.3": { + "node_abi": 48, + "v8": "5.1" + }, + "6.11.0": { + "node_abi": 48, + "v8": "5.1" + }, + "6.11.1": { + "node_abi": 48, + "v8": "5.1" + }, + "6.11.2": { + "node_abi": 48, + "v8": "5.1" + }, + "6.11.3": { + "node_abi": 48, + "v8": "5.1" + }, + "6.11.4": { + "node_abi": 48, + "v8": "5.1" + }, + "6.11.5": { + "node_abi": 48, + "v8": "5.1" + }, + "6.12.0": { + "node_abi": 48, + "v8": "5.1" + }, + "6.12.1": { + "node_abi": 48, + "v8": "5.1" + }, + "6.12.2": { + "node_abi": 48, + "v8": "5.1" + }, + "6.12.3": { + "node_abi": 48, + "v8": "5.1" + }, + "6.13.0": { + "node_abi": 48, + "v8": "5.1" + }, + "6.13.1": { + "node_abi": 48, + "v8": "5.1" + }, + "6.14.0": { + "node_abi": 48, + "v8": "5.1" + }, + "6.14.1": { + "node_abi": 48, + "v8": "5.1" + }, + "6.14.2": { + "node_abi": 48, + "v8": "5.1" + }, + "6.14.3": { + "node_abi": 48, + "v8": "5.1" + }, + "6.14.4": { + "node_abi": 48, + "v8": "5.1" + }, + "6.15.0": { + "node_abi": 48, + "v8": "5.1" + }, + "6.15.1": { + "node_abi": 48, + "v8": "5.1" + }, + "6.16.0": { + "node_abi": 48, + "v8": "5.1" + }, + "6.17.0": { + "node_abi": 48, + "v8": "5.1" + }, + "6.17.1": { + "node_abi": 48, + "v8": "5.1" + }, + "7.0.0": { + "node_abi": 51, + "v8": "5.4" + }, + "7.1.0": { + "node_abi": 51, + "v8": "5.4" + }, + "7.2.0": { + "node_abi": 51, + "v8": "5.4" + }, + "7.2.1": { + "node_abi": 51, + "v8": "5.4" + }, + "7.3.0": { + "node_abi": 51, + "v8": "5.4" + }, + "7.4.0": { + "node_abi": 51, + "v8": "5.4" + }, + "7.5.0": { + "node_abi": 51, + "v8": "5.4" + }, + "7.6.0": { + "node_abi": 51, + "v8": "5.5" + }, + "7.7.0": { + "node_abi": 51, + "v8": "5.5" + }, + "7.7.1": { + "node_abi": 51, + "v8": "5.5" + }, + "7.7.2": { + "node_abi": 51, + "v8": "5.5" + }, + "7.7.3": { + "node_abi": 51, + "v8": "5.5" + }, + "7.7.4": { + "node_abi": 51, + "v8": "5.5" + }, + "7.8.0": { + "node_abi": 51, + "v8": "5.5" + }, + "7.9.0": { + "node_abi": 51, + "v8": "5.5" + }, + "7.10.0": { + "node_abi": 51, + "v8": "5.5" + }, + "7.10.1": { + "node_abi": 51, + "v8": "5.5" + }, + "8.0.0": { + "node_abi": 57, + "v8": "5.8" + }, + "8.1.0": { + "node_abi": 57, + "v8": "5.8" + }, + "8.1.1": { + "node_abi": 57, + "v8": "5.8" + }, + "8.1.2": { + "node_abi": 57, + "v8": "5.8" + }, + "8.1.3": { + "node_abi": 57, + "v8": "5.8" + }, + "8.1.4": { + "node_abi": 57, + "v8": "5.8" + }, + "8.2.0": { + "node_abi": 57, + "v8": "5.8" + }, + "8.2.1": { + "node_abi": 57, + "v8": "5.8" + }, + "8.3.0": { + "node_abi": 57, + "v8": "6.0" + }, + "8.4.0": { + "node_abi": 57, + "v8": "6.0" + }, + "8.5.0": { + "node_abi": 57, + "v8": "6.0" + }, + "8.6.0": { + "node_abi": 57, + "v8": "6.0" + }, + "8.7.0": { + "node_abi": 57, + "v8": "6.1" + }, + "8.8.0": { + "node_abi": 57, + "v8": "6.1" + }, + "8.8.1": { + "node_abi": 57, + "v8": "6.1" + }, + "8.9.0": { + "node_abi": 57, + "v8": "6.1" + }, + "8.9.1": { + "node_abi": 57, + "v8": "6.1" + }, + "8.9.2": { + "node_abi": 57, + "v8": "6.1" + }, + "8.9.3": { + "node_abi": 57, + "v8": "6.1" + }, + "8.9.4": { + "node_abi": 57, + "v8": "6.1" + }, + "8.10.0": { + "node_abi": 57, + "v8": "6.2" + }, + "8.11.0": { + "node_abi": 57, + "v8": "6.2" + }, + "8.11.1": { + "node_abi": 57, + "v8": "6.2" + }, + "8.11.2": { + "node_abi": 57, + "v8": "6.2" + }, + "8.11.3": { + "node_abi": 57, + "v8": "6.2" + }, + "8.11.4": { + "node_abi": 57, + "v8": "6.2" + }, + "8.12.0": { + "node_abi": 57, + "v8": "6.2" + }, + "8.13.0": { + "node_abi": 57, + "v8": "6.2" + }, + "8.14.0": { + "node_abi": 57, + "v8": "6.2" + }, + "8.14.1": { + "node_abi": 57, + "v8": "6.2" + }, + "8.15.0": { + "node_abi": 57, + "v8": "6.2" + }, + "8.15.1": { + "node_abi": 57, + "v8": "6.2" + }, + "8.16.0": { + "node_abi": 57, + "v8": "6.2" + }, + "8.16.1": { + "node_abi": 57, + "v8": "6.2" + }, + "8.16.2": { + "node_abi": 57, + "v8": "6.2" + }, + "8.17.0": { + "node_abi": 57, + "v8": "6.2" + }, + "9.0.0": { + "node_abi": 59, + "v8": "6.2" + }, + "9.1.0": { + "node_abi": 59, + "v8": "6.2" + }, + "9.2.0": { + "node_abi": 59, + "v8": "6.2" + }, + "9.2.1": { + "node_abi": 59, + "v8": "6.2" + }, + "9.3.0": { + "node_abi": 59, + "v8": "6.2" + }, + "9.4.0": { + "node_abi": 59, + "v8": "6.2" + }, + "9.5.0": { + "node_abi": 59, + "v8": "6.2" + }, + "9.6.0": { + "node_abi": 59, + "v8": "6.2" + }, + "9.6.1": { + "node_abi": 59, + "v8": "6.2" + }, + "9.7.0": { + "node_abi": 59, + "v8": "6.2" + }, + "9.7.1": { + "node_abi": 59, + "v8": "6.2" + }, + "9.8.0": { + "node_abi": 59, + "v8": "6.2" + }, + "9.9.0": { + "node_abi": 59, + "v8": "6.2" + }, + "9.10.0": { + "node_abi": 59, + "v8": "6.2" + }, + "9.10.1": { + "node_abi": 59, + "v8": "6.2" + }, + "9.11.0": { + "node_abi": 59, + "v8": "6.2" + }, + "9.11.1": { + "node_abi": 59, + "v8": "6.2" + }, + "9.11.2": { + "node_abi": 59, + "v8": "6.2" + }, + "10.0.0": { + "node_abi": 64, + "v8": "6.6" + }, + "10.1.0": { + "node_abi": 64, + "v8": "6.6" + }, + "10.2.0": { + "node_abi": 64, + "v8": "6.6" + }, + "10.2.1": { + "node_abi": 64, + "v8": "6.6" + }, + "10.3.0": { + "node_abi": 64, + "v8": "6.6" + }, + "10.4.0": { + "node_abi": 64, + "v8": "6.7" + }, + "10.4.1": { + "node_abi": 64, + "v8": "6.7" + }, + "10.5.0": { + "node_abi": 64, + "v8": "6.7" + }, + "10.6.0": { + "node_abi": 64, + "v8": "6.7" + }, + "10.7.0": { + "node_abi": 64, + "v8": "6.7" + }, + "10.8.0": { + "node_abi": 64, + "v8": "6.7" + }, + "10.9.0": { + "node_abi": 64, + "v8": "6.8" + }, + "10.10.0": { + "node_abi": 64, + "v8": "6.8" + }, + "10.11.0": { + "node_abi": 64, + "v8": "6.8" + }, + "10.12.0": { + "node_abi": 64, + "v8": "6.8" + }, + "10.13.0": { + "node_abi": 64, + "v8": "6.8" + }, + "10.14.0": { + "node_abi": 64, + "v8": "6.8" + }, + "10.14.1": { + "node_abi": 64, + "v8": "6.8" + }, + "10.14.2": { + "node_abi": 64, + "v8": "6.8" + }, + "10.15.0": { + "node_abi": 64, + "v8": "6.8" + }, + "10.15.1": { + "node_abi": 64, + "v8": "6.8" + }, + "10.15.2": { + "node_abi": 64, + "v8": "6.8" + }, + "10.15.3": { + "node_abi": 64, + "v8": "6.8" + }, + "10.16.0": { + "node_abi": 64, + "v8": "6.8" + }, + "10.16.1": { + "node_abi": 64, + "v8": "6.8" + }, + "10.16.2": { + "node_abi": 64, + "v8": "6.8" + }, + "10.16.3": { + "node_abi": 64, + "v8": "6.8" + }, + "10.17.0": { + "node_abi": 64, + "v8": "6.8" + }, + "10.18.0": { + "node_abi": 64, + "v8": "6.8" + }, + "10.18.1": { + "node_abi": 64, + "v8": "6.8" + }, + "10.19.0": { + "node_abi": 64, + "v8": "6.8" + }, + "10.20.0": { + "node_abi": 64, + "v8": "6.8" + }, + "10.20.1": { + "node_abi": 64, + "v8": "6.8" + }, + "10.21.0": { + "node_abi": 64, + "v8": "6.8" + }, + "10.22.0": { + "node_abi": 64, + "v8": "6.8" + }, + "10.22.1": { + "node_abi": 64, + "v8": "6.8" + }, + "10.23.0": { + "node_abi": 64, + "v8": "6.8" + }, + "10.23.1": { + "node_abi": 64, + "v8": "6.8" + }, + "10.23.2": { + "node_abi": 64, + "v8": "6.8" + }, + "10.23.3": { + "node_abi": 64, + "v8": "6.8" + }, + "10.24.0": { + "node_abi": 64, + "v8": "6.8" + }, + "10.24.1": { + "node_abi": 64, + "v8": "6.8" + }, + "11.0.0": { + "node_abi": 67, + "v8": "7.0" + }, + "11.1.0": { + "node_abi": 67, + "v8": "7.0" + }, + "11.2.0": { + "node_abi": 67, + "v8": "7.0" + }, + "11.3.0": { + "node_abi": 67, + "v8": "7.0" + }, + "11.4.0": { + "node_abi": 67, + "v8": "7.0" + }, + "11.5.0": { + "node_abi": 67, + "v8": "7.0" + }, + "11.6.0": { + "node_abi": 67, + "v8": "7.0" + }, + "11.7.0": { + "node_abi": 67, + "v8": "7.0" + }, + "11.8.0": { + "node_abi": 67, + "v8": "7.0" + }, + "11.9.0": { + "node_abi": 67, + "v8": "7.0" + }, + "11.10.0": { + "node_abi": 67, + "v8": "7.0" + }, + "11.10.1": { + "node_abi": 67, + "v8": "7.0" + }, + "11.11.0": { + "node_abi": 67, + "v8": "7.0" + }, + "11.12.0": { + "node_abi": 67, + "v8": "7.0" + }, + "11.13.0": { + "node_abi": 67, + "v8": "7.0" + }, + "11.14.0": { + "node_abi": 67, + "v8": "7.0" + }, + "11.15.0": { + "node_abi": 67, + "v8": "7.0" + }, + "12.0.0": { + "node_abi": 72, + "v8": "7.4" + }, + "12.1.0": { + "node_abi": 72, + "v8": "7.4" + }, + "12.2.0": { + "node_abi": 72, + "v8": "7.4" + }, + "12.3.0": { + "node_abi": 72, + "v8": "7.4" + }, + "12.3.1": { + "node_abi": 72, + "v8": "7.4" + }, + "12.4.0": { + "node_abi": 72, + "v8": "7.4" + }, + "12.5.0": { + "node_abi": 72, + "v8": "7.5" + }, + "12.6.0": { + "node_abi": 72, + "v8": "7.5" + }, + "12.7.0": { + "node_abi": 72, + "v8": "7.5" + }, + "12.8.0": { + "node_abi": 72, + "v8": "7.5" + }, + "12.8.1": { + "node_abi": 72, + "v8": "7.5" + }, + "12.9.0": { + "node_abi": 72, + "v8": "7.6" + }, + "12.9.1": { + "node_abi": 72, + "v8": "7.6" + }, + "12.10.0": { + "node_abi": 72, + "v8": "7.6" + }, + "12.11.0": { + "node_abi": 72, + "v8": "7.7" + }, + "12.11.1": { + "node_abi": 72, + "v8": "7.7" + }, + "12.12.0": { + "node_abi": 72, + "v8": "7.7" + }, + "12.13.0": { + "node_abi": 72, + "v8": "7.7" + }, + "12.13.1": { + "node_abi": 72, + "v8": "7.7" + }, + "12.14.0": { + "node_abi": 72, + "v8": "7.7" + }, + "12.14.1": { + "node_abi": 72, + "v8": "7.7" + }, + "12.15.0": { + "node_abi": 72, + "v8": "7.7" + }, + "12.16.0": { + "node_abi": 72, + "v8": "7.8" + }, + "12.16.1": { + "node_abi": 72, + "v8": "7.8" + }, + "12.16.2": { + "node_abi": 72, + "v8": "7.8" + }, + "12.16.3": { + "node_abi": 72, + "v8": "7.8" + }, + "12.17.0": { + "node_abi": 72, + "v8": "7.8" + }, + "12.18.0": { + "node_abi": 72, + "v8": "7.8" + }, + "12.18.1": { + "node_abi": 72, + "v8": "7.8" + }, + "12.18.2": { + "node_abi": 72, + "v8": "7.8" + }, + "12.18.3": { + "node_abi": 72, + "v8": "7.8" + }, + "12.18.4": { + "node_abi": 72, + "v8": "7.8" + }, + "12.19.0": { + "node_abi": 72, + "v8": "7.8" + }, + "12.19.1": { + "node_abi": 72, + "v8": "7.8" + }, + "12.20.0": { + "node_abi": 72, + "v8": "7.8" + }, + "12.20.1": { + "node_abi": 72, + "v8": "7.8" + }, + "12.20.2": { + "node_abi": 72, + "v8": "7.8" + }, + "12.21.0": { + "node_abi": 72, + "v8": "7.8" + }, + "12.22.0": { + "node_abi": 72, + "v8": "7.8" + }, + "12.22.1": { + "node_abi": 72, + "v8": "7.8" + }, + "12.22.2": { + "node_abi": 72, + "v8": "7.8" + }, + "12.22.3": { + "node_abi": 72, + "v8": "7.8" + }, + "12.22.4": { + "node_abi": 72, + "v8": "7.8" + }, + "12.22.5": { + "node_abi": 72, + "v8": "7.8" + }, + "12.22.6": { + "node_abi": 72, + "v8": "7.8" + }, + "12.22.7": { + "node_abi": 72, + "v8": "7.8" + }, + "12.22.8": { + "node_abi": 72, + "v8": "7.8" + }, + "12.22.9": { + "node_abi": 72, + "v8": "7.8" + }, + "12.22.10": { + "node_abi": 72, + "v8": "7.8" + }, + "12.22.11": { + "node_abi": 72, + "v8": "7.8" + }, + "12.22.12": { + "node_abi": 72, + "v8": "7.8" + }, + "13.0.0": { + "node_abi": 79, + "v8": "7.8" + }, + "13.0.1": { + "node_abi": 79, + "v8": "7.8" + }, + "13.1.0": { + "node_abi": 79, + "v8": "7.8" + }, + "13.2.0": { + "node_abi": 79, + "v8": "7.9" + }, + "13.3.0": { + "node_abi": 79, + "v8": "7.9" + }, + "13.4.0": { + "node_abi": 79, + "v8": "7.9" + }, + "13.5.0": { + "node_abi": 79, + "v8": "7.9" + }, + "13.6.0": { + "node_abi": 79, + "v8": "7.9" + }, + "13.7.0": { + "node_abi": 79, + "v8": "7.9" + }, + "13.8.0": { + "node_abi": 79, + "v8": "7.9" + }, + "13.9.0": { + "node_abi": 79, + "v8": "7.9" + }, + "13.10.0": { + "node_abi": 79, + "v8": "7.9" + }, + "13.10.1": { + "node_abi": 79, + "v8": "7.9" + }, + "13.11.0": { + "node_abi": 79, + "v8": "7.9" + }, + "13.12.0": { + "node_abi": 79, + "v8": "7.9" + }, + "13.13.0": { + "node_abi": 79, + "v8": "7.9" + }, + "13.14.0": { + "node_abi": 79, + "v8": "7.9" + }, + "14.0.0": { + "node_abi": 83, + "v8": "8.1" + }, + "14.1.0": { + "node_abi": 83, + "v8": "8.1" + }, + "14.2.0": { + "node_abi": 83, + "v8": "8.1" + }, + "14.3.0": { + "node_abi": 83, + "v8": "8.1" + }, + "14.4.0": { + "node_abi": 83, + "v8": "8.1" + }, + "14.5.0": { + "node_abi": 83, + "v8": "8.3" + }, + "14.6.0": { + "node_abi": 83, + "v8": "8.4" + }, + "14.7.0": { + "node_abi": 83, + "v8": "8.4" + }, + "14.8.0": { + "node_abi": 83, + "v8": "8.4" + }, + "14.9.0": { + "node_abi": 83, + "v8": "8.4" + }, + "14.10.0": { + "node_abi": 83, + "v8": "8.4" + }, + "14.10.1": { + "node_abi": 83, + "v8": "8.4" + }, + "14.11.0": { + "node_abi": 83, + "v8": "8.4" + }, + "14.12.0": { + "node_abi": 83, + "v8": "8.4" + }, + "14.13.0": { + "node_abi": 83, + "v8": "8.4" + }, + "14.13.1": { + "node_abi": 83, + "v8": "8.4" + }, + "14.14.0": { + "node_abi": 83, + "v8": "8.4" + }, + "14.15.0": { + "node_abi": 83, + "v8": "8.4" + }, + "14.15.1": { + "node_abi": 83, + "v8": "8.4" + }, + "14.15.2": { + "node_abi": 83, + "v8": "8.4" + }, + "14.15.3": { + "node_abi": 83, + "v8": "8.4" + }, + "14.15.4": { + "node_abi": 83, + "v8": "8.4" + }, + "14.15.5": { + "node_abi": 83, + "v8": "8.4" + }, + "14.16.0": { + "node_abi": 83, + "v8": "8.4" + }, + "14.16.1": { + "node_abi": 83, + "v8": "8.4" + }, + "14.17.0": { + "node_abi": 83, + "v8": "8.4" + }, + "14.17.1": { + "node_abi": 83, + "v8": "8.4" + }, + "14.17.2": { + "node_abi": 83, + "v8": "8.4" + }, + "14.17.3": { + "node_abi": 83, + "v8": "8.4" + }, + "14.17.4": { + "node_abi": 83, + "v8": "8.4" + }, + "14.17.5": { + "node_abi": 83, + "v8": "8.4" + }, + "14.17.6": { + "node_abi": 83, + "v8": "8.4" + }, + "14.18.0": { + "node_abi": 83, + "v8": "8.4" + }, + "14.18.1": { + "node_abi": 83, + "v8": "8.4" + }, + "14.18.2": { + "node_abi": 83, + "v8": "8.4" + }, + "14.18.3": { + "node_abi": 83, + "v8": "8.4" + }, + "14.19.0": { + "node_abi": 83, + "v8": "8.4" + }, + "14.19.1": { + "node_abi": 83, + "v8": "8.4" + }, + "14.19.2": { + "node_abi": 83, + "v8": "8.4" + }, + "14.19.3": { + "node_abi": 83, + "v8": "8.4" + }, + "14.20.0": { + "node_abi": 83, + "v8": "8.4" + }, + "14.20.1": { + "node_abi": 83, + "v8": "8.4" + }, + "14.21.0": { + "node_abi": 83, + "v8": "8.4" + }, + "14.21.1": { + "node_abi": 83, + "v8": "8.4" + }, + "14.21.2": { + "node_abi": 83, + "v8": "8.4" + }, + "14.21.3": { + "node_abi": 83, + "v8": "8.4" + }, + "15.0.0": { + "node_abi": 88, + "v8": "8.6" + }, + "15.0.1": { + "node_abi": 88, + "v8": "8.6" + }, + "15.1.0": { + "node_abi": 88, + "v8": "8.6" + }, + "15.2.0": { + "node_abi": 88, + "v8": "8.6" + }, + "15.2.1": { + "node_abi": 88, + "v8": "8.6" + }, + "15.3.0": { + "node_abi": 88, + "v8": "8.6" + }, + "15.4.0": { + "node_abi": 88, + "v8": "8.6" + }, + "15.5.0": { + "node_abi": 88, + "v8": "8.6" + }, + "15.5.1": { + "node_abi": 88, + "v8": "8.6" + }, + "15.6.0": { + "node_abi": 88, + "v8": "8.6" + }, + "15.7.0": { + "node_abi": 88, + "v8": "8.6" + }, + "15.8.0": { + "node_abi": 88, + "v8": "8.6" + }, + "15.9.0": { + "node_abi": 88, + "v8": "8.6" + }, + "15.10.0": { + "node_abi": 88, + "v8": "8.6" + }, + "15.11.0": { + "node_abi": 88, + "v8": "8.6" + }, + "15.12.0": { + "node_abi": 88, + "v8": "8.6" + }, + "15.13.0": { + "node_abi": 88, + "v8": "8.6" + }, + "15.14.0": { + "node_abi": 88, + "v8": "8.6" + }, + "16.0.0": { + "node_abi": 93, + "v8": "9.0" + }, + "16.1.0": { + "node_abi": 93, + "v8": "9.0" + }, + "16.2.0": { + "node_abi": 93, + "v8": "9.0" + }, + "16.3.0": { + "node_abi": 93, + "v8": "9.0" + }, + "16.4.0": { + "node_abi": 93, + "v8": "9.1" + }, + "16.4.1": { + "node_abi": 93, + "v8": "9.1" + }, + "16.4.2": { + "node_abi": 93, + "v8": "9.1" + }, + "16.5.0": { + "node_abi": 93, + "v8": "9.1" + }, + "16.6.0": { + "node_abi": 93, + "v8": "9.2" + }, + "16.6.1": { + "node_abi": 93, + "v8": "9.2" + }, + "16.6.2": { + "node_abi": 93, + "v8": "9.2" + }, + "16.7.0": { + "node_abi": 93, + "v8": "9.2" + }, + "16.8.0": { + "node_abi": 93, + "v8": "9.2" + }, + "16.9.0": { + "node_abi": 93, + "v8": "9.3" + }, + "16.9.1": { + "node_abi": 93, + "v8": "9.3" + }, + "16.10.0": { + "node_abi": 93, + "v8": "9.3" + }, + "16.11.0": { + "node_abi": 93, + "v8": "9.4" + }, + "16.11.1": { + "node_abi": 93, + "v8": "9.4" + }, + "16.12.0": { + "node_abi": 93, + "v8": "9.4" + }, + "16.13.0": { + "node_abi": 93, + "v8": "9.4" + }, + "16.13.1": { + "node_abi": 93, + "v8": "9.4" + }, + "16.13.2": { + "node_abi": 93, + "v8": "9.4" + }, + "16.14.0": { + "node_abi": 93, + "v8": "9.4" + }, + "16.14.1": { + "node_abi": 93, + "v8": "9.4" + }, + "16.14.2": { + "node_abi": 93, + "v8": "9.4" + }, + "16.15.0": { + "node_abi": 93, + "v8": "9.4" + }, + "16.15.1": { + "node_abi": 93, + "v8": "9.4" + }, + "16.16.0": { + "node_abi": 93, + "v8": "9.4" + }, + "16.17.0": { + "node_abi": 93, + "v8": "9.4" + }, + "16.17.1": { + "node_abi": 93, + "v8": "9.4" + }, + "16.18.0": { + "node_abi": 93, + "v8": "9.4" + }, + "16.18.1": { + "node_abi": 93, + "v8": "9.4" + }, + "16.19.0": { + "node_abi": 93, + "v8": "9.4" + }, + "16.19.1": { + "node_abi": 93, + "v8": "9.4" + }, + "16.20.0": { + "node_abi": 93, + "v8": "9.4" + }, + "16.20.1": { + "node_abi": 93, + "v8": "9.4" + }, + "16.20.2": { + "node_abi": 93, + "v8": "9.4" + }, + "17.0.0": { + "node_abi": 102, + "v8": "9.5" + }, + "17.0.1": { + "node_abi": 102, + "v8": "9.5" + }, + "17.1.0": { + "node_abi": 102, + "v8": "9.5" + }, + "17.2.0": { + "node_abi": 102, + "v8": "9.6" + }, + "17.3.0": { + "node_abi": 102, + "v8": "9.6" + }, + "17.3.1": { + "node_abi": 102, + "v8": "9.6" + }, + "17.4.0": { + "node_abi": 102, + "v8": "9.6" + }, + "17.5.0": { + "node_abi": 102, + "v8": "9.6" + }, + "17.6.0": { + "node_abi": 102, + "v8": "9.6" + }, + "17.7.0": { + "node_abi": 102, + "v8": "9.6" + }, + "17.7.1": { + "node_abi": 102, + "v8": "9.6" + }, + "17.7.2": { + "node_abi": 102, + "v8": "9.6" + }, + "17.8.0": { + "node_abi": 102, + "v8": "9.6" + }, + "17.9.0": { + "node_abi": 102, + "v8": "9.6" + }, + "17.9.1": { + "node_abi": 102, + "v8": "9.6" + }, + "18.0.0": { + "node_abi": 108, + "v8": "10.1" + }, + "18.1.0": { + "node_abi": 108, + "v8": "10.1" + }, + "18.2.0": { + "node_abi": 108, + "v8": "10.1" + }, + "18.3.0": { + "node_abi": 108, + "v8": "10.2" + }, + "18.4.0": { + "node_abi": 108, + "v8": "10.2" + }, + "18.5.0": { + "node_abi": 108, + "v8": "10.2" + }, + "18.6.0": { + "node_abi": 108, + "v8": "10.2" + }, + "18.7.0": { + "node_abi": 108, + "v8": "10.2" + }, + "18.8.0": { + "node_abi": 108, + "v8": "10.2" + }, + "18.9.0": { + "node_abi": 108, + "v8": "10.2" + }, + "18.9.1": { + "node_abi": 108, + "v8": "10.2" + }, + "18.10.0": { + "node_abi": 108, + "v8": "10.2" + }, + "18.11.0": { + "node_abi": 108, + "v8": "10.2" + }, + "18.12.0": { + "node_abi": 108, + "v8": "10.2" + }, + "18.12.1": { + "node_abi": 108, + "v8": "10.2" + }, + "18.13.0": { + "node_abi": 108, + "v8": "10.2" + }, + "18.14.0": { + "node_abi": 108, + "v8": "10.2" + }, + "18.14.1": { + "node_abi": 108, + "v8": "10.2" + }, + "18.14.2": { + "node_abi": 108, + "v8": "10.2" + }, + "18.15.0": { + "node_abi": 108, + "v8": "10.2" + }, + "18.16.0": { + "node_abi": 108, + "v8": "10.2" + }, + "18.16.1": { + "node_abi": 108, + "v8": "10.2" + }, + "18.17.0": { + "node_abi": 108, + "v8": "10.2" + }, + "18.17.1": { + "node_abi": 108, + "v8": "10.2" + }, + "18.18.0": { + "node_abi": 108, + "v8": "10.2" + }, + "18.18.1": { + "node_abi": 108, + "v8": "10.2" + }, + "18.18.2": { + "node_abi": 108, + "v8": "10.2" + }, + "18.19.0": { + "node_abi": 108, + "v8": "10.2" + }, + "18.19.1": { + "node_abi": 108, + "v8": "10.2" + }, + "18.20.0": { + "node_abi": 108, + "v8": "10.2" + }, + "18.20.1": { + "node_abi": 108, + "v8": "10.2" + }, + "18.20.2": { + "node_abi": 108, + "v8": "10.2" + }, + "18.20.3": { + "node_abi": 108, + "v8": "10.2" + }, + "18.20.4": { + "node_abi": 108, + "v8": "10.2" + }, + "18.20.5": { + "node_abi": 108, + "v8": "10.2" + }, + "18.20.6": { + "node_abi": 108, + "v8": "10.2" + }, + "19.0.0": { + "node_abi": 111, + "v8": "10.7" + }, + "19.0.1": { + "node_abi": 111, + "v8": "10.7" + }, + "19.1.0": { + "node_abi": 111, + "v8": "10.7" + }, + "19.2.0": { + "node_abi": 111, + "v8": "10.8" + }, + "19.3.0": { + "node_abi": 111, + "v8": "10.8" + }, + "19.4.0": { + "node_abi": 111, + "v8": "10.8" + }, + "19.5.0": { + "node_abi": 111, + "v8": "10.8" + }, + "19.6.0": { + "node_abi": 111, + "v8": "10.8" + }, + "19.6.1": { + "node_abi": 111, + "v8": "10.8" + }, + "19.7.0": { + "node_abi": 111, + "v8": "10.8" + }, + "19.8.0": { + "node_abi": 111, + "v8": "10.8" + }, + "19.8.1": { + "node_abi": 111, + "v8": "10.8" + }, + "19.9.0": { + "node_abi": 111, + "v8": "10.8" + }, + "20.0.0": { + "node_abi": 115, + "v8": "11.3" + }, + "20.1.0": { + "node_abi": 115, + "v8": "11.3" + }, + "20.2.0": { + "node_abi": 115, + "v8": "11.3" + }, + "20.3.0": { + "node_abi": 115, + "v8": "11.3" + }, + "20.3.1": { + "node_abi": 115, + "v8": "11.3" + }, + "20.4.0": { + "node_abi": 115, + "v8": "11.3" + }, + "20.5.0": { + "node_abi": 115, + "v8": "11.3" + }, + "20.5.1": { + "node_abi": 115, + "v8": "11.3" + }, + "20.6.0": { + "node_abi": 115, + "v8": "11.3" + }, + "20.6.1": { + "node_abi": 115, + "v8": "11.3" + }, + "20.7.0": { + "node_abi": 115, + "v8": "11.3" + }, + "20.8.0": { + "node_abi": 115, + "v8": "11.3" + }, + "20.8.1": { + "node_abi": 115, + "v8": "11.3" + }, + "20.9.0": { + "node_abi": 115, + "v8": "11.3" + }, + "20.10.0": { + "node_abi": 115, + "v8": "11.3" + }, + "20.11.0": { + "node_abi": 115, + "v8": "11.3" + }, + "20.11.1": { + "node_abi": 115, + "v8": "11.3" + }, + "20.12.0": { + "node_abi": 115, + "v8": "11.3" + }, + "20.12.1": { + "node_abi": 115, + "v8": "11.3" + }, + "20.12.2": { + "node_abi": 115, + "v8": "11.3" + }, + "20.13.0": { + "node_abi": 115, + "v8": "11.3" + }, + "20.13.1": { + "node_abi": 115, + "v8": "11.3" + }, + "20.14.0": { + "node_abi": 115, + "v8": "11.3" + }, + "20.15.0": { + "node_abi": 115, + "v8": "11.3" + }, + "20.15.1": { + "node_abi": 115, + "v8": "11.3" + }, + "20.16.0": { + "node_abi": 115, + "v8": "11.3" + }, + "20.17.0": { + "node_abi": 115, + "v8": "11.3" + }, + "20.18.0": { + "node_abi": 115, + "v8": "11.3" + }, + "20.18.1": { + "node_abi": 115, + "v8": "11.3" + }, + "20.18.2": { + "node_abi": 115, + "v8": "11.3" + }, + "21.0.0": { + "node_abi": 120, + "v8": "11.8" + }, + "21.1.0": { + "node_abi": 120, + "v8": "11.8" + }, + "21.2.0": { + "node_abi": 120, + "v8": "11.8" + }, + "21.3.0": { + "node_abi": 120, + "v8": "11.8" + }, + "21.4.0": { + "node_abi": 120, + "v8": "11.8" + }, + "21.5.0": { + "node_abi": 120, + "v8": "11.8" + }, + "21.6.0": { + "node_abi": 120, + "v8": "11.8" + }, + "21.6.1": { + "node_abi": 120, + "v8": "11.8" + }, + "21.6.2": { + "node_abi": 120, + "v8": "11.8" + }, + "21.7.0": { + "node_abi": 120, + "v8": "11.8" + }, + "21.7.1": { + "node_abi": 120, + "v8": "11.8" + }, + "21.7.2": { + "node_abi": 120, + "v8": "11.8" + }, + "21.7.3": { + "node_abi": 120, + "v8": "11.8" + }, + "22.0.0": { + "node_abi": 127, + "v8": "12.4" + }, + "22.1.0": { + "node_abi": 127, + "v8": "12.4" + }, + "22.2.0": { + "node_abi": 127, + "v8": "12.4" + }, + "22.3.0": { + "node_abi": 127, + "v8": "12.4" + }, + "22.4.0": { + "node_abi": 127, + "v8": "12.4" + }, + "22.4.1": { + "node_abi": 127, + "v8": "12.4" + }, + "22.5.0": { + "node_abi": 127, + "v8": "12.4" + }, + "22.5.1": { + "node_abi": 127, + "v8": "12.4" + }, + "22.6.0": { + "node_abi": 127, + "v8": "12.4" + }, + "22.7.0": { + "node_abi": 127, + "v8": "12.4" + }, + "22.8.0": { + "node_abi": 127, + "v8": "12.4" + }, + "22.9.0": { + "node_abi": 127, + "v8": "12.4" + }, + "22.10.0": { + "node_abi": 127, + "v8": "12.4" + }, + "22.11.0": { + "node_abi": 127, + "v8": "12.4" + }, + "22.12.0": { + "node_abi": 127, + "v8": "12.4" + }, + "22.13.0": { + "node_abi": 127, + "v8": "12.4" + }, + "22.13.1": { + "node_abi": 127, + "v8": "12.4" + }, + "23.0.0": { + "node_abi": 131, + "v8": "12.9" + }, + "23.1.0": { + "node_abi": 131, + "v8": "12.9" + }, + "23.2.0": { + "node_abi": 131, + "v8": "12.9" + }, + "23.3.0": { + "node_abi": 131, + "v8": "12.9" + }, + "23.4.0": { + "node_abi": 131, + "v8": "12.9" + }, + "23.5.0": { + "node_abi": 131, + "v8": "12.9" + }, + "23.6.0": { + "node_abi": 131, + "v8": "12.9" + }, + "23.6.1": { + "node_abi": 131, + "v8": "12.9" + } +} \ No newline at end of file diff --git a/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js b/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js new file mode 100644 index 0000000..c60455a --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js @@ -0,0 +1,93 @@ +'use strict'; + +module.exports = exports; + +const fs = require('fs'); +const path = require('path'); +const win = process.platform === 'win32'; +const existsSync = fs.existsSync || path.existsSync; +const cp = require('child_process'); + +// try to build up the complete path to node-gyp +/* priority: + - node-gyp on ENV:npm_config_node_gyp (https://github.com/npm/npm/pull/4887) + - node-gyp on NODE_PATH + - node-gyp inside npm on NODE_PATH (ignore on iojs) + - node-gyp inside npm beside node exe +*/ +function which_node_gyp() { + let node_gyp_bin; + if (process.env.npm_config_node_gyp) { + try { + node_gyp_bin = process.env.npm_config_node_gyp; + if (existsSync(node_gyp_bin)) { + return node_gyp_bin; + } + } catch (err) { + // do nothing + } + } + try { + const node_gyp_main = require.resolve('node-gyp'); // eslint-disable-line n/no-missing-require + node_gyp_bin = path.join(path.dirname( + path.dirname(node_gyp_main)), + 'bin/node-gyp.js'); + if (existsSync(node_gyp_bin)) { + return node_gyp_bin; + } + } catch (err) { + // do nothing + } + if (process.execPath.indexOf('iojs') === -1) { + try { + const npm_main = require.resolve('npm'); // eslint-disable-line n/no-missing-require + node_gyp_bin = path.join(path.dirname( + path.dirname(npm_main)), + 'node_modules/node-gyp/bin/node-gyp.js'); + if (existsSync(node_gyp_bin)) { + return node_gyp_bin; + } + } catch (err) { + // do nothing + } + } + const npm_base = path.join(path.dirname( + path.dirname(process.execPath)), + 'lib/node_modules/npm/'); + node_gyp_bin = path.join(npm_base, 'node_modules/node-gyp/bin/node-gyp.js'); + if (existsSync(node_gyp_bin)) { + return node_gyp_bin; + } +} + +module.exports.run_gyp = function(args, opts, callback) { + let shell_cmd = ''; + const cmd_args = []; + if (opts.runtime && opts.runtime === 'node-webkit') { + shell_cmd = 'nw-gyp'; + if (win) shell_cmd += '.cmd'; + } else { + const node_gyp_path = which_node_gyp(); + if (node_gyp_path) { + shell_cmd = process.execPath; + cmd_args.push(node_gyp_path); + } else { + shell_cmd = 'node-gyp'; + if (win) shell_cmd += '.cmd'; + } + } + const final_args = cmd_args.concat(args); + const cmd = cp.spawn(shell_cmd, final_args, { cwd: undefined, env: process.env, stdio: [0, 1, 2] }); + cmd.on('error', (err) => { + if (err) { + return callback(new Error("Failed to execute '" + shell_cmd + ' ' + final_args.join(' ') + "' (" + err + ')')); + } + callback(null, opts); + }); + cmd.on('close', (code) => { + if (code && code !== 0) { + return callback(new Error("Failed to execute '" + shell_cmd + ' ' + final_args.join(' ') + "' (" + code + ')')); + } + callback(null, opts); + }); +}; diff --git a/node_modules/@mapbox/node-pre-gyp/lib/util/handle_gyp_opts.js b/node_modules/@mapbox/node-pre-gyp/lib/util/handle_gyp_opts.js new file mode 100644 index 0000000..d702f78 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/util/handle_gyp_opts.js @@ -0,0 +1,102 @@ +'use strict'; + +module.exports = exports = handle_gyp_opts; + +const versioning = require('./versioning.js'); +const napi = require('./napi.js'); + +/* + +Here we gather node-pre-gyp generated options (from versioning) and pass them along to node-gyp. + +We massage the args and options slightly to account for differences in what commands mean between +node-pre-gyp and node-gyp (e.g. see the difference between "build" and "rebuild" below) + +Keep in mind: the values inside `argv` and `gyp.opts` below are different depending on whether +node-pre-gyp is called directory, or if it is called in a `run-script` phase of npm. + +We also try to preserve any command line options that might have been passed to npm or node-pre-gyp. +But this is fairly difficult without passing way to much through. For example `gyp.opts` contains all +the process.env and npm pushes a lot of variables into process.env which node-pre-gyp inherits. So we have +to be very selective about what we pass through. + +For example: + +`npm install --build-from-source` will give: + +argv == [ 'rebuild' ] +gyp.opts.argv == { remain: [ 'install' ], + cooked: [ 'install', '--fallback-to-build' ], + original: [ 'install', '--fallback-to-build' ] } + +`./bin/node-pre-gyp build` will give: + +argv == [] +gyp.opts.argv == { remain: [ 'build' ], + cooked: [ 'build' ], + original: [ '-C', 'test/app1', 'build' ] } + +*/ + +// select set of node-pre-gyp versioning info +// to share with node-gyp +const share_with_node_gyp = [ + 'module', + 'module_name', + 'module_path', + 'napi_version', + 'node_abi_napi', + 'napi_build_version', + 'node_napi_label' +]; + +function handle_gyp_opts(gyp, argv, callback) { + + // Collect node-pre-gyp specific variables to pass to node-gyp + const node_pre_gyp_options = []; + // generate custom node-pre-gyp versioning info + const napi_build_version = napi.get_napi_build_version_from_command_args(argv); + const opts = versioning.evaluate(gyp.package_json, gyp.opts, napi_build_version); + share_with_node_gyp.forEach((key) => { + const val = opts[key]; + if (val) { + node_pre_gyp_options.push('--' + key + '=' + val); + } else if (key === 'napi_build_version') { + node_pre_gyp_options.push('--' + key + '=0'); + } else { + if (key !== 'napi_version' && key !== 'node_abi_napi') + return callback(new Error('Option ' + key + ' required but not found by node-pre-gyp')); + } + }); + + // Collect options that follow the special -- which disables nopt parsing + const unparsed_options = []; + let double_hyphen_found = false; + gyp.opts.argv.original.forEach((opt) => { + if (double_hyphen_found) { + unparsed_options.push(opt); + } + if (opt === '--') { + double_hyphen_found = true; + } + }); + + // We try respect and pass through remaining command + // line options (like --foo=bar) to node-gyp + const cooked = gyp.opts.argv.cooked; + const node_gyp_options = []; + cooked.forEach((value) => { + if (value.length > 2 && value.slice(0, 2) === '--') { + const key = value.slice(2); + const val = cooked[cooked.indexOf(value) + 1]; + if (val && val.indexOf('--') === -1) { // handle '--foo=bar' or ['--foo','bar'] + node_gyp_options.push('--' + key + '=' + val); + } else { // pass through --foo + node_gyp_options.push(value); + } + } + }); + + const result = { 'opts': opts, 'gyp': node_gyp_options, 'pre': node_pre_gyp_options, 'unparsed': unparsed_options }; + return callback(null, result); +} diff --git a/node_modules/@mapbox/node-pre-gyp/lib/util/log.js b/node_modules/@mapbox/node-pre-gyp/lib/util/log.js new file mode 100644 index 0000000..edc7b5e --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/util/log.js @@ -0,0 +1,9 @@ +'use strict'; + +const { createConsola } = require('consola/basic'); + +// match the default behavior of npm and node-gyp where stdout is reserved for output that is expected +// to be used programmatically (usually json) +const log = createConsola({ stdout: process.stderr }); + +module.exports = exports = log; diff --git a/node_modules/@mapbox/node-pre-gyp/lib/util/napi.js b/node_modules/@mapbox/node-pre-gyp/lib/util/napi.js new file mode 100644 index 0000000..bfb3843 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/util/napi.js @@ -0,0 +1,203 @@ +'use strict'; + +const fs = require('fs'); + +module.exports = exports; + +const versionArray = process.version + .substr(1) + .replace(/-.*$/, '') + .split('.') + .map((item) => { + return +item; + }); + +const napi_multiple_commands = [ + 'build', + 'clean', + 'configure', + 'package', + 'publish', + 'reveal', + 'testbinary', + 'testpackage', + 'unpublish' +]; + +const napi_build_version_tag = 'napi_build_version='; + +module.exports.get_napi_version = function() { + // returns the non-zero numeric napi version or undefined if napi is not supported. + // correctly supporting target requires an updated cross-walk + let version = process.versions.napi; // can be undefined + if (!version) { // this code should never need to be updated + if (versionArray[0] === 9 && versionArray[1] >= 3) version = 2; // 9.3.0+ + else if (versionArray[0] === 8) version = 1; // 8.0.0+ + } + return version; +}; + +module.exports.get_napi_version_as_string = function(target) { + // returns the napi version as a string or an empty string if napi is not supported. + const version = module.exports.get_napi_version(target); + return version ? '' + version : ''; +}; + +module.exports.validate_package_json = function(package_json, opts) { // throws Error + + const binary = package_json.binary; + const module_path_ok = pathOK(binary.module_path); + const remote_path_ok = pathOK(binary.remote_path); + const package_name_ok = pathOK(binary.package_name); + const napi_build_versions = module.exports.get_napi_build_versions(package_json, opts, true); + const napi_build_versions_raw = module.exports.get_napi_build_versions_raw(package_json); + + if (napi_build_versions) { + napi_build_versions.forEach((napi_build_version)=> { + if (!(parseInt(napi_build_version, 10) === napi_build_version && napi_build_version > 0)) { + throw new Error('All values specified in napi_versions must be positive integers.'); + } + }); + } + + if (napi_build_versions && (!module_path_ok || (!remote_path_ok && !package_name_ok))) { + throw new Error('When napi_versions is specified; module_path and either remote_path or ' + + "package_name must contain the substitution string '{napi_build_version}`."); + } + + if ((module_path_ok || remote_path_ok || package_name_ok) && !napi_build_versions_raw) { + throw new Error("When the substitution string '{napi_build_version}` is specified in " + + 'module_path, remote_path, or package_name; napi_versions must also be specified.'); + } + + if (napi_build_versions && !module.exports.get_best_napi_build_version(package_json, opts) && + module.exports.build_napi_only(package_json)) { + throw new Error( + 'The Node-API version of this Node instance is ' + module.exports.get_napi_version(opts ? opts.target : undefined) + '. ' + + 'This module supports Node-API version(s) ' + module.exports.get_napi_build_versions_raw(package_json) + '. ' + + 'This Node instance cannot run this module.'); + } + + if (napi_build_versions_raw && !napi_build_versions && module.exports.build_napi_only(package_json)) { + throw new Error( + 'The Node-API version of this Node instance is ' + module.exports.get_napi_version(opts ? opts.target : undefined) + '. ' + + 'This module supports Node-API version(s) ' + module.exports.get_napi_build_versions_raw(package_json) + '. ' + + 'This Node instance cannot run this module.'); + } + +}; + +function pathOK(path) { + return path && (path.indexOf('{napi_build_version}') !== -1 || path.indexOf('{node_napi_label}') !== -1); +} + +module.exports.expand_commands = function(package_json, opts, commands) { + const expanded_commands = []; + const napi_build_versions = module.exports.get_napi_build_versions(package_json, opts); + commands.forEach((command)=> { + if (napi_build_versions && command.name === 'install') { + const napi_build_version = module.exports.get_best_napi_build_version(package_json, opts); + const args = napi_build_version ? [napi_build_version_tag + napi_build_version] : []; + expanded_commands.push({ name: command.name, args: args }); + } else if (napi_build_versions && napi_multiple_commands.indexOf(command.name) !== -1) { + napi_build_versions.forEach((napi_build_version)=> { + const args = command.args.slice(); + args.push(napi_build_version_tag + napi_build_version); + expanded_commands.push({ name: command.name, args: args }); + }); + } else { + expanded_commands.push(command); + } + }); + return expanded_commands; +}; + +module.exports.get_napi_build_versions = function(package_json, opts, warnings) { // opts may be undefined + const log = require('./log.js'); + let napi_build_versions = []; + const supported_napi_version = module.exports.get_napi_version(opts ? opts.target : undefined); + // remove duplicates, verify each napi version can actually be built + if (package_json.binary && package_json.binary.napi_versions) { + package_json.binary.napi_versions.forEach((napi_version) => { + const duplicated = napi_build_versions.indexOf(napi_version) !== -1; + if (!duplicated && supported_napi_version && napi_version <= supported_napi_version) { + napi_build_versions.push(napi_version); + } else if (warnings && !duplicated && supported_napi_version) { + log.info('This Node instance does not support builds for Node-API version', napi_version); + } + }); + } + if (opts && opts['build-latest-napi-version-only']) { + let latest_version = 0; + napi_build_versions.forEach((napi_version) => { + if (napi_version > latest_version) latest_version = napi_version; + }); + napi_build_versions = latest_version ? [latest_version] : []; + } + return napi_build_versions.length ? napi_build_versions : undefined; +}; + +module.exports.get_napi_build_versions_raw = function(package_json) { + const napi_build_versions = []; + // remove duplicates + if (package_json.binary && package_json.binary.napi_versions) { + package_json.binary.napi_versions.forEach((napi_version) => { + if (napi_build_versions.indexOf(napi_version) === -1) { + napi_build_versions.push(napi_version); + } + }); + } + return napi_build_versions.length ? napi_build_versions : undefined; +}; + +module.exports.get_command_arg = function(napi_build_version) { + return napi_build_version_tag + napi_build_version; +}; + +module.exports.get_napi_build_version_from_command_args = function(command_args) { + for (let i = 0; i < command_args.length; i++) { + const arg = command_args[i]; + if (arg.indexOf(napi_build_version_tag) === 0) { + return parseInt(arg.substr(napi_build_version_tag.length), 10); + } + } + return undefined; +}; + +module.exports.swap_build_dir_out = function(napi_build_version) { + if (napi_build_version) { + fs.rmSync(module.exports.get_build_dir(napi_build_version), { recursive: true, force: true }); + fs.renameSync('build', module.exports.get_build_dir(napi_build_version)); + } +}; + +module.exports.swap_build_dir_in = function(napi_build_version) { + if (napi_build_version) { + fs.rmSync('build', { recursive: true, force: true }); + fs.renameSync(module.exports.get_build_dir(napi_build_version), 'build'); + } +}; + +module.exports.get_build_dir = function(napi_build_version) { + return 'build-tmp-napi-v' + napi_build_version; +}; + +module.exports.get_best_napi_build_version = function(package_json, opts) { + let best_napi_build_version = 0; + const napi_build_versions = module.exports.get_napi_build_versions(package_json, opts); + if (napi_build_versions) { + const our_napi_version = module.exports.get_napi_version(opts ? opts.target : undefined); + napi_build_versions.forEach((napi_build_version)=> { + if (napi_build_version > best_napi_build_version && + napi_build_version <= our_napi_version) { + best_napi_build_version = napi_build_version; + } + }); + } + return best_napi_build_version === 0 ? undefined : best_napi_build_version; +}; + +module.exports.build_napi_only = function(package_json) { + return package_json.binary && package_json.binary.package_name && + package_json.binary.package_name.indexOf('{node_napi_label}') === -1; +}; diff --git a/node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html b/node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html new file mode 100644 index 0000000..244466c --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html @@ -0,0 +1,26 @@ + + + + +Node-webkit-based module test + + + +

Node-webkit-based module test

+ + diff --git a/node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/package.json b/node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/package.json new file mode 100644 index 0000000..71d03f8 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/package.json @@ -0,0 +1,9 @@ +{ +"main": "index.html", +"name": "nw-pre-gyp-module-test", +"description": "Node-webkit-based module test.", +"version": "0.0.1", +"window": { + "show": false +} +} diff --git a/node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js b/node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js new file mode 100644 index 0000000..52839e3 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js @@ -0,0 +1,187 @@ +'use strict'; + +module.exports = exports; + +const url = require('url'); +const fs = require('fs'); +const path = require('path'); + +module.exports.detect = function(opts) { + const config = {}; + + const to = opts.hosted_path; + const uri = url.parse(to); + + if (opts.bucket && opts.region) { + // use user defined settings for host, region, bucket + config.endpoint = opts.host; + config.bucket = opts.bucket; + config.region = opts.region; + config.s3ForcePathStyle = opts.s3ForcePathStyle; + + // if using s3ForcePathStyle the bucket is part of the http object path + // but not the S3 key prefix path. + // remove it + const bucketPath = config.s3ForcePathStyle ? `/${config.bucket}/` : '/'; + config.prefix = (!uri.pathname || uri.pathname === bucketPath) ? '' : uri.pathname.replace(bucketPath, ''); + } else { + // auto detect region and bucket from url + // only virtual-hosted–style access can be auto detected + // the uri will have the following format: + // https://bucket-name.s3.Region.amazonaws.com/key-name (dash Region) + // or in some legacy region of this format: + // https://bucket-name.s3-Region.amazonaws.com/key-name (dot Region) + const parts = uri.hostname.split('.s3'); + + // there is nothing before the .s3 + // not a valid s3 virtual host bucket url + if (parts.length === 1) { + throw new Error('Could not parse s3 bucket name from virtual host url.'); + } + + // everything before .s3 is the bucket + config.bucket = parts[0]; + + // from everything that comes after the s3 + // first char is connecting dot or dash + // everything up to the domain should be the region name + const region = parts[1].slice(1).split('.')[0]; + // if user provided url does not include region, default to us-east-1. + if (region === 'amazonaws') { + config.region = 'us-east-1'; + } else { + config.region = region; + } + + config.prefix = (!uri.pathname || uri.pathname === '/') ? '' : uri.pathname.replace('/', ''); + } + + return config; +}; + +module.exports.get_s3 = function(config) { + + if (process.env.node_pre_gyp_mock_s3) { + // here we're mocking. node_pre_gyp_mock_s3 is the scratch directory + // for the mock code. + const AWSMock = require('mock-aws-s3'); + const os = require('os'); + + AWSMock.config.basePath = `${os.tmpdir()}/mock`; + + const s3 = AWSMock.S3(); + + // wrapped callback maker. fs calls return code of ENOENT but AWS.S3 returns + // NotFound. + const wcb = (fn) => (err, ...args) => { + if (err && err.code === 'ENOENT') { + err.code = 'NotFound'; + } + return fn(err, ...args); + }; + + return { + listObjects(params, callback) { + return s3.listObjects(params, wcb(callback)); + }, + headObject(params, callback) { + return s3.headObject(params, wcb(callback)); + }, + deleteObject(params, callback) { + return s3.deleteObject(params, wcb(callback)); + }, + putObject(params, callback) { + return s3.putObject(params, wcb(callback)); + } + }; + } + + // if not mocking then setup real s3. + const AWS = require('aws-sdk'); + + AWS.config.update(config); + const s3 = new AWS.S3(); + + // need to change if additional options need to be specified. + return { + listObjects(params, callback) { + return s3.listObjects(params, callback); + }, + headObject(params, callback) { + return s3.headObject(params, callback); + }, + deleteObject(params, callback) { + return s3.deleteObject(params, callback); + }, + putObject(params, callback) { + return s3.putObject(params, callback); + } + }; + + + +}; + +// +// function to get the mocking control function. if not mocking it returns a no-op. +// +// if mocking it sets up the mock http interceptors that use the mocked s3 file system +// to fulfill responses. +module.exports.get_mockS3Http = function() { + let mock_s3 = false; + if (!process.env.node_pre_gyp_mock_s3) { + return () => mock_s3; + } + + const nock = require('nock'); + // the bucket used for testing, as addressed by https. + const host = 'https://mapbox-node-pre-gyp-public-testing-bucket.s3.us-east-1.amazonaws.com'; + const mockDir = process.env.node_pre_gyp_mock_s3 + '/mapbox-node-pre-gyp-public-testing-bucket'; + + // function to setup interceptors. they are "turned off" by setting mock_s3 to false. + const mock_http = () => { + // eslint-disable-next-line no-unused-vars + function get(uri, requestBody) { + const filepath = path.join(mockDir, uri.replace('%2B', '+')); + + try { + fs.accessSync(filepath, fs.constants.R_OK); + } catch (e) { + return [404, 'not found\n']; + } + + // the mock s3 functions just write to disk, so just read from it. + return [200, fs.createReadStream(filepath)]; + } + + // eslint-disable-next-line no-unused-vars + return nock(host) + .persist() + .get(() => mock_s3) // mock any uri for s3 when true + .reply(get); + }; + + // setup interceptors. they check the mock_s3 flag to determine whether to intercept. + mock_http(nock, host, mockDir); + // function to turn matching all requests to s3 on/off. + const mockS3Http = (action) => { + const previous = mock_s3; + if (action === 'off') { + mock_s3 = false; + } else if (action === 'on') { + mock_s3 = true; + } else if (action !== 'get') { + throw new Error(`illegal action for setMockHttp ${action}`); + } + return previous; + }; + + // call mockS3Http with the argument + // - 'on' - turn it on + // - 'off' - turn it off (used by fetch.test.js so it doesn't interfere with redirects) + // - 'get' - return true or false for 'on' or 'off' + return mockS3Http; +}; + + + diff --git a/node_modules/@mapbox/node-pre-gyp/lib/util/versioning.js b/node_modules/@mapbox/node-pre-gyp/lib/util/versioning.js new file mode 100644 index 0000000..70c3f85 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/lib/util/versioning.js @@ -0,0 +1,341 @@ +'use strict'; + +module.exports = exports; + +const path = require('path'); +const semver = require('semver'); +const url = require('url'); +const detect_libc = require('detect-libc'); +const napi = require('./napi.js'); + +let abi_crosswalk; + +// This is used for unit testing to provide a fake +// ABI crosswalk that emulates one that is not updated +// for the current version +if (process.env.NODE_PRE_GYP_ABI_CROSSWALK) { + abi_crosswalk = require(process.env.NODE_PRE_GYP_ABI_CROSSWALK); +} else { + abi_crosswalk = require('./abi_crosswalk.json'); +} + +const major_versions = {}; +Object.keys(abi_crosswalk).forEach((v) => { + const major = v.split('.')[0]; + if (!major_versions[major]) { + major_versions[major] = v; + } +}); + +function get_electron_abi(runtime, target_version) { + if (!runtime) { + throw new Error('get_electron_abi requires valid runtime arg'); + } + if (typeof target_version === 'undefined') { + // erroneous CLI call + throw new Error('Empty target version is not supported if electron is the target.'); + } + // Electron guarantees that patch version update won't break native modules. + const sem_ver = semver.parse(target_version); + return runtime + '-v' + sem_ver.major + '.' + sem_ver.minor; +} +module.exports.get_electron_abi = get_electron_abi; + +function get_node_webkit_abi(runtime, target_version) { + if (!runtime) { + throw new Error('get_node_webkit_abi requires valid runtime arg'); + } + if (typeof target_version === 'undefined') { + // erroneous CLI call + throw new Error('Empty target version is not supported if node-webkit is the target.'); + } + return runtime + '-v' + target_version; +} +module.exports.get_node_webkit_abi = get_node_webkit_abi; + +function get_node_abi(runtime, versions) { + if (!runtime) { + throw new Error('get_node_abi requires valid runtime arg'); + } + if (!versions) { + throw new Error('get_node_abi requires valid process.versions object'); + } + const sem_ver = semver.parse(versions.node); + if (sem_ver.major === 0 && sem_ver.minor % 2) { // odd series + // https://github.com/mapbox/node-pre-gyp/issues/124 + return runtime + '-v' + versions.node; + } else { + // process.versions.modules added in >= v0.10.4 and v0.11.7 + // https://github.com/joyent/node/commit/ccabd4a6fa8a6eb79d29bc3bbe9fe2b6531c2d8e + return versions.modules ? runtime + '-v' + (+versions.modules) : + 'v8-' + versions.v8.split('.').slice(0, 2).join('.'); + } +} +module.exports.get_node_abi = get_node_abi; + +function get_runtime_abi(runtime, target_version) { + if (!runtime) { + throw new Error('get_runtime_abi requires valid runtime arg'); + } + if (runtime === 'node-webkit') { + return get_node_webkit_abi(runtime, target_version || process.versions['node-webkit']); + } else if (runtime === 'electron') { + return get_electron_abi(runtime, target_version || process.versions.electron); + } else { + if (runtime !== 'node') { + throw new Error("Unknown Runtime: '" + runtime + "'"); + } + if (!target_version) { + return get_node_abi(runtime, process.versions); + } else { + let cross_obj; + // abi_crosswalk generated with ./scripts/abi_crosswalk.js + if (abi_crosswalk[target_version]) { + cross_obj = abi_crosswalk[target_version]; + } else { + const target_parts = target_version.split('.').map((i) => { return +i; }); + if (target_parts.length !== 3) { // parse failed + throw new Error('Unknown target version: ' + target_version); + } + /* + The below code tries to infer the last known ABI compatible version + that we have recorded in the abi_crosswalk.json when an exact match + is not possible. The reasons for this to exist are complicated: + + - We support passing --target to be able to allow developers to package binaries for versions of node + that are not the same one as they are running. This might also be used in combination with the + --target_arch or --target_platform flags to also package binaries for alternative platforms + - When --target is passed we can't therefore determine the ABI (process.versions.modules) from the node + version that is running in memory + - So, therefore node-pre-gyp keeps an "ABI crosswalk" (lib/util/abi_crosswalk.json) to be able to look + this info up for all versions + - But we cannot easily predict what the future ABI will be for released versions + - And node-pre-gyp needs to be a `bundledDependency` in apps that depend on it in order to work correctly + by being fully available at install time. + - So, the speed of node releases and the bundled nature of node-pre-gyp mean that a new node-pre-gyp release + need to happen for every node.js/io.js/node-webkit/nw.js/atom-shell/etc release that might come online if + you want the `--target` flag to keep working for the latest version + - Which is impractical ^^ + - Hence the below code guesses about future ABI to make the need to update node-pre-gyp less demanding. + + In practice then you can have a dependency of your app like `node-sqlite3` that bundles a `node-pre-gyp` that + only knows about node v0.10.33 in the `abi_crosswalk.json` but target node v0.10.34 (which is assumed to be + ABI compatible with v0.10.33). + + TODO: use semver module instead of custom version parsing + */ + const major = target_parts[0]; + let minor = target_parts[1]; + let patch = target_parts[2]; + // io.js: yeah if node.js ever releases 1.x this will break + // but that is unlikely to happen: https://github.com/iojs/io.js/pull/253#issuecomment-69432616 + if (major === 1) { + // look for last release that is the same major version + // e.g. we assume io.js 1.x is ABI compatible with >= 1.0.0 + while (true) { + if (minor > 0) --minor; + if (patch > 0) --patch; + const new_iojs_target = '' + major + '.' + minor + '.' + patch; + if (abi_crosswalk[new_iojs_target]) { + cross_obj = abi_crosswalk[new_iojs_target]; + console.log('Warning: node-pre-gyp could not find exact match for ' + target_version); + console.log('Warning: but node-pre-gyp successfully choose ' + new_iojs_target + ' as ABI compatible target'); + break; + } + if (minor === 0 && patch === 0) { + break; + } + } + } else if (major >= 2) { + // look for last release that is the same major version + if (major_versions[major]) { + cross_obj = abi_crosswalk[major_versions[major]]; + console.log('Warning: node-pre-gyp could not find exact match for ' + target_version); + console.log('Warning: but node-pre-gyp successfully choose ' + major_versions[major] + ' as ABI compatible target'); + } + } else if (major === 0) { // node.js + if (target_parts[1] % 2 === 0) { // for stable/even node.js series + // look for the last release that is the same minor release + // e.g. we assume node 0.10.x is ABI compatible with >= 0.10.0 + while (--patch > 0) { + const new_node_target = '' + major + '.' + minor + '.' + patch; + if (abi_crosswalk[new_node_target]) { + cross_obj = abi_crosswalk[new_node_target]; + console.log('Warning: node-pre-gyp could not find exact match for ' + target_version); + console.log('Warning: but node-pre-gyp successfully choose ' + new_node_target + ' as ABI compatible target'); + break; + } + } + } + } + } + if (!cross_obj) { + throw new Error('Unsupported target version: ' + target_version); + } + // emulate process.versions + const versions_obj = { + node: target_version, + v8: cross_obj.v8 + '.0', + // abi_crosswalk uses 1 for node versions lacking process.versions.modules + // process.versions.modules added in >= v0.10.4 and v0.11.7 + modules: cross_obj.node_abi > 1 ? cross_obj.node_abi : undefined + }; + return get_node_abi(runtime, versions_obj); + } + } +} +module.exports.get_runtime_abi = get_runtime_abi; + +const required_parameters = [ + 'module_name', + 'module_path', + 'host' +]; + +function validate_config(package_json, opts) { + const msg = package_json.name + ' package.json is not node-pre-gyp ready:\n'; + const missing = []; + if (!package_json.main) { + missing.push('main'); + } + if (!package_json.version) { + missing.push('version'); + } + if (!package_json.name) { + missing.push('name'); + } + if (!package_json.binary) { + missing.push('binary'); + } + const o = package_json.binary; + if (o) { + required_parameters.forEach((p) => { + if (!o[p] || typeof o[p] !== 'string') { + missing.push('binary.' + p); + } + }); + } + + if (missing.length >= 1) { + throw new Error(msg + 'package.json must declare these properties: \n' + missing.join('\n')); + } + if (o) { + // enforce https over http + const protocol = url.parse(o.host).protocol; + if (protocol === 'http:') { + throw new Error("'host' protocol (" + protocol + ") is invalid - only 'https:' is accepted"); + } + } + napi.validate_package_json(package_json, opts); +} + +module.exports.validate_config = validate_config; + +function eval_template(template, opts) { + Object.keys(opts).forEach((key) => { + const pattern = '{' + key + '}'; + while (template.indexOf(pattern) > -1) { + template = template.replace(pattern, opts[key]); + } + }); + return template; +} + +// url.resolve needs single trailing slash +// to behave correctly, otherwise a double slash +// may end up in the url which breaks requests +// and a lacking slash may not lead to proper joining +function fix_slashes(pathname) { + if (pathname.slice(-1) !== '/') { + return pathname + '/'; + } + return pathname; +} + +// remove double slashes +// note: path.normalize will not work because +// it will convert forward to back slashes +function drop_double_slashes(pathname) { + return pathname.replace(/\/\//g, '/'); +} + +function get_process_runtime(versions) { + let runtime = 'node'; + if (versions['node-webkit']) { + runtime = 'node-webkit'; + } else if (versions.electron) { + runtime = 'electron'; + } + return runtime; +} + +module.exports.get_process_runtime = get_process_runtime; + +const default_package_name = '{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz'; +const default_remote_path = ''; + +module.exports.evaluate = function(package_json, options, napi_build_version) { + options = options || {}; + validate_config(package_json, options); // options is a suitable substitute for opts in this case + const v = package_json.version; + const module_version = semver.parse(v); + const runtime = options.runtime || get_process_runtime(process.versions); + const opts = { + name: package_json.name, + configuration: options.debug ? 'Debug' : 'Release', + debug: options.debug, + module_name: package_json.binary.module_name, + version: module_version.version, + prerelease: module_version.prerelease.length ? module_version.prerelease.join('.') : '', + build: module_version.build.length ? module_version.build.join('.') : '', + major: module_version.major, + minor: module_version.minor, + patch: module_version.patch, + runtime: runtime, + node_abi: get_runtime_abi(runtime, options.target), + node_abi_napi: napi.get_napi_version(options.target) ? 'napi' : get_runtime_abi(runtime, options.target), + napi_version: napi.get_napi_version(options.target), // non-zero numeric, undefined if unsupported + napi_build_version: napi_build_version || '', + node_napi_label: napi_build_version ? 'napi-v' + napi_build_version : get_runtime_abi(runtime, options.target), + target: options.target || '', + platform: options.target_platform || process.platform, + target_platform: options.target_platform || process.platform, + arch: options.target_arch || process.arch, + target_arch: options.target_arch || process.arch, + libc: options.target_libc || detect_libc.familySync() || 'unknown', + module_main: package_json.main, + toolset: options.toolset || '', // address https://github.com/mapbox/node-pre-gyp/issues/119 + bucket: package_json.binary.bucket, + region: package_json.binary.region, + s3ForcePathStyle: package_json.binary.s3ForcePathStyle || false + }; + // support host mirror with npm config `--{module_name}_binary_host_mirror` + // e.g.: https://github.com/node-inspector/v8-profiler/blob/master/package.json#L25 + // > npm install v8-profiler --profiler_binary_host_mirror=https://npm.taobao.org/mirrors/node-inspector/ + const validModuleName = opts.module_name.replace('-', '_'); + const host = process.env['npm_config_' + validModuleName + '_binary_host_mirror'] || package_json.binary.host; + opts.host = fix_slashes(eval_template(host, opts)); + opts.module_path = eval_template(package_json.binary.module_path, opts); + // now we resolve the module_path to ensure it is absolute so that binding.gyp variables work predictably + if (options.module_root) { + // resolve relative to known module root: works for pre-binding require + opts.module_path = path.join(options.module_root, opts.module_path); + } else { + // resolve relative to current working directory: works for node-pre-gyp commands + opts.module_path = path.resolve(opts.module_path); + } + opts.module = path.join(opts.module_path, opts.module_name + '.node'); + opts.remote_path = package_json.binary.remote_path ? drop_double_slashes(fix_slashes(eval_template(package_json.binary.remote_path, opts))) : default_remote_path; + const package_name = package_json.binary.package_name ? package_json.binary.package_name : default_package_name; + opts.package_name = eval_template(package_name, opts); + opts.staged_tarball = path.join('build/stage', opts.remote_path, opts.package_name); + // when using s3ForcePathStyle the bucket is part of the http object path + // add it + if (opts.s3ForcePathStyle) { + opts.hosted_path = url.resolve(opts.host, drop_double_slashes(`${opts.bucket}/${opts.remote_path}`)); + } else { + opts.hosted_path = url.resolve(opts.host, opts.remote_path); + } + opts.hosted_tarball = url.resolve(opts.hosted_path, opts.package_name); + return opts; +}; diff --git a/node_modules/@mapbox/node-pre-gyp/package.json b/node_modules/@mapbox/node-pre-gyp/package.json new file mode 100644 index 0000000..bc815b9 --- /dev/null +++ b/node_modules/@mapbox/node-pre-gyp/package.json @@ -0,0 +1,63 @@ +{ + "name": "@mapbox/node-pre-gyp", + "description": "Node.js native addon binary install tool", + "version": "2.0.0", + "keywords": [ + "native", + "addon", + "module", + "c", + "c++", + "bindings", + "binary" + ], + "license": "BSD-3-Clause", + "author": "Dane Springmeyer ", + "repository": { + "type": "git", + "url": "git://github.com/mapbox/node-pre-gyp.git" + }, + "bin": "./bin/node-pre-gyp", + "main": "./lib/node-pre-gyp.js", + "engines": { + "node": ">=18" + }, + "dependencies": { + "consola": "^3.2.3", + "detect-libc": "^2.0.0", + "https-proxy-agent": "^7.0.5", + "node-fetch": "^2.6.7", + "nopt": "^8.0.0", + "semver": "^7.5.3", + "tar": "^7.4.0" + }, + "devDependencies": { + "@mapbox/cloudfriend": "^8.1.0", + "@mapbox/eslint-config-mapbox": "^5.0.1", + "aws-sdk": "^2.1087.0", + "codecov": "^3.8.3", + "eslint": "^8.57.0", + "eslint-plugin-n": "^17.9.0", + "mock-aws-s3": "^4.0.2", + "nock": "^13.5.4", + "node-addon-api": "^8.1.0", + "nyc": "^17.0.0", + "tape": "^5.5.2", + "tar-fs": "^3.0.6" + }, + "nyc": { + "all": true, + "skip-full": false, + "exclude": [ + "test/**" + ] + }, + "scripts": { + "coverage": "nyc --all --include index.js --include lib/ npm test", + "upload-coverage": "nyc report --reporter json && codecov --clear --flags=unit --file=./coverage/coverage-final.json", + "lint": "eslint bin/node-pre-gyp lib/*js lib/util/*js test/*js scripts/*js", + "fix": "npm run lint -- --fix", + "update-crosswalk": "node scripts/abi_crosswalk.js", + "test": "tape test/*test.js" + } +} diff --git a/node_modules/@pkgjs/parseargs/.editorconfig b/node_modules/@pkgjs/parseargs/.editorconfig new file mode 100644 index 0000000..b140163 --- /dev/null +++ b/node_modules/@pkgjs/parseargs/.editorconfig @@ -0,0 +1,14 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Copied from Node.js to ease compatibility in PR. +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true +quote_type = single diff --git a/node_modules/@pkgjs/parseargs/CHANGELOG.md b/node_modules/@pkgjs/parseargs/CHANGELOG.md new file mode 100644 index 0000000..2adc7d3 --- /dev/null +++ b/node_modules/@pkgjs/parseargs/CHANGELOG.md @@ -0,0 +1,147 @@ +# Changelog + +## [0.11.0](https://github.com/pkgjs/parseargs/compare/v0.10.0...v0.11.0) (2022-10-08) + + +### Features + +* add `default` option parameter ([#142](https://github.com/pkgjs/parseargs/issues/142)) ([cd20847](https://github.com/pkgjs/parseargs/commit/cd20847a00b2f556aa9c085ac83b942c60868ec1)) + +## [0.10.0](https://github.com/pkgjs/parseargs/compare/v0.9.1...v0.10.0) (2022-07-21) + + +### Features + +* add parsed meta-data to returned properties ([#129](https://github.com/pkgjs/parseargs/issues/129)) ([91bfb4d](https://github.com/pkgjs/parseargs/commit/91bfb4d3f7b6937efab1b27c91c45d1205f1497e)) + +## [0.9.1](https://github.com/pkgjs/parseargs/compare/v0.9.0...v0.9.1) (2022-06-20) + + +### Bug Fixes + +* **runtime:** support node 14+ ([#135](https://github.com/pkgjs/parseargs/issues/135)) ([6a1c5a6](https://github.com/pkgjs/parseargs/commit/6a1c5a6f7cadf2f035e004027e2742e3c4ce554b)) + +## [0.9.0](https://github.com/pkgjs/parseargs/compare/v0.8.0...v0.9.0) (2022-05-23) + + +### ⚠ BREAKING CHANGES + +* drop handling of electron arguments (#121) + +### Code Refactoring + +* drop handling of electron arguments ([#121](https://github.com/pkgjs/parseargs/issues/121)) ([a2ffd53](https://github.com/pkgjs/parseargs/commit/a2ffd537c244a062371522b955acb45a404fc9f2)) + +## [0.8.0](https://github.com/pkgjs/parseargs/compare/v0.7.1...v0.8.0) (2022-05-16) + + +### ⚠ BREAKING CHANGES + +* switch type:string option arguments to greedy, but with error for suspect cases in strict mode (#88) +* positionals now opt-in when strict:true (#116) +* create result.values with null prototype (#111) + +### Features + +* create result.values with null prototype ([#111](https://github.com/pkgjs/parseargs/issues/111)) ([9d539c3](https://github.com/pkgjs/parseargs/commit/9d539c3d57f269c160e74e0656ad4fa84ff92ec2)) +* positionals now opt-in when strict:true ([#116](https://github.com/pkgjs/parseargs/issues/116)) ([3643338](https://github.com/pkgjs/parseargs/commit/364333826b746e8a7dc5505b4b22fd19ac51df3b)) +* switch type:string option arguments to greedy, but with error for suspect cases in strict mode ([#88](https://github.com/pkgjs/parseargs/issues/88)) ([c2b5e72](https://github.com/pkgjs/parseargs/commit/c2b5e72161991dfdc535909f1327cc9b970fe7e8)) + +### [0.7.1](https://github.com/pkgjs/parseargs/compare/v0.7.0...v0.7.1) (2022-04-15) + + +### Bug Fixes + +* resist pollution ([#106](https://github.com/pkgjs/parseargs/issues/106)) ([ecf2dec](https://github.com/pkgjs/parseargs/commit/ecf2dece0a9f2a76d789384d5d71c68ffe64022a)) + +## [0.7.0](https://github.com/pkgjs/parseargs/compare/v0.6.0...v0.7.0) (2022-04-13) + + +### Features + +* Add strict mode to parser ([#74](https://github.com/pkgjs/parseargs/issues/74)) ([8267d02](https://github.com/pkgjs/parseargs/commit/8267d02083a87b8b8a71fcce08348d1e031ea91c)) + +## [0.6.0](https://github.com/pkgjs/parseargs/compare/v0.5.0...v0.6.0) (2022-04-11) + + +### ⚠ BREAKING CHANGES + +* rework results to remove redundant `flags` property and store value true for boolean options (#83) +* switch to existing ERR_INVALID_ARG_VALUE (#97) + +### Code Refactoring + +* rework results to remove redundant `flags` property and store value true for boolean options ([#83](https://github.com/pkgjs/parseargs/issues/83)) ([be153db](https://github.com/pkgjs/parseargs/commit/be153dbed1d488cb7b6e27df92f601ba7337713d)) +* switch to existing ERR_INVALID_ARG_VALUE ([#97](https://github.com/pkgjs/parseargs/issues/97)) ([084a23f](https://github.com/pkgjs/parseargs/commit/084a23f9fde2da030b159edb1c2385f24579ce40)) + +## [0.5.0](https://github.com/pkgjs/parseargs/compare/v0.4.0...v0.5.0) (2022-04-10) + + +### ⚠ BREAKING CHANGES + +* Require type to be specified for each supplied option (#95) + +### Features + +* Require type to be specified for each supplied option ([#95](https://github.com/pkgjs/parseargs/issues/95)) ([02cd018](https://github.com/pkgjs/parseargs/commit/02cd01885b8aaa59f2db8308f2d4479e64340068)) + +## [0.4.0](https://github.com/pkgjs/parseargs/compare/v0.3.0...v0.4.0) (2022-03-12) + + +### ⚠ BREAKING CHANGES + +* parsing, revisit short option groups, add support for combined short and value (#75) +* restructure configuration to take options bag (#63) + +### Code Refactoring + +* parsing, revisit short option groups, add support for combined short and value ([#75](https://github.com/pkgjs/parseargs/issues/75)) ([a92600f](https://github.com/pkgjs/parseargs/commit/a92600fa6c214508ab1e016fa55879a314f541af)) +* restructure configuration to take options bag ([#63](https://github.com/pkgjs/parseargs/issues/63)) ([b412095](https://github.com/pkgjs/parseargs/commit/b4120957d90e809ee8b607b06e747d3e6a6b213e)) + +## [0.3.0](https://github.com/pkgjs/parseargs/compare/v0.2.0...v0.3.0) (2022-02-06) + + +### Features + +* **parser:** support short-option groups ([#59](https://github.com/pkgjs/parseargs/issues/59)) ([882067b](https://github.com/pkgjs/parseargs/commit/882067bc2d7cbc6b796f8e5a079a99bc99d4e6ba)) + +## [0.2.0](https://github.com/pkgjs/parseargs/compare/v0.1.1...v0.2.0) (2022-02-05) + + +### Features + +* basic support for shorts ([#50](https://github.com/pkgjs/parseargs/issues/50)) ([a2f36d7](https://github.com/pkgjs/parseargs/commit/a2f36d7da4145af1c92f76806b7fe2baf6beeceb)) + + +### Bug Fixes + +* always store value for a=b ([#43](https://github.com/pkgjs/parseargs/issues/43)) ([a85e8dc](https://github.com/pkgjs/parseargs/commit/a85e8dc06379fd2696ee195cc625de8fac6aee42)) +* support single dash as positional ([#49](https://github.com/pkgjs/parseargs/issues/49)) ([d795bf8](https://github.com/pkgjs/parseargs/commit/d795bf877d068fd67aec381f30b30b63f97109ad)) + +### [0.1.1](https://github.com/pkgjs/parseargs/compare/v0.1.0...v0.1.1) (2022-01-25) + + +### Bug Fixes + +* only use arrays in results for multiples ([#42](https://github.com/pkgjs/parseargs/issues/42)) ([c357584](https://github.com/pkgjs/parseargs/commit/c357584847912506319ed34a0840080116f4fd65)) + +## 0.1.0 (2022-01-22) + + +### Features + +* expand scenarios covered by default arguments for environments ([#20](https://github.com/pkgjs/parseargs/issues/20)) ([582ada7](https://github.com/pkgjs/parseargs/commit/582ada7be0eca3a73d6e0bd016e7ace43449fa4c)) +* update readme and include contributing guidelines ([8edd6fc](https://github.com/pkgjs/parseargs/commit/8edd6fc863cd705f6fac732724159ebe8065a2b0)) + + +### Bug Fixes + +* do not strip excess leading dashes on long option names ([#21](https://github.com/pkgjs/parseargs/issues/21)) ([f848590](https://github.com/pkgjs/parseargs/commit/f848590ebf3249ed5979ff47e003fa6e1a8ec5c0)) +* name & readme ([3f057c1](https://github.com/pkgjs/parseargs/commit/3f057c1b158a1bdbe878c64b57460c58e56e465f)) +* package.json values ([9bac300](https://github.com/pkgjs/parseargs/commit/9bac300e00cd76c77076bf9e75e44f8929512da9)) +* update readme name ([957d8d9](https://github.com/pkgjs/parseargs/commit/957d8d96e1dcb48297c0a14345d44c0123b2883e)) + + +### Build System + +* first release as minor ([421c6e2](https://github.com/pkgjs/parseargs/commit/421c6e2569a8668ad14fac5a5af5be60479a7571)) diff --git a/node_modules/@pkgjs/parseargs/LICENSE b/node_modules/@pkgjs/parseargs/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/node_modules/@pkgjs/parseargs/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@pkgjs/parseargs/README.md b/node_modules/@pkgjs/parseargs/README.md new file mode 100644 index 0000000..0a04192 --- /dev/null +++ b/node_modules/@pkgjs/parseargs/README.md @@ -0,0 +1,413 @@ + +# parseArgs + +[![Coverage][coverage-image]][coverage-url] + +Polyfill of `util.parseArgs()` + +## `util.parseArgs([config])` + + + +> Stability: 1 - Experimental + +* `config` {Object} Used to provide arguments for parsing and to configure + the parser. `config` supports the following properties: + * `args` {string\[]} array of argument strings. **Default:** `process.argv` + with `execPath` and `filename` removed. + * `options` {Object} Used to describe arguments known to the parser. + Keys of `options` are the long names of options and values are an + {Object} accepting the following properties: + * `type` {string} Type of argument, which must be either `boolean` or `string`. + * `multiple` {boolean} Whether this option can be provided multiple + times. If `true`, all values will be collected in an array. If + `false`, values for the option are last-wins. **Default:** `false`. + * `short` {string} A single character alias for the option. + * `default` {string | boolean | string\[] | boolean\[]} The default option + value when it is not set by args. It must be of the same type as the + the `type` property. When `multiple` is `true`, it must be an array. + * `strict` {boolean} Should an error be thrown when unknown arguments + are encountered, or when arguments are passed that do not match the + `type` configured in `options`. + **Default:** `true`. + * `allowPositionals` {boolean} Whether this command accepts positional + arguments. + **Default:** `false` if `strict` is `true`, otherwise `true`. + * `tokens` {boolean} Return the parsed tokens. This is useful for extending + the built-in behavior, from adding additional checks through to reprocessing + the tokens in different ways. + **Default:** `false`. + +* Returns: {Object} The parsed command line arguments: + * `values` {Object} A mapping of parsed option names with their {string} + or {boolean} values. + * `positionals` {string\[]} Positional arguments. + * `tokens` {Object\[] | undefined} See [parseArgs tokens](#parseargs-tokens) + section. Only returned if `config` includes `tokens: true`. + +Provides a higher level API for command-line argument parsing than interacting +with `process.argv` directly. Takes a specification for the expected arguments +and returns a structured object with the parsed options and positionals. + +```mjs +import { parseArgs } from 'node:util'; +const args = ['-f', '--bar', 'b']; +const options = { + foo: { + type: 'boolean', + short: 'f' + }, + bar: { + type: 'string' + } +}; +const { + values, + positionals +} = parseArgs({ args, options }); +console.log(values, positionals); +// Prints: [Object: null prototype] { foo: true, bar: 'b' } [] +``` + +```cjs +const { parseArgs } = require('node:util'); +const args = ['-f', '--bar', 'b']; +const options = { + foo: { + type: 'boolean', + short: 'f' + }, + bar: { + type: 'string' + } +}; +const { + values, + positionals +} = parseArgs({ args, options }); +console.log(values, positionals); +// Prints: [Object: null prototype] { foo: true, bar: 'b' } [] +``` + +`util.parseArgs` is experimental and behavior may change. Join the +conversation in [pkgjs/parseargs][] to contribute to the design. + +### `parseArgs` `tokens` + +Detailed parse information is available for adding custom behaviours by +specifying `tokens: true` in the configuration. +The returned tokens have properties describing: + +* all tokens + * `kind` {string} One of 'option', 'positional', or 'option-terminator'. + * `index` {number} Index of element in `args` containing token. So the + source argument for a token is `args[token.index]`. +* option tokens + * `name` {string} Long name of option. + * `rawName` {string} How option used in args, like `-f` of `--foo`. + * `value` {string | undefined} Option value specified in args. + Undefined for boolean options. + * `inlineValue` {boolean | undefined} Whether option value specified inline, + like `--foo=bar`. +* positional tokens + * `value` {string} The value of the positional argument in args (i.e. `args[index]`). +* option-terminator token + +The returned tokens are in the order encountered in the input args. Options +that appear more than once in args produce a token for each use. Short option +groups like `-xy` expand to a token for each option. So `-xxx` produces +three tokens. + +For example to use the returned tokens to add support for a negated option +like `--no-color`, the tokens can be reprocessed to change the value stored +for the negated option. + +```mjs +import { parseArgs } from 'node:util'; + +const options = { + 'color': { type: 'boolean' }, + 'no-color': { type: 'boolean' }, + 'logfile': { type: 'string' }, + 'no-logfile': { type: 'boolean' }, +}; +const { values, tokens } = parseArgs({ options, tokens: true }); + +// Reprocess the option tokens and overwrite the returned values. +tokens + .filter((token) => token.kind === 'option') + .forEach((token) => { + if (token.name.startsWith('no-')) { + // Store foo:false for --no-foo + const positiveName = token.name.slice(3); + values[positiveName] = false; + delete values[token.name]; + } else { + // Resave value so last one wins if both --foo and --no-foo. + values[token.name] = token.value ?? true; + } + }); + +const color = values.color; +const logfile = values.logfile ?? 'default.log'; + +console.log({ logfile, color }); +``` + +```cjs +const { parseArgs } = require('node:util'); + +const options = { + 'color': { type: 'boolean' }, + 'no-color': { type: 'boolean' }, + 'logfile': { type: 'string' }, + 'no-logfile': { type: 'boolean' }, +}; +const { values, tokens } = parseArgs({ options, tokens: true }); + +// Reprocess the option tokens and overwrite the returned values. +tokens + .filter((token) => token.kind === 'option') + .forEach((token) => { + if (token.name.startsWith('no-')) { + // Store foo:false for --no-foo + const positiveName = token.name.slice(3); + values[positiveName] = false; + delete values[token.name]; + } else { + // Resave value so last one wins if both --foo and --no-foo. + values[token.name] = token.value ?? true; + } + }); + +const color = values.color; +const logfile = values.logfile ?? 'default.log'; + +console.log({ logfile, color }); +``` + +Example usage showing negated options, and when an option is used +multiple ways then last one wins. + +```console +$ node negate.js +{ logfile: 'default.log', color: undefined } +$ node negate.js --no-logfile --no-color +{ logfile: false, color: false } +$ node negate.js --logfile=test.log --color +{ logfile: 'test.log', color: true } +$ node negate.js --no-logfile --logfile=test.log --color --no-color +{ logfile: 'test.log', color: false } +``` + +----- + + +## Table of Contents +- [`util.parseArgs([config])`](#utilparseargsconfig) +- [Scope](#scope) +- [Version Matchups](#version-matchups) +- [🚀 Getting Started](#-getting-started) +- [🙌 Contributing](#-contributing) +- [💡 `process.mainArgs` Proposal](#-processmainargs-proposal) + - [Implementation:](#implementation) +- [📃 Examples](#-examples) +- [F.A.Qs](#faqs) +- [Links & Resources](#links--resources) + +----- + +## Scope + +It is already possible to build great arg parsing modules on top of what Node.js provides; the prickly API is abstracted away by these modules. Thus, process.parseArgs() is not necessarily intended for library authors; it is intended for developers of simple CLI tools, ad-hoc scripts, deployed Node.js applications, and learning materials. + +It is exceedingly difficult to provide an API which would both be friendly to these Node.js users while being extensible enough for libraries to build upon. We chose to prioritize these use cases because these are currently not well-served by Node.js' API. + +---- + +## Version Matchups + +| Node.js | @pkgjs/parseArgs | +| -- | -- | +| [v18.3.0](https://nodejs.org/docs/latest-v18.x/api/util.html#utilparseargsconfig) | [v0.9.1](https://github.com/pkgjs/parseargs/tree/v0.9.1#utilparseargsconfig) | +| [v16.17.0](https://nodejs.org/dist/latest-v16.x/docs/api/util.html#utilparseargsconfig), [v18.7.0](https://nodejs.org/docs/latest-v18.x/api/util.html#utilparseargsconfig) | [0.10.0](https://github.com/pkgjs/parseargs/tree/v0.10.0#utilparseargsconfig) | + +---- + +## 🚀 Getting Started + +1. **Install dependencies.** + + ```bash + npm install + ``` + +2. **Open the index.js file and start editing!** + +3. **Test your code by calling parseArgs through our test file** + + ```bash + npm test + ``` + +---- + +## 🙌 Contributing + +Any person who wants to contribute to the initiative is welcome! Please first read the [Contributing Guide](CONTRIBUTING.md) + +Additionally, reading the [`Examples w/ Output`](#-examples-w-output) section of this document will be the best way to familiarize yourself with the target expected behavior for parseArgs() once it is fully implemented. + +This package was implemented using [tape](https://www.npmjs.com/package/tape) as its test harness. + +---- + +## 💡 `process.mainArgs` Proposal + +> Note: This can be moved forward independently of the `util.parseArgs()` proposal/work. + +### Implementation: + +```javascript +process.mainArgs = process.argv.slice(process._exec ? 1 : 2) +``` + +---- + +## 📃 Examples + +```js +const { parseArgs } = require('@pkgjs/parseargs'); +``` + +```js +const { parseArgs } = require('@pkgjs/parseargs'); +// specify the options that may be used +const options = { + foo: { type: 'string'}, + bar: { type: 'boolean' }, +}; +const args = ['--foo=a', '--bar']; +const { values, positionals } = parseArgs({ args, options }); +// values = { foo: 'a', bar: true } +// positionals = [] +``` + +```js +const { parseArgs } = require('@pkgjs/parseargs'); +// type:string & multiple +const options = { + foo: { + type: 'string', + multiple: true, + }, +}; +const args = ['--foo=a', '--foo', 'b']; +const { values, positionals } = parseArgs({ args, options }); +// values = { foo: [ 'a', 'b' ] } +// positionals = [] +``` + +```js +const { parseArgs } = require('@pkgjs/parseargs'); +// shorts +const options = { + foo: { + short: 'f', + type: 'boolean' + }, +}; +const args = ['-f', 'b']; +const { values, positionals } = parseArgs({ args, options, allowPositionals: true }); +// values = { foo: true } +// positionals = ['b'] +``` + +```js +const { parseArgs } = require('@pkgjs/parseargs'); +// unconfigured +const options = {}; +const args = ['-f', '--foo=a', '--bar', 'b']; +const { values, positionals } = parseArgs({ strict: false, args, options, allowPositionals: true }); +// values = { f: true, foo: 'a', bar: true } +// positionals = ['b'] +``` + +---- + +## F.A.Qs + +- Is `cmd --foo=bar baz` the same as `cmd baz --foo=bar`? + - yes +- Does the parser execute a function? + - no +- Does the parser execute one of several functions, depending on input? + - no +- Can subcommands take options that are distinct from the main command? + - no +- Does it output generated help when no options match? + - no +- Does it generated short usage? Like: `usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]` + - no (no usage/help at all) +- Does the user provide the long usage text? For each option? For the whole command? + - no +- Do subcommands (if implemented) have their own usage output? + - no +- Does usage print if the user runs `cmd --help`? + - no +- Does it set `process.exitCode`? + - no +- Does usage print to stderr or stdout? + - N/A +- Does it check types? (Say, specify that an option is a boolean, number, etc.) + - no +- Can an option have more than one type? (string or false, for example) + - no +- Can the user define a type? (Say, `type: path` to call `path.resolve()` on the argument.) + - no +- Does a `--foo=0o22` mean 0, 22, 18, or "0o22"? + - `"0o22"` +- Does it coerce types? + - no +- Does `--no-foo` coerce to `--foo=false`? For all options? Only boolean options? + - no, it sets `{values:{'no-foo': true}}` +- Is `--foo` the same as `--foo=true`? Only for known booleans? Only at the end? + - no, they are not the same. There is no special handling of `true` as a value so it is just another string. +- Does it read environment variables? Ie, is `FOO=1 cmd` the same as `cmd --foo=1`? + - no +- Do unknown arguments raise an error? Are they parsed? Are they treated as positional arguments? + - no, they are parsed, not treated as positionals +- Does `--` signal the end of options? + - yes +- Is `--` included as a positional? + - no +- Is `program -- foo` the same as `program foo`? + - yes, both store `{positionals:['foo']}` +- Does the API specify whether a `--` was present/relevant? + - no +- Is `-bar` the same as `--bar`? + - no, `-bar` is a short option or options, with expansion logic that follows the + [Utility Syntax Guidelines in POSIX.1-2017](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html). `-bar` expands to `-b`, `-a`, `-r`. +- Is `---foo` the same as `--foo`? + - no + - the first is a long option named `'-foo'` + - the second is a long option named `'foo'` +- Is `-` a positional? ie, `bash some-test.sh | tap -` + - yes + +## Links & Resources + +* [Initial Tooling Issue](https://github.com/nodejs/tooling/issues/19) +* [Initial Proposal](https://github.com/nodejs/node/pull/35015) +* [parseArgs Proposal](https://github.com/nodejs/node/pull/42675) + +[coverage-image]: https://img.shields.io/nycrc/pkgjs/parseargs +[coverage-url]: https://github.com/pkgjs/parseargs/blob/main/.nycrc +[pkgjs/parseargs]: https://github.com/pkgjs/parseargs diff --git a/node_modules/@pkgjs/parseargs/examples/is-default-value.js b/node_modules/@pkgjs/parseargs/examples/is-default-value.js new file mode 100644 index 0000000..0a67972 --- /dev/null +++ b/node_modules/@pkgjs/parseargs/examples/is-default-value.js @@ -0,0 +1,25 @@ +'use strict'; + +// This example shows how to understand if a default value is used or not. + +// 1. const { parseArgs } = require('node:util'); // from node +// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package +const { parseArgs } = require('..'); // in repo + +const options = { + file: { short: 'f', type: 'string', default: 'FOO' }, +}; + +const { values, tokens } = parseArgs({ options, tokens: true }); + +const isFileDefault = !tokens.some((token) => token.kind === 'option' && + token.name === 'file' +); + +console.log(values); +console.log(`Is the file option [${values.file}] the default value? ${isFileDefault}`); + +// Try the following: +// node is-default-value.js +// node is-default-value.js -f FILE +// node is-default-value.js --file FILE diff --git a/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js b/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js new file mode 100644 index 0000000..943e643 --- /dev/null +++ b/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js @@ -0,0 +1,35 @@ +'use strict'; + +// This is an example of using tokens to add a custom behaviour. +// +// Require the use of `=` for long options and values by blocking +// the use of space separated values. +// So allow `--foo=bar`, and not allow `--foo bar`. +// +// Note: this is not a common behaviour, most CLIs allow both forms. + +// 1. const { parseArgs } = require('node:util'); // from node +// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package +const { parseArgs } = require('..'); // in repo + +const options = { + file: { short: 'f', type: 'string' }, + log: { type: 'string' }, +}; + +const { values, tokens } = parseArgs({ options, tokens: true }); + +const badToken = tokens.find((token) => token.kind === 'option' && + token.value != null && + token.rawName.startsWith('--') && + !token.inlineValue +); +if (badToken) { + throw new Error(`Option value for '${badToken.rawName}' must be inline, like '${badToken.rawName}=VALUE'`); +} + +console.log(values); + +// Try the following: +// node limit-long-syntax.js -f FILE --log=LOG +// node limit-long-syntax.js --file FILE diff --git a/node_modules/@pkgjs/parseargs/examples/negate.js b/node_modules/@pkgjs/parseargs/examples/negate.js new file mode 100644 index 0000000..b663469 --- /dev/null +++ b/node_modules/@pkgjs/parseargs/examples/negate.js @@ -0,0 +1,43 @@ +'use strict'; + +// This example is used in the documentation. + +// How might I add my own support for --no-foo? + +// 1. const { parseArgs } = require('node:util'); // from node +// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package +const { parseArgs } = require('..'); // in repo + +const options = { + 'color': { type: 'boolean' }, + 'no-color': { type: 'boolean' }, + 'logfile': { type: 'string' }, + 'no-logfile': { type: 'boolean' }, +}; +const { values, tokens } = parseArgs({ options, tokens: true }); + +// Reprocess the option tokens and overwrite the returned values. +tokens + .filter((token) => token.kind === 'option') + .forEach((token) => { + if (token.name.startsWith('no-')) { + // Store foo:false for --no-foo + const positiveName = token.name.slice(3); + values[positiveName] = false; + delete values[token.name]; + } else { + // Resave value so last one wins if both --foo and --no-foo. + values[token.name] = token.value ?? true; + } + }); + +const color = values.color; +const logfile = values.logfile ?? 'default.log'; + +console.log({ logfile, color }); + +// Try the following: +// node negate.js +// node negate.js --no-logfile --no-color +// negate.js --logfile=test.log --color +// node negate.js --no-logfile --logfile=test.log --color --no-color diff --git a/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js b/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js new file mode 100644 index 0000000..0c32468 --- /dev/null +++ b/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js @@ -0,0 +1,31 @@ +'use strict'; + +// This is an example of using tokens to add a custom behaviour. +// +// Throw an error if an option is used more than once. + +// 1. const { parseArgs } = require('node:util'); // from node +// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package +const { parseArgs } = require('..'); // in repo + +const options = { + ding: { type: 'boolean', short: 'd' }, + beep: { type: 'boolean', short: 'b' } +}; +const { values, tokens } = parseArgs({ options, tokens: true }); + +const seenBefore = new Set(); +tokens.forEach((token) => { + if (token.kind !== 'option') return; + if (seenBefore.has(token.name)) { + throw new Error(`option '${token.name}' used multiple times`); + } + seenBefore.add(token.name); +}); + +console.log(values); + +// Try the following: +// node no-repeated-options --ding --beep +// node no-repeated-options --beep -b +// node no-repeated-options -ddd diff --git a/node_modules/@pkgjs/parseargs/examples/ordered-options.mjs b/node_modules/@pkgjs/parseargs/examples/ordered-options.mjs new file mode 100644 index 0000000..8ab7367 --- /dev/null +++ b/node_modules/@pkgjs/parseargs/examples/ordered-options.mjs @@ -0,0 +1,41 @@ +// This is an example of using tokens to add a custom behaviour. +// +// This adds a option order check so that --some-unstable-option +// may only be used after --enable-experimental-options +// +// Note: this is not a common behaviour, the order of different options +// does not usually matter. + +import { parseArgs } from '../index.js'; + +function findTokenIndex(tokens, target) { + return tokens.findIndex((token) => token.kind === 'option' && + token.name === target + ); +} + +const experimentalName = 'enable-experimental-options'; +const unstableName = 'some-unstable-option'; + +const options = { + [experimentalName]: { type: 'boolean' }, + [unstableName]: { type: 'boolean' }, +}; + +const { values, tokens } = parseArgs({ options, tokens: true }); + +const experimentalIndex = findTokenIndex(tokens, experimentalName); +const unstableIndex = findTokenIndex(tokens, unstableName); +if (unstableIndex !== -1 && + ((experimentalIndex === -1) || (unstableIndex < experimentalIndex))) { + throw new Error(`'--${experimentalName}' must be specified before '--${unstableName}'`); +} + +console.log(values); + +/* eslint-disable max-len */ +// Try the following: +// node ordered-options.mjs +// node ordered-options.mjs --some-unstable-option +// node ordered-options.mjs --some-unstable-option --enable-experimental-options +// node ordered-options.mjs --enable-experimental-options --some-unstable-option diff --git a/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js b/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js new file mode 100644 index 0000000..eff04c2 --- /dev/null +++ b/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js @@ -0,0 +1,26 @@ +'use strict'; + +// This example is used in the documentation. + +// 1. const { parseArgs } = require('node:util'); // from node +// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package +const { parseArgs } = require('..'); // in repo + +const args = ['-f', '--bar', 'b']; +const options = { + foo: { + type: 'boolean', + short: 'f' + }, + bar: { + type: 'string' + } +}; +const { + values, + positionals +} = parseArgs({ args, options }); +console.log(values, positionals); + +// Try the following: +// node simple-hard-coded.js diff --git a/node_modules/@pkgjs/parseargs/index.js b/node_modules/@pkgjs/parseargs/index.js new file mode 100644 index 0000000..b1004c7 --- /dev/null +++ b/node_modules/@pkgjs/parseargs/index.js @@ -0,0 +1,396 @@ +'use strict'; + +const { + ArrayPrototypeForEach, + ArrayPrototypeIncludes, + ArrayPrototypeMap, + ArrayPrototypePush, + ArrayPrototypePushApply, + ArrayPrototypeShift, + ArrayPrototypeSlice, + ArrayPrototypeUnshiftApply, + ObjectEntries, + ObjectPrototypeHasOwnProperty: ObjectHasOwn, + StringPrototypeCharAt, + StringPrototypeIndexOf, + StringPrototypeSlice, + StringPrototypeStartsWith, +} = require('./internal/primordials'); + +const { + validateArray, + validateBoolean, + validateBooleanArray, + validateObject, + validateString, + validateStringArray, + validateUnion, +} = require('./internal/validators'); + +const { + kEmptyObject, +} = require('./internal/util'); + +const { + findLongOptionForShort, + isLoneLongOption, + isLoneShortOption, + isLongOptionAndValue, + isOptionValue, + isOptionLikeValue, + isShortOptionAndValue, + isShortOptionGroup, + useDefaultValueOption, + objectGetOwn, + optionsGetOwn, +} = require('./utils'); + +const { + codes: { + ERR_INVALID_ARG_VALUE, + ERR_PARSE_ARGS_INVALID_OPTION_VALUE, + ERR_PARSE_ARGS_UNKNOWN_OPTION, + ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL, + }, +} = require('./internal/errors'); + +function getMainArgs() { + // Work out where to slice process.argv for user supplied arguments. + + // Check node options for scenarios where user CLI args follow executable. + const execArgv = process.execArgv; + if (ArrayPrototypeIncludes(execArgv, '-e') || + ArrayPrototypeIncludes(execArgv, '--eval') || + ArrayPrototypeIncludes(execArgv, '-p') || + ArrayPrototypeIncludes(execArgv, '--print')) { + return ArrayPrototypeSlice(process.argv, 1); + } + + // Normally first two arguments are executable and script, then CLI arguments + return ArrayPrototypeSlice(process.argv, 2); +} + +/** + * In strict mode, throw for possible usage errors like --foo --bar + * + * @param {object} token - from tokens as available from parseArgs + */ +function checkOptionLikeValue(token) { + if (!token.inlineValue && isOptionLikeValue(token.value)) { + // Only show short example if user used short option. + const example = StringPrototypeStartsWith(token.rawName, '--') ? + `'${token.rawName}=-XYZ'` : + `'--${token.name}=-XYZ' or '${token.rawName}-XYZ'`; + const errorMessage = `Option '${token.rawName}' argument is ambiguous. +Did you forget to specify the option argument for '${token.rawName}'? +To specify an option argument starting with a dash use ${example}.`; + throw new ERR_PARSE_ARGS_INVALID_OPTION_VALUE(errorMessage); + } +} + +/** + * In strict mode, throw for usage errors. + * + * @param {object} config - from config passed to parseArgs + * @param {object} token - from tokens as available from parseArgs + */ +function checkOptionUsage(config, token) { + if (!ObjectHasOwn(config.options, token.name)) { + throw new ERR_PARSE_ARGS_UNKNOWN_OPTION( + token.rawName, config.allowPositionals); + } + + const short = optionsGetOwn(config.options, token.name, 'short'); + const shortAndLong = `${short ? `-${short}, ` : ''}--${token.name}`; + const type = optionsGetOwn(config.options, token.name, 'type'); + if (type === 'string' && typeof token.value !== 'string') { + throw new ERR_PARSE_ARGS_INVALID_OPTION_VALUE(`Option '${shortAndLong} ' argument missing`); + } + // (Idiomatic test for undefined||null, expecting undefined.) + if (type === 'boolean' && token.value != null) { + throw new ERR_PARSE_ARGS_INVALID_OPTION_VALUE(`Option '${shortAndLong}' does not take an argument`); + } +} + + +/** + * Store the option value in `values`. + * + * @param {string} longOption - long option name e.g. 'foo' + * @param {string|undefined} optionValue - value from user args + * @param {object} options - option configs, from parseArgs({ options }) + * @param {object} values - option values returned in `values` by parseArgs + */ +function storeOption(longOption, optionValue, options, values) { + if (longOption === '__proto__') { + return; // No. Just no. + } + + // We store based on the option value rather than option type, + // preserving the users intent for author to deal with. + const newValue = optionValue ?? true; + if (optionsGetOwn(options, longOption, 'multiple')) { + // Always store value in array, including for boolean. + // values[longOption] starts out not present, + // first value is added as new array [newValue], + // subsequent values are pushed to existing array. + // (note: values has null prototype, so simpler usage) + if (values[longOption]) { + ArrayPrototypePush(values[longOption], newValue); + } else { + values[longOption] = [newValue]; + } + } else { + values[longOption] = newValue; + } +} + +/** + * Store the default option value in `values`. + * + * @param {string} longOption - long option name e.g. 'foo' + * @param {string + * | boolean + * | string[] + * | boolean[]} optionValue - default value from option config + * @param {object} values - option values returned in `values` by parseArgs + */ +function storeDefaultOption(longOption, optionValue, values) { + if (longOption === '__proto__') { + return; // No. Just no. + } + + values[longOption] = optionValue; +} + +/** + * Process args and turn into identified tokens: + * - option (along with value, if any) + * - positional + * - option-terminator + * + * @param {string[]} args - from parseArgs({ args }) or mainArgs + * @param {object} options - option configs, from parseArgs({ options }) + */ +function argsToTokens(args, options) { + const tokens = []; + let index = -1; + let groupCount = 0; + + const remainingArgs = ArrayPrototypeSlice(args); + while (remainingArgs.length > 0) { + const arg = ArrayPrototypeShift(remainingArgs); + const nextArg = remainingArgs[0]; + if (groupCount > 0) + groupCount--; + else + index++; + + // Check if `arg` is an options terminator. + // Guideline 10 in https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html + if (arg === '--') { + // Everything after a bare '--' is considered a positional argument. + ArrayPrototypePush(tokens, { kind: 'option-terminator', index }); + ArrayPrototypePushApply( + tokens, ArrayPrototypeMap(remainingArgs, (arg) => { + return { kind: 'positional', index: ++index, value: arg }; + }) + ); + break; // Finished processing args, leave while loop. + } + + if (isLoneShortOption(arg)) { + // e.g. '-f' + const shortOption = StringPrototypeCharAt(arg, 1); + const longOption = findLongOptionForShort(shortOption, options); + let value; + let inlineValue; + if (optionsGetOwn(options, longOption, 'type') === 'string' && + isOptionValue(nextArg)) { + // e.g. '-f', 'bar' + value = ArrayPrototypeShift(remainingArgs); + inlineValue = false; + } + ArrayPrototypePush( + tokens, + { kind: 'option', name: longOption, rawName: arg, + index, value, inlineValue }); + if (value != null) ++index; + continue; + } + + if (isShortOptionGroup(arg, options)) { + // Expand -fXzy to -f -X -z -y + const expanded = []; + for (let index = 1; index < arg.length; index++) { + const shortOption = StringPrototypeCharAt(arg, index); + const longOption = findLongOptionForShort(shortOption, options); + if (optionsGetOwn(options, longOption, 'type') !== 'string' || + index === arg.length - 1) { + // Boolean option, or last short in group. Well formed. + ArrayPrototypePush(expanded, `-${shortOption}`); + } else { + // String option in middle. Yuck. + // Expand -abfFILE to -a -b -fFILE + ArrayPrototypePush(expanded, `-${StringPrototypeSlice(arg, index)}`); + break; // finished short group + } + } + ArrayPrototypeUnshiftApply(remainingArgs, expanded); + groupCount = expanded.length; + continue; + } + + if (isShortOptionAndValue(arg, options)) { + // e.g. -fFILE + const shortOption = StringPrototypeCharAt(arg, 1); + const longOption = findLongOptionForShort(shortOption, options); + const value = StringPrototypeSlice(arg, 2); + ArrayPrototypePush( + tokens, + { kind: 'option', name: longOption, rawName: `-${shortOption}`, + index, value, inlineValue: true }); + continue; + } + + if (isLoneLongOption(arg)) { + // e.g. '--foo' + const longOption = StringPrototypeSlice(arg, 2); + let value; + let inlineValue; + if (optionsGetOwn(options, longOption, 'type') === 'string' && + isOptionValue(nextArg)) { + // e.g. '--foo', 'bar' + value = ArrayPrototypeShift(remainingArgs); + inlineValue = false; + } + ArrayPrototypePush( + tokens, + { kind: 'option', name: longOption, rawName: arg, + index, value, inlineValue }); + if (value != null) ++index; + continue; + } + + if (isLongOptionAndValue(arg)) { + // e.g. --foo=bar + const equalIndex = StringPrototypeIndexOf(arg, '='); + const longOption = StringPrototypeSlice(arg, 2, equalIndex); + const value = StringPrototypeSlice(arg, equalIndex + 1); + ArrayPrototypePush( + tokens, + { kind: 'option', name: longOption, rawName: `--${longOption}`, + index, value, inlineValue: true }); + continue; + } + + ArrayPrototypePush(tokens, { kind: 'positional', index, value: arg }); + } + + return tokens; +} + +const parseArgs = (config = kEmptyObject) => { + const args = objectGetOwn(config, 'args') ?? getMainArgs(); + const strict = objectGetOwn(config, 'strict') ?? true; + const allowPositionals = objectGetOwn(config, 'allowPositionals') ?? !strict; + const returnTokens = objectGetOwn(config, 'tokens') ?? false; + const options = objectGetOwn(config, 'options') ?? { __proto__: null }; + // Bundle these up for passing to strict-mode checks. + const parseConfig = { args, strict, options, allowPositionals }; + + // Validate input configuration. + validateArray(args, 'args'); + validateBoolean(strict, 'strict'); + validateBoolean(allowPositionals, 'allowPositionals'); + validateBoolean(returnTokens, 'tokens'); + validateObject(options, 'options'); + ArrayPrototypeForEach( + ObjectEntries(options), + ({ 0: longOption, 1: optionConfig }) => { + validateObject(optionConfig, `options.${longOption}`); + + // type is required + const optionType = objectGetOwn(optionConfig, 'type'); + validateUnion(optionType, `options.${longOption}.type`, ['string', 'boolean']); + + if (ObjectHasOwn(optionConfig, 'short')) { + const shortOption = optionConfig.short; + validateString(shortOption, `options.${longOption}.short`); + if (shortOption.length !== 1) { + throw new ERR_INVALID_ARG_VALUE( + `options.${longOption}.short`, + shortOption, + 'must be a single character' + ); + } + } + + const multipleOption = objectGetOwn(optionConfig, 'multiple'); + if (ObjectHasOwn(optionConfig, 'multiple')) { + validateBoolean(multipleOption, `options.${longOption}.multiple`); + } + + const defaultValue = objectGetOwn(optionConfig, 'default'); + if (defaultValue !== undefined) { + let validator; + switch (optionType) { + case 'string': + validator = multipleOption ? validateStringArray : validateString; + break; + + case 'boolean': + validator = multipleOption ? validateBooleanArray : validateBoolean; + break; + } + validator(defaultValue, `options.${longOption}.default`); + } + } + ); + + // Phase 1: identify tokens + const tokens = argsToTokens(args, options); + + // Phase 2: process tokens into parsed option values and positionals + const result = { + values: { __proto__: null }, + positionals: [], + }; + if (returnTokens) { + result.tokens = tokens; + } + ArrayPrototypeForEach(tokens, (token) => { + if (token.kind === 'option') { + if (strict) { + checkOptionUsage(parseConfig, token); + checkOptionLikeValue(token); + } + storeOption(token.name, token.value, options, result.values); + } else if (token.kind === 'positional') { + if (!allowPositionals) { + throw new ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL(token.value); + } + ArrayPrototypePush(result.positionals, token.value); + } + }); + + // Phase 3: fill in default values for missing args + ArrayPrototypeForEach(ObjectEntries(options), ({ 0: longOption, + 1: optionConfig }) => { + const mustSetDefault = useDefaultValueOption(longOption, + optionConfig, + result.values); + if (mustSetDefault) { + storeDefaultOption(longOption, + objectGetOwn(optionConfig, 'default'), + result.values); + } + }); + + + return result; +}; + +module.exports = { + parseArgs, +}; diff --git a/node_modules/@pkgjs/parseargs/internal/errors.js b/node_modules/@pkgjs/parseargs/internal/errors.js new file mode 100644 index 0000000..e1b237b --- /dev/null +++ b/node_modules/@pkgjs/parseargs/internal/errors.js @@ -0,0 +1,47 @@ +'use strict'; + +class ERR_INVALID_ARG_TYPE extends TypeError { + constructor(name, expected, actual) { + super(`${name} must be ${expected} got ${actual}`); + this.code = 'ERR_INVALID_ARG_TYPE'; + } +} + +class ERR_INVALID_ARG_VALUE extends TypeError { + constructor(arg1, arg2, expected) { + super(`The property ${arg1} ${expected}. Received '${arg2}'`); + this.code = 'ERR_INVALID_ARG_VALUE'; + } +} + +class ERR_PARSE_ARGS_INVALID_OPTION_VALUE extends Error { + constructor(message) { + super(message); + this.code = 'ERR_PARSE_ARGS_INVALID_OPTION_VALUE'; + } +} + +class ERR_PARSE_ARGS_UNKNOWN_OPTION extends Error { + constructor(option, allowPositionals) { + const suggestDashDash = allowPositionals ? `. To specify a positional argument starting with a '-', place it at the end of the command after '--', as in '-- ${JSON.stringify(option)}` : ''; + super(`Unknown option '${option}'${suggestDashDash}`); + this.code = 'ERR_PARSE_ARGS_UNKNOWN_OPTION'; + } +} + +class ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL extends Error { + constructor(positional) { + super(`Unexpected argument '${positional}'. This command does not take positional arguments`); + this.code = 'ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL'; + } +} + +module.exports = { + codes: { + ERR_INVALID_ARG_TYPE, + ERR_INVALID_ARG_VALUE, + ERR_PARSE_ARGS_INVALID_OPTION_VALUE, + ERR_PARSE_ARGS_UNKNOWN_OPTION, + ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL, + } +}; diff --git a/node_modules/@pkgjs/parseargs/internal/primordials.js b/node_modules/@pkgjs/parseargs/internal/primordials.js new file mode 100644 index 0000000..63e23ab --- /dev/null +++ b/node_modules/@pkgjs/parseargs/internal/primordials.js @@ -0,0 +1,393 @@ +/* +This file is copied from https://github.com/nodejs/node/blob/v14.19.3/lib/internal/per_context/primordials.js +under the following license: + +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +*/ + +'use strict'; + +/* eslint-disable node-core/prefer-primordials */ + +// This file subclasses and stores the JS builtins that come from the VM +// so that Node.js's builtin modules do not need to later look these up from +// the global proxy, which can be mutated by users. + +// Use of primordials have sometimes a dramatic impact on performance, please +// benchmark all changes made in performance-sensitive areas of the codebase. +// See: https://github.com/nodejs/node/pull/38248 + +const primordials = {}; + +const { + defineProperty: ReflectDefineProperty, + getOwnPropertyDescriptor: ReflectGetOwnPropertyDescriptor, + ownKeys: ReflectOwnKeys, +} = Reflect; + +// `uncurryThis` is equivalent to `func => Function.prototype.call.bind(func)`. +// It is using `bind.bind(call)` to avoid using `Function.prototype.bind` +// and `Function.prototype.call` after it may have been mutated by users. +const { apply, bind, call } = Function.prototype; +const uncurryThis = bind.bind(call); +primordials.uncurryThis = uncurryThis; + +// `applyBind` is equivalent to `func => Function.prototype.apply.bind(func)`. +// It is using `bind.bind(apply)` to avoid using `Function.prototype.bind` +// and `Function.prototype.apply` after it may have been mutated by users. +const applyBind = bind.bind(apply); +primordials.applyBind = applyBind; + +// Methods that accept a variable number of arguments, and thus it's useful to +// also create `${prefix}${key}Apply`, which uses `Function.prototype.apply`, +// instead of `Function.prototype.call`, and thus doesn't require iterator +// destructuring. +const varargsMethods = [ + // 'ArrayPrototypeConcat' is omitted, because it performs the spread + // on its own for arrays and array-likes with a truthy + // @@isConcatSpreadable symbol property. + 'ArrayOf', + 'ArrayPrototypePush', + 'ArrayPrototypeUnshift', + // 'FunctionPrototypeCall' is omitted, since there's 'ReflectApply' + // and 'FunctionPrototypeApply'. + 'MathHypot', + 'MathMax', + 'MathMin', + 'StringPrototypeConcat', + 'TypedArrayOf', +]; + +function getNewKey(key) { + return typeof key === 'symbol' ? + `Symbol${key.description[7].toUpperCase()}${key.description.slice(8)}` : + `${key[0].toUpperCase()}${key.slice(1)}`; +} + +function copyAccessor(dest, prefix, key, { enumerable, get, set }) { + ReflectDefineProperty(dest, `${prefix}Get${key}`, { + value: uncurryThis(get), + enumerable + }); + if (set !== undefined) { + ReflectDefineProperty(dest, `${prefix}Set${key}`, { + value: uncurryThis(set), + enumerable + }); + } +} + +function copyPropsRenamed(src, dest, prefix) { + for (const key of ReflectOwnKeys(src)) { + const newKey = getNewKey(key); + const desc = ReflectGetOwnPropertyDescriptor(src, key); + if ('get' in desc) { + copyAccessor(dest, prefix, newKey, desc); + } else { + const name = `${prefix}${newKey}`; + ReflectDefineProperty(dest, name, desc); + if (varargsMethods.includes(name)) { + ReflectDefineProperty(dest, `${name}Apply`, { + // `src` is bound as the `this` so that the static `this` points + // to the object it was defined on, + // e.g.: `ArrayOfApply` gets a `this` of `Array`: + value: applyBind(desc.value, src), + }); + } + } + } +} + +function copyPropsRenamedBound(src, dest, prefix) { + for (const key of ReflectOwnKeys(src)) { + const newKey = getNewKey(key); + const desc = ReflectGetOwnPropertyDescriptor(src, key); + if ('get' in desc) { + copyAccessor(dest, prefix, newKey, desc); + } else { + const { value } = desc; + if (typeof value === 'function') { + desc.value = value.bind(src); + } + + const name = `${prefix}${newKey}`; + ReflectDefineProperty(dest, name, desc); + if (varargsMethods.includes(name)) { + ReflectDefineProperty(dest, `${name}Apply`, { + value: applyBind(value, src), + }); + } + } + } +} + +function copyPrototype(src, dest, prefix) { + for (const key of ReflectOwnKeys(src)) { + const newKey = getNewKey(key); + const desc = ReflectGetOwnPropertyDescriptor(src, key); + if ('get' in desc) { + copyAccessor(dest, prefix, newKey, desc); + } else { + const { value } = desc; + if (typeof value === 'function') { + desc.value = uncurryThis(value); + } + + const name = `${prefix}${newKey}`; + ReflectDefineProperty(dest, name, desc); + if (varargsMethods.includes(name)) { + ReflectDefineProperty(dest, `${name}Apply`, { + value: applyBind(value), + }); + } + } + } +} + +// Create copies of configurable value properties of the global object +[ + 'Proxy', + 'globalThis', +].forEach((name) => { + // eslint-disable-next-line no-restricted-globals + primordials[name] = globalThis[name]; +}); + +// Create copies of URI handling functions +[ + decodeURI, + decodeURIComponent, + encodeURI, + encodeURIComponent, +].forEach((fn) => { + primordials[fn.name] = fn; +}); + +// Create copies of the namespace objects +[ + 'JSON', + 'Math', + 'Proxy', + 'Reflect', +].forEach((name) => { + // eslint-disable-next-line no-restricted-globals + copyPropsRenamed(global[name], primordials, name); +}); + +// Create copies of intrinsic objects +[ + 'Array', + 'ArrayBuffer', + 'BigInt', + 'BigInt64Array', + 'BigUint64Array', + 'Boolean', + 'DataView', + 'Date', + 'Error', + 'EvalError', + 'Float32Array', + 'Float64Array', + 'Function', + 'Int16Array', + 'Int32Array', + 'Int8Array', + 'Map', + 'Number', + 'Object', + 'RangeError', + 'ReferenceError', + 'RegExp', + 'Set', + 'String', + 'Symbol', + 'SyntaxError', + 'TypeError', + 'URIError', + 'Uint16Array', + 'Uint32Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'WeakMap', + 'WeakSet', +].forEach((name) => { + // eslint-disable-next-line no-restricted-globals + const original = global[name]; + primordials[name] = original; + copyPropsRenamed(original, primordials, name); + copyPrototype(original.prototype, primordials, `${name}Prototype`); +}); + +// Create copies of intrinsic objects that require a valid `this` to call +// static methods. +// Refs: https://www.ecma-international.org/ecma-262/#sec-promise.all +[ + 'Promise', +].forEach((name) => { + // eslint-disable-next-line no-restricted-globals + const original = global[name]; + primordials[name] = original; + copyPropsRenamedBound(original, primordials, name); + copyPrototype(original.prototype, primordials, `${name}Prototype`); +}); + +// Create copies of abstract intrinsic objects that are not directly exposed +// on the global object. +// Refs: https://tc39.es/ecma262/#sec-%typedarray%-intrinsic-object +[ + { name: 'TypedArray', original: Reflect.getPrototypeOf(Uint8Array) }, + { name: 'ArrayIterator', original: { + prototype: Reflect.getPrototypeOf(Array.prototype[Symbol.iterator]()), + } }, + { name: 'StringIterator', original: { + prototype: Reflect.getPrototypeOf(String.prototype[Symbol.iterator]()), + } }, +].forEach(({ name, original }) => { + primordials[name] = original; + // The static %TypedArray% methods require a valid `this`, but can't be bound, + // as they need a subclass constructor as the receiver: + copyPrototype(original, primordials, name); + copyPrototype(original.prototype, primordials, `${name}Prototype`); +}); + +/* eslint-enable node-core/prefer-primordials */ + +const { + ArrayPrototypeForEach, + FunctionPrototypeCall, + Map, + ObjectFreeze, + ObjectSetPrototypeOf, + Set, + SymbolIterator, + WeakMap, + WeakSet, +} = primordials; + +// Because these functions are used by `makeSafe`, which is exposed +// on the `primordials` object, it's important to use const references +// to the primordials that they use: +const createSafeIterator = (factory, next) => { + class SafeIterator { + constructor(iterable) { + this._iterator = factory(iterable); + } + next() { + return next(this._iterator); + } + [SymbolIterator]() { + return this; + } + } + ObjectSetPrototypeOf(SafeIterator.prototype, null); + ObjectFreeze(SafeIterator.prototype); + ObjectFreeze(SafeIterator); + return SafeIterator; +}; + +primordials.SafeArrayIterator = createSafeIterator( + primordials.ArrayPrototypeSymbolIterator, + primordials.ArrayIteratorPrototypeNext +); +primordials.SafeStringIterator = createSafeIterator( + primordials.StringPrototypeSymbolIterator, + primordials.StringIteratorPrototypeNext +); + +const copyProps = (src, dest) => { + ArrayPrototypeForEach(ReflectOwnKeys(src), (key) => { + if (!ReflectGetOwnPropertyDescriptor(dest, key)) { + ReflectDefineProperty( + dest, + key, + ReflectGetOwnPropertyDescriptor(src, key)); + } + }); +}; + +const makeSafe = (unsafe, safe) => { + if (SymbolIterator in unsafe.prototype) { + const dummy = new unsafe(); + let next; // We can reuse the same `next` method. + + ArrayPrototypeForEach(ReflectOwnKeys(unsafe.prototype), (key) => { + if (!ReflectGetOwnPropertyDescriptor(safe.prototype, key)) { + const desc = ReflectGetOwnPropertyDescriptor(unsafe.prototype, key); + if ( + typeof desc.value === 'function' && + desc.value.length === 0 && + SymbolIterator in (FunctionPrototypeCall(desc.value, dummy) ?? {}) + ) { + const createIterator = uncurryThis(desc.value); + next = next ?? uncurryThis(createIterator(dummy).next); + const SafeIterator = createSafeIterator(createIterator, next); + desc.value = function() { + return new SafeIterator(this); + }; + } + ReflectDefineProperty(safe.prototype, key, desc); + } + }); + } else { + copyProps(unsafe.prototype, safe.prototype); + } + copyProps(unsafe, safe); + + ObjectSetPrototypeOf(safe.prototype, null); + ObjectFreeze(safe.prototype); + ObjectFreeze(safe); + return safe; +}; +primordials.makeSafe = makeSafe; + +// Subclass the constructors because we need to use their prototype +// methods later. +// Defining the `constructor` is necessary here to avoid the default +// constructor which uses the user-mutable `%ArrayIteratorPrototype%.next`. +primordials.SafeMap = makeSafe( + Map, + class SafeMap extends Map { + constructor(i) { super(i); } // eslint-disable-line no-useless-constructor + } +); +primordials.SafeWeakMap = makeSafe( + WeakMap, + class SafeWeakMap extends WeakMap { + constructor(i) { super(i); } // eslint-disable-line no-useless-constructor + } +); +primordials.SafeSet = makeSafe( + Set, + class SafeSet extends Set { + constructor(i) { super(i); } // eslint-disable-line no-useless-constructor + } +); +primordials.SafeWeakSet = makeSafe( + WeakSet, + class SafeWeakSet extends WeakSet { + constructor(i) { super(i); } // eslint-disable-line no-useless-constructor + } +); + +ObjectSetPrototypeOf(primordials, null); +ObjectFreeze(primordials); + +module.exports = primordials; diff --git a/node_modules/@pkgjs/parseargs/internal/util.js b/node_modules/@pkgjs/parseargs/internal/util.js new file mode 100644 index 0000000..b9b8fe5 --- /dev/null +++ b/node_modules/@pkgjs/parseargs/internal/util.js @@ -0,0 +1,14 @@ +'use strict'; + +// This is a placeholder for util.js in node.js land. + +const { + ObjectCreate, + ObjectFreeze, +} = require('./primordials'); + +const kEmptyObject = ObjectFreeze(ObjectCreate(null)); + +module.exports = { + kEmptyObject, +}; diff --git a/node_modules/@pkgjs/parseargs/internal/validators.js b/node_modules/@pkgjs/parseargs/internal/validators.js new file mode 100644 index 0000000..b5ac4fb --- /dev/null +++ b/node_modules/@pkgjs/parseargs/internal/validators.js @@ -0,0 +1,89 @@ +'use strict'; + +// This file is a proxy of the original file located at: +// https://github.com/nodejs/node/blob/main/lib/internal/validators.js +// Every addition or modification to this file must be evaluated +// during the PR review. + +const { + ArrayIsArray, + ArrayPrototypeIncludes, + ArrayPrototypeJoin, +} = require('./primordials'); + +const { + codes: { + ERR_INVALID_ARG_TYPE + } +} = require('./errors'); + +function validateString(value, name) { + if (typeof value !== 'string') { + throw new ERR_INVALID_ARG_TYPE(name, 'String', value); + } +} + +function validateUnion(value, name, union) { + if (!ArrayPrototypeIncludes(union, value)) { + throw new ERR_INVALID_ARG_TYPE(name, `('${ArrayPrototypeJoin(union, '|')}')`, value); + } +} + +function validateBoolean(value, name) { + if (typeof value !== 'boolean') { + throw new ERR_INVALID_ARG_TYPE(name, 'Boolean', value); + } +} + +function validateArray(value, name) { + if (!ArrayIsArray(value)) { + throw new ERR_INVALID_ARG_TYPE(name, 'Array', value); + } +} + +function validateStringArray(value, name) { + validateArray(value, name); + for (let i = 0; i < value.length; i++) { + validateString(value[i], `${name}[${i}]`); + } +} + +function validateBooleanArray(value, name) { + validateArray(value, name); + for (let i = 0; i < value.length; i++) { + validateBoolean(value[i], `${name}[${i}]`); + } +} + +/** + * @param {unknown} value + * @param {string} name + * @param {{ + * allowArray?: boolean, + * allowFunction?: boolean, + * nullable?: boolean + * }} [options] + */ +function validateObject(value, name, options) { + const useDefaultOptions = options == null; + const allowArray = useDefaultOptions ? false : options.allowArray; + const allowFunction = useDefaultOptions ? false : options.allowFunction; + const nullable = useDefaultOptions ? false : options.nullable; + if ((!nullable && value === null) || + (!allowArray && ArrayIsArray(value)) || + (typeof value !== 'object' && ( + !allowFunction || typeof value !== 'function' + ))) { + throw new ERR_INVALID_ARG_TYPE(name, 'Object', value); + } +} + +module.exports = { + validateArray, + validateObject, + validateString, + validateStringArray, + validateUnion, + validateBoolean, + validateBooleanArray, +}; diff --git a/node_modules/@pkgjs/parseargs/package.json b/node_modules/@pkgjs/parseargs/package.json new file mode 100644 index 0000000..0bcc05c --- /dev/null +++ b/node_modules/@pkgjs/parseargs/package.json @@ -0,0 +1,36 @@ +{ + "name": "@pkgjs/parseargs", + "version": "0.11.0", + "description": "Polyfill of future proposal for `util.parseArgs()`", + "engines": { + "node": ">=14" + }, + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "coverage": "c8 --check-coverage tape 'test/*.js'", + "test": "c8 tape 'test/*.js'", + "posttest": "eslint .", + "fix": "npm run posttest -- --fix" + }, + "repository": { + "type": "git", + "url": "git@github.com:pkgjs/parseargs.git" + }, + "keywords": [], + "author": "", + "license": "MIT", + "bugs": { + "url": "https://github.com/pkgjs/parseargs/issues" + }, + "homepage": "https://github.com/pkgjs/parseargs#readme", + "devDependencies": { + "c8": "^7.10.0", + "eslint": "^8.2.0", + "eslint-plugin-node-core": "iansu/eslint-plugin-node-core", + "tape": "^5.2.2" + } +} diff --git a/node_modules/@pkgjs/parseargs/utils.js b/node_modules/@pkgjs/parseargs/utils.js new file mode 100644 index 0000000..d7f420a --- /dev/null +++ b/node_modules/@pkgjs/parseargs/utils.js @@ -0,0 +1,198 @@ +'use strict'; + +const { + ArrayPrototypeFind, + ObjectEntries, + ObjectPrototypeHasOwnProperty: ObjectHasOwn, + StringPrototypeCharAt, + StringPrototypeIncludes, + StringPrototypeStartsWith, +} = require('./internal/primordials'); + +const { + validateObject, +} = require('./internal/validators'); + +// These are internal utilities to make the parsing logic easier to read, and +// add lots of detail for the curious. They are in a separate file to allow +// unit testing, although that is not essential (this could be rolled into +// main file and just tested implicitly via API). +// +// These routines are for internal use, not for export to client. + +/** + * Return the named property, but only if it is an own property. + */ +function objectGetOwn(obj, prop) { + if (ObjectHasOwn(obj, prop)) + return obj[prop]; +} + +/** + * Return the named options property, but only if it is an own property. + */ +function optionsGetOwn(options, longOption, prop) { + if (ObjectHasOwn(options, longOption)) + return objectGetOwn(options[longOption], prop); +} + +/** + * Determines if the argument may be used as an option value. + * @example + * isOptionValue('V') // returns true + * isOptionValue('-v') // returns true (greedy) + * isOptionValue('--foo') // returns true (greedy) + * isOptionValue(undefined) // returns false + */ +function isOptionValue(value) { + if (value == null) return false; + + // Open Group Utility Conventions are that an option-argument + // is the argument after the option, and may start with a dash. + return true; // greedy! +} + +/** + * Detect whether there is possible confusion and user may have omitted + * the option argument, like `--port --verbose` when `port` of type:string. + * In strict mode we throw errors if value is option-like. + */ +function isOptionLikeValue(value) { + if (value == null) return false; + + return value.length > 1 && StringPrototypeCharAt(value, 0) === '-'; +} + +/** + * Determines if `arg` is just a short option. + * @example '-f' + */ +function isLoneShortOption(arg) { + return arg.length === 2 && + StringPrototypeCharAt(arg, 0) === '-' && + StringPrototypeCharAt(arg, 1) !== '-'; +} + +/** + * Determines if `arg` is a lone long option. + * @example + * isLoneLongOption('a') // returns false + * isLoneLongOption('-a') // returns false + * isLoneLongOption('--foo') // returns true + * isLoneLongOption('--foo=bar') // returns false + */ +function isLoneLongOption(arg) { + return arg.length > 2 && + StringPrototypeStartsWith(arg, '--') && + !StringPrototypeIncludes(arg, '=', 3); +} + +/** + * Determines if `arg` is a long option and value in the same argument. + * @example + * isLongOptionAndValue('--foo') // returns false + * isLongOptionAndValue('--foo=bar') // returns true + */ +function isLongOptionAndValue(arg) { + return arg.length > 2 && + StringPrototypeStartsWith(arg, '--') && + StringPrototypeIncludes(arg, '=', 3); +} + +/** + * Determines if `arg` is a short option group. + * + * See Guideline 5 of the [Open Group Utility Conventions](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html). + * One or more options without option-arguments, followed by at most one + * option that takes an option-argument, should be accepted when grouped + * behind one '-' delimiter. + * @example + * isShortOptionGroup('-a', {}) // returns false + * isShortOptionGroup('-ab', {}) // returns true + * // -fb is an option and a value, not a short option group + * isShortOptionGroup('-fb', { + * options: { f: { type: 'string' } } + * }) // returns false + * isShortOptionGroup('-bf', { + * options: { f: { type: 'string' } } + * }) // returns true + * // -bfb is an edge case, return true and caller sorts it out + * isShortOptionGroup('-bfb', { + * options: { f: { type: 'string' } } + * }) // returns true + */ +function isShortOptionGroup(arg, options) { + if (arg.length <= 2) return false; + if (StringPrototypeCharAt(arg, 0) !== '-') return false; + if (StringPrototypeCharAt(arg, 1) === '-') return false; + + const firstShort = StringPrototypeCharAt(arg, 1); + const longOption = findLongOptionForShort(firstShort, options); + return optionsGetOwn(options, longOption, 'type') !== 'string'; +} + +/** + * Determine if arg is a short string option followed by its value. + * @example + * isShortOptionAndValue('-a', {}); // returns false + * isShortOptionAndValue('-ab', {}); // returns false + * isShortOptionAndValue('-fFILE', { + * options: { foo: { short: 'f', type: 'string' }} + * }) // returns true + */ +function isShortOptionAndValue(arg, options) { + validateObject(options, 'options'); + + if (arg.length <= 2) return false; + if (StringPrototypeCharAt(arg, 0) !== '-') return false; + if (StringPrototypeCharAt(arg, 1) === '-') return false; + + const shortOption = StringPrototypeCharAt(arg, 1); + const longOption = findLongOptionForShort(shortOption, options); + return optionsGetOwn(options, longOption, 'type') === 'string'; +} + +/** + * Find the long option associated with a short option. Looks for a configured + * `short` and returns the short option itself if a long option is not found. + * @example + * findLongOptionForShort('a', {}) // returns 'a' + * findLongOptionForShort('b', { + * options: { bar: { short: 'b' } } + * }) // returns 'bar' + */ +function findLongOptionForShort(shortOption, options) { + validateObject(options, 'options'); + const longOptionEntry = ArrayPrototypeFind( + ObjectEntries(options), + ({ 1: optionConfig }) => objectGetOwn(optionConfig, 'short') === shortOption + ); + return longOptionEntry?.[0] ?? shortOption; +} + +/** + * Check if the given option includes a default value + * and that option has not been set by the input args. + * + * @param {string} longOption - long option name e.g. 'foo' + * @param {object} optionConfig - the option configuration properties + * @param {object} values - option values returned in `values` by parseArgs + */ +function useDefaultValueOption(longOption, optionConfig, values) { + return objectGetOwn(optionConfig, 'default') !== undefined && + values[longOption] === undefined; +} + +module.exports = { + findLongOptionForShort, + isLoneLongOption, + isLoneShortOption, + isLongOptionAndValue, + isOptionValue, + isOptionLikeValue, + isShortOptionAndValue, + isShortOptionGroup, + useDefaultValueOption, + objectGetOwn, + optionsGetOwn, +}; diff --git a/node_modules/@polka/url/build.js b/node_modules/@polka/url/build.js new file mode 100644 index 0000000..a945343 --- /dev/null +++ b/node_modules/@polka/url/build.js @@ -0,0 +1,49 @@ +const qs = require('querystring'); + +/** + * @typedef ParsedURL + * @type {import('.').ParsedURL} + */ + +/** + * @typedef Request + * @property {string} url + * @property {ParsedURL} _parsedUrl + */ + +/** + * @param {Request} req + * @returns {ParsedURL|void} + */ +function parse(req) { + let raw = req.url; + if (raw == null) return; + + let prev = req._parsedUrl; + if (prev && prev.raw === raw) return prev; + + let pathname=raw, search='', query, hash; + + if (raw.length > 1) { + let idx = raw.indexOf('#', 1); + + if (idx !== -1) { + hash = raw.substring(idx); + pathname = raw.substring(0, idx); + } + + idx = pathname.indexOf('?', 1); + + if (idx !== -1) { + search = pathname.substring(idx); + pathname = pathname.substring(0, idx); + if (search.length > 1) { + query = qs.parse(search.substring(1)); + } + } + } + + return req._parsedUrl = { pathname, search, query, hash, raw }; +} + +exports.parse = parse; \ No newline at end of file diff --git a/node_modules/@polka/url/build.mjs b/node_modules/@polka/url/build.mjs new file mode 100644 index 0000000..48ccfaa --- /dev/null +++ b/node_modules/@polka/url/build.mjs @@ -0,0 +1,47 @@ +import * as qs from 'node:querystring'; + +/** + * @typedef ParsedURL + * @type {import('.').ParsedURL} + */ + +/** + * @typedef Request + * @property {string} url + * @property {ParsedURL} _parsedUrl + */ + +/** + * @param {Request} req + * @returns {ParsedURL|void} + */ +export function parse(req) { + let raw = req.url; + if (raw == null) return; + + let prev = req._parsedUrl; + if (prev && prev.raw === raw) return prev; + + let pathname=raw, search='', query, hash; + + if (raw.length > 1) { + let idx = raw.indexOf('#', 1); + + if (idx !== -1) { + hash = raw.substring(idx); + pathname = raw.substring(0, idx); + } + + idx = pathname.indexOf('?', 1); + + if (idx !== -1) { + search = pathname.substring(idx); + pathname = pathname.substring(0, idx); + if (search.length > 1) { + query = qs.parse(search.substring(1)); + } + } + } + + return req._parsedUrl = { pathname, search, query, hash, raw }; +} diff --git a/node_modules/@polka/url/index.d.ts b/node_modules/@polka/url/index.d.ts new file mode 100644 index 0000000..46ecac2 --- /dev/null +++ b/node_modules/@polka/url/index.d.ts @@ -0,0 +1,11 @@ +import type { IncomingMessage } from 'http'; + +export interface ParsedURL { + pathname: string; + search: string; + query: Record | undefined; + hash: string | undefined; + raw: string; +} + +export function parse(req: IncomingMessage): ParsedURL; diff --git a/node_modules/@polka/url/package.json b/node_modules/@polka/url/package.json new file mode 100644 index 0000000..d594ee7 --- /dev/null +++ b/node_modules/@polka/url/package.json @@ -0,0 +1,30 @@ +{ + "version": "1.0.0-next.29", + "name": "@polka/url", + "repository": "lukeed/polka", + "description": "Super fast, memoized `req.url` parser", + "module": "build.mjs", + "types": "index.d.ts", + "main": "build.js", + "license": "MIT", + "exports": { + ".": { + "types": "./index.d.ts", + "import": "./build.mjs", + "require": "./build.js" + }, + "./package.json": "./package.json" + }, + "files": [ + "build.*", + "index.d.*" + ], + "author": { + "name": "Luke Edwards", + "email": "luke@lukeed.com", + "url": "https://lukeed.com" + }, + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/node_modules/@polka/url/readme.md b/node_modules/@polka/url/readme.md new file mode 100644 index 0000000..e47645c --- /dev/null +++ b/node_modules/@polka/url/readme.md @@ -0,0 +1,68 @@ +# @polka/url [![npm](https://badgen.now.sh/npm/v/@polka/url)](https://npmjs.org/package/@polka/url) [![licenses](https://licenses.dev/b/npm/%40polka%2Furl)](https://licenses.dev/npm/%40polka%2Furl) + +> Super fast, memoized `req.url` parser; _not_ limited to [Polka][polka]! + +Parses the `url` from a [`IncomingMessage`](https://nodejs.org/api/http.html#http_class_http_incomingmessage) request. The returned object will always only contain the following keys: `search`, `query`, `pathname`, and `raw`. + +> **Note:** This library does not process `protocol`, `hostname`, `port`, etc.
This is because the incoming `req.url` value only begins with the path information. + +Parsed requests will be mutated with a `_parsedUrl` key, containing the returned output. This is used for future memoization, avoiding the need to fully parse the same `url` value multiple times. + +## Install + +``` +$ npm install --save @polka/url +``` + +## Usage + +```js +const parse = require('@polka/url'); + +let req = { + url: '/foo/bar?fizz=buzz' +}; +let output = parse(req); +//=> { +//=> pathname: '/foo/bar', +//=> raw: '/foo/bar?fizz=buzz', +//=> search: '?fizz=buzz', +//=> query: { +//=> fizz: 'buzz' +//=> }, +//=> } + +// Attaches result for future memoization +assert.deepEqual(output, req._parsedUrl); //=> true +``` + +## API + +### url(req) +Returns: `Object` or `undefined` + +> **Important:** The `req` must have a `url` key, otherwise `undefined` will be returned.
If no input is provided at all, a `TypeError` will be thrown. + +#### req +Type: `IncomingMessage` or `{ url: string }` + +The incoming HTTP request (`req`) or a plain `Object` with a `url` key. + +> **Note:** In Node.js servers, the [`req.url`](https://nodejs.org/api/http.html#http_message_url) begins with a pathname & does not include a `hash`. + + +## Benchmarks + +Check out the [`bench`](/bench) directory for in-depth benchmark results and comparisons. + + +## Support + +Any issues or questions can be sent to the [Polka][polka] repository.
However, please specify that your inquiry is about `@polka/url` specifically. + + +## License + +MIT © [Luke Edwards](https://lukeed.com) + +[polka]: https://github.com/lukeed/polka diff --git a/node_modules/@rollup/pluginutils/LICENSE b/node_modules/@rollup/pluginutils/LICENSE new file mode 100644 index 0000000..5e46702 --- /dev/null +++ b/node_modules/@rollup/pluginutils/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/@rollup/pluginutils/README.md b/node_modules/@rollup/pluginutils/README.md new file mode 100644 index 0000000..90e9d67 --- /dev/null +++ b/node_modules/@rollup/pluginutils/README.md @@ -0,0 +1,294 @@ +[npm]: https://img.shields.io/npm/v/@rollup/pluginutils +[npm-url]: https://www.npmjs.com/package/@rollup/pluginutils +[size]: https://packagephobia.now.sh/badge?p=@rollup/pluginutils +[size-url]: https://packagephobia.now.sh/result?p=@rollup/pluginutils + +[![npm][npm]][npm-url] +[![size][size]][size-url] +[![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com) + +# @rollup/pluginutils + +A set of utility functions commonly used by 🍣 Rollup plugins. + +## Requirements + +The plugin utils require an [LTS](https://github.com/nodejs/Release) Node version (v14.0.0+) and Rollup v1.20.0+. + +## Install + +Using npm: + +```console +npm install @rollup/pluginutils --save-dev +``` + +## Usage + +```js +import utils from '@rollup/pluginutils'; +//... +``` + +## API + +Available utility functions are listed below: + +_Note: Parameter names immediately followed by a `?` indicate that the parameter is optional._ + +### addExtension + +Adds an extension to a module ID if one does not exist. + +Parameters: `(filename: String, ext?: String)`
+Returns: `String` + +```js +import { addExtension } from '@rollup/pluginutils'; + +export default function myPlugin(options = {}) { + return { + resolveId(code, id) { + // only adds an extension if there isn't one already + id = addExtension(id); // `foo` -> `foo.js`, `foo.js` -> `foo.js` + id = addExtension(id, '.myext'); // `foo` -> `foo.myext`, `foo.js` -> `foo.js` + } + }; +} +``` + +### attachScopes + +Attaches `Scope` objects to the relevant nodes of an AST. Each `Scope` object has a `scope.contains(name)` method that returns `true` if a given name is defined in the current scope or a parent scope. + +Parameters: `(ast: Node, propertyName?: String)`
+Returns: `Object` + +See [@rollup/plugin-inject](https://github.com/rollup/plugins/tree/master/packages/inject) or [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/master/packages/commonjs) for an example of usage. + +```js +import { attachScopes } from '@rollup/pluginutils'; +import { walk } from 'estree-walker'; + +export default function myPlugin(options = {}) { + return { + transform(code) { + const ast = this.parse(code); + + let scope = attachScopes(ast, 'scope'); + + walk(ast, { + enter(node) { + if (node.scope) scope = node.scope; + + if (!scope.contains('foo')) { + // `foo` is not defined, so if we encounter it, + // we assume it's a global + } + }, + leave(node) { + if (node.scope) scope = scope.parent; + } + }); + } + }; +} +``` + +### createFilter + +Constructs a filter function which can be used to determine whether or not certain modules should be operated upon. + +Parameters: `(include?: , exclude?: , options?: Object)`
+Returns: `(id: string | unknown) => boolean` + +#### `include` and `exclude` + +Type: `String | RegExp | Array[...String|RegExp]`
+ +A valid [`picomatch`](https://github.com/micromatch/picomatch#globbing-features) pattern, or array of patterns. If `options.include` is omitted or has zero length, filter will return `true` by default. Otherwise, an ID must match one or more of the `picomatch` patterns, and must not match any of the `options.exclude` patterns. + +Note that `picomatch` patterns are very similar to [`minimatch`](https://github.com/isaacs/minimatch#readme) patterns, and in most use cases, they are interchangeable. If you have more specific pattern matching needs, you can view [this comparison table](https://github.com/micromatch/picomatch#library-comparisons) to learn more about where the libraries differ. + +#### `options` + +##### `resolve` + +Type: `String | Boolean | null` + +Optionally resolves the patterns against a directory other than `process.cwd()`. If a `String` is specified, then the value will be used as the base directory. Relative paths will be resolved against `process.cwd()` first. If `false`, then the patterns will not be resolved against any directory. This can be useful if you want to create a filter for virtual module names. + +#### Usage + +```js +import { createFilter } from '@rollup/pluginutils'; + +export default function myPlugin(options = {}) { + // assume that the myPlugin accepts options of `options.include` and `options.exclude` + var filter = createFilter(options.include, options.exclude, { + resolve: '/my/base/dir' + }); + + return { + transform(code, id) { + if (!filter(id)) return; + + // proceed with the transformation... + } + }; +} +``` + +### dataToEsm + +Transforms objects into tree-shakable ES Module imports. + +Parameters: `(data: Object, options: DataToEsmOptions)`
+Returns: `String` + +#### `data` + +Type: `Object` + +An object to transform into an ES module. + +#### `options` + +Type: `DataToEsmOptions` + +_Note: Please see the TypeScript definition for complete documentation of these options_ + +#### Usage + +```js +import { dataToEsm } from '@rollup/pluginutils'; + +const esModuleSource = dataToEsm( + { + custom: 'data', + to: ['treeshake'] + }, + { + compact: false, + indent: '\t', + preferConst: true, + objectShorthand: true, + namedExports: true, + includeArbitraryNames: false + } +); +/* +Outputs the string ES module source: + export const custom = 'data'; + export const to = ['treeshake']; + export default { custom, to }; +*/ +``` + +### extractAssignedNames + +Extracts the names of all assignment targets based upon specified patterns. + +Parameters: `(param: Node)`
+Returns: `Array[...String]` + +#### `param` + +Type: `Node` + +An `acorn` AST Node. + +#### Usage + +```js +import { extractAssignedNames } from '@rollup/pluginutils'; +import { walk } from 'estree-walker'; + +export default function myPlugin(options = {}) { + return { + transform(code) { + const ast = this.parse(code); + + walk(ast, { + enter(node) { + if (node.type === 'VariableDeclarator') { + const declaredNames = extractAssignedNames(node.id); + // do something with the declared names + // e.g. for `const {x, y: z} = ...` => declaredNames = ['x', 'z'] + } + } + }); + } + }; +} +``` + +### exactRegex + +Constructs a RegExp that matches the exact string specified. This is useful for plugin hook filters. + +Parameters: `(str: String, flags?: String)`
+Returns: `RegExp` + +#### Usage + +```js +import { exactRegex } from '@rollup/pluginutils'; + +exactRegex('foobar'); // /^foobar$/ +exactRegex('foo(bar)', 'i'); // /^foo\(bar\)$/i +``` + +### makeLegalIdentifier + +Constructs a bundle-safe identifier from a `String`. + +Parameters: `(str: String)`
+Returns: `String` + +#### Usage + +```js +import { makeLegalIdentifier } from '@rollup/pluginutils'; + +makeLegalIdentifier('foo-bar'); // 'foo_bar' +makeLegalIdentifier('typeof'); // '_typeof' +``` + +### normalizePath + +Converts path separators to forward slash. + +Parameters: `(filename: String)`
+Returns: `String` + +#### Usage + +```js +import { normalizePath } from '@rollup/pluginutils'; + +normalizePath('foo\\bar'); // 'foo/bar' +normalizePath('foo/bar'); // 'foo/bar' +``` + +### prefixRegex + +Constructs a RegExp that matches a value that has the specified prefix. This is useful for plugin hook filters. + +Parameters: `(str: String, flags?: String)`
+Returns: `RegExp` + +#### Usage + +```js +import { prefixRegex } from '@rollup/pluginutils'; + +prefixRegex('foobar'); // /^foobar/ +prefixRegex('foo(bar)', 'i'); // /^foo\(bar\)/i +``` + +## Meta + +[CONTRIBUTING](/.github/CONTRIBUTING.md) + +[LICENSE (MIT)](/LICENSE) diff --git a/node_modules/@rollup/pluginutils/dist/cjs/index.js b/node_modules/@rollup/pluginutils/dist/cjs/index.js new file mode 100644 index 0000000..d74c86d --- /dev/null +++ b/node_modules/@rollup/pluginutils/dist/cjs/index.js @@ -0,0 +1,392 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var path = require('path'); +var estreeWalker = require('estree-walker'); +var pm = require('picomatch'); + +const addExtension = function addExtension(filename, ext = '.js') { + let result = `${filename}`; + if (!path.extname(filename)) + result += ext; + return result; +}; + +const extractors = { + ArrayPattern(names, param) { + for (const element of param.elements) { + if (element) + extractors[element.type](names, element); + } + }, + AssignmentPattern(names, param) { + extractors[param.left.type](names, param.left); + }, + Identifier(names, param) { + names.push(param.name); + }, + MemberExpression() { }, + ObjectPattern(names, param) { + for (const prop of param.properties) { + // @ts-ignore Typescript reports that this is not a valid type + if (prop.type === 'RestElement') { + extractors.RestElement(names, prop); + } + else { + extractors[prop.value.type](names, prop.value); + } + } + }, + RestElement(names, param) { + extractors[param.argument.type](names, param.argument); + } +}; +const extractAssignedNames = function extractAssignedNames(param) { + const names = []; + extractors[param.type](names, param); + return names; +}; + +const blockDeclarations = { + const: true, + let: true +}; +class Scope { + constructor(options = {}) { + this.parent = options.parent; + this.isBlockScope = !!options.block; + this.declarations = Object.create(null); + if (options.params) { + options.params.forEach((param) => { + extractAssignedNames(param).forEach((name) => { + this.declarations[name] = true; + }); + }); + } + } + addDeclaration(node, isBlockDeclaration, isVar) { + if (!isBlockDeclaration && this.isBlockScope) { + // it's a `var` or function node, and this + // is a block scope, so we need to go up + this.parent.addDeclaration(node, isBlockDeclaration, isVar); + } + else if (node.id) { + extractAssignedNames(node.id).forEach((name) => { + this.declarations[name] = true; + }); + } + } + contains(name) { + return this.declarations[name] || (this.parent ? this.parent.contains(name) : false); + } +} +const attachScopes = function attachScopes(ast, propertyName = 'scope') { + let scope = new Scope(); + estreeWalker.walk(ast, { + enter(n, parent) { + const node = n; + // function foo () {...} + // class Foo {...} + if (/(?:Function|Class)Declaration/.test(node.type)) { + scope.addDeclaration(node, false, false); + } + // var foo = 1 + if (node.type === 'VariableDeclaration') { + const { kind } = node; + const isBlockDeclaration = blockDeclarations[kind]; + node.declarations.forEach((declaration) => { + scope.addDeclaration(declaration, isBlockDeclaration, true); + }); + } + let newScope; + // create new function scope + if (node.type.includes('Function')) { + const func = node; + newScope = new Scope({ + parent: scope, + block: false, + params: func.params + }); + // named function expressions - the name is considered + // part of the function's scope + if (func.type === 'FunctionExpression' && func.id) { + newScope.addDeclaration(func, false, false); + } + } + // create new for scope + if (/For(?:In|Of)?Statement/.test(node.type)) { + newScope = new Scope({ + parent: scope, + block: true + }); + } + // create new block scope + if (node.type === 'BlockStatement' && !parent.type.includes('Function')) { + newScope = new Scope({ + parent: scope, + block: true + }); + } + // catch clause has its own block scope + if (node.type === 'CatchClause') { + newScope = new Scope({ + parent: scope, + params: node.param ? [node.param] : [], + block: true + }); + } + if (newScope) { + Object.defineProperty(node, propertyName, { + value: newScope, + configurable: true + }); + scope = newScope; + } + }, + leave(n) { + const node = n; + if (node[propertyName]) + scope = scope.parent; + } + }); + return scope; +}; + +// Helper since Typescript can't detect readonly arrays with Array.isArray +function isArray(arg) { + return Array.isArray(arg); +} +function ensureArray(thing) { + if (isArray(thing)) + return thing; + if (thing == null) + return []; + return [thing]; +} + +const normalizePathRegExp = new RegExp(`\\${path.win32.sep}`, 'g'); +const normalizePath = function normalizePath(filename) { + return filename.replace(normalizePathRegExp, path.posix.sep); +}; + +function getMatcherString(id, resolutionBase) { + if (resolutionBase === false || path.isAbsolute(id) || id.startsWith('**')) { + return normalizePath(id); + } + // resolve('') is valid and will default to process.cwd() + const basePath = normalizePath(path.resolve(resolutionBase || '')) + // escape all possible (posix + win) path characters that might interfere with regex + .replace(/[-^$*+?.()|[\]{}]/g, '\\$&'); + // Note that we use posix.join because: + // 1. the basePath has been normalized to use / + // 2. the incoming glob (id) matcher, also uses / + // otherwise Node will force backslash (\) on windows + return path.posix.join(basePath, normalizePath(id)); +} +const createFilter = function createFilter(include, exclude, options) { + const resolutionBase = options && options.resolve; + const getMatcher = (id) => id instanceof RegExp + ? id + : { + test: (what) => { + // this refactor is a tad overly verbose but makes for easy debugging + const pattern = getMatcherString(id, resolutionBase); + const fn = pm(pattern, { dot: true }); + const result = fn(what); + return result; + } + }; + const includeMatchers = ensureArray(include).map(getMatcher); + const excludeMatchers = ensureArray(exclude).map(getMatcher); + if (!includeMatchers.length && !excludeMatchers.length) + return (id) => typeof id === 'string' && !id.includes('\0'); + return function result(id) { + if (typeof id !== 'string') + return false; + if (id.includes('\0')) + return false; + const pathId = normalizePath(id); + for (let i = 0; i < excludeMatchers.length; ++i) { + const matcher = excludeMatchers[i]; + if (matcher instanceof RegExp) { + matcher.lastIndex = 0; + } + if (matcher.test(pathId)) + return false; + } + for (let i = 0; i < includeMatchers.length; ++i) { + const matcher = includeMatchers[i]; + if (matcher instanceof RegExp) { + matcher.lastIndex = 0; + } + if (matcher.test(pathId)) + return true; + } + return !includeMatchers.length; + }; +}; + +const reservedWords = 'break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public'; +const builtins = 'arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl'; +const forbiddenIdentifiers = new Set(`${reservedWords} ${builtins}`.split(' ')); +forbiddenIdentifiers.add(''); +const makeLegalIdentifier = function makeLegalIdentifier(str) { + let identifier = str + .replace(/-(\w)/g, (_, letter) => letter.toUpperCase()) + .replace(/[^$_a-zA-Z0-9]/g, '_'); + if (/\d/.test(identifier[0]) || forbiddenIdentifiers.has(identifier)) { + identifier = `_${identifier}`; + } + return identifier || '_'; +}; + +function stringify(obj) { + return (JSON.stringify(obj) || 'undefined').replace(/[\u2028\u2029]/g, (char) => `\\u${`000${char.charCodeAt(0).toString(16)}`.slice(-4)}`); +} +function serializeArray(arr, indent, baseIndent) { + let output = '['; + const separator = indent ? `\n${baseIndent}${indent}` : ''; + for (let i = 0; i < arr.length; i++) { + const key = arr[i]; + output += `${i > 0 ? ',' : ''}${separator}${serialize(key, indent, baseIndent + indent)}`; + } + return `${output}${indent ? `\n${baseIndent}` : ''}]`; +} +function serializeObject(obj, indent, baseIndent) { + let output = '{'; + const separator = indent ? `\n${baseIndent}${indent}` : ''; + const entries = Object.entries(obj); + for (let i = 0; i < entries.length; i++) { + const [key, value] = entries[i]; + const stringKey = makeLegalIdentifier(key) === key ? key : stringify(key); + output += `${i > 0 ? ',' : ''}${separator}${stringKey}:${indent ? ' ' : ''}${serialize(value, indent, baseIndent + indent)}`; + } + return `${output}${indent ? `\n${baseIndent}` : ''}}`; +} +function serialize(obj, indent, baseIndent) { + if (typeof obj === 'object' && obj !== null) { + if (Array.isArray(obj)) + return serializeArray(obj, indent, baseIndent); + if (obj instanceof Date) + return `new Date(${obj.getTime()})`; + if (obj instanceof RegExp) + return obj.toString(); + return serializeObject(obj, indent, baseIndent); + } + if (typeof obj === 'number') { + if (obj === Infinity) + return 'Infinity'; + if (obj === -Infinity) + return '-Infinity'; + if (obj === 0) + return 1 / obj === Infinity ? '0' : '-0'; + if (obj !== obj) + return 'NaN'; // eslint-disable-line no-self-compare + } + if (typeof obj === 'symbol') { + const key = Symbol.keyFor(obj); + // eslint-disable-next-line no-undefined + if (key !== undefined) + return `Symbol.for(${stringify(key)})`; + } + if (typeof obj === 'bigint') + return `${obj}n`; + return stringify(obj); +} +// isWellFormed exists from Node.js 20 +const hasStringIsWellFormed = 'isWellFormed' in String.prototype; +function isWellFormedString(input) { + // @ts-expect-error String::isWellFormed exists from ES2024. tsconfig lib is set to ES6 + if (hasStringIsWellFormed) + return input.isWellFormed(); + // https://github.com/tc39/proposal-is-usv-string/blob/main/README.md#algorithm + return !/\p{Surrogate}/u.test(input); +} +const dataToEsm = function dataToEsm(data, options = {}) { + var _a, _b; + const t = options.compact ? '' : 'indent' in options ? options.indent : '\t'; + const _ = options.compact ? '' : ' '; + const n = options.compact ? '' : '\n'; + const declarationType = options.preferConst ? 'const' : 'var'; + if (options.namedExports === false || + typeof data !== 'object' || + Array.isArray(data) || + data instanceof Date || + data instanceof RegExp || + data === null) { + const code = serialize(data, options.compact ? null : t, ''); + const magic = _ || (/^[{[\-\/]/.test(code) ? '' : ' '); // eslint-disable-line no-useless-escape + return `export default${magic}${code};`; + } + let maxUnderbarPrefixLength = 0; + for (const key of Object.keys(data)) { + const underbarPrefixLength = (_b = (_a = /^(_+)/.exec(key)) === null || _a === void 0 ? void 0 : _a[0].length) !== null && _b !== void 0 ? _b : 0; + if (underbarPrefixLength > maxUnderbarPrefixLength) { + maxUnderbarPrefixLength = underbarPrefixLength; + } + } + const arbitraryNamePrefix = `${'_'.repeat(maxUnderbarPrefixLength + 1)}arbitrary`; + let namedExportCode = ''; + const defaultExportRows = []; + const arbitraryNameExportRows = []; + for (const [key, value] of Object.entries(data)) { + if (key === makeLegalIdentifier(key)) { + if (options.objectShorthand) + defaultExportRows.push(key); + else + defaultExportRows.push(`${key}:${_}${key}`); + namedExportCode += `export ${declarationType} ${key}${_}=${_}${serialize(value, options.compact ? null : t, '')};${n}`; + } + else { + defaultExportRows.push(`${stringify(key)}:${_}${serialize(value, options.compact ? null : t, '')}`); + if (options.includeArbitraryNames && isWellFormedString(key)) { + const variableName = `${arbitraryNamePrefix}${arbitraryNameExportRows.length}`; + namedExportCode += `${declarationType} ${variableName}${_}=${_}${serialize(value, options.compact ? null : t, '')};${n}`; + arbitraryNameExportRows.push(`${variableName} as ${JSON.stringify(key)}`); + } + } + } + const arbitraryExportCode = arbitraryNameExportRows.length > 0 + ? `export${_}{${n}${t}${arbitraryNameExportRows.join(`,${n}${t}`)}${n}};${n}` + : ''; + const defaultExportCode = `export default${_}{${n}${t}${defaultExportRows.join(`,${n}${t}`)}${n}};${n}`; + return `${namedExportCode}${arbitraryExportCode}${defaultExportCode}`; +}; + +function exactRegex(str, flags) { + return new RegExp(`^${escapeRegex(str)}$`, flags); +} +function prefixRegex(str, flags) { + return new RegExp(`^${escapeRegex(str)}`, flags); +} +const escapeRegexRE = /[-/\\^$*+?.()|[\]{}]/g; +function escapeRegex(str) { + return str.replace(escapeRegexRE, '\\$&'); +} + +// TODO: remove this in next major +var index = { + addExtension, + attachScopes, + createFilter, + dataToEsm, + exactRegex, + extractAssignedNames, + makeLegalIdentifier, + normalizePath, + prefixRegex +}; + +exports.addExtension = addExtension; +exports.attachScopes = attachScopes; +exports.createFilter = createFilter; +exports.dataToEsm = dataToEsm; +exports.default = index; +exports.exactRegex = exactRegex; +exports.extractAssignedNames = extractAssignedNames; +exports.makeLegalIdentifier = makeLegalIdentifier; +exports.normalizePath = normalizePath; +exports.prefixRegex = prefixRegex; +module.exports = Object.assign(exports.default, exports); +//# sourceMappingURL=index.js.map diff --git a/node_modules/@rollup/pluginutils/dist/es/index.js b/node_modules/@rollup/pluginutils/dist/es/index.js new file mode 100644 index 0000000..23bb81b --- /dev/null +++ b/node_modules/@rollup/pluginutils/dist/es/index.js @@ -0,0 +1,378 @@ +import { extname, win32, posix, isAbsolute, resolve } from 'path'; +import { walk } from 'estree-walker'; +import pm from 'picomatch'; + +const addExtension = function addExtension(filename, ext = '.js') { + let result = `${filename}`; + if (!extname(filename)) + result += ext; + return result; +}; + +const extractors = { + ArrayPattern(names, param) { + for (const element of param.elements) { + if (element) + extractors[element.type](names, element); + } + }, + AssignmentPattern(names, param) { + extractors[param.left.type](names, param.left); + }, + Identifier(names, param) { + names.push(param.name); + }, + MemberExpression() { }, + ObjectPattern(names, param) { + for (const prop of param.properties) { + // @ts-ignore Typescript reports that this is not a valid type + if (prop.type === 'RestElement') { + extractors.RestElement(names, prop); + } + else { + extractors[prop.value.type](names, prop.value); + } + } + }, + RestElement(names, param) { + extractors[param.argument.type](names, param.argument); + } +}; +const extractAssignedNames = function extractAssignedNames(param) { + const names = []; + extractors[param.type](names, param); + return names; +}; + +const blockDeclarations = { + const: true, + let: true +}; +class Scope { + constructor(options = {}) { + this.parent = options.parent; + this.isBlockScope = !!options.block; + this.declarations = Object.create(null); + if (options.params) { + options.params.forEach((param) => { + extractAssignedNames(param).forEach((name) => { + this.declarations[name] = true; + }); + }); + } + } + addDeclaration(node, isBlockDeclaration, isVar) { + if (!isBlockDeclaration && this.isBlockScope) { + // it's a `var` or function node, and this + // is a block scope, so we need to go up + this.parent.addDeclaration(node, isBlockDeclaration, isVar); + } + else if (node.id) { + extractAssignedNames(node.id).forEach((name) => { + this.declarations[name] = true; + }); + } + } + contains(name) { + return this.declarations[name] || (this.parent ? this.parent.contains(name) : false); + } +} +const attachScopes = function attachScopes(ast, propertyName = 'scope') { + let scope = new Scope(); + walk(ast, { + enter(n, parent) { + const node = n; + // function foo () {...} + // class Foo {...} + if (/(?:Function|Class)Declaration/.test(node.type)) { + scope.addDeclaration(node, false, false); + } + // var foo = 1 + if (node.type === 'VariableDeclaration') { + const { kind } = node; + const isBlockDeclaration = blockDeclarations[kind]; + node.declarations.forEach((declaration) => { + scope.addDeclaration(declaration, isBlockDeclaration, true); + }); + } + let newScope; + // create new function scope + if (node.type.includes('Function')) { + const func = node; + newScope = new Scope({ + parent: scope, + block: false, + params: func.params + }); + // named function expressions - the name is considered + // part of the function's scope + if (func.type === 'FunctionExpression' && func.id) { + newScope.addDeclaration(func, false, false); + } + } + // create new for scope + if (/For(?:In|Of)?Statement/.test(node.type)) { + newScope = new Scope({ + parent: scope, + block: true + }); + } + // create new block scope + if (node.type === 'BlockStatement' && !parent.type.includes('Function')) { + newScope = new Scope({ + parent: scope, + block: true + }); + } + // catch clause has its own block scope + if (node.type === 'CatchClause') { + newScope = new Scope({ + parent: scope, + params: node.param ? [node.param] : [], + block: true + }); + } + if (newScope) { + Object.defineProperty(node, propertyName, { + value: newScope, + configurable: true + }); + scope = newScope; + } + }, + leave(n) { + const node = n; + if (node[propertyName]) + scope = scope.parent; + } + }); + return scope; +}; + +// Helper since Typescript can't detect readonly arrays with Array.isArray +function isArray(arg) { + return Array.isArray(arg); +} +function ensureArray(thing) { + if (isArray(thing)) + return thing; + if (thing == null) + return []; + return [thing]; +} + +const normalizePathRegExp = new RegExp(`\\${win32.sep}`, 'g'); +const normalizePath = function normalizePath(filename) { + return filename.replace(normalizePathRegExp, posix.sep); +}; + +function getMatcherString(id, resolutionBase) { + if (resolutionBase === false || isAbsolute(id) || id.startsWith('**')) { + return normalizePath(id); + } + // resolve('') is valid and will default to process.cwd() + const basePath = normalizePath(resolve(resolutionBase || '')) + // escape all possible (posix + win) path characters that might interfere with regex + .replace(/[-^$*+?.()|[\]{}]/g, '\\$&'); + // Note that we use posix.join because: + // 1. the basePath has been normalized to use / + // 2. the incoming glob (id) matcher, also uses / + // otherwise Node will force backslash (\) on windows + return posix.join(basePath, normalizePath(id)); +} +const createFilter = function createFilter(include, exclude, options) { + const resolutionBase = options && options.resolve; + const getMatcher = (id) => id instanceof RegExp + ? id + : { + test: (what) => { + // this refactor is a tad overly verbose but makes for easy debugging + const pattern = getMatcherString(id, resolutionBase); + const fn = pm(pattern, { dot: true }); + const result = fn(what); + return result; + } + }; + const includeMatchers = ensureArray(include).map(getMatcher); + const excludeMatchers = ensureArray(exclude).map(getMatcher); + if (!includeMatchers.length && !excludeMatchers.length) + return (id) => typeof id === 'string' && !id.includes('\0'); + return function result(id) { + if (typeof id !== 'string') + return false; + if (id.includes('\0')) + return false; + const pathId = normalizePath(id); + for (let i = 0; i < excludeMatchers.length; ++i) { + const matcher = excludeMatchers[i]; + if (matcher instanceof RegExp) { + matcher.lastIndex = 0; + } + if (matcher.test(pathId)) + return false; + } + for (let i = 0; i < includeMatchers.length; ++i) { + const matcher = includeMatchers[i]; + if (matcher instanceof RegExp) { + matcher.lastIndex = 0; + } + if (matcher.test(pathId)) + return true; + } + return !includeMatchers.length; + }; +}; + +const reservedWords = 'break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public'; +const builtins = 'arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl'; +const forbiddenIdentifiers = new Set(`${reservedWords} ${builtins}`.split(' ')); +forbiddenIdentifiers.add(''); +const makeLegalIdentifier = function makeLegalIdentifier(str) { + let identifier = str + .replace(/-(\w)/g, (_, letter) => letter.toUpperCase()) + .replace(/[^$_a-zA-Z0-9]/g, '_'); + if (/\d/.test(identifier[0]) || forbiddenIdentifiers.has(identifier)) { + identifier = `_${identifier}`; + } + return identifier || '_'; +}; + +function stringify(obj) { + return (JSON.stringify(obj) || 'undefined').replace(/[\u2028\u2029]/g, (char) => `\\u${`000${char.charCodeAt(0).toString(16)}`.slice(-4)}`); +} +function serializeArray(arr, indent, baseIndent) { + let output = '['; + const separator = indent ? `\n${baseIndent}${indent}` : ''; + for (let i = 0; i < arr.length; i++) { + const key = arr[i]; + output += `${i > 0 ? ',' : ''}${separator}${serialize(key, indent, baseIndent + indent)}`; + } + return `${output}${indent ? `\n${baseIndent}` : ''}]`; +} +function serializeObject(obj, indent, baseIndent) { + let output = '{'; + const separator = indent ? `\n${baseIndent}${indent}` : ''; + const entries = Object.entries(obj); + for (let i = 0; i < entries.length; i++) { + const [key, value] = entries[i]; + const stringKey = makeLegalIdentifier(key) === key ? key : stringify(key); + output += `${i > 0 ? ',' : ''}${separator}${stringKey}:${indent ? ' ' : ''}${serialize(value, indent, baseIndent + indent)}`; + } + return `${output}${indent ? `\n${baseIndent}` : ''}}`; +} +function serialize(obj, indent, baseIndent) { + if (typeof obj === 'object' && obj !== null) { + if (Array.isArray(obj)) + return serializeArray(obj, indent, baseIndent); + if (obj instanceof Date) + return `new Date(${obj.getTime()})`; + if (obj instanceof RegExp) + return obj.toString(); + return serializeObject(obj, indent, baseIndent); + } + if (typeof obj === 'number') { + if (obj === Infinity) + return 'Infinity'; + if (obj === -Infinity) + return '-Infinity'; + if (obj === 0) + return 1 / obj === Infinity ? '0' : '-0'; + if (obj !== obj) + return 'NaN'; // eslint-disable-line no-self-compare + } + if (typeof obj === 'symbol') { + const key = Symbol.keyFor(obj); + // eslint-disable-next-line no-undefined + if (key !== undefined) + return `Symbol.for(${stringify(key)})`; + } + if (typeof obj === 'bigint') + return `${obj}n`; + return stringify(obj); +} +// isWellFormed exists from Node.js 20 +const hasStringIsWellFormed = 'isWellFormed' in String.prototype; +function isWellFormedString(input) { + // @ts-expect-error String::isWellFormed exists from ES2024. tsconfig lib is set to ES6 + if (hasStringIsWellFormed) + return input.isWellFormed(); + // https://github.com/tc39/proposal-is-usv-string/blob/main/README.md#algorithm + return !/\p{Surrogate}/u.test(input); +} +const dataToEsm = function dataToEsm(data, options = {}) { + var _a, _b; + const t = options.compact ? '' : 'indent' in options ? options.indent : '\t'; + const _ = options.compact ? '' : ' '; + const n = options.compact ? '' : '\n'; + const declarationType = options.preferConst ? 'const' : 'var'; + if (options.namedExports === false || + typeof data !== 'object' || + Array.isArray(data) || + data instanceof Date || + data instanceof RegExp || + data === null) { + const code = serialize(data, options.compact ? null : t, ''); + const magic = _ || (/^[{[\-\/]/.test(code) ? '' : ' '); // eslint-disable-line no-useless-escape + return `export default${magic}${code};`; + } + let maxUnderbarPrefixLength = 0; + for (const key of Object.keys(data)) { + const underbarPrefixLength = (_b = (_a = /^(_+)/.exec(key)) === null || _a === void 0 ? void 0 : _a[0].length) !== null && _b !== void 0 ? _b : 0; + if (underbarPrefixLength > maxUnderbarPrefixLength) { + maxUnderbarPrefixLength = underbarPrefixLength; + } + } + const arbitraryNamePrefix = `${'_'.repeat(maxUnderbarPrefixLength + 1)}arbitrary`; + let namedExportCode = ''; + const defaultExportRows = []; + const arbitraryNameExportRows = []; + for (const [key, value] of Object.entries(data)) { + if (key === makeLegalIdentifier(key)) { + if (options.objectShorthand) + defaultExportRows.push(key); + else + defaultExportRows.push(`${key}:${_}${key}`); + namedExportCode += `export ${declarationType} ${key}${_}=${_}${serialize(value, options.compact ? null : t, '')};${n}`; + } + else { + defaultExportRows.push(`${stringify(key)}:${_}${serialize(value, options.compact ? null : t, '')}`); + if (options.includeArbitraryNames && isWellFormedString(key)) { + const variableName = `${arbitraryNamePrefix}${arbitraryNameExportRows.length}`; + namedExportCode += `${declarationType} ${variableName}${_}=${_}${serialize(value, options.compact ? null : t, '')};${n}`; + arbitraryNameExportRows.push(`${variableName} as ${JSON.stringify(key)}`); + } + } + } + const arbitraryExportCode = arbitraryNameExportRows.length > 0 + ? `export${_}{${n}${t}${arbitraryNameExportRows.join(`,${n}${t}`)}${n}};${n}` + : ''; + const defaultExportCode = `export default${_}{${n}${t}${defaultExportRows.join(`,${n}${t}`)}${n}};${n}`; + return `${namedExportCode}${arbitraryExportCode}${defaultExportCode}`; +}; + +function exactRegex(str, flags) { + return new RegExp(`^${escapeRegex(str)}$`, flags); +} +function prefixRegex(str, flags) { + return new RegExp(`^${escapeRegex(str)}`, flags); +} +const escapeRegexRE = /[-/\\^$*+?.()|[\]{}]/g; +function escapeRegex(str) { + return str.replace(escapeRegexRE, '\\$&'); +} + +// TODO: remove this in next major +var index = { + addExtension, + attachScopes, + createFilter, + dataToEsm, + exactRegex, + extractAssignedNames, + makeLegalIdentifier, + normalizePath, + prefixRegex +}; + +export { addExtension, attachScopes, createFilter, dataToEsm, index as default, exactRegex, extractAssignedNames, makeLegalIdentifier, normalizePath, prefixRegex }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@rollup/pluginutils/dist/es/package.json b/node_modules/@rollup/pluginutils/dist/es/package.json new file mode 100644 index 0000000..7c34deb --- /dev/null +++ b/node_modules/@rollup/pluginutils/dist/es/package.json @@ -0,0 +1 @@ +{"type":"module"} \ No newline at end of file diff --git a/node_modules/@rollup/pluginutils/package.json b/node_modules/@rollup/pluginutils/package.json new file mode 100644 index 0000000..f12f1d8 --- /dev/null +++ b/node_modules/@rollup/pluginutils/package.json @@ -0,0 +1,99 @@ +{ + "name": "@rollup/pluginutils", + "version": "5.2.0", + "publishConfig": { + "access": "public" + }, + "description": "A set of utility functions commonly used by Rollup plugins", + "license": "MIT", + "repository": { + "url": "rollup/plugins", + "directory": "packages/pluginutils" + }, + "author": "Rich Harris ", + "homepage": "https://github.com/rollup/plugins/tree/master/packages/pluginutils#readme", + "bugs": { + "url": "https://github.com/rollup/plugins/issues" + }, + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "type": "commonjs", + "exports": { + "types": "./types/index.d.ts", + "import": "./dist/es/index.js", + "default": "./dist/cjs/index.js" + }, + "engines": { + "node": ">=14.0.0" + }, + "files": [ + "dist", + "!dist/**/*.map", + "types", + "README.md", + "LICENSE" + ], + "keywords": [ + "rollup", + "plugin", + "utils" + ], + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + }, + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" + }, + "devDependencies": { + "@rollup/plugin-commonjs": "^23.0.0", + "@rollup/plugin-node-resolve": "^15.0.0", + "@rollup/plugin-typescript": "^9.0.1", + "@types/node": "^14.18.30", + "@types/picomatch": "^2.3.0", + "acorn": "^8.8.0", + "rollup": "^4.0.0-24", + "typescript": "^4.8.3" + }, + "types": "./types/index.d.ts", + "ava": { + "extensions": [ + "ts" + ], + "require": [ + "ts-node/register" + ], + "workerThreads": false, + "files": [ + "!**/fixtures/**", + "!**/helpers/**", + "!**/recipes/**", + "!**/types.ts" + ] + }, + "nyc": { + "extension": [ + ".js", + ".ts" + ] + }, + "scripts": { + "build": "rollup -c", + "ci:coverage": "nyc pnpm test && nyc report --reporter=text-lcov > coverage.lcov", + "ci:lint": "pnpm build && pnpm lint", + "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", + "ci:test": "pnpm test -- --verbose", + "prebuild": "del-cli dist", + "prerelease": "pnpm build", + "pretest": "pnpm build --sourcemap", + "release": "pnpm --workspace-root package:release $(pwd)", + "test": "ava", + "test:ts": "tsc --noEmit" + } +} \ No newline at end of file diff --git a/node_modules/@rollup/pluginutils/types/index.d.ts b/node_modules/@rollup/pluginutils/types/index.d.ts new file mode 100644 index 0000000..74f653a --- /dev/null +++ b/node_modules/@rollup/pluginutils/types/index.d.ts @@ -0,0 +1,116 @@ +import type { BaseNode } from 'estree'; + +export interface AttachedScope { + parent?: AttachedScope; + isBlockScope: boolean; + declarations: { [key: string]: boolean }; + addDeclaration(node: BaseNode, isBlockDeclaration: boolean, isVar: boolean): void; + contains(name: string): boolean; +} + +export interface DataToEsmOptions { + compact?: boolean; + /** + * @desc When this option is set, dataToEsm will generate a named export for keys that + * are not a valid identifier, by leveraging the "Arbitrary Module Namespace Identifier + * Names" feature. See: https://github.com/tc39/ecma262/pull/2154 + */ + includeArbitraryNames?: boolean; + indent?: string; + namedExports?: boolean; + objectShorthand?: boolean; + preferConst?: boolean; +} + +/** + * A valid `picomatch` glob pattern, or array of patterns. + */ +export type FilterPattern = ReadonlyArray | string | RegExp | null; + +/** + * Adds an extension to a module ID if one does not exist. + */ +export function addExtension(filename: string, ext?: string): string; + +/** + * Attaches `Scope` objects to the relevant nodes of an AST. + * Each `Scope` object has a `scope.contains(name)` method that returns `true` + * if a given name is defined in the current scope or a parent scope. + */ +export function attachScopes(ast: BaseNode, propertyName?: string): AttachedScope; + +/** + * Constructs a filter function which can be used to determine whether or not + * certain modules should be operated upon. + * @param include If `include` is omitted or has zero length, filter will return `true` by default. + * @param exclude ID must not match any of the `exclude` patterns. + * @param options Optionally resolves the patterns against a directory other than `process.cwd()`. + * If a `string` is specified, then the value will be used as the base directory. + * Relative paths will be resolved against `process.cwd()` first. + * If `false`, then the patterns will not be resolved against any directory. + * This can be useful if you want to create a filter for virtual module names. + */ +export function createFilter( + include?: FilterPattern, + exclude?: FilterPattern, + options?: { resolve?: string | false | null } +): (id: string | unknown) => boolean; + +/** + * Transforms objects into tree-shakable ES Module imports. + * @param data An object to transform into an ES module. + */ +export function dataToEsm(data: unknown, options?: DataToEsmOptions): string; + +/** + * Constructs a RegExp that matches the exact string specified. + * @param str the string to match. + * @param flags flags for the RegExp. + */ +export function exactRegex(str: string, flags?: string): RegExp; + +/** + * Extracts the names of all assignment targets based upon specified patterns. + * @param param An `acorn` AST Node. + */ +export function extractAssignedNames(param: BaseNode): string[]; + +/** + * Constructs a bundle-safe identifier from a `string`. + */ +export function makeLegalIdentifier(str: string): string; + +/** + * Converts path separators to forward slash. + */ +export function normalizePath(filename: string): string; + +/** + * Constructs a RegExp that matches a value that has the specified prefix. + * @param str the string to match. + * @param flags flags for the RegExp. + */ +export function prefixRegex(str: string, flags?: string): RegExp; + +export type AddExtension = typeof addExtension; +export type AttachScopes = typeof attachScopes; +export type CreateFilter = typeof createFilter; +export type ExactRegex = typeof exactRegex; +export type ExtractAssignedNames = typeof extractAssignedNames; +export type MakeLegalIdentifier = typeof makeLegalIdentifier; +export type NormalizePath = typeof normalizePath; +export type DataToEsm = typeof dataToEsm; +export type PrefixRegex = typeof prefixRegex; + +declare const defaultExport: { + addExtension: AddExtension; + attachScopes: AttachScopes; + createFilter: CreateFilter; + dataToEsm: DataToEsm; + exactRegex: ExactRegex; + extractAssignedNames: ExtractAssignedNames; + makeLegalIdentifier: MakeLegalIdentifier; + normalizePath: NormalizePath; + prefixRegex: PrefixRegex; +}; +export default defaultExport; diff --git a/node_modules/@rollup/rollup-linux-x64-gnu/README.md b/node_modules/@rollup/rollup-linux-x64-gnu/README.md new file mode 100644 index 0000000..cabe280 --- /dev/null +++ b/node_modules/@rollup/rollup-linux-x64-gnu/README.md @@ -0,0 +1,3 @@ +# `@rollup/rollup-linux-x64-gnu` + +This is the **x86_64-unknown-linux-gnu** binary for `rollup` diff --git a/node_modules/@rollup/rollup-linux-x64-gnu/package.json b/node_modules/@rollup/rollup-linux-x64-gnu/package.json new file mode 100644 index 0000000..0d36451 --- /dev/null +++ b/node_modules/@rollup/rollup-linux-x64-gnu/package.json @@ -0,0 +1,22 @@ +{ + "name": "@rollup/rollup-linux-x64-gnu", + "version": "4.40.1", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "files": [ + "rollup.linux-x64-gnu.node" + ], + "description": "Native bindings for Rollup", + "author": "Lukas Taegert-Atkinson", + "homepage": "https://rollupjs.org/", + "license": "MIT", + "repository": "rollup/rollup", + "libc": [ + "glibc" + ], + "main": "./rollup.linux-x64-gnu.node" +} \ No newline at end of file diff --git a/node_modules/@rollup/rollup-linux-x64-gnu/rollup.linux-x64-gnu.node b/node_modules/@rollup/rollup-linux-x64-gnu/rollup.linux-x64-gnu.node new file mode 100644 index 0000000..1cd2b12 Binary files /dev/null and b/node_modules/@rollup/rollup-linux-x64-gnu/rollup.linux-x64-gnu.node differ diff --git a/node_modules/@rollup/rollup-linux-x64-musl/README.md b/node_modules/@rollup/rollup-linux-x64-musl/README.md new file mode 100644 index 0000000..5848a6c --- /dev/null +++ b/node_modules/@rollup/rollup-linux-x64-musl/README.md @@ -0,0 +1,3 @@ +# `@rollup/rollup-linux-x64-musl` + +This is the **x86_64-unknown-linux-musl** binary for `rollup` diff --git a/node_modules/@rollup/rollup-linux-x64-musl/package.json b/node_modules/@rollup/rollup-linux-x64-musl/package.json new file mode 100644 index 0000000..6e6ccb1 --- /dev/null +++ b/node_modules/@rollup/rollup-linux-x64-musl/package.json @@ -0,0 +1,22 @@ +{ + "name": "@rollup/rollup-linux-x64-musl", + "version": "4.40.1", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "files": [ + "rollup.linux-x64-musl.node" + ], + "description": "Native bindings for Rollup", + "author": "Lukas Taegert-Atkinson", + "homepage": "https://rollupjs.org/", + "license": "MIT", + "repository": "rollup/rollup", + "libc": [ + "musl" + ], + "main": "./rollup.linux-x64-musl.node" +} \ No newline at end of file diff --git a/node_modules/@rollup/rollup-linux-x64-musl/rollup.linux-x64-musl.node b/node_modules/@rollup/rollup-linux-x64-musl/rollup.linux-x64-musl.node new file mode 100644 index 0000000..4262e0a Binary files /dev/null and b/node_modules/@rollup/rollup-linux-x64-musl/rollup.linux-x64-musl.node differ diff --git a/node_modules/@sveltejs/acorn-typescript/LICENSE.md b/node_modules/@sveltejs/acorn-typescript/LICENSE.md new file mode 100644 index 0000000..36d00ff --- /dev/null +++ b/node_modules/@sveltejs/acorn-typescript/LICENSE.md @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2022 Tyreal Hu +Copyright (c) 2025 The Svelte Team + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@sveltejs/acorn-typescript/README.md b/node_modules/@sveltejs/acorn-typescript/README.md new file mode 100644 index 0000000..44f6406 --- /dev/null +++ b/node_modules/@sveltejs/acorn-typescript/README.md @@ -0,0 +1,70 @@ +# acorn-typescript + +[![License](https://img.shields.io/npm/l/svelte.svg)](LICENSE.md) [![Chat](https://img.shields.io/discord/457912077277855764?label=chat&logo=discord)](https://svelte.dev/chat) + +This is a plugin for [Acorn](http://marijnhaverbeke.nl/acorn/) - a tiny, fast JavaScript parser, written completely in JavaScript. + +It was created as an experimental alternative, faster [TypeScript](https://www.typescriptlang.org/) parser. It will help you to parse +TypeScript using Acorn. + +## Usage + +To get started, import the plugin and use Acorn's extension mechanism to register it. You have to enable `options.locations` while using `acorn-typescript`. + +```typescript +import * as acorn from 'acorn'; +import tsPlugin from 'acorn-typescript'; + +const node = acorn.Parser.extend(tsPlugin()).parse( + ` +const a = 1 +type A = number +export { + a, + type A as B +} +`, + { + sourceType: 'module', + ecmaVersion: 'latest', + locations: true + } +); +``` + +If you want to enable parsing within a TypeScript ambient context, where certain syntax have different rules (like `.d.ts` files and inside [declare module blocks](https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html)): + +```typescript +import * as acorn from 'acorn'; +import tsPlugin from 'acorn-typescript'; + +const node = acorn.Parser.extend(tsPlugin({ dts: true })).parse( + ` +const a = 1 +type A = number +export { + a, + type A as B +} +`, + { + sourceType: 'module', + ecmaVersion: 'latest', + locations: true + } +); +``` + +## SUPPORTED + +- Typescript normal syntax +- Support to parse TypeScript [Decorators](https://www.typescriptlang.org/docs/handbook/decorators.html) +- Support to parse JSX & TSX + +## CHANGELOG + +[click](./CHANGELOG.md) + +## Acknowledgments + +We want to thank [TyrealHu](https://github.com/TyrealHu) for his original work on this project. He maintained [`acorn-typescript`](https://github.com/TyrealHu/acorn-typescript) until early 2024. diff --git a/node_modules/@sveltejs/acorn-typescript/index.d.ts b/node_modules/@sveltejs/acorn-typescript/index.d.ts new file mode 100644 index 0000000..1f357ec --- /dev/null +++ b/node_modules/@sveltejs/acorn-typescript/index.d.ts @@ -0,0 +1,12 @@ +import { Parser } from 'acorn'; + +export function tsPlugin(options?: { + dts?: boolean; + /** Whether to use JSX. Defaults to false */ + jsx?: + | boolean + | { + allowNamespaces?: boolean; + allowNamespacedObjects?: boolean; + }; +}): (BaseParser: typeof Parser) => typeof Parser; diff --git a/node_modules/@sveltejs/acorn-typescript/index.js b/node_modules/@sveltejs/acorn-typescript/index.js new file mode 100644 index 0000000..3f4ef45 --- /dev/null +++ b/node_modules/@sveltejs/acorn-typescript/index.js @@ -0,0 +1,4999 @@ +// src/index.ts +import * as acornNamespace from "acorn"; + +// src/tokenType.ts +import { TokenType, keywordTypes, tokTypes, TokContext } from "acorn"; +var startsExpr = true; +function kwLike(_name, options = {}) { + return new TokenType("name", options); +} +var acornTypeScriptMap = /* @__PURE__ */ new WeakMap(); +function generateAcornTypeScript(_acorn) { + const acorn = _acorn.Parser.acorn || _acorn; + let acornTypeScript = acornTypeScriptMap.get(acorn); + if (!acornTypeScript) { + let tokenIsLiteralPropertyName = function(token) { + return [ + ...[tokTypes.name, tokTypes.string, tokTypes.num], + ...Object.values(keywordTypes), + ...Object.values(tsKwTokenType) + ].includes(token); + }, tokenIsKeywordOrIdentifier = function(token) { + return [ + ...[tokTypes.name], + ...Object.values(keywordTypes), + ...Object.values(tsKwTokenType) + ].includes(token); + }, tokenIsIdentifier = function(token) { + return [...Object.values(tsKwTokenType), tokTypes.name].includes(token); + }, tokenIsTSDeclarationStart = function(token) { + return [ + tsKwTokenType.abstract, + tsKwTokenType.declare, + tsKwTokenType.enum, + tsKwTokenType.module, + tsKwTokenType.namespace, + tsKwTokenType.interface, + tsKwTokenType.type + ].includes(token); + }, tokenIsTSTypeOperator = function(token) { + return [tsKwTokenType.keyof, tsKwTokenType.readonly, tsKwTokenType.unique].includes(token); + }, tokenIsTemplate = function(token) { + return token === tokTypes.invalidTemplate; + }; + const tsKwTokenType = generateTsKwTokenType(); + const tsTokenType = generateTsTokenType(); + const tsTokenContext = generateTsTokenContext(); + const tsKeywordsRegExp = new RegExp(`^(?:${Object.keys(tsKwTokenType).join("|")})$`); + tsTokenType.jsxTagStart.updateContext = function() { + this.context.push(tsTokenContext.tc_expr); + this.context.push(tsTokenContext.tc_oTag); + this.exprAllowed = false; + }; + tsTokenType.jsxTagEnd.updateContext = function(prevType) { + let out = this.context.pop(); + if (out === tsTokenContext.tc_oTag && prevType === tokTypes.slash || out === tsTokenContext.tc_cTag) { + this.context.pop(); + this.exprAllowed = this.curContext() === tsTokenContext.tc_expr; + } else { + this.exprAllowed = true; + } + }; + acornTypeScript = { + tokTypes: { + ...tsKwTokenType, + ...tsTokenType + }, + tokContexts: { + ...tsTokenContext + }, + keywordsRegExp: tsKeywordsRegExp, + tokenIsLiteralPropertyName, + tokenIsKeywordOrIdentifier, + tokenIsIdentifier, + tokenIsTSDeclarationStart, + tokenIsTSTypeOperator, + tokenIsTemplate + }; + } + return acornTypeScript; +} +function generateTsTokenContext() { + return { + tc_oTag: new TokContext("...", true, true) + }; +} +function generateTsTokenType() { + return { + // @ts-expect-error + at: new TokenType("@"), + // @ts-expect-error + jsxName: new TokenType("jsxName"), + // @ts-expect-error + jsxText: new TokenType("jsxText", { beforeExpr: true }), + // @ts-expect-error + jsxTagStart: new TokenType("jsxTagStart", { startsExpr: true }), + // @ts-expect-error + jsxTagEnd: new TokenType("jsxTagEnd") + }; +} +function generateTsKwTokenType() { + return { + assert: kwLike("assert", { startsExpr }), + asserts: kwLike("asserts", { startsExpr }), + global: kwLike("global", { startsExpr }), + keyof: kwLike("keyof", { startsExpr }), + readonly: kwLike("readonly", { startsExpr }), + unique: kwLike("unique", { startsExpr }), + abstract: kwLike("abstract", { startsExpr }), + declare: kwLike("declare", { startsExpr }), + enum: kwLike("enum", { startsExpr }), + module: kwLike("module", { startsExpr }), + namespace: kwLike("namespace", { startsExpr }), + interface: kwLike("interface", { startsExpr }), + type: kwLike("type", { startsExpr }) + }; +} + +// src/scopeflags.ts +var TS_SCOPE_OTHER = 512; +var TS_SCOPE_TS_MODULE = 1024; +var BIND_KIND_VALUE = 1; +var BIND_KIND_TYPE = 2; +var BIND_SCOPE_VAR = 4; +var BIND_SCOPE_LEXICAL = 8; +var BIND_SCOPE_FUNCTION = 16; +var BIND_FLAGS_NONE = 64; +var BIND_FLAGS_CLASS = 128; +var BIND_FLAGS_TS_ENUM = 256; +var BIND_FLAGS_TS_CONST_ENUM = 512; +var BIND_FLAGS_TS_EXPORT_ONLY = 1024; +var BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS; +var BIND_LEXICAL = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0; +var BIND_VAR = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0; +var BIND_FUNCTION = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0; +var BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS; +var BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0; +var BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM; +var BIND_TS_AMBIENT = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY; +var BIND_NONE = 0 | 0 | 0 | BIND_FLAGS_NONE; +var BIND_OUTSIDE = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE; +var BIND_TS_CONST_ENUM = BIND_TS_ENUM | BIND_FLAGS_TS_CONST_ENUM; +var BIND_TS_NAMESPACE = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY; +var CLASS_ELEMENT_FLAG_STATIC = 4; +var CLASS_ELEMENT_KIND_GETTER = 2; +var CLASS_ELEMENT_KIND_SETTER = 1; +var CLASS_ELEMENT_KIND_ACCESSOR = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_KIND_SETTER; +var CLASS_ELEMENT_STATIC_GETTER = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_FLAG_STATIC; +var CLASS_ELEMENT_STATIC_SETTER = CLASS_ELEMENT_KIND_SETTER | CLASS_ELEMENT_FLAG_STATIC; + +// src/whitespace.ts +var skipWhiteSpaceInLine = /(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/y; +var skipWhiteSpaceToLineBreak = new RegExp( + // Unfortunately JS doesn't support Perl's atomic /(?>pattern)/ or + // possessive quantifiers, so we use a trick to prevent backtracking + // when the look-ahead for line terminator fails. + "(?=(" + // Capture the whitespace and comments that should be skipped inside + // a look-ahead assertion, and then re-match the group as a unit. + skipWhiteSpaceInLine.source + "))\\1" + // Look-ahead for either line terminator, start of multi-line comment, + // or end of string. + /(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source, + "y" + // sticky +); + +// src/parseutil.ts +var DestructuringErrors = class { + constructor() { + this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1; + } +}; +function isPrivateNameConflicted(privateNameMap, element) { + const name = element.key.name; + const curr = privateNameMap[name]; + let next = "true"; + if (element.type === "MethodDefinition" && (element.kind === "get" || element.kind === "set")) { + next = (element.static ? "s" : "i") + element.kind; + } + if (curr === "iget" && next === "iset" || curr === "iset" && next === "iget" || curr === "sget" && next === "sset" || curr === "sset" && next === "sget") { + privateNameMap[name] = "true"; + return false; + } else if (!curr) { + privateNameMap[name] = next; + return false; + } else { + return true; + } +} +function checkKeyName(node, name) { + const { computed, key } = node; + return !computed && (key.type === "Identifier" && key.name === name || key.type === "Literal" && key.value === name); +} + +// src/error.ts +var TypeScriptError = { + AbstractMethodHasImplementation: ({ methodName }) => `Method '${methodName}' cannot have an implementation because it is marked abstract.`, + AbstractPropertyHasInitializer: ({ propertyName }) => `Property '${propertyName}' cannot have an initializer because it is marked abstract.`, + AccesorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.", + AccesorCannotHaveTypeParameters: "An accessor cannot have type parameters.", + CannotFindName: ({ name }) => `Cannot find name '${name}'.`, + ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.", + ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.", + ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference: "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.", + ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.", + DeclareAccessor: ({ kind }) => `'declare' is not allowed in ${kind}ters.`, + DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.", + DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.", + DuplicateAccessibilityModifier: ( + // `Accessibility modifier already seen: ${modifier}` would be more helpful. + // eslint-disable-next-line @typescript-eslint/no-unused-vars + () => `Accessibility modifier already seen.` + ), + DuplicateModifier: ({ modifier }) => `Duplicate modifier: '${modifier}'.`, + // `token` matches the terminology used by typescript: + // https://github.com/microsoft/TypeScript/blob/main/src/compiler/types.ts#L2915 + EmptyHeritageClauseType: ({ token }) => `'${token}' list cannot be empty.`, + EmptyTypeArguments: "Type argument list cannot be empty.", + EmptyTypeParameters: "Type parameter list cannot be empty.", + ExpectedAmbientAfterExportDeclare: "'export declare' must be followed by an ambient declaration.", + ImportAliasHasImportType: "An import alias can not use 'import type'.", + IncompatibleModifiers: ({ modifiers }) => `'${modifiers[0]}' modifier cannot be used with '${modifiers[1]}' modifier.`, + IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier.", + IndexSignatureHasAccessibility: ({ modifier }) => `Index signatures cannot have an accessibility modifier ('${modifier}').`, + IndexSignatureHasDeclare: "Index signatures cannot have the 'declare' modifier.", + IndexSignatureHasOverride: "'override' modifier cannot appear on an index signature.", + IndexSignatureHasStatic: "Index signatures cannot have the 'static' modifier.", + InitializerNotAllowedInAmbientContext: "Initializers are not allowed in ambient contexts.", + InvalidModifierOnTypeMember: ({ modifier }) => `'${modifier}' modifier cannot appear on a type member.`, + InvalidModifierOnTypeParameter: ({ modifier }) => `'${modifier}' modifier cannot appear on a type parameter.`, + InvalidModifierOnTypeParameterPositions: ({ modifier }) => `'${modifier}' modifier can only appear on a type parameter of a class, interface or type alias.`, + InvalidModifiersOrder: ({ orderedModifiers }) => `'${orderedModifiers[0]}' modifier must precede '${orderedModifiers[1]}' modifier.`, + InvalidPropertyAccessAfterInstantiationExpression: "Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.", + InvalidTupleMemberLabel: "Tuple members must be labeled with a simple identifier.", + MissingInterfaceName: "'interface' declarations must be followed by an identifier.", + MixedLabeledAndUnlabeledElements: "Tuple members must all have names or all not have names.", + NonAbstractClassHasAbstractMethod: "Abstract methods can only appear within an abstract class.", + NonClassMethodPropertyHasAbstractModifer: "'abstract' modifier can only appear on a class, method, or property declaration.", + OptionalTypeBeforeRequired: "A required element cannot follow an optional element.", + OverrideNotInSubClass: "This member cannot have an 'override' modifier because its containing class does not extend another class.", + PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.", + PrivateElementHasAbstract: "Private elements cannot have the 'abstract' modifier.", + PrivateElementHasAccessibility: ({ modifier }) => `Private elements cannot have an accessibility modifier ('${modifier}').`, + PrivateMethodsHasAccessibility: ({ modifier }) => `Private methods cannot have an accessibility modifier ('${modifier}').`, + ReadonlyForMethodSignature: "'readonly' modifier can only appear on a property declaration or index signature.", + ReservedArrowTypeParam: "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.", + ReservedTypeAssertion: "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.", + SetAccesorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.", + SetAccesorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.", + SetAccesorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.", + SingleTypeParameterWithoutTrailingComma: ({ typeParameterName }) => `Single type parameter ${typeParameterName} should have a trailing comma. Example usage: <${typeParameterName},>.`, + StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.", + TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.", + TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.", + TypeModifierIsUsedInTypeExports: "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.", + TypeModifierIsUsedInTypeImports: "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.", + UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.", + UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.", + GenericsEndWithComma: `Trailing comma is not allowed at the end of generics.`, + UnexpectedTypeAnnotation: "Did not expect a type annotation here.", + UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.", + UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.", + UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.", + UnsupportedSignatureParameterKind: ({ type }) => `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${type}.`, + LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." +}; +var DecoratorsError = { + UnexpectedLeadingDecorator: "Leading decorators must be attached to a class declaration.", + DecoratorConstructor: "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?", + TrailingDecorator: "Decorators must be attached to a class element.", + SpreadElementDecorator: `Decorators can't be used with SpreadElement` +}; + +// src/extentions/decorators.ts +function generateParseDecorators(Parse, acornTypeScript, acorn) { + const { tokTypes: tt } = acorn; + const { tokTypes: tokTypes2 } = acornTypeScript; + return class ParseDecorators extends Parse { + takeDecorators(node) { + const decorators = this.decoratorStack[this.decoratorStack.length - 1]; + if (decorators.length) { + node.decorators = decorators; + this.resetStartLocationFromNode(node, decorators[0]); + this.decoratorStack[this.decoratorStack.length - 1] = []; + } + } + parseDecorators(allowExport) { + const currentContextDecorators = this.decoratorStack[this.decoratorStack.length - 1]; + while (this.match(tokTypes2.at)) { + const decorator = this.parseDecorator(); + currentContextDecorators.push(decorator); + } + if (this.match(tt._export)) { + if (!allowExport) { + this.unexpected(); + } + } else if (!this.canHaveLeadingDecorator()) { + this.raise(this.start, DecoratorsError.UnexpectedLeadingDecorator); + } + } + parseDecorator() { + const node = this.startNode(); + this.next(); + this.decoratorStack.push([]); + const startPos = this.start; + const startLoc = this.startLoc; + let expr; + if (this.match(tt.parenL)) { + const startPos2 = this.start; + const startLoc2 = this.startLoc; + this.next(); + expr = this.parseExpression(); + this.expect(tt.parenR); + if (this.options.preserveParens) { + let par = this.startNodeAt(startPos2, startLoc2); + par.expression = expr; + expr = this.finishNode(par, "ParenthesizedExpression"); + } + } else { + expr = this.parseIdent(false); + while (this.eat(tt.dot)) { + const node2 = this.startNodeAt(startPos, startLoc); + node2.object = expr; + node2.property = this.parseIdent(true); + node2.computed = false; + expr = this.finishNode(node2, "MemberExpression"); + } + } + node.expression = this.parseMaybeDecoratorArguments(expr); + this.decoratorStack.pop(); + return this.finishNode(node, "Decorator"); + } + parseMaybeDecoratorArguments(expr) { + if (this.eat(tt.parenL)) { + const node = this.startNodeAtNode(expr); + node.callee = expr; + node.arguments = this.parseExprList(tt.parenR, false); + return this.finishNode(node, "CallExpression"); + } + return expr; + } + }; +} + +// src/extentions/jsx/xhtml.ts +var xhtml_default = { + quot: '"', + amp: "&", + apos: "'", + lt: "<", + gt: ">", + nbsp: "\xA0", + iexcl: "\xA1", + cent: "\xA2", + pound: "\xA3", + curren: "\xA4", + yen: "\xA5", + brvbar: "\xA6", + sect: "\xA7", + uml: "\xA8", + copy: "\xA9", + ordf: "\xAA", + laquo: "\xAB", + not: "\xAC", + shy: "\xAD", + reg: "\xAE", + macr: "\xAF", + deg: "\xB0", + plusmn: "\xB1", + sup2: "\xB2", + sup3: "\xB3", + acute: "\xB4", + micro: "\xB5", + para: "\xB6", + middot: "\xB7", + cedil: "\xB8", + sup1: "\xB9", + ordm: "\xBA", + raquo: "\xBB", + frac14: "\xBC", + frac12: "\xBD", + frac34: "\xBE", + iquest: "\xBF", + Agrave: "\xC0", + Aacute: "\xC1", + Acirc: "\xC2", + Atilde: "\xC3", + Auml: "\xC4", + Aring: "\xC5", + AElig: "\xC6", + Ccedil: "\xC7", + Egrave: "\xC8", + Eacute: "\xC9", + Ecirc: "\xCA", + Euml: "\xCB", + Igrave: "\xCC", + Iacute: "\xCD", + Icirc: "\xCE", + Iuml: "\xCF", + ETH: "\xD0", + Ntilde: "\xD1", + Ograve: "\xD2", + Oacute: "\xD3", + Ocirc: "\xD4", + Otilde: "\xD5", + Ouml: "\xD6", + times: "\xD7", + Oslash: "\xD8", + Ugrave: "\xD9", + Uacute: "\xDA", + Ucirc: "\xDB", + Uuml: "\xDC", + Yacute: "\xDD", + THORN: "\xDE", + szlig: "\xDF", + agrave: "\xE0", + aacute: "\xE1", + acirc: "\xE2", + atilde: "\xE3", + auml: "\xE4", + aring: "\xE5", + aelig: "\xE6", + ccedil: "\xE7", + egrave: "\xE8", + eacute: "\xE9", + ecirc: "\xEA", + euml: "\xEB", + igrave: "\xEC", + iacute: "\xED", + icirc: "\xEE", + iuml: "\xEF", + eth: "\xF0", + ntilde: "\xF1", + ograve: "\xF2", + oacute: "\xF3", + ocirc: "\xF4", + otilde: "\xF5", + ouml: "\xF6", + divide: "\xF7", + oslash: "\xF8", + ugrave: "\xF9", + uacute: "\xFA", + ucirc: "\xFB", + uuml: "\xFC", + yacute: "\xFD", + thorn: "\xFE", + yuml: "\xFF", + OElig: "\u0152", + oelig: "\u0153", + Scaron: "\u0160", + scaron: "\u0161", + Yuml: "\u0178", + fnof: "\u0192", + circ: "\u02C6", + tilde: "\u02DC", + Alpha: "\u0391", + Beta: "\u0392", + Gamma: "\u0393", + Delta: "\u0394", + Epsilon: "\u0395", + Zeta: "\u0396", + Eta: "\u0397", + Theta: "\u0398", + Iota: "\u0399", + Kappa: "\u039A", + Lambda: "\u039B", + Mu: "\u039C", + Nu: "\u039D", + Xi: "\u039E", + Omicron: "\u039F", + Pi: "\u03A0", + Rho: "\u03A1", + Sigma: "\u03A3", + Tau: "\u03A4", + Upsilon: "\u03A5", + Phi: "\u03A6", + Chi: "\u03A7", + Psi: "\u03A8", + Omega: "\u03A9", + alpha: "\u03B1", + beta: "\u03B2", + gamma: "\u03B3", + delta: "\u03B4", + epsilon: "\u03B5", + zeta: "\u03B6", + eta: "\u03B7", + theta: "\u03B8", + iota: "\u03B9", + kappa: "\u03BA", + lambda: "\u03BB", + mu: "\u03BC", + nu: "\u03BD", + xi: "\u03BE", + omicron: "\u03BF", + pi: "\u03C0", + rho: "\u03C1", + sigmaf: "\u03C2", + sigma: "\u03C3", + tau: "\u03C4", + upsilon: "\u03C5", + phi: "\u03C6", + chi: "\u03C7", + psi: "\u03C8", + omega: "\u03C9", + thetasym: "\u03D1", + upsih: "\u03D2", + piv: "\u03D6", + ensp: "\u2002", + emsp: "\u2003", + thinsp: "\u2009", + zwnj: "\u200C", + zwj: "\u200D", + lrm: "\u200E", + rlm: "\u200F", + ndash: "\u2013", + mdash: "\u2014", + lsquo: "\u2018", + rsquo: "\u2019", + sbquo: "\u201A", + ldquo: "\u201C", + rdquo: "\u201D", + bdquo: "\u201E", + dagger: "\u2020", + Dagger: "\u2021", + bull: "\u2022", + hellip: "\u2026", + permil: "\u2030", + prime: "\u2032", + Prime: "\u2033", + lsaquo: "\u2039", + rsaquo: "\u203A", + oline: "\u203E", + frasl: "\u2044", + euro: "\u20AC", + image: "\u2111", + weierp: "\u2118", + real: "\u211C", + trade: "\u2122", + alefsym: "\u2135", + larr: "\u2190", + uarr: "\u2191", + rarr: "\u2192", + darr: "\u2193", + harr: "\u2194", + crarr: "\u21B5", + lArr: "\u21D0", + uArr: "\u21D1", + rArr: "\u21D2", + dArr: "\u21D3", + hArr: "\u21D4", + forall: "\u2200", + part: "\u2202", + exist: "\u2203", + empty: "\u2205", + nabla: "\u2207", + isin: "\u2208", + notin: "\u2209", + ni: "\u220B", + prod: "\u220F", + sum: "\u2211", + minus: "\u2212", + lowast: "\u2217", + radic: "\u221A", + prop: "\u221D", + infin: "\u221E", + ang: "\u2220", + and: "\u2227", + or: "\u2228", + cap: "\u2229", + cup: "\u222A", + int: "\u222B", + there4: "\u2234", + sim: "\u223C", + cong: "\u2245", + asymp: "\u2248", + ne: "\u2260", + equiv: "\u2261", + le: "\u2264", + ge: "\u2265", + sub: "\u2282", + sup: "\u2283", + nsub: "\u2284", + sube: "\u2286", + supe: "\u2287", + oplus: "\u2295", + otimes: "\u2297", + perp: "\u22A5", + sdot: "\u22C5", + lceil: "\u2308", + rceil: "\u2309", + lfloor: "\u230A", + rfloor: "\u230B", + lang: "\u2329", + rang: "\u232A", + loz: "\u25CA", + spades: "\u2660", + clubs: "\u2663", + hearts: "\u2665", + diams: "\u2666" +}; + +// src/extentions/jsx/index.ts +var hexNumber = /^[\da-fA-F]+$/; +var decimalNumber = /^\d+$/; +function getQualifiedJSXName(object) { + if (!object) return object; + if (object.type === "JSXIdentifier") return object.name; + if (object.type === "JSXNamespacedName") return object.namespace.name + ":" + object.name.name; + if (object.type === "JSXMemberExpression") + return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property); +} +function generateJsxParser(acorn, acornTypeScript, Parser, jsxOptions) { + const tt = acorn.tokTypes; + const tok = acornTypeScript.tokTypes; + const isNewLine = acorn.isNewLine; + const isIdentifierChar = acorn.isIdentifierChar; + const options = Object.assign( + { + allowNamespaces: true, + allowNamespacedObjects: true + }, + jsxOptions || {} + ); + return class JsxParser extends Parser { + // Reads inline JSX contents token. + jsx_readToken() { + let out = "", chunkStart = this.pos; + for (; ; ) { + if (this.pos >= this.input.length) this.raise(this.start, "Unterminated JSX contents"); + let ch = this.input.charCodeAt(this.pos); + switch (ch) { + case 60: + // '<' + case 123: + if (this.pos === this.start) { + if (ch === 60 && this.exprAllowed) { + ++this.pos; + return this.finishToken(tok.jsxTagStart); + } + return this.getTokenFromCode(ch); + } + out += this.input.slice(chunkStart, this.pos); + return this.finishToken(tok.jsxText, out); + case 38: + out += this.input.slice(chunkStart, this.pos); + out += this.jsx_readEntity(); + chunkStart = this.pos; + break; + case 62: + // '>' + case 125: + this.raise( + this.pos, + "Unexpected token `" + this.input[this.pos] + "`. Did you mean `" + (ch === 62 ? ">" : "}") + '` or `{"' + this.input[this.pos] + '"}`?' + ); + default: + if (isNewLine(ch)) { + out += this.input.slice(chunkStart, this.pos); + out += this.jsx_readNewLine(true); + chunkStart = this.pos; + } else { + ++this.pos; + } + } + } + } + jsx_readNewLine(normalizeCRLF) { + let ch = this.input.charCodeAt(this.pos); + let out; + ++this.pos; + if (ch === 13 && this.input.charCodeAt(this.pos) === 10) { + ++this.pos; + out = normalizeCRLF ? "\n" : "\r\n"; + } else { + out = String.fromCharCode(ch); + } + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } + return out; + } + jsx_readString(quote) { + let out = "", chunkStart = ++this.pos; + for (; ; ) { + if (this.pos >= this.input.length) this.raise(this.start, "Unterminated string constant"); + let ch = this.input.charCodeAt(this.pos); + if (ch === quote) break; + if (ch === 38) { + out += this.input.slice(chunkStart, this.pos); + out += this.jsx_readEntity(); + chunkStart = this.pos; + } else if (isNewLine(ch)) { + out += this.input.slice(chunkStart, this.pos); + out += this.jsx_readNewLine(false); + chunkStart = this.pos; + } else { + ++this.pos; + } + } + out += this.input.slice(chunkStart, this.pos++); + return this.finishToken(tt.string, out); + } + jsx_readEntity() { + let str = "", count = 0, entity; + let ch = this.input[this.pos]; + if (ch !== "&") this.raise(this.pos, "Entity must start with an ampersand"); + let startPos = ++this.pos; + while (this.pos < this.input.length && count++ < 10) { + ch = this.input[this.pos++]; + if (ch === ";") { + if (str[0] === "#") { + if (str[1] === "x") { + str = str.substr(2); + if (hexNumber.test(str)) entity = String.fromCharCode(parseInt(str, 16)); + } else { + str = str.substr(1); + if (decimalNumber.test(str)) entity = String.fromCharCode(parseInt(str, 10)); + } + } else { + entity = xhtml_default[str]; + } + break; + } + str += ch; + } + if (!entity) { + this.pos = startPos; + return "&"; + } + return entity; + } + // Read a JSX identifier (valid tag or attribute name). + // + // Optimized version since JSX identifiers can't contain + // escape characters and so can be read as single slice. + // Also assumes that first character was already checked + // by isIdentifierStart in readToken. + jsx_readWord() { + let ch, start = this.pos; + do { + ch = this.input.charCodeAt(++this.pos); + } while (isIdentifierChar(ch) || ch === 45); + return this.finishToken(tok.jsxName, this.input.slice(start, this.pos)); + } + // Parse next token as JSX identifier + jsx_parseIdentifier() { + let node = this.startNode(); + if (this.type === tok.jsxName) node.name = this.value; + else if (this.type.keyword) node.name = this.type.keyword; + else this.unexpected(); + this.next(); + return this.finishNode(node, "JSXIdentifier"); + } + // Parse namespaced identifier. + jsx_parseNamespacedName() { + let startPos = this.start, startLoc = this.startLoc; + let name = this.jsx_parseIdentifier(); + if (!options.allowNamespaces || !this.eat(tt.colon)) return name; + var node = this.startNodeAt(startPos, startLoc); + node.namespace = name; + node.name = this.jsx_parseIdentifier(); + return this.finishNode(node, "JSXNamespacedName"); + } + // Parses element name in any form - namespaced, member + // or single identifier. + jsx_parseElementName() { + if (this.type === tok.jsxTagEnd) return ""; + let startPos = this.start, startLoc = this.startLoc; + let node = this.jsx_parseNamespacedName(); + if (this.type === tt.dot && node.type === "JSXNamespacedName" && !options.allowNamespacedObjects) { + this.unexpected(); + } + while (this.eat(tt.dot)) { + let newNode = this.startNodeAt(startPos, startLoc); + newNode.object = node; + newNode.property = this.jsx_parseIdentifier(); + node = this.finishNode(newNode, "JSXMemberExpression"); + } + return node; + } + // Parses any type of JSX attribute value. + jsx_parseAttributeValue() { + switch (this.type) { + case tt.braceL: + let node = this.jsx_parseExpressionContainer(); + if (node.expression.type === "JSXEmptyExpression") + this.raise(node.start, "JSX attributes must only be assigned a non-empty expression"); + return node; + case tok.jsxTagStart: + case tt.string: + return this.parseExprAtom(); + default: + this.raise(this.start, "JSX value should be either an expression or a quoted JSX text"); + } + } + // JSXEmptyExpression is unique type since it doesn't actually parse anything, + // and so it should start at the end of last read token (left brace) and finish + // at the beginning of the next one (right brace). + jsx_parseEmptyExpression() { + let node = this.startNodeAt(this.lastTokEnd, this.lastTokEndLoc); + return this.finishNodeAt(node, "JSXEmptyExpression", this.start, this.startLoc); + } + // Parses JSX expression enclosed into curly brackets. + jsx_parseExpressionContainer() { + let node = this.startNode(); + this.next(); + node.expression = this.type === tt.braceR ? this.jsx_parseEmptyExpression() : this.parseExpression(); + this.expect(tt.braceR); + return this.finishNode(node, "JSXExpressionContainer"); + } + // Parses following JSX attribute name-value pair. + jsx_parseAttribute() { + let node = this.startNode(); + if (this.eat(tt.braceL)) { + this.expect(tt.ellipsis); + node.argument = this.parseMaybeAssign(); + this.expect(tt.braceR); + return this.finishNode(node, "JSXSpreadAttribute"); + } + node.name = this.jsx_parseNamespacedName(); + node.value = this.eat(tt.eq) ? this.jsx_parseAttributeValue() : null; + return this.finishNode(node, "JSXAttribute"); + } + // Parses JSX opening tag starting after '<'. + jsx_parseOpeningElementAt(startPos, startLoc) { + let node = this.startNodeAt(startPos, startLoc); + node.attributes = []; + let nodeName = this.jsx_parseElementName(); + if (nodeName) node.name = nodeName; + while (this.type !== tt.slash && this.type !== tok.jsxTagEnd) + node.attributes.push(this.jsx_parseAttribute()); + node.selfClosing = this.eat(tt.slash); + this.expect(tok.jsxTagEnd); + return this.finishNode(node, nodeName ? "JSXOpeningElement" : "JSXOpeningFragment"); + } + // Parses JSX closing tag starting after '" + ); + } + } + let fragmentOrElement = openingElement.name ? "Element" : "Fragment"; + node["opening" + fragmentOrElement] = openingElement; + node["closing" + fragmentOrElement] = closingElement; + node.children = children; + if (this.type === tt.relational && this.value === "<") { + this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag"); + } + return this.finishNode(node, "JSX" + fragmentOrElement); + } + // Parse JSX text + jsx_parseText() { + let node = this.parseLiteral(this.value); + node.type = "JSXText"; + return node; + } + // Parses entire JSX element from current position. + jsx_parseElement() { + let startPos = this.start, startLoc = this.startLoc; + this.next(); + return this.jsx_parseElementAt(startPos, startLoc); + } + }; +} + +// src/extentions/import-assertions.ts +function generateParseImportAssertions(Parse, acornTypeScript, acorn) { + const { tokTypes: tokTypes2 } = acornTypeScript; + const { tokTypes: tt } = acorn; + return class ImportAttributes extends Parse { + parseMaybeImportAttributes(node) { + if (this.type === tt._with || this.type === tokTypes2.assert) { + this.next(); + const attributes = this.parseImportAttributes(); + if (attributes) { + node.attributes = attributes; + } + } + } + parseImportAttributes() { + this.expect(tt.braceL); + const attrs = this.parseWithEntries(); + this.expect(tt.braceR); + return attrs; + } + parseWithEntries() { + const attrs = []; + const attrNames = /* @__PURE__ */ new Set(); + do { + if (this.type === tt.braceR) { + break; + } + const node = this.startNode(); + let withionKeyNode; + if (this.type === tt.string) { + withionKeyNode = this.parseLiteral(this.value); + } else { + withionKeyNode = this.parseIdent(true); + } + this.next(); + node.key = withionKeyNode; + if (attrNames.has(node.key.name)) { + this.raise(this.pos, "Duplicated key in attributes"); + } + attrNames.add(node.key.name); + if (this.type !== tt.string) { + this.raise(this.pos, "Only string is supported as an attribute value"); + } + node.value = this.parseLiteral(this.value); + attrs.push(this.finishNode(node, "ImportAttribute")); + } while (this.eat(tt.comma)); + return attrs; + } + }; +} + +// src/index.ts +var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; +function assert(x) { + if (!x) { + throw new Error("Assert fail"); + } +} +function tsIsClassAccessor(modifier) { + return modifier === "accessor"; +} +function tsIsVarianceAnnotations(modifier) { + return modifier === "in" || modifier === "out"; +} +var FUNC_STATEMENT = 1; +var FUNC_HANGING_STATEMENT = 2; +var FUNC_NULLABLE_ID = 4; +var acornScope = { + SCOPE_TOP: 1, + SCOPE_FUNCTION: 2, + SCOPE_ASYNC: 4, + SCOPE_GENERATOR: 8, + SCOPE_ARROW: 16, + SCOPE_SIMPLE_CATCH: 32, + SCOPE_SUPER: 64, + SCOPE_DIRECT_SUPER: 128, + SCOPE_CLASS_STATIC_BLOCK: 256, + SCOPE_VAR: 256, + BIND_NONE: 0, + // Not a binding + BIND_VAR: 1, + // Var-style binding + BIND_LEXICAL: 2, + // Let- or const-style binding + BIND_FUNCTION: 3, + // Function declaration + BIND_SIMPLE_CATCH: 4, + // Simple (identifier pattern) catch binding + BIND_OUTSIDE: 5, + // Special case for function names as bound inside the + BIND_TS_TYPE: 6, + BIND_TS_INTERFACE: 7, + BIND_TS_NAMESPACE: 8, + BIND_FLAGS_TS_EXPORT_ONLY: 1024, + BIND_FLAGS_TS_IMPORT: 4096, + BIND_FLAGS_TS_ENUM: 256, + BIND_FLAGS_TS_CONST_ENUM: 512, + BIND_FLAGS_CLASS: 128 + // function +}; +function functionFlags(async, generator) { + return acornScope.SCOPE_FUNCTION | (async ? acornScope.SCOPE_ASYNC : 0) | (generator ? acornScope.SCOPE_GENERATOR : 0); +} +function isPossiblyLiteralEnum(expression) { + if (expression.type !== "MemberExpression") return false; + const { computed, property } = expression; + if (computed && (property.type !== "TemplateLiteral" || property.expressions.length > 0)) { + return false; + } + return isUncomputedMemberExpressionChain(expression.object); +} +function isUncomputedMemberExpressionChain(expression) { + if (expression.type === "Identifier") return true; + if (expression.type !== "MemberExpression") return false; + if (expression.computed) return false; + return isUncomputedMemberExpressionChain(expression.object); +} +function tsIsAccessModifier(modifier) { + return modifier === "private" || modifier === "public" || modifier === "protected"; +} +function tokenCanStartExpression(token) { + return Boolean(token.startsExpr); +} +function nonNull(x) { + if (x == null) { + throw new Error(`Unexpected ${x} value.`); + } + return x; +} +function keywordTypeFromName(value) { + switch (value) { + case "any": + return "TSAnyKeyword"; + case "boolean": + return "TSBooleanKeyword"; + case "bigint": + return "TSBigIntKeyword"; + case "never": + return "TSNeverKeyword"; + case "number": + return "TSNumberKeyword"; + case "object": + return "TSObjectKeyword"; + case "string": + return "TSStringKeyword"; + case "symbol": + return "TSSymbolKeyword"; + case "undefined": + return "TSUndefinedKeyword"; + case "unknown": + return "TSUnknownKeyword"; + default: + return void 0; + } +} +function tsPlugin(options) { + const { dts = false } = options || {}; + const disallowAmbiguousJSXLike = !!options?.jsx; + return function(Parser) { + const _acorn = Parser.acorn || acornNamespace; + const acornTypeScript = generateAcornTypeScript(_acorn); + const tt = _acorn.tokTypes; + const keywordTypes2 = _acorn.keywordTypes; + const isIdentifierStart = _acorn.isIdentifierStart; + const lineBreak = _acorn.lineBreak; + const isNewLine = _acorn.isNewLine; + const tokContexts = _acorn.tokContexts; + const isIdentifierChar = _acorn.isIdentifierChar; + const { + tokTypes: tokTypes2, + tokContexts: tsTokContexts, + keywordsRegExp, + tokenIsLiteralPropertyName, + tokenIsTemplate, + tokenIsTSDeclarationStart, + tokenIsIdentifier, + tokenIsKeywordOrIdentifier, + tokenIsTSTypeOperator + } = acornTypeScript; + function nextLineBreak(code, from, end = code.length) { + for (let i = from; i < end; i++) { + let next = code.charCodeAt(i); + if (isNewLine(next)) + return i < end - 1 && next === 13 && code.charCodeAt(i + 1) === 10 ? i + 2 : i + 1; + } + return -1; + } + Parser = generateParseDecorators(Parser, acornTypeScript, _acorn); + if (options?.jsx) { + Parser = generateJsxParser( + _acorn, + acornTypeScript, + Parser, + typeof options.jsx === "boolean" ? {} : options.jsx + ); + } + Parser = generateParseImportAssertions(Parser, acornTypeScript, _acorn); + class TypeScriptParser extends Parser { + constructor(options2, input, startPos) { + super(options2, input, startPos); + this.preValue = null; + this.preToken = null; + this.isLookahead = false; + this.isAmbientContext = false; + this.inAbstractClass = false; + this.inType = false; + this.inDisallowConditionalTypesContext = false; + this.maybeInArrowParameters = false; + this.shouldParseArrowReturnType = void 0; + this.shouldParseAsyncArrowReturnType = void 0; + this.decoratorStack = [[]]; + this.importsStack = [[]]; + /** + * we will only parse one import node or export node at same time. + * default kind is undefined + * */ + this.importOrExportOuterKind = void 0; + this.tsParseConstModifier = (node) => { + this.tsParseModifiers({ + modified: node, + allowedModifiers: ["const"], + // for better error recovery + disallowedModifiers: ["in", "out"], + errorTemplate: TypeScriptError.InvalidModifierOnTypeParameterPositions + }); + }; + this.ecmaVersion = this.options.ecmaVersion; + } + // support in Class static + static get acornTypeScript() { + return acornTypeScript; + } + // support in runtime, get acornTypeScript be this + get acornTypeScript() { + return acornTypeScript; + } + getTokenFromCodeInType(code) { + if (code === 62) { + return this.finishOp(tt.relational, 1); + } + if (code === 60) { + return this.finishOp(tt.relational, 1); + } + return super.getTokenFromCode(code); + } + readToken(code) { + if (!this.inType) { + let context = this.curContext(); + if (context === tsTokContexts.tc_expr) return this.jsx_readToken(); + if (context === tsTokContexts.tc_oTag || context === tsTokContexts.tc_cTag) { + if (isIdentifierStart(code)) return this.jsx_readWord(); + if (code == 62) { + ++this.pos; + return this.finishToken(tokTypes2.jsxTagEnd); + } + if ((code === 34 || code === 39) && context == tsTokContexts.tc_oTag) + return this.jsx_readString(code); + } + if (code === 60 && this.exprAllowed && this.input.charCodeAt(this.pos + 1) !== 33) { + ++this.pos; + if (options?.jsx) { + return this.finishToken(tokTypes2.jsxTagStart); + } else { + return this.finishToken(tt.relational, "<"); + } + } + } + return super.readToken(code); + } + getTokenFromCode(code) { + if (this.inType) { + return this.getTokenFromCodeInType(code); + } + if (code === 64) { + ++this.pos; + return this.finishToken(tokTypes2.at); + } + return super.getTokenFromCode(code); + } + isAbstractClass() { + return this.ts_isContextual(tokTypes2.abstract) && this.lookahead().type === tt._class; + } + finishNode(node, type) { + if (node.type !== "" && node.end !== 0) { + return node; + } + return super.finishNode(node, type); + } + // tryParse will clone parser state. + // It is expensive and should be used with cautions + tryParse(fn, oldState = this.cloneCurLookaheadState()) { + const abortSignal = { node: null }; + try { + const node = fn((node2 = null) => { + abortSignal.node = node2; + throw abortSignal; + }); + return { + node, + error: null, + thrown: false, + aborted: false, + failState: null + }; + } catch (error) { + const failState = this.getCurLookaheadState(); + this.setLookaheadState(oldState); + if (error instanceof SyntaxError) { + return { + node: null, + error, + thrown: true, + aborted: false, + failState + }; + } + if (error === abortSignal) { + return { + node: abortSignal.node, + error: null, + thrown: false, + aborted: true, + failState + }; + } + throw error; + } + } + setOptionalParametersError(refExpressionErrors, resultError) { + refExpressionErrors.optionalParametersLoc = resultError?.loc ?? this.startLoc; + } + // used after we have finished parsing types + reScan_lt_gt() { + if (this.type === tt.relational) { + this.pos -= 1; + this.readToken_lt_gt(this.fullCharCodeAtPos()); + } + } + reScan_lt() { + const { type } = this; + if (type === tt.bitShift) { + this.pos -= 2; + this.finishOp(tt.relational, 1); + return tt.relational; + } + return type; + } + resetEndLocation(node, endPos = this.lastTokEnd, endLoc = this.lastTokEndLoc) { + node.end = endPos; + node.loc.end = endLoc; + if (this.options.ranges) node.range[1] = endPos; + } + startNodeAtNode(type) { + return super.startNodeAt(type.start, type.loc.start); + } + nextTokenStart() { + return this.nextTokenStartSince(this.pos); + } + tsHasSomeModifiers(member, modifiers) { + return modifiers.some((modifier) => { + if (tsIsAccessModifier(modifier)) { + return member.accessibility === modifier; + } + return !!member[modifier]; + }); + } + tsIsStartOfStaticBlocks() { + return this.isContextual("static") && this.lookaheadCharCode() === 123; + } + tsCheckForInvalidTypeCasts(items) { + items.forEach((node) => { + if (node?.type === "TSTypeCastExpression") { + this.raise(node.typeAnnotation.start, TypeScriptError.UnexpectedTypeAnnotation); + } + }); + } + atPossibleAsyncArrow(base) { + return base.type === "Identifier" && base.name === "async" && this.lastTokEndLoc.column === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && base.start === this.potentialArrowAt; + } + tsIsIdentifier() { + return tokenIsIdentifier(this.type); + } + tsTryParseTypeOrTypePredicateAnnotation() { + return this.match(tt.colon) ? this.tsParseTypeOrTypePredicateAnnotation(tt.colon) : void 0; + } + tsTryParseGenericAsyncArrowFunction(startPos, startLoc, forInit) { + if (!this.tsMatchLeftRelational()) { + return void 0; + } + const oldMaybeInArrowParameters = this.maybeInArrowParameters; + this.maybeInArrowParameters = true; + const res = this.tsTryParseAndCatch(() => { + const node = this.startNodeAt(startPos, startLoc); + node.typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier); + super.parseFunctionParams(node); + node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation(); + this.expect(tt.arrow); + return node; + }); + this.maybeInArrowParameters = oldMaybeInArrowParameters; + if (!res) { + return void 0; + } + return super.parseArrowExpression( + res, + /* params are already set */ + null, + /* async */ + true, + /* forInit */ + forInit + ); + } + // Used when parsing type arguments from ES productions, where the first token + // has been created without state.inType. Thus we need to rescan the lt token. + tsParseTypeArgumentsInExpression() { + if (this.reScan_lt() !== tt.relational) { + return void 0; + } + return this.tsParseTypeArguments(); + } + tsInNoContext(cb) { + const oldContext = this.context; + this.context = [oldContext[0]]; + try { + return cb(); + } finally { + this.context = oldContext; + } + } + tsTryParseTypeAnnotation() { + return this.match(tt.colon) ? this.tsParseTypeAnnotation() : void 0; + } + isUnparsedContextual(nameStart, name) { + const nameEnd = nameStart + name.length; + if (this.input.slice(nameStart, nameEnd) === name) { + const nextCh = this.input.charCodeAt(nameEnd); + return !(isIdentifierChar(nextCh) || // check if `nextCh is between 0xd800 - 0xdbff, + // if `nextCh` is NaN, `NaN & 0xfc00` is 0, the function + // returns true + (nextCh & 64512) === 55296); + } + return false; + } + isAbstractConstructorSignature() { + return this.ts_isContextual(tokTypes2.abstract) && this.lookahead().type === tt._new; + } + nextTokenStartSince(pos) { + skipWhiteSpace.lastIndex = pos; + return skipWhiteSpace.test(this.input) ? skipWhiteSpace.lastIndex : pos; + } + lookaheadCharCode() { + return this.input.charCodeAt(this.nextTokenStart()); + } + compareLookaheadState(state, state2) { + for (const key of Object.keys(state)) { + if (state[key] !== state2[key]) return false; + } + return true; + } + createLookaheadState() { + this.value = null; + this.context = [this.curContext()]; + } + getCurLookaheadState() { + return { + endLoc: this.endLoc, + lastTokEnd: this.lastTokEnd, + lastTokStart: this.lastTokStart, + lastTokStartLoc: this.lastTokStartLoc, + pos: this.pos, + value: this.value, + type: this.type, + start: this.start, + end: this.end, + context: this.context, + startLoc: this.startLoc, + lastTokEndLoc: this.lastTokEndLoc, + curLine: this.curLine, + lineStart: this.lineStart, + curPosition: this.curPosition, + containsEsc: this.containsEsc + }; + } + cloneCurLookaheadState() { + return { + pos: this.pos, + value: this.value, + type: this.type, + start: this.start, + end: this.end, + context: this.context && this.context.slice(), + startLoc: this.startLoc, + lastTokEndLoc: this.lastTokEndLoc, + endLoc: this.endLoc, + lastTokEnd: this.lastTokEnd, + lastTokStart: this.lastTokStart, + lastTokStartLoc: this.lastTokStartLoc, + curLine: this.curLine, + lineStart: this.lineStart, + curPosition: this.curPosition, + containsEsc: this.containsEsc + }; + } + setLookaheadState(state) { + this.pos = state.pos; + this.value = state.value; + this.endLoc = state.endLoc; + this.lastTokEnd = state.lastTokEnd; + this.lastTokStart = state.lastTokStart; + this.lastTokStartLoc = state.lastTokStartLoc; + this.type = state.type; + this.start = state.start; + this.end = state.end; + this.context = state.context; + this.startLoc = state.startLoc; + this.lastTokEndLoc = state.lastTokEndLoc; + this.curLine = state.curLine; + this.lineStart = state.lineStart; + this.curPosition = state.curPosition; + this.containsEsc = state.containsEsc; + } + // Utilities + tsLookAhead(f) { + const state = this.getCurLookaheadState(); + const res = f(); + this.setLookaheadState(state); + return res; + } + lookahead(number) { + const oldState = this.getCurLookaheadState(); + this.createLookaheadState(); + this.isLookahead = true; + if (number !== void 0) { + for (let i = 0; i < number; i++) { + this.nextToken(); + } + } else { + this.nextToken(); + } + this.isLookahead = false; + const curState = this.getCurLookaheadState(); + this.setLookaheadState(oldState); + return curState; + } + readWord() { + let word = this.readWord1(); + let type = tt.name; + if (this.keywords.test(word)) { + type = keywordTypes2[word]; + } else if (new RegExp(keywordsRegExp).test(word)) { + type = tokTypes2[word]; + } + return this.finishToken(type, word); + } + skipBlockComment() { + let startLoc; + if (!this.isLookahead) startLoc = this.options.onComment && this.curPosition(); + let start = this.pos, end = this.input.indexOf("*/", this.pos += 2); + if (end === -1) this.raise(this.pos - 2, "Unterminated comment"); + this.pos = end + 2; + if (this.options.locations) { + for (let nextBreak, pos = start; (nextBreak = nextLineBreak(this.input, pos, this.pos)) > -1; ) { + ++this.curLine; + pos = this.lineStart = nextBreak; + } + } + if (this.isLookahead) return; + if (this.options.onComment) { + this.options.onComment( + true, + this.input.slice(start + 2, end), + start, + this.pos, + startLoc, + this.curPosition() + ); + } + } + skipLineComment(startSkip) { + let start = this.pos; + let startLoc; + if (!this.isLookahead) startLoc = this.options.onComment && this.curPosition(); + let ch = this.input.charCodeAt(this.pos += startSkip); + while (this.pos < this.input.length && !isNewLine(ch)) { + ch = this.input.charCodeAt(++this.pos); + } + if (this.isLookahead) return; + if (this.options.onComment) + this.options.onComment( + false, + this.input.slice(start + startSkip, this.pos), + start, + this.pos, + startLoc, + this.curPosition() + ); + } + finishToken(type, val) { + this.preValue = this.value; + this.preToken = this.type; + this.end = this.pos; + if (this.options.locations) this.endLoc = this.curPosition(); + let prevType = this.type; + this.type = type; + this.value = val; + if (!this.isLookahead) { + this.updateContext(prevType); + } + } + resetStartLocation(node, start, startLoc) { + node.start = start; + node.loc.start = startLoc; + if (this.options.ranges) node.range[0] = start; + } + isLineTerminator() { + return this.eat(tt.semi) || super.canInsertSemicolon(); + } + hasFollowingLineBreak() { + skipWhiteSpaceToLineBreak.lastIndex = this.end; + return skipWhiteSpaceToLineBreak.test(this.input); + } + addExtra(node, key, value, enumerable = true) { + if (!node) return; + const extra = node.extra = node.extra || {}; + if (enumerable) { + extra[key] = value; + } else { + Object.defineProperty(extra, key, { enumerable, value }); + } + } + /** + * Test if current token is a literal property name + * https://tc39.es/ecma262/#prod-LiteralPropertyName + * LiteralPropertyName: + * IdentifierName + * StringLiteral + * NumericLiteral + * BigIntLiteral + */ + isLiteralPropertyName() { + return tokenIsLiteralPropertyName(this.type); + } + hasPrecedingLineBreak() { + return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); + } + createIdentifier(node, name) { + node.name = name; + return this.finishNode(node, "Identifier"); + } + /** + * Reset the start location of node to the start location of locationNode + */ + resetStartLocationFromNode(node, locationNode) { + this.resetStartLocation(node, locationNode.start, locationNode.loc.start); + } + // This is used in flow and typescript plugin + // Determine whether a parameter is a this param + isThisParam(param) { + return param.type === "Identifier" && param.name === "this"; + } + isLookaheadContextual(name) { + const next = this.nextTokenStart(); + return this.isUnparsedContextual(next, name); + } + /** + * ts type isContextual + * @param {TokenType} type + * @param {TokenType} token + * @returns {boolean} + * */ + ts_type_isContextual(type, token) { + return type === token && !this.containsEsc; + } + /** + * ts isContextual + * @param {TokenType} token + * @returns {boolean} + * */ + ts_isContextual(token) { + return this.type === token && !this.containsEsc; + } + ts_isContextualWithState(state, token) { + return state.type === token && !state.containsEsc; + } + isContextualWithState(keyword, state) { + return state.type === tt.name && state.value === keyword && !state.containsEsc; + } + tsIsStartOfMappedType() { + this.next(); + if (this.eat(tt.plusMin)) { + return this.ts_isContextual(tokTypes2.readonly); + } + if (this.ts_isContextual(tokTypes2.readonly)) { + this.next(); + } + if (!this.match(tt.bracketL)) { + return false; + } + this.next(); + if (!this.tsIsIdentifier()) { + return false; + } + this.next(); + return this.match(tt._in); + } + tsInDisallowConditionalTypesContext(cb) { + const oldInDisallowConditionalTypesContext = this.inDisallowConditionalTypesContext; + this.inDisallowConditionalTypesContext = true; + try { + return cb(); + } finally { + this.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; + } + } + tsTryParseType() { + return this.tsEatThenParseType(tt.colon); + } + /** + * Whether current token matches given type + * + * @param {TokenType} type + * @returns {boolean} + * @memberof Tokenizer + */ + match(type) { + return this.type === type; + } + matchJsx(type) { + return this.type === acornTypeScript.tokTypes[type]; + } + ts_eatWithState(type, nextCount, state) { + const targetType = state.type; + if (type === targetType) { + for (let i = 0; i < nextCount; i++) { + this.next(); + } + return true; + } else { + return false; + } + } + ts_eatContextualWithState(name, nextCount, state) { + if (keywordsRegExp.test(name)) { + if (this.ts_isContextualWithState(state, tokTypes2[name])) { + for (let i = 0; i < nextCount; i++) { + this.next(); + } + return true; + } + return false; + } else { + if (!this.isContextualWithState(name, state)) return false; + for (let i = 0; i < nextCount; i++) { + this.next(); + } + return true; + } + } + canHaveLeadingDecorator() { + return this.match(tt._class); + } + eatContextual(name) { + if (keywordsRegExp.test(name)) { + if (this.ts_isContextual(tokTypes2[name])) { + this.next(); + return true; + } + return false; + } else { + return super.eatContextual(name); + } + } + tsIsExternalModuleReference() { + return this.isContextual("require") && this.lookaheadCharCode() === 40; + } + tsParseExternalModuleReference() { + const node = this.startNode(); + this.expectContextual("require"); + this.expect(tt.parenL); + if (!this.match(tt.string)) { + this.unexpected(); + } + node.expression = this.parseExprAtom(); + this.expect(tt.parenR); + return this.finishNode(node, "TSExternalModuleReference"); + } + tsParseEntityName(allowReservedWords = true) { + let entity = this.parseIdent(allowReservedWords); + while (this.eat(tt.dot)) { + const node = this.startNodeAtNode(entity); + node.left = entity; + node.right = this.parseIdent(allowReservedWords); + entity = this.finishNode(node, "TSQualifiedName"); + } + return entity; + } + tsParseEnumMember() { + const node = this.startNode(); + node.id = this.match(tt.string) ? this.parseLiteral(this.value) : this.parseIdent( + /* liberal */ + true + ); + if (this.eat(tt.eq)) { + node.initializer = this.parseMaybeAssign(); + } + return this.finishNode(node, "TSEnumMember"); + } + tsParseEnumDeclaration(node, properties = {}) { + if (properties.const) node.const = true; + if (properties.declare) node.declare = true; + this.expectContextual("enum"); + node.id = this.parseIdent(); + this.checkLValSimple(node.id); + this.expect(tt.braceL); + node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)); + this.expect(tt.braceR); + return this.finishNode(node, "TSEnumDeclaration"); + } + tsParseModuleBlock() { + const node = this.startNode(); + this.enterScope(TS_SCOPE_OTHER); + this.expect(tt.braceL); + node.body = []; + while (this.type !== tt.braceR) { + let stmt = this.parseStatement(null, true); + node.body.push(stmt); + } + this.next(); + super.exitScope(); + return this.finishNode(node, "TSModuleBlock"); + } + tsParseAmbientExternalModuleDeclaration(node) { + if (this.ts_isContextual(tokTypes2.global)) { + node.global = true; + node.id = this.parseIdent(); + } else if (this.match(tt.string)) { + node.id = this.parseLiteral(this.value); + } else { + this.unexpected(); + } + if (this.match(tt.braceL)) { + this.enterScope(TS_SCOPE_TS_MODULE); + node.body = this.tsParseModuleBlock(); + super.exitScope(); + } else { + super.semicolon(); + } + return this.finishNode(node, "TSModuleDeclaration"); + } + tsTryParseDeclare(nany) { + if (this.isLineTerminator()) { + return; + } + let starttype = this.type; + let kind; + if (this.isContextual("let")) { + starttype = tt._var; + kind = "let"; + } + return this.tsInAmbientContext(() => { + if (starttype === tt._function) { + nany.declare = true; + return this.parseFunctionStatement( + nany, + /* async */ + false, + /* declarationPosition */ + true + ); + } + if (starttype === tt._class) { + nany.declare = true; + return this.parseClass(nany, true); + } + if (starttype === tokTypes2.enum) { + return this.tsParseEnumDeclaration(nany, { declare: true }); + } + if (starttype === tokTypes2.global) { + return this.tsParseAmbientExternalModuleDeclaration(nany); + } + if (starttype === tt._const || starttype === tt._var) { + if (!this.match(tt._const) || !this.isLookaheadContextual("enum")) { + nany.declare = true; + return this.parseVarStatement(nany, kind || this.value, true); + } + this.expect(tt._const); + return this.tsParseEnumDeclaration(nany, { + const: true, + declare: true + }); + } + if (starttype === tokTypes2.interface) { + const result = this.tsParseInterfaceDeclaration(nany, { + declare: true + }); + if (result) return result; + } + if (tokenIsIdentifier(starttype)) { + return this.tsParseDeclaration( + nany, + this.value, + /* next */ + true + ); + } + }); + } + tsIsListTerminator(kind) { + switch (kind) { + case "EnumMembers": + case "TypeMembers": + return this.match(tt.braceR); + case "HeritageClauseElement": + return this.match(tt.braceL); + case "TupleElementTypes": + return this.match(tt.bracketR); + case "TypeParametersOrArguments": + return this.tsMatchRightRelational(); + } + } + /** + * If !expectSuccess, returns undefined instead of failing to parse. + * If expectSuccess, parseElement should always return a defined value. + */ + tsParseDelimitedListWorker(kind, parseElement, expectSuccess, refTrailingCommaPos) { + const result = []; + let trailingCommaPos = -1; + for (; ; ) { + if (this.tsIsListTerminator(kind)) { + break; + } + trailingCommaPos = -1; + const element = parseElement(); + if (element == null) { + return void 0; + } + result.push(element); + if (this.eat(tt.comma)) { + trailingCommaPos = this.lastTokStart; + continue; + } + if (this.tsIsListTerminator(kind)) { + break; + } + if (expectSuccess) { + this.expect(tt.comma); + } + return void 0; + } + if (refTrailingCommaPos) { + refTrailingCommaPos.value = trailingCommaPos; + } + return result; + } + tsParseDelimitedList(kind, parseElement, refTrailingCommaPos) { + return nonNull( + this.tsParseDelimitedListWorker( + kind, + parseElement, + /* expectSuccess */ + true, + refTrailingCommaPos + ) + ); + } + tsParseBracketedList(kind, parseElement, bracket, skipFirstToken, refTrailingCommaPos) { + if (!skipFirstToken) { + if (bracket) { + this.expect(tt.bracketL); + } else { + this.expect(tt.relational); + } + } + const result = this.tsParseDelimitedList(kind, parseElement, refTrailingCommaPos); + if (bracket) { + this.expect(tt.bracketR); + } else { + this.expect(tt.relational); + } + return result; + } + tsParseTypeParameterName() { + const typeName = this.parseIdent(); + return typeName.name; + } + tsEatThenParseType(token) { + return !this.match(token) ? void 0 : this.tsNextThenParseType(); + } + tsExpectThenParseType(token) { + return this.tsDoThenParseType(() => this.expect(token)); + } + tsNextThenParseType() { + return this.tsDoThenParseType(() => this.next()); + } + tsDoThenParseType(cb) { + return this.tsInType(() => { + cb(); + return this.tsParseType(); + }); + } + tsSkipParameterStart() { + if (tokenIsIdentifier(this.type) || this.match(tt._this)) { + this.next(); + return true; + } + if (this.match(tt.braceL)) { + try { + this.parseObj(true); + return true; + } catch { + return false; + } + } + if (this.match(tt.bracketL)) { + this.next(); + try { + this.parseBindingList(tt.bracketR, true, true); + return true; + } catch { + return false; + } + } + return false; + } + tsIsUnambiguouslyStartOfFunctionType() { + this.next(); + if (this.match(tt.parenR) || this.match(tt.ellipsis)) { + return true; + } + if (this.tsSkipParameterStart()) { + if (this.match(tt.colon) || this.match(tt.comma) || this.match(tt.question) || this.match(tt.eq)) { + return true; + } + if (this.match(tt.parenR)) { + this.next(); + if (this.match(tt.arrow)) { + return true; + } + } + } + return false; + } + tsIsStartOfFunctionType() { + if (this.tsMatchLeftRelational()) { + return true; + } + return this.match(tt.parenL) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this)); + } + tsInAllowConditionalTypesContext(cb) { + const oldInDisallowConditionalTypesContext = this.inDisallowConditionalTypesContext; + this.inDisallowConditionalTypesContext = false; + try { + return cb(); + } finally { + this.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; + } + } + tsParseBindingListForSignature() { + return super.parseBindingList(tt.parenR, true, true).map((pattern) => { + if (pattern.type !== "Identifier" && pattern.type !== "RestElement" && pattern.type !== "ObjectPattern" && pattern.type !== "ArrayPattern") { + this.raise( + pattern.start, + TypeScriptError.UnsupportedSignatureParameterKind(pattern.type) + ); + } + return pattern; + }); + } + tsParseTypePredicateAsserts() { + if (this.type !== tokTypes2.asserts) { + return false; + } + const containsEsc = this.containsEsc; + this.next(); + if (!tokenIsIdentifier(this.type) && !this.match(tt._this)) { + return false; + } + if (containsEsc) { + this.raise(this.lastTokStart, "Escape sequence in keyword asserts"); + } + return true; + } + tsParseThisTypeNode() { + const node = this.startNode(); + this.next(); + return this.finishNode(node, "TSThisType"); + } + tsParseTypeAnnotation(eatColon = true, t = this.startNode()) { + this.tsInType(() => { + if (eatColon) this.expect(tt.colon); + t.typeAnnotation = this.tsParseType(); + }); + return this.finishNode(t, "TSTypeAnnotation"); + } + tsParseThisTypePredicate(lhs) { + this.next(); + const node = this.startNodeAtNode(lhs); + node.parameterName = lhs; + node.typeAnnotation = this.tsParseTypeAnnotation( + /* eatColon */ + false + ); + node.asserts = false; + return this.finishNode(node, "TSTypePredicate"); + } + tsParseThisTypeOrThisTypePredicate() { + const thisKeyword = this.tsParseThisTypeNode(); + if (this.isContextual("is") && !this.hasPrecedingLineBreak()) { + return this.tsParseThisTypePredicate(thisKeyword); + } else { + return thisKeyword; + } + } + tsParseTypePredicatePrefix() { + const id = this.parseIdent(); + if (this.isContextual("is") && !this.hasPrecedingLineBreak()) { + this.next(); + return id; + } + } + tsParseTypeOrTypePredicateAnnotation(returnToken) { + return this.tsInType(() => { + const t = this.startNode(); + this.expect(returnToken); + const node = this.startNode(); + const asserts = !!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this)); + if (asserts && this.match(tt._this)) { + let thisTypePredicate = this.tsParseThisTypeOrThisTypePredicate(); + if (thisTypePredicate.type === "TSThisType") { + node.parameterName = thisTypePredicate; + node.asserts = true; + node.typeAnnotation = null; + thisTypePredicate = this.finishNode(node, "TSTypePredicate"); + } else { + this.resetStartLocationFromNode(thisTypePredicate, node); + thisTypePredicate.asserts = true; + } + t.typeAnnotation = thisTypePredicate; + return this.finishNode(t, "TSTypeAnnotation"); + } + const typePredicateVariable = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this)); + if (!typePredicateVariable) { + if (!asserts) { + return this.tsParseTypeAnnotation( + /* eatColon */ + false, + t + ); + } + node.parameterName = this.parseIdent(); + node.asserts = asserts; + node.typeAnnotation = null; + t.typeAnnotation = this.finishNode(node, "TSTypePredicate"); + return this.finishNode(t, "TSTypeAnnotation"); + } + const type = this.tsParseTypeAnnotation( + /* eatColon */ + false + ); + node.parameterName = typePredicateVariable; + node.typeAnnotation = type; + node.asserts = asserts; + t.typeAnnotation = this.finishNode(node, "TSTypePredicate"); + return this.finishNode(t, "TSTypeAnnotation"); + }); + } + // Note: In TypeScript implementation we must provide `yieldContext` and `awaitContext`, + // but here it's always false, because this is only used for types. + tsFillSignature(returnToken, signature) { + const returnTokenRequired = returnToken === tt.arrow; + const paramsKey = "parameters"; + const returnTypeKey = "typeAnnotation"; + signature.typeParameters = this.tsTryParseTypeParameters(); + this.expect(tt.parenL); + signature[paramsKey] = this.tsParseBindingListForSignature(); + if (returnTokenRequired) { + signature[returnTypeKey] = this.tsParseTypeOrTypePredicateAnnotation(returnToken); + } else if (this.match(returnToken)) { + signature[returnTypeKey] = this.tsParseTypeOrTypePredicateAnnotation(returnToken); + } + } + tsTryNextParseConstantContext() { + if (this.lookahead().type !== tt._const) return null; + this.next(); + const typeReference = this.tsParseTypeReference(); + if (typeReference.typeParameters || typeReference.typeArguments) { + this.raise( + typeReference.typeName.start, + TypeScriptError.CannotFindName({ + name: "const" + }) + ); + } + return typeReference; + } + tsParseFunctionOrConstructorType(type, abstract) { + const node = this.startNode(); + if (type === "TSConstructorType") { + node.abstract = !!abstract; + if (abstract) this.next(); + this.next(); + } + this.tsInAllowConditionalTypesContext(() => this.tsFillSignature(tt.arrow, node)); + return this.finishNode(node, type); + } + tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) { + const node = this.startNode(); + const hasLeadingOperator = this.eat(operator); + const types = []; + do { + types.push(parseConstituentType()); + } while (this.eat(operator)); + if (types.length === 1 && !hasLeadingOperator) { + return types[0]; + } + node.types = types; + return this.finishNode(node, kind); + } + tsCheckTypeAnnotationForReadOnly(node) { + switch (node.typeAnnotation.type) { + case "TSTupleType": + case "TSArrayType": + return; + default: + this.raise(node.start, TypeScriptError.UnexpectedReadonly); + } + } + tsParseTypeOperator() { + const node = this.startNode(); + const operator = this.value; + this.next(); + node.operator = operator; + node.typeAnnotation = this.tsParseTypeOperatorOrHigher(); + if (operator === "readonly") { + this.tsCheckTypeAnnotationForReadOnly(node); + } + return this.finishNode(node, "TSTypeOperator"); + } + tsParseConstraintForInferType() { + if (this.eat(tt._extends)) { + const constraint = this.tsInDisallowConditionalTypesContext(() => this.tsParseType()); + if (this.inDisallowConditionalTypesContext || !this.match(tt.question)) { + return constraint; + } + } + } + tsParseInferType() { + const node = this.startNode(); + this.expectContextual("infer"); + const typeParameter = this.startNode(); + typeParameter.name = this.tsParseTypeParameterName(); + typeParameter.constraint = this.tsTryParse(() => this.tsParseConstraintForInferType()); + node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter"); + return this.finishNode(node, "TSInferType"); + } + tsParseLiteralTypeNode() { + const node = this.startNode(); + node.literal = (() => { + switch (this.type) { + case tt.num: + // we don't need bigint type here + // case tt.bigint: + case tt.string: + case tt._true: + case tt._false: + return this.parseExprAtom(); + default: + this.unexpected(); + } + })(); + return this.finishNode(node, "TSLiteralType"); + } + tsParseImportType() { + const node = this.startNode(); + this.expect(tt._import); + this.expect(tt.parenL); + if (!this.match(tt.string)) { + this.raise(this.start, TypeScriptError.UnsupportedImportTypeArgument); + } + node.argument = this.parseExprAtom(); + this.expect(tt.parenR); + if (this.eat(tt.dot)) { + node.qualifier = this.tsParseEntityName(); + } + if (this.tsMatchLeftRelational()) { + node.typeArguments = this.tsParseTypeArguments(); + } + return this.finishNode(node, "TSImportType"); + } + tsParseTypeQuery() { + const node = this.startNode(); + this.expect(tt._typeof); + if (this.match(tt._import)) { + node.exprName = this.tsParseImportType(); + } else { + node.exprName = this.tsParseEntityName(); + } + if (!this.hasPrecedingLineBreak() && this.tsMatchLeftRelational()) { + node.typeArguments = this.tsParseTypeArguments(); + } + return this.finishNode(node, "TSTypeQuery"); + } + tsParseMappedTypeParameter() { + const node = this.startNode(); + node.name = this.tsParseTypeParameterName(); + node.constraint = this.tsExpectThenParseType(tt._in); + return this.finishNode(node, "TSTypeParameter"); + } + tsParseMappedType() { + const node = this.startNode(); + this.expect(tt.braceL); + if (this.match(tt.plusMin)) { + node.readonly = this.value; + this.next(); + this.expectContextual("readonly"); + } else if (this.eatContextual("readonly")) { + node.readonly = true; + } + this.expect(tt.bracketL); + node.typeParameter = this.tsParseMappedTypeParameter(); + node.nameType = this.eatContextual("as") ? this.tsParseType() : null; + this.expect(tt.bracketR); + if (this.match(tt.plusMin)) { + node.optional = this.value; + this.next(); + this.expect(tt.question); + } else if (this.eat(tt.question)) { + node.optional = true; + } + node.typeAnnotation = this.tsTryParseType(); + this.semicolon(); + this.expect(tt.braceR); + return this.finishNode(node, "TSMappedType"); + } + tsParseTypeLiteral() { + const node = this.startNode(); + node.members = this.tsParseObjectTypeMembers(); + return this.finishNode(node, "TSTypeLiteral"); + } + tsParseTupleElementType() { + const startLoc = this.startLoc; + const startPos = this["start"]; + const rest = this.eat(tt.ellipsis); + let type = this.tsParseType(); + const optional = this.eat(tt.question); + const labeled = this.eat(tt.colon); + if (labeled) { + const labeledNode = this.startNodeAtNode(type); + labeledNode.optional = optional; + if (type.type === "TSTypeReference" && !type.typeArguments && type.typeName.type === "Identifier") { + labeledNode.label = type.typeName; + } else { + this.raise(type.start, TypeScriptError.InvalidTupleMemberLabel); + labeledNode.label = type; + } + labeledNode.elementType = this.tsParseType(); + type = this.finishNode(labeledNode, "TSNamedTupleMember"); + } else if (optional) { + const optionalTypeNode = this.startNodeAtNode(type); + optionalTypeNode.typeAnnotation = type; + type = this.finishNode(optionalTypeNode, "TSOptionalType"); + } + if (rest) { + const restNode = this.startNodeAt(startPos, startLoc); + restNode.typeAnnotation = type; + type = this.finishNode(restNode, "TSRestType"); + } + return type; + } + tsParseTupleType() { + const node = this.startNode(); + node.elementTypes = this.tsParseBracketedList( + "TupleElementTypes", + this.tsParseTupleElementType.bind(this), + /* bracket */ + true, + /* skipFirstToken */ + false + ); + let seenOptionalElement = false; + let labeledElements = null; + node.elementTypes.forEach((elementNode) => { + const { type } = elementNode; + if (seenOptionalElement && type !== "TSRestType" && type !== "TSOptionalType" && !(type === "TSNamedTupleMember" && elementNode.optional)) { + this.raise(elementNode.start, TypeScriptError.OptionalTypeBeforeRequired); + } + seenOptionalElement ||= type === "TSNamedTupleMember" && elementNode.optional || type === "TSOptionalType"; + let checkType = type; + if (type === "TSRestType") { + elementNode = elementNode.typeAnnotation; + checkType = elementNode.type; + } + const isLabeled = checkType === "TSNamedTupleMember"; + labeledElements ??= isLabeled; + if (labeledElements !== isLabeled) { + this.raise(elementNode.start, TypeScriptError.MixedLabeledAndUnlabeledElements); + } + }); + return this.finishNode(node, "TSTupleType"); + } + tsParseTemplateLiteralType() { + const node = this.startNode(); + node.literal = this.parseTemplate({ isTagged: false }); + return this.finishNode(node, "TSLiteralType"); + } + tsParseTypeReference() { + const node = this.startNode(); + node.typeName = this.tsParseEntityName(); + if (!this.hasPrecedingLineBreak() && this.tsMatchLeftRelational()) { + node.typeArguments = this.tsParseTypeArguments(); + } + return this.finishNode(node, "TSTypeReference"); + } + tsMatchLeftRelational() { + return this.match(tt.relational) && this.value === "<"; + } + tsMatchRightRelational() { + return this.match(tt.relational) && this.value === ">"; + } + tsParseParenthesizedType() { + const node = this.startNode(); + this.expect(tt.parenL); + node.typeAnnotation = this.tsParseType(); + this.expect(tt.parenR); + return this.finishNode(node, "TSParenthesizedType"); + } + tsParseNonArrayType() { + switch (this.type) { + case tt.string: + case tt.num: + // we don't need bigint type here + // case tt.bigint: + case tt._true: + case tt._false: + return this.tsParseLiteralTypeNode(); + case tt.plusMin: + if (this.value === "-") { + const node = this.startNode(); + const nextToken = this.lookahead(); + if (nextToken.type !== tt.num) { + this.unexpected(); + } + node.literal = this.parseMaybeUnary(); + return this.finishNode(node, "TSLiteralType"); + } + break; + case tt._this: + return this.tsParseThisTypeOrThisTypePredicate(); + case tt._typeof: + return this.tsParseTypeQuery(); + case tt._import: + return this.tsParseImportType(); + case tt.braceL: + return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral(); + case tt.bracketL: + return this.tsParseTupleType(); + case tt.parenL: + return this.tsParseParenthesizedType(); + // parse template string here + case tt.backQuote: + case tt.dollarBraceL: + return this.tsParseTemplateLiteralType(); + default: { + const { type } = this; + if (tokenIsIdentifier(type) || type === tt._void || type === tt._null) { + const nodeType = type === tt._void ? "TSVoidKeyword" : type === tt._null ? "TSNullKeyword" : keywordTypeFromName(this.value); + if (nodeType !== void 0 && this.lookaheadCharCode() !== 46) { + const node = this.startNode(); + this.next(); + return this.finishNode(node, nodeType); + } + return this.tsParseTypeReference(); + } + } + } + this.unexpected(); + } + tsParseArrayTypeOrHigher() { + let type = this.tsParseNonArrayType(); + while (!this.hasPrecedingLineBreak() && this.eat(tt.bracketL)) { + if (this.match(tt.bracketR)) { + const node = this.startNodeAtNode(type); + node.elementType = type; + this.expect(tt.bracketR); + type = this.finishNode(node, "TSArrayType"); + } else { + const node = this.startNodeAtNode(type); + node.objectType = type; + node.indexType = this.tsParseType(); + this.expect(tt.bracketR); + type = this.finishNode(node, "TSIndexedAccessType"); + } + } + return type; + } + tsParseTypeOperatorOrHigher() { + const isTypeOperator = tokenIsTSTypeOperator(this.type) && !this.containsEsc; + return isTypeOperator ? this.tsParseTypeOperator() : this.isContextual("infer") ? this.tsParseInferType() : this.tsInAllowConditionalTypesContext(() => this.tsParseArrayTypeOrHigher()); + } + tsParseIntersectionTypeOrHigher() { + return this.tsParseUnionOrIntersectionType( + "TSIntersectionType", + this.tsParseTypeOperatorOrHigher.bind(this), + tt.bitwiseAND + ); + } + tsParseUnionTypeOrHigher() { + return this.tsParseUnionOrIntersectionType( + "TSUnionType", + this.tsParseIntersectionTypeOrHigher.bind(this), + tt.bitwiseOR + ); + } + tsParseNonConditionalType() { + if (this.tsIsStartOfFunctionType()) { + return this.tsParseFunctionOrConstructorType("TSFunctionType"); + } + if (this.match(tt._new)) { + return this.tsParseFunctionOrConstructorType("TSConstructorType"); + } else if (this.isAbstractConstructorSignature()) { + return this.tsParseFunctionOrConstructorType( + "TSConstructorType", + /* abstract */ + true + ); + } + return this.tsParseUnionTypeOrHigher(); + } + /** Be sure to be in a type context before calling this, using `tsInType`. */ + tsParseType() { + assert(this.inType); + const type = this.tsParseNonConditionalType(); + if (this.inDisallowConditionalTypesContext || this.hasPrecedingLineBreak() || !this.eat(tt._extends)) { + return type; + } + const node = this.startNodeAtNode(type); + node.checkType = type; + node.extendsType = this.tsInDisallowConditionalTypesContext( + () => this.tsParseNonConditionalType() + ); + this.expect(tt.question); + node.trueType = this.tsInAllowConditionalTypesContext(() => this.tsParseType()); + this.expect(tt.colon); + node.falseType = this.tsInAllowConditionalTypesContext(() => this.tsParseType()); + return this.finishNode(node, "TSConditionalType"); + } + tsIsUnambiguouslyIndexSignature() { + this.next(); + if (tokenIsIdentifier(this.type)) { + this.next(); + return this.match(tt.colon); + } + return false; + } + /** + * Runs `cb` in a type context. + * This should be called one token *before* the first type token, + * so that the call to `next()` is run in type context. + */ + tsInType(cb) { + const oldInType = this.inType; + this.inType = true; + try { + return cb(); + } finally { + this.inType = oldInType; + } + } + tsTryParseIndexSignature(node) { + if (!(this.match(tt.bracketL) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) { + return void 0; + } + this.expect(tt.bracketL); + const id = this.parseIdent(); + id.typeAnnotation = this.tsParseTypeAnnotation(); + this.resetEndLocation(id); + this.expect(tt.bracketR); + node.parameters = [id]; + const type = this.tsTryParseTypeAnnotation(); + if (type) node.typeAnnotation = type; + this.tsParseTypeMemberSemicolon(); + return this.finishNode(node, "TSIndexSignature"); + } + // for better error recover + tsParseNoneModifiers(node) { + this.tsParseModifiers({ + modified: node, + allowedModifiers: [], + disallowedModifiers: ["in", "out"], + errorTemplate: TypeScriptError.InvalidModifierOnTypeParameterPositions + }); + } + tsParseTypeParameter(parseModifiers = this.tsParseNoneModifiers.bind(this)) { + const node = this.startNode(); + parseModifiers(node); + node.name = this.tsParseTypeParameterName(); + node.constraint = this.tsEatThenParseType(tt._extends); + node.default = this.tsEatThenParseType(tt.eq); + return this.finishNode(node, "TSTypeParameter"); + } + tsParseTypeParameters(parseModifiers) { + const node = this.startNode(); + if (this.tsMatchLeftRelational() || this.matchJsx("jsxTagStart")) { + this.next(); + } else { + this.unexpected(); + } + const refTrailingCommaPos = { value: -1 }; + node.params = this.tsParseBracketedList( + "TypeParametersOrArguments", + this.tsParseTypeParameter.bind(this, parseModifiers), + /* bracket */ + false, + /* skipFirstToken */ + true, + refTrailingCommaPos + ); + if (node.params.length === 0) { + this.raise(this.start, TypeScriptError.EmptyTypeParameters); + } + if (refTrailingCommaPos.value !== -1) { + this.addExtra(node, "trailingComma", refTrailingCommaPos.value); + } + return this.finishNode(node, "TSTypeParameterDeclaration"); + } + tsTryParseTypeParameters(parseModifiers) { + if (this.tsMatchLeftRelational()) { + return this.tsParseTypeParameters(parseModifiers); + } + } + tsTryParse(f) { + const state = this.getCurLookaheadState(); + const result = f(); + if (result !== void 0 && result !== false) { + return result; + } else { + this.setLookaheadState(state); + return void 0; + } + } + tsTokenCanFollowModifier() { + return (this.match(tt.bracketL) || this.match(tt.braceL) || this.match(tt.star) || this.match(tt.ellipsis) || this.match(tt.privateId) || this.isLiteralPropertyName()) && !this.hasPrecedingLineBreak(); + } + tsNextTokenCanFollowModifier() { + this.next(true); + return this.tsTokenCanFollowModifier(); + } + /** Parses a modifier matching one the given modifier names. */ + tsParseModifier(allowedModifiers, stopOnStartOfClassStaticBlock) { + const modifier = this.value; + if (allowedModifiers.indexOf(modifier) !== -1 && !this.containsEsc) { + if (stopOnStartOfClassStaticBlock && this.tsIsStartOfStaticBlocks()) { + return void 0; + } + if (this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) { + return modifier; + } + } + return void 0; + } + tsParseModifiersByMap({ + modified, + map + }) { + for (const key of Object.keys(map)) { + modified[key] = map[key]; + } + } + /** Parses a list of modifiers, in any order. + * If you need a specific order, you must call this function multiple times: + * this.tsParseModifiers({ modified: node, allowedModifiers: ['public'] }); + * this.tsParseModifiers({ modified: node, allowedModifiers: ["abstract", "readonly"] }); + */ + tsParseModifiers({ + modified, + allowedModifiers, + disallowedModifiers, + stopOnStartOfClassStaticBlock, + errorTemplate = TypeScriptError.InvalidModifierOnTypeMember + }) { + const modifiedMap = {}; + const enforceOrder = (loc, modifier, before, after) => { + if (modifier === before && modified[after]) { + this.raise( + loc.column, + TypeScriptError.InvalidModifiersOrder({ orderedModifiers: [before, after] }) + ); + } + }; + const incompatible = (loc, modifier, mod1, mod2) => { + if (modified[mod1] && modifier === mod2 || modified[mod2] && modifier === mod1) { + this.raise( + loc.column, + TypeScriptError.IncompatibleModifiers({ modifiers: [mod1, mod2] }) + ); + } + }; + for (; ; ) { + const startLoc = this.startLoc; + const modifier = this.tsParseModifier( + allowedModifiers.concat(disallowedModifiers ?? []), + stopOnStartOfClassStaticBlock + ); + if (!modifier) break; + if (tsIsAccessModifier(modifier)) { + if (modified.accessibility) { + this.raise(this.start, TypeScriptError.DuplicateAccessibilityModifier()); + } else { + enforceOrder(startLoc, modifier, modifier, "override"); + enforceOrder(startLoc, modifier, modifier, "static"); + enforceOrder(startLoc, modifier, modifier, "readonly"); + enforceOrder(startLoc, modifier, modifier, "accessor"); + modifiedMap.accessibility = modifier; + modified["accessibility"] = modifier; + } + } else if (tsIsVarianceAnnotations(modifier)) { + if (modified[modifier]) { + this.raise(this.start, TypeScriptError.DuplicateModifier({ modifier })); + } else { + enforceOrder(startLoc, modifier, "in", "out"); + modifiedMap[modifier] = modifier; + modified[modifier] = true; + } + } else if (tsIsClassAccessor(modifier)) { + if (modified[modifier]) { + this.raise(this.start, TypeScriptError.DuplicateModifier({ modifier })); + } else { + incompatible(startLoc, modifier, "accessor", "readonly"); + incompatible(startLoc, modifier, "accessor", "static"); + incompatible(startLoc, modifier, "accessor", "override"); + modifiedMap[modifier] = modifier; + modified[modifier] = true; + } + } else if (modifier === "const") { + if (modified[modifier]) { + this.raise(this.start, TypeScriptError.DuplicateModifier({ modifier })); + } else { + modifiedMap[modifier] = modifier; + modified[modifier] = true; + } + } else { + if (Object.hasOwnProperty.call(modified, modifier)) { + this.raise(this.start, TypeScriptError.DuplicateModifier({ modifier })); + } else { + enforceOrder(startLoc, modifier, "static", "readonly"); + enforceOrder(startLoc, modifier, "static", "override"); + enforceOrder(startLoc, modifier, "override", "readonly"); + enforceOrder(startLoc, modifier, "abstract", "override"); + incompatible(startLoc, modifier, "declare", "override"); + incompatible(startLoc, modifier, "static", "abstract"); + modifiedMap[modifier] = modifier; + modified[modifier] = true; + } + } + if (disallowedModifiers?.includes(modifier)) { + this.raise(this.start, errorTemplate); + } + } + return modifiedMap; + } + tsParseInOutModifiers(node) { + this.tsParseModifiers({ + modified: node, + allowedModifiers: ["in", "out"], + disallowedModifiers: [ + "public", + "private", + "protected", + "readonly", + "declare", + "abstract", + "override" + ], + errorTemplate: TypeScriptError.InvalidModifierOnTypeParameter + }); + } + // Handle type assertions + parseMaybeUnary(refExpressionErrors, sawUnary, incDec, forInit) { + if (!options?.jsx && this.tsMatchLeftRelational()) { + return this.tsParseTypeAssertion(); + } else { + return super.parseMaybeUnary(refExpressionErrors, sawUnary, incDec, forInit); + } + } + tsParseTypeAssertion() { + if (disallowAmbiguousJSXLike) { + this.raise(this.start, TypeScriptError.ReservedTypeAssertion); + } + const result = this.tryParse(() => { + const node = this.startNode(); + const _const = this.tsTryNextParseConstantContext(); + node.typeAnnotation = _const || this.tsNextThenParseType(); + this.expect(tt.relational); + node.expression = this.parseMaybeUnary(); + return this.finishNode(node, "TSTypeAssertion"); + }); + if (result.error) { + return this.tsParseTypeParameters(this.tsParseConstModifier); + } else { + return result.node; + } + } + tsParseTypeArguments() { + const node = this.startNode(); + node.params = this.tsInType( + () => ( + // Temporarily remove a JSX parsing context, which makes us scan different tokens. + this.tsInNoContext(() => { + this.expect(tt.relational); + return this.tsParseDelimitedList( + "TypeParametersOrArguments", + this.tsParseType.bind(this) + ); + }) + ) + ); + if (node.params.length === 0) { + this.raise(this.start, TypeScriptError.EmptyTypeArguments); + } + this.exprAllowed = false; + this.expect(tt.relational); + return this.finishNode(node, "TSTypeParameterInstantiation"); + } + tsParseHeritageClause(token) { + const originalStart = this.start; + const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", () => { + const node = this.startNode(); + node.expression = this.tsParseEntityName(); + if (this.tsMatchLeftRelational()) { + node.typeParameters = this.tsParseTypeArguments(); + } + return this.finishNode(node, "TSExpressionWithTypeArguments"); + }); + if (!delimitedList.length) { + this.raise(originalStart, TypeScriptError.EmptyHeritageClauseType({ token })); + } + return delimitedList; + } + tsParseTypeMemberSemicolon() { + if (!this.eat(tt.comma) && !this.isLineTerminator()) { + this.expect(tt.semi); + } + } + tsTryParseAndCatch(f) { + const result = this.tryParse( + (abort) => ( + // @ts-expect-error todo(flow->ts) + f() || abort() + ) + ); + if (result.aborted || !result.node) return void 0; + if (result.error) this.setLookaheadState(result.failState); + return result.node; + } + tsParseSignatureMember(kind, node) { + this.tsFillSignature(tt.colon, node); + this.tsParseTypeMemberSemicolon(); + return this.finishNode(node, kind); + } + tsParsePropertyOrMethodSignature(node, readonly) { + if (this.eat(tt.question)) node.optional = true; + const nodeAny = node; + if (this.match(tt.parenL) || this.tsMatchLeftRelational()) { + if (readonly) { + this.raise(node.start, TypeScriptError.ReadonlyForMethodSignature); + } + const method = nodeAny; + if (method.kind && this.tsMatchLeftRelational()) { + this.raise(this.start, TypeScriptError.AccesorCannotHaveTypeParameters); + } + this.tsFillSignature(tt.colon, method); + this.tsParseTypeMemberSemicolon(); + const paramsKey = "parameters"; + const returnTypeKey = "typeAnnotation"; + if (method.kind === "get") { + if (method[paramsKey].length > 0) { + this.raise(this.start, "A 'get' accesor must not have any formal parameters."); + if (this.isThisParam(method[paramsKey][0])) { + this.raise(this.start, TypeScriptError.AccesorCannotDeclareThisParameter); + } + } + } else if (method.kind === "set") { + if (method[paramsKey].length !== 1) { + this.raise(this.start, "A 'get' accesor must not have any formal parameters."); + } else { + const firstParameter = method[paramsKey][0]; + if (this.isThisParam(firstParameter)) { + this.raise(this.start, TypeScriptError.AccesorCannotDeclareThisParameter); + } + if (firstParameter.type === "Identifier" && firstParameter.optional) { + this.raise(this.start, TypeScriptError.SetAccesorCannotHaveOptionalParameter); + } + if (firstParameter.type === "RestElement") { + this.raise(this.start, TypeScriptError.SetAccesorCannotHaveRestParameter); + } + } + if (method[returnTypeKey]) { + this.raise( + method[returnTypeKey].start, + TypeScriptError.SetAccesorCannotHaveReturnType + ); + } + } else { + method.kind = "method"; + } + return this.finishNode(method, "TSMethodSignature"); + } else { + const property = nodeAny; + if (readonly) property.readonly = true; + const type = this.tsTryParseTypeAnnotation(); + if (type) property.typeAnnotation = type; + this.tsParseTypeMemberSemicolon(); + return this.finishNode(property, "TSPropertySignature"); + } + } + tsParseTypeMember() { + const node = this.startNode(); + if (this.match(tt.parenL) || this.tsMatchLeftRelational()) { + return this.tsParseSignatureMember("TSCallSignatureDeclaration", node); + } + if (this.match(tt._new)) { + const id = this.startNode(); + this.next(); + if (this.match(tt.parenL) || this.tsMatchLeftRelational()) { + return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node); + } else { + node.key = this.createIdentifier(id, "new"); + return this.tsParsePropertyOrMethodSignature(node, false); + } + } + this.tsParseModifiers({ + modified: node, + allowedModifiers: ["readonly"], + disallowedModifiers: [ + "declare", + "abstract", + "private", + "protected", + "public", + "static", + "override" + ] + }); + const idx = this.tsTryParseIndexSignature(node); + if (idx) { + return idx; + } + this.parsePropertyName(node); + if (!node.computed && node.key.type === "Identifier" && (node.key.name === "get" || node.key.name === "set") && this.tsTokenCanFollowModifier()) { + node.kind = node.key.name; + this.parsePropertyName(node); + } + return this.tsParsePropertyOrMethodSignature(node, !!node.readonly); + } + tsParseList(kind, parseElement) { + const result = []; + while (!this.tsIsListTerminator(kind)) { + result.push(parseElement()); + } + return result; + } + tsParseObjectTypeMembers() { + this.expect(tt.braceL); + const members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this)); + this.expect(tt.braceR); + return members; + } + tsParseInterfaceDeclaration(node, properties = {}) { + if (this.hasFollowingLineBreak()) return null; + this.expectContextual("interface"); + if (properties.declare) node.declare = true; + if (tokenIsIdentifier(this.type)) { + node.id = this.parseIdent(); + this.checkLValSimple(node.id, acornScope.BIND_TS_INTERFACE); + } else { + node.id = null; + this.raise(this.start, TypeScriptError.MissingInterfaceName); + } + node.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)); + if (this.eat(tt._extends)) { + node.extends = this.tsParseHeritageClause("extends"); + } + const body = this.startNode(); + body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)); + node.body = this.finishNode(body, "TSInterfaceBody"); + return this.finishNode(node, "TSInterfaceDeclaration"); + } + tsParseAbstractDeclaration(node) { + if (this.match(tt._class)) { + node.abstract = true; + return this.parseClass(node, true); + } else if (this.ts_isContextual(tokTypes2.interface)) { + if (!this.hasFollowingLineBreak()) { + node.abstract = true; + return this.tsParseInterfaceDeclaration(node); + } + } else { + this.unexpected(node.start); + } + } + tsIsDeclarationStart() { + return tokenIsTSDeclarationStart(this.type); + } + tsParseExpressionStatement(node, expr) { + switch (expr.name) { + case "declare": { + const declaration = this.tsTryParseDeclare(node); + if (declaration) { + declaration.declare = true; + return declaration; + } + break; + } + case "global": + if (this.match(tt.braceL)) { + this.enterScope(TS_SCOPE_TS_MODULE); + const mod = node; + mod.global = true; + mod.id = expr; + mod.body = this.tsParseModuleBlock(); + super.exitScope(); + return this.finishNode(mod, "TSModuleDeclaration"); + } + break; + default: + return this.tsParseDeclaration( + node, + expr.name, + /* next */ + false + ); + } + } + tsParseModuleReference() { + return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName( + /* allowReservedWords */ + false + ); + } + tsIsExportDefaultSpecifier() { + const { type } = this; + const isAsync = this.isAsyncFunction(); + const isLet = this.isLet(); + if (tokenIsIdentifier(type)) { + if (isAsync && !this.containsEsc || isLet) { + return false; + } + if ((type === tokTypes2.type || type === tokTypes2.interface) && !this.containsEsc) { + const ahead = this.lookahead(); + if (tokenIsIdentifier(ahead.type) && !this.isContextualWithState("from", ahead) || ahead.type === tt.braceL) { + return false; + } + } + } else if (!this.match(tt._default)) { + return false; + } + const next = this.nextTokenStart(); + const hasFrom = this.isUnparsedContextual(next, "from"); + if (this.input.charCodeAt(next) === 44 || tokenIsIdentifier(this.type) && hasFrom) { + return true; + } + if (this.match(tt._default) && hasFrom) { + const nextAfterFrom = this.input.charCodeAt(this.nextTokenStartSince(next + 4)); + return nextAfterFrom === 34 || nextAfterFrom === 39; + } + return false; + } + tsInAmbientContext(cb) { + const oldIsAmbientContext = this.isAmbientContext; + this.isAmbientContext = true; + try { + return cb(); + } finally { + this.isAmbientContext = oldIsAmbientContext; + } + } + tsCheckLineTerminator(next) { + if (next) { + if (this.hasFollowingLineBreak()) return false; + this.next(); + return true; + } + return !this.isLineTerminator(); + } + tsParseModuleOrNamespaceDeclaration(node, nested = false) { + node.id = this.parseIdent(); + if (!nested) { + this.checkLValSimple(node.id, acornScope.BIND_TS_NAMESPACE); + } + if (this.eat(tt.dot)) { + const inner = this.startNode(); + this.tsParseModuleOrNamespaceDeclaration(inner, true); + node.body = inner; + } else { + this.enterScope(TS_SCOPE_TS_MODULE); + node.body = this.tsParseModuleBlock(); + super.exitScope(); + } + return this.finishNode(node, "TSModuleDeclaration"); + } + checkLValSimple(expr, bindingType = acornScope.BIND_NONE, checkClashes) { + if (expr.type === "TSNonNullExpression" || expr.type === "TSAsExpression") { + expr = expr.expression; + } + return super.checkLValSimple(expr, bindingType, checkClashes); + } + tsParseTypeAliasDeclaration(node) { + node.id = this.parseIdent(); + this.checkLValSimple(node.id, acornScope.BIND_TS_TYPE); + node.typeAnnotation = this.tsInType(() => { + node.typeParameters = this.tsTryParseTypeParameters( + this.tsParseInOutModifiers.bind(this) + ); + this.expect(tt.eq); + if (this.ts_isContextual(tokTypes2.interface) && this.lookahead().type !== tt.dot) { + const node2 = this.startNode(); + this.next(); + return this.finishNode(node2, "TSIntrinsicKeyword"); + } + return this.tsParseType(); + }); + this.semicolon(); + return this.finishNode(node, "TSTypeAliasDeclaration"); + } + // Common to tsTryParseDeclare, tsTryParseExportDeclaration, and tsParseExpressionStatement. + tsParseDeclaration(node, value, next) { + switch (value) { + case "abstract": + if (this.tsCheckLineTerminator(next) && (this.match(tt._class) || tokenIsIdentifier(this.type))) { + return this.tsParseAbstractDeclaration(node); + } + break; + case "module": + if (this.tsCheckLineTerminator(next)) { + if (this.match(tt.string)) { + return this.tsParseAmbientExternalModuleDeclaration(node); + } else if (tokenIsIdentifier(this.type)) { + return this.tsParseModuleOrNamespaceDeclaration(node); + } + } + break; + case "namespace": + if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.type)) { + return this.tsParseModuleOrNamespaceDeclaration(node); + } + break; + case "type": + if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.type)) { + return this.tsParseTypeAliasDeclaration(node); + } + break; + } + } + // Note: this won't b·e called unless the keyword is allowed in + // `shouldParseExportDeclaration`. + tsTryParseExportDeclaration() { + return this.tsParseDeclaration( + this.startNode(), + this.value, + /* next */ + true + ); + } + tsParseImportEqualsDeclaration(node, isExport) { + node.isExport = isExport || false; + node.id = this.parseIdent(); + this.checkLValSimple(node.id, acornScope.BIND_LEXICAL); + super.expect(tt.eq); + const moduleReference = this.tsParseModuleReference(); + if (node.importKind === "type" && moduleReference.type !== "TSExternalModuleReference") { + this.raise(moduleReference.start, TypeScriptError.ImportAliasHasImportType); + } + node.moduleReference = moduleReference; + super.semicolon(); + return this.finishNode(node, "TSImportEqualsDeclaration"); + } + isExportDefaultSpecifier() { + if (this.tsIsDeclarationStart()) return false; + const { type } = this; + if (tokenIsIdentifier(type)) { + if (this.isContextual("async") || this.isContextual("let")) { + return false; + } + if ((type === tokTypes2.type || type === tokTypes2.interface) && !this.containsEsc) { + const ahead = this.lookahead(); + if (tokenIsIdentifier(ahead.type) && !this.isContextualWithState("from", ahead) || ahead.type === tt.braceL) { + return false; + } + } + } else if (!this.match(tt._default)) { + return false; + } + const next = this.nextTokenStart(); + const hasFrom = this.isUnparsedContextual(next, "from"); + if (this.input.charCodeAt(next) === 44 || tokenIsIdentifier(this.type) && hasFrom) { + return true; + } + if (this.match(tt._default) && hasFrom) { + const nextAfterFrom = this.input.charCodeAt(this.nextTokenStartSince(next + 4)); + return nextAfterFrom === 34 || nextAfterFrom === 39; + } + return false; + } + parseTemplate({ isTagged = false } = {}) { + let node = this.startNode(); + this.next(); + node.expressions = []; + let curElt = this.parseTemplateElement({ isTagged }); + node.quasis = [curElt]; + while (!curElt.tail) { + if (this.type === tt.eof) this.raise(this.pos, "Unterminated template literal"); + this.expect(tt.dollarBraceL); + node.expressions.push(this.inType ? this.tsParseType() : this.parseExpression()); + this.expect(tt.braceR); + node.quasis.push(curElt = this.parseTemplateElement({ isTagged })); + } + this.next(); + return this.finishNode(node, "TemplateLiteral"); + } + parseFunction(node, statement, allowExpressionBody, isAsync, forInit) { + this.initFunction(node); + if (this.ecmaVersion >= 9 || this.ecmaVersion >= 6 && !isAsync) { + if (this.type === tt.star && statement & FUNC_HANGING_STATEMENT) { + this.unexpected(); + } + node.generator = this.eat(tt.star); + } + if (this.ecmaVersion >= 8) { + node.async = !!isAsync; + } + if (statement & FUNC_STATEMENT) { + node.id = statement & FUNC_NULLABLE_ID && this.type !== tt.name ? null : this.parseIdent(); + } + let oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + const oldMaybeInArrowParameters = this.maybeInArrowParameters; + this.maybeInArrowParameters = false; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope(functionFlags(node.async, node.generator)); + if (!(statement & FUNC_STATEMENT)) { + node.id = this.type === tt.name ? this.parseIdent() : null; + } + this.parseFunctionParams(node); + const isDeclaration = statement & FUNC_STATEMENT; + this.parseFunctionBody(node, allowExpressionBody, false, forInit, { + isFunctionDeclaration: isDeclaration + }); + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + if (statement & FUNC_STATEMENT && node.id && !(statement & FUNC_HANGING_STATEMENT)) { + if (node.body) { + this.checkLValSimple( + node.id, + this.strict || node.generator || node.async ? this.treatFunctionsAsVar ? acornScope.BIND_VAR : acornScope.BIND_LEXICAL : acornScope.BIND_FUNCTION + ); + } else { + this.checkLValSimple(node.id, acornScope.BIND_NONE); + } + } + this.maybeInArrowParameters = oldMaybeInArrowParameters; + return this.finishNode(node, isDeclaration ? "FunctionDeclaration" : "FunctionExpression"); + } + parseFunctionBody(node, isArrowFunction = false, isMethod = false, forInit = false, tsConfig) { + if (this.match(tt.colon)) { + node.returnType = this.tsParseTypeOrTypePredicateAnnotation(tt.colon); + } + const bodilessType = tsConfig?.isFunctionDeclaration ? "TSDeclareFunction" : tsConfig?.isClassMethod ? "TSDeclareMethod" : void 0; + if (bodilessType && !this.match(tt.braceL) && this.isLineTerminator()) { + return this.finishNode(node, bodilessType); + } + if (bodilessType === "TSDeclareFunction" && this.isAmbientContext) { + this.raise(node.start, TypeScriptError.DeclareFunctionHasImplementation); + if (node.declare) { + super.parseFunctionBody(node, isArrowFunction, isMethod, false); + return this.finishNode(node, bodilessType); + } + } + super.parseFunctionBody(node, isArrowFunction, isMethod, forInit); + return node; + } + parseNew() { + if (this.containsEsc) this.raiseRecoverable(this.start, "Escape sequence in keyword new"); + let node = this.startNode(); + let meta = this.parseIdent(true); + if (this.ecmaVersion >= 6 && this.eat(tt.dot)) { + node.meta = meta; + let containsEsc = this.containsEsc; + node.property = this.parseIdent(true); + if (node.property.name !== "target") + this.raiseRecoverable( + node.property.start, + "The only valid meta property for new is 'new.target'" + ); + if (containsEsc) + this.raiseRecoverable(node.start, "'new.target' must not contain escaped characters"); + if (!this["allowNewDotTarget"]) + this.raiseRecoverable( + node.start, + "'new.target' can only be used in functions and class static block" + ); + return this.finishNode(node, "MetaProperty"); + } + let startPos = this.start, startLoc = this.startLoc, isImport = this.type === tt._import; + node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true, false); + if (isImport && node.callee.type === "ImportExpression") { + this.raise(startPos, "Cannot use new with import()"); + } + const { callee } = node; + if (callee.type === "TSInstantiationExpression" && !callee.extra?.parenthesized) { + node.typeArguments = callee.typeArguments; + node.callee = callee.expression; + } + if (this.eat(tt.parenL)) + node.arguments = this.parseExprList(tt.parenR, this.ecmaVersion >= 8, false); + else node.arguments = []; + return this.finishNode(node, "NewExpression"); + } + parseExprOp(left, leftStartPos, leftStartLoc, minPrec, forInit) { + if (tt._in.binop > minPrec && !this.hasPrecedingLineBreak()) { + let nodeType; + if (this.isContextual("as")) { + nodeType = "TSAsExpression"; + } + if (this.isContextual("satisfies")) { + nodeType = "TSSatisfiesExpression"; + } + if (nodeType) { + const node = this.startNodeAt(leftStartPos, leftStartLoc); + node.expression = left; + const _const = this.tsTryNextParseConstantContext(); + if (_const) { + node.typeAnnotation = _const; + } else { + node.typeAnnotation = this.tsNextThenParseType(); + } + this.finishNode(node, nodeType); + this.reScan_lt_gt(); + return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, forInit); + } + } + return super.parseExprOp(left, leftStartPos, leftStartLoc, minPrec, forInit); + } + parseImportSpecifiers() { + let nodes = [], first = true; + if (acornTypeScript.tokenIsIdentifier(this.type)) { + nodes.push(this.parseImportDefaultSpecifier()); + if (!this.eat(tt.comma)) return nodes; + } + if (this.type === tt.star) { + nodes.push(this.parseImportNamespaceSpecifier()); + return nodes; + } + this.expect(tt.braceL); + while (!this.eat(tt.braceR)) { + if (!first) { + this.expect(tt.comma); + if (this.afterTrailingComma(tt.braceR)) break; + } else first = false; + nodes.push(this.parseImportSpecifier()); + } + return nodes; + } + /** + * @param {Node} node this may be ImportDeclaration | + * TsImportEqualsDeclaration + * @returns AnyImport + * */ + parseImport(node) { + let enterHead = this.lookahead(); + node.importKind = "value"; + this.importOrExportOuterKind = "value"; + if (tokenIsIdentifier(enterHead.type) || this.match(tt.star) || this.match(tt.braceL)) { + let ahead = this.lookahead(2); + if ( + // import type, { a } from "b"; + ahead.type !== tt.comma && // import type from "a"; + !this.isContextualWithState("from", ahead) && // import type = require("a"); + ahead.type !== tt.eq && this.ts_eatContextualWithState("type", 1, enterHead) + ) { + this.importOrExportOuterKind = "type"; + node.importKind = "type"; + enterHead = this.lookahead(); + ahead = this.lookahead(2); + } + if (tokenIsIdentifier(enterHead.type) && ahead.type === tt.eq) { + this.next(); + const importNode = this.tsParseImportEqualsDeclaration(node); + this.importOrExportOuterKind = "value"; + return importNode; + } + } + this.next(); + if (this.type === tt.string) { + node.specifiers = []; + node.source = this.parseExprAtom(); + } else { + node.specifiers = this.parseImportSpecifiers(); + this.expectContextual("from"); + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected(); + } + this.parseMaybeImportAttributes(node); + this.semicolon(); + this.finishNode(node, "ImportDeclaration"); + this.importOrExportOuterKind = "value"; + if (node.importKind === "type" && node.specifiers.length > 1 && node.specifiers[0].type === "ImportDefaultSpecifier") { + this.raise(node.start, TypeScriptError.TypeImportCannotSpecifyDefaultAndNamed); + } + return node; + } + parseExportDefaultDeclaration() { + if (this.isAbstractClass()) { + const cls = this.startNode(); + this.next(); + cls.abstract = true; + return this.parseClass(cls, true); + } + if (this.match(tokTypes2.interface)) { + const result = this.tsParseInterfaceDeclaration(this.startNode()); + if (result) return result; + } + return super.parseExportDefaultDeclaration(); + } + parseExportAllDeclaration(node, exports) { + if (this.ecmaVersion >= 11) { + if (this.eatContextual("as")) { + node.exported = this.parseModuleExportName(); + this.checkExport(exports, node.exported, this.lastTokStart); + } else { + node.exported = null; + } + } + this.expectContextual("from"); + if (this.type !== tt.string) this.unexpected(); + node.source = this.parseExprAtom(); + this.parseMaybeImportAttributes(node); + this.semicolon(); + return this.finishNode(node, "ExportAllDeclaration"); + } + parseDynamicImport(node) { + this.next(); + node.source = this.parseMaybeAssign(); + if (this.eat(tt.comma)) { + const expr = this.parseExpression(); + node.arguments = [expr]; + } + if (!this.eat(tt.parenR)) { + const errorPos = this.start; + if (this.eat(tt.comma) && this.eat(tt.parenR)) { + this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()"); + } else { + this.unexpected(errorPos); + } + } + return this.finishNode(node, "ImportExpression"); + } + parseExport(node, exports) { + let enterHead = this.lookahead(); + if (this.ts_eatWithState(tt._import, 2, enterHead)) { + if (this.ts_isContextual(tokTypes2.type) && this.lookaheadCharCode() !== 61) { + node.importKind = "type"; + this.importOrExportOuterKind = "type"; + this.next(); + } else { + node.importKind = "value"; + this.importOrExportOuterKind = "value"; + } + const exportEqualsNode = this.tsParseImportEqualsDeclaration( + node, + /* isExport */ + true + ); + this.importOrExportOuterKind = void 0; + return exportEqualsNode; + } else if (this.ts_eatWithState(tt.eq, 2, enterHead)) { + const assign = node; + assign.expression = this.parseExpression(); + this.semicolon(); + this.importOrExportOuterKind = void 0; + return this.finishNode(assign, "TSExportAssignment"); + } else if (this.ts_eatContextualWithState("as", 2, enterHead)) { + const decl = node; + this.expectContextual("namespace"); + decl.id = this.parseIdent(); + this.semicolon(); + this.importOrExportOuterKind = void 0; + return this.finishNode(decl, "TSNamespaceExportDeclaration"); + } else { + if (this.ts_isContextualWithState(enterHead, tokTypes2.type) && this.lookahead(2).type === tt.braceL) { + this.next(); + this.importOrExportOuterKind = "type"; + node.exportKind = "type"; + } else { + this.importOrExportOuterKind = "value"; + node.exportKind = "value"; + } + this.next(); + if (this.eat(tt.star)) { + return this.parseExportAllDeclaration(node, exports); + } + if (this.eat(tt._default)) { + this.checkExport(exports, "default", this.lastTokStart); + node.declaration = this.parseExportDefaultDeclaration(); + return this.finishNode(node, "ExportDefaultDeclaration"); + } + if (this.shouldParseExportStatement()) { + node.declaration = this.parseExportDeclaration(node); + if (node.declaration.type === "VariableDeclaration") + this.checkVariableExport(exports, node.declaration.declarations); + else this.checkExport(exports, node.declaration.id, node.declaration.id.start); + node.specifiers = []; + node.source = null; + } else { + node.declaration = null; + node.specifiers = this.parseExportSpecifiers(exports); + if (this.eatContextual("from")) { + if (this.type !== tt.string) this.unexpected(); + node.source = this.parseExprAtom(); + this.parseMaybeImportAttributes(node); + } else { + for (let spec of node.specifiers) { + this.checkUnreserved(spec.local); + this.checkLocalExport(spec.local); + if (spec.local.type === "Literal") { + this.raise( + spec.local.start, + "A string literal cannot be used as an exported binding without `from`." + ); + } + } + node.source = null; + } + this.semicolon(); + } + return this.finishNode(node, "ExportNamedDeclaration"); + } + } + checkExport(exports, name, _) { + if (!exports) { + return; + } + if (typeof name !== "string") { + name = name.type === "Identifier" ? name.name : name.value; + } + exports[name] = true; + } + parseMaybeDefault(startPos, startLoc, left) { + const node = super.parseMaybeDefault(startPos, startLoc, left); + if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { + this.raise(node.typeAnnotation.start, TypeScriptError.TypeAnnotationAfterAssign); + } + return node; + } + typeCastToParameter(node) { + node.expression.typeAnnotation = node.typeAnnotation; + this.resetEndLocation( + node.expression, + node.typeAnnotation.end, + node.typeAnnotation.loc?.end + ); + return node.expression; + } + toAssignableList(exprList, isBinding) { + for (let i = 0; i < exprList.length; i++) { + const expr = exprList[i]; + if (expr?.type === "TSTypeCastExpression") { + exprList[i] = this.typeCastToParameter(expr); + } + } + return super.toAssignableList(exprList, isBinding); + } + reportReservedArrowTypeParam(node) { + if (node.params.length === 1 && !node.extra?.trailingComma && disallowAmbiguousJSXLike) { + this.raise(node.start, TypeScriptError.ReservedArrowTypeParam); + } + } + parseExprAtom(refDestructuringErrors, forInit, forNew) { + if (this.type === tokTypes2.jsxText) { + return this.jsx_parseText(); + } else if (this.type === tokTypes2.jsxTagStart) { + return this.jsx_parseElement(); + } else if (this.type === tokTypes2.at) { + this.parseDecorators(); + return this.parseExprAtom(); + } else if (tokenIsIdentifier(this.type)) { + let canBeArrow = this.potentialArrowAt === this.start; + let startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc; + let id = this.parseIdent(false); + if (this.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(tt._function)) { + this.overrideContext(tokContexts.f_expr); + return this.parseFunction( + this.startNodeAt(startPos, startLoc), + 0, + false, + true, + forInit + ); + } + if (canBeArrow && !this.canInsertSemicolon()) { + if (this.eat(tt.arrow)) + return this.parseArrowExpression( + this.startNodeAt(startPos, startLoc), + [id], + false, + forInit + ); + if (this.ecmaVersion >= 8 && id.name === "async" && this.type === tt.name && !containsEsc && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) { + id = this.parseIdent(false); + if (this.canInsertSemicolon() || !this.eat(tt.arrow)) this.unexpected(); + return this.parseArrowExpression( + this.startNodeAt(startPos, startLoc), + [id], + true, + forInit + ); + } + } + return id; + } else { + return super.parseExprAtom(refDestructuringErrors, forInit, forNew); + } + } + parseExprAtomDefault() { + if (tokenIsIdentifier(this.type)) { + const canBeArrow = this["potentialArrowAt"] === this.start; + const containsEsc = this.containsEsc; + const id = this.parseIdent(); + if (!containsEsc && id.name === "async" && !this.canInsertSemicolon()) { + const { type } = this; + if (type === tt._function) { + this.next(); + return this.parseFunction(this.startNodeAtNode(id), void 0, true, true); + } else if (tokenIsIdentifier(type)) { + if (this.lookaheadCharCode() === 61) { + const paramId = this.parseIdent(false); + if (this.canInsertSemicolon() || !this.eat(tt.arrow)) this.unexpected(); + return this.parseArrowExpression(this.startNodeAtNode(id), [paramId], true); + } else { + return id; + } + } + } + if (canBeArrow && this.match(tt.arrow) && !this.canInsertSemicolon()) { + this.next(); + return this.parseArrowExpression(this.startNodeAtNode(id), [id], false); + } + return id; + } else { + this.unexpected(); + } + } + parseIdentNode() { + let node = this.startNode(); + if (tokenIsKeywordOrIdentifier(this.type) && // Taken from super-class method + !((this.type.keyword === "class" || this.type.keyword === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46))) { + node.name = this.value; + } else { + return super.parseIdentNode(); + } + return node; + } + parseVarStatement(node, kind, allowMissingInitializer = false) { + const { isAmbientContext } = this; + this.next(); + super.parseVar(node, false, kind, allowMissingInitializer || isAmbientContext); + this.semicolon(); + const declaration = this.finishNode(node, "VariableDeclaration"); + if (!isAmbientContext) return declaration; + for (const { id, init } of declaration.declarations) { + if (!init) continue; + if (kind !== "const" || !!id.typeAnnotation) { + this.raise(init.start, TypeScriptError.InitializerNotAllowedInAmbientContext); + } else if (init.type !== "StringLiteral" && init.type !== "BooleanLiteral" && init.type !== "NumericLiteral" && init.type !== "BigIntLiteral" && (init.type !== "TemplateLiteral" || init.expressions.length > 0) && !isPossiblyLiteralEnum(init)) { + this.raise( + init.start, + TypeScriptError.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference + ); + } + } + return declaration; + } + parseStatement(context, topLevel, exports) { + if (this.match(tokTypes2.at)) { + this.parseDecorators(true); + } + if (this.match(tt._const) && this.isLookaheadContextual("enum")) { + const node = this.startNode(); + this.expect(tt._const); + return this.tsParseEnumDeclaration(node, { const: true }); + } + if (this.ts_isContextual(tokTypes2.enum)) { + return this.tsParseEnumDeclaration(this.startNode()); + } + if (this.ts_isContextual(tokTypes2.interface)) { + const result = this.tsParseInterfaceDeclaration(this.startNode()); + if (result) return result; + } + return super.parseStatement(context, topLevel, exports); + } + // NOTE: unused function + parseAccessModifier() { + return this.tsParseModifier(["public", "protected", "private"]); + } + parsePostMemberNameModifiers(methodOrProp) { + const optional = this.eat(tt.question); + if (optional) methodOrProp.optional = true; + if (methodOrProp.readonly && this.match(tt.parenL)) { + this.raise(methodOrProp.start, TypeScriptError.ClassMethodHasReadonly); + } + if (methodOrProp.declare && this.match(tt.parenL)) { + this.raise(methodOrProp.start, TypeScriptError.ClassMethodHasDeclare); + } + } + // Note: The reason we do this in `parseExpressionStatement` and not `parseStatement` + // is that e.g. `type()` is valid JS, so we must try parsing that first. + // If it's really a type, we will parse `type` as the statement, and can correct it here + // by parsing the rest. + parseExpressionStatement(node, expr) { + const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr) : void 0; + return decl || super.parseExpressionStatement(node, expr); + } + shouldParseExportStatement() { + if (this.tsIsDeclarationStart()) return true; + if (this.match(tokTypes2.at)) { + return true; + } + return super.shouldParseExportStatement(); + } + parseConditional(expr, startPos, startLoc, forInit, refDestructuringErrors) { + if (this.eat(tt.question)) { + let node = this.startNodeAt(startPos, startLoc); + node.test = expr; + node.consequent = this.parseMaybeAssign(); + this.expect(tt.colon); + node.alternate = this.parseMaybeAssign(forInit); + return this.finishNode(node, "ConditionalExpression"); + } + return expr; + } + parseMaybeConditional(forInit, refDestructuringErrors) { + let startPos = this.start, startLoc = this.startLoc; + let expr = this.parseExprOps(forInit, refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) return expr; + if (!this.maybeInArrowParameters || !this.match(tt.question)) { + return this.parseConditional(expr, startPos, startLoc, forInit, refDestructuringErrors); + } + const result = this.tryParse( + () => this.parseConditional(expr, startPos, startLoc, forInit, refDestructuringErrors) + ); + if (!result.node) { + if (result.error) { + this.setOptionalParametersError(refDestructuringErrors, result.error); + } + return expr; + } + if (result.error) this.setLookaheadState(result.failState); + return result.node; + } + parseParenItem(node) { + const startPos = this.start; + const startLoc = this.startLoc; + node = super.parseParenItem(node); + if (this.eat(tt.question)) { + node.optional = true; + this.resetEndLocation(node); + } + if (this.match(tt.colon)) { + const typeCastNode = this.startNodeAt(startPos, startLoc); + typeCastNode.expression = node; + typeCastNode.typeAnnotation = this.tsParseTypeAnnotation(); + return this.finishNode(typeCastNode, "TSTypeCastExpression"); + } + return node; + } + parseExportDeclaration(node) { + if (!this.isAmbientContext && this.ts_isContextual(tokTypes2.declare)) { + return this.tsInAmbientContext(() => this.parseExportDeclaration(node)); + } + const startPos = this.start; + const startLoc = this.startLoc; + const isDeclare = this.eatContextual("declare"); + if (isDeclare && (this.ts_isContextual(tokTypes2.declare) || !this.shouldParseExportStatement())) { + this.raise(this.start, TypeScriptError.ExpectedAmbientAfterExportDeclare); + } + const isIdentifier = tokenIsIdentifier(this.type); + const declaration = isIdentifier && this.tsTryParseExportDeclaration() || this.parseStatement(null); + if (!declaration) return null; + if (declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare) { + node.exportKind = "type"; + } + if (isDeclare) { + this.resetStartLocation(declaration, startPos, startLoc); + declaration.declare = true; + } + return declaration; + } + parseClassId(node, isStatement) { + if (!isStatement && this.isContextual("implements")) { + return; + } + super.parseClassId(node, isStatement); + const typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)); + if (typeParameters) node.typeParameters = typeParameters; + } + parseClassPropertyAnnotation(node) { + if (!node.optional) { + if (this.value === "!" && this.eat(tt.prefix)) { + node.definite = true; + } else if (this.eat(tt.question)) { + node.optional = true; + } + } + const type = this.tsTryParseTypeAnnotation(); + if (type) node.typeAnnotation = type; + } + parseClassField(field) { + const isPrivate = field.key.type === "PrivateIdentifier"; + if (isPrivate) { + if (field.abstract) { + this.raise(field.start, TypeScriptError.PrivateElementHasAbstract); + } + if (field.accessibility) { + this.raise( + field.start, + TypeScriptError.PrivateElementHasAccessibility({ + modifier: field.accessibility + }) + ); + } + this.parseClassPropertyAnnotation(field); + } else { + this.parseClassPropertyAnnotation(field); + if (this.isAmbientContext && !(field.readonly && !field.typeAnnotation) && this.match(tt.eq)) { + this.raise(this.start, TypeScriptError.DeclareClassFieldHasInitializer); + } + if (field.abstract && this.match(tt.eq)) { + const { key } = field; + this.raise( + this.start, + TypeScriptError.AbstractPropertyHasInitializer({ + propertyName: key.type === "Identifier" && !field.computed ? key.name : `[${this.input.slice(key.start, key.end)}]` + }) + ); + } + } + return super.parseClassField(field); + } + parseClassMethod(method, isGenerator, isAsync, allowsDirectSuper) { + const isConstructor = method.kind === "constructor"; + const isPrivate = method.key.type === "PrivateIdentifier"; + const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); + if (isPrivate) { + if (typeParameters) method.typeParameters = typeParameters; + if (method.accessibility) { + this.raise( + method.start, + TypeScriptError.PrivateMethodsHasAccessibility({ + modifier: method.accessibility + }) + ); + } + } else { + if (typeParameters && isConstructor) { + this.raise(typeParameters.start, TypeScriptError.ConstructorHasTypeParameters); + } + } + const { declare = false, kind } = method; + if (declare && (kind === "get" || kind === "set")) { + this.raise(method.start, TypeScriptError.DeclareAccessor({ kind })); + } + if (typeParameters) method.typeParameters = typeParameters; + const key = method.key; + if (method.kind === "constructor") { + if (isGenerator) this.raise(key.start, "Constructor can't be a generator"); + if (isAsync) this.raise(key.start, "Constructor can't be an async method"); + } else if (method.static && checkKeyName(method, "prototype")) { + this.raise(key.start, "Classes may not have a static property named prototype"); + } + const value = method.value = this.parseMethod( + isGenerator, + isAsync, + allowsDirectSuper, + true, + method + ); + if (method.kind === "get" && value["params"].length !== 0) + this.raiseRecoverable(value.start, "getter should have no params"); + if (method.kind === "set" && value["params"].length !== 1) + this.raiseRecoverable(value.start, "setter should have exactly one param"); + if (method.kind === "set" && value["params"][0].type === "RestElement") + this.raiseRecoverable(value["params"][0].start, "Setter cannot use rest params"); + return this.finishNode(method, "MethodDefinition"); + } + isClassMethod() { + return this.match(tt.relational); + } + parseClassElement(constructorAllowsSuper) { + if (this.eat(tt.semi)) return null; + let node = this.startNode(); + let keyName = ""; + let isGenerator = false; + let isAsync = false; + let kind = "method"; + let isStatic = false; + const modifiers = [ + "declare", + "private", + "public", + "protected", + "accessor", + "override", + "abstract", + "readonly", + "static" + ]; + const modifierMap = this.tsParseModifiers({ + modified: node, + allowedModifiers: modifiers, + disallowedModifiers: ["in", "out"], + stopOnStartOfClassStaticBlock: true, + errorTemplate: TypeScriptError.InvalidModifierOnTypeParameterPositions + }); + isStatic = Boolean(modifierMap.static); + const callParseClassMemberWithIsStatic = () => { + if (this.tsIsStartOfStaticBlocks()) { + this.next(); + this.next(); + if (this.tsHasSomeModifiers(node, modifiers)) { + this.raise(this.start, TypeScriptError.StaticBlockCannotHaveModifier); + } + if (this.ecmaVersion >= 13) { + super.parseClassStaticBlock(node); + return node; + } + } else { + const idx = this.tsTryParseIndexSignature(node); + if (idx) { + if (node.abstract) { + this.raise(node.start, TypeScriptError.IndexSignatureHasAbstract); + } + if (node.accessibility) { + this.raise( + node.start, + TypeScriptError.IndexSignatureHasAccessibility({ + modifier: node.accessibility + }) + ); + } + if (node.declare) { + this.raise(node.start, TypeScriptError.IndexSignatureHasDeclare); + } + if (node.override) { + this.raise(node.start, TypeScriptError.IndexSignatureHasOverride); + } + return idx; + } + if (!this.inAbstractClass && node.abstract) { + this.raise(node.start, TypeScriptError.NonAbstractClassHasAbstractMethod); + } + if (node.override) { + if (!constructorAllowsSuper) { + this.raise(node.start, TypeScriptError.OverrideNotInSubClass); + } + } + node.static = isStatic; + if (isStatic) { + if (!(this.isClassElementNameStart() || this.type === tt.star)) { + keyName = "static"; + } + } + if (!keyName && this.ecmaVersion >= 8 && this.eatContextual("async")) { + if ((this.isClassElementNameStart() || this.type === tt.star) && !this.canInsertSemicolon()) { + isAsync = true; + } else { + keyName = "async"; + } + } + if (!keyName && (this.ecmaVersion >= 9 || !isAsync) && this.eat(tt.star)) { + isGenerator = true; + } + if (!keyName && !isAsync && !isGenerator) { + const lastValue = this.value; + if (this.eatContextual("get") || this.eatContextual("set")) { + if (this.isClassElementNameStart()) { + kind = lastValue; + } else { + keyName = lastValue; + } + } + } + if (keyName) { + node.computed = false; + node.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc); + node.key.name = keyName; + this.finishNode(node.key, "Identifier"); + } else { + this.parseClassElementName(node); + } + this.parsePostMemberNameModifiers(node); + if (this.isClassMethod() || this.ecmaVersion < 13 || this.type === tt.parenL || kind !== "method" || isGenerator || isAsync) { + const isConstructor = !node.static && checkKeyName(node, "constructor"); + const allowsDirectSuper = isConstructor && constructorAllowsSuper; + if (isConstructor && kind !== "method") + this.raise(node.key.start, "Constructor can't have get/set modifier"); + node.kind = isConstructor ? "constructor" : kind; + this.parseClassMethod(node, isGenerator, isAsync, allowsDirectSuper); + } else { + this.parseClassField(node); + } + return node; + } + }; + if (node.declare) { + this.tsInAmbientContext(callParseClassMemberWithIsStatic); + } else { + callParseClassMemberWithIsStatic(); + } + return node; + } + isClassElementNameStart() { + if (this.tsIsIdentifier()) { + return true; + } + return super.isClassElementNameStart(); + } + parseClassSuper(node) { + super.parseClassSuper(node); + if (node.superClass && (this.tsMatchLeftRelational() || this.match(tt.bitShift))) { + node.superTypeParameters = this.tsParseTypeArgumentsInExpression(); + } + if (this.eatContextual("implements")) { + node.implements = this.tsParseHeritageClause("implements"); + } + } + parseFunctionParams(node) { + const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); + if (typeParameters) node.typeParameters = typeParameters; + super.parseFunctionParams(node); + } + // `let x: number;` + parseVarId(decl, kind) { + super.parseVarId(decl, kind); + if (decl.id.type === "Identifier" && !this.hasPrecedingLineBreak() && this.value === "!" && this.eat(tt.prefix)) { + decl.definite = true; + } + const type = this.tsTryParseTypeAnnotation(); + if (type) { + decl.id.typeAnnotation = type; + this.resetEndLocation(decl.id); + } + } + // parse the return type of an async arrow function - let foo = (async (): number => {}); + parseArrowExpression(node, params, isAsync, forInit) { + if (this.match(tt.colon)) { + node.returnType = this.tsParseTypeAnnotation(); + } + let oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.enterScope(functionFlags(isAsync, false) | acornScope.SCOPE_ARROW); + this.initFunction(node); + const oldMaybeInArrowParameters = this.maybeInArrowParameters; + if (this.ecmaVersion >= 8) node.async = !!isAsync; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.maybeInArrowParameters = true; + node.params = this.toAssignableList(params, true); + this.maybeInArrowParameters = false; + this.parseFunctionBody(node, true, false, forInit); + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + this.maybeInArrowParameters = oldMaybeInArrowParameters; + return this.finishNode(node, "ArrowFunctionExpression"); + } + parseMaybeAssignOrigin(forInit, refDestructuringErrors, afterLeftParse) { + if (this.isContextual("yield")) { + if (this.inGenerator) return this.parseYield(forInit); + else this.exprAllowed = false; + } + let ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldDoubleProto = -1; + if (refDestructuringErrors) { + oldParenAssign = refDestructuringErrors.parenthesizedAssign; + oldTrailingComma = refDestructuringErrors.trailingComma; + oldDoubleProto = refDestructuringErrors.doubleProto; + refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1; + } else { + refDestructuringErrors = new DestructuringErrors(); + ownDestructuringErrors = true; + } + let startPos = this.start, startLoc = this.startLoc; + if (this.type === tt.parenL || tokenIsIdentifier(this.type)) { + this.potentialArrowAt = this.start; + this.potentialArrowInForAwait = forInit === "await"; + } + let left = this.parseMaybeConditional(forInit, refDestructuringErrors); + if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc); + if (this.type.isAssign) { + let node = this.startNodeAt(startPos, startLoc); + node.operator = this.value; + if (this.type === tt.eq) left = this.toAssignable(left, true, refDestructuringErrors); + if (!ownDestructuringErrors) { + refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1; + } + if (refDestructuringErrors.shorthandAssign >= left.start) + refDestructuringErrors.shorthandAssign = -1; + if (!this.maybeInArrowParameters) { + if (this.type === tt.eq) this.checkLValPattern(left); + else this.checkLValSimple(left); + } + node.left = left; + this.next(); + node.right = this.parseMaybeAssign(forInit); + if (oldDoubleProto > -1) refDestructuringErrors.doubleProto = oldDoubleProto; + return this.finishNode(node, "AssignmentExpression"); + } else { + if (ownDestructuringErrors) this.checkExpressionErrors(refDestructuringErrors, true); + } + if (oldParenAssign > -1) refDestructuringErrors.parenthesizedAssign = oldParenAssign; + if (oldTrailingComma > -1) refDestructuringErrors.trailingComma = oldTrailingComma; + return left; + } + parseMaybeAssign(forInit, refExpressionErrors, afterLeftParse) { + let state; + let jsx; + let typeCast; + if (options?.jsx && (this.matchJsx("jsxTagStart") || this.tsMatchLeftRelational())) { + state = this.cloneCurLookaheadState(); + jsx = this.tryParse( + () => this.parseMaybeAssignOrigin(forInit, refExpressionErrors, afterLeftParse), + state + ); + if (!jsx.error) return jsx.node; + const context = this.context; + const currentContext = context[context.length - 1]; + const lastCurrentContext = context[context.length - 2]; + if (currentContext === acornTypeScript.tokContexts.tc_oTag && lastCurrentContext === acornTypeScript.tokContexts.tc_expr) { + context.pop(); + context.pop(); + } else if (currentContext === acornTypeScript.tokContexts.tc_oTag || currentContext === acornTypeScript.tokContexts.tc_expr) { + context.pop(); + } + } + if (!jsx?.error && !this.tsMatchLeftRelational()) { + return this.parseMaybeAssignOrigin(forInit, refExpressionErrors, afterLeftParse); + } + if (!state || this.compareLookaheadState(state, this.getCurLookaheadState())) { + state = this.cloneCurLookaheadState(); + } + let typeParameters; + const arrow = this.tryParse((abort) => { + typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier); + const expr = this.parseMaybeAssignOrigin(forInit, refExpressionErrors, afterLeftParse); + if (expr.type !== "ArrowFunctionExpression" || expr.extra?.parenthesized) { + abort(); + } + if (typeParameters?.params.length !== 0) { + this.resetStartLocationFromNode(expr, typeParameters); + } + expr.typeParameters = typeParameters; + return expr; + }, state); + if (!arrow.error && !arrow.aborted) { + if (typeParameters) this.reportReservedArrowTypeParam(typeParameters); + return arrow.node; + } + if (!jsx) { + assert(true); + typeCast = this.tryParse( + () => this.parseMaybeAssignOrigin(forInit, refExpressionErrors, afterLeftParse), + state + ); + if (!typeCast.error) return typeCast.node; + } + if (jsx?.node) { + this.setLookaheadState(jsx.failState); + return jsx.node; + } + if (arrow.node) { + this.setLookaheadState(arrow.failState); + if (typeParameters) this.reportReservedArrowTypeParam(typeParameters); + return arrow.node; + } + if (typeCast?.node) { + this.setLookaheadState(typeCast.failState); + return typeCast.node; + } + if (jsx?.thrown) throw jsx.error; + if (arrow.thrown) throw arrow.error; + if (typeCast?.thrown) throw typeCast.error; + throw jsx?.error || arrow.error || typeCast?.error; + } + parseAssignableListItem(allowModifiers) { + const decorators = []; + while (this.match(tokTypes2.at)) { + decorators.push(this.parseDecorator()); + } + const startPos = this.start; + const startLoc = this.startLoc; + let accessibility; + let readonly = false; + let override = false; + if (allowModifiers !== void 0) { + const modified = {}; + this.tsParseModifiers({ + modified, + allowedModifiers: ["public", "private", "protected", "override", "readonly"] + }); + accessibility = modified.accessibility; + override = modified.override; + readonly = modified.readonly; + if (allowModifiers === false && (accessibility || readonly || override)) { + this.raise(startLoc.start, TypeScriptError.UnexpectedParameterModifier); + } + } + const left = this.parseMaybeDefault(startPos, startLoc); + this.parseBindingListItem(left); + const elt = this.parseMaybeDefault(left["start"], left["loc"], left); + if (decorators.length) { + elt.decorators = decorators; + } + if (accessibility || readonly || override) { + const pp = this.startNodeAt(startPos, startLoc); + if (accessibility) pp.accessibility = accessibility; + if (readonly) pp.readonly = readonly; + if (override) pp.override = override; + if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") { + this.raise(pp.start, TypeScriptError.UnsupportedParameterPropertyKind); + } + pp.parameter = elt; + return this.finishNode(pp, "TSParameterProperty"); + } + return elt; + } + // AssignmentPattern + checkLValInnerPattern(expr, bindingType = acornScope.BIND_NONE, checkClashes) { + switch (expr.type) { + case "TSParameterProperty": + this.checkLValInnerPattern(expr.parameter, bindingType, checkClashes); + break; + default: { + super.checkLValInnerPattern(expr, bindingType, checkClashes); + break; + } + } + } + // Allow type annotations inside of a parameter list. + parseBindingListItem(param) { + if (this.eat(tt.question)) { + if (param.type !== "Identifier" && !this.isAmbientContext && !this.inType) { + this.raise(param.start, TypeScriptError.PatternIsOptional); + } + param.optional = true; + } + const type = this.tsTryParseTypeAnnotation(); + if (type) param.typeAnnotation = type; + this.resetEndLocation(param); + return param; + } + isAssignable(node, isBinding) { + switch (node.type) { + case "TSTypeCastExpression": + return this.isAssignable(node.expression, isBinding); + case "TSParameterProperty": + return true; + case "Identifier": + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + case "RestElement": + return true; + case "ObjectExpression": { + const last = node.properties.length - 1; + return node.properties.every((prop, i) => { + return prop.type !== "ObjectMethod" && (i === last || prop.type !== "SpreadElement") && this.isAssignable(prop); + }); + } + case "Property": + case "ObjectProperty": + return this.isAssignable(node.value); + case "SpreadElement": + return this.isAssignable(node.argument); + case "ArrayExpression": + return node.elements.every( + (element) => element === null || this.isAssignable(element) + ); + case "AssignmentExpression": + return node.operator === "="; + case "ParenthesizedExpression": + return this.isAssignable(node.expression); + case "MemberExpression": + case "OptionalMemberExpression": + return !isBinding; + default: + return false; + } + } + toAssignable(node, isBinding = false, refDestructuringErrors = new DestructuringErrors()) { + switch (node.type) { + case "ParenthesizedExpression": + return this.toAssignableParenthesizedExpression( + node, + isBinding, + refDestructuringErrors + ); + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSNonNullExpression": + case "TSTypeAssertion": + if (isBinding) { + } else { + this.raise(node.start, TypeScriptError.UnexpectedTypeCastInParameter); + } + return this.toAssignable(node.expression, isBinding, refDestructuringErrors); + case "MemberExpression": + break; + case "AssignmentExpression": + if (!isBinding && node.left.type === "TSTypeCastExpression") { + node.left = this.typeCastToParameter(node.left); + } + return super.toAssignable(node, isBinding, refDestructuringErrors); + case "TSTypeCastExpression": { + return this.typeCastToParameter(node); + } + default: + return super.toAssignable(node, isBinding, refDestructuringErrors); + } + return node; + } + toAssignableParenthesizedExpression(node, isBinding, refDestructuringErrors) { + switch (node.expression.type) { + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSNonNullExpression": + case "TSTypeAssertion": + case "ParenthesizedExpression": + return this.toAssignable(node.expression, isBinding, refDestructuringErrors); + default: + return super.toAssignable(node, isBinding, refDestructuringErrors); + } + } + parseBindingAtom() { + switch (this.type) { + case tt._this: + return this.parseIdent( + /* liberal */ + true + ); + default: + return super.parseBindingAtom(); + } + } + shouldParseArrow(exprList) { + let shouldParseArrowRes; + if (this.match(tt.colon)) { + shouldParseArrowRes = exprList.every((expr) => this.isAssignable(expr, true)); + } else { + shouldParseArrowRes = !this.canInsertSemicolon(); + } + if (shouldParseArrowRes) { + if (this.match(tt.colon)) { + const result = this.tryParse((abort) => { + const returnType = this.tsParseTypeOrTypePredicateAnnotation(tt.colon); + if (this.canInsertSemicolon() || !this.match(tt.arrow)) abort(); + return returnType; + }); + if (result.aborted) { + this.shouldParseArrowReturnType = void 0; + return false; + } + if (!result.thrown) { + if (result.error) this.setLookaheadState(result.failState); + this.shouldParseArrowReturnType = result.node; + } + } + if (!this.match(tt.arrow)) { + this.shouldParseArrowReturnType = void 0; + return false; + } + return true; + } + this.shouldParseArrowReturnType = void 0; + return shouldParseArrowRes; + } + parseParenArrowList(startPos, startLoc, exprList, forInit) { + const node = this.startNodeAt(startPos, startLoc); + node.returnType = this.shouldParseArrowReturnType; + this.shouldParseArrowReturnType = void 0; + return this.parseArrowExpression(node, exprList, false, forInit); + } + parseParenAndDistinguishExpression(canBeArrow, forInit) { + let startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.ecmaVersion >= 8; + if (this.ecmaVersion >= 6) { + const oldMaybeInArrowParameters = this.maybeInArrowParameters; + this.maybeInArrowParameters = true; + this.next(); + let innerStartPos = this.start, innerStartLoc = this.startLoc; + let exprList = [], first = true, lastIsComma = false; + let refDestructuringErrors = new DestructuringErrors(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart; + this.yieldPos = 0; + this.awaitPos = 0; + while (this.type !== tt.parenR) { + first ? first = false : this.expect(tt.comma); + if (allowTrailingComma && this.afterTrailingComma(tt.parenR, true)) { + lastIsComma = true; + break; + } else if (this.type === tt.ellipsis) { + spreadStart = this.start; + exprList.push(this.parseParenItem(this.parseRestBinding())); + if (this.type === tt.comma) { + this.raise(this.start, "Comma is not permitted after the rest element"); + } + break; + } else { + exprList.push( + this.parseMaybeAssign(forInit, refDestructuringErrors, this.parseParenItem) + ); + } + } + let innerEndPos = this.lastTokEnd, innerEndLoc = this.lastTokEndLoc; + this.expect(tt.parenR); + this.maybeInArrowParameters = oldMaybeInArrowParameters; + if (canBeArrow && this.shouldParseArrow(exprList) && this.eat(tt.arrow)) { + this.checkPatternErrors(refDestructuringErrors, false); + this.checkYieldAwaitInDefaultParams(); + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + return this.parseParenArrowList(startPos, startLoc, exprList, forInit); + } + if (!exprList.length || lastIsComma) this.unexpected(this.lastTokStart); + if (spreadStart) this.unexpected(spreadStart); + this.checkExpressionErrors(refDestructuringErrors, true); + this.yieldPos = oldYieldPos || this.yieldPos; + this.awaitPos = oldAwaitPos || this.awaitPos; + if (exprList.length > 1) { + val = this.startNodeAt(innerStartPos, innerStartLoc); + val.expressions = exprList; + this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); + } else { + val = exprList[0]; + } + } else { + val = this.parseParenExpression(); + } + if (this.options.preserveParens) { + let par = this.startNodeAt(startPos, startLoc); + par.expression = val; + return this.finishNode(par, "ParenthesizedExpression"); + } else { + return val; + } + } + parseTaggedTemplateExpression(base, startPos, startLoc, optionalChainMember) { + const node = this.startNodeAt(startPos, startLoc); + node.tag = base; + node.quasi = this.parseTemplate({ isTagged: true }); + if (optionalChainMember) { + this.raise( + startPos, + "Tagged Template Literals are not allowed in optionalChain." + ); + } + return this.finishNode(node, "TaggedTemplateExpression"); + } + shouldParseAsyncArrow() { + if (this.match(tt.colon)) { + const result = this.tryParse((abort) => { + const returnType = this.tsParseTypeOrTypePredicateAnnotation(tt.colon); + if (this.canInsertSemicolon() || !this.match(tt.arrow)) abort(); + return returnType; + }); + if (result.aborted) { + this.shouldParseAsyncArrowReturnType = void 0; + return false; + } + if (!result.thrown) { + if (result.error) this.setLookaheadState(result.failState); + this.shouldParseAsyncArrowReturnType = result.node; + return !this.canInsertSemicolon() && this.eat(tt.arrow); + } + } else { + return !this.canInsertSemicolon() && this.eat(tt.arrow); + } + } + parseSubscriptAsyncArrow(startPos, startLoc, exprList, forInit) { + const arrN = this.startNodeAt(startPos, startLoc); + arrN.returnType = this.shouldParseAsyncArrowReturnType; + this.shouldParseAsyncArrowReturnType = void 0; + return this.parseArrowExpression(arrN, exprList, true, forInit); + } + parseExprList(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { + let elts = [], first = true; + while (!this.eat(close)) { + if (!first) { + this.expect(tt.comma); + if (allowTrailingComma && this.afterTrailingComma(close)) break; + } else first = false; + let elt; + if (allowEmpty && this.type === tt.comma) elt = null; + else if (this.type === tt.ellipsis) { + elt = this.parseSpread(refDestructuringErrors); + if (this.maybeInArrowParameters && this.match(tt.colon)) { + elt.typeAnnotation = this.tsParseTypeAnnotation(); + } + if (refDestructuringErrors && this.type === tt.comma && refDestructuringErrors.trailingComma < 0) + refDestructuringErrors.trailingComma = this.start; + } else { + elt = this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem); + } + elts.push(elt); + } + return elts; + } + parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) { + let _optionalChained = optionalChained; + if (!this.hasPrecedingLineBreak() && // NODE: replace bang + this.value === "!" && this.match(tt.prefix)) { + this.exprAllowed = false; + this.next(); + const nonNullExpression = this.startNodeAt(startPos, startLoc); + nonNullExpression.expression = base; + base = this.finishNode(nonNullExpression, "TSNonNullExpression"); + return base; + } + let isOptionalCall = false; + if (this.match(tt.questionDot) && this.lookaheadCharCode() === 60) { + if (noCalls) { + return base; + } + base.optional = true; + _optionalChained = isOptionalCall = true; + this.next(); + } + if (this.tsMatchLeftRelational() || this.match(tt.bitShift)) { + let missingParenErrorLoc; + const result = this.tsTryParseAndCatch(() => { + if (!noCalls && this.atPossibleAsyncArrow(base)) { + const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction( + startPos, + startLoc, + forInit + ); + if (asyncArrowFn) { + base = asyncArrowFn; + return base; + } + } + const typeArguments = this.tsParseTypeArgumentsInExpression(); + if (!typeArguments) return base; + if (isOptionalCall && !this.match(tt.parenL)) { + missingParenErrorLoc = this.curPosition(); + return base; + } + if (tokenIsTemplate(this.type) || this.type === tt.backQuote) { + const result2 = this.parseTaggedTemplateExpression( + base, + startPos, + startLoc, + _optionalChained + ); + result2.typeArguments = typeArguments; + return result2; + } + if (!noCalls && this.eat(tt.parenL)) { + let refDestructuringErrors = new DestructuringErrors(); + const node2 = this.startNodeAt(startPos, startLoc); + node2.callee = base; + node2.arguments = this.parseExprList( + tt.parenR, + this.ecmaVersion >= 8, + false, + refDestructuringErrors + ); + this.tsCheckForInvalidTypeCasts(node2.arguments); + node2.typeArguments = typeArguments; + if (_optionalChained) { + node2.optional = isOptionalCall; + } + this.checkExpressionErrors(refDestructuringErrors, true); + base = this.finishNode(node2, "CallExpression"); + return base; + } + const tokenType = this.type; + if ( + // a>c is not (a)>c, but a<(b>>c) + this.tsMatchRightRelational() || // a>>c is not (a)>>c, but a<(b>>>c) + tokenType === tt.bitShift || // ac is (ac + tokenType !== tt.parenL && tokenCanStartExpression(tokenType) && !this.hasPrecedingLineBreak() + ) { + return; + } + const node = this.startNodeAt(startPos, startLoc); + node.expression = base; + node.typeArguments = typeArguments; + return this.finishNode(node, "TSInstantiationExpression"); + }); + if (missingParenErrorLoc) { + this.unexpected(missingParenErrorLoc); + } + if (result) { + if (result.type === "TSInstantiationExpression" && (this.match(tt.dot) || this.match(tt.questionDot) && this.lookaheadCharCode() !== 40)) { + this.raise( + this.start, + TypeScriptError.InvalidPropertyAccessAfterInstantiationExpression + ); + } + base = result; + return base; + } + } + let optionalSupported = this.ecmaVersion >= 11; + let optional = optionalSupported && this.eat(tt.questionDot); + if (noCalls && optional) + this.raise( + this.lastTokStart, + "Optional chaining cannot appear in the callee of new expressions" + ); + let computed = this.eat(tt.bracketL); + if (computed || optional && this.type !== tt.parenL && this.type !== tt.backQuote || this.eat(tt.dot)) { + let node = this.startNodeAt(startPos, startLoc); + node.object = base; + if (computed) { + node.property = this.parseExpression(); + this.expect(tt.bracketR); + } else if (this.type === tt.privateId && base.type !== "Super") { + node.property = this.parsePrivateIdent(); + } else { + node.property = this.parseIdent(this.options.allowReserved !== "never"); + } + node.computed = !!computed; + if (optionalSupported) { + node.optional = optional; + } + base = this.finishNode(node, "MemberExpression"); + } else if (!noCalls && this.eat(tt.parenL)) { + const oldMaybeInArrowParameters = this.maybeInArrowParameters; + this.maybeInArrowParameters = true; + let refDestructuringErrors = new DestructuringErrors(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + let exprList = this.parseExprList( + tt.parenR, + this.ecmaVersion >= 8, + false, + refDestructuringErrors + ); + if (maybeAsyncArrow && !optional && this.shouldParseAsyncArrow()) { + this.checkPatternErrors(refDestructuringErrors, false); + this.checkYieldAwaitInDefaultParams(); + if (this.awaitIdentPos > 0) + this.raise( + this.awaitIdentPos, + "Cannot use 'await' as identifier inside an async function" + ); + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + base = this.parseSubscriptAsyncArrow(startPos, startLoc, exprList, forInit); + } else { + this.checkExpressionErrors(refDestructuringErrors, true); + this.yieldPos = oldYieldPos || this.yieldPos; + this.awaitPos = oldAwaitPos || this.awaitPos; + this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos; + let node = this.startNodeAt(startPos, startLoc); + node.callee = base; + node.arguments = exprList; + if (optionalSupported) { + node.optional = optional; + } + base = this.finishNode(node, "CallExpression"); + } + this.maybeInArrowParameters = oldMaybeInArrowParameters; + } else if (this.type === tt.backQuote) { + if (optional || _optionalChained) { + this.raise( + this.start, + "Optional chaining cannot appear in the tag of tagged template expressions" + ); + } + let node = this.startNodeAt(startPos, startLoc); + node.tag = base; + node.quasi = this.parseTemplate({ isTagged: true }); + base = this.finishNode(node, "TaggedTemplateExpression"); + } + return base; + } + parseGetterSetter(prop) { + prop.kind = prop.key.name; + this.parsePropertyName(prop); + prop.value = this.parseMethod(false); + let paramCount = prop.kind === "get" ? 0 : 1; + const firstParam = prop.value.params[0]; + const hasContextParam = firstParam && this.isThisParam(firstParam); + paramCount = hasContextParam ? paramCount + 1 : paramCount; + if (prop.value.params.length !== paramCount) { + let start = prop.value.start; + if (prop.kind === "get") this.raiseRecoverable(start, "getter should have no params"); + else this.raiseRecoverable(start, "setter should have exactly one param"); + } else { + if (prop.kind === "set" && prop.value.params[0].type === "RestElement") + this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); + } + } + parseProperty(isPattern, refDestructuringErrors) { + if (!isPattern) { + let decorators = []; + if (this.match(tokTypes2.at)) { + while (this.match(tokTypes2.at)) { + decorators.push(this.parseDecorator()); + } + } + const property = super.parseProperty(isPattern, refDestructuringErrors); + if (property.type === "SpreadElement") { + if (decorators.length) + this.raise(property.start, DecoratorsError.SpreadElementDecorator); + } + if (decorators.length) { + property.decorators = decorators; + decorators = []; + } + return property; + } + return super.parseProperty(isPattern, refDestructuringErrors); + } + parseCatchClauseParam() { + const param = this.parseBindingAtom(); + let simple = param.type === "Identifier"; + this.enterScope(simple ? acornScope.SCOPE_SIMPLE_CATCH : 0); + this.checkLValPattern( + param, + simple ? acornScope.BIND_SIMPLE_CATCH : acornScope.BIND_LEXICAL + ); + const type = this.tsTryParseTypeAnnotation(); + if (type) { + param.typeAnnotation = type; + this.resetEndLocation(param); + } + this.expect(tt.parenR); + return param; + } + parseClass(node, isStatement) { + const oldInAbstractClass = this.inAbstractClass; + this.inAbstractClass = !!node.abstract; + try { + this.next(); + this.takeDecorators(node); + const oldStrict = this.strict; + this.strict = true; + this.parseClassId(node, isStatement); + this.parseClassSuper(node); + const privateNameMap = this.enterClassBody(); + const classBody = this.startNode(); + let hadConstructor = false; + classBody.body = []; + let decorators = []; + this.expect(tt.braceL); + while (this.type !== tt.braceR) { + if (this.match(tokTypes2.at)) { + decorators.push(this.parseDecorator()); + continue; + } + const element = this.parseClassElement(node.superClass !== null); + if (decorators.length) { + element.decorators = decorators; + this.resetStartLocationFromNode(element, decorators[0]); + decorators = []; + } + if (element) { + classBody.body.push(element); + if (element.type === "MethodDefinition" && element.kind === "constructor" && element.value.type === "FunctionExpression") { + if (hadConstructor) { + this.raiseRecoverable(element.start, "Duplicate constructor in the same class"); + } + hadConstructor = true; + if (element.decorators && element.decorators.length > 0) { + this.raise(element.start, DecoratorsError.DecoratorConstructor); + } + } else if (element.key && element.key.type === "PrivateIdentifier" && isPrivateNameConflicted(privateNameMap, element)) { + this.raiseRecoverable( + element.key.start, + `Identifier '#${element.key.name}' has already been declared` + ); + } + } + } + this.strict = oldStrict; + this.next(); + if (decorators.length) { + this.raise(this.start, DecoratorsError.TrailingDecorator); + } + node.body = this.finishNode(classBody, "ClassBody"); + this.exitClassBody(); + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); + } finally { + this.inAbstractClass = oldInAbstractClass; + } + } + parseClassFunctionParams() { + const typeParameters = this.tsTryParseTypeParameters(); + let params = this.parseBindingList(tt.parenR, false, this.ecmaVersion >= 8, true); + if (typeParameters) params.typeParameters = typeParameters; + return params; + } + parseMethod(isGenerator, isAsync, allowDirectSuper, inClassScope, method) { + let node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.initFunction(node); + if (this.ecmaVersion >= 6) node.generator = isGenerator; + if (this.ecmaVersion >= 8) node.async = !!isAsync; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope( + functionFlags(isAsync, node.generator) | acornScope.SCOPE_SUPER | (allowDirectSuper ? acornScope.SCOPE_DIRECT_SUPER : 0) + ); + this.expect(tt.parenL); + node.params = this.parseClassFunctionParams(); + this.checkYieldAwaitInDefaultParams(); + this.parseFunctionBody(node, false, true, false, { + isClassMethod: inClassScope + }); + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + if (method && method.abstract) { + const hasBody = !!node.body; + if (hasBody) { + const { key } = method; + this.raise( + method.start, + TypeScriptError.AbstractMethodHasImplementation({ + methodName: key.type === "Identifier" && !method.computed ? key.name : `[${this.input.slice(key.start, key.end)}]` + }) + ); + } + } + return this.finishNode(node, "FunctionExpression"); + } + static parse(input, options2) { + if (options2.locations === false) { + throw new Error(`You have to enable options.locations while using acorn-typescript`); + } else { + options2.locations = true; + } + const parser = new this(options2, input); + if (dts) { + parser.isAmbientContext = true; + } + return parser.parse(); + } + static parseExpressionAt(input, pos, options2) { + if (options2.locations === false) { + throw new Error(`You have to enable options.locations while using acorn-typescript`); + } else { + options2.locations = true; + } + const parser = new this(options2, input, pos); + if (dts) { + parser.isAmbientContext = true; + } + parser.nextToken(); + return parser.parseExpression(); + } + parseImportSpecifier() { + const isMaybeTypeOnly = this.ts_isContextual(tokTypes2.type); + if (isMaybeTypeOnly) { + let node = this.startNode(); + node.imported = this.parseModuleExportName(); + this.parseTypeOnlyImportExportSpecifier( + node, + /* isImport */ + true, + this.importOrExportOuterKind === "type" + ); + return this.finishNode(node, "ImportSpecifier"); + } else { + const node = super.parseImportSpecifier(); + node.importKind = "value"; + return node; + } + } + parseExportSpecifier(exports) { + const isMaybeTypeOnly = this.ts_isContextual(tokTypes2.type); + const isString = this.match(tt.string); + if (!isString && isMaybeTypeOnly) { + let node = this.startNode(); + node.local = this.parseModuleExportName(); + this.parseTypeOnlyImportExportSpecifier( + node, + /* isImport */ + false, + this.importOrExportOuterKind === "type" + ); + this.finishNode(node, "ExportSpecifier"); + this.checkExport(exports, node.exported, node.exported.start); + return node; + } else { + const node = super.parseExportSpecifier(exports); + node.exportKind = "value"; + return node; + } + } + parseTypeOnlyImportExportSpecifier(node, isImport, isInTypeOnlyImportExport) { + const leftOfAsKey = isImport ? "imported" : "local"; + const rightOfAsKey = isImport ? "local" : "exported"; + let leftOfAs = node[leftOfAsKey]; + let rightOfAs; + let hasTypeSpecifier = false; + let canParseAsKeyword = true; + const loc = leftOfAs.start; + if (this.isContextual("as")) { + const firstAs = this.parseIdent(); + if (this.isContextual("as")) { + const secondAs = this.parseIdent(); + if (tokenIsKeywordOrIdentifier(this.type)) { + hasTypeSpecifier = true; + leftOfAs = firstAs; + rightOfAs = isImport ? this.parseIdent() : this.parseModuleExportName(); + canParseAsKeyword = false; + } else { + rightOfAs = secondAs; + canParseAsKeyword = false; + } + } else if (tokenIsKeywordOrIdentifier(this.type)) { + canParseAsKeyword = false; + rightOfAs = isImport ? this.parseIdent() : this.parseModuleExportName(); + } else { + hasTypeSpecifier = true; + leftOfAs = firstAs; + } + } else if (tokenIsKeywordOrIdentifier(this.type)) { + hasTypeSpecifier = true; + if (isImport) { + leftOfAs = super.parseIdent(true); + if (!this.isContextual("as")) { + this.checkUnreserved(leftOfAs); + } + } else { + leftOfAs = this.parseModuleExportName(); + } + } + if (hasTypeSpecifier && isInTypeOnlyImportExport) { + this.raise( + loc, + isImport ? TypeScriptError.TypeModifierIsUsedInTypeImports : TypeScriptError.TypeModifierIsUsedInTypeExports + ); + } + node[leftOfAsKey] = leftOfAs; + node[rightOfAsKey] = rightOfAs; + const kindKey = isImport ? "importKind" : "exportKind"; + node[kindKey] = hasTypeSpecifier ? "type" : "value"; + if (canParseAsKeyword && this.eatContextual("as")) { + node[rightOfAsKey] = isImport ? this.parseIdent() : this.parseModuleExportName(); + } + if (!node[rightOfAsKey]) { + node[rightOfAsKey] = this.copyNode(node[leftOfAsKey]); + } + if (isImport) { + this.checkLValSimple(node[rightOfAsKey], acornScope.BIND_LEXICAL); + } + } + raiseCommonCheck(pos, message, recoverable) { + switch (message) { + case "Comma is not permitted after the rest element": { + if (this.isAmbientContext && this.match(tt.comma) && this.lookaheadCharCode() === 41) { + this.next(); + return; + } else { + return super.raise(pos, message); + } + } + } + return recoverable ? super.raiseRecoverable(pos, message) : super.raise(pos, message); + } + raiseRecoverable(pos, message) { + return this.raiseCommonCheck(pos, message, true); + } + raise(pos, message) { + return this.raiseCommonCheck(pos, message, true); + } + updateContext(prevType) { + const { type } = this; + if (type == tt.braceL) { + var curContext = this.curContext(); + if (curContext == tsTokContexts.tc_oTag) this.context.push(tokContexts.b_expr); + else if (curContext == tsTokContexts.tc_expr) this.context.push(tokContexts.b_tmpl); + else super.updateContext(prevType); + this.exprAllowed = true; + } else if (type === tt.slash && prevType === tokTypes2.jsxTagStart) { + this.context.length -= 2; + this.context.push(tsTokContexts.tc_cTag); + this.exprAllowed = false; + } else { + return super.updateContext(prevType); + } + } + // Parses JSX opening tag starting after '<'. + jsx_parseOpeningElementAt(startPos, startLoc) { + let node = this.startNodeAt(startPos, startLoc); + let nodeName = this.jsx_parseElementName(); + if (nodeName) node.name = nodeName; + if (this.match(tt.relational) || this.match(tt.bitShift)) { + const typeArguments = this.tsTryParseAndCatch( + () => this.tsParseTypeArgumentsInExpression() + ); + if (typeArguments) node.typeArguments = typeArguments; + } + node.attributes = []; + while (this.type !== tt.slash && this.type !== tokTypes2.jsxTagEnd) + node.attributes.push(this.jsx_parseAttribute()); + node.selfClosing = this.eat(tt.slash); + this.expect(tokTypes2.jsxTagEnd); + return this.finishNode(node, nodeName ? "JSXOpeningElement" : "JSXOpeningFragment"); + } + enterScope(flags) { + if (flags === TS_SCOPE_TS_MODULE) { + this.importsStack.push([]); + } + super.enterScope(flags); + const scope = super.currentScope(); + scope.types = []; + scope.enums = []; + scope.constEnums = []; + scope.classes = []; + scope.exportOnlyBindings = []; + } + exitScope() { + const scope = super.currentScope(); + if (scope.flags === TS_SCOPE_TS_MODULE) { + this.importsStack.pop(); + } + super.exitScope(); + } + hasImport(name, allowShadow) { + const len = this.importsStack.length; + if (this.importsStack[len - 1].indexOf(name) > -1) { + return true; + } + if (!allowShadow && len > 1) { + for (let i = 0; i < len - 1; i++) { + if (this.importsStack[i].indexOf(name) > -1) return true; + } + } + return false; + } + maybeExportDefined(scope, name) { + if (this.inModule && scope.flags & acornScope.SCOPE_TOP) { + this.undefinedExports.delete(name); + } + } + declareName(name, bindingType, pos) { + if (bindingType & acornScope.BIND_FLAGS_TS_IMPORT) { + if (this.hasImport(name, true)) { + this.raise(pos, `Identifier '${name}' has already been declared.`); + } + this.importsStack[this.importsStack.length - 1].push(name); + return; + } + const scope = this.currentScope(); + if (bindingType & acornScope.BIND_FLAGS_TS_EXPORT_ONLY) { + this.maybeExportDefined(scope, name); + scope.exportOnlyBindings.push(name); + return; + } + if (bindingType === acornScope.BIND_TS_TYPE || bindingType === acornScope.BIND_TS_INTERFACE) { + if (bindingType === acornScope.BIND_TS_TYPE && scope.types.includes(name)) { + this.raise(pos, `type '${name}' has already been declared.`); + } + scope.types.push(name); + } else { + super.declareName(name, bindingType, pos); + } + if (bindingType & acornScope.BIND_FLAGS_TS_ENUM) scope.enums.push(name); + if (bindingType & acornScope.BIND_FLAGS_TS_CONST_ENUM) scope.constEnums.push(name); + if (bindingType & acornScope.BIND_FLAGS_CLASS) scope.classes.push(name); + } + checkLocalExport(id) { + const { name } = id; + if (this.hasImport(name)) return; + const len = this.scopeStack.length; + for (let i = len - 1; i >= 0; i--) { + const scope = this.scopeStack[i]; + if (scope.types.indexOf(name) > -1 || scope.exportOnlyBindings.indexOf(name) > -1) return; + } + super.checkLocalExport(id); + } + } + return TypeScriptParser; + }; +} +export { + tsPlugin +}; diff --git a/node_modules/@sveltejs/acorn-typescript/package.json b/node_modules/@sveltejs/acorn-typescript/package.json new file mode 100644 index 0000000..14a2073 --- /dev/null +++ b/node_modules/@sveltejs/acorn-typescript/package.json @@ -0,0 +1,55 @@ +{ + "name": "@sveltejs/acorn-typescript", + "version": "1.0.5", + "description": "Acorn plugin that parses TypeScript", + "type": "module", + "types": "index.d.ts", + "files": [ + "index.js", + "index.d.ts" + ], + "exports": { + ".": { + "types": "./index.d.ts", + "default": "./index.js" + } + }, + "repository": { + "type": "git", + "url": "git+https://github.com/sveltejs/acorn-typescript.git" + }, + "author": "tyrealhu and the Svelte team", + "license": "MIT", + "bugs": { + "url": "https://github.com/sveltejs/acorn-typescript/issues" + }, + "homepage": "https://github.com/sveltejs/acorn-typescript#readme", + "devDependencies": { + "@changesets/cli": "^2.27.11", + "@svitejs/changesets-changelog-github-compact": "^1.1.0", + "acorn": "^8.14.0", + "acorn-jsx": "~5.3.2", + "cross-env": "^7.0.3", + "esbuild": "^0.25.0", + "prettier": "~3.5.2", + "test262": "git+https://github.com/tc39/test262.git#88ebb1e3755198cd08757bca1698effbbf360345", + "test262-parser-runner": "^0.5.0", + "typescript": "^5.7.3", + "vitest": "^3.0.7" + }, + "peerDependencies": { + "acorn": "^8.9.0" + }, + "scripts": { + "build": "esbuild src/index.ts --bundle --format=esm --outfile=index.js --platform=node --external:acorn", + "format": "prettier --write .", + "check": "tsc --noEmit", + "lint": "prettier --check .", + "test": "vitest run", + "test:update": "cross-env UPDATE_SNAPSHOT=true vitest run && pnpm run format", + "test:test262": "pnpm run build && node ./test/run_test262.js", + "changeset:version": "changeset version && git add --all", + "changeset:release": "changeset publish", + "playground": "pnpm build && node ./playground/index.js" + } +} \ No newline at end of file diff --git a/node_modules/@sveltejs/adapter-auto/LICENSE b/node_modules/@sveltejs/adapter-auto/LICENSE new file mode 100644 index 0000000..22efd0c --- /dev/null +++ b/node_modules/@sveltejs/adapter-auto/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2020 [these people](https://github.com/sveltejs/kit/graphs/contributors) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@sveltejs/adapter-auto/README.md b/node_modules/@sveltejs/adapter-auto/README.md new file mode 100644 index 0000000..ed96335 --- /dev/null +++ b/node_modules/@sveltejs/adapter-auto/README.md @@ -0,0 +1,11 @@ +# adapter-auto + +Automatically chooses the SvelteKit adapter for your current environment, if possible. + +## Docs + +[Docs](https://svelte.dev/docs/kit/adapter-auto) + +## Changelog + +[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/adapter-auto/CHANGELOG.md). diff --git a/node_modules/@sveltejs/adapter-auto/adapters.js b/node_modules/@sveltejs/adapter-auto/adapters.js new file mode 100644 index 0000000..94fe141 --- /dev/null +++ b/node_modules/@sveltejs/adapter-auto/adapters.js @@ -0,0 +1,42 @@ +import process from 'node:process'; + +// List of adapters to check for. `version` is used to pin the installed adapter version and should point +// to the latest version of the adapter that is compatible with adapter-auto's current peerDependency version of SvelteKit. +export const adapters = [ + { + name: 'Vercel', + test: () => !!process.env.VERCEL, + module: '@sveltejs/adapter-vercel', + version: '5' + }, + { + name: 'Cloudflare Pages', + test: () => !!process.env.CF_PAGES, + module: '@sveltejs/adapter-cloudflare', + version: '7' + }, + { + name: 'Netlify', + test: () => !!process.env.NETLIFY, + module: '@sveltejs/adapter-netlify', + version: '5' + }, + { + name: 'Azure Static Web Apps', + test: () => process.env.GITHUB_ACTION_REPOSITORY === 'Azure/static-web-apps-deploy', + module: 'svelte-adapter-azure-swa', + version: '0.20' + }, + { + name: 'AWS via SST', + test: () => !!process.env.SST, + module: 'svelte-kit-sst', + version: '2' + }, + { + name: 'Google Cloud Run', + test: () => !!process.env.GCP_BUILDPACKS, + module: '@sveltejs/adapter-node', + version: '5' + } +]; diff --git a/node_modules/@sveltejs/adapter-auto/index.d.ts b/node_modules/@sveltejs/adapter-auto/index.d.ts new file mode 100644 index 0000000..90af12a --- /dev/null +++ b/node_modules/@sveltejs/adapter-auto/index.d.ts @@ -0,0 +1,3 @@ +import { Adapter } from '@sveltejs/kit'; + +export default function plugin(): Adapter; diff --git a/node_modules/@sveltejs/adapter-auto/index.js b/node_modules/@sveltejs/adapter-auto/index.js new file mode 100644 index 0000000..0a2c003 --- /dev/null +++ b/node_modules/@sveltejs/adapter-auto/index.js @@ -0,0 +1,166 @@ +import { execSync } from 'node:child_process'; +import { adapters } from './adapters.js'; +import path from 'node:path'; +import fs from 'node:fs'; +import process from 'node:process'; + +/** @type {Record string>} */ +const commands = { + npm: (name, version) => `npm install -D ${name}@${version}`, + pnpm: (name, version) => `pnpm add -D ${name}@${version}`, + yarn: (name, version) => `yarn add -D ${name}@${version}`, + bun: (name, version) => `bun add -D ${name}@${version}` +}; + +function detect_lockfile() { + let dir = process.cwd(); + + /** @param {string} file */ + const exists = (file) => fs.existsSync(path.join(dir, file)); + + do { + if (exists('pnpm-lock.yaml')) return 'pnpm'; + if (exists('yarn.lock')) return 'yarn'; + if (exists('package-lock.json')) return 'npm'; + if (exists('bun.lockb') || exists('bun.lock')) return 'bun'; + } while (dir !== (dir = path.dirname(dir))); + + return 'npm'; +} + +function detect_package_manager() { + const manager = detect_lockfile(); + + try { + execSync(`${manager} --version`); + return manager; + } catch { + return 'npm'; + } +} + +/** + * Resolves a peer dependency relative to the current CWD. Duplicated with `packages/kit` + * @param {string} dependency + */ +function resolve_peer(dependency) { + let [name, ...parts] = dependency.split('/'); + if (name[0] === '@') name += `/${parts.shift()}`; + + let dir = process.cwd(); + + while (!fs.existsSync(`${dir}/node_modules/${name}/package.json`)) { + if (dir === (dir = path.dirname(dir))) { + throw new Error( + `Could not resolve peer dependency "${name}" relative to your project — please install it and try again.` + ); + } + } + + const pkg_dir = `${dir}/node_modules/${name}`; + const pkg = JSON.parse(fs.readFileSync(`${pkg_dir}/package.json`, 'utf-8')); + + const subpackage = ['.', ...parts].join('/'); + + let exported = pkg.exports[subpackage]; + + while (typeof exported !== 'string') { + if (!exported) { + throw new Error(`Could not find valid "${subpackage}" export in ${name}/package.json`); + } + + exported = exported['import'] ?? exported['default']; + } + + return path.resolve(pkg_dir, exported); +} + +/** @typedef {import('@sveltejs/kit').Adapter} Adapter */ + +/** + * @returns {Promise} The corresponding adapter for the current environment if found otherwise undefined + */ +async function get_adapter() { + const match = adapters.find((candidate) => candidate.test()); + + if (!match) return; + + /** @type {string} */ + let resolved; + + try { + resolved = resolve_peer(match.module); + } catch { + const package_manager = detect_package_manager(); + const command = commands[package_manager](match.module, match.version); + + try { + console.log(`Installing ${match.module}...`); + + execSync(command, { + stdio: 'inherit', + env: { + ...process.env, + NODE_ENV: undefined + } + }); + + resolved = resolve_peer(match.module); + + console.log(`Successfully installed ${match.module}.`); + console.warn( + `\nIf you plan on staying on this deployment platform, consider replacing @sveltejs/adapter-auto with ${match.module}. This will give you faster and more robust installs, and more control over deployment configuration.\n` + ); + } catch (e) { + throw new Error( + `Could not install ${match.module}. Please install it yourself by adding it to your package.json's devDependencies and try building your project again.`, + { cause: e } + ); + } + } + + /** @type {{ default: () => Adapter }} */ + const module = await import(resolved); + + const adapter = module.default(); + + return { + ...adapter, + adapt: (builder) => { + builder.log.info(`Detected environment: ${match.name}. Using ${match.module}`); + return adapter.adapt(builder); + } + }; +} + +/** @type {() => Adapter} */ +export default () => ({ + name: '@sveltejs/adapter-auto', + adapt: async (builder) => { + const adapter = await get_adapter(); + + if (adapter) return adapter.adapt(builder); + + builder.log.warn( + 'Could not detect a supported production environment. See https://svelte.dev/docs/kit/adapters to learn how to configure your app to run on the platform of your choosing' + ); + }, + supports: { + read: () => { + supports_error( + 'The read function imported from $app/server only works in certain environments' + ); + } + } +}); + +/** + * @param {string} message + * @returns {never} + * @throws {Error} + */ +function supports_error(message) { + throw new Error( + `${message}. Since you're using @sveltejs/adapter-auto, SvelteKit cannot determine whether it will work when your app is deployed. Please replace it with an adapter tailored to your target environment.` + ); +} diff --git a/node_modules/@sveltejs/adapter-auto/package.json b/node_modules/@sveltejs/adapter-auto/package.json new file mode 100644 index 0000000..d298aaf --- /dev/null +++ b/node_modules/@sveltejs/adapter-auto/package.json @@ -0,0 +1,52 @@ +{ + "name": "@sveltejs/adapter-auto", + "version": "6.0.1", + "description": "Automatically chooses the SvelteKit adapter for your current environment, if possible.", + "keywords": [ + "adapter", + "automatically", + "deploy", + "hosting", + "platform", + "svelte", + "sveltekit" + ], + "repository": { + "type": "git", + "url": "https://github.com/sveltejs/kit", + "directory": "packages/adapter-auto" + }, + "license": "MIT", + "homepage": "https://svelte.dev", + "type": "module", + "exports": { + ".": { + "types": "./index.d.ts", + "import": "./index.js" + }, + "./package.json": "./package.json" + }, + "types": "index.d.ts", + "files": [ + "files", + "index.js", + "index.d.ts", + "adapters.js" + ], + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^5.0.1", + "@types/node": "^18.19.48", + "typescript": "^5.3.3", + "vitest": "^3.1.1", + "@sveltejs/kit": "^2.21.0" + }, + "peerDependencies": { + "@sveltejs/kit": "^2.0.0" + }, + "scripts": { + "lint": "prettier --check .", + "format": "pnpm lint --write", + "check": "tsc", + "test": "vitest run" + } +} \ No newline at end of file diff --git a/node_modules/@sveltejs/adapter-static/LICENSE b/node_modules/@sveltejs/adapter-static/LICENSE new file mode 100644 index 0000000..22efd0c --- /dev/null +++ b/node_modules/@sveltejs/adapter-static/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2020 [these people](https://github.com/sveltejs/kit/graphs/contributors) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@sveltejs/adapter-static/README.md b/node_modules/@sveltejs/adapter-static/README.md new file mode 100644 index 0000000..b612f2a --- /dev/null +++ b/node_modules/@sveltejs/adapter-static/README.md @@ -0,0 +1,15 @@ +# @sveltejs/adapter-static + +[Adapter](https://svelte.dev/docs/kit/adapters) for SvelteKit apps that prerenders your entire site as a collection of static files. It's also possible to create an SPA with it by specifying a fallback page which renders an empty shell. If you'd like to prerender only some pages and not create an SPA for those left out, you will need to use a different adapter together with [the `prerender` option](https://svelte.dev/docs/kit/page-options#prerender). + +## Docs + +[Docs](https://svelte.dev/docs/kit/adapter-static) + +## Changelog + +[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/adapter-static/CHANGELOG.md). + +## License + +[MIT](LICENSE) diff --git a/node_modules/@sveltejs/adapter-static/index.d.ts b/node_modules/@sveltejs/adapter-static/index.d.ts new file mode 100644 index 0000000..101e02f --- /dev/null +++ b/node_modules/@sveltejs/adapter-static/index.d.ts @@ -0,0 +1,11 @@ +import { Adapter } from '@sveltejs/kit'; + +export interface AdapterOptions { + pages?: string; + assets?: string; + fallback?: string; + precompress?: boolean; + strict?: boolean; +} + +export default function plugin(options?: AdapterOptions): Adapter; diff --git a/node_modules/@sveltejs/adapter-static/index.js b/node_modules/@sveltejs/adapter-static/index.js new file mode 100644 index 0000000..cfeb7fb --- /dev/null +++ b/node_modules/@sveltejs/adapter-static/index.js @@ -0,0 +1,91 @@ +import path from 'node:path'; +import { platforms } from './platforms.js'; + +/** @type {import('./index.js').default} */ +export default function (options) { + return { + name: '@sveltejs/adapter-static', + + async adapt(builder) { + if (!options?.fallback && builder.config.kit.router?.type !== 'hash') { + const dynamic_routes = builder.routes.filter((route) => route.prerender !== true); + if (dynamic_routes.length > 0 && options?.strict !== false) { + const prefix = path.relative('.', builder.config.kit.files.routes); + const has_param_routes = builder.routes.some((route) => route.id.includes('[')); + const config_option = + has_param_routes || JSON.stringify(builder.config.kit.prerender.entries) !== '["*"]' + ? ` - adjust the \`prerender.entries\` config option ${ + has_param_routes + ? '(routes with parameters are not part of entry points by default)' + : '' + } — see https://svelte.dev/docs/kit/configuration#prerender for more info.` + : ''; + + builder.log.error( + `@sveltejs/adapter-static: all routes must be fully prerenderable, but found the following routes that are dynamic: +${dynamic_routes.map((route) => ` - ${path.posix.join(prefix, route.id)}`).join('\n')} + +You have the following options: + - set the \`fallback\` option — see https://svelte.dev/docs/kit/single-page-apps#usage for more info. + - add \`export const prerender = true\` to your root \`+layout.js/.ts\` or \`+layout.server.js/.ts\` file. This will try to prerender all pages. + - add \`export const prerender = true\` to any \`+server.js/ts\` files that are not fetched by page \`load\` functions. +${config_option} + - pass \`strict: false\` to \`adapter-static\` to ignore this error. Only do this if you are sure you don't need the routes in question in your final app, as they will be unavailable. See https://github.com/sveltejs/kit/tree/main/packages/adapter-static#strict for more info. + +If this doesn't help, you may need to use a different adapter. @sveltejs/adapter-static can only be used for sites that don't need a server for dynamic rendering, and can run on just a static file server. +See https://svelte.dev/docs/kit/page-options#prerender for more details` + ); + throw new Error('Encountered dynamic routes'); + } + } + + const platform = platforms.find((platform) => platform.test()); + + if (platform) { + if (options) { + builder.log.warn( + `Detected ${platform.name}. Please remove adapter-static options to enable zero-config mode` + ); + } else { + builder.log.info(`Detected ${platform.name}, using zero-config mode`); + } + } + + const { + // @ts-ignore + pages = 'build', + assets = pages, + fallback, + precompress + } = options ?? platform?.defaults ?? /** @type {import('./index.js').AdapterOptions} */ ({}); + + builder.rimraf(assets); + builder.rimraf(pages); + + builder.generateEnvModule(); + builder.writeClient(assets); + builder.writePrerendered(pages); + + if (fallback) { + await builder.generateFallback(path.join(pages, fallback)); + } + + if (precompress) { + builder.log.minor('Compressing assets and pages'); + if (pages === assets) { + await builder.compress(assets); + } else { + await Promise.all([builder.compress(assets), builder.compress(pages)]); + } + } + + if (pages === assets) { + builder.log(`Wrote site to "${pages}"`); + } else { + builder.log(`Wrote pages to "${pages}" and assets to "${assets}"`); + } + + if (!options) platform?.done(builder); + } + }; +} diff --git a/node_modules/@sveltejs/adapter-static/package.json b/node_modules/@sveltejs/adapter-static/package.json new file mode 100644 index 0000000..68c3954 --- /dev/null +++ b/node_modules/@sveltejs/adapter-static/package.json @@ -0,0 +1,54 @@ +{ + "name": "@sveltejs/adapter-static", + "version": "3.0.8", + "description": "Adapter for SvelteKit apps that prerenders your entire site as a collection of static files", + "keywords": [ + "adapter", + "deploy", + "hosting", + "ssg", + "static site generation", + "svelte", + "sveltekit" + ], + "repository": { + "type": "git", + "url": "https://github.com/sveltejs/kit", + "directory": "packages/adapter-static" + }, + "license": "MIT", + "homepage": "https://svelte.dev", + "type": "module", + "exports": { + ".": { + "types": "./index.d.ts", + "import": "./index.js" + }, + "./package.json": "./package.json" + }, + "types": "index.d.ts", + "files": [ + "index.js", + "index.d.ts", + "platforms.js" + ], + "devDependencies": { + "@playwright/test": "^1.44.1", + "@sveltejs/vite-plugin-svelte": "^5.0.1", + "@types/node": "^18.19.48", + "sirv": "^3.0.0", + "svelte": "^5.2.9", + "typescript": "^5.3.3", + "vite": "^6.0.1", + "@sveltejs/kit": "^2.14.0" + }, + "peerDependencies": { + "@sveltejs/kit": "^2.0.0" + }, + "scripts": { + "lint": "prettier --check .", + "check": "tsc", + "format": "pnpm lint --write", + "test": "pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test" + } +} \ No newline at end of file diff --git a/node_modules/@sveltejs/adapter-static/platforms.js b/node_modules/@sveltejs/adapter-static/platforms.js new file mode 100644 index 0000000..51a6bf0 --- /dev/null +++ b/node_modules/@sveltejs/adapter-static/platforms.js @@ -0,0 +1,76 @@ +import fs from 'node:fs'; +import process from 'node:process'; + +/** + * @typedef {{ + * name: string; + * test: () => boolean; + * defaults: import('./index.js').AdapterOptions; + * done: (builder: import('@sveltejs/kit').Builder) => void; + * }} + * Platform */ + +// This function is duplicated in adapter-vercel +/** @param {import('@sveltejs/kit').Builder} builder */ +function static_vercel_config(builder) { + /** @type {any[]} */ + const prerendered_redirects = []; + + /** @type {Record} */ + const overrides = {}; + + for (const [src, redirect] of builder.prerendered.redirects) { + prerendered_redirects.push({ + src, + headers: { + Location: redirect.location + }, + status: redirect.status + }); + } + + for (const [path, page] of builder.prerendered.pages) { + if (path.endsWith('/') && path !== '/') { + prerendered_redirects.push( + { src: path, dest: path.slice(0, -1) }, + { src: path.slice(0, -1), status: 308, headers: { Location: path } } + ); + + overrides[page.file] = { path: path.slice(1, -1) }; + } else { + overrides[page.file] = { path: path.slice(1) }; + } + } + + return { + version: 3, + routes: [ + ...prerendered_redirects, + { + src: `/${builder.getAppPath()}/immutable/.+`, + headers: { + 'cache-control': 'public, immutable, max-age=31536000' + } + }, + { + handle: 'filesystem' + } + ], + overrides + }; +} + +/** @type {Platform[]} */ +export const platforms = [ + { + name: 'Vercel', + test: () => !!process.env.VERCEL, + defaults: { + pages: '.vercel/output/static' + }, + done: (builder) => { + const config = static_vercel_config(builder); + fs.writeFileSync('.vercel/output/config.json', JSON.stringify(config, null, ' ')); + } + } +]; diff --git a/node_modules/@sveltejs/adapter-vercel/LICENSE b/node_modules/@sveltejs/adapter-vercel/LICENSE new file mode 100644 index 0000000..22efd0c --- /dev/null +++ b/node_modules/@sveltejs/adapter-vercel/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2020 [these people](https://github.com/sveltejs/kit/graphs/contributors) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@sveltejs/adapter-vercel/README.md b/node_modules/@sveltejs/adapter-vercel/README.md new file mode 100644 index 0000000..ce1a3c8 --- /dev/null +++ b/node_modules/@sveltejs/adapter-vercel/README.md @@ -0,0 +1,11 @@ +# adapter-vercel + +A SvelteKit adapter that creates a Vercel app. + +## Docs + +[Docs](https://svelte.dev/docs/kit/adapter-vercel) + +## Changelog + +[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/adapter-vercel/CHANGELOG.md). diff --git a/node_modules/@sveltejs/adapter-vercel/ambient.d.ts b/node_modules/@sveltejs/adapter-vercel/ambient.d.ts new file mode 100644 index 0000000..a106f64 --- /dev/null +++ b/node_modules/@sveltejs/adapter-vercel/ambient.d.ts @@ -0,0 +1,12 @@ +import { RequestContext } from './index.js'; + +declare global { + namespace App { + export interface Platform { + /** + * `context` is only available in Edge Functions + */ + context?: RequestContext; + } + } +} diff --git a/node_modules/@sveltejs/adapter-vercel/files/edge.js b/node_modules/@sveltejs/adapter-vercel/files/edge.js new file mode 100644 index 0000000..f87bb6e --- /dev/null +++ b/node_modules/@sveltejs/adapter-vercel/files/edge.js @@ -0,0 +1,68 @@ +/* eslint-disable n/prefer-global/process -- + Vercel Edge Runtime does not support node:process */ +import { Server } from 'SERVER'; +import { manifest } from 'MANIFEST'; + +const server = new Server(manifest); + +/** @type {HeadersInit | undefined} */ +let read_headers; +if (process.env.VERCEL_AUTOMATION_BYPASS_SECRET) { + read_headers = { + 'x-vercel-protection-bypass': process.env.VERCEL_AUTOMATION_BYPASS_SECRET + }; +} + +/** + * We don't know the origin until we receive a request, but + * that's guaranteed to happen before we call `read` + * @type {string} + */ +let origin; + +const initialized = server.init({ + env: /** @type {Record} */ (process.env), + read: async (file) => { + const url = `${origin}/${file}`; + const response = await fetch(url, { + // we need to add a bypass header if the user has deployment protection enabled + // see https://vercel.com/docs/deployment-protection/methods-to-bypass-deployment-protection/protection-bypass-automation + headers: read_headers + }); + + if (!response.ok) { + if (response.status === 401) { + throw new Error( + `Please enable Protection Bypass for Automation: https://svelte.dev/docs/kit/adapter-vercel#Troubleshooting-Deployment-protection` + ); + } + + // belt and braces — not sure how we could end up here + throw new Error( + `read(...) failed: could not fetch ${url} (${response.status} ${response.statusText})` + ); + } + + return response.body; + } +}); + +/** + * @param {Request} request + * @param {import('../index.js').RequestContext} context + */ +export default async (request, context) => { + if (!origin) { + origin = new URL(request.url).origin; + await initialized; + } + + return server.respond(request, { + getClientAddress() { + return /** @type {string} */ (request.headers.get('x-forwarded-for')); + }, + platform: { + context + } + }); +}; diff --git a/node_modules/@sveltejs/adapter-vercel/files/serverless.js b/node_modules/@sveltejs/adapter-vercel/files/serverless.js new file mode 100644 index 0000000..ea16823 --- /dev/null +++ b/node_modules/@sveltejs/adapter-vercel/files/serverless.js @@ -0,0 +1,45 @@ +import { installPolyfills } from '@sveltejs/kit/node/polyfills'; +import { createReadableStream } from '@sveltejs/kit/node'; +import { Server } from 'SERVER'; +import { manifest } from 'MANIFEST'; +import process from 'node:process'; + +installPolyfills(); + +const server = new Server(manifest); + +await server.init({ + env: /** @type {Record} */ (process.env), + read: createReadableStream +}); + +const DATA_SUFFIX = '/__data.json'; + +export default { + /** + * @param {Request} request + * @returns {Promise} + */ + fetch(request) { + // If this is an ISR request, the requested pathname is encoded + // as a search parameter, so we need to extract it + const url = new URL(request.url); + let pathname = url.searchParams.get('__pathname'); + + if (pathname) { + // Optional routes' pathname replacements look like `/foo/$1/bar` which means we could end up with an url like /foo//bar + pathname = pathname.replace(/\/+/g, '/'); + + url.pathname = pathname + (url.pathname.endsWith(DATA_SUFFIX) ? DATA_SUFFIX : ''); + url.searchParams.delete('__pathname'); + + request = new Request(url, request); + } + + return server.respond(request, { + getClientAddress() { + return /** @type {string} */ (request.headers.get('x-forwarded-for')); + } + }); + } +}; diff --git a/node_modules/@sveltejs/adapter-vercel/index.d.ts b/node_modules/@sveltejs/adapter-vercel/index.d.ts new file mode 100644 index 0000000..49d4308 --- /dev/null +++ b/node_modules/@sveltejs/adapter-vercel/index.d.ts @@ -0,0 +1,161 @@ +import { Adapter } from '@sveltejs/kit'; +import './ambient.js'; + +export default function plugin(config?: Config): Adapter; + +export interface ServerlessConfig { + /** + * Whether to use [Edge Functions](https://vercel.com/docs/concepts/functions/edge-functions) (`'edge'`) or [Serverless Functions](https://vercel.com/docs/concepts/functions/serverless-functions) (`'nodejs18.x'`, `'nodejs20.x'` etc). + * @default Same as the build environment + * @deprecated + */ + runtime?: `nodejs${number}.x`; + /** + * To which regions to deploy the app. A list of regions. + * More info: https://vercel.com/docs/concepts/edge-network/regions + */ + regions?: string[]; + /** + * Maximum execution duration (in seconds) that will be allowed for the Serverless Function. + * Serverless only. + */ + maxDuration?: number; + /** + * Amount of memory (RAM in MB) that will be allocated to the Serverless Function. + * Serverless only. + */ + memory?: number; + /** + * If `true`, this route will always be deployed as its own separate function + */ + split?: boolean; + + /** + * [Incremental Static Regeneration](https://vercel.com/docs/concepts/incremental-static-regeneration/overview) configuration. + * Serverless only. + */ + isr?: + | { + /** + * Expiration time (in seconds) before the cached asset will be re-generated by invoking the Serverless Function. Setting the value to `false` means it will never expire. + */ + expiration: number | false; + /** + * Random token that can be provided in the URL to bypass the cached version of the asset, by requesting the asset + * with a __prerender_bypass= cookie. + * + * Making a `GET` or `HEAD` request with `x-prerender-revalidate: ` will force the asset to be re-validated. + */ + bypassToken?: string; + /** + * List of query string parameter names that will be cached independently. If an empty array, query values are not considered for caching. If undefined each unique query value is cached independently + */ + allowQuery?: string[] | undefined; + } + | false; +} + +type ImageFormat = 'image/avif' | 'image/webp'; + +type RemotePattern = { + protocol?: 'http' | 'https'; + hostname: string; + port?: string; + pathname?: string; +}; + +type ImagesConfig = { + sizes: number[]; + domains: string[]; + remotePatterns?: RemotePattern[]; + minimumCacheTTL?: number; // seconds + formats?: ImageFormat[]; + dangerouslyAllowSVG?: boolean; + contentSecurityPolicy?: string; + contentDispositionType?: string; +}; + +/** @deprecated */ +export interface EdgeConfig { + /** + * Whether to use [Edge Functions](https://vercel.com/docs/concepts/functions/edge-functions) (`'edge'`) or [Serverless Functions](https://vercel.com/docs/concepts/functions/serverless-functions) (`'nodejs18.x'`, `'nodejs20.x'` etc). + */ + runtime?: 'edge'; + /** + * To which regions to deploy the app. A list of regions or `'all'`. + * More info: https://vercel.com/docs/concepts/edge-network/regions + */ + regions?: string[] | 'all'; + /** + * List of packages that should not be bundled into the Edge Function. + * Edge only. + */ + external?: string[]; + /** + * If `true`, this route will always be deployed as its own separate function + */ + split?: boolean; +} + +export type Config = (EdgeConfig | ServerlessConfig) & { + /** + * https://vercel.com/docs/build-output-api/v3/configuration#images + */ + images?: ImagesConfig; +}; + +// we copy the RequestContext interface from `@vercel/edge` because that package can't co-exist with `@types/node`. +// see https://github.com/sveltejs/kit/pull/9280#issuecomment-1452110035 + +/** + * An extension to the standard `Request` object that is passed to every Edge Function. + * + * @example + * ```ts + * import type { RequestContext } from '@vercel/edge'; + * + * export default async function handler(request: Request, ctx: RequestContext): Promise { + * // ctx is the RequestContext + * } + * ``` + */ +export interface RequestContext { + /** + * A method that can be used to keep the function running after a response has been sent. + * This is useful when you have an async task that you want to keep running even after the + * response has been sent and the request has ended. + * + * @example + * + * Sending an internal error to an error tracking service + * + * ```ts + * import type { RequestContext } from '@vercel/edge'; + * + * export async function handleRequest(request: Request, ctx: RequestContext): Promise { + * try { + * return await myFunctionThatReturnsResponse(); + * } catch (e) { + * ctx.waitUntil((async () => { + * // report this error to your error tracking service + * await fetch('https://my-error-tracking-service.com', { + * method: 'POST', + * body: JSON.stringify({ + * stack: e.stack, + * message: e.message, + * name: e.name, + * url: request.url, + * }), + * }); + * })()); + * return new Response('Internal Server Error', { status: 500 }); + * } + * } + * ``` + */ + waitUntil( + /** + * A promise that will be kept alive until it resolves or rejects. + */ promise: Promise + ): void; +} diff --git a/node_modules/@sveltejs/adapter-vercel/index.js b/node_modules/@sveltejs/adapter-vercel/index.js new file mode 100644 index 0000000..20fbb52 --- /dev/null +++ b/node_modules/@sveltejs/adapter-vercel/index.js @@ -0,0 +1,879 @@ +/** @import { BuildOptions } from 'esbuild' */ +import fs from 'node:fs'; +import path from 'node:path'; +import process from 'node:process'; +import { fileURLToPath } from 'node:url'; +import { nodeFileTrace } from '@vercel/nft'; +import esbuild from 'esbuild'; +import { get_pathname, pattern_to_src } from './utils.js'; +import { VERSION } from '@sveltejs/kit'; + +/** + * @template T + * @template {keyof T} K + * @typedef {Partial> & Required>} PartialExcept + */ + +/** + * We use a custom `Builder` type here to support the minimum version of SvelteKit. + * @typedef {PartialExcept} Builder2_4_0 + */ + +const name = '@sveltejs/adapter-vercel'; +const INTERNAL = '![-]'; // this name is guaranteed not to conflict with user routes + +const [kit_major, kit_minor] = VERSION.split('.'); + +const get_default_runtime = () => { + const major = Number(process.version.slice(1).split('.')[0]); + + // If we're building on Vercel, we know that the version will be fine because Vercel + // provides Node (and Vercel won't provide something it doesn't support). + // Also means we're not on the hook for updating the adapter every time a new Node + // version is added to Vercel. + if (!process.env.VERCEL) { + if (major < 18 || major > 22) { + throw new Error( + `Building locally with unsupported Node.js version: ${process.version}. Please use Node 18, 20 or 22 to build your project, or explicitly specify a runtime in your adapter configuration.` + ); + } + + if (major % 2 !== 0) { + throw new Error( + `Unsupported Node.js version: ${process.version}. Please use an even-numbered Node version to build your project, or explicitly specify a runtime in your adapter configuration.` + ); + } + } + + return `nodejs${major}.x`; +}; + +// https://vercel.com/docs/functions/edge-functions/edge-runtime#compatible-node.js-modules +const compatible_node_modules = ['async_hooks', 'events', 'buffer', 'assert', 'util']; + +/** @type {import('./index.js').default} **/ +const plugin = function (defaults = {}) { + if ('edge' in defaults) { + throw new Error("{ edge: true } has been removed in favour of { runtime: 'edge' }"); + } + + return { + name, + /** @param {Builder2_4_0} builder */ + async adapt(builder) { + if (!builder.routes) { + throw new Error( + '@sveltejs/adapter-vercel >=2.x (possibly installed through @sveltejs/adapter-auto) requires @sveltejs/kit version 1.5 or higher. ' + + 'Either downgrade the adapter or upgrade @sveltejs/kit' + ); + } + + const dir = '.vercel/output'; + const tmp = builder.getBuildDirectory('vercel-tmp'); + + builder.rimraf(dir); + builder.rimraf(tmp); + + if (fs.existsSync('vercel.json')) { + const vercel_file = fs.readFileSync('vercel.json', 'utf-8'); + const vercel_config = JSON.parse(vercel_file); + validate_vercel_json(builder, vercel_config); + } + + const files = fileURLToPath(new URL('./files', import.meta.url).href); + + const dirs = { + static: `${dir}/static${builder.config.kit.paths.base}`, + functions: `${dir}/functions` + }; + + builder.log.minor('Copying assets...'); + + builder.writeClient(dirs.static); + builder.writePrerendered(dirs.static); + + const static_config = static_vercel_config(builder, defaults, dirs.static); + + builder.log.minor('Generating serverless function...'); + + /** + * @param {string} name + * @param {import('./index.js').ServerlessConfig} config + * @param {import('@sveltejs/kit').RouteDefinition[]} routes + */ + async function generate_serverless_function(name, config, routes) { + const dir = `${dirs.functions}/${name}.func`; + + const relativePath = path.posix.relative(tmp, builder.getServerDirectory()); + builder.copy(`${files}/serverless.js`, `${tmp}/index.js`, { + replace: { + SERVER: `${relativePath}/index.js`, + MANIFEST: './manifest.js' + } + }); + if (builder.hasServerInstrumentationFile?.()) { + builder.instrument?.({ + entrypoint: `${tmp}/index.js`, + instrumentation: `${builder.getServerDirectory()}/instrumentation.server.js` + }); + } + + write( + `${tmp}/manifest.js`, + `export const manifest = ${builder.generateManifest({ relativePath, routes })};\n` + ); + + await create_function_bundle(builder, `${tmp}/index.js`, dir, config); + + for (const asset of builder.findServerAssets(routes)) { + // TODO use symlinks, once Build Output API supports doing so + builder.copy(`${builder.getServerDirectory()}/${asset}`, `${dir}/${asset}`); + } + } + + let warned = false; + + /** + * @param {string} name + * @param {import('./index.js').EdgeConfig} config + * @param {import('@sveltejs/kit').RouteDefinition[]} routes + */ + async function generate_edge_function(name, config, routes) { + if (!warned) { + warned = true; + builder.log.warn( + `The \`runtime: 'edge'\` option is deprecated, and will be removed in a future version of adapter-vercel` + ); + } + + const tmp = builder.getBuildDirectory(`vercel-tmp/${name}`); + const relativePath = path.posix.relative(tmp, builder.getServerDirectory()); + + builder.copy(`${files}/edge.js`, `${tmp}/edge.js`, { + replace: { + SERVER: `${relativePath}/index.js`, + MANIFEST: './manifest.js' + } + }); + + write( + `${tmp}/manifest.js`, + `export const manifest = ${builder.generateManifest({ relativePath, routes })};\n` + ); + + try { + const outdir = `${dirs.functions}/${name}.func`; + /** @type {BuildOptions} */ + const esbuild_config = { + // minimum Node.js version supported is v14.6.0 that is mapped to ES2019 + // https://edge-runtime.vercel.app/features/polyfills + // TODO verify the latest ES version the edge runtime supports + target: 'es2020', + bundle: true, + platform: 'browser', + conditions: [ + // Vercel's Edge runtime key https://runtime-keys.proposal.wintercg.org/#edge-light + 'edge-light', + // re-include these since they are included by default when no conditions are specified + // https://esbuild.github.io/api/#conditions + 'module' + ], + format: 'esm', + external: [ + ...compatible_node_modules, + ...compatible_node_modules.map((id) => `node:${id}`), + ...(config.external || []) + ], + sourcemap: 'linked', + banner: { js: 'globalThis.global = globalThis;' }, + loader: { + '.wasm': 'copy', + '.woff': 'copy', + '.woff2': 'copy', + '.ttf': 'copy', + '.eot': 'copy', + '.otf': 'copy' + } + }; + const result = await esbuild.build({ + entryPoints: [`${tmp}/edge.js`], + outfile: `${outdir}/index.js`, + ...esbuild_config + }); + + let instrumentation_result; + if (builder.hasServerInstrumentationFile?.()) { + instrumentation_result = await esbuild.build({ + entryPoints: [`${builder.getServerDirectory()}/instrumentation.server.js`], + outfile: `${outdir}/instrumentation.server.js`, + ...esbuild_config + }); + + builder.instrument?.({ + entrypoint: `${outdir}/index.js`, + instrumentation: `${outdir}/instrumentation.server.js`, + module: { + generateText: generate_traced_edge_module + } + }); + } + + const warnings = instrumentation_result + ? [...result.warnings, ...instrumentation_result.warnings] + : result.warnings; + + if (warnings.length > 0) { + const formatted = await esbuild.formatMessages(warnings, { + kind: 'warning', + color: true + }); + + console.error(formatted.join('\n')); + } + } catch (err) { + const error = /** @type {import('esbuild').BuildFailure} */ (err); + for (const e of error.errors) { + for (const node of e.notes) { + const match = + /The package "(.+)" wasn't found on the file system but is built into node/.exec( + node.text + ); + + if (match) { + node.text = `Cannot use "${match[1]}" when deploying to Vercel Edge Functions.`; + } + } + } + + const formatted = await esbuild.formatMessages(error.errors, { + kind: 'error', + color: true + }); + + console.error(formatted.join('\n')); + + throw new Error( + `Bundling with esbuild failed with ${error.errors.length} ${ + error.errors.length === 1 ? 'error' : 'errors' + }` + ); + } + + write( + `${dirs.functions}/${name}.func/.vc-config.json`, + JSON.stringify( + { + runtime: config.runtime, + regions: config.regions, + entrypoint: 'index.js', + framework: { + slug: 'sveltekit', + version: VERSION + } + }, + null, + '\t' + ) + ); + } + + /** @type {Map[] }>} */ + const groups = new Map(); + + /** @type {Map} */ + const conflicts = new Map(); + + /** @type {Map} */ + const functions = new Map(); + + /** @type {Map, { expiration: number | false, bypassToken: string | undefined, allowQuery: string[], group: number, passQuery: true }>} */ + const isr_config = new Map(); + + /** @type {Set} */ + const ignored_isr = new Set(); + + // group routes by config + for (const route of builder.routes) { + const runtime = route.config?.runtime ?? defaults?.runtime ?? get_default_runtime(); + const config = { runtime, ...defaults, ...route.config }; + + if (is_prerendered(route)) { + if (config.isr) { + ignored_isr.add(route.id); + } + continue; + } + + const node_runtime = /nodejs([0-9]+)\.x/.exec(runtime); + if (runtime !== 'edge' && (!node_runtime || parseInt(node_runtime[1]) < 18)) { + throw new Error( + `Invalid runtime '${runtime}' for route ${route.id}. Valid runtimes are 'edge' and 'nodejs18.x' or higher ` + + '(see the Node.js Version section in your Vercel project settings for info on the currently supported versions).' + ); + } + + if (config.isr) { + const directory = path.relative('.', builder.config.kit.files.routes + route.id); + + if (!runtime.startsWith('nodejs')) { + throw new Error( + `${directory}: Routes using \`isr\` must use a Node.js runtime (for example 'nodejs20.x')` + ); + } + + if (config.isr.allowQuery?.includes('__pathname')) { + throw new Error( + `${directory}: \`__pathname\` is a reserved query parameter for \`isr.allowQuery\`` + ); + } + + isr_config.set(route, { + expiration: config.isr.expiration, + bypassToken: config.isr.bypassToken, + allowQuery: ['__pathname', ...(config.isr.allowQuery ?? [])], + group: isr_config.size + 1, + passQuery: true + }); + } + + const hash = hash_config(config); + + // first, check there are no routes with incompatible configs that will be merged + const pattern = route.pattern.toString(); + const existing = conflicts.get(pattern); + if (existing) { + if (existing.hash !== hash) { + throw new Error( + `The ${route.id} and ${existing.route_id} routes must be merged into a single function that matches the ${route.pattern} regex, but they have incompatible configs. You must either rename one of the routes, or make their configs match.` + ); + } + } else { + conflicts.set(pattern, { hash, route_id: route.id }); + } + + // then, create a group for each config + const id = config.split ? `${hash}-${groups.size}` : hash; + let group = groups.get(id); + if (!group) { + group = { i: groups.size, config, routes: [] }; + groups.set(id, group); + } + + group.routes.push(route); + } + + if (ignored_isr.size) { + builder.log.warn( + '\nWarning: The following routes have an ISR config which is ignored because the route is prerendered:' + ); + + for (const ignored of ignored_isr) { + console.log(` - ${ignored}`); + } + + console.log( + 'Either remove the "prerender" option from these routes to use ISR, or remove the ISR config.\n' + ); + } + + const singular = groups.size === 1; + + for (const group of groups.values()) { + const generate_function = + group.config.runtime === 'edge' ? generate_edge_function : generate_serverless_function; + + // generate one function for the group + const name = singular ? `${INTERNAL}/catchall` : `${INTERNAL}/${group.i}`; + + await generate_function( + name, + /** @type {any} */ (group.config), + /** @type {import('@sveltejs/kit').RouteDefinition[]} */ (group.routes) + ); + + for (const route of group.routes) { + functions.set(route.pattern.toString(), name); + } + } + + if (!singular) { + // we need to create a catch-all route so that 404s are handled + // by SvelteKit rather than Vercel + + const runtime = defaults.runtime ?? get_default_runtime(); + const generate_function = + runtime === 'edge' ? generate_edge_function : generate_serverless_function; + + await generate_function( + `${INTERNAL}/catchall`, + /** @type {any} */ ({ runtime, ...defaults }), + [] + ); + } + + for (const route of builder.routes) { + if (is_prerendered(route)) continue; + + const pattern = route.pattern.toString(); + const src = pattern_to_src(pattern); + const name = functions.get(pattern); + + const isr = isr_config.get(route); + if (isr) { + const isr_name = route.id.slice(1) || '__root__'; // should we check that __root__ isn't a route? + const base = `${dirs.functions}/${isr_name}`; + builder.mkdirp(base); + + const target = `${dirs.functions}/${name}.func`; + const relative = path.relative(path.dirname(base), target); + + // create a symlink to the actual function, but use the + // route name so that we can derive the correct URL + fs.symlinkSync(relative, `${base}.func`); + fs.symlinkSync(`../${relative}`, `${base}/__data.json.func`); + + const pathname = get_pathname(route); + const json = JSON.stringify(isr, null, '\t'); + + write(`${base}.prerender-config.json`, json); + write(`${base}/__data.json.prerender-config.json`, json); + + const q = `?__pathname=/${pathname}`; + + static_config.routes.push({ + src: src + '$', + dest: `/${isr_name}${q}` + }); + + static_config.routes.push({ + src: src + '/__data.json$', + dest: `/${isr_name}/__data.json${q}` + }); + } else { + // Create a symlink for each route to the main function for better observability + // (without this, every request appears to go through `/![-]`) + + // Use 'index' for the root route's filesystem representation + // Use an empty string ('') for the root route's destination name part in Vercel config + const is_root = route.id === '/'; + const route_fs_name = is_root ? 'index' : route.id.slice(1); + const route_dest_name = is_root ? '' : route.id.slice(1); + + // Define paths using path.join for safety + const base_dir = path.join(dirs.functions, route_fs_name); // e.g., .vercel/output/functions/index + // The main symlink should be named based on the route, adjacent to its potential directory + const main_symlink_path = `${base_dir}.func`; // e.g., .vercel/output/functions/index.func + // The data symlink goes inside the directory + const data_symlink_path = path.join(base_dir, '__data.json.func'); // e.g., .vercel/output/functions/index/__data.json.func + + const target = path.join(dirs.functions, `${name}.func`); // The actual function directory e.g., .vercel/output/functions/![-].func + + // Ensure the directory for the data endpoint symlink exists (e.g., functions/index/) + builder.mkdirp(base_dir); + + // Calculate relative paths FROM the directory containing the symlink TO the target + const relative_for_main = path.relative(path.dirname(main_symlink_path), target); + const relative_for_data = path.relative(path.dirname(data_symlink_path), target); // This is path.relative(base_dir, target) + + // Create symlinks + fs.symlinkSync(relative_for_main, main_symlink_path); // Creates functions/index.func -> ![-].func + fs.symlinkSync(relative_for_data, data_symlink_path); // Creates functions/index/__data.json.func -> ../![-].func + + // Add route to the config + static_config.routes.push({ + src: src + '(?:/__data.json)?$', // Matches the incoming request path + dest: `/${route_dest_name}` // Maps to the function: '/' for root, '/about' for about, etc. + // Vercel uses this dest to find the corresponding .func dir/symlink + }); + } + } + + // optional chaining to support older versions that don't have this setting yet + if (builder.config.kit.router?.resolution === 'server') { + // Create a separate edge function just for server-side route resolution. + // By omitting all routes we're ensuring it's small (the routes will still be available + // to the route resolution, because it does not rely on the server routing manifest) + await generate_edge_function( + `${builder.config.kit.appDir}/route`, + { + external: 'external' in defaults ? defaults.external : undefined, + runtime: 'edge' + }, + [] + ); + + static_config.routes.push({ + src: `${builder.config.kit.paths.base}/(|.+/)__route\\.js`, + dest: `${builder.config.kit.paths.base}/${builder.config.kit.appDir}/route` + }); + } + + // Catch-all route must come at the end, otherwise it will swallow all other routes, + // including ISR aliases if there is only one function + static_config.routes.push({ src: '/.*', dest: `/${INTERNAL}/catchall` }); + + builder.log.minor('Writing routes...'); + + write(`${dir}/config.json`, JSON.stringify(static_config, null, '\t')); + }, + + supports: { + read: ({ config, route }) => { + const runtime = config.runtime ?? defaults.runtime; + + // TODO bump peer dep in next adapter major to simplify this + if (runtime === 'edge' && kit_major === '2' && kit_minor < '25') { + throw new Error( + `${name}: Cannot use \`read\` from \`$app/server\` in route \`${route.id}\` configured with \`runtime: 'edge'\` and SvelteKit < 2.25.0` + ); + } + + return true; + }, + instrumentation: () => true + } + }; +}; + +/** @param {import('./index.js').EdgeConfig & import('./index.js').ServerlessConfig} config */ +function hash_config(config) { + return [ + config.runtime ?? '', + config.external ?? '', + config.regions ?? '', + config.memory ?? '', + config.maxDuration ?? '', + !!config.isr // need to distinguish ISR from non-ISR functions, because ISR functions can't use streaming mode + ].join('/'); +} + +/** + * @param {string} file + * @param {string} data + */ +function write(file, data) { + try { + fs.mkdirSync(path.dirname(file), { recursive: true }); + } catch { + // do nothing + } + + fs.writeFileSync(file, data); +} + +// This function is duplicated in adapter-static +/** + * @param {Builder2_4_0} builder + * @param {import('./index.js').Config} config + * @param {string} dir + */ +function static_vercel_config(builder, config, dir) { + /** @type {any[]} */ + const prerendered_redirects = []; + + /** @type {Record} */ + const overrides = {}; + + /** @type {import('./index.js').ImagesConfig | undefined} */ + const images = config.images; + + for (let [src, redirect] of builder.prerendered.redirects) { + if (src.replace(/\/$/, '') === redirect.location.replace(/\/$/, '')) { + // ignore the extreme edge case of a `/foo` -> `/foo/` redirect, + // which would only arise if the response was generated by a + // `handle` hook or outside the app altogether (since you + // can't declaratively create both routes) + } else { + // redirect both `/foo` and `/foo/` to `redirect.location` + src = src.replace(/\/?$/, '/?'); + } + + prerendered_redirects.push({ + src, + headers: { + Location: redirect.location + }, + status: redirect.status + }); + } + + for (const [path, page] of builder.prerendered.pages) { + let overrides_path = path.slice(1); + + if (path !== '/') { + /** @type {string | undefined} */ + let counterpart_route = path + '/'; + + if (path.endsWith('/')) { + counterpart_route = path.slice(0, -1); + overrides_path = path.slice(1, -1); + } + + prerendered_redirects.push( + { src: path, dest: counterpart_route }, + { src: counterpart_route, status: 308, headers: { Location: path } } + ); + } + + overrides[page.file] = { path: overrides_path }; + } + + const routes = [ + ...prerendered_redirects, + { + src: `/${builder.getAppPath()}/immutable/.+`, + headers: { + 'cache-control': 'public, immutable, max-age=31536000' + } + } + ]; + + // https://vercel.com/docs/deployments/skew-protection + if (process.env.VERCEL_SKEW_PROTECTION_ENABLED) { + routes.push({ + src: '/.*', + has: [ + { + type: 'header', + key: 'Sec-Fetch-Dest', + value: 'document' + } + ], + headers: { + 'Set-Cookie': `__vdpl=${process.env.VERCEL_DEPLOYMENT_ID}; Path=${builder.config.kit.paths.base}/; SameSite=Strict; Secure; HttpOnly` + }, + continue: true + }); + + // this is a dreadful hack that is necessary until the Vercel Build Output API + // allows you to set multiple cookies for a single route. essentially, since we + // know that the entry file will be requested immediately, we can set the second + // cookie in _that_ response rather than the document response + const base = `${dir}/${builder.config.kit.appDir}/immutable/entry`; + const entry = fs.readdirSync(base).find((file) => file.startsWith('start.')); + + if (!entry) { + throw new Error('Could not find entry point'); + } + + routes.splice(-2, 0, { + src: `/${builder.getAppPath()}/immutable/entry/${entry}`, + headers: { + 'Set-Cookie': `__vdpl=; Path=/${builder.getAppPath()}/version.json; SameSite=Strict; Secure; HttpOnly` + }, + continue: true + }); + } + + routes.push({ + handle: 'filesystem' + }); + + return { + version: 3, + routes, + overrides, + images + }; +} + +/** + * @param {Builder2_4_0} builder + * @param {string} entry + * @param {string} dir + * @param {import('./index.js').ServerlessConfig} config + */ +async function create_function_bundle(builder, entry, dir, config) { + fs.rmSync(dir, { force: true, recursive: true }); + + let base = entry; + while (base !== (base = path.dirname(base))); + + const traced = await nodeFileTrace([entry], { base }); + + /** @type {Map} */ + const resolution_failures = new Map(); + + traced.warnings.forEach((error) => { + // pending https://github.com/vercel/nft/issues/284 + if (error.message.startsWith('Failed to resolve dependency node:')) return; + + // parse errors are likely not js and can safely be ignored, + // such as this html file in "main" meant for nw instead of node: + // https://github.com/vercel/nft/issues/311 + if (error.message.startsWith('Failed to parse')) return; + + if (error.message.startsWith('Failed to resolve dependency')) { + const match = /Cannot find module '(.+?)' loaded from (.+)/; + const [, module, importer] = match.exec(error.message) ?? [, error.message, '(unknown)']; + + if (!resolution_failures.has(importer)) { + resolution_failures.set(importer, []); + } + + /** @type {string[]} */ (resolution_failures.get(importer)).push(module); + } else { + throw error; + } + }); + + if (resolution_failures.size > 0) { + const cwd = process.cwd(); + builder.log.warn( + 'Warning: The following modules failed to locate dependencies that may (or may not) be required for your app to work:' + ); + + for (const [importer, modules] of resolution_failures) { + console.error(` ${path.relative(cwd, importer)}`); + for (const module of modules) { + console.error(` - \u001B[1m\u001B[36m${module}\u001B[39m\u001B[22m`); + } + } + } + + const files = Array.from(traced.fileList); + + // find common ancestor directory + /** @type {string[]} */ + let common_parts = files[0]?.split(path.sep) ?? []; + + for (let i = 1; i < files.length; i += 1) { + const file = files[i]; + const parts = file.split(path.sep); + + for (let j = 0; j < common_parts.length; j += 1) { + if (parts[j] !== common_parts[j]) { + common_parts = common_parts.slice(0, j); + break; + } + } + } + + const ancestor = base + common_parts.join(path.sep); + + for (const file of traced.fileList) { + const source = base + file; + const dest = path.join(dir, path.relative(ancestor, source)); + + const stats = fs.statSync(source); + const is_dir = stats.isDirectory(); + + const realpath = fs.realpathSync(source); + + try { + fs.mkdirSync(path.dirname(dest), { recursive: true }); + } catch { + // do nothing + } + + if (source !== realpath) { + const realdest = path.join(dir, path.relative(ancestor, realpath)); + fs.symlinkSync(path.relative(path.dirname(dest), realdest), dest, is_dir ? 'dir' : 'file'); + } else if (!is_dir) { + fs.copyFileSync(source, dest); + } + } + + write( + `${dir}/.vc-config.json`, + JSON.stringify( + { + runtime: config.runtime, + regions: config.regions, + memory: config.memory, + maxDuration: config.maxDuration, + handler: path.relative(base + ancestor, entry), + launcherType: 'Nodejs', + experimentalResponseStreaming: !config.isr, + framework: { + slug: 'sveltekit', + version: VERSION + } + }, + null, + '\t' + ) + ); + + write(`${dir}/package.json`, JSON.stringify({ type: 'module' })); +} + +/** + * + * @param {Builder2_4_0} builder + * @param {any} vercel_config + */ +function validate_vercel_json(builder, vercel_config) { + if (builder.routes.length > 0 && !builder.routes[0].api) { + // bail — we're on an older SvelteKit version that doesn't + // populate `route.api.methods`, so we can't check + // to see if cron paths are valid + return; + } + + const crons = /** @type {Array} */ ( + Array.isArray(vercel_config?.crons) ? vercel_config.crons : [] + ); + + /** For a route to be considered 'valid', it must be an API route with a GET handler */ + const valid_routes = builder.routes.filter((route) => route.api.methods.includes('GET')); + + /** @type {Array} */ + const unmatched_paths = []; + + for (const cron of crons) { + if (typeof cron !== 'object' || cron === null || !('path' in cron)) { + continue; + } + + const { path } = cron; + if (typeof path !== 'string') { + continue; + } + + if (!valid_routes.some((route) => route.pattern.test(path))) { + unmatched_paths.push(path); + } + } + + if (unmatched_paths.length) { + builder.log.warn( + '\nWarning: vercel.json defines cron tasks that use paths that do not correspond to an API route with a GET handler (ignore this if the request is handled in your `handle` hook):' + ); + + for (const path of unmatched_paths) { + console.log(` - ${path}`); + } + + console.log(''); + } +} + +/** @param {import('@sveltejs/kit').RouteDefinition} route */ +function is_prerendered(route) { + return ( + route.prerender === true || + (route.prerender === 'auto' && route.segments.every((segment) => !segment.dynamic)) + ); +} + +/** + * @param {{ instrumentation: string; start: string }} opts + */ +function generate_traced_edge_module({ instrumentation, start }) { + return `\ +import './${instrumentation}'; +const promise = import('./${start}'); + +/** + * @param {import('http').IncomingMessage} req + * @param {import('http').ServerResponse} res + */ +export default async (req, res) => { + const { default: handler } = await promise; + return handler(req, res); +} +`; +} + +export default plugin; diff --git a/node_modules/@sveltejs/adapter-vercel/package.json b/node_modules/@sveltejs/adapter-vercel/package.json new file mode 100644 index 0000000..fdf0ccd --- /dev/null +++ b/node_modules/@sveltejs/adapter-vercel/package.json @@ -0,0 +1,56 @@ +{ + "name": "@sveltejs/adapter-vercel", + "version": "5.10.2", + "description": "A SvelteKit adapter that creates a Vercel app", + "keywords": [ + "adapter", + "deploy", + "hosting", + "svelte", + "sveltekit", + "vercel" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/sveltejs/kit.git", + "directory": "packages/adapter-vercel" + }, + "license": "MIT", + "homepage": "https://svelte.dev", + "type": "module", + "exports": { + ".": { + "types": "./index.d.ts", + "import": "./index.js" + }, + "./package.json": "./package.json" + }, + "types": "index.d.ts", + "files": [ + "files", + "index.js", + "utils.js", + "index.d.ts", + "ambient.d.ts" + ], + "dependencies": { + "@vercel/nft": "^0.30.0", + "esbuild": "^0.25.4" + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^6.0.0-next.3", + "@types/node": "^18.19.119", + "typescript": "^5.3.3", + "vitest": "^3.2.3", + "@sveltejs/kit": "^2.33.1" + }, + "peerDependencies": { + "@sveltejs/kit": "^2.4.0" + }, + "scripts": { + "lint": "prettier --check .", + "format": "pnpm lint --write", + "check": "tsc", + "test": "vitest run" + } +} \ No newline at end of file diff --git a/node_modules/@sveltejs/adapter-vercel/utils.js b/node_modules/@sveltejs/adapter-vercel/utils.js new file mode 100644 index 0000000..a41a9cb --- /dev/null +++ b/node_modules/@sveltejs/adapter-vercel/utils.js @@ -0,0 +1,69 @@ +/** @param {import("@sveltejs/kit").RouteDefinition} route */ +export function get_pathname(route) { + let i = 1; + + const pathname = route.segments + .map((segment) => { + if (!segment.dynamic) { + return '/' + segment.content; + } + + const parts = segment.content.split(/\[(.+?)\](?!\])/); + let result = ''; + + if ( + parts.length === 3 && + !parts[0] && + !parts[2] && + (parts[1].startsWith('...') || parts[1][0] === '[') + ) { + // Special case: segment is a single optional or rest parameter. + // In that case we don't prepend a slash (also see comment in pattern_to_src). + result = `$${i++}`; + } else { + result = + '/' + + parts + .map((content, j) => { + if (j % 2) { + return `$${i++}`; + } else { + return content; + } + }) + .join(''); + } + + return result; + }) + .join(''); + + return pathname[0] === '/' ? pathname.slice(1) : pathname; +} + +/** + * Adjusts the stringified route regex for Vercel's routing system + * @param {string} pattern stringified route regex + */ +export function pattern_to_src(pattern) { + let src = pattern + // remove leading / and trailing $/ + .slice(1, -2) + // replace escaped \/ with / + .replace(/\\\//g, '/'); + + // replace the root route "^/" with "^/?" + if (src === '^/') { + src = '^/?'; + } + + // Move non-capturing groups that swallow slashes into their following capturing groups. + // This is necessary because during ISR we're using the regex to construct the __pathname + // query parameter: In case of a route like [required]/[...rest] we need to turn them + // into $1$2 and not $1/$2, because if [...rest] is empty, we don't want to have a trailing + // slash in the __pathname query parameter which wasn't there in the original URL, as that + // could result in a false trailing slash redirect in the SvelteKit runtime, leading to infinite redirects. + src = src.replace(/\(\?:\/\((.+?)\)\)/g, '(/$1)'); + + return src; +} diff --git a/node_modules/@sveltejs/kit/LICENSE b/node_modules/@sveltejs/kit/LICENSE new file mode 100644 index 0000000..22efd0c --- /dev/null +++ b/node_modules/@sveltejs/kit/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2020 [these people](https://github.com/sveltejs/kit/graphs/contributors) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@sveltejs/kit/README.md b/node_modules/@sveltejs/kit/README.md new file mode 100644 index 0000000..f5592f9 --- /dev/null +++ b/node_modules/@sveltejs/kit/README.md @@ -0,0 +1,18 @@ +# The fastest way to build Svelte apps + +This is the [SvelteKit](https://svelte.dev/docs/kit) framework and CLI. + +The quickest way to get started is via the [sv](https://npmjs.com/package/sv) package: + +```bash +npx sv create my-app +cd my-app +npm install +npm run dev +``` + +See the [documentation](https://svelte.dev/docs/kit) to learn more. + +## Changelog + +[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/kit/CHANGELOG.md). diff --git a/node_modules/@sveltejs/kit/package.json b/node_modules/@sveltejs/kit/package.json new file mode 100644 index 0000000..5f4024b --- /dev/null +++ b/node_modules/@sveltejs/kit/package.json @@ -0,0 +1,106 @@ +{ + "name": "@sveltejs/kit", + "version": "2.21.1", + "description": "SvelteKit is the fastest way to build Svelte apps", + "keywords": [ + "framework", + "official", + "svelte", + "sveltekit", + "vite" + ], + "repository": { + "type": "git", + "url": "https://github.com/sveltejs/kit", + "directory": "packages/kit" + }, + "license": "MIT", + "homepage": "https://svelte.dev", + "type": "module", + "dependencies": { + "@sveltejs/acorn-typescript": "^1.0.5", + "@types/cookie": "^0.6.0", + "acorn": "^8.14.1", + "cookie": "^0.6.0", + "devalue": "^5.1.0", + "esm-env": "^1.2.2", + "kleur": "^4.1.5", + "magic-string": "^0.30.5", + "mrmime": "^2.0.0", + "sade": "^1.8.1", + "set-cookie-parser": "^2.6.0", + "sirv": "^3.0.0" + }, + "devDependencies": { + "@playwright/test": "^1.51.1", + "@sveltejs/vite-plugin-svelte": "^5.0.1", + "@types/connect": "^3.4.38", + "@types/node": "^18.19.48", + "@types/set-cookie-parser": "^2.4.7", + "dts-buddy": "^0.6.1", + "rollup": "^4.14.2", + "svelte": "^5.23.1", + "svelte-preprocess": "^6.0.0", + "typescript": "^5.3.3", + "vite": "^6.2.7", + "vitest": "^3.1.1" + }, + "peerDependencies": { + "@sveltejs/vite-plugin-svelte": "^3.0.0 || ^4.0.0-next.1 || ^5.0.0", + "svelte": "^4.0.0 || ^5.0.0-next.0", + "vite": "^5.0.3 || ^6.0.0" + }, + "bin": { + "svelte-kit": "svelte-kit.js" + }, + "files": [ + "src", + "!src/**/*.spec.js", + "!src/core/**/fixtures", + "!src/core/**/test", + "types", + "svelte-kit.js" + ], + "exports": { + "./package.json": "./package.json", + ".": { + "types": "./types/index.d.ts", + "import": "./src/exports/index.js" + }, + "./node": { + "types": "./types/index.d.ts", + "import": "./src/exports/node/index.js" + }, + "./node/polyfills": { + "types": "./types/index.d.ts", + "import": "./src/exports/node/polyfills.js" + }, + "./hooks": { + "types": "./types/index.d.ts", + "import": "./src/exports/hooks/index.js" + }, + "./vite": { + "types": "./types/index.d.ts", + "import": "./src/exports/vite/index.js" + } + }, + "types": "types/index.d.ts", + "engines": { + "node": ">=18.13" + }, + "scripts": { + "lint": "prettier --config ../../.prettierrc --check .", + "check": "tsc && cd ./test/types && tsc", + "check:all": "tsc && pnpm -r --filter=\"./**\" check", + "format": "prettier --config ../../.prettierrc --write .", + "test": "pnpm test:unit && pnpm test:integration", + "test:integration": "pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test", + "test:cross-platform:dev": "pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test:cross-platform:dev", + "test:cross-platform:build": "pnpm test:unit && pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test:cross-platform:build", + "test:server-side-route-resolution:dev": "pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test:server-side-route-resolution:dev", + "test:server-side-route-resolution:build": "pnpm test:unit && pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test:server-side-route-resolution:build", + "test:unit": "vitest --config kit.vitest.config.js run", + "generate:version": "node scripts/generate-version.js", + "generate:types": "node scripts/generate-dts.js" + } +} \ No newline at end of file diff --git a/node_modules/@sveltejs/kit/src/cli.js b/node_modules/@sveltejs/kit/src/cli.js new file mode 100644 index 0000000..1ebb020 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/cli.js @@ -0,0 +1,45 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import process from 'node:process'; +import colors from 'kleur'; +import sade from 'sade'; +import { load_config } from './core/config/index.js'; +import { coalesce_to_error } from './utils/error.js'; + +/** @param {unknown} e */ +function handle_error(e) { + const error = coalesce_to_error(e); + + if (error.name === 'SyntaxError') throw error; + + console.error(colors.bold().red(`> ${error.message}`)); + if (error.stack) { + console.error(colors.gray(error.stack.split('\n').slice(1).join('\n'))); + } + + process.exit(1); +} + +const pkg = JSON.parse(fs.readFileSync(new URL('../package.json', import.meta.url), 'utf-8')); +const prog = sade('svelte-kit').version(pkg.version); + +prog + .command('sync') + .describe('Synchronise generated type definitions') + .option('--mode', 'Specify a mode for loading environment variables', 'development') + .action(async ({ mode }) => { + if (!fs.existsSync('svelte.config.js')) { + console.warn(`Missing ${path.resolve('svelte.config.js')} — skipping`); + return; + } + + try { + const config = await load_config(); + const sync = await import('./core/sync/sync.js'); + sync.all_types(config, mode); + } catch (error) { + handle_error(error); + } + }); + +prog.parse(process.argv, { unknown: (arg) => `Unknown option: ${arg}` }); diff --git a/node_modules/@sveltejs/kit/src/constants.js b/node_modules/@sveltejs/kit/src/constants.js new file mode 100644 index 0000000..7790ab1 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/constants.js @@ -0,0 +1,11 @@ +/** + * A fake asset path used in `vite dev` and `vite preview`, so that we can + * serve local assets while verifying that requests are correctly prefixed + */ +export const SVELTE_KIT_ASSETS = '/_svelte_kit_assets'; + +export const GENERATED_COMMENT = '// this file is generated — do not edit it\n'; + +export const ENDPOINT_METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS', 'HEAD']; + +export const PAGE_METHODS = ['GET', 'POST', 'HEAD']; diff --git a/node_modules/@sveltejs/kit/src/core/adapt/builder.js b/node_modules/@sveltejs/kit/src/core/adapt/builder.js new file mode 100644 index 0000000..855a263 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/adapt/builder.js @@ -0,0 +1,251 @@ +import colors from 'kleur'; +import { createReadStream, createWriteStream, existsSync, statSync } from 'node:fs'; +import { extname, resolve } from 'node:path'; +import { pipeline } from 'node:stream'; +import { promisify } from 'node:util'; +import zlib from 'node:zlib'; +import { copy, rimraf, mkdirp } from '../../utils/filesystem.js'; +import { generate_manifest } from '../generate_manifest/index.js'; +import { get_route_segments } from '../../utils/routing.js'; +import { get_env } from '../../exports/vite/utils.js'; +import generate_fallback from '../postbuild/fallback.js'; +import { write } from '../sync/utils.js'; +import { list_files } from '../utils.js'; +import { find_server_assets } from '../generate_manifest/find_server_assets.js'; + +const pipe = promisify(pipeline); +const extensions = ['.html', '.js', '.mjs', '.json', '.css', '.svg', '.xml', '.wasm']; + +/** + * Creates the Builder which is passed to adapters for building the application. + * @param {{ + * config: import('types').ValidatedConfig; + * build_data: import('types').BuildData; + * server_metadata: import('types').ServerMetadata; + * route_data: import('types').RouteData[]; + * prerendered: import('types').Prerendered; + * prerender_map: import('types').PrerenderMap; + * log: import('types').Logger; + * vite_config: import('vite').ResolvedConfig; + * }} opts + * @returns {import('@sveltejs/kit').Builder} + */ +export function create_builder({ + config, + build_data, + server_metadata, + route_data, + prerendered, + prerender_map, + log, + vite_config +}) { + /** @type {Map} */ + const lookup = new Map(); + + /** + * Rather than exposing the internal `RouteData` type, which is subject to change, + * we expose a stable type that adapters can use to group/filter routes + */ + const routes = route_data.map((route) => { + const { config, methods, page, api } = /** @type {import('types').ServerMetadataRoute} */ ( + server_metadata.routes.get(route.id) + ); + + /** @type {import('@sveltejs/kit').RouteDefinition} */ + const facade = { + id: route.id, + api, + page, + segments: get_route_segments(route.id).map((segment) => ({ + dynamic: segment.includes('['), + rest: segment.includes('[...'), + content: segment + })), + pattern: route.pattern, + prerender: prerender_map.get(route.id) ?? false, + methods, + config + }; + + lookup.set(facade, route); + + return facade; + }); + + return { + log, + rimraf, + mkdirp, + copy, + + config, + prerendered, + routes, + + async compress(directory) { + if (!existsSync(directory)) { + return; + } + + const files = list_files(directory, (file) => extensions.includes(extname(file))).map( + (file) => resolve(directory, file) + ); + + await Promise.all( + files.flatMap((file) => [compress_file(file, 'gz'), compress_file(file, 'br')]) + ); + }, + + async createEntries(fn) { + const seen = new Set(); + + for (let i = 0; i < route_data.length; i += 1) { + const route = route_data[i]; + if (prerender_map.get(route.id) === true) continue; + const { id, filter, complete } = fn(routes[i]); + + if (seen.has(id)) continue; + seen.add(id); + + const group = [route]; + + // figure out which lower priority routes should be considered fallbacks + for (let j = i + 1; j < route_data.length; j += 1) { + if (prerender_map.get(routes[j].id) === true) continue; + if (filter(routes[j])) { + group.push(route_data[j]); + } + } + + const filtered = new Set(group); + + // heuristic: if /foo/[bar] is included, /foo/[bar].json should + // also be included, since the page likely needs the endpoint + // TODO is this still necessary, given the new way of doing things? + filtered.forEach((route) => { + if (route.page) { + const endpoint = route_data.find((candidate) => candidate.id === route.id + '.json'); + + if (endpoint) { + filtered.add(endpoint); + } + } + }); + + if (filtered.size > 0) { + await complete({ + generateManifest: ({ relativePath }) => + generate_manifest({ + build_data, + prerendered: [], + relative_path: relativePath, + routes: Array.from(filtered) + }) + }); + } + } + }, + + findServerAssets(route_data) { + return find_server_assets( + build_data, + route_data.map((route) => /** @type {import('types').RouteData} */ (lookup.get(route))) + ); + }, + + async generateFallback(dest) { + const manifest_path = `${config.kit.outDir}/output/server/manifest-full.js`; + const env = get_env(config.kit.env, vite_config.mode); + + const fallback = await generate_fallback({ + manifest_path, + env: { ...env.private, ...env.public } + }); + + if (existsSync(dest)) { + console.log( + colors + .bold() + .yellow( + `Overwriting ${dest} with fallback page. Consider using a different name for the fallback.` + ) + ); + } + + write(dest, fallback); + }, + + generateEnvModule() { + const dest = `${config.kit.outDir}/output/prerendered/dependencies/${config.kit.appDir}/env.js`; + const env = get_env(config.kit.env, vite_config.mode); + + write(dest, `export const env=${JSON.stringify(env.public)}`); + }, + + generateManifest({ relativePath, routes: subset }) { + return generate_manifest({ + build_data, + prerendered: prerendered.paths, + relative_path: relativePath, + routes: subset + ? subset.map((route) => /** @type {import('types').RouteData} */ (lookup.get(route))) + : route_data.filter((route) => prerender_map.get(route.id) !== true) + }); + }, + + getBuildDirectory(name) { + return `${config.kit.outDir}/${name}`; + }, + + getClientDirectory() { + return `${config.kit.outDir}/output/client`; + }, + + getServerDirectory() { + return `${config.kit.outDir}/output/server`; + }, + + getAppPath() { + return build_data.app_path; + }, + + writeClient(dest) { + return copy(`${config.kit.outDir}/output/client`, dest, { + // avoid making vite build artefacts public + filter: (basename) => basename !== '.vite' + }); + }, + + writePrerendered(dest) { + const source = `${config.kit.outDir}/output/prerendered`; + return [...copy(`${source}/pages`, dest), ...copy(`${source}/dependencies`, dest)]; + }, + + writeServer(dest) { + return copy(`${config.kit.outDir}/output/server`, dest); + } + }; +} + +/** + * @param {string} file + * @param {'gz' | 'br'} format + */ +async function compress_file(file, format = 'gz') { + const compress = + format == 'br' + ? zlib.createBrotliCompress({ + params: { + [zlib.constants.BROTLI_PARAM_MODE]: zlib.constants.BROTLI_MODE_TEXT, + [zlib.constants.BROTLI_PARAM_QUALITY]: zlib.constants.BROTLI_MAX_QUALITY, + [zlib.constants.BROTLI_PARAM_SIZE_HINT]: statSync(file).size + } + }) + : zlib.createGzip({ level: zlib.constants.Z_BEST_COMPRESSION }); + + const source = createReadStream(file); + const destination = createWriteStream(`${file}.${format}`); + + await pipe(source, compress, destination); +} diff --git a/node_modules/@sveltejs/kit/src/core/adapt/index.js b/node_modules/@sveltejs/kit/src/core/adapt/index.js new file mode 100644 index 0000000..3cfe527 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/adapt/index.js @@ -0,0 +1,41 @@ +import colors from 'kleur'; +import { create_builder } from './builder.js'; + +/** + * @param {import('types').ValidatedConfig} config + * @param {import('types').BuildData} build_data + * @param {import('types').ServerMetadata} server_metadata + * @param {import('types').Prerendered} prerendered + * @param {import('types').PrerenderMap} prerender_map + * @param {import('types').Logger} log + * @param {import('vite').ResolvedConfig} vite_config + */ +export async function adapt( + config, + build_data, + server_metadata, + prerendered, + prerender_map, + log, + vite_config +) { + // This is only called when adapter is truthy, so the cast is safe + const { name, adapt } = /** @type {import('@sveltejs/kit').Adapter} */ (config.kit.adapter); + + console.log(colors.bold().cyan(`\n> Using ${name}`)); + + const builder = create_builder({ + config, + build_data, + server_metadata, + route_data: build_data.manifest_data.routes.filter((route) => route.page || route.endpoint), + prerendered, + prerender_map, + log, + vite_config + }); + + await adapt(builder); + + log.success('done'); +} diff --git a/node_modules/@sveltejs/kit/src/core/config/default-error.html b/node_modules/@sveltejs/kit/src/core/config/default-error.html new file mode 100644 index 0000000..c322e16 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/config/default-error.html @@ -0,0 +1,80 @@ + + + + + %sveltekit.error.message% + + + + +
+ %sveltekit.status% +
+

%sveltekit.error.message%

+
+
+ + diff --git a/node_modules/@sveltejs/kit/src/core/config/index.js b/node_modules/@sveltejs/kit/src/core/config/index.js new file mode 100644 index 0000000..5a6830b --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/config/index.js @@ -0,0 +1,134 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import process from 'node:process'; +import * as url from 'node:url'; +import options from './options.js'; + +/** + * Loads the template (src/app.html by default) and validates that it has the + * required content. + * @param {string} cwd + * @param {import('types').ValidatedConfig} config + */ +export function load_template(cwd, { kit }) { + const { env, files } = kit; + + const relative = path.relative(cwd, files.appTemplate); + + if (!fs.existsSync(files.appTemplate)) { + throw new Error(`${relative} does not exist`); + } + + const contents = fs.readFileSync(files.appTemplate, 'utf8'); + + const expected_tags = ['%sveltekit.head%', '%sveltekit.body%']; + expected_tags.forEach((tag) => { + if (contents.indexOf(tag) === -1) { + throw new Error(`${relative} is missing ${tag}`); + } + }); + + for (const match of contents.matchAll(/%sveltekit\.env\.([^%]+)%/g)) { + if (!match[1].startsWith(env.publicPrefix)) { + throw new Error( + `Environment variables in ${relative} must start with ${env.publicPrefix} (saw %sveltekit.env.${match[1]}%)` + ); + } + } + + return contents; +} + +/** + * Loads the error page (src/error.html by default) if it exists. + * Falls back to a generic error page content. + * @param {import('types').ValidatedConfig} config + */ +export function load_error_page(config) { + let { errorTemplate } = config.kit.files; + + // Don't do this inside resolving the config, because that would mean + // adding/removing error.html isn't detected and would require a restart. + if (!fs.existsSync(config.kit.files.errorTemplate)) { + errorTemplate = url.fileURLToPath(new URL('./default-error.html', import.meta.url)); + } + + return fs.readFileSync(errorTemplate, 'utf-8'); +} + +/** + * Loads and validates svelte.config.js + * @param {{ cwd?: string }} options + * @returns {Promise} + */ +export async function load_config({ cwd = process.cwd() } = {}) { + const config_file = path.join(cwd, 'svelte.config.js'); + + if (!fs.existsSync(config_file)) { + return process_config({}, { cwd }); + } + + const config = await import(`${url.pathToFileURL(config_file).href}?ts=${Date.now()}`); + + try { + return process_config(config.default, { cwd }); + } catch (e) { + const error = /** @type {Error} */ (e); + + // redact the stack trace — it's not helpful to users + error.stack = `Could not load svelte.config.js: ${error.message}\n`; + throw error; + } +} + +/** + * @param {import('@sveltejs/kit').Config} config + * @returns {import('types').ValidatedConfig} + */ +function process_config(config, { cwd = process.cwd() } = {}) { + const validated = validate_config(config); + + validated.kit.outDir = path.resolve(cwd, validated.kit.outDir); + + for (const key in validated.kit.files) { + if (key === 'hooks') { + validated.kit.files.hooks.client = path.resolve(cwd, validated.kit.files.hooks.client); + validated.kit.files.hooks.server = path.resolve(cwd, validated.kit.files.hooks.server); + validated.kit.files.hooks.universal = path.resolve(cwd, validated.kit.files.hooks.universal); + } else { + // @ts-expect-error + validated.kit.files[key] = path.resolve(cwd, validated.kit.files[key]); + } + } + + return validated; +} + +/** + * @param {import('@sveltejs/kit').Config} config + * @returns {import('types').ValidatedConfig} + */ +export function validate_config(config) { + if (typeof config !== 'object') { + throw new Error( + 'svelte.config.js must have a configuration object as its default export. See https://svelte.dev/docs/kit/configuration' + ); + } + + const validated = options(config, 'config'); + + if (validated.kit.router.resolution === 'server') { + if (validated.kit.router.type === 'hash') { + throw new Error( + "The `router.resolution` option cannot be 'server' if `router.type` is 'hash'" + ); + } + if (validated.kit.output.bundleStrategy !== 'split') { + throw new Error( + "The `router.resolution` option cannot be 'server' if `output.bundleStrategy` is 'inline' or 'single'" + ); + } + } + + return validated; +} diff --git a/node_modules/@sveltejs/kit/src/core/config/options.js b/node_modules/@sveltejs/kit/src/core/config/options.js new file mode 100644 index 0000000..a2b9bb8 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/config/options.js @@ -0,0 +1,435 @@ +import { join } from 'node:path'; +import process from 'node:process'; + +/** @typedef {import('./types.js').Validator} Validator */ + +const directives = object({ + 'child-src': string_array(), + 'default-src': string_array(), + 'frame-src': string_array(), + 'worker-src': string_array(), + 'connect-src': string_array(), + 'font-src': string_array(), + 'img-src': string_array(), + 'manifest-src': string_array(), + 'media-src': string_array(), + 'object-src': string_array(), + 'prefetch-src': string_array(), + 'script-src': string_array(), + 'script-src-elem': string_array(), + 'script-src-attr': string_array(), + 'style-src': string_array(), + 'style-src-elem': string_array(), + 'style-src-attr': string_array(), + 'base-uri': string_array(), + sandbox: string_array(), + 'form-action': string_array(), + 'frame-ancestors': string_array(), + 'navigate-to': string_array(), + 'report-uri': string_array(), + 'report-to': string_array(), + 'require-trusted-types-for': string_array(), + 'trusted-types': string_array(), + 'upgrade-insecure-requests': boolean(false), + 'require-sri-for': string_array(), + 'block-all-mixed-content': boolean(false), + 'plugin-types': string_array(), + referrer: string_array() +}); + +/** @type {Validator} */ +const options = object( + { + extensions: validate(['.svelte'], (input, keypath) => { + if (!Array.isArray(input) || !input.every((page) => typeof page === 'string')) { + throw new Error(`${keypath} must be an array of strings`); + } + + input.forEach((extension) => { + if (extension[0] !== '.') { + throw new Error(`Each member of ${keypath} must start with '.' — saw '${extension}'`); + } + + if (!/^(\.[a-z0-9]+)+$/i.test(extension)) { + throw new Error(`File extensions must be alphanumeric — saw '${extension}'`); + } + }); + + return input; + }), + + kit: object({ + adapter: validate(null, (input, keypath) => { + if (typeof input !== 'object' || !input.adapt) { + let message = `${keypath} should be an object with an "adapt" method`; + + if (Array.isArray(input) || typeof input === 'string') { + // for the early adapter adopters + message += ', rather than the name of an adapter'; + } + + throw new Error(`${message}. See https://svelte.dev/docs/kit/adapters`); + } + + return input; + }), + + alias: validate({}, (input, keypath) => { + if (typeof input !== 'object') { + throw new Error(`${keypath} should be an object`); + } + + for (const key in input) { + assert_string(input[key], `${keypath}.${key}`); + } + + return input; + }), + + appDir: validate('_app', (input, keypath) => { + assert_string(input, keypath); + + if (input) { + if (input.startsWith('/') || input.endsWith('/')) { + throw new Error( + "config.kit.appDir cannot start or end with '/'. See https://svelte.dev/docs/kit/configuration" + ); + } + } else { + throw new Error(`${keypath} cannot be empty`); + } + + return input; + }), + + csp: object({ + mode: list(['auto', 'hash', 'nonce']), + directives, + reportOnly: directives + }), + + csrf: object({ + checkOrigin: boolean(true) + }), + + embedded: boolean(false), + + env: object({ + dir: string(process.cwd()), + publicPrefix: string('PUBLIC_'), + privatePrefix: string('') + }), + + files: object({ + assets: string('static'), + hooks: object({ + client: string(join('src', 'hooks.client')), + server: string(join('src', 'hooks.server')), + universal: string(join('src', 'hooks')) + }), + lib: string(join('src', 'lib')), + params: string(join('src', 'params')), + routes: string(join('src', 'routes')), + serviceWorker: string(join('src', 'service-worker')), + appTemplate: string(join('src', 'app.html')), + errorTemplate: string(join('src', 'error.html')) + }), + + inlineStyleThreshold: number(0), + + moduleExtensions: string_array(['.js', '.ts']), + + outDir: string('.svelte-kit'), + + output: object({ + preloadStrategy: list(['modulepreload', 'preload-js', 'preload-mjs']), + bundleStrategy: list(['split', 'single', 'inline']) + }), + + paths: object({ + base: validate('', (input, keypath) => { + assert_string(input, keypath); + + if (input !== '' && (input.endsWith('/') || !input.startsWith('/'))) { + throw new Error( + `${keypath} option must either be the empty string or a root-relative path that starts but doesn't end with '/'. See https://svelte.dev/docs/kit/configuration#paths` + ); + } + + return input; + }), + assets: validate('', (input, keypath) => { + assert_string(input, keypath); + + if (input) { + if (!/^[a-z]+:\/\//.test(input)) { + throw new Error( + `${keypath} option must be an absolute path, if specified. See https://svelte.dev/docs/kit/configuration#paths` + ); + } + + if (input.endsWith('/')) { + throw new Error( + `${keypath} option must not end with '/'. See https://svelte.dev/docs/kit/configuration#paths` + ); + } + } + + return input; + }), + relative: boolean(true) + }), + + prerender: object({ + concurrency: number(1), + crawl: boolean(true), + entries: validate(['*'], (input, keypath) => { + if (!Array.isArray(input) || !input.every((page) => typeof page === 'string')) { + throw new Error(`${keypath} must be an array of strings`); + } + + input.forEach((page) => { + if (page !== '*' && page[0] !== '/') { + throw new Error( + `Each member of ${keypath} must be either '*' or an absolute path beginning with '/' — saw '${page}'` + ); + } + }); + + return input; + }), + + handleHttpError: validate( + (/** @type {any} */ { message }) => { + throw new Error( + message + + '\nTo suppress or handle this error, implement `handleHttpError` in https://svelte.dev/docs/kit/configuration#prerender' + ); + }, + (input, keypath) => { + if (typeof input === 'function') return input; + if (['fail', 'warn', 'ignore'].includes(input)) return input; + throw new Error(`${keypath} should be "fail", "warn", "ignore" or a custom function`); + } + ), + + handleMissingId: validate( + (/** @type {any} */ { message }) => { + throw new Error( + message + + '\nTo suppress or handle this error, implement `handleMissingId` in https://svelte.dev/docs/kit/configuration#prerender' + ); + }, + (input, keypath) => { + if (typeof input === 'function') return input; + if (['fail', 'warn', 'ignore'].includes(input)) return input; + throw new Error(`${keypath} should be "fail", "warn", "ignore" or a custom function`); + } + ), + + handleEntryGeneratorMismatch: validate( + (/** @type {any} */ { message }) => { + throw new Error( + message + + '\nTo suppress or handle this error, implement `handleEntryGeneratorMismatch` in https://svelte.dev/docs/kit/configuration#prerender' + ); + }, + (input, keypath) => { + if (typeof input === 'function') return input; + if (['fail', 'warn', 'ignore'].includes(input)) return input; + throw new Error(`${keypath} should be "fail", "warn", "ignore" or a custom function`); + } + ), + + origin: validate('http://sveltekit-prerender', (input, keypath) => { + assert_string(input, keypath); + + let origin; + + try { + origin = new URL(input).origin; + } catch { + throw new Error(`${keypath} must be a valid origin`); + } + + if (input !== origin) { + throw new Error(`${keypath} must be a valid origin (${origin} rather than ${input})`); + } + + return origin; + }) + }), + + router: object({ + type: list(['pathname', 'hash']), + resolution: list(['client', 'server']) + }), + + serviceWorker: object({ + register: boolean(true), + files: fun((filename) => !/\.DS_Store/.test(filename)) + }), + + typescript: object({ + config: fun((config) => config) + }), + + version: object({ + name: string(Date.now().toString()), + pollInterval: number(0) + }) + }) + }, + true +); + +/** + * @param {Record} children + * @param {boolean} [allow_unknown] + * @returns {Validator} + */ +function object(children, allow_unknown = false) { + return (input, keypath) => { + /** @type {Record} */ + const output = {}; + + if ((input && typeof input !== 'object') || Array.isArray(input)) { + throw new Error(`${keypath} should be an object`); + } + + for (const key in input) { + if (!(key in children)) { + if (allow_unknown) { + output[key] = input[key]; + } else { + let message = `Unexpected option ${keypath}.${key}`; + + // special case + if (keypath === 'config.kit' && key in options) { + message += ` (did you mean config.${key}?)`; + } + + throw new Error(message); + } + } + } + + for (const key in children) { + const validator = children[key]; + output[key] = validator(input && input[key], `${keypath}.${key}`); + } + + return output; + }; +} + +/** + * @param {any} fallback + * @param {(value: any, keypath: string) => any} fn + * @returns {Validator} + */ +function validate(fallback, fn) { + return (input, keypath) => { + return input === undefined ? fallback : fn(input, keypath); + }; +} + +/** + * @param {string | null} fallback + * @param {boolean} allow_empty + * @returns {Validator} + */ +function string(fallback, allow_empty = true) { + return validate(fallback, (input, keypath) => { + assert_string(input, keypath); + + if (!allow_empty && input === '') { + throw new Error(`${keypath} cannot be empty`); + } + + return input; + }); +} + +/** + * @param {string[] | undefined} [fallback] + * @returns {Validator} + */ +function string_array(fallback) { + return validate(fallback, (input, keypath) => { + if (!Array.isArray(input) || input.some((value) => typeof value !== 'string')) { + throw new Error(`${keypath} must be an array of strings, if specified`); + } + + return input; + }); +} + +/** + * @param {number} fallback + * @returns {Validator} + */ +function number(fallback) { + return validate(fallback, (input, keypath) => { + if (typeof input !== 'number') { + throw new Error(`${keypath} should be a number, if specified`); + } + return input; + }); +} + +/** + * @param {boolean} fallback + * @returns {Validator} + */ +function boolean(fallback) { + return validate(fallback, (input, keypath) => { + if (typeof input !== 'boolean') { + throw new Error(`${keypath} should be true or false, if specified`); + } + return input; + }); +} + +/** + * @param {string[]} options + * @returns {Validator} + */ +function list(options, fallback = options[0]) { + return validate(fallback, (input, keypath) => { + if (!options.includes(input)) { + // prettier-ignore + const msg = options.length > 2 + ? `${keypath} should be one of ${options.slice(0, -1).map(input => `"${input}"`).join(', ')} or "${options[options.length - 1]}"` + : `${keypath} should be either "${options[0]}" or "${options[1]}"`; + + throw new Error(msg); + } + return input; + }); +} + +/** + * @param {(...args: any) => any} fallback + * @returns {Validator} + */ +function fun(fallback) { + return validate(fallback, (input, keypath) => { + if (typeof input !== 'function') { + throw new Error(`${keypath} should be a function, if specified`); + } + return input; + }); +} + +/** + * @param {string} input + * @param {string} keypath + */ +function assert_string(input, keypath) { + if (typeof input !== 'string') { + throw new Error(`${keypath} should be a string, if specified`); + } +} + +export default options; diff --git a/node_modules/@sveltejs/kit/src/core/config/types.d.ts b/node_modules/@sveltejs/kit/src/core/config/types.d.ts new file mode 100644 index 0000000..00d005c --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/config/types.d.ts @@ -0,0 +1 @@ +export type Validator = (input: T, keypath: string) => T; diff --git a/node_modules/@sveltejs/kit/src/core/env.js b/node_modules/@sveltejs/kit/src/core/env.js new file mode 100644 index 0000000..455eb0f --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/env.js @@ -0,0 +1,152 @@ +import { GENERATED_COMMENT } from '../constants.js'; +import { dedent } from './sync/utils.js'; +import { runtime_base } from './utils.js'; + +/** + * @typedef {'public' | 'private'} EnvType + */ + +/** + * @param {string} id + * @param {Record} env + * @returns {string} + */ +export function create_static_module(id, env) { + /** @type {string[]} */ + const declarations = []; + + for (const key in env) { + if (!valid_identifier.test(key) || reserved.has(key)) { + continue; + } + + const comment = `/** @type {import('${id}').${key}} */`; + const declaration = `export const ${key} = ${JSON.stringify(env[key])};`; + + declarations.push(`${comment}\n${declaration}`); + } + + return GENERATED_COMMENT + declarations.join('\n\n'); +} + +/** + * @param {EnvType} type + * @param {Record | undefined} dev_values If in a development mode, values to pre-populate the module with. + */ +export function create_dynamic_module(type, dev_values) { + if (dev_values) { + const keys = Object.entries(dev_values).map( + ([k, v]) => `${JSON.stringify(k)}: ${JSON.stringify(v)}` + ); + return `export const env = {\n${keys.join(',\n')}\n}`; + } + return `export { ${type}_env as env } from '${runtime_base}/shared-server.js';`; +} + +/** + * @param {EnvType} id + * @param {import('types').Env} env + * @returns {string} + */ +export function create_static_types(id, env) { + const declarations = Object.keys(env[id]) + .filter((k) => valid_identifier.test(k)) + .map((k) => `export const ${k}: string;`); + + return dedent` + declare module '$env/static/${id}' { + ${declarations.join('\n')} + } + `; +} + +/** + * @param {EnvType} id + * @param {import('types').Env} env + * @param {{ + * public_prefix: string; + * private_prefix: string; + * }} prefixes + * @returns {string} + */ +export function create_dynamic_types(id, env, { public_prefix, private_prefix }) { + const properties = Object.keys(env[id]) + .filter((k) => valid_identifier.test(k)) + .map((k) => `${k}: string;`); + + const public_prefixed = `[key: \`${public_prefix}\${string}\`]`; + const private_prefixed = `[key: \`${private_prefix}\${string}\`]`; + + if (id === 'private') { + if (public_prefix) { + properties.push(`${public_prefixed}: undefined;`); + } + properties.push(`${private_prefixed}: string | undefined;`); + } else { + if (private_prefix) { + properties.push(`${private_prefixed}: undefined;`); + } + properties.push(`${public_prefixed}: string | undefined;`); + } + + return dedent` + declare module '$env/dynamic/${id}' { + export const env: { + ${properties.join('\n')} + } + } + `; +} + +export const reserved = new Set([ + 'do', + 'if', + 'in', + 'for', + 'let', + 'new', + 'try', + 'var', + 'case', + 'else', + 'enum', + 'eval', + 'null', + 'this', + 'true', + 'void', + 'with', + 'await', + 'break', + 'catch', + 'class', + 'const', + 'false', + 'super', + 'throw', + 'while', + 'yield', + 'delete', + 'export', + 'import', + 'public', + 'return', + 'static', + 'switch', + 'typeof', + 'default', + 'extends', + 'finally', + 'package', + 'private', + 'continue', + 'debugger', + 'function', + 'arguments', + 'interface', + 'protected', + 'implements', + 'instanceof' +]); + +export const valid_identifier = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/; diff --git a/node_modules/@sveltejs/kit/src/core/generate_manifest/find_server_assets.js b/node_modules/@sveltejs/kit/src/core/generate_manifest/find_server_assets.js new file mode 100644 index 0000000..b7232e6 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/generate_manifest/find_server_assets.js @@ -0,0 +1,53 @@ +import { find_deps } from '../../exports/vite/build/utils.js'; + +/** + * Finds all the assets that are imported by server files associated with `routes` + * @param {import('types').BuildData} build_data + * @param {import('types').RouteData[]} routes + */ +export function find_server_assets(build_data, routes) { + /** + * All nodes actually used in the routes definition (prerendered routes are omitted). + * Root layout/error is always included as they are needed for 404 and root errors. + * @type {Set} + */ + const used_nodes = new Set([0, 1]); + + // TODO add hooks.server.js asset imports + /** @type {Set} */ + const server_assets = new Set(); + + /** @param {string} id */ + function add_assets(id) { + if (id in build_data.server_manifest) { + const deps = find_deps(build_data.server_manifest, id, false); + for (const asset of deps.assets) { + server_assets.add(asset); + } + } + } + + for (const route of routes) { + if (route.page) { + for (const i of route.page.layouts) used_nodes.add(i); + for (const i of route.page.errors) used_nodes.add(i); + used_nodes.add(route.page.leaf); + } + + if (route.endpoint) { + add_assets(route.endpoint.file); + } + } + + for (const n of used_nodes) { + const node = build_data.manifest_data.nodes[n]; + if (node?.universal) add_assets(node.universal); + if (node?.server) add_assets(node.server); + } + + if (build_data.manifest_data.hooks.server) { + add_assets(build_data.manifest_data.hooks.server); + } + + return Array.from(server_assets); +} diff --git a/node_modules/@sveltejs/kit/src/core/generate_manifest/index.js b/node_modules/@sveltejs/kit/src/core/generate_manifest/index.js new file mode 100644 index 0000000..eaaf9e6 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/generate_manifest/index.js @@ -0,0 +1,147 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import * as mime from 'mrmime'; +import { s } from '../../utils/misc.js'; +import { get_mime_lookup } from '../utils.js'; +import { resolve_symlinks } from '../../exports/vite/build/utils.js'; +import { compact } from '../../utils/array.js'; +import { join_relative } from '../../utils/filesystem.js'; +import { dedent } from '../sync/utils.js'; +import { find_server_assets } from './find_server_assets.js'; +import { uneval } from 'devalue'; + +/** + * Generates the data used to write the server-side manifest.js file. This data is used in the Vite + * build process, to power routing, etc. + * @param {{ + * build_data: import('types').BuildData; + * prerendered: string[]; + * relative_path: string; + * routes: import('types').RouteData[]; + * }} opts + */ +export function generate_manifest({ build_data, prerendered, relative_path, routes }) { + /** + * @type {Map} The new index of each node in the filtered nodes array + */ + const reindexed = new Map(); + /** + * All nodes actually used in the routes definition (prerendered routes are omitted). + * Root layout/error is always included as they are needed for 404 and root errors. + * @type {Set} + */ + const used_nodes = new Set([0, 1]); + + const server_assets = find_server_assets(build_data, routes); + + for (const route of routes) { + if (route.page) { + for (const i of route.page.layouts) used_nodes.add(i); + for (const i of route.page.errors) used_nodes.add(i); + used_nodes.add(route.page.leaf); + } + } + + const node_paths = compact( + build_data.manifest_data.nodes.map((_, i) => { + if (used_nodes.has(i)) { + reindexed.set(i, reindexed.size); + return join_relative(relative_path, `/nodes/${i}.js`); + } + }) + ); + + /** @type {(path: string) => string} */ + const loader = (path) => `__memo(() => import('${path}'))`; + + const assets = build_data.manifest_data.assets.map((asset) => asset.file); + if (build_data.service_worker) { + assets.push(build_data.service_worker); + } + + // In case of server side route resolution, we need to include all matchers. Prerendered routes are not part + // of the server manifest, and they could reference matchers that then would not be included. + const matchers = new Set( + build_data.client?.nodes ? Object.keys(build_data.manifest_data.matchers) : undefined + ); + + /** @param {Array} indexes */ + function get_nodes(indexes) { + const string = indexes.map((n) => reindexed.get(n) ?? '').join(','); + + // since JavaScript ignores trailing commas, we need to insert a dummy + // comma so that the array has the correct length if the last item + // is undefined + return `[${string},]`; + } + + const mime_types = get_mime_lookup(build_data.manifest_data); + + /** @type {Record} */ + const files = {}; + for (const file of server_assets) { + files[file] = fs.statSync(path.resolve(build_data.out_dir, 'server', file)).size; + + const ext = path.extname(file); + mime_types[ext] ??= mime.lookup(ext) || ''; + } + + // prettier-ignore + // String representation of + /** @template {import('@sveltejs/kit').SSRManifest} T */ + const manifest_expr = dedent` + { + appDir: ${s(build_data.app_dir)}, + appPath: ${s(build_data.app_path)}, + assets: new Set(${s(assets)}), + mimeTypes: ${s(mime_types)}, + _: { + client: ${uneval(build_data.client)}, + nodes: [ + ${(node_paths).map(loader).join(',\n')} + ], + routes: [ + ${routes.map(route => { + if (!route.page && !route.endpoint) return; + + route.params.forEach(param => { + if (param.matcher) matchers.add(param.matcher); + }); + + return dedent` + { + id: ${s(route.id)}, + pattern: ${route.pattern}, + params: ${s(route.params)}, + page: ${route.page ? `{ layouts: ${get_nodes(route.page.layouts)}, errors: ${get_nodes(route.page.errors)}, leaf: ${reindexed.get(route.page.leaf)} }` : 'null'}, + endpoint: ${route.endpoint ? loader(join_relative(relative_path, resolve_symlinks(build_data.server_manifest, route.endpoint.file).chunk.file)) : 'null'} + } + `; + }).filter(Boolean).join(',\n')} + ], + prerendered_routes: new Set(${s(prerendered)}), + matchers: async () => { + ${Array.from( + matchers, + type => `const { match: ${type} } = await import ('${(join_relative(relative_path, `/entries/matchers/${type}.js`))}')` + ).join('\n')} + return { ${Array.from(matchers).join(', ')} }; + }, + server_assets: ${s(files)} + } + } + `; + + // Memoize the loaders to prevent Node from doing unnecessary work + // on every dynamic import call + return dedent` + (() => { + function __memo(fn) { + let value; + return () => value ??= (value = fn()); + } + + return ${manifest_expr} + })() + `; +} diff --git a/node_modules/@sveltejs/kit/src/core/postbuild/analyse.js b/node_modules/@sveltejs/kit/src/core/postbuild/analyse.js new file mode 100644 index 0000000..713f4ea --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/postbuild/analyse.js @@ -0,0 +1,268 @@ +import { join } from 'node:path'; +import { pathToFileURL } from 'node:url'; +import { validate_server_exports } from '../../utils/exports.js'; +import { load_config } from '../config/index.js'; +import { forked } from '../../utils/fork.js'; +import { installPolyfills } from '../../exports/node/polyfills.js'; +import { ENDPOINT_METHODS } from '../../constants.js'; +import { filter_private_env, filter_public_env } from '../../utils/env.js'; +import { has_server_load, resolve_route } from '../../utils/routing.js'; +import { check_feature } from '../../utils/features.js'; +import { createReadableStream } from '@sveltejs/kit/node'; +import { PageNodes } from '../../utils/page_nodes.js'; +import { build_server_nodes } from '../../exports/vite/build/build_server.js'; + +export default forked(import.meta.url, analyse); + +/** + * @param {{ + * hash: boolean; + * manifest_path: string; + * manifest_data: import('types').ManifestData; + * server_manifest: import('vite').Manifest; + * tracked_features: Record; + * env: Record; + * out: string; + * output_config: import('types').RecursiveRequired; + * }} opts + */ +async function analyse({ + hash, + manifest_path, + manifest_data, + server_manifest, + tracked_features, + env, + out, + output_config +}) { + /** @type {import('@sveltejs/kit').SSRManifest} */ + const manifest = (await import(pathToFileURL(manifest_path).href)).manifest; + + /** @type {import('types').ValidatedKitConfig} */ + const config = (await load_config()).kit; + + const server_root = join(config.outDir, 'output'); + + /** @type {import('types').ServerInternalModule} */ + const internal = await import(pathToFileURL(`${server_root}/server/internal.js`).href); + + installPolyfills(); + + // configure `import { building } from '$app/environment'` — + // essential we do this before analysing the code + internal.set_building(); + + // set env, in case it's used in initialisation + const { publicPrefix: public_prefix, privatePrefix: private_prefix } = config.env; + const private_env = filter_private_env(env, { public_prefix, private_prefix }); + const public_env = filter_public_env(env, { public_prefix, private_prefix }); + internal.set_private_env(private_env); + internal.set_public_env(public_env); + internal.set_safe_public_env(public_env); + internal.set_manifest(manifest); + internal.set_read_implementation((file) => createReadableStream(`${server_root}/server/${file}`)); + + const static_exports = new Map(); + + // first, build server nodes without the client manifest so we can analyse it + await build_server_nodes( + out, + config, + manifest_data, + server_manifest, + null, + null, + output_config, + static_exports + ); + + /** @type {import('types').ServerMetadata} */ + const metadata = { + nodes: [], + routes: new Map() + }; + + const nodes = await Promise.all(manifest._.nodes.map((loader) => loader())); + + // analyse nodes + for (const node of nodes) { + if (hash && node.universal) { + const options = Object.keys(node.universal).filter((o) => o !== 'load'); + if (options.length > 0) { + throw new Error( + `Page options are ignored when \`router.type === 'hash'\` (${node.universal_id} has ${options + .filter((o) => o !== 'load') + .map((o) => `'${o}'`) + .join(', ')})` + ); + } + } + + metadata.nodes[node.index] = { + has_server_load: has_server_load(node) + }; + } + + // analyse routes + for (const route of manifest._.routes) { + const page = + route.page && + analyse_page( + route.page.layouts.map((n) => (n === undefined ? n : nodes[n])), + nodes[route.page.leaf] + ); + + const endpoint = route.endpoint && analyse_endpoint(route, await route.endpoint()); + + if (page?.prerender && endpoint?.prerender) { + throw new Error(`Cannot prerender a route with both +page and +server files (${route.id})`); + } + + if (page?.config && endpoint?.config) { + for (const key in { ...page.config, ...endpoint.config }) { + if (JSON.stringify(page.config[key]) !== JSON.stringify(endpoint.config[key])) { + throw new Error( + `Mismatched route config for ${route.id} — the +page and +server files must export the same config, if any` + ); + } + } + } + + const route_config = page?.config ?? endpoint?.config ?? {}; + const prerender = page?.prerender ?? endpoint?.prerender; + + if (prerender !== true) { + for (const feature of list_features( + route, + manifest_data, + server_manifest, + tracked_features + )) { + check_feature(route.id, route_config, feature, config.adapter); + } + } + + const page_methods = page?.methods ?? []; + const api_methods = endpoint?.methods ?? []; + const entries = page?.entries ?? endpoint?.entries; + + metadata.routes.set(route.id, { + config: route_config, + methods: Array.from(new Set([...page_methods, ...api_methods])), + page: { + methods: page_methods + }, + api: { + methods: api_methods + }, + prerender, + entries: + entries && (await entries()).map((entry_object) => resolve_route(route.id, entry_object)) + }); + } + + return { metadata, static_exports }; +} + +/** + * @param {import('types').SSRRoute} route + * @param {import('types').SSREndpoint} mod + */ +function analyse_endpoint(route, mod) { + validate_server_exports(mod, route.id); + + if (mod.prerender && (mod.POST || mod.PATCH || mod.PUT || mod.DELETE)) { + throw new Error( + `Cannot prerender a +server file with POST, PATCH, PUT, or DELETE (${route.id})` + ); + } + + /** @type {Array} */ + const methods = []; + + for (const method of /** @type {import('types').HttpMethod[]} */ (ENDPOINT_METHODS)) { + if (mod[method]) methods.push(method); + } + + if (mod.fallback) { + methods.push('*'); + } + + return { + config: mod.config, + entries: mod.entries, + methods, + prerender: mod.prerender ?? false + }; +} + +/** + * @param {Array} layouts + * @param {import('types').SSRNode} leaf + */ +function analyse_page(layouts, leaf) { + /** @type {Array<'GET' | 'POST'>} */ + const methods = ['GET']; + if (leaf.server?.actions) methods.push('POST'); + + const nodes = new PageNodes([...layouts, leaf]); + nodes.validate(); + + return { + config: nodes.get_config(), + entries: leaf.universal?.entries ?? leaf.server?.entries, + methods, + prerender: nodes.prerender() + }; +} + +/** + * @param {import('types').SSRRoute} route + * @param {import('types').ManifestData} manifest_data + * @param {import('vite').Manifest} server_manifest + * @param {Record} tracked_features + */ +function list_features(route, manifest_data, server_manifest, tracked_features) { + const features = new Set(); + + const route_data = /** @type {import('types').RouteData} */ ( + manifest_data.routes.find((r) => r.id === route.id) + ); + + /** @param {string} id */ + function visit(id) { + const chunk = server_manifest[id]; + if (!chunk) return; + + if (chunk.file in tracked_features) { + for (const feature of tracked_features[chunk.file]) { + features.add(feature); + } + } + + if (chunk.imports) { + for (const id of chunk.imports) { + visit(id); + } + } + } + + let page_node = route_data?.leaf; + while (page_node) { + if (page_node.server) visit(page_node.server); + page_node = page_node.parent ?? null; + } + + if (route_data.endpoint) { + visit(route_data.endpoint.file); + } + + if (manifest_data.hooks.server) { + // TODO if hooks.server.js imports `read`, it will be in the entry chunk + // we don't currently account for that case + visit(manifest_data.hooks.server); + } + + return Array.from(features); +} diff --git a/node_modules/@sveltejs/kit/src/core/postbuild/crawl.js b/node_modules/@sveltejs/kit/src/core/postbuild/crawl.js new file mode 100644 index 0000000..caffef5 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/postbuild/crawl.js @@ -0,0 +1,243 @@ +import { resolve } from '../../utils/url.js'; +import { decode } from './entities.js'; + +const DOCTYPE = 'DOCTYPE'; +const CDATA_OPEN = '[CDATA['; +const CDATA_CLOSE = ']]>'; +const COMMENT_OPEN = '--'; +const COMMENT_CLOSE = '-->'; + +const TAG_OPEN = /[a-zA-Z]/; +const TAG_CHAR = /[a-zA-Z0-9]/; +const ATTRIBUTE_NAME = /[^\t\n\f />"'=]/; + +const WHITESPACE = /[\s\n\r]/; + +const CRAWLABLE_META_NAME_ATTRS = new Set([ + 'og:url', + 'og:image', + 'og:image:url', + 'og:image:secure_url', + 'og:video', + 'og:video:url', + 'og:video:secure_url', + 'og:audio', + 'og:audio:url', + 'og:audio:secure_url', + 'twitter:image' +]); + +/** + * @param {string} html + * @param {string} base + */ +export function crawl(html, base) { + /** @type {string[]} */ + const ids = []; + + /** @type {string[]} */ + const hrefs = []; + + let i = 0; + main: while (i < html.length) { + const char = html[i]; + + if (char === '<') { + if (html[i + 1] === '!') { + i += 2; + + if (html.slice(i, i + DOCTYPE.length).toUpperCase() === DOCTYPE) { + i += DOCTYPE.length; + while (i < html.length) { + if (html[i++] === '>') { + continue main; + } + } + } + + // skip cdata + if (html.slice(i, i + CDATA_OPEN.length) === CDATA_OPEN) { + i += CDATA_OPEN.length; + while (i < html.length) { + if (html.slice(i, i + CDATA_CLOSE.length) === CDATA_CLOSE) { + i += CDATA_CLOSE.length; + continue main; + } + + i += 1; + } + } + + // skip comments + if (html.slice(i, i + COMMENT_OPEN.length) === COMMENT_OPEN) { + i += COMMENT_OPEN.length; + while (i < html.length) { + if (html.slice(i, i + COMMENT_CLOSE.length) === COMMENT_CLOSE) { + i += COMMENT_CLOSE.length; + continue main; + } + + i += 1; + } + } + } + + // parse opening tags + const start = ++i; + if (TAG_OPEN.test(html[start])) { + while (i < html.length) { + if (!TAG_CHAR.test(html[i])) { + break; + } + + i += 1; + } + + const tag = html.slice(start, i).toUpperCase(); + + /** @type {Record} */ + const attributes = {}; + + if (tag === 'SCRIPT' || tag === 'STYLE') { + while (i < html.length) { + if ( + html[i] === '<' && + html[i + 1] === '/' && + html.slice(i + 2, i + 2 + tag.length).toUpperCase() === tag + ) { + continue main; + } + + i += 1; + } + } + + while (i < html.length) { + const start = i; + + const char = html[start]; + if (char === '>') break; + + if (ATTRIBUTE_NAME.test(char)) { + i += 1; + + while (i < html.length) { + if (!ATTRIBUTE_NAME.test(html[i])) { + break; + } + + i += 1; + } + + const name = html.slice(start, i).toLowerCase(); + + while (WHITESPACE.test(html[i])) i += 1; + + if (html[i] === '=') { + i += 1; + while (WHITESPACE.test(html[i])) i += 1; + + let value; + + if (html[i] === "'" || html[i] === '"') { + const quote = html[i++]; + + const start = i; + let escaped = false; + + while (i < html.length) { + if (escaped) { + escaped = false; + } else { + const char = html[i]; + + if (html[i] === quote) { + break; + } + + if (char === '\\') { + escaped = true; + } + } + + i += 1; + } + + value = html.slice(start, i); + } else { + const start = i; + while (html[i] !== '>' && !WHITESPACE.test(html[i])) i += 1; + value = html.slice(start, i); + + i -= 1; + } + + value = decode(value); + attributes[name] = value; + } else { + i -= 1; + } + } + + i += 1; + } + + const { href, id, name, property, rel, src, srcset, content } = attributes; + + if (href) { + if (tag === 'BASE') { + base = resolve(base, href); + } else if (!rel || !/\bexternal\b/i.test(rel)) { + hrefs.push(resolve(base, href)); + } + } + + if (id) { + ids.push(id); + } + + if (name && tag === 'A') { + ids.push(name); + } + + if (src) { + hrefs.push(resolve(base, src)); + } + + if (srcset) { + let value = srcset; + const candidates = []; + let insideURL = true; + value = value.trim(); + for (let i = 0; i < value.length; i++) { + if (value[i] === ',' && (!insideURL || (insideURL && WHITESPACE.test(value[i + 1])))) { + candidates.push(value.slice(0, i)); + value = value.substring(i + 1).trim(); + i = 0; + insideURL = true; + } else if (WHITESPACE.test(value[i])) { + insideURL = false; + } + } + candidates.push(value); + for (const candidate of candidates) { + const src = candidate.split(WHITESPACE)[0]; + if (src) hrefs.push(resolve(base, src)); + } + } + + if (tag === 'META' && content) { + const attr = name ?? property; + + if (attr && CRAWLABLE_META_NAME_ATTRS.has(attr)) { + hrefs.push(resolve(base, content)); + } + } + } + } + + i += 1; + } + + return { ids, hrefs }; +} diff --git a/node_modules/@sveltejs/kit/src/core/postbuild/entities.js b/node_modules/@sveltejs/kit/src/core/postbuild/entities.js new file mode 100644 index 0000000..91888a9 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/postbuild/entities.js @@ -0,0 +1,2252 @@ +/** + * A list of all named HTML entities, from https://html.spec.whatwg.org/multipage/named-characters.html + * @type {Record} + */ +const entities = { + AElig: 'Æ', + 'AElig;': 'Æ', + AMP: '&', + 'AMP;': '&', + Aacute: 'Á', + 'Aacute;': 'Á', + 'Abreve;': 'Ă', + Acirc: 'Â', + 'Acirc;': 'Â', + 'Acy;': 'А', + 'Afr;': '𝔄', + Agrave: 'À', + 'Agrave;': 'À', + 'Alpha;': 'Α', + 'Amacr;': 'Ā', + 'And;': '⩓', + 'Aogon;': 'Ą', + 'Aopf;': '𝔸', + 'ApplyFunction;': '⁡', + Aring: 'Å', + 'Aring;': 'Å', + 'Ascr;': '𝒜', + 'Assign;': '≔', + Atilde: 'Ã', + 'Atilde;': 'Ã', + Auml: 'Ä', + 'Auml;': 'Ä', + 'Backslash;': '∖', + 'Barv;': '⫧', + 'Barwed;': '⌆', + 'Bcy;': 'Б', + 'Because;': '∵', + 'Bernoullis;': 'ℬ', + 'Beta;': 'Β', + 'Bfr;': '𝔅', + 'Bopf;': '𝔹', + 'Breve;': '˘', + 'Bscr;': 'ℬ', + 'Bumpeq;': '≎', + 'CHcy;': 'Ч', + COPY: '©', + 'COPY;': '©', + 'Cacute;': 'Ć', + 'Cap;': '⋒', + 'CapitalDifferentialD;': 'ⅅ', + 'Cayleys;': 'ℭ', + 'Ccaron;': 'Č', + Ccedil: 'Ç', + 'Ccedil;': 'Ç', + 'Ccirc;': 'Ĉ', + 'Cconint;': '∰', + 'Cdot;': 'Ċ', + 'Cedilla;': '¸', + 'CenterDot;': '·', + 'Cfr;': 'ℭ', + 'Chi;': 'Χ', + 'CircleDot;': '⊙', + 'CircleMinus;': '⊖', + 'CirclePlus;': '⊕', + 'CircleTimes;': '⊗', + 'ClockwiseContourIntegral;': '∲', + 'CloseCurlyDoubleQuote;': '”', + 'CloseCurlyQuote;': '’', + 'Colon;': '∷', + 'Colone;': '⩴', + 'Congruent;': '≡', + 'Conint;': '∯', + 'ContourIntegral;': '∮', + 'Copf;': 'ℂ', + 'Coproduct;': '∐', + 'CounterClockwiseContourIntegral;': '∳', + 'Cross;': '⨯', + 'Cscr;': '𝒞', + 'Cup;': '⋓', + 'CupCap;': '≍', + 'DD;': 'ⅅ', + 'DDotrahd;': '⤑', + 'DJcy;': 'Ђ', + 'DScy;': 'Ѕ', + 'DZcy;': 'Џ', + 'Dagger;': '‡', + 'Darr;': '↡', + 'Dashv;': '⫤', + 'Dcaron;': 'Ď', + 'Dcy;': 'Д', + 'Del;': '∇', + 'Delta;': 'Δ', + 'Dfr;': '𝔇', + 'DiacriticalAcute;': '´', + 'DiacriticalDot;': '˙', + 'DiacriticalDoubleAcute;': '˝', + 'DiacriticalGrave;': '`', + 'DiacriticalTilde;': '˜', + 'Diamond;': '⋄', + 'DifferentialD;': 'ⅆ', + 'Dopf;': '𝔻', + 'Dot;': '¨', + 'DotDot;': '⃜', + 'DotEqual;': '≐', + 'DoubleContourIntegral;': '∯', + 'DoubleDot;': '¨', + 'DoubleDownArrow;': '⇓', + 'DoubleLeftArrow;': '⇐', + 'DoubleLeftRightArrow;': '⇔', + 'DoubleLeftTee;': '⫤', + 'DoubleLongLeftArrow;': '⟸', + 'DoubleLongLeftRightArrow;': '⟺', + 'DoubleLongRightArrow;': '⟹', + 'DoubleRightArrow;': '⇒', + 'DoubleRightTee;': '⊨', + 'DoubleUpArrow;': '⇑', + 'DoubleUpDownArrow;': '⇕', + 'DoubleVerticalBar;': '∥', + 'DownArrow;': '↓', + 'DownArrowBar;': '⤓', + 'DownArrowUpArrow;': '⇵', + 'DownBreve;': '̑', + 'DownLeftRightVector;': '⥐', + 'DownLeftTeeVector;': '⥞', + 'DownLeftVector;': '↽', + 'DownLeftVectorBar;': '⥖', + 'DownRightTeeVector;': '⥟', + 'DownRightVector;': '⇁', + 'DownRightVectorBar;': '⥗', + 'DownTee;': '⊤', + 'DownTeeArrow;': '↧', + 'Downarrow;': '⇓', + 'Dscr;': '𝒟', + 'Dstrok;': 'Đ', + 'ENG;': 'Ŋ', + ETH: 'Ð', + 'ETH;': 'Ð', + Eacute: 'É', + 'Eacute;': 'É', + 'Ecaron;': 'Ě', + Ecirc: 'Ê', + 'Ecirc;': 'Ê', + 'Ecy;': 'Э', + 'Edot;': 'Ė', + 'Efr;': '𝔈', + Egrave: 'È', + 'Egrave;': 'È', + 'Element;': '∈', + 'Emacr;': 'Ē', + 'EmptySmallSquare;': '◻', + 'EmptyVerySmallSquare;': '▫', + 'Eogon;': 'Ę', + 'Eopf;': '𝔼', + 'Epsilon;': 'Ε', + 'Equal;': '⩵', + 'EqualTilde;': '≂', + 'Equilibrium;': '⇌', + 'Escr;': 'ℰ', + 'Esim;': '⩳', + 'Eta;': 'Η', + Euml: 'Ë', + 'Euml;': 'Ë', + 'Exists;': '∃', + 'ExponentialE;': 'ⅇ', + 'Fcy;': 'Ф', + 'Ffr;': '𝔉', + 'FilledSmallSquare;': '◼', + 'FilledVerySmallSquare;': '▪', + 'Fopf;': '𝔽', + 'ForAll;': '∀', + 'Fouriertrf;': 'ℱ', + 'Fscr;': 'ℱ', + 'GJcy;': 'Ѓ', + GT: '>', + 'GT;': '>', + 'Gamma;': 'Γ', + 'Gammad;': 'Ϝ', + 'Gbreve;': 'Ğ', + 'Gcedil;': 'Ģ', + 'Gcirc;': 'Ĝ', + 'Gcy;': 'Г', + 'Gdot;': 'Ġ', + 'Gfr;': '𝔊', + 'Gg;': '⋙', + 'Gopf;': '𝔾', + 'GreaterEqual;': '≥', + 'GreaterEqualLess;': '⋛', + 'GreaterFullEqual;': '≧', + 'GreaterGreater;': '⪢', + 'GreaterLess;': '≷', + 'GreaterSlantEqual;': '⩾', + 'GreaterTilde;': '≳', + 'Gscr;': '𝒢', + 'Gt;': '≫', + 'HARDcy;': 'Ъ', + 'Hacek;': 'ˇ', + 'Hat;': '^', + 'Hcirc;': 'Ĥ', + 'Hfr;': 'ℌ', + 'HilbertSpace;': 'ℋ', + 'Hopf;': 'ℍ', + 'HorizontalLine;': '─', + 'Hscr;': 'ℋ', + 'Hstrok;': 'Ħ', + 'HumpDownHump;': '≎', + 'HumpEqual;': '≏', + 'IEcy;': 'Е', + 'IJlig;': 'IJ', + 'IOcy;': 'Ё', + Iacute: 'Í', + 'Iacute;': 'Í', + Icirc: 'Î', + 'Icirc;': 'Î', + 'Icy;': 'И', + 'Idot;': 'İ', + 'Ifr;': 'ℑ', + Igrave: 'Ì', + 'Igrave;': 'Ì', + 'Im;': 'ℑ', + 'Imacr;': 'Ī', + 'ImaginaryI;': 'ⅈ', + 'Implies;': '⇒', + 'Int;': '∬', + 'Integral;': '∫', + 'Intersection;': '⋂', + 'InvisibleComma;': '⁣', + 'InvisibleTimes;': '⁢', + 'Iogon;': 'Į', + 'Iopf;': '𝕀', + 'Iota;': 'Ι', + 'Iscr;': 'ℐ', + 'Itilde;': 'Ĩ', + 'Iukcy;': 'І', + Iuml: 'Ï', + 'Iuml;': 'Ï', + 'Jcirc;': 'Ĵ', + 'Jcy;': 'Й', + 'Jfr;': '𝔍', + 'Jopf;': '𝕁', + 'Jscr;': '𝒥', + 'Jsercy;': 'Ј', + 'Jukcy;': 'Є', + 'KHcy;': 'Х', + 'KJcy;': 'Ќ', + 'Kappa;': 'Κ', + 'Kcedil;': 'Ķ', + 'Kcy;': 'К', + 'Kfr;': '𝔎', + 'Kopf;': '𝕂', + 'Kscr;': '𝒦', + 'LJcy;': 'Љ', + LT: '<', + 'LT;': '<', + 'Lacute;': 'Ĺ', + 'Lambda;': 'Λ', + 'Lang;': '⟪', + 'Laplacetrf;': 'ℒ', + 'Larr;': '↞', + 'Lcaron;': 'Ľ', + 'Lcedil;': 'Ļ', + 'Lcy;': 'Л', + 'LeftAngleBracket;': '⟨', + 'LeftArrow;': '←', + 'LeftArrowBar;': '⇤', + 'LeftArrowRightArrow;': '⇆', + 'LeftCeiling;': '⌈', + 'LeftDoubleBracket;': '⟦', + 'LeftDownTeeVector;': '⥡', + 'LeftDownVector;': '⇃', + 'LeftDownVectorBar;': '⥙', + 'LeftFloor;': '⌊', + 'LeftRightArrow;': '↔', + 'LeftRightVector;': '⥎', + 'LeftTee;': '⊣', + 'LeftTeeArrow;': '↤', + 'LeftTeeVector;': '⥚', + 'LeftTriangle;': '⊲', + 'LeftTriangleBar;': '⧏', + 'LeftTriangleEqual;': '⊴', + 'LeftUpDownVector;': '⥑', + 'LeftUpTeeVector;': '⥠', + 'LeftUpVector;': '↿', + 'LeftUpVectorBar;': '⥘', + 'LeftVector;': '↼', + 'LeftVectorBar;': '⥒', + 'Leftarrow;': '⇐', + 'Leftrightarrow;': '⇔', + 'LessEqualGreater;': '⋚', + 'LessFullEqual;': '≦', + 'LessGreater;': '≶', + 'LessLess;': '⪡', + 'LessSlantEqual;': '⩽', + 'LessTilde;': '≲', + 'Lfr;': '𝔏', + 'Ll;': '⋘', + 'Lleftarrow;': '⇚', + 'Lmidot;': 'Ŀ', + 'LongLeftArrow;': '⟵', + 'LongLeftRightArrow;': '⟷', + 'LongRightArrow;': '⟶', + 'Longleftarrow;': '⟸', + 'Longleftrightarrow;': '⟺', + 'Longrightarrow;': '⟹', + 'Lopf;': '𝕃', + 'LowerLeftArrow;': '↙', + 'LowerRightArrow;': '↘', + 'Lscr;': 'ℒ', + 'Lsh;': '↰', + 'Lstrok;': 'Ł', + 'Lt;': '≪', + 'Map;': '⤅', + 'Mcy;': 'М', + 'MediumSpace;': ' ', + 'Mellintrf;': 'ℳ', + 'Mfr;': '𝔐', + 'MinusPlus;': '∓', + 'Mopf;': '𝕄', + 'Mscr;': 'ℳ', + 'Mu;': 'Μ', + 'NJcy;': 'Њ', + 'Nacute;': 'Ń', + 'Ncaron;': 'Ň', + 'Ncedil;': 'Ņ', + 'Ncy;': 'Н', + 'NegativeMediumSpace;': '​', + 'NegativeThickSpace;': '​', + 'NegativeThinSpace;': '​', + 'NegativeVeryThinSpace;': '​', + 'NestedGreaterGreater;': '≫', + 'NestedLessLess;': '≪', + 'NewLine;': '\n', + 'Nfr;': '𝔑', + 'NoBreak;': '⁠', + 'NonBreakingSpace;': ' ', + 'Nopf;': 'ℕ', + 'Not;': '⫬', + 'NotCongruent;': '≢', + 'NotCupCap;': '≭', + 'NotDoubleVerticalBar;': '∦', + 'NotElement;': '∉', + 'NotEqual;': '≠', + 'NotEqualTilde;': '≂̸', + 'NotExists;': '∄', + 'NotGreater;': '≯', + 'NotGreaterEqual;': '≱', + 'NotGreaterFullEqual;': '≧̸', + 'NotGreaterGreater;': '≫̸', + 'NotGreaterLess;': '≹', + 'NotGreaterSlantEqual;': '⩾̸', + 'NotGreaterTilde;': '≵', + 'NotHumpDownHump;': '≎̸', + 'NotHumpEqual;': '≏̸', + 'NotLeftTriangle;': '⋪', + 'NotLeftTriangleBar;': '⧏̸', + 'NotLeftTriangleEqual;': '⋬', + 'NotLess;': '≮', + 'NotLessEqual;': '≰', + 'NotLessGreater;': '≸', + 'NotLessLess;': '≪̸', + 'NotLessSlantEqual;': '⩽̸', + 'NotLessTilde;': '≴', + 'NotNestedGreaterGreater;': '⪢̸', + 'NotNestedLessLess;': '⪡̸', + 'NotPrecedes;': '⊀', + 'NotPrecedesEqual;': '⪯̸', + 'NotPrecedesSlantEqual;': '⋠', + 'NotReverseElement;': '∌', + 'NotRightTriangle;': '⋫', + 'NotRightTriangleBar;': '⧐̸', + 'NotRightTriangleEqual;': '⋭', + 'NotSquareSubset;': '⊏̸', + 'NotSquareSubsetEqual;': '⋢', + 'NotSquareSuperset;': '⊐̸', + 'NotSquareSupersetEqual;': '⋣', + 'NotSubset;': '⊂⃒', + 'NotSubsetEqual;': '⊈', + 'NotSucceeds;': '⊁', + 'NotSucceedsEqual;': '⪰̸', + 'NotSucceedsSlantEqual;': '⋡', + 'NotSucceedsTilde;': '≿̸', + 'NotSuperset;': '⊃⃒', + 'NotSupersetEqual;': '⊉', + 'NotTilde;': '≁', + 'NotTildeEqual;': '≄', + 'NotTildeFullEqual;': '≇', + 'NotTildeTilde;': '≉', + 'NotVerticalBar;': '∤', + 'Nscr;': '𝒩', + Ntilde: 'Ñ', + 'Ntilde;': 'Ñ', + 'Nu;': 'Ν', + 'OElig;': 'Œ', + Oacute: 'Ó', + 'Oacute;': 'Ó', + Ocirc: 'Ô', + 'Ocirc;': 'Ô', + 'Ocy;': 'О', + 'Odblac;': 'Ő', + 'Ofr;': '𝔒', + Ograve: 'Ò', + 'Ograve;': 'Ò', + 'Omacr;': 'Ō', + 'Omega;': 'Ω', + 'Omicron;': 'Ο', + 'Oopf;': '𝕆', + 'OpenCurlyDoubleQuote;': '“', + 'OpenCurlyQuote;': '‘', + 'Or;': '⩔', + 'Oscr;': '𝒪', + Oslash: 'Ø', + 'Oslash;': 'Ø', + Otilde: 'Õ', + 'Otilde;': 'Õ', + 'Otimes;': '⨷', + Ouml: 'Ö', + 'Ouml;': 'Ö', + 'OverBar;': '‾', + 'OverBrace;': '⏞', + 'OverBracket;': '⎴', + 'OverParenthesis;': '⏜', + 'PartialD;': '∂', + 'Pcy;': 'П', + 'Pfr;': '𝔓', + 'Phi;': 'Φ', + 'Pi;': 'Π', + 'PlusMinus;': '±', + 'Poincareplane;': 'ℌ', + 'Popf;': 'ℙ', + 'Pr;': '⪻', + 'Precedes;': '≺', + 'PrecedesEqual;': '⪯', + 'PrecedesSlantEqual;': '≼', + 'PrecedesTilde;': '≾', + 'Prime;': '″', + 'Product;': '∏', + 'Proportion;': '∷', + 'Proportional;': '∝', + 'Pscr;': '𝒫', + 'Psi;': 'Ψ', + QUOT: '"', + 'QUOT;': '"', + 'Qfr;': '𝔔', + 'Qopf;': 'ℚ', + 'Qscr;': '𝒬', + 'RBarr;': '⤐', + REG: '®', + 'REG;': '®', + 'Racute;': 'Ŕ', + 'Rang;': '⟫', + 'Rarr;': '↠', + 'Rarrtl;': '⤖', + 'Rcaron;': 'Ř', + 'Rcedil;': 'Ŗ', + 'Rcy;': 'Р', + 'Re;': 'ℜ', + 'ReverseElement;': '∋', + 'ReverseEquilibrium;': '⇋', + 'ReverseUpEquilibrium;': '⥯', + 'Rfr;': 'ℜ', + 'Rho;': 'Ρ', + 'RightAngleBracket;': '⟩', + 'RightArrow;': '→', + 'RightArrowBar;': '⇥', + 'RightArrowLeftArrow;': '⇄', + 'RightCeiling;': '⌉', + 'RightDoubleBracket;': '⟧', + 'RightDownTeeVector;': '⥝', + 'RightDownVector;': '⇂', + 'RightDownVectorBar;': '⥕', + 'RightFloor;': '⌋', + 'RightTee;': '⊢', + 'RightTeeArrow;': '↦', + 'RightTeeVector;': '⥛', + 'RightTriangle;': '⊳', + 'RightTriangleBar;': '⧐', + 'RightTriangleEqual;': '⊵', + 'RightUpDownVector;': '⥏', + 'RightUpTeeVector;': '⥜', + 'RightUpVector;': '↾', + 'RightUpVectorBar;': '⥔', + 'RightVector;': '⇀', + 'RightVectorBar;': '⥓', + 'Rightarrow;': '⇒', + 'Ropf;': 'ℝ', + 'RoundImplies;': '⥰', + 'Rrightarrow;': '⇛', + 'Rscr;': 'ℛ', + 'Rsh;': '↱', + 'RuleDelayed;': '⧴', + 'SHCHcy;': 'Щ', + 'SHcy;': 'Ш', + 'SOFTcy;': 'Ь', + 'Sacute;': 'Ś', + 'Sc;': '⪼', + 'Scaron;': 'Š', + 'Scedil;': 'Ş', + 'Scirc;': 'Ŝ', + 'Scy;': 'С', + 'Sfr;': '𝔖', + 'ShortDownArrow;': '↓', + 'ShortLeftArrow;': '←', + 'ShortRightArrow;': '→', + 'ShortUpArrow;': '↑', + 'Sigma;': 'Σ', + 'SmallCircle;': '∘', + 'Sopf;': '𝕊', + 'Sqrt;': '√', + 'Square;': '□', + 'SquareIntersection;': '⊓', + 'SquareSubset;': '⊏', + 'SquareSubsetEqual;': '⊑', + 'SquareSuperset;': '⊐', + 'SquareSupersetEqual;': '⊒', + 'SquareUnion;': '⊔', + 'Sscr;': '𝒮', + 'Star;': '⋆', + 'Sub;': '⋐', + 'Subset;': '⋐', + 'SubsetEqual;': '⊆', + 'Succeeds;': '≻', + 'SucceedsEqual;': '⪰', + 'SucceedsSlantEqual;': '≽', + 'SucceedsTilde;': '≿', + 'SuchThat;': '∋', + 'Sum;': '∑', + 'Sup;': '⋑', + 'Superset;': '⊃', + 'SupersetEqual;': '⊇', + 'Supset;': '⋑', + THORN: 'Þ', + 'THORN;': 'Þ', + 'TRADE;': '™', + 'TSHcy;': 'Ћ', + 'TScy;': 'Ц', + 'Tab;': '\t', + 'Tau;': 'Τ', + 'Tcaron;': 'Ť', + 'Tcedil;': 'Ţ', + 'Tcy;': 'Т', + 'Tfr;': '𝔗', + 'Therefore;': '∴', + 'Theta;': 'Θ', + 'ThickSpace;': '  ', + 'ThinSpace;': ' ', + 'Tilde;': '∼', + 'TildeEqual;': '≃', + 'TildeFullEqual;': '≅', + 'TildeTilde;': '≈', + 'Topf;': '𝕋', + 'TripleDot;': '⃛', + 'Tscr;': '𝒯', + 'Tstrok;': 'Ŧ', + Uacute: 'Ú', + 'Uacute;': 'Ú', + 'Uarr;': '↟', + 'Uarrocir;': '⥉', + 'Ubrcy;': 'Ў', + 'Ubreve;': 'Ŭ', + Ucirc: 'Û', + 'Ucirc;': 'Û', + 'Ucy;': 'У', + 'Udblac;': 'Ű', + 'Ufr;': '𝔘', + Ugrave: 'Ù', + 'Ugrave;': 'Ù', + 'Umacr;': 'Ū', + 'UnderBar;': '_', + 'UnderBrace;': '⏟', + 'UnderBracket;': '⎵', + 'UnderParenthesis;': '⏝', + 'Union;': '⋃', + 'UnionPlus;': '⊎', + 'Uogon;': 'Ų', + 'Uopf;': '𝕌', + 'UpArrow;': '↑', + 'UpArrowBar;': '⤒', + 'UpArrowDownArrow;': '⇅', + 'UpDownArrow;': '↕', + 'UpEquilibrium;': '⥮', + 'UpTee;': '⊥', + 'UpTeeArrow;': '↥', + 'Uparrow;': '⇑', + 'Updownarrow;': '⇕', + 'UpperLeftArrow;': '↖', + 'UpperRightArrow;': '↗', + 'Upsi;': 'ϒ', + 'Upsilon;': 'Υ', + 'Uring;': 'Ů', + 'Uscr;': '𝒰', + 'Utilde;': 'Ũ', + Uuml: 'Ü', + 'Uuml;': 'Ü', + 'VDash;': '⊫', + 'Vbar;': '⫫', + 'Vcy;': 'В', + 'Vdash;': '⊩', + 'Vdashl;': '⫦', + 'Vee;': '⋁', + 'Verbar;': '‖', + 'Vert;': '‖', + 'VerticalBar;': '∣', + 'VerticalLine;': '|', + 'VerticalSeparator;': '❘', + 'VerticalTilde;': '≀', + 'VeryThinSpace;': ' ', + 'Vfr;': '𝔙', + 'Vopf;': '𝕍', + 'Vscr;': '𝒱', + 'Vvdash;': '⊪', + 'Wcirc;': 'Ŵ', + 'Wedge;': '⋀', + 'Wfr;': '𝔚', + 'Wopf;': '𝕎', + 'Wscr;': '𝒲', + 'Xfr;': '𝔛', + 'Xi;': 'Ξ', + 'Xopf;': '𝕏', + 'Xscr;': '𝒳', + 'YAcy;': 'Я', + 'YIcy;': 'Ї', + 'YUcy;': 'Ю', + Yacute: 'Ý', + 'Yacute;': 'Ý', + 'Ycirc;': 'Ŷ', + 'Ycy;': 'Ы', + 'Yfr;': '𝔜', + 'Yopf;': '𝕐', + 'Yscr;': '𝒴', + 'Yuml;': 'Ÿ', + 'ZHcy;': 'Ж', + 'Zacute;': 'Ź', + 'Zcaron;': 'Ž', + 'Zcy;': 'З', + 'Zdot;': 'Ż', + 'ZeroWidthSpace;': '​', + 'Zeta;': 'Ζ', + 'Zfr;': 'ℨ', + 'Zopf;': 'ℤ', + 'Zscr;': '𝒵', + aacute: 'á', + 'aacute;': 'á', + 'abreve;': 'ă', + 'ac;': '∾', + 'acE;': '∾̳', + 'acd;': '∿', + acirc: 'â', + 'acirc;': 'â', + acute: '´', + 'acute;': '´', + 'acy;': 'а', + aelig: 'æ', + 'aelig;': 'æ', + 'af;': '⁡', + 'afr;': '𝔞', + agrave: 'à', + 'agrave;': 'à', + 'alefsym;': 'ℵ', + 'aleph;': 'ℵ', + 'alpha;': 'α', + 'amacr;': 'ā', + 'amalg;': '⨿', + amp: '&', + 'amp;': '&', + 'and;': '∧', + 'andand;': '⩕', + 'andd;': '⩜', + 'andslope;': '⩘', + 'andv;': '⩚', + 'ang;': '∠', + 'ange;': '⦤', + 'angle;': '∠', + 'angmsd;': '∡', + 'angmsdaa;': '⦨', + 'angmsdab;': '⦩', + 'angmsdac;': '⦪', + 'angmsdad;': '⦫', + 'angmsdae;': '⦬', + 'angmsdaf;': '⦭', + 'angmsdag;': '⦮', + 'angmsdah;': '⦯', + 'angrt;': '∟', + 'angrtvb;': '⊾', + 'angrtvbd;': '⦝', + 'angsph;': '∢', + 'angst;': 'Å', + 'angzarr;': '⍼', + 'aogon;': 'ą', + 'aopf;': '𝕒', + 'ap;': '≈', + 'apE;': '⩰', + 'apacir;': '⩯', + 'ape;': '≊', + 'apid;': '≋', + 'apos;': "'", + 'approx;': '≈', + 'approxeq;': '≊', + aring: 'å', + 'aring;': 'å', + 'ascr;': '𝒶', + 'ast;': '*', + 'asymp;': '≈', + 'asympeq;': '≍', + atilde: 'ã', + 'atilde;': 'ã', + auml: 'ä', + 'auml;': 'ä', + 'awconint;': '∳', + 'awint;': '⨑', + 'bNot;': '⫭', + 'backcong;': '≌', + 'backepsilon;': '϶', + 'backprime;': '‵', + 'backsim;': '∽', + 'backsimeq;': '⋍', + 'barvee;': '⊽', + 'barwed;': '⌅', + 'barwedge;': '⌅', + 'bbrk;': '⎵', + 'bbrktbrk;': '⎶', + 'bcong;': '≌', + 'bcy;': 'б', + 'bdquo;': '„', + 'becaus;': '∵', + 'because;': '∵', + 'bemptyv;': '⦰', + 'bepsi;': '϶', + 'bernou;': 'ℬ', + 'beta;': 'β', + 'beth;': 'ℶ', + 'between;': '≬', + 'bfr;': '𝔟', + 'bigcap;': '⋂', + 'bigcirc;': '◯', + 'bigcup;': '⋃', + 'bigodot;': '⨀', + 'bigoplus;': '⨁', + 'bigotimes;': '⨂', + 'bigsqcup;': '⨆', + 'bigstar;': '★', + 'bigtriangledown;': '▽', + 'bigtriangleup;': '△', + 'biguplus;': '⨄', + 'bigvee;': '⋁', + 'bigwedge;': '⋀', + 'bkarow;': '⤍', + 'blacklozenge;': '⧫', + 'blacksquare;': '▪', + 'blacktriangle;': '▴', + 'blacktriangledown;': '▾', + 'blacktriangleleft;': '◂', + 'blacktriangleright;': '▸', + 'blank;': '␣', + 'blk12;': '▒', + 'blk14;': '░', + 'blk34;': '▓', + 'block;': '█', + 'bne;': '=⃥', + 'bnequiv;': '≡⃥', + 'bnot;': '⌐', + 'bopf;': '𝕓', + 'bot;': '⊥', + 'bottom;': '⊥', + 'bowtie;': '⋈', + 'boxDL;': '╗', + 'boxDR;': '╔', + 'boxDl;': '╖', + 'boxDr;': '╓', + 'boxH;': '═', + 'boxHD;': '╦', + 'boxHU;': '╩', + 'boxHd;': '╤', + 'boxHu;': '╧', + 'boxUL;': '╝', + 'boxUR;': '╚', + 'boxUl;': '╜', + 'boxUr;': '╙', + 'boxV;': '║', + 'boxVH;': '╬', + 'boxVL;': '╣', + 'boxVR;': '╠', + 'boxVh;': '╫', + 'boxVl;': '╢', + 'boxVr;': '╟', + 'boxbox;': '⧉', + 'boxdL;': '╕', + 'boxdR;': '╒', + 'boxdl;': '┐', + 'boxdr;': '┌', + 'boxh;': '─', + 'boxhD;': '╥', + 'boxhU;': '╨', + 'boxhd;': '┬', + 'boxhu;': '┴', + 'boxminus;': '⊟', + 'boxplus;': '⊞', + 'boxtimes;': '⊠', + 'boxuL;': '╛', + 'boxuR;': '╘', + 'boxul;': '┘', + 'boxur;': '└', + 'boxv;': '│', + 'boxvH;': '╪', + 'boxvL;': '╡', + 'boxvR;': '╞', + 'boxvh;': '┼', + 'boxvl;': '┤', + 'boxvr;': '├', + 'bprime;': '‵', + 'breve;': '˘', + brvbar: '¦', + 'brvbar;': '¦', + 'bscr;': '𝒷', + 'bsemi;': '⁏', + 'bsim;': '∽', + 'bsime;': '⋍', + 'bsol;': '\\', + 'bsolb;': '⧅', + 'bsolhsub;': '⟈', + 'bull;': '•', + 'bullet;': '•', + 'bump;': '≎', + 'bumpE;': '⪮', + 'bumpe;': '≏', + 'bumpeq;': '≏', + 'cacute;': 'ć', + 'cap;': '∩', + 'capand;': '⩄', + 'capbrcup;': '⩉', + 'capcap;': '⩋', + 'capcup;': '⩇', + 'capdot;': '⩀', + 'caps;': '∩︀', + 'caret;': '⁁', + 'caron;': 'ˇ', + 'ccaps;': '⩍', + 'ccaron;': 'č', + ccedil: 'ç', + 'ccedil;': 'ç', + 'ccirc;': 'ĉ', + 'ccups;': '⩌', + 'ccupssm;': '⩐', + 'cdot;': 'ċ', + cedil: '¸', + 'cedil;': '¸', + 'cemptyv;': '⦲', + cent: '¢', + 'cent;': '¢', + 'centerdot;': '·', + 'cfr;': '𝔠', + 'chcy;': 'ч', + 'check;': '✓', + 'checkmark;': '✓', + 'chi;': 'χ', + 'cir;': '○', + 'cirE;': '⧃', + 'circ;': 'ˆ', + 'circeq;': '≗', + 'circlearrowleft;': '↺', + 'circlearrowright;': '↻', + 'circledR;': '®', + 'circledS;': 'Ⓢ', + 'circledast;': '⊛', + 'circledcirc;': '⊚', + 'circleddash;': '⊝', + 'cire;': '≗', + 'cirfnint;': '⨐', + 'cirmid;': '⫯', + 'cirscir;': '⧂', + 'clubs;': '♣', + 'clubsuit;': '♣', + 'colon;': ':', + 'colone;': '≔', + 'coloneq;': '≔', + 'comma;': ',', + 'commat;': '@', + 'comp;': '∁', + 'compfn;': '∘', + 'complement;': '∁', + 'complexes;': 'ℂ', + 'cong;': '≅', + 'congdot;': '⩭', + 'conint;': '∮', + 'copf;': '𝕔', + 'coprod;': '∐', + copy: '©', + 'copy;': '©', + 'copysr;': '℗', + 'crarr;': '↵', + 'cross;': '✗', + 'cscr;': '𝒸', + 'csub;': '⫏', + 'csube;': '⫑', + 'csup;': '⫐', + 'csupe;': '⫒', + 'ctdot;': '⋯', + 'cudarrl;': '⤸', + 'cudarrr;': '⤵', + 'cuepr;': '⋞', + 'cuesc;': '⋟', + 'cularr;': '↶', + 'cularrp;': '⤽', + 'cup;': '∪', + 'cupbrcap;': '⩈', + 'cupcap;': '⩆', + 'cupcup;': '⩊', + 'cupdot;': '⊍', + 'cupor;': '⩅', + 'cups;': '∪︀', + 'curarr;': '↷', + 'curarrm;': '⤼', + 'curlyeqprec;': '⋞', + 'curlyeqsucc;': '⋟', + 'curlyvee;': '⋎', + 'curlywedge;': '⋏', + curren: '¤', + 'curren;': '¤', + 'curvearrowleft;': '↶', + 'curvearrowright;': '↷', + 'cuvee;': '⋎', + 'cuwed;': '⋏', + 'cwconint;': '∲', + 'cwint;': '∱', + 'cylcty;': '⌭', + 'dArr;': '⇓', + 'dHar;': '⥥', + 'dagger;': '†', + 'daleth;': 'ℸ', + 'darr;': '↓', + 'dash;': '‐', + 'dashv;': '⊣', + 'dbkarow;': '⤏', + 'dblac;': '˝', + 'dcaron;': 'ď', + 'dcy;': 'д', + 'dd;': 'ⅆ', + 'ddagger;': '‡', + 'ddarr;': '⇊', + 'ddotseq;': '⩷', + deg: '°', + 'deg;': '°', + 'delta;': 'δ', + 'demptyv;': '⦱', + 'dfisht;': '⥿', + 'dfr;': '𝔡', + 'dharl;': '⇃', + 'dharr;': '⇂', + 'diam;': '⋄', + 'diamond;': '⋄', + 'diamondsuit;': '♦', + 'diams;': '♦', + 'die;': '¨', + 'digamma;': 'ϝ', + 'disin;': '⋲', + 'div;': '÷', + divide: '÷', + 'divide;': '÷', + 'divideontimes;': '⋇', + 'divonx;': '⋇', + 'djcy;': 'ђ', + 'dlcorn;': '⌞', + 'dlcrop;': '⌍', + 'dollar;': '$', + 'dopf;': '𝕕', + 'dot;': '˙', + 'doteq;': '≐', + 'doteqdot;': '≑', + 'dotminus;': '∸', + 'dotplus;': '∔', + 'dotsquare;': '⊡', + 'doublebarwedge;': '⌆', + 'downarrow;': '↓', + 'downdownarrows;': '⇊', + 'downharpoonleft;': '⇃', + 'downharpoonright;': '⇂', + 'drbkarow;': '⤐', + 'drcorn;': '⌟', + 'drcrop;': '⌌', + 'dscr;': '𝒹', + 'dscy;': 'ѕ', + 'dsol;': '⧶', + 'dstrok;': 'đ', + 'dtdot;': '⋱', + 'dtri;': '▿', + 'dtrif;': '▾', + 'duarr;': '⇵', + 'duhar;': '⥯', + 'dwangle;': '⦦', + 'dzcy;': 'џ', + 'dzigrarr;': '⟿', + 'eDDot;': '⩷', + 'eDot;': '≑', + eacute: 'é', + 'eacute;': 'é', + 'easter;': '⩮', + 'ecaron;': 'ě', + 'ecir;': '≖', + ecirc: 'ê', + 'ecirc;': 'ê', + 'ecolon;': '≕', + 'ecy;': 'э', + 'edot;': 'ė', + 'ee;': 'ⅇ', + 'efDot;': '≒', + 'efr;': '𝔢', + 'eg;': '⪚', + egrave: 'è', + 'egrave;': 'è', + 'egs;': '⪖', + 'egsdot;': '⪘', + 'el;': '⪙', + 'elinters;': '⏧', + 'ell;': 'ℓ', + 'els;': '⪕', + 'elsdot;': '⪗', + 'emacr;': 'ē', + 'empty;': '∅', + 'emptyset;': '∅', + 'emptyv;': '∅', + 'emsp13;': ' ', + 'emsp14;': ' ', + 'emsp;': ' ', + 'eng;': 'ŋ', + 'ensp;': ' ', + 'eogon;': 'ę', + 'eopf;': '𝕖', + 'epar;': '⋕', + 'eparsl;': '⧣', + 'eplus;': '⩱', + 'epsi;': 'ε', + 'epsilon;': 'ε', + 'epsiv;': 'ϵ', + 'eqcirc;': '≖', + 'eqcolon;': '≕', + 'eqsim;': '≂', + 'eqslantgtr;': '⪖', + 'eqslantless;': '⪕', + 'equals;': '=', + 'equest;': '≟', + 'equiv;': '≡', + 'equivDD;': '⩸', + 'eqvparsl;': '⧥', + 'erDot;': '≓', + 'erarr;': '⥱', + 'escr;': 'ℯ', + 'esdot;': '≐', + 'esim;': '≂', + 'eta;': 'η', + eth: 'ð', + 'eth;': 'ð', + euml: 'ë', + 'euml;': 'ë', + 'euro;': '€', + 'excl;': '!', + 'exist;': '∃', + 'expectation;': 'ℰ', + 'exponentiale;': 'ⅇ', + 'fallingdotseq;': '≒', + 'fcy;': 'ф', + 'female;': '♀', + 'ffilig;': 'ffi', + 'fflig;': 'ff', + 'ffllig;': 'ffl', + 'ffr;': '𝔣', + 'filig;': 'fi', + 'fjlig;': 'fj', + 'flat;': '♭', + 'fllig;': 'fl', + 'fltns;': '▱', + 'fnof;': 'ƒ', + 'fopf;': '𝕗', + 'forall;': '∀', + 'fork;': '⋔', + 'forkv;': '⫙', + 'fpartint;': '⨍', + frac12: '½', + 'frac12;': '½', + 'frac13;': '⅓', + frac14: '¼', + 'frac14;': '¼', + 'frac15;': '⅕', + 'frac16;': '⅙', + 'frac18;': '⅛', + 'frac23;': '⅔', + 'frac25;': '⅖', + frac34: '¾', + 'frac34;': '¾', + 'frac35;': '⅗', + 'frac38;': '⅜', + 'frac45;': '⅘', + 'frac56;': '⅚', + 'frac58;': '⅝', + 'frac78;': '⅞', + 'frasl;': '⁄', + 'frown;': '⌢', + 'fscr;': '𝒻', + 'gE;': '≧', + 'gEl;': '⪌', + 'gacute;': 'ǵ', + 'gamma;': 'γ', + 'gammad;': 'ϝ', + 'gap;': '⪆', + 'gbreve;': 'ğ', + 'gcirc;': 'ĝ', + 'gcy;': 'г', + 'gdot;': 'ġ', + 'ge;': '≥', + 'gel;': '⋛', + 'geq;': '≥', + 'geqq;': '≧', + 'geqslant;': '⩾', + 'ges;': '⩾', + 'gescc;': '⪩', + 'gesdot;': '⪀', + 'gesdoto;': '⪂', + 'gesdotol;': '⪄', + 'gesl;': '⋛︀', + 'gesles;': '⪔', + 'gfr;': '𝔤', + 'gg;': '≫', + 'ggg;': '⋙', + 'gimel;': 'ℷ', + 'gjcy;': 'ѓ', + 'gl;': '≷', + 'glE;': '⪒', + 'gla;': '⪥', + 'glj;': '⪤', + 'gnE;': '≩', + 'gnap;': '⪊', + 'gnapprox;': '⪊', + 'gne;': '⪈', + 'gneq;': '⪈', + 'gneqq;': '≩', + 'gnsim;': '⋧', + 'gopf;': '𝕘', + 'grave;': '`', + 'gscr;': 'ℊ', + 'gsim;': '≳', + 'gsime;': '⪎', + 'gsiml;': '⪐', + gt: '>', + 'gt;': '>', + 'gtcc;': '⪧', + 'gtcir;': '⩺', + 'gtdot;': '⋗', + 'gtlPar;': '⦕', + 'gtquest;': '⩼', + 'gtrapprox;': '⪆', + 'gtrarr;': '⥸', + 'gtrdot;': '⋗', + 'gtreqless;': '⋛', + 'gtreqqless;': '⪌', + 'gtrless;': '≷', + 'gtrsim;': '≳', + 'gvertneqq;': '≩︀', + 'gvnE;': '≩︀', + 'hArr;': '⇔', + 'hairsp;': ' ', + 'half;': '½', + 'hamilt;': 'ℋ', + 'hardcy;': 'ъ', + 'harr;': '↔', + 'harrcir;': '⥈', + 'harrw;': '↭', + 'hbar;': 'ℏ', + 'hcirc;': 'ĥ', + 'hearts;': '♥', + 'heartsuit;': '♥', + 'hellip;': '…', + 'hercon;': '⊹', + 'hfr;': '𝔥', + 'hksearow;': '⤥', + 'hkswarow;': '⤦', + 'hoarr;': '⇿', + 'homtht;': '∻', + 'hookleftarrow;': '↩', + 'hookrightarrow;': '↪', + 'hopf;': '𝕙', + 'horbar;': '―', + 'hscr;': '𝒽', + 'hslash;': 'ℏ', + 'hstrok;': 'ħ', + 'hybull;': '⁃', + 'hyphen;': '‐', + iacute: 'í', + 'iacute;': 'í', + 'ic;': '⁣', + icirc: 'î', + 'icirc;': 'î', + 'icy;': 'и', + 'iecy;': 'е', + iexcl: '¡', + 'iexcl;': '¡', + 'iff;': '⇔', + 'ifr;': '𝔦', + igrave: 'ì', + 'igrave;': 'ì', + 'ii;': 'ⅈ', + 'iiiint;': '⨌', + 'iiint;': '∭', + 'iinfin;': '⧜', + 'iiota;': '℩', + 'ijlig;': 'ij', + 'imacr;': 'ī', + 'image;': 'ℑ', + 'imagline;': 'ℐ', + 'imagpart;': 'ℑ', + 'imath;': 'ı', + 'imof;': '⊷', + 'imped;': 'Ƶ', + 'in;': '∈', + 'incare;': '℅', + 'infin;': '∞', + 'infintie;': '⧝', + 'inodot;': 'ı', + 'int;': '∫', + 'intcal;': '⊺', + 'integers;': 'ℤ', + 'intercal;': '⊺', + 'intlarhk;': '⨗', + 'intprod;': '⨼', + 'iocy;': 'ё', + 'iogon;': 'į', + 'iopf;': '𝕚', + 'iota;': 'ι', + 'iprod;': '⨼', + iquest: '¿', + 'iquest;': '¿', + 'iscr;': '𝒾', + 'isin;': '∈', + 'isinE;': '⋹', + 'isindot;': '⋵', + 'isins;': '⋴', + 'isinsv;': '⋳', + 'isinv;': '∈', + 'it;': '⁢', + 'itilde;': 'ĩ', + 'iukcy;': 'і', + iuml: 'ï', + 'iuml;': 'ï', + 'jcirc;': 'ĵ', + 'jcy;': 'й', + 'jfr;': '𝔧', + 'jmath;': 'ȷ', + 'jopf;': '𝕛', + 'jscr;': '𝒿', + 'jsercy;': 'ј', + 'jukcy;': 'є', + 'kappa;': 'κ', + 'kappav;': 'ϰ', + 'kcedil;': 'ķ', + 'kcy;': 'к', + 'kfr;': '𝔨', + 'kgreen;': 'ĸ', + 'khcy;': 'х', + 'kjcy;': 'ќ', + 'kopf;': '𝕜', + 'kscr;': '𝓀', + 'lAarr;': '⇚', + 'lArr;': '⇐', + 'lAtail;': '⤛', + 'lBarr;': '⤎', + 'lE;': '≦', + 'lEg;': '⪋', + 'lHar;': '⥢', + 'lacute;': 'ĺ', + 'laemptyv;': '⦴', + 'lagran;': 'ℒ', + 'lambda;': 'λ', + 'lang;': '⟨', + 'langd;': '⦑', + 'langle;': '⟨', + 'lap;': '⪅', + laquo: '«', + 'laquo;': '«', + 'larr;': '←', + 'larrb;': '⇤', + 'larrbfs;': '⤟', + 'larrfs;': '⤝', + 'larrhk;': '↩', + 'larrlp;': '↫', + 'larrpl;': '⤹', + 'larrsim;': '⥳', + 'larrtl;': '↢', + 'lat;': '⪫', + 'latail;': '⤙', + 'late;': '⪭', + 'lates;': '⪭︀', + 'lbarr;': '⤌', + 'lbbrk;': '❲', + 'lbrace;': '{', + 'lbrack;': '[', + 'lbrke;': '⦋', + 'lbrksld;': '⦏', + 'lbrkslu;': '⦍', + 'lcaron;': 'ľ', + 'lcedil;': 'ļ', + 'lceil;': '⌈', + 'lcub;': '{', + 'lcy;': 'л', + 'ldca;': '⤶', + 'ldquo;': '“', + 'ldquor;': '„', + 'ldrdhar;': '⥧', + 'ldrushar;': '⥋', + 'ldsh;': '↲', + 'le;': '≤', + 'leftarrow;': '←', + 'leftarrowtail;': '↢', + 'leftharpoondown;': '↽', + 'leftharpoonup;': '↼', + 'leftleftarrows;': '⇇', + 'leftrightarrow;': '↔', + 'leftrightarrows;': '⇆', + 'leftrightharpoons;': '⇋', + 'leftrightsquigarrow;': '↭', + 'leftthreetimes;': '⋋', + 'leg;': '⋚', + 'leq;': '≤', + 'leqq;': '≦', + 'leqslant;': '⩽', + 'les;': '⩽', + 'lescc;': '⪨', + 'lesdot;': '⩿', + 'lesdoto;': '⪁', + 'lesdotor;': '⪃', + 'lesg;': '⋚︀', + 'lesges;': '⪓', + 'lessapprox;': '⪅', + 'lessdot;': '⋖', + 'lesseqgtr;': '⋚', + 'lesseqqgtr;': '⪋', + 'lessgtr;': '≶', + 'lesssim;': '≲', + 'lfisht;': '⥼', + 'lfloor;': '⌊', + 'lfr;': '𝔩', + 'lg;': '≶', + 'lgE;': '⪑', + 'lhard;': '↽', + 'lharu;': '↼', + 'lharul;': '⥪', + 'lhblk;': '▄', + 'ljcy;': 'љ', + 'll;': '≪', + 'llarr;': '⇇', + 'llcorner;': '⌞', + 'llhard;': '⥫', + 'lltri;': '◺', + 'lmidot;': 'ŀ', + 'lmoust;': '⎰', + 'lmoustache;': '⎰', + 'lnE;': '≨', + 'lnap;': '⪉', + 'lnapprox;': '⪉', + 'lne;': '⪇', + 'lneq;': '⪇', + 'lneqq;': '≨', + 'lnsim;': '⋦', + 'loang;': '⟬', + 'loarr;': '⇽', + 'lobrk;': '⟦', + 'longleftarrow;': '⟵', + 'longleftrightarrow;': '⟷', + 'longmapsto;': '⟼', + 'longrightarrow;': '⟶', + 'looparrowleft;': '↫', + 'looparrowright;': '↬', + 'lopar;': '⦅', + 'lopf;': '𝕝', + 'loplus;': '⨭', + 'lotimes;': '⨴', + 'lowast;': '∗', + 'lowbar;': '_', + 'loz;': '◊', + 'lozenge;': '◊', + 'lozf;': '⧫', + 'lpar;': '(', + 'lparlt;': '⦓', + 'lrarr;': '⇆', + 'lrcorner;': '⌟', + 'lrhar;': '⇋', + 'lrhard;': '⥭', + 'lrm;': '‎', + 'lrtri;': '⊿', + 'lsaquo;': '‹', + 'lscr;': '𝓁', + 'lsh;': '↰', + 'lsim;': '≲', + 'lsime;': '⪍', + 'lsimg;': '⪏', + 'lsqb;': '[', + 'lsquo;': '‘', + 'lsquor;': '‚', + 'lstrok;': 'ł', + lt: '<', + 'lt;': '<', + 'ltcc;': '⪦', + 'ltcir;': '⩹', + 'ltdot;': '⋖', + 'lthree;': '⋋', + 'ltimes;': '⋉', + 'ltlarr;': '⥶', + 'ltquest;': '⩻', + 'ltrPar;': '⦖', + 'ltri;': '◃', + 'ltrie;': '⊴', + 'ltrif;': '◂', + 'lurdshar;': '⥊', + 'luruhar;': '⥦', + 'lvertneqq;': '≨︀', + 'lvnE;': '≨︀', + 'mDDot;': '∺', + macr: '¯', + 'macr;': '¯', + 'male;': '♂', + 'malt;': '✠', + 'maltese;': '✠', + 'map;': '↦', + 'mapsto;': '↦', + 'mapstodown;': '↧', + 'mapstoleft;': '↤', + 'mapstoup;': '↥', + 'marker;': '▮', + 'mcomma;': '⨩', + 'mcy;': 'м', + 'mdash;': '—', + 'measuredangle;': '∡', + 'mfr;': '𝔪', + 'mho;': '℧', + micro: 'µ', + 'micro;': 'µ', + 'mid;': '∣', + 'midast;': '*', + 'midcir;': '⫰', + middot: '·', + 'middot;': '·', + 'minus;': '−', + 'minusb;': '⊟', + 'minusd;': '∸', + 'minusdu;': '⨪', + 'mlcp;': '⫛', + 'mldr;': '…', + 'mnplus;': '∓', + 'models;': '⊧', + 'mopf;': '𝕞', + 'mp;': '∓', + 'mscr;': '𝓂', + 'mstpos;': '∾', + 'mu;': 'μ', + 'multimap;': '⊸', + 'mumap;': '⊸', + 'nGg;': '⋙̸', + 'nGt;': '≫⃒', + 'nGtv;': '≫̸', + 'nLeftarrow;': '⇍', + 'nLeftrightarrow;': '⇎', + 'nLl;': '⋘̸', + 'nLt;': '≪⃒', + 'nLtv;': '≪̸', + 'nRightarrow;': '⇏', + 'nVDash;': '⊯', + 'nVdash;': '⊮', + 'nabla;': '∇', + 'nacute;': 'ń', + 'nang;': '∠⃒', + 'nap;': '≉', + 'napE;': '⩰̸', + 'napid;': '≋̸', + 'napos;': 'ʼn', + 'napprox;': '≉', + 'natur;': '♮', + 'natural;': '♮', + 'naturals;': 'ℕ', + nbsp: ' ', + 'nbsp;': ' ', + 'nbump;': '≎̸', + 'nbumpe;': '≏̸', + 'ncap;': '⩃', + 'ncaron;': 'ň', + 'ncedil;': 'ņ', + 'ncong;': '≇', + 'ncongdot;': '⩭̸', + 'ncup;': '⩂', + 'ncy;': 'н', + 'ndash;': '–', + 'ne;': '≠', + 'neArr;': '⇗', + 'nearhk;': '⤤', + 'nearr;': '↗', + 'nearrow;': '↗', + 'nedot;': '≐̸', + 'nequiv;': '≢', + 'nesear;': '⤨', + 'nesim;': '≂̸', + 'nexist;': '∄', + 'nexists;': '∄', + 'nfr;': '𝔫', + 'ngE;': '≧̸', + 'nge;': '≱', + 'ngeq;': '≱', + 'ngeqq;': '≧̸', + 'ngeqslant;': '⩾̸', + 'nges;': '⩾̸', + 'ngsim;': '≵', + 'ngt;': '≯', + 'ngtr;': '≯', + 'nhArr;': '⇎', + 'nharr;': '↮', + 'nhpar;': '⫲', + 'ni;': '∋', + 'nis;': '⋼', + 'nisd;': '⋺', + 'niv;': '∋', + 'njcy;': 'њ', + 'nlArr;': '⇍', + 'nlE;': '≦̸', + 'nlarr;': '↚', + 'nldr;': '‥', + 'nle;': '≰', + 'nleftarrow;': '↚', + 'nleftrightarrow;': '↮', + 'nleq;': '≰', + 'nleqq;': '≦̸', + 'nleqslant;': '⩽̸', + 'nles;': '⩽̸', + 'nless;': '≮', + 'nlsim;': '≴', + 'nlt;': '≮', + 'nltri;': '⋪', + 'nltrie;': '⋬', + 'nmid;': '∤', + 'nopf;': '𝕟', + not: '¬', + 'not;': '¬', + 'notin;': '∉', + 'notinE;': '⋹̸', + 'notindot;': '⋵̸', + 'notinva;': '∉', + 'notinvb;': '⋷', + 'notinvc;': '⋶', + 'notni;': '∌', + 'notniva;': '∌', + 'notnivb;': '⋾', + 'notnivc;': '⋽', + 'npar;': '∦', + 'nparallel;': '∦', + 'nparsl;': '⫽⃥', + 'npart;': '∂̸', + 'npolint;': '⨔', + 'npr;': '⊀', + 'nprcue;': '⋠', + 'npre;': '⪯̸', + 'nprec;': '⊀', + 'npreceq;': '⪯̸', + 'nrArr;': '⇏', + 'nrarr;': '↛', + 'nrarrc;': '⤳̸', + 'nrarrw;': '↝̸', + 'nrightarrow;': '↛', + 'nrtri;': '⋫', + 'nrtrie;': '⋭', + 'nsc;': '⊁', + 'nsccue;': '⋡', + 'nsce;': '⪰̸', + 'nscr;': '𝓃', + 'nshortmid;': '∤', + 'nshortparallel;': '∦', + 'nsim;': '≁', + 'nsime;': '≄', + 'nsimeq;': '≄', + 'nsmid;': '∤', + 'nspar;': '∦', + 'nsqsube;': '⋢', + 'nsqsupe;': '⋣', + 'nsub;': '⊄', + 'nsubE;': '⫅̸', + 'nsube;': '⊈', + 'nsubset;': '⊂⃒', + 'nsubseteq;': '⊈', + 'nsubseteqq;': '⫅̸', + 'nsucc;': '⊁', + 'nsucceq;': '⪰̸', + 'nsup;': '⊅', + 'nsupE;': '⫆̸', + 'nsupe;': '⊉', + 'nsupset;': '⊃⃒', + 'nsupseteq;': '⊉', + 'nsupseteqq;': '⫆̸', + 'ntgl;': '≹', + ntilde: 'ñ', + 'ntilde;': 'ñ', + 'ntlg;': '≸', + 'ntriangleleft;': '⋪', + 'ntrianglelefteq;': '⋬', + 'ntriangleright;': '⋫', + 'ntrianglerighteq;': '⋭', + 'nu;': 'ν', + 'num;': '#', + 'numero;': '№', + 'numsp;': ' ', + 'nvDash;': '⊭', + 'nvHarr;': '⤄', + 'nvap;': '≍⃒', + 'nvdash;': '⊬', + 'nvge;': '≥⃒', + 'nvgt;': '>⃒', + 'nvinfin;': '⧞', + 'nvlArr;': '⤂', + 'nvle;': '≤⃒', + 'nvlt;': '<⃒', + 'nvltrie;': '⊴⃒', + 'nvrArr;': '⤃', + 'nvrtrie;': '⊵⃒', + 'nvsim;': '∼⃒', + 'nwArr;': '⇖', + 'nwarhk;': '⤣', + 'nwarr;': '↖', + 'nwarrow;': '↖', + 'nwnear;': '⤧', + 'oS;': 'Ⓢ', + oacute: 'ó', + 'oacute;': 'ó', + 'oast;': '⊛', + 'ocir;': '⊚', + ocirc: 'ô', + 'ocirc;': 'ô', + 'ocy;': 'о', + 'odash;': '⊝', + 'odblac;': 'ő', + 'odiv;': '⨸', + 'odot;': '⊙', + 'odsold;': '⦼', + 'oelig;': 'œ', + 'ofcir;': '⦿', + 'ofr;': '𝔬', + 'ogon;': '˛', + ograve: 'ò', + 'ograve;': 'ò', + 'ogt;': '⧁', + 'ohbar;': '⦵', + 'ohm;': 'Ω', + 'oint;': '∮', + 'olarr;': '↺', + 'olcir;': '⦾', + 'olcross;': '⦻', + 'oline;': '‾', + 'olt;': '⧀', + 'omacr;': 'ō', + 'omega;': 'ω', + 'omicron;': 'ο', + 'omid;': '⦶', + 'ominus;': '⊖', + 'oopf;': '𝕠', + 'opar;': '⦷', + 'operp;': '⦹', + 'oplus;': '⊕', + 'or;': '∨', + 'orarr;': '↻', + 'ord;': '⩝', + 'order;': 'ℴ', + 'orderof;': 'ℴ', + ordf: 'ª', + 'ordf;': 'ª', + ordm: 'º', + 'ordm;': 'º', + 'origof;': '⊶', + 'oror;': '⩖', + 'orslope;': '⩗', + 'orv;': '⩛', + 'oscr;': 'ℴ', + oslash: 'ø', + 'oslash;': 'ø', + 'osol;': '⊘', + otilde: 'õ', + 'otilde;': 'õ', + 'otimes;': '⊗', + 'otimesas;': '⨶', + ouml: 'ö', + 'ouml;': 'ö', + 'ovbar;': '⌽', + 'par;': '∥', + para: '¶', + 'para;': '¶', + 'parallel;': '∥', + 'parsim;': '⫳', + 'parsl;': '⫽', + 'part;': '∂', + 'pcy;': 'п', + 'percnt;': '%', + 'period;': '.', + 'permil;': '‰', + 'perp;': '⊥', + 'pertenk;': '‱', + 'pfr;': '𝔭', + 'phi;': 'φ', + 'phiv;': 'ϕ', + 'phmmat;': 'ℳ', + 'phone;': '☎', + 'pi;': 'π', + 'pitchfork;': '⋔', + 'piv;': 'ϖ', + 'planck;': 'ℏ', + 'planckh;': 'ℎ', + 'plankv;': 'ℏ', + 'plus;': '+', + 'plusacir;': '⨣', + 'plusb;': '⊞', + 'pluscir;': '⨢', + 'plusdo;': '∔', + 'plusdu;': '⨥', + 'pluse;': '⩲', + plusmn: '±', + 'plusmn;': '±', + 'plussim;': '⨦', + 'plustwo;': '⨧', + 'pm;': '±', + 'pointint;': '⨕', + 'popf;': '𝕡', + pound: '£', + 'pound;': '£', + 'pr;': '≺', + 'prE;': '⪳', + 'prap;': '⪷', + 'prcue;': '≼', + 'pre;': '⪯', + 'prec;': '≺', + 'precapprox;': '⪷', + 'preccurlyeq;': '≼', + 'preceq;': '⪯', + 'precnapprox;': '⪹', + 'precneqq;': '⪵', + 'precnsim;': '⋨', + 'precsim;': '≾', + 'prime;': '′', + 'primes;': 'ℙ', + 'prnE;': '⪵', + 'prnap;': '⪹', + 'prnsim;': '⋨', + 'prod;': '∏', + 'profalar;': '⌮', + 'profline;': '⌒', + 'profsurf;': '⌓', + 'prop;': '∝', + 'propto;': '∝', + 'prsim;': '≾', + 'prurel;': '⊰', + 'pscr;': '𝓅', + 'psi;': 'ψ', + 'puncsp;': ' ', + 'qfr;': '𝔮', + 'qint;': '⨌', + 'qopf;': '𝕢', + 'qprime;': '⁗', + 'qscr;': '𝓆', + 'quaternions;': 'ℍ', + 'quatint;': '⨖', + 'quest;': '?', + 'questeq;': '≟', + quot: '"', + 'quot;': '"', + 'rAarr;': '⇛', + 'rArr;': '⇒', + 'rAtail;': '⤜', + 'rBarr;': '⤏', + 'rHar;': '⥤', + 'race;': '∽̱', + 'racute;': 'ŕ', + 'radic;': '√', + 'raemptyv;': '⦳', + 'rang;': '⟩', + 'rangd;': '⦒', + 'range;': '⦥', + 'rangle;': '⟩', + raquo: '»', + 'raquo;': '»', + 'rarr;': '→', + 'rarrap;': '⥵', + 'rarrb;': '⇥', + 'rarrbfs;': '⤠', + 'rarrc;': '⤳', + 'rarrfs;': '⤞', + 'rarrhk;': '↪', + 'rarrlp;': '↬', + 'rarrpl;': '⥅', + 'rarrsim;': '⥴', + 'rarrtl;': '↣', + 'rarrw;': '↝', + 'ratail;': '⤚', + 'ratio;': '∶', + 'rationals;': 'ℚ', + 'rbarr;': '⤍', + 'rbbrk;': '❳', + 'rbrace;': '}', + 'rbrack;': ']', + 'rbrke;': '⦌', + 'rbrksld;': '⦎', + 'rbrkslu;': '⦐', + 'rcaron;': 'ř', + 'rcedil;': 'ŗ', + 'rceil;': '⌉', + 'rcub;': '}', + 'rcy;': 'р', + 'rdca;': '⤷', + 'rdldhar;': '⥩', + 'rdquo;': '”', + 'rdquor;': '”', + 'rdsh;': '↳', + 'real;': 'ℜ', + 'realine;': 'ℛ', + 'realpart;': 'ℜ', + 'reals;': 'ℝ', + 'rect;': '▭', + reg: '®', + 'reg;': '®', + 'rfisht;': '⥽', + 'rfloor;': '⌋', + 'rfr;': '𝔯', + 'rhard;': '⇁', + 'rharu;': '⇀', + 'rharul;': '⥬', + 'rho;': 'ρ', + 'rhov;': 'ϱ', + 'rightarrow;': '→', + 'rightarrowtail;': '↣', + 'rightharpoondown;': '⇁', + 'rightharpoonup;': '⇀', + 'rightleftarrows;': '⇄', + 'rightleftharpoons;': '⇌', + 'rightrightarrows;': '⇉', + 'rightsquigarrow;': '↝', + 'rightthreetimes;': '⋌', + 'ring;': '˚', + 'risingdotseq;': '≓', + 'rlarr;': '⇄', + 'rlhar;': '⇌', + 'rlm;': '‏', + 'rmoust;': '⎱', + 'rmoustache;': '⎱', + 'rnmid;': '⫮', + 'roang;': '⟭', + 'roarr;': '⇾', + 'robrk;': '⟧', + 'ropar;': '⦆', + 'ropf;': '𝕣', + 'roplus;': '⨮', + 'rotimes;': '⨵', + 'rpar;': ')', + 'rpargt;': '⦔', + 'rppolint;': '⨒', + 'rrarr;': '⇉', + 'rsaquo;': '›', + 'rscr;': '𝓇', + 'rsh;': '↱', + 'rsqb;': ']', + 'rsquo;': '’', + 'rsquor;': '’', + 'rthree;': '⋌', + 'rtimes;': '⋊', + 'rtri;': '▹', + 'rtrie;': '⊵', + 'rtrif;': '▸', + 'rtriltri;': '⧎', + 'ruluhar;': '⥨', + 'rx;': '℞', + 'sacute;': 'ś', + 'sbquo;': '‚', + 'sc;': '≻', + 'scE;': '⪴', + 'scap;': '⪸', + 'scaron;': 'š', + 'sccue;': '≽', + 'sce;': '⪰', + 'scedil;': 'ş', + 'scirc;': 'ŝ', + 'scnE;': '⪶', + 'scnap;': '⪺', + 'scnsim;': '⋩', + 'scpolint;': '⨓', + 'scsim;': '≿', + 'scy;': 'с', + 'sdot;': '⋅', + 'sdotb;': '⊡', + 'sdote;': '⩦', + 'seArr;': '⇘', + 'searhk;': '⤥', + 'searr;': '↘', + 'searrow;': '↘', + sect: '§', + 'sect;': '§', + 'semi;': ';', + 'seswar;': '⤩', + 'setminus;': '∖', + 'setmn;': '∖', + 'sext;': '✶', + 'sfr;': '𝔰', + 'sfrown;': '⌢', + 'sharp;': '♯', + 'shchcy;': 'щ', + 'shcy;': 'ш', + 'shortmid;': '∣', + 'shortparallel;': '∥', + shy: '­', + 'shy;': '­', + 'sigma;': 'σ', + 'sigmaf;': 'ς', + 'sigmav;': 'ς', + 'sim;': '∼', + 'simdot;': '⩪', + 'sime;': '≃', + 'simeq;': '≃', + 'simg;': '⪞', + 'simgE;': '⪠', + 'siml;': '⪝', + 'simlE;': '⪟', + 'simne;': '≆', + 'simplus;': '⨤', + 'simrarr;': '⥲', + 'slarr;': '←', + 'smallsetminus;': '∖', + 'smashp;': '⨳', + 'smeparsl;': '⧤', + 'smid;': '∣', + 'smile;': '⌣', + 'smt;': '⪪', + 'smte;': '⪬', + 'smtes;': '⪬︀', + 'softcy;': 'ь', + 'sol;': '/', + 'solb;': '⧄', + 'solbar;': '⌿', + 'sopf;': '𝕤', + 'spades;': '♠', + 'spadesuit;': '♠', + 'spar;': '∥', + 'sqcap;': '⊓', + 'sqcaps;': '⊓︀', + 'sqcup;': '⊔', + 'sqcups;': '⊔︀', + 'sqsub;': '⊏', + 'sqsube;': '⊑', + 'sqsubset;': '⊏', + 'sqsubseteq;': '⊑', + 'sqsup;': '⊐', + 'sqsupe;': '⊒', + 'sqsupset;': '⊐', + 'sqsupseteq;': '⊒', + 'squ;': '□', + 'square;': '□', + 'squarf;': '▪', + 'squf;': '▪', + 'srarr;': '→', + 'sscr;': '𝓈', + 'ssetmn;': '∖', + 'ssmile;': '⌣', + 'sstarf;': '⋆', + 'star;': '☆', + 'starf;': '★', + 'straightepsilon;': 'ϵ', + 'straightphi;': 'ϕ', + 'strns;': '¯', + 'sub;': '⊂', + 'subE;': '⫅', + 'subdot;': '⪽', + 'sube;': '⊆', + 'subedot;': '⫃', + 'submult;': '⫁', + 'subnE;': '⫋', + 'subne;': '⊊', + 'subplus;': '⪿', + 'subrarr;': '⥹', + 'subset;': '⊂', + 'subseteq;': '⊆', + 'subseteqq;': '⫅', + 'subsetneq;': '⊊', + 'subsetneqq;': '⫋', + 'subsim;': '⫇', + 'subsub;': '⫕', + 'subsup;': '⫓', + 'succ;': '≻', + 'succapprox;': '⪸', + 'succcurlyeq;': '≽', + 'succeq;': '⪰', + 'succnapprox;': '⪺', + 'succneqq;': '⪶', + 'succnsim;': '⋩', + 'succsim;': '≿', + 'sum;': '∑', + 'sung;': '♪', + sup1: '¹', + 'sup1;': '¹', + sup2: '²', + 'sup2;': '²', + sup3: '³', + 'sup3;': '³', + 'sup;': '⊃', + 'supE;': '⫆', + 'supdot;': '⪾', + 'supdsub;': '⫘', + 'supe;': '⊇', + 'supedot;': '⫄', + 'suphsol;': '⟉', + 'suphsub;': '⫗', + 'suplarr;': '⥻', + 'supmult;': '⫂', + 'supnE;': '⫌', + 'supne;': '⊋', + 'supplus;': '⫀', + 'supset;': '⊃', + 'supseteq;': '⊇', + 'supseteqq;': '⫆', + 'supsetneq;': '⊋', + 'supsetneqq;': '⫌', + 'supsim;': '⫈', + 'supsub;': '⫔', + 'supsup;': '⫖', + 'swArr;': '⇙', + 'swarhk;': '⤦', + 'swarr;': '↙', + 'swarrow;': '↙', + 'swnwar;': '⤪', + szlig: 'ß', + 'szlig;': 'ß', + 'target;': '⌖', + 'tau;': 'τ', + 'tbrk;': '⎴', + 'tcaron;': 'ť', + 'tcedil;': 'ţ', + 'tcy;': 'т', + 'tdot;': '⃛', + 'telrec;': '⌕', + 'tfr;': '𝔱', + 'there4;': '∴', + 'therefore;': '∴', + 'theta;': 'θ', + 'thetasym;': 'ϑ', + 'thetav;': 'ϑ', + 'thickapprox;': '≈', + 'thicksim;': '∼', + 'thinsp;': ' ', + 'thkap;': '≈', + 'thksim;': '∼', + thorn: 'þ', + 'thorn;': 'þ', + 'tilde;': '˜', + times: '×', + 'times;': '×', + 'timesb;': '⊠', + 'timesbar;': '⨱', + 'timesd;': '⨰', + 'tint;': '∭', + 'toea;': '⤨', + 'top;': '⊤', + 'topbot;': '⌶', + 'topcir;': '⫱', + 'topf;': '𝕥', + 'topfork;': '⫚', + 'tosa;': '⤩', + 'tprime;': '‴', + 'trade;': '™', + 'triangle;': '▵', + 'triangledown;': '▿', + 'triangleleft;': '◃', + 'trianglelefteq;': '⊴', + 'triangleq;': '≜', + 'triangleright;': '▹', + 'trianglerighteq;': '⊵', + 'tridot;': '◬', + 'trie;': '≜', + 'triminus;': '⨺', + 'triplus;': '⨹', + 'trisb;': '⧍', + 'tritime;': '⨻', + 'trpezium;': '⏢', + 'tscr;': '𝓉', + 'tscy;': 'ц', + 'tshcy;': 'ћ', + 'tstrok;': 'ŧ', + 'twixt;': '≬', + 'twoheadleftarrow;': '↞', + 'twoheadrightarrow;': '↠', + 'uArr;': '⇑', + 'uHar;': '⥣', + uacute: 'ú', + 'uacute;': 'ú', + 'uarr;': '↑', + 'ubrcy;': 'ў', + 'ubreve;': 'ŭ', + ucirc: 'û', + 'ucirc;': 'û', + 'ucy;': 'у', + 'udarr;': '⇅', + 'udblac;': 'ű', + 'udhar;': '⥮', + 'ufisht;': '⥾', + 'ufr;': '𝔲', + ugrave: 'ù', + 'ugrave;': 'ù', + 'uharl;': '↿', + 'uharr;': '↾', + 'uhblk;': '▀', + 'ulcorn;': '⌜', + 'ulcorner;': '⌜', + 'ulcrop;': '⌏', + 'ultri;': '◸', + 'umacr;': 'ū', + uml: '¨', + 'uml;': '¨', + 'uogon;': 'ų', + 'uopf;': '𝕦', + 'uparrow;': '↑', + 'updownarrow;': '↕', + 'upharpoonleft;': '↿', + 'upharpoonright;': '↾', + 'uplus;': '⊎', + 'upsi;': 'υ', + 'upsih;': 'ϒ', + 'upsilon;': 'υ', + 'upuparrows;': '⇈', + 'urcorn;': '⌝', + 'urcorner;': '⌝', + 'urcrop;': '⌎', + 'uring;': 'ů', + 'urtri;': '◹', + 'uscr;': '𝓊', + 'utdot;': '⋰', + 'utilde;': 'ũ', + 'utri;': '▵', + 'utrif;': '▴', + 'uuarr;': '⇈', + uuml: 'ü', + 'uuml;': 'ü', + 'uwangle;': '⦧', + 'vArr;': '⇕', + 'vBar;': '⫨', + 'vBarv;': '⫩', + 'vDash;': '⊨', + 'vangrt;': '⦜', + 'varepsilon;': 'ϵ', + 'varkappa;': 'ϰ', + 'varnothing;': '∅', + 'varphi;': 'ϕ', + 'varpi;': 'ϖ', + 'varpropto;': '∝', + 'varr;': '↕', + 'varrho;': 'ϱ', + 'varsigma;': 'ς', + 'varsubsetneq;': '⊊︀', + 'varsubsetneqq;': '⫋︀', + 'varsupsetneq;': '⊋︀', + 'varsupsetneqq;': '⫌︀', + 'vartheta;': 'ϑ', + 'vartriangleleft;': '⊲', + 'vartriangleright;': '⊳', + 'vcy;': 'в', + 'vdash;': '⊢', + 'vee;': '∨', + 'veebar;': '⊻', + 'veeeq;': '≚', + 'vellip;': '⋮', + 'verbar;': '|', + 'vert;': '|', + 'vfr;': '𝔳', + 'vltri;': '⊲', + 'vnsub;': '⊂⃒', + 'vnsup;': '⊃⃒', + 'vopf;': '𝕧', + 'vprop;': '∝', + 'vrtri;': '⊳', + 'vscr;': '𝓋', + 'vsubnE;': '⫋︀', + 'vsubne;': '⊊︀', + 'vsupnE;': '⫌︀', + 'vsupne;': '⊋︀', + 'vzigzag;': '⦚', + 'wcirc;': 'ŵ', + 'wedbar;': '⩟', + 'wedge;': '∧', + 'wedgeq;': '≙', + 'weierp;': '℘', + 'wfr;': '𝔴', + 'wopf;': '𝕨', + 'wp;': '℘', + 'wr;': '≀', + 'wreath;': '≀', + 'wscr;': '𝓌', + 'xcap;': '⋂', + 'xcirc;': '◯', + 'xcup;': '⋃', + 'xdtri;': '▽', + 'xfr;': '𝔵', + 'xhArr;': '⟺', + 'xharr;': '⟷', + 'xi;': 'ξ', + 'xlArr;': '⟸', + 'xlarr;': '⟵', + 'xmap;': '⟼', + 'xnis;': '⋻', + 'xodot;': '⨀', + 'xopf;': '𝕩', + 'xoplus;': '⨁', + 'xotime;': '⨂', + 'xrArr;': '⟹', + 'xrarr;': '⟶', + 'xscr;': '𝓍', + 'xsqcup;': '⨆', + 'xuplus;': '⨄', + 'xutri;': '△', + 'xvee;': '⋁', + 'xwedge;': '⋀', + yacute: 'ý', + 'yacute;': 'ý', + 'yacy;': 'я', + 'ycirc;': 'ŷ', + 'ycy;': 'ы', + yen: '¥', + 'yen;': '¥', + 'yfr;': '𝔶', + 'yicy;': 'ї', + 'yopf;': '𝕪', + 'yscr;': '𝓎', + 'yucy;': 'ю', + yuml: 'ÿ', + 'yuml;': 'ÿ', + 'zacute;': 'ź', + 'zcaron;': 'ž', + 'zcy;': 'з', + 'zdot;': 'ż', + 'zeetrf;': 'ℨ', + 'zeta;': 'ζ', + 'zfr;': '𝔷', + 'zhcy;': 'ж', + 'zigrarr;': '⇝', + 'zopf;': '𝕫', + 'zscr;': '𝓏', + 'zwj;': '‍', + 'zwnj;': '‌' +}; + +const numeric = /&#(x)?([0-9a-f]+);/i; +const named = new RegExp( + `&(${Object.keys(entities) + .sort((a, b) => b.length - a.length) + .join('|')})`, + 'g' +); + +/** @param {string} str */ +export function decode(str) { + return str + .replace(numeric, (_match, hex, code) => String.fromCharCode(hex ? parseInt(code, 16) : +code)) + .replace(named, (_match, entity) => entities[entity]); +} diff --git a/node_modules/@sveltejs/kit/src/core/postbuild/fallback.js b/node_modules/@sveltejs/kit/src/core/postbuild/fallback.js new file mode 100644 index 0000000..d77400a --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/postbuild/fallback.js @@ -0,0 +1,54 @@ +import { readFileSync } from 'node:fs'; +import { join } from 'node:path'; +import { pathToFileURL } from 'node:url'; +import { installPolyfills } from '../../exports/node/polyfills.js'; +import { load_config } from '../config/index.js'; +import { forked } from '../../utils/fork.js'; + +export default forked(import.meta.url, generate_fallback); + +/** + * @param {{ + * manifest_path: string; + * env: Record + * }} opts + */ +async function generate_fallback({ manifest_path, env }) { + /** @type {import('types').ValidatedKitConfig} */ + const config = (await load_config()).kit; + + installPolyfills(); + + const server_root = join(config.outDir, 'output'); + + /** @type {import('types').ServerInternalModule} */ + const { set_building } = await import(pathToFileURL(`${server_root}/server/internal.js`).href); + + /** @type {import('types').ServerModule} */ + const { Server } = await import(pathToFileURL(`${server_root}/server/index.js`).href); + + /** @type {import('@sveltejs/kit').SSRManifest} */ + const manifest = (await import(pathToFileURL(manifest_path).href)).manifest; + + set_building(); + + const server = new Server(manifest); + await server.init({ env }); + + const response = await server.respond(new Request(config.prerender.origin + '/[fallback]'), { + getClientAddress: () => { + throw new Error('Cannot read clientAddress during prerendering'); + }, + prerendering: { + fallback: true, + dependencies: new Map() + }, + read: (file) => readFileSync(join(config.files.assets, file)) + }); + + if (response.ok) { + return await response.text(); + } + + throw new Error(`Could not create a fallback page — failed with status ${response.status}`); +} diff --git a/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js b/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js new file mode 100644 index 0000000..7c84269 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js @@ -0,0 +1,537 @@ +import { existsSync, readFileSync, statSync, writeFileSync } from 'node:fs'; +import { dirname, join } from 'node:path'; +import { pathToFileURL } from 'node:url'; +import { installPolyfills } from '../../exports/node/polyfills.js'; +import { mkdirp, posixify, walk } from '../../utils/filesystem.js'; +import { decode_uri, is_root_relative, resolve } from '../../utils/url.js'; +import { escape_html } from '../../utils/escape.js'; +import { logger } from '../utils.js'; +import { load_config } from '../config/index.js'; +import { get_route_segments } from '../../utils/routing.js'; +import { queue } from './queue.js'; +import { crawl } from './crawl.js'; +import { forked } from '../../utils/fork.js'; +import * as devalue from 'devalue'; +import { createReadableStream } from '@sveltejs/kit/node'; +import generate_fallback from './fallback.js'; + +export default forked(import.meta.url, prerender); + +// https://html.spec.whatwg.org/multipage/browsing-the-web.html#scrolling-to-a-fragment +// "If fragment is the empty string, then return the special value top of the document." +// ...and +// "If decodedFragment is an ASCII case-insensitive match for the string 'top', then return the top of the document." +const SPECIAL_HASHLINKS = new Set(['', 'top']); + +/** + * @param {{ + * hash: boolean; + * out: string; + * manifest_path: string; + * metadata: import('types').ServerMetadata; + * verbose: boolean; + * env: Record + * }} opts + */ +async function prerender({ hash, out, manifest_path, metadata, verbose, env }) { + /** @type {import('@sveltejs/kit').SSRManifest} */ + const manifest = (await import(pathToFileURL(manifest_path).href)).manifest; + + /** @type {import('types').ServerInternalModule} */ + const internal = await import(pathToFileURL(`${out}/server/internal.js`).href); + + /** @type {import('types').ServerModule} */ + const { Server } = await import(pathToFileURL(`${out}/server/index.js`).href); + + // configure `import { building } from '$app/environment'` — + // essential we do this before analysing the code + internal.set_building(); + internal.set_prerendering(); + + /** + * @template {{message: string}} T + * @template {Omit} K + * @param {import('types').Logger} log + * @param {'fail' | 'warn' | 'ignore' | ((details: T) => void)} input + * @param {(details: K) => string} format + * @returns {(details: K) => void} + */ + function normalise_error_handler(log, input, format) { + switch (input) { + case 'fail': + return (details) => { + throw new Error(format(details)); + }; + case 'warn': + return (details) => { + log.error(format(details)); + }; + case 'ignore': + return () => {}; + default: + // @ts-expect-error TS thinks T might be of a different kind, but it's not + return (details) => input({ ...details, message: format(details) }); + } + } + + const OK = 2; + const REDIRECT = 3; + + /** @type {import('types').Prerendered} */ + const prerendered = { + pages: new Map(), + assets: new Map(), + redirects: new Map(), + paths: [] + }; + + /** @type {import('types').PrerenderMap} */ + const prerender_map = new Map(); + + for (const [id, { prerender }] of metadata.routes) { + if (prerender !== undefined) { + prerender_map.set(id, prerender); + } + } + + /** @type {Set} */ + const prerendered_routes = new Set(); + + /** @type {import('types').ValidatedKitConfig} */ + const config = (await load_config()).kit; + + if (hash) { + const fallback = await generate_fallback({ + manifest_path, + env + }); + + const file = output_filename('/', true); + const dest = `${config.outDir}/output/prerendered/pages/${file}`; + + mkdirp(dirname(dest)); + writeFileSync(dest, fallback); + + prerendered.pages.set('/', { file }); + + return { prerendered, prerender_map }; + } + + const emulator = await config.adapter?.emulate?.(); + + /** @type {import('types').Logger} */ + const log = logger({ verbose }); + + installPolyfills(); + + /** @type {Map} */ + const saved = new Map(); + + const handle_http_error = normalise_error_handler( + log, + config.prerender.handleHttpError, + ({ status, path, referrer, referenceType }) => { + const message = + status === 404 && !path.startsWith(config.paths.base) + ? `${path} does not begin with \`base\`, which is configured in \`paths.base\` and can be imported from \`$app/paths\` - see https://svelte.dev/docs/kit/configuration#paths for more info` + : path; + + return `${status} ${message}${referrer ? ` (${referenceType} from ${referrer})` : ''}`; + } + ); + + const handle_missing_id = normalise_error_handler( + log, + config.prerender.handleMissingId, + ({ path, id, referrers }) => { + return ( + `The following pages contain links to ${path}#${id}, but no element with id="${id}" exists on ${path} - see the \`handleMissingId\` option in https://svelte.dev/docs/kit/configuration#prerender for more info:` + + referrers.map((l) => `\n - ${l}`).join('') + ); + } + ); + + const handle_entry_generator_mismatch = normalise_error_handler( + log, + config.prerender.handleEntryGeneratorMismatch, + ({ generatedFromId, entry, matchedId }) => { + return `The entries export from ${generatedFromId} generated entry ${entry}, which was matched by ${matchedId} - see the \`handleEntryGeneratorMismatch\` option in https://svelte.dev/docs/kit/configuration#prerender for more info.`; + } + ); + + const q = queue(config.prerender.concurrency); + + /** + * @param {string} path + * @param {boolean} is_html + */ + function output_filename(path, is_html) { + const file = path.slice(config.paths.base.length + 1) || 'index.html'; + + if (is_html && !file.endsWith('.html')) { + return file + (file.endsWith('/') ? 'index.html' : '.html'); + } + + return file; + } + + const files = new Set(walk(`${out}/client`).map(posixify)); + files.add(`${config.appDir}/env.js`); + + const immutable = `${config.appDir}/immutable`; + if (existsSync(`${out}/server/${immutable}`)) { + for (const file of walk(`${out}/server/${immutable}`)) { + files.add(posixify(`${config.appDir}/immutable/${file}`)); + } + } + const seen = new Set(); + const written = new Set(); + + /** @type {Map>} */ + const expected_hashlinks = new Map(); + + /** @type {Map} */ + const actual_hashlinks = new Map(); + + /** + * @param {string | null} referrer + * @param {string} decoded + * @param {string} [encoded] + * @param {string} [generated_from_id] + */ + function enqueue(referrer, decoded, encoded, generated_from_id) { + if (seen.has(decoded)) return; + seen.add(decoded); + + const file = decoded.slice(config.paths.base.length + 1); + if (files.has(file)) return; + + return q.add(() => visit(decoded, encoded || encodeURI(decoded), referrer, generated_from_id)); + } + + /** + * @param {string} decoded + * @param {string} encoded + * @param {string?} referrer + * @param {string} [generated_from_id] + */ + async function visit(decoded, encoded, referrer, generated_from_id) { + if (!decoded.startsWith(config.paths.base)) { + handle_http_error({ status: 404, path: decoded, referrer, referenceType: 'linked' }); + return; + } + + /** @type {Map} */ + const dependencies = new Map(); + + const response = await server.respond(new Request(config.prerender.origin + encoded), { + getClientAddress() { + throw new Error('Cannot read clientAddress during prerendering'); + }, + prerendering: { + dependencies + }, + read: (file) => { + // stuff we just wrote + const filepath = saved.get(file); + if (filepath) return readFileSync(filepath); + + // stuff in `static` + return readFileSync(join(config.files.assets, file)); + }, + emulator + }); + + const encoded_id = response.headers.get('x-sveltekit-routeid'); + const decoded_id = encoded_id && decode_uri(encoded_id); + if ( + decoded_id !== null && + generated_from_id !== undefined && + decoded_id !== generated_from_id + ) { + handle_entry_generator_mismatch({ + generatedFromId: generated_from_id, + entry: decoded, + matchedId: decoded_id + }); + } + + const body = Buffer.from(await response.arrayBuffer()); + + save('pages', response, body, decoded, encoded, referrer, 'linked'); + + for (const [dependency_path, result] of dependencies) { + // this seems circuitous, but using new URL allows us to not care + // whether dependency_path is encoded or not + const encoded_dependency_path = new URL(dependency_path, 'http://localhost').pathname; + const decoded_dependency_path = decode_uri(encoded_dependency_path); + + const headers = Object.fromEntries(result.response.headers); + + const prerender = headers['x-sveltekit-prerender']; + if (prerender) { + const encoded_route_id = headers['x-sveltekit-routeid']; + if (encoded_route_id != null) { + const route_id = decode_uri(encoded_route_id); + const existing_value = prerender_map.get(route_id); + if (existing_value !== 'auto') { + prerender_map.set(route_id, prerender === 'true' ? true : 'auto'); + } + } + } + + const body = result.body ?? new Uint8Array(await result.response.arrayBuffer()); + + save( + 'dependencies', + result.response, + body, + decoded_dependency_path, + encoded_dependency_path, + decoded, + 'fetched' + ); + } + + // avoid triggering `filterSerializeResponseHeaders` guard + const headers = Object.fromEntries(response.headers); + + if (config.prerender.crawl && headers['content-type'] === 'text/html') { + const { ids, hrefs } = crawl(body.toString(), decoded); + + actual_hashlinks.set(decoded, ids); + + /** @param {string} href */ + const removePrerenderOrigin = (href) => { + if (href.startsWith(config.prerender.origin)) { + if (href === config.prerender.origin) return '/'; + if (href.at(config.prerender.origin.length) !== '/') return href; + return href.slice(config.prerender.origin.length); + } + return href; + }; + + for (const href of hrefs.map(removePrerenderOrigin)) { + if (!is_root_relative(href)) continue; + + const { pathname, search, hash } = new URL(href, 'http://localhost'); + + if (search) { + // TODO warn that query strings have no effect on statically-exported pages + } + + if (hash) { + const key = decode_uri(pathname + hash); + + if (!expected_hashlinks.has(key)) { + expected_hashlinks.set(key, new Set()); + } + + /** @type {Set} */ (expected_hashlinks.get(key)).add(decoded); + } + + void enqueue(decoded, decode_uri(pathname), pathname); + } + } + } + + /** + * @param {'pages' | 'dependencies'} category + * @param {Response} response + * @param {string | Uint8Array} body + * @param {string} decoded + * @param {string} encoded + * @param {string | null} referrer + * @param {'linked' | 'fetched'} referenceType + */ + function save(category, response, body, decoded, encoded, referrer, referenceType) { + const response_type = Math.floor(response.status / 100); + const headers = Object.fromEntries(response.headers); + + const type = headers['content-type']; + const is_html = response_type === REDIRECT || type === 'text/html'; + + const file = output_filename(decoded, is_html); + const dest = `${config.outDir}/output/prerendered/${category}/${file}`; + + if (written.has(file)) return; + + const encoded_route_id = response.headers.get('x-sveltekit-routeid'); + const route_id = encoded_route_id != null ? decode_uri(encoded_route_id) : null; + if (route_id !== null) prerendered_routes.add(route_id); + + if (response_type === REDIRECT) { + const location = headers['location']; + + if (location) { + const resolved = resolve(encoded, location); + if (is_root_relative(resolved)) { + void enqueue(decoded, decode_uri(resolved), resolved); + } + + if (!headers['x-sveltekit-normalize']) { + mkdirp(dirname(dest)); + + log.warn(`${response.status} ${decoded} -> ${location}`); + + writeFileSync( + dest, + `` + ); + + written.add(file); + + if (!prerendered.redirects.has(decoded)) { + prerendered.redirects.set(decoded, { + status: response.status, + location: resolved + }); + + prerendered.paths.push(decoded); + } + } + } else { + log.warn(`location header missing on redirect received from ${decoded}`); + } + + return; + } + + if (response.status === 200) { + if (existsSync(dest) && statSync(dest).isDirectory()) { + throw new Error( + `Cannot save ${decoded} as it is already a directory. See https://svelte.dev/docs/kit/page-options#prerender-route-conflicts for more information` + ); + } + + const dir = dirname(dest); + + if (existsSync(dir) && !statSync(dir).isDirectory()) { + const parent = decoded.split('/').slice(0, -1).join('/'); + throw new Error( + `Cannot save ${decoded} as ${parent} is already a file. See https://svelte.dev/docs/kit/page-options#prerender-route-conflicts for more information` + ); + } + + mkdirp(dir); + + log.info(`${response.status} ${decoded}`); + writeFileSync(dest, body); + written.add(file); + + if (is_html) { + prerendered.pages.set(decoded, { + file + }); + } else { + prerendered.assets.set(decoded, { + type + }); + } + + prerendered.paths.push(decoded); + } else if (response_type !== OK) { + handle_http_error({ status: response.status, path: decoded, referrer, referenceType }); + } + + manifest.assets.add(file); + saved.set(file, dest); + } + + /** @type {Array<{ id: string, entries: Array}>} */ + const route_level_entries = []; + for (const [id, { entries }] of metadata.routes.entries()) { + if (entries) { + route_level_entries.push({ id, entries }); + } + } + + let has_prerenderable_routes = false; + + for (const value of prerender_map.values()) { + if (value) { + has_prerenderable_routes = true; + break; + } + } + + if ( + (config.prerender.entries.length === 0 && route_level_entries.length === 0) || + !has_prerenderable_routes + ) { + return { prerendered, prerender_map }; + } + + log.info('Prerendering'); + + const server = new Server(manifest); + await server.init({ + env, + read: (file) => createReadableStream(`${config.outDir}/output/server/${file}`) + }); + + for (const entry of config.prerender.entries) { + if (entry === '*') { + for (const [id, prerender] of prerender_map) { + if (prerender) { + // remove optional parameters from the route + const segments = get_route_segments(id).filter((segment) => !segment.startsWith('[[')); + const processed_id = '/' + segments.join('/'); + + if (processed_id.includes('[')) continue; + const path = `/${get_route_segments(processed_id).join('/')}`; + void enqueue(null, config.paths.base + path); + } + } + } else { + void enqueue(null, config.paths.base + entry); + } + } + + for (const { id, entries } of route_level_entries) { + for (const entry of entries) { + void enqueue(null, config.paths.base + entry, undefined, id); + } + } + + await q.done(); + + // handle invalid fragment links + for (const [key, referrers] of expected_hashlinks) { + const index = key.indexOf('#'); + const path = key.slice(0, index); + const id = key.slice(index + 1); + + const hashlinks = actual_hashlinks.get(path); + // ignore fragment links to pages that were not prerendered + if (!hashlinks) continue; + + if (!hashlinks.includes(id) && !SPECIAL_HASHLINKS.has(id)) { + handle_missing_id({ id, path, referrers: Array.from(referrers) }); + } + } + + /** @type {string[]} */ + const not_prerendered = []; + + for (const [route_id, prerender] of prerender_map) { + if (prerender === true && !prerendered_routes.has(route_id)) { + not_prerendered.push(route_id); + } + } + + if (not_prerendered.length > 0) { + const list = not_prerendered.map((id) => ` - ${id}`).join('\n'); + + throw new Error( + `The following routes were marked as prerenderable, but were not prerendered because they were not found while crawling your app:\n${list}\n\nSee https://svelte.dev/docs/kit/page-options#prerender-troubleshooting for info on how to solve this` + ); + } + + return { prerendered, prerender_map }; +} diff --git a/node_modules/@sveltejs/kit/src/core/postbuild/queue.js b/node_modules/@sveltejs/kit/src/core/postbuild/queue.js new file mode 100644 index 0000000..bb58dcc --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/postbuild/queue.js @@ -0,0 +1,81 @@ +/** + * @typedef {{ + * fn: () => Promise, + * fulfil: (value: any) => void, + * reject: (error: Error) => void + * }} Task + */ + +/** @param {number} concurrency */ +export function queue(concurrency) { + /** @type {Task[]} */ + const tasks = []; + + let current = 0; + + // TODO: Whenever Node >21 is minimum supported version, we can use `Promise.withResolvers` to avoid this ceremony + /** @type {(value?: any) => void} */ + let fulfil; + + /** @type {(error: Error) => void} */ + let reject; + + let closed = false; + + const done = new Promise((f, r) => { + fulfil = f; + reject = r; + }); + + done.catch(() => { + // this is necessary in case a catch handler is never added + // to the done promise by the user + }); + + function dequeue() { + if (current < concurrency) { + const task = tasks.shift(); + + if (task) { + current += 1; + const promise = Promise.resolve(task.fn()); + + void promise + .then(task.fulfil, (err) => { + task.reject(err); + reject(err); + }) + .then(() => { + current -= 1; + dequeue(); + }); + } else if (current === 0) { + closed = true; + fulfil(); + } + } + } + + return { + /** @param {() => any} fn */ + add: (fn) => { + if (closed) throw new Error('Cannot add tasks to a queue that has ended'); + + const promise = new Promise((fulfil, reject) => { + tasks.push({ fn, fulfil, reject }); + }); + + dequeue(); + return promise; + }, + + done: () => { + if (current === 0) { + closed = true; + fulfil(); + } + + return done; + } + }; +} diff --git a/node_modules/@sveltejs/kit/src/core/sync/create_manifest_data/conflict.js b/node_modules/@sveltejs/kit/src/core/sync/create_manifest_data/conflict.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/@sveltejs/kit/src/core/sync/create_manifest_data/index.js b/node_modules/@sveltejs/kit/src/core/sync/create_manifest_data/index.js new file mode 100644 index 0000000..037f8dc --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/sync/create_manifest_data/index.js @@ -0,0 +1,596 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import process from 'node:process'; +import colors from 'kleur'; +import { lookup } from 'mrmime'; +import { list_files, runtime_directory } from '../../utils.js'; +import { posixify, resolve_entry } from '../../../utils/filesystem.js'; +import { parse_route_id } from '../../../utils/routing.js'; +import { sort_routes } from './sort.js'; +import { isSvelte5Plus } from '../utils.js'; + +/** + * Generates the manifest data used for the client-side manifest and types generation. + * @param {{ + * config: import('types').ValidatedConfig; + * fallback?: string; + * cwd?: string; + * }} opts + * @returns {import('types').ManifestData} + */ +export default function create_manifest_data({ + config, + fallback = `${runtime_directory}/components/${isSvelte5Plus() ? 'svelte-5' : 'svelte-4'}`, + cwd = process.cwd() +}) { + const assets = create_assets(config); + const hooks = create_hooks(config, cwd); + const matchers = create_matchers(config, cwd); + const { nodes, routes } = create_routes_and_nodes(cwd, config, fallback); + + for (const route of routes) { + for (const param of route.params) { + if (param.matcher && !matchers[param.matcher]) { + throw new Error(`No matcher found for parameter '${param.matcher}' in route ${route.id}`); + } + } + } + + return { + assets, + hooks, + matchers, + nodes, + routes + }; +} + +/** + * @param {import('types').ValidatedConfig} config + */ +export function create_assets(config) { + return list_files(config.kit.files.assets).map((file) => ({ + file, + size: fs.statSync(path.resolve(config.kit.files.assets, file)).size, + type: lookup(file) || null + })); +} + +/** + * @param {import('types').ValidatedConfig} config + * @param {string} cwd + */ +function create_hooks(config, cwd) { + const client = resolve_entry(config.kit.files.hooks.client); + const server = resolve_entry(config.kit.files.hooks.server); + const universal = resolve_entry(config.kit.files.hooks.universal); + + return { + client: client && posixify(path.relative(cwd, client)), + server: server && posixify(path.relative(cwd, server)), + universal: universal && posixify(path.relative(cwd, universal)) + }; +} + +/** + * @param {import('types').ValidatedConfig} config + * @param {string} cwd + */ +function create_matchers(config, cwd) { + const params_base = path.relative(cwd, config.kit.files.params); + + /** @type {Record} */ + const matchers = {}; + if (fs.existsSync(config.kit.files.params)) { + for (const file of fs.readdirSync(config.kit.files.params)) { + const ext = path.extname(file); + if (!config.kit.moduleExtensions.includes(ext)) continue; + const type = file.slice(0, -ext.length); + + if (/^\w+$/.test(type)) { + const matcher_file = path.join(params_base, file); + + // Disallow same matcher with different extensions + if (matchers[type]) { + throw new Error(`Duplicate matchers: ${matcher_file} and ${matchers[type]}`); + } else { + matchers[type] = matcher_file; + } + } else { + // Allow for matcher test collocation + if (type.endsWith('.test') || type.endsWith('.spec')) continue; + + throw new Error( + `Matcher names can only have underscores and alphanumeric characters — "${file}" is invalid` + ); + } + } + } + + return matchers; +} + +/** + * @param {import('types').ValidatedConfig} config + * @param {string} cwd + * @param {string} fallback + */ +function create_routes_and_nodes(cwd, config, fallback) { + /** @type {import('types').RouteData[]} */ + const routes = []; + + const routes_base = posixify(path.relative(cwd, config.kit.files.routes)); + + const valid_extensions = [...config.extensions, ...config.kit.moduleExtensions]; + + /** @type {import('types').PageNode[]} */ + const nodes = []; + + if (fs.existsSync(config.kit.files.routes)) { + /** + * @param {number} depth + * @param {string} id + * @param {string} segment + * @param {import('types').RouteData | null} parent + */ + const walk = (depth, id, segment, parent) => { + const unescaped = id.replace(/\[([ux])\+([^\]]+)\]/gi, (match, type, code) => { + if (match !== match.toLowerCase()) { + throw new Error(`Character escape sequence in ${id} must be lowercase`); + } + + if (!/[0-9a-f]+/.test(code)) { + throw new Error(`Invalid character escape sequence in ${id}`); + } + + if (type === 'x') { + if (code.length !== 2) { + throw new Error(`Hexadecimal escape sequence in ${id} must be two characters`); + } + + return String.fromCharCode(parseInt(code, 16)); + } else { + if (code.length < 4 || code.length > 6) { + throw new Error( + `Unicode escape sequence in ${id} must be between four and six characters` + ); + } + + return String.fromCharCode(parseInt(code, 16)); + } + }); + + if (/\]\[/.test(unescaped)) { + throw new Error(`Invalid route ${id} — parameters must be separated`); + } + + if (count_occurrences('[', id) !== count_occurrences(']', id)) { + throw new Error(`Invalid route ${id} — brackets are unbalanced`); + } + + if (/#/.test(segment)) { + // Vite will barf on files with # in them + throw new Error(`Route ${id} should be renamed to ${id.replace(/#/g, '[x+23]')}`); + } + + if (/\[\.\.\.\w+\]\/\[\[/.test(id)) { + throw new Error( + `Invalid route ${id} — an [[optional]] route segment cannot follow a [...rest] route segment` + ); + } + + if (/\[\[\.\.\./.test(id)) { + throw new Error( + `Invalid route ${id} — a rest route segment is always optional, remove the outer square brackets` + ); + } + + const { pattern, params } = parse_route_id(id); + + /** @type {import('types').RouteData} */ + const route = { + id, + parent, + + segment, + pattern, + params, + + layout: null, + error: null, + leaf: null, + page: null, + endpoint: null + }; + + // important to do this before walking children, so that child + // routes appear later + routes.push(route); + + // if we don't do this, the route map becomes unwieldy to console.log + Object.defineProperty(route, 'parent', { enumerable: false }); + + const dir = path.join(cwd, routes_base, id); + + // We can't use withFileTypes because of a NodeJs bug which returns wrong results + // with isDirectory() in case of symlinks: https://github.com/nodejs/node/issues/30646 + const files = fs.readdirSync(dir).map((name) => ({ + is_dir: fs.statSync(path.join(dir, name)).isDirectory(), + name + })); + + // process files first + for (const file of files) { + if (file.is_dir) continue; + + const ext = valid_extensions.find((ext) => file.name.endsWith(ext)); + if (!ext) continue; + + if (!file.name.startsWith('+')) { + const name = file.name.slice(0, -ext.length); + // check if it is a valid route filename but missing the + prefix + const typo = + /^(?:(page(?:@(.*))?)|(layout(?:@(.*))?)|(error))$/.test(name) || + /^(?:(server)|(page(?:(@[a-zA-Z0-9_-]*))?(\.server)?)|(layout(?:(@[a-zA-Z0-9_-]*))?(\.server)?))$/.test( + name + ); + if (typo) { + console.log( + colors + .bold() + .yellow( + `Missing route file prefix. Did you mean +${file.name}?` + + ` at ${path.join(dir, file.name)}` + ) + ); + } + + continue; + } + + if (file.name.endsWith('.d.ts')) { + let name = file.name.slice(0, -5); + const ext = valid_extensions.find((ext) => name.endsWith(ext)); + if (ext) name = name.slice(0, -ext.length); + + const valid = + /^\+(?:(page(?:@(.*))?)|(layout(?:@(.*))?)|(error))$/.test(name) || + /^\+(?:(server)|(page(?:(@[a-zA-Z0-9_-]*))?(\.server)?)|(layout(?:(@[a-zA-Z0-9_-]*))?(\.server)?))$/.test( + name + ); + + if (valid) continue; + } + + const project_relative = posixify(path.relative(cwd, path.join(dir, file.name))); + + const item = analyze( + project_relative, + file.name, + config.extensions, + config.kit.moduleExtensions + ); + + if (config.kit.router.type === 'hash' && item.kind === 'server') { + throw new Error( + `Cannot use server-only files in an app with \`router.type === 'hash': ${project_relative}` + ); + } + + /** + * @param {string} type + * @param {string} existing_file + */ + function duplicate_files_error(type, existing_file) { + return new Error( + `Multiple ${type} files found in ${routes_base}${route.id} : ${path.basename( + existing_file + )} and ${file.name}` + ); + } + + if (item.kind === 'component') { + if (item.is_error) { + route.error = { + depth, + component: project_relative + }; + } else if (item.is_layout) { + if (!route.layout) { + route.layout = { depth, child_pages: [] }; + } else if (route.layout.component) { + throw duplicate_files_error('layout component', route.layout.component); + } + + route.layout.component = project_relative; + if (item.uses_layout !== undefined) route.layout.parent_id = item.uses_layout; + } else { + if (!route.leaf) { + route.leaf = { depth }; + } else if (route.leaf.component) { + throw duplicate_files_error('page component', route.leaf.component); + } + + route.leaf.component = project_relative; + if (item.uses_layout !== undefined) route.leaf.parent_id = item.uses_layout; + } + } else if (item.is_layout) { + if (!route.layout) { + route.layout = { depth, child_pages: [] }; + } else if (route.layout[item.kind]) { + throw duplicate_files_error( + item.kind + ' layout module', + /** @type {string} */ (route.layout[item.kind]) + ); + } + + route.layout[item.kind] = project_relative; + } else if (item.is_page) { + if (!route.leaf) { + route.leaf = { depth }; + } else if (route.leaf[item.kind]) { + throw duplicate_files_error( + item.kind + ' page module', + /** @type {string} */ (route.leaf[item.kind]) + ); + } + + route.leaf[item.kind] = project_relative; + } else { + if (route.endpoint) { + throw duplicate_files_error('endpoint', route.endpoint.file); + } + + route.endpoint = { + file: project_relative + }; + } + } + + // then handle children + for (const file of files) { + if (file.is_dir) { + walk(depth + 1, path.posix.join(id, file.name), file.name, route); + } + } + }; + + walk(0, '/', '', null); + + if (routes.length === 1) { + const root = routes[0]; + if (!root.leaf && !root.error && !root.layout && !root.endpoint) { + throw new Error( + 'No routes found. If you are using a custom src/routes directory, make sure it is specified in svelte.config.js' + ); + } + } + } else { + // If there's no routes directory, we'll just create a single empty route. This ensures the root layout and + // error components are included in the manifest, which is needed for subsequent build/dev commands to work + routes.push({ + id: '/', + segment: '', + pattern: /^$/, + params: [], + parent: null, + layout: null, + error: null, + leaf: null, + page: null, + endpoint: null + }); + } + + prevent_conflicts(routes); + + const root = routes[0]; + + if (!root.layout?.component) { + if (!root.layout) root.layout = { depth: 0, child_pages: [] }; + root.layout.component = posixify(path.relative(cwd, `${fallback}/layout.svelte`)); + } + + if (!root.error?.component) { + if (!root.error) root.error = { depth: 0 }; + root.error.component = posixify(path.relative(cwd, `${fallback}/error.svelte`)); + } + + // we do layouts/errors first as they are more likely to be reused, + // and smaller indexes take fewer bytes. also, this guarantees that + // the default error/layout are 0/1 + for (const route of routes) { + if (route.layout) { + if (!route.layout?.component) { + route.layout.component = posixify(path.relative(cwd, `${fallback}/layout.svelte`)); + } + nodes.push(route.layout); + } + if (route.error) nodes.push(route.error); + } + + for (const route of routes) { + if (route.leaf) nodes.push(route.leaf); + } + + const indexes = new Map(nodes.map((node, i) => [node, i])); + + for (const route of routes) { + if (!route.leaf) continue; + + route.page = { + layouts: [], + errors: [], + leaf: /** @type {number} */ (indexes.get(route.leaf)) + }; + + /** @type {import('types').RouteData | null} */ + let current_route = route; + let current_node = route.leaf; + let parent_id = route.leaf.parent_id; + + while (current_route) { + if (parent_id === undefined || current_route.segment === parent_id) { + if (current_route.layout || current_route.error) { + route.page.layouts.unshift( + current_route.layout ? indexes.get(current_route.layout) : undefined + ); + route.page.errors.unshift( + current_route.error ? indexes.get(current_route.error) : undefined + ); + } + + if (current_route.layout) { + /** @type {import('types').PageNode[]} */ (current_route.layout.child_pages).push( + route.leaf + ); + current_node.parent = current_node = current_route.layout; + parent_id = current_node.parent_id; + } else { + parent_id = undefined; + } + } + + current_route = current_route.parent; + } + + if (parent_id !== undefined) { + throw new Error(`${current_node.component} references missing segment "${parent_id}"`); + } + } + + return { + nodes, + routes: sort_routes(routes) + }; +} + +/** + * @param {string} project_relative + * @param {string} file + * @param {string[]} component_extensions + * @param {string[]} module_extensions + * @returns {import('./types.js').RouteFile} + */ +function analyze(project_relative, file, component_extensions, module_extensions) { + const component_extension = component_extensions.find((ext) => file.endsWith(ext)); + if (component_extension) { + const name = file.slice(0, -component_extension.length); + const pattern = /^\+(?:(page(?:@(.*))?)|(layout(?:@(.*))?)|(error))$/; + const match = pattern.exec(name); + if (!match) { + throw new Error(`Files prefixed with + are reserved (saw ${project_relative})`); + } + + return { + kind: 'component', + is_page: !!match[1], + is_layout: !!match[3], + is_error: !!match[5], + uses_layout: match[2] ?? match[4] + }; + } + + const module_extension = module_extensions.find((ext) => file.endsWith(ext)); + if (module_extension) { + const name = file.slice(0, -module_extension.length); + const pattern = + /^\+(?:(server)|(page(?:(@[a-zA-Z0-9_-]*))?(\.server)?)|(layout(?:(@[a-zA-Z0-9_-]*))?(\.server)?))$/; + const match = pattern.exec(name); + if (!match) { + throw new Error(`Files prefixed with + are reserved (saw ${project_relative})`); + } else if (match[3] || match[6]) { + throw new Error( + // prettier-ignore + `Only Svelte files can reference named layouts. Remove '${match[3] || match[6]}' from ${file} (at ${project_relative})` + ); + } + + const kind = match[1] || match[4] || match[7] ? 'server' : 'universal'; + + return { + kind, + is_page: !!match[2], + is_layout: !!match[5] + }; + } + + throw new Error(`Files and directories prefixed with + are reserved (saw ${project_relative})`); +} + +/** + * @param {string} needle + * @param {string} haystack + */ +function count_occurrences(needle, haystack) { + let count = 0; + for (let i = 0; i < haystack.length; i += 1) { + if (haystack[i] === needle) count += 1; + } + return count; +} + +/** @param {import('types').RouteData[]} routes */ +function prevent_conflicts(routes) { + /** @type {Map} */ + const lookup = new Map(); + + for (const route of routes) { + if (!route.leaf && !route.endpoint) continue; + + const normalized = normalize_route_id(route.id); + + // find all permutations created by optional parameters + const split = normalized.split(/<\?(.+?)>/g); + + let permutations = [/** @type {string} */ (split[0])]; + + // turn `x/[[optional]]/y` into `x/y` and `x/[required]/y` + for (let i = 1; i < split.length; i += 2) { + const matcher = split[i]; + const next = split[i + 1]; + + permutations = permutations.reduce((a, b) => { + a.push(b + next); + if (!(matcher === '*' && b.endsWith('//'))) a.push(b + `<${matcher}>${next}`); + return a; + }, /** @type {string[]} */ ([])); + } + + for (const permutation of permutations) { + // remove leading/trailing/duplicated slashes caused by prior + // manipulation of optional parameters and (groups) + const key = permutation + .replace(/\/{2,}/, '/') + .replace(/^\//, '') + .replace(/\/$/, ''); + + if (lookup.has(key)) { + throw new Error( + `The "${lookup.get(key)}" and "${route.id}" routes conflict with each other` + ); + } + + lookup.set(key, route.id); + } + } +} + +/** @param {string} id */ +function normalize_route_id(id) { + return ( + id + // remove groups + .replace(/(?<=^|\/)\(.+?\)(?=$|\/)/g, '') + + .replace(/\[[ux]\+([0-9a-f]+)\]/g, (_, x) => + String.fromCharCode(parseInt(x, 16)).replace(/\//g, '%2f') + ) + + // replace `[param]` with `<*>`, `[param=x]` with ``, and `[[param]]` with `` + .replace( + /\[(?:(\[)|(\.\.\.))?.+?(=.+?)?\]\]?/g, + (_, optional, rest, matcher) => `<${optional ? '?' : ''}${rest ?? ''}${matcher ?? '*'}>` + ) + ); +} diff --git a/node_modules/@sveltejs/kit/src/core/sync/create_manifest_data/sort.js b/node_modules/@sveltejs/kit/src/core/sync/create_manifest_data/sort.js new file mode 100644 index 0000000..1629d14 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/sync/create_manifest_data/sort.js @@ -0,0 +1,162 @@ +import { get_route_segments } from '../../../utils/routing.js'; + +/** + * @typedef {{ + * type: 'static' | 'required' | 'optional' | 'rest'; + * content: string; + * matched: boolean; + * }} Part + */ + +/** + * @typedef {Part[]} Segment + */ + +const EMPTY = { type: 'static', content: '', matched: false }; + +/** @param {import('types').RouteData[]} routes */ +export function sort_routes(routes) { + /** @type {Map} */ + const segment_cache = new Map(); + + /** @param {string} segment */ + function get_parts(segment) { + if (!segment_cache.has(segment)) { + segment_cache.set(segment, split(segment)); + } + + return segment_cache.get(segment); + } + + /** @param {string} id */ + function split(id) { + /** @type {Part[]} */ + const parts = []; + + let i = 0; + while (i <= id.length) { + const start = id.indexOf('[', i); + if (start === -1) { + parts.push({ type: 'static', content: id.slice(i), matched: false }); + break; + } + + parts.push({ type: 'static', content: id.slice(i, start), matched: false }); + + const type = id[start + 1] === '[' ? 'optional' : id[start + 1] === '.' ? 'rest' : 'required'; + const delimiter = type === 'optional' ? ']]' : ']'; + const end = id.indexOf(delimiter, start); + + if (end === -1) { + throw new Error(`Invalid route ID ${id}`); + } + + const content = id.slice(start, (i = end + delimiter.length)); + + parts.push({ + type, + content, + matched: content.includes('=') + }); + } + + return parts; + } + + return routes.sort((route_a, route_b) => { + const segments_a = split_route_id(route_a.id).map(get_parts); + const segments_b = split_route_id(route_b.id).map(get_parts); + + for (let i = 0; i < Math.max(segments_a.length, segments_b.length); i += 1) { + const segment_a = segments_a[i] ?? [EMPTY]; + const segment_b = segments_b[i] ?? [EMPTY]; + + for (let j = 0; j < Math.max(segment_a.length, segment_b.length); j += 1) { + const a = segment_a[j]; + const b = segment_b[j]; + + // first part of each segment is always static + // (though it may be the empty string), then + // it alternates between dynamic and static + // (i.e. [foo][bar] is disallowed) + const dynamic = j % 2 === 1; + + if (dynamic) { + if (!a) return -1; + if (!b) return +1; + + // get the next static chunk, so we can handle [...rest] edge cases + const next_a = segment_a[j + 1].content || segments_a[i + 1]?.[0].content; + const next_b = segment_b[j + 1].content || segments_b[i + 1]?.[0].content; + + // `[...rest]/x` outranks `[...rest]` + if (a.type === 'rest' && b.type === 'rest') { + if (next_a && next_b) continue; + if (next_a) return -1; + if (next_b) return +1; + } + + // `[...rest]/x` outranks `[required]` or `[required]/[required]` + // but not `[required]/x` + if (a.type === 'rest') { + return next_a && !next_b ? -1 : +1; + } + + if (b.type === 'rest') { + return next_b && !next_a ? +1 : -1; + } + + // part with matcher outranks one without + if (a.matched !== b.matched) { + return a.matched ? -1 : +1; + } + + if (a.type !== b.type) { + // `[...rest]` has already been accounted for, so here + // we're comparing between `[required]` and `[[optional]]` + if (a.type === 'required') return -1; + if (b.type === 'required') return +1; + } + } else if (a.content !== b.content) { + // shallower path outranks deeper path + if (a === EMPTY) return -1; + if (b === EMPTY) return +1; + + return sort_static(a.content, b.content); + } + } + } + + return route_a.id < route_b.id ? +1 : -1; + }); +} + +/** @param {string} id */ +function split_route_id(id) { + return get_route_segments( + id + // remove all [[optional]] parts unless they're at the very end + // or it ends with a route group + .replace(/\[\[[^\]]+\]\](?!(?:\/\([^/]+\))*$)/g, '') + ).filter(Boolean); +} + +/** + * Sort two strings lexicographically, except `foobar` outranks `foo` + * @param {string} a + * @param {string} b + */ +function sort_static(a, b) { + if (a === b) return 0; + + for (let i = 0; true; i += 1) { + const char_a = a[i]; + const char_b = b[i]; + + if (char_a !== char_b) { + if (char_a === undefined) return +1; + if (char_b === undefined) return -1; + return char_a < char_b ? -1 : +1; + } + } +} diff --git a/node_modules/@sveltejs/kit/src/core/sync/create_manifest_data/types.d.ts b/node_modules/@sveltejs/kit/src/core/sync/create_manifest_data/types.d.ts new file mode 100644 index 0000000..ec5c01b --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/sync/create_manifest_data/types.d.ts @@ -0,0 +1,37 @@ +import { PageNode } from 'types'; + +interface Part { + dynamic: boolean; + optional: boolean; + rest: boolean; + type: string | null; +} + +interface RouteTreeNode { + error: PageNode | undefined; + layout: PageNode | undefined; +} + +export type RouteTree = Map; + +interface RouteComponent { + kind: 'component'; + is_page: boolean; + is_layout: boolean; + is_error: boolean; + uses_layout: string | undefined; +} + +interface RouteSharedModule { + kind: 'universal'; + is_page: boolean; + is_layout: boolean; +} + +interface RouteServerModule { + kind: 'server'; + is_page: boolean; + is_layout: boolean; +} + +export type RouteFile = RouteComponent | RouteSharedModule | RouteServerModule; diff --git a/node_modules/@sveltejs/kit/src/core/sync/sync.js b/node_modules/@sveltejs/kit/src/core/sync/sync.js new file mode 100644 index 0000000..a96e40b --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/sync/sync.js @@ -0,0 +1,78 @@ +import path from 'node:path'; +import create_manifest_data from './create_manifest_data/index.js'; +import { write_client_manifest } from './write_client_manifest.js'; +import { write_root } from './write_root.js'; +import { write_tsconfig } from './write_tsconfig.js'; +import { write_types, write_all_types } from './write_types/index.js'; +import { write_ambient } from './write_ambient.js'; +import { write_non_ambient } from './write_non_ambient.js'; +import { write_server } from './write_server.js'; + +/** + * Initialize SvelteKit's generated files. + * @param {import('types').ValidatedConfig} config + * @param {string} mode + */ +export function init(config, mode) { + write_tsconfig(config.kit); + write_ambient(config.kit, mode); + write_non_ambient(config.kit); +} + +/** + * Update SvelteKit's generated files + * @param {import('types').ValidatedConfig} config + */ +export function create(config) { + const manifest_data = create_manifest_data({ config }); + + const output = path.join(config.kit.outDir, 'generated'); + + write_client_manifest(config.kit, manifest_data, `${output}/client`); + write_server(config, output); + write_root(manifest_data, output); + write_all_types(config, manifest_data); + + return { manifest_data }; +} + +/** + * Update SvelteKit's generated files in response to a single file content update. + * Do not call this when the file in question was created/deleted. + * + * @param {import('types').ValidatedConfig} config + * @param {import('types').ManifestData} manifest_data + * @param {string} file + */ +export function update(config, manifest_data, file) { + write_types(config, manifest_data, file); +} + +/** + * Run sync.init and sync.create in series, returning the result from sync.create. + * @param {import('types').ValidatedConfig} config + * @param {string} mode The Vite mode + */ +export function all(config, mode) { + init(config, mode); + return create(config); +} + +/** + * Run sync.init and then generate all type files. + * @param {import('types').ValidatedConfig} config + * @param {string} mode The Vite mode + */ +export function all_types(config, mode) { + init(config, mode); + const manifest_data = create_manifest_data({ config }); + write_all_types(config, manifest_data); +} + +/** + * Regenerate __SERVER__/internal.js in response to src/{app.html,error.html,service-worker.js} changing + * @param {import('types').ValidatedConfig} config + */ +export function server(config) { + write_server(config, path.join(config.kit.outDir, 'generated')); +} diff --git a/node_modules/@sveltejs/kit/src/core/sync/ts.js b/node_modules/@sveltejs/kit/src/core/sync/ts.js new file mode 100644 index 0000000..61c79e3 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/sync/ts.js @@ -0,0 +1,6 @@ +/** @type {import('typescript')} */ +// @ts-ignore +export let ts = undefined; +try { + ts = (await import('typescript')).default; +} catch {} diff --git a/node_modules/@sveltejs/kit/src/core/sync/utils.js b/node_modules/@sveltejs/kit/src/core/sync/utils.js new file mode 100644 index 0000000..be3ecc2 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/sync/utils.js @@ -0,0 +1,78 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import { mkdirp } from '../../utils/filesystem.js'; +import { import_peer } from '../../utils/import.js'; + +/** @type {{ VERSION: string }} */ +const { VERSION } = await import_peer('svelte/compiler'); + +/** @type {Map} */ +const previous_contents = new Map(); + +/** + * @param {string} file + * @param {string} code + */ +export function write_if_changed(file, code) { + if (code !== previous_contents.get(file)) { + write(file, code); + } +} + +/** + * @param {string} file + * @param {string} code + */ +export function write(file, code) { + previous_contents.set(file, code); + mkdirp(path.dirname(file)); + fs.writeFileSync(file, code); +} + +/** @type {WeakMap} */ +const dedent_map = new WeakMap(); + +/** + * Allows indenting template strings without the extra indentation ending up in the result. + * Still allows indentation of lines relative to one another in the template string. + * @param {TemplateStringsArray} strings + * @param {any[]} values + */ +export function dedent(strings, ...values) { + let dedented = dedent_map.get(strings); + + if (!dedented) { + const indentation = /** @type {RegExpExecArray} */ (/\n?([ \t]*)/.exec(strings[0]))[1]; + const pattern = new RegExp(`^${indentation}`, 'gm'); + + dedented = { + strings: strings.map((str) => str.replace(pattern, '')), + indents: [] + }; + + let current = '\n'; + + for (let i = 0; i < values.length; i += 1) { + const string = dedented.strings[i]; + const match = /\n([ \t]*)$/.exec(string); + + if (match) current = match[0]; + dedented.indents[i] = current; + } + + dedent_map.set(strings, dedented); + } + + let str = dedented.strings[0]; + for (let i = 0; i < values.length; i += 1) { + str += String(values[i]).replace(/\n/g, dedented.indents[i]) + dedented.strings[i + 1]; + } + + str = str.trim(); + + return str; +} + +export function isSvelte5Plus() { + return Number(VERSION[0]) >= 5; +} diff --git a/node_modules/@sveltejs/kit/src/core/sync/write_ambient.js b/node_modules/@sveltejs/kit/src/core/sync/write_ambient.js new file mode 100644 index 0000000..1f21880 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/sync/write_ambient.js @@ -0,0 +1,63 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { get_env } from '../../exports/vite/utils.js'; +import { GENERATED_COMMENT } from '../../constants.js'; +import { create_dynamic_types, create_static_types } from '../env.js'; +import { write_if_changed } from './utils.js'; + +// TODO these types should be described in a neutral place, rather than +// inside either `packages/kit` or `svelte.dev/docs/kit` +const descriptions_dir = fileURLToPath(new URL('../../../src/types/synthetic', import.meta.url)); + +/** @param {string} filename */ +function read_description(filename) { + const content = fs.readFileSync(`${descriptions_dir}/${filename}`, 'utf8'); + return `/**\n${content + .trim() + .split('\n') + .map((line) => ` * ${line}`) + .join('\n')}\n */`; +} + +/** + * @param {import('types').Env} env + * @param {{ + * public_prefix: string; + * private_prefix: string; + * }} prefixes + */ +const template = (env, prefixes) => ` +${GENERATED_COMMENT} + +/// + +${read_description('$env+static+private.md')} +${create_static_types('private', env)} + +${read_description('$env+static+public.md')} +${create_static_types('public', env)} + +${read_description('$env+dynamic+private.md')} +${create_dynamic_types('private', env, prefixes)} + +${read_description('$env+dynamic+public.md')} +${create_dynamic_types('public', env, prefixes)} +`; + +/** + * Writes ambient declarations including types reference to @sveltejs/kit, + * and the existing environment variables in process.env to + * $env/static/private and $env/static/public + * @param {import('types').ValidatedKitConfig} config + * @param {string} mode The Vite mode + */ +export function write_ambient(config, mode) { + const env = get_env(config.env, mode); + const { publicPrefix: public_prefix, privatePrefix: private_prefix } = config.env; + + write_if_changed( + path.join(config.outDir, 'ambient.d.ts'), + template(env, { public_prefix, private_prefix }) + ); +} diff --git a/node_modules/@sveltejs/kit/src/core/sync/write_client_manifest.js b/node_modules/@sveltejs/kit/src/core/sync/write_client_manifest.js new file mode 100644 index 0000000..c27c61a --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/sync/write_client_manifest.js @@ -0,0 +1,202 @@ +import path from 'node:path'; +import { relative_path, resolve_entry } from '../../utils/filesystem.js'; +import { s } from '../../utils/misc.js'; +import { dedent, isSvelte5Plus, write_if_changed } from './utils.js'; +import colors from 'kleur'; + +/** + * Writes the client manifest to disk. The manifest is used to power the router. It contains the + * list of routes and corresponding Svelte components (i.e. pages and layouts). + * @param {import('types').ValidatedKitConfig} kit + * @param {import('types').ManifestData} manifest_data + * @param {string} output + * @param {import('types').ServerMetadata['nodes']} [metadata] If this is omitted, we have to assume that all routes with a `+layout/page.server.js` file have a server load function + */ +export function write_client_manifest(kit, manifest_data, output, metadata) { + const client_routing = kit.router.resolution === 'client'; + + /** + * Creates a module that exports a `CSRPageNode` + * @param {import('types').PageNode} node + */ + function generate_node(node) { + const declarations = []; + + if (node.universal) { + declarations.push( + `import * as universal from ${s(relative_path(`${output}/nodes`, node.universal))};`, + 'export { universal };' + ); + } + + if (node.component) { + declarations.push( + `export { default as component } from ${s( + relative_path(`${output}/nodes`, node.component) + )};` + ); + } + + return declarations.join('\n'); + } + + /** @type {Map} */ + const indices = new Map(); + const nodes = manifest_data.nodes + .map((node, i) => { + indices.set(node, i); + + write_if_changed(`${output}/nodes/${i}.js`, generate_node(node)); + return `() => import('./nodes/${i}')`; + }) + // If route resolution happens on the server, we only need the root layout and root error page + // upfront, the rest is loaded on demand as the user navigates the app + .slice(0, client_routing ? manifest_data.nodes.length : 2) + .join(',\n'); + + const layouts_with_server_load = new Set(); + + let dictionary = dedent` + { + ${manifest_data.routes + .map((route) => { + if (route.page) { + const errors = route.page.errors.slice(1).map((n) => n ?? ''); + const layouts = route.page.layouts.slice(1).map((n) => n ?? ''); + + while (layouts.at(-1) === '') layouts.pop(); + while (errors.at(-1) === '') errors.pop(); + + let leaf_has_server_load = false; + if (route.leaf) { + if (metadata) { + const i = /** @type {number} */ (indices.get(route.leaf)); + + leaf_has_server_load = metadata[i].has_server_load; + } else if (route.leaf.server) { + leaf_has_server_load = true; + } + } + + // Encode whether or not the route uses server data + // using the ones' complement, to save space + const array = [`${leaf_has_server_load ? '~' : ''}${route.page.leaf}`]; + + // Encode whether or not the layout uses server data. + // It's a different method compared to pages because layouts + // are reused across pages, so we save space by doing it this way. + route.page.layouts.forEach((layout) => { + if (layout == undefined) return; + + let layout_has_server_load = false; + + if (metadata) { + layout_has_server_load = metadata[layout].has_server_load; + } else if (manifest_data.nodes[layout].server) { + layout_has_server_load = true; + } + + if (layout_has_server_load) { + layouts_with_server_load.add(layout); + } + }); + + // only include non-root layout/error nodes if they exist + if (layouts.length > 0 || errors.length > 0) array.push(`[${layouts.join(',')}]`); + if (errors.length > 0) array.push(`[${errors.join(',')}]`); + + return `${s(route.id)}: [${array.join(',')}]`; + } + }) + .filter(Boolean) + .join(',\n')} + } + `; + + if (!client_routing) { + dictionary = '{}'; + const root_layout = layouts_with_server_load.has(0); + layouts_with_server_load.clear(); + if (root_layout) layouts_with_server_load.add(0); + } + + const client_hooks_file = resolve_entry(kit.files.hooks.client); + const universal_hooks_file = resolve_entry(kit.files.hooks.universal); + + const typo = resolve_entry('src/+hooks.client'); + if (typo) { + console.log( + colors + .bold() + .yellow( + `Unexpected + prefix. Did you mean ${typo.split('/').at(-1)?.slice(1)}?` + + ` at ${path.resolve(typo)}` + ) + ); + } + + // Stringified version of + /** @type {import('../../runtime/client/types.js').SvelteKitApp} */ + write_if_changed( + `${output}/app.js`, + dedent` + ${ + client_hooks_file + ? `import * as client_hooks from '${relative_path(output, client_hooks_file)}';` + : '' + } + ${ + universal_hooks_file + ? `import * as universal_hooks from '${relative_path(output, universal_hooks_file)}';` + : '' + } + + ${client_routing ? "export { matchers } from './matchers.js';" : 'export const matchers = {};'} + + export const nodes = [ + ${nodes} + ]; + + export const server_loads = [${[...layouts_with_server_load].join(',')}]; + + export const dictionary = ${dictionary}; + + export const hooks = { + handleError: ${ + client_hooks_file ? 'client_hooks.handleError || ' : '' + }(({ error }) => { console.error(error) }), + ${client_hooks_file ? 'init: client_hooks.init,' : ''} + reroute: ${universal_hooks_file ? 'universal_hooks.reroute || ' : ''}(() => {}), + transport: ${universal_hooks_file ? 'universal_hooks.transport || ' : ''}{} + }; + + export const decoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.decode])); + + export const hash = ${s(kit.router.type === 'hash')}; + + export const decode = (type, value) => decoders[type](value); + + export { default as root } from '../root.${isSvelte5Plus() ? 'js' : 'svelte'}'; + ` + ); + + if (client_routing) { + // write matchers to a separate module so that we don't + // need to worry about name conflicts + const imports = []; + const matchers = []; + + for (const key in manifest_data.matchers) { + const src = manifest_data.matchers[key]; + + imports.push(`import { match as ${key} } from ${s(relative_path(output, src))};`); + matchers.push(key); + } + + const module = imports.length + ? `${imports.join('\n')}\n\nexport const matchers = { ${matchers.join(', ')} };` + : 'export const matchers = {};'; + + write_if_changed(`${output}/matchers.js`, module); + } +} diff --git a/node_modules/@sveltejs/kit/src/core/sync/write_non_ambient.js b/node_modules/@sveltejs/kit/src/core/sync/write_non_ambient.js new file mode 100644 index 0000000..a191495 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/sync/write_non_ambient.js @@ -0,0 +1,42 @@ +import path from 'node:path'; +import { GENERATED_COMMENT } from '../../constants.js'; +import { write_if_changed } from './utils.js'; + +// `declare module "svelte/elements"` needs to happen in a non-ambient module, and dts-buddy generates one big ambient module, +// so we can't add it there - therefore generate the typings ourselves here. +// We're not using the `declare namespace svelteHTML` variant because that one doesn't augment the HTMLAttributes interface +// people could use to type their own components. +// The T generic is needed or else there's a "all declarations must have identical type parameters" error. +const template = ` +${GENERATED_COMMENT} + +declare module "svelte/elements" { + export interface HTMLAttributes { + 'data-sveltekit-keepfocus'?: true | '' | 'off' | undefined | null; + 'data-sveltekit-noscroll'?: true | '' | 'off' | undefined | null; + 'data-sveltekit-preload-code'?: + | true + | '' + | 'eager' + | 'viewport' + | 'hover' + | 'tap' + | 'off' + | undefined + | null; + 'data-sveltekit-preload-data'?: true | '' | 'hover' | 'tap' | 'off' | undefined | null; + 'data-sveltekit-reload'?: true | '' | 'off' | undefined | null; + 'data-sveltekit-replacestate'?: true | '' | 'off' | undefined | null; + } +} + +export {}; +`; + +/** + * Writes non-ambient declarations to the output directory + * @param {import('types').ValidatedKitConfig} config + */ +export function write_non_ambient(config) { + write_if_changed(path.join(config.outDir, 'non-ambient.d.ts'), template); +} diff --git a/node_modules/@sveltejs/kit/src/core/sync/write_root.js b/node_modules/@sveltejs/kit/src/core/sync/write_root.js new file mode 100644 index 0000000..4440d53 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/sync/write_root.js @@ -0,0 +1,159 @@ +import { dedent, isSvelte5Plus, write_if_changed } from './utils.js'; + +/** + * @param {import('types').ManifestData} manifest_data + * @param {string} output + */ +export function write_root(manifest_data, output) { + // TODO remove default layout altogether + + const max_depth = Math.max( + ...manifest_data.routes.map((route) => + route.page ? route.page.layouts.filter(Boolean).length + 1 : 0 + ), + 1 + ); + + const levels = []; + for (let i = 0; i <= max_depth; i += 1) { + levels.push(i); + } + + let l = max_depth; + + let pyramid = dedent` + ${ + isSvelte5Plus() + ? ` + ` + : `` + }`; + + while (l--) { + pyramid = dedent` + {#if constructors[${l + 1}]} + ${ + isSvelte5Plus() + ? dedent`{@const Pyramid_${l} = constructors[${l}]} + + + ${pyramid} + ` + : dedent` + ${pyramid} + ` + } + + {:else} + ${ + isSvelte5Plus() + ? dedent` + {@const Pyramid_${l} = constructors[${l}]} + + + ` + : dedent`` + } + + {/if} + `; + } + + write_if_changed( + `${output}/root.svelte`, + dedent` + + ${isSvelte5Plus() ? '' : ''} + + + ${pyramid} + + {#if mounted} +
+ {#if navigated} + {title} + {/if} +
+ {/if} + ` + ); + + if (isSvelte5Plus()) { + write_if_changed( + `${output}/root.js`, + dedent` + import { asClassComponent } from 'svelte/legacy'; + import Root from './root.svelte'; + export default asClassComponent(Root); + ` + ); + } +} diff --git a/node_modules/@sveltejs/kit/src/core/sync/write_server.js b/node_modules/@sveltejs/kit/src/core/sync/write_server.js new file mode 100644 index 0000000..5e93d5c --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/sync/write_server.js @@ -0,0 +1,135 @@ +import path from 'node:path'; +import process from 'node:process'; +import { hash } from '../../runtime/hash.js'; +import { posixify, resolve_entry } from '../../utils/filesystem.js'; +import { s } from '../../utils/misc.js'; +import { load_error_page, load_template } from '../config/index.js'; +import { runtime_directory } from '../utils.js'; +import { isSvelte5Plus, write_if_changed } from './utils.js'; +import colors from 'kleur'; + +/** + * @param {{ + * server_hooks: string | null; + * universal_hooks: string | null; + * config: import('types').ValidatedConfig; + * has_service_worker: boolean; + * runtime_directory: string; + * template: string; + * error_page: string; + * }} opts + */ +const server_template = ({ + config, + server_hooks, + universal_hooks, + has_service_worker, + runtime_directory, + template, + error_page +}) => ` +import root from '../root.${isSvelte5Plus() ? 'js' : 'svelte'}'; +import { set_building, set_prerendering } from '__sveltekit/environment'; +import { set_assets } from '__sveltekit/paths'; +import { set_manifest, set_read_implementation } from '__sveltekit/server'; +import { set_private_env, set_public_env, set_safe_public_env } from '${runtime_directory}/shared-server.js'; + +export const options = { + app_template_contains_nonce: ${template.includes('%sveltekit.nonce%')}, + csp: ${s(config.kit.csp)}, + csrf_check_origin: ${s(config.kit.csrf.checkOrigin)}, + embedded: ${config.kit.embedded}, + env_public_prefix: '${config.kit.env.publicPrefix}', + env_private_prefix: '${config.kit.env.privatePrefix}', + hash_routing: ${s(config.kit.router.type === 'hash')}, + hooks: null, // added lazily, via \`get_hooks\` + preload_strategy: ${s(config.kit.output.preloadStrategy)}, + root, + service_worker: ${has_service_worker}, + templates: { + app: ({ head, body, assets, nonce, env }) => ${s(template) + .replace('%sveltekit.head%', '" + head + "') + .replace('%sveltekit.body%', '" + body + "') + .replace(/%sveltekit\.assets%/g, '" + assets + "') + .replace(/%sveltekit\.nonce%/g, '" + nonce + "') + .replace( + /%sveltekit\.env\.([^%]+)%/g, + (_match, capture) => `" + (env[${s(capture)}] ?? "") + "` + )}, + error: ({ status, message }) => ${s(error_page) + .replace(/%sveltekit\.status%/g, '" + status + "') + .replace(/%sveltekit\.error\.message%/g, '" + message + "')} + }, + version_hash: ${s(hash(config.kit.version.name))} +}; + +export async function get_hooks() { + let handle; + let handleFetch; + let handleError; + let init; + ${server_hooks ? `({ handle, handleFetch, handleError, init } = await import(${s(server_hooks)}));` : ''} + + let reroute; + let transport; + ${universal_hooks ? `({ reroute, transport } = await import(${s(universal_hooks)}));` : ''} + + return { + handle, + handleFetch, + handleError, + init, + reroute, + transport + }; +} + +export { set_assets, set_building, set_manifest, set_prerendering, set_private_env, set_public_env, set_read_implementation, set_safe_public_env }; +`; + +// TODO need to re-run this whenever src/app.html or src/error.html are +// created or changed, or src/service-worker.js is created or deleted. +// Also, need to check that updating hooks.server.js works + +/** + * Write server configuration to disk + * @param {import('types').ValidatedConfig} config + * @param {string} output + */ +export function write_server(config, output) { + const server_hooks_file = resolve_entry(config.kit.files.hooks.server); + const universal_hooks_file = resolve_entry(config.kit.files.hooks.universal); + + const typo = resolve_entry('src/+hooks.server'); + if (typo) { + console.log( + colors + .bold() + .yellow( + `Unexpected + prefix. Did you mean ${typo.split('/').at(-1)?.slice(1)}?` + + ` at ${path.resolve(typo)}` + ) + ); + } + + /** @param {string} file */ + function relative(file) { + return posixify(path.relative(`${output}/server`, file)); + } + + // Contains the stringified version of + /** @type {import('types').SSROptions} */ + write_if_changed( + `${output}/server/internal.js`, + server_template({ + config, + server_hooks: server_hooks_file ? relative(server_hooks_file) : null, + universal_hooks: universal_hooks_file ? relative(universal_hooks_file) : null, + has_service_worker: + config.kit.serviceWorker.register && !!resolve_entry(config.kit.files.serviceWorker), + runtime_directory: relative(runtime_directory), + template: load_template(process.cwd(), config), + error_page: load_error_page(config) + }) + ); +} diff --git a/node_modules/@sveltejs/kit/src/core/sync/write_tsconfig.js b/node_modules/@sveltejs/kit/src/core/sync/write_tsconfig.js new file mode 100644 index 0000000..e9df340 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/sync/write_tsconfig.js @@ -0,0 +1,238 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import process from 'node:process'; +import colors from 'kleur'; +import { posixify } from '../../utils/filesystem.js'; +import { write_if_changed } from './utils.js'; + +/** + * @param {string} cwd + * @param {string} file + */ +function maybe_file(cwd, file) { + const resolved = path.resolve(cwd, file); + if (fs.existsSync(resolved)) { + return resolved; + } +} + +/** + * @param {string} file + */ +function project_relative(file) { + return posixify(path.relative('.', file)); +} + +/** + * @param {string} file + */ +function remove_trailing_slashstar(file) { + if (file.endsWith('/*')) { + return file.slice(0, -2); + } else { + return file; + } +} + +/** + * Generates the tsconfig that the user's tsconfig inherits from. + * @param {import('types').ValidatedKitConfig} kit + */ +export function write_tsconfig(kit, cwd = process.cwd()) { + const out = path.join(kit.outDir, 'tsconfig.json'); + + const user_config = load_user_tsconfig(cwd); + if (user_config) validate_user_config(cwd, out, user_config); + + write_if_changed(out, JSON.stringify(get_tsconfig(kit), null, '\t')); +} + +/** + * Generates the tsconfig that the user's tsconfig inherits from. + * @param {import('types').ValidatedKitConfig} kit + */ +export function get_tsconfig(kit) { + /** @param {string} file */ + const config_relative = (file) => posixify(path.relative(kit.outDir, file)); + + const include = new Set([ + 'ambient.d.ts', // careful: changing this name would be a breaking change, because it's referenced in the service-workers documentation + 'non-ambient.d.ts', + './types/**/$types.d.ts', + config_relative('vite.config.js'), + config_relative('vite.config.ts') + ]); + // TODO(v2): find a better way to include all src files. We can't just use routes/lib only because + // people might have other folders/files in src that they want included. + const src_includes = [kit.files.routes, kit.files.lib, path.resolve('src')].filter((dir) => { + const relative = path.relative(path.resolve('src'), dir); + return !relative || relative.startsWith('..'); + }); + for (const dir of src_includes) { + include.add(config_relative(`${dir}/**/*.js`)); + include.add(config_relative(`${dir}/**/*.ts`)); + include.add(config_relative(`${dir}/**/*.svelte`)); + } + + // Test folder is a special case - we advocate putting tests in a top-level test folder + // and it's not configurable (should we make it?) + const test_folder = project_relative('tests'); + include.add(config_relative(`${test_folder}/**/*.js`)); + include.add(config_relative(`${test_folder}/**/*.ts`)); + include.add(config_relative(`${test_folder}/**/*.svelte`)); + + const exclude = [config_relative('node_modules/**')]; + // Add service worker to exclude list so that worker types references in it don't spill over into the rest of the app + // (i.e. suddenly ServiceWorkerGlobalScope would be available throughout the app, and some types might even clash) + if (path.extname(kit.files.serviceWorker)) { + exclude.push(config_relative(kit.files.serviceWorker)); + } else { + exclude.push(config_relative(`${kit.files.serviceWorker}.js`)); + exclude.push(config_relative(`${kit.files.serviceWorker}/**/*.js`)); + exclude.push(config_relative(`${kit.files.serviceWorker}.ts`)); + exclude.push(config_relative(`${kit.files.serviceWorker}/**/*.ts`)); + exclude.push(config_relative(`${kit.files.serviceWorker}.d.ts`)); + exclude.push(config_relative(`${kit.files.serviceWorker}/**/*.d.ts`)); + } + + const config = { + compilerOptions: { + // generated options + paths: get_tsconfig_paths(kit), + rootDirs: [config_relative('.'), './types'], + + // essential options + // svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript + // to enforce using \`import type\` instead of \`import\` for Types. + // Also, TypeScript doesn't know about import usages in the template because it only sees the + // script of a Svelte file. Therefore preserve all value imports. + verbatimModuleSyntax: true, + // Vite compiles modules one at a time + isolatedModules: true, + + // This is required for svelte-package to work as expected + // Can be overwritten + lib: ['esnext', 'DOM', 'DOM.Iterable'], + moduleResolution: 'bundler', + module: 'esnext', + noEmit: true, // prevent tsconfig error "overwriting input files" - Vite handles the build and ignores this + target: 'esnext' + }, + include: [...include], + exclude + }; + + return kit.typescript.config(config) ?? config; +} + +/** @param {string} cwd */ +function load_user_tsconfig(cwd) { + const file = maybe_file(cwd, 'tsconfig.json') || maybe_file(cwd, 'jsconfig.json'); + + if (!file) return; + + // we have to eval the file, since it's not parseable as JSON (contains comments) + const json = fs.readFileSync(file, 'utf-8'); + + return { + kind: path.basename(file), + options: (0, eval)(`(${json})`) + }; +} + +/** + * @param {string} cwd + * @param {string} out + * @param {{ kind: string, options: any }} config + */ +function validate_user_config(cwd, out, config) { + // we need to check that the user's tsconfig extends the framework config + const extend = config.options.extends; + const extends_framework_config = + typeof extend === 'string' + ? path.resolve(cwd, extend) === out + : Array.isArray(extend) + ? extend.some((e) => path.resolve(cwd, e) === out) + : false; + + const options = config.options.compilerOptions || {}; + + if (extends_framework_config) { + const { paths, baseUrl } = options; + + if (baseUrl || paths) { + console.warn( + colors + .bold() + .yellow( + `You have specified a baseUrl and/or paths in your ${config.kind} which interferes with SvelteKit's auto-generated tsconfig.json. ` + + 'Remove it to avoid problems with intellisense. For path aliases, use `kit.alias` instead: https://svelte.dev/docs/kit/configuration#alias' + ) + ); + } + } else { + let relative = posixify(path.relative('.', out)); + if (!relative.startsWith('./')) relative = './' + relative; + + console.warn( + colors + .bold() + .yellow(`Your ${config.kind} should extend the configuration generated by SvelteKit:`) + ); + console.warn(`{\n "extends": "${relative}"\n}`); + } +} + +// +const alias_regex = /^(.+?)(\/\*)?$/; +// +const value_regex = /^(.*?)((\/\*)|(\.\w+))?$/; + +/** + * Generates tsconfig path aliases from kit's aliases. + * Related to vite alias creation. + * + * @param {import('types').ValidatedKitConfig} config + */ +function get_tsconfig_paths(config) { + /** @param {string} file */ + const config_relative = (file) => { + let relative_path = path.relative(config.outDir, file); + if (!relative_path.startsWith('..')) { + relative_path = './' + relative_path; + } + return posixify(relative_path); + }; + + const alias = { ...config.alias }; + if (fs.existsSync(project_relative(config.files.lib))) { + alias['$lib'] = project_relative(config.files.lib); + } + + /** @type {Record} */ + const paths = {}; + + for (const [key, value] of Object.entries(alias)) { + const key_match = alias_regex.exec(key); + if (!key_match) throw new Error(`Invalid alias key: ${key}`); + + const value_match = value_regex.exec(value); + if (!value_match) throw new Error(`Invalid alias value: ${value}`); + + const rel_path = config_relative(remove_trailing_slashstar(value)); + const slashstar = key_match[2]; + + if (slashstar) { + paths[key] = [rel_path + '/*']; + } else { + paths[key] = [rel_path]; + const fileending = value_match[4]; + + if (!fileending && !(key + '/*' in alias)) { + paths[key + '/*'] = [rel_path + '/*']; + } + } + } + + return paths; +} diff --git a/node_modules/@sveltejs/kit/src/core/sync/write_types/index.js b/node_modules/@sveltejs/kit/src/core/sync/write_types/index.js new file mode 100644 index 0000000..308d566 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/sync/write_types/index.js @@ -0,0 +1,864 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import process from 'node:process'; +import MagicString from 'magic-string'; +import { posixify, rimraf, walk } from '../../../utils/filesystem.js'; +import { compact } from '../../../utils/array.js'; +import { ts } from '../ts.js'; + +/** + * @typedef {{ + * file_name: string; + * modified: boolean; + * code: string; + * exports: any[]; + * } | null} Proxy + * + * @typedef {{ + * server: Proxy, + * universal: Proxy + * }} Proxies + * + * @typedef {Map} RoutesMap + */ + +const cwd = process.cwd(); + +/** + * Creates types for the whole manifest + * @param {import('types').ValidatedConfig} config + * @param {import('types').ManifestData} manifest_data + */ +export function write_all_types(config, manifest_data) { + if (!ts) return; + + const types_dir = `${config.kit.outDir}/types`; + + // empty out files that no longer need to exist + const routes_dir = posixify(path.relative('.', config.kit.files.routes)).replace(/\.\.\//g, ''); + const expected_directories = new Set( + manifest_data.routes.map((route) => path.join(routes_dir, route.id)) + ); + + if (fs.existsSync(types_dir)) { + for (const file of walk(types_dir)) { + const dir = path.dirname(file); + if (!expected_directories.has(dir)) { + rimraf(path.join(types_dir, file)); + } + } + } + + // Read/write meta data on each invocation, not once per node process, + // it could be invoked by another process in the meantime. + const meta_data_file = `${types_dir}/route_meta_data.json`; + const has_meta_data = fs.existsSync(meta_data_file); + const meta_data = has_meta_data + ? /** @type {Record} */ (JSON.parse(fs.readFileSync(meta_data_file, 'utf-8'))) + : {}; + const routes_map = create_routes_map(manifest_data); + // For each directory, write $types.d.ts + for (const route of manifest_data.routes) { + if (!route.leaf && !route.layout && !route.endpoint) continue; // nothing to do + + const outdir = path.join(config.kit.outDir, 'types', routes_dir, route.id); + + // check if the types are out of date + /** @type {string[]} */ + const input_files = []; + + /** @type {import('types').PageNode | null} */ + let node = route.leaf; + while (node) { + if (node.universal) input_files.push(node.universal); + if (node.server) input_files.push(node.server); + node = node.parent ?? null; + } + + /** @type {import('types').PageNode | null} */ + node = route.layout; + while (node) { + if (node.universal) input_files.push(node.universal); + if (node.server) input_files.push(node.server); + node = node.parent ?? null; + } + + if (route.endpoint) { + input_files.push(route.endpoint.file); + } + + try { + fs.mkdirSync(outdir, { recursive: true }); + } catch {} + + const output_files = compact( + fs.readdirSync(outdir).map((name) => { + const stats = fs.statSync(path.join(outdir, name)); + if (stats.isDirectory()) return; + return { + name, + updated: stats.mtimeMs + }; + }) + ); + + const source_last_updated = Math.max( + // ctimeMs includes move operations whereas mtimeMs does not + ...input_files.map((file) => fs.statSync(file).ctimeMs) + ); + const types_last_updated = Math.max(...output_files.map((file) => file.updated)); + + const should_generate = + // source files were generated more recently than the types + source_last_updated > types_last_updated || + // no meta data file exists yet + !has_meta_data || + // some file was deleted + !meta_data[route.id]?.every((file) => input_files.includes(file)); + + if (should_generate) { + // track which old files end up being surplus to requirements + const to_delete = new Set(output_files.map((file) => file.name)); + update_types(config, routes_map, route, to_delete); + meta_data[route.id] = input_files; + } + } + + fs.writeFileSync(meta_data_file, JSON.stringify(meta_data, null, '\t')); +} + +/** + * Creates types related to the given file. This should only be called + * if the file in question was edited, not if it was created/deleted/moved. + * @param {import('types').ValidatedConfig} config + * @param {import('types').ManifestData} manifest_data + * @param {string} file + */ +export function write_types(config, manifest_data, file) { + if (!ts) return; + + if (!path.basename(file).startsWith('+')) { + // Not a route file + return; + } + + const id = '/' + posixify(path.relative(config.kit.files.routes, path.dirname(file))); + + const route = manifest_data.routes.find((route) => route.id === id); + if (!route) return; + if (!route.leaf && !route.layout && !route.endpoint) return; // nothing to do + + update_types(config, create_routes_map(manifest_data), route); +} + +/** + * Collect all leafs into a leaf -> route map + * @param {import('types').ManifestData} manifest_data + */ +function create_routes_map(manifest_data) { + /** @type {RoutesMap} */ + const map = new Map(); + for (const route of manifest_data.routes) { + if (route.leaf) { + map.set(route.leaf, { route, proxies: { server: null, universal: null } }); + } + } + return map; +} + +/** + * Update types for a specific route + * @param {import('types').ValidatedConfig} config + * @param {RoutesMap} routes + * @param {import('types').RouteData} route + * @param {Set} [to_delete] + */ +function update_types(config, routes, route, to_delete = new Set()) { + const routes_dir = posixify(path.relative('.', config.kit.files.routes)).replace(/\.\.\//g, ''); + const outdir = path.join(config.kit.outDir, 'types', routes_dir, route.id); + + // now generate new types + const imports = ["import type * as Kit from '@sveltejs/kit';"]; + + /** @type {string[]} */ + const declarations = []; + + /** @type {string[]} */ + const exports = []; + + // add 'Expand' helper + // Makes sure a type is "repackaged" and therefore more readable + declarations.push('type Expand = T extends infer O ? { [K in keyof O]: O[K] } : never;'); + + // returns the predicate of a matcher's type guard - or string if there is no type guard + declarations.push( + // TS complains on infer U, which seems weird, therefore ts-ignore it + [ + '// @ts-ignore', + 'type MatcherParam = M extends (param : string) => param is infer U ? U extends string ? U : string : string;' + ].join('\n') + ); + + declarations.push( + 'type RouteParams = ' + generate_params_type(route.params, outdir, config) + ';' + ); + + if (route.params.length > 0) { + exports.push( + 'export type EntryGenerator = () => Promise> | Array;' + ); + } + + declarations.push(`type RouteId = '${route.id}';`); + + // These could also be placed in our public types, but it would bloat them unnecessarily and we may want to change these in the future + if (route.layout || route.leaf) { + declarations.push( + // If T extends the empty object, void is also allowed as a return type + 'type MaybeWithVoid = {} extends T ? T | void : T;', + + // Returns the key of the object whose values are required. + 'export type RequiredKeys = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T];', + + // Helper type to get the correct output type for load functions. It should be passed the parent type to check what types from App.PageData are still required. + // If none, void is also allowed as a return type. + 'type OutputDataShape = MaybeWithVoid> & Partial> & Record>', + + // null & {} == null, we need to prevent that in some situations + 'type EnsureDefined = T extends null | undefined ? {} : T;', + + // Takes a union type and returns a union type where each type also has all properties + // of all possible types (typed as undefined), making accessing them more ergonomic + 'type OptionalUnion, A extends keyof U = U extends U ? keyof U : never> = U extends unknown ? { [P in Exclude]?: never } & U : never;', + + // Re-export `Snapshot` from @sveltejs/kit — in future we could use this to infer from the return type of `snapshot.capture` + 'export type Snapshot = Kit.Snapshot;' + ); + } + + if (route.leaf) { + let route_info = routes.get(route.leaf); + if (!route_info) { + // This should be defined, but belts and braces + route_info = { route, proxies: { server: null, universal: null } }; + routes.set(route.leaf, route_info); + } + + const { + declarations: d, + exports: e, + proxies + } = process_node(route.leaf, outdir, true, route_info.proxies); + + exports.push(...e); + declarations.push(...d); + + if (proxies.server) { + route_info.proxies.server = proxies.server; + if (proxies.server?.modified) to_delete.delete(proxies.server.file_name); + } + if (proxies.universal) { + route_info.proxies.universal = proxies.universal; + if (proxies.universal?.modified) to_delete.delete(proxies.universal.file_name); + } + + if (route.leaf.server) { + exports.push( + 'export type Action | void = Record | void> = Kit.Action' + ); + exports.push( + 'export type Actions | void = Record | void> = Kit.Actions' + ); + } + + if (route.leaf.server) { + exports.push('export type PageProps = { data: PageData; form: ActionData }'); + } else { + exports.push('export type PageProps = { data: PageData }'); + } + } + + if (route.layout) { + let all_pages_have_load = true; + /** @type {import('types').RouteParam[]} */ + const layout_params = []; + const ids = ['RouteId']; + + route.layout.child_pages?.forEach((page) => { + const leaf = routes.get(page); + if (leaf) { + if (leaf.route.page) ids.push(`"${leaf.route.id}"`); + + for (const param of leaf.route.params) { + // skip if already added + if (layout_params.some((p) => p.name === param.name)) continue; + layout_params.push({ ...param, optional: true }); + } + + ensureProxies(page, leaf.proxies); + + if ( + // Be defensive - if a proxy doesn't exist (because it couldn't be created), assume a load function exists. + // If we didn't and it's a false negative, the user could wrongfully get a type error on layouts. + (leaf.proxies.server && !leaf.proxies.server.exports.includes('load')) || + (leaf.proxies.universal && !leaf.proxies.universal.exports.includes('load')) + ) { + all_pages_have_load = false; + } + } + if (!page.server && !page.universal) { + all_pages_have_load = false; + } + }); + + if (route.id === '/') { + // root layout is used for fallback error page, where ID can be null + ids.push('null'); + } + + declarations.push(`type LayoutRouteId = ${ids.join(' | ')}`); + + declarations.push( + 'type LayoutParams = RouteParams & ' + generate_params_type(layout_params, outdir, config) + ); + + const { + exports: e, + declarations: d, + proxies + } = process_node( + route.layout, + outdir, + false, + { server: null, universal: null }, + all_pages_have_load + ); + + exports.push(...e); + declarations.push(...d); + + if (proxies.server?.modified) to_delete.delete(proxies.server.file_name); + if (proxies.universal?.modified) to_delete.delete(proxies.universal.file_name); + + exports.push( + 'export type LayoutProps = { data: LayoutData; children: import("svelte").Snippet }' + ); + } + + if (route.endpoint) { + exports.push('export type RequestHandler = Kit.RequestHandler;'); + } + + if (route.leaf?.server || route.layout?.server || route.endpoint) { + exports.push('export type RequestEvent = Kit.RequestEvent;'); + } + + const output = [imports.join('\n'), declarations.join('\n'), exports.join('\n')] + .filter(Boolean) + .join('\n\n'); + + fs.writeFileSync(`${outdir}/$types.d.ts`, output); + to_delete.delete('$types.d.ts'); + + for (const file of to_delete) { + fs.unlinkSync(path.join(outdir, file)); + } +} + +/** + * @param {import('types').PageNode} node + * @param {string} outdir + * @param {boolean} is_page + * @param {Proxies} proxies + * @param {boolean} [all_pages_have_load] + */ +function process_node(node, outdir, is_page, proxies, all_pages_have_load = true) { + const params = `${is_page ? 'Route' : 'Layout'}Params`; + const prefix = is_page ? 'Page' : 'Layout'; + + const route_id = is_page ? 'RouteId' : 'LayoutRouteId'; + + /** @type {string[]} */ + const declarations = []; + /** @type {string[]} */ + const exports = []; + + /** @type {string} */ + let server_data; + /** @type {string} */ + let data; + + ensureProxies(node, proxies); + + if (node.server) { + const basename = path.basename(node.server); + const proxy = proxies.server; + if (proxy?.modified) { + fs.writeFileSync(`${outdir}/proxy${basename}`, proxy.code); + } + + server_data = get_data_type(node.server, 'null', proxy, true); + + const parent_type = `${prefix}ServerParentData`; + + declarations.push(`type ${parent_type} = ${get_parent_type(node, 'LayoutServerData')};`); + + // +page.js load present -> server can return all-optional data + const output_data_shape = + node.universal || (!is_page && all_pages_have_load) + ? 'Partial & Record | void' + : `OutputDataShape<${parent_type}>`; + exports.push( + `export type ${prefix}ServerLoad = Kit.ServerLoad<${params}, ${parent_type}, OutputData, ${route_id}>;` + ); + + exports.push(`export type ${prefix}ServerLoadEvent = Parameters<${prefix}ServerLoad>[0];`); + + if (is_page) { + let type = 'unknown'; + if (proxy && proxy.exports.includes('actions')) { + // If the file wasn't tweaked, we can use the return type of the original file. + // The advantage is that type updates are reflected without saving. + const from = proxy.modified + ? `./proxy${replace_ext_with_js(basename)}` + : path_to_original(outdir, node.server); + + exports.push( + 'type ExcludeActionFailure = T extends Kit.ActionFailure ? never : T extends void ? never : T;', + 'type ActionsSuccess any>> = { [Key in keyof T]: ExcludeActionFailure>>; }[keyof T];', + 'type ExtractActionFailure = T extends Kit.ActionFailure ? X extends void ? never : X : never;', + 'type ActionsFailure any>> = { [Key in keyof T]: Exclude>>, void>; }[keyof T];', + `type ActionsExport = typeof import('${from}').actions`, + 'export type SubmitFunction = Kit.SubmitFunction>, Expand>>' + ); + + type = 'Expand> | null'; + } + exports.push(`export type ActionData = ${type};`); + } + } else { + server_data = 'null'; + } + exports.push(`export type ${prefix}ServerData = ${server_data};`); + + const parent_type = `${prefix}ParentData`; + declarations.push(`type ${parent_type} = ${get_parent_type(node, 'LayoutData')};`); + + if (node.universal) { + const proxy = proxies.universal; + if (proxy?.modified) { + fs.writeFileSync(`${outdir}/proxy${path.basename(node.universal)}`, proxy.code); + } + + const type = get_data_type( + node.universal, + `${parent_type} & EnsureDefined<${prefix}ServerData>`, + proxy + ); + + data = `Expand & OptionalUnion>>`; + + const output_data_shape = + !is_page && all_pages_have_load + ? 'Partial & Record | void' + : `OutputDataShape<${parent_type}>`; + exports.push( + `export type ${prefix}Load = Kit.Load<${params}, ${prefix}ServerData, ${parent_type}, OutputData, ${route_id}>;` + ); + + exports.push(`export type ${prefix}LoadEvent = Parameters<${prefix}Load>[0];`); + } else if (server_data === 'null') { + data = `Expand<${parent_type}>`; + } else { + data = `Expand & EnsureDefined<${prefix}ServerData>>`; + } + + exports.push(`export type ${prefix}Data = ${data};`); + + return { declarations, exports, proxies }; + + /** + * @param {string} file_path + * @param {string} fallback + * @param {Proxy} proxy + * @param {boolean} expand + */ + function get_data_type(file_path, fallback, proxy, expand = false) { + if (proxy) { + if (proxy.exports.includes('load')) { + // If the file wasn't tweaked, we can use the return type of the original file. + // The advantage is that type updates are reflected without saving. + const from = proxy.modified + ? `./proxy${replace_ext_with_js(path.basename(file_path))}` + : path_to_original(outdir, file_path); + const type = `Kit.LoadProperties>>`; + return expand ? `Expand>>` : type; + } else { + return fallback; + } + } else { + return 'unknown'; + } + } +} + +/** + * This function populates the proxies object, if necessary and not already done. + * Proxies are used to tweak the code of a file before it's typechecked. + * They are needed in two places - when generating the types for a page or layout. + * To not do the same work twice, we generate the proxies once and pass them around. + * + * @param {import('types').PageNode} node + * @param {Proxies} proxies + */ +function ensureProxies(node, proxies) { + if (node.server && !proxies.server) { + proxies.server = createProxy(node.server, true); + } + + if (node.universal && !proxies.universal) { + proxies.universal = createProxy(node.universal, false); + } +} + +/** + * @param {string} file_path + * @param {boolean} is_server + * @returns {Proxy} + */ +function createProxy(file_path, is_server) { + const proxy = tweak_types(fs.readFileSync(file_path, 'utf8'), is_server); + if (proxy) { + return { + ...proxy, + file_name: `proxy${path.basename(file_path)}` + }; + } else { + return null; + } +} + +/** + * Get the parent type string by recursively looking up the parent layout and accumulate them to one type. + * @param {import('types').PageNode} node + * @param {string} type + */ +function get_parent_type(node, type) { + const parent_imports = []; + + let parent = node.parent; + + while (parent) { + const d = node.depth - parent.depth; + // unshift because we need it the other way round for the import string + parent_imports.unshift( + `${d === 0 ? '' : `import('${'../'.repeat(d)}${'$types.js'}').`}${type}` + ); + parent = parent.parent; + } + + let parent_str = `EnsureDefined<${parent_imports[0] || '{}'}>`; + for (let i = 1; i < parent_imports.length; i++) { + // Omit is necessary because a parent could have a property with the same key which would + // cause a type conflict. At runtime the child overwrites the parent property in this case, + // so reflect that in the type definition. + // EnsureDefined is necessary because {something: string} & null becomes null. + // Output types of server loads can be null but when passed in through the `parent` parameter they are the empty object instead. + parent_str = `Omit<${parent_str}, keyof ${parent_imports[i]}> & EnsureDefined<${parent_imports[i]}>`; + } + return parent_str; +} + +/** + * @param {string} outdir + * @param {string} file_path + */ +function path_to_original(outdir, file_path) { + return posixify(path.relative(outdir, path.join(cwd, replace_ext_with_js(file_path)))); +} + +/** + * @param {string} file_path + */ +function replace_ext_with_js(file_path) { + // Another extension than `.js` (or nothing, but that fails with node16 moduleResolution) + // will result in TS failing to lookup the file + const ext = path.extname(file_path); + return file_path.slice(0, -ext.length) + '.js'; +} + +/** + * @param {import('types').RouteParam[]} params + * @param {string} outdir + * @param {import('types').ValidatedConfig} config + */ +function generate_params_type(params, outdir, config) { + /** @param {string} matcher */ + const path_to_matcher = (matcher) => + posixify(path.relative(outdir, path.join(config.kit.files.params, matcher + '.js'))); + + return `{ ${params + .map( + (param) => + `${param.name}${param.optional ? '?' : ''}: ${ + param.matcher + ? `MatcherParam` + : 'string' + }` + ) + .join('; ')} }`; +} + +/** + * @param {string} content + * @param {boolean} is_server + * @returns {Omit, 'file_name'> | null} + */ +export function tweak_types(content, is_server) { + const names = new Set(is_server ? ['load', 'actions'] : ['load']); + + try { + let modified = false; + + const ast = ts.createSourceFile( + 'filename.ts', + content, + ts.ScriptTarget.Latest, + false, + ts.ScriptKind.TS + ); + + const code = new MagicString(content); + + const exports = new Map(); + + ast.forEachChild((node) => { + if ( + ts.isExportDeclaration(node) && + node.exportClause && + ts.isNamedExports(node.exportClause) + ) { + node.exportClause.elements.forEach((element) => { + const exported = element.name; + if (names.has(element.name.text)) { + const local = element.propertyName || element.name; + exports.set(exported.text, local.text); + } + }); + } + + if ( + ts.canHaveModifiers(node) && + ts.getModifiers(node)?.some((modifier) => modifier.kind === ts.SyntaxKind.ExportKeyword) + ) { + if (ts.isFunctionDeclaration(node) && node.name?.text && names.has(node.name?.text)) { + exports.set(node.name.text, node.name.text); + } + + if (ts.isVariableStatement(node)) { + node.declarationList.declarations.forEach((declaration) => { + if (ts.isIdentifier(declaration.name) && names.has(declaration.name.text)) { + exports.set(declaration.name.text, declaration.name.text); + } + }); + } + } + }); + + /** + * @param {import('typescript').Node} node + * @param {import('typescript').Node} value + */ + function replace_jsdoc_type_tags(node, value) { + let _modified = false; + // @ts-ignore + if (node.jsDoc) { + // @ts-ignore + for (const comment of node.jsDoc) { + for (const tag of comment.tags ?? []) { + if (ts.isJSDocTypeTag(tag)) { + const is_fn = + ts.isFunctionDeclaration(value) || + ts.isFunctionExpression(value) || + ts.isArrowFunction(value); + + if (is_fn && value.parameters?.length > 0) { + const name = ts.isIdentifier(value.parameters[0].name) + ? value.parameters[0].name.text + : 'event'; + code.overwrite(tag.tagName.pos, tag.tagName.end, 'param'); + code.prependRight(tag.typeExpression.pos + 1, 'Parameters<'); + code.appendLeft(tag.typeExpression.end - 1, '>[0]'); + code.appendLeft(tag.typeExpression.end, ` ${name}`); + } else { + code.overwrite(tag.pos, tag.end, ''); + } + _modified = true; + } + } + } + } + modified = modified || _modified; + return _modified; + } + + ast.forEachChild((node) => { + if (ts.isFunctionDeclaration(node) && node.name?.text && node.name?.text === 'load') { + // remove JSDoc comment above `export function load ...` + replace_jsdoc_type_tags(node, node); + } + + if (ts.isVariableStatement(node)) { + // remove JSDoc comment above `export const load = ...` + if ( + ts.isIdentifier(node.declarationList.declarations[0].name) && + names.has(node.declarationList.declarations[0].name.text) && + node.declarationList.declarations[0].initializer + ) { + replace_jsdoc_type_tags(node, node.declarationList.declarations[0].initializer); + } + + for (const declaration of node.declarationList.declarations) { + if ( + ts.isIdentifier(declaration.name) && + declaration.name.text === 'load' && + declaration.initializer + ) { + // edge case — remove JSDoc comment above individual export + replace_jsdoc_type_tags(declaration, declaration.initializer); + + // remove type from `export const load: Load ...` + if (declaration.type) { + let a = declaration.type.pos; + const b = declaration.type.end; + while (/\s/.test(content[a])) a += 1; + + const type = content.slice(a, b); + code.remove(declaration.name.end, declaration.type.end); + + const rhs = declaration.initializer; + + if ( + rhs && + (ts.isArrowFunction(rhs) || ts.isFunctionExpression(rhs)) && + rhs.parameters.length + ) { + const arg = rhs.parameters[0]; + const add_parens = content[arg.pos - 1] !== '('; + + if (add_parens) code.prependRight(arg.pos, '('); + + if (arg && !arg.type) { + code.appendLeft( + arg.name.end, + `: Parameters<${type}>[0]` + (add_parens ? ')' : '') + ); + } else { + // prevent "type X is imported but not used" (isn't silenced by @ts-nocheck) when svelte-check runs + code.append(`;null as any as ${type};`); + } + } else { + // prevent "type X is imported but not used" (isn't silenced by @ts-nocheck) when svelte-check runs + code.append(`;null as any as ${type};`); + } + + modified = true; + } + } else if ( + is_server && + ts.isIdentifier(declaration.name) && + declaration.name?.text === 'actions' && + declaration.initializer + ) { + // remove JSDoc comment from `export const actions = ..` + const removed = replace_jsdoc_type_tags(node, declaration.initializer); + // ... and move type to each individual action + if (removed) { + const rhs = declaration.initializer; + if (ts.isObjectLiteralExpression(rhs)) { + for (const prop of rhs.properties) { + if (ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name)) { + const rhs = prop.initializer; + const replaced = replace_jsdoc_type_tags(prop, rhs); + if ( + !replaced && + rhs && + (ts.isArrowFunction(rhs) || ts.isFunctionExpression(rhs)) && + rhs.parameters?.[0] + ) { + const name = ts.isIdentifier(rhs.parameters[0].name) + ? rhs.parameters[0].name.text + : 'event'; + code.prependRight( + rhs.pos, + `/** @param {import('./$types').RequestEvent} ${name} */ ` + ); + } + } + } + } + } + + // remove type from `export const actions: Actions ...` + if (declaration.type) { + let a = declaration.type.pos; + const b = declaration.type.end; + while (/\s/.test(content[a])) a += 1; + + const type = content.slice(a, b); + code.remove(declaration.name.end, declaration.type.end); + code.append(`;null as any as ${type};`); + modified = true; + + // ... and move type to each individual action + const rhs = declaration.initializer; + if (ts.isObjectLiteralExpression(rhs)) { + for (const prop of rhs.properties) { + if (ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name)) { + const rhs = prop.initializer; + + if ( + rhs && + (ts.isArrowFunction(rhs) || ts.isFunctionExpression(rhs)) && + rhs.parameters.length + ) { + const arg = rhs.parameters[0]; + const add_parens = content[arg.pos - 1] !== '('; + + if (add_parens) code.prependRight(arg.pos, '('); + + if (arg && !arg.type) { + code.appendLeft( + arg.name.end, + ": import('./$types').RequestEvent" + (add_parens ? ')' : '') + ); + } + } + } + } + } + } + } + } + } + }); + + if (modified) { + // Ignore all type errors so they don't show up twice when svelte-check runs + // Account for possible @ts-check which would overwrite @ts-nocheck + if (code.original.startsWith('// @ts-check')) { + code.prependLeft('// @ts-check'.length, '\n// @ts-nocheck\n'); + } else { + code.prepend('// @ts-nocheck\n'); + } + } + + return { + modified, + code: code.toString(), + exports: Array.from(exports.keys()) + }; + } catch { + return null; + } +} diff --git a/node_modules/@sveltejs/kit/src/core/utils.js b/node_modules/@sveltejs/kit/src/core/utils.js new file mode 100644 index 0000000..668306e --- /dev/null +++ b/node_modules/@sveltejs/kit/src/core/utils.js @@ -0,0 +1,87 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import process from 'node:process'; +import { fileURLToPath } from 'node:url'; +import colors from 'kleur'; +import { posixify, to_fs } from '../utils/filesystem.js'; + +/** + * Resolved path of the `runtime` directory + * + * TODO Windows issue: + * Vite or sth else somehow sets the driver letter inconsistently to lower or upper case depending on the run environment. + * In playwright debug mode run through VS Code this a root-to-lowercase conversion is needed in order for the tests to run. + * If we do this conversion in other cases it has the opposite effect though and fails. + */ +export const runtime_directory = posixify(fileURLToPath(new URL('../runtime', import.meta.url))); + +/** + * This allows us to import SvelteKit internals that aren't exposed via `pkg.exports` in a + * way that works whether `@sveltejs/kit` is installed inside the project's `node_modules` + * or in a workspace root + */ +export const runtime_base = runtime_directory.startsWith(process.cwd()) + ? `/${path.relative('.', runtime_directory)}` + : to_fs(runtime_directory); + +function noop() {} + +/** @param {{ verbose: boolean }} opts */ +export function logger({ verbose }) { + /** @type {import('types').Logger} */ + const log = (msg) => console.log(msg.replace(/^/gm, ' ')); + + /** @param {string} msg */ + const err = (msg) => console.error(msg.replace(/^/gm, ' ')); + + log.success = (msg) => log(colors.green(`✔ ${msg}`)); + log.error = (msg) => err(colors.bold().red(msg)); + log.warn = (msg) => log(colors.bold().yellow(msg)); + + log.minor = verbose ? (msg) => log(colors.grey(msg)) : noop; + log.info = verbose ? log : noop; + + return log; +} + +/** @param {import('types').ManifestData} manifest_data */ +export function get_mime_lookup(manifest_data) { + /** @type {Record} */ + const mime = {}; + + manifest_data.assets.forEach((asset) => { + if (asset.type) { + const ext = path.extname(asset.file); + mime[ext] = asset.type; + } + }); + + return mime; +} + +/** + * @param {string} dir + * @param {(file: string) => boolean} [filter] + */ +export function list_files(dir, filter) { + /** @type {string[]} */ + const files = []; + + /** @param {string} current */ + function walk(current) { + for (const file of fs.readdirSync(path.resolve(dir, current))) { + const child = path.posix.join(current, file); + if (fs.statSync(path.resolve(dir, child)).isDirectory()) { + walk(child); + } else { + if (!filter || filter(child)) { + files.push(child); + } + } + } + } + + if (fs.existsSync(dir)) walk(''); + + return files; +} diff --git a/node_modules/@sveltejs/kit/src/exports/hooks/index.js b/node_modules/@sveltejs/kit/src/exports/hooks/index.js new file mode 100644 index 0000000..98e1e53 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/exports/hooks/index.js @@ -0,0 +1 @@ +export { sequence } from './sequence.js'; diff --git a/node_modules/@sveltejs/kit/src/exports/hooks/sequence.js b/node_modules/@sveltejs/kit/src/exports/hooks/sequence.js new file mode 100644 index 0000000..2c0fc34 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/exports/hooks/sequence.js @@ -0,0 +1,123 @@ +/** + * A helper function for sequencing multiple `handle` calls in a middleware-like manner. + * The behavior for the `handle` options is as follows: + * - `transformPageChunk` is applied in reverse order and merged + * - `preload` is applied in forward order, the first option "wins" and no `preload` options after it are called + * - `filterSerializedResponseHeaders` behaves the same as `preload` + * + * ```js + * /// file: src/hooks.server.js + * import { sequence } from '@sveltejs/kit/hooks'; + * + * /// type: import('@sveltejs/kit').Handle + * async function first({ event, resolve }) { + * console.log('first pre-processing'); + * const result = await resolve(event, { + * transformPageChunk: ({ html }) => { + * // transforms are applied in reverse order + * console.log('first transform'); + * return html; + * }, + * preload: () => { + * // this one wins as it's the first defined in the chain + * console.log('first preload'); + * return true; + * } + * }); + * console.log('first post-processing'); + * return result; + * } + * + * /// type: import('@sveltejs/kit').Handle + * async function second({ event, resolve }) { + * console.log('second pre-processing'); + * const result = await resolve(event, { + * transformPageChunk: ({ html }) => { + * console.log('second transform'); + * return html; + * }, + * preload: () => { + * console.log('second preload'); + * return true; + * }, + * filterSerializedResponseHeaders: () => { + * // this one wins as it's the first defined in the chain + * console.log('second filterSerializedResponseHeaders'); + * return true; + * } + * }); + * console.log('second post-processing'); + * return result; + * } + * + * export const handle = sequence(first, second); + * ``` + * + * The example above would print: + * + * ``` + * first pre-processing + * first preload + * second pre-processing + * second filterSerializedResponseHeaders + * second transform + * first transform + * second post-processing + * first post-processing + * ``` + * + * @param {...import('@sveltejs/kit').Handle} handlers The chain of `handle` functions + * @returns {import('@sveltejs/kit').Handle} + */ +export function sequence(...handlers) { + const length = handlers.length; + if (!length) return ({ event, resolve }) => resolve(event); + + return ({ event, resolve }) => { + return apply_handle(0, event, {}); + + /** + * @param {number} i + * @param {import('@sveltejs/kit').RequestEvent} event + * @param {import('@sveltejs/kit').ResolveOptions | undefined} parent_options + * @returns {import('types').MaybePromise} + */ + function apply_handle(i, event, parent_options) { + const handle = handlers[i]; + + return handle({ + event, + resolve: (event, options) => { + /** @type {import('@sveltejs/kit').ResolveOptions['transformPageChunk']} */ + const transformPageChunk = async ({ html, done }) => { + if (options?.transformPageChunk) { + html = (await options.transformPageChunk({ html, done })) ?? ''; + } + + if (parent_options?.transformPageChunk) { + html = (await parent_options.transformPageChunk({ html, done })) ?? ''; + } + + return html; + }; + + /** @type {import('@sveltejs/kit').ResolveOptions['filterSerializedResponseHeaders']} */ + const filterSerializedResponseHeaders = + parent_options?.filterSerializedResponseHeaders ?? + options?.filterSerializedResponseHeaders; + + /** @type {import('@sveltejs/kit').ResolveOptions['preload']} */ + const preload = parent_options?.preload ?? options?.preload; + + return i < length - 1 + ? apply_handle(i + 1, event, { + transformPageChunk, + filterSerializedResponseHeaders, + preload + }) + : resolve(event, { transformPageChunk, filterSerializedResponseHeaders, preload }); + } + }); + } + }; +} diff --git a/node_modules/@sveltejs/kit/src/exports/index.js b/node_modules/@sveltejs/kit/src/exports/index.js new file mode 100644 index 0000000..e587ede --- /dev/null +++ b/node_modules/@sveltejs/kit/src/exports/index.js @@ -0,0 +1,264 @@ +import { HttpError, Redirect, ActionFailure } from '../runtime/control.js'; +import { BROWSER, DEV } from 'esm-env'; +import { + add_data_suffix, + add_resolution_suffix, + has_data_suffix, + has_resolution_suffix, + strip_data_suffix, + strip_resolution_suffix +} from '../runtime/pathname.js'; + +export { VERSION } from '../version.js'; + +// TODO 3.0: remove these types as they are not used anymore (we can't remove them yet because that would be a breaking change) +/** + * @template {number} TNumber + * @template {any[]} [TArray=[]] + * @typedef {TNumber extends TArray['length'] ? TArray[number] : LessThan} LessThan + */ + +/** + * @template {number} TStart + * @template {number} TEnd + * @typedef {Exclude, LessThan>} NumericRange + */ + +// Keep the status codes as `number` because restricting to certain numbers makes it unnecessarily hard to use compared to the benefits +// (we have runtime errors already to check for invalid codes). Also see https://github.com/sveltejs/kit/issues/11780 + +// we have to repeat the JSDoc because the display for function overloads is broken +// see https://github.com/microsoft/TypeScript/issues/55056 + +/** + * Throws an error with a HTTP status code and an optional message. + * When called during request handling, this will cause SvelteKit to + * return an error response without invoking `handleError`. + * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it. + * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. + * @param {App.Error} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property. + * @overload + * @param {number} status + * @param {App.Error} body + * @return {never} + * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling. + * @throws {Error} If the provided status is invalid (not between 400 and 599). + */ +/** + * Throws an error with a HTTP status code and an optional message. + * When called during request handling, this will cause SvelteKit to + * return an error response without invoking `handleError`. + * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it. + * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. + * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body] An object that conforms to the App.Error type. If a string is passed, it will be used as the message property. + * @overload + * @param {number} status + * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body] + * @return {never} + * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling. + * @throws {Error} If the provided status is invalid (not between 400 and 599). + */ +/** + * Throws an error with a HTTP status code and an optional message. + * When called during request handling, this will cause SvelteKit to + * return an error response without invoking `handleError`. + * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it. + * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. + * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property. + * @return {never} + * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling. + * @throws {Error} If the provided status is invalid (not between 400 and 599). + */ +export function error(status, body) { + if ((!BROWSER || DEV) && (isNaN(status) || status < 400 || status > 599)) { + throw new Error(`HTTP error status codes must be between 400 and 599 — ${status} is invalid`); + } + + throw new HttpError(status, body); +} + +/** + * Checks whether this is an error thrown by {@link error}. + * @template {number} T + * @param {unknown} e + * @param {T} [status] The status to filter for. + * @return {e is (HttpError & { status: T extends undefined ? never : T })} + */ +export function isHttpError(e, status) { + if (!(e instanceof HttpError)) return false; + return !status || e.status === status; +} + +/** + * Redirect a request. When called during request handling, SvelteKit will return a redirect response. + * Make sure you're not catching the thrown redirect, which would prevent SvelteKit from handling it. + * + * Most common status codes: + * * `303 See Other`: redirect as a GET request (often used after a form POST request) + * * `307 Temporary Redirect`: redirect will keep the request method + * * `308 Permanent Redirect`: redirect will keep the request method, SEO will be transferred to the new page + * + * [See all redirect status codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages) + * + * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | ({} & number)} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages). Must be in the range 300-308. + * @param {string | URL} location The location to redirect to. + * @throws {Redirect} This error instructs SvelteKit to redirect to the specified location. + * @throws {Error} If the provided status is invalid. + * @return {never} + */ +export function redirect(status, location) { + if ((!BROWSER || DEV) && (isNaN(status) || status < 300 || status > 308)) { + throw new Error('Invalid status code'); + } + + throw new Redirect( + // @ts-ignore + status, + location.toString() + ); +} + +/** + * Checks whether this is a redirect thrown by {@link redirect}. + * @param {unknown} e The object to check. + * @return {e is Redirect} + */ +export function isRedirect(e) { + return e instanceof Redirect; +} + +/** + * Create a JSON `Response` object from the supplied data. + * @param {any} data The value that will be serialized as JSON. + * @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. `Content-Type: application/json` and `Content-Length` headers will be added automatically. + */ +export function json(data, init) { + // TODO deprecate this in favour of `Response.json` when it's + // more widely supported + const body = JSON.stringify(data); + + // we can't just do `text(JSON.stringify(data), init)` because + // it will set a default `content-type` header. duplicated code + // means less duplicated work + const headers = new Headers(init?.headers); + if (!headers.has('content-length')) { + headers.set('content-length', encoder.encode(body).byteLength.toString()); + } + + if (!headers.has('content-type')) { + headers.set('content-type', 'application/json'); + } + + return new Response(body, { + ...init, + headers + }); +} + +const encoder = new TextEncoder(); + +/** + * Create a `Response` object from the supplied body. + * @param {string} body The value that will be used as-is. + * @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. A `Content-Length` header will be added automatically. + */ +export function text(body, init) { + const headers = new Headers(init?.headers); + if (!headers.has('content-length')) { + const encoded = encoder.encode(body); + headers.set('content-length', encoded.byteLength.toString()); + return new Response(encoded, { + ...init, + headers + }); + } + + return new Response(body, { + ...init, + headers + }); +} + +/** + * Create an `ActionFailure` object. Call when form submission fails. + * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. + * @overload + * @param {number} status + * @returns {import('./public.js').ActionFailure} + */ +/** + * Create an `ActionFailure` object. Call when form submission fails. + * @template {Record | undefined} [T=undefined] + * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. + * @param {T} data Data associated with the failure (e.g. validation errors) + * @overload + * @param {number} status + * @param {T} data + * @returns {import('./public.js').ActionFailure} + */ +/** + * Create an `ActionFailure` object. Call when form submission fails. + * @param {number} status + * @param {any} [data] + * @returns {import('./public.js').ActionFailure} + */ +export function fail(status, data) { + // @ts-expect-error unique symbol missing + return new ActionFailure(status, data); +} + +/** + * Checks whether this is an action failure thrown by {@link fail}. + * @param {unknown} e The object to check. + * @return {e is import('./public.js').ActionFailure} + */ +export function isActionFailure(e) { + return e instanceof ActionFailure; +} + +/** + * Strips possible SvelteKit-internal suffixes and trailing slashes from the URL pathname. + * Returns the normalized URL as well as a method for adding the potential suffix back + * based on a new pathname (possibly including search) or URL. + * ```js + * import { normalizeUrl } from '@sveltejs/kit'; + * + * const { url, denormalize } = normalizeUrl('/blog/post/__data.json'); + * console.log(url.pathname); // /blog/post + * console.log(denormalize('/blog/post/a')); // /blog/post/a/__data.json + * ``` + * @param {URL | string} url + * @returns {{ url: URL, wasNormalized: boolean, denormalize: (url?: string | URL) => URL }} + * @since 2.18.0 + */ +export function normalizeUrl(url) { + url = new URL(url, 'http://internal'); + + const is_route_resolution = has_resolution_suffix(url.pathname); + const is_data_request = has_data_suffix(url.pathname); + const has_trailing_slash = url.pathname !== '/' && url.pathname.endsWith('/'); + + if (is_route_resolution) { + url.pathname = strip_resolution_suffix(url.pathname); + } else if (is_data_request) { + url.pathname = strip_data_suffix(url.pathname); + } else if (has_trailing_slash) { + url.pathname = url.pathname.slice(0, -1); + } + + return { + url, + wasNormalized: is_data_request || is_route_resolution || has_trailing_slash, + denormalize: (new_url = url) => { + new_url = new URL(new_url, url); + if (is_route_resolution) { + new_url.pathname = add_resolution_suffix(new_url.pathname); + } else if (is_data_request) { + new_url.pathname = add_data_suffix(new_url.pathname); + } else if (has_trailing_slash && !new_url.pathname.endsWith('/')) { + new_url.pathname += '/'; + } + return new_url; + } + }; +} diff --git a/node_modules/@sveltejs/kit/src/exports/node/index.js b/node_modules/@sveltejs/kit/src/exports/node/index.js new file mode 100644 index 0000000..a69b7ae --- /dev/null +++ b/node_modules/@sveltejs/kit/src/exports/node/index.js @@ -0,0 +1,224 @@ +import { createReadStream } from 'node:fs'; +import { Readable } from 'node:stream'; +import * as set_cookie_parser from 'set-cookie-parser'; +import { SvelteKitError } from '../../runtime/control.js'; + +/** + * @param {import('http').IncomingMessage} req + * @param {number} [body_size_limit] + */ +function get_raw_body(req, body_size_limit) { + const h = req.headers; + + if (!h['content-type']) { + return null; + } + + const content_length = Number(h['content-length']); + + // check if no request body + if ( + (req.httpVersionMajor === 1 && isNaN(content_length) && h['transfer-encoding'] == null) || + content_length === 0 + ) { + return null; + } + + if (req.destroyed) { + const readable = new ReadableStream(); + void readable.cancel(); + return readable; + } + + let size = 0; + let cancelled = false; + + return new ReadableStream({ + start(controller) { + if (body_size_limit !== undefined && content_length > body_size_limit) { + let message = `Content-length of ${content_length} exceeds limit of ${body_size_limit} bytes.`; + + if (body_size_limit === 0) { + // https://github.com/sveltejs/kit/pull/11589 + // TODO this exists to aid migration — remove in a future version + message += ' To disable body size limits, specify Infinity rather than 0.'; + } + + const error = new SvelteKitError(413, 'Payload Too Large', message); + + controller.error(error); + return; + } + + req.on('error', (error) => { + cancelled = true; + controller.error(error); + }); + + req.on('end', () => { + if (cancelled) return; + controller.close(); + }); + + req.on('data', (chunk) => { + if (cancelled) return; + + size += chunk.length; + if (size > content_length) { + cancelled = true; + + const constraint = content_length ? 'content-length' : 'BODY_SIZE_LIMIT'; + const message = `request body size exceeded ${constraint} of ${content_length}`; + + const error = new SvelteKitError(413, 'Payload Too Large', message); + controller.error(error); + + return; + } + + controller.enqueue(chunk); + + if (controller.desiredSize === null || controller.desiredSize <= 0) { + req.pause(); + } + }); + }, + + pull() { + req.resume(); + }, + + cancel(reason) { + cancelled = true; + req.destroy(reason); + } + }); +} + +/** + * @param {{ + * request: import('http').IncomingMessage; + * base: string; + * bodySizeLimit?: number; + * }} options + * @returns {Promise} + */ +// TODO 3.0 make the signature synchronous? +// eslint-disable-next-line @typescript-eslint/require-await +export async function getRequest({ request, base, bodySizeLimit }) { + let headers = /** @type {Record} */ (request.headers); + if (request.httpVersionMajor >= 2) { + // the Request constructor rejects headers with ':' in the name + headers = Object.assign({}, headers); + // https://www.rfc-editor.org/rfc/rfc9113.html#section-8.3.1-2.3.5 + if (headers[':authority']) { + headers.host = headers[':authority']; + } + delete headers[':authority']; + delete headers[':method']; + delete headers[':path']; + delete headers[':scheme']; + } + + return new Request(base + request.url, { + // @ts-expect-error + duplex: 'half', + method: request.method, + headers: Object.entries(headers), + body: + request.method === 'GET' || request.method === 'HEAD' + ? undefined + : get_raw_body(request, bodySizeLimit) + }); +} + +/** + * @param {import('http').ServerResponse} res + * @param {Response} response + * @returns {Promise} + */ +// TODO 3.0 make the signature synchronous? +// eslint-disable-next-line @typescript-eslint/require-await +export async function setResponse(res, response) { + for (const [key, value] of response.headers) { + try { + res.setHeader( + key, + key === 'set-cookie' + ? set_cookie_parser.splitCookiesString( + // This is absurd but necessary, TODO: investigate why + /** @type {string}*/ (response.headers.get(key)) + ) + : value + ); + } catch (error) { + res.getHeaderNames().forEach((name) => res.removeHeader(name)); + res.writeHead(500).end(String(error)); + return; + } + } + + res.writeHead(response.status); + + if (!response.body) { + res.end(); + return; + } + + if (response.body.locked) { + res.end( + 'Fatal error: Response body is locked. ' + + "This can happen when the response was already read (for example through 'response.json()' or 'response.text()')." + ); + return; + } + + const reader = response.body.getReader(); + + if (res.destroyed) { + void reader.cancel(); + return; + } + + const cancel = (/** @type {Error|undefined} */ error) => { + res.off('close', cancel); + res.off('error', cancel); + + // If the reader has already been interrupted with an error earlier, + // then it will appear here, it is useless, but it needs to be catch. + reader.cancel(error).catch(() => {}); + if (error) res.destroy(error); + }; + + res.on('close', cancel); + res.on('error', cancel); + + void next(); + async function next() { + try { + for (;;) { + const { done, value } = await reader.read(); + + if (done) break; + + if (!res.write(value)) { + res.once('drain', next); + return; + } + } + res.end(); + } catch (error) { + cancel(error instanceof Error ? error : new Error(String(error))); + } + } +} + +/** + * Converts a file on disk to a readable stream + * @param {string} file + * @returns {ReadableStream} + * @since 2.4.0 + */ +export function createReadableStream(file) { + return /** @type {ReadableStream} */ (Readable.toWeb(createReadStream(file))); +} diff --git a/node_modules/@sveltejs/kit/src/exports/node/polyfills.js b/node_modules/@sveltejs/kit/src/exports/node/polyfills.js new file mode 100644 index 0000000..347c68c --- /dev/null +++ b/node_modules/@sveltejs/kit/src/exports/node/polyfills.js @@ -0,0 +1,30 @@ +import buffer from 'node:buffer'; +import { webcrypto as crypto } from 'node:crypto'; + +// `buffer.File` was added in Node 18.13.0 while the `File` global was added in Node 20.0.0 +const File = /** @type {import('node:buffer') & { File?: File}} */ (buffer).File; + +/** @type {Record} */ +const globals = { + crypto, + File +}; + +// exported for dev/preview and node environments +/** + * Make various web APIs available as globals: + * - `crypto` + * - `File` + */ +export function installPolyfills() { + for (const name in globals) { + if (name in globalThis) continue; + + Object.defineProperty(globalThis, name, { + enumerable: true, + configurable: true, + writable: true, + value: globals[name] + }); + } +} diff --git a/node_modules/@sveltejs/kit/src/exports/public.d.ts b/node_modules/@sveltejs/kit/src/exports/public.d.ts new file mode 100644 index 0000000..66374dd --- /dev/null +++ b/node_modules/@sveltejs/kit/src/exports/public.d.ts @@ -0,0 +1,1504 @@ +import 'svelte'; // pick up `declare module "*.svelte"` +import 'vite/client'; // pick up `declare module "*.jpg"`, etc. +import '../types/ambient.js'; + +import { CompileOptions } from 'svelte/compiler'; +import { + AdapterEntry, + CspDirectives, + HttpMethod, + Logger, + MaybePromise, + Prerendered, + PrerenderEntryGeneratorMismatchHandlerValue, + PrerenderHttpErrorHandlerValue, + PrerenderMissingIdHandlerValue, + PrerenderOption, + RequestOptions, + RouteSegment +} from '../types/private.js'; +import { BuildData, SSRNodeLoader, SSRRoute, ValidatedConfig } from 'types'; +import type { PluginOptions } from '@sveltejs/vite-plugin-svelte'; + +export { PrerenderOption } from '../types/private.js'; + +/** + * [Adapters](https://svelte.dev/docs/kit/adapters) are responsible for taking the production build and turning it into something that can be deployed to a platform of your choosing. + */ +export interface Adapter { + /** + * The name of the adapter, using for logging. Will typically correspond to the package name. + */ + name: string; + /** + * This function is called after SvelteKit has built your app. + * @param builder An object provided by SvelteKit that contains methods for adapting the app + */ + adapt: (builder: Builder) => MaybePromise; + /** + * Checks called during dev and build to determine whether specific features will work in production with this adapter. + */ + supports?: { + /** + * Test support for `read` from `$app/server`. + * @param details.config The merged route config + */ + read?: (details: { config: any; route: { id: string } }) => boolean; + }; + /** + * Creates an `Emulator`, which allows the adapter to influence the environment + * during dev, build and prerendering. + */ + emulate?: () => MaybePromise; +} + +export type LoadProperties | void> = input extends void + ? undefined // needs to be undefined, because void will break intellisense + : input extends Record + ? input + : unknown; + +export type AwaitedActions any>> = OptionalUnion< + { + [Key in keyof T]: UnpackValidationError>>; + }[keyof T] +>; + +// Takes a union type and returns a union type where each type also has all properties +// of all possible types (typed as undefined), making accessing them more ergonomic +type OptionalUnion< + U extends Record, // not unknown, else interfaces don't satisfy this constraint + A extends keyof U = U extends U ? keyof U : never +> = U extends unknown ? { [P in Exclude]?: never } & U : never; + +declare const uniqueSymbol: unique symbol; + +export interface ActionFailure | undefined = undefined> { + status: number; + data: T; + [uniqueSymbol]: true; // necessary or else UnpackValidationError could wrongly unpack objects with the same shape as ActionFailure +} + +type UnpackValidationError = + T extends ActionFailure + ? X + : T extends void + ? undefined // needs to be undefined, because void will corrupt union type + : T; + +/** + * This object is passed to the `adapt` function of adapters. + * It contains various methods and properties that are useful for adapting the app. + */ +export interface Builder { + /** Print messages to the console. `log.info` and `log.minor` are silent unless Vite's `logLevel` is `info`. */ + log: Logger; + /** Remove `dir` and all its contents. */ + rimraf: (dir: string) => void; + /** Create `dir` and any required parent directories. */ + mkdirp: (dir: string) => void; + + /** The fully resolved `svelte.config.js`. */ + config: ValidatedConfig; + /** Information about prerendered pages and assets, if any. */ + prerendered: Prerendered; + /** An array of all routes (including prerendered) */ + routes: RouteDefinition[]; + + // TODO 3.0 remove this method + /** + * Create separate functions that map to one or more routes of your app. + * @param fn A function that groups a set of routes into an entry point + * @deprecated Use `builder.routes` instead + */ + createEntries: (fn: (route: RouteDefinition) => AdapterEntry) => Promise; + + /** + * Find all the assets imported by server files belonging to `routes` + */ + findServerAssets: (routes: RouteDefinition[]) => string[]; + + /** + * Generate a fallback page for a static webserver to use when no route is matched. Useful for single-page apps. + */ + generateFallback: (dest: string) => Promise; + + /** + * Generate a module exposing build-time environment variables as `$env/dynamic/public`. + */ + generateEnvModule: () => void; + + /** + * Generate a server-side manifest to initialise the SvelteKit [server](https://svelte.dev/docs/kit/@sveltejs-kit#Server) with. + * @param opts a relative path to the base directory of the app and optionally in which format (esm or cjs) the manifest should be generated + */ + generateManifest: (opts: { relativePath: string; routes?: RouteDefinition[] }) => string; + + /** + * Resolve a path to the `name` directory inside `outDir`, e.g. `/path/to/.svelte-kit/my-adapter`. + * @param name path to the file, relative to the build directory + */ + getBuildDirectory: (name: string) => string; + /** Get the fully resolved path to the directory containing client-side assets, including the contents of your `static` directory. */ + getClientDirectory: () => string; + /** Get the fully resolved path to the directory containing server-side code. */ + getServerDirectory: () => string; + /** Get the application path including any configured `base` path, e.g. `my-base-path/_app`. */ + getAppPath: () => string; + + /** + * Write client assets to `dest`. + * @param dest the destination folder + * @returns an array of files written to `dest` + */ + writeClient: (dest: string) => string[]; + /** + * Write prerendered files to `dest`. + * @param dest the destination folder + * @returns an array of files written to `dest` + */ + writePrerendered: (dest: string) => string[]; + /** + * Write server-side code to `dest`. + * @param dest the destination folder + * @returns an array of files written to `dest` + */ + writeServer: (dest: string) => string[]; + /** + * Copy a file or directory. + * @param from the source file or directory + * @param to the destination file or directory + * @param opts.filter a function to determine whether a file or directory should be copied + * @param opts.replace a map of strings to replace + * @returns an array of files that were copied + */ + copy: ( + from: string, + to: string, + opts?: { + filter?(basename: string): boolean; + replace?: Record; + } + ) => string[]; + + /** + * Compress files in `directory` with gzip and brotli, where appropriate. Generates `.gz` and `.br` files alongside the originals. + * @param {string} directory The directory containing the files to be compressed + */ + compress: (directory: string) => Promise; +} + +export interface Config { + /** + * Options passed to [`svelte.compile`](https://svelte.dev/docs/svelte/svelte-compiler#CompileOptions). + * @default {} + */ + compilerOptions?: CompileOptions; + /** + * List of file extensions that should be treated as Svelte files. + * @default [".svelte"] + */ + extensions?: string[]; + /** SvelteKit options */ + kit?: KitConfig; + /** Preprocessor options, if any. Preprocessing can alternatively also be done through Vite's preprocessor capabilities. */ + preprocess?: any; + /** `vite-plugin-svelte` plugin options. */ + vitePlugin?: PluginOptions; + /** Any additional options required by tooling that integrates with Svelte. */ + [key: string]: any; +} + +export interface Cookies { + /** + * Gets a cookie that was previously set with `cookies.set`, or from the request headers. + * @param name the name of the cookie + * @param opts the options, passed directly to `cookie.parse`. See documentation [here](https://github.com/jshttp/cookie#cookieparsestr-options) + */ + get: (name: string, opts?: import('cookie').CookieParseOptions) => string | undefined; + + /** + * Gets all cookies that were previously set with `cookies.set`, or from the request headers. + * @param opts the options, passed directly to `cookie.parse`. See documentation [here](https://github.com/jshttp/cookie#cookieparsestr-options) + */ + getAll: (opts?: import('cookie').CookieParseOptions) => Array<{ name: string; value: string }>; + + /** + * Sets a cookie. This will add a `set-cookie` header to the response, but also make the cookie available via `cookies.get` or `cookies.getAll` during the current request. + * + * The `httpOnly` and `secure` options are `true` by default (except on http://localhost, where `secure` is `false`), and must be explicitly disabled if you want cookies to be readable by client-side JavaScript and/or transmitted over HTTP. The `sameSite` option defaults to `lax`. + * + * You must specify a `path` for the cookie. In most cases you should explicitly set `path: '/'` to make the cookie available throughout your app. You can use relative paths, or set `path: ''` to make the cookie only available on the current path and its children + * @param name the name of the cookie + * @param value the cookie value + * @param opts the options, passed directly to `cookie.serialize`. See documentation [here](https://github.com/jshttp/cookie#cookieserializename-value-options) + */ + set: ( + name: string, + value: string, + opts: import('cookie').CookieSerializeOptions & { path: string } + ) => void; + + /** + * Deletes a cookie by setting its value to an empty string and setting the expiry date in the past. + * + * You must specify a `path` for the cookie. In most cases you should explicitly set `path: '/'` to make the cookie available throughout your app. You can use relative paths, or set `path: ''` to make the cookie only available on the current path and its children + * @param name the name of the cookie + * @param opts the options, passed directly to `cookie.serialize`. The `path` must match the path of the cookie you want to delete. See documentation [here](https://github.com/jshttp/cookie#cookieserializename-value-options) + */ + delete: (name: string, opts: import('cookie').CookieSerializeOptions & { path: string }) => void; + + /** + * Serialize a cookie name-value pair into a `Set-Cookie` header string, but don't apply it to the response. + * + * The `httpOnly` and `secure` options are `true` by default (except on http://localhost, where `secure` is `false`), and must be explicitly disabled if you want cookies to be readable by client-side JavaScript and/or transmitted over HTTP. The `sameSite` option defaults to `lax`. + * + * You must specify a `path` for the cookie. In most cases you should explicitly set `path: '/'` to make the cookie available throughout your app. You can use relative paths, or set `path: ''` to make the cookie only available on the current path and its children + * + * @param name the name of the cookie + * @param value the cookie value + * @param opts the options, passed directly to `cookie.serialize`. See documentation [here](https://github.com/jshttp/cookie#cookieserializename-value-options) + */ + serialize: ( + name: string, + value: string, + opts: import('cookie').CookieSerializeOptions & { path: string } + ) => string; +} + +/** + * A collection of functions that influence the environment during dev, build and prerendering + */ +export interface Emulator { + /** + * A function that is called with the current route `config` and `prerender` option + * and returns an `App.Platform` object + */ + platform?(details: { config: any; prerender: PrerenderOption }): MaybePromise; +} + +export interface KitConfig { + /** + * Your [adapter](https://svelte.dev/docs/kit/adapters) is run when executing `vite build`. It determines how the output is converted for different platforms. + * @default undefined + */ + adapter?: Adapter; + /** + * An object containing zero or more aliases used to replace values in `import` statements. These aliases are automatically passed to Vite and TypeScript. + * + * ```js + * /// file: svelte.config.js + * /// type: import('@sveltejs/kit').Config + * const config = { + * kit: { + * alias: { + * // this will match a file + * 'my-file': 'path/to/my-file.js', + * + * // this will match a directory and its contents + * // (`my-directory/x` resolves to `path/to/my-directory/x`) + * 'my-directory': 'path/to/my-directory', + * + * // an alias ending /* will only match + * // the contents of a directory, not the directory itself + * 'my-directory/*': 'path/to/my-directory/*' + * } + * } + * }; + * ``` + * + * > [!NOTE] The built-in `$lib` alias is controlled by `config.kit.files.lib` as it is used for packaging. + * + * > [!NOTE] You will need to run `npm run dev` to have SvelteKit automatically generate the required alias configuration in `jsconfig.json` or `tsconfig.json`. + * @default {} + */ + alias?: Record; + /** + * The directory where SvelteKit keeps its stuff, including static assets (such as JS and CSS) and internally-used routes. + * + * If `paths.assets` is specified, there will be two app directories — `${paths.assets}/${appDir}` and `${paths.base}/${appDir}`. + * @default "_app" + */ + appDir?: string; + /** + * [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) configuration. CSP helps to protect your users against cross-site scripting (XSS) attacks, by limiting the places resources can be loaded from. For example, a configuration like this... + * + * ```js + * /// file: svelte.config.js + * /// type: import('@sveltejs/kit').Config + * const config = { + * kit: { + * csp: { + * directives: { + * 'script-src': ['self'] + * }, + * // must be specified with either the `report-uri` or `report-to` directives, or both + * reportOnly: { + * 'script-src': ['self'], + * 'report-uri': ['/'] + * } + * } + * } + * }; + * + * export default config; + * ``` + * + * ...would prevent scripts loading from external sites. SvelteKit will augment the specified directives with nonces or hashes (depending on `mode`) for any inline styles and scripts it generates. + * + * To add a nonce for scripts and links manually included in `src/app.html`, you may use the placeholder `%sveltekit.nonce%` (for example ` + * + * + * + * + * + * ``` + * @default 'split' + * @since 2.13.0 + */ + bundleStrategy?: 'split' | 'single' | 'inline'; + }; + paths?: { + /** + * An absolute path that your app's files are served from. This is useful if your files are served from a storage bucket of some kind. + * @default "" + */ + assets?: '' | `http://${string}` | `https://${string}`; + /** + * A root-relative path that must start, but not end with `/` (e.g. `/base-path`), unless it is the empty string. This specifies where your app is served from and allows the app to live on a non-root path. Note that you need to prepend all your root-relative links with the base value or they will point to the root of your domain, not your `base` (this is how the browser works). You can use [`base` from `$app/paths`](https://svelte.dev/docs/kit/$app-paths#base) for that: `Link`. If you find yourself writing this often, it may make sense to extract this into a reusable component. + * @default "" + */ + base?: '' | `/${string}`; + /** + * Whether to use relative asset paths. + * + * If `true`, `base` and `assets` imported from `$app/paths` will be replaced with relative asset paths during server-side rendering, resulting in more portable HTML. + * If `false`, `%sveltekit.assets%` and references to build artifacts will always be root-relative paths, unless `paths.assets` is an external URL + * + * [Single-page app](https://svelte.dev/docs/kit/single-page-apps) fallback pages will always use absolute paths, regardless of this setting. + * + * If your app uses a `` element, you should set this to `false`, otherwise asset URLs will incorrectly be resolved against the `` URL rather than the current page. + * + * In 1.0, `undefined` was a valid value, which was set by default. In that case, if `paths.assets` was not external, SvelteKit would replace `%sveltekit.assets%` with a relative path and use relative paths to reference build artifacts, but `base` and `assets` imported from `$app/paths` would be as specified in your config. + * + * @default true + * @since 1.9.0 + */ + relative?: boolean; + }; + /** + * See [Prerendering](https://svelte.dev/docs/kit/page-options#prerender). + */ + prerender?: { + /** + * How many pages can be prerendered simultaneously. JS is single-threaded, but in cases where prerendering performance is network-bound (for example loading content from a remote CMS) this can speed things up by processing other tasks while waiting on the network response. + * @default 1 + */ + concurrency?: number; + /** + * Whether SvelteKit should find pages to prerender by following links from `entries`. + * @default true + */ + crawl?: boolean; + /** + * An array of pages to prerender, or start crawling from (if `crawl: true`). The `*` string includes all routes containing no required `[parameters]` with optional parameters included as being empty (since SvelteKit doesn't know what value any parameters should have). + * @default ["*"] + */ + entries?: Array<'*' | `/${string}`>; + /** + * How to respond to HTTP errors encountered while prerendering the app. + * + * - `'fail'` — fail the build + * - `'ignore'` - silently ignore the failure and continue + * - `'warn'` — continue, but print a warning + * - `(details) => void` — a custom error handler that takes a `details` object with `status`, `path`, `referrer`, `referenceType` and `message` properties. If you `throw` from this function, the build will fail + * + * ```js + * /// file: svelte.config.js + * /// type: import('@sveltejs/kit').Config + * const config = { + * kit: { + * prerender: { + * handleHttpError: ({ path, referrer, message }) => { + * // ignore deliberate link to shiny 404 page + * if (path === '/not-found' && referrer === '/blog/how-we-built-our-404-page') { + * return; + * } + * + * // otherwise fail the build + * throw new Error(message); + * } + * } + * } + * }; + * ``` + * + * @default "fail" + * @since 1.15.7 + */ + handleHttpError?: PrerenderHttpErrorHandlerValue; + /** + * How to respond when hash links from one prerendered page to another don't correspond to an `id` on the destination page. + * + * - `'fail'` — fail the build + * - `'ignore'` - silently ignore the failure and continue + * - `'warn'` — continue, but print a warning + * - `(details) => void` — a custom error handler that takes a `details` object with `path`, `id`, `referrers` and `message` properties. If you `throw` from this function, the build will fail + * + * @default "fail" + * @since 1.15.7 + */ + handleMissingId?: PrerenderMissingIdHandlerValue; + /** + * How to respond when an entry generated by the `entries` export doesn't match the route it was generated from. + * + * - `'fail'` — fail the build + * - `'ignore'` - silently ignore the failure and continue + * - `'warn'` — continue, but print a warning + * - `(details) => void` — a custom error handler that takes a `details` object with `generatedFromId`, `entry`, `matchedId` and `message` properties. If you `throw` from this function, the build will fail + * + * @default "fail" + * @since 1.16.0 + */ + handleEntryGeneratorMismatch?: PrerenderEntryGeneratorMismatchHandlerValue; + /** + * The value of `url.origin` during prerendering; useful if it is included in rendered content. + * @default "http://sveltekit-prerender" + */ + origin?: string; + }; + router?: { + /** + * What type of client-side router to use. + * - `'pathname'` is the default and means the current URL pathname determines the route + * - `'hash'` means the route is determined by `location.hash`. In this case, SSR and prerendering are disabled. This is only recommended if `pathname` is not an option, for example because you don't control the webserver where your app is deployed. + * It comes with some caveats: you can't use server-side rendering (or indeed any server logic), and you have to make sure that the links in your app all start with #/, or they won't work. Beyond that, everything works exactly like a normal SvelteKit app. + * + * @default "pathname" + * @since 2.14.0 + */ + type?: 'pathname' | 'hash'; + /** + * How to determine which route to load when navigating to a new page. + * + * By default, SvelteKit will serve a route manifest to the browser. + * When navigating, this manifest is used (along with the `reroute` hook, if it exists) to determine which components to load and which `load` functions to run. + * Because everything happens on the client, this decision can be made immediately. The drawback is that the manifest needs to be + * loaded and parsed before the first navigation can happen, which may have an impact if your app contains many routes. + * + * Alternatively, SvelteKit can determine the route on the server. This means that for every navigation to a path that has not yet been visited, the server will be asked to determine the route. + * This has several advantages: + * - The client does not need to load the routing manifest upfront, which can lead to faster initial page loads + * - The list of routes is hidden from public view + * - The server has an opportunity to intercept each navigation (for example through a middleware), enabling (for example) A/B testing opaque to SvelteKit + + * The drawback is that for unvisited paths, resolution will take slightly longer (though this is mitigated by [preloading](https://svelte.dev/docs/kit/link-options#data-sveltekit-preload-data)). + * + * > [!NOTE] When using server-side route resolution and prerendering, the resolution is prerendered along with the route itself. + * + * @default "client" + * @since 2.17.0 + */ + resolution?: 'client' | 'server'; + }; + serviceWorker?: { + /** + * Whether to automatically register the service worker, if it exists. + * @default true + */ + register?: boolean; + /** + * Determine which files in your `static` directory will be available in `$service-worker.files`. + * @default (filename) => !/\.DS_Store/.test(filename) + */ + files?(filepath: string): boolean; + }; + typescript?: { + /** + * A function that allows you to edit the generated `tsconfig.json`. You can mutate the config (recommended) or return a new one. + * This is useful for extending a shared `tsconfig.json` in a monorepo root, for example. + * @default (config) => config + * @since 1.3.0 + */ + config?: (config: Record) => Record | void; + }; + /** + * Client-side navigation can be buggy if you deploy a new version of your app while people are using it. If the code for the new page is already loaded, it may have stale content; if it isn't, the app's route manifest may point to a JavaScript file that no longer exists. + * SvelteKit helps you solve this problem through version management. + * If SvelteKit encounters an error while loading the page and detects that a new version has been deployed (using the `name` specified here, which defaults to a timestamp of the build) it will fall back to traditional full-page navigation. + * Not all navigations will result in an error though, for example if the JavaScript for the next page is already loaded. If you still want to force a full-page navigation in these cases, use techniques such as setting the `pollInterval` and then using `beforeNavigate`: + * ```html + * /// file: +layout.svelte + * + * ``` + * + * If you set `pollInterval` to a non-zero value, SvelteKit will poll for new versions in the background and set the value of [`updated.current`](https://svelte.dev/docs/kit/$app-state#updated) `true` when it detects one. + */ + version?: { + /** + * The current app version string. If specified, this must be deterministic (e.g. a commit ref rather than `Math.random()` or `Date.now().toString()`), otherwise defaults to a timestamp of the build. + * + * For example, to use the current commit hash, you could do use `git rev-parse HEAD`: + * + * ```js + * /// file: svelte.config.js + * import * as child_process from 'node:child_process'; + * + * export default { + * kit: { + * version: { + * name: child_process.execSync('git rev-parse HEAD').toString().trim() + * } + * } + * }; + * ``` + */ + name?: string; + /** + * The interval in milliseconds to poll for version changes. If this is `0`, no polling occurs. + * @default 0 + */ + pollInterval?: number; + }; +} + +/** + * The [`handle`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle) hook runs every time the SvelteKit server receives a [request](https://svelte.dev/docs/kit/web-standards#Fetch-APIs-Request) and + * determines the [response](https://svelte.dev/docs/kit/web-standards#Fetch-APIs-Response). + * It receives an `event` object representing the request and a function called `resolve`, which renders the route and generates a `Response`. + * This allows you to modify response headers or bodies, or bypass SvelteKit entirely (for implementing routes programmatically, for example). + */ +export type Handle = (input: { + event: RequestEvent; + resolve: (event: RequestEvent, opts?: ResolveOptions) => MaybePromise; +}) => MaybePromise; + +/** + * The server-side [`handleError`](https://svelte.dev/docs/kit/hooks#Shared-hooks-handleError) hook runs when an unexpected error is thrown while responding to a request. + * + * If an unexpected error is thrown during loading or rendering, this function will be called with the error and the event. + * Make sure that this function _never_ throws an error. + */ +export type HandleServerError = (input: { + error: unknown; + event: RequestEvent; + status: number; + message: string; +}) => MaybePromise; + +/** + * The client-side [`handleError`](https://svelte.dev/docs/kit/hooks#Shared-hooks-handleError) hook runs when an unexpected error is thrown while navigating. + * + * If an unexpected error is thrown during loading or the following render, this function will be called with the error and the event. + * Make sure that this function _never_ throws an error. + */ +export type HandleClientError = (input: { + error: unknown; + event: NavigationEvent; + status: number; + message: string; +}) => MaybePromise; + +/** + * The [`handleFetch`](https://svelte.dev/docs/kit/hooks#Server-hooks-handleFetch) hook allows you to modify (or replace) the result of an [`event.fetch`](https://svelte.dev/docs/kit/load#Making-fetch-requests) call that runs on the server (or during prerendering) inside an endpoint, `load`, `action`, `handle`, `handleError` or `reroute`. + */ +export type HandleFetch = (input: { + event: RequestEvent; + request: Request; + fetch: typeof fetch; +}) => MaybePromise; + +/** + * The [`init`](https://svelte.dev/docs/kit/hooks#Shared-hooks-init) will be invoked before the server responds to its first request + * @since 2.10.0 + */ +export type ServerInit = () => MaybePromise; + +/** + * The [`init`](https://svelte.dev/docs/kit/hooks#Shared-hooks-init) will be invoked once the app starts in the browser + * @since 2.10.0 + */ +export type ClientInit = () => MaybePromise; + +/** + * The [`reroute`](https://svelte.dev/docs/kit/hooks#Universal-hooks-reroute) hook allows you to modify the URL before it is used to determine which route to render. + * @since 2.3.0 + */ +export type Reroute = (event: { url: URL; fetch: typeof fetch }) => MaybePromise; + +/** + * The [`transport`](https://svelte.dev/docs/kit/hooks#Universal-hooks-transport) hook allows you to transport custom types across the server/client boundary. + * + * Each transporter has a pair of `encode` and `decode` functions. On the server, `encode` determines whether a value is an instance of the custom type and, if so, returns a non-falsy encoding of the value which can be an object or an array (or `false` otherwise). + * + * In the browser, `decode` turns the encoding back into an instance of the custom type. + * + * ```ts + * import type { Transport } from '@sveltejs/kit'; + * + * declare class MyCustomType { + * data: any + * } + * + * // hooks.js + * export const transport: Transport = { + * MyCustomType: { + * encode: (value) => value instanceof MyCustomType && [value.data], + * decode: ([data]) => new MyCustomType(data) + * } + * }; + * ``` + * @since 2.11.0 + */ +export type Transport = Record; + +/** + * A member of the [`transport`](https://svelte.dev/docs/kit/hooks#Universal-hooks-transport) hook. + */ +export interface Transporter< + T = any, + U = Exclude +> { + encode: (value: T) => false | U; + decode: (data: U) => T; +} + +/** + * The generic form of `PageLoad` and `LayoutLoad`. You should import those from `./$types` (see [generated types](https://svelte.dev/docs/kit/types#Generated-types)) + * rather than using `Load` directly. + */ +export type Load< + Params extends Partial> = Partial>, + InputData extends Record | null = Record | null, + ParentData extends Record = Record, + OutputData extends Record | void = Record | void, + RouteId extends string | null = string | null +> = (event: LoadEvent) => MaybePromise; + +/** + * The generic form of `PageLoadEvent` and `LayoutLoadEvent`. You should import those from `./$types` (see [generated types](https://svelte.dev/docs/kit/types#Generated-types)) + * rather than using `LoadEvent` directly. + */ +export interface LoadEvent< + Params extends Partial> = Partial>, + Data extends Record | null = Record | null, + ParentData extends Record = Record, + RouteId extends string | null = string | null +> extends NavigationEvent { + /** + * `fetch` is equivalent to the [native `fetch` web API](https://developer.mozilla.org/en-US/docs/Web/API/fetch), with a few additional features: + * + * - It can be used to make credentialed requests on the server, as it inherits the `cookie` and `authorization` headers for the page request. + * - It can make relative requests on the server (ordinarily, `fetch` requires a URL with an origin when used in a server context). + * - Internal requests (e.g. for `+server.js` routes) go directly to the handler function when running on the server, without the overhead of an HTTP call. + * - During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text` and `json` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle) + * - During hydration, the response will be read from the HTML, guaranteeing consistency and preventing an additional network request. + * + * You can learn more about making credentialed requests with cookies [here](https://svelte.dev/docs/kit/load#Cookies) + */ + fetch: typeof fetch; + /** + * Contains the data returned by the route's server `load` function (in `+layout.server.js` or `+page.server.js`), if any. + */ + data: Data; + /** + * If you need to set headers for the response, you can do so using the this method. This is useful if you want the page to be cached, for example: + * + * ```js + * /// file: src/routes/blog/+page.js + * export async function load({ fetch, setHeaders }) { + * const url = `https://cms.example.com/articles.json`; + * const response = await fetch(url); + * + * setHeaders({ + * age: response.headers.get('age'), + * 'cache-control': response.headers.get('cache-control') + * }); + * + * return response.json(); + * } + * ``` + * + * Setting the same header multiple times (even in separate `load` functions) is an error — you can only set a given header once. + * + * You cannot add a `set-cookie` header with `setHeaders` — use the [`cookies`](https://svelte.dev/docs/kit/@sveltejs-kit#Cookies) API in a server-only `load` function instead. + * + * `setHeaders` has no effect when a `load` function runs in the browser. + */ + setHeaders: (headers: Record) => void; + /** + * `await parent()` returns data from parent `+layout.js` `load` functions. + * Implicitly, a missing `+layout.js` is treated as a `({ data }) => data` function, meaning that it will return and forward data from parent `+layout.server.js` files. + * + * Be careful not to introduce accidental waterfalls when using `await parent()`. If for example you only want to merge parent data into the returned output, call it _after_ fetching your other data. + */ + parent: () => Promise; + /** + * This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](https://svelte.dev/docs/kit/$app-navigation#invalidate) to cause `load` to rerun. + * + * Most of the time you won't need this, as `fetch` calls `depends` on your behalf — it's only necessary if you're using a custom API client that bypasses `fetch`. + * + * URLs can be absolute or relative to the page being loaded, and must be [encoded](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding). + * + * Custom identifiers have to be prefixed with one or more lowercase letters followed by a colon to conform to the [URI specification](https://www.rfc-editor.org/rfc/rfc3986.html). + * + * The following example shows how to use `depends` to register a dependency on a custom identifier, which is `invalidate`d after a button click, making the `load` function rerun. + * + * ```js + * /// file: src/routes/+page.js + * let count = 0; + * export async function load({ depends }) { + * depends('increase:count'); + * + * return { count: count++ }; + * } + * ``` + * + * ```html + * /// file: src/routes/+page.svelte + * + * + *

{data.count}

+ * + * ``` + */ + depends: (...deps: Array<`${string}:${string}`>) => void; + /** + * Use this function to opt out of dependency tracking for everything that is synchronously called within the callback. Example: + * + * ```js + * /// file: src/routes/+page.server.js + * export async function load({ untrack, url }) { + * // Untrack url.pathname so that path changes don't trigger a rerun + * if (untrack(() => url.pathname === '/')) { + * return { message: 'Welcome!' }; + * } + * } + * ``` + */ + untrack: (fn: () => T) => T; +} + +export interface NavigationEvent< + Params extends Partial> = Partial>, + RouteId extends string | null = string | null +> { + /** + * The parameters of the current page - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object + */ + params: Params; + /** + * Info about the current route + */ + route: { + /** + * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. It is `null` when no route is matched. + */ + id: RouteId; + }; + /** + * The URL of the current page + */ + url: URL; +} + +/** + * Information about the target of a specific navigation. + */ +export interface NavigationTarget { + /** + * Parameters of the target page - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object. + * Is `null` if the target is not part of the SvelteKit app (could not be resolved to a route). + */ + params: Record | null; + /** + * Info about the target route + */ + route: { + /** + * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. It is `null` when no route is matched. + */ + id: string | null; + }; + /** + * The URL that is navigated to + */ + url: URL; +} + +/** + * - `enter`: The app has hydrated/started + * - `form`: The user submitted a `

` with a GET method + * - `leave`: The user is leaving the app by closing the tab or using the back/forward buttons to go to a different document + * - `link`: Navigation was triggered by a link click + * - `goto`: Navigation was triggered by a `goto(...)` call or a redirect + * - `popstate`: Navigation was triggered by back/forward navigation + */ +export type NavigationType = 'enter' | 'form' | 'leave' | 'link' | 'goto' | 'popstate'; + +export interface Navigation { + /** + * Where navigation was triggered from + */ + from: NavigationTarget | null; + /** + * Where navigation is going to/has gone to + */ + to: NavigationTarget | null; + /** + * The type of navigation: + * - `form`: The user submitted a `` + * - `leave`: The app is being left either because the tab is being closed or a navigation to a different document is occurring + * - `link`: Navigation was triggered by a link click + * - `goto`: Navigation was triggered by a `goto(...)` call or a redirect + * - `popstate`: Navigation was triggered by back/forward navigation + */ + type: Exclude; + /** + * Whether or not the navigation will result in the page being unloaded (i.e. not a client-side navigation) + */ + willUnload: boolean; + /** + * In case of a history back/forward navigation, the number of steps to go back/forward + */ + delta?: number; + /** + * A promise that resolves once the navigation is complete, and rejects if the navigation + * fails or is aborted. In the case of a `willUnload` navigation, the promise will never resolve + */ + complete: Promise; +} + +/** + * The argument passed to [`beforeNavigate`](https://svelte.dev/docs/kit/$app-navigation#beforeNavigate) callbacks. + */ +export interface BeforeNavigate extends Navigation { + /** + * Call this to prevent the navigation from starting. + */ + cancel: () => void; +} + +/** + * The argument passed to [`onNavigate`](https://svelte.dev/docs/kit/$app-navigation#onNavigate) callbacks. + */ +export interface OnNavigate extends Navigation { + /** + * The type of navigation: + * - `form`: The user submitted a `` + * - `link`: Navigation was triggered by a link click + * - `goto`: Navigation was triggered by a `goto(...)` call or a redirect + * - `popstate`: Navigation was triggered by back/forward navigation + */ + type: Exclude; + /** + * Since `onNavigate` callbacks are called immediately before a client-side navigation, they will never be called with a navigation that unloads the page. + */ + willUnload: false; +} + +/** + * The argument passed to [`afterNavigate`](https://svelte.dev/docs/kit/$app-navigation#afterNavigate) callbacks. + */ +export interface AfterNavigate extends Omit { + /** + * The type of navigation: + * - `enter`: The app has hydrated/started + * - `form`: The user submitted a `` + * - `link`: Navigation was triggered by a link click + * - `goto`: Navigation was triggered by a `goto(...)` call or a redirect + * - `popstate`: Navigation was triggered by back/forward navigation + */ + type: Exclude; + /** + * Since `afterNavigate` callbacks are called after a navigation completes, they will never be called with a navigation that unloads the page. + */ + willUnload: false; +} + +/** + * The shape of the [`page`](https://svelte.dev/docs/kit/$app-state#page) reactive object and the [`$page`](https://svelte.dev/docs/kit/$app-stores) store. + */ +export interface Page< + Params extends Record = Record, + RouteId extends string | null = string | null +> { + /** + * The URL of the current page. + */ + url: URL; + /** + * The parameters of the current page - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object. + */ + params: Params; + /** + * Info about the current route. + */ + route: { + /** + * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. It is `null` when no route is matched. + */ + id: RouteId; + }; + /** + * HTTP status code of the current page. + */ + status: number; + /** + * The error object of the current page, if any. Filled from the `handleError` hooks. + */ + error: App.Error | null; + /** + * The merged result of all data from all `load` functions on the current page. You can type a common denominator through `App.PageData`. + */ + data: App.PageData & Record; + /** + * The page state, which can be manipulated using the [`pushState`](https://svelte.dev/docs/kit/$app-navigation#pushState) and [`replaceState`](https://svelte.dev/docs/kit/$app-navigation#replaceState) functions from `$app/navigation`. + */ + state: App.PageState; + /** + * Filled only after a form submission. See [form actions](https://svelte.dev/docs/kit/form-actions) for more info. + */ + form: any; +} + +/** + * The shape of a param matcher. See [matching](https://svelte.dev/docs/kit/advanced-routing#Matching) for more info. + */ +export type ParamMatcher = (param: string) => boolean; + +export interface RequestEvent< + Params extends Partial> = Partial>, + RouteId extends string | null = string | null +> { + /** + * Get or set cookies related to the current request + */ + cookies: Cookies; + /** + * `fetch` is equivalent to the [native `fetch` web API](https://developer.mozilla.org/en-US/docs/Web/API/fetch), with a few additional features: + * + * - It can be used to make credentialed requests on the server, as it inherits the `cookie` and `authorization` headers for the page request. + * - It can make relative requests on the server (ordinarily, `fetch` requires a URL with an origin when used in a server context). + * - Internal requests (e.g. for `+server.js` routes) go directly to the handler function when running on the server, without the overhead of an HTTP call. + * - During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text` and `json` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle) + * - During hydration, the response will be read from the HTML, guaranteeing consistency and preventing an additional network request. + * + * You can learn more about making credentialed requests with cookies [here](https://svelte.dev/docs/kit/load#Cookies). + */ + fetch: typeof fetch; + /** + * The client's IP address, set by the adapter. + */ + getClientAddress: () => string; + /** + * Contains custom data that was added to the request within the [`server handle hook`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle). + */ + locals: App.Locals; + /** + * The parameters of the current route - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object. + */ + params: Params; + /** + * Additional data made available through the adapter. + */ + platform: Readonly | undefined; + /** + * The original request object. + */ + request: Request; + /** + * Info about the current route. + */ + route: { + /** + * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. It is `null` when no route is matched. + */ + id: RouteId; + }; + /** + * If you need to set headers for the response, you can do so using the this method. This is useful if you want the page to be cached, for example: + * + * ```js + * /// file: src/routes/blog/+page.js + * export async function load({ fetch, setHeaders }) { + * const url = `https://cms.example.com/articles.json`; + * const response = await fetch(url); + * + * setHeaders({ + * age: response.headers.get('age'), + * 'cache-control': response.headers.get('cache-control') + * }); + * + * return response.json(); + * } + * ``` + * + * Setting the same header multiple times (even in separate `load` functions) is an error — you can only set a given header once. + * + * You cannot add a `set-cookie` header with `setHeaders` — use the [`cookies`](https://svelte.dev/docs/kit/@sveltejs-kit#Cookies) API instead. + */ + setHeaders: (headers: Record) => void; + /** + * The requested URL. + */ + url: URL; + /** + * `true` if the request comes from the client asking for `+page/layout.server.js` data. The `url` property will be stripped of the internal information + * related to the data request in this case. Use this property instead if the distinction is important to you. + */ + isDataRequest: boolean; + /** + * `true` for `+server.js` calls coming from SvelteKit without the overhead of actually making an HTTP request. This happens when you make same-origin `fetch` requests on the server. + */ + isSubRequest: boolean; +} + +/** + * A `(event: RequestEvent) => Response` function exported from a `+server.js` file that corresponds to an HTTP verb (`GET`, `PUT`, `PATCH`, etc) and handles requests with that method. + * + * It receives `Params` as the first generic argument, which you can skip by using [generated types](https://svelte.dev/docs/kit/types#Generated-types) instead. + */ +export type RequestHandler< + Params extends Partial> = Partial>, + RouteId extends string | null = string | null +> = (event: RequestEvent) => MaybePromise; + +export interface ResolveOptions { + /** + * Applies custom transforms to HTML. If `done` is true, it's the final chunk. Chunks are not guaranteed to be well-formed HTML + * (they could include an element's opening tag but not its closing tag, for example) + * but they will always be split at sensible boundaries such as `%sveltekit.head%` or layout/page components. + * @param input the html chunk and the info if this is the last chunk + */ + transformPageChunk?: (input: { html: string; done: boolean }) => MaybePromise; + /** + * Determines which headers should be included in serialized responses when a `load` function loads a resource with `fetch`. + * By default, none will be included. + * @param name header name + * @param value header value + */ + filterSerializedResponseHeaders?: (name: string, value: string) => boolean; + /** + * Determines what should be added to the `` tag to preload it. + * By default, `js` and `css` files will be preloaded. + * @param input the type of the file and its path + */ + preload?: (input: { type: 'font' | 'css' | 'js' | 'asset'; path: string }) => boolean; +} + +export interface RouteDefinition { + id: string; + api: { + methods: Array; + }; + page: { + methods: Array>; + }; + pattern: RegExp; + prerender: PrerenderOption; + segments: RouteSegment[]; + methods: Array; + config: Config; +} + +export class Server { + constructor(manifest: SSRManifest); + init(options: ServerInitOptions): Promise; + respond(request: Request, options: RequestOptions): Promise; +} + +export interface ServerInitOptions { + /** A map of environment variables. */ + env: Record; + /** A function that turns an asset filename into a `ReadableStream`. Required for the `read` export from `$app/server` to work. */ + read?: (file: string) => ReadableStream; +} + +export interface SSRManifest { + appDir: string; + appPath: string; + /** Static files from `kit.config.files.assets` and the service worker (if any). */ + assets: Set; + mimeTypes: Record; + + /** private fields */ + _: { + client: NonNullable; + nodes: SSRNodeLoader[]; + routes: SSRRoute[]; + prerendered_routes: Set; + matchers: () => Promise>; + /** A `[file]: size` map of all assets imported by server code. */ + server_assets: Record; + }; +} + +/** + * The generic form of `PageServerLoad` and `LayoutServerLoad`. You should import those from `./$types` (see [generated types](https://svelte.dev/docs/kit/types#Generated-types)) + * rather than using `ServerLoad` directly. + */ +export type ServerLoad< + Params extends Partial> = Partial>, + ParentData extends Record = Record, + OutputData extends Record | void = Record | void, + RouteId extends string | null = string | null +> = (event: ServerLoadEvent) => MaybePromise; + +export interface ServerLoadEvent< + Params extends Partial> = Partial>, + ParentData extends Record = Record, + RouteId extends string | null = string | null +> extends RequestEvent { + /** + * `await parent()` returns data from parent `+layout.server.js` `load` functions. + * + * Be careful not to introduce accidental waterfalls when using `await parent()`. If for example you only want to merge parent data into the returned output, call it _after_ fetching your other data. + */ + parent: () => Promise; + /** + * This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](https://svelte.dev/docs/kit/$app-navigation#invalidate) to cause `load` to rerun. + * + * Most of the time you won't need this, as `fetch` calls `depends` on your behalf — it's only necessary if you're using a custom API client that bypasses `fetch`. + * + * URLs can be absolute or relative to the page being loaded, and must be [encoded](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding). + * + * Custom identifiers have to be prefixed with one or more lowercase letters followed by a colon to conform to the [URI specification](https://www.rfc-editor.org/rfc/rfc3986.html). + * + * The following example shows how to use `depends` to register a dependency on a custom identifier, which is `invalidate`d after a button click, making the `load` function rerun. + * + * ```js + * /// file: src/routes/+page.js + * let count = 0; + * export async function load({ depends }) { + * depends('increase:count'); + * + * return { count: count++ }; + * } + * ``` + * + * ```html + * /// file: src/routes/+page.svelte + * + * + *

{data.count}

+ * + * ``` + */ + depends: (...deps: string[]) => void; + /** + * Use this function to opt out of dependency tracking for everything that is synchronously called within the callback. Example: + * + * ```js + * /// file: src/routes/+page.js + * export async function load({ untrack, url }) { + * // Untrack url.pathname so that path changes don't trigger a rerun + * if (untrack(() => url.pathname === '/')) { + * return { message: 'Welcome!' }; + * } + * } + * ``` + */ + untrack: (fn: () => T) => T; +} + +/** + * Shape of a form action method that is part of `export const actions = {...}` in `+page.server.js`. + * See [form actions](https://svelte.dev/docs/kit/form-actions) for more information. + */ +export type Action< + Params extends Partial> = Partial>, + OutputData extends Record | void = Record | void, + RouteId extends string | null = string | null +> = (event: RequestEvent) => MaybePromise; + +/** + * Shape of the `export const actions = {...}` object in `+page.server.js`. + * See [form actions](https://svelte.dev/docs/kit/form-actions) for more information. + */ +export type Actions< + Params extends Partial> = Partial>, + OutputData extends Record | void = Record | void, + RouteId extends string | null = string | null +> = Record>; + +/** + * When calling a form action via fetch, the response will be one of these shapes. + * ```svelte + * { + * return ({ result }) => { + * // result is of type ActionResult + * }; + * }} + * ``` + */ +export type ActionResult< + Success extends Record | undefined = Record, + Failure extends Record | undefined = Record +> = + | { type: 'success'; status: number; data?: Success } + | { type: 'failure'; status: number; data?: Failure } + | { type: 'redirect'; status: number; location: string } + | { type: 'error'; status?: number; error: any }; + +/** + * The object returned by the [`error`](https://svelte.dev/docs/kit/@sveltejs-kit#error) function. + */ +export interface HttpError { + /** The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses), in the range 400-599. */ + status: number; + /** The content of the error. */ + body: App.Error; +} + +/** + * The object returned by the [`redirect`](https://svelte.dev/docs/kit/@sveltejs-kit#redirect) function. + */ +export interface Redirect { + /** The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages), in the range 300-308. */ + status: 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308; + /** The location to redirect to. */ + location: string; +} + +export type SubmitFunction< + Success extends Record | undefined = Record, + Failure extends Record | undefined = Record +> = (input: { + action: URL; + formData: FormData; + formElement: HTMLFormElement; + controller: AbortController; + submitter: HTMLElement | null; + cancel: () => void; +}) => MaybePromise< + | void + | ((opts: { + formData: FormData; + formElement: HTMLFormElement; + action: URL; + result: ActionResult; + /** + * Call this to get the default behavior of a form submission response. + * @param options Set `reset: false` if you don't want the `` values to be reset after a successful submission. + * @param invalidateAll Set `invalidateAll: false` if you don't want the action to call `invalidateAll` after submission. + */ + update: (options?: { reset?: boolean; invalidateAll?: boolean }) => Promise; + }) => MaybePromise) +>; + +/** + * The type of `export const snapshot` exported from a page or layout component. + */ +export interface Snapshot { + capture: () => T; + restore: (snapshot: T) => void; +} + +export * from './index.js'; diff --git a/node_modules/@sveltejs/kit/src/exports/vite/build/build_server.js b/node_modules/@sveltejs/kit/src/exports/vite/build/build_server.js new file mode 100644 index 0000000..9332322 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/exports/vite/build/build_server.js @@ -0,0 +1,207 @@ +import fs from 'node:fs'; +import { mkdirp } from '../../../utils/filesystem.js'; +import { filter_fonts, find_deps, resolve_symlinks } from './utils.js'; +import { s } from '../../../utils/misc.js'; +import { normalizePath } from 'vite'; +import { basename, join } from 'node:path'; +import { create_node_analyser } from '../static_analysis/index.js'; + + +/** + * @param {string} out + * @param {import('types').ValidatedKitConfig} kit + * @param {import('types').ManifestData} manifest_data + * @param {import('vite').Manifest} server_manifest + * @param {import('vite').Manifest | null} client_manifest + * @param {import('vite').Rollup.OutputAsset[] | null} css + * @param {import('types').RecursiveRequired} output_config + * @param {Map | null>} static_exports + */ +export async function build_server_nodes(out, kit, manifest_data, server_manifest, client_manifest, css, output_config, static_exports) { + mkdirp(`${out}/server/nodes`); + mkdirp(`${out}/server/stylesheets`); + + /** @type {Map} */ + const stylesheet_lookup = new Map(); + + if (css) { + /** @type {Set} */ + const client_stylesheets = new Set(); + for (const key in client_manifest) { + client_manifest[key].css?.forEach((filename) => { + client_stylesheets.add(filename); + }); + } + + /** @type {Map} */ + const server_stylesheets = new Map(); + manifest_data.nodes.forEach((node, i) => { + if (!node.component || !server_manifest[node.component]) return; + + const { stylesheets } = find_deps(server_manifest, node.component, false); + + if (stylesheets.length) { + server_stylesheets.set(i, stylesheets); + } + }); + + for (const asset of css) { + // ignore dynamically imported stylesheets since we don't need to inline those + if (!client_stylesheets.has(asset.fileName) || asset.source.length >= kit.inlineStyleThreshold) { + continue; + } + + // We know that the names for entry points are numbers. + const [index] = basename(asset.fileName).split('.'); + // There can also be other CSS files from shared components + // for example, which we need to ignore here. + if (isNaN(+index)) continue; + + const file = `${out}/server/stylesheets/${index}.js`; + + // we need to inline the server stylesheet instead of the client one + // so that asset paths are correct on document load + const filenames = server_stylesheets.get(+index); + + if (!filenames) { + throw new Error('This should never happen, but if it does, it means we failed to find the server stylesheet for a node.'); + } + + const sources = filenames.map((filename) => { + return fs.readFileSync(`${out}/server/${filename}`, 'utf-8'); + }); + fs.writeFileSync(file, `// ${filenames.join(', ')}\nexport default ${s(sources.join('\n'))};`); + + stylesheet_lookup.set(asset.fileName, index); + } + } + + const { get_page_options } = create_node_analyser({ + resolve: (server_node) => { + // Windows needs the file:// protocol for absolute path dynamic imports + return import(`file://${join(out, 'server', resolve_symlinks(server_manifest, server_node).chunk.file)}`); + }, + static_exports + }); + + for (let i = 0; i < manifest_data.nodes.length; i++) { + const node = manifest_data.nodes[i]; + + /** @type {string[]} */ + const imports = []; + + // String representation of + /** @type {import('types').SSRNode} */ + /** @type {string[]} */ + const exports = [`export const index = ${i};`]; + + /** @type {string[]} */ + let imported = []; + + /** @type {string[]} */ + let stylesheets = []; + + /** @type {string[]} */ + let fonts = []; + + if (node.component && client_manifest) { + exports.push( + 'let component_cache;', + `export const component = async () => component_cache ??= (await import('../${ + resolve_symlinks(server_manifest, node.component).chunk.file + }')).default;` + ); + } + + if (node.universal) { + const page_options = await get_page_options(node); + if (!!page_options && page_options.ssr === false) { + exports.push(`export const universal = ${s(page_options, null, 2)};`) + } else { + imports.push( + `import * as universal from '../${resolve_symlinks(server_manifest, node.universal).chunk.file}';` + ); + // TODO: when building for analysis, explain why the file was loaded on the server if we fail to load it + exports.push('export { universal };'); + } + exports.push(`export const universal_id = ${s(node.universal)};`); + } + + if (node.server) { + imports.push( + `import * as server from '../${resolve_symlinks(server_manifest, node.server).chunk.file}';` + ); + exports.push('export { server };'); + exports.push(`export const server_id = ${s(node.server)};`); + } + + if (client_manifest && (node.universal || node.component) && output_config.bundleStrategy === 'split') { + const entry_path = `${normalizePath(kit.outDir)}/generated/client-optimized/nodes/${i}.js`; + const entry = find_deps(client_manifest, entry_path, true); + + // eagerly load stylesheets and fonts imported by the SSR-ed page to avoid FOUC. + // If it is not used during SSR, it can be lazily loaded in the browser. + + /** @type {import('types').AssetDependencies | undefined} */ + let component; + if (node.component) { + component = find_deps(server_manifest, node.component, true); + } + + /** @type {import('types').AssetDependencies | undefined} */ + let universal; + if (node.universal) { + universal = find_deps(server_manifest, node.universal, true); + } + + /** @type {Set} */ + const css_used_by_server = new Set(); + /** @type {Set} */ + const assets_used_by_server = new Set(); + + entry.stylesheet_map.forEach((value, key) => { + // pages and layouts are named as node indexes in the client manifest + // so we need to use the original filename when checking against the server manifest + if (key === entry_path) { + key = node.component ?? key; + } + + if (component?.stylesheet_map.has(key) || universal?.stylesheet_map.has(key)) { + value.css.forEach(file => css_used_by_server.add(file)); + value.assets.forEach(file => assets_used_by_server.add(file)); + } + }); + + imported = entry.imports; + stylesheets = Array.from(css_used_by_server); + fonts = filter_fonts(Array.from(assets_used_by_server)); + } + + exports.push( + `export const imports = ${s(imported)};`, + `export const stylesheets = ${s(stylesheets)};`, + `export const fonts = ${s(fonts)};` + ); + + /** @type {string[]} */ + const styles = []; + + stylesheets.forEach((file) => { + if (stylesheet_lookup.has(file)) { + const index = stylesheet_lookup.get(file); + const name = `stylesheet_${index}`; + imports.push(`import ${name} from '../stylesheets/${index}.js';`); + styles.push(`\t${s(file)}: ${name}`); + } + }); + + if (styles.length > 0) { + exports.push(`export const inline_styles = () => ({\n${styles.join(',\n')}\n});`); + } + + fs.writeFileSync( + `${out}/server/nodes/${i}.js`, + `${imports.join('\n')}\n\n${exports.join('\n')}\n` + ); + } +} diff --git a/node_modules/@sveltejs/kit/src/exports/vite/build/build_service_worker.js b/node_modules/@sveltejs/kit/src/exports/vite/build/build_service_worker.js new file mode 100644 index 0000000..17eff31 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/exports/vite/build/build_service_worker.js @@ -0,0 +1,133 @@ +import fs from 'node:fs'; +import * as vite from 'vite'; +import { dedent } from '../../../core/sync/utils.js'; +import { s } from '../../../utils/misc.js'; +import { get_config_aliases, strip_virtual_prefix, get_env, normalize_id } from '../utils.js'; +import { create_static_module } from '../../../core/env.js'; +import { env_static_public, service_worker } from '../module_ids.js'; + +/** + * @param {string} out + * @param {import('types').ValidatedKitConfig} kit + * @param {import('vite').ResolvedConfig} vite_config + * @param {import('types').ManifestData} manifest_data + * @param {string} service_worker_entry_file + * @param {import('types').Prerendered} prerendered + * @param {import('vite').Manifest} client_manifest + */ +export async function build_service_worker( + out, + kit, + vite_config, + manifest_data, + service_worker_entry_file, + prerendered, + client_manifest +) { + const build = new Set(); + for (const key in client_manifest) { + const { file, css = [], assets = [] } = client_manifest[key]; + build.add(file); + css.forEach((file) => build.add(file)); + assets.forEach((file) => build.add(file)); + } + + // in a service worker, `location` is the location of the service worker itself, + // which is guaranteed to be `/service-worker.js` + const base = "location.pathname.split('/').slice(0, -1).join('/')"; + + const service_worker_code = dedent` + export const base = /*@__PURE__*/ ${base}; + + export const build = [ + ${Array.from(build) + .map((file) => `base + ${s(`/${file}`)}`) + .join(',\n')} + ]; + + export const files = [ + ${manifest_data.assets + .filter((asset) => kit.serviceWorker.files(asset.file)) + .map((asset) => `base + ${s(`/${asset.file}`)}`) + .join(',\n')} + ]; + + export const prerendered = [ + ${prerendered.paths.map((path) => `base + ${s(path.replace(kit.paths.base, ''))}`).join(',\n')} + ]; + + export const version = ${s(kit.version.name)}; + `; + + const env = get_env(kit.env, vite_config.mode); + + /** + * @type {import('vite').Plugin} + */ + const sw_virtual_modules = { + name: 'service-worker-build-virtual-modules', + resolveId(id) { + if (id.startsWith('$env/') || id.startsWith('$app/') || id === '$service-worker') { + // ids with :$ don't work with reverse proxies like nginx + return `\0virtual:${id.substring(1)}`; + } + }, + + load(id) { + if (!id.startsWith('\0virtual:')) return; + + if (id === service_worker) { + return service_worker_code; + } + + if (id === env_static_public) { + return create_static_module('$env/static/public', env.public); + } + + const normalized_cwd = vite.normalizePath(process.cwd()); + const normalized_lib = vite.normalizePath(kit.files.lib); + const relative = normalize_id(id, normalized_lib, normalized_cwd); + const stripped = strip_virtual_prefix(relative); + throw new Error( + `Cannot import ${stripped} into service-worker code. Only the modules $service-worker and $env/static/public are available in service workers.` + ); + } + }; + + await vite.build({ + build: { + modulePreload: false, + rollupOptions: { + input: { + 'service-worker': service_worker_entry_file + }, + output: { + // .mjs so that esbuild doesn't incorrectly inject `export` https://github.com/vitejs/vite/issues/15379 + entryFileNames: 'service-worker.mjs', + assetFileNames: `${kit.appDir}/immutable/assets/[name].[hash][extname]`, + inlineDynamicImports: true + } + }, + outDir: `${out}/client`, + emptyOutDir: false, + minify: vite_config.build.minify + }, + configFile: false, + define: vite_config.define, + publicDir: false, + plugins: [sw_virtual_modules], + resolve: { + alias: [...get_config_aliases(kit)] + }, + experimental: { + renderBuiltUrl(filename) { + return { + runtime: `new URL(${JSON.stringify(filename)}, location.href).pathname` + }; + } + } + }); + + // rename .mjs to .js to avoid incorrect MIME types with ancient webservers + fs.renameSync(`${out}/client/service-worker.mjs`, `${out}/client/service-worker.js`); +} diff --git a/node_modules/@sveltejs/kit/src/exports/vite/build/utils.js b/node_modules/@sveltejs/kit/src/exports/vite/build/utils.js new file mode 100644 index 0000000..9bac458 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/exports/vite/build/utils.js @@ -0,0 +1,138 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import { normalizePath } from 'vite'; + +/** + * Adds transitive JS and CSS dependencies to the js and css inputs. + * @param {import('vite').Manifest} manifest + * @param {string} entry + * @param {boolean} add_dynamic_css + * @returns {import('types').AssetDependencies} + */ +export function find_deps(manifest, entry, add_dynamic_css) { + /** @type {Set} */ + const seen = new Set(); + + /** @type {Set} */ + const imports = new Set(); + + /** @type {Set} */ + const stylesheets = new Set(); + + /** @type {Set} */ + const imported_assets = new Set(); + + /** @type {Map; assets: Set }>} */ + const stylesheet_map = new Map(); + + /** + * @param {string} current + * @param {boolean} add_js + * @param {string} initial_importer + * @param {number} dynamic_import_depth + */ + function traverse(current, add_js, initial_importer, dynamic_import_depth) { + if (seen.has(current)) return; + seen.add(current); + + const { chunk } = resolve_symlinks(manifest, current); + + if (add_js) imports.add(chunk.file); + + if (chunk.assets) { + chunk.assets.forEach(asset => imported_assets.add(asset)); + } + + if (chunk.css) { + chunk.css.forEach((file) => stylesheets.add(file)); + } + + if (chunk.imports) { + chunk.imports.forEach((file) => traverse(file, add_js, initial_importer, dynamic_import_depth)); + } + + if (!add_dynamic_css) return; + + if ((chunk.css || chunk.assets) && dynamic_import_depth <= 1) { + // group files based on the initial importer because if a file is only ever + // a transitive dependency, it doesn't have a suitable name we can map back to + // the server manifest + if (stylesheet_map.has(initial_importer)) { + const { css, assets } = /** @type {{ css: Set; assets: Set }} */ (stylesheet_map.get(initial_importer)); + if (chunk.css) chunk.css.forEach((file) => css.add(file)); + if (chunk.assets) chunk.assets.forEach((file) => assets.add(file)); + } else { + stylesheet_map.set(initial_importer, { + css: new Set(chunk.css), + assets: new Set(chunk.assets) + }); + } + } + + if (chunk.dynamicImports) { + dynamic_import_depth++; + chunk.dynamicImports.forEach((file) => { + traverse(file, false, file, dynamic_import_depth); + }); + } + } + + const { chunk, file } = resolve_symlinks(manifest, entry); + + traverse(file, true, entry, 0); + + const assets = Array.from(imported_assets); + + return { + assets, + file: chunk.file, + imports: Array.from(imports), + stylesheets: Array.from(stylesheets), + // TODO do we need this separately? + fonts: filter_fonts(assets), + stylesheet_map + }; +} + +/** + * @param {import('vite').Manifest} manifest + * @param {string} file + */ +export function resolve_symlinks(manifest, file) { + while (!manifest[file]) { + const next = normalizePath(path.relative('.', fs.realpathSync(file))); + if (next === file) throw new Error(`Could not find file "${file}" in Vite manifest`); + file = next; + } + + const chunk = manifest[file]; + + return { chunk, file }; +} + +/** + * @param {string[]} assets + * @returns {string[]} + */ +export function filter_fonts(assets) { + return assets.filter((asset) => /\.(woff2?|ttf|otf)$/.test(asset)); +} + +const method_names = new Set((['GET', 'HEAD', 'PUT', 'POST', 'DELETE', 'PATCH', 'OPTIONS'])); + +// If we'd written this in TypeScript, it could be easy... +/** + * @param {string} str + * @returns {str is import('types').HttpMethod} + */ +export function is_http_method(str) { + return method_names.has(str); +} + +/** + * @param {import('types').ValidatedKitConfig} config + * @returns {string} + */ +export function assets_base(config) { + return (config.paths.assets || config.paths.base || '.') + '/'; +} diff --git a/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js b/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js new file mode 100644 index 0000000..28beac7 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js @@ -0,0 +1,651 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import process from 'node:process'; +import { URL } from 'node:url'; +import { AsyncLocalStorage } from 'node:async_hooks'; +import colors from 'kleur'; +import sirv from 'sirv'; +import { isCSSRequest, loadEnv, buildErrorMessage } from 'vite'; +import { createReadableStream, getRequest, setResponse } from '../../../exports/node/index.js'; +import { installPolyfills } from '../../../exports/node/polyfills.js'; +import { coalesce_to_error } from '../../../utils/error.js'; +import { from_fs, posixify, resolve_entry, to_fs } from '../../../utils/filesystem.js'; +import { load_error_page } from '../../../core/config/index.js'; +import { SVELTE_KIT_ASSETS } from '../../../constants.js'; +import * as sync from '../../../core/sync/sync.js'; +import { get_mime_lookup, runtime_base } from '../../../core/utils.js'; +import { compact } from '../../../utils/array.js'; +import { not_found } from '../utils.js'; +import { SCHEME } from '../../../utils/url.js'; +import { check_feature } from '../../../utils/features.js'; +import { escape_html } from '../../../utils/escape.js'; +import { create_node_analyser } from '../static_analysis/index.js'; + +const cwd = process.cwd(); +// vite-specifc queries that we should skip handling for css urls +const vite_css_query_regex = /(?:\?|&)(?:raw|url|inline)(?:&|$)/; + +/** + * @param {import('vite').ViteDevServer} vite + * @param {import('vite').ResolvedConfig} vite_config + * @param {import('types').ValidatedConfig} svelte_config + * @return {Promise void>>} + */ +export async function dev(vite, vite_config, svelte_config) { + installPolyfills(); + + const async_local_storage = new AsyncLocalStorage(); + + globalThis.__SVELTEKIT_TRACK__ = (label) => { + const context = async_local_storage.getStore(); + if (!context || context.prerender === true) return; + + check_feature(context.event.route.id, context.config, label, svelte_config.kit.adapter); + }; + + const fetch = globalThis.fetch; + globalThis.fetch = (info, init) => { + if (typeof info === 'string' && !SCHEME.test(info)) { + throw new Error( + `Cannot use relative URL (${info}) with global fetch — use \`event.fetch\` instead: https://svelte.dev/docs/kit/web-standards#fetch-apis` + ); + } + + return fetch(info, init); + }; + + sync.init(svelte_config, vite_config.mode); + + /** @type {import('types').ManifestData} */ + let manifest_data; + /** @type {import('@sveltejs/kit').SSRManifest} */ + let manifest; + + /** @type {Error | null} */ + let manifest_error = null; + + /** @param {string} url */ + async function loud_ssr_load_module(url) { + try { + return await vite.ssrLoadModule(url, { fixStacktrace: true }); + } catch (/** @type {any} */ err) { + const msg = buildErrorMessage(err, [colors.red(`Internal server error: ${err.message}`)]); + + if (!vite.config.logger.hasErrorLogged(err)) { + vite.config.logger.error(msg, { error: err }); + } + + vite.ws.send({ + type: 'error', + err: { + ...err, + // these properties are non-enumerable and will + // not be serialized unless we explicitly include them + message: err.message, + stack: err.stack + } + }); + + throw err; + } + } + + /** @param {string} id */ + async function resolve(id) { + const url = id.startsWith('..') ? to_fs(path.posix.resolve(id)) : `/${id}`; + + const module = await loud_ssr_load_module(url); + + const module_node = await vite.moduleGraph.getModuleByUrl(url); + if (!module_node) throw new Error(`Could not find node for ${url}`); + + return { module, module_node, url }; + } + + /** @type {(file: string) => void} */ + let invalidate_page_options; + + function update_manifest() { + try { + ({ manifest_data } = sync.create(svelte_config)); + + if (manifest_error) { + manifest_error = null; + vite.ws.send({ type: 'full-reload' }); + } + } catch (error) { + manifest_error = /** @type {Error} */ (error); + + console.error(colors.bold().red(manifest_error.message)); + vite.ws.send({ + type: 'error', + err: { + message: manifest_error.message ?? 'Invalid routes', + stack: '' + } + }); + + return; + } + + const node_analyser = create_node_analyser({ + resolve: async (server_node) => { + const { module } = await resolve(server_node); + return module; + } + }); + invalidate_page_options = node_analyser.invalidate_page_options; + + manifest = { + appDir: svelte_config.kit.appDir, + appPath: svelte_config.kit.appDir, + assets: new Set(manifest_data.assets.map((asset) => asset.file)), + mimeTypes: get_mime_lookup(manifest_data), + _: { + client: { + start: `${runtime_base}/client/entry.js`, + app: `${to_fs(svelte_config.kit.outDir)}/generated/client/app.js`, + imports: [], + stylesheets: [], + fonts: [], + uses_env_dynamic_public: true, + nodes: + svelte_config.kit.router.resolution === 'client' + ? undefined + : manifest_data.nodes.map((node, i) => { + if (node.component || node.universal) { + return `${svelte_config.kit.paths.base}${to_fs(svelte_config.kit.outDir)}/generated/client/nodes/${i}.js`; + } + }), + // `css` is not necessary in dev, as the JS file from `nodes` will reference the CSS file + routes: + svelte_config.kit.router.resolution === 'client' + ? undefined + : compact( + manifest_data.routes.map((route) => { + if (!route.page) return; + + return { + id: route.id, + pattern: route.pattern, + params: route.params, + layouts: route.page.layouts.map((l) => + l !== undefined ? [!!manifest_data.nodes[l].server, l] : undefined + ), + errors: route.page.errors, + leaf: [!!manifest_data.nodes[route.page.leaf].server, route.page.leaf] + }; + }) + ) + }, + server_assets: new Proxy( + {}, + { + has: (_, /** @type {string} */ file) => fs.existsSync(from_fs(file)), + get: (_, /** @type {string} */ file) => fs.statSync(from_fs(file)).size + } + ), + nodes: manifest_data.nodes.map((node, index) => { + return async () => { + /** @type {import('types').SSRNode} */ + const result = {}; + result.index = index; + result.universal_id = node.universal; + result.server_id = node.server; + + // these are unused in dev, but it's easier to include them + result.imports = []; + result.stylesheets = []; + result.fonts = []; + + /** @type {import('vite').ModuleNode[]} */ + const module_nodes = []; + + if (node.component) { + result.component = async () => { + const { module_node, module } = await resolve( + /** @type {string} */ (node.component) + ); + + module_nodes.push(module_node); + + return module.default; + }; + } + + if (node.universal) { + const page_options = await node_analyser.get_page_options(node); + if (page_options?.ssr === false) { + result.universal = page_options; + } else { + // TODO: explain why the file was loaded on the server if we fail to load it + const { module, module_node } = await resolve(node.universal); + module_nodes.push(module_node); + result.universal = module; + } + } + + if (node.server) { + const { module } = await resolve(node.server); + result.server = module; + } + + // in dev we inline all styles to avoid FOUC. this gets populated lazily so that + // components/stylesheets loaded via import() during `load` are included + result.inline_styles = async () => { + /** @type {Set} */ + const deps = new Set(); + + for (const module_node of module_nodes) { + await find_deps(vite, module_node, deps); + } + + /** @type {Record} */ + const styles = {}; + + for (const dep of deps) { + if (isCSSRequest(dep.url) && !vite_css_query_regex.test(dep.url)) { + const inlineCssUrl = dep.url.includes('?') + ? dep.url.replace('?', '?inline&') + : dep.url + '?inline'; + try { + const mod = await vite.ssrLoadModule(inlineCssUrl); + styles[dep.url] = mod.default; + } catch { + // this can happen with dynamically imported modules, I think + // because the Vite module graph doesn't distinguish between + // static and dynamic imports? TODO investigate, submit fix + } + } + } + + return styles; + }; + + return result; + }; + }), + prerendered_routes: new Set(), + routes: compact( + manifest_data.routes.map((route) => { + if (!route.page && !route.endpoint) return null; + + const endpoint = route.endpoint; + + return { + id: route.id, + pattern: route.pattern, + params: route.params, + page: route.page, + endpoint: endpoint + ? async () => { + const url = path.resolve(cwd, endpoint.file); + return await loud_ssr_load_module(url); + } + : null, + endpoint_id: endpoint?.file + }; + }) + ), + matchers: async () => { + /** @type {Record} */ + const matchers = {}; + + for (const key in manifest_data.matchers) { + const file = manifest_data.matchers[key]; + const url = path.resolve(cwd, file); + const module = await vite.ssrLoadModule(url, { fixStacktrace: true }); + + if (module.match) { + matchers[key] = module.match; + } else { + throw new Error(`${file} does not export a \`match\` function`); + } + } + + return matchers; + } + } + }; + } + + /** @param {Error} error */ + function fix_stack_trace(error) { + try { + vite.ssrFixStacktrace(error); + } catch { + // ssrFixStacktrace can fail on StackBlitz web containers and we don't know why + // by ignoring it the line numbers are wrong, but at least we can show the error + } + return error.stack; + } + + update_manifest(); + + /** + * @param {string} event + * @param {(file: string) => void} cb + */ + const watch = (event, cb) => { + vite.watcher.on(event, (file) => { + if ( + file.startsWith(svelte_config.kit.files.routes + path.sep) || + file.startsWith(svelte_config.kit.files.params + path.sep) || + // in contrast to server hooks, client hooks are written to the client manifest + // and therefore need rebuilding when they are added/removed + file.startsWith(svelte_config.kit.files.hooks.client) + ) { + cb(file); + } + }); + }; + /** @type {NodeJS.Timeout | null } */ + let timeout = null; + /** @param {() => void} to_run */ + const debounce = (to_run) => { + timeout && clearTimeout(timeout); + timeout = setTimeout(() => { + timeout = null; + to_run(); + }, 100); + }; + + // flag to skip watchers if server is already restarting + let restarting = false; + + // Debounce add/unlink events because in case of folder deletion or moves + // they fire in rapid succession, causing needless invocations. + watch('add', () => debounce(update_manifest)); + watch('unlink', () => debounce(update_manifest)); + watch('change', (file) => { + // Don't run for a single file if the whole manifest is about to get updated + if (timeout || restarting) return; + + sync.update(svelte_config, manifest_data, file); + invalidate_page_options(path.relative(cwd, file)); + }); + + const { appTemplate, errorTemplate, serviceWorker, hooks } = svelte_config.kit.files; + + // vite client only executes a full reload if the triggering html file path is index.html + // kit defaults to src/app.html, so unless user changed that to index.html + // send the vite client a full-reload event without path being set + if (appTemplate !== 'index.html') { + vite.watcher.on('change', (file) => { + if (file === appTemplate && !restarting) { + vite.ws.send({ type: 'full-reload' }); + } + }); + } + + vite.watcher.on('all', (_, file) => { + if ( + file === appTemplate || + file === errorTemplate || + file.startsWith(serviceWorker) || + file.startsWith(hooks.server) + ) { + sync.server(svelte_config); + } + }); + + // changing the svelte config requires restarting the dev server + // the config is only read on start and passed on to vite-plugin-svelte + // which needs up-to-date values to operate correctly + vite.watcher.on('change', async (file) => { + if (path.basename(file) === 'svelte.config.js') { + console.log(`svelte config changed, restarting vite dev-server. changed file: ${file}`); + restarting = true; + await vite.restart(); + } + }); + + const assets = svelte_config.kit.paths.assets ? SVELTE_KIT_ASSETS : svelte_config.kit.paths.base; + const asset_server = sirv(svelte_config.kit.files.assets, { + dev: true, + etag: true, + maxAge: 0, + extensions: [], + setHeaders: (res) => { + res.setHeader('access-control-allow-origin', '*'); + } + }); + + vite.middlewares.use((req, res, next) => { + const base = `${vite.config.server.https ? 'https' : 'http'}://${ + req.headers[':authority'] || req.headers.host + }`; + + const decoded = decodeURI(new URL(base + req.url).pathname); + + if (decoded.startsWith(assets)) { + const pathname = decoded.slice(assets.length); + const file = svelte_config.kit.files.assets + pathname; + + if (fs.existsSync(file) && !fs.statSync(file).isDirectory()) { + if (has_correct_case(file, svelte_config.kit.files.assets)) { + req.url = encodeURI(pathname); // don't need query/hash + asset_server(req, res); + return; + } + } + } + + next(); + }); + + const env = loadEnv(vite_config.mode, svelte_config.kit.env.dir, ''); + const emulator = await svelte_config.kit.adapter?.emulate?.(); + + return () => { + const serve_static_middleware = vite.middlewares.stack.find( + (middleware) => + /** @type {function} */ (middleware.handle).name === 'viteServeStaticMiddleware' + ); + + // Vite will give a 403 on URLs like /test, /static, and /package.json preventing us from + // serving routes with those names. See https://github.com/vitejs/vite/issues/7363 + remove_static_middlewares(vite.middlewares); + + vite.middlewares.use(async (req, res) => { + // Vite's base middleware strips out the base path. Restore it + const original_url = req.url; + req.url = req.originalUrl; + try { + const base = `${vite.config.server.https ? 'https' : 'http'}://${ + req.headers[':authority'] || req.headers.host + }`; + + const decoded = decodeURI(new URL(base + req.url).pathname); + const file = posixify(path.resolve(decoded.slice(svelte_config.kit.paths.base.length + 1))); + const is_file = fs.existsSync(file) && !fs.statSync(file).isDirectory(); + const allowed = + !vite_config.server.fs.strict || + vite_config.server.fs.allow.some((dir) => file.startsWith(dir)); + + if (is_file && allowed) { + req.url = original_url; + // @ts-expect-error + serve_static_middleware.handle(req, res); + return; + } + + if (!decoded.startsWith(svelte_config.kit.paths.base)) { + return not_found(req, res, svelte_config.kit.paths.base); + } + + if (decoded === svelte_config.kit.paths.base + '/service-worker.js') { + const resolved = resolve_entry(svelte_config.kit.files.serviceWorker); + + if (resolved) { + res.writeHead(200, { + 'content-type': 'application/javascript' + }); + res.end(`import '${svelte_config.kit.paths.base}${to_fs(resolved)}';`); + } else { + res.writeHead(404); + res.end('not found'); + } + + return; + } + + // we have to import `Server` before calling `set_assets` + const { Server } = /** @type {import('types').ServerModule} */ ( + await vite.ssrLoadModule(`${runtime_base}/server/index.js`, { fixStacktrace: true }) + ); + + const { set_fix_stack_trace } = await vite.ssrLoadModule( + `${runtime_base}/shared-server.js` + ); + set_fix_stack_trace(fix_stack_trace); + + const { set_assets } = await vite.ssrLoadModule('__sveltekit/paths'); + set_assets(assets); + + const server = new Server(manifest); + + await server.init({ + env, + read: (file) => createReadableStream(from_fs(file)) + }); + + const request = await getRequest({ + base, + request: req + }); + + if (manifest_error) { + console.error(colors.bold().red(manifest_error.message)); + + const error_page = load_error_page(svelte_config); + + /** @param {{ status: number; message: string }} opts */ + const error_template = ({ status, message }) => { + return error_page + .replace(/%sveltekit\.status%/g, String(status)) + .replace(/%sveltekit\.error\.message%/g, escape_html(message)); + }; + + res.writeHead(500, { + 'Content-Type': 'text/html; charset=utf-8' + }); + res.end( + error_template({ status: 500, message: manifest_error.message ?? 'Invalid routes' }) + ); + + return; + } + + const rendered = await server.respond(request, { + getClientAddress: () => { + const { remoteAddress } = req.socket; + if (remoteAddress) return remoteAddress; + throw new Error('Could not determine clientAddress'); + }, + read: (file) => { + if (file in manifest._.server_assets) { + return fs.readFileSync(from_fs(file)); + } + + return fs.readFileSync(path.join(svelte_config.kit.files.assets, file)); + }, + before_handle: (event, config, prerender) => { + async_local_storage.enterWith({ event, config, prerender }); + }, + emulator + }); + + if (rendered.status === 404) { + // @ts-expect-error + serve_static_middleware.handle(req, res, () => { + void setResponse(res, rendered); + }); + } else { + void setResponse(res, rendered); + } + } catch (e) { + const error = coalesce_to_error(e); + res.statusCode = 500; + res.end(fix_stack_trace(error)); + } + }); + }; +} + +/** + * @param {import('connect').Server} server + */ +function remove_static_middlewares(server) { + const static_middlewares = ['viteServeStaticMiddleware', 'viteServePublicMiddleware']; + for (let i = server.stack.length - 1; i > 0; i--) { + // @ts-expect-error using internals + if (static_middlewares.includes(server.stack[i].handle.name)) { + server.stack.splice(i, 1); + } + } +} + +/** + * @param {import('vite').ViteDevServer} vite + * @param {import('vite').ModuleNode} node + * @param {Set} deps + */ +async function find_deps(vite, node, deps) { + // since `ssrTransformResult.deps` contains URLs instead of `ModuleNode`s, this process is asynchronous. + // instead of using `await`, we resolve all branches in parallel. + /** @type {Promise[]} */ + const branches = []; + + /** @param {import('vite').ModuleNode} node */ + async function add(node) { + if (!deps.has(node)) { + deps.add(node); + await find_deps(vite, node, deps); + } + } + + /** @param {string} url */ + async function add_by_url(url) { + const node = await vite.moduleGraph.getModuleByUrl(url); + + if (node) { + await add(node); + } + } + + if (node.ssrTransformResult) { + if (node.ssrTransformResult.deps) { + node.ssrTransformResult.deps.forEach((url) => branches.push(add_by_url(url))); + } + + if (node.ssrTransformResult.dynamicDeps) { + node.ssrTransformResult.dynamicDeps.forEach((url) => branches.push(add_by_url(url))); + } + } else { + node.importedModules.forEach((node) => branches.push(add(node))); + } + + await Promise.all(branches); +} + +/** + * Determine if a file is being requested with the correct case, + * to ensure consistent behaviour between dev and prod and across + * operating systems. Note that we can't use realpath here, + * because we don't want to follow symlinks + * @param {string} file + * @param {string} assets + * @returns {boolean} + */ +function has_correct_case(file, assets) { + if (file === assets) return true; + + const parent = path.dirname(file); + + if (fs.readdirSync(parent).includes(path.basename(file))) { + return has_correct_case(parent, assets); + } + + return false; +} diff --git a/node_modules/@sveltejs/kit/src/exports/vite/graph_analysis/index.js b/node_modules/@sveltejs/kit/src/exports/vite/graph_analysis/index.js new file mode 100644 index 0000000..ecf7ee1 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/exports/vite/graph_analysis/index.js @@ -0,0 +1,87 @@ +import path from 'node:path'; +import { posixify } from '../../../utils/filesystem.js'; +import { normalize_id, strip_virtual_prefix } from '../utils.js'; +import { app_server, env_dynamic_private, env_static_private } from '../module_ids.js'; + +const ILLEGAL_IMPORTS = new Set([env_dynamic_private, env_static_private, app_server]); +const ILLEGAL_MODULE_NAME_PATTERN = /.*\.server\..+/; + +/** + * Checks if given id imports a module that is not allowed to be imported into client-side code. + * @param {string} id + * @param {{ + * cwd: string; + * node_modules: string; + * server: string; + * }} dirs + */ +export function is_illegal(id, dirs) { + if (ILLEGAL_IMPORTS.has(id)) return true; + if (!id.startsWith(dirs.cwd) || id.startsWith(dirs.node_modules)) return false; + return ILLEGAL_MODULE_NAME_PATTERN.test(path.basename(id)) || id.startsWith(dirs.server); +} + +/** + * Creates a guard that checks that no id imports a module that is not allowed to be imported into client-side code. + * @param {import('vite').Rollup.PluginContext} context + * @param {{ cwd: string; lib: string }} paths + */ +export function module_guard(context, { cwd, lib }) { + /** @type {Set} */ + const seen = new Set(); + + const dirs = { + // ids will be posixified, so we need to posixify these, too + cwd: posixify(cwd), + node_modules: posixify(path.join(cwd, 'node_modules')), + server: posixify(path.join(lib, 'server')) + }; + + /** + * @param {string} id + * @param {Array<{ id: string; dynamic: boolean }>} chain + */ + function follow(id, chain) { + if (seen.has(id)) return; + seen.add(id); + + if (is_illegal(id, dirs)) { + chain.shift(); // discard the entry point + id = normalize_id(id, lib, cwd); + + const pyramid = + chain.map(({ id, dynamic }, i) => { + id = normalize_id(id, lib, cwd); + + return `${' '.repeat(i * 2)}- ${strip_virtual_prefix(id)} ${ + dynamic ? 'dynamically imports' : 'imports' + }\n`; + }) + `${' '.repeat(chain.length)}- ${strip_virtual_prefix(id)}`; + + const message = `Cannot import ${strip_virtual_prefix( + id + )} into client-side code:\n${pyramid}`; + + throw new Error(message); + } + + const module = context.getModuleInfo(id); + + if (module) { + for (const child of module.importedIds) { + follow(child, [...chain, { id, dynamic: false }]); + } + + for (const child of module.dynamicallyImportedIds) { + follow(child, [...chain, { id, dynamic: true }]); + } + } + } + + return { + /** @param {string} id should be posixified */ + check: (id) => { + follow(id, []); + } + }; +} diff --git a/node_modules/@sveltejs/kit/src/exports/vite/graph_analysis/types.d.ts b/node_modules/@sveltejs/kit/src/exports/vite/graph_analysis/types.d.ts new file mode 100644 index 0000000..1239fec --- /dev/null +++ b/node_modules/@sveltejs/kit/src/exports/vite/graph_analysis/types.d.ts @@ -0,0 +1,5 @@ +export interface ImportGraph { + readonly id: string; + readonly dynamic: boolean; + readonly children: Generator; +} diff --git a/node_modules/@sveltejs/kit/src/exports/vite/graph_analysis/utils.js b/node_modules/@sveltejs/kit/src/exports/vite/graph_analysis/utils.js new file mode 100644 index 0000000..bdfa7a4 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/exports/vite/graph_analysis/utils.js @@ -0,0 +1,6 @@ +const query_pattern = /\?.*$/s; + +/** @param {string} path */ +export function remove_query_from_id(path) { + return path.replace(query_pattern, ''); +} diff --git a/node_modules/@sveltejs/kit/src/exports/vite/index.js b/node_modules/@sveltejs/kit/src/exports/vite/index.js new file mode 100644 index 0000000..e23cf2b --- /dev/null +++ b/node_modules/@sveltejs/kit/src/exports/vite/index.js @@ -0,0 +1,1142 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import process from 'node:process'; + +import colors from 'kleur'; + +import { copy, mkdirp, posixify, read, resolve_entry, rimraf } from '../../utils/filesystem.js'; +import { create_static_module, create_dynamic_module } from '../../core/env.js'; +import * as sync from '../../core/sync/sync.js'; +import { create_assets } from '../../core/sync/create_manifest_data/index.js'; +import { runtime_directory, logger } from '../../core/utils.js'; +import { load_config } from '../../core/config/index.js'; +import { generate_manifest } from '../../core/generate_manifest/index.js'; +import { build_server_nodes } from './build/build_server.js'; +import { build_service_worker } from './build/build_service_worker.js'; +import { assets_base, find_deps, resolve_symlinks } from './build/utils.js'; +import { dev } from './dev/index.js'; +import { is_illegal, module_guard } from './graph_analysis/index.js'; +import { preview } from './preview/index.js'; +import { get_config_aliases, get_env, normalize_id, strip_virtual_prefix } from './utils.js'; +import { write_client_manifest } from '../../core/sync/write_client_manifest.js'; +import prerender from '../../core/postbuild/prerender.js'; +import analyse from '../../core/postbuild/analyse.js'; +import { s } from '../../utils/misc.js'; +import { hash } from '../../runtime/hash.js'; +import { dedent, isSvelte5Plus } from '../../core/sync/utils.js'; +import { + env_dynamic_private, + env_dynamic_public, + env_static_private, + env_static_public, + service_worker, + sveltekit_environment, + sveltekit_paths, + sveltekit_server +} from './module_ids.js'; +import { import_peer } from '../../utils/import.js'; +import { compact } from '../../utils/array.js'; + +const cwd = process.cwd(); + +/** @type {import('./types.js').EnforcedConfig} */ +const enforced_config = { + appType: true, + base: true, + build: { + cssCodeSplit: true, + emptyOutDir: true, + lib: { + entry: true, + name: true, + formats: true + }, + manifest: true, + outDir: true, + rollupOptions: { + input: true, + output: { + format: true, + entryFileNames: true, + chunkFileNames: true, + assetFileNames: true + }, + preserveEntrySignatures: true + }, + ssr: true + }, + publicDir: true, + resolve: { + alias: { + $app: true, + $lib: true, + '$service-worker': true + } + }, + root: true +}; + +const options_regex = /(export\s+const\s+(prerender|csr|ssr|trailingSlash))\s*=/s; + +/** @type {Set} */ +const warned = new Set(); + +/** @type {import('svelte/compiler').PreprocessorGroup} */ +const warning_preprocessor = { + script: ({ content, filename }) => { + if (!filename) return; + + const basename = path.basename(filename); + if (basename.startsWith('+page.') || basename.startsWith('+layout.')) { + const match = content.match(options_regex); + if (match) { + const fixed = basename.replace('.svelte', '(.server).js/ts'); + + const message = + `\n${colors.bold().red(path.relative('.', filename))}\n` + + `\`${match[1]}\` will be ignored — move it to ${fixed} instead. See https://svelte.dev/docs/kit/page-options for more information.`; + + if (!warned.has(message)) { + console.log(message); + warned.add(message); + } + } + } + }, + markup: ({ content, filename }) => { + if (!filename) return; + + const basename = path.basename(filename); + const has_children = + content.includes('\`${isSvelte5Plus() ? ' or `{@render ...}` tag' : ''}` + + ' missing — inner content will not be rendered'; + + if (!warned.has(message)) { + console.log(message); + warned.add(message); + } + } + } +}; + +/** + * Returns the SvelteKit Vite plugins. + * @returns {Promise} + */ +export async function sveltekit() { + const svelte_config = await load_config(); + + /** @type {import('@sveltejs/vite-plugin-svelte').Options['preprocess']} */ + let preprocess = svelte_config.preprocess; + if (Array.isArray(preprocess)) { + preprocess = [...preprocess, warning_preprocessor]; + } else if (preprocess) { + preprocess = [preprocess, warning_preprocessor]; + } else { + preprocess = warning_preprocessor; + } + + /** @type {import('@sveltejs/vite-plugin-svelte').Options} */ + const vite_plugin_svelte_options = { + configFile: false, + extensions: svelte_config.extensions, + preprocess, + onwarn: svelte_config.onwarn, + compilerOptions: { + // @ts-ignore - ignore this property when running `pnpm check` against Svelte 5 in the ecosystem CI + hydratable: isSvelte5Plus() ? undefined : true, + ...svelte_config.compilerOptions + }, + ...svelte_config.vitePlugin + }; + + const { svelte } = await import_peer('@sveltejs/vite-plugin-svelte'); + + return [...svelte(vite_plugin_svelte_options), ...(await kit({ svelte_config }))]; +} + +// These variables live outside the `kit()` function because it is re-invoked by each Vite build + +let secondary_build_started = false; + +/** @type {import('types').ManifestData} */ +let manifest_data; + +/** + * Returns the SvelteKit Vite plugin. Vite executes Rollup hooks as well as some of its own. + * Background reading is available at: + * - https://vitejs.dev/guide/api-plugin.html + * - https://rollupjs.org/guide/en/#plugin-development + * + * You can get an idea of the lifecycle by looking at the flow charts here: + * - https://rollupjs.org/guide/en/#build-hooks + * - https://rollupjs.org/guide/en/#output-generation-hooks + * + * @param {{ svelte_config: import('types').ValidatedConfig }} options + * @return {Promise} + */ +async function kit({ svelte_config }) { + const vite = await import_peer('vite'); + + const { kit } = svelte_config; + const out = `${kit.outDir}/output`; + + const version_hash = hash(kit.version.name); + + /** @type {import('vite').ResolvedConfig} */ + let vite_config; + + /** @type {import('vite').ConfigEnv} */ + let vite_config_env; + + /** @type {boolean} */ + let is_build; + + /** @type {{ public: Record; private: Record }} */ + let env; + + /** @type {() => Promise} */ + let finalise; + + /** @type {import('vite').UserConfig} */ + let initial_config; + + const service_worker_entry_file = resolve_entry(kit.files.serviceWorker); + const parsed_service_worker = path.parse(kit.files.serviceWorker); + + /** + * A map showing which features (such as `$app/server:read`) are defined + * in which chunks, so that we can later determine which routes use which features + * @type {Record} + */ + const tracked_features = {}; + + const sourcemapIgnoreList = /** @param {string} relative_path */ (relative_path) => + relative_path.includes('node_modules') || relative_path.includes(kit.outDir); + + /** @type {import('vite').Plugin} */ + const plugin_setup = { + name: 'vite-plugin-sveltekit-setup', + + /** + * Build the SvelteKit-provided Vite config to be merged with the user's vite.config.js file. + * @see https://vitejs.dev/guide/api-plugin.html#config + */ + config(config, config_env) { + initial_config = config; + vite_config_env = config_env; + is_build = config_env.command === 'build'; + + env = get_env(kit.env, vite_config_env.mode); + + const allow = new Set([ + kit.files.lib, + kit.files.routes, + kit.outDir, + path.resolve('src'), // TODO this isn't correct if user changed all his files to sth else than src (like in test/options) + path.resolve('node_modules'), + path.resolve(vite.searchForWorkspaceRoot(cwd), 'node_modules') + ]); + + // We can only add directories to the allow list, so we find out + // if there's a client hooks file and pass its directory + const client_hooks = resolve_entry(kit.files.hooks.client); + if (client_hooks) allow.add(path.dirname(client_hooks)); + + const generated = path.posix.join(kit.outDir, 'generated'); + + // dev and preview config can be shared + /** @type {import('vite').UserConfig} */ + const new_config = { + resolve: { + alias: [ + { find: '__SERVER__', replacement: `${generated}/server` }, + { find: '$app', replacement: `${runtime_directory}/app` }, + ...get_config_aliases(kit) + ] + }, + root: cwd, + server: { + cors: { preflightContinue: true }, + fs: { + allow: [...allow] + }, + sourcemapIgnoreList, + watch: { + ignored: [ + // Ignore all siblings of config.kit.outDir/generated + `${posixify(kit.outDir)}/!(generated)` + ] + } + }, + preview: { + cors: { preflightContinue: true } + }, + optimizeDeps: { + entries: [ + `${kit.files.routes}/**/+*.{svelte,js,ts}`, + `!${kit.files.routes}/**/+*server.*` + ], + exclude: [ + '@sveltejs/kit', + // exclude kit features so that libraries using them work even when they are prebundled + // this does not affect app code, just handling of imported libraries that use $app or $env + '$app', + '$env' + ] + }, + ssr: { + noExternal: [ + // This ensures that esm-env is inlined into the server output with the + // export conditions resolved correctly through Vite. This prevents adapters + // that bundle later on from resolving the export conditions incorrectly + // and for example include browser-only code in the server output + // because they for example use esbuild.build with `platform: 'browser'` + 'esm-env', + // We need this for two reasons: + // 1. Without this, `@sveltejs/kit` imports are kept as-is in the server output, + // and that causes modules and therefore classes like `Redirect` to be imported twice + // under different IDs, which breaks a bunch of stuff because of failing instanceof checks. + // 2. Vitest bypasses Vite when loading external modules, so we bundle + // when it is detected to keep our virtual modules working. + // See https://github.com/sveltejs/kit/pull/9172 + // and https://vitest.dev/config/#deps-registernodeloader + '@sveltejs/kit' + ] + } + }; + + if (is_build) { + if (!new_config.build) new_config.build = {}; + new_config.build.ssr = !secondary_build_started; + + new_config.define = { + __SVELTEKIT_ADAPTER_NAME__: s(kit.adapter?.name), + __SVELTEKIT_APP_VERSION_FILE__: s(`${kit.appDir}/version.json`), + __SVELTEKIT_APP_VERSION_POLL_INTERVAL__: s(kit.version.pollInterval), + __SVELTEKIT_DEV__: 'false', + __SVELTEKIT_EMBEDDED__: kit.embedded ? 'true' : 'false', + __SVELTEKIT_CLIENT_ROUTING__: kit.router.resolution === 'client' ? 'true' : 'false' + }; + + if (!secondary_build_started) { + manifest_data = sync.all(svelte_config, config_env.mode).manifest_data; + } + } else { + new_config.define = { + __SVELTEKIT_APP_VERSION_POLL_INTERVAL__: '0', + __SVELTEKIT_DEV__: 'true', + __SVELTEKIT_EMBEDDED__: kit.embedded ? 'true' : 'false', + __SVELTEKIT_CLIENT_ROUTING__: kit.router.resolution === 'client' ? 'true' : 'false' + }; + + // These Kit dependencies are packaged as CommonJS, which means they must always be externalized. + // Without this, the tests will still pass but `pnpm dev` will fail in projects that link `@sveltejs/kit`. + /** @type {NonNullable} */ (new_config.ssr).external = [ + 'cookie', + 'set-cookie-parser' + ]; + } + + warn_overridden_config(config, new_config); + + return new_config; + }, + + /** + * Stores the final config. + */ + configResolved(config) { + vite_config = config; + } + }; + + /** @type {Map} */ + const import_map = new Map(); + + /** @type {import('vite').Plugin} */ + const plugin_virtual_modules = { + name: 'vite-plugin-sveltekit-virtual-modules', + + resolveId(id, importer) { + if (id === '__sveltekit/manifest') { + return `${kit.outDir}/generated/client-optimized/app.js`; + } + + // If importing from a service-worker, only allow $service-worker & $env/static/public, but none of the other virtual modules. + // This check won't catch transitive imports, but it will warn when the import comes from a service-worker directly. + // Transitive imports will be caught during the build. + if (importer) { + const parsed_importer = path.parse(importer); + + const importer_is_service_worker = + parsed_importer.dir === parsed_service_worker.dir && + parsed_importer.name === parsed_service_worker.name; + + if (importer_is_service_worker && id !== '$service-worker' && id !== '$env/static/public') { + const normalized_cwd = vite.normalizePath(cwd); + const normalized_lib = vite.normalizePath(kit.files.lib); + throw new Error( + `Cannot import ${normalize_id( + id, + normalized_lib, + normalized_cwd + )} into service-worker code. Only the modules $service-worker and $env/static/public are available in service workers.` + ); + } + + import_map.set(id, importer); + } + + // treat $env/static/[public|private] as virtual + if (id.startsWith('$env/') || id === '$service-worker') { + // ids with :$ don't work with reverse proxies like nginx + return `\0virtual:${id.substring(1)}`; + } + if (id.startsWith('__sveltekit/')) { + return `\0virtual:${id}`; + } + }, + + load(id, options) { + const browser = !options?.ssr; + + const global = is_build + ? `globalThis.__sveltekit_${version_hash}` + : 'globalThis.__sveltekit_dev'; + + if (options?.ssr === false && process.env.TEST !== 'true') { + const normalized_cwd = vite.normalizePath(cwd); + const normalized_lib = vite.normalizePath(kit.files.lib); + if ( + is_illegal(id, { + cwd: normalized_cwd, + node_modules: vite.normalizePath(path.resolve('node_modules')), + server: vite.normalizePath(path.join(normalized_lib, 'server')) + }) + ) { + const relative = normalize_id(id, normalized_lib, normalized_cwd); + + const illegal_module = strip_virtual_prefix(relative); + + const error_prefix = `Cannot import ${illegal_module} into client-side code. This could leak sensitive information.`; + const error_suffix = ` +Tips: + - To resolve this error, ensure that no exports from ${illegal_module} are used, even transitively, in client-side code. + - If you're only using the import as a type, change it to \`import type\`. + - If you're not sure which module is causing this, try building your app -- it will create a more helpful error.`; + + if (import_map.has(illegal_module)) { + const importer = path.relative( + cwd, + /** @type {string} */ (import_map.get(illegal_module)) + ); + throw new Error(`${error_prefix}\nImported by: ${importer}.${error_suffix}`); + } + + throw new Error(`${error_prefix}${error_suffix}`); + } + } + + switch (id) { + case env_static_private: + return create_static_module('$env/static/private', env.private); + + case env_static_public: + return create_static_module('$env/static/public', env.public); + + case env_dynamic_private: + return create_dynamic_module( + 'private', + vite_config_env.command === 'serve' ? env.private : undefined + ); + + case env_dynamic_public: + // populate `$env/dynamic/public` from `window` + if (browser) { + return `export const env = ${global}.env;`; + } + + return create_dynamic_module( + 'public', + vite_config_env.command === 'serve' ? env.public : undefined + ); + + case service_worker: + return create_service_worker_module(svelte_config); + + // for internal use only. it's published as $app/paths externally + // we use this alias so that we won't collide with user aliases + case sveltekit_paths: { + const { assets, base } = svelte_config.kit.paths; + + // use the values defined in `global`, but fall back to hard-coded values + // for the sake of things like Vitest which may import this module + // outside the context of a page + if (browser) { + return dedent` + export const base = ${global}?.base ?? ${s(base)}; + export const assets = ${global}?.assets ?? ${assets ? s(assets) : 'base'}; + export const app_dir = ${s(kit.appDir)}; + `; + } + + return dedent` + export let base = ${s(base)}; + export let assets = ${assets ? s(assets) : 'base'}; + export const app_dir = ${s(kit.appDir)}; + + export const relative = ${svelte_config.kit.paths.relative}; + + const initial = { base, assets }; + + export function override(paths) { + base = paths.base; + assets = paths.assets; + } + + export function reset() { + base = initial.base; + assets = initial.assets; + } + + /** @param {string} path */ + export function set_assets(path) { + assets = initial.assets = path; + } + `; + } + + case sveltekit_environment: { + const { version } = svelte_config.kit; + + return dedent` + export const version = ${s(version.name)}; + export let building = false; + export let prerendering = false; + + export function set_building() { + building = true; + } + + export function set_prerendering() { + prerendering = true; + } + `; + } + + case sveltekit_server: { + return dedent` + export let read_implementation = null; + + export let manifest = null; + + export function set_read_implementation(fn) { + read_implementation = fn; + } + + export function set_manifest(_) { + manifest = _; + } + `; + } + } + } + }; + + /** + * Ensures that client-side code can't accidentally import server-side code, + * whether in `*.server.js` files, `$app/server`, `$lib/server`, or `$env/[static|dynamic]/private` + * @type {import('vite').Plugin} + */ + const plugin_guard = { + name: 'vite-plugin-sveltekit-guard', + + writeBundle: { + sequential: true, + handler(_options) { + if (vite_config.build.ssr) return; + + const guard = module_guard(this, { + cwd: vite.normalizePath(process.cwd()), + lib: vite.normalizePath(kit.files.lib) + }); + + manifest_data.nodes.forEach((_node, i) => { + const id = vite.normalizePath( + path.resolve(kit.outDir, `generated/client-optimized/nodes/${i}.js`) + ); + + guard.check(id); + }); + } + } + }; + + /** @type {import('vite').Plugin} */ + const plugin_compile = { + name: 'vite-plugin-sveltekit-compile', + + /** + * Build the SvelteKit-provided Vite config to be merged with the user's vite.config.js file. + * @see https://vitejs.dev/guide/api-plugin.html#config + */ + config(config) { + /** @type {import('vite').UserConfig} */ + let new_config; + + if (is_build) { + const ssr = /** @type {boolean} */ (config.build?.ssr); + const prefix = `${kit.appDir}/immutable`; + + /** @type {Record} */ + const input = {}; + + if (ssr) { + input.index = `${runtime_directory}/server/index.js`; + input.internal = `${kit.outDir}/generated/server/internal.js`; + + // add entry points for every endpoint... + manifest_data.routes.forEach((route) => { + if (route.endpoint) { + const resolved = path.resolve(route.endpoint.file); + const relative = decodeURIComponent(path.relative(kit.files.routes, resolved)); + const name = posixify(path.join('entries/endpoints', relative.replace(/\.js$/, ''))); + input[name] = resolved; + } + }); + + // ...and every component used by pages... + manifest_data.nodes.forEach((node) => { + for (const file of [node.component, node.universal, node.server]) { + if (file) { + const resolved = path.resolve(file); + const relative = decodeURIComponent(path.relative(kit.files.routes, resolved)); + + const name = relative.startsWith('..') + ? posixify(path.join('entries/fallbacks', path.basename(file))) + : posixify(path.join('entries/pages', relative.replace(/\.js$/, ''))); + input[name] = resolved; + } + } + }); + + // ...and every matcher + Object.entries(manifest_data.matchers).forEach(([key, file]) => { + const name = posixify(path.join('entries/matchers', key)); + input[name] = path.resolve(file); + }); + } else if (svelte_config.kit.output.bundleStrategy !== 'split') { + input['bundle'] = `${runtime_directory}/client/bundle.js`; + } else { + input['entry/start'] = `${runtime_directory}/client/entry.js`; + input['entry/app'] = `${kit.outDir}/generated/client-optimized/app.js`; + manifest_data.nodes.forEach((node, i) => { + if (node.component || node.universal) { + input[`nodes/${i}`] = `${kit.outDir}/generated/client-optimized/nodes/${i}.js`; + } + }); + } + + // see the kit.output.preloadStrategy option for details on why we have multiple options here + const ext = kit.output.preloadStrategy === 'preload-mjs' ? 'mjs' : 'js'; + + // We could always use a relative asset base path here, but it's better for performance not to. + // E.g. Vite generates `new URL('/asset.png', import.meta).href` for a relative path vs just '/asset.png'. + // That's larger and takes longer to run and also causes an HTML diff between SSR and client + // causing us to do a more expensive hydration check. + const client_base = + kit.paths.relative !== false || kit.paths.assets ? './' : kit.paths.base || '/'; + + const inline = !ssr && svelte_config.kit.output.bundleStrategy === 'inline'; + const split = ssr || svelte_config.kit.output.bundleStrategy === 'split'; + + new_config = { + base: ssr ? assets_base(kit) : client_base, + build: { + copyPublicDir: !ssr, + cssCodeSplit: svelte_config.kit.output.bundleStrategy !== 'inline', + cssMinify: initial_config.build?.minify == null ? true : !!initial_config.build.minify, + // don't use the default name to avoid collisions with 'static/manifest.json' + manifest: '.vite/manifest.json', // TODO: remove this after bumping peer dep to vite 5 + outDir: `${out}/${ssr ? 'server' : 'client'}`, + rollupOptions: { + input: inline ? input['bundle'] : input, + output: { + format: inline ? 'iife' : 'esm', + name: `__sveltekit_${version_hash}.app`, + entryFileNames: ssr ? '[name].js' : `${prefix}/[name].[hash].${ext}`, + chunkFileNames: ssr ? 'chunks/[name].js' : `${prefix}/chunks/[hash].${ext}`, + assetFileNames: `${prefix}/assets/[name].[hash][extname]`, + hoistTransitiveImports: false, + sourcemapIgnoreList, + manualChunks: split ? undefined : () => 'bundle', + inlineDynamicImports: false + }, + preserveEntrySignatures: 'strict', + onwarn(warning, handler) { + if ( + warning.code === 'MISSING_EXPORT' && + warning.id === `${kit.outDir}/generated/client-optimized/app.js` + ) { + // ignore e.g. undefined `handleError` hook when + // referencing `client_hooks.handleError` + return; + } + + handler(warning); + } + }, + ssrEmitAssets: true, + target: ssr ? 'node18.13' : undefined + }, + publicDir: kit.files.assets, + worker: { + rollupOptions: { + output: { + entryFileNames: `${prefix}/workers/[name]-[hash].js`, + chunkFileNames: `${prefix}/workers/chunks/[hash].js`, + assetFileNames: `${prefix}/workers/assets/[name]-[hash][extname]`, + hoistTransitiveImports: false + } + } + } + }; + } else { + new_config = { + appType: 'custom', + base: kit.paths.base, + build: { + rollupOptions: { + // Vite dependency crawler needs an explicit JS entry point + // eventhough server otherwise works without it + input: `${runtime_directory}/client/entry.js` + } + }, + publicDir: kit.files.assets + }; + } + + warn_overridden_config(config, new_config); + + return new_config; + }, + + /** + * Adds the SvelteKit middleware to do SSR in dev mode. + * @see https://vitejs.dev/guide/api-plugin.html#configureserver + */ + async configureServer(vite) { + return await dev(vite, vite_config, svelte_config); + }, + + /** + * Adds the SvelteKit middleware to do SSR in preview mode. + * @see https://vitejs.dev/guide/api-plugin.html#configurepreviewserver + */ + configurePreviewServer(vite) { + return preview(vite, vite_config, svelte_config); + }, + + /** + * Clears the output directories. + */ + buildStart() { + if (secondary_build_started) return; + + if (is_build) { + if (!vite_config.build.watch) { + rimraf(out); + } + mkdirp(out); + } + }, + + renderChunk(code, chunk) { + if (code.includes('__SVELTEKIT_TRACK__')) { + return { + code: code.replace(/__SVELTEKIT_TRACK__\('(.+?)'\)/g, (_, label) => { + (tracked_features[chunk.name + '.js'] ??= []).push(label); + // put extra whitespace at the end of the comment to preserve the source size and avoid interfering with source maps + return `/* track ${label} */`; + }), + map: null // TODO we may need to generate a sourcemap in future + }; + } + }, + + generateBundle() { + if (vite_config.build.ssr) return; + + this.emitFile({ + type: 'asset', + fileName: `${kit.appDir}/version.json`, + source: s({ version: kit.version.name }) + }); + }, + + /** + * Vite builds a single bundle. We need three bundles: client, server, and service worker. + * The user's package.json scripts will invoke the Vite CLI to execute the server build. We + * then use this hook to kick off builds for the client and service worker. + */ + writeBundle: { + sequential: true, + async handler(_options) { + if (secondary_build_started) return; // only run this once + + const verbose = vite_config.logLevel === 'info'; + const log = logger({ verbose }); + + /** @type {import('vite').Manifest} */ + const server_manifest = JSON.parse(read(`${out}/server/${vite_config.build.manifest}`)); + + /** @type {import('types').BuildData} */ + const build_data = { + app_dir: kit.appDir, + app_path: `${kit.paths.base.slice(1)}${kit.paths.base ? '/' : ''}${kit.appDir}`, + manifest_data, + out_dir: out, + service_worker: service_worker_entry_file ? 'service-worker.js' : null, // TODO make file configurable? + client: null, + server_manifest + }; + + const manifest_path = `${out}/server/manifest-full.js`; + fs.writeFileSync( + manifest_path, + `export const manifest = ${generate_manifest({ + build_data, + prerendered: [], + relative_path: '.', + routes: manifest_data.routes + })};\n` + ); + + log.info('Analysing routes'); + + const { metadata, static_exports } = await analyse({ + hash: kit.router.type === 'hash', + manifest_path, + manifest_data, + server_manifest, + tracked_features, + env: { ...env.private, ...env.public }, + out, + output_config: svelte_config.output + }); + + log.info('Building app'); + + // create client build + write_client_manifest( + kit, + manifest_data, + `${kit.outDir}/generated/client-optimized`, + metadata.nodes + ); + + secondary_build_started = true; + + const { output } = /** @type {import('vite').Rollup.RollupOutput} */ ( + await vite.build({ + configFile: vite_config.configFile, + // CLI args + mode: vite_config_env.mode, + logLevel: vite_config.logLevel, + clearScreen: vite_config.clearScreen, + build: { + minify: initial_config.build?.minify, + assetsInlineLimit: vite_config.build.assetsInlineLimit, + sourcemap: vite_config.build.sourcemap + }, + optimizeDeps: { + force: vite_config.optimizeDeps.force + } + }) + ); + + copy( + `${out}/server/${kit.appDir}/immutable/assets`, + `${out}/client/${kit.appDir}/immutable/assets` + ); + + /** @type {import('vite').Manifest} */ + const client_manifest = JSON.parse(read(`${out}/client/${vite_config.build.manifest}`)); + + /** + * @param {string} entry + * @param {boolean} [add_dynamic_css] + */ + const deps_of = (entry, add_dynamic_css = false) => + find_deps(client_manifest, posixify(path.relative('.', entry)), add_dynamic_css); + + if (svelte_config.kit.output.bundleStrategy === 'split') { + const start = deps_of(`${runtime_directory}/client/entry.js`); + const app = deps_of(`${kit.outDir}/generated/client-optimized/app.js`); + + build_data.client = { + start: start.file, + app: app.file, + imports: [...start.imports, ...app.imports], + stylesheets: [...start.stylesheets, ...app.stylesheets], + fonts: [...start.fonts, ...app.fonts], + uses_env_dynamic_public: output.some( + (chunk) => chunk.type === 'chunk' && chunk.modules[env_dynamic_public] + ) + }; + + // In case of server-side route resolution, we create a purpose-built route manifest that is + // similar to that on the client, with as much information computed upfront so that we + // don't need to include any code of the actual routes in the server bundle. + if (svelte_config.kit.router.resolution === 'server') { + const nodes = manifest_data.nodes.map((node, i) => { + if (node.component || node.universal) { + const entry = `${kit.outDir}/generated/client-optimized/nodes/${i}.js`; + const deps = deps_of(entry, true); + const file = resolve_symlinks( + client_manifest, + `${kit.outDir}/generated/client-optimized/nodes/${i}.js` + ).chunk.file; + + return { file, css: deps.stylesheets }; + } + }); + build_data.client.nodes = nodes.map((node) => node?.file); + build_data.client.css = nodes.map((node) => node?.css); + + build_data.client.routes = compact( + manifest_data.routes.map((route) => { + if (!route.page) return; + + return { + id: route.id, + pattern: route.pattern, + params: route.params, + layouts: route.page.layouts.map((l) => + l !== undefined ? [metadata.nodes[l].has_server_load, l] : undefined + ), + errors: route.page.errors, + leaf: [metadata.nodes[route.page.leaf].has_server_load, route.page.leaf] + }; + }) + ); + } + } else { + const start = deps_of(`${runtime_directory}/client/bundle.js`); + + build_data.client = { + start: start.file, + imports: start.imports, + stylesheets: start.stylesheets, + fonts: start.fonts, + uses_env_dynamic_public: output.some( + (chunk) => chunk.type === 'chunk' && chunk.modules[env_dynamic_public] + ) + }; + + if (svelte_config.kit.output.bundleStrategy === 'inline') { + const style = /** @type {import('rollup').OutputAsset} */ ( + output.find( + (chunk) => + chunk.type === 'asset' && + chunk.names.length === 1 && + chunk.names[0] === 'style.css' + ) + ); + + build_data.client.inline = { + script: read(`${out}/client/${start.file}`), + style: /** @type {string | undefined} */ (style?.source) + }; + } + } + + const css = output.filter( + /** @type {(value: any) => value is import('vite').Rollup.OutputAsset} */ + (value) => value.type === 'asset' && value.fileName.endsWith('.css') + ); + + // regenerate manifest now that we have client entry... + fs.writeFileSync( + manifest_path, + `export const manifest = ${generate_manifest({ + build_data, + prerendered: [], + relative_path: '.', + routes: manifest_data.routes + })};\n` + ); + + // regenerate nodes with the client manifest... + await build_server_nodes( + out, + kit, + manifest_data, + server_manifest, + client_manifest, + css, + svelte_config.kit.output, + static_exports + ); + + // ...and prerender + const { prerendered, prerender_map } = await prerender({ + hash: kit.router.type === 'hash', + out, + manifest_path, + metadata, + verbose, + env: { ...env.private, ...env.public } + }); + + // generate a new manifest that doesn't include prerendered pages + fs.writeFileSync( + `${out}/server/manifest.js`, + `export const manifest = ${generate_manifest({ + build_data, + prerendered: prerendered.paths, + relative_path: '.', + routes: manifest_data.routes.filter((route) => prerender_map.get(route.id) !== true) + })};\n` + ); + + if (service_worker_entry_file) { + if (kit.paths.assets) { + throw new Error('Cannot use service worker alongside config.kit.paths.assets'); + } + + log.info('Building service worker'); + + await build_service_worker( + out, + kit, + { + ...vite_config, + build: { + ...vite_config.build, + minify: initial_config.build?.minify ?? 'esbuild' + } + }, + manifest_data, + service_worker_entry_file, + prerendered, + client_manifest + ); + } + + // we need to defer this to closeBundle, so that adapters copy files + // created by other Vite plugins + finalise = async () => { + console.log( + `\nRun ${colors + .bold() + .cyan('npm run preview')} to preview your production build locally.` + ); + + if (kit.adapter) { + const { adapt } = await import('../../core/adapt/index.js'); + await adapt( + svelte_config, + build_data, + metadata, + prerendered, + prerender_map, + log, + vite_config + ); + } else { + console.log(colors.bold().yellow('\nNo adapter specified')); + + const link = colors.bold().cyan('https://svelte.dev/docs/kit/adapters'); + console.log( + `See ${link} to learn how to configure your app to run on the platform of your choosing` + ); + } + + secondary_build_started = false; + }; + } + }, + + /** + * Runs the adapter. + */ + closeBundle: { + sequential: true, + async handler() { + if (!vite_config.build.ssr) return; + await finalise?.(); + } + } + }; + + return [plugin_setup, plugin_virtual_modules, plugin_guard, plugin_compile]; +} + +/** + * @param {Record} config + * @param {Record} resolved_config + */ +function warn_overridden_config(config, resolved_config) { + const overridden = find_overridden_config(config, resolved_config, enforced_config, '', []); + + if (overridden.length > 0) { + console.error( + colors.bold().red('The following Vite config options will be overridden by SvelteKit:') + + overridden.map((key) => `\n - ${key}`).join('') + ); + } +} + +/** + * @param {Record} config + * @param {Record} resolved_config + * @param {import('./types.js').EnforcedConfig} enforced_config + * @param {string} path + * @param {string[]} out used locally to compute the return value + */ +function find_overridden_config(config, resolved_config, enforced_config, path, out) { + if (config == null || resolved_config == null) { + return out; + } + + for (const key in enforced_config) { + if (typeof config === 'object' && key in config && key in resolved_config) { + const enforced = enforced_config[key]; + + if (enforced === true) { + if (config[key] !== resolved_config[key]) { + out.push(path + key); + } + } else { + find_overridden_config(config[key], resolved_config[key], enforced, path + key + '.', out); + } + } + } + return out; +} + +/** + * @param {import('types').ValidatedConfig} config + */ +const create_service_worker_module = (config) => dedent` + if (typeof self === 'undefined' || self instanceof ServiceWorkerGlobalScope === false) { + throw new Error('This module can only be imported inside a service worker'); + } + + export const build = []; + export const files = [ + ${create_assets(config) + .filter((asset) => config.kit.serviceWorker.files(asset.file)) + .map((asset) => `${s(`${config.kit.paths.base}/${asset.file}`)}`) + .join(',\n')} + ]; + export const prerendered = []; + export const version = ${s(config.kit.version.name)}; +`; diff --git a/node_modules/@sveltejs/kit/src/exports/vite/module_ids.js b/node_modules/@sveltejs/kit/src/exports/vite/module_ids.js new file mode 100644 index 0000000..91b5cae --- /dev/null +++ b/node_modules/@sveltejs/kit/src/exports/vite/module_ids.js @@ -0,0 +1,16 @@ +import { fileURLToPath } from 'node:url'; + +export const env_static_private = '\0virtual:env/static/private'; +export const env_static_public = '\0virtual:env/static/public'; +export const env_dynamic_private = '\0virtual:env/dynamic/private'; +export const env_dynamic_public = '\0virtual:env/dynamic/public'; + +export const service_worker = '\0virtual:service-worker'; + +export const sveltekit_environment = '\0virtual:__sveltekit/environment'; +export const sveltekit_paths = '\0virtual:__sveltekit/paths'; +export const sveltekit_server = '\0virtual:__sveltekit/server'; + +export const app_server = fileURLToPath( + new URL('../../runtime/app/server/index.js', import.meta.url) +); diff --git a/node_modules/@sveltejs/kit/src/exports/vite/preview/index.js b/node_modules/@sveltejs/kit/src/exports/vite/preview/index.js new file mode 100644 index 0000000..efff12b --- /dev/null +++ b/node_modules/@sveltejs/kit/src/exports/vite/preview/index.js @@ -0,0 +1,254 @@ +import fs from 'node:fs'; +import { join } from 'node:path'; +import { pathToFileURL } from 'node:url'; +import { lookup } from 'mrmime'; +import sirv from 'sirv'; +import { loadEnv, normalizePath } from 'vite'; +import { createReadableStream, getRequest, setResponse } from '../../../exports/node/index.js'; +import { installPolyfills } from '../../../exports/node/polyfills.js'; +import { SVELTE_KIT_ASSETS } from '../../../constants.js'; +import { not_found } from '../utils.js'; + +/** @typedef {import('http').IncomingMessage} Req */ +/** @typedef {import('http').ServerResponse} Res */ +/** @typedef {(req: Req, res: Res, next: () => void) => void} Handler */ + +/** + * @param {import('vite').PreviewServer} vite + * @param {import('vite').ResolvedConfig} vite_config + * @param {import('types').ValidatedConfig} svelte_config + */ +export async function preview(vite, vite_config, svelte_config) { + installPolyfills(); + + const { paths } = svelte_config.kit; + const base = paths.base; + const assets = paths.assets ? SVELTE_KIT_ASSETS : paths.base; + + const protocol = vite_config.preview.https ? 'https' : 'http'; + + const etag = `"${Date.now()}"`; + + const dir = join(svelte_config.kit.outDir, 'output/server'); + + if (!fs.existsSync(dir)) { + throw new Error(`Server files not found at ${dir}, did you run \`build\` first?`); + } + + /** @type {import('types').ServerInternalModule} */ + const { set_assets } = await import(pathToFileURL(join(dir, 'internal.js')).href); + + /** @type {import('types').ServerModule} */ + const { Server } = await import(pathToFileURL(join(dir, 'index.js')).href); + + const { manifest } = await import(pathToFileURL(join(dir, 'manifest.js')).href); + + set_assets(assets); + + const server = new Server(manifest); + await server.init({ + env: loadEnv(vite_config.mode, svelte_config.kit.env.dir, ''), + read: (file) => createReadableStream(`${dir}/${file}`) + }); + + const emulator = await svelte_config.kit.adapter?.emulate?.(); + + return () => { + // Remove the base middleware. It screws with the URL. + // It also only lets through requests beginning with the base path, so that requests beginning + // with the assets URL never reach us. We could serve assets separately before the base + // middleware, but we'd need that to occur after the compression and cors middlewares, so would + // need to insert it manually into the stack, which would be at least as bad as doing this. + for (let i = vite.middlewares.stack.length - 1; i > 0; i--) { + // @ts-expect-error using internals + if (vite.middlewares.stack[i].handle.name === 'viteBaseMiddleware') { + vite.middlewares.stack.splice(i, 1); + } + } + + // generated client assets and the contents of `static` + vite.middlewares.use( + scoped( + assets, + sirv(join(svelte_config.kit.outDir, 'output/client'), { + setHeaders: (res, pathname) => { + // only apply to immutable directory, not e.g. version.json + if (pathname.startsWith(`/${svelte_config.kit.appDir}/immutable`)) { + res.setHeader('cache-control', 'public,max-age=31536000,immutable'); + } + } + }) + ) + ); + + vite.middlewares.use((req, res, next) => { + const original_url = /** @type {string} */ (req.url); + const { pathname, search } = new URL(original_url, 'http://dummy'); + + // if `paths.base === '/a/b/c`, then the root route is `/a/b/c/`, + // regardless of the `trailingSlash` route option + if (base.length > 1 && pathname === base) { + let location = base + '/'; + if (search) location += search; + res.writeHead(307, { + location + }); + res.end(); + return; + } + + if (pathname.startsWith(base)) { + next(); + } else { + res.statusCode = 404; + not_found(req, res, base); + } + }); + + // prerendered dependencies + vite.middlewares.use( + scoped(base, mutable(join(svelte_config.kit.outDir, 'output/prerendered/dependencies'))) + ); + + // prerendered pages (we can't just use sirv because we need to + // preserve the correct trailingSlash behaviour) + vite.middlewares.use( + scoped(base, (req, res, next) => { + let if_none_match_value = req.headers['if-none-match']; + + if (if_none_match_value?.startsWith('W/"')) { + if_none_match_value = if_none_match_value.substring(2); + } + + if (if_none_match_value === etag) { + res.statusCode = 304; + res.end(); + return; + } + + const { pathname, search } = new URL(/** @type {string} */ (req.url), 'http://dummy'); + + let filename = normalizePath( + join(svelte_config.kit.outDir, 'output/prerendered/pages' + pathname) + ); + + try { + filename = decodeURI(filename); + } catch { + // malformed URI + } + + let prerendered = is_file(filename); + + if (!prerendered) { + const has_trailing_slash = pathname.endsWith('/'); + const html_filename = `${filename}${has_trailing_slash ? 'index.html' : '.html'}`; + + /** @type {string | undefined} */ + let redirect; + + if (is_file(html_filename)) { + filename = html_filename; + prerendered = true; + } else if (has_trailing_slash) { + if (is_file(filename.slice(0, -1) + '.html')) { + redirect = pathname.slice(0, -1); + } + } else if (is_file(filename + '/index.html')) { + redirect = pathname + '/'; + } + + if (redirect) { + if (search) redirect += search; + res.writeHead(307, { + location: redirect + }); + + res.end(); + + return; + } + } + + if (prerendered) { + res.writeHead(200, { + 'content-type': lookup(pathname) || 'text/html', + etag + }); + + fs.createReadStream(filename).pipe(res); + } else { + next(); + } + }) + ); + + // SSR + vite.middlewares.use(async (req, res) => { + const host = req.headers[':authority'] || req.headers.host; + + const request = await getRequest({ + base: `${protocol}://${host}`, + request: req + }); + + await setResponse( + res, + await server.respond(request, { + getClientAddress: () => { + const { remoteAddress } = req.socket; + if (remoteAddress) return remoteAddress; + throw new Error('Could not determine clientAddress'); + }, + read: (file) => { + if (file in manifest._.server_assets) { + return fs.readFileSync(join(dir, file)); + } + + return fs.readFileSync(join(svelte_config.kit.files.assets, file)); + }, + emulator + }) + ); + }); + }; +} + +/** + * @param {string} dir + * @returns {Handler} + */ +const mutable = (dir) => + fs.existsSync(dir) + ? sirv(dir, { + etag: true, + maxAge: 0 + }) + : (_req, _res, next) => next(); + +/** + * @param {string} scope + * @param {Handler} handler + * @returns {Handler} + */ +function scoped(scope, handler) { + if (scope === '') return handler; + + return (req, res, next) => { + if (req.url?.startsWith(scope)) { + const original_url = req.url; + req.url = req.url.slice(scope.length); + handler(req, res, () => { + req.url = original_url; + next(); + }); + } else { + next(); + } + }; +} + +/** @param {string} path */ +function is_file(path) { + return fs.existsSync(path) && !fs.statSync(path).isDirectory(); +} diff --git a/node_modules/@sveltejs/kit/src/exports/vite/static_analysis/index.js b/node_modules/@sveltejs/kit/src/exports/vite/static_analysis/index.js new file mode 100644 index 0000000..94600d1 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/exports/vite/static_analysis/index.js @@ -0,0 +1,259 @@ +import { tsPlugin } from '@sveltejs/acorn-typescript'; +import { Parser } from 'acorn'; +import { read } from '../../../utils/filesystem.js'; + +const inheritable_page_options = new Set(['ssr', 'prerender', 'csr', 'trailingSlash', 'config']); + +const page_options = new Set([...inheritable_page_options, 'entries']); + +const skip_parsing_regex = new RegExp( + `${Array.from(page_options).join('|')}|(?:export[\\s\\n]+\\*[\\s\\n]+from)` +); + +const parser = Parser.extend(tsPlugin()); + +/** + * Collects exported page options from a +page.js/+layout.js file. + * We ignore reassignments and use the declared value. + * Returns `null` if any export is too difficult to analyse. + * @param {string} filename + * @param {string} input + * @returns {Record | null} + */ +export function statically_analyse_exports(filename, input) { + // if there's a chance there are no page exports or export all declaration, + // then we can skip the AST parsing which is expensive + if (!skip_parsing_regex.test(input)) { + return {}; + } + + try { + const source = parser.parse(input, { + sourceType: 'module', + ecmaVersion: 'latest' + }); + + /** @type {Map} */ + const static_exports = new Map(); + + for (const statement of source.body) { + // ignore export all declarations with aliases that are not page options + if ( + statement.type === 'ExportAllDeclaration' && + statement.exported && + !page_options.has(get_name(statement.exported)) + ) { + continue; + } + + if ( + statement.type === 'ExportDefaultDeclaration' || + statement.type === 'ExportAllDeclaration' + ) { + return null; + } else if (statement.type !== 'ExportNamedDeclaration') { + continue; + } + + if (statement.specifiers.length) { + /** @type {Map} */ + const export_specifiers = new Map(); + for (const specifier of statement.specifiers) { + const exported_name = get_name(specifier.exported); + if (!page_options.has(exported_name)) { + continue; + } + + if (statement.source) { + return null; + } + + export_specifiers.set(get_name(specifier.local), exported_name); + } + + for (const statement of source.body) { + switch (statement.type) { + case 'ImportDeclaration': { + for (const import_specifier of statement.specifiers) { + if (export_specifiers.has(import_specifier.local.name)) { + return null; + } + } + break; + } + case 'ExportNamedDeclaration': + case 'VariableDeclaration': + case 'FunctionDeclaration': + case 'ClassDeclaration': { + const declaration = + statement.type === 'ExportNamedDeclaration' ? statement.declaration : statement; + + if (!declaration) { + break; + } + + // class and function declarations + if (declaration.type !== 'VariableDeclaration') { + if (export_specifiers.has(declaration.id.name)) { + return null; + } + break; + } + + for (const variable_declarator of declaration.declarations) { + if ( + variable_declarator.id.type !== 'Identifier' || + !export_specifiers.has(variable_declarator.id.name) + ) { + continue; + } + + if (variable_declarator.init?.type === 'Literal') { + static_exports.set( + /** @type {string} */ (export_specifiers.get(variable_declarator.id.name)), + variable_declarator.init.value + ); + export_specifiers.delete(variable_declarator.id.name); + continue; + } + + // references a declaration we can't easily evaluate statically + return null; + } + break; + } + } + } + + // there were some export specifiers that we couldn't resolve + if (export_specifiers.size) { + return null; + } + continue; + } + + if (!statement.declaration) { + continue; + } + + // class and function declarations + if (statement.declaration.type !== 'VariableDeclaration') { + if (page_options.has(statement.declaration.id.name)) { + return null; + } + continue; + } + + for (const declaration of statement.declaration.declarations) { + if (declaration.id.type !== 'Identifier') { + return null; + } + + if (!page_options.has(declaration.id.name)) { + continue; + } + + if (declaration.init?.type === 'Literal') { + static_exports.set(declaration.id.name, declaration.init.value); + continue; + } + + // references a declaration we can't easily evaluate statically + return null; + } + } + + return Object.fromEntries(static_exports); + } catch (error) { + if (error instanceof Error) { + error.message = `Failed to statically analyse ${filename}. ${error.message}`; + } + throw error; + } +} + +/** + * @param {import('acorn').Identifier | import('acorn').Literal} node + * @returns {string} + */ +export function get_name(node) { + return node.type === 'Identifier' ? node.name : /** @type {string} */ (node.value); +} + +/** + * @param {{ + * resolve: (file: string) => Promise>; + * static_exports?: Map | null>; + * }} opts + */ +export function create_node_analyser({ resolve, static_exports = new Map() }) { + /** + * Computes the final page options for a node (if possible). Otherwise, returns `null`. + * @param {import('types').PageNode} node + * @returns {Promise} + */ + const get_page_options = async (node) => { + if (node.universal && static_exports.has(node.universal)) { + return /** @type {import('types').UniversalNode | null} */ ( + static_exports.get(node.universal) + ); + } + + /** @type {Record | null} */ + let page_options = {}; + + if (node.server) { + const module = await resolve(node.server); + for (const key in inheritable_page_options) { + if (key in module) { + page_options[key] = module[key]; + } + } + } + + if (node.universal) { + let universal_exports = static_exports.get(node.universal); + if (universal_exports === undefined) { + const input = read(node.universal); + universal_exports = statically_analyse_exports(node.universal, input); + } + + if (universal_exports === null) { + static_exports.set(node.universal, null); + return null; + } + + page_options = { ...page_options, ...universal_exports }; + } + + if (node.parent) { + const parent_options = await get_page_options(node.parent); + if (parent_options === null) { + // if the parent cannot be statically analysed, we can't know what + // page options the current node inherits, so we invalidate it too + if (node.universal) { + static_exports.set(node.universal, null); + } + return null; + } + + page_options = { ...parent_options, ...page_options }; + } + + if (node.universal) { + static_exports.set(node.universal, page_options); + } + + return page_options; + }; + + /** + * @param {string} file + * @returns {void} + */ + const invalidate_page_options = (file) => { + static_exports.delete(file); + }; + + return { get_page_options, invalidate_page_options }; +} diff --git a/node_modules/@sveltejs/kit/src/exports/vite/types.d.ts b/node_modules/@sveltejs/kit/src/exports/vite/types.d.ts new file mode 100644 index 0000000..900aa43 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/exports/vite/types.d.ts @@ -0,0 +1,3 @@ +export interface EnforcedConfig { + [key: string]: EnforcedConfig | true; +} diff --git a/node_modules/@sveltejs/kit/src/exports/vite/utils.js b/node_modules/@sveltejs/kit/src/exports/vite/utils.js new file mode 100644 index 0000000..02916e4 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/exports/vite/utils.js @@ -0,0 +1,158 @@ +import path from 'node:path'; +import { loadEnv } from 'vite'; +import { posixify } from '../../utils/filesystem.js'; +import { negotiate } from '../../utils/http.js'; +import { filter_private_env, filter_public_env } from '../../utils/env.js'; +import { escape_html } from '../../utils/escape.js'; +import { + app_server, + env_dynamic_private, + env_dynamic_public, + env_static_private, + env_static_public, + service_worker +} from './module_ids.js'; + +/** + * Transforms kit.alias to a valid vite.resolve.alias array. + * + * Related to tsconfig path alias creation. + * + * @param {import('types').ValidatedKitConfig} config + * */ +export function get_config_aliases(config) { + /** @type {import('vite').Alias[]} */ + const alias = [ + // For now, we handle `$lib` specially here rather than make it a default value for + // `config.kit.alias` since it has special meaning for packaging, etc. + { find: '$lib', replacement: config.files.lib } + ]; + + for (let [key, value] of Object.entries(config.alias)) { + value = posixify(value); + if (value.endsWith('/*')) { + value = value.slice(0, -2); + } + if (key.endsWith('/*')) { + // Doing just `{ find: key.slice(0, -2) ,..}` would mean `import .. from "key"` would also be matched, which we don't want + alias.push({ + find: new RegExp(`^${escape_for_regexp(key.slice(0, -2))}\\/(.+)$`), + replacement: `${path.resolve(value)}/$1` + }); + } else if (key + '/*' in config.alias) { + // key and key/* both exist -> the replacement for key needs to happen _only_ on import .. from "key" + alias.push({ + find: new RegExp(`^${escape_for_regexp(key)}$`), + replacement: path.resolve(value) + }); + } else { + alias.push({ find: key, replacement: path.resolve(value) }); + } + } + + return alias; +} + +/** + * @param {string} str + */ +function escape_for_regexp(str) { + return str.replace(/[.*+?^${}()|[\]\\]/g, (match) => '\\' + match); +} + +/** + * Load environment variables from process.env and .env files + * @param {import('types').ValidatedKitConfig['env']} env_config + * @param {string} mode + */ +export function get_env(env_config, mode) { + const { publicPrefix: public_prefix, privatePrefix: private_prefix } = env_config; + const env = loadEnv(mode, env_config.dir, ''); + + return { + public: filter_public_env(env, { public_prefix, private_prefix }), + private: filter_private_env(env, { public_prefix, private_prefix }) + }; +} + +/** + * @param {import('http').IncomingMessage} req + * @param {import('http').ServerResponse} res + * @param {string} base + */ +export function not_found(req, res, base) { + const type = negotiate(req.headers.accept ?? '*', ['text/plain', 'text/html']); + + // special case — handle `/` request automatically + if (req.url === '/' && type === 'text/html') { + res.statusCode = 307; + res.setHeader('location', base); + res.end(); + return; + } + + res.statusCode = 404; + + const prefixed = base + req.url; + + if (type === 'text/html') { + res.setHeader('Content-Type', 'text/html'); + res.end( + `The server is configured with a public base URL of ${escape_html( + base + )} - did you mean to visit ${escape_html( + prefixed + )} instead?` + ); + } else { + res.end( + `The server is configured with a public base URL of ${escape_html( + base + )} - did you mean to visit ${escape_html(prefixed)} instead?` + ); + } +} + +/** + * Removes cwd/lib path from the start of the id + * @param {string} id + * @param {string} lib + * @param {string} cwd + */ +export function normalize_id(id, lib, cwd) { + if (id.startsWith(lib)) { + id = id.replace(lib, '$lib'); + } + + if (id.startsWith(cwd)) { + id = path.relative(cwd, id); + } + + if (id === app_server) { + return '$app/server'; + } + + if (id === env_static_private) { + return '$env/static/private'; + } + + if (id === env_static_public) { + return '$env/static/public'; + } + + if (id === env_dynamic_private) { + return '$env/dynamic/private'; + } + + if (id === env_dynamic_public) { + return '$env/dynamic/public'; + } + + if (id === service_worker) { + return '$service-worker'; + } + + return posixify(id); +} + +export const strip_virtual_prefix = /** @param {string} id */ (id) => id.replace('\0virtual:', ''); diff --git a/node_modules/@sveltejs/kit/src/runtime/app/environment/index.js b/node_modules/@sveltejs/kit/src/runtime/app/environment/index.js new file mode 100644 index 0000000..2b54619 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/app/environment/index.js @@ -0,0 +1,6 @@ +import { BROWSER, DEV } from 'esm-env'; +export { building, version } from '__sveltekit/environment'; + +export const browser = BROWSER; + +export const dev = DEV; diff --git a/node_modules/@sveltejs/kit/src/runtime/app/environment/types.d.ts b/node_modules/@sveltejs/kit/src/runtime/app/environment/types.d.ts new file mode 100644 index 0000000..da76eae --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/app/environment/types.d.ts @@ -0,0 +1,19 @@ +/** + * `true` if the app is running in the browser. + */ +export const browser: boolean; + +/** + * Whether the dev server is running. This is not guaranteed to correspond to `NODE_ENV` or `MODE`. + */ +export const dev: boolean; + +/** + * SvelteKit analyses your app during the `build` step by running it. During this process, `building` is `true`. This also applies during prerendering. + */ +export const building: boolean; + +/** + * The value of `config.kit.version.name`. + */ +export const version: string; diff --git a/node_modules/@sveltejs/kit/src/runtime/app/forms.js b/node_modules/@sveltejs/kit/src/runtime/app/forms.js new file mode 100644 index 0000000..51a126e --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/app/forms.js @@ -0,0 +1,233 @@ +import * as devalue from 'devalue'; +import { DEV } from 'esm-env'; +import { invalidateAll } from './navigation.js'; +import { app, applyAction } from '../client/client.js'; + +export { applyAction }; + +/** + * Use this function to deserialize the response from a form submission. + * Usage: + * + * ```js + * import { deserialize } from '$app/forms'; + * + * async function handleSubmit(event) { + * const response = await fetch('/form?/action', { + * method: 'POST', + * body: new FormData(event.target) + * }); + * + * const result = deserialize(await response.text()); + * // ... + * } + * ``` + * @template {Record | undefined} Success + * @template {Record | undefined} Failure + * @param {string} result + * @returns {import('@sveltejs/kit').ActionResult} + */ +export function deserialize(result) { + const parsed = JSON.parse(result); + + if (parsed.data) { + parsed.data = devalue.parse(parsed.data, app.decoders); + } + + return parsed; +} + +/** + * Shallow clone an element, so that we can access e.g. `form.action` without worrying + * that someone has added an `` (https://github.com/sveltejs/kit/issues/7593) + * @template {HTMLElement} T + * @param {T} element + * @returns {T} + */ +function clone(element) { + return /** @type {T} */ (HTMLElement.prototype.cloneNode.call(element)); +} + +/** + * This action enhances a `` element that otherwise would work without JavaScript. + * + * The `submit` function is called upon submission with the given FormData and the `action` that should be triggered. + * If `cancel` is called, the form will not be submitted. + * You can use the abort `controller` to cancel the submission in case another one starts. + * If a function is returned, that function is called with the response from the server. + * If nothing is returned, the fallback will be used. + * + * If this function or its return value isn't set, it + * - falls back to updating the `form` prop with the returned data if the action is on the same page as the form + * - updates `page.status` + * - resets the `` element and invalidates all data in case of successful submission with no redirect response + * - redirects in case of a redirect response + * - redirects to the nearest error page in case of an unexpected error + * + * If you provide a custom function with a callback and want to use the default behavior, invoke `update` in your callback. + * It accepts an options object + * - `reset: false` if you don't want the `` values to be reset after a successful submission + * - `invalidateAll: false` if you don't want the action to call `invalidateAll` after submission + * @template {Record | undefined} Success + * @template {Record | undefined} Failure + * @param {HTMLFormElement} form_element The form element + * @param {import('@sveltejs/kit').SubmitFunction} submit Submit callback + */ +export function enhance(form_element, submit = () => {}) { + if (DEV && clone(form_element).method !== 'post') { + throw new Error('use:enhance can only be used on fields with method="POST"'); + } + + /** + * @param {{ + * action: URL; + * invalidateAll?: boolean; + * result: import('@sveltejs/kit').ActionResult; + * reset?: boolean + * }} opts + */ + const fallback_callback = async ({ + action, + result, + reset = true, + invalidateAll: shouldInvalidateAll = true + }) => { + if (result.type === 'success') { + if (reset) { + // We call reset from the prototype to avoid DOM clobbering + HTMLFormElement.prototype.reset.call(form_element); + } + if (shouldInvalidateAll) { + await invalidateAll(); + } + } + + // For success/failure results, only apply action if it belongs to the + // current page, otherwise `form` will be updated erroneously + if ( + location.origin + location.pathname === action.origin + action.pathname || + result.type === 'redirect' || + result.type === 'error' + ) { + await applyAction(result); + } + }; + + /** @param {SubmitEvent} event */ + async function handle_submit(event) { + const method = event.submitter?.hasAttribute('formmethod') + ? /** @type {HTMLButtonElement | HTMLInputElement} */ (event.submitter).formMethod + : clone(form_element).method; + if (method !== 'post') return; + + event.preventDefault(); + + const action = new URL( + // We can't do submitter.formAction directly because that property is always set + event.submitter?.hasAttribute('formaction') + ? /** @type {HTMLButtonElement | HTMLInputElement} */ (event.submitter).formAction + : clone(form_element).action + ); + + const enctype = event.submitter?.hasAttribute('formenctype') + ? /** @type {HTMLButtonElement | HTMLInputElement} */ (event.submitter).formEnctype + : clone(form_element).enctype; + + const form_data = new FormData(form_element); + + if (DEV && enctype !== 'multipart/form-data') { + for (const value of form_data.values()) { + if (value instanceof File) { + throw new Error( + 'Your form contains fields, but is missing the necessary `enctype="multipart/form-data"` attribute. This will lead to inconsistent behavior between enhanced and native forms. For more details, see https://github.com/sveltejs/kit/issues/9819.' + ); + } + } + } + + const submitter_name = event.submitter?.getAttribute('name'); + if (submitter_name) { + form_data.append(submitter_name, event.submitter?.getAttribute('value') ?? ''); + } + + const controller = new AbortController(); + + let cancelled = false; + const cancel = () => (cancelled = true); + + const callback = + (await submit({ + action, + cancel, + controller, + formData: form_data, + formElement: form_element, + submitter: event.submitter + })) ?? fallback_callback; + if (cancelled) return; + + /** @type {import('@sveltejs/kit').ActionResult} */ + let result; + + try { + const headers = new Headers({ + accept: 'application/json', + 'x-sveltekit-action': 'true' + }); + + // do not explicitly set the `Content-Type` header when sending `FormData` + // or else it will interfere with the browser's header setting + // see https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest_API/Using_FormData_Objects#sect4 + if (enctype !== 'multipart/form-data') { + headers.set( + 'Content-Type', + /^(:?application\/x-www-form-urlencoded|text\/plain)$/.test(enctype) + ? enctype + : 'application/x-www-form-urlencoded' + ); + } + + // @ts-expect-error `URLSearchParams(form_data)` is kosher, but typescript doesn't know that + const body = enctype === 'multipart/form-data' ? form_data : new URLSearchParams(form_data); + + const response = await fetch(action, { + method: 'POST', + headers, + cache: 'no-store', + body, + signal: controller.signal + }); + + result = deserialize(await response.text()); + if (result.type === 'error') result.status = response.status; + } catch (error) { + if (/** @type {any} */ (error)?.name === 'AbortError') return; + result = { type: 'error', error }; + } + + await callback({ + action, + formData: form_data, + formElement: form_element, + update: (opts) => + fallback_callback({ + action, + result, + reset: opts?.reset, + invalidateAll: opts?.invalidateAll + }), + // @ts-expect-error generic constraints stuff we don't care about + result + }); + } + + // @ts-expect-error + HTMLFormElement.prototype.addEventListener.call(form_element, 'submit', handle_submit); + + return { + destroy() { + // @ts-expect-error + HTMLFormElement.prototype.removeEventListener.call(form_element, 'submit', handle_submit); + } + }; +} diff --git a/node_modules/@sveltejs/kit/src/runtime/app/navigation.js b/node_modules/@sveltejs/kit/src/runtime/app/navigation.js new file mode 100644 index 0000000..ca3f95d --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/app/navigation.js @@ -0,0 +1,13 @@ +export { + afterNavigate, + beforeNavigate, + disableScrollHandling, + goto, + invalidate, + invalidateAll, + onNavigate, + preloadCode, + preloadData, + pushState, + replaceState +} from '../client/client.js'; diff --git a/node_modules/@sveltejs/kit/src/runtime/app/paths/index.js b/node_modules/@sveltejs/kit/src/runtime/app/paths/index.js new file mode 100644 index 0000000..5a150fb --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/app/paths/index.js @@ -0,0 +1,8 @@ +export { base, assets } from '__sveltekit/paths'; +import { base } from '__sveltekit/paths'; +import { resolve_route } from '../../../utils/routing.js'; + +/** @type {import('./types.d.ts').resolveRoute} */ +export function resolveRoute(id, params) { + return base + resolve_route(id, params); +} diff --git a/node_modules/@sveltejs/kit/src/runtime/app/paths/types.d.ts b/node_modules/@sveltejs/kit/src/runtime/app/paths/types.d.ts new file mode 100644 index 0000000..d17c45d --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/app/paths/types.d.ts @@ -0,0 +1,30 @@ +/** + * A string that matches [`config.kit.paths.base`](https://svelte.dev/docs/kit/configuration#paths). + * + * Example usage: `Link` + */ +export let base: '' | `/${string}`; + +/** + * An absolute path that matches [`config.kit.paths.assets`](https://svelte.dev/docs/kit/configuration#paths). + * + * > [!NOTE] If a value for `config.kit.paths.assets` is specified, it will be replaced with `'/_svelte_kit_assets'` during `vite dev` or `vite preview`, since the assets don't yet live at their eventual URL. + */ +export let assets: '' | `https://${string}` | `http://${string}` | '/_svelte_kit_assets'; + +/** + * Populate a route ID with params to resolve a pathname. + * @example + * ```js + * import { resolveRoute } from '$app/paths'; + * + * resolveRoute( + * `/blog/[slug]/[...somethingElse]`, + * { + * slug: 'hello-world', + * somethingElse: 'something/else' + * } + * ); // `/blog/hello-world/something/else` + * ``` + */ +export function resolveRoute(id: string, params: Record): string; diff --git a/node_modules/@sveltejs/kit/src/runtime/app/server/event.js b/node_modules/@sveltejs/kit/src/runtime/app/server/event.js new file mode 100644 index 0000000..8351e21 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/app/server/event.js @@ -0,0 +1,53 @@ +/** @import { RequestEvent } from '@sveltejs/kit' */ + +/** @type {RequestEvent | null} */ +let request_event = null; + +/** @type {import('node:async_hooks').AsyncLocalStorage} */ +let als; + +import('node:async_hooks') + .then((hooks) => (als = new hooks.AsyncLocalStorage())) + .catch(() => { + // can't use AsyncLocalStorage, but can still call getRequestEvent synchronously. + // this isn't behind `supports` because it's basically just StackBlitz (i.e. + // in-browser usage) that doesn't support it AFAICT + }); + +/** + * Returns the current `RequestEvent`. Can be used inside server hooks, server `load` functions, actions, and endpoints (and functions called by them). + * + * In environments without [`AsyncLocalStorage`](https://nodejs.org/api/async_context.html#class-asynclocalstorage), this must be called synchronously (i.e. not after an `await`). + * @since 2.20.0 + */ +export function getRequestEvent() { + const event = request_event ?? als?.getStore(); + + if (!event) { + let message = + 'Can only read the current request event inside functions invoked during `handle`, such as server `load` functions, actions, endpoints, and other server hooks.'; + + if (!als) { + message += + ' In environments without `AsyncLocalStorage`, the event must be read synchronously, not after an `await`.'; + } + + throw new Error(message); + } + + return event; +} + +/** + * @template T + * @param {RequestEvent | null} event + * @param {() => T} fn + */ +export function with_event(event, fn) { + try { + request_event = event; + return als ? als.run(event, fn) : fn(); + } finally { + request_event = null; + } +} diff --git a/node_modules/@sveltejs/kit/src/runtime/app/server/index.js b/node_modules/@sveltejs/kit/src/runtime/app/server/index.js new file mode 100644 index 0000000..19c3849 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/app/server/index.js @@ -0,0 +1,75 @@ +import { read_implementation, manifest } from '__sveltekit/server'; +import { base } from '__sveltekit/paths'; +import { DEV } from 'esm-env'; +import { b64_decode } from '../../utils.js'; + +/** + * Read the contents of an imported asset from the filesystem + * @example + * ```js + * import { read } from '$app/server'; + * import somefile from './somefile.txt'; + * + * const asset = read(somefile); + * const text = await asset.text(); + * ``` + * @param {string} asset + * @returns {Response} + * @since 2.4.0 + */ +export function read(asset) { + __SVELTEKIT_TRACK__('$app/server:read'); + + if (!read_implementation) { + throw new Error( + 'No `read` implementation was provided. Please ensure that your adapter is up to date and supports this feature' + ); + } + + // handle inline assets internally + const match = /^data:([^;,]+)?(;base64)?,/.exec(asset); + if (match) { + const type = match[1] ?? 'application/octet-stream'; + const data = asset.slice(match[0].length); + + if (match[2] !== undefined) { + const decoded = b64_decode(data); + + return new Response(decoded, { + headers: { + 'Content-Length': decoded.byteLength.toString(), + 'Content-Type': type + } + }); + } + + const decoded = decodeURIComponent(data); + + return new Response(decoded, { + headers: { + 'Content-Length': decoded.length.toString(), + 'Content-Type': type + } + }); + } + + const file = decodeURIComponent( + DEV && asset.startsWith('/@fs') ? asset : asset.slice(base.length + 1) + ); + + if (file in manifest._.server_assets) { + const length = manifest._.server_assets[file]; + const type = manifest.mimeTypes[file.slice(file.lastIndexOf('.'))]; + + return new Response(read_implementation(file), { + headers: { + 'Content-Length': '' + length, + 'Content-Type': type + } + }); + } + + throw new Error(`Asset does not exist: ${file}`); +} + +export { getRequestEvent } from './event.js'; diff --git a/node_modules/@sveltejs/kit/src/runtime/app/state/client.js b/node_modules/@sveltejs/kit/src/runtime/app/state/client.js new file mode 100644 index 0000000..7a276d0 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/app/state/client.js @@ -0,0 +1,68 @@ +import { + page as _page, + navigating as _navigating, + updated as _updated +} from '../../client/state.svelte.js'; +import { stores } from '../../client/client.js'; + +export const page = { + get data() { + return _page.data; + }, + get error() { + return _page.error; + }, + get form() { + return _page.form; + }, + get params() { + return _page.params; + }, + get route() { + return _page.route; + }, + get state() { + return _page.state; + }, + get status() { + return _page.status; + }, + get url() { + return _page.url; + } +}; + +export const navigating = { + get from() { + return _navigating.current ? _navigating.current.from : null; + }, + get to() { + return _navigating.current ? _navigating.current.to : null; + }, + get type() { + return _navigating.current ? _navigating.current.type : null; + }, + get willUnload() { + return _navigating.current ? _navigating.current.willUnload : null; + }, + get delta() { + return _navigating.current ? _navigating.current.delta : null; + }, + get complete() { + return _navigating.current ? _navigating.current.complete : null; + } +}; + +Object.defineProperty(navigating, 'current', { + get() { + // between 2.12.0 and 2.12.1 `navigating.current` existed + throw new Error('Replace navigating.current. with navigating.'); + } +}); + +export const updated = { + get current() { + return _updated.current; + }, + check: stores.updated.check +}; diff --git a/node_modules/@sveltejs/kit/src/runtime/app/state/index.js b/node_modules/@sveltejs/kit/src/runtime/app/state/index.js new file mode 100644 index 0000000..70ed0ea --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/app/state/index.js @@ -0,0 +1,64 @@ +import { + page as client_page, + navigating as client_navigating, + updated as client_updated +} from './client.js'; +import { + page as server_page, + navigating as server_navigating, + updated as server_updated +} from './server.js'; +import { BROWSER } from 'esm-env'; + +/** + * A read-only reactive object with information about the current page, serving several use cases: + * - retrieving the combined `data` of all pages/layouts anywhere in your component tree (also see [loading data](https://svelte.dev/docs/kit/load)) + * - retrieving the current value of the `form` prop anywhere in your component tree (also see [form actions](https://svelte.dev/docs/kit/form-actions)) + * - retrieving the page state that was set through `goto`, `pushState` or `replaceState` (also see [goto](https://svelte.dev/docs/kit/$app-navigation#goto) and [shallow routing](https://svelte.dev/docs/kit/shallow-routing)) + * - retrieving metadata such as the URL you're on, the current route and its parameters, and whether or not there was an error + * + * ```svelte + * + * + * + *

Currently at {page.url.pathname}

+ * + * {#if page.error} + * Problem detected + * {:else} + * All systems operational + * {/if} + * ``` + * + * Changes to `page` are available exclusively with runes. (The legacy reactivity syntax will not reflect any changes) + * + * ```svelte + * + * + * ``` + * + * On the server, values can only be read during rendering (in other words _not_ in e.g. `load` functions). In the browser, the values can be read at any time. + * + * @type {import('@sveltejs/kit').Page} + */ +export const page = BROWSER ? client_page : server_page; + +/** + * A read-only object representing an in-progress navigation, with `from`, `to`, `type` and (if `type === 'popstate'`) `delta` properties. + * Values are `null` when no navigation is occurring, or during server rendering. + * @type {import('@sveltejs/kit').Navigation | { from: null, to: null, type: null, willUnload: null, delta: null, complete: null }} + */ +// @ts-expect-error +export const navigating = BROWSER ? client_navigating : server_navigating; + +/** + * A read-only reactive value that's initially `false`. If [`version.pollInterval`](https://svelte.dev/docs/kit/configuration#version) is a non-zero value, SvelteKit will poll for new versions of the app and update `current` to `true` when it detects one. `updated.check()` will force an immediate check, regardless of polling. + * @type {{ get current(): boolean; check(): Promise; }} + */ +export const updated = BROWSER ? client_updated : server_updated; diff --git a/node_modules/@sveltejs/kit/src/runtime/app/state/server.js b/node_modules/@sveltejs/kit/src/runtime/app/state/server.js new file mode 100644 index 0000000..ef60721 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/app/state/server.js @@ -0,0 +1,63 @@ +import { getContext } from 'svelte'; + +function context() { + return getContext('__request__'); +} + +/** @param {string} name */ +function context_dev(name) { + try { + return context(); + } catch { + throw new Error( + `Can only read '${name}' on the server during rendering (not in e.g. \`load\` functions), as it is bound to the current request via component context. This prevents state from leaking between users.` + + 'For more information, see https://svelte.dev/docs/kit/state-management#avoid-shared-state-on-the-server' + ); + } +} + +// TODO we're using DEV in some places and __SVELTEKIT_DEV__ in others - why? Can we consolidate? +export const page = { + get data() { + return (__SVELTEKIT_DEV__ ? context_dev('page.data') : context()).page.data; + }, + get error() { + return (__SVELTEKIT_DEV__ ? context_dev('page.error') : context()).page.error; + }, + get form() { + return (__SVELTEKIT_DEV__ ? context_dev('page.form') : context()).page.form; + }, + get params() { + return (__SVELTEKIT_DEV__ ? context_dev('page.params') : context()).page.params; + }, + get route() { + return (__SVELTEKIT_DEV__ ? context_dev('page.route') : context()).page.route; + }, + get state() { + return (__SVELTEKIT_DEV__ ? context_dev('page.state') : context()).page.state; + }, + get status() { + return (__SVELTEKIT_DEV__ ? context_dev('page.status') : context()).page.status; + }, + get url() { + return (__SVELTEKIT_DEV__ ? context_dev('page.url') : context()).page.url; + } +}; + +export const navigating = { + from: null, + to: null, + type: null, + willUnload: null, + delta: null, + complete: null +}; + +export const updated = { + get current() { + return false; + }, + check: () => { + throw new Error('Can only call updated.check() in the browser'); + } +}; diff --git a/node_modules/@sveltejs/kit/src/runtime/app/stores.js b/node_modules/@sveltejs/kit/src/runtime/app/stores.js new file mode 100644 index 0000000..3c4bac7 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/app/stores.js @@ -0,0 +1,101 @@ +import { getContext } from 'svelte'; +import { BROWSER } from 'esm-env'; +import { stores as browser_stores } from '../client/client.js'; + +/** + * A function that returns all of the contextual stores. On the server, this must be called during component initialization. + * Only use this if you need to defer store subscription until after the component has mounted, for some reason. + * + * @deprecated Use `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated)) + */ +export const getStores = () => { + const stores = BROWSER ? browser_stores : getContext('__svelte__'); + + return { + /** @type {typeof page} */ + page: { + subscribe: stores.page.subscribe + }, + /** @type {typeof navigating} */ + navigating: { + subscribe: stores.navigating.subscribe + }, + /** @type {typeof updated} */ + updated: stores.updated + }; +}; + +/** + * A readable store whose value contains page data. + * + * On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time. + * + * @deprecated Use `page` from `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated)) + * @type {import('svelte/store').Readable} + */ +export const page = { + subscribe(fn) { + const store = __SVELTEKIT_DEV__ ? get_store('page') : getStores().page; + return store.subscribe(fn); + } +}; + +/** + * A readable store. + * When navigating starts, its value is a `Navigation` object with `from`, `to`, `type` and (if `type === 'popstate'`) `delta` properties. + * When navigating finishes, its value reverts to `null`. + * + * On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time. + * + * @deprecated Use `navigating` from `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated)) + * @type {import('svelte/store').Readable} + */ +export const navigating = { + subscribe(fn) { + const store = __SVELTEKIT_DEV__ ? get_store('navigating') : getStores().navigating; + return store.subscribe(fn); + } +}; + +/** + * A readable store whose initial value is `false`. If [`version.pollInterval`](https://svelte.dev/docs/kit/configuration#version) is a non-zero value, SvelteKit will poll for new versions of the app and update the store value to `true` when it detects one. `updated.check()` will force an immediate check, regardless of polling. + * + * On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time. + * + * @deprecated Use `updated` from `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated)) + * @type {import('svelte/store').Readable & { check(): Promise }} + */ +export const updated = { + subscribe(fn) { + const store = __SVELTEKIT_DEV__ ? get_store('updated') : getStores().updated; + + if (BROWSER) { + updated.check = store.check; + } + + return store.subscribe(fn); + }, + check: () => { + throw new Error( + BROWSER + ? 'Cannot check updated store before subscribing' + : 'Can only check updated store in browser' + ); + } +}; + +/** + * @template {keyof ReturnType} Name + * @param {Name} name + * @returns {ReturnType[Name]} + */ +function get_store(name) { + try { + return getStores()[name]; + } catch { + throw new Error( + `Cannot subscribe to '${name}' store on the server outside of a Svelte component, as it is bound to the current request via component context. This prevents state from leaking between users.` + + 'For more information, see https://svelte.dev/docs/kit/state-management#avoid-shared-state-on-the-server' + ); + } +} diff --git a/node_modules/@sveltejs/kit/src/runtime/client/bundle.js b/node_modules/@sveltejs/kit/src/runtime/client/bundle.js new file mode 100644 index 0000000..7a915d3 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/client/bundle.js @@ -0,0 +1,15 @@ +/* if `bundleStrategy` is 'single' or 'inline', this file is used as the entry point */ + +import * as kit from './entry.js'; + +// @ts-expect-error +import * as app from '__sveltekit/manifest'; + +/** + * + * @param {HTMLElement} element + * @param {import('./types.js').HydrateOptions} options + */ +export function start(element, options) { + void kit.start(app, element, options); +} diff --git a/node_modules/@sveltejs/kit/src/runtime/client/client.js b/node_modules/@sveltejs/kit/src/runtime/client/client.js new file mode 100644 index 0000000..f831afa --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/client/client.js @@ -0,0 +1,2959 @@ +import { BROWSER, DEV } from 'esm-env'; +import { onMount, tick } from 'svelte'; +import { + decode_params, + decode_pathname, + strip_hash, + make_trackable, + normalize_path +} from '../../utils/url.js'; +import { dev_fetch, initial_fetch, lock_fetch, subsequent_fetch, unlock_fetch } from './fetcher.js'; +import { parse, parse_server_route } from './parse.js'; +import * as storage from './session-storage.js'; +import { + find_anchor, + resolve_url, + get_link_info, + get_router_options, + is_external_url, + origin, + scroll_state, + notifiable_store, + create_updated_store, + load_css +} from './utils.js'; +import { base } from '__sveltekit/paths'; +import * as devalue from 'devalue'; +import { + HISTORY_INDEX, + NAVIGATION_INDEX, + PRELOAD_PRIORITIES, + SCROLL_KEY, + STATES_KEY, + SNAPSHOT_KEY, + PAGE_URL_KEY +} from './constants.js'; +import { validate_page_exports } from '../../utils/exports.js'; +import { compact } from '../../utils/array.js'; +import { HttpError, Redirect, SvelteKitError } from '../control.js'; +import { INVALIDATED_PARAM, TRAILING_SLASH_PARAM, validate_depends } from '../shared.js'; +import { get_message, get_status } from '../../utils/error.js'; +import { writable } from 'svelte/store'; +import { page, update, navigating } from './state.svelte.js'; +import { add_data_suffix, add_resolution_suffix } from '../pathname.js'; + +export { load_css }; + +const ICON_REL_ATTRIBUTES = new Set(['icon', 'shortcut icon', 'apple-touch-icon']); + +let errored = false; + +// We track the scroll position associated with each history entry in sessionStorage, +// rather than on history.state itself, because when navigation is driven by +// popstate it's too late to update the scroll position associated with the +// state we're navigating from +/** + * history index -> { x, y } + * @type {Record} + */ +const scroll_positions = storage.get(SCROLL_KEY) ?? {}; + +/** + * navigation index -> any + * @type {Record} + */ +const snapshots = storage.get(SNAPSHOT_KEY) ?? {}; + +if (DEV && BROWSER) { + let warned = false; + + const current_module_url = import.meta.url.split('?')[0]; // remove query params that vite adds to the URL when it is loaded from node_modules + + const warn = () => { + if (warned) return; + + // Rather than saving a pointer to the original history methods, which would prevent monkeypatching by other libs, + // inspect the stack trace to see if we're being called from within SvelteKit. + let stack = new Error().stack?.split('\n'); + if (!stack) return; + if (!stack[0].includes('https:') && !stack[0].includes('http:')) stack = stack.slice(1); // Chrome includes the error message in the stack + stack = stack.slice(2); // remove `warn` and the place where `warn` was called + // Can be falsy if was called directly from an anonymous function + if (stack[0]?.includes(current_module_url)) return; + + warned = true; + + console.warn( + "Avoid using `history.pushState(...)` and `history.replaceState(...)` as these will conflict with SvelteKit's router. Use the `pushState` and `replaceState` imports from `$app/navigation` instead." + ); + }; + + const push_state = history.pushState; + history.pushState = (...args) => { + warn(); + return push_state.apply(history, args); + }; + + const replace_state = history.replaceState; + history.replaceState = (...args) => { + warn(); + return replace_state.apply(history, args); + }; +} + +export const stores = { + url: /* @__PURE__ */ notifiable_store({}), + page: /* @__PURE__ */ notifiable_store({}), + navigating: /* @__PURE__ */ writable( + /** @type {import('@sveltejs/kit').Navigation | null} */ (null) + ), + updated: /* @__PURE__ */ create_updated_store() +}; + +/** @param {number} index */ +function update_scroll_positions(index) { + scroll_positions[index] = scroll_state(); +} + +/** + * @param {number} current_history_index + * @param {number} current_navigation_index + */ +function clear_onward_history(current_history_index, current_navigation_index) { + // if we navigated back, then pushed a new state, we can + // release memory by pruning the scroll/snapshot lookup + let i = current_history_index + 1; + while (scroll_positions[i]) { + delete scroll_positions[i]; + i += 1; + } + + i = current_navigation_index + 1; + while (snapshots[i]) { + delete snapshots[i]; + i += 1; + } +} + +/** + * Loads `href` the old-fashioned way, with a full page reload. + * Returns a `Promise` that never resolves (to prevent any + * subsequent work, e.g. history manipulation, from happening) + * @param {URL} url + */ +function native_navigation(url) { + location.href = url.href; + return new Promise(() => {}); +} + +/** + * Checks whether a service worker is registered, and if it is, + * tries to update it. + */ +async function update_service_worker() { + if ('serviceWorker' in navigator) { + const registration = await navigator.serviceWorker.getRegistration(base || '/'); + if (registration) { + await registration.update(); + } + } +} + +function noop() {} + +/** @type {import('types').CSRRoute[]} All routes of the app. Only available when kit.router.resolution=client */ +let routes; +/** @type {import('types').CSRPageNodeLoader} */ +let default_layout_loader; +/** @type {import('types').CSRPageNodeLoader} */ +let default_error_loader; +/** @type {HTMLElement} */ +let container; +/** @type {HTMLElement} */ +let target; +/** @type {import('./types.js').SvelteKitApp} */ +export let app; + +/** @type {Array<((url: URL) => boolean)>} */ +const invalidated = []; + +/** + * An array of the `+layout.svelte` and `+page.svelte` component instances + * that currently live on the page — used for capturing and restoring snapshots. + * It's updated/manipulated through `bind:this` in `Root.svelte`. + * @type {import('svelte').SvelteComponent[]} + */ +const components = []; + +/** @type {{id: string, token: {}, promise: Promise} | null} */ +let load_cache = null; + +/** + * @type {Map>} + * Cache for client-side rerouting, since it could contain async calls which we want to + * avoid running multiple times which would slow down navigations (e.g. else preloading + * wouldn't help because on navigation it would be called again). Since `reroute` should be + * a pure function (i.e. always return the same) value it's safe to cache across navigations. + * The server reroute calls don't need to be cached because they are called using `import(...)` + * which is cached per the JS spec. + */ +const reroute_cache = new Map(); + +/** + * Note on before_navigate_callbacks, on_navigate_callbacks and after_navigate_callbacks: + * do not re-assign as some closures keep references to these Sets + */ +/** @type {Set<(navigation: import('@sveltejs/kit').BeforeNavigate) => void>} */ +const before_navigate_callbacks = new Set(); + +/** @type {Set<(navigation: import('@sveltejs/kit').OnNavigate) => import('types').MaybePromise<(() => void) | void>>} */ +const on_navigate_callbacks = new Set(); + +/** @type {Set<(navigation: import('@sveltejs/kit').AfterNavigate) => void>} */ +const after_navigate_callbacks = new Set(); + +/** @type {import('./types.js').NavigationState} */ +let current = { + branch: [], + error: null, + // @ts-ignore - we need the initial value to be null + url: null +}; + +/** this being true means we SSR'd */ +let hydrated = false; +let started = false; +let autoscroll = true; +let updating = false; +let is_navigating = false; +let hash_navigating = false; +/** True as soon as there happened one client-side navigation (excluding the SvelteKit-initialized initial one when in SPA mode) */ +let has_navigated = false; + +let force_invalidation = false; + +/** @type {import('svelte').SvelteComponent} */ +let root; + +/** @type {number} keeping track of the history index in order to prevent popstate navigation events if needed */ +let current_history_index; + +/** @type {number} */ +let current_navigation_index; + +/** @type {{}} */ +let token; + +/** + * A set of tokens which are associated to current preloads. + * If a preload becomes a real navigation, it's removed from the set. + * If a preload token is in the set and the preload errors, the error + * handling logic (for example reloading) is skipped. + */ +const preload_tokens = new Set(); + +/** @type {Promise | null} */ +let pending_invalidate; + +/** + * @param {import('./types.js').SvelteKitApp} _app + * @param {HTMLElement} _target + * @param {Parameters[1]} [hydrate] + */ +export async function start(_app, _target, hydrate) { + if (DEV && _target === document.body) { + console.warn( + 'Placing %sveltekit.body% directly inside is not recommended, as your app may break for users who have certain browser extensions installed.\n\nConsider wrapping it in an element:\n\n
\n %sveltekit.body%\n
' + ); + } + + // detect basic auth credentials in the current URL + // https://github.com/sveltejs/kit/pull/11179 + // if so, refresh the page without credentials + if (document.URL !== location.href) { + // eslint-disable-next-line no-self-assign + location.href = location.href; + } + + app = _app; + + await _app.hooks.init?.(); + + routes = __SVELTEKIT_CLIENT_ROUTING__ ? parse(_app) : []; + container = __SVELTEKIT_EMBEDDED__ ? _target : document.documentElement; + target = _target; + + // we import the root layout/error nodes eagerly, so that + // connectivity errors after initialisation don't nuke the app + default_layout_loader = _app.nodes[0]; + default_error_loader = _app.nodes[1]; + void default_layout_loader(); + void default_error_loader(); + + current_history_index = history.state?.[HISTORY_INDEX]; + current_navigation_index = history.state?.[NAVIGATION_INDEX]; + + if (!current_history_index) { + // we use Date.now() as an offset so that cross-document navigations + // within the app don't result in data loss + current_history_index = current_navigation_index = Date.now(); + + // create initial history entry, so we can return here + history.replaceState( + { + ...history.state, + [HISTORY_INDEX]: current_history_index, + [NAVIGATION_INDEX]: current_navigation_index + }, + '' + ); + } + + // if we reload the page, or Cmd-Shift-T back to it, + // recover scroll position + const scroll = scroll_positions[current_history_index]; + if (scroll) { + history.scrollRestoration = 'manual'; + scrollTo(scroll.x, scroll.y); + } + + if (hydrate) { + await _hydrate(target, hydrate); + } else { + await navigate({ + type: 'enter', + url: resolve_url(app.hash ? decode_hash(new URL(location.href)) : location.href), + replace_state: true + }); + } + + _start_router(); +} + +async function _invalidate() { + // Accept all invalidations as they come, don't swallow any while another invalidation + // is running because subsequent invalidations may make earlier ones outdated, + // but batch multiple synchronous invalidations. + await (pending_invalidate ||= Promise.resolve()); + if (!pending_invalidate) return; + pending_invalidate = null; + + const nav_token = (token = {}); + const intent = await get_navigation_intent(current.url, true); + + // Clear preload, it might be affected by the invalidation. + // Also solves an edge case where a preload is triggered, the navigation for it + // was then triggered and is still running while the invalidation kicks in, + // at which point the invalidation should take over and "win". + load_cache = null; + + const navigation_result = intent && (await load_route(intent)); + if (!navigation_result || nav_token !== token) return; + + if (navigation_result.type === 'redirect') { + return _goto(new URL(navigation_result.location, current.url).href, {}, 1, nav_token); + } + + if (navigation_result.props.page) { + Object.assign(page, navigation_result.props.page); + } + current = navigation_result.state; + reset_invalidation(); + root.$set(navigation_result.props); + update(navigation_result.props.page); +} + +function reset_invalidation() { + invalidated.length = 0; + force_invalidation = false; +} + +/** @param {number} index */ +function capture_snapshot(index) { + if (components.some((c) => c?.snapshot)) { + snapshots[index] = components.map((c) => c?.snapshot?.capture()); + } +} + +/** @param {number} index */ +function restore_snapshot(index) { + snapshots[index]?.forEach((value, i) => { + components[i]?.snapshot?.restore(value); + }); +} + +function persist_state() { + update_scroll_positions(current_history_index); + storage.set(SCROLL_KEY, scroll_positions); + + capture_snapshot(current_navigation_index); + storage.set(SNAPSHOT_KEY, snapshots); +} + +/** + * @param {string | URL} url + * @param {{ replaceState?: boolean; noScroll?: boolean; keepFocus?: boolean; invalidateAll?: boolean; invalidate?: Array boolean)>; state?: Record }} options + * @param {number} redirect_count + * @param {{}} [nav_token] + */ +async function _goto(url, options, redirect_count, nav_token) { + return navigate({ + type: 'goto', + url: resolve_url(url), + keepfocus: options.keepFocus, + noscroll: options.noScroll, + replace_state: options.replaceState, + state: options.state, + redirect_count, + nav_token, + accept: () => { + if (options.invalidateAll) { + force_invalidation = true; + } + + if (options.invalidate) { + options.invalidate.forEach(push_invalidated); + } + } + }); +} + +/** @param {import('./types.js').NavigationIntent} intent */ +async function _preload_data(intent) { + // Reuse the existing pending preload if it's for the same navigation. + // Prevents an edge case where same preload is triggered multiple times, + // then a later one is becoming the real navigation and the preload tokens + // get out of sync. + if (intent.id !== load_cache?.id) { + const preload = {}; + preload_tokens.add(preload); + load_cache = { + id: intent.id, + token: preload, + promise: load_route({ ...intent, preload }).then((result) => { + preload_tokens.delete(preload); + if (result.type === 'loaded' && result.state.error) { + // Don't cache errors, because they might be transient + load_cache = null; + } + return result; + }) + }; + } + + return load_cache.promise; +} + +/** + * @param {URL} url + * @returns {Promise} + */ +async function _preload_code(url) { + const route = (await get_navigation_intent(url, false))?.route; + + if (route) { + await Promise.all([...route.layouts, route.leaf].map((load) => load?.[1]())); + } +} + +/** + * @param {import('./types.js').NavigationFinished} result + * @param {HTMLElement} target + * @param {boolean} hydrate + */ +function initialize(result, target, hydrate) { + if (DEV && result.state.error && document.querySelector('vite-error-overlay')) return; + + current = result.state; + + const style = document.querySelector('style[data-sveltekit]'); + if (style) style.remove(); + + Object.assign(page, /** @type {import('@sveltejs/kit').Page} */ (result.props.page)); + + root = new app.root({ + target, + props: { ...result.props, stores, components }, + hydrate, + // @ts-ignore Svelte 5 specific: asynchronously instantiate the component, i.e. don't call flushSync + sync: false + }); + + restore_snapshot(current_navigation_index); + + if (hydrate) { + /** @type {import('@sveltejs/kit').AfterNavigate} */ + const navigation = { + from: null, + to: { + params: current.params, + route: { id: current.route?.id ?? null }, + url: new URL(location.href) + }, + willUnload: false, + type: 'enter', + complete: Promise.resolve() + }; + + after_navigate_callbacks.forEach((fn) => fn(navigation)); + } + + started = true; +} + +/** + * + * @param {{ + * url: URL; + * params: Record; + * branch: Array; + * status: number; + * error: App.Error | null; + * route: import('types').CSRRoute | null; + * form?: Record | null; + * }} opts + */ +function get_navigation_result_from_branch({ url, params, branch, status, error, route, form }) { + /** @type {import('types').TrailingSlash} */ + let slash = 'never'; + + // if `paths.base === '/a/b/c`, then the root route is always `/a/b/c/`, regardless of + // the `trailingSlash` route option, so that relative paths to JS and CSS work + if (base && (url.pathname === base || url.pathname === base + '/')) { + slash = 'always'; + } else { + for (const node of branch) { + if (node?.slash !== undefined) slash = node.slash; + } + } + + url.pathname = normalize_path(url.pathname, slash); + + // eslint-disable-next-line + url.search = url.search; // turn `/?` into `/` + + /** @type {import('./types.js').NavigationFinished} */ + const result = { + type: 'loaded', + state: { + url, + params, + branch, + error, + route + }, + props: { + // @ts-ignore Somehow it's getting SvelteComponent and SvelteComponentDev mixed up + constructors: compact(branch).map((branch_node) => branch_node.node.component), + page: clone_page(page) + } + }; + + if (form !== undefined) { + result.props.form = form; + } + + let data = {}; + let data_changed = !page; + + let p = 0; + + for (let i = 0; i < Math.max(branch.length, current.branch.length); i += 1) { + const node = branch[i]; + const prev = current.branch[i]; + + if (node?.data !== prev?.data) data_changed = true; + if (!node) continue; + + data = { ...data, ...node.data }; + + // Only set props if the node actually updated. This prevents needless rerenders. + if (data_changed) { + result.props[`data_${p}`] = data; + } + + p += 1; + } + + const page_changed = + !current.url || + url.href !== current.url.href || + current.error !== error || + (form !== undefined && form !== page.form) || + data_changed; + + if (page_changed) { + result.props.page = { + error, + params, + route: { + id: route?.id ?? null + }, + state: {}, + status, + url: new URL(url), + form: form ?? null, + // The whole page store is updated, but this way the object reference stays the same + data: data_changed ? data : page.data + }; + } + + return result; +} + +/** + * Call the universal load function of the given node, if it exists. + * + * @param {{ + * loader: import('types').CSRPageNodeLoader; + * parent: () => Promise>; + * url: URL; + * params: Record; + * route: { id: string | null }; + * server_data_node: import('./types.js').DataNode | null; + * }} options + * @returns {Promise} + */ +async function load_node({ loader, parent, url, params, route, server_data_node }) { + /** @type {Record | null} */ + let data = null; + + let is_tracking = true; + + /** @type {import('types').Uses} */ + const uses = { + dependencies: new Set(), + params: new Set(), + parent: false, + route: false, + url: false, + search_params: new Set() + }; + + const node = await loader(); + + if (DEV) { + validate_page_exports(node.universal); + + if (node.universal && app.hash) { + const options = Object.keys(node.universal).filter((o) => o !== 'load'); + + if (options.length > 0) { + throw new Error( + `Page options are ignored when \`router.type === 'hash'\` (${route.id} has ${options + .filter((o) => o !== 'load') + .map((o) => `'${o}'`) + .join(', ')})` + ); + } + } + } + + if (node.universal?.load) { + /** @param {string[]} deps */ + function depends(...deps) { + for (const dep of deps) { + if (DEV) validate_depends(/** @type {string} */ (route.id), dep); + + const { href } = new URL(dep, url); + uses.dependencies.add(href); + } + } + + /** @type {import('@sveltejs/kit').LoadEvent} */ + const load_input = { + route: new Proxy(route, { + get: (target, key) => { + if (is_tracking) { + uses.route = true; + } + return target[/** @type {'id'} */ (key)]; + } + }), + params: new Proxy(params, { + get: (target, key) => { + if (is_tracking) { + uses.params.add(/** @type {string} */ (key)); + } + return target[/** @type {string} */ (key)]; + } + }), + data: server_data_node?.data ?? null, + url: make_trackable( + url, + () => { + if (is_tracking) { + uses.url = true; + } + }, + (param) => { + if (is_tracking) { + uses.search_params.add(param); + } + }, + app.hash + ), + async fetch(resource, init) { + if (resource instanceof Request) { + // we're not allowed to modify the received `Request` object, so in order + // to fixup relative urls we create a new equivalent `init` object instead + init = { + // the request body must be consumed in memory until browsers + // implement streaming request bodies and/or the body getter + body: + resource.method === 'GET' || resource.method === 'HEAD' + ? undefined + : await resource.blob(), + cache: resource.cache, + credentials: resource.credentials, + // the headers are undefined on the server if the Headers object is empty + // so we need to make sure they are also undefined here if there are no headers + headers: [...resource.headers].length ? resource.headers : undefined, + integrity: resource.integrity, + keepalive: resource.keepalive, + method: resource.method, + mode: resource.mode, + redirect: resource.redirect, + referrer: resource.referrer, + referrerPolicy: resource.referrerPolicy, + signal: resource.signal, + ...init + }; + } + + const { resolved, promise } = resolve_fetch_url(resource, init, url); + + if (is_tracking) { + depends(resolved.href); + } + + return promise; + }, + setHeaders: () => {}, // noop + depends, + parent() { + if (is_tracking) { + uses.parent = true; + } + return parent(); + }, + untrack(fn) { + is_tracking = false; + try { + return fn(); + } finally { + is_tracking = true; + } + } + }; + + if (DEV) { + try { + lock_fetch(); + data = (await node.universal.load.call(null, load_input)) ?? null; + if (data != null && Object.getPrototypeOf(data) !== Object.prototype) { + throw new Error( + `a load function related to route '${route.id}' returned ${ + typeof data !== 'object' + ? `a ${typeof data}` + : data instanceof Response + ? 'a Response object' + : Array.isArray(data) + ? 'an array' + : 'a non-plain object' + }, but must return a plain object at the top level (i.e. \`return {...}\`)` + ); + } + } finally { + unlock_fetch(); + } + } else { + data = (await node.universal.load.call(null, load_input)) ?? null; + } + } + + return { + node, + loader, + server: server_data_node, + universal: node.universal?.load ? { type: 'data', data, uses } : null, + data: data ?? server_data_node?.data ?? null, + slash: node.universal?.trailingSlash ?? server_data_node?.slash + }; +} + +/** + * @param {Request | string | URL} input + * @param {RequestInit | undefined} init + * @param {URL} url + */ +function resolve_fetch_url(input, init, url) { + let requested = input instanceof Request ? input.url : input; + + // we must fixup relative urls so they are resolved from the target page + const resolved = new URL(requested, url); + + // match ssr serialized data url, which is important to find cached responses + if (resolved.origin === url.origin) { + requested = resolved.href.slice(url.origin.length); + } + + // prerendered pages may be served from any origin, so `initial_fetch` urls shouldn't be resolved + const promise = started + ? subsequent_fetch(requested, resolved.href, init) + : initial_fetch(requested, init); + + return { resolved, promise }; +} + +/** + * @param {boolean} parent_changed + * @param {boolean} route_changed + * @param {boolean} url_changed + * @param {Set} search_params_changed + * @param {import('types').Uses | undefined} uses + * @param {Record} params + */ +function has_changed( + parent_changed, + route_changed, + url_changed, + search_params_changed, + uses, + params +) { + if (force_invalidation) return true; + + if (!uses) return false; + + if (uses.parent && parent_changed) return true; + if (uses.route && route_changed) return true; + if (uses.url && url_changed) return true; + + for (const tracked_params of uses.search_params) { + if (search_params_changed.has(tracked_params)) return true; + } + + for (const param of uses.params) { + if (params[param] !== current.params[param]) return true; + } + + for (const href of uses.dependencies) { + if (invalidated.some((fn) => fn(new URL(href)))) return true; + } + + return false; +} + +/** + * @param {import('types').ServerDataNode | import('types').ServerDataSkippedNode | null} node + * @param {import('./types.js').DataNode | null} [previous] + * @returns {import('./types.js').DataNode | null} + */ +function create_data_node(node, previous) { + if (node?.type === 'data') return node; + if (node?.type === 'skip') return previous ?? null; + return null; +} + +/** + * @param {URL | null} old_url + * @param {URL} new_url + */ +function diff_search_params(old_url, new_url) { + if (!old_url) return new Set(new_url.searchParams.keys()); + + const changed = new Set([...old_url.searchParams.keys(), ...new_url.searchParams.keys()]); + + for (const key of changed) { + const old_values = old_url.searchParams.getAll(key); + const new_values = new_url.searchParams.getAll(key); + + if ( + old_values.every((value) => new_values.includes(value)) && + new_values.every((value) => old_values.includes(value)) + ) { + changed.delete(key); + } + } + + return changed; +} + +/** + * @param {Omit & { error: App.Error }} opts + * @returns {import('./types.js').NavigationFinished} + */ +function preload_error({ error, url, route, params }) { + return { + type: 'loaded', + state: { + error, + url, + route, + params, + branch: [] + }, + props: { + page: clone_page(page), + constructors: [] + } + }; +} + +/** + * @param {import('./types.js').NavigationIntent & { preload?: {} }} intent + * @returns {Promise} + */ +async function load_route({ id, invalidating, url, params, route, preload }) { + if (load_cache?.id === id) { + // the preload becomes the real navigation + preload_tokens.delete(load_cache.token); + return load_cache.promise; + } + + const { errors, layouts, leaf } = route; + + const loaders = [...layouts, leaf]; + + // preload modules to avoid waterfall, but handle rejections + // so they don't get reported to Sentry et al (we don't need + // to act on the failures at this point) + errors.forEach((loader) => loader?.().catch(() => {})); + loaders.forEach((loader) => loader?.[1]().catch(() => {})); + + /** @type {import('types').ServerNodesResponse | import('types').ServerRedirectNode | null} */ + let server_data = null; + const url_changed = current.url ? id !== get_page_key(current.url) : false; + const route_changed = current.route ? route.id !== current.route.id : false; + const search_params_changed = diff_search_params(current.url, url); + + let parent_invalid = false; + const invalid_server_nodes = loaders.map((loader, i) => { + const previous = current.branch[i]; + + const invalid = + !!loader?.[0] && + (previous?.loader !== loader[1] || + has_changed( + parent_invalid, + route_changed, + url_changed, + search_params_changed, + previous.server?.uses, + params + )); + + if (invalid) { + // For the next one + parent_invalid = true; + } + + return invalid; + }); + + if (invalid_server_nodes.some(Boolean)) { + try { + server_data = await load_data(url, invalid_server_nodes); + } catch (error) { + const handled_error = await handle_error(error, { url, params, route: { id } }); + + if (preload_tokens.has(preload)) { + return preload_error({ error: handled_error, url, params, route }); + } + + return load_root_error_page({ + status: get_status(error), + error: handled_error, + url, + route + }); + } + + if (server_data.type === 'redirect') { + return server_data; + } + } + + const server_data_nodes = server_data?.nodes; + + let parent_changed = false; + + const branch_promises = loaders.map(async (loader, i) => { + if (!loader) return; + + /** @type {import('./types.js').BranchNode | undefined} */ + const previous = current.branch[i]; + + const server_data_node = server_data_nodes?.[i]; + + // re-use data from previous load if it's still valid + const valid = + (!server_data_node || server_data_node.type === 'skip') && + loader[1] === previous?.loader && + !has_changed( + parent_changed, + route_changed, + url_changed, + search_params_changed, + previous.universal?.uses, + params + ); + if (valid) return previous; + + parent_changed = true; + + if (server_data_node?.type === 'error') { + // rethrow and catch below + throw server_data_node; + } + + return load_node({ + loader: loader[1], + url, + params, + route, + parent: async () => { + const data = {}; + for (let j = 0; j < i; j += 1) { + Object.assign(data, (await branch_promises[j])?.data); + } + return data; + }, + server_data_node: create_data_node( + // server_data_node is undefined if it wasn't reloaded from the server; + // and if current loader uses server data, we want to reuse previous data. + server_data_node === undefined && loader[0] ? { type: 'skip' } : (server_data_node ?? null), + loader[0] ? previous?.server : undefined + ) + }); + }); + + // if we don't do this, rejections will be unhandled + for (const p of branch_promises) p.catch(() => {}); + + /** @type {Array} */ + const branch = []; + + for (let i = 0; i < loaders.length; i += 1) { + if (loaders[i]) { + try { + branch.push(await branch_promises[i]); + } catch (err) { + if (err instanceof Redirect) { + return { + type: 'redirect', + location: err.location + }; + } + + if (preload_tokens.has(preload)) { + return preload_error({ + error: await handle_error(err, { params, url, route: { id: route.id } }), + url, + params, + route + }); + } + + let status = get_status(err); + /** @type {App.Error} */ + let error; + + if (server_data_nodes?.includes(/** @type {import('types').ServerErrorNode} */ (err))) { + // this is the server error rethrown above, reconstruct but don't invoke + // the client error handler; it should've already been handled on the server + status = /** @type {import('types').ServerErrorNode} */ (err).status ?? status; + error = /** @type {import('types').ServerErrorNode} */ (err).error; + } else if (err instanceof HttpError) { + error = err.body; + } else { + // Referenced node could have been removed due to redeploy, check + const updated = await stores.updated.check(); + if (updated) { + // Before reloading, try to update the service worker if it exists + await update_service_worker(); + return await native_navigation(url); + } + + error = await handle_error(err, { params, url, route: { id: route.id } }); + } + + const error_load = await load_nearest_error_page(i, branch, errors); + if (error_load) { + return get_navigation_result_from_branch({ + url, + params, + branch: branch.slice(0, error_load.idx).concat(error_load.node), + status, + error, + route + }); + } else { + return await server_fallback(url, { id: route.id }, error, status); + } + } + } else { + // push an empty slot so we can rewind past gaps to the + // layout that corresponds with an +error.svelte page + branch.push(undefined); + } + } + + return get_navigation_result_from_branch({ + url, + params, + branch, + status: 200, + error: null, + route, + // Reset `form` on navigation, but not invalidation + form: invalidating ? undefined : null + }); +} + +/** + * @param {number} i Start index to backtrack from + * @param {Array} branch Branch to backtrack + * @param {Array} errors All error pages for this branch + * @returns {Promise<{idx: number; node: import('./types.js').BranchNode} | undefined>} + */ +async function load_nearest_error_page(i, branch, errors) { + while (i--) { + if (errors[i]) { + let j = i; + while (!branch[j]) j -= 1; + try { + return { + idx: j + 1, + node: { + node: await /** @type {import('types').CSRPageNodeLoader } */ (errors[i])(), + loader: /** @type {import('types').CSRPageNodeLoader } */ (errors[i]), + data: {}, + server: null, + universal: null + } + }; + } catch { + continue; + } + } + } +} + +/** + * @param {{ + * status: number; + * error: App.Error; + * url: URL; + * route: { id: string | null } + * }} opts + * @returns {Promise} + */ +async function load_root_error_page({ status, error, url, route }) { + /** @type {Record} */ + const params = {}; // error page does not have params + + /** @type {import('types').ServerDataNode | null} */ + let server_data_node = null; + + const default_layout_has_server_load = app.server_loads[0] === 0; + + if (default_layout_has_server_load) { + // TODO post-https://github.com/sveltejs/kit/discussions/6124 we can use + // existing root layout data + try { + const server_data = await load_data(url, [true]); + + if ( + server_data.type !== 'data' || + (server_data.nodes[0] && server_data.nodes[0].type !== 'data') + ) { + throw 0; + } + + server_data_node = server_data.nodes[0] ?? null; + } catch { + // at this point we have no choice but to fall back to the server, if it wouldn't + // bring us right back here, turning this into an endless loop + if (url.origin !== origin || url.pathname !== location.pathname || hydrated) { + await native_navigation(url); + } + } + } + + try { + const root_layout = await load_node({ + loader: default_layout_loader, + url, + params, + route, + parent: () => Promise.resolve({}), + server_data_node: create_data_node(server_data_node) + }); + + /** @type {import('./types.js').BranchNode} */ + const root_error = { + node: await default_error_loader(), + loader: default_error_loader, + universal: null, + server: null, + data: null + }; + + return get_navigation_result_from_branch({ + url, + params, + branch: [root_layout, root_error], + status, + error, + route: null + }); + } catch (error) { + if (error instanceof Redirect) { + return _goto(new URL(error.location, location.href), {}, 0); + } + + // TODO: this falls back to the server when a server exists, but what about SPA mode? + throw error; + } +} + +/** + * Resolve the relative rerouted URL for a client-side navigation + * @param {URL} url + * @returns {Promise} + */ +async function get_rerouted_url(url) { + const href = url.href; + + if (reroute_cache.has(href)) { + return reroute_cache.get(href); + } + + let rerouted; + + try { + const promise = (async () => { + // reroute could alter the given URL, so we pass a copy + let rerouted = + (await app.hooks.reroute({ + url: new URL(url), + fetch: async (input, init) => { + return resolve_fetch_url(input, init, url).promise; + } + })) ?? url; + + if (typeof rerouted === 'string') { + const tmp = new URL(url); // do not mutate the incoming URL + + if (app.hash) { + tmp.hash = rerouted; + } else { + tmp.pathname = rerouted; + } + + rerouted = tmp; + } + + return rerouted; + })(); + + reroute_cache.set(href, promise); + rerouted = await promise; + } catch (e) { + reroute_cache.delete(href); + if (DEV) { + // in development, print the error... + console.error(e); + + // ...and pause execution, since otherwise we will immediately reload the page + debugger; // eslint-disable-line + } + + // fall back to native navigation + return; + } + + return rerouted; +} + +/** + * Resolve the full info (which route, params, etc.) for a client-side navigation from the URL, + * taking the reroute hook into account. If this isn't a client-side-navigation (or the URL is undefined), + * returns undefined. + * @param {URL | undefined} url + * @param {boolean} invalidating + * @returns {Promise} + */ +async function get_navigation_intent(url, invalidating) { + if (!url) return; + if (is_external_url(url, base, app.hash)) return; + + if (__SVELTEKIT_CLIENT_ROUTING__) { + const rerouted = await get_rerouted_url(url); + if (!rerouted) return; + + const path = get_url_path(rerouted); + + for (const route of routes) { + const params = route.exec(path); + + if (params) { + return { + id: get_page_key(url), + invalidating, + route, + params: decode_params(params), + url + }; + } + } + } else { + /** @type {{ route?: import('types').CSRRouteServer, params: Record}} */ + const { route, params } = await import( + /* @vite-ignore */ + add_resolution_suffix(url.pathname) + ); + + if (!route) return; + + return { + id: get_page_key(url), + invalidating, + route: parse_server_route(route, app.nodes), + params, + url + }; + } +} + +/** @param {URL} url */ +function get_url_path(url) { + return ( + decode_pathname( + app.hash ? url.hash.replace(/^#/, '').replace(/[?#].+/, '') : url.pathname.slice(base.length) + ) || '/' + ); +} + +/** @param {URL} url */ +function get_page_key(url) { + return (app.hash ? url.hash.replace(/^#/, '') : url.pathname) + url.search; +} + +/** + * @param {{ + * url: URL; + * type: import('@sveltejs/kit').Navigation["type"]; + * intent?: import('./types.js').NavigationIntent; + * delta?: number; + * }} opts + */ +function _before_navigate({ url, type, intent, delta }) { + let should_block = false; + + const nav = create_navigation(current, intent, url, type); + + if (delta !== undefined) { + nav.navigation.delta = delta; + } + + const cancellable = { + ...nav.navigation, + cancel: () => { + should_block = true; + nav.reject(new Error('navigation cancelled')); + } + }; + + if (!is_navigating) { + // Don't run the event during redirects + before_navigate_callbacks.forEach((fn) => fn(cancellable)); + } + + return should_block ? null : nav; +} + +/** + * @param {{ + * type: import('@sveltejs/kit').NavigationType; + * url: URL; + * popped?: { + * state: Record; + * scroll: { x: number, y: number }; + * delta: number; + * }; + * keepfocus?: boolean; + * noscroll?: boolean; + * replace_state?: boolean; + * state?: Record; + * redirect_count?: number; + * nav_token?: {}; + * accept?: () => void; + * block?: () => void; + * }} opts + */ +async function navigate({ + type, + url, + popped, + keepfocus, + noscroll, + replace_state, + state = {}, + redirect_count = 0, + nav_token = {}, + accept = noop, + block = noop +}) { + const prev_token = token; + token = nav_token; + + const intent = await get_navigation_intent(url, false); + const nav = + type === 'enter' + ? create_navigation(current, intent, url, type) + : _before_navigate({ url, type, delta: popped?.delta, intent }); + + if (!nav) { + block(); + if (token === nav_token) token = prev_token; + return; + } + + // store this before calling `accept()`, which may change the index + const previous_history_index = current_history_index; + const previous_navigation_index = current_navigation_index; + + accept(); + + is_navigating = true; + + if (started && nav.navigation.type !== 'enter') { + stores.navigating.set((navigating.current = nav.navigation)); + } + + let navigation_result = intent && (await load_route(intent)); + + if (!navigation_result) { + if (is_external_url(url, base, app.hash)) { + if (DEV && app.hash) { + // Special case for hash mode during DEV: If someone accidentally forgets to use a hash for the link, + // they would end up here in an endless loop. Fall back to error page in that case + navigation_result = await server_fallback( + url, + { id: null }, + await handle_error( + new SvelteKitError( + 404, + 'Not Found', + `Not found: ${url.pathname} (did you forget the hash?)` + ), + { + url, + params: {}, + route: { id: null } + } + ), + 404 + ); + } else { + return await native_navigation(url); + } + } else { + navigation_result = await server_fallback( + url, + { id: null }, + await handle_error(new SvelteKitError(404, 'Not Found', `Not found: ${url.pathname}`), { + url, + params: {}, + route: { id: null } + }), + 404 + ); + } + } + + // if this is an internal navigation intent, use the normalized + // URL for the rest of the function + url = intent?.url || url; + + // abort if user navigated during update + if (token !== nav_token) { + nav.reject(new Error('navigation aborted')); + return false; + } + + if (navigation_result.type === 'redirect') { + // whatwg fetch spec https://fetch.spec.whatwg.org/#http-redirect-fetch says to error after 20 redirects + if (redirect_count >= 20) { + navigation_result = await load_root_error_page({ + status: 500, + error: await handle_error(new Error('Redirect loop'), { + url, + params: {}, + route: { id: null } + }), + url, + route: { id: null } + }); + } else { + await _goto(new URL(navigation_result.location, url).href, {}, redirect_count + 1, nav_token); + return false; + } + } else if (/** @type {number} */ (navigation_result.props.page.status) >= 400) { + const updated = await stores.updated.check(); + if (updated) { + // Before reloading, try to update the service worker if it exists + await update_service_worker(); + await native_navigation(url); + } + } + + // reset invalidation only after a finished navigation. If there are redirects or + // additional invalidations, they should get the same invalidation treatment + reset_invalidation(); + + updating = true; + + update_scroll_positions(previous_history_index); + capture_snapshot(previous_navigation_index); + + // ensure the url pathname matches the page's trailing slash option + if (navigation_result.props.page.url.pathname !== url.pathname) { + url.pathname = navigation_result.props.page.url.pathname; + } + + state = popped ? popped.state : state; + + if (!popped) { + // this is a new navigation, rather than a popstate + const change = replace_state ? 0 : 1; + + const entry = { + [HISTORY_INDEX]: (current_history_index += change), + [NAVIGATION_INDEX]: (current_navigation_index += change), + [STATES_KEY]: state + }; + + const fn = replace_state ? history.replaceState : history.pushState; + fn.call(history, entry, '', url); + + if (!replace_state) { + clear_onward_history(current_history_index, current_navigation_index); + } + } + + // reset preload synchronously after the history state has been set to avoid race conditions + load_cache = null; + + navigation_result.props.page.state = state; + + if (started) { + current = navigation_result.state; + + // reset url before updating page store + if (navigation_result.props.page) { + navigation_result.props.page.url = url; + } + + const after_navigate = ( + await Promise.all( + Array.from(on_navigate_callbacks, (fn) => + fn(/** @type {import('@sveltejs/kit').OnNavigate} */ (nav.navigation)) + ) + ) + ).filter(/** @returns {value is () => void} */ (value) => typeof value === 'function'); + + if (after_navigate.length > 0) { + function cleanup() { + after_navigate.forEach((fn) => { + after_navigate_callbacks.delete(fn); + }); + } + + after_navigate.push(cleanup); + + after_navigate.forEach((fn) => { + after_navigate_callbacks.add(fn); + }); + } + + root.$set(navigation_result.props); + update(navigation_result.props.page); + has_navigated = true; + } else { + initialize(navigation_result, target, false); + } + + const { activeElement } = document; + + // need to render the DOM before we can scroll to the rendered elements and do focus management + await tick(); + + // we reset scroll before dealing with focus, to avoid a flash of unscrolled content + const scroll = popped ? popped.scroll : noscroll ? scroll_state() : null; + + if (autoscroll) { + const deep_linked = + url.hash && + document.getElementById( + decodeURIComponent(app.hash ? (url.hash.split('#')[2] ?? '') : url.hash.slice(1)) + ); + if (scroll) { + scrollTo(scroll.x, scroll.y); + } else if (deep_linked) { + // Here we use `scrollIntoView` on the element instead of `scrollTo` + // because it natively supports the `scroll-margin` and `scroll-behavior` + // CSS properties. + deep_linked.scrollIntoView(); + } else { + scrollTo(0, 0); + } + } + + const changed_focus = + // reset focus only if any manual focus management didn't override it + document.activeElement !== activeElement && + // also refocus when activeElement is body already because the + // focus event might not have been fired on it yet + document.activeElement !== document.body; + + if (!keepfocus && !changed_focus) { + reset_focus(); + } + + autoscroll = true; + + if (navigation_result.props.page) { + Object.assign(page, navigation_result.props.page); + } + + is_navigating = false; + + if (type === 'popstate') { + restore_snapshot(current_navigation_index); + } + + nav.fulfil(undefined); + + after_navigate_callbacks.forEach((fn) => + fn(/** @type {import('@sveltejs/kit').AfterNavigate} */ (nav.navigation)) + ); + + stores.navigating.set((navigating.current = null)); + + updating = false; +} + +/** + * Does a full page reload if it wouldn't result in an endless loop in the SPA case + * @param {URL} url + * @param {{ id: string | null }} route + * @param {App.Error} error + * @param {number} status + * @returns {Promise} + */ +async function server_fallback(url, route, error, status) { + if (url.origin === origin && url.pathname === location.pathname && !hydrated) { + // We would reload the same page we're currently on, which isn't hydrated, + // which means no SSR, which means we would end up in an endless loop + return await load_root_error_page({ + status, + error, + url, + route + }); + } + + if (DEV && status !== 404) { + console.error( + 'An error occurred while loading the page. This will cause a full page reload. (This message will only appear during development.)' + ); + + debugger; // eslint-disable-line + } + + return await native_navigation(url); +} + +if (import.meta.hot) { + import.meta.hot.on('vite:beforeUpdate', () => { + if (current.error) location.reload(); + }); +} + +/** @typedef {(typeof PRELOAD_PRIORITIES)['hover'] | (typeof PRELOAD_PRIORITIES)['tap']} PreloadDataPriority */ + +function setup_preload() { + /** @type {NodeJS.Timeout} */ + let mousemove_timeout; + /** @type {Element} */ + let current_a; + /** @type {PreloadDataPriority} */ + let current_priority; + + container.addEventListener('mousemove', (event) => { + const target = /** @type {Element} */ (event.target); + + clearTimeout(mousemove_timeout); + mousemove_timeout = setTimeout(() => { + void preload(target, PRELOAD_PRIORITIES.hover); + }, 20); + }); + + /** @param {Event} event */ + function tap(event) { + if (event.defaultPrevented) return; + void preload(/** @type {Element} */ (event.composedPath()[0]), PRELOAD_PRIORITIES.tap); + } + + container.addEventListener('mousedown', tap); + container.addEventListener('touchstart', tap, { passive: true }); + + const observer = new IntersectionObserver( + (entries) => { + for (const entry of entries) { + if (entry.isIntersecting) { + void _preload_code(new URL(/** @type {HTMLAnchorElement} */ (entry.target).href)); + observer.unobserve(entry.target); + } + } + }, + { threshold: 0 } + ); + + /** + * @param {Element} element + * @param {PreloadDataPriority} priority + */ + async function preload(element, priority) { + const a = find_anchor(element, container); + + // we don't want to preload data again if the user has already hovered/tapped + const interacted = a === current_a && priority >= current_priority; + if (!a || interacted) return; + + const { url, external, download } = get_link_info(a, base, app.hash); + if (external || download) return; + + const options = get_router_options(a); + + // we don't want to preload data for a page we're already on + const same_url = url && get_page_key(current.url) === get_page_key(url); + if (options.reload || same_url) return; + + if (priority <= options.preload_data) { + current_a = a; + // we don't want to preload data again on tap if we've already preloaded it on hover + current_priority = PRELOAD_PRIORITIES.tap; + + const intent = await get_navigation_intent(url, false); + if (!intent) return; + + if (DEV) { + void _preload_data(intent).then((result) => { + if (result.type === 'loaded' && result.state.error) { + console.warn( + `Preloading data for ${intent.url.pathname} failed with the following error: ${result.state.error.message}\n` + + 'If this error is transient, you can ignore it. Otherwise, consider disabling preloading for this route. ' + + 'This route was preloaded due to a data-sveltekit-preload-data attribute. ' + + 'See https://svelte.dev/docs/kit/link-options for more info' + ); + } + }); + } else { + void _preload_data(intent); + } + } else if (priority <= options.preload_code) { + current_a = a; + current_priority = priority; + void _preload_code(/** @type {URL} */ (url)); + } + } + + function after_navigate() { + observer.disconnect(); + + for (const a of container.querySelectorAll('a')) { + const { url, external, download } = get_link_info(a, base, app.hash); + if (external || download) continue; + + const options = get_router_options(a); + if (options.reload) continue; + + if (options.preload_code === PRELOAD_PRIORITIES.viewport) { + observer.observe(a); + } + + if (options.preload_code === PRELOAD_PRIORITIES.eager) { + void _preload_code(/** @type {URL} */ (url)); + } + } + } + + after_navigate_callbacks.add(after_navigate); + after_navigate(); +} + +/** + * @param {unknown} error + * @param {import('@sveltejs/kit').NavigationEvent} event + * @returns {import('types').MaybePromise} + */ +function handle_error(error, event) { + if (error instanceof HttpError) { + return error.body; + } + + if (DEV) { + errored = true; + console.warn('The next HMR update will cause the page to reload'); + } + + const status = get_status(error); + const message = get_message(error); + + return ( + app.hooks.handleError({ error, event, status, message }) ?? /** @type {any} */ ({ message }) + ); +} + +/** + * @template {Function} T + * @param {Set} callbacks + * @param {T} callback + */ +function add_navigation_callback(callbacks, callback) { + onMount(() => { + callbacks.add(callback); + + return () => { + callbacks.delete(callback); + }; + }); +} + +/** + * A lifecycle function that runs the supplied `callback` when the current component mounts, and also whenever we navigate to a URL. + * + * `afterNavigate` must be called during a component initialization. It remains active as long as the component is mounted. + * @param {(navigation: import('@sveltejs/kit').AfterNavigate) => void} callback + * @returns {void} + */ +export function afterNavigate(callback) { + add_navigation_callback(after_navigate_callbacks, callback); +} + +/** + * A navigation interceptor that triggers before we navigate to a URL, whether by clicking a link, calling `goto(...)`, or using the browser back/forward controls. + * + * Calling `cancel()` will prevent the navigation from completing. If `navigation.type === 'leave'` — meaning the user is navigating away from the app (or closing the tab) — calling `cancel` will trigger the native browser unload confirmation dialog. In this case, the navigation may or may not be cancelled depending on the user's response. + * + * When a navigation isn't to a SvelteKit-owned route (and therefore controlled by SvelteKit's client-side router), `navigation.to.route.id` will be `null`. + * + * If the navigation will (if not cancelled) cause the document to unload — in other words `'leave'` navigations and `'link'` navigations where `navigation.to.route === null` — `navigation.willUnload` is `true`. + * + * `beforeNavigate` must be called during a component initialization. It remains active as long as the component is mounted. + * @param {(navigation: import('@sveltejs/kit').BeforeNavigate) => void} callback + * @returns {void} + */ +export function beforeNavigate(callback) { + add_navigation_callback(before_navigate_callbacks, callback); +} + +/** + * A lifecycle function that runs the supplied `callback` immediately before we navigate to a new URL except during full-page navigations. + * + * If you return a `Promise`, SvelteKit will wait for it to resolve before completing the navigation. This allows you to — for example — use `document.startViewTransition`. Avoid promises that are slow to resolve, since navigation will appear stalled to the user. + * + * If a function (or a `Promise` that resolves to a function) is returned from the callback, it will be called once the DOM has updated. + * + * `onNavigate` must be called during a component initialization. It remains active as long as the component is mounted. + * @param {(navigation: import('@sveltejs/kit').OnNavigate) => import('types').MaybePromise<(() => void) | void>} callback + * @returns {void} + */ +export function onNavigate(callback) { + add_navigation_callback(on_navigate_callbacks, callback); +} + +/** + * If called when the page is being updated following a navigation (in `onMount` or `afterNavigate` or an action, for example), this disables SvelteKit's built-in scroll handling. + * This is generally discouraged, since it breaks user expectations. + * @returns {void} + */ +export function disableScrollHandling() { + if (!BROWSER) { + throw new Error('Cannot call disableScrollHandling() on the server'); + } + + if (DEV && started && !updating) { + throw new Error('Can only disable scroll handling during navigation'); + } + + if (updating || !started) { + autoscroll = false; + } +} + +/** + * Allows you to navigate programmatically to a given route, with options such as keeping the current element focused. + * Returns a Promise that resolves when SvelteKit navigates (or fails to navigate, in which case the promise rejects) to the specified `url`. + * + * For external URLs, use `window.location = url` instead of calling `goto(url)`. + * + * @param {string | URL} url Where to navigate to. Note that if you've set [`config.kit.paths.base`](https://svelte.dev/docs/kit/configuration#paths) and the URL is root-relative, you need to prepend the base path if you want to navigate within the app. + * @param {Object} [opts] Options related to the navigation + * @param {boolean} [opts.replaceState] If `true`, will replace the current `history` entry rather than creating a new one with `pushState` + * @param {boolean} [opts.noScroll] If `true`, the browser will maintain its scroll position rather than scrolling to the top of the page after navigation + * @param {boolean} [opts.keepFocus] If `true`, the currently focused element will retain focus after navigation. Otherwise, focus will be reset to the body + * @param {boolean} [opts.invalidateAll] If `true`, all `load` functions of the page will be rerun. See https://svelte.dev/docs/kit/load#rerunning-load-functions for more info on invalidation. + * @param {Array boolean)>} [opts.invalidate] Causes any load functions to re-run if they depend on one of the urls + * @param {App.PageState} [opts.state] An optional object that will be available as `page.state` + * @returns {Promise} + */ +export function goto(url, opts = {}) { + if (!BROWSER) { + throw new Error('Cannot call goto(...) on the server'); + } + + url = new URL(resolve_url(url)); + + if (url.origin !== origin) { + return Promise.reject( + new Error( + DEV + ? `Cannot use \`goto\` with an external URL. Use \`window.location = "${url}"\` instead` + : 'goto: invalid URL' + ) + ); + } + + return _goto(url, opts, 0); +} + +/** + * Causes any `load` functions belonging to the currently active page to re-run if they depend on the `url` in question, via `fetch` or `depends`. Returns a `Promise` that resolves when the page is subsequently updated. + * + * If the argument is given as a `string` or `URL`, it must resolve to the same URL that was passed to `fetch` or `depends` (including query parameters). + * To create a custom identifier, use a string beginning with `[a-z]+:` (e.g. `custom:state`) — this is a valid URL. + * + * The `function` argument can be used define a custom predicate. It receives the full `URL` and causes `load` to rerun if `true` is returned. + * This can be useful if you want to invalidate based on a pattern instead of a exact match. + * + * ```ts + * // Example: Match '/path' regardless of the query parameters + * import { invalidate } from '$app/navigation'; + * + * invalidate((url) => url.pathname === '/path'); + * ``` + * @param {string | URL | ((url: URL) => boolean)} resource The invalidated URL + * @returns {Promise} + */ +export function invalidate(resource) { + if (!BROWSER) { + throw new Error('Cannot call invalidate(...) on the server'); + } + + push_invalidated(resource); + + return _invalidate(); +} + +/** + * @param {string | URL | ((url: URL) => boolean)} resource The invalidated URL + */ +function push_invalidated(resource) { + if (typeof resource === 'function') { + invalidated.push(resource); + } else { + const { href } = new URL(resource, location.href); + invalidated.push((url) => url.href === href); + } +} + +/** + * Causes all `load` functions belonging to the currently active page to re-run. Returns a `Promise` that resolves when the page is subsequently updated. + * @returns {Promise} + */ +export function invalidateAll() { + if (!BROWSER) { + throw new Error('Cannot call invalidateAll() on the server'); + } + + force_invalidation = true; + return _invalidate(); +} + +/** + * Programmatically preloads the given page, which means + * 1. ensuring that the code for the page is loaded, and + * 2. calling the page's load function with the appropriate options. + * + * This is the same behaviour that SvelteKit triggers when the user taps or mouses over an `` element with `data-sveltekit-preload-data`. + * If the next navigation is to `href`, the values returned from load will be used, making navigation instantaneous. + * Returns a Promise that resolves with the result of running the new route's `load` functions once the preload is complete. + * + * @param {string} href Page to preload + * @returns {Promise<{ type: 'loaded'; status: number; data: Record } | { type: 'redirect'; location: string }>} + */ +export async function preloadData(href) { + if (!BROWSER) { + throw new Error('Cannot call preloadData(...) on the server'); + } + + const url = resolve_url(href); + const intent = await get_navigation_intent(url, false); + + if (!intent) { + throw new Error(`Attempted to preload a URL that does not belong to this app: ${url}`); + } + + const result = await _preload_data(intent); + if (result.type === 'redirect') { + return { + type: result.type, + location: result.location + }; + } + + const { status, data } = result.props.page ?? page; + return { type: result.type, status, data }; +} + +/** + * Programmatically imports the code for routes that haven't yet been fetched. + * Typically, you might call this to speed up subsequent navigation. + * + * You can specify routes by any matching pathname such as `/about` (to match `src/routes/about/+page.svelte`) or `/blog/*` (to match `src/routes/blog/[slug]/+page.svelte`). + * + * Unlike `preloadData`, this won't call `load` functions. + * Returns a Promise that resolves when the modules have been imported. + * + * @param {string} pathname + * @returns {Promise} + */ +export async function preloadCode(pathname) { + if (!BROWSER) { + throw new Error('Cannot call preloadCode(...) on the server'); + } + + const url = new URL(pathname, current.url); + + if (DEV) { + if (!pathname.startsWith('/')) { + throw new Error( + 'argument passed to preloadCode must be a pathname (i.e. "/about" rather than "http://example.com/about"' + ); + } + + if (!pathname.startsWith(base)) { + throw new Error( + `pathname passed to preloadCode must start with \`paths.base\` (i.e. "${base}${pathname}" rather than "${pathname}")` + ); + } + + if (__SVELTEKIT_CLIENT_ROUTING__) { + const rerouted = await get_rerouted_url(url); + if (!rerouted || !routes.find((route) => route.exec(get_url_path(rerouted)))) { + throw new Error(`'${pathname}' did not match any routes`); + } + } + } + + return _preload_code(url); +} + +/** + * Programmatically create a new history entry with the given `page.state`. To use the current URL, you can pass `''` as the first argument. Used for [shallow routing](https://svelte.dev/docs/kit/shallow-routing). + * + * @param {string | URL} url + * @param {App.PageState} state + * @returns {void} + */ +export function pushState(url, state) { + if (!BROWSER) { + throw new Error('Cannot call pushState(...) on the server'); + } + + if (DEV) { + if (!started) { + throw new Error('Cannot call pushState(...) before router is initialized'); + } + + try { + // use `devalue.stringify` as a convenient way to ensure we exclude values that can't be properly rehydrated, such as custom class instances + devalue.stringify(state); + } catch (error) { + // @ts-expect-error + throw new Error(`Could not serialize state${error.path}`); + } + } + + update_scroll_positions(current_history_index); + + const opts = { + [HISTORY_INDEX]: (current_history_index += 1), + [NAVIGATION_INDEX]: current_navigation_index, + [PAGE_URL_KEY]: page.url.href, + [STATES_KEY]: state + }; + + history.pushState(opts, '', resolve_url(url)); + has_navigated = true; + + page.state = state; + root.$set({ + // we need to assign a new page object so that subscribers are correctly notified + page: clone_page(page) + }); + + clear_onward_history(current_history_index, current_navigation_index); +} + +/** + * Programmatically replace the current history entry with the given `page.state`. To use the current URL, you can pass `''` as the first argument. Used for [shallow routing](https://svelte.dev/docs/kit/shallow-routing). + * + * @param {string | URL} url + * @param {App.PageState} state + * @returns {void} + */ +export function replaceState(url, state) { + if (!BROWSER) { + throw new Error('Cannot call replaceState(...) on the server'); + } + + if (DEV) { + if (!started) { + throw new Error('Cannot call replaceState(...) before router is initialized'); + } + + try { + // use `devalue.stringify` as a convenient way to ensure we exclude values that can't be properly rehydrated, such as custom class instances + devalue.stringify(state); + } catch (error) { + // @ts-expect-error + throw new Error(`Could not serialize state${error.path}`); + } + } + + const opts = { + [HISTORY_INDEX]: current_history_index, + [NAVIGATION_INDEX]: current_navigation_index, + [PAGE_URL_KEY]: page.url.href, + [STATES_KEY]: state + }; + + history.replaceState(opts, '', resolve_url(url)); + + page.state = state; + root.$set({ + page: clone_page(page) + }); +} + +/** + * This action updates the `form` property of the current page with the given data and updates `page.status`. + * In case of an error, it redirects to the nearest error page. + * @template {Record | undefined} Success + * @template {Record | undefined} Failure + * @param {import('@sveltejs/kit').ActionResult} result + * @returns {Promise} + */ +export async function applyAction(result) { + if (!BROWSER) { + throw new Error('Cannot call applyAction(...) on the server'); + } + + if (result.type === 'error') { + const url = new URL(location.href); + + const { branch, route } = current; + if (!route) return; + + const error_load = await load_nearest_error_page(current.branch.length, branch, route.errors); + if (error_load) { + const navigation_result = get_navigation_result_from_branch({ + url, + params: current.params, + branch: branch.slice(0, error_load.idx).concat(error_load.node), + status: result.status ?? 500, + error: result.error, + route + }); + + current = navigation_result.state; + + root.$set(navigation_result.props); + update(navigation_result.props.page); + + void tick().then(reset_focus); + } + } else if (result.type === 'redirect') { + await _goto(result.location, { invalidateAll: true }, 0); + } else { + page.form = result.data; + page.status = result.status; + + /** @type {Record} */ + root.$set({ + // this brings Svelte's view of the world in line with SvelteKit's + // after use:enhance reset the form.... + form: null, + page: clone_page(page) + }); + + // ...so that setting the `form` prop takes effect and isn't ignored + await tick(); + root.$set({ form: result.data }); + + if (result.type === 'success') { + reset_focus(); + } + } +} + +function _start_router() { + history.scrollRestoration = 'manual'; + + // Adopted from Nuxt.js + // Reset scrollRestoration to auto when leaving page, allowing page reload + // and back-navigation from other pages to use the browser to restore the + // scrolling position. + addEventListener('beforeunload', (e) => { + let should_block = false; + + persist_state(); + + if (!is_navigating) { + const nav = create_navigation(current, undefined, null, 'leave'); + + // If we're navigating, beforeNavigate was already called. If we end up in here during navigation, + // it's due to an external or full-page-reload link, for which we don't want to call the hook again. + /** @type {import('@sveltejs/kit').BeforeNavigate} */ + const navigation = { + ...nav.navigation, + cancel: () => { + should_block = true; + nav.reject(new Error('navigation cancelled')); + } + }; + + before_navigate_callbacks.forEach((fn) => fn(navigation)); + } + + if (should_block) { + e.preventDefault(); + e.returnValue = ''; + } else { + history.scrollRestoration = 'auto'; + } + }); + + addEventListener('visibilitychange', () => { + if (document.visibilityState === 'hidden') { + persist_state(); + } + }); + + // @ts-expect-error this isn't supported everywhere yet + if (!navigator.connection?.saveData) { + setup_preload(); + } + + /** @param {MouseEvent} event */ + container.addEventListener('click', async (event) => { + // Adapted from https://github.com/visionmedia/page.js + // MIT license https://github.com/visionmedia/page.js#license + if (event.button || event.which !== 1) return; + if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return; + if (event.defaultPrevented) return; + + const a = find_anchor(/** @type {Element} */ (event.composedPath()[0]), container); + if (!a) return; + + const { url, external, target, download } = get_link_info(a, base, app.hash); + if (!url) return; + + // bail out before `beforeNavigate` if link opens in a different tab + if (target === '_parent' || target === '_top') { + if (window.parent !== window) return; + } else if (target && target !== '_self') { + return; + } + + const options = get_router_options(a); + const is_svg_a_element = a instanceof SVGAElement; + + // Ignore URL protocols that differ to the current one and are not http(s) (e.g. `mailto:`, `tel:`, `myapp:`, etc.) + // This may be wrong when the protocol is x: and the link goes to y:.. which should be treated as an external + // navigation, but it's not clear how to handle that case and it's not likely to come up in practice. + // MEMO: Without this condition, firefox will open mailer twice. + // See: + // - https://github.com/sveltejs/kit/issues/4045 + // - https://github.com/sveltejs/kit/issues/5725 + // - https://github.com/sveltejs/kit/issues/6496 + if ( + !is_svg_a_element && + url.protocol !== location.protocol && + !(url.protocol === 'https:' || url.protocol === 'http:') + ) + return; + + if (download) return; + + const [nonhash, hash] = (app.hash ? url.hash.replace(/^#/, '') : url.href).split('#'); + const same_pathname = nonhash === strip_hash(location); + + // Ignore the following but fire beforeNavigate + if (external || (options.reload && (!same_pathname || !hash))) { + if (_before_navigate({ url, type: 'link' })) { + // set `navigating` to `true` to prevent `beforeNavigate` callbacks + // being called when the page unloads + is_navigating = true; + } else { + event.preventDefault(); + } + + return; + } + + // Check if new url only differs by hash and use the browser default behavior in that case + // This will ensure the `hashchange` event is fired + // Removing the hash does a full page navigation in the browser, so make sure a hash is present + if (hash !== undefined && same_pathname) { + // If we are trying to navigate to the same hash, we should only + // attempt to scroll to that element and avoid any history changes. + // Otherwise, this can cause Firefox to incorrectly assign a null + // history state value without any signal that we can detect. + const [, current_hash] = current.url.href.split('#'); + if (current_hash === hash) { + event.preventDefault(); + + // We're already on /# and click on a link that goes to /#, or we're on + // /#top and click on a link that goes to /#top. In those cases just go to + // the top of the page, and avoid a history change. + if (hash === '' || (hash === 'top' && a.ownerDocument.getElementById('top') === null)) { + window.scrollTo({ top: 0 }); + } else { + const element = a.ownerDocument.getElementById(decodeURIComponent(hash)); + if (element) { + element.scrollIntoView(); + element.focus(); + } + } + + return; + } + // set this flag to distinguish between navigations triggered by + // clicking a hash link and those triggered by popstate + hash_navigating = true; + + update_scroll_positions(current_history_index); + + update_url(url); + + if (!options.replace_state) return; + + // hashchange event shouldn't occur if the router is replacing state. + hash_navigating = false; + } + + event.preventDefault(); + + // allow the browser to repaint before navigating — + // this prevents INP scores being penalised + await new Promise((fulfil) => { + requestAnimationFrame(() => { + setTimeout(fulfil, 0); + }); + + setTimeout(fulfil, 100); // fallback for edge case where rAF doesn't fire because e.g. tab was backgrounded + }); + + await navigate({ + type: 'link', + url, + keepfocus: options.keepfocus, + noscroll: options.noscroll, + replace_state: options.replace_state ?? url.href === location.href + }); + }); + + container.addEventListener('submit', (event) => { + if (event.defaultPrevented) return; + + const form = /** @type {HTMLFormElement} */ ( + HTMLFormElement.prototype.cloneNode.call(event.target) + ); + + const submitter = /** @type {HTMLButtonElement | HTMLInputElement | null} */ (event.submitter); + + const target = submitter?.formTarget || form.target; + + if (target === '_blank') return; + + const method = submitter?.formMethod || form.method; + + if (method !== 'get') return; + + // It is impossible to use form actions with hash router, so we just ignore handling them here + const url = new URL( + (submitter?.hasAttribute('formaction') && submitter?.formAction) || form.action + ); + + if (is_external_url(url, base, false)) return; + + const event_form = /** @type {HTMLFormElement} */ (event.target); + + const options = get_router_options(event_form); + if (options.reload) return; + + event.preventDefault(); + event.stopPropagation(); + + const data = new FormData(event_form); + + const submitter_name = submitter?.getAttribute('name'); + if (submitter_name) { + data.append(submitter_name, submitter?.getAttribute('value') ?? ''); + } + + // @ts-expect-error `URLSearchParams(fd)` is kosher, but typescript doesn't know that + url.search = new URLSearchParams(data).toString(); + + void navigate({ + type: 'form', + url, + keepfocus: options.keepfocus, + noscroll: options.noscroll, + replace_state: options.replace_state ?? url.href === location.href + }); + }); + + addEventListener('popstate', async (event) => { + if (event.state?.[HISTORY_INDEX]) { + const history_index = event.state[HISTORY_INDEX]; + token = {}; + + // if a popstate-driven navigation is cancelled, we need to counteract it + // with history.go, which means we end up back here, hence this check + if (history_index === current_history_index) return; + + const scroll = scroll_positions[history_index]; + const state = event.state[STATES_KEY] ?? {}; + const url = new URL(event.state[PAGE_URL_KEY] ?? location.href); + const navigation_index = event.state[NAVIGATION_INDEX]; + const is_hash_change = current.url ? strip_hash(location) === strip_hash(current.url) : false; + const shallow = + navigation_index === current_navigation_index && (has_navigated || is_hash_change); + + if (shallow) { + // We don't need to navigate, we just need to update scroll and/or state. + // This happens with hash links and `pushState`/`replaceState`. The + // exception is if we haven't navigated yet, since we could have + // got here after a modal navigation then a reload + if (state !== page.state) { + page.state = state; + } + + update_url(url); + + scroll_positions[current_history_index] = scroll_state(); + if (scroll) scrollTo(scroll.x, scroll.y); + + current_history_index = history_index; + return; + } + + const delta = history_index - current_history_index; + + await navigate({ + type: 'popstate', + url, + popped: { + state, + scroll, + delta + }, + accept: () => { + current_history_index = history_index; + current_navigation_index = navigation_index; + }, + block: () => { + history.go(-delta); + }, + nav_token: token + }); + } else { + // since popstate event is also emitted when an anchor referencing the same + // document is clicked, we have to check that the router isn't already handling + // the navigation. otherwise we would be updating the page store twice. + if (!hash_navigating) { + const url = new URL(location.href); + update_url(url); + + // if the user edits the hash via the browser URL bar, trigger a full-page + // reload to align with pathname router behavior + if (app.hash) { + location.reload(); + } + } + } + }); + + addEventListener('hashchange', () => { + // if the hashchange happened as a result of clicking on a link, + // we need to update history, otherwise we have to leave it alone + if (hash_navigating) { + hash_navigating = false; + history.replaceState( + { + ...history.state, + [HISTORY_INDEX]: ++current_history_index, + [NAVIGATION_INDEX]: current_navigation_index + }, + '', + location.href + ); + } + }); + + // fix link[rel=icon], because browsers will occasionally try to load relative + // URLs after a pushState/replaceState, resulting in a 404 — see + // https://github.com/sveltejs/kit/issues/3748#issuecomment-1125980897 + for (const link of document.querySelectorAll('link')) { + if (ICON_REL_ATTRIBUTES.has(link.rel)) { + link.href = link.href; // eslint-disable-line + } + } + + addEventListener('pageshow', (event) => { + // If the user navigates to another site and then uses the back button and + // bfcache hits, we need to set navigating to null, the site doesn't know + // the navigation away from it was successful. + // Info about bfcache here: https://web.dev/bfcache + if (event.persisted) { + stores.navigating.set((navigating.current = null)); + } + }); + + /** + * @param {URL} url + */ + function update_url(url) { + current.url = page.url = url; + stores.page.set(clone_page(page)); + stores.page.notify(); + } +} + +/** + * @param {HTMLElement} target + * @param {import('./types.js').HydrateOptions} opts + */ +async function _hydrate( + target, + { status = 200, error, node_ids, params, route, server_route, data: server_data_nodes, form } +) { + hydrated = true; + + const url = new URL(location.href); + + /** @type {import('types').CSRRoute | undefined} */ + let parsed_route; + + if (__SVELTEKIT_CLIENT_ROUTING__) { + if (!__SVELTEKIT_EMBEDDED__) { + // See https://github.com/sveltejs/kit/pull/4935#issuecomment-1328093358 for one motivation + // of determining the params on the client side. + ({ params = {}, route = { id: null } } = (await get_navigation_intent(url, false)) || {}); + } + + parsed_route = routes.find(({ id }) => id === route.id); + } else { + // undefined in case of 404 + if (server_route) { + parsed_route = route = parse_server_route(server_route, app.nodes); + } else { + route = { id: null }; + params = {}; + } + } + + /** @type {import('./types.js').NavigationFinished | undefined} */ + let result; + let hydrate = true; + + try { + const branch_promises = node_ids.map(async (n, i) => { + const server_data_node = server_data_nodes[i]; + // Type isn't completely accurate, we still need to deserialize uses + if (server_data_node?.uses) { + server_data_node.uses = deserialize_uses(server_data_node.uses); + } + + return load_node({ + loader: app.nodes[n], + url, + params, + route, + parent: async () => { + const data = {}; + for (let j = 0; j < i; j += 1) { + Object.assign(data, (await branch_promises[j]).data); + } + return data; + }, + server_data_node: create_data_node(server_data_node) + }); + }); + + /** @type {Array} */ + const branch = await Promise.all(branch_promises); + + // server-side will have compacted the branch, reinstate empty slots + // so that error boundaries can be lined up correctly + if (parsed_route) { + const layouts = parsed_route.layouts; + for (let i = 0; i < layouts.length; i++) { + if (!layouts[i]) { + branch.splice(i, 0, undefined); + } + } + } + + result = get_navigation_result_from_branch({ + url, + params, + branch, + status, + error, + form, + route: parsed_route ?? null + }); + } catch (error) { + if (error instanceof Redirect) { + // this is a real edge case — `load` would need to return + // a redirect but only in the browser + await native_navigation(new URL(error.location, location.href)); + return; + } + + result = await load_root_error_page({ + status: get_status(error), + error: await handle_error(error, { url, params, route }), + url, + route + }); + + target.textContent = ''; + hydrate = false; + } + + if (result.props.page) { + result.props.page.state = {}; + } + + initialize(result, target, hydrate); +} + +/** + * @param {URL} url + * @param {boolean[]} invalid + * @returns {Promise} + */ +async function load_data(url, invalid) { + const data_url = new URL(url); + data_url.pathname = add_data_suffix(url.pathname); + if (url.pathname.endsWith('/')) { + data_url.searchParams.append(TRAILING_SLASH_PARAM, '1'); + } + if (DEV && url.searchParams.has(INVALIDATED_PARAM)) { + throw new Error(`Cannot used reserved query parameter "${INVALIDATED_PARAM}"`); + } + data_url.searchParams.append(INVALIDATED_PARAM, invalid.map((i) => (i ? '1' : '0')).join('')); + + // use window.fetch directly to allow using a 3rd party-patched fetch implementation + const fetcher = DEV ? dev_fetch : window.fetch; + const res = await fetcher(data_url.href, {}); + + if (!res.ok) { + // error message is a JSON-stringified string which devalue can't handle at the top level + // turn it into a HttpError to not call handleError on the client again (was already handled on the server) + // if `__data.json` doesn't exist or the server has an internal error, + // avoid parsing the HTML error page as a JSON + /** @type {string | undefined} */ + let message; + if (res.headers.get('content-type')?.includes('application/json')) { + message = await res.json(); + } else if (res.status === 404) { + message = 'Not Found'; + } else if (res.status === 500) { + message = 'Internal Error'; + } + throw new HttpError(res.status, message); + } + + // TODO: fix eslint error / figure out if it actually applies to our situation + // eslint-disable-next-line + return new Promise(async (resolve) => { + /** + * Map of deferred promises that will be resolved by a subsequent chunk of data + * @type {Map} + */ + const deferreds = new Map(); + const reader = /** @type {ReadableStream} */ (res.body).getReader(); + const decoder = new TextDecoder(); + + /** + * @param {any} data + */ + function deserialize(data) { + return devalue.unflatten(data, { + ...app.decoders, + Promise: (id) => { + return new Promise((fulfil, reject) => { + deferreds.set(id, { fulfil, reject }); + }); + } + }); + } + + let text = ''; + + while (true) { + // Format follows ndjson (each line is a JSON object) or regular JSON spec + const { done, value } = await reader.read(); + if (done && !text) break; + + text += !value && text ? '\n' : decoder.decode(value, { stream: true }); // no value -> final chunk -> add a new line to trigger the last parse + + while (true) { + const split = text.indexOf('\n'); + if (split === -1) { + break; + } + + const node = JSON.parse(text.slice(0, split)); + text = text.slice(split + 1); + + if (node.type === 'redirect') { + return resolve(node); + } + + if (node.type === 'data') { + // This is the first (and possibly only, if no pending promises) chunk + node.nodes?.forEach((/** @type {any} */ node) => { + if (node?.type === 'data') { + node.uses = deserialize_uses(node.uses); + node.data = deserialize(node.data); + } + }); + + resolve(node); + } else if (node.type === 'chunk') { + // This is a subsequent chunk containing deferred data + const { id, data, error } = node; + const deferred = /** @type {import('types').Deferred} */ (deferreds.get(id)); + deferreds.delete(id); + + if (error) { + deferred.reject(deserialize(error)); + } else { + deferred.fulfil(deserialize(data)); + } + } + } + } + }); + + // TODO edge case handling necessary? stream() read fails? +} + +/** + * @param {any} uses + * @return {import('types').Uses} + */ +function deserialize_uses(uses) { + return { + dependencies: new Set(uses?.dependencies ?? []), + params: new Set(uses?.params ?? []), + parent: !!uses?.parent, + route: !!uses?.route, + url: !!uses?.url, + search_params: new Set(uses?.search_params ?? []) + }; +} + +function reset_focus() { + const autofocus = document.querySelector('[autofocus]'); + if (autofocus) { + // @ts-ignore + autofocus.focus(); + } else { + // Reset page selection and focus + // We try to mimic browsers' behaviour as closely as possible by targeting the + // first scrollable region, but unfortunately it's not a perfect match — e.g. + // shift-tabbing won't immediately cycle up from the end of the page on Chromium + // See https://html.spec.whatwg.org/multipage/interaction.html#get-the-focusable-area + const root = document.body; + const tabindex = root.getAttribute('tabindex'); + + root.tabIndex = -1; + // @ts-expect-error + root.focus({ preventScroll: true, focusVisible: false }); + + // restore `tabindex` as to prevent `root` from stealing input from elements + if (tabindex !== null) { + root.setAttribute('tabindex', tabindex); + } else { + root.removeAttribute('tabindex'); + } + + // capture current selection, so we can compare the state after + // snapshot restoration and afterNavigate callbacks have run + const selection = getSelection(); + + if (selection && selection.type !== 'None') { + /** @type {Range[]} */ + const ranges = []; + + for (let i = 0; i < selection.rangeCount; i += 1) { + ranges.push(selection.getRangeAt(i)); + } + + setTimeout(() => { + if (selection.rangeCount !== ranges.length) return; + + for (let i = 0; i < selection.rangeCount; i += 1) { + const a = ranges[i]; + const b = selection.getRangeAt(i); + + // we need to do a deep comparison rather than just `a !== b` because + // Safari behaves differently to other browsers + if ( + a.commonAncestorContainer !== b.commonAncestorContainer || + a.startContainer !== b.startContainer || + a.endContainer !== b.endContainer || + a.startOffset !== b.startOffset || + a.endOffset !== b.endOffset + ) { + return; + } + } + + // if the selection hasn't changed (as a result of an element being (auto)focused, + // or a programmatic selection, we reset everything as part of the navigation) + // fixes https://github.com/sveltejs/kit/issues/8439 + selection.removeAllRanges(); + }); + } + } +} + +/** + * @template {import('@sveltejs/kit').NavigationType} T + * @param {import('./types.js').NavigationState} current + * @param {import('./types.js').NavigationIntent | undefined} intent + * @param {URL | null} url + * @param {T} type + */ +function create_navigation(current, intent, url, type) { + /** @type {(value: any) => void} */ + let fulfil; + + /** @type {(error: any) => void} */ + let reject; + + const complete = new Promise((f, r) => { + fulfil = f; + reject = r; + }); + + // Handle any errors off-chain so that it doesn't show up as an unhandled rejection + complete.catch(() => {}); + + /** @type {Omit & { type: T }} */ + const navigation = { + from: { + params: current.params, + route: { id: current.route?.id ?? null }, + url: current.url + }, + to: url && { + params: intent?.params ?? null, + route: { id: intent?.route?.id ?? null }, + url + }, + willUnload: !intent, + type, + complete + }; + + return { + navigation, + // @ts-expect-error + fulfil, + // @ts-expect-error + reject + }; +} + +/** + * TODO: remove this in 3.0 when the page store is also removed + * + * We need to assign a new page object so that subscribers are correctly notified. + * However, spreading `{ ...page }` returns an empty object so we manually + * assign to each property instead. + * + * @param {import('@sveltejs/kit').Page} page + */ +function clone_page(page) { + return { + data: page.data, + error: page.error, + form: page.form, + params: page.params, + route: page.route, + state: page.state, + status: page.status, + url: page.url + }; +} + +/** + * @param {URL} url + * @returns {URL} + */ +function decode_hash(url) { + const new_url = new URL(url); + // Safari, for some reason, does change # to %23, when entered through the address bar + new_url.hash = decodeURIComponent(url.hash); + return new_url; +} + +if (DEV) { + // Nasty hack to silence harmless warnings the user can do nothing about + const console_warn = console.warn; + console.warn = function warn(...args) { + if ( + args.length === 1 && + /<(Layout|Page|Error)(_[\w$]+)?> was created (with unknown|without expected) prop '(data|form)'/.test( + args[0] + ) + ) { + return; + } + console_warn(...args); + }; + + if (import.meta.hot) { + import.meta.hot.on('vite:beforeUpdate', () => { + if (errored) { + location.reload(); + } + }); + } +} diff --git a/node_modules/@sveltejs/kit/src/runtime/client/constants.js b/node_modules/@sveltejs/kit/src/runtime/client/constants.js new file mode 100644 index 0000000..982c25d --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/client/constants.js @@ -0,0 +1,16 @@ +export const SNAPSHOT_KEY = 'sveltekit:snapshot'; +export const SCROLL_KEY = 'sveltekit:scroll'; +export const STATES_KEY = 'sveltekit:states'; +export const PAGE_URL_KEY = 'sveltekit:pageurl'; + +export const HISTORY_INDEX = 'sveltekit:history'; +export const NAVIGATION_INDEX = 'sveltekit:navigation'; + +export const PRELOAD_PRIORITIES = /** @type {const} */ ({ + tap: 1, + hover: 2, + viewport: 3, + eager: 4, + off: -1, + false: -1 +}); diff --git a/node_modules/@sveltejs/kit/src/runtime/client/entry.js b/node_modules/@sveltejs/kit/src/runtime/client/entry.js new file mode 100644 index 0000000..74b0fb2 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/client/entry.js @@ -0,0 +1,3 @@ +// we expose this as a separate entry point (rather than treating client.js as the entry point) +// so that everything other than `start`/`load_css` can be treeshaken +export { start, load_css } from './client.js'; diff --git a/node_modules/@sveltejs/kit/src/runtime/client/fetcher.js b/node_modules/@sveltejs/kit/src/runtime/client/fetcher.js new file mode 100644 index 0000000..6a84221 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/client/fetcher.js @@ -0,0 +1,177 @@ +import { BROWSER, DEV } from 'esm-env'; +import { hash } from '../hash.js'; +import { b64_decode } from '../utils.js'; + +let loading = 0; + +/** @type {typeof fetch} */ +const native_fetch = BROWSER ? window.fetch : /** @type {any} */ (() => {}); + +export function lock_fetch() { + loading += 1; +} + +export function unlock_fetch() { + loading -= 1; +} + +if (DEV && BROWSER) { + let can_inspect_stack_trace = false; + + // detect whether async stack traces work + // eslint-disable-next-line @typescript-eslint/require-await + const check_stack_trace = async () => { + const stack = /** @type {string} */ (new Error().stack); + can_inspect_stack_trace = stack.includes('check_stack_trace'); + }; + + void check_stack_trace(); + + /** + * @param {RequestInfo | URL} input + * @param {RequestInit & Record | undefined} init + */ + window.fetch = (input, init) => { + // Check if fetch was called via load_node. the lock method only checks if it was called at the + // same time, but not necessarily if it was called from `load`. + // We use just the filename as the method name sometimes does not appear on the CI. + const url = input instanceof Request ? input.url : input.toString(); + const stack_array = /** @type {string} */ (new Error().stack).split('\n'); + // We need to do a cutoff because Safari and Firefox maintain the stack + // across events and for example traces a `fetch` call triggered from a button + // back to the creation of the event listener and the element creation itself, + // where at some point client.js will show up, leading to false positives. + const cutoff = stack_array.findIndex((a) => a.includes('load@') || a.includes('at load')); + const stack = stack_array.slice(0, cutoff + 2).join('\n'); + + const in_load_heuristic = can_inspect_stack_trace + ? stack.includes('src/runtime/client/client.js') + : loading; + + // This flag is set in initial_fetch and subsequent_fetch + const used_kit_fetch = init?.__sveltekit_fetch__; + + if (in_load_heuristic && !used_kit_fetch) { + console.warn( + `Loading ${url} using \`window.fetch\`. For best results, use the \`fetch\` that is passed to your \`load\` function: https://svelte.dev/docs/kit/load#making-fetch-requests` + ); + } + + const method = input instanceof Request ? input.method : init?.method || 'GET'; + + if (method !== 'GET') { + cache.delete(build_selector(input)); + } + + return native_fetch(input, init); + }; +} else if (BROWSER) { + window.fetch = (input, init) => { + const method = input instanceof Request ? input.method : init?.method || 'GET'; + + if (method !== 'GET') { + cache.delete(build_selector(input)); + } + + return native_fetch(input, init); + }; +} + +const cache = new Map(); + +/** + * Should be called on the initial run of load functions that hydrate the page. + * Saves any requests with cache-control max-age to the cache. + * @param {URL | string} resource + * @param {RequestInit} [opts] + */ +export function initial_fetch(resource, opts) { + const selector = build_selector(resource, opts); + + const script = document.querySelector(selector); + if (script?.textContent) { + let { body, ...init } = JSON.parse(script.textContent); + + const ttl = script.getAttribute('data-ttl'); + if (ttl) cache.set(selector, { body, init, ttl: 1000 * Number(ttl) }); + const b64 = script.getAttribute('data-b64'); + if (b64 !== null) { + // Can't use native_fetch('data:...;base64,${body}') + // csp can block the request + body = b64_decode(body); + } + + return Promise.resolve(new Response(body, init)); + } + + return DEV ? dev_fetch(resource, opts) : window.fetch(resource, opts); +} + +/** + * Tries to get the response from the cache, if max-age allows it, else does a fetch. + * @param {URL | string} resource + * @param {string} resolved + * @param {RequestInit} [opts] + */ +export function subsequent_fetch(resource, resolved, opts) { + if (cache.size > 0) { + const selector = build_selector(resource, opts); + const cached = cache.get(selector); + if (cached) { + // https://developer.mozilla.org/en-US/docs/Web/API/Request/cache#value + if ( + performance.now() < cached.ttl && + ['default', 'force-cache', 'only-if-cached', undefined].includes(opts?.cache) + ) { + return new Response(cached.body, cached.init); + } + + cache.delete(selector); + } + } + + return DEV ? dev_fetch(resolved, opts) : window.fetch(resolved, opts); +} + +/** + * @param {RequestInfo | URL} resource + * @param {RequestInit & Record | undefined} opts + */ +export function dev_fetch(resource, opts) { + const patched_opts = { ...opts }; + // This assigns the __sveltekit_fetch__ flag and makes it non-enumerable + Object.defineProperty(patched_opts, '__sveltekit_fetch__', { + value: true, + writable: true, + configurable: true + }); + return window.fetch(resource, patched_opts); +} + +/** + * Build the cache key for a given request + * @param {URL | RequestInfo} resource + * @param {RequestInit} [opts] + */ +function build_selector(resource, opts) { + const url = JSON.stringify(resource instanceof Request ? resource.url : resource); + + let selector = `script[data-sveltekit-fetched][data-url=${url}]`; + + if (opts?.headers || opts?.body) { + /** @type {import('types').StrictBody[]} */ + const values = []; + + if (opts.headers) { + values.push([...new Headers(opts.headers)].join(',')); + } + + if (opts.body && (typeof opts.body === 'string' || ArrayBuffer.isView(opts.body))) { + values.push(opts.body); + } + + selector += `[data-hash="${hash(...values)}"]`; + } + + return selector; +} diff --git a/node_modules/@sveltejs/kit/src/runtime/client/parse.js b/node_modules/@sveltejs/kit/src/runtime/client/parse.js new file mode 100644 index 0000000..20445fc --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/client/parse.js @@ -0,0 +1,77 @@ +import { exec, parse_route_id } from '../../utils/routing.js'; + +/** + * @param {import('./types.js').SvelteKitApp} app + * @returns {import('types').CSRRoute[]} + */ +export function parse({ nodes, server_loads, dictionary, matchers }) { + const layouts_with_server_load = new Set(server_loads); + + return Object.entries(dictionary).map(([id, [leaf, layouts, errors]]) => { + const { pattern, params } = parse_route_id(id); + + /** @type {import('types').CSRRoute} */ + const route = { + id, + /** @param {string} path */ + exec: (path) => { + const match = pattern.exec(path); + if (match) return exec(match, params, matchers); + }, + errors: [1, ...(errors || [])].map((n) => nodes[n]), + layouts: [0, ...(layouts || [])].map(create_layout_loader), + leaf: create_leaf_loader(leaf) + }; + + // bit of a hack, but ensures that layout/error node lists are the same + // length, without which the wrong data will be applied if the route + // manifest looks like `[[a, b], [c,], d]` + route.errors.length = route.layouts.length = Math.max( + route.errors.length, + route.layouts.length + ); + + return route; + }); + + /** + * @param {number} id + * @returns {[boolean, import('types').CSRPageNodeLoader]} + */ + function create_leaf_loader(id) { + // whether or not the route uses the server data is + // encoded using the ones' complement, to save space + const uses_server_data = id < 0; + if (uses_server_data) id = ~id; + return [uses_server_data, nodes[id]]; + } + + /** + * @param {number | undefined} id + * @returns {[boolean, import('types').CSRPageNodeLoader] | undefined} + */ + function create_layout_loader(id) { + // whether or not the layout uses the server data is + // encoded in the layouts array, to save space + return id === undefined ? id : [layouts_with_server_load.has(id), nodes[id]]; + } +} + +/** + * @param {import('types').CSRRouteServer} input + * @param {import('types').CSRPageNodeLoader[]} app_nodes Will be modified if a new node is loaded that's not already in the array + * @returns {import('types').CSRRoute} + */ +export function parse_server_route({ nodes, id, leaf, layouts, errors }, app_nodes) { + return { + id, + exec: () => ({}), // dummy function; exec already happened on the server + // By writing to app_nodes only when a loader at that index is not already defined, + // we ensure that loaders have referential equality when they load the same node. + // Code elsewhere in client.js relies on this referential equality to determine + // if a loader is different and should therefore (re-)run. + errors: errors.map((n) => (n ? (app_nodes[n] ||= nodes[n]) : undefined)), + layouts: layouts.map((n) => (n ? [n[0], (app_nodes[n[1]] ||= nodes[n[1]])] : undefined)), + leaf: [leaf[0], (app_nodes[leaf[1]] ||= nodes[leaf[1]])] + }; +} diff --git a/node_modules/@sveltejs/kit/src/runtime/client/session-storage.js b/node_modules/@sveltejs/kit/src/runtime/client/session-storage.js new file mode 100644 index 0000000..e49543b --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/client/session-storage.js @@ -0,0 +1,27 @@ +/** + * Read a value from `sessionStorage` + * @param {string} key + * @param {(value: string) => any} parse + */ +export function get(key, parse = JSON.parse) { + try { + return parse(sessionStorage[key]); + } catch { + // do nothing + } +} + +/** + * Write a value to `sessionStorage` + * @param {string} key + * @param {any} value + * @param {(value: any) => string} stringify + */ +export function set(key, value, stringify = JSON.stringify) { + const data = stringify(value); + try { + sessionStorage[key] = data; + } catch { + // do nothing + } +} diff --git a/node_modules/@sveltejs/kit/src/runtime/client/state.svelte.js b/node_modules/@sveltejs/kit/src/runtime/client/state.svelte.js new file mode 100644 index 0000000..5e19788 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/client/state.svelte.js @@ -0,0 +1,57 @@ +import { onMount } from 'svelte'; +import { updated_listener } from './utils.js'; + +/** @type {import('@sveltejs/kit').Page} */ +export let page; + +/** @type {{ current: import('@sveltejs/kit').Navigation | null }} */ +export let navigating; + +/** @type {{ current: boolean }} */ +export let updated; + +// this is a bootleg way to tell if we're in old svelte or new svelte +const is_legacy = + onMount.toString().includes('$$') || /function \w+\(\) \{\}/.test(onMount.toString()); + +if (is_legacy) { + page = { + data: {}, + form: null, + error: null, + params: {}, + route: { id: null }, + state: {}, + status: -1, + url: new URL('https://example.com') + }; + navigating = { current: null }; + updated = { current: false }; +} else { + page = new (class Page { + data = $state.raw({}); + form = $state.raw(null); + error = $state.raw(null); + params = $state.raw({}); + route = $state.raw({ id: null }); + state = $state.raw({}); + status = $state.raw(-1); + url = $state.raw(new URL('https://example.com')); + })(); + + navigating = new (class Navigating { + current = $state.raw(null); + })(); + + updated = new (class Updated { + current = $state.raw(false); + })(); + updated_listener.v = () => (updated.current = true); +} + +/** + * @param {import('@sveltejs/kit').Page} new_page + */ +export function update(new_page) { + Object.assign(page, new_page); +} diff --git a/node_modules/@sveltejs/kit/src/runtime/client/types.d.ts b/node_modules/@sveltejs/kit/src/runtime/client/types.d.ts new file mode 100644 index 0000000..4b32f56 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/client/types.d.ts @@ -0,0 +1,128 @@ +import { SvelteComponent } from 'svelte'; +import { + ClientHooks, + CSRPageNode, + CSRPageNodeLoader, + CSRRoute, + CSRRouteServer, + ServerDataNode, + TrailingSlash, + Uses +} from 'types'; +import { Page, ParamMatcher } from '@sveltejs/kit'; + +export interface SvelteKitApp { + /** + * A list of all the error/layout/page nodes used in the app. + * - In case of router.resolution=client, this is filled completely upfront. + * - In case of router.resolution=server, this is filled with the root layout and root error page + * at the beginning and then filled up as the user navigates around the app, loading new nodes + */ + nodes: CSRPageNodeLoader[]; + + /** + * A list of all layout node ids that have a server load function. + * Pages are not present because it's shorter to encode it on the leaf itself. + * + * In case of router.resolution=server, this only contains one entry for the root layout. + */ + server_loads: number[]; + + /** + * A map of `[routeId: string]: [leaf, layouts, errors]` tuples, which + * is parsed into an array of routes on startup. The numbers refer to the indices in `nodes`. + * If the leaf number is negative, it means it does use a server load function and the complement is the node index. + * The route layout and error nodes are not referenced, they are always number 0 and 1 and always apply. + * + * In case of router.resolution=server, this object is empty, as resolution happens on the server. + */ + dictionary: Record; + + /** + * A map of `[matcherName: string]: (..) => boolean`, which is used to match route parameters. + * + * In case of router.resolution=server, this object is empty, as resolution happens on the server. + */ + matchers: Record; + + hooks: ClientHooks; + + decode: (type: string, value: any) => any; + + decoders: Record any>; + + /** + * Whether or not we're using hash-based routing + */ + hash: boolean; + + root: typeof SvelteComponent; +} + +export type NavigationIntent = { + /** `url.pathname + url.search` */ + id: string; + /** Whether we are invalidating or navigating */ + invalidating: boolean; + /** The route parameters */ + params: Record; + /** The route that matches `path` */ + route: CSRRoute; + /** The destination URL */ + url: URL; +}; + +export type NavigationResult = NavigationRedirect | NavigationFinished; + +export type NavigationRedirect = { + type: 'redirect'; + location: string; +}; + +export type NavigationFinished = { + type: 'loaded'; + state: NavigationState; + props: { + constructors: Array; + components?: SvelteComponent[]; + page: Page; + form?: Record | null; + [key: `data_${number}`]: Record; + }; +}; + +export type BranchNode = { + node: CSRPageNode; + loader: CSRPageNodeLoader; + server: DataNode | null; + universal: DataNode | null; + data: Record | null; + slash?: TrailingSlash; +}; + +export interface DataNode { + type: 'data'; + data: Record | null; + uses: Uses; + slash?: TrailingSlash; +} + +export interface NavigationState { + branch: Array; + error: App.Error | null; + params: Record; + route: CSRRoute | null; + url: URL; +} + +export interface HydrateOptions { + status: number; + error: App.Error | null; + node_ids: number[]; + params: Record; + route: { id: string | null }; + /** Only used when `router.resolution=server`; can then still be undefined in case of 404 */ + server_route?: CSRRouteServer; + data: Array; + form: Record | null; +} diff --git a/node_modules/@sveltejs/kit/src/runtime/client/utils.js b/node_modules/@sveltejs/kit/src/runtime/client/utils.js new file mode 100644 index 0000000..6c324d1 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/client/utils.js @@ -0,0 +1,370 @@ +import { BROWSER, DEV } from 'esm-env'; +import { writable } from 'svelte/store'; +import { assets } from '__sveltekit/paths'; +import { version } from '__sveltekit/environment'; +import { PRELOAD_PRIORITIES } from './constants.js'; + +/* global __SVELTEKIT_APP_VERSION_FILE__, __SVELTEKIT_APP_VERSION_POLL_INTERVAL__ */ + +export const origin = BROWSER ? location.origin : ''; + +/** @param {string | URL} url */ +export function resolve_url(url) { + if (url instanceof URL) return url; + + let baseURI = document.baseURI; + + if (!baseURI) { + const baseTags = document.getElementsByTagName('base'); + baseURI = baseTags.length ? baseTags[0].href : document.URL; + } + + return new URL(url, baseURI); +} + +export function scroll_state() { + return { + x: pageXOffset, + y: pageYOffset + }; +} + +const warned = new WeakSet(); + +/** @typedef {keyof typeof valid_link_options} LinkOptionName */ + +const valid_link_options = /** @type {const} */ ({ + 'preload-code': ['', 'off', 'false', 'tap', 'hover', 'viewport', 'eager'], + 'preload-data': ['', 'off', 'false', 'tap', 'hover'], + keepfocus: ['', 'true', 'off', 'false'], + noscroll: ['', 'true', 'off', 'false'], + reload: ['', 'true', 'off', 'false'], + replacestate: ['', 'true', 'off', 'false'] +}); + +/** + * @template {LinkOptionName} T + * @typedef {typeof valid_link_options[T][number]} ValidLinkOptions + */ + +/** + * @template {LinkOptionName} T + * @param {Element} element + * @param {T} name + */ +function link_option(element, name) { + const value = /** @type {ValidLinkOptions | null} */ ( + element.getAttribute(`data-sveltekit-${name}`) + ); + + if (DEV) { + validate_link_option(element, name, value); + } + + return value; +} + +/** + * @template {LinkOptionName} T + * @template {ValidLinkOptions | null} U + * @param {Element} element + * @param {T} name + * @param {U} value + */ +function validate_link_option(element, name, value) { + if (value === null) return; + + // @ts-expect-error - includes is dumb + if (!warned.has(element) && !valid_link_options[name].includes(value)) { + console.error( + `Unexpected value for ${name} — should be one of ${valid_link_options[name] + .map((option) => JSON.stringify(option)) + .join(', ')}`, + element + ); + + warned.add(element); + } +} + +const levels = { + ...PRELOAD_PRIORITIES, + '': PRELOAD_PRIORITIES.hover +}; + +/** + * @param {Element} element + * @returns {Element | null} + */ +function parent_element(element) { + let parent = element.assignedSlot ?? element.parentNode; + + // @ts-expect-error handle shadow roots + if (parent?.nodeType === 11) parent = parent.host; + + return /** @type {Element} */ (parent); +} + +/** + * @param {Element} element + * @param {Element} target + */ +export function find_anchor(element, target) { + while (element && element !== target) { + if (element.nodeName.toUpperCase() === 'A' && element.hasAttribute('href')) { + return /** @type {HTMLAnchorElement | SVGAElement} */ (element); + } + + element = /** @type {Element} */ (parent_element(element)); + } +} + +/** + * @param {HTMLAnchorElement | SVGAElement} a + * @param {string} base + * @param {boolean} uses_hash_router + */ +export function get_link_info(a, base, uses_hash_router) { + /** @type {URL | undefined} */ + let url; + + try { + url = new URL(a instanceof SVGAElement ? a.href.baseVal : a.href, document.baseURI); + + // if the hash doesn't start with `#/` then it's probably linking to an id on the current page + if (uses_hash_router && url.hash.match(/^#[^/]/)) { + const route = location.hash.split('#')[1] || '/'; + url.hash = `#${route}${url.hash}`; + } + } catch {} + + const target = a instanceof SVGAElement ? a.target.baseVal : a.target; + + const external = + !url || + !!target || + is_external_url(url, base, uses_hash_router) || + (a.getAttribute('rel') || '').split(/\s+/).includes('external'); + + const download = url?.origin === origin && a.hasAttribute('download'); + + return { url, external, target, download }; +} + +/** + * @param {HTMLFormElement | HTMLAnchorElement | SVGAElement} element + */ +export function get_router_options(element) { + /** @type {ValidLinkOptions<'keepfocus'> | null} */ + let keepfocus = null; + + /** @type {ValidLinkOptions<'noscroll'> | null} */ + let noscroll = null; + + /** @type {ValidLinkOptions<'preload-code'> | null} */ + let preload_code = null; + + /** @type {ValidLinkOptions<'preload-data'> | null} */ + let preload_data = null; + + /** @type {ValidLinkOptions<'reload'> | null} */ + let reload = null; + + /** @type {ValidLinkOptions<'replacestate'> | null} */ + let replace_state = null; + + /** @type {Element} */ + let el = element; + + while (el && el !== document.documentElement) { + if (preload_code === null) preload_code = link_option(el, 'preload-code'); + if (preload_data === null) preload_data = link_option(el, 'preload-data'); + if (keepfocus === null) keepfocus = link_option(el, 'keepfocus'); + if (noscroll === null) noscroll = link_option(el, 'noscroll'); + if (reload === null) reload = link_option(el, 'reload'); + if (replace_state === null) replace_state = link_option(el, 'replacestate'); + + el = /** @type {Element} */ (parent_element(el)); + } + + /** @param {string | null} value */ + function get_option_state(value) { + switch (value) { + case '': + case 'true': + return true; + case 'off': + case 'false': + return false; + default: + return undefined; + } + } + + return { + preload_code: levels[preload_code ?? 'off'], + preload_data: levels[preload_data ?? 'off'], + keepfocus: get_option_state(keepfocus), + noscroll: get_option_state(noscroll), + reload: get_option_state(reload), + replace_state: get_option_state(replace_state) + }; +} + +/** @param {any} value */ +export function notifiable_store(value) { + const store = writable(value); + let ready = true; + + function notify() { + ready = true; + store.update((val) => val); + } + + /** @param {any} new_value */ + function set(new_value) { + ready = false; + store.set(new_value); + } + + /** @param {(value: any) => void} run */ + function subscribe(run) { + /** @type {any} */ + let old_value; + return store.subscribe((new_value) => { + if (old_value === undefined || (ready && new_value !== old_value)) { + run((old_value = new_value)); + } + }); + } + + return { notify, set, subscribe }; +} + +export const updated_listener = { + v: () => {} +}; + +export function create_updated_store() { + const { set, subscribe } = writable(false); + + if (DEV || !BROWSER) { + return { + subscribe, + // eslint-disable-next-line @typescript-eslint/require-await + check: async () => false + }; + } + + const interval = __SVELTEKIT_APP_VERSION_POLL_INTERVAL__; + + /** @type {NodeJS.Timeout} */ + let timeout; + + /** @type {() => Promise} */ + async function check() { + clearTimeout(timeout); + + if (interval) timeout = setTimeout(check, interval); + + try { + const res = await fetch(`${assets}/${__SVELTEKIT_APP_VERSION_FILE__}`, { + headers: { + pragma: 'no-cache', + 'cache-control': 'no-cache' + } + }); + + if (!res.ok) { + return false; + } + + const data = await res.json(); + const updated = data.version !== version; + + if (updated) { + set(true); + updated_listener.v(); + clearTimeout(timeout); + } + + return updated; + } catch { + return false; + } + } + + if (interval) timeout = setTimeout(check, interval); + + return { + subscribe, + check + }; +} + +/** + * Is external if + * - origin different + * - path doesn't start with base + * - uses hash router and pathname is more than base + * @param {URL} url + * @param {string} base + * @param {boolean} hash_routing + */ +export function is_external_url(url, base, hash_routing) { + if (url.origin !== origin || !url.pathname.startsWith(base)) { + return true; + } + + if (hash_routing) { + if (url.pathname === base + '/' || url.pathname === base + '/index.html') { + return false; + } + + // be lenient if serving from filesystem + if (url.protocol === 'file:' && url.pathname.replace(/\/[^/]+\.html?$/, '') === base) { + return false; + } + + return true; + } + + return false; +} + +/** @type {Record} */ +const seen = {}; + +/** + * Used for server-side resolution, to replicate Vite's CSS loading behaviour in production. + * + * Closely modelled after https://github.com/vitejs/vite/blob/3dd12f4724130fdf8ba44c6d3252ebdff407fd47/packages/vite/src/node/plugins/importAnalysisBuild.ts#L214 + * (which ideally we could just use directly, but it's not exported) + * @param {string[]} deps + */ +export function load_css(deps) { + if (__SVELTEKIT_CLIENT_ROUTING__) return; + + const csp_nonce_meta = /** @type {HTMLMetaElement} */ ( + document.querySelector('meta[property=csp-nonce]') + ); + const csp_nonce = csp_nonce_meta?.nonce || csp_nonce_meta?.getAttribute('nonce'); + + for (const dep of deps) { + if (dep in seen) continue; + seen[dep] = true; + + if (document.querySelector(`link[href="${dep}"][rel="stylesheet"]`)) { + continue; + } + + const link = document.createElement('link'); + link.rel = 'stylesheet'; + link.crossOrigin = ''; + link.href = dep; + if (csp_nonce) { + link.setAttribute('nonce', csp_nonce); + } + document.head.appendChild(link); + } +} diff --git a/node_modules/@sveltejs/kit/src/runtime/components/svelte-4/error.svelte b/node_modules/@sveltejs/kit/src/runtime/components/svelte-4/error.svelte new file mode 100644 index 0000000..b82ddfa --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/components/svelte-4/error.svelte @@ -0,0 +1,6 @@ + + +

{$page.status}

+

{$page.error?.message}

diff --git a/node_modules/@sveltejs/kit/src/runtime/components/svelte-4/layout.svelte b/node_modules/@sveltejs/kit/src/runtime/components/svelte-4/layout.svelte new file mode 100644 index 0000000..4fa864c --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/components/svelte-4/layout.svelte @@ -0,0 +1 @@ + diff --git a/node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte b/node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte new file mode 100644 index 0000000..fa83c7d --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte @@ -0,0 +1,6 @@ + + +

{page.status}

+

{page.error?.message}

diff --git a/node_modules/@sveltejs/kit/src/runtime/components/svelte-5/layout.svelte b/node_modules/@sveltejs/kit/src/runtime/components/svelte-5/layout.svelte new file mode 100644 index 0000000..4b7cb06 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/components/svelte-5/layout.svelte @@ -0,0 +1,5 @@ + + +{@render children()} diff --git a/node_modules/@sveltejs/kit/src/runtime/control.js b/node_modules/@sveltejs/kit/src/runtime/control.js new file mode 100644 index 0000000..aa0b93f --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/control.js @@ -0,0 +1,63 @@ +export class HttpError { + /** + * @param {number} status + * @param {{message: string} extends App.Error ? (App.Error | string | undefined) : App.Error} body + */ + constructor(status, body) { + this.status = status; + if (typeof body === 'string') { + this.body = { message: body }; + } else if (body) { + this.body = body; + } else { + this.body = { message: `Error: ${status}` }; + } + } + + toString() { + return JSON.stringify(this.body); + } +} + +export class Redirect { + /** + * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308} status + * @param {string} location + */ + constructor(status, location) { + this.status = status; + this.location = location; + } +} + +/** + * An error that was thrown from within the SvelteKit runtime that is not fatal and doesn't result in a 500, such as a 404. + * `SvelteKitError` goes through `handleError`. + * @extends Error + */ +export class SvelteKitError extends Error { + /** + * @param {number} status + * @param {string} text + * @param {string} message + */ + constructor(status, text, message) { + super(message); + this.status = status; + this.text = text; + } +} + +/** + * @template {Record | undefined} [T=undefined] + */ +export class ActionFailure { + /** + * @param {number} status + * @param {T} data + */ + constructor(status, data) { + this.status = status; + this.data = data; + } +} diff --git a/node_modules/@sveltejs/kit/src/runtime/env/dynamic/private.js b/node_modules/@sveltejs/kit/src/runtime/env/dynamic/private.js new file mode 100644 index 0000000..1965ee8 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/env/dynamic/private.js @@ -0,0 +1 @@ +export { private_env as env } from '../../shared-server.js'; diff --git a/node_modules/@sveltejs/kit/src/runtime/env/dynamic/public.js b/node_modules/@sveltejs/kit/src/runtime/env/dynamic/public.js new file mode 100644 index 0000000..919d034 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/env/dynamic/public.js @@ -0,0 +1 @@ +export { public_env as env } from '../../shared-server.js'; diff --git a/node_modules/@sveltejs/kit/src/runtime/hash.js b/node_modules/@sveltejs/kit/src/runtime/hash.js new file mode 100644 index 0000000..cfebacb --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/hash.js @@ -0,0 +1,22 @@ +/** + * Hash using djb2 + * @param {import('types').StrictBody[]} values + */ +export function hash(...values) { + let hash = 5381; + + for (const value of values) { + if (typeof value === 'string') { + let i = value.length; + while (i) hash = (hash * 33) ^ value.charCodeAt(--i); + } else if (ArrayBuffer.isView(value)) { + const buffer = new Uint8Array(value.buffer, value.byteOffset, value.byteLength); + let i = buffer.length; + while (i) hash = (hash * 33) ^ buffer[--i]; + } else { + throw new TypeError('value must be a string or TypedArray'); + } + } + + return (hash >>> 0).toString(36); +} diff --git a/node_modules/@sveltejs/kit/src/runtime/pathname.js b/node_modules/@sveltejs/kit/src/runtime/pathname.js new file mode 100644 index 0000000..7c2f80c --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/pathname.js @@ -0,0 +1,49 @@ +const DATA_SUFFIX = '/__data.json'; +const HTML_DATA_SUFFIX = '.html__data.json'; + +/** @param {string} pathname */ +export function has_data_suffix(pathname) { + return pathname.endsWith(DATA_SUFFIX) || pathname.endsWith(HTML_DATA_SUFFIX); +} + +/** @param {string} pathname */ +export function add_data_suffix(pathname) { + if (pathname.endsWith('.html')) return pathname.replace(/\.html$/, HTML_DATA_SUFFIX); + return pathname.replace(/\/$/, '') + DATA_SUFFIX; +} + +/** @param {string} pathname */ +export function strip_data_suffix(pathname) { + if (pathname.endsWith(HTML_DATA_SUFFIX)) { + return pathname.slice(0, -HTML_DATA_SUFFIX.length) + '.html'; + } + + return pathname.slice(0, -DATA_SUFFIX.length); +} + +const ROUTE_SUFFIX = '/__route.js'; + +/** + * @param {string} pathname + * @returns {boolean} + */ +export function has_resolution_suffix(pathname) { + return pathname.endsWith(ROUTE_SUFFIX); +} + +/** + * Convert a regular URL to a route to send to SvelteKit's server-side route resolution endpoint + * @param {string} pathname + * @returns {string} + */ +export function add_resolution_suffix(pathname) { + return pathname.replace(/\/$/, '') + ROUTE_SUFFIX; +} + +/** + * @param {string} pathname + * @returns {string} + */ +export function strip_resolution_suffix(pathname) { + return pathname.slice(0, -ROUTE_SUFFIX.length); +} diff --git a/node_modules/@sveltejs/kit/src/runtime/server/ambient.d.ts b/node_modules/@sveltejs/kit/src/runtime/server/ambient.d.ts new file mode 100644 index 0000000..2f38261 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/server/ambient.d.ts @@ -0,0 +1,4 @@ +declare module '__SERVER__/internal.js' { + export const options: import('types').SSROptions; + export const get_hooks: () => Promise>; +} diff --git a/node_modules/@sveltejs/kit/src/runtime/server/cookie.js b/node_modules/@sveltejs/kit/src/runtime/server/cookie.js new file mode 100644 index 0000000..2e68354 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/server/cookie.js @@ -0,0 +1,296 @@ +import { parse, serialize } from 'cookie'; +import { normalize_path, resolve } from '../../utils/url.js'; +import { add_data_suffix } from '../pathname.js'; + +// eslint-disable-next-line no-control-regex -- control characters are invalid in cookie names +const INVALID_COOKIE_CHARACTER_REGEX = /[\x00-\x1F\x7F()<>@,;:"/[\]?={} \t]/; + +/** + * Tracks all cookies set during dev mode so we can emit warnings + * when we detect that there's likely cookie misusage due to wrong paths + * + * @type {Record>} */ +const cookie_paths = {}; + +/** + * Cookies that are larger than this size (including the name and other + * attributes) are discarded by browsers + */ +const MAX_COOKIE_SIZE = 4129; + +// TODO 3.0 remove this check +/** @param {import('./page/types.js').Cookie['options']} options */ +function validate_options(options) { + if (options?.path === undefined) { + throw new Error('You must specify a `path` when setting, deleting or serializing cookies'); + } +} + +/** + * @param {Request} request + * @param {URL} url + */ +export function get_cookies(request, url) { + const header = request.headers.get('cookie') ?? ''; + const initial_cookies = parse(header, { decode: (value) => value }); + + /** @type {string | undefined} */ + let normalized_url; + + /** @type {Record} */ + const new_cookies = {}; + + /** @type {import('cookie').CookieSerializeOptions} */ + const defaults = { + httpOnly: true, + sameSite: 'lax', + secure: url.hostname === 'localhost' && url.protocol === 'http:' ? false : true + }; + + /** @type {import('@sveltejs/kit').Cookies} */ + const cookies = { + // The JSDoc param annotations appearing below for get, set and delete + // are necessary to expose the `cookie` library types to + // typescript users. `@type {import('@sveltejs/kit').Cookies}` above is not + // sufficient to do so. + + /** + * @param {string} name + * @param {import('cookie').CookieParseOptions} [opts] + */ + get(name, opts) { + const c = new_cookies[name]; + if ( + c && + domain_matches(url.hostname, c.options.domain) && + path_matches(url.pathname, c.options.path) + ) { + return c.value; + } + + const req_cookies = parse(header, { decode: opts?.decode }); + const cookie = req_cookies[name]; // the decoded string or undefined + + // in development, if the cookie was set during this session with `cookies.set`, + // but at a different path, warn the user. (ignore cookies from request headers, + // since we don't know which path they were set at) + if (__SVELTEKIT_DEV__ && !cookie) { + const paths = Array.from(cookie_paths[name] ?? []).filter((path) => { + // we only care about paths that are _more_ specific than the current path + return path_matches(path, url.pathname) && path !== url.pathname; + }); + + if (paths.length > 0) { + console.warn( + // prettier-ignore + `'${name}' cookie does not exist for ${url.pathname}, but was previously set at ${conjoin([...paths])}. Did you mean to set its 'path' to '/' instead?` + ); + } + } + + return cookie; + }, + + /** + * @param {import('cookie').CookieParseOptions} [opts] + */ + getAll(opts) { + const cookies = parse(header, { decode: opts?.decode }); + + for (const c of Object.values(new_cookies)) { + if ( + domain_matches(url.hostname, c.options.domain) && + path_matches(url.pathname, c.options.path) + ) { + cookies[c.name] = c.value; + } + } + + return Object.entries(cookies).map(([name, value]) => ({ name, value })); + }, + + /** + * @param {string} name + * @param {string} value + * @param {import('./page/types.js').Cookie['options']} options + */ + set(name, value, options) { + // TODO: remove this check in 3.0 + const illegal_characters = name.match(INVALID_COOKIE_CHARACTER_REGEX); + if (illegal_characters) { + console.warn( + `The cookie name "${name}" will be invalid in SvelteKit 3.0 as it contains ${illegal_characters.join( + ' and ' + )}. See RFC 2616 for more details https://datatracker.ietf.org/doc/html/rfc2616#section-2.2` + ); + } + + validate_options(options); + set_internal(name, value, { ...defaults, ...options }); + }, + + /** + * @param {string} name + * @param {import('./page/types.js').Cookie['options']} options + */ + delete(name, options) { + validate_options(options); + cookies.set(name, '', { ...options, maxAge: 0 }); + }, + + /** + * @param {string} name + * @param {string} value + * @param {import('./page/types.js').Cookie['options']} options + */ + serialize(name, value, options) { + validate_options(options); + + let path = options.path; + + if (!options.domain || options.domain === url.hostname) { + if (!normalized_url) { + throw new Error('Cannot serialize cookies until after the route is determined'); + } + path = resolve(normalized_url, path); + } + + return serialize(name, value, { ...defaults, ...options, path }); + } + }; + + /** + * @param {URL} destination + * @param {string | null} header + */ + function get_cookie_header(destination, header) { + /** @type {Record} */ + const combined_cookies = { + // cookies sent by the user agent have lowest precedence + ...initial_cookies + }; + + // cookies previous set during this event with cookies.set have higher precedence + for (const key in new_cookies) { + const cookie = new_cookies[key]; + if (!domain_matches(destination.hostname, cookie.options.domain)) continue; + if (!path_matches(destination.pathname, cookie.options.path)) continue; + + const encoder = cookie.options.encode || encodeURIComponent; + combined_cookies[cookie.name] = encoder(cookie.value); + } + + // explicit header has highest precedence + if (header) { + const parsed = parse(header, { decode: (value) => value }); + for (const name in parsed) { + combined_cookies[name] = parsed[name]; + } + } + + return Object.entries(combined_cookies) + .map(([name, value]) => `${name}=${value}`) + .join('; '); + } + + /** @type {Array<() => void>} */ + const internal_queue = []; + + /** + * @param {string} name + * @param {string} value + * @param {import('./page/types.js').Cookie['options']} options + */ + function set_internal(name, value, options) { + if (!normalized_url) { + internal_queue.push(() => set_internal(name, value, options)); + return; + } + + let path = options.path; + + if (!options.domain || options.domain === url.hostname) { + path = resolve(normalized_url, path); + } + + new_cookies[name] = { name, value, options: { ...options, path } }; + + if (__SVELTEKIT_DEV__) { + const serialized = serialize(name, value, new_cookies[name].options); + if (new TextEncoder().encode(serialized).byteLength > MAX_COOKIE_SIZE) { + throw new Error(`Cookie "${name}" is too large, and will be discarded by the browser`); + } + + cookie_paths[name] ??= new Set(); + + if (!value) { + cookie_paths[name].delete(path); + } else { + cookie_paths[name].add(path); + } + } + } + + /** + * @param {import('types').TrailingSlash} trailing_slash + */ + function set_trailing_slash(trailing_slash) { + normalized_url = normalize_path(url.pathname, trailing_slash); + internal_queue.forEach((fn) => fn()); + } + + return { cookies, new_cookies, get_cookie_header, set_internal, set_trailing_slash }; +} + +/** + * @param {string} hostname + * @param {string} [constraint] + */ +export function domain_matches(hostname, constraint) { + if (!constraint) return true; + + const normalized = constraint[0] === '.' ? constraint.slice(1) : constraint; + + if (hostname === normalized) return true; + return hostname.endsWith('.' + normalized); +} + +/** + * @param {string} path + * @param {string} [constraint] + */ +export function path_matches(path, constraint) { + if (!constraint) return true; + + const normalized = constraint.endsWith('/') ? constraint.slice(0, -1) : constraint; + + if (path === normalized) return true; + return path.startsWith(normalized + '/'); +} + +/** + * @param {Headers} headers + * @param {import('./page/types.js').Cookie[]} cookies + */ +export function add_cookies_to_headers(headers, cookies) { + for (const new_cookie of cookies) { + const { name, value, options } = new_cookie; + headers.append('set-cookie', serialize(name, value, options)); + + // special case — for routes ending with .html, the route data lives in a sibling + // `.html__data.json` file rather than a child `/__data.json` file, which means + // we need to duplicate the cookie + if (options.path.endsWith('.html')) { + const path = add_data_suffix(options.path); + headers.append('set-cookie', serialize(name, value, { ...options, path })); + } + } +} + +/** + * @param {string[]} array + */ +function conjoin(array) { + if (array.length <= 2) return array.join(' and '); + return `${array.slice(0, -1).join(', ')} and ${array.at(-1)}`; +} diff --git a/node_modules/@sveltejs/kit/src/runtime/server/data/index.js b/node_modules/@sveltejs/kit/src/runtime/server/data/index.js new file mode 100644 index 0000000..46150a9 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/server/data/index.js @@ -0,0 +1,270 @@ +import { HttpError, SvelteKitError, Redirect } from '../../control.js'; +import { normalize_error } from '../../../utils/error.js'; +import { once } from '../../../utils/functions.js'; +import { load_server_data } from '../page/load_data.js'; +import { clarify_devalue_error, handle_error_and_jsonify, serialize_uses } from '../utils.js'; +import { normalize_path } from '../../../utils/url.js'; +import { text } from '../../../exports/index.js'; +import * as devalue from 'devalue'; +import { create_async_iterator } from '../../../utils/streaming.js'; + +const encoder = new TextEncoder(); + +/** + * @param {import('@sveltejs/kit').RequestEvent} event + * @param {import('types').SSRRoute} route + * @param {import('types').SSROptions} options + * @param {import('@sveltejs/kit').SSRManifest} manifest + * @param {import('types').SSRState} state + * @param {boolean[] | undefined} invalidated_data_nodes + * @param {import('types').TrailingSlash} trailing_slash + * @returns {Promise} + */ +export async function render_data( + event, + route, + options, + manifest, + state, + invalidated_data_nodes, + trailing_slash +) { + if (!route.page) { + // requesting /__data.json should fail for a +server.js + return new Response(undefined, { + status: 404 + }); + } + + try { + const node_ids = [...route.page.layouts, route.page.leaf]; + const invalidated = invalidated_data_nodes ?? node_ids.map(() => true); + + let aborted = false; + + const url = new URL(event.url); + url.pathname = normalize_path(url.pathname, trailing_slash); + + const new_event = { ...event, url }; + + const functions = node_ids.map((n, i) => { + return once(async () => { + try { + if (aborted) { + return /** @type {import('types').ServerDataSkippedNode} */ ({ + type: 'skip' + }); + } + + // == because it could be undefined (in dev) or null (in build, because of JSON.stringify) + const node = n == undefined ? n : await manifest._.nodes[n](); + // load this. for the child, return as is. for the final result, stream things + return load_server_data({ + event: new_event, + state, + node, + parent: async () => { + /** @type {Record} */ + const data = {}; + for (let j = 0; j < i; j += 1) { + const parent = /** @type {import('types').ServerDataNode | null} */ ( + await functions[j]() + ); + + if (parent) { + Object.assign(data, parent.data); + } + } + return data; + } + }); + } catch (e) { + aborted = true; + throw e; + } + }); + }); + + const promises = functions.map(async (fn, i) => { + if (!invalidated[i]) { + return /** @type {import('types').ServerDataSkippedNode} */ ({ + type: 'skip' + }); + } + + return fn(); + }); + + let length = promises.length; + const nodes = await Promise.all( + promises.map((p, i) => + p.catch(async (error) => { + if (error instanceof Redirect) { + throw error; + } + + // Math.min because array isn't guaranteed to resolve in order + length = Math.min(length, i + 1); + + return /** @type {import('types').ServerErrorNode} */ ({ + type: 'error', + error: await handle_error_and_jsonify(event, options, error), + status: + error instanceof HttpError || error instanceof SvelteKitError + ? error.status + : undefined + }); + }) + ) + ); + + const { data, chunks } = get_data_json(event, options, nodes); + + if (!chunks) { + // use a normal JSON response where possible, so we get `content-length` + // and can use browser JSON devtools for easier inspecting + return json_response(data); + } + + return new Response( + new ReadableStream({ + async start(controller) { + controller.enqueue(encoder.encode(data)); + for await (const chunk of chunks) { + controller.enqueue(encoder.encode(chunk)); + } + controller.close(); + }, + + type: 'bytes' + }), + { + headers: { + // we use a proprietary content type to prevent buffering. + // the `text` prefix makes it inspectable + 'content-type': 'text/sveltekit-data', + 'cache-control': 'private, no-store' + } + } + ); + } catch (e) { + const error = normalize_error(e); + + if (error instanceof Redirect) { + return redirect_json_response(error); + } else { + return json_response(await handle_error_and_jsonify(event, options, error), 500); + } + } +} + +/** + * @param {Record | string} json + * @param {number} [status] + */ +function json_response(json, status = 200) { + return text(typeof json === 'string' ? json : JSON.stringify(json), { + status, + headers: { + 'content-type': 'application/json', + 'cache-control': 'private, no-store' + } + }); +} + +/** + * @param {Redirect} redirect + */ +export function redirect_json_response(redirect) { + return json_response({ + type: 'redirect', + location: redirect.location + }); +} + +/** + * If the serialized data contains promises, `chunks` will be an + * async iterable containing their resolutions + * @param {import('@sveltejs/kit').RequestEvent} event + * @param {import('types').SSROptions} options + * @param {Array} nodes + * @returns {{ data: string, chunks: AsyncIterable | null }} + */ +export function get_data_json(event, options, nodes) { + let promise_id = 1; + let count = 0; + + const { iterator, push, done } = create_async_iterator(); + + const reducers = { + ...Object.fromEntries( + Object.entries(options.hooks.transport).map(([key, value]) => [key, value.encode]) + ), + /** @param {any} thing */ + Promise: (thing) => { + if (typeof thing?.then === 'function') { + const id = promise_id++; + count += 1; + + /** @type {'data' | 'error'} */ + let key = 'data'; + + thing + .catch( + /** @param {any} e */ async (e) => { + key = 'error'; + return handle_error_and_jsonify(event, options, /** @type {any} */ (e)); + } + ) + .then( + /** @param {any} value */ + async (value) => { + let str; + try { + str = devalue.stringify(value, reducers); + } catch { + const error = await handle_error_and_jsonify( + event, + options, + new Error(`Failed to serialize promise while rendering ${event.route.id}`) + ); + + key = 'error'; + str = devalue.stringify(error, reducers); + } + + count -= 1; + + push(`{"type":"chunk","id":${id},"${key}":${str}}\n`); + if (count === 0) done(); + } + ); + + return id; + } + } + }; + + try { + const strings = nodes.map((node) => { + if (!node) return 'null'; + + if (node.type === 'error' || node.type === 'skip') { + return JSON.stringify(node); + } + + return `{"type":"data","data":${devalue.stringify(node.data, reducers)},"uses":${JSON.stringify( + serialize_uses(node) + )}${node.slash ? `,"slash":${JSON.stringify(node.slash)}` : ''}}`; + }); + + return { + data: `{"type":"data","nodes":[${strings.join(',')}]}\n`, + chunks: count > 0 ? iterator : null + }; + } catch (e) { + // @ts-expect-error + e.path = 'data' + e.path; + throw new Error(clarify_devalue_error(event, /** @type {any} */ (e))); + } +} diff --git a/node_modules/@sveltejs/kit/src/runtime/server/endpoint.js b/node_modules/@sveltejs/kit/src/runtime/server/endpoint.js new file mode 100644 index 0000000..d480d34 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/server/endpoint.js @@ -0,0 +1,108 @@ +import { ENDPOINT_METHODS, PAGE_METHODS } from '../../constants.js'; +import { negotiate } from '../../utils/http.js'; +import { with_event } from '../app/server/event.js'; +import { Redirect } from '../control.js'; +import { method_not_allowed } from './utils.js'; + +/** + * @param {import('@sveltejs/kit').RequestEvent} event + * @param {import('types').SSREndpoint} mod + * @param {import('types').SSRState} state + * @returns {Promise} + */ +export async function render_endpoint(event, mod, state) { + const method = /** @type {import('types').HttpMethod} */ (event.request.method); + + let handler = mod[method] || mod.fallback; + + if (method === 'HEAD' && !mod.HEAD && mod.GET) { + handler = mod.GET; + } + + if (!handler) { + return method_not_allowed(mod, method); + } + + const prerender = mod.prerender ?? state.prerender_default; + + if (prerender && (mod.POST || mod.PATCH || mod.PUT || mod.DELETE)) { + throw new Error('Cannot prerender endpoints that have mutative methods'); + } + + if (state.prerendering && !state.prerendering.inside_reroute && !prerender) { + if (state.depth > 0) { + // if request came from a prerendered page, bail + throw new Error(`${event.route.id} is not prerenderable`); + } else { + // if request came direct from the crawler, signal that + // this route cannot be prerendered, but don't bail + return new Response(undefined, { status: 204 }); + } + } + + try { + const response = await with_event(event, () => + handler(/** @type {import('@sveltejs/kit').RequestEvent>} */ (event)) + ); + + if (!(response instanceof Response)) { + throw new Error( + `Invalid response from route ${event.url.pathname}: handler should return a Response object` + ); + } + + if (state.prerendering && (!state.prerendering.inside_reroute || prerender)) { + // The returned Response might have immutable Headers + // so we should clone them before trying to mutate them. + // We also need to clone the response body since it may be read twice during prerendering + const cloned = new Response(response.clone().body, { + status: response.status, + statusText: response.statusText, + headers: new Headers(response.headers) + }); + cloned.headers.set('x-sveltekit-prerender', String(prerender)); + + if (state.prerendering.inside_reroute && prerender) { + // Without this, the route wouldn't be recorded as prerendered, + // because there's nothing after reroute that would do that. + cloned.headers.set( + 'x-sveltekit-routeid', + encodeURI(/** @type {string} */ (event.route.id)) + ); + state.prerendering.dependencies.set(event.url.pathname, { response: cloned, body: null }); + } else { + return cloned; + } + } + + return response; + } catch (e) { + if (e instanceof Redirect) { + return new Response(undefined, { + status: e.status, + headers: { location: e.location } + }); + } + + throw e; + } +} + +/** + * @param {import('@sveltejs/kit').RequestEvent} event + */ +export function is_endpoint_request(event) { + const { method, headers } = event.request; + + // These methods exist exclusively for endpoints + if (ENDPOINT_METHODS.includes(method) && !PAGE_METHODS.includes(method)) { + return true; + } + + // use:enhance uses a custom header to disambiguate + if (method === 'POST' && headers.get('x-sveltekit-action') === 'true') return false; + + // GET/POST requests may be for endpoints or pages. We prefer endpoints if this isn't a text/html request + const accept = event.request.headers.get('accept') ?? '*/*'; + return negotiate(accept, ['*', 'text/html']) !== 'text/html'; +} diff --git a/node_modules/@sveltejs/kit/src/runtime/server/env_module.js b/node_modules/@sveltejs/kit/src/runtime/server/env_module.js new file mode 100644 index 0000000..7d37ac6 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/server/env_module.js @@ -0,0 +1,29 @@ +import { public_env } from '../shared-server.js'; + +/** @type {string} */ +let body; + +/** @type {string} */ +let etag; + +/** @type {Headers} */ +let headers; + +/** + * @param {Request} request + * @returns {Response} + */ +export function get_public_env(request) { + body ??= `export const env=${JSON.stringify(public_env)}`; + etag ??= `W/${Date.now()}`; + headers ??= new Headers({ + 'content-type': 'application/javascript; charset=utf-8', + etag + }); + + if (request.headers.get('if-none-match') === etag) { + return new Response(undefined, { status: 304, headers }); + } + + return new Response(body, { headers }); +} diff --git a/node_modules/@sveltejs/kit/src/runtime/server/fetch.js b/node_modules/@sveltejs/kit/src/runtime/server/fetch.js new file mode 100644 index 0000000..913ceda --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/server/fetch.js @@ -0,0 +1,197 @@ +import * as set_cookie_parser from 'set-cookie-parser'; +import { respond } from './respond.js'; +import * as paths from '__sveltekit/paths'; +import { read_implementation } from '__sveltekit/server'; +import { has_prerendered_path } from './utils.js'; + +/** + * @param {{ + * event: import('@sveltejs/kit').RequestEvent; + * options: import('types').SSROptions; + * manifest: import('@sveltejs/kit').SSRManifest; + * state: import('types').SSRState; + * get_cookie_header: (url: URL, header: string | null) => string; + * set_internal: (name: string, value: string, opts: import('./page/types.js').Cookie['options']) => void; + * }} opts + * @returns {typeof fetch} + */ +export function create_fetch({ event, options, manifest, state, get_cookie_header, set_internal }) { + /** + * @type {typeof fetch} + */ + const server_fetch = async (info, init) => { + const original_request = normalize_fetch_input(info, init, event.url); + + // some runtimes (e.g. Cloudflare) error if you access `request.mode`, + // annoyingly, so we need to read the value from the `init` object instead + let mode = (info instanceof Request ? info.mode : init?.mode) ?? 'cors'; + let credentials = + (info instanceof Request ? info.credentials : init?.credentials) ?? 'same-origin'; + + return options.hooks.handleFetch({ + event, + request: original_request, + fetch: async (info, init) => { + const request = normalize_fetch_input(info, init, event.url); + + const url = new URL(request.url); + + if (!request.headers.has('origin')) { + request.headers.set('origin', event.url.origin); + } + + if (info !== original_request) { + mode = (info instanceof Request ? info.mode : init?.mode) ?? 'cors'; + credentials = + (info instanceof Request ? info.credentials : init?.credentials) ?? 'same-origin'; + } + + // Remove Origin, according to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin#description + if ( + (request.method === 'GET' || request.method === 'HEAD') && + ((mode === 'no-cors' && url.origin !== event.url.origin) || + url.origin === event.url.origin) + ) { + request.headers.delete('origin'); + } + + if (url.origin !== event.url.origin) { + // Allow cookie passthrough for "credentials: same-origin" and "credentials: include" + // if SvelteKit is serving my.domain.com: + // - domain.com WILL NOT receive cookies + // - my.domain.com WILL receive cookies + // - api.domain.dom WILL NOT receive cookies + // - sub.my.domain.com WILL receive cookies + // ports do not affect the resolution + // leading dot prevents mydomain.com matching domain.com + // Do not forward other cookies for "credentials: include" because we don't know + // which cookie belongs to which domain (browser does not pass this info) + if (`.${url.hostname}`.endsWith(`.${event.url.hostname}`) && credentials !== 'omit') { + const cookie = get_cookie_header(url, request.headers.get('cookie')); + if (cookie) request.headers.set('cookie', cookie); + } + + return fetch(request); + } + + // handle fetch requests for static assets. e.g. prebaked data, etc. + // we need to support everything the browser's fetch supports + const prefix = paths.assets || paths.base; + const decoded = decodeURIComponent(url.pathname); + const filename = ( + decoded.startsWith(prefix) ? decoded.slice(prefix.length) : decoded + ).slice(1); + const filename_html = `${filename}/index.html`; // path may also match path/index.html + + const is_asset = manifest.assets.has(filename) || filename in manifest._.server_assets; + const is_asset_html = + manifest.assets.has(filename_html) || filename_html in manifest._.server_assets; + + if (is_asset || is_asset_html) { + const file = is_asset ? filename : filename_html; + + if (state.read) { + const type = is_asset + ? manifest.mimeTypes[filename.slice(filename.lastIndexOf('.'))] + : 'text/html'; + + return new Response(state.read(file), { + headers: type ? { 'content-type': type } : {} + }); + } else if (read_implementation && file in manifest._.server_assets) { + const length = manifest._.server_assets[file]; + const type = manifest.mimeTypes[file.slice(file.lastIndexOf('.'))]; + + return new Response(read_implementation(file), { + headers: { + 'Content-Length': '' + length, + 'Content-Type': type + } + }); + } + + return await fetch(request); + } + + if (has_prerendered_path(manifest, paths.base + decoded)) { + // The path of something prerendered could match a different route + // that is still in the manifest, leading to the wrong route being loaded. + // We therefore bail early here. The prerendered logic is different for + // each adapter, (except maybe for prerendered redirects) + // so we need to make an actual HTTP request. + return await fetch(request); + } + + if (credentials !== 'omit') { + const cookie = get_cookie_header(url, request.headers.get('cookie')); + if (cookie) { + request.headers.set('cookie', cookie); + } + + const authorization = event.request.headers.get('authorization'); + if (authorization && !request.headers.has('authorization')) { + request.headers.set('authorization', authorization); + } + } + + if (!request.headers.has('accept')) { + request.headers.set('accept', '*/*'); + } + + if (!request.headers.has('accept-language')) { + request.headers.set( + 'accept-language', + /** @type {string} */ (event.request.headers.get('accept-language')) + ); + } + + const response = await respond(request, options, manifest, { + ...state, + depth: state.depth + 1 + }); + + const set_cookie = response.headers.get('set-cookie'); + if (set_cookie) { + for (const str of set_cookie_parser.splitCookiesString(set_cookie)) { + const { name, value, ...options } = set_cookie_parser.parseString(str, { + decodeValues: false + }); + + const path = options.path ?? (url.pathname.split('/').slice(0, -1).join('/') || '/'); + + // options.sameSite is string, something more specific is required - type cast is safe + set_internal(name, value, { + path, + encode: (value) => value, + .../** @type {import('cookie').CookieSerializeOptions} */ (options) + }); + } + } + + return response; + } + }); + }; + + // Don't make this function `async`! Otherwise, the user has to `catch` promises they use for streaming responses or else + // it will be an unhandled rejection. Instead, we add a `.catch(() => {})` ourselves below to prevent this from happening. + return (input, init) => { + // See docs in fetch.js for why we need to do this + const response = server_fetch(input, init); + response.catch(() => {}); + return response; + }; +} + +/** + * @param {RequestInfo | URL} info + * @param {RequestInit | undefined} init + * @param {URL} url + */ +function normalize_fetch_input(info, init, url) { + if (info instanceof Request) { + return info; + } + + return new Request(typeof info === 'string' ? new URL(info, url) : info, init); +} diff --git a/node_modules/@sveltejs/kit/src/runtime/server/index.js b/node_modules/@sveltejs/kit/src/runtime/server/index.js new file mode 100644 index 0000000..a2740a8 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/server/index.js @@ -0,0 +1,115 @@ +import { respond } from './respond.js'; +import { set_private_env, set_public_env, set_safe_public_env } from '../shared-server.js'; +import { options, get_hooks } from '__SERVER__/internal.js'; +import { DEV } from 'esm-env'; +import { filter_private_env, filter_public_env } from '../../utils/env.js'; +import { prerendering } from '__sveltekit/environment'; +import { set_read_implementation, set_manifest } from '__sveltekit/server'; + +/** @type {ProxyHandler<{ type: 'public' | 'private' }>} */ +const prerender_env_handler = { + get({ type }, prop) { + throw new Error( + `Cannot read values from $env/dynamic/${type} while prerendering (attempted to read env.${prop.toString()}). Use $env/static/${type} instead` + ); + } +}; + +/** @type {Promise} */ +let init_promise; + +export class Server { + /** @type {import('types').SSROptions} */ + #options; + + /** @type {import('@sveltejs/kit').SSRManifest} */ + #manifest; + + /** @param {import('@sveltejs/kit').SSRManifest} manifest */ + constructor(manifest) { + /** @type {import('types').SSROptions} */ + this.#options = options; + this.#manifest = manifest; + + set_manifest(manifest); + } + + /** + * @param {{ + * env: Record; + * read?: (file: string) => ReadableStream; + * }} opts + */ + async init({ env, read }) { + // Take care: Some adapters may have to call `Server.init` per-request to set env vars, + // so anything that shouldn't be rerun should be wrapped in an `if` block to make sure it hasn't + // been done already. + + // set env, in case it's used in initialisation + const prefixes = { + public_prefix: this.#options.env_public_prefix, + private_prefix: this.#options.env_private_prefix + }; + + const private_env = filter_private_env(env, prefixes); + const public_env = filter_public_env(env, prefixes); + + set_private_env( + prerendering ? new Proxy({ type: 'private' }, prerender_env_handler) : private_env + ); + set_public_env( + prerendering ? new Proxy({ type: 'public' }, prerender_env_handler) : public_env + ); + set_safe_public_env(public_env); + + if (read) { + set_read_implementation(read); + } + + // During DEV and for some adapters this function might be called in quick succession, + // so we need to make sure we're not invoking this logic (most notably the init hook) multiple times + await (init_promise ??= (async () => { + try { + const module = await get_hooks(); + + this.#options.hooks = { + handle: module.handle || (({ event, resolve }) => resolve(event)), + handleError: module.handleError || (({ error }) => console.error(error)), + handleFetch: module.handleFetch || (({ request, fetch }) => fetch(request)), + reroute: module.reroute || (() => {}), + transport: module.transport || {} + }; + + if (module.init) { + await module.init(); + } + } catch (error) { + if (DEV) { + this.#options.hooks = { + handle: () => { + throw error; + }, + handleError: ({ error }) => console.error(error), + handleFetch: ({ request, fetch }) => fetch(request), + reroute: () => {}, + transport: {} + }; + } else { + throw error; + } + } + })()); + } + + /** + * @param {Request} request + * @param {import('types').RequestOptions} options + */ + async respond(request, options) { + return respond(request, this.#options, this.#manifest, { + ...options, + error: false, + depth: 0 + }); + } +} diff --git a/node_modules/@sveltejs/kit/src/runtime/server/page/actions.js b/node_modules/@sveltejs/kit/src/runtime/server/page/actions.js new file mode 100644 index 0000000..e770335 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/server/page/actions.js @@ -0,0 +1,325 @@ +import * as devalue from 'devalue'; +import { DEV } from 'esm-env'; +import { json } from '../../../exports/index.js'; +import { get_status, normalize_error } from '../../../utils/error.js'; +import { is_form_content_type, negotiate } from '../../../utils/http.js'; +import { HttpError, Redirect, ActionFailure, SvelteKitError } from '../../control.js'; +import { handle_error_and_jsonify } from '../utils.js'; +import { with_event } from '../../app/server/event.js'; + +/** @param {import('@sveltejs/kit').RequestEvent} event */ +export function is_action_json_request(event) { + const accept = negotiate(event.request.headers.get('accept') ?? '*/*', [ + 'application/json', + 'text/html' + ]); + + return accept === 'application/json' && event.request.method === 'POST'; +} + +/** + * @param {import('@sveltejs/kit').RequestEvent} event + * @param {import('types').SSROptions} options + * @param {import('types').SSRNode['server'] | undefined} server + */ +export async function handle_action_json_request(event, options, server) { + const actions = server?.actions; + + if (!actions) { + const no_actions_error = new SvelteKitError( + 405, + 'Method Not Allowed', + `POST method not allowed. No form actions exist for ${DEV ? `the page at ${event.route.id}` : 'this page'}` + ); + + return action_json( + { + type: 'error', + error: await handle_error_and_jsonify(event, options, no_actions_error) + }, + { + status: no_actions_error.status, + headers: { + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405 + // "The server must generate an Allow header field in a 405 status code response" + allow: 'GET' + } + } + ); + } + + check_named_default_separate(actions); + + try { + const data = await call_action(event, actions); + + if (__SVELTEKIT_DEV__) { + validate_action_return(data); + } + + if (data instanceof ActionFailure) { + return action_json({ + type: 'failure', + status: data.status, + // @ts-expect-error we assign a string to what is supposed to be an object. That's ok + // because we don't use the object outside, and this way we have better code navigation + // through knowing where the related interface is used. + data: stringify_action_response( + data.data, + /** @type {string} */ (event.route.id), + options.hooks.transport + ) + }); + } else { + return action_json({ + type: 'success', + status: data ? 200 : 204, + // @ts-expect-error see comment above + data: stringify_action_response( + data, + /** @type {string} */ (event.route.id), + options.hooks.transport + ) + }); + } + } catch (e) { + const err = normalize_error(e); + + if (err instanceof Redirect) { + return action_json_redirect(err); + } + + return action_json( + { + type: 'error', + error: await handle_error_and_jsonify(event, options, check_incorrect_fail_use(err)) + }, + { + status: get_status(err) + } + ); + } +} + +/** + * @param {HttpError | Error} error + */ +function check_incorrect_fail_use(error) { + return error instanceof ActionFailure + ? new Error('Cannot "throw fail()". Use "return fail()"') + : error; +} + +/** + * @param {import('@sveltejs/kit').Redirect} redirect + */ +export function action_json_redirect(redirect) { + return action_json({ + type: 'redirect', + status: redirect.status, + location: redirect.location + }); +} + +/** + * @param {import('@sveltejs/kit').ActionResult} data + * @param {ResponseInit} [init] + */ +function action_json(data, init) { + return json(data, init); +} + +/** + * @param {import('@sveltejs/kit').RequestEvent} event + */ +export function is_action_request(event) { + return event.request.method === 'POST'; +} + +/** + * @param {import('@sveltejs/kit').RequestEvent} event + * @param {import('types').SSRNode['server'] | undefined} server + * @returns {Promise} + */ +export async function handle_action_request(event, server) { + const actions = server?.actions; + + if (!actions) { + // TODO should this be a different error altogether? + event.setHeaders({ + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405 + // "The server must generate an Allow header field in a 405 status code response" + allow: 'GET' + }); + return { + type: 'error', + error: new SvelteKitError( + 405, + 'Method Not Allowed', + `POST method not allowed. No form actions exist for ${DEV ? `the page at ${event.route.id}` : 'this page'}` + ) + }; + } + + check_named_default_separate(actions); + + try { + const data = await call_action(event, actions); + + if (__SVELTEKIT_DEV__) { + validate_action_return(data); + } + + if (data instanceof ActionFailure) { + return { + type: 'failure', + status: data.status, + data: data.data + }; + } else { + return { + type: 'success', + status: 200, + // @ts-expect-error this will be removed upon serialization, so `undefined` is the same as omission + data + }; + } + } catch (e) { + const err = normalize_error(e); + + if (err instanceof Redirect) { + return { + type: 'redirect', + status: err.status, + location: err.location + }; + } + + return { + type: 'error', + error: check_incorrect_fail_use(err) + }; + } +} + +/** + * @param {import('@sveltejs/kit').Actions} actions + */ +function check_named_default_separate(actions) { + if (actions.default && Object.keys(actions).length > 1) { + throw new Error( + 'When using named actions, the default action cannot be used. See the docs for more info: https://svelte.dev/docs/kit/form-actions#named-actions' + ); + } +} + +/** + * @param {import('@sveltejs/kit').RequestEvent} event + * @param {NonNullable} actions + * @throws {Redirect | HttpError | SvelteKitError | Error} + */ +async function call_action(event, actions) { + const url = new URL(event.request.url); + + let name = 'default'; + for (const param of url.searchParams) { + if (param[0].startsWith('/')) { + name = param[0].slice(1); + if (name === 'default') { + throw new Error('Cannot use reserved action name "default"'); + } + break; + } + } + + const action = actions[name]; + if (!action) { + throw new SvelteKitError(404, 'Not Found', `No action with name '${name}' found`); + } + + if (!is_form_content_type(event.request)) { + throw new SvelteKitError( + 415, + 'Unsupported Media Type', + `Form actions expect form-encoded data — received ${event.request.headers.get( + 'content-type' + )}` + ); + } + + return with_event(event, () => action(event)); +} + +/** @param {any} data */ +function validate_action_return(data) { + if (data instanceof Redirect) { + throw new Error('Cannot `return redirect(...)` — use `redirect(...)` instead'); + } + + if (data instanceof HttpError) { + throw new Error('Cannot `return error(...)` — use `error(...)` or `return fail(...)` instead'); + } +} + +/** + * Try to `devalue.uneval` the data object, and if it fails, return a proper Error with context + * @param {any} data + * @param {string} route_id + * @param {import('types').ServerHooks['transport']} transport + */ +export function uneval_action_response(data, route_id, transport) { + const replacer = (/** @type {any} */ thing) => { + for (const key in transport) { + const encoded = transport[key].encode(thing); + if (encoded) { + return `app.decode('${key}', ${devalue.uneval(encoded, replacer)})`; + } + } + }; + + return try_serialize(data, (value) => devalue.uneval(value, replacer), route_id); +} + +/** + * Try to `devalue.stringify` the data object, and if it fails, return a proper Error with context + * @param {any} data + * @param {string} route_id + * @param {import('types').ServerHooks['transport']} transport + */ +function stringify_action_response(data, route_id, transport) { + const encoders = Object.fromEntries( + Object.entries(transport).map(([key, value]) => [key, value.encode]) + ); + + return try_serialize(data, (value) => devalue.stringify(value, encoders), route_id); +} + +/** + * @param {any} data + * @param {(data: any) => string} fn + * @param {string} route_id + */ +function try_serialize(data, fn, route_id) { + try { + return fn(data); + } catch (e) { + // If we're here, the data could not be serialized with devalue + const error = /** @type {any} */ (e); + + // if someone tries to use `json()` in their action + if (data instanceof Response) { + throw new Error( + `Data returned from action inside ${route_id} is not serializable. Form actions need to return plain objects or fail(). E.g. return { success: true } or return fail(400, { message: "invalid" });` + ); + } + + // if devalue could not serialize a property on the object, etc. + if ('path' in error) { + let message = `Data returned from action inside ${route_id} is not serializable: ${error.message}`; + if (error.path !== '') message += ` (data.${error.path})`; + throw new Error(message); + } + + throw error; + } +} diff --git a/node_modules/@sveltejs/kit/src/runtime/server/page/crypto.js b/node_modules/@sveltejs/kit/src/runtime/server/page/crypto.js new file mode 100644 index 0000000..9af02da --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/server/page/crypto.js @@ -0,0 +1,239 @@ +const encoder = new TextEncoder(); + +/** + * SHA-256 hashing function adapted from https://bitwiseshiftleft.github.io/sjcl + * modified and redistributed under BSD license + * @param {string} data + */ +export function sha256(data) { + if (!key[0]) precompute(); + + const out = init.slice(0); + const array = encode(data); + + for (let i = 0; i < array.length; i += 16) { + const w = array.subarray(i, i + 16); + + let tmp; + let a; + let b; + + let out0 = out[0]; + let out1 = out[1]; + let out2 = out[2]; + let out3 = out[3]; + let out4 = out[4]; + let out5 = out[5]; + let out6 = out[6]; + let out7 = out[7]; + + /* Rationale for placement of |0 : + * If a value can overflow is original 32 bits by a factor of more than a few + * million (2^23 ish), there is a possibility that it might overflow the + * 53-bit mantissa and lose precision. + * + * To avoid this, we clamp back to 32 bits by |'ing with 0 on any value that + * propagates around the loop, and on the hash state out[]. I don't believe + * that the clamps on out4 and on out0 are strictly necessary, but it's close + * (for out4 anyway), and better safe than sorry. + * + * The clamps on out[] are necessary for the output to be correct even in the + * common case and for short inputs. + */ + + for (let i = 0; i < 64; i++) { + // load up the input word for this round + + if (i < 16) { + tmp = w[i]; + } else { + a = w[(i + 1) & 15]; + + b = w[(i + 14) & 15]; + + tmp = w[i & 15] = + (((a >>> 7) ^ (a >>> 18) ^ (a >>> 3) ^ (a << 25) ^ (a << 14)) + + ((b >>> 17) ^ (b >>> 19) ^ (b >>> 10) ^ (b << 15) ^ (b << 13)) + + w[i & 15] + + w[(i + 9) & 15]) | + 0; + } + + tmp = + tmp + + out7 + + ((out4 >>> 6) ^ (out4 >>> 11) ^ (out4 >>> 25) ^ (out4 << 26) ^ (out4 << 21) ^ (out4 << 7)) + + (out6 ^ (out4 & (out5 ^ out6))) + + key[i]; // | 0; + + // shift register + out7 = out6; + out6 = out5; + out5 = out4; + + out4 = (out3 + tmp) | 0; + + out3 = out2; + out2 = out1; + out1 = out0; + + out0 = + (tmp + + ((out1 & out2) ^ (out3 & (out1 ^ out2))) + + ((out1 >>> 2) ^ + (out1 >>> 13) ^ + (out1 >>> 22) ^ + (out1 << 30) ^ + (out1 << 19) ^ + (out1 << 10))) | + 0; + } + + out[0] = (out[0] + out0) | 0; + out[1] = (out[1] + out1) | 0; + out[2] = (out[2] + out2) | 0; + out[3] = (out[3] + out3) | 0; + out[4] = (out[4] + out4) | 0; + out[5] = (out[5] + out5) | 0; + out[6] = (out[6] + out6) | 0; + out[7] = (out[7] + out7) | 0; + } + + const bytes = new Uint8Array(out.buffer); + reverse_endianness(bytes); + + return base64(bytes); +} + +/** The SHA-256 initialization vector */ +const init = new Uint32Array(8); + +/** The SHA-256 hash key */ +const key = new Uint32Array(64); + +/** Function to precompute init and key. */ +function precompute() { + /** @param {number} x */ + function frac(x) { + return (x - Math.floor(x)) * 0x100000000; + } + + let prime = 2; + + for (let i = 0; i < 64; prime++) { + let is_prime = true; + + for (let factor = 2; factor * factor <= prime; factor++) { + if (prime % factor === 0) { + is_prime = false; + + break; + } + } + + if (is_prime) { + if (i < 8) { + init[i] = frac(prime ** (1 / 2)); + } + + key[i] = frac(prime ** (1 / 3)); + + i++; + } + } +} + +/** @param {Uint8Array} bytes */ +function reverse_endianness(bytes) { + for (let i = 0; i < bytes.length; i += 4) { + const a = bytes[i + 0]; + const b = bytes[i + 1]; + const c = bytes[i + 2]; + const d = bytes[i + 3]; + + bytes[i + 0] = d; + bytes[i + 1] = c; + bytes[i + 2] = b; + bytes[i + 3] = a; + } +} + +/** @param {string} str */ +function encode(str) { + const encoded = encoder.encode(str); + const length = encoded.length * 8; + + // result should be a multiple of 512 bits in length, + // with room for a 1 (after the data) and two 32-bit + // words containing the original input bit length + const size = 512 * Math.ceil((length + 65) / 512); + const bytes = new Uint8Array(size / 8); + bytes.set(encoded); + + // append a 1 + bytes[encoded.length] = 0b10000000; + + reverse_endianness(bytes); + + // add the input bit length + const words = new Uint32Array(bytes.buffer); + words[words.length - 2] = Math.floor(length / 0x100000000); // this will always be zero for us + words[words.length - 1] = length; + + return words; +} + +/* + Based on https://gist.github.com/enepomnyaschih/72c423f727d395eeaa09697058238727 + + MIT License + Copyright (c) 2020 Egor Nepomnyaschih + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ +const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + +/** @param {Uint8Array} bytes */ +export function base64(bytes) { + const l = bytes.length; + + let result = ''; + let i; + + for (i = 2; i < l; i += 3) { + result += chars[bytes[i - 2] >> 2]; + result += chars[((bytes[i - 2] & 0x03) << 4) | (bytes[i - 1] >> 4)]; + result += chars[((bytes[i - 1] & 0x0f) << 2) | (bytes[i] >> 6)]; + result += chars[bytes[i] & 0x3f]; + } + + if (i === l + 1) { + // 1 octet yet to write + result += chars[bytes[i - 2] >> 2]; + result += chars[(bytes[i - 2] & 0x03) << 4]; + result += '=='; + } + + if (i === l) { + // 2 octets yet to write + result += chars[bytes[i - 2] >> 2]; + result += chars[((bytes[i - 2] & 0x03) << 4) | (bytes[i - 1] >> 4)]; + result += chars[(bytes[i - 1] & 0x0f) << 2]; + result += '='; + } + + return result; +} diff --git a/node_modules/@sveltejs/kit/src/runtime/server/page/csp.js b/node_modules/@sveltejs/kit/src/runtime/server/page/csp.js new file mode 100644 index 0000000..1376235 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/server/page/csp.js @@ -0,0 +1,366 @@ +import { escape_html } from '../../../utils/escape.js'; +import { base64, sha256 } from './crypto.js'; + +const array = new Uint8Array(16); + +function generate_nonce() { + crypto.getRandomValues(array); + return base64(array); +} + +const quoted = new Set([ + 'self', + 'unsafe-eval', + 'unsafe-hashes', + 'unsafe-inline', + 'none', + 'strict-dynamic', + 'report-sample', + 'wasm-unsafe-eval', + 'script' +]); + +const crypto_pattern = /^(nonce|sha\d\d\d)-/; + +// CSP and CSP Report Only are extremely similar with a few caveats +// the easiest/DRYest way to express this is with some private encapsulation +class BaseProvider { + /** @type {boolean} */ + #use_hashes; + + /** @type {boolean} */ + #script_needs_csp; + + /** @type {boolean} */ + #script_src_needs_csp; + + /** @type {boolean} */ + #script_src_elem_needs_csp; + + /** @type {boolean} */ + #style_needs_csp; + + /** @type {boolean} */ + #style_src_needs_csp; + + /** @type {boolean} */ + #style_src_attr_needs_csp; + + /** @type {boolean} */ + #style_src_elem_needs_csp; + + /** @type {import('types').CspDirectives} */ + #directives; + + /** @type {import('types').Csp.Source[]} */ + #script_src; + + /** @type {import('types').Csp.Source[]} */ + #script_src_elem; + + /** @type {import('types').Csp.Source[]} */ + #style_src; + + /** @type {import('types').Csp.Source[]} */ + #style_src_attr; + + /** @type {import('types').Csp.Source[]} */ + #style_src_elem; + + /** @type {string} */ + #nonce; + + /** + * @param {boolean} use_hashes + * @param {import('types').CspDirectives} directives + * @param {string} nonce + */ + constructor(use_hashes, directives, nonce) { + this.#use_hashes = use_hashes; + this.#directives = __SVELTEKIT_DEV__ ? { ...directives } : directives; // clone in dev so we can safely mutate + + const d = this.#directives; + + this.#script_src = []; + this.#script_src_elem = []; + this.#style_src = []; + this.#style_src_attr = []; + this.#style_src_elem = []; + + const effective_script_src = d['script-src'] || d['default-src']; + const script_src_elem = d['script-src-elem']; + const effective_style_src = d['style-src'] || d['default-src']; + const style_src_attr = d['style-src-attr']; + const style_src_elem = d['style-src-elem']; + + if (__SVELTEKIT_DEV__) { + // remove strict-dynamic in dev... + // TODO reinstate this if we can figure out how to make strict-dynamic work + // if (d['default-src']) { + // d['default-src'] = d['default-src'].filter((name) => name !== 'strict-dynamic'); + // if (d['default-src'].length === 0) delete d['default-src']; + // } + + // if (d['script-src']) { + // d['script-src'] = d['script-src'].filter((name) => name !== 'strict-dynamic'); + // if (d['script-src'].length === 0) delete d['script-src']; + // } + + // ...and add unsafe-inline so we can inject `; + } + + for (const dep of stylesheets) { + const path = prefixed(dep); + + const attributes = ['rel="stylesheet"']; + + if (inline_styles.has(dep)) { + // don't load stylesheets that are already inlined + // include them in disabled state so that Vite can detect them and doesn't try to add them + attributes.push('disabled', 'media="(max-width: 0)"'); + } else { + if (resolve_opts.preload({ type: 'css', path })) { + const preload_atts = ['rel="preload"', 'as="style"']; + link_header_preloads.add(`<${encodeURI(path)}>; ${preload_atts.join(';')}; nopush`); + } + } + + head += `\n\t\t`; + } + + for (const dep of fonts) { + const path = prefixed(dep); + + if (resolve_opts.preload({ type: 'font', path })) { + const ext = dep.slice(dep.lastIndexOf('.') + 1); + const attributes = [ + 'rel="preload"', + 'as="font"', + `type="font/${ext}"`, + `href="${path}"`, + 'crossorigin' + ]; + + head += `\n\t\t`; + } + } + + const global = __SVELTEKIT_DEV__ ? '__sveltekit_dev' : `__sveltekit_${options.version_hash}`; + + const { data, chunks } = get_data( + event, + options, + branch.map((b) => b.server_data), + csp, + global + ); + + if (page_config.ssr && page_config.csr) { + body += `\n\t\t\t${fetched + .map((item) => + serialize_data(item, resolve_opts.filterSerializedResponseHeaders, !!state.prerendering) + ) + .join('\n\t\t\t')}`; + } + + if (page_config.csr) { + const route = manifest._.client.routes?.find((r) => r.id === event.route.id) ?? null; + + if (client.uses_env_dynamic_public && state.prerendering) { + modulepreloads.add(`${paths.app_dir}/env.js`); + } + + if (!client.inline) { + const included_modulepreloads = Array.from(modulepreloads, (dep) => prefixed(dep)).filter( + (path) => resolve_opts.preload({ type: 'js', path }) + ); + + for (const path of included_modulepreloads) { + // see the kit.output.preloadStrategy option for details on why we have multiple options here + link_header_preloads.add(`<${encodeURI(path)}>; rel="modulepreload"; nopush`); + if (options.preload_strategy !== 'modulepreload') { + head += `\n\t\t`; + } else if (state.prerendering) { + head += `\n\t\t`; + } + } + } + + // prerender a `/path/to/page/__route.js` module + if (manifest._.client.routes && state.prerendering && !state.prerendering.fallback) { + const pathname = add_resolution_suffix(event.url.pathname); + + state.prerendering.dependencies.set( + pathname, + create_server_routing_response(route, event.params, new URL(pathname, event.url), manifest) + ); + } + + const blocks = []; + + // when serving a prerendered page in an app that uses $env/dynamic/public, we must + // import the env.js module so that it evaluates before any user code can evaluate. + // TODO revert to using top-level await once https://bugs.webkit.org/show_bug.cgi?id=242740 is fixed + // https://github.com/sveltejs/kit/pull/11601 + const load_env_eagerly = client.uses_env_dynamic_public && state.prerendering; + + const properties = [`base: ${base_expression}`]; + + if (paths.assets) { + properties.push(`assets: ${s(paths.assets)}`); + } + + if (client.uses_env_dynamic_public) { + properties.push(`env: ${load_env_eagerly ? 'null' : s(public_env)}`); + } + + if (chunks) { + blocks.push('const deferred = new Map();'); + + properties.push(`defer: (id) => new Promise((fulfil, reject) => { + deferred.set(id, { fulfil, reject }); + })`); + + // When resolving, the id might not yet be available due to the data + // be evaluated upon init of kit, so we use a timeout to retry + properties.push(`resolve: ({ id, data, error }) => { + const try_to_resolve = () => { + if (!deferred.has(id)) { + setTimeout(try_to_resolve, 0); + return; + } + const { fulfil, reject } = deferred.get(id); + deferred.delete(id); + if (error) reject(error); + else fulfil(data); + } + try_to_resolve(); + }`); + } + + // create this before declaring `data`, which may contain references to `${global}` + blocks.push(`${global} = { + ${properties.join(',\n\t\t\t\t\t\t')} + };`); + + const args = ['element']; + + blocks.push('const element = document.currentScript.parentElement;'); + + if (page_config.ssr) { + const serialized = { form: 'null', error: 'null' }; + + if (form_value) { + serialized.form = uneval_action_response( + form_value, + /** @type {string} */ (event.route.id), + options.hooks.transport + ); + } + + if (error) { + serialized.error = devalue.uneval(error); + } + + const hydrate = [ + `node_ids: [${branch.map(({ node }) => node.index).join(', ')}]`, + `data: ${data}`, + `form: ${serialized.form}`, + `error: ${serialized.error}` + ]; + + if (status !== 200) { + hydrate.push(`status: ${status}`); + } + + if (manifest._.client.routes) { + if (route) { + const stringified = generate_route_object(route, event.url, manifest).replaceAll( + '\n', + '\n\t\t\t\t\t\t\t' + ); // make output after it's put together with the rest more readable + hydrate.push(`params: ${devalue.uneval(event.params)}`, `server_route: ${stringified}`); + } + } else if (options.embedded) { + hydrate.push(`params: ${devalue.uneval(event.params)}`, `route: ${s(event.route)}`); + } + + const indent = '\t'.repeat(load_env_eagerly ? 7 : 6); + args.push(`{\n${indent}\t${hydrate.join(`,\n${indent}\t`)}\n${indent}}`); + } + + // `client.app` is a proxy for `bundleStrategy === 'split'` + const boot = client.inline + ? `${client.inline.script} + + __sveltekit_${options.version_hash}.app.start(${args.join(', ')});` + : client.app + ? `Promise.all([ + import(${s(prefixed(client.start))}), + import(${s(prefixed(client.app))}) + ]).then(([kit, app]) => { + kit.start(app, ${args.join(', ')}); + });` + : `import(${s(prefixed(client.start))}).then((app) => { + app.start(${args.join(', ')}) + });`; + + if (load_env_eagerly) { + blocks.push(`import(${s(`${base}/${paths.app_dir}/env.js`)}).then(({ env }) => { + ${global}.env = env; + + ${boot.replace(/\n/g, '\n\t')} + });`); + } else { + blocks.push(boot); + } + + if (options.service_worker) { + const opts = __SVELTEKIT_DEV__ ? ", { type: 'module' }" : ''; + + // we use an anonymous function instead of an arrow function to support + // older browsers (https://github.com/sveltejs/kit/pull/5417) + blocks.push(`if ('serviceWorker' in navigator) { + addEventListener('load', function () { + navigator.serviceWorker.register('${prefixed('service-worker.js')}'${opts}); + }); + }`); + } + + const init_app = ` + { + ${blocks.join('\n\n\t\t\t\t\t')} + } + `; + csp.add_script(init_app); + + body += `\n\t\t\t${init_app}\n\t\t`; + } + + const headers = new Headers({ + 'x-sveltekit-page': 'true', + 'content-type': 'text/html' + }); + + if (state.prerendering) { + // TODO read headers set with setHeaders and convert into http-equiv where possible + const http_equiv = []; + + const csp_headers = csp.csp_provider.get_meta(); + if (csp_headers) { + http_equiv.push(csp_headers); + } + + if (state.prerendering.cache) { + http_equiv.push(``); + } + + if (http_equiv.length > 0) { + head = http_equiv.join('\n') + head; + } + } else { + const csp_header = csp.csp_provider.get_header(); + if (csp_header) { + headers.set('content-security-policy', csp_header); + } + const report_only_header = csp.report_only_provider.get_header(); + if (report_only_header) { + headers.set('content-security-policy-report-only', report_only_header); + } + + if (link_header_preloads.size) { + headers.set('link', Array.from(link_header_preloads).join(', ')); + } + } + + // add the content after the script/css links so the link elements are parsed first + head += rendered.head; + + const html = options.templates.app({ + head, + body, + assets, + nonce: /** @type {string} */ (csp.nonce), + env: safe_public_env + }); + + // TODO flush chunks as early as we can + const transformed = + (await resolve_opts.transformPageChunk({ + html, + done: true + })) || ''; + + if (!chunks) { + headers.set('etag', `"${hash(transformed)}"`); + } + + if (DEV) { + if (page_config.csr) { + if (transformed.split('`, so the script element might be unexpectedly + * kept open until until an unrelated HTML comment in the page. + * + * U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR are escaped for the sake of pre-2018 + * browsers. + * + * @see tests for unsafe parsing examples. + * @see https://html.spec.whatwg.org/multipage/scripting.html#restrictions-for-contents-of-script-elements + * @see https://html.spec.whatwg.org/multipage/syntax.html#cdata-rcdata-restrictions + * @see https://html.spec.whatwg.org/multipage/parsing.html#script-data-state + * @see https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escaped-state + * @see https://github.com/tc39/proposal-json-superset + * @type {Record} + */ +const replacements = { + '<': '\\u003C', + '\u2028': '\\u2028', + '\u2029': '\\u2029' +}; + +const pattern = new RegExp(`[${Object.keys(replacements).join('')}]`, 'g'); + +/** + * Generates a raw HTML string containing a safe script element carrying data and associated attributes. + * + * It escapes all the special characters needed to guarantee the element is unbroken, but care must + * be taken to ensure it is inserted in the document at an acceptable position for a script element, + * and that the resulting string isn't further modified. + * + * @param {import('./types.js').Fetched} fetched + * @param {(name: string, value: string) => boolean} filter + * @param {boolean} [prerendering] + * @returns {string} The raw HTML of a script element carrying the JSON payload. + * @example const html = serialize_data('/data.json', null, { foo: 'bar' }); + */ +export function serialize_data(fetched, filter, prerendering = false) { + /** @type {Record} */ + const headers = {}; + + let cache_control = null; + let age = null; + let varyAny = false; + + for (const [key, value] of fetched.response.headers) { + if (filter(key, value)) { + headers[key] = value; + } + + if (key === 'cache-control') cache_control = value; + else if (key === 'age') age = value; + else if (key === 'vary' && value.trim() === '*') varyAny = true; + } + + const payload = { + status: fetched.response.status, + statusText: fetched.response.statusText, + headers, + body: fetched.response_body + }; + + const safe_payload = JSON.stringify(payload).replace(pattern, (match) => replacements[match]); + + const attrs = [ + 'type="application/json"', + 'data-sveltekit-fetched', + `data-url="${escape_html(fetched.url, true)}"` + ]; + + if (fetched.is_b64) { + attrs.push('data-b64'); + } + + if (fetched.request_headers || fetched.request_body) { + /** @type {import('types').StrictBody[]} */ + const values = []; + + if (fetched.request_headers) { + values.push([...new Headers(fetched.request_headers)].join(',')); + } + + if (fetched.request_body) { + values.push(fetched.request_body); + } + + attrs.push(`data-hash="${hash(...values)}"`); + } + + // Compute the time the response should be cached, taking into account max-age and age. + // Do not cache at all if a `Vary: *` header is present, as this indicates that the + // cache is likely to get busted. + if (!prerendering && fetched.method === 'GET' && cache_control && !varyAny) { + const match = /s-maxage=(\d+)/g.exec(cache_control) ?? /max-age=(\d+)/g.exec(cache_control); + if (match) { + const ttl = +match[1] - +(age ?? '0'); + attrs.push(`data-ttl="${ttl}"`); + } + } + + return ``; +} diff --git a/node_modules/@sveltejs/kit/src/runtime/server/page/server_routing.js b/node_modules/@sveltejs/kit/src/runtime/server/page/server_routing.js new file mode 100644 index 0000000..1228f0b --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/server/page/server_routing.js @@ -0,0 +1,143 @@ +import { base, assets, relative } from '__sveltekit/paths'; +import { text } from '../../../exports/index.js'; +import { s } from '../../../utils/misc.js'; +import { exec } from '../../../utils/routing.js'; +import { decode_params } from '../../../utils/url.js'; +import { get_relative_path } from '../../utils.js'; + +/** + * @param {import('types').SSRClientRoute} route + * @param {URL} url + * @param {import('@sveltejs/kit').SSRManifest} manifest + * @returns {string} + */ +export function generate_route_object(route, url, manifest) { + const { errors, layouts, leaf } = route; + + const nodes = [...errors, ...layouts.map((l) => l?.[1]), leaf[1]] + .filter((n) => typeof n === 'number') + .map((n) => `'${n}': () => ${create_client_import(manifest._.client.nodes?.[n], url)}`) + .join(',\n\t\t'); + + // stringified version of + /** @type {import('types').CSRRouteServer} */ + return [ + `{\n\tid: ${s(route.id)}`, + `errors: ${s(route.errors)}`, + `layouts: ${s(route.layouts)}`, + `leaf: ${s(route.leaf)}`, + `nodes: {\n\t\t${nodes}\n\t}\n}` + ].join(',\n\t'); +} + +/** + * @param {string | undefined} import_path + * @param {URL} url + */ +function create_client_import(import_path, url) { + if (!import_path) return 'Promise.resolve({})'; + + // During DEV, Vite will make the paths absolute (e.g. /@fs/...) + if (import_path[0] === '/') { + return `import('${import_path}')`; + } + + // During PROD, they're root-relative + if (assets !== '') { + return `import('${assets}/${import_path}')`; + } + + if (!relative) { + return `import('${base}/${import_path}')`; + } + + // Else we make them relative to the server-side route resolution request + // to support IPFS, the internet archive, etc. + let path = get_relative_path(url.pathname, `${base}/${import_path}`); + if (path[0] !== '.') path = `./${path}`; + return `import('${path}')`; +} + +/** + * @param {string} resolved_path + * @param {URL} url + * @param {import('@sveltejs/kit').SSRManifest} manifest + * @returns {Promise} + */ +export async function resolve_route(resolved_path, url, manifest) { + if (!manifest._.client.routes) { + return text('Server-side route resolution disabled', { status: 400 }); + } + + /** @type {import('types').SSRClientRoute | null} */ + let route = null; + /** @type {Record} */ + let params = {}; + + const matchers = await manifest._.matchers(); + + for (const candidate of manifest._.client.routes) { + const match = candidate.pattern.exec(resolved_path); + if (!match) continue; + + const matched = exec(match, candidate.params, matchers); + if (matched) { + route = candidate; + params = decode_params(matched); + break; + } + } + + return create_server_routing_response(route, params, url, manifest).response; +} + +/** + * @param {import('types').SSRClientRoute | null} route + * @param {Partial>} params + * @param {URL} url + * @param {import('@sveltejs/kit').SSRManifest} manifest + * @returns {{response: Response, body: string}} + */ +export function create_server_routing_response(route, params, url, manifest) { + const headers = new Headers({ + 'content-type': 'application/javascript; charset=utf-8' + }); + + if (route) { + const csr_route = generate_route_object(route, url, manifest); + const body = `${create_css_import(route, url, manifest)}\nexport const route = ${csr_route}; export const params = ${JSON.stringify(params)};`; + + return { response: text(body, { headers }), body }; + } else { + return { response: text('', { headers }), body: '' }; + } +} + +/** + * This function generates the client-side import for the CSS files that are + * associated with the current route. Vite takes care of that when using + * client-side route resolution, but for server-side resolution it does + * not know about the CSS files automatically. + * + * @param {import('types').SSRClientRoute} route + * @param {URL} url + * @param {import('@sveltejs/kit').SSRManifest} manifest + * @returns {string} + */ +function create_css_import(route, url, manifest) { + const { errors, layouts, leaf } = route; + + let css = ''; + + for (const node of [...errors, ...layouts.map((l) => l?.[1]), leaf[1]]) { + if (typeof node !== 'number') continue; + const node_css = manifest._.client.css?.[node]; + for (const css_path of node_css ?? []) { + css += `'${assets || base}/${css_path}',`; + } + } + + if (!css) return ''; + + return `${create_client_import(/** @type {string} */ (manifest._.client.start), url)}.then(x => x.load_css([${css}]));`; +} diff --git a/node_modules/@sveltejs/kit/src/runtime/server/page/types.d.ts b/node_modules/@sveltejs/kit/src/runtime/server/page/types.d.ts new file mode 100644 index 0000000..7e501b1 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/server/page/types.d.ts @@ -0,0 +1,36 @@ +import { CookieSerializeOptions } from 'cookie'; +import { SSRNode, CspDirectives, ServerDataNode } from 'types'; + +export interface Fetched { + url: string; + method: string; + request_body?: string | ArrayBufferView | null; + request_headers?: HeadersInit | undefined; + response_body: string; + response: Response; + is_b64?: boolean; +} + +export type Loaded = { + node: SSRNode; + data: Record | null; + server_data: ServerDataNode | null; +}; + +type CspMode = 'hash' | 'nonce' | 'auto'; + +export interface CspConfig { + mode: CspMode; + directives: CspDirectives; + reportOnly: CspDirectives; +} + +export interface CspOpts { + prerender: boolean; +} + +export interface Cookie { + name: string; + value: string; + options: CookieSerializeOptions & { path: string }; +} diff --git a/node_modules/@sveltejs/kit/src/runtime/server/respond.js b/node_modules/@sveltejs/kit/src/runtime/server/respond.js new file mode 100644 index 0000000..ad94597 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/server/respond.js @@ -0,0 +1,622 @@ +import { DEV } from 'esm-env'; +import { base, app_dir } from '__sveltekit/paths'; +import { is_endpoint_request, render_endpoint } from './endpoint.js'; +import { render_page } from './page/index.js'; +import { render_response } from './page/render.js'; +import { respond_with_error } from './page/respond_with_error.js'; +import { is_form_content_type } from '../../utils/http.js'; +import { + handle_fatal_error, + has_prerendered_path, + method_not_allowed, + redirect_response +} from './utils.js'; +import { decode_pathname, decode_params, disable_search, normalize_path } from '../../utils/url.js'; +import { exec } from '../../utils/routing.js'; +import { redirect_json_response, render_data } from './data/index.js'; +import { add_cookies_to_headers, get_cookies } from './cookie.js'; +import { create_fetch } from './fetch.js'; +import { PageNodes } from '../../utils/page_nodes.js'; +import { HttpError, Redirect, SvelteKitError } from '../control.js'; +import { validate_server_exports } from '../../utils/exports.js'; +import { json, text } from '../../exports/index.js'; +import { action_json_redirect, is_action_json_request } from './page/actions.js'; +import { INVALIDATED_PARAM, TRAILING_SLASH_PARAM } from '../shared.js'; +import { get_public_env } from './env_module.js'; +import { resolve_route } from './page/server_routing.js'; +import { validateHeaders } from './validate-headers.js'; +import { + add_data_suffix, + add_resolution_suffix, + has_data_suffix, + has_resolution_suffix, + strip_data_suffix, + strip_resolution_suffix +} from '../pathname.js'; +import { with_event } from '../app/server/event.js'; + +/* global __SVELTEKIT_ADAPTER_NAME__ */ +/* global __SVELTEKIT_DEV__ */ + +/** @type {import('types').RequiredResolveOptions['transformPageChunk']} */ +const default_transform = ({ html }) => html; + +/** @type {import('types').RequiredResolveOptions['filterSerializedResponseHeaders']} */ +const default_filter = () => false; + +/** @type {import('types').RequiredResolveOptions['preload']} */ +const default_preload = ({ type }) => type === 'js' || type === 'css'; + +const page_methods = new Set(['GET', 'HEAD', 'POST']); + +const allowed_page_methods = new Set(['GET', 'HEAD', 'OPTIONS']); + +/** + * @param {Request} request + * @param {import('types').SSROptions} options + * @param {import('@sveltejs/kit').SSRManifest} manifest + * @param {import('types').SSRState} state + * @returns {Promise} + */ +export async function respond(request, options, manifest, state) { + /** URL but stripped from the potential `/__data.json` suffix and its search param */ + const url = new URL(request.url); + + if (options.csrf_check_origin) { + const forbidden = + is_form_content_type(request) && + (request.method === 'POST' || + request.method === 'PUT' || + request.method === 'PATCH' || + request.method === 'DELETE') && + request.headers.get('origin') !== url.origin; + + if (forbidden) { + const csrf_error = new HttpError( + 403, + `Cross-site ${request.method} form submissions are forbidden` + ); + if (request.headers.get('accept') === 'application/json') { + return json(csrf_error.body, { status: csrf_error.status }); + } + return text(csrf_error.body.message, { status: csrf_error.status }); + } + } + + if (options.hash_routing && url.pathname !== base + '/' && url.pathname !== '/[fallback]') { + return text('Not found', { status: 404 }); + } + + /** @type {boolean[] | undefined} */ + let invalidated_data_nodes; + + /** + * If the request is for a route resolution, first modify the URL, then continue as normal + * for path resolution, then return the route object as a JS file. + */ + const is_route_resolution_request = has_resolution_suffix(url.pathname); + const is_data_request = has_data_suffix(url.pathname); + + if (is_route_resolution_request) { + url.pathname = strip_resolution_suffix(url.pathname); + } else if (is_data_request) { + url.pathname = + strip_data_suffix(url.pathname) + + (url.searchParams.get(TRAILING_SLASH_PARAM) === '1' ? '/' : '') || '/'; + url.searchParams.delete(TRAILING_SLASH_PARAM); + invalidated_data_nodes = url.searchParams + .get(INVALIDATED_PARAM) + ?.split('') + .map((node) => node === '1'); + url.searchParams.delete(INVALIDATED_PARAM); + } + + /** @type {Record} */ + const headers = {}; + + const { cookies, new_cookies, get_cookie_header, set_internal, set_trailing_slash } = get_cookies( + request, + url + ); + + /** @type {import('@sveltejs/kit').RequestEvent} */ + const event = { + cookies, + // @ts-expect-error `fetch` needs to be created after the `event` itself + fetch: null, + getClientAddress: + state.getClientAddress || + (() => { + throw new Error( + `${__SVELTEKIT_ADAPTER_NAME__} does not specify getClientAddress. Please raise an issue` + ); + }), + locals: {}, + params: {}, + platform: state.platform, + request, + route: { id: null }, + setHeaders: (new_headers) => { + if (__SVELTEKIT_DEV__) { + validateHeaders(new_headers); + } + + for (const key in new_headers) { + const lower = key.toLowerCase(); + const value = new_headers[key]; + + if (lower === 'set-cookie') { + throw new Error( + 'Use `event.cookies.set(name, value, options)` instead of `event.setHeaders` to set cookies' + ); + } else if (lower in headers) { + throw new Error(`"${key}" header is already set`); + } else { + headers[lower] = value; + + if (state.prerendering && lower === 'cache-control') { + state.prerendering.cache = /** @type {string} */ (value); + } + } + } + }, + url, + isDataRequest: is_data_request, + isSubRequest: state.depth > 0 + }; + + event.fetch = create_fetch({ + event, + options, + manifest, + state, + get_cookie_header, + set_internal + }); + + if (state.emulator?.platform) { + event.platform = await state.emulator.platform({ + config: {}, + prerender: !!state.prerendering?.fallback + }); + } + + let resolved_path; + + const prerendering_reroute_state = state.prerendering?.inside_reroute; + try { + // For the duration or a reroute, disable the prerendering state as reroute could call API endpoints + // which would end up in the wrong logic path if not disabled. + if (state.prerendering) state.prerendering.inside_reroute = true; + + // reroute could alter the given URL, so we pass a copy + resolved_path = + (await options.hooks.reroute({ url: new URL(url), fetch: event.fetch })) ?? url.pathname; + } catch { + return text('Internal Server Error', { + status: 500 + }); + } finally { + if (state.prerendering) state.prerendering.inside_reroute = prerendering_reroute_state; + } + + try { + resolved_path = decode_pathname(resolved_path); + } catch { + return text('Malformed URI', { status: 400 }); + } + + if ( + resolved_path !== url.pathname && + !state.prerendering?.fallback && + has_prerendered_path(manifest, resolved_path) + ) { + const url = new URL(request.url); + url.pathname = is_data_request + ? add_data_suffix(resolved_path) + : is_route_resolution_request + ? add_resolution_suffix(resolved_path) + : resolved_path; + + // `fetch` automatically decodes the body, so we need to delete the related headers to not break the response + // Also see https://github.com/sveltejs/kit/issues/12197 for more info (we should fix this more generally at some point) + const response = await fetch(url, request); + const headers = new Headers(response.headers); + if (headers.has('content-encoding')) { + headers.delete('content-encoding'); + headers.delete('content-length'); + } + + return new Response(response.body, { + headers, + status: response.status, + statusText: response.statusText + }); + } + + /** @type {import('types').SSRRoute | null} */ + let route = null; + + if (base && !state.prerendering?.fallback) { + if (!resolved_path.startsWith(base)) { + return text('Not found', { status: 404 }); + } + resolved_path = resolved_path.slice(base.length) || '/'; + } + + if (is_route_resolution_request) { + return resolve_route(resolved_path, new URL(request.url), manifest); + } + + if (resolved_path === `/${app_dir}/env.js`) { + return get_public_env(request); + } + + if (resolved_path.startsWith(`/${app_dir}`)) { + // Ensure that 404'd static assets are not cached - some adapters might apply caching by default + const headers = new Headers(); + headers.set('cache-control', 'public, max-age=0, must-revalidate'); + return text('Not found', { status: 404, headers }); + } + + if (!state.prerendering?.fallback) { + // TODO this could theoretically break — should probably be inside a try-catch + const matchers = await manifest._.matchers(); + + for (const candidate of manifest._.routes) { + const match = candidate.pattern.exec(resolved_path); + if (!match) continue; + + const matched = exec(match, candidate.params, matchers); + if (matched) { + route = candidate; + event.route = { id: route.id }; + event.params = decode_params(matched); + break; + } + } + } + + /** @type {import('types').RequiredResolveOptions} */ + let resolve_opts = { + transformPageChunk: default_transform, + filterSerializedResponseHeaders: default_filter, + preload: default_preload + }; + + /** @type {import('types').TrailingSlash} */ + let trailing_slash = 'never'; + + try { + /** @type {PageNodes | undefined} */ + const page_nodes = route?.page + ? new PageNodes(await load_page_nodes(route.page, manifest)) + : undefined; + + // determine whether we need to redirect to add/remove a trailing slash + if (route) { + // if `paths.base === '/a/b/c`, then the root route is `/a/b/c/`, + // regardless of the `trailingSlash` route option + if (url.pathname === base || url.pathname === base + '/') { + trailing_slash = 'always'; + } else if (page_nodes) { + if (DEV) { + page_nodes.validate(); + } + trailing_slash = page_nodes.trailing_slash(); + } else if (route.endpoint) { + const node = await route.endpoint(); + trailing_slash = node.trailingSlash ?? 'never'; + if (DEV) { + validate_server_exports(node, /** @type {string} */ (route.endpoint_id)); + } + } + + if (!is_data_request) { + const normalized = normalize_path(url.pathname, trailing_slash); + + if (normalized !== url.pathname && !state.prerendering?.fallback) { + return new Response(undefined, { + status: 308, + headers: { + 'x-sveltekit-normalize': '1', + location: + // ensure paths starting with '//' are not treated as protocol-relative + (normalized.startsWith('//') ? url.origin + normalized : normalized) + + (url.search === '?' ? '' : url.search) + } + }); + } + } + + if (state.before_handle || state.emulator?.platform) { + let config = {}; + + /** @type {import('types').PrerenderOption} */ + let prerender = false; + + if (route.endpoint) { + const node = await route.endpoint(); + config = node.config ?? config; + prerender = node.prerender ?? prerender; + } else if (page_nodes) { + config = page_nodes.get_config() ?? config; + prerender = page_nodes.prerender(); + } + + if (state.before_handle) { + state.before_handle(event, config, prerender); + } + + if (state.emulator?.platform) { + event.platform = await state.emulator.platform({ config, prerender }); + } + } + } + + set_trailing_slash(trailing_slash); + + if (state.prerendering && !state.prerendering.fallback && !state.prerendering.inside_reroute) { + disable_search(url); + } + + const response = await with_event(event, () => + options.hooks.handle({ + event, + resolve: (event, opts) => + // counter-intuitively, we need to clear the event, so that it's not + // e.g. accessible when loading modules needed to handle the request + with_event(null, () => + resolve(event, page_nodes, opts).then((response) => { + // add headers/cookies here, rather than inside `resolve`, so that we + // can do it once for all responses instead of once per `return` + for (const key in headers) { + const value = headers[key]; + response.headers.set(key, /** @type {string} */ (value)); + } + + add_cookies_to_headers(response.headers, Object.values(new_cookies)); + + if (state.prerendering && event.route.id !== null) { + response.headers.set('x-sveltekit-routeid', encodeURI(event.route.id)); + } + + return response; + }) + ) + }) + ); + + // respond with 304 if etag matches + if (response.status === 200 && response.headers.has('etag')) { + let if_none_match_value = request.headers.get('if-none-match'); + + // ignore W/ prefix https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match#directives + if (if_none_match_value?.startsWith('W/"')) { + if_none_match_value = if_none_match_value.substring(2); + } + + const etag = /** @type {string} */ (response.headers.get('etag')); + + if (if_none_match_value === etag) { + const headers = new Headers({ etag }); + + // https://datatracker.ietf.org/doc/html/rfc7232#section-4.1 + set-cookie + for (const key of [ + 'cache-control', + 'content-location', + 'date', + 'expires', + 'vary', + 'set-cookie' + ]) { + const value = response.headers.get(key); + if (value) headers.set(key, value); + } + + return new Response(undefined, { + status: 304, + headers + }); + } + } + + // Edge case: If user does `return Response(30x)` in handle hook while processing a data request, + // we need to transform the redirect response to a corresponding JSON response. + if (is_data_request && response.status >= 300 && response.status <= 308) { + const location = response.headers.get('location'); + if (location) { + return redirect_json_response(new Redirect(/** @type {any} */ (response.status), location)); + } + } + + return response; + } catch (e) { + if (e instanceof Redirect) { + const response = is_data_request + ? redirect_json_response(e) + : route?.page && is_action_json_request(event) + ? action_json_redirect(e) + : redirect_response(e.status, e.location); + add_cookies_to_headers(response.headers, Object.values(new_cookies)); + return response; + } + return await handle_fatal_error(event, options, e); + } + + /** + * @param {import('@sveltejs/kit').RequestEvent} event + * @param {PageNodes | undefined} page_nodes + * @param {import('@sveltejs/kit').ResolveOptions} [opts] + */ + async function resolve(event, page_nodes, opts) { + try { + if (opts) { + resolve_opts = { + transformPageChunk: opts.transformPageChunk || default_transform, + filterSerializedResponseHeaders: opts.filterSerializedResponseHeaders || default_filter, + preload: opts.preload || default_preload + }; + } + + if (options.hash_routing || state.prerendering?.fallback) { + return await render_response({ + event, + options, + manifest, + state, + page_config: { ssr: false, csr: true }, + status: 200, + error: null, + branch: [], + fetched: [], + resolve_opts + }); + } + + if (route) { + const method = /** @type {import('types').HttpMethod} */ (event.request.method); + + /** @type {Response} */ + let response; + + if (is_data_request) { + response = await render_data( + event, + route, + options, + manifest, + state, + invalidated_data_nodes, + trailing_slash + ); + } else if (route.endpoint && (!route.page || is_endpoint_request(event))) { + response = await render_endpoint(event, await route.endpoint(), state); + } else if (route.page) { + if (!page_nodes) { + throw new Error('page_nodes not found. This should never happen'); + } else if (page_methods.has(method)) { + response = await render_page( + event, + route.page, + options, + manifest, + state, + page_nodes, + resolve_opts + ); + } else { + const allowed_methods = new Set(allowed_page_methods); + const node = await manifest._.nodes[route.page.leaf](); + if (node?.server?.actions) { + allowed_methods.add('POST'); + } + + if (method === 'OPTIONS') { + // This will deny CORS preflight requests implicitly because we don't + // add the required CORS headers to the response. + response = new Response(null, { + status: 204, + headers: { + allow: Array.from(allowed_methods.values()).join(', ') + } + }); + } else { + const mod = [...allowed_methods].reduce((acc, curr) => { + acc[curr] = true; + return acc; + }, /** @type {Record} */ ({})); + response = method_not_allowed(mod, method); + } + } + } else { + // a route will always have a page or an endpoint, but TypeScript doesn't know that + throw new Error('Route is neither page nor endpoint. This should never happen'); + } + + // If the route contains a page and an endpoint, we need to add a + // `Vary: Accept` header to the response because of browser caching + if (request.method === 'GET' && route.page && route.endpoint) { + const vary = response.headers + .get('vary') + ?.split(',') + ?.map((v) => v.trim().toLowerCase()); + if (!(vary?.includes('accept') || vary?.includes('*'))) { + // the returned response might have immutable headers, + // so we have to clone them before trying to mutate them + response = new Response(response.body, { + status: response.status, + statusText: response.statusText, + headers: new Headers(response.headers) + }); + response.headers.append('Vary', 'Accept'); + } + } + + return response; + } + + if (state.error && event.isSubRequest) { + // avoid overwriting the headers. This could be a same origin fetch request + // to an external service from the root layout while rendering an error page + const headers = new Headers(request.headers); + headers.set('x-sveltekit-error', 'true'); + return await fetch(request, { headers }); + } + + if (state.error) { + return text('Internal Server Error', { + status: 500 + }); + } + + // if this request came direct from the user, rather than + // via our own `fetch`, render a 404 page + if (state.depth === 0) { + return await respond_with_error({ + event, + options, + manifest, + state, + status: 404, + error: new SvelteKitError(404, 'Not Found', `Not found: ${event.url.pathname}`), + resolve_opts + }); + } + + if (state.prerendering) { + return text('not found', { status: 404 }); + } + + // we can't load the endpoint from our own manifest, + // so we need to make an actual HTTP request + return await fetch(request); + } catch (e) { + // TODO if `e` is instead named `error`, some fucked up Vite transformation happens + // and I don't even know how to describe it. need to investigate at some point + + // HttpError from endpoint can end up here - TODO should it be handled there instead? + return await handle_fatal_error(event, options, e); + } finally { + event.cookies.set = () => { + throw new Error('Cannot use `cookies.set(...)` after the response has been generated'); + }; + + event.setHeaders = () => { + throw new Error('Cannot use `setHeaders(...)` after the response has been generated'); + }; + } + } +} + +/** + * @param {import('types').PageNodeIndexes} page + * @param {import('@sveltejs/kit').SSRManifest} manifest + */ +export function load_page_nodes(page, manifest) { + return Promise.all([ + // we use == here rather than === because [undefined] serializes as "[null]" + ...page.layouts.map((n) => (n == undefined ? n : manifest._.nodes[n]())), + manifest._.nodes[page.leaf]() + ]); +} diff --git a/node_modules/@sveltejs/kit/src/runtime/server/utils.js b/node_modules/@sveltejs/kit/src/runtime/server/utils.js new file mode 100644 index 0000000..880e966 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/server/utils.js @@ -0,0 +1,182 @@ +import { DEV } from 'esm-env'; +import { json, text } from '../../exports/index.js'; +import { coalesce_to_error, get_message, get_status } from '../../utils/error.js'; +import { negotiate } from '../../utils/http.js'; +import { HttpError } from '../control.js'; +import { fix_stack_trace } from '../shared-server.js'; +import { ENDPOINT_METHODS } from '../../constants.js'; +import { escape_html } from '../../utils/escape.js'; +import { with_event } from '../app/server/event.js'; + +/** @param {any} body */ +export function is_pojo(body) { + if (typeof body !== 'object') return false; + + if (body) { + if (body instanceof Uint8Array) return false; + if (body instanceof ReadableStream) return false; + } + + return true; +} + +/** + * @param {Partial>} mod + * @param {import('types').HttpMethod} method + */ +export function method_not_allowed(mod, method) { + return text(`${method} method not allowed`, { + status: 405, + headers: { + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405 + // "The server must generate an Allow header field in a 405 status code response" + allow: allowed_methods(mod).join(', ') + } + }); +} + +/** @param {Partial>} mod */ +export function allowed_methods(mod) { + const allowed = ENDPOINT_METHODS.filter((method) => method in mod); + + if ('GET' in mod || 'HEAD' in mod) allowed.push('HEAD'); + + return allowed; +} + +/** + * Return as a response that renders the error.html + * + * @param {import('types').SSROptions} options + * @param {number} status + * @param {string} message + */ +export function static_error_page(options, status, message) { + let page = options.templates.error({ status, message: escape_html(message) }); + + if (DEV) { + // inject Vite HMR client, for easier debugging + page = page.replace('', ''); + } + + return text(page, { + headers: { 'content-type': 'text/html; charset=utf-8' }, + status + }); +} + +/** + * @param {import('@sveltejs/kit').RequestEvent} event + * @param {import('types').SSROptions} options + * @param {unknown} error + */ +export async function handle_fatal_error(event, options, error) { + error = error instanceof HttpError ? error : coalesce_to_error(error); + const status = get_status(error); + const body = await handle_error_and_jsonify(event, options, error); + + // ideally we'd use sec-fetch-dest instead, but Safari — quelle surprise — doesn't support it + const type = negotiate(event.request.headers.get('accept') || 'text/html', [ + 'application/json', + 'text/html' + ]); + + if (event.isDataRequest || type === 'application/json') { + return json(body, { + status + }); + } + + return static_error_page(options, status, body.message); +} + +/** + * @param {import('@sveltejs/kit').RequestEvent} event + * @param {import('types').SSROptions} options + * @param {any} error + * @returns {Promise} + */ +export async function handle_error_and_jsonify(event, options, error) { + if (error instanceof HttpError) { + return error.body; + } + + if (__SVELTEKIT_DEV__ && typeof error == 'object') { + fix_stack_trace(error); + } + + const status = get_status(error); + const message = get_message(error); + + return ( + (await with_event(event, () => + options.hooks.handleError({ error, event, status, message }) + )) ?? { message } + ); +} + +/** + * @param {number} status + * @param {string} location + */ +export function redirect_response(status, location) { + const response = new Response(undefined, { + status, + headers: { location } + }); + return response; +} + +/** + * @param {import('@sveltejs/kit').RequestEvent} event + * @param {Error & { path: string }} error + */ +export function clarify_devalue_error(event, error) { + if (error.path) { + return `Data returned from \`load\` while rendering ${event.route.id} is not serializable: ${error.message} (${error.path})`; + } + + if (error.path === '') { + return `Data returned from \`load\` while rendering ${event.route.id} is not a plain object`; + } + + // belt and braces — this should never happen + return error.message; +} + +/** + * @param {import('types').ServerDataNode} node + */ +export function serialize_uses(node) { + const uses = {}; + + if (node.uses && node.uses.dependencies.size > 0) { + uses.dependencies = Array.from(node.uses.dependencies); + } + + if (node.uses && node.uses.search_params.size > 0) { + uses.search_params = Array.from(node.uses.search_params); + } + + if (node.uses && node.uses.params.size > 0) { + uses.params = Array.from(node.uses.params); + } + + if (node.uses?.parent) uses.parent = 1; + if (node.uses?.route) uses.route = 1; + if (node.uses?.url) uses.url = 1; + + return uses; +} + +/** + * Returns `true` if the given path was prerendered + * @param {import('@sveltejs/kit').SSRManifest} manifest + * @param {string} pathname Should include the base and be decoded + */ +export function has_prerendered_path(manifest, pathname) { + return ( + manifest._.prerendered_routes.has(pathname) || + (pathname.at(-1) === '/' && manifest._.prerendered_routes.has(pathname.slice(0, -1))) + ); +} diff --git a/node_modules/@sveltejs/kit/src/runtime/server/validate-headers.js b/node_modules/@sveltejs/kit/src/runtime/server/validate-headers.js new file mode 100644 index 0000000..6da9785 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/server/validate-headers.js @@ -0,0 +1,64 @@ +/** @type {Set} */ +const VALID_CACHE_CONTROL_DIRECTIVES = new Set([ + 'max-age', + 'public', + 'private', + 'no-cache', + 'no-store', + 'must-revalidate', + 'proxy-revalidate', + 's-maxage', + 'immutable', + 'stale-while-revalidate', + 'stale-if-error', + 'no-transform', + 'only-if-cached', + 'max-stale', + 'min-fresh' +]); + +const CONTENT_TYPE_PATTERN = + /^(application|audio|example|font|haptics|image|message|model|multipart|text|video|x-[a-z]+)\/[-+.\w]+$/i; + +/** @type {Record void>} */ +const HEADER_VALIDATORS = { + 'cache-control': (value) => { + const error_suffix = `(While parsing "${value}".)`; + const parts = value.split(',').map((part) => part.trim()); + if (parts.some((part) => !part)) { + throw new Error(`\`cache-control\` header contains empty directives. ${error_suffix}`); + } + + const directives = parts.map((part) => part.split('=')[0].toLowerCase()); + const invalid = directives.find((directive) => !VALID_CACHE_CONTROL_DIRECTIVES.has(directive)); + if (invalid) { + throw new Error( + `Invalid cache-control directive "${invalid}". Did you mean one of: ${[...VALID_CACHE_CONTROL_DIRECTIVES].join(', ')}? ${error_suffix}` + ); + } + }, + + 'content-type': (value) => { + const type = value.split(';')[0].trim(); + const error_suffix = `(While parsing "${value}".)`; + if (!CONTENT_TYPE_PATTERN.test(type)) { + throw new Error(`Invalid content-type value "${type}". ${error_suffix}`); + } + } +}; + +/** + * @param {Record} headers + */ +export function validateHeaders(headers) { + for (const [key, value] of Object.entries(headers)) { + const validator = HEADER_VALIDATORS[key.toLowerCase()]; + try { + validator?.(value); + } catch (error) { + if (error instanceof Error) { + console.warn(`[SvelteKit] ${error.message}`); + } + } + } +} diff --git a/node_modules/@sveltejs/kit/src/runtime/shared-server.js b/node_modules/@sveltejs/kit/src/runtime/shared-server.js new file mode 100644 index 0000000..7bd6bde --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/shared-server.js @@ -0,0 +1,40 @@ +/** + * `$env/dynamic/private` + * @type {Record} + */ +export let private_env = {}; + +/** + * `$env/dynamic/public`. When prerendering, this will be a proxy that forbids reads + * @type {Record} + */ +export let public_env = {}; + +/** + * The same as `public_env`, but without the proxy. Use for `%sveltekit.env.PUBLIC_FOO%` + * @type {Record} + */ +export let safe_public_env = {}; + +/** @param {any} error */ +export let fix_stack_trace = (error) => error?.stack; + +/** @type {(environment: Record) => void} */ +export function set_private_env(environment) { + private_env = environment; +} + +/** @type {(environment: Record) => void} */ +export function set_public_env(environment) { + public_env = environment; +} + +/** @type {(environment: Record) => void} */ +export function set_safe_public_env(environment) { + safe_public_env = environment; +} + +/** @param {(error: Error) => string} value */ +export function set_fix_stack_trace(value) { + fix_stack_trace = value; +} diff --git a/node_modules/@sveltejs/kit/src/runtime/shared.js b/node_modules/@sveltejs/kit/src/runtime/shared.js new file mode 100644 index 0000000..b5c559b --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/shared.js @@ -0,0 +1,16 @@ +/** + * @param {string} route_id + * @param {string} dep + */ +export function validate_depends(route_id, dep) { + const match = /^(moz-icon|view-source|jar):/.exec(dep); + if (match) { + console.warn( + `${route_id}: Calling \`depends('${dep}')\` will throw an error in Firefox because \`${match[1]}\` is a special URI scheme` + ); + } +} + +export const INVALIDATED_PARAM = 'x-sveltekit-invalidated'; + +export const TRAILING_SLASH_PARAM = 'x-sveltekit-trailing-slash'; diff --git a/node_modules/@sveltejs/kit/src/runtime/utils.js b/node_modules/@sveltejs/kit/src/runtime/utils.js new file mode 100644 index 0000000..2da4498 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/runtime/utils.js @@ -0,0 +1,55 @@ +/** + * @param {string} text + * @returns {ArrayBufferLike} + */ +export function b64_decode(text) { + const d = atob(text); + + const u8 = new Uint8Array(d.length); + + for (let i = 0; i < d.length; i++) { + u8[i] = d.charCodeAt(i); + } + + return u8.buffer; +} + +/** + * @param {ArrayBuffer} buffer + * @returns {string} + */ +export function b64_encode(buffer) { + if (globalThis.Buffer) { + return Buffer.from(buffer).toString('base64'); + } + + const little_endian = new Uint8Array(new Uint16Array([1]).buffer)[0] > 0; + + // The Uint16Array(Uint8Array(...)) ensures the code points are padded with 0's + return btoa( + new TextDecoder(little_endian ? 'utf-16le' : 'utf-16be').decode( + new Uint16Array(new Uint8Array(buffer)) + ) + ); +} + +/** + * Like node's path.relative, but without using node + * @param {string} from + * @param {string} to + */ +export function get_relative_path(from, to) { + const from_parts = from.split(/[/\\]/); + const to_parts = to.split(/[/\\]/); + from_parts.pop(); // get dirname + + while (from_parts[0] === to_parts[0]) { + from_parts.shift(); + to_parts.shift(); + } + + let i = from_parts.length; + while (i--) from_parts[i] = '..'; + + return from_parts.concat(to_parts).join('/'); +} diff --git a/node_modules/@sveltejs/kit/src/types/ambient-private.d.ts b/node_modules/@sveltejs/kit/src/types/ambient-private.d.ts new file mode 100644 index 0000000..c98af8c --- /dev/null +++ b/node_modules/@sveltejs/kit/src/types/ambient-private.d.ts @@ -0,0 +1,29 @@ +/** Internal version of $app/environment */ +declare module '__sveltekit/environment' { + export const building: boolean; + export const prerendering: boolean; + export const version: string; + export function set_building(): void; + export function set_prerendering(): void; +} + +/** Internal version of $app/paths */ +declare module '__sveltekit/paths' { + export let base: '' | `/${string}`; + export let assets: '' | `https://${string}` | `http://${string}` | '/_svelte_kit_assets'; + export let app_dir: string; + export let relative: boolean; + export function reset(): void; + export function override(paths: { base: string; assets: string }): void; + export function set_assets(path: string): void; +} + +/** Internal version of $app/server */ +declare module '__sveltekit/server' { + import { SSRManifest } from '@sveltejs/kit'; + + export let manifest: SSRManifest; + export function read_implementation(path: string): ReadableStream; + export function set_manifest(manifest: SSRManifest): void; + export function set_read_implementation(fn: (path: string) => ReadableStream): void; +} diff --git a/node_modules/@sveltejs/kit/src/types/ambient.d.ts b/node_modules/@sveltejs/kit/src/types/ambient.d.ts new file mode 100644 index 0000000..5ab0c5b --- /dev/null +++ b/node_modules/@sveltejs/kit/src/types/ambient.d.ts @@ -0,0 +1,81 @@ +/** + * It's possible to tell SvelteKit how to type objects inside your app by declaring the `App` namespace. By default, a new project will have a file called `src/app.d.ts` containing the following: + * + * ```ts + * declare global { + * namespace App { + * // interface Error {} + * // interface Locals {} + * // interface PageData {} + * // interface PageState {} + * // interface Platform {} + * } + * } + * + * export {}; + * ``` + * + * The `export {}` line exists because without it, the file would be treated as an _ambient module_ which prevents you from adding `import` declarations. + * If you need to add ambient `declare module` declarations, do so in a separate file like `src/ambient.d.ts`. + * + * By populating these interfaces, you will gain type safety when using `event.locals`, `event.platform`, and `data` from `load` functions. + */ +declare namespace App { + /** + * Defines the common shape of expected and unexpected errors. Expected errors are thrown using the `error` function. Unexpected errors are handled by the `handleError` hooks which should return this shape. + */ + export interface Error { + message: string; + } + + /** + * The interface that defines `event.locals`, which can be accessed in server [hooks](https://svelte.dev/docs/kit/hooks) (`handle`, and `handleError`), server-only `load` functions, and `+server.js` files. + */ + export interface Locals {} + + /** + * Defines the common shape of the [page.data state](https://svelte.dev/docs/kit/$app-state#page) and [$page.data store](https://svelte.dev/docs/kit/$app-stores#page) - that is, the data that is shared between all pages. + * The `Load` and `ServerLoad` functions in `./$types` will be narrowed accordingly. + * Use optional properties for data that is only present on specific pages. Do not add an index signature (`[key: string]: any`). + */ + export interface PageData {} + + /** + * The shape of the `page.state` object, which can be manipulated using the [`pushState`](https://svelte.dev/docs/kit/$app-navigation#pushState) and [`replaceState`](https://svelte.dev/docs/kit/$app-navigation#replaceState) functions from `$app/navigation`. + */ + export interface PageState {} + + /** + * If your adapter provides [platform-specific context](https://svelte.dev/docs/kit/adapters#Platform-specific-context) via `event.platform`, you can specify it here. + */ + export interface Platform {} +} + +/** + * This module is only available to [service workers](https://svelte.dev/docs/kit/service-workers). + */ +declare module '$service-worker' { + /** + * The `base` path of the deployment. Typically this is equivalent to `config.kit.paths.base`, but it is calculated from `location.pathname` meaning that it will continue to work correctly if the site is deployed to a subdirectory. + * Note that there is a `base` but no `assets`, since service workers cannot be used if `config.kit.paths.assets` is specified. + */ + export const base: string; + /** + * An array of URL strings representing the files generated by Vite, suitable for caching with `cache.addAll(build)`. + * During development, this is an empty array. + */ + export const build: string[]; + /** + * An array of URL strings representing the files in your static directory, or whatever directory is specified by `config.kit.files.assets`. You can customize which files are included from `static` directory using [`config.kit.serviceWorker.files`](https://svelte.dev/docs/kit/configuration) + */ + export const files: string[]; + /** + * An array of pathnames corresponding to prerendered pages and endpoints. + * During development, this is an empty array. + */ + export const prerendered: string[]; + /** + * See [`config.kit.version`](https://svelte.dev/docs/kit/configuration#version). It's useful for generating unique cache names inside your service worker, so that a later deployment of your app can invalidate old caches. + */ + export const version: string; +} diff --git a/node_modules/@sveltejs/kit/src/types/global-private.d.ts b/node_modules/@sveltejs/kit/src/types/global-private.d.ts new file mode 100644 index 0000000..ab659a8 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/types/global-private.d.ts @@ -0,0 +1,28 @@ +declare global { + const __SVELTEKIT_ADAPTER_NAME__: string; + const __SVELTEKIT_APP_VERSION_FILE__: string; + const __SVELTEKIT_APP_VERSION_POLL_INTERVAL__: number; + const __SVELTEKIT_DEV__: boolean; + const __SVELTEKIT_EMBEDDED__: boolean; + /** True if `config.kit.router.resolution === 'client'` */ + const __SVELTEKIT_CLIENT_ROUTING__: boolean; + /** + * This makes the use of specific features visible at both dev and build time, in such a + * way that we can error when they are not supported by the target platform. + * + * During dev, `globalThis.__SVELTEKIT_TRACK__` is a function that grabs the current `event` + * and route `config` (from an AsyncLocalStorage instance) and calls the relevant `supports` + * function on the adapter (e.g. `adapter.supports.read(...)`). + * + * At build time, if the function containing the `__SVELTEKIT_TRACK__` call is untreeshaken, + * we locate it in the `renderChunk` build hook and a) make a note of the chunk that contains + * it and b) replace it with a comment. Later, we can use this information to establish + * which routes use which feature, and use the same `adapter.supports.read(...)` function + * to throw an error if the feature would fail in production. + */ + var __SVELTEKIT_TRACK__: (label: string) => void; + var Bun: object; + var Deno: object; +} + +export {}; diff --git a/node_modules/@sveltejs/kit/src/types/internal.d.ts b/node_modules/@sveltejs/kit/src/types/internal.d.ts new file mode 100644 index 0000000..17e2425 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/types/internal.d.ts @@ -0,0 +1,523 @@ +import { SvelteComponent } from 'svelte'; +import { + Config, + ServerLoad, + Handle, + HandleServerError, + KitConfig, + Load, + RequestHandler, + ResolveOptions, + Server, + ServerInitOptions, + HandleFetch, + Actions, + HandleClientError, + Reroute, + RequestEvent, + SSRManifest, + Emulator, + Adapter, + ServerInit, + ClientInit, + Transporter +} from '@sveltejs/kit'; +import { + HttpMethod, + MaybePromise, + PrerenderOption, + RequestOptions, + TrailingSlash +} from './private.js'; + +export interface ServerModule { + Server: typeof InternalServer; +} + +export interface ServerInternalModule { + set_assets(path: string): void; + set_building(): void; + set_manifest(manifest: SSRManifest): void; + set_prerendering(): void; + set_private_env(environment: Record): void; + set_public_env(environment: Record): void; + set_read_implementation(implementation: (path: string) => ReadableStream): void; + set_safe_public_env(environment: Record): void; + set_version(version: string): void; + set_fix_stack_trace(fix_stack_trace: (error: unknown) => string): void; +} + +export interface Asset { + file: string; + size: number; + type: string | null; +} + +export interface AssetDependencies { + assets: string[]; + file: string; + imports: string[]; + stylesheets: string[]; + fonts: string[]; + stylesheet_map: Map; assets: Set }>; +} + +export interface BuildData { + app_dir: string; + app_path: string; + manifest_data: ManifestData; + out_dir: string; + service_worker: string | null; + client: { + /** Path to the client entry point. */ + start: string; + /** Path to the generated `app.js` file that contains the client manifest. Only set in case of `bundleStrategy === 'split'`. */ + app?: string; + /** JS files that the client entry point relies on. */ + imports: string[]; + /** + * JS files that represent the entry points of the layouts/pages. + * An entry is undefined if the layout/page has no component or universal file (i.e. only has a `.server.js` file). + * Only set in case of `router.resolution === 'server'`. + */ + nodes?: Array; + /** + * CSS files referenced in the entry points of the layouts/pages. + * An entry is undefined if the layout/page has no component or universal file (i.e. only has a `.server.js` file) or if has no CSS. + * Only set in case of `router.resolution === 'server'`. + */ + css?: Array; + /** + * Contains the client route manifest in a form suitable for the server which is used for server side route resolution. + * Notably, it contains all routes, regardless of whether they are prerendered or not (those are missing in the optimized server route manifest). + * Only set in case of `router.resolution === 'server'`. + */ + routes?: SSRClientRoute[]; + stylesheets: string[]; + fonts: string[]; + uses_env_dynamic_public: boolean; + /** Only set in case of `bundleStrategy === 'inline'`. */ + inline?: { + script: string; + style: string | undefined; + }; + } | null; + server_manifest: import('vite').Manifest; +} + +export interface CSRPageNode { + component: typeof SvelteComponent; + universal: { + load?: Load; + trailingSlash?: TrailingSlash; + }; +} + +export type CSRPageNodeLoader = () => Promise; + +/** + * Definition of a client side route. + * The boolean in the tuples indicates whether the route has a server load. + */ +export type CSRRoute = { + id: string; + exec(path: string): undefined | Record; + errors: Array; + layouts: Array<[has_server_load: boolean, node_loader: CSRPageNodeLoader] | undefined>; + leaf: [has_server_load: boolean, node_loader: CSRPageNodeLoader]; +}; + +/** + * Definition of a client side route as transported via `/__route.js` when using server-side route resolution. + */ +export type CSRRouteServer = { + id: string; + errors: Array; + layouts: Array<[has_server_load: boolean, node_id: number] | undefined>; + leaf: [has_server_load: boolean, node_id: number]; + nodes: Record; +}; + +export interface Deferred { + fulfil: (value: any) => void; + reject: (error: Error) => void; +} + +export type GetParams = (match: RegExpExecArray) => Record; + +export interface ServerHooks { + handleFetch: HandleFetch; + handle: Handle; + handleError: HandleServerError; + reroute: Reroute; + transport: Record; + init?: ServerInit; +} + +export interface ClientHooks { + handleError: HandleClientError; + reroute: Reroute; + transport: Record; + init?: ClientInit; +} + +export interface Env { + private: Record; + public: Record; +} + +export class InternalServer extends Server { + init(options: ServerInitOptions): Promise; + respond( + request: Request, + options: RequestOptions & { + prerendering?: PrerenderOptions; + read: (file: string) => Buffer; + /** A hook called before `handle` during dev, so that `AsyncLocalStorage` can be populated. */ + before_handle?: (event: RequestEvent, config: any, prerender: PrerenderOption) => void; + emulator?: Emulator; + } + ): Promise; +} + +export interface ManifestData { + /** Static files from `kit.config.files.assets`. */ + assets: Asset[]; + hooks: { + client: string | null; + server: string | null; + universal: string | null; + }; + nodes: PageNode[]; + routes: RouteData[]; + matchers: Record; +} + +export interface PageNode { + depth: number; + /** The `+page/layout.svelte`. */ + component?: string; // TODO supply default component if it's missing (bit of an edge case) + /** The `+page/layout.js/.ts`. */ + universal?: string; + /** The `+page/layout.server.js/ts`. */ + server?: string; + parent_id?: string; + parent?: PageNode; + /** Filled with the pages that reference this layout (if this is a layout). */ + child_pages?: PageNode[]; +} + +export interface PrerenderDependency { + response: Response; + body: null | string | Uint8Array; +} + +export interface PrerenderOptions { + cache?: string; // including this here is a bit of a hack, but it makes it easy to add + fallback?: boolean; + dependencies: Map; + /** True for the duration of a call to the `reroute` hook */ + inside_reroute?: boolean; +} + +export type RecursiveRequired = { + // Recursive implementation of TypeScript's Required utility type. + // Will recursively continue until it reaches a primitive or Function + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + [K in keyof T]-?: Extract extends never // If it does not have a Function type + ? RecursiveRequired // recursively continue through. + : T[K]; // Use the exact type for everything else +}; + +export type RequiredResolveOptions = Required; + +export interface RouteParam { + name: string; + matcher: string; + optional: boolean; + rest: boolean; + chained: boolean; +} + +/** + * Represents a route segment in the app. It can either be an intermediate node + * with only layout/error pages, or a leaf, at which point either `page` and `leaf` + * or `endpoint` is set. + */ +export interface RouteData { + id: string; + parent: RouteData | null; + + segment: string; + pattern: RegExp; + params: RouteParam[]; + + layout: PageNode | null; + error: PageNode | null; + leaf: PageNode | null; + + page: { + layouts: Array; + errors: Array; + leaf: number; + } | null; + + endpoint: { + file: string; + } | null; +} + +export type ServerRedirectNode = { + type: 'redirect'; + location: string; +}; + +export type ServerNodesResponse = { + type: 'data'; + /** + * If `null`, then there was no load function <- TODO is this outdated now with the recent changes? + */ + nodes: Array; +}; + +export type ServerDataResponse = ServerRedirectNode | ServerNodesResponse; + +/** + * Signals a successful response of the server `load` function. + * The `uses` property tells the client when it's possible to reuse this data + * in a subsequent request. + */ +export interface ServerDataNode { + type: 'data'; + /** + * The serialized version of this contains a serialized representation of any deferred promises, + * which will be resolved later through chunk nodes. + */ + data: Record | null; + uses: Uses; + slash?: TrailingSlash; +} + +/** + * Resolved data/error of a deferred promise. + */ +export interface ServerDataChunkNode { + type: 'chunk'; + id: number; + data?: Record; + error?: any; +} + +/** + * Signals that the server `load` function was not run, and the + * client should use what it has in memory. + */ +export interface ServerDataSkippedNode { + type: 'skip'; +} + +/** + * Signals that the server `load` function failed. + */ +export interface ServerErrorNode { + type: 'error'; + error: App.Error; + /** + * Only set for HttpErrors. + */ + status?: number; +} + +export interface ServerMetadataRoute { + config: any; + api: { + methods: Array; + }; + page: { + methods: Array<'GET' | 'POST'>; + }; + methods: Array; + prerender: PrerenderOption | undefined; + entries: string[] | undefined; +} + +export interface ServerMetadata { + nodes: Array<{ + /** Also `true` when using `trailingSlash`, because we need to do a server request in that case to get its value. */ + has_server_load: boolean; + }>; + routes: Map; +} + +export interface SSRComponent { + default: { + render( + props: Record, + opts: { context: Map } + ): { + html: string; + head: string; + css: { + code: string; + map: any; // TODO + }; + }; + }; +} + +export type SSRComponentLoader = () => Promise; + +export interface UniversalNode { + load?: Load; + prerender?: PrerenderOption; + ssr?: boolean; + csr?: boolean; + trailingSlash?: TrailingSlash; + config?: any; + entries?: PrerenderEntryGenerator; +} + +export interface ServerNode { + load?: ServerLoad; + prerender?: PrerenderOption; + ssr?: boolean; + csr?: boolean; + trailingSlash?: TrailingSlash; + actions?: Actions; + config?: any; + entries?: PrerenderEntryGenerator; +} + +export interface SSRNode { + /** index into the `nodes` array in the generated `client/app.js`. */ + index: number; + /** external JS files that are loaded on the client. `imports[0]` is the entry point (e.g. `client/nodes/0.js`) */ + imports: string[]; + /** external CSS files that are loaded on the client */ + stylesheets: string[]; + /** external font files that are loaded on the client */ + fonts: string[]; + + universal_id?: string; + server_id?: string; + + /** inlined styles */ + inline_styles?(): MaybePromise>; + /** Svelte component */ + component?: SSRComponentLoader; + /** +page.js or +layout.js */ + universal?: UniversalNode; + /** +page.server.js, +layout.server.js, or +server.js */ + server?: ServerNode; +} + +export type SSRNodeLoader = () => Promise; + +export interface SSROptions { + app_template_contains_nonce: boolean; + csp: ValidatedConfig['kit']['csp']; + csrf_check_origin: boolean; + embedded: boolean; + env_public_prefix: string; + env_private_prefix: string; + hash_routing: boolean; + hooks: ServerHooks; + preload_strategy: ValidatedConfig['kit']['output']['preloadStrategy']; + root: SSRComponent['default']; + service_worker: boolean; + templates: { + app(values: { + head: string; + body: string; + assets: string; + nonce: string; + env: Record; + }): string; + error(values: { message: string; status: number }): string; + }; + version_hash: string; +} + +export interface PageNodeIndexes { + errors: Array; + layouts: Array; + leaf: number; +} + +export type PrerenderEntryGenerator = () => MaybePromise>>; + +export type SSREndpoint = Partial> & { + prerender?: PrerenderOption; + trailingSlash?: TrailingSlash; + config?: any; + entries?: PrerenderEntryGenerator; + fallback?: RequestHandler; +}; + +export interface SSRRoute { + id: string; + pattern: RegExp; + params: RouteParam[]; + page: PageNodeIndexes | null; + endpoint: (() => Promise) | null; + endpoint_id?: string; +} + +export interface SSRClientRoute { + id: string; + pattern: RegExp; + params: RouteParam[]; + errors: Array; + layouts: Array<[has_server_load: boolean, node_id: number] | undefined>; + leaf: [has_server_load: boolean, node_id: number]; +} + +export interface SSRState { + fallback?: string; + getClientAddress(): string; + /** + * True if we're currently attempting to render an error page. + */ + error: boolean; + /** + * Allows us to prevent `event.fetch` from making infinitely looping internal requests. + */ + depth: number; + platform?: any; + prerendering?: PrerenderOptions; + /** + * When fetching data from a +server.js endpoint in `load`, the page's + * prerender option is inherited by the endpoint, unless overridden. + */ + prerender_default?: PrerenderOption; + read?: (file: string) => Buffer; + /** + * Used to setup `__SVELTEKIT_TRACK__` which checks if a used feature is supported. + * E.g. if `read` from `$app/server` is used, it checks whether the route's config is compatible. + */ + before_handle?: (event: RequestEvent, config: any, prerender: PrerenderOption) => void; + emulator?: Emulator; +} + +export type StrictBody = string | ArrayBufferView; + +export interface Uses { + dependencies: Set; + params: Set; + parent: boolean; + route: boolean; + url: boolean; + search_params: Set; +} + +export type ValidatedConfig = Config & { + kit: ValidatedKitConfig; + extensions: string[]; +}; + +export type ValidatedKitConfig = Omit, 'adapter'> & { + adapter?: Adapter; +}; + +export * from '../exports/index.js'; +export * from './private.js'; diff --git a/node_modules/@sveltejs/kit/src/types/private.d.ts b/node_modules/@sveltejs/kit/src/types/private.d.ts new file mode 100644 index 0000000..0207a8f --- /dev/null +++ b/node_modules/@sveltejs/kit/src/types/private.d.ts @@ -0,0 +1,234 @@ +// This module contains types that are visible in the documentation, +// but which cannot be imported from `@sveltejs/kit`. Care should +// be taken to avoid breaking changes when editing this file + +import { RouteDefinition } from '@sveltejs/kit'; + +export interface AdapterEntry { + /** + * A string that uniquely identifies an HTTP service (e.g. serverless function) and is used for deduplication. + * For example, `/foo/a-[b]` and `/foo/[c]` are different routes, but would both + * be represented in a Netlify _redirects file as `/foo/:param`, so they share an ID + */ + id: string; + + /** + * A function that compares the candidate route with the current route to determine + * if it should be grouped with the current route. + * + * Use cases: + * - Fallback pages: `/foo/[c]` is a fallback for `/foo/a-[b]`, and `/[...catchall]` is a fallback for all routes + * - Grouping routes that share a common `config`: `/foo` should be deployed to the edge, `/bar` and `/baz` should be deployed to a serverless function + */ + filter(route: RouteDefinition): boolean; + + /** + * A function that is invoked once the entry has been created. This is where you + * should write the function to the filesystem and generate redirect manifests. + */ + complete(entry: { generateManifest(opts: { relativePath: string }): string }): MaybePromise; +} + +// Based on https://github.com/josh-hemphill/csp-typed-directives/blob/latest/src/csp.types.ts +// +// MIT License +// +// Copyright (c) 2021-present, Joshua Hemphill +// Copyright (c) 2021, Tecnico Corporation +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +export namespace Csp { + type ActionSource = 'strict-dynamic' | 'report-sample'; + type BaseSource = + | 'self' + | 'unsafe-eval' + | 'unsafe-hashes' + | 'unsafe-inline' + | 'wasm-unsafe-eval' + | 'none'; + type CryptoSource = `${'nonce' | 'sha256' | 'sha384' | 'sha512'}-${string}`; + type FrameSource = HostSource | SchemeSource | 'self' | 'none'; + type HostNameScheme = `${string}.${string}` | 'localhost'; + type HostSource = `${HostProtocolSchemes}${HostNameScheme}${PortScheme}`; + type HostProtocolSchemes = `${string}://` | ''; + type HttpDelineator = '/' | '?' | '#' | '\\'; + type PortScheme = `:${number}` | '' | ':*'; + type SchemeSource = 'http:' | 'https:' | 'data:' | 'mediastream:' | 'blob:' | 'filesystem:'; + type Source = HostSource | SchemeSource | CryptoSource | BaseSource; + type Sources = Source[]; +} + +export interface CspDirectives { + 'child-src'?: Csp.Sources; + 'default-src'?: Array; + 'frame-src'?: Csp.Sources; + 'worker-src'?: Csp.Sources; + 'connect-src'?: Csp.Sources; + 'font-src'?: Csp.Sources; + 'img-src'?: Csp.Sources; + 'manifest-src'?: Csp.Sources; + 'media-src'?: Csp.Sources; + 'object-src'?: Csp.Sources; + 'prefetch-src'?: Csp.Sources; + 'script-src'?: Array; + 'script-src-elem'?: Csp.Sources; + 'script-src-attr'?: Csp.Sources; + 'style-src'?: Array; + 'style-src-elem'?: Csp.Sources; + 'style-src-attr'?: Csp.Sources; + 'base-uri'?: Array; + sandbox?: Array< + | 'allow-downloads-without-user-activation' + | 'allow-forms' + | 'allow-modals' + | 'allow-orientation-lock' + | 'allow-pointer-lock' + | 'allow-popups' + | 'allow-popups-to-escape-sandbox' + | 'allow-presentation' + | 'allow-same-origin' + | 'allow-scripts' + | 'allow-storage-access-by-user-activation' + | 'allow-top-navigation' + | 'allow-top-navigation-by-user-activation' + >; + 'form-action'?: Array; + 'frame-ancestors'?: Array; + 'navigate-to'?: Array; + 'report-uri'?: string[]; + 'report-to'?: string[]; + + 'require-trusted-types-for'?: Array<'script'>; + 'trusted-types'?: Array<'none' | 'allow-duplicates' | '*' | string>; + 'upgrade-insecure-requests'?: boolean; + + /** @deprecated */ + 'require-sri-for'?: Array<'script' | 'style' | 'script style'>; + + /** @deprecated */ + 'block-all-mixed-content'?: boolean; + + /** @deprecated */ + 'plugin-types'?: Array<`${string}/${string}` | 'none'>; + + /** @deprecated */ + referrer?: Array< + | 'no-referrer' + | 'no-referrer-when-downgrade' + | 'origin' + | 'origin-when-cross-origin' + | 'same-origin' + | 'strict-origin' + | 'strict-origin-when-cross-origin' + | 'unsafe-url' + | 'none' + >; +} + +export type HttpMethod = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTIONS'; + +export interface Logger { + (msg: string): void; + success(msg: string): void; + error(msg: string): void; + warn(msg: string): void; + minor(msg: string): void; + info(msg: string): void; +} + +export type MaybePromise = T | Promise; + +export interface Prerendered { + /** + * A map of `path` to `{ file }` objects, where a path like `/foo` corresponds to `foo.html` and a path like `/bar/` corresponds to `bar/index.html`. + */ + pages: Map< + string, + { + /** The location of the .html file relative to the output directory */ + file: string; + } + >; + /** + * A map of `path` to `{ type }` objects. + */ + assets: Map< + string, + { + /** The MIME type of the asset */ + type: string; + } + >; + /** + * A map of redirects encountered during prerendering. + */ + redirects: Map< + string, + { + status: number; + location: string; + } + >; + /** An array of prerendered paths (without trailing slashes, regardless of the trailingSlash config) */ + paths: string[]; +} + +export interface PrerenderHttpErrorHandler { + (details: { + status: number; + path: string; + referrer: string | null; + referenceType: 'linked' | 'fetched'; + message: string; + }): void; +} + +export interface PrerenderMissingIdHandler { + (details: { path: string; id: string; referrers: string[]; message: string }): void; +} + +export interface PrerenderEntryGeneratorMismatchHandler { + (details: { generatedFromId: string; entry: string; matchedId: string; message: string }): void; +} + +export type PrerenderHttpErrorHandlerValue = 'fail' | 'warn' | 'ignore' | PrerenderHttpErrorHandler; +export type PrerenderMissingIdHandlerValue = 'fail' | 'warn' | 'ignore' | PrerenderMissingIdHandler; +export type PrerenderEntryGeneratorMismatchHandlerValue = + | 'fail' + | 'warn' + | 'ignore' + | PrerenderEntryGeneratorMismatchHandler; + +export type PrerenderOption = boolean | 'auto'; + +export type PrerenderMap = Map; + +export interface RequestOptions { + getClientAddress(): string; + platform?: App.Platform; +} + +export interface RouteSegment { + content: string; + dynamic: boolean; + rest: boolean; +} + +export type TrailingSlash = 'never' | 'always' | 'ignore'; diff --git a/node_modules/@sveltejs/kit/src/types/synthetic/$env+dynamic+private.md b/node_modules/@sveltejs/kit/src/types/synthetic/$env+dynamic+private.md new file mode 100644 index 0000000..93c8c8c --- /dev/null +++ b/node_modules/@sveltejs/kit/src/types/synthetic/$env+dynamic+private.md @@ -0,0 +1,12 @@ +This module provides access to runtime environment variables, as defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/main/packages/adapter-node) (or running [`vite preview`](https://svelte.dev/docs/kit/cli)), this is equivalent to `process.env`. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://svelte.dev/docs/kit/configuration#env) (if configured). + +This module cannot be imported into client-side code. + +Dynamic environment variables cannot be used during prerendering. + +```ts +import { env } from '$env/dynamic/private'; +console.log(env.DEPLOYMENT_SPECIFIC_VARIABLE); +``` + +> In `dev`, `$env/dynamic` always includes environment variables from `.env`. In `prod`, this behavior will depend on your adapter. diff --git a/node_modules/@sveltejs/kit/src/types/synthetic/$env+dynamic+public.md b/node_modules/@sveltejs/kit/src/types/synthetic/$env+dynamic+public.md new file mode 100644 index 0000000..6e826d2 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/types/synthetic/$env+dynamic+public.md @@ -0,0 +1,10 @@ +Similar to [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private), but only includes variables that begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) (which defaults to `PUBLIC_`), and can therefore safely be exposed to client-side code. + +Note that public dynamic environment variables must all be sent from the server to the client, causing larger network requests — when possible, use `$env/static/public` instead. + +Dynamic environment variables cannot be used during prerendering. + +```ts +import { env } from '$env/dynamic/public'; +console.log(env.PUBLIC_DEPLOYMENT_SPECIFIC_VARIABLE); +``` diff --git a/node_modules/@sveltejs/kit/src/types/synthetic/$env+static+private.md b/node_modules/@sveltejs/kit/src/types/synthetic/$env+static+private.md new file mode 100644 index 0000000..e36ef4e --- /dev/null +++ b/node_modules/@sveltejs/kit/src/types/synthetic/$env+static+private.md @@ -0,0 +1,19 @@ +Environment variables [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env`. Like [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private), this module cannot be imported into client-side code. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://svelte.dev/docs/kit/configuration#env) (if configured). + +_Unlike_ [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private), the values exported from this module are statically injected into your bundle at build time, enabling optimisations like dead code elimination. + +```ts +import { API_KEY } from '$env/static/private'; +``` + +Note that all environment variables referenced in your code should be declared (for example in an `.env` file), even if they don't have a value until the app is deployed: + +``` +MY_FEATURE_FLAG="" +``` + +You can override `.env` values from the command line like so: + +```bash +MY_FEATURE_FLAG="enabled" npm run dev +``` diff --git a/node_modules/@sveltejs/kit/src/types/synthetic/$env+static+public.md b/node_modules/@sveltejs/kit/src/types/synthetic/$env+static+public.md new file mode 100644 index 0000000..70a98b4 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/types/synthetic/$env+static+public.md @@ -0,0 +1,7 @@ +Similar to [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private), except that it only includes environment variables that begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) (which defaults to `PUBLIC_`), and can therefore safely be exposed to client-side code. + +Values are replaced statically at build time. + +```ts +import { PUBLIC_BASE_URL } from '$env/static/public'; +``` diff --git a/node_modules/@sveltejs/kit/src/types/synthetic/$lib.md b/node_modules/@sveltejs/kit/src/types/synthetic/$lib.md new file mode 100644 index 0000000..1108e1b --- /dev/null +++ b/node_modules/@sveltejs/kit/src/types/synthetic/$lib.md @@ -0,0 +1,5 @@ +This is a simple alias to `src/lib`, or whatever directory is specified as [`config.kit.files.lib`](https://svelte.dev/docs/kit/configuration#files). It allows you to access common components and utility modules without `../../../../` nonsense. + +### `$lib/server` + +A subdirectory of `$lib`. SvelteKit will prevent you from importing any modules in `$lib/server` into client-side code. See [server-only modules](https://svelte.dev/docs/kit/server-only-modules). diff --git a/node_modules/@sveltejs/kit/src/utils/array.js b/node_modules/@sveltejs/kit/src/utils/array.js new file mode 100644 index 0000000..08f9384 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/utils/array.js @@ -0,0 +1,9 @@ +/** + * Removes nullish values from an array. + * + * @template T + * @param {Array} arr + */ +export function compact(arr) { + return arr.filter(/** @returns {val is NonNullable} */ (val) => val != null); +} diff --git a/node_modules/@sveltejs/kit/src/utils/env.js b/node_modules/@sveltejs/kit/src/utils/env.js new file mode 100644 index 0000000..e2106f3 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/utils/env.js @@ -0,0 +1,33 @@ +/** + * @param {Record} env + * @param {{ + * public_prefix: string; + * private_prefix: string; + * }} prefixes + * @returns {Record} + */ +export function filter_private_env(env, { public_prefix, private_prefix }) { + return Object.fromEntries( + Object.entries(env).filter( + ([k]) => + k.startsWith(private_prefix) && (public_prefix === '' || !k.startsWith(public_prefix)) + ) + ); +} + +/** + * @param {Record} env + * @param {{ + * public_prefix: string; + * private_prefix: string; + * }} prefixes + * @returns {Record} + */ +export function filter_public_env(env, { public_prefix, private_prefix }) { + return Object.fromEntries( + Object.entries(env).filter( + ([k]) => + k.startsWith(public_prefix) && (private_prefix === '' || !k.startsWith(private_prefix)) + ) + ); +} diff --git a/node_modules/@sveltejs/kit/src/utils/error.js b/node_modules/@sveltejs/kit/src/utils/error.js new file mode 100644 index 0000000..1247b94 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/utils/error.js @@ -0,0 +1,38 @@ +import { HttpError, SvelteKitError } from '../runtime/control.js'; + +/** + * @param {unknown} err + * @return {Error} + */ +export function coalesce_to_error(err) { + return err instanceof Error || + (err && /** @type {any} */ (err).name && /** @type {any} */ (err).message) + ? /** @type {Error} */ (err) + : new Error(JSON.stringify(err)); +} + +/** + * This is an identity function that exists to make TypeScript less + * paranoid about people throwing things that aren't errors, which + * frankly is not something we should care about + * @param {unknown} error + */ +export function normalize_error(error) { + return /** @type {import('../runtime/control.js').Redirect | HttpError | SvelteKitError | Error} */ ( + error + ); +} + +/** + * @param {unknown} error + */ +export function get_status(error) { + return error instanceof HttpError || error instanceof SvelteKitError ? error.status : 500; +} + +/** + * @param {unknown} error + */ +export function get_message(error) { + return error instanceof SvelteKitError ? error.text : 'Internal Error'; +} diff --git a/node_modules/@sveltejs/kit/src/utils/escape.js b/node_modules/@sveltejs/kit/src/utils/escape.js new file mode 100644 index 0000000..a73fd95 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/utils/escape.js @@ -0,0 +1,62 @@ +/** + * When inside a double-quoted attribute value, only `&` and `"` hold special meaning. + * @see https://html.spec.whatwg.org/multipage/parsing.html#attribute-value-(double-quoted)-state + * @type {Record} + */ +const escape_html_attr_dict = { + '&': '&', + '"': '"' + // Svelte also escapes < because the escape function could be called inside a `noscript` there + // https://github.com/sveltejs/svelte/security/advisories/GHSA-8266-84wp-wv5c + // However, that doesn't apply in SvelteKit +}; + +/** + * @type {Record} + */ +const escape_html_dict = { + '&': '&', + '<': '<' +}; + +const surrogates = // high surrogate without paired low surrogate + '[\\ud800-\\udbff](?![\\udc00-\\udfff])|' + + // a valid surrogate pair, the only match with 2 code units + // we match it so that we can match unpaired low surrogates in the same pass + // TODO: use lookbehind assertions once they are widely supported: (?...`; + */ +export function escape_html(str, is_attr) { + const dict = is_attr ? escape_html_attr_dict : escape_html_dict; + const escaped_str = str.replace(is_attr ? escape_html_attr_regex : escape_html_regex, (match) => { + if (match.length === 2) { + // valid surrogate pair + return match; + } + + return dict[match] ?? `&#${match.charCodeAt(0)};`; + }); + + return escaped_str; +} diff --git a/node_modules/@sveltejs/kit/src/utils/exports.js b/node_modules/@sveltejs/kit/src/utils/exports.js new file mode 100644 index 0000000..ed685ed --- /dev/null +++ b/node_modules/@sveltejs/kit/src/utils/exports.js @@ -0,0 +1,93 @@ +/** + * @param {Set} expected + */ +function validator(expected) { + /** + * @param {any} module + * @param {string} [file] + */ + function validate(module, file) { + if (!module) return; + + for (const key in module) { + if (key[0] === '_' || expected.has(key)) continue; // key is valid in this module + + const values = [...expected.values()]; + + const hint = + hint_for_supported_files(key, file?.slice(file.lastIndexOf('.'))) ?? + `valid exports are ${values.join(', ')}, or anything with a '_' prefix`; + + throw new Error(`Invalid export '${key}'${file ? ` in ${file}` : ''} (${hint})`); + } + } + + return validate; +} + +/** + * @param {string} key + * @param {string} ext + * @returns {string | void} + */ +function hint_for_supported_files(key, ext = '.js') { + const supported_files = []; + + if (valid_layout_exports.has(key)) { + supported_files.push(`+layout${ext}`); + } + + if (valid_page_exports.has(key)) { + supported_files.push(`+page${ext}`); + } + + if (valid_layout_server_exports.has(key)) { + supported_files.push(`+layout.server${ext}`); + } + + if (valid_page_server_exports.has(key)) { + supported_files.push(`+page.server${ext}`); + } + + if (valid_server_exports.has(key)) { + supported_files.push(`+server${ext}`); + } + + if (supported_files.length > 0) { + return `'${key}' is a valid export in ${supported_files.slice(0, -1).join(', ')}${ + supported_files.length > 1 ? ' or ' : '' + }${supported_files.at(-1)}`; + } +} + +const valid_layout_exports = new Set([ + 'load', + 'prerender', + 'csr', + 'ssr', + 'trailingSlash', + 'config' +]); +const valid_page_exports = new Set([...valid_layout_exports, 'entries']); +const valid_layout_server_exports = new Set([...valid_layout_exports]); +const valid_page_server_exports = new Set([...valid_layout_server_exports, 'actions', 'entries']); +const valid_server_exports = new Set([ + 'GET', + 'POST', + 'PATCH', + 'PUT', + 'DELETE', + 'OPTIONS', + 'HEAD', + 'fallback', + 'prerender', + 'trailingSlash', + 'config', + 'entries' +]); + +export const validate_layout_exports = validator(valid_layout_exports); +export const validate_page_exports = validator(valid_page_exports); +export const validate_layout_server_exports = validator(valid_layout_server_exports); +export const validate_page_server_exports = validator(valid_page_server_exports); +export const validate_server_exports = validator(valid_server_exports); diff --git a/node_modules/@sveltejs/kit/src/utils/features.js b/node_modules/@sveltejs/kit/src/utils/features.js new file mode 100644 index 0000000..4a8530d --- /dev/null +++ b/node_modules/@sveltejs/kit/src/utils/features.js @@ -0,0 +1,24 @@ +/** + * @param {string} route_id + * @param {any} config + * @param {string} feature + * @param {import('@sveltejs/kit').Adapter | undefined} adapter + */ +export function check_feature(route_id, config, feature, adapter) { + if (!adapter) return; + + switch (feature) { + case '$app/server:read': { + const supported = adapter.supports?.read?.({ + route: { id: route_id }, + config + }); + + if (!supported) { + throw new Error( + `Cannot use \`read\` from \`$app/server\` in ${route_id} when using ${adapter.name}. Please ensure that your adapter is up to date and supports this feature.` + ); + } + } + } +} diff --git a/node_modules/@sveltejs/kit/src/utils/filesystem.js b/node_modules/@sveltejs/kit/src/utils/filesystem.js new file mode 100644 index 0000000..af490f1 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/utils/filesystem.js @@ -0,0 +1,200 @@ +import fs from 'node:fs'; +import path from 'node:path'; + +/** @param {string} dir */ +export function mkdirp(dir) { + try { + fs.mkdirSync(dir, { recursive: true }); + } catch (/** @type {any} */ e) { + if (e.code === 'EEXIST') { + if (!fs.statSync(dir).isDirectory()) { + throw new Error(`Cannot create directory ${dir}, a file already exists at this position`); + } + return; + } + throw e; + } +} + +/** @param {string} path */ +export function rimraf(path) { + fs.rmSync(path, { force: true, recursive: true }); +} + +/** + * @param {string} source + * @param {string} target + * @param {{ + * filter?: (basename: string) => boolean; + * replace?: Record; + * }} opts + */ +export function copy(source, target, opts = {}) { + if (!fs.existsSync(source)) return []; + + /** @type {string[]} */ + const files = []; + + const prefix = posixify(target) + '/'; + + const regex = opts.replace + ? new RegExp(`\\b(${Object.keys(opts.replace).join('|')})\\b`, 'g') + : null; + + /** + * @param {string} from + * @param {string} to + */ + function go(from, to) { + if (opts.filter && !opts.filter(path.basename(from))) return; + + const stats = fs.statSync(from); + + if (stats.isDirectory()) { + fs.readdirSync(from).forEach((file) => { + go(path.join(from, file), path.join(to, file)); + }); + } else { + mkdirp(path.dirname(to)); + + if (opts.replace) { + const data = fs.readFileSync(from, 'utf-8'); + fs.writeFileSync( + to, + data.replace( + /** @type {RegExp} */ (regex), + (_match, key) => /** @type {Record} */ (opts.replace)[key] + ) + ); + } else { + fs.copyFileSync(from, to); + } + + files.push(to === target ? posixify(path.basename(to)) : posixify(to).replace(prefix, '')); + } + } + + go(source, target); + + return files; +} + +/** + * Get a list of all files in a directory + * @param {string} cwd - the directory to walk + * @param {boolean} [dirs] - whether to include directories in the result + * @returns {string[]} a list of all found files (and possibly directories) relative to `cwd` + */ +export function walk(cwd, dirs = false) { + /** @type {string[]} */ + const all_files = []; + + /** @param {string} dir */ + function walk_dir(dir) { + const files = fs.readdirSync(path.join(cwd, dir)); + + for (const file of files) { + const joined = path.join(dir, file); + const stats = fs.statSync(path.join(cwd, joined)); + if (stats.isDirectory()) { + if (dirs) all_files.push(joined); + walk_dir(joined); + } else { + all_files.push(joined); + } + } + } + + return walk_dir(''), all_files; +} + +/** @param {string} str */ +export function posixify(str) { + return str.replace(/\\/g, '/'); +} + +/** + * Like `path.join`, but posixified and with a leading `./` if necessary + * @param {string[]} str + */ +export function join_relative(...str) { + let result = posixify(path.join(...str)); + if (!result.startsWith('.')) { + result = `./${result}`; + } + return result; +} + +/** + * Like `path.relative`, but always posixified and with a leading `./` if necessary. + * Useful for JS imports so the path can safely reside inside of `node_modules`. + * Otherwise paths could be falsely interpreted as package paths. + * @param {string} from + * @param {string} to + */ +export function relative_path(from, to) { + return join_relative(path.relative(from, to)); +} + +/** + * Prepend given path with `/@fs` prefix + * @param {string} str + */ +export function to_fs(str) { + str = posixify(str); + return `/@fs${ + // Windows/Linux separation - Windows starts with a drive letter, we need a / in front there + str.startsWith('/') ? '' : '/' + }${str}`; +} + +/** + * Removes `/@fs` prefix from given path and posixifies it + * @param {string} str + */ +export function from_fs(str) { + str = posixify(str); + if (!str.startsWith('/@fs')) return str; + + str = str.slice(4); + // Windows/Linux separation - Windows starts with a drive letter, we need to strip the additional / here + return str[2] === ':' && /[A-Z]/.test(str[1]) ? str.slice(1) : str; +} + +/** + * Given an entry point like [cwd]/src/hooks, returns a filename like [cwd]/src/hooks.js or [cwd]/src/hooks/index.js + * @param {string} entry + * @returns {string|null} + */ +export function resolve_entry(entry) { + if (fs.existsSync(entry)) { + const stats = fs.statSync(entry); + if (stats.isFile()) { + return entry; + } + + const index = path.join(entry, 'index'); + if (fs.existsSync(index + '.js') || fs.existsSync(index + '.ts')) { + return resolve_entry(index); + } + } + + const dir = path.dirname(entry); + + if (fs.existsSync(dir)) { + const base = path.basename(entry); + const files = fs.readdirSync(dir); + const found = files.find((file) => { + return file.replace(/\.(js|ts)$/, '') === base && fs.statSync(path.join(dir, file)).isFile(); + }); + + if (found) return path.join(dir, found); + } + + return null; +} + +/** @param {string} file */ +export function read(file) { + return fs.readFileSync(file, 'utf-8'); +} diff --git a/node_modules/@sveltejs/kit/src/utils/fork.js b/node_modules/@sveltejs/kit/src/utils/fork.js new file mode 100644 index 0000000..918eded --- /dev/null +++ b/node_modules/@sveltejs/kit/src/utils/fork.js @@ -0,0 +1,70 @@ +import { fileURLToPath } from 'node:url'; +import { Worker, parentPort } from 'node:worker_threads'; +import process from 'node:process'; + +/** + * Runs a task in a subprocess so any dangling stuff gets killed upon completion. + * The subprocess needs to be the file `forked` is called in, and `forked` needs to be called eagerly at the top level. + * @template T + * @template U + * @param {string} module `import.meta.url` of the file + * @param {(opts: T) => Promise} callback The function that is invoked in the subprocess + * @returns {(opts: T) => Promise} A function that when called starts the subprocess + */ +export function forked(module, callback) { + if (process.env.SVELTEKIT_FORK && parentPort) { + parentPort.on( + 'message', + /** @param {any} data */ async (data) => { + if (data?.type === 'args' && data.module === module) { + parentPort?.postMessage({ + type: 'result', + module, + payload: await callback(data.payload) + }); + } + } + ); + + parentPort.postMessage({ type: 'ready', module }); + } + + /** + * @param {T} opts + * @returns {Promise} + */ + return function (opts) { + return new Promise((fulfil, reject) => { + const worker = new Worker(fileURLToPath(module), { + env: { + ...process.env, + SVELTEKIT_FORK: 'true' + } + }); + + worker.on( + 'message', + /** @param {any} data */ (data) => { + if (data?.type === 'ready' && data.module === module) { + worker.postMessage({ + type: 'args', + module, + payload: opts + }); + } + + if (data?.type === 'result' && data.module === module) { + worker.unref(); + fulfil(data.payload); + } + } + ); + + worker.on('exit', (code) => { + if (code) { + reject(new Error(`Failed with code ${code}`)); + } + }); + }); + }; +} diff --git a/node_modules/@sveltejs/kit/src/utils/functions.js b/node_modules/@sveltejs/kit/src/utils/functions.js new file mode 100644 index 0000000..0629107 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/utils/functions.js @@ -0,0 +1,16 @@ +/** + * @template T + * @param {() => T} fn + */ +export function once(fn) { + let done = false; + + /** @type T */ + let result; + + return () => { + if (done) return result; + done = true; + return (result = fn()); + }; +} diff --git a/node_modules/@sveltejs/kit/src/utils/http.js b/node_modules/@sveltejs/kit/src/utils/http.js new file mode 100644 index 0000000..bfd948d --- /dev/null +++ b/node_modules/@sveltejs/kit/src/utils/http.js @@ -0,0 +1,79 @@ +/** + * Given an Accept header and a list of possible content types, pick + * the most suitable one to respond with + * @param {string} accept + * @param {string[]} types + */ +export function negotiate(accept, types) { + /** @type {Array<{ type: string, subtype: string, q: number, i: number }>} */ + const parts = []; + + accept.split(',').forEach((str, i) => { + const match = /([^/ \t]+)\/([^; \t]+)[ \t]*(?:;[ \t]*q=([0-9.]+))?/.exec(str); + + // no match equals invalid header — ignore + if (match) { + const [, type, subtype, q = '1'] = match; + parts.push({ type, subtype, q: +q, i }); + } + }); + + parts.sort((a, b) => { + if (a.q !== b.q) { + return b.q - a.q; + } + + if ((a.subtype === '*') !== (b.subtype === '*')) { + return a.subtype === '*' ? 1 : -1; + } + + if ((a.type === '*') !== (b.type === '*')) { + return a.type === '*' ? 1 : -1; + } + + return a.i - b.i; + }); + + let accepted; + let min_priority = Infinity; + + for (const mimetype of types) { + const [type, subtype] = mimetype.split('/'); + const priority = parts.findIndex( + (part) => + (part.type === type || part.type === '*') && + (part.subtype === subtype || part.subtype === '*') + ); + + if (priority !== -1 && priority < min_priority) { + accepted = mimetype; + min_priority = priority; + } + } + + return accepted; +} + +/** + * Returns `true` if the request contains a `content-type` header with the given type + * @param {Request} request + * @param {...string} types + */ +function is_content_type(request, ...types) { + const type = request.headers.get('content-type')?.split(';', 1)[0].trim() ?? ''; + return types.includes(type.toLowerCase()); +} + +/** + * @param {Request} request + */ +export function is_form_content_type(request) { + // These content types must be protected against CSRF + // https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/enctype + return is_content_type( + request, + 'application/x-www-form-urlencoded', + 'multipart/form-data', + 'text/plain' + ); +} diff --git a/node_modules/@sveltejs/kit/src/utils/import.js b/node_modules/@sveltejs/kit/src/utils/import.js new file mode 100644 index 0000000..3ed96fa --- /dev/null +++ b/node_modules/@sveltejs/kit/src/utils/import.js @@ -0,0 +1,52 @@ +import process from 'node:process'; +import fs from 'node:fs'; +import path from 'node:path'; + +/** + * Resolves a peer dependency relative to the current CWD. Duplicated with `packages/adapter-auto` + * @param {string} dependency + */ +function resolve_peer(dependency) { + let [name, ...parts] = dependency.split('/'); + if (name[0] === '@') name += `/${parts.shift()}`; + + let dir = process.cwd(); + + while (!fs.existsSync(`${dir}/node_modules/${name}/package.json`)) { + if (dir === (dir = path.dirname(dir))) { + throw new Error( + `Could not resolve peer dependency "${name}" relative to your project — please install it and try again.` + ); + } + } + + const pkg_dir = `${dir}/node_modules/${name}`; + const pkg = JSON.parse(fs.readFileSync(`${pkg_dir}/package.json`, 'utf-8')); + + const subpackage = ['.', ...parts].join('/'); + + let exported = pkg.exports[subpackage]; + + while (typeof exported !== 'string') { + if (!exported) { + throw new Error(`Could not find valid "${subpackage}" export in ${name}/package.json`); + } + + exported = exported['import'] ?? exported['default']; + } + + return path.resolve(pkg_dir, exported); +} + +/** + * Resolve a dependency relative to the current working directory, + * rather than relative to this package (but falls back to trying that, if necessary) + * @param {string} dependency + */ +export async function import_peer(dependency) { + try { + return await import(resolve_peer(dependency)); + } catch { + return await import(dependency); + } +} diff --git a/node_modules/@sveltejs/kit/src/utils/misc.js b/node_modules/@sveltejs/kit/src/utils/misc.js new file mode 100644 index 0000000..cd64ed2 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/utils/misc.js @@ -0,0 +1 @@ +export const s = JSON.stringify; diff --git a/node_modules/@sveltejs/kit/src/utils/page_nodes.js b/node_modules/@sveltejs/kit/src/utils/page_nodes.js new file mode 100644 index 0000000..5a185b2 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/utils/page_nodes.js @@ -0,0 +1,95 @@ +import { + validate_layout_exports, + validate_layout_server_exports, + validate_page_exports, + validate_page_server_exports +} from './exports.js'; + +export class PageNodes { + data; + + /** + * @param {Array} nodes + */ + constructor(nodes) { + this.data = nodes; + } + + layouts() { + return this.data.slice(0, -1); + } + + page() { + return this.data.at(-1); + } + + validate() { + for (const layout of this.layouts()) { + if (layout) { + validate_layout_server_exports(layout.server, /** @type {string} */ (layout.server_id)); + validate_layout_exports(layout.universal, /** @type {string} */ (layout.universal_id)); + } + } + + const page = this.page(); + if (page) { + validate_page_server_exports(page.server, /** @type {string} */ (page.server_id)); + validate_page_exports(page.universal, /** @type {string} */ (page.universal_id)); + } + } + + /** + * @template {'prerender' | 'ssr' | 'csr' | 'trailingSlash'} Option + * @param {Option} option + * @returns {Value | undefined} + */ + #get_option(option) { + /** @typedef {(import('types').UniversalNode | import('types').ServerNode)[Option]} Value */ + + return this.data.reduce((value, node) => { + return node?.universal?.[option] ?? node?.server?.[option] ?? value; + }, /** @type {Value | undefined} */ (undefined)); + } + + csr() { + return this.#get_option('csr') ?? true; + } + + ssr() { + return this.#get_option('ssr') ?? true; + } + + prerender() { + return this.#get_option('prerender') ?? false; + } + + trailing_slash() { + return this.#get_option('trailingSlash') ?? 'never'; + } + + get_config() { + /** @type {any} */ + let current = {}; + + for (const node of this.data) { + if (!node?.universal?.config && !node?.server?.config) continue; + + current = { + ...current, + // TODO: should we override the server config value with the universal value similar to other page options? + ...node?.universal?.config, + ...node?.server?.config + }; + } + + // TODO 3.0 always return `current`? then we can get rid of `?? {}` in other places + return Object.keys(current).length ? current : undefined; + } + + should_prerender_data() { + return this.data.some( + // prerender in case of trailingSlash because the client retrieves that value from the server + (node) => node?.server?.load || node?.server?.trailingSlash !== undefined + ); + } +} diff --git a/node_modules/@sveltejs/kit/src/utils/routing.js b/node_modules/@sveltejs/kit/src/utils/routing.js new file mode 100644 index 0000000..9442b2f --- /dev/null +++ b/node_modules/@sveltejs/kit/src/utils/routing.js @@ -0,0 +1,275 @@ +import { BROWSER } from 'esm-env'; + +const param_pattern = /^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/; + +/** + * Creates the regex pattern, extracts parameter names, and generates types for a route + * @param {string} id + */ +export function parse_route_id(id) { + /** @type {import('types').RouteParam[]} */ + const params = []; + + const pattern = + id === '/' + ? /^\/$/ + : new RegExp( + `^${get_route_segments(id) + .map((segment) => { + // special case — /[...rest]/ could contain zero segments + const rest_match = /^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(segment); + if (rest_match) { + params.push({ + name: rest_match[1], + matcher: rest_match[2], + optional: false, + rest: true, + chained: true + }); + return '(?:/(.*))?'; + } + // special case — /[[optional]]/ could contain zero segments + const optional_match = /^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(segment); + if (optional_match) { + params.push({ + name: optional_match[1], + matcher: optional_match[2], + optional: true, + rest: false, + chained: true + }); + return '(?:/([^/]+))?'; + } + + if (!segment) { + return; + } + + const parts = segment.split(/\[(.+?)\](?!\])/); + const result = parts + .map((content, i) => { + if (i % 2) { + if (content.startsWith('x+')) { + return escape(String.fromCharCode(parseInt(content.slice(2), 16))); + } + + if (content.startsWith('u+')) { + return escape( + String.fromCharCode( + ...content + .slice(2) + .split('-') + .map((code) => parseInt(code, 16)) + ) + ); + } + + // We know the match cannot be null in the browser because manifest generation + // would have invoked this during build and failed if we hit an invalid + // param/matcher name with non-alphanumeric character. + const match = /** @type {RegExpExecArray} */ (param_pattern.exec(content)); + if (!BROWSER && !match) { + throw new Error( + `Invalid param: ${content}. Params and matcher names can only have underscores and alphanumeric characters.` + ); + } + + const [, is_optional, is_rest, name, matcher] = match; + // It's assumed that the following invalid route id cases are already checked + // - unbalanced brackets + // - optional param following rest param + + params.push({ + name, + matcher, + optional: !!is_optional, + rest: !!is_rest, + chained: is_rest ? i === 1 && parts[0] === '' : false + }); + return is_rest ? '(.*?)' : is_optional ? '([^/]*)?' : '([^/]+?)'; + } + + return escape(content); + }) + .join(''); + + return '/' + result; + }) + .join('')}/?$` + ); + + return { pattern, params }; +} + +const optional_param_regex = /\/\[\[\w+?(?:=\w+)?\]\]/; + +/** + * Removes optional params from a route ID. + * @param {string} id + * @returns The route id with optional params removed + */ +export function remove_optional_params(id) { + return id.replace(optional_param_regex, ''); +} + +/** + * Returns `false` for `(group)` segments + * @param {string} segment + */ +function affects_path(segment) { + return !/^\([^)]+\)$/.test(segment); +} + +/** + * Splits a route id into its segments, removing segments that + * don't affect the path (i.e. groups). The root route is represented by `/` + * and will be returned as `['']`. + * @param {string} route + * @returns string[] + */ +export function get_route_segments(route) { + return route.slice(1).split('/').filter(affects_path); +} + +/** + * @param {RegExpMatchArray} match + * @param {import('types').RouteParam[]} params + * @param {Record} matchers + */ +export function exec(match, params, matchers) { + /** @type {Record} */ + const result = {}; + + const values = match.slice(1); + const values_needing_match = values.filter((value) => value !== undefined); + + let buffered = 0; + + for (let i = 0; i < params.length; i += 1) { + const param = params[i]; + let value = values[i - buffered]; + + // in the `[[a=b]]/.../[...rest]` case, if one or more optional parameters + // weren't matched, roll the skipped values into the rest + if (param.chained && param.rest && buffered) { + value = values + .slice(i - buffered, i + 1) + .filter((s) => s) + .join('/'); + + buffered = 0; + } + + // if `value` is undefined, it means this is an optional or rest parameter + if (value === undefined) { + if (param.rest) result[param.name] = ''; + continue; + } + + if (!param.matcher || matchers[param.matcher](value)) { + result[param.name] = value; + + // Now that the params match, reset the buffer if the next param isn't the [...rest] + // and the next value is defined, otherwise the buffer will cause us to skip values + const next_param = params[i + 1]; + const next_value = values[i + 1]; + if (next_param && !next_param.rest && next_param.optional && next_value && param.chained) { + buffered = 0; + } + + // There are no more params and no more values, but all non-empty values have been matched + if ( + !next_param && + !next_value && + Object.keys(result).length === values_needing_match.length + ) { + buffered = 0; + } + continue; + } + + // in the `/[[a=b]]/...` case, if the value didn't satisfy the matcher, + // keep track of the number of skipped optional parameters and continue + if (param.optional && param.chained) { + buffered++; + continue; + } + + // otherwise, if the matcher returns `false`, the route did not match + return; + } + + if (buffered) return; + return result; +} + +/** @param {string} str */ +function escape(str) { + return ( + str + .normalize() + // escape [ and ] before escaping other characters, since they are used in the replacements + .replace(/[[\]]/g, '\\$&') + // replace %, /, ? and # with their encoded versions because decode_pathname leaves them untouched + .replace(/%/g, '%25') + .replace(/\//g, '%2[Ff]') + .replace(/\?/g, '%3[Ff]') + .replace(/#/g, '%23') + // escape characters that have special meaning in regex + .replace(/[.*+?^${}()|\\]/g, '\\$&') + ); +} + +const basic_param_pattern = /\[(\[)?(\.\.\.)?(\w+?)(?:=(\w+))?\]\]?/g; + +/** + * Populate a route ID with params to resolve a pathname. + * @example + * ```js + * resolveRoute( + * `/blog/[slug]/[...somethingElse]`, + * { + * slug: 'hello-world', + * somethingElse: 'something/else' + * } + * ); // `/blog/hello-world/something/else` + * ``` + * @param {string} id + * @param {Record} params + * @returns {string} + */ +export function resolve_route(id, params) { + const segments = get_route_segments(id); + return ( + '/' + + segments + .map((segment) => + segment.replace(basic_param_pattern, (_, optional, rest, name) => { + const param_value = params[name]; + + // This is nested so TS correctly narrows the type + if (!param_value) { + if (optional) return ''; + if (rest && param_value !== undefined) return ''; + throw new Error(`Missing parameter '${name}' in route ${id}`); + } + + if (param_value.startsWith('/') || param_value.endsWith('/')) + throw new Error( + `Parameter '${name}' in route ${id} cannot start or end with a slash -- this would cause an invalid route like foo//bar` + ); + return param_value; + }) + ) + .filter(Boolean) + .join('/') + ); +} + +/** + * @param {import('types').SSRNode} node + * @returns {boolean} + */ +export function has_server_load(node) { + return node.server?.load !== undefined || node.server?.trailingSlash !== undefined; +} diff --git a/node_modules/@sveltejs/kit/src/utils/streaming.js b/node_modules/@sveltejs/kit/src/utils/streaming.js new file mode 100644 index 0000000..cfb0d6a --- /dev/null +++ b/node_modules/@sveltejs/kit/src/utils/streaming.js @@ -0,0 +1,51 @@ +/** + * @returns {import('types').Deferred & { promise: Promise }}} + */ +function defer() { + let fulfil; + let reject; + + const promise = new Promise((f, r) => { + fulfil = f; + reject = r; + }); + + // @ts-expect-error + return { promise, fulfil, reject }; +} + +/** + * Create an async iterator and a function to push values into it + * @returns {{ + * iterator: AsyncIterable; + * push: (value: any) => void; + * done: () => void; + * }} + */ +export function create_async_iterator() { + const deferred = [defer()]; + + return { + iterator: { + [Symbol.asyncIterator]() { + return { + next: async () => { + const next = await deferred[0].promise; + if (!next.done) deferred.shift(); + return next; + } + }; + } + }, + push: (value) => { + deferred[deferred.length - 1].fulfil({ + value, + done: false + }); + deferred.push(defer()); + }, + done: () => { + deferred[deferred.length - 1].fulfil({ done: true }); + } + }; +} diff --git a/node_modules/@sveltejs/kit/src/utils/url.js b/node_modules/@sveltejs/kit/src/utils/url.js new file mode 100644 index 0000000..7ea2c9d --- /dev/null +++ b/node_modules/@sveltejs/kit/src/utils/url.js @@ -0,0 +1,201 @@ +import { BROWSER, DEV } from 'esm-env'; + +/** + * Matches a URI scheme. See https://www.rfc-editor.org/rfc/rfc3986#section-3.1 + * @type {RegExp} + */ +export const SCHEME = /^[a-z][a-z\d+\-.]+:/i; + +const internal = new URL('sveltekit-internal://'); + +/** + * @param {string} base + * @param {string} path + */ +export function resolve(base, path) { + // special case + if (path[0] === '/' && path[1] === '/') return path; + + let url = new URL(base, internal); + url = new URL(path, url); + + return url.protocol === internal.protocol ? url.pathname + url.search + url.hash : url.href; +} + +/** @param {string} path */ +export function is_root_relative(path) { + return path[0] === '/' && path[1] !== '/'; +} + +/** + * @param {string} path + * @param {import('types').TrailingSlash} trailing_slash + */ +export function normalize_path(path, trailing_slash) { + if (path === '/' || trailing_slash === 'ignore') return path; + + if (trailing_slash === 'never') { + return path.endsWith('/') ? path.slice(0, -1) : path; + } else if (trailing_slash === 'always' && !path.endsWith('/')) { + return path + '/'; + } + + return path; +} + +/** + * Decode pathname excluding %25 to prevent further double decoding of params + * @param {string} pathname + */ +export function decode_pathname(pathname) { + return pathname.split('%25').map(decodeURI).join('%25'); +} + +/** @param {Record} params */ +export function decode_params(params) { + for (const key in params) { + // input has already been decoded by decodeURI + // now handle the rest + params[key] = decodeURIComponent(params[key]); + } + + return params; +} + +/** + * The error when a URL is malformed is not very helpful, so we augment it with the URI + * @param {string} uri + */ +export function decode_uri(uri) { + try { + return decodeURI(uri); + } catch (e) { + if (e instanceof Error) { + e.message = `Failed to decode URI: ${uri}\n` + e.message; + } + throw e; + } +} + +/** + * Returns everything up to the first `#` in a URL + * @param {{href: string}} url_like + */ +export function strip_hash({ href }) { + return href.split('#')[0]; +} + +/** + * @param {URL} url + * @param {() => void} callback + * @param {(search_param: string) => void} search_params_callback + * @param {boolean} [allow_hash] + */ +export function make_trackable(url, callback, search_params_callback, allow_hash = false) { + const tracked = new URL(url); + + Object.defineProperty(tracked, 'searchParams', { + value: new Proxy(tracked.searchParams, { + get(obj, key) { + if (key === 'get' || key === 'getAll' || key === 'has') { + return (/**@type {string}*/ param) => { + search_params_callback(param); + return obj[key](param); + }; + } + + // if they try to access something different from what is in `tracked_search_params_properties` + // we track the whole url (entries, values, keys etc) + callback(); + + const value = Reflect.get(obj, key); + return typeof value === 'function' ? value.bind(obj) : value; + } + }), + enumerable: true, + configurable: true + }); + + /** + * URL properties that could change during the lifetime of the page, + * which excludes things like `origin` + */ + const tracked_url_properties = ['href', 'pathname', 'search', 'toString', 'toJSON']; + if (allow_hash) tracked_url_properties.push('hash'); + + for (const property of tracked_url_properties) { + Object.defineProperty(tracked, property, { + get() { + callback(); + // @ts-expect-error + return url[property]; + }, + + enumerable: true, + configurable: true + }); + } + + if (!BROWSER) { + // @ts-ignore + tracked[Symbol.for('nodejs.util.inspect.custom')] = (depth, opts, inspect) => { + return inspect(url, opts); + }; + + // @ts-ignore + tracked.searchParams[Symbol.for('nodejs.util.inspect.custom')] = (depth, opts, inspect) => { + return inspect(url.searchParams, opts); + }; + } + + if ((DEV || !BROWSER) && !allow_hash) { + disable_hash(tracked); + } + + return tracked; +} + +/** + * Disallow access to `url.hash` on the server and in `load` + * @param {URL} url + */ +function disable_hash(url) { + allow_nodejs_console_log(url); + + Object.defineProperty(url, 'hash', { + get() { + throw new Error( + 'Cannot access event.url.hash. Consider using `page.url.hash` inside a component instead' + ); + } + }); +} + +/** + * Disallow access to `url.search` and `url.searchParams` during prerendering + * @param {URL} url + */ +export function disable_search(url) { + allow_nodejs_console_log(url); + + for (const property of ['search', 'searchParams']) { + Object.defineProperty(url, property, { + get() { + throw new Error(`Cannot access url.${property} on a page with prerendering enabled`); + } + }); + } +} + +/** + * Allow URL to be console logged, bypassing disabled properties. + * @param {URL} url + */ +function allow_nodejs_console_log(url) { + if (!BROWSER) { + // @ts-ignore + url[Symbol.for('nodejs.util.inspect.custom')] = (depth, opts, inspect) => { + return inspect(new URL(url), opts); + }; + } +} diff --git a/node_modules/@sveltejs/kit/src/version.js b/node_modules/@sveltejs/kit/src/version.js new file mode 100644 index 0000000..38129b5 --- /dev/null +++ b/node_modules/@sveltejs/kit/src/version.js @@ -0,0 +1,4 @@ +// generated during release, do not modify + +/** @type {string} */ +export const VERSION = '2.21.1'; diff --git a/node_modules/@sveltejs/kit/svelte-kit.js b/node_modules/@sveltejs/kit/svelte-kit.js new file mode 100755 index 0000000..b48389f --- /dev/null +++ b/node_modules/@sveltejs/kit/svelte-kit.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +import './src/cli.js'; diff --git a/node_modules/@sveltejs/kit/types/index.d.ts b/node_modules/@sveltejs/kit/types/index.d.ts new file mode 100644 index 0000000..300a6f7 --- /dev/null +++ b/node_modules/@sveltejs/kit/types/index.d.ts @@ -0,0 +1,2612 @@ +/// +/// + +declare module '@sveltejs/kit' { + import type { CompileOptions } from 'svelte/compiler'; + import type { PluginOptions } from '@sveltejs/vite-plugin-svelte'; + /** + * [Adapters](https://svelte.dev/docs/kit/adapters) are responsible for taking the production build and turning it into something that can be deployed to a platform of your choosing. + */ + export interface Adapter { + /** + * The name of the adapter, using for logging. Will typically correspond to the package name. + */ + name: string; + /** + * This function is called after SvelteKit has built your app. + * @param builder An object provided by SvelteKit that contains methods for adapting the app + */ + adapt: (builder: Builder) => MaybePromise; + /** + * Checks called during dev and build to determine whether specific features will work in production with this adapter. + */ + supports?: { + /** + * Test support for `read` from `$app/server`. + * @param details.config The merged route config + */ + read?: (details: { config: any; route: { id: string } }) => boolean; + }; + /** + * Creates an `Emulator`, which allows the adapter to influence the environment + * during dev, build and prerendering. + */ + emulate?: () => MaybePromise; + } + + export type LoadProperties | void> = input extends void + ? undefined // needs to be undefined, because void will break intellisense + : input extends Record + ? input + : unknown; + + export type AwaitedActions any>> = OptionalUnion< + { + [Key in keyof T]: UnpackValidationError>>; + }[keyof T] + >; + + // Takes a union type and returns a union type where each type also has all properties + // of all possible types (typed as undefined), making accessing them more ergonomic + type OptionalUnion< + U extends Record, // not unknown, else interfaces don't satisfy this constraint + A extends keyof U = U extends U ? keyof U : never + > = U extends unknown ? { [P in Exclude]?: never } & U : never; + + const uniqueSymbol: unique symbol; + + export interface ActionFailure | undefined = undefined> { + status: number; + data: T; + [uniqueSymbol]: true; // necessary or else UnpackValidationError could wrongly unpack objects with the same shape as ActionFailure + } + + type UnpackValidationError = + T extends ActionFailure + ? X + : T extends void + ? undefined // needs to be undefined, because void will corrupt union type + : T; + + /** + * This object is passed to the `adapt` function of adapters. + * It contains various methods and properties that are useful for adapting the app. + */ + export interface Builder { + /** Print messages to the console. `log.info` and `log.minor` are silent unless Vite's `logLevel` is `info`. */ + log: Logger; + /** Remove `dir` and all its contents. */ + rimraf: (dir: string) => void; + /** Create `dir` and any required parent directories. */ + mkdirp: (dir: string) => void; + + /** The fully resolved `svelte.config.js`. */ + config: ValidatedConfig; + /** Information about prerendered pages and assets, if any. */ + prerendered: Prerendered; + /** An array of all routes (including prerendered) */ + routes: RouteDefinition[]; + + // TODO 3.0 remove this method + /** + * Create separate functions that map to one or more routes of your app. + * @param fn A function that groups a set of routes into an entry point + * @deprecated Use `builder.routes` instead + */ + createEntries: (fn: (route: RouteDefinition) => AdapterEntry) => Promise; + + /** + * Find all the assets imported by server files belonging to `routes` + */ + findServerAssets: (routes: RouteDefinition[]) => string[]; + + /** + * Generate a fallback page for a static webserver to use when no route is matched. Useful for single-page apps. + */ + generateFallback: (dest: string) => Promise; + + /** + * Generate a module exposing build-time environment variables as `$env/dynamic/public`. + */ + generateEnvModule: () => void; + + /** + * Generate a server-side manifest to initialise the SvelteKit [server](https://svelte.dev/docs/kit/@sveltejs-kit#Server) with. + * @param opts a relative path to the base directory of the app and optionally in which format (esm or cjs) the manifest should be generated + */ + generateManifest: (opts: { relativePath: string; routes?: RouteDefinition[] }) => string; + + /** + * Resolve a path to the `name` directory inside `outDir`, e.g. `/path/to/.svelte-kit/my-adapter`. + * @param name path to the file, relative to the build directory + */ + getBuildDirectory: (name: string) => string; + /** Get the fully resolved path to the directory containing client-side assets, including the contents of your `static` directory. */ + getClientDirectory: () => string; + /** Get the fully resolved path to the directory containing server-side code. */ + getServerDirectory: () => string; + /** Get the application path including any configured `base` path, e.g. `my-base-path/_app`. */ + getAppPath: () => string; + + /** + * Write client assets to `dest`. + * @param dest the destination folder + * @returns an array of files written to `dest` + */ + writeClient: (dest: string) => string[]; + /** + * Write prerendered files to `dest`. + * @param dest the destination folder + * @returns an array of files written to `dest` + */ + writePrerendered: (dest: string) => string[]; + /** + * Write server-side code to `dest`. + * @param dest the destination folder + * @returns an array of files written to `dest` + */ + writeServer: (dest: string) => string[]; + /** + * Copy a file or directory. + * @param from the source file or directory + * @param to the destination file or directory + * @param opts.filter a function to determine whether a file or directory should be copied + * @param opts.replace a map of strings to replace + * @returns an array of files that were copied + */ + copy: ( + from: string, + to: string, + opts?: { + filter?(basename: string): boolean; + replace?: Record; + } + ) => string[]; + + /** + * Compress files in `directory` with gzip and brotli, where appropriate. Generates `.gz` and `.br` files alongside the originals. + * @param directory The directory containing the files to be compressed + */ + compress: (directory: string) => Promise; + } + + export interface Config { + /** + * Options passed to [`svelte.compile`](https://svelte.dev/docs/svelte/svelte-compiler#CompileOptions). + * @default {} + */ + compilerOptions?: CompileOptions; + /** + * List of file extensions that should be treated as Svelte files. + * @default [".svelte"] + */ + extensions?: string[]; + /** SvelteKit options */ + kit?: KitConfig; + /** Preprocessor options, if any. Preprocessing can alternatively also be done through Vite's preprocessor capabilities. */ + preprocess?: any; + /** `vite-plugin-svelte` plugin options. */ + vitePlugin?: PluginOptions; + /** Any additional options required by tooling that integrates with Svelte. */ + [key: string]: any; + } + + export interface Cookies { + /** + * Gets a cookie that was previously set with `cookies.set`, or from the request headers. + * @param name the name of the cookie + * @param opts the options, passed directly to `cookie.parse`. See documentation [here](https://github.com/jshttp/cookie#cookieparsestr-options) + */ + get: (name: string, opts?: import('cookie').CookieParseOptions) => string | undefined; + + /** + * Gets all cookies that were previously set with `cookies.set`, or from the request headers. + * @param opts the options, passed directly to `cookie.parse`. See documentation [here](https://github.com/jshttp/cookie#cookieparsestr-options) + */ + getAll: (opts?: import('cookie').CookieParseOptions) => Array<{ name: string; value: string }>; + + /** + * Sets a cookie. This will add a `set-cookie` header to the response, but also make the cookie available via `cookies.get` or `cookies.getAll` during the current request. + * + * The `httpOnly` and `secure` options are `true` by default (except on http://localhost, where `secure` is `false`), and must be explicitly disabled if you want cookies to be readable by client-side JavaScript and/or transmitted over HTTP. The `sameSite` option defaults to `lax`. + * + * You must specify a `path` for the cookie. In most cases you should explicitly set `path: '/'` to make the cookie available throughout your app. You can use relative paths, or set `path: ''` to make the cookie only available on the current path and its children + * @param name the name of the cookie + * @param value the cookie value + * @param opts the options, passed directly to `cookie.serialize`. See documentation [here](https://github.com/jshttp/cookie#cookieserializename-value-options) + */ + set: ( + name: string, + value: string, + opts: import('cookie').CookieSerializeOptions & { path: string } + ) => void; + + /** + * Deletes a cookie by setting its value to an empty string and setting the expiry date in the past. + * + * You must specify a `path` for the cookie. In most cases you should explicitly set `path: '/'` to make the cookie available throughout your app. You can use relative paths, or set `path: ''` to make the cookie only available on the current path and its children + * @param name the name of the cookie + * @param opts the options, passed directly to `cookie.serialize`. The `path` must match the path of the cookie you want to delete. See documentation [here](https://github.com/jshttp/cookie#cookieserializename-value-options) + */ + delete: (name: string, opts: import('cookie').CookieSerializeOptions & { path: string }) => void; + + /** + * Serialize a cookie name-value pair into a `Set-Cookie` header string, but don't apply it to the response. + * + * The `httpOnly` and `secure` options are `true` by default (except on http://localhost, where `secure` is `false`), and must be explicitly disabled if you want cookies to be readable by client-side JavaScript and/or transmitted over HTTP. The `sameSite` option defaults to `lax`. + * + * You must specify a `path` for the cookie. In most cases you should explicitly set `path: '/'` to make the cookie available throughout your app. You can use relative paths, or set `path: ''` to make the cookie only available on the current path and its children + * + * @param name the name of the cookie + * @param value the cookie value + * @param opts the options, passed directly to `cookie.serialize`. See documentation [here](https://github.com/jshttp/cookie#cookieserializename-value-options) + */ + serialize: ( + name: string, + value: string, + opts: import('cookie').CookieSerializeOptions & { path: string } + ) => string; + } + + /** + * A collection of functions that influence the environment during dev, build and prerendering + */ + export interface Emulator { + /** + * A function that is called with the current route `config` and `prerender` option + * and returns an `App.Platform` object + */ + platform?(details: { config: any; prerender: PrerenderOption }): MaybePromise; + } + + export interface KitConfig { + /** + * Your [adapter](https://svelte.dev/docs/kit/adapters) is run when executing `vite build`. It determines how the output is converted for different platforms. + * @default undefined + */ + adapter?: Adapter; + /** + * An object containing zero or more aliases used to replace values in `import` statements. These aliases are automatically passed to Vite and TypeScript. + * + * ```js + * /// file: svelte.config.js + * /// type: import('@sveltejs/kit').Config + * const config = { + * kit: { + * alias: { + * // this will match a file + * 'my-file': 'path/to/my-file.js', + * + * // this will match a directory and its contents + * // (`my-directory/x` resolves to `path/to/my-directory/x`) + * 'my-directory': 'path/to/my-directory', + * + * // an alias ending /* will only match + * // the contents of a directory, not the directory itself + * 'my-directory/*': 'path/to/my-directory/*' + * } + * } + * }; + * ``` + * + * > [!NOTE] The built-in `$lib` alias is controlled by `config.kit.files.lib` as it is used for packaging. + * + * > [!NOTE] You will need to run `npm run dev` to have SvelteKit automatically generate the required alias configuration in `jsconfig.json` or `tsconfig.json`. + * @default {} + */ + alias?: Record; + /** + * The directory where SvelteKit keeps its stuff, including static assets (such as JS and CSS) and internally-used routes. + * + * If `paths.assets` is specified, there will be two app directories — `${paths.assets}/${appDir}` and `${paths.base}/${appDir}`. + * @default "_app" + */ + appDir?: string; + /** + * [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) configuration. CSP helps to protect your users against cross-site scripting (XSS) attacks, by limiting the places resources can be loaded from. For example, a configuration like this... + * + * ```js + * /// file: svelte.config.js + * /// type: import('@sveltejs/kit').Config + * const config = { + * kit: { + * csp: { + * directives: { + * 'script-src': ['self'] + * }, + * // must be specified with either the `report-uri` or `report-to` directives, or both + * reportOnly: { + * 'script-src': ['self'], + * 'report-uri': ['/'] + * } + * } + * } + * }; + * + * export default config; + * ``` + * + * ...would prevent scripts loading from external sites. SvelteKit will augment the specified directives with nonces or hashes (depending on `mode`) for any inline styles and scripts it generates. + * + * To add a nonce for scripts and links manually included in `src/app.html`, you may use the placeholder `%sveltekit.nonce%` (for example ` + * + * + * + * + * + * ``` + * @default 'split' + * @since 2.13.0 + */ + bundleStrategy?: 'split' | 'single' | 'inline'; + }; + paths?: { + /** + * An absolute path that your app's files are served from. This is useful if your files are served from a storage bucket of some kind. + * @default "" + */ + assets?: '' | `http://${string}` | `https://${string}`; + /** + * A root-relative path that must start, but not end with `/` (e.g. `/base-path`), unless it is the empty string. This specifies where your app is served from and allows the app to live on a non-root path. Note that you need to prepend all your root-relative links with the base value or they will point to the root of your domain, not your `base` (this is how the browser works). You can use [`base` from `$app/paths`](https://svelte.dev/docs/kit/$app-paths#base) for that: `
Link`. If you find yourself writing this often, it may make sense to extract this into a reusable component. + * @default "" + */ + base?: '' | `/${string}`; + /** + * Whether to use relative asset paths. + * + * If `true`, `base` and `assets` imported from `$app/paths` will be replaced with relative asset paths during server-side rendering, resulting in more portable HTML. + * If `false`, `%sveltekit.assets%` and references to build artifacts will always be root-relative paths, unless `paths.assets` is an external URL + * + * [Single-page app](https://svelte.dev/docs/kit/single-page-apps) fallback pages will always use absolute paths, regardless of this setting. + * + * If your app uses a `` element, you should set this to `false`, otherwise asset URLs will incorrectly be resolved against the `` URL rather than the current page. + * + * In 1.0, `undefined` was a valid value, which was set by default. In that case, if `paths.assets` was not external, SvelteKit would replace `%sveltekit.assets%` with a relative path and use relative paths to reference build artifacts, but `base` and `assets` imported from `$app/paths` would be as specified in your config. + * + * @default true + * @since 1.9.0 + */ + relative?: boolean; + }; + /** + * See [Prerendering](https://svelte.dev/docs/kit/page-options#prerender). + */ + prerender?: { + /** + * How many pages can be prerendered simultaneously. JS is single-threaded, but in cases where prerendering performance is network-bound (for example loading content from a remote CMS) this can speed things up by processing other tasks while waiting on the network response. + * @default 1 + */ + concurrency?: number; + /** + * Whether SvelteKit should find pages to prerender by following links from `entries`. + * @default true + */ + crawl?: boolean; + /** + * An array of pages to prerender, or start crawling from (if `crawl: true`). The `*` string includes all routes containing no required `[parameters]` with optional parameters included as being empty (since SvelteKit doesn't know what value any parameters should have). + * @default ["*"] + */ + entries?: Array<'*' | `/${string}`>; + /** + * How to respond to HTTP errors encountered while prerendering the app. + * + * - `'fail'` — fail the build + * - `'ignore'` - silently ignore the failure and continue + * - `'warn'` — continue, but print a warning + * - `(details) => void` — a custom error handler that takes a `details` object with `status`, `path`, `referrer`, `referenceType` and `message` properties. If you `throw` from this function, the build will fail + * + * ```js + * /// file: svelte.config.js + * /// type: import('@sveltejs/kit').Config + * const config = { + * kit: { + * prerender: { + * handleHttpError: ({ path, referrer, message }) => { + * // ignore deliberate link to shiny 404 page + * if (path === '/not-found' && referrer === '/blog/how-we-built-our-404-page') { + * return; + * } + * + * // otherwise fail the build + * throw new Error(message); + * } + * } + * } + * }; + * ``` + * + * @default "fail" + * @since 1.15.7 + */ + handleHttpError?: PrerenderHttpErrorHandlerValue; + /** + * How to respond when hash links from one prerendered page to another don't correspond to an `id` on the destination page. + * + * - `'fail'` — fail the build + * - `'ignore'` - silently ignore the failure and continue + * - `'warn'` — continue, but print a warning + * - `(details) => void` — a custom error handler that takes a `details` object with `path`, `id`, `referrers` and `message` properties. If you `throw` from this function, the build will fail + * + * @default "fail" + * @since 1.15.7 + */ + handleMissingId?: PrerenderMissingIdHandlerValue; + /** + * How to respond when an entry generated by the `entries` export doesn't match the route it was generated from. + * + * - `'fail'` — fail the build + * - `'ignore'` - silently ignore the failure and continue + * - `'warn'` — continue, but print a warning + * - `(details) => void` — a custom error handler that takes a `details` object with `generatedFromId`, `entry`, `matchedId` and `message` properties. If you `throw` from this function, the build will fail + * + * @default "fail" + * @since 1.16.0 + */ + handleEntryGeneratorMismatch?: PrerenderEntryGeneratorMismatchHandlerValue; + /** + * The value of `url.origin` during prerendering; useful if it is included in rendered content. + * @default "http://sveltekit-prerender" + */ + origin?: string; + }; + router?: { + /** + * What type of client-side router to use. + * - `'pathname'` is the default and means the current URL pathname determines the route + * - `'hash'` means the route is determined by `location.hash`. In this case, SSR and prerendering are disabled. This is only recommended if `pathname` is not an option, for example because you don't control the webserver where your app is deployed. + * It comes with some caveats: you can't use server-side rendering (or indeed any server logic), and you have to make sure that the links in your app all start with #/, or they won't work. Beyond that, everything works exactly like a normal SvelteKit app. + * + * @default "pathname" + * @since 2.14.0 + */ + type?: 'pathname' | 'hash'; + /** + * How to determine which route to load when navigating to a new page. + * + * By default, SvelteKit will serve a route manifest to the browser. + * When navigating, this manifest is used (along with the `reroute` hook, if it exists) to determine which components to load and which `load` functions to run. + * Because everything happens on the client, this decision can be made immediately. The drawback is that the manifest needs to be + * loaded and parsed before the first navigation can happen, which may have an impact if your app contains many routes. + * + * Alternatively, SvelteKit can determine the route on the server. This means that for every navigation to a path that has not yet been visited, the server will be asked to determine the route. + * This has several advantages: + * - The client does not need to load the routing manifest upfront, which can lead to faster initial page loads + * - The list of routes is hidden from public view + * - The server has an opportunity to intercept each navigation (for example through a middleware), enabling (for example) A/B testing opaque to SvelteKit + + * The drawback is that for unvisited paths, resolution will take slightly longer (though this is mitigated by [preloading](https://svelte.dev/docs/kit/link-options#data-sveltekit-preload-data)). + * + * > [!NOTE] When using server-side route resolution and prerendering, the resolution is prerendered along with the route itself. + * + * @default "client" + * @since 2.17.0 + */ + resolution?: 'client' | 'server'; + }; + serviceWorker?: { + /** + * Whether to automatically register the service worker, if it exists. + * @default true + */ + register?: boolean; + /** + * Determine which files in your `static` directory will be available in `$service-worker.files`. + * @default (filename) => !/\.DS_Store/.test(filename) + */ + files?(filepath: string): boolean; + }; + typescript?: { + /** + * A function that allows you to edit the generated `tsconfig.json`. You can mutate the config (recommended) or return a new one. + * This is useful for extending a shared `tsconfig.json` in a monorepo root, for example. + * @default (config) => config + * @since 1.3.0 + */ + config?: (config: Record) => Record | void; + }; + /** + * Client-side navigation can be buggy if you deploy a new version of your app while people are using it. If the code for the new page is already loaded, it may have stale content; if it isn't, the app's route manifest may point to a JavaScript file that no longer exists. + * SvelteKit helps you solve this problem through version management. + * If SvelteKit encounters an error while loading the page and detects that a new version has been deployed (using the `name` specified here, which defaults to a timestamp of the build) it will fall back to traditional full-page navigation. + * Not all navigations will result in an error though, for example if the JavaScript for the next page is already loaded. If you still want to force a full-page navigation in these cases, use techniques such as setting the `pollInterval` and then using `beforeNavigate`: + * ```html + * /// file: +layout.svelte + * + * ``` + * + * If you set `pollInterval` to a non-zero value, SvelteKit will poll for new versions in the background and set the value of [`updated.current`](https://svelte.dev/docs/kit/$app-state#updated) `true` when it detects one. + */ + version?: { + /** + * The current app version string. If specified, this must be deterministic (e.g. a commit ref rather than `Math.random()` or `Date.now().toString()`), otherwise defaults to a timestamp of the build. + * + * For example, to use the current commit hash, you could do use `git rev-parse HEAD`: + * + * ```js + * /// file: svelte.config.js + * import * as child_process from 'node:child_process'; + * + * export default { + * kit: { + * version: { + * name: child_process.execSync('git rev-parse HEAD').toString().trim() + * } + * } + * }; + * ``` + */ + name?: string; + /** + * The interval in milliseconds to poll for version changes. If this is `0`, no polling occurs. + * @default 0 + */ + pollInterval?: number; + }; + } + + /** + * The [`handle`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle) hook runs every time the SvelteKit server receives a [request](https://svelte.dev/docs/kit/web-standards#Fetch-APIs-Request) and + * determines the [response](https://svelte.dev/docs/kit/web-standards#Fetch-APIs-Response). + * It receives an `event` object representing the request and a function called `resolve`, which renders the route and generates a `Response`. + * This allows you to modify response headers or bodies, or bypass SvelteKit entirely (for implementing routes programmatically, for example). + */ + export type Handle = (input: { + event: RequestEvent; + resolve: (event: RequestEvent, opts?: ResolveOptions) => MaybePromise; + }) => MaybePromise; + + /** + * The server-side [`handleError`](https://svelte.dev/docs/kit/hooks#Shared-hooks-handleError) hook runs when an unexpected error is thrown while responding to a request. + * + * If an unexpected error is thrown during loading or rendering, this function will be called with the error and the event. + * Make sure that this function _never_ throws an error. + */ + export type HandleServerError = (input: { + error: unknown; + event: RequestEvent; + status: number; + message: string; + }) => MaybePromise; + + /** + * The client-side [`handleError`](https://svelte.dev/docs/kit/hooks#Shared-hooks-handleError) hook runs when an unexpected error is thrown while navigating. + * + * If an unexpected error is thrown during loading or the following render, this function will be called with the error and the event. + * Make sure that this function _never_ throws an error. + */ + export type HandleClientError = (input: { + error: unknown; + event: NavigationEvent; + status: number; + message: string; + }) => MaybePromise; + + /** + * The [`handleFetch`](https://svelte.dev/docs/kit/hooks#Server-hooks-handleFetch) hook allows you to modify (or replace) the result of an [`event.fetch`](https://svelte.dev/docs/kit/load#Making-fetch-requests) call that runs on the server (or during prerendering) inside an endpoint, `load`, `action`, `handle`, `handleError` or `reroute`. + */ + export type HandleFetch = (input: { + event: RequestEvent; + request: Request; + fetch: typeof fetch; + }) => MaybePromise; + + /** + * The [`init`](https://svelte.dev/docs/kit/hooks#Shared-hooks-init) will be invoked before the server responds to its first request + * @since 2.10.0 + */ + export type ServerInit = () => MaybePromise; + + /** + * The [`init`](https://svelte.dev/docs/kit/hooks#Shared-hooks-init) will be invoked once the app starts in the browser + * @since 2.10.0 + */ + export type ClientInit = () => MaybePromise; + + /** + * The [`reroute`](https://svelte.dev/docs/kit/hooks#Universal-hooks-reroute) hook allows you to modify the URL before it is used to determine which route to render. + * @since 2.3.0 + */ + export type Reroute = (event: { url: URL; fetch: typeof fetch }) => MaybePromise; + + /** + * The [`transport`](https://svelte.dev/docs/kit/hooks#Universal-hooks-transport) hook allows you to transport custom types across the server/client boundary. + * + * Each transporter has a pair of `encode` and `decode` functions. On the server, `encode` determines whether a value is an instance of the custom type and, if so, returns a non-falsy encoding of the value which can be an object or an array (or `false` otherwise). + * + * In the browser, `decode` turns the encoding back into an instance of the custom type. + * + * ```ts + * import type { Transport } from '@sveltejs/kit'; + * + * declare class MyCustomType { + * data: any + * } + * + * // hooks.js + * export const transport: Transport = { + * MyCustomType: { + * encode: (value) => value instanceof MyCustomType && [value.data], + * decode: ([data]) => new MyCustomType(data) + * } + * }; + * ``` + * @since 2.11.0 + */ + export type Transport = Record; + + /** + * A member of the [`transport`](https://svelte.dev/docs/kit/hooks#Universal-hooks-transport) hook. + */ + export interface Transporter< + T = any, + U = Exclude + > { + encode: (value: T) => false | U; + decode: (data: U) => T; + } + + /** + * The generic form of `PageLoad` and `LayoutLoad`. You should import those from `./$types` (see [generated types](https://svelte.dev/docs/kit/types#Generated-types)) + * rather than using `Load` directly. + */ + export type Load< + Params extends Partial> = Partial>, + InputData extends Record | null = Record | null, + ParentData extends Record = Record, + OutputData extends Record | void = Record | void, + RouteId extends string | null = string | null + > = (event: LoadEvent) => MaybePromise; + + /** + * The generic form of `PageLoadEvent` and `LayoutLoadEvent`. You should import those from `./$types` (see [generated types](https://svelte.dev/docs/kit/types#Generated-types)) + * rather than using `LoadEvent` directly. + */ + export interface LoadEvent< + Params extends Partial> = Partial>, + Data extends Record | null = Record | null, + ParentData extends Record = Record, + RouteId extends string | null = string | null + > extends NavigationEvent { + /** + * `fetch` is equivalent to the [native `fetch` web API](https://developer.mozilla.org/en-US/docs/Web/API/fetch), with a few additional features: + * + * - It can be used to make credentialed requests on the server, as it inherits the `cookie` and `authorization` headers for the page request. + * - It can make relative requests on the server (ordinarily, `fetch` requires a URL with an origin when used in a server context). + * - Internal requests (e.g. for `+server.js` routes) go directly to the handler function when running on the server, without the overhead of an HTTP call. + * - During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text` and `json` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle) + * - During hydration, the response will be read from the HTML, guaranteeing consistency and preventing an additional network request. + * + * You can learn more about making credentialed requests with cookies [here](https://svelte.dev/docs/kit/load#Cookies) + */ + fetch: typeof fetch; + /** + * Contains the data returned by the route's server `load` function (in `+layout.server.js` or `+page.server.js`), if any. + */ + data: Data; + /** + * If you need to set headers for the response, you can do so using the this method. This is useful if you want the page to be cached, for example: + * + * ```js + * /// file: src/routes/blog/+page.js + * export async function load({ fetch, setHeaders }) { + * const url = `https://cms.example.com/articles.json`; + * const response = await fetch(url); + * + * setHeaders({ + * age: response.headers.get('age'), + * 'cache-control': response.headers.get('cache-control') + * }); + * + * return response.json(); + * } + * ``` + * + * Setting the same header multiple times (even in separate `load` functions) is an error — you can only set a given header once. + * + * You cannot add a `set-cookie` header with `setHeaders` — use the [`cookies`](https://svelte.dev/docs/kit/@sveltejs-kit#Cookies) API in a server-only `load` function instead. + * + * `setHeaders` has no effect when a `load` function runs in the browser. + */ + setHeaders: (headers: Record) => void; + /** + * `await parent()` returns data from parent `+layout.js` `load` functions. + * Implicitly, a missing `+layout.js` is treated as a `({ data }) => data` function, meaning that it will return and forward data from parent `+layout.server.js` files. + * + * Be careful not to introduce accidental waterfalls when using `await parent()`. If for example you only want to merge parent data into the returned output, call it _after_ fetching your other data. + */ + parent: () => Promise; + /** + * This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](https://svelte.dev/docs/kit/$app-navigation#invalidate) to cause `load` to rerun. + * + * Most of the time you won't need this, as `fetch` calls `depends` on your behalf — it's only necessary if you're using a custom API client that bypasses `fetch`. + * + * URLs can be absolute or relative to the page being loaded, and must be [encoded](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding). + * + * Custom identifiers have to be prefixed with one or more lowercase letters followed by a colon to conform to the [URI specification](https://www.rfc-editor.org/rfc/rfc3986.html). + * + * The following example shows how to use `depends` to register a dependency on a custom identifier, which is `invalidate`d after a button click, making the `load` function rerun. + * + * ```js + * /// file: src/routes/+page.js + * let count = 0; + * export async function load({ depends }) { + * depends('increase:count'); + * + * return { count: count++ }; + * } + * ``` + * + * ```html + * /// file: src/routes/+page.svelte + * + * + *

{data.count}

+ * + * ``` + */ + depends: (...deps: Array<`${string}:${string}`>) => void; + /** + * Use this function to opt out of dependency tracking for everything that is synchronously called within the callback. Example: + * + * ```js + * /// file: src/routes/+page.server.js + * export async function load({ untrack, url }) { + * // Untrack url.pathname so that path changes don't trigger a rerun + * if (untrack(() => url.pathname === '/')) { + * return { message: 'Welcome!' }; + * } + * } + * ``` + */ + untrack: (fn: () => T) => T; + } + + export interface NavigationEvent< + Params extends Partial> = Partial>, + RouteId extends string | null = string | null + > { + /** + * The parameters of the current page - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object + */ + params: Params; + /** + * Info about the current route + */ + route: { + /** + * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. It is `null` when no route is matched. + */ + id: RouteId; + }; + /** + * The URL of the current page + */ + url: URL; + } + + /** + * Information about the target of a specific navigation. + */ + export interface NavigationTarget { + /** + * Parameters of the target page - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object. + * Is `null` if the target is not part of the SvelteKit app (could not be resolved to a route). + */ + params: Record | null; + /** + * Info about the target route + */ + route: { + /** + * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. It is `null` when no route is matched. + */ + id: string | null; + }; + /** + * The URL that is navigated to + */ + url: URL; + } + + /** + * - `enter`: The app has hydrated/started + * - `form`: The user submitted a `` with a GET method + * - `leave`: The user is leaving the app by closing the tab or using the back/forward buttons to go to a different document + * - `link`: Navigation was triggered by a link click + * - `goto`: Navigation was triggered by a `goto(...)` call or a redirect + * - `popstate`: Navigation was triggered by back/forward navigation + */ + export type NavigationType = 'enter' | 'form' | 'leave' | 'link' | 'goto' | 'popstate'; + + export interface Navigation { + /** + * Where navigation was triggered from + */ + from: NavigationTarget | null; + /** + * Where navigation is going to/has gone to + */ + to: NavigationTarget | null; + /** + * The type of navigation: + * - `form`: The user submitted a `` + * - `leave`: The app is being left either because the tab is being closed or a navigation to a different document is occurring + * - `link`: Navigation was triggered by a link click + * - `goto`: Navigation was triggered by a `goto(...)` call or a redirect + * - `popstate`: Navigation was triggered by back/forward navigation + */ + type: Exclude; + /** + * Whether or not the navigation will result in the page being unloaded (i.e. not a client-side navigation) + */ + willUnload: boolean; + /** + * In case of a history back/forward navigation, the number of steps to go back/forward + */ + delta?: number; + /** + * A promise that resolves once the navigation is complete, and rejects if the navigation + * fails or is aborted. In the case of a `willUnload` navigation, the promise will never resolve + */ + complete: Promise; + } + + /** + * The argument passed to [`beforeNavigate`](https://svelte.dev/docs/kit/$app-navigation#beforeNavigate) callbacks. + */ + export interface BeforeNavigate extends Navigation { + /** + * Call this to prevent the navigation from starting. + */ + cancel: () => void; + } + + /** + * The argument passed to [`onNavigate`](https://svelte.dev/docs/kit/$app-navigation#onNavigate) callbacks. + */ + export interface OnNavigate extends Navigation { + /** + * The type of navigation: + * - `form`: The user submitted a `` + * - `link`: Navigation was triggered by a link click + * - `goto`: Navigation was triggered by a `goto(...)` call or a redirect + * - `popstate`: Navigation was triggered by back/forward navigation + */ + type: Exclude; + /** + * Since `onNavigate` callbacks are called immediately before a client-side navigation, they will never be called with a navigation that unloads the page. + */ + willUnload: false; + } + + /** + * The argument passed to [`afterNavigate`](https://svelte.dev/docs/kit/$app-navigation#afterNavigate) callbacks. + */ + export interface AfterNavigate extends Omit { + /** + * The type of navigation: + * - `enter`: The app has hydrated/started + * - `form`: The user submitted a `` + * - `link`: Navigation was triggered by a link click + * - `goto`: Navigation was triggered by a `goto(...)` call or a redirect + * - `popstate`: Navigation was triggered by back/forward navigation + */ + type: Exclude; + /** + * Since `afterNavigate` callbacks are called after a navigation completes, they will never be called with a navigation that unloads the page. + */ + willUnload: false; + } + + /** + * The shape of the [`page`](https://svelte.dev/docs/kit/$app-state#page) reactive object and the [`$page`](https://svelte.dev/docs/kit/$app-stores) store. + */ + export interface Page< + Params extends Record = Record, + RouteId extends string | null = string | null + > { + /** + * The URL of the current page. + */ + url: URL; + /** + * The parameters of the current page - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object. + */ + params: Params; + /** + * Info about the current route. + */ + route: { + /** + * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. It is `null` when no route is matched. + */ + id: RouteId; + }; + /** + * HTTP status code of the current page. + */ + status: number; + /** + * The error object of the current page, if any. Filled from the `handleError` hooks. + */ + error: App.Error | null; + /** + * The merged result of all data from all `load` functions on the current page. You can type a common denominator through `App.PageData`. + */ + data: App.PageData & Record; + /** + * The page state, which can be manipulated using the [`pushState`](https://svelte.dev/docs/kit/$app-navigation#pushState) and [`replaceState`](https://svelte.dev/docs/kit/$app-navigation#replaceState) functions from `$app/navigation`. + */ + state: App.PageState; + /** + * Filled only after a form submission. See [form actions](https://svelte.dev/docs/kit/form-actions) for more info. + */ + form: any; + } + + /** + * The shape of a param matcher. See [matching](https://svelte.dev/docs/kit/advanced-routing#Matching) for more info. + */ + export type ParamMatcher = (param: string) => boolean; + + export interface RequestEvent< + Params extends Partial> = Partial>, + RouteId extends string | null = string | null + > { + /** + * Get or set cookies related to the current request + */ + cookies: Cookies; + /** + * `fetch` is equivalent to the [native `fetch` web API](https://developer.mozilla.org/en-US/docs/Web/API/fetch), with a few additional features: + * + * - It can be used to make credentialed requests on the server, as it inherits the `cookie` and `authorization` headers for the page request. + * - It can make relative requests on the server (ordinarily, `fetch` requires a URL with an origin when used in a server context). + * - Internal requests (e.g. for `+server.js` routes) go directly to the handler function when running on the server, without the overhead of an HTTP call. + * - During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text` and `json` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle) + * - During hydration, the response will be read from the HTML, guaranteeing consistency and preventing an additional network request. + * + * You can learn more about making credentialed requests with cookies [here](https://svelte.dev/docs/kit/load#Cookies). + */ + fetch: typeof fetch; + /** + * The client's IP address, set by the adapter. + */ + getClientAddress: () => string; + /** + * Contains custom data that was added to the request within the [`server handle hook`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle). + */ + locals: App.Locals; + /** + * The parameters of the current route - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object. + */ + params: Params; + /** + * Additional data made available through the adapter. + */ + platform: Readonly | undefined; + /** + * The original request object. + */ + request: Request; + /** + * Info about the current route. + */ + route: { + /** + * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. It is `null` when no route is matched. + */ + id: RouteId; + }; + /** + * If you need to set headers for the response, you can do so using the this method. This is useful if you want the page to be cached, for example: + * + * ```js + * /// file: src/routes/blog/+page.js + * export async function load({ fetch, setHeaders }) { + * const url = `https://cms.example.com/articles.json`; + * const response = await fetch(url); + * + * setHeaders({ + * age: response.headers.get('age'), + * 'cache-control': response.headers.get('cache-control') + * }); + * + * return response.json(); + * } + * ``` + * + * Setting the same header multiple times (even in separate `load` functions) is an error — you can only set a given header once. + * + * You cannot add a `set-cookie` header with `setHeaders` — use the [`cookies`](https://svelte.dev/docs/kit/@sveltejs-kit#Cookies) API instead. + */ + setHeaders: (headers: Record) => void; + /** + * The requested URL. + */ + url: URL; + /** + * `true` if the request comes from the client asking for `+page/layout.server.js` data. The `url` property will be stripped of the internal information + * related to the data request in this case. Use this property instead if the distinction is important to you. + */ + isDataRequest: boolean; + /** + * `true` for `+server.js` calls coming from SvelteKit without the overhead of actually making an HTTP request. This happens when you make same-origin `fetch` requests on the server. + */ + isSubRequest: boolean; + } + + /** + * A `(event: RequestEvent) => Response` function exported from a `+server.js` file that corresponds to an HTTP verb (`GET`, `PUT`, `PATCH`, etc) and handles requests with that method. + * + * It receives `Params` as the first generic argument, which you can skip by using [generated types](https://svelte.dev/docs/kit/types#Generated-types) instead. + */ + export type RequestHandler< + Params extends Partial> = Partial>, + RouteId extends string | null = string | null + > = (event: RequestEvent) => MaybePromise; + + export interface ResolveOptions { + /** + * Applies custom transforms to HTML. If `done` is true, it's the final chunk. Chunks are not guaranteed to be well-formed HTML + * (they could include an element's opening tag but not its closing tag, for example) + * but they will always be split at sensible boundaries such as `%sveltekit.head%` or layout/page components. + * @param input the html chunk and the info if this is the last chunk + */ + transformPageChunk?: (input: { html: string; done: boolean }) => MaybePromise; + /** + * Determines which headers should be included in serialized responses when a `load` function loads a resource with `fetch`. + * By default, none will be included. + * @param name header name + * @param value header value + */ + filterSerializedResponseHeaders?: (name: string, value: string) => boolean; + /** + * Determines what should be added to the `` tag to preload it. + * By default, `js` and `css` files will be preloaded. + * @param input the type of the file and its path + */ + preload?: (input: { type: 'font' | 'css' | 'js' | 'asset'; path: string }) => boolean; + } + + export interface RouteDefinition { + id: string; + api: { + methods: Array; + }; + page: { + methods: Array>; + }; + pattern: RegExp; + prerender: PrerenderOption; + segments: RouteSegment[]; + methods: Array; + config: Config; + } + + export class Server { + constructor(manifest: SSRManifest); + init(options: ServerInitOptions): Promise; + respond(request: Request, options: RequestOptions): Promise; + } + + export interface ServerInitOptions { + /** A map of environment variables. */ + env: Record; + /** A function that turns an asset filename into a `ReadableStream`. Required for the `read` export from `$app/server` to work. */ + read?: (file: string) => ReadableStream; + } + + export interface SSRManifest { + appDir: string; + appPath: string; + /** Static files from `kit.config.files.assets` and the service worker (if any). */ + assets: Set; + mimeTypes: Record; + + /** private fields */ + _: { + client: NonNullable; + nodes: SSRNodeLoader[]; + routes: SSRRoute[]; + prerendered_routes: Set; + matchers: () => Promise>; + /** A `[file]: size` map of all assets imported by server code. */ + server_assets: Record; + }; + } + + /** + * The generic form of `PageServerLoad` and `LayoutServerLoad`. You should import those from `./$types` (see [generated types](https://svelte.dev/docs/kit/types#Generated-types)) + * rather than using `ServerLoad` directly. + */ + export type ServerLoad< + Params extends Partial> = Partial>, + ParentData extends Record = Record, + OutputData extends Record | void = Record | void, + RouteId extends string | null = string | null + > = (event: ServerLoadEvent) => MaybePromise; + + export interface ServerLoadEvent< + Params extends Partial> = Partial>, + ParentData extends Record = Record, + RouteId extends string | null = string | null + > extends RequestEvent { + /** + * `await parent()` returns data from parent `+layout.server.js` `load` functions. + * + * Be careful not to introduce accidental waterfalls when using `await parent()`. If for example you only want to merge parent data into the returned output, call it _after_ fetching your other data. + */ + parent: () => Promise; + /** + * This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](https://svelte.dev/docs/kit/$app-navigation#invalidate) to cause `load` to rerun. + * + * Most of the time you won't need this, as `fetch` calls `depends` on your behalf — it's only necessary if you're using a custom API client that bypasses `fetch`. + * + * URLs can be absolute or relative to the page being loaded, and must be [encoded](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding). + * + * Custom identifiers have to be prefixed with one or more lowercase letters followed by a colon to conform to the [URI specification](https://www.rfc-editor.org/rfc/rfc3986.html). + * + * The following example shows how to use `depends` to register a dependency on a custom identifier, which is `invalidate`d after a button click, making the `load` function rerun. + * + * ```js + * /// file: src/routes/+page.js + * let count = 0; + * export async function load({ depends }) { + * depends('increase:count'); + * + * return { count: count++ }; + * } + * ``` + * + * ```html + * /// file: src/routes/+page.svelte + * + * + *

{data.count}

+ * + * ``` + */ + depends: (...deps: string[]) => void; + /** + * Use this function to opt out of dependency tracking for everything that is synchronously called within the callback. Example: + * + * ```js + * /// file: src/routes/+page.js + * export async function load({ untrack, url }) { + * // Untrack url.pathname so that path changes don't trigger a rerun + * if (untrack(() => url.pathname === '/')) { + * return { message: 'Welcome!' }; + * } + * } + * ``` + */ + untrack: (fn: () => T) => T; + } + + /** + * Shape of a form action method that is part of `export const actions = {...}` in `+page.server.js`. + * See [form actions](https://svelte.dev/docs/kit/form-actions) for more information. + */ + export type Action< + Params extends Partial> = Partial>, + OutputData extends Record | void = Record | void, + RouteId extends string | null = string | null + > = (event: RequestEvent) => MaybePromise; + + /** + * Shape of the `export const actions = {...}` object in `+page.server.js`. + * See [form actions](https://svelte.dev/docs/kit/form-actions) for more information. + */ + export type Actions< + Params extends Partial> = Partial>, + OutputData extends Record | void = Record | void, + RouteId extends string | null = string | null + > = Record>; + + /** + * When calling a form action via fetch, the response will be one of these shapes. + * ```svelte + * { + * return ({ result }) => { + * // result is of type ActionResult + * }; + * }} + * ``` + */ + export type ActionResult< + Success extends Record | undefined = Record, + Failure extends Record | undefined = Record + > = + | { type: 'success'; status: number; data?: Success } + | { type: 'failure'; status: number; data?: Failure } + | { type: 'redirect'; status: number; location: string } + | { type: 'error'; status?: number; error: any }; + + /** + * The object returned by the [`error`](https://svelte.dev/docs/kit/@sveltejs-kit#error) function. + */ + export interface HttpError { + /** The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses), in the range 400-599. */ + status: number; + /** The content of the error. */ + body: App.Error; + } + + /** + * The object returned by the [`redirect`](https://svelte.dev/docs/kit/@sveltejs-kit#redirect) function. + */ + export interface Redirect { + /** The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages), in the range 300-308. */ + status: 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308; + /** The location to redirect to. */ + location: string; + } + + export type SubmitFunction< + Success extends Record | undefined = Record, + Failure extends Record | undefined = Record + > = (input: { + action: URL; + formData: FormData; + formElement: HTMLFormElement; + controller: AbortController; + submitter: HTMLElement | null; + cancel: () => void; + }) => MaybePromise< + | void + | ((opts: { + formData: FormData; + formElement: HTMLFormElement; + action: URL; + result: ActionResult; + /** + * Call this to get the default behavior of a form submission response. + * @param options Set `reset: false` if you don't want the `` values to be reset after a successful submission. + * @param invalidateAll Set `invalidateAll: false` if you don't want the action to call `invalidateAll` after submission. + */ + update: (options?: { reset?: boolean; invalidateAll?: boolean }) => Promise; + }) => MaybePromise) + >; + + /** + * The type of `export const snapshot` exported from a page or layout component. + */ + export interface Snapshot { + capture: () => T; + restore: (snapshot: T) => void; + } + interface AdapterEntry { + /** + * A string that uniquely identifies an HTTP service (e.g. serverless function) and is used for deduplication. + * For example, `/foo/a-[b]` and `/foo/[c]` are different routes, but would both + * be represented in a Netlify _redirects file as `/foo/:param`, so they share an ID + */ + id: string; + + /** + * A function that compares the candidate route with the current route to determine + * if it should be grouped with the current route. + * + * Use cases: + * - Fallback pages: `/foo/[c]` is a fallback for `/foo/a-[b]`, and `/[...catchall]` is a fallback for all routes + * - Grouping routes that share a common `config`: `/foo` should be deployed to the edge, `/bar` and `/baz` should be deployed to a serverless function + */ + filter(route: RouteDefinition): boolean; + + /** + * A function that is invoked once the entry has been created. This is where you + * should write the function to the filesystem and generate redirect manifests. + */ + complete(entry: { generateManifest(opts: { relativePath: string }): string }): MaybePromise; + } + + // Based on https://github.com/josh-hemphill/csp-typed-directives/blob/latest/src/csp.types.ts + // + // MIT License + // + // Copyright (c) 2021-present, Joshua Hemphill + // Copyright (c) 2021, Tecnico Corporation + // + // Permission is hereby granted, free of charge, to any person obtaining a copy + // of this software and associated documentation files (the "Software"), to deal + // in the Software without restriction, including without limitation the rights + // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + // copies of the Software, and to permit persons to whom the Software is + // furnished to do so, subject to the following conditions: + // + // The above copyright notice and this permission notice shall be included in all + // copies or substantial portions of the Software. + // + // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + // SOFTWARE. + + namespace Csp { + type ActionSource = 'strict-dynamic' | 'report-sample'; + type BaseSource = + | 'self' + | 'unsafe-eval' + | 'unsafe-hashes' + | 'unsafe-inline' + | 'wasm-unsafe-eval' + | 'none'; + type CryptoSource = `${'nonce' | 'sha256' | 'sha384' | 'sha512'}-${string}`; + type FrameSource = HostSource | SchemeSource | 'self' | 'none'; + type HostNameScheme = `${string}.${string}` | 'localhost'; + type HostSource = `${HostProtocolSchemes}${HostNameScheme}${PortScheme}`; + type HostProtocolSchemes = `${string}://` | ''; + type HttpDelineator = '/' | '?' | '#' | '\\'; + type PortScheme = `:${number}` | '' | ':*'; + type SchemeSource = 'http:' | 'https:' | 'data:' | 'mediastream:' | 'blob:' | 'filesystem:'; + type Source = HostSource | SchemeSource | CryptoSource | BaseSource; + type Sources = Source[]; + } + + interface CspDirectives { + 'child-src'?: Csp.Sources; + 'default-src'?: Array; + 'frame-src'?: Csp.Sources; + 'worker-src'?: Csp.Sources; + 'connect-src'?: Csp.Sources; + 'font-src'?: Csp.Sources; + 'img-src'?: Csp.Sources; + 'manifest-src'?: Csp.Sources; + 'media-src'?: Csp.Sources; + 'object-src'?: Csp.Sources; + 'prefetch-src'?: Csp.Sources; + 'script-src'?: Array; + 'script-src-elem'?: Csp.Sources; + 'script-src-attr'?: Csp.Sources; + 'style-src'?: Array; + 'style-src-elem'?: Csp.Sources; + 'style-src-attr'?: Csp.Sources; + 'base-uri'?: Array; + sandbox?: Array< + | 'allow-downloads-without-user-activation' + | 'allow-forms' + | 'allow-modals' + | 'allow-orientation-lock' + | 'allow-pointer-lock' + | 'allow-popups' + | 'allow-popups-to-escape-sandbox' + | 'allow-presentation' + | 'allow-same-origin' + | 'allow-scripts' + | 'allow-storage-access-by-user-activation' + | 'allow-top-navigation' + | 'allow-top-navigation-by-user-activation' + >; + 'form-action'?: Array; + 'frame-ancestors'?: Array; + 'navigate-to'?: Array; + 'report-uri'?: string[]; + 'report-to'?: string[]; + + 'require-trusted-types-for'?: Array<'script'>; + 'trusted-types'?: Array<'none' | 'allow-duplicates' | '*' | string>; + 'upgrade-insecure-requests'?: boolean; + + /** @deprecated */ + 'require-sri-for'?: Array<'script' | 'style' | 'script style'>; + + /** @deprecated */ + 'block-all-mixed-content'?: boolean; + + /** @deprecated */ + 'plugin-types'?: Array<`${string}/${string}` | 'none'>; + + /** @deprecated */ + referrer?: Array< + | 'no-referrer' + | 'no-referrer-when-downgrade' + | 'origin' + | 'origin-when-cross-origin' + | 'same-origin' + | 'strict-origin' + | 'strict-origin-when-cross-origin' + | 'unsafe-url' + | 'none' + >; + } + + type HttpMethod = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTIONS'; + + interface Logger { + (msg: string): void; + success(msg: string): void; + error(msg: string): void; + warn(msg: string): void; + minor(msg: string): void; + info(msg: string): void; + } + + type MaybePromise = T | Promise; + + interface Prerendered { + /** + * A map of `path` to `{ file }` objects, where a path like `/foo` corresponds to `foo.html` and a path like `/bar/` corresponds to `bar/index.html`. + */ + pages: Map< + string, + { + /** The location of the .html file relative to the output directory */ + file: string; + } + >; + /** + * A map of `path` to `{ type }` objects. + */ + assets: Map< + string, + { + /** The MIME type of the asset */ + type: string; + } + >; + /** + * A map of redirects encountered during prerendering. + */ + redirects: Map< + string, + { + status: number; + location: string; + } + >; + /** An array of prerendered paths (without trailing slashes, regardless of the trailingSlash config) */ + paths: string[]; + } + + interface PrerenderHttpErrorHandler { + (details: { + status: number; + path: string; + referrer: string | null; + referenceType: 'linked' | 'fetched'; + message: string; + }): void; + } + + interface PrerenderMissingIdHandler { + (details: { path: string; id: string; referrers: string[]; message: string }): void; + } + + interface PrerenderEntryGeneratorMismatchHandler { + (details: { generatedFromId: string; entry: string; matchedId: string; message: string }): void; + } + + type PrerenderHttpErrorHandlerValue = 'fail' | 'warn' | 'ignore' | PrerenderHttpErrorHandler; + type PrerenderMissingIdHandlerValue = 'fail' | 'warn' | 'ignore' | PrerenderMissingIdHandler; + type PrerenderEntryGeneratorMismatchHandlerValue = + | 'fail' + | 'warn' + | 'ignore' + | PrerenderEntryGeneratorMismatchHandler; + + export type PrerenderOption = boolean | 'auto'; + + interface RequestOptions { + getClientAddress(): string; + platform?: App.Platform; + } + + interface RouteSegment { + content: string; + dynamic: boolean; + rest: boolean; + } + + type TrailingSlash = 'never' | 'always' | 'ignore'; + interface Asset { + file: string; + size: number; + type: string | null; + } + + interface BuildData { + app_dir: string; + app_path: string; + manifest_data: ManifestData; + out_dir: string; + service_worker: string | null; + client: { + /** Path to the client entry point. */ + start: string; + /** Path to the generated `app.js` file that contains the client manifest. Only set in case of `bundleStrategy === 'split'`. */ + app?: string; + /** JS files that the client entry point relies on. */ + imports: string[]; + /** + * JS files that represent the entry points of the layouts/pages. + * An entry is undefined if the layout/page has no component or universal file (i.e. only has a `.server.js` file). + * Only set in case of `router.resolution === 'server'`. + */ + nodes?: Array; + /** + * CSS files referenced in the entry points of the layouts/pages. + * An entry is undefined if the layout/page has no component or universal file (i.e. only has a `.server.js` file) or if has no CSS. + * Only set in case of `router.resolution === 'server'`. + */ + css?: Array; + /** + * Contains the client route manifest in a form suitable for the server which is used for server side route resolution. + * Notably, it contains all routes, regardless of whether they are prerendered or not (those are missing in the optimized server route manifest). + * Only set in case of `router.resolution === 'server'`. + */ + routes?: SSRClientRoute[]; + stylesheets: string[]; + fonts: string[]; + uses_env_dynamic_public: boolean; + /** Only set in case of `bundleStrategy === 'inline'`. */ + inline?: { + script: string; + style: string | undefined; + }; + } | null; + server_manifest: import('vite').Manifest; + } + + interface ManifestData { + /** Static files from `kit.config.files.assets`. */ + assets: Asset[]; + hooks: { + client: string | null; + server: string | null; + universal: string | null; + }; + nodes: PageNode[]; + routes: RouteData[]; + matchers: Record; + } + + interface PageNode { + depth: number; + /** The `+page/layout.svelte`. */ + component?: string; // TODO supply default component if it's missing (bit of an edge case) + /** The `+page/layout.js/.ts`. */ + universal?: string; + /** The `+page/layout.server.js/ts`. */ + server?: string; + parent_id?: string; + parent?: PageNode; + /** Filled with the pages that reference this layout (if this is a layout). */ + child_pages?: PageNode[]; + } + + type RecursiveRequired = { + // Recursive implementation of TypeScript's Required utility type. + // Will recursively continue until it reaches a primitive or Function + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + [K in keyof T]-?: Extract extends never // If it does not have a Function type + ? RecursiveRequired // recursively continue through. + : T[K]; // Use the exact type for everything else + }; + + interface RouteParam { + name: string; + matcher: string; + optional: boolean; + rest: boolean; + chained: boolean; + } + + /** + * Represents a route segment in the app. It can either be an intermediate node + * with only layout/error pages, or a leaf, at which point either `page` and `leaf` + * or `endpoint` is set. + */ + interface RouteData { + id: string; + parent: RouteData | null; + + segment: string; + pattern: RegExp; + params: RouteParam[]; + + layout: PageNode | null; + error: PageNode | null; + leaf: PageNode | null; + + page: { + layouts: Array; + errors: Array; + leaf: number; + } | null; + + endpoint: { + file: string; + } | null; + } + + interface SSRComponent { + default: { + render( + props: Record, + opts: { context: Map } + ): { + html: string; + head: string; + css: { + code: string; + map: any; // TODO + }; + }; + }; + } + + type SSRComponentLoader = () => Promise; + + interface UniversalNode { + load?: Load; + prerender?: PrerenderOption; + ssr?: boolean; + csr?: boolean; + trailingSlash?: TrailingSlash; + config?: any; + entries?: PrerenderEntryGenerator; + } + + interface ServerNode { + load?: ServerLoad; + prerender?: PrerenderOption; + ssr?: boolean; + csr?: boolean; + trailingSlash?: TrailingSlash; + actions?: Actions; + config?: any; + entries?: PrerenderEntryGenerator; + } + + interface SSRNode { + /** index into the `nodes` array in the generated `client/app.js`. */ + index: number; + /** external JS files that are loaded on the client. `imports[0]` is the entry point (e.g. `client/nodes/0.js`) */ + imports: string[]; + /** external CSS files that are loaded on the client */ + stylesheets: string[]; + /** external font files that are loaded on the client */ + fonts: string[]; + + universal_id?: string; + server_id?: string; + + /** inlined styles */ + inline_styles?(): MaybePromise>; + /** Svelte component */ + component?: SSRComponentLoader; + /** +page.js or +layout.js */ + universal?: UniversalNode; + /** +page.server.js, +layout.server.js, or +server.js */ + server?: ServerNode; + } + + type SSRNodeLoader = () => Promise; + + interface PageNodeIndexes { + errors: Array; + layouts: Array; + leaf: number; + } + + type PrerenderEntryGenerator = () => MaybePromise>>; + + type SSREndpoint = Partial> & { + prerender?: PrerenderOption; + trailingSlash?: TrailingSlash; + config?: any; + entries?: PrerenderEntryGenerator; + fallback?: RequestHandler; + }; + + interface SSRRoute { + id: string; + pattern: RegExp; + params: RouteParam[]; + page: PageNodeIndexes | null; + endpoint: (() => Promise) | null; + endpoint_id?: string; + } + + interface SSRClientRoute { + id: string; + pattern: RegExp; + params: RouteParam[]; + errors: Array; + layouts: Array<[has_server_load: boolean, node_id: number] | undefined>; + leaf: [has_server_load: boolean, node_id: number]; + } + + type ValidatedConfig = Config & { + kit: ValidatedKitConfig; + extensions: string[]; + }; + + type ValidatedKitConfig = Omit, 'adapter'> & { + adapter?: Adapter; + }; + /** + * Throws an error with a HTTP status code and an optional message. + * When called during request handling, this will cause SvelteKit to + * return an error response without invoking `handleError`. + * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it. + * @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. + * @param body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property. + * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling. + * @throws {Error} If the provided status is invalid (not between 400 and 599). + */ + export function error(status: number, body: App.Error): never; + /** + * Throws an error with a HTTP status code and an optional message. + * When called during request handling, this will cause SvelteKit to + * return an error response without invoking `handleError`. + * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it. + * @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. + * @param body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property. + * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling. + * @throws {Error} If the provided status is invalid (not between 400 and 599). + */ + export function error(status: number, body?: { + message: string; + } extends App.Error ? App.Error | string | undefined : never): never; + /** + * Checks whether this is an error thrown by {@link error}. + * @param status The status to filter for. + * */ + export function isHttpError(e: unknown, status?: T | undefined): e is (HttpError_1 & { + status: T extends undefined ? never : T; + }); + /** + * Redirect a request. When called during request handling, SvelteKit will return a redirect response. + * Make sure you're not catching the thrown redirect, which would prevent SvelteKit from handling it. + * + * Most common status codes: + * * `303 See Other`: redirect as a GET request (often used after a form POST request) + * * `307 Temporary Redirect`: redirect will keep the request method + * * `308 Permanent Redirect`: redirect will keep the request method, SEO will be transferred to the new page + * + * [See all redirect status codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages) + * + * @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages). Must be in the range 300-308. + * @param location The location to redirect to. + * @throws {Redirect} This error instructs SvelteKit to redirect to the specified location. + * @throws {Error} If the provided status is invalid. + * */ + export function redirect(status: 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | ({} & number), location: string | URL): never; + /** + * Checks whether this is a redirect thrown by {@link redirect}. + * @param e The object to check. + * */ + export function isRedirect(e: unknown): e is Redirect_1; + /** + * Create a JSON `Response` object from the supplied data. + * @param data The value that will be serialized as JSON. + * @param init Options such as `status` and `headers` that will be added to the response. `Content-Type: application/json` and `Content-Length` headers will be added automatically. + */ + export function json(data: any, init?: ResponseInit | undefined): Response; + /** + * Create a `Response` object from the supplied body. + * @param body The value that will be used as-is. + * @param init Options such as `status` and `headers` that will be added to the response. A `Content-Length` header will be added automatically. + */ + export function text(body: string, init?: ResponseInit | undefined): Response; + /** + * Create an `ActionFailure` object. Call when form submission fails. + * @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. + * */ + export function fail(status: number): ActionFailure; + /** + * Create an `ActionFailure` object. Call when form submission fails. + * @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. + * @param data Data associated with the failure (e.g. validation errors) + * */ + export function fail | undefined = undefined>(status: number, data: T): ActionFailure; + /** + * Checks whether this is an action failure thrown by {@link fail}. + * @param e The object to check. + * */ + export function isActionFailure(e: unknown): e is ActionFailure; + /** + * Strips possible SvelteKit-internal suffixes and trailing slashes from the URL pathname. + * Returns the normalized URL as well as a method for adding the potential suffix back + * based on a new pathname (possibly including search) or URL. + * ```js + * import { normalizeUrl } from '@sveltejs/kit'; + * + * const { url, denormalize } = normalizeUrl('/blog/post/__data.json'); + * console.log(url.pathname); // /blog/post + * console.log(denormalize('/blog/post/a')); // /blog/post/a/__data.json + * ``` + * @since 2.18.0 + */ + export function normalizeUrl(url: URL | string): { + url: URL; + wasNormalized: boolean; + denormalize: (url?: string | URL) => URL; + }; + export type LessThan = TNumber extends TArray["length"] ? TArray[number] : LessThan; + export type NumericRange = Exclude, LessThan>; + export const VERSION: string; + class HttpError_1 { + + constructor(status: number, body: { + message: string; + } extends App.Error ? (App.Error | string | undefined) : App.Error); + status: number; + body: App.Error; + toString(): string; + } + class Redirect_1 { + + constructor(status: 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308, location: string); + status: 301 | 302 | 303 | 307 | 308 | 300 | 304 | 305 | 306; + location: string; + } + + export {}; +} + +declare module '@sveltejs/kit/hooks' { + /** + * A helper function for sequencing multiple `handle` calls in a middleware-like manner. + * The behavior for the `handle` options is as follows: + * - `transformPageChunk` is applied in reverse order and merged + * - `preload` is applied in forward order, the first option "wins" and no `preload` options after it are called + * - `filterSerializedResponseHeaders` behaves the same as `preload` + * + * ```js + * /// file: src/hooks.server.js + * import { sequence } from '@sveltejs/kit/hooks'; + * + * /// type: import('@sveltejs/kit').Handle + * async function first({ event, resolve }) { + * console.log('first pre-processing'); + * const result = await resolve(event, { + * transformPageChunk: ({ html }) => { + * // transforms are applied in reverse order + * console.log('first transform'); + * return html; + * }, + * preload: () => { + * // this one wins as it's the first defined in the chain + * console.log('first preload'); + * return true; + * } + * }); + * console.log('first post-processing'); + * return result; + * } + * + * /// type: import('@sveltejs/kit').Handle + * async function second({ event, resolve }) { + * console.log('second pre-processing'); + * const result = await resolve(event, { + * transformPageChunk: ({ html }) => { + * console.log('second transform'); + * return html; + * }, + * preload: () => { + * console.log('second preload'); + * return true; + * }, + * filterSerializedResponseHeaders: () => { + * // this one wins as it's the first defined in the chain + * console.log('second filterSerializedResponseHeaders'); + * return true; + * } + * }); + * console.log('second post-processing'); + * return result; + * } + * + * export const handle = sequence(first, second); + * ``` + * + * The example above would print: + * + * ``` + * first pre-processing + * first preload + * second pre-processing + * second filterSerializedResponseHeaders + * second transform + * first transform + * second post-processing + * first post-processing + * ``` + * + * @param handlers The chain of `handle` functions + * */ + export function sequence(...handlers: import("@sveltejs/kit").Handle[]): import("@sveltejs/kit").Handle; + + export {}; +} + +declare module '@sveltejs/kit/node' { + export function getRequest({ request, base, bodySizeLimit }: { + request: import("http").IncomingMessage; + base: string; + bodySizeLimit?: number; + }): Promise; + + export function setResponse(res: import("http").ServerResponse, response: Response): Promise; + /** + * Converts a file on disk to a readable stream + * @since 2.4.0 + */ + export function createReadableStream(file: string): ReadableStream; + + export {}; +} + +declare module '@sveltejs/kit/node/polyfills' { + /** + * Make various web APIs available as globals: + * - `crypto` + * - `File` + */ + export function installPolyfills(): void; + + export {}; +} + +declare module '@sveltejs/kit/vite' { + /** + * Returns the SvelteKit Vite plugins. + * */ + export function sveltekit(): Promise; + + export {}; +} + +declare module '$app/environment' { + /** + * `true` if the app is running in the browser. + */ + export const browser: boolean; + + /** + * Whether the dev server is running. This is not guaranteed to correspond to `NODE_ENV` or `MODE`. + */ + export const dev: boolean; + + /** + * SvelteKit analyses your app during the `build` step by running it. During this process, `building` is `true`. This also applies during prerendering. + */ + export const building: boolean; + + /** + * The value of `config.kit.version.name`. + */ + export const version: string; + + export {}; +} + +declare module '$app/forms' { + /** + * Use this function to deserialize the response from a form submission. + * Usage: + * + * ```js + * import { deserialize } from '$app/forms'; + * + * async function handleSubmit(event) { + * const response = await fetch('/form?/action', { + * method: 'POST', + * body: new FormData(event.target) + * }); + * + * const result = deserialize(await response.text()); + * // ... + * } + * ``` + * */ + export function deserialize | undefined, Failure extends Record | undefined>(result: string): import("@sveltejs/kit").ActionResult; + /** + * This action enhances a `` element that otherwise would work without JavaScript. + * + * The `submit` function is called upon submission with the given FormData and the `action` that should be triggered. + * If `cancel` is called, the form will not be submitted. + * You can use the abort `controller` to cancel the submission in case another one starts. + * If a function is returned, that function is called with the response from the server. + * If nothing is returned, the fallback will be used. + * + * If this function or its return value isn't set, it + * - falls back to updating the `form` prop with the returned data if the action is on the same page as the form + * - updates `page.status` + * - resets the `` element and invalidates all data in case of successful submission with no redirect response + * - redirects in case of a redirect response + * - redirects to the nearest error page in case of an unexpected error + * + * If you provide a custom function with a callback and want to use the default behavior, invoke `update` in your callback. + * It accepts an options object + * - `reset: false` if you don't want the `` values to be reset after a successful submission + * - `invalidateAll: false` if you don't want the action to call `invalidateAll` after submission + * @param form_element The form element + * @param submit Submit callback + */ + export function enhance | undefined, Failure extends Record | undefined>(form_element: HTMLFormElement, submit?: import("@sveltejs/kit").SubmitFunction): { + destroy(): void; + }; + /** + * This action updates the `form` property of the current page with the given data and updates `page.status`. + * In case of an error, it redirects to the nearest error page. + * */ + export function applyAction | undefined, Failure extends Record | undefined>(result: import("@sveltejs/kit").ActionResult): Promise; + + export {}; +} + +declare module '$app/navigation' { + /** + * A lifecycle function that runs the supplied `callback` when the current component mounts, and also whenever we navigate to a URL. + * + * `afterNavigate` must be called during a component initialization. It remains active as long as the component is mounted. + * */ + export function afterNavigate(callback: (navigation: import("@sveltejs/kit").AfterNavigate) => void): void; + /** + * A navigation interceptor that triggers before we navigate to a URL, whether by clicking a link, calling `goto(...)`, or using the browser back/forward controls. + * + * Calling `cancel()` will prevent the navigation from completing. If `navigation.type === 'leave'` — meaning the user is navigating away from the app (or closing the tab) — calling `cancel` will trigger the native browser unload confirmation dialog. In this case, the navigation may or may not be cancelled depending on the user's response. + * + * When a navigation isn't to a SvelteKit-owned route (and therefore controlled by SvelteKit's client-side router), `navigation.to.route.id` will be `null`. + * + * If the navigation will (if not cancelled) cause the document to unload — in other words `'leave'` navigations and `'link'` navigations where `navigation.to.route === null` — `navigation.willUnload` is `true`. + * + * `beforeNavigate` must be called during a component initialization. It remains active as long as the component is mounted. + * */ + export function beforeNavigate(callback: (navigation: import("@sveltejs/kit").BeforeNavigate) => void): void; + /** + * A lifecycle function that runs the supplied `callback` immediately before we navigate to a new URL except during full-page navigations. + * + * If you return a `Promise`, SvelteKit will wait for it to resolve before completing the navigation. This allows you to — for example — use `document.startViewTransition`. Avoid promises that are slow to resolve, since navigation will appear stalled to the user. + * + * If a function (or a `Promise` that resolves to a function) is returned from the callback, it will be called once the DOM has updated. + * + * `onNavigate` must be called during a component initialization. It remains active as long as the component is mounted. + * */ + export function onNavigate(callback: (navigation: import("@sveltejs/kit").OnNavigate) => MaybePromise<(() => void) | void>): void; + /** + * If called when the page is being updated following a navigation (in `onMount` or `afterNavigate` or an action, for example), this disables SvelteKit's built-in scroll handling. + * This is generally discouraged, since it breaks user expectations. + * */ + export function disableScrollHandling(): void; + /** + * Allows you to navigate programmatically to a given route, with options such as keeping the current element focused. + * Returns a Promise that resolves when SvelteKit navigates (or fails to navigate, in which case the promise rejects) to the specified `url`. + * + * For external URLs, use `window.location = url` instead of calling `goto(url)`. + * + * @param url Where to navigate to. Note that if you've set [`config.kit.paths.base`](https://svelte.dev/docs/kit/configuration#paths) and the URL is root-relative, you need to prepend the base path if you want to navigate within the app. + * @param {Object} opts Options related to the navigation + * */ + export function goto(url: string | URL, opts?: { + replaceState?: boolean | undefined; + noScroll?: boolean | undefined; + keepFocus?: boolean | undefined; + invalidateAll?: boolean | undefined; + invalidate?: (string | URL | ((url: URL) => boolean))[] | undefined; + state?: App.PageState | undefined; + } | undefined): Promise; + /** + * Causes any `load` functions belonging to the currently active page to re-run if they depend on the `url` in question, via `fetch` or `depends`. Returns a `Promise` that resolves when the page is subsequently updated. + * + * If the argument is given as a `string` or `URL`, it must resolve to the same URL that was passed to `fetch` or `depends` (including query parameters). + * To create a custom identifier, use a string beginning with `[a-z]+:` (e.g. `custom:state`) — this is a valid URL. + * + * The `function` argument can be used define a custom predicate. It receives the full `URL` and causes `load` to rerun if `true` is returned. + * This can be useful if you want to invalidate based on a pattern instead of a exact match. + * + * ```ts + * // Example: Match '/path' regardless of the query parameters + * import { invalidate } from '$app/navigation'; + * + * invalidate((url) => url.pathname === '/path'); + * ``` + * @param resource The invalidated URL + * */ + export function invalidate(resource: string | URL | ((url: URL) => boolean)): Promise; + /** + * Causes all `load` functions belonging to the currently active page to re-run. Returns a `Promise` that resolves when the page is subsequently updated. + * */ + export function invalidateAll(): Promise; + /** + * Programmatically preloads the given page, which means + * 1. ensuring that the code for the page is loaded, and + * 2. calling the page's load function with the appropriate options. + * + * This is the same behaviour that SvelteKit triggers when the user taps or mouses over an `` element with `data-sveltekit-preload-data`. + * If the next navigation is to `href`, the values returned from load will be used, making navigation instantaneous. + * Returns a Promise that resolves with the result of running the new route's `load` functions once the preload is complete. + * + * @param href Page to preload + * */ + export function preloadData(href: string): Promise<{ + type: "loaded"; + status: number; + data: Record; + } | { + type: "redirect"; + location: string; + }>; + /** + * Programmatically imports the code for routes that haven't yet been fetched. + * Typically, you might call this to speed up subsequent navigation. + * + * You can specify routes by any matching pathname such as `/about` (to match `src/routes/about/+page.svelte`) or `/blog/*` (to match `src/routes/blog/[slug]/+page.svelte`). + * + * Unlike `preloadData`, this won't call `load` functions. + * Returns a Promise that resolves when the modules have been imported. + * + * */ + export function preloadCode(pathname: string): Promise; + /** + * Programmatically create a new history entry with the given `page.state`. To use the current URL, you can pass `''` as the first argument. Used for [shallow routing](https://svelte.dev/docs/kit/shallow-routing). + * + * */ + export function pushState(url: string | URL, state: App.PageState): void; + /** + * Programmatically replace the current history entry with the given `page.state`. To use the current URL, you can pass `''` as the first argument. Used for [shallow routing](https://svelte.dev/docs/kit/shallow-routing). + * + * */ + export function replaceState(url: string | URL, state: App.PageState): void; + type MaybePromise = T | Promise; + + export {}; +} + +declare module '$app/paths' { + /** + * A string that matches [`config.kit.paths.base`](https://svelte.dev/docs/kit/configuration#paths). + * + * Example usage: `Link` + */ + export let base: '' | `/${string}`; + + /** + * An absolute path that matches [`config.kit.paths.assets`](https://svelte.dev/docs/kit/configuration#paths). + * + * > [!NOTE] If a value for `config.kit.paths.assets` is specified, it will be replaced with `'/_svelte_kit_assets'` during `vite dev` or `vite preview`, since the assets don't yet live at their eventual URL. + */ + export let assets: '' | `https://${string}` | `http://${string}` | '/_svelte_kit_assets'; + + /** + * Populate a route ID with params to resolve a pathname. + * @example + * ```js + * import { resolveRoute } from '$app/paths'; + * + * resolveRoute( + * `/blog/[slug]/[...somethingElse]`, + * { + * slug: 'hello-world', + * somethingElse: 'something/else' + * } + * ); // `/blog/hello-world/something/else` + * ``` + */ + export function resolveRoute(id: string, params: Record): string; + + export {}; +} + +declare module '$app/server' { + import type { RequestEvent } from '@sveltejs/kit'; + /** + * Read the contents of an imported asset from the filesystem + * @example + * ```js + * import { read } from '$app/server'; + * import somefile from './somefile.txt'; + * + * const asset = read(somefile); + * const text = await asset.text(); + * ``` + * @since 2.4.0 + */ + export function read(asset: string): Response; + /** + * Returns the current `RequestEvent`. Can be used inside server hooks, server `load` functions, actions, and endpoints (and functions called by them). + * + * In environments without [`AsyncLocalStorage`](https://nodejs.org/api/async_context.html#class-asynclocalstorage), this must be called synchronously (i.e. not after an `await`). + * @since 2.20.0 + */ + export function getRequestEvent(): RequestEvent>, string | null>; + + export {}; +} + +declare module '$app/state' { + /** + * A read-only reactive object with information about the current page, serving several use cases: + * - retrieving the combined `data` of all pages/layouts anywhere in your component tree (also see [loading data](https://svelte.dev/docs/kit/load)) + * - retrieving the current value of the `form` prop anywhere in your component tree (also see [form actions](https://svelte.dev/docs/kit/form-actions)) + * - retrieving the page state that was set through `goto`, `pushState` or `replaceState` (also see [goto](https://svelte.dev/docs/kit/$app-navigation#goto) and [shallow routing](https://svelte.dev/docs/kit/shallow-routing)) + * - retrieving metadata such as the URL you're on, the current route and its parameters, and whether or not there was an error + * + * ```svelte + * + * + * + *

Currently at {page.url.pathname}

+ * + * {#if page.error} + * Problem detected + * {:else} + * All systems operational + * {/if} + * ``` + * + * Changes to `page` are available exclusively with runes. (The legacy reactivity syntax will not reflect any changes) + * + * ```svelte + * + * + * ``` + * + * On the server, values can only be read during rendering (in other words _not_ in e.g. `load` functions). In the browser, the values can be read at any time. + * + * */ + export const page: import("@sveltejs/kit").Page; + /** + * A read-only object representing an in-progress navigation, with `from`, `to`, `type` and (if `type === 'popstate'`) `delta` properties. + * Values are `null` when no navigation is occurring, or during server rendering. + * */ + export const navigating: import("@sveltejs/kit").Navigation | { + from: null; + to: null; + type: null; + willUnload: null; + delta: null; + complete: null; + }; + /** + * A read-only reactive value that's initially `false`. If [`version.pollInterval`](https://svelte.dev/docs/kit/configuration#version) is a non-zero value, SvelteKit will poll for new versions of the app and update `current` to `true` when it detects one. `updated.check()` will force an immediate check, regardless of polling. + * */ + export const updated: { + get current(): boolean; + check(): Promise; + }; + + export {}; +} + +declare module '$app/stores' { + export function getStores(): { + + page: typeof page; + + navigating: typeof navigating; + + updated: typeof updated; + }; + /** + * A readable store whose value contains page data. + * + * On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time. + * + * @deprecated Use `page` from `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated)) + * */ + export const page: import("svelte/store").Readable; + /** + * A readable store. + * When navigating starts, its value is a `Navigation` object with `from`, `to`, `type` and (if `type === 'popstate'`) `delta` properties. + * When navigating finishes, its value reverts to `null`. + * + * On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time. + * + * @deprecated Use `navigating` from `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated)) + * */ + export const navigating: import("svelte/store").Readable; + /** + * A readable store whose initial value is `false`. If [`version.pollInterval`](https://svelte.dev/docs/kit/configuration#version) is a non-zero value, SvelteKit will poll for new versions of the app and update the store value to `true` when it detects one. `updated.check()` will force an immediate check, regardless of polling. + * + * On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time. + * + * @deprecated Use `updated` from `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated)) + * */ + export const updated: import("svelte/store").Readable & { + check(): Promise; + }; + + export {}; +}/** + * It's possible to tell SvelteKit how to type objects inside your app by declaring the `App` namespace. By default, a new project will have a file called `src/app.d.ts` containing the following: + * + * ```ts + * declare global { + * namespace App { + * // interface Error {} + * // interface Locals {} + * // interface PageData {} + * // interface PageState {} + * // interface Platform {} + * } + * } + * + * export {}; + * ``` + * + * The `export {}` line exists because without it, the file would be treated as an _ambient module_ which prevents you from adding `import` declarations. + * If you need to add ambient `declare module` declarations, do so in a separate file like `src/ambient.d.ts`. + * + * By populating these interfaces, you will gain type safety when using `event.locals`, `event.platform`, and `data` from `load` functions. + */ +declare namespace App { + /** + * Defines the common shape of expected and unexpected errors. Expected errors are thrown using the `error` function. Unexpected errors are handled by the `handleError` hooks which should return this shape. + */ + export interface Error { + message: string; + } + + /** + * The interface that defines `event.locals`, which can be accessed in server [hooks](https://svelte.dev/docs/kit/hooks) (`handle`, and `handleError`), server-only `load` functions, and `+server.js` files. + */ + export interface Locals {} + + /** + * Defines the common shape of the [page.data state](https://svelte.dev/docs/kit/$app-state#page) and [$page.data store](https://svelte.dev/docs/kit/$app-stores#page) - that is, the data that is shared between all pages. + * The `Load` and `ServerLoad` functions in `./$types` will be narrowed accordingly. + * Use optional properties for data that is only present on specific pages. Do not add an index signature (`[key: string]: any`). + */ + export interface PageData {} + + /** + * The shape of the `page.state` object, which can be manipulated using the [`pushState`](https://svelte.dev/docs/kit/$app-navigation#pushState) and [`replaceState`](https://svelte.dev/docs/kit/$app-navigation#replaceState) functions from `$app/navigation`. + */ + export interface PageState {} + + /** + * If your adapter provides [platform-specific context](https://svelte.dev/docs/kit/adapters#Platform-specific-context) via `event.platform`, you can specify it here. + */ + export interface Platform {} +} + +/** + * This module is only available to [service workers](https://svelte.dev/docs/kit/service-workers). + */ +declare module '$service-worker' { + /** + * The `base` path of the deployment. Typically this is equivalent to `config.kit.paths.base`, but it is calculated from `location.pathname` meaning that it will continue to work correctly if the site is deployed to a subdirectory. + * Note that there is a `base` but no `assets`, since service workers cannot be used if `config.kit.paths.assets` is specified. + */ + export const base: string; + /** + * An array of URL strings representing the files generated by Vite, suitable for caching with `cache.addAll(build)`. + * During development, this is an empty array. + */ + export const build: string[]; + /** + * An array of URL strings representing the files in your static directory, or whatever directory is specified by `config.kit.files.assets`. You can customize which files are included from `static` directory using [`config.kit.serviceWorker.files`](https://svelte.dev/docs/kit/configuration) + */ + export const files: string[]; + /** + * An array of pathnames corresponding to prerendered pages and endpoints. + * During development, this is an empty array. + */ + export const prerendered: string[]; + /** + * See [`config.kit.version`](https://svelte.dev/docs/kit/configuration#version). It's useful for generating unique cache names inside your service worker, so that a later deployment of your app can invalidate old caches. + */ + export const version: string; +} + +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sveltejs/kit/types/index.d.ts.map b/node_modules/@sveltejs/kit/types/index.d.ts.map new file mode 100644 index 0000000..7489e8b --- /dev/null +++ b/node_modules/@sveltejs/kit/types/index.d.ts.map @@ -0,0 +1,174 @@ +{ + "version": 3, + "file": "index.d.ts", + "names": [ + "Adapter", + "LoadProperties", + "AwaitedActions", + "OptionalUnion", + "uniqueSymbol", + "ActionFailure", + "UnpackValidationError", + "Builder", + "Config", + "Cookies", + "Emulator", + "KitConfig", + "Handle", + "HandleServerError", + "HandleClientError", + "HandleFetch", + "ServerInit", + "ClientInit", + "Reroute", + "Transport", + "Transporter", + "Load", + "LoadEvent", + "NavigationEvent", + "NavigationTarget", + "NavigationType", + "Navigation", + "BeforeNavigate", + "OnNavigate", + "AfterNavigate", + "Page", + "ParamMatcher", + "RequestEvent", + "RequestHandler", + "ResolveOptions", + "RouteDefinition", + "Server", + "ServerInitOptions", + "SSRManifest", + "ServerLoad", + "ServerLoadEvent", + "Action", + "Actions", + "ActionResult", + "HttpError", + "Redirect", + "SubmitFunction", + "Snapshot", + "AdapterEntry", + "Csp", + "CspDirectives", + "HttpMethod", + "Logger", + "MaybePromise", + "Prerendered", + "PrerenderHttpErrorHandler", + "PrerenderMissingIdHandler", + "PrerenderEntryGeneratorMismatchHandler", + "PrerenderHttpErrorHandlerValue", + "PrerenderMissingIdHandlerValue", + "PrerenderEntryGeneratorMismatchHandlerValue", + "PrerenderOption", + "RequestOptions", + "RouteSegment", + "TrailingSlash", + "Asset", + "BuildData", + "ManifestData", + "PageNode", + "RecursiveRequired", + "RouteParam", + "RouteData", + "SSRComponent", + "SSRComponentLoader", + "UniversalNode", + "ServerNode", + "SSRNode", + "SSRNodeLoader", + "PageNodeIndexes", + "PrerenderEntryGenerator", + "SSREndpoint", + "SSRRoute", + "SSRClientRoute", + "ValidatedConfig", + "ValidatedKitConfig", + "isHttpError", + "redirect", + "isRedirect", + "json", + "text", + "isActionFailure", + "normalizeUrl", + "VERSION", + "sequence", + "getRequest", + "setResponse", + "createReadableStream", + "installPolyfills", + "sveltekit", + "browser", + "dev", + "building", + "version", + "deserialize", + "enhance", + "applyAction", + "afterNavigate", + "beforeNavigate", + "onNavigate", + "disableScrollHandling", + "goto", + "invalidate", + "invalidateAll", + "preloadData", + "preloadCode", + "pushState", + "replaceState", + "base", + "assets", + "resolveRoute", + "read", + "getRequestEvent", + "page", + "navigating", + "updated", + "getStores" + ], + "sources": [ + "../src/exports/public.d.ts", + "../src/runtime/control.js", + "../src/types/private.d.ts", + "../src/types/internal.d.ts", + "../src/exports/index.js", + "../src/version.js", + "../src/exports/hooks/sequence.js", + "../src/exports/node/index.js", + "../src/exports/node/polyfills.js", + "../src/exports/vite/index.js", + "../src/runtime/app/environment/types.d.ts", + "../src/runtime/app/forms.js", + "../src/runtime/client/client.js", + "../src/runtime/app/paths/types.d.ts", + "../src/runtime/app/server/index.js", + "../src/runtime/app/server/event.js", + "../src/runtime/app/state/index.js", + "../src/runtime/app/stores.js" + ], + "sourcesContent": [ + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null + ], + "mappings": ";;;;;;;;;kBA2BiBA,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;aA2BZC,cAAcA;;;;;;aAMdC,cAAcA;;;;;;;;MAQrBC,aAAaA;;;;;OAKJC,YAAYA;;kBAETC,aAAaA;;;;;;MAMzBC,qBAAqBA;;;;;;;;;;;kBAWTC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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JC,QAAQA;;;;;;iBCoCFC,UAAUA;;;;;;iBAkCVC,WAAWA;;;;;iBAgFjBC,oBAAoBA;;;;;;;;;;;iBC3MpBC,gBAAgBA;;;;;;;;;iBCgHVC,SAASA;;;;;;;;;cC/HlBC,OAAOA;;;;;cAKPC,GAAGA;;;;;cAKHC,QAAQA;;;;;cAKRC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;iBCWJC,WAAWA;;;;;;;;;;;;;;;;;;;;;;;;iBA8CXC,OAAOA;;;;;;;iBCwiEDC,WAAWA;;;;;;;;;;;iBA/TjBC,aAAaA;;;;;;;;;;;;iBAiBbC,cAAcA;;;;;;;;;;iBAedC,UAAUA;;;;;iBASVC,qBAAqBA;;;;;;;;;;iBA8BrBC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;iBAsCJC,UAAUA;;;;iBA0BVC,aAAaA;;;;;;;;;;;;iBAqBPC,WAAWA;;;;;;;;;;;;;;;;;;iBAoCXC,WAAWA;;;;;iBAsCjBC,SAASA;;;;;iBA+CTC,YAAYA;MV96DhB/D,YAAYA;;;;;;;;;;;YWtJbgE,IAAIA;;;;;;;YAOJC,MAAMA;;;;;;;;;;;;;;;;;iBAiBDC,YAAYA;;;;;;;;;;;;;;;;;;;iBCVZC,IAAIA;;;;;;;iBCGJC,eAAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cC2BlBC,IAAIA;;;;;cAQJC,UAAUA;;;;;;;;;;;cAMVC,OAAOA;;;;;;;;;iBCrDPC,SAASA;;;;;;;;;;;;;;;cAyBTH,IAAIA;;;;;;;;;;cAiBJC,UAAUA;;;;;;;;cAeVC,OAAOA", + "ignoreList": [] +} \ No newline at end of file diff --git a/node_modules/@sveltejs/vite-plugin-svelte-inspector/LICENSE b/node_modules/@sveltejs/vite-plugin-svelte-inspector/LICENSE new file mode 100644 index 0000000..c1a5d8f --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte-inspector/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 [these people](https://github.com/sveltejs/vite-plugin-svelte/graphs/contributors) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@sveltejs/vite-plugin-svelte-inspector/README.md b/node_modules/@sveltejs/vite-plugin-svelte-inspector/README.md new file mode 100644 index 0000000..bbdf50c --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte-inspector/README.md @@ -0,0 +1,26 @@ +# @sveltejs/vite-plugin-svelte-inspector + +A [Svelte](https://svelte.dev) inspector plugin for [Vite](https://vitejs.dev). + +## Usage + +```js +// vite.config.js +import { defineConfig } from 'vite'; +import { svelte } from '@sveltejs/vite-plugin-svelte'; +import { svelteInspector } from '@sveltejs/vite-plugin-svelte-inspector'; + +export default defineConfig({ + plugins: [ + // the svelte plugin is required to work + svelte(), + svelteInspector({ + /* plugin options */ + }) + ] +}); +``` + +## License + +[MIT](./LICENSE) diff --git a/node_modules/@sveltejs/vite-plugin-svelte-inspector/package.json b/node_modules/@sveltejs/vite-plugin-svelte-inspector/package.json new file mode 100644 index 0000000..182bbee --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte-inspector/package.json @@ -0,0 +1,56 @@ +{ + "name": "@sveltejs/vite-plugin-svelte-inspector", + "version": "4.0.1", + "license": "MIT", + "author": "dominikg", + "files": [ + "src", + "types" + ], + "type": "module", + "types": "types/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./types/index.d.ts", + "default": "./src/index.js" + } + } + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/sveltejs/vite-plugin-svelte.git", + "directory": "packages/vite-plugin-svelte-inspector" + }, + "keywords": [ + "vite-plugin", + "vite plugin", + "vite", + "svelte" + ], + "bugs": { + "url": "https://github.com/sveltejs/vite-plugin-svelte/issues" + }, + "homepage": "https://github.com/sveltejs/vite-plugin-svelte#readme", + "dependencies": { + "debug": "^4.3.7" + }, + "peerDependencies": { + "@sveltejs/vite-plugin-svelte": "^5.0.0", + "svelte": "^5.0.0", + "vite": "^6.0.0" + }, + "devDependencies": { + "@types/debug": "^4.1.12", + "svelte": "^5.2.7", + "vite": "^6.0.0" + }, + "scripts": { + "check:publint": "publint --strict", + "check:types": "tsc --noEmit", + "generate:types": "dts-buddy -m \"@sveltejs/vite-plugin-svelte-inspector:src/public.d.ts\"" + } +} \ No newline at end of file diff --git a/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/debug.js b/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/debug.js new file mode 100644 index 0000000..0575a83 --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/debug.js @@ -0,0 +1,3 @@ +import _debug from 'debug'; + +export const debug = _debug('vite-plugin-svelte-inspector'); diff --git a/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/index.js b/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/index.js new file mode 100644 index 0000000..3b69783 --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/index.js @@ -0,0 +1,112 @@ +import { normalizePath } from 'vite'; +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { debug } from './debug.js'; +import { defaultInspectorOptions, parseEnvironmentOptions } from './options.js'; +import { cleanUrl } from './utils.js'; + +function getInspectorPath() { + const pluginPath = normalizePath(path.dirname(fileURLToPath(import.meta.url))); + return pluginPath.replace( + /\/vite-plugin-svelte-inspector\/src$/, + '/vite-plugin-svelte-inspector/src/runtime/' + ); +} + +/** + * @param {Partial} [options] + * @returns {import('vite').Plugin} + */ +export function svelteInspector(options) { + const inspectorPath = getInspectorPath(); + debug(`svelte inspector path: ${inspectorPath}`); + + /** @type {import('vite').ResolvedConfig} */ + let viteConfig; + /** @type {import('./public.d.ts').Options} */ + let inspectorOptions; + let disabled = false; + + return { + name: 'vite-plugin-svelte-inspector', + apply: 'serve', + enforce: 'pre', + + configResolved(config) { + viteConfig = config; + const environmentOptions = parseEnvironmentOptions(config); + if (environmentOptions === false) { + debug('environment options set to false, inspector disabled'); + disabled = true; + return; + } + + // Handle config from svelte.config.js through vite-plugin-svelte + const vps = config.plugins.find((p) => p.name === 'vite-plugin-svelte'); + const configFileOptions = vps?.api?.options?.inspector; + + // vite-plugin-svelte can only pass options through it's `api` instead of `options`. + // that means this plugin could be created but should be disabled, so we check this case here. + if (vps && !options && !configFileOptions && !environmentOptions) { + debug("vite-plugin-svelte didn't pass options, inspector disabled"); + disabled = true; + return; + } + + if (environmentOptions === true) { + inspectorOptions = defaultInspectorOptions; + } else { + inspectorOptions = { + ...defaultInspectorOptions, + ...configFileOptions, + ...options, + ...(environmentOptions || {}) + }; + } + + inspectorOptions.__internal = { + base: config.base?.replace(/\/$/, '') || '' + }; + }, + + async resolveId(importee, _, options) { + if (options?.ssr || disabled) { + return; + } + if (importee.startsWith('virtual:svelte-inspector-options')) { + return importee; + } else if (importee.startsWith('virtual:svelte-inspector-path:')) { + return importee.replace('virtual:svelte-inspector-path:', inspectorPath); + } + }, + + async load(id, options) { + if (options?.ssr || disabled) { + return; + } + if (id === 'virtual:svelte-inspector-options') { + return `export default ${JSON.stringify(inspectorOptions ?? {})}`; + } else if (id.startsWith(inspectorPath)) { + // read file ourselves to avoid getting shut out by vites fs.allow check + const file = cleanUrl(id); + if (fs.existsSync(id)) { + return await fs.promises.readFile(file, 'utf-8'); + } else { + viteConfig.logger.error( + `[vite-plugin-svelte-inspector] failed to find svelte-inspector: ${id}` + ); + } + } + }, + + transform(code, id, options) { + if (options?.ssr || disabled) { + return; + } + if (id.includes('vite/dist/client/client.mjs')) { + return { code: `${code}\nimport('virtual:svelte-inspector-path:load-inspector.js')` }; + } + } + }; +} diff --git a/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/options.js b/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/options.js new file mode 100644 index 0000000..15a2456 --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/options.js @@ -0,0 +1,63 @@ +import process from 'node:process'; +import { loadEnv } from 'vite'; +import { debug } from './debug.js'; + +/** @type {import('./public.d.ts').Options} */ +export const defaultInspectorOptions = { + toggleKeyCombo: 'alt-x', + navKeys: { parent: 'ArrowUp', child: 'ArrowDown', next: 'ArrowRight', prev: 'ArrowLeft' }, + escapeKeys: ['Backspace', 'Escape'], + openKey: 'Enter', + holdMode: true, + showToggleButton: 'active', + toggleButtonPos: 'top-right', + customStyles: true +}; + +/** + * @param {import('vite').ResolvedConfig} config + * @returns {Partial | boolean | void} + */ +export function parseEnvironmentOptions(config) { + const env = loadEnv(config.mode, config.envDir ?? process.cwd(), 'SVELTE_INSPECTOR'); + const options = env?.SVELTE_INSPECTOR_OPTIONS; + const toggle = env?.SVELTE_INSPECTOR_TOGGLE; + if (options) { + try { + const parsed = JSON.parse(options); + const parsedType = typeof parsed; + if (parsedType === 'boolean') { + return parsed; + } else if (parsedType === 'object') { + if (Array.isArray(parsed)) { + throw new Error('invalid type, expected object map but got array'); + } + const parsedKeys = Object.keys(parsed); + const defaultKeys = Object.keys(defaultInspectorOptions); + const unknownKeys = parsedKeys.filter((k) => !defaultKeys.includes(k)); + if (unknownKeys.length) { + config.logger.warn( + `[vite-plugin-svelte-inspector] ignoring unknown options in environment SVELTE_INSPECTOR_OPTIONS: ${unknownKeys.join( + ', ' + )}` + ); + for (const key of unknownKeys) { + delete parsed[key]; + } + } + debug('loaded environment config', parsed); + return parsed; + } + } catch (e) { + config.logger.error( + `[vite-plugin-svelte-inspector] failed to parse inspector options from environment SVELTE_INSPECTOR_OPTIONS="${options}"\n${e}` + ); + } + } else if (toggle) { + const keyConfig = { + toggleKeyCombo: toggle + }; + debug('loaded environment config', keyConfig); + return keyConfig; + } +} diff --git a/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/public.d.ts b/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/public.d.ts new file mode 100644 index 0000000..6849623 --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/public.d.ts @@ -0,0 +1,78 @@ +export interface Options { + /** + * define a key combo to toggle inspector, + * @default 'meta-shift' on mac, 'control-shift' on other os + * + * any number of modifiers `control` `shift` `alt` `meta` followed by zero or one regular key, separated by - + * examples: control-shift, control-o, control-alt-s meta-x control-meta + * Some keys have native behavior (e.g. alt-s opens history menu on firefox). + * To avoid conflicts or accidentally typing into inputs, modifier only combinations are recommended. + */ + toggleKeyCombo?: string; + + /** + * define keys to select elements with via keyboard + * @default {parent: 'ArrowUp', child: 'ArrowDown', next: 'ArrowRight', prev: 'ArrowLeft' } + * + * improves accessibility and also helps when you want to select elements that do not have a hoverable surface area + * due to tight wrapping + * + * A note for users of screen-readers: + * If you are using arrow keys to navigate the page itself, change the navKeys to avoid conflicts. + * e.g. navKeys: {parent: 'w', prev: 'a', child: 's', next: 'd'} + * + * + * parent: select closest parent + * child: select first child (or grandchild) + * next: next sibling (or parent if no next sibling exists) + * prev: previous sibling (or parent if no prev sibling exists) + */ + navKeys?: { parent: string; child: string; next: string; prev: string }; + + /** + * define key to open the editor for the currently selected dom node + * + * @default 'Enter' + */ + openKey?: string; + + /** + * define keys to close the inspector + * @default ['Backspace', 'Escape'] + */ + escapeKeys?: string[]; + + /** + * inspector is automatically disabled when releasing toggleKeyCombo after holding it for a longpress + * @default true + */ + holdMode?: boolean; + + /** + * when to show the toggle button + * @default 'active' + */ + showToggleButton?: 'always' | 'active' | 'never'; + + /** + * where to display the toggle button + * @default top-right + */ + toggleButtonPos?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'; + + /** + * inject custom styles when inspector is active + */ + customStyles?: boolean; + + /** + * internal options that are automatically set, not to be set or used by users + * @internal + */ + __internal?: { + // vite base url + base: string; + }; +} +// eslint-disable-next-line n/no-missing-import +export * from './index.js'; diff --git a/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/runtime/Inspector.svelte b/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/runtime/Inspector.svelte new file mode 100644 index 0000000..9a03c49 --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/runtime/Inspector.svelte @@ -0,0 +1,411 @@ + + + + +{#if show_toggle} + +{/if} +{#if enabled && active_el && file_loc} + {@const loc = active_el.__svelte_meta.loc} +
+ <{active_el.tagName.toLowerCase()}> {file_loc} +
+
+ {active_el.tagName.toLowerCase()} in file {loc.file} on line {loc.line} column {loc.column} +
+{/if} + + diff --git a/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/runtime/load-inspector.js b/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/runtime/load-inspector.js new file mode 100644 index 0000000..5662f9f --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/runtime/load-inspector.js @@ -0,0 +1,14 @@ +// eslint-disable-next-line n/no-missing-import +import Inspector from 'virtual:svelte-inspector-path:Inspector.svelte'; +import { mount } from 'svelte'; +function create_inspector_host() { + const id = 'svelte-inspector-host'; + if (document.getElementById(id) != null) { + throw new Error('svelte-inspector-host element already exists'); + } + const el = document.createElement('div'); + el.setAttribute('id', id); + document.documentElement.appendChild(el); + return el; +} +mount(Inspector, { target: create_inspector_host() }); diff --git a/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/utils.js b/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/utils.js new file mode 100644 index 0000000..bcb43f9 --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/utils.js @@ -0,0 +1,8 @@ +const postfixRE = /[?#].*$/s; + +/** + * @param {string} url + */ +export function cleanUrl(url) { + return url.replace(postfixRE, ''); +} diff --git a/node_modules/@sveltejs/vite-plugin-svelte-inspector/types/index.d.ts b/node_modules/@sveltejs/vite-plugin-svelte-inspector/types/index.d.ts new file mode 100644 index 0000000..2ee6298 --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte-inspector/types/index.d.ts @@ -0,0 +1,82 @@ +declare module '@sveltejs/vite-plugin-svelte-inspector' { + export interface Options { + /** + * define a key combo to toggle inspector, + * @default 'meta-shift' on mac, 'control-shift' on other os + * + * any number of modifiers `control` `shift` `alt` `meta` followed by zero or one regular key, separated by - + * examples: control-shift, control-o, control-alt-s meta-x control-meta + * Some keys have native behavior (e.g. alt-s opens history menu on firefox). + * To avoid conflicts or accidentally typing into inputs, modifier only combinations are recommended. + */ + toggleKeyCombo?: string; + + /** + * define keys to select elements with via keyboard + * @default {parent: 'ArrowUp', child: 'ArrowDown', next: 'ArrowRight', prev: 'ArrowLeft' } + * + * improves accessibility and also helps when you want to select elements that do not have a hoverable surface area + * due to tight wrapping + * + * A note for users of screen-readers: + * If you are using arrow keys to navigate the page itself, change the navKeys to avoid conflicts. + * e.g. navKeys: {parent: 'w', prev: 'a', child: 's', next: 'd'} + * + * + * parent: select closest parent + * child: select first child (or grandchild) + * next: next sibling (or parent if no next sibling exists) + * prev: previous sibling (or parent if no prev sibling exists) + */ + navKeys?: { parent: string; child: string; next: string; prev: string }; + + /** + * define key to open the editor for the currently selected dom node + * + * @default 'Enter' + */ + openKey?: string; + + /** + * define keys to close the inspector + * @default ['Backspace', 'Escape'] + */ + escapeKeys?: string[]; + + /** + * inspector is automatically disabled when releasing toggleKeyCombo after holding it for a longpress + * @default true + */ + holdMode?: boolean; + + /** + * when to show the toggle button + * @default 'active' + */ + showToggleButton?: 'always' | 'active' | 'never'; + + /** + * where to display the toggle button + * @default top-right + */ + toggleButtonPos?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'; + + /** + * inject custom styles when inspector is active + */ + customStyles?: boolean; + + /** + * internal options that are automatically set, not to be set or used by users + * */ + __internal?: { + // vite base url + base: string; + }; + } + export function svelteInspector(options?: Partial): import("vite").Plugin; + + export {}; +} + +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sveltejs/vite-plugin-svelte-inspector/types/index.d.ts.map b/node_modules/@sveltejs/vite-plugin-svelte-inspector/types/index.d.ts.map new file mode 100644 index 0000000..08ac045 --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte-inspector/types/index.d.ts.map @@ -0,0 +1,17 @@ +{ + "version": 3, + "file": "index.d.ts", + "names": [ + "Options", + "svelteInspector" + ], + "sources": [ + "../src/public.d.ts", + "../src/index.js" + ], + "sourcesContent": [ + null, + null + ], + "mappings": ";kBAAiBA,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCoBRC,eAAeA" +} \ No newline at end of file diff --git a/node_modules/@sveltejs/vite-plugin-svelte/LICENSE b/node_modules/@sveltejs/vite-plugin-svelte/LICENSE new file mode 100644 index 0000000..c1a5d8f --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 [these people](https://github.com/sveltejs/vite-plugin-svelte/graphs/contributors) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@sveltejs/vite-plugin-svelte/README.md b/node_modules/@sveltejs/vite-plugin-svelte/README.md new file mode 100644 index 0000000..48798bc --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/README.md @@ -0,0 +1,28 @@ +# @sveltejs/vite-plugin-svelte + +The official [Svelte](https://svelte.dev) plugin for [Vite](https://vitejs.dev). + +## Usage + +```js +// vite.config.js +import { defineConfig } from 'vite'; +import { svelte } from '@sveltejs/vite-plugin-svelte'; + +export default defineConfig({ + plugins: [ + svelte({ + /* plugin options */ + }) + ] +}); +``` + +## Documentation + +- [Plugin options](../../docs/config.md) +- [FAQ](../../docs/faq.md) + +## License + +[MIT](./LICENSE) diff --git a/node_modules/@sveltejs/vite-plugin-svelte/package.json b/node_modules/@sveltejs/vite-plugin-svelte/package.json new file mode 100644 index 0000000..14d9f9e --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/package.json @@ -0,0 +1,62 @@ +{ + "name": "@sveltejs/vite-plugin-svelte", + "version": "5.0.3", + "license": "MIT", + "author": "dominikg", + "files": [ + "src", + "types" + ], + "type": "module", + "types": "types/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./types/index.d.ts", + "default": "./src/index.js" + } + } + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/sveltejs/vite-plugin-svelte.git", + "directory": "packages/vite-plugin-svelte" + }, + "keywords": [ + "vite-plugin", + "vite plugin", + "vite", + "svelte" + ], + "bugs": { + "url": "https://github.com/sveltejs/vite-plugin-svelte/issues" + }, + "homepage": "https://github.com/sveltejs/vite-plugin-svelte#readme", + "dependencies": { + "@sveltejs/vite-plugin-svelte-inspector": "^4.0.1", + "debug": "^4.4.0", + "deepmerge": "^4.3.1", + "kleur": "^4.1.5", + "magic-string": "^0.30.15", + "vitefu": "^1.0.4" + }, + "peerDependencies": { + "svelte": "^5.0.0", + "vite": "^6.0.0" + }, + "devDependencies": { + "@types/debug": "^4.1.12", + "esbuild": "^0.24.0", + "sass": "^1.83.0", + "svelte": "^5.12.0", + "vite": "^6.0.3" + }, + "scripts": { + "check:publint": "publint --strict", + "check:types": "tsc --noEmit", + "generate:types": "dts-buddy -m \"@sveltejs/vite-plugin-svelte:src/public.d.ts\"" + } +} \ No newline at end of file diff --git a/node_modules/@sveltejs/vite-plugin-svelte/src/handle-hot-update.js b/node_modules/@sveltejs/vite-plugin-svelte/src/handle-hot-update.js new file mode 100644 index 0000000..82758e5 --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/src/handle-hot-update.js @@ -0,0 +1,145 @@ +import { log, logCompilerWarnings } from './utils/log.js'; +import { toRollupError } from './utils/error.js'; + +/** + * Vite-specific HMR handling + * + * @param {Function} compileSvelte + * @param {import('vite').HmrContext} ctx + * @param {import('./types/id.d.ts').SvelteRequest} svelteRequest + * @param {import('./utils/vite-plugin-svelte-cache.js').VitePluginSvelteCache} cache + * @param {import('./types/options.d.ts').ResolvedOptions} options + * @returns {Promise} + */ +export async function handleHotUpdate(compileSvelte, ctx, svelteRequest, cache, options) { + if (!cache.has(svelteRequest)) { + // file hasn't been requested yet (e.g. async component) + log.debug( + `handleHotUpdate called before initial transform for ${svelteRequest.id}`, + undefined, + 'hmr' + ); + return; + } + const { read, server, modules } = ctx; + + const cachedJS = cache.getJS(svelteRequest); + const cachedCss = cache.getCSS(svelteRequest); + + const content = await read(); + /** @type {import('./types/compile.d.ts').CompileData} */ + let compileData; + try { + compileData = await compileSvelte(svelteRequest, content, options); + cache.update(compileData); + } catch (e) { + cache.setError(svelteRequest, e); + throw toRollupError(e, options); + } + + const affectedModules = [...modules]; + + const cssIdx = modules.findIndex((m) => m.id === svelteRequest.cssId); + if (cssIdx > -1) { + const cssUpdated = cssChanged(cachedCss, compileData.compiled.css); + if (!cssUpdated) { + log.debug(`skipping unchanged css for ${svelteRequest.cssId}`, undefined, 'hmr'); + affectedModules.splice(cssIdx, 1); + } + } + const jsIdx = modules.findIndex((m) => m.id === svelteRequest.id); + if (jsIdx > -1) { + const jsUpdated = jsChanged(cachedJS, compileData.compiled.js, svelteRequest.filename); + if (!jsUpdated) { + log.debug(`skipping unchanged js for ${svelteRequest.id}`, undefined, 'hmr'); + affectedModules.splice(jsIdx, 1); + // transform won't be called, log warnings here + logCompilerWarnings(svelteRequest, compileData.compiled.warnings, options); + } + } + + // TODO is this enough? see also: https://github.com/vitejs/vite/issues/2274 + const ssrModulesToInvalidate = affectedModules.filter((m) => !!m.ssrTransformResult); + if (ssrModulesToInvalidate.length > 0) { + log.debug( + `invalidating modules ${ssrModulesToInvalidate.map((m) => m.id).join(', ')}`, + undefined, + 'hmr' + ); + ssrModulesToInvalidate.forEach((moduleNode) => server.moduleGraph.invalidateModule(moduleNode)); + } + if (affectedModules.length > 0) { + log.debug( + `handleHotUpdate for ${svelteRequest.id} result: ${affectedModules + .map((m) => m.id) + .join(', ')}`, + undefined, + 'hmr' + ); + } + return affectedModules; +} + +/** + * @param {import('./types/compile.d.ts').Code | null} [prev] + * @param {import('./types/compile.d.ts').Code | null} [next] + * @returns {boolean} + */ +function cssChanged(prev, next) { + return !isCodeEqual(prev?.code, next?.code); +} + +/** + * @param {import('./types/compile.d.ts').Code | null} [prev] + * @param {import('./types/compile.d.ts').Code | null} [next] + * @param {string} [filename] + * @returns {boolean} + */ +function jsChanged(prev, next, filename) { + const prevJs = prev?.code; + const nextJs = next?.code; + const isStrictEqual = isCodeEqual(prevJs, nextJs); + if (isStrictEqual) { + return false; + } + const isLooseEqual = isCodeEqual(normalizeJsCode(prevJs), normalizeJsCode(nextJs)); + if (!isStrictEqual && isLooseEqual) { + log.debug( + `ignoring compiler output js change for ${filename} as it is equal to previous output after normalization`, + undefined, + 'hmr' + ); + } + return !isLooseEqual; +} + +/** + * @param {string} [prev] + * @param {string} [next] + * @returns {boolean} + */ +function isCodeEqual(prev, next) { + if (!prev && !next) { + return true; + } + if ((!prev && next) || (prev && !next)) { + return false; + } + return prev === next; +} + +/** + * remove code that only changes metadata and does not require a js update for the component to keep working + * + * 1) add_location() calls. These add location metadata to elements, only used by some dev tools + * 2) ... maybe more (or less) in the future + * + * @param {string} [code] + * @returns {string | undefined} + */ +function normalizeJsCode(code) { + if (!code) { + return code; + } + return code.replace(/\s*\badd_location\s*\([^)]*\)\s*;?/g, ''); +} diff --git a/node_modules/@sveltejs/vite-plugin-svelte/src/index.js b/node_modules/@sveltejs/vite-plugin-svelte/src/index.js new file mode 100644 index 0000000..9ec43e9 --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/src/index.js @@ -0,0 +1,236 @@ +import fs from 'node:fs'; +import process from 'node:process'; +import { svelteInspector } from '@sveltejs/vite-plugin-svelte-inspector'; +import { handleHotUpdate } from './handle-hot-update.js'; +import { log, logCompilerWarnings } from './utils/log.js'; +import { createCompileSvelte } from './utils/compile.js'; +import { buildIdParser, buildModuleIdParser } from './utils/id.js'; +import { + buildExtraViteConfig, + validateInlineOptions, + resolveOptions, + patchResolvedViteConfig, + preResolveOptions, + ensureConfigEnvironmentMainFields, + ensureConfigEnvironmentConditions +} from './utils/options.js'; +import { ensureWatchedFile, setupWatchers } from './utils/watch.js'; +import { toRollupError } from './utils/error.js'; +import { saveSvelteMetadata } from './utils/optimizer.js'; +import { VitePluginSvelteCache } from './utils/vite-plugin-svelte-cache.js'; +import { loadRaw } from './utils/load-raw.js'; +import * as svelteCompiler from 'svelte/compiler'; + +/** + * @param {Partial} [inlineOptions] + * @returns {import('vite').Plugin[]} + */ +export function svelte(inlineOptions) { + if (process.env.DEBUG != null) { + log.setLevel('debug'); + } + validateInlineOptions(inlineOptions); + const cache = new VitePluginSvelteCache(); + // updated in configResolved hook + /** @type {import('./types/id.d.ts').IdParser} */ + let requestParser; + /** @type {import('./types/id.d.ts').ModuleIdParser} */ + let moduleRequestParser; + /** @type {import('./types/options.d.ts').ResolvedOptions} */ + let options; + /** @type {import('vite').ResolvedConfig} */ + let viteConfig; + /** @type {import('./types/compile.d.ts').CompileSvelte} */ + let compileSvelte; + /** @type {import('./types/plugin-api.d.ts').PluginAPI} */ + const api = {}; + /** @type {import('vite').Plugin[]} */ + const plugins = [ + { + name: 'vite-plugin-svelte', + // make sure our resolver runs before vite internal resolver to resolve svelte field correctly + enforce: 'pre', + api, + async config(config, configEnv) { + // setup logger + if (process.env.DEBUG) { + log.setLevel('debug'); + } else if (config.logLevel) { + log.setLevel(config.logLevel); + } + // @ts-expect-error temporarily lend the options variable until fixed in configResolved + options = await preResolveOptions(inlineOptions, config, configEnv); + // extra vite config + const extraViteConfig = await buildExtraViteConfig(options, config); + log.debug('additional vite config', extraViteConfig, 'config'); + return extraViteConfig; + }, + + configEnvironment(name, config, opts) { + ensureConfigEnvironmentMainFields(name, config, opts); + // @ts-expect-error the function above should make `resolve.mainFields` non-nullable + config.resolve.mainFields.unshift('svelte'); + + ensureConfigEnvironmentConditions(name, config, opts); + // @ts-expect-error the function above should make `resolve.conditions` non-nullable + config.resolve.conditions.push('svelte'); + }, + + async configResolved(config) { + options = resolveOptions(options, config, cache); + patchResolvedViteConfig(config, options); + requestParser = buildIdParser(options); + compileSvelte = createCompileSvelte(); + viteConfig = config; + // TODO deep clone to avoid mutability from outside? + api.options = options; + log.debug('resolved options', options, 'config'); + }, + + async buildStart() { + if (!options.prebundleSvelteLibraries) return; + const isSvelteMetadataChanged = await saveSvelteMetadata(viteConfig.cacheDir, options); + if (isSvelteMetadataChanged) { + // Force Vite to optimize again. Although we mutate the config here, it works because + // Vite's optimizer runs after `buildStart()`. + viteConfig.optimizeDeps.force = true; + } + }, + + configureServer(server) { + options.server = server; + setupWatchers(options, cache, requestParser); + }, + + async load(id, opts) { + const ssr = !!opts?.ssr; + const svelteRequest = requestParser(id, !!ssr); + if (svelteRequest) { + const { filename, query, raw } = svelteRequest; + if (raw) { + const code = await loadRaw(svelteRequest, compileSvelte, options); + // prevent vite from injecting sourcemaps in the results. + return { + code, + map: { + mappings: '' + } + }; + } else { + if (query.svelte && query.type === 'style') { + const css = cache.getCSS(svelteRequest); + if (css) { + return css; + } + } + // prevent vite asset plugin from loading files as url that should be compiled in transform + if (viteConfig.assetsInclude(filename)) { + log.debug(`load returns raw content for ${filename}`, undefined, 'load'); + return fs.readFileSync(filename, 'utf-8'); + } + } + } + }, + + async resolveId(importee, importer, opts) { + const ssr = !!opts?.ssr; + const svelteRequest = requestParser(importee, ssr); + if (svelteRequest?.query.svelte) { + if ( + svelteRequest.query.type === 'style' && + !svelteRequest.raw && + !svelteRequest.query.inline + ) { + // return cssId with root prefix so postcss pipeline of vite finds the directory correctly + // see https://github.com/sveltejs/vite-plugin-svelte/issues/14 + log.debug( + `resolveId resolved virtual css module ${svelteRequest.cssId}`, + undefined, + 'resolve' + ); + return svelteRequest.cssId; + } + } + }, + + async transform(code, id, opts) { + const ssr = !!opts?.ssr; + const svelteRequest = requestParser(id, ssr); + if (!svelteRequest || svelteRequest.query.type === 'style' || svelteRequest.raw) { + return; + } + let compileData; + try { + compileData = await compileSvelte(svelteRequest, code, options); + } catch (e) { + cache.setError(svelteRequest, e); + throw toRollupError(e, options); + } + logCompilerWarnings(svelteRequest, compileData.compiled.warnings, options); + cache.update(compileData); + if (compileData.dependencies?.length) { + if (options.server) { + for (const dep of compileData.dependencies) { + ensureWatchedFile(options.server.watcher, dep, options.root); + } + } else if (options.isBuild && viteConfig.build.watch) { + for (const dep of compileData.dependencies) { + this.addWatchFile(dep); + } + } + } + return { + ...compileData.compiled.js, + meta: { + vite: { + lang: compileData.lang + } + } + }; + }, + + handleHotUpdate(ctx) { + if (!options.compilerOptions.hmr || !options.emitCss) { + return; + } + const svelteRequest = requestParser(ctx.file, false, ctx.timestamp); + if (svelteRequest) { + return handleHotUpdate(compileSvelte, ctx, svelteRequest, cache, options); + } + }, + async buildEnd() { + await options.stats?.finishAll(); + } + }, + { + name: 'vite-plugin-svelte-module', + enforce: 'post', + async configResolved() { + moduleRequestParser = buildModuleIdParser(options); + }, + async transform(code, id, opts) { + const ssr = !!opts?.ssr; + const moduleRequest = moduleRequestParser(id, ssr); + if (!moduleRequest) { + return; + } + try { + const compileResult = svelteCompiler.compileModule(code, { + dev: !viteConfig.isProduction, + generate: ssr ? 'server' : 'client', + filename: moduleRequest.filename + }); + logCompilerWarnings(moduleRequest, compileResult.warnings, options); + return compileResult.js; + } catch (e) { + throw toRollupError(e, options); + } + } + }, + svelteInspector() + ]; + return plugins; +} + +export { vitePreprocess } from './preprocess.js'; +export { loadSvelteConfig } from './utils/load-svelte-config.js'; diff --git a/node_modules/@sveltejs/vite-plugin-svelte/src/preprocess.js b/node_modules/@sveltejs/vite-plugin-svelte/src/preprocess.js new file mode 100644 index 0000000..d63ea23 --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/src/preprocess.js @@ -0,0 +1,124 @@ +import process from 'node:process'; +import { isCSSRequest, preprocessCSS, resolveConfig, transformWithEsbuild } from 'vite'; +import { mapToRelative, removeLangSuffix } from './utils/sourcemaps.js'; + +/** + * @typedef {(code: string, filename: string) => Promise<{ code: string; map?: any; deps?: Set }>} CssTransform + */ + +const supportedScriptLangs = ['ts']; + +export const lang_sep = '.vite-preprocess'; + +/** + * @param {import('./public.d.ts').VitePreprocessOptions} [opts] + * @returns {import('svelte/compiler').PreprocessorGroup} + */ +export function vitePreprocess(opts) { + /** @type {import('svelte/compiler').PreprocessorGroup} */ + const preprocessor = { name: 'vite-preprocess' }; + if (opts?.script === true) { + preprocessor.script = viteScript().script; + } + if (opts?.style !== false) { + const styleOpts = typeof opts?.style == 'object' ? opts?.style : undefined; + preprocessor.style = viteStyle(styleOpts).style; + } + return preprocessor; +} + +/** + * @returns {{ script: import('svelte/compiler').Preprocessor }} + */ +function viteScript() { + return { + async script({ attributes, content, filename = '' }) { + const lang = /** @type {string} */ (attributes.lang); + if (!supportedScriptLangs.includes(lang)) return; + const { code, map } = await transformWithEsbuild(content, filename, { + loader: /** @type {import('vite').ESBuildOptions['loader']} */ (lang), + target: 'esnext', + tsconfigRaw: { + compilerOptions: { + // svelte typescript needs this flag to work with type imports + importsNotUsedAsValues: 'preserve', + preserveValueImports: true + } + } + }); + + mapToRelative(map, filename); + + return { + code, + map + }; + } + }; +} + +/** + * @param {import('vite').ResolvedConfig | import('vite').InlineConfig} config + * @returns {{ style: import('svelte/compiler').Preprocessor }} + */ +function viteStyle(config = {}) { + /** @type {Promise | CssTransform} */ + let cssTransform; + /** @type {import('svelte/compiler').Preprocessor} */ + const style = async ({ attributes, content, filename = '' }) => { + const ext = attributes.lang ? `.${attributes.lang}` : '.css'; + if (attributes.lang && !isCSSRequest(ext)) return; + if (!cssTransform) { + cssTransform = createCssTransform(style, config).then((t) => (cssTransform = t)); + } + const transform = await cssTransform; + const suffix = `${lang_sep}${ext}`; + const moduleId = `${filename}${suffix}`; + const { code, map, deps } = await transform(content, moduleId); + removeLangSuffix(map, suffix); + mapToRelative(map, filename); + const dependencies = deps ? Array.from(deps).filter((d) => !d.endsWith(suffix)) : undefined; + return { + code, + map: map ?? undefined, + dependencies + }; + }; + // @ts-expect-error tag so can be found by v-p-s + style.__resolvedConfig = null; + return { style }; +} + +/** + * @param {import('svelte/compiler').Preprocessor} style + * @param {import('vite').ResolvedConfig | import('vite').InlineConfig} config + * @returns {Promise} + */ +async function createCssTransform(style, config) { + /** @type {import('vite').ResolvedConfig} */ + let resolvedConfig; + // @ts-expect-error special prop added if running in v-p-s + if (style.__resolvedConfig) { + // @ts-expect-error not typed + resolvedConfig = style.__resolvedConfig; + } else if (isResolvedConfig(config)) { + resolvedConfig = config; + } else { + // default to "build" if no NODE_ENV is set to avoid running in dev mode for svelte-check etc. + const useBuild = !process.env.NODE_ENV || process.env.NODE_ENV === 'production'; + const command = useBuild ? 'build' : 'serve'; + const defaultMode = useBuild ? 'production' : 'development'; + resolvedConfig = await resolveConfig(config, command, defaultMode, defaultMode, false); + } + return async (code, filename) => { + return preprocessCSS(code, filename, resolvedConfig); + }; +} + +/** + * @param {any} config + * @returns {config is import('vite').ResolvedConfig} + */ +function isResolvedConfig(config) { + return !!config.inlineConfig; +} diff --git a/node_modules/@sveltejs/vite-plugin-svelte/src/public.d.ts b/node_modules/@sveltejs/vite-plugin-svelte/src/public.d.ts new file mode 100644 index 0000000..6335e1a --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/src/public.d.ts @@ -0,0 +1,210 @@ +import type { InlineConfig, ResolvedConfig } from 'vite'; +import type { CompileOptions, Warning, PreprocessorGroup } from 'svelte/compiler'; +import type { Options as InspectorOptions } from '@sveltejs/vite-plugin-svelte-inspector'; + +export type Options = Omit & PluginOptionsInline; + +interface PluginOptionsInline extends PluginOptions { + /** + * Path to a svelte config file, either absolute or relative to Vite root + * + * set to `false` to ignore the svelte config file + * + * @see https://vitejs.dev/config/#root + */ + configFile?: string | false; +} + +export interface PluginOptions { + /** + * A `picomatch` pattern, or array of patterns, which specifies the files the plugin should + * operate on. By default, all svelte files are included. + * + * @see https://github.com/micromatch/picomatch + */ + include?: Arrayable; + /** + * A `picomatch` pattern, or array of patterns, which specifies the files to be ignored by the + * plugin. By default, no files are ignored. + * + * @see https://github.com/micromatch/picomatch + */ + exclude?: Arrayable; + /** + * Emit Svelte styles as virtual CSS files for Vite and other plugins to process + * + * @default true + */ + emitCss?: boolean; + /** + * Enable or disable Hot Module Replacement. + * Deprecated, use compilerOptions.hmr instead! + * + * @deprecated + * @default true for development, always false for production + */ + hot?: boolean; + + /** + * Some Vite plugins can contribute additional preprocessors by defining `api.sveltePreprocess`. + * If you don't want to use them, set this to true to ignore them all or use an array of strings + * with plugin names to specify which. + * + * @default false + */ + ignorePluginPreprocessors?: boolean | string[]; + /** + * vite-plugin-svelte automatically handles excluding svelte libraries and reinclusion of their dependencies + * in vite.optimizeDeps. + * + * `disableDependencyReinclusion: true` disables all reinclusions + * `disableDependencyReinclusion: ['foo','bar']` disables reinclusions for dependencies of foo and bar + * + * This should be used for hybrid packages that contain both node and browser dependencies, eg Routify + * + * @default false + */ + disableDependencyReinclusion?: boolean | string[]; + /** + * Enable support for Vite's dependency optimization to prebundle Svelte libraries. + * + * To disable prebundling for a specific library, add it to `optimizeDeps.exclude`. + * + * @default true for dev, false for build + */ + prebundleSvelteLibraries?: boolean; + /** + * toggle/configure Svelte Inspector + * + * @default unset for dev, always false for build + */ + inspector?: InspectorOptions | boolean; + + /** + * A function to update `compilerOptions` before compilation + * + * `data.filename` - The file to be compiled + * `data.code` - The preprocessed Svelte code + * `data.compileOptions` - The current compiler options + * + * To change part of the compiler options, return an object with the changes you need. + * + * @example + * ``` + * ({ filename, compileOptions }) => { + * // Dynamically set runes mode per Svelte file + * if (forceRunesMode(filename) && !compileOptions.runes) { + * return { runes: true }; + * } + * } + * ``` + */ + dynamicCompileOptions?: (data: { + filename: string; + code: string; + compileOptions: Partial; + }) => Promise | void> | Partial | void; + + /** + * These options are considered experimental and breaking changes to them can occur in any release + */ + experimental?: ExperimentalOptions; +} + +export interface SvelteConfig { + /** + * A list of file extensions to be compiled by Svelte + * + * @default ['.svelte'] + */ + extensions?: string[]; + /** + * An array of preprocessors to transform the Svelte source code before compilation + * + * @see https://svelte.dev/docs#svelte_preprocess + */ + preprocess?: Arrayable; + /** + * The options to be passed to the Svelte compiler. A few options are set by default, + * including `dev` and `css`. However, some options are non-configurable, like + * `filename`, `format`, `generate`, and `cssHash` (in dev). + * + * @see https://svelte.dev/docs#svelte_compile + */ + compilerOptions?: Omit; + + /** + * Handles warning emitted from the Svelte compiler + * + * warnings emitted for files in node_modules are logged at the debug level, to see them run + * `DEBUG=vite-plugin-svelte:node-modules-onwarn pnpm build` + * + * @example + * ``` + * (warning, defaultHandler) => { + * // ignore some warnings + * if (!['foo','bar'].includes(warning.code)) { + * defaultHandler(warning); + * } + * } + * ``` + * + */ + onwarn?: (warning: Warning, defaultHandler: (warning: Warning) => void) => void; + /** + * Options for vite-plugin-svelte + */ + vitePlugin?: PluginOptions; +} + +/** + * These options are considered experimental and breaking changes to them can occur in any release + */ +interface ExperimentalOptions { + /** + * send a websocket message with svelte compiler warnings during dev + * + */ + sendWarningsToBrowser?: boolean; + /** + * disable svelte field resolve warnings + * + * @default false + */ + disableSvelteResolveWarnings?: boolean; + + compileModule?: CompileModuleOptions; +} + +interface CompileModuleOptions { + /** + * infix that must be present in filename + * @default ['.svelte.'] + */ + infixes?: string[]; + /** + * module extensions + * @default ['.ts','.js'] + */ + extensions?: string[]; + include?: Arrayable; + exclude?: Arrayable; +} + +type Arrayable = T | T[]; + +export interface VitePreprocessOptions { + /** + * preprocess script block with vite pipeline. + * Since svelte5 this is not needed for typescript anymore + * + * @default false + */ + script?: boolean; + /** + * preprocess style blocks with vite pipeline + */ + style?: boolean | InlineConfig | ResolvedConfig; +} +// eslint-disable-next-line n/no-missing-import +export * from './index.js'; diff --git a/node_modules/@sveltejs/vite-plugin-svelte/src/types/compile.d.ts b/node_modules/@sveltejs/vite-plugin-svelte/src/types/compile.d.ts new file mode 100644 index 0000000..d6ba48e --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/src/types/compile.d.ts @@ -0,0 +1,25 @@ +import type { Processed, CompileResult } from 'svelte/compiler'; +import type { SvelteRequest } from './id.d.ts'; +import type { ResolvedOptions } from './options.d.ts'; + +export type CompileSvelte = ( + svelteRequest: SvelteRequest, + code: string, + options: Partial +) => Promise; + +export interface Code { + code: string; + map?: any; + dependencies?: any[]; +} + +export interface CompileData { + filename: string; + normalizedFilename: string; + lang: string; + compiled: CompileResult; + ssr: boolean | undefined; + dependencies: string[]; + preprocessed: Processed; +} diff --git a/node_modules/@sveltejs/vite-plugin-svelte/src/types/id.d.ts b/node_modules/@sveltejs/vite-plugin-svelte/src/types/id.d.ts new file mode 100644 index 0000000..bbd4dd4 --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/src/types/id.d.ts @@ -0,0 +1,46 @@ +import type { CompileOptions } from 'svelte/compiler'; + +export type SvelteQueryTypes = 'style' | 'script' | 'preprocessed' | 'all'; + +export interface RequestQuery { + // our own + svelte?: boolean; + type?: SvelteQueryTypes; + sourcemap?: boolean; + compilerOptions?: Pick< + CompileOptions, + 'generate' | 'dev' | 'css' | 'customElement' | 'immutable' + >; + // vite specific + url?: boolean; + raw?: boolean; + direct?: boolean; + inline?: boolean; +} + +export interface SvelteRequest { + id: string; + cssId: string; + filename: string; + normalizedFilename: string; + query: RequestQuery; + timestamp: number; + ssr: boolean; + raw: boolean; +} + +export interface SvelteModuleRequest { + id: string; + filename: string; + normalizedFilename: string; + query: RequestQuery; + timestamp: number; + ssr: boolean; +} + +export type IdParser = (id: string, ssr: boolean, timestamp?: number) => SvelteRequest | undefined; +export type ModuleIdParser = ( + id: string, + ssr: boolean, + timestamp?: number +) => SvelteModuleRequest | undefined; diff --git a/node_modules/@sveltejs/vite-plugin-svelte/src/types/log.d.ts b/node_modules/@sveltejs/vite-plugin-svelte/src/types/log.d.ts new file mode 100644 index 0000000..fd4f13e --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/src/types/log.d.ts @@ -0,0 +1,24 @@ +import type { Warning } from 'svelte/compiler'; + +export interface LogFn extends SimpleLogFn { + (message: string, payload?: unknown, namespace?: string): void; + + enabled: boolean; + once: SimpleLogFn; +} + +export interface SimpleLogFn { + (message: string, payload?: unknown, namespace?: string): void; +} + +export type SvelteWarningsMessage = { + id: string; + filename: string; + normalizedFilename: string; + timestamp: number; + warnings: Warning[]; // allWarnings filtered by warnings where onwarn did not call the default handler + allWarnings: Warning[]; // includes warnings filtered by onwarn and our extra vite plugin svelte warnings + rawWarnings: Warning[]; // raw compiler output +}; + +export type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'silent'; diff --git a/node_modules/@sveltejs/vite-plugin-svelte/src/types/options.d.ts b/node_modules/@sveltejs/vite-plugin-svelte/src/types/options.d.ts new file mode 100644 index 0000000..5b4ca42 --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/src/types/options.d.ts @@ -0,0 +1,21 @@ +import type { CompileOptions } from 'svelte/compiler'; +import type { ViteDevServer } from 'vite'; +// eslint-disable-next-line n/no-missing-import +import { VitePluginSvelteStats } from '../utils/vite-plugin-svelte-stats.js'; +import type { Options } from '../public.d.ts'; + +export interface PreResolvedOptions extends Options { + // these options are non-nullable after resolve + compilerOptions: CompileOptions; + // extra options + root: string; + isBuild: boolean; + isServe: boolean; + isDebug: boolean; +} + +export interface ResolvedOptions extends PreResolvedOptions { + isProduction: boolean; + server?: ViteDevServer; + stats?: VitePluginSvelteStats; +} diff --git a/node_modules/@sveltejs/vite-plugin-svelte/src/types/plugin-api.d.ts b/node_modules/@sveltejs/vite-plugin-svelte/src/types/plugin-api.d.ts new file mode 100644 index 0000000..36c42b6 --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/src/types/plugin-api.d.ts @@ -0,0 +1,11 @@ +import type { ResolvedOptions } from './options.d.ts'; + +export interface PluginAPI { + /** + * must not be modified, should not be used outside of vite-plugin-svelte repo + * @internal + * @experimental + */ + options?: ResolvedOptions; + // TODO expose compile cache here so other utility plugins can use it +} diff --git a/node_modules/@sveltejs/vite-plugin-svelte/src/types/vite-plugin-svelte-stats.d.ts b/node_modules/@sveltejs/vite-plugin-svelte/src/types/vite-plugin-svelte-stats.d.ts new file mode 100644 index 0000000..1b69ebd --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/src/types/vite-plugin-svelte-stats.d.ts @@ -0,0 +1,30 @@ +export interface Stat { + file: string; + pkg?: string; + start: number; + end: number; +} + +export interface StatCollection { + name: string; + options: CollectionOptions; + + start: (file: string) => () => void; + stats: Stat[]; + packageStats?: PackageStats[]; + collectionStart: number; + duration?: number; + finish: () => Promise | void; + finished: boolean; +} + +export interface PackageStats { + pkg: string; + files: number; + duration: number; +} + +export interface CollectionOptions { + logInProgress: (collection: StatCollection, now: number) => boolean; + logResult: (collection: StatCollection) => boolean; +} diff --git a/node_modules/@sveltejs/vite-plugin-svelte/src/utils/compile.js b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/compile.js new file mode 100644 index 0000000..4c0e524 --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/compile.js @@ -0,0 +1,191 @@ +import * as svelte from 'svelte/compiler'; + +import { safeBase64Hash } from './hash.js'; +import { log } from './log.js'; + +import { + checkPreprocessDependencies, + createInjectScopeEverythingRulePreprocessorGroup +} from './preprocess.js'; +import { mapToRelative } from './sourcemaps.js'; +import { enhanceCompileError } from './error.js'; + +// TODO this is a patched version of https://github.com/sveltejs/vite-plugin-svelte/pull/796/files#diff-3bce0b33034aad4b35ca094893671f7e7ddf4d27254ae7b9b0f912027a001b15R10 +// which is closer to the other regexes in at least not falling into commented script +// but ideally would be shared exactly with svelte and other tools that use it +const scriptLangRE = + /|]*|(?:[^=>'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)\s+)*)lang=(["'])?([^"' >]+)\1[^>]*>/g; + +/** + * @returns {import('../types/compile.d.ts').CompileSvelte} + */ +export function createCompileSvelte() { + /** @type {import('../types/vite-plugin-svelte-stats.d.ts').StatCollection | undefined} */ + let stats; + const devStylePreprocessor = createInjectScopeEverythingRulePreprocessorGroup(); + /** @type {import('../types/compile.d.ts').CompileSvelte} */ + return async function compileSvelte(svelteRequest, code, options) { + const { filename, normalizedFilename, cssId, ssr, raw } = svelteRequest; + const { emitCss = true } = options; + /** @type {string[]} */ + const dependencies = []; + /** @type {import('svelte/compiler').Warning[]} */ + const warnings = []; + + if (options.stats) { + if (options.isBuild) { + if (!stats) { + // build is either completely ssr or csr, create stats collector on first compile + // it is then finished in the buildEnd hook. + stats = options.stats.startCollection(`${ssr ? 'ssr' : 'dom'} compile`, { + logInProgress: () => false + }); + } + } else { + // dev time ssr, it's a ssr request and there are no stats, assume new page load and start collecting + if (ssr && !stats) { + stats = options.stats.startCollection('ssr compile'); + } + // stats are being collected but this isn't an ssr request, assume page loaded and stop collecting + if (!ssr && stats) { + stats.finish(); + stats = undefined; + } + // TODO find a way to trace dom compile during dev + // problem: we need to call finish at some point but have no way to tell if page load finished + // also they for hmr updates too + } + } + /** @type {import('svelte/compiler').CompileOptions} */ + const compileOptions = { + ...options.compilerOptions, + filename, + generate: ssr ? 'server' : 'client' + }; + + if (compileOptions.hmr && options.emitCss) { + const hash = `s-${safeBase64Hash(normalizedFilename)}`; + compileOptions.cssHash = () => hash; + } + + let preprocessed; + let preprocessors = options.preprocess; + if (!options.isBuild && options.emitCss && compileOptions.hmr) { + // inject preprocessor that ensures css hmr works better + if (!Array.isArray(preprocessors)) { + preprocessors = preprocessors + ? [preprocessors, devStylePreprocessor] + : [devStylePreprocessor]; + } else { + preprocessors = preprocessors.concat(devStylePreprocessor); + } + } + if (preprocessors) { + try { + preprocessed = await svelte.preprocess(code, preprocessors, { filename }); // full filename here so postcss works + } catch (e) { + e.message = `Error while preprocessing ${filename}${e.message ? ` - ${e.message}` : ''}`; + throw e; + } + + if (preprocessed.dependencies?.length) { + const checked = checkPreprocessDependencies(filename, preprocessed.dependencies); + if (checked.warnings.length) { + warnings.push(...checked.warnings); + } + if (checked.dependencies.length) { + dependencies.push(...checked.dependencies); + } + } + + if (preprocessed.map) compileOptions.sourcemap = preprocessed.map; + } + if (typeof preprocessed?.map === 'object') { + mapToRelative(preprocessed?.map, filename); + } + if (raw && svelteRequest.query.type === 'preprocessed') { + // @ts-expect-error shortcut + return /** @type {import('../types/compile.d.ts').CompileData} */ { + preprocessed: preprocessed ?? { code } + }; + } + const finalCode = preprocessed ? preprocessed.code : code; + const dynamicCompileOptions = await options?.dynamicCompileOptions?.({ + filename, + code: finalCode, + compileOptions + }); + if (dynamicCompileOptions && log.debug.enabled) { + log.debug( + `dynamic compile options for ${filename}: ${JSON.stringify(dynamicCompileOptions)}`, + undefined, + 'compile' + ); + } + const finalCompileOptions = dynamicCompileOptions + ? { + ...compileOptions, + ...dynamicCompileOptions + } + : compileOptions; + const endStat = stats?.start(filename); + /** @type {import('svelte/compiler').CompileResult} */ + let compiled; + try { + compiled = svelte.compile(finalCode, { ...finalCompileOptions, filename }); + // patch output with partial accept until svelte does it + // TODO remove later + if ( + options.server?.config.experimental.hmrPartialAccept && + compiled.js.code.includes('import.meta.hot.accept(') + ) { + compiled.js.code = compiled.js.code.replaceAll( + 'import.meta.hot.accept(', + 'import.meta.hot.acceptExports(["default"],' + ); + } + } catch (e) { + enhanceCompileError(e, code, preprocessors); + throw e; + } + + if (endStat) { + endStat(); + } + mapToRelative(compiled.js?.map, filename); + mapToRelative(compiled.css?.map, filename); + if (warnings.length) { + if (!compiled.warnings) { + compiled.warnings = []; + } + compiled.warnings.push(...warnings); + } + if (!raw) { + // wire css import and code for hmr + const hasCss = compiled.css?.code?.trim()?.length ?? 0 > 0; + // compiler might not emit css with mode none or it may be empty + if (emitCss && hasCss) { + // TODO properly update sourcemap? + compiled.js.code += `\nimport ${JSON.stringify(cssId)};\n`; + } + } + + let lang = 'js'; + for (const match of code.matchAll(scriptLangRE)) { + if (match[2]) { + lang = match[2]; + break; + } + } + + return { + filename, + normalizedFilename, + lang, + compiled, + ssr, + dependencies, + preprocessed: preprocessed ?? { code } + }; + }; +} diff --git a/node_modules/@sveltejs/vite-plugin-svelte/src/utils/constants.js b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/constants.js new file mode 100644 index 0000000..3cc59d4 --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/constants.js @@ -0,0 +1,26 @@ +import { createRequire } from 'node:module'; + +export const SVELTE_IMPORTS = Object.entries( + createRequire(import.meta.url)('svelte/package.json').exports +) + .map(([name, config]) => { + // ignore type only + if (typeof config === 'object' && Object.keys(config).length === 1 && config.types) { + return ''; + } + // ignore names + if (name === './package.json' || name === './compiler') { + return ''; + } + return name.replace(/^\./, 'svelte'); + }) + .filter((s) => s.length > 0); + +export const SVELTE_EXPORT_CONDITIONS = ['svelte']; + +export const FAQ_LINK_MISSING_EXPORTS_CONDITION = + 'https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#missing-exports-condition'; + +export const DEFAULT_SVELTE_EXT = ['.svelte']; +export const DEFAULT_SVELTE_MODULE_INFIX = ['.svelte.']; +export const DEFAULT_SVELTE_MODULE_EXT = ['.js', '.ts']; diff --git a/node_modules/@sveltejs/vite-plugin-svelte/src/utils/dependencies.js b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/dependencies.js new file mode 100644 index 0000000..30caf59 --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/dependencies.js @@ -0,0 +1,89 @@ +import path from 'node:path'; +import fs from 'node:fs/promises'; +import { findDepPkgJsonPath } from 'vitefu'; + +/** + * @typedef {{ + * dir: string; + * pkg: Record; + * }} DependencyData + */ + +/** + * @param {string} dep + * @param {string} parent + * @returns {Promise} + */ +export async function resolveDependencyData(dep, parent) { + const depDataPath = await findDepPkgJsonPath(dep, parent); + if (!depDataPath) return undefined; + try { + return { + dir: path.dirname(depDataPath), + pkg: JSON.parse(await fs.readFile(depDataPath, 'utf-8')) + }; + } catch { + return undefined; + } +} + +const COMMON_DEPENDENCIES_WITHOUT_SVELTE_FIELD = [ + '@lukeed/uuid', + '@playwright/test', + '@sveltejs/kit', + '@sveltejs/package', + '@sveltejs/vite-plugin-svelte', + 'autoprefixer', + 'cookie', + 'dotenv', + 'esbuild', + 'eslint', + 'jest', + 'mdsvex', + 'playwright', + 'postcss', + 'prettier', + 'svelte', + 'svelte2tsx', + 'svelte-check', + 'svelte-preprocess', + 'tslib', + 'typescript', + 'vite', + 'vitest', + '__vite-browser-external' // see https://github.com/sveltejs/vite-plugin-svelte/issues/362 +]; +const COMMON_PREFIXES_WITHOUT_SVELTE_FIELD = [ + '@fontsource/', + '@postcss-plugins/', + '@rollup/', + '@sveltejs/adapter-', + '@types/', + '@typescript-eslint/', + 'eslint-', + 'jest-', + 'postcss-plugin-', + 'prettier-plugin-', + 'rollup-plugin-', + 'vite-plugin-' +]; + +/** + * Test for common dependency names that tell us it is not a package including a svelte field, eg. eslint + plugins. + * + * This speeds up the find process as we don't have to try and require the package.json for all of them + * + * @param {string} dependency + * @returns {boolean} true if it is a dependency without a svelte field + */ +export function isCommonDepWithoutSvelteField(dependency) { + return ( + COMMON_DEPENDENCIES_WITHOUT_SVELTE_FIELD.includes(dependency) || + COMMON_PREFIXES_WITHOUT_SVELTE_FIELD.some( + (prefix) => + prefix.startsWith('@') + ? dependency.startsWith(prefix) + : dependency.substring(dependency.lastIndexOf('/') + 1).startsWith(prefix) // check prefix omitting @scope/ + ) + ); +} diff --git a/node_modules/@sveltejs/vite-plugin-svelte/src/utils/error.js b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/error.js new file mode 100644 index 0000000..31e3c5a --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/error.js @@ -0,0 +1,162 @@ +import { buildExtendedLogMessage } from './log.js'; + +/** + * convert an error thrown by svelte.compile to a RollupError so that vite displays it in a user friendly way + * @param {import('svelte/compiler').Warning & Error & {frame?: string}} error a svelte compiler error, which is a mix of Warning and an error + * @param {import('../types/options.d.ts').ResolvedOptions} options + * @returns {import('vite').Rollup.RollupError} the converted error + */ +export function toRollupError(error, options) { + const { filename, frame, start, code, name, stack } = error; + /** @type {import('vite').Rollup.RollupError} */ + const rollupError = { + name, // needed otherwise sveltekit coalesce_to_error turns it into a string + id: filename, + message: buildExtendedLogMessage(error), // include filename:line:column so that it's clickable + frame: formatFrameForVite(frame), + code, + stack: options.isBuild || options.isDebug || !frame ? stack : '' + }; + if (start) { + rollupError.loc = { + line: start.line, + column: start.column, + file: filename + }; + } + return rollupError; +} + +/** + * convert an error thrown by svelte.compile to an esbuild PartialMessage + * @param {import('svelte/compiler').Warning & Error & {frame?: string}} error a svelte compiler error, which is a mix of Warning and an error + * @param {import('../types/options.d.ts').ResolvedOptions} options + * @returns {import('esbuild').PartialMessage} the converted error + */ +export function toESBuildError(error, options) { + const { filename, frame, start, stack } = error; + /** @type {import('esbuild').PartialMessage} */ + const partialMessage = { + text: buildExtendedLogMessage(error) + }; + if (start) { + partialMessage.location = { + line: start.line, + column: start.column, + file: filename, + lineText: lineFromFrame(start.line, frame) // needed to get a meaningful error message on cli + }; + } + if (options.isBuild || options.isDebug || !frame) { + partialMessage.detail = stack; + } + return partialMessage; +} + +/** + * extract line with number from codeframe + * + * @param {number} lineNo + * @param {string} [frame] + * @returns {string} + */ +function lineFromFrame(lineNo, frame) { + if (!frame) { + return ''; + } + const lines = frame.split('\n'); + const errorLine = lines.find((line) => line.trimStart().startsWith(`${lineNo}: `)); + return errorLine ? errorLine.substring(errorLine.indexOf(': ') + 3) : ''; +} + +/** + * vite error overlay expects a specific format to show frames + * this reformats svelte frame (colon separated, less whitespace) + * to one that vite displays on overlay ( pipe separated, more whitespace) + * e.g. + * ``` + * 1: foo + * 2: bar; + * ^ + * 3: baz + * ``` + * to + * ``` + * 1 | foo + * 2 | bar; + * ^ + * 3 | baz + * ``` + * @see https://github.com/vitejs/vite/blob/96591bf9989529de839ba89958755eafe4c445ae/packages/vite/src/client/overlay.ts#L116 + * @param {string} [frame] + * @returns {string} + */ +function formatFrameForVite(frame) { + if (!frame) { + return ''; + } + return frame + .split('\n') + .map((line) => (line.match(/^\s+\^/) ? ' ' + line : ' ' + line.replace(':', ' | '))) + .join('\n'); +} + +/** + * + * @param {string} code the svelte error code + * @see https://github.com/sveltejs/svelte/blob/main/packages/svelte/src/compiler/errors.js + * @returns {boolean} + */ +function couldBeFixedByCssPreprocessor(code) { + return code === 'expected_token' || code === 'unexpected_eof' || code?.startsWith('css_'); +} + +/** + * @param {import('svelte/compiler').Warning & Error} err a svelte compiler error, which is a mix of Warning and an error + * @param {string} originalCode + * @param {import('../public.d.ts').Options['preprocess']} [preprocessors] + */ +export function enhanceCompileError(err, originalCode, preprocessors) { + preprocessors = arraify(preprocessors ?? []); + + /** @type {string[]} */ + const additionalMessages = []; + + // Handle incorrect CSS preprocessor usage + if (couldBeFixedByCssPreprocessor(err.code)) { + // Reference from Svelte: https://github.com/sveltejs/svelte/blob/9926347ad9dbdd0f3324d5538e25dcb7f5e442f8/packages/svelte/src/compiler/preprocess/index.js#L257 + const styleRe = + /|'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)|\s+[^=>'"/]+)*\s*)(?:\/>|>([\S\s]*?)<\/style>)/g; + + let m; + while ((m = styleRe.exec(originalCode))) { + // Warn missing lang attribute + if (!m[1]?.includes('lang=')) { + additionalMessages.push('Did you forget to add a lang attribute to your style tag?'); + } + // Warn missing style preprocessor + if ( + preprocessors.every((p) => p.style == null || p.name === 'inject-scope-everything-rule') + ) { + const preprocessorType = m[1]?.match(/lang="(.+?)"/)?.[1] ?? 'style'; + additionalMessages.push( + `Did you forget to add a ${preprocessorType} preprocessor? See https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/preprocess.md for more information.` + ); + } + } + } + + if (additionalMessages.length) { + err.message += '\n\n- ' + additionalMessages.join('\n- '); + } + + return err; +} + +/** + * @param {T | T[]} value + * @template T + */ +function arraify(value) { + return Array.isArray(value) ? value : [value]; +} diff --git a/node_modules/@sveltejs/vite-plugin-svelte/src/utils/esbuild.js b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/esbuild.js new file mode 100644 index 0000000..5a1ca89 --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/esbuild.js @@ -0,0 +1,177 @@ +import { readFileSync } from 'node:fs'; +import * as svelte from 'svelte/compiler'; +import { log } from './log.js'; +import { toESBuildError } from './error.js'; +import { safeBase64Hash } from './hash.js'; +import { normalize } from './id.js'; + +/** + * @typedef {NonNullable} EsbuildOptions + * @typedef {NonNullable[number]} EsbuildPlugin + */ + +export const facadeEsbuildSveltePluginName = 'vite-plugin-svelte:facade'; +export const facadeEsbuildSvelteModulePluginName = 'vite-plugin-svelte-module:facade'; + +/** + * @param {import('../types/options.d.ts').ResolvedOptions} options + * @returns {EsbuildPlugin} + */ +export function esbuildSveltePlugin(options) { + return { + name: 'vite-plugin-svelte:optimize-svelte', + setup(build) { + // Skip in scanning phase as Vite already handles scanning Svelte files. + // Otherwise this would heavily slow down the scanning phase. + if (build.initialOptions.plugins?.some((v) => v.name === 'vite:dep-scan')) return; + + const filter = /\.svelte(?:\?.*)?$/; + /** @type {import('../types/vite-plugin-svelte-stats.d.ts').StatCollection | undefined} */ + let statsCollection; + build.onStart(() => { + statsCollection = options.stats?.startCollection('prebundle library components', { + logResult: (c) => c.stats.length > 1 + }); + }); + build.onLoad({ filter }, async ({ path: filename }) => { + const code = readFileSync(filename, 'utf8'); + try { + const contents = await compileSvelte(options, { filename, code }, statsCollection); + return { contents }; + } catch (e) { + return { errors: [toESBuildError(e, options)] }; + } + }); + build.onEnd(() => { + statsCollection?.finish(); + }); + } + }; +} + +/** + * @param {import('../types/options.d.ts').ResolvedOptions} options + * @param {{ filename: string, code: string }} input + * @param {import('../types/vite-plugin-svelte-stats.d.ts').StatCollection} [statsCollection] + * @returns {Promise} + */ +async function compileSvelte(options, { filename, code }, statsCollection) { + let css = options.compilerOptions.css; + if (css !== 'injected') { + // TODO ideally we'd be able to externalize prebundled styles too, but for now always put them in the js + css = 'injected'; + } + /** @type {import('svelte/compiler').CompileOptions} */ + const compileOptions = { + dev: true, // default to dev: true because prebundling is only used in dev + ...options.compilerOptions, + css, + filename, + generate: 'client' + }; + + if (compileOptions.hmr && options.emitCss) { + const hash = `s-${safeBase64Hash(normalize(filename, options.root))}`; + compileOptions.cssHash = () => hash; + } + + let preprocessed; + + if (options.preprocess) { + try { + preprocessed = await svelte.preprocess(code, options.preprocess, { filename }); + } catch (e) { + e.message = `Error while preprocessing ${filename}${e.message ? ` - ${e.message}` : ''}`; + throw e; + } + if (preprocessed.map) compileOptions.sourcemap = preprocessed.map; + } + + const finalCode = preprocessed ? preprocessed.code : code; + + const dynamicCompileOptions = await options?.dynamicCompileOptions?.({ + filename, + code: finalCode, + compileOptions + }); + + if (dynamicCompileOptions && log.debug.enabled) { + log.debug( + `dynamic compile options for ${filename}: ${JSON.stringify(dynamicCompileOptions)}`, + undefined, + 'compile' + ); + } + + const finalCompileOptions = dynamicCompileOptions + ? { + ...compileOptions, + ...dynamicCompileOptions + } + : compileOptions; + const endStat = statsCollection?.start(filename); + const compiled = svelte.compile(finalCode, finalCompileOptions); + if (endStat) { + endStat(); + } + return compiled.js.map + ? compiled.js.code + '//# sourceMappingURL=' + compiled.js.map.toUrl() + : compiled.js.code; +} + +/** + * @param {import('../types/options.d.ts').ResolvedOptions} options + * @returns {EsbuildPlugin} + */ +export function esbuildSvelteModulePlugin(options) { + return { + name: 'vite-plugin-svelte-module:optimize-svelte', + setup(build) { + // Skip in scanning phase as Vite already handles scanning Svelte files. + // Otherwise this would heavily slow down the scanning phase. + if (build.initialOptions.plugins?.some((v) => v.name === 'vite:dep-scan')) return; + + const filter = /\.svelte\.[jt]s(?:\?.*)?$/; + /** @type {import('../types/vite-plugin-svelte-stats.d.ts').StatCollection | undefined} */ + let statsCollection; + build.onStart(() => { + statsCollection = options.stats?.startCollection('prebundle library modules', { + logResult: (c) => c.stats.length > 1 + }); + }); + build.onLoad({ filter }, async ({ path: filename }) => { + const code = readFileSync(filename, 'utf8'); + try { + const contents = await compileSvelteModule(options, { filename, code }, statsCollection); + return { contents }; + } catch (e) { + return { errors: [toESBuildError(e, options)] }; + } + }); + build.onEnd(() => { + statsCollection?.finish(); + }); + } + }; +} + +/** + * @param {import('../types/options.d.ts').ResolvedOptions} options + * @param {{ filename: string; code: string }} input + * @param {import('../types/vite-plugin-svelte-stats.d.ts').StatCollection} [statsCollection] + * @returns {Promise} + */ +async function compileSvelteModule(options, { filename, code }, statsCollection) { + const endStat = statsCollection?.start(filename); + const compiled = svelte.compileModule(code, { + dev: options.compilerOptions?.dev ?? true, // default to dev: true because prebundling is only used in dev + filename, + generate: 'client' + }); + if (endStat) { + endStat(); + } + return compiled.js.map + ? compiled.js.code + '//# sourceMappingURL=' + compiled.js.map.toUrl() + : compiled.js.code; +} diff --git a/node_modules/@sveltejs/vite-plugin-svelte/src/utils/hash.js b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/hash.js new file mode 100644 index 0000000..6d0dad2 --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/hash.js @@ -0,0 +1,43 @@ +import crypto from 'node:crypto'; + +const hashes = Object.create(null); + +//TODO shorter? +const hash_length = 12; + +/** + * replaces +/= in base64 output so they don't interfere + * + * @param {string} input + * @returns {string} base64 hash safe to use in any context + */ +export function safeBase64Hash(input) { + if (hashes[input]) { + return hashes[input]; + } + //TODO if performance really matters, use a faster one like xx-hash etc. + // should be evenly distributed because short input length and similarities in paths could cause collisions otherwise + // OR DON'T USE A HASH AT ALL, what about a simple counter? + const md5 = crypto.createHash('md5'); + md5.update(input); + const hash = toSafe(md5.digest('base64')).slice(0, hash_length); + hashes[input] = hash; + return hash; +} + +/** @type {Record} */ +const replacements = { + '+': '-', + '/': '_', + '=': '' +}; + +const replaceRE = new RegExp(`[${Object.keys(replacements).join('')}]`, 'g'); + +/** + * @param {string} base64 + * @returns {string} + */ +function toSafe(base64) { + return base64.replace(replaceRE, (x) => replacements[x]); +} diff --git a/node_modules/@sveltejs/vite-plugin-svelte/src/utils/id.js b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/id.js new file mode 100644 index 0000000..cb420dd --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/id.js @@ -0,0 +1,252 @@ +import { createFilter, normalizePath } from 'vite'; +import fs from 'node:fs'; +import path from 'node:path'; +import process from 'node:process'; +import { log } from './log.js'; +import { DEFAULT_SVELTE_MODULE_EXT, DEFAULT_SVELTE_MODULE_INFIX } from './constants.js'; + +const VITE_FS_PREFIX = '/@fs/'; +const IS_WINDOWS = process.platform === 'win32'; + +const SUPPORTED_COMPILER_OPTIONS = ['generate', 'dev', 'css', 'customElement', 'immutable']; +const TYPES_WITH_COMPILER_OPTIONS = ['style', 'script', 'all']; + +/** + * @param {string} id + * @returns {{ filename: string, rawQuery: string }} + */ +function splitId(id) { + const parts = id.split('?', 2); + const filename = parts[0]; + const rawQuery = parts[1]; + return { filename, rawQuery }; +} + +/** + * @param {string} id + * @param {string} filename + * @param {string} rawQuery + * @param {string} root + * @param {number} timestamp + * @param {boolean} ssr + * @returns {import('../types/id.d.ts').SvelteRequest | undefined} + */ +function parseToSvelteRequest(id, filename, rawQuery, root, timestamp, ssr) { + const query = parseRequestQuery(rawQuery); + const rawOrDirect = !!(query.raw || query.direct); + if (query.url || (!query.svelte && rawOrDirect)) { + // skip requests with special vite tags + return; + } + const raw = rawOrDirect; + const normalizedFilename = normalize(filename, root); + const cssId = createVirtualImportId(filename, root, 'style'); + + return { + id, + filename, + normalizedFilename, + cssId, + query, + timestamp, + ssr, + raw + }; +} + +/** + * @param {string} filename + * @param {string} root + * @param {import('../types/id.d.ts').SvelteQueryTypes} type + * @returns {string} + */ +function createVirtualImportId(filename, root, type) { + const parts = ['svelte', `type=${type}`]; + if (type === 'style') { + parts.push('lang.css'); + } + if (existsInRoot(filename, root)) { + filename = root + filename; + } else if (filename.startsWith(VITE_FS_PREFIX)) { + filename = IS_WINDOWS + ? filename.slice(VITE_FS_PREFIX.length) // remove /@fs/ from /@fs/C:/... + : filename.slice(VITE_FS_PREFIX.length - 1); // remove /@fs from /@fs/home/user + } + // return same virtual id format as vite-plugin-vue eg ...App.svelte?svelte&type=style&lang.css + return `${filename}?${parts.join('&')}`; +} + +/** + * @param {string} rawQuery + * @returns {import('../types/id.d.ts').RequestQuery} + */ +function parseRequestQuery(rawQuery) { + const query = Object.fromEntries(new URLSearchParams(rawQuery)); + for (const key in query) { + if (query[key] === '') { + // @ts-expect-error not boolean + query[key] = true; + } + } + const compilerOptions = query.compilerOptions; + if (compilerOptions) { + if (!((query.raw || query.direct) && TYPES_WITH_COMPILER_OPTIONS.includes(query.type))) { + throw new Error( + `Invalid compilerOptions in query ${rawQuery}. CompilerOptions are only supported for raw or direct queries with type in "${TYPES_WITH_COMPILER_OPTIONS.join( + ', ' + )}" e.g. '?svelte&raw&type=script&compilerOptions={"generate":"server","dev":false}` + ); + } + try { + const parsed = JSON.parse(compilerOptions); + const invalid = Object.keys(parsed).filter( + (key) => !SUPPORTED_COMPILER_OPTIONS.includes(key) + ); + if (invalid.length) { + throw new Error( + `Invalid compilerOptions in query ${rawQuery}: ${invalid.join( + ', ' + )}. Supported: ${SUPPORTED_COMPILER_OPTIONS.join(', ')}` + ); + } + query.compilerOptions = parsed; + } catch (e) { + log.error('failed to parse request query compilerOptions', e); + throw e; + } + } + + return /** @type {import('../types/id.d.ts').RequestQuery}*/ query; +} + +/** + * posixify and remove root at start + * + * @param {string} filename + * @param {string} normalizedRoot + * @returns {string} + */ +export function normalize(filename, normalizedRoot) { + return stripRoot(normalizePath(filename), normalizedRoot); +} + +/** + * @param {string} filename + * @param {string} root + * @returns {boolean} + */ +function existsInRoot(filename, root) { + if (filename.startsWith(VITE_FS_PREFIX)) { + return false; // vite already tagged it as out of root + } + return fs.existsSync(root + filename); +} + +/** + * @param {string} normalizedFilename + * @param {string} normalizedRoot + * @returns {string} + */ +function stripRoot(normalizedFilename, normalizedRoot) { + return normalizedFilename.startsWith(normalizedRoot + '/') + ? normalizedFilename.slice(normalizedRoot.length) + : normalizedFilename; +} + +/** + * @param {import('../public.d.ts').Options['include'] | undefined} include + * @param {import('../public.d.ts').Options['exclude'] | undefined} exclude + * @param {string[]} extensions + * @returns {(filename: string) => boolean} + */ +function buildFilter(include, exclude, extensions) { + const rollupFilter = createFilter(include, exclude); + return (filename) => rollupFilter(filename) && extensions.some((ext) => filename.endsWith(ext)); +} + +/** + * @param {import('../public.d.ts').Options['include'] | undefined} include + * @param {import('../public.d.ts').Options['exclude'] | undefined} exclude + * @param {string[]} infixes + * @param {string[]} extensions + * @returns {(filename: string) => boolean} + */ +function buildModuleFilter(include, exclude, infixes, extensions) { + const rollupFilter = createFilter(include, exclude); + return (filename) => { + const basename = path.basename(filename); + + return ( + rollupFilter(filename) && + infixes.some((infix) => basename.includes(infix)) && + extensions.some((ext) => basename.endsWith(ext)) + ); + }; +} + +/** + * @param {import('../types/options.d.ts').ResolvedOptions} options + * @returns {import('../types/id.d.ts').IdParser} + */ +export function buildIdParser(options) { + const { include, exclude, extensions, root } = options; + const normalizedRoot = normalizePath(root); + const filter = buildFilter(include, exclude, extensions ?? []); + return (id, ssr, timestamp = Date.now()) => { + const { filename, rawQuery } = splitId(id); + if (filter(filename)) { + return parseToSvelteRequest(id, filename, rawQuery, normalizedRoot, timestamp, ssr); + } + }; +} + +/** + * @param {import('../types/options.d.ts').ResolvedOptions} options + * @returns {import('../types/id.d.ts').ModuleIdParser} + */ +export function buildModuleIdParser(options) { + const { + include, + exclude, + infixes = DEFAULT_SVELTE_MODULE_INFIX, + extensions = DEFAULT_SVELTE_MODULE_EXT + } = options?.experimental?.compileModule ?? {}; + const root = options.root; + const normalizedRoot = normalizePath(root); + const filter = buildModuleFilter(include, exclude, infixes, extensions); + return (id, ssr, timestamp = Date.now()) => { + const { filename, rawQuery } = splitId(id); + if (filter(filename)) { + return parseToSvelteModuleRequest(id, filename, rawQuery, normalizedRoot, timestamp, ssr); + } + }; +} + +/** + * @param {string} id + * @param {string} filename + * @param {string} rawQuery + * @param {string} root + * @param {number} timestamp + * @param {boolean} ssr + * @returns {import('../types/id.d.ts').SvelteModuleRequest | undefined} + */ +function parseToSvelteModuleRequest(id, filename, rawQuery, root, timestamp, ssr) { + const query = parseRequestQuery(rawQuery); + + if (query.url || query.raw || query.direct) { + // skip requests with special vite tags + return; + } + + const normalizedFilename = normalize(filename, root); + + return { + id, + filename, + normalizedFilename, + query, + timestamp, + ssr + }; +} diff --git a/node_modules/@sveltejs/vite-plugin-svelte/src/utils/load-raw.js b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/load-raw.js new file mode 100644 index 0000000..f800f1b --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/load-raw.js @@ -0,0 +1,125 @@ +import fs from 'node:fs'; +import { toRollupError } from './error.js'; +import { log } from './log.js'; + +/** + * utility function to compile ?raw and ?direct requests in load hook + * + * @param {import('../types/id.d.ts').SvelteRequest} svelteRequest + * @param {import('../types/compile.d.ts').CompileSvelte} compileSvelte + * @param {import('../types/options.d.ts').ResolvedOptions} options + * @returns {Promise} + */ +export async function loadRaw(svelteRequest, compileSvelte, options) { + const { id, filename, query } = svelteRequest; + + // raw svelte subrequest, compile on the fly and return requested subpart + let compileData; + const source = fs.readFileSync(filename, 'utf-8'); + try { + //avoid compileSvelte doing extra ssr stuff unless requested + svelteRequest.ssr = query.compilerOptions?.generate === 'server'; + compileData = await compileSvelte(svelteRequest, source, { + ...options, + // don't use dynamic vite-plugin-svelte defaults here to ensure stable result between ssr,dev and build + compilerOptions: { + dev: false, + css: 'external', + hmr: false, + ...svelteRequest.query.compilerOptions + }, + emitCss: true + }); + } catch (e) { + throw toRollupError(e, options); + } + let result; + if (query.type === 'style') { + result = compileData.compiled.css ?? { code: '', map: null }; + } else if (query.type === 'script') { + result = compileData.compiled.js; + } else if (query.type === 'preprocessed') { + result = compileData.preprocessed; + } else if (query.type === 'all' && query.raw) { + return allToRawExports(compileData, source); + } else { + throw new Error( + `invalid "type=${query.type}" in ${id}. supported are script, style, preprocessed, all` + ); + } + if (query.direct) { + const supportedDirectTypes = ['script', 'style']; + if (!supportedDirectTypes.includes(query.type)) { + throw new Error( + `invalid "type=${ + query.type + }" combined with direct in ${id}. supported are: ${supportedDirectTypes.join(', ')}` + ); + } + log.debug(`load returns direct result for ${id}`, undefined, 'load'); + let directOutput = result.code; + // @ts-expect-error might not be SourceMap but toUrl check should suffice + if (query.sourcemap && result.map?.toUrl) { + // @ts-expect-error toUrl might not exist + const map = `sourceMappingURL=${result.map.toUrl()}`; + if (query.type === 'style') { + directOutput += `\n\n/*# ${map} */\n`; + } else if (query.type === 'script') { + directOutput += `\n\n//# ${map}\n`; + } + } + return directOutput; + } else if (query.raw) { + log.debug(`load returns raw result for ${id}`, undefined, 'load'); + return toRawExports(result); + } else { + throw new Error(`invalid raw mode in ${id}, supported are raw, direct`); + } +} + +/** + * turn compileData and source into a flat list of raw exports + * + * @param {import('../types/compile.d.ts').CompileData} compileData + * @param {string} source + */ +function allToRawExports(compileData, source) { + // flatten CompileData + /** @type {Partial} */ + const exports = { + ...compileData, + ...compileData.compiled, + source + }; + delete exports.compiled; + delete exports.filename; // absolute path, remove to avoid it in output + return toRawExports(exports); +} + +/** + * turn object into raw exports. + * + * every prop is returned as a const export, and if prop 'code' exists it is additionally added as default export + * + * eg {'foo':'bar','code':'baz'} results in + * + * ```js + * export const code='baz' + * export const foo='bar' + * export default code + * ``` + * @param {object} object + * @returns {string} + */ +function toRawExports(object) { + let exports = + Object.entries(object) + .filter(([_key, value]) => typeof value !== 'function') // preprocess output has a toString function that's enumerable + .sort(([a], [b]) => (a < b ? -1 : a === b ? 0 : 1)) + .map(([key, value]) => `export const ${key}=${JSON.stringify(value)}`) + .join('\n') + '\n'; + if (Object.prototype.hasOwnProperty.call(object, 'code')) { + exports += 'export default code\n'; + } + return exports; +} diff --git a/node_modules/@sveltejs/vite-plugin-svelte/src/utils/load-svelte-config.js b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/load-svelte-config.js new file mode 100644 index 0000000..1b32ba4 --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/load-svelte-config.js @@ -0,0 +1,122 @@ +import { createRequire } from 'node:module'; +import path from 'node:path'; +import process from 'node:process'; +import fs from 'node:fs'; +import { pathToFileURL } from 'node:url'; +import { log } from './log.js'; + +// used to require cjs config in esm. +// NOTE dynamic import() cjs technically works, but timestamp query cache bust +// have no effect, likely because it has another internal cache? +/** @type {NodeRequire}*/ +let esmRequire; + +export const knownSvelteConfigNames = [ + 'svelte.config.js', + 'svelte.config.cjs', + 'svelte.config.mjs' +]; + +/** + * @param {string} filePath + * @param {number} timestamp + */ +async function dynamicImportDefault(filePath, timestamp) { + return await import(filePath + '?t=' + timestamp).then((m) => m.default); +} + +/** + * @param {import('vite').UserConfig} [viteConfig] + * @param {Partial} [inlineOptions] + * @returns {Promise | undefined>} + */ +export async function loadSvelteConfig(viteConfig, inlineOptions) { + if (inlineOptions?.configFile === false) { + return; + } + const configFile = findConfigToLoad(viteConfig, inlineOptions); + if (configFile) { + let err; + // try to use dynamic import for svelte.config.js first + if (configFile.endsWith('.js') || configFile.endsWith('.mjs')) { + try { + const result = await dynamicImportDefault( + pathToFileURL(configFile).href, + fs.statSync(configFile).mtimeMs + ); + if (result != null) { + return { + ...result, + configFile + }; + } else { + throw new Error(`invalid export in ${configFile}`); + } + } catch (e) { + log.error(`failed to import config ${configFile}`, e); + err = e; + } + } + // cjs or error with dynamic import + if (!configFile.endsWith('.mjs')) { + try { + // identify which require function to use (esm and cjs mode) + const _require = import.meta.url + ? (esmRequire ?? (esmRequire = createRequire(import.meta.url))) + : // eslint-disable-next-line no-undef + require; + + // avoid loading cached version on reload + delete _require.cache[_require.resolve(configFile)]; + const result = _require(configFile); + if (result != null) { + return { + ...result, + configFile + }; + } else { + throw new Error(`invalid export in ${configFile}`); + } + } catch (e) { + log.error(`failed to require config ${configFile}`, e); + if (!err) { + err = e; + } + } + } + // failed to load existing config file + throw err; + } +} + +/** + * @param {import('vite').UserConfig | undefined} viteConfig + * @param {Partial | undefined} inlineOptions + * @returns {string | undefined} + */ +function findConfigToLoad(viteConfig, inlineOptions) { + const root = viteConfig?.root || process.cwd(); + if (inlineOptions?.configFile) { + const abolutePath = path.isAbsolute(inlineOptions.configFile) + ? inlineOptions.configFile + : path.resolve(root, inlineOptions.configFile); + if (!fs.existsSync(abolutePath)) { + throw new Error(`failed to find svelte config file ${abolutePath}.`); + } + return abolutePath; + } else { + const existingKnownConfigFiles = knownSvelteConfigNames + .map((candidate) => path.resolve(root, candidate)) + .filter((file) => fs.existsSync(file)); + if (existingKnownConfigFiles.length === 0) { + log.debug(`no svelte config found at ${root}`, undefined, 'config'); + return; + } else if (existingKnownConfigFiles.length > 1) { + log.warn( + `found more than one svelte config file, using ${existingKnownConfigFiles[0]}. you should only have one!`, + existingKnownConfigFiles + ); + } + return existingKnownConfigFiles[0]; + } +} diff --git a/node_modules/@sveltejs/vite-plugin-svelte/src/utils/log.js b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/log.js new file mode 100644 index 0000000..0b43cff --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/log.js @@ -0,0 +1,277 @@ +/* eslint-disable no-console */ +import { cyan, red, yellow } from 'kleur/colors'; +import debug from 'debug'; + +/** @type {import('../types/log.d.ts').LogLevel[]} */ +const levels = ['debug', 'info', 'warn', 'error', 'silent']; +const prefix = 'vite-plugin-svelte'; +/** @type {Record} */ +const loggers = { + debug: { + log: debug(`${prefix}`), + enabled: false, + isDebug: true + }, + info: { + color: cyan, + log: console.log, + enabled: true + }, + warn: { + color: yellow, + log: console.warn, + enabled: true + }, + error: { + color: red, + log: console.error, + enabled: true + }, + silent: { + enabled: false + } +}; + +/** @type {import('../types/log.d.ts').LogLevel} */ +let _level = 'info'; +/** + * @param {import('../types/log.d.ts').LogLevel} level + * @returns {void} + */ +function setLevel(level) { + if (level === _level) { + return; + } + const levelIndex = levels.indexOf(level); + if (levelIndex > -1) { + _level = level; + for (let i = 0; i < levels.length; i++) { + loggers[levels[i]].enabled = i >= levelIndex; + } + } else { + _log(loggers.error, `invalid log level: ${level} `); + } +} + +/** + * @param {any} logger + * @param {string} message + * @param {any} [payload] + * @param {string} [namespace] + * @returns + */ +function _log(logger, message, payload, namespace) { + if (!logger.enabled) { + return; + } + if (logger.isDebug) { + let log = logger.log; + if (namespace) { + if (!isDebugNamespaceEnabled(namespace)) { + return; + } + log = logger.log.extend(namespace); + } + if (payload !== undefined) { + log(message, payload); + } else { + log(message); + } + } else { + logger.log( + logger.color( + `${new Date().toLocaleTimeString()} [${prefix}${ + namespace ? `:${namespace}` : '' + }] ${message}` + ) + ); + if (payload) { + logger.log(payload); + } + } +} + +/** + * @param {import('../types/log.d.ts').LogLevel} level + * @returns {import('../types/log.d.ts').LogFn} + */ +function createLogger(level) { + const logger = loggers[level]; + const logFn = /** @type {import('../types/log.d.ts').LogFn} */ (_log.bind(null, logger)); + /** @type {Set} */ + const logged = new Set(); + /** @type {import('../types/log.d.ts').SimpleLogFn} */ + const once = function (message, payload, namespace) { + if (!logger.enabled || logged.has(message)) { + return; + } + logged.add(message); + logFn.apply(null, [message, payload, namespace]); + }; + Object.defineProperty(logFn, 'enabled', { + get() { + return logger.enabled; + } + }); + Object.defineProperty(logFn, 'once', { + get() { + return once; + } + }); + return logFn; +} + +export const log = { + debug: createLogger('debug'), + info: createLogger('info'), + warn: createLogger('warn'), + error: createLogger('error'), + setLevel +}; + +/** + * @param {import('../types/id.d.ts').SvelteRequest | import('../types/id.d.ts').SvelteModuleRequest} svelteRequest + * @param {import('svelte/compiler').Warning[]} warnings + * @param {import('../types/options.d.ts').ResolvedOptions} options + */ +export function logCompilerWarnings(svelteRequest, warnings, options) { + const { emitCss, onwarn, isBuild } = options; + const sendViaWS = !isBuild && options.experimental?.sendWarningsToBrowser; + let warn = isBuild ? warnBuild : warnDev; + /** @type {import('svelte/compiler').Warning[]} */ + const handledByDefaultWarn = []; + const notIgnored = warnings?.filter((w) => !ignoreCompilerWarning(w, isBuild, emitCss)); + const extra = buildExtraWarnings(warnings, isBuild); + const allWarnings = [...notIgnored, ...extra]; + if (sendViaWS) { + const _warn = warn; + /** @type {(w: import('svelte/compiler').Warning) => void} */ + warn = (w) => { + handledByDefaultWarn.push(w); + _warn(w); + }; + } + allWarnings.forEach((warning) => { + if (onwarn) { + onwarn(warning, warn); + } else { + warn(warning); + } + }); + if (sendViaWS) { + /** @type {import('../types/log.d.ts').SvelteWarningsMessage} */ + const message = { + id: svelteRequest.id, + filename: svelteRequest.filename, + normalizedFilename: svelteRequest.normalizedFilename, + timestamp: svelteRequest.timestamp, + warnings: handledByDefaultWarn, // allWarnings filtered by warnings where onwarn did not call the default handler + allWarnings, // includes warnings filtered by onwarn and our extra vite plugin svelte warnings + rawWarnings: warnings // raw compiler output + }; + log.debug(`sending svelte:warnings message for ${svelteRequest.normalizedFilename}`); + options.server?.ws?.send('svelte:warnings', message); + } +} + +/** + * @param {import('svelte/compiler').Warning} warning + * @param {boolean} isBuild + * @param {boolean} [emitCss] + * @returns {boolean} + */ +function ignoreCompilerWarning(warning, isBuild, emitCss) { + return ( + (!emitCss && warning.code === 'css_unused_selector') || // same as rollup-plugin-svelte + (!isBuild && isNoScopableElementWarning(warning)) + ); +} + +/** + * + * @param {import('svelte/compiler').Warning} warning + * @returns {boolean} + */ +function isNoScopableElementWarning(warning) { + // see https://github.com/sveltejs/vite-plugin-svelte/issues/153 + return warning.code === 'css_unused_selector' && warning.message.includes('"*"'); +} + +/** + * + * @param {import('svelte/compiler').Warning[]} warnings + * @param {boolean} isBuild + * @returns {import('svelte/compiler').Warning[]} + */ +function buildExtraWarnings(warnings, isBuild) { + const extraWarnings = []; + if (!isBuild) { + const noScopableElementWarnings = warnings.filter((w) => isNoScopableElementWarning(w)); + if (noScopableElementWarnings.length > 0) { + // in case there are multiple, use last one as that is the one caused by our *{} rule + const noScopableElementWarning = + noScopableElementWarnings[noScopableElementWarnings.length - 1]; + extraWarnings.push({ + ...noScopableElementWarning, + code: 'vite-plugin-svelte-css-no-scopable-elements', + message: + "No scopable elements found in template. If you're using global styles in the style tag, you should move it into an external stylesheet file and import it in JS. See https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#where-should-i-put-my-global-styles." + }); + } + } + return extraWarnings; +} + +/** + * @param {import('svelte/compiler').Warning} w + */ +function warnDev(w) { + if (w.filename?.includes('node_modules')) { + if (isDebugNamespaceEnabled('node-modules-onwarn')) { + log.debug(buildExtendedLogMessage(w), undefined, 'node-modules-onwarn'); + } + } else if (log.info.enabled) { + log.info(buildExtendedLogMessage(w)); + } +} + +/** + * @param {import('svelte/compiler').Warning & {frame?: string}} w + */ +function warnBuild(w) { + if (w.filename?.includes('node_modules')) { + if (isDebugNamespaceEnabled('node-modules-onwarn')) { + log.debug(buildExtendedLogMessage(w), w.frame, 'node-modules-onwarn'); + } + } else if (log.warn.enabled) { + log.warn(buildExtendedLogMessage(w), w.frame); + } +} + +/** + * @param {import('svelte/compiler').Warning} w + */ +export function buildExtendedLogMessage(w) { + const parts = []; + if (w.filename) { + parts.push(w.filename); + } + if (w.start) { + parts.push(':', w.start.line, ':', w.start.column); + } + if (w.message) { + if (parts.length > 0) { + parts.push(' '); + } + parts.push(w.message); + } + return parts.join(''); +} + +/** + * @param {string} namespace + * @returns {boolean} + */ +export function isDebugNamespaceEnabled(namespace) { + return debug.enabled(`${prefix}:${namespace}`); +} diff --git a/node_modules/@sveltejs/vite-plugin-svelte/src/utils/optimizer.js b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/optimizer.js new file mode 100644 index 0000000..71aa571 --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/optimizer.js @@ -0,0 +1,53 @@ +import { promises as fs } from 'node:fs'; +import path from 'node:path'; + +// List of options that changes the prebundling result +/** @type {(keyof import('../types/options.d.ts').ResolvedOptions)[]} */ +const PREBUNDLE_SENSITIVE_OPTIONS = [ + 'compilerOptions', + 'configFile', + 'experimental', + 'extensions', + 'ignorePluginPreprocessors', + 'preprocess' +]; + +/** + * @param {string} cacheDir + * @param {import('../types/options.d.ts').ResolvedOptions} options + * @returns {Promise} Whether the Svelte metadata has changed + */ +export async function saveSvelteMetadata(cacheDir, options) { + const svelteMetadata = generateSvelteMetadata(options); + const svelteMetadataPath = path.resolve(cacheDir, '_svelte_metadata.json'); + + const currentSvelteMetadata = JSON.stringify(svelteMetadata, (_, value) => { + // Handle preprocessors + return typeof value === 'function' ? value.toString() : value; + }); + + /** @type {string | undefined} */ + let existingSvelteMetadata; + try { + existingSvelteMetadata = await fs.readFile(svelteMetadataPath, 'utf8'); + } catch { + // ignore + } + + await fs.mkdir(cacheDir, { recursive: true }); + await fs.writeFile(svelteMetadataPath, currentSvelteMetadata); + return currentSvelteMetadata !== existingSvelteMetadata; +} + +/** + * @param {import('../types/options.d.ts').ResolvedOptions} options + * @returns {Partial} + */ +function generateSvelteMetadata(options) { + /** @type {Record} */ + const metadata = {}; + for (const key of PREBUNDLE_SENSITIVE_OPTIONS) { + metadata[key] = options[key]; + } + return metadata; +} diff --git a/node_modules/@sveltejs/vite-plugin-svelte/src/utils/options.js b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/options.js new file mode 100644 index 0000000..6582e6e --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/options.js @@ -0,0 +1,653 @@ +import process from 'node:process'; +import { + defaultClientMainFields, + defaultServerMainFields, + defaultClientConditions, + defaultServerConditions, + normalizePath +} from 'vite'; +import { isDebugNamespaceEnabled, log } from './log.js'; +import { loadSvelteConfig } from './load-svelte-config.js'; +import { + DEFAULT_SVELTE_EXT, + FAQ_LINK_MISSING_EXPORTS_CONDITION, + SVELTE_EXPORT_CONDITIONS, + SVELTE_IMPORTS +} from './constants.js'; + +import path from 'node:path'; +import { + esbuildSvelteModulePlugin, + esbuildSveltePlugin, + facadeEsbuildSvelteModulePluginName, + facadeEsbuildSveltePluginName +} from './esbuild.js'; +import { addExtraPreprocessors } from './preprocess.js'; +import deepmerge from 'deepmerge'; +import { + crawlFrameworkPkgs, + isDepExcluded, + isDepExternaled, + isDepIncluded, + isDepNoExternaled +} from 'vitefu'; + +import { isCommonDepWithoutSvelteField } from './dependencies.js'; +import { VitePluginSvelteStats } from './vite-plugin-svelte-stats.js'; + +const allowedPluginOptions = new Set([ + 'include', + 'exclude', + 'emitCss', + 'hot', + 'ignorePluginPreprocessors', + 'disableDependencyReinclusion', + 'prebundleSvelteLibraries', + 'inspector', + 'dynamicCompileOptions', + 'experimental' +]); + +const knownRootOptions = new Set(['extensions', 'compilerOptions', 'preprocess', 'onwarn']); + +const allowedInlineOptions = new Set(['configFile', ...allowedPluginOptions, ...knownRootOptions]); + +/** + * @param {Partial} [inlineOptions] + */ +export function validateInlineOptions(inlineOptions) { + const invalidKeys = Object.keys(inlineOptions || {}).filter( + (key) => !allowedInlineOptions.has(key) + ); + if (invalidKeys.length) { + log.warn(`invalid plugin options "${invalidKeys.join(', ')}" in inline config`, inlineOptions); + } +} + +/** + * @param {Partial} [config] + * @returns {Partial | undefined} + */ +function convertPluginOptions(config) { + if (!config) { + return; + } + const invalidRootOptions = Object.keys(config).filter((key) => allowedPluginOptions.has(key)); + if (invalidRootOptions.length > 0) { + throw new Error( + `Invalid options in svelte config. Move the following options into 'vitePlugin:{...}': ${invalidRootOptions.join( + ', ' + )}` + ); + } + if (!config.vitePlugin) { + return config; + } + const pluginOptions = config.vitePlugin; + const pluginOptionKeys = Object.keys(pluginOptions); + + const rootOptionsInPluginOptions = pluginOptionKeys.filter((key) => knownRootOptions.has(key)); + if (rootOptionsInPluginOptions.length > 0) { + throw new Error( + `Invalid options in svelte config under vitePlugin:{...}', move them to the config root : ${rootOptionsInPluginOptions.join( + ', ' + )}` + ); + } + const duplicateOptions = pluginOptionKeys.filter((key) => + Object.prototype.hasOwnProperty.call(config, key) + ); + if (duplicateOptions.length > 0) { + throw new Error( + `Invalid duplicate options in svelte config under vitePlugin:{...}', they are defined in root too and must only exist once: ${duplicateOptions.join( + ', ' + )}` + ); + } + const unknownPluginOptions = pluginOptionKeys.filter((key) => !allowedPluginOptions.has(key)); + if (unknownPluginOptions.length > 0) { + log.warn( + `ignoring unknown plugin options in svelte config under vitePlugin:{...}: ${unknownPluginOptions.join( + ', ' + )}` + ); + unknownPluginOptions.forEach((unkownOption) => { + // @ts-expect-error not typed + delete pluginOptions[unkownOption]; + }); + } + /** @type {import('../public.d.ts').Options} */ + const result = { + ...config, + ...pluginOptions + }; + // @ts-expect-error it exists + delete result.vitePlugin; + + return result; +} + +/** + * used in config phase, merges the default options, svelte config, and inline options + * @param {Partial | undefined} inlineOptions + * @param {import('vite').UserConfig} viteUserConfig + * @param {import('vite').ConfigEnv} viteEnv + * @returns {Promise} + */ +export async function preResolveOptions(inlineOptions, viteUserConfig, viteEnv) { + if (!inlineOptions) { + inlineOptions = {}; + } + /** @type {import('vite').UserConfig} */ + const viteConfigWithResolvedRoot = { + ...viteUserConfig, + root: resolveViteRoot(viteUserConfig) + }; + const isBuild = viteEnv.command === 'build'; + /** @type {Partial} */ + const defaultOptions = { + extensions: DEFAULT_SVELTE_EXT, + emitCss: true, + prebundleSvelteLibraries: !isBuild + }; + const svelteConfig = convertPluginOptions( + await loadSvelteConfig(viteConfigWithResolvedRoot, inlineOptions) + ); + /** @type {Partial} */ + const extraOptions = { + root: viteConfigWithResolvedRoot.root, + isBuild, + isServe: viteEnv.command === 'serve', + isDebug: process.env.DEBUG != null + }; + + const merged = /** @type {import('../types/options.d.ts').PreResolvedOptions} */ ( + mergeConfigs(defaultOptions, svelteConfig, inlineOptions, extraOptions) + ); + // configFile of svelteConfig contains the absolute path it was loaded from, + // prefer it over the possibly relative inline path + if (svelteConfig?.configFile) { + merged.configFile = svelteConfig.configFile; + } + return merged; +} + +/** + * @template T + * @param {(Partial | undefined)[]} configs + * @returns T + */ +function mergeConfigs(...configs) { + /** @type {Partial} */ + let result = {}; + for (const config of configs.filter((x) => x != null)) { + result = deepmerge(result, /** @type {Partial} */ (config), { + // replace arrays + arrayMerge: (target, source) => source ?? target + }); + } + return /** @type {T} */ result; +} + +/** + * used in configResolved phase, merges a contextual default config, pre-resolved options, and some preprocessors. also validates the final config. + * + * @param {import('../types/options.d.ts').PreResolvedOptions} preResolveOptions + * @param {import('vite').ResolvedConfig} viteConfig + * @param {import('./vite-plugin-svelte-cache.js').VitePluginSvelteCache} cache + * @returns {import('../types/options.d.ts').ResolvedOptions} + */ +export function resolveOptions(preResolveOptions, viteConfig, cache) { + const css = preResolveOptions.emitCss ? 'external' : 'injected'; + /** @type {Partial} */ + const defaultOptions = { + compilerOptions: { + css, + dev: !viteConfig.isProduction, + hmr: + !viteConfig.isProduction && + !preResolveOptions.isBuild && + viteConfig.server && + viteConfig.server.hmr !== false + } + }; + + /** @type {Partial} */ + const extraOptions = { + root: viteConfig.root, + isProduction: viteConfig.isProduction + }; + const merged = /** @type {import('../types/options.d.ts').ResolvedOptions}*/ ( + mergeConfigs(defaultOptions, preResolveOptions, extraOptions) + ); + + removeIgnoredOptions(merged); + handleDeprecatedOptions(merged); + addExtraPreprocessors(merged, viteConfig); + enforceOptionsForHmr(merged, viteConfig); + enforceOptionsForProduction(merged); + // mergeConfigs would mangle functions on the stats class, so do this afterwards + if (log.debug.enabled && isDebugNamespaceEnabled('stats')) { + merged.stats = new VitePluginSvelteStats(cache); + } + return merged; +} + +/** + * @param {import('../types/options.d.ts').ResolvedOptions} options + * @param {import('vite').ResolvedConfig} viteConfig + */ +function enforceOptionsForHmr(options, viteConfig) { + if (options.hot) { + log.warn( + 'svelte 5 has hmr integrated in core. Please remove the vitePlugin.hot option and use compilerOptions.hmr instead' + ); + delete options.hot; + options.compilerOptions.hmr = true; + } + if (options.compilerOptions.hmr && viteConfig.server?.hmr === false) { + log.warn( + 'vite config server.hmr is false but compilerOptions.hmr is true. Forcing compilerOptions.hmr to false as it would not work.' + ); + options.compilerOptions.hmr = false; + } +} + +/** + * @param {import('../types/options.d.ts').ResolvedOptions} options + */ +function enforceOptionsForProduction(options) { + if (options.isProduction) { + if (options.compilerOptions.hmr) { + log.warn( + 'you are building for production but compilerOptions.hmr is true, forcing it to false' + ); + options.compilerOptions.hmr = false; + } + if (options.compilerOptions.dev) { + log.warn( + 'you are building for production but compilerOptions.dev is true, forcing it to false' + ); + options.compilerOptions.dev = false; + } + } +} + +/** + * @param {import('../types/options.d.ts').ResolvedOptions} options + */ +function removeIgnoredOptions(options) { + const ignoredCompilerOptions = ['generate', 'format', 'filename']; + if (options.compilerOptions.hmr && options.emitCss) { + ignoredCompilerOptions.push('cssHash'); + } + const passedCompilerOptions = Object.keys(options.compilerOptions || {}); + const passedIgnored = passedCompilerOptions.filter((o) => ignoredCompilerOptions.includes(o)); + if (passedIgnored.length) { + log.warn( + `The following Svelte compilerOptions are controlled by vite-plugin-svelte and essential to its functionality. User-specified values are ignored. Please remove them from your configuration: ${passedIgnored.join( + ', ' + )}` + ); + passedIgnored.forEach((ignored) => { + // @ts-expect-error string access + delete options.compilerOptions[ignored]; + }); + } +} + +/** + * @param {import('../types/options.d.ts').ResolvedOptions} options + */ +function handleDeprecatedOptions(options) { + const experimental = /** @type {Record} */ (options.experimental); + if (experimental) { + for (const promoted of ['prebundleSvelteLibraries', 'inspector', 'dynamicCompileOptions']) { + if (experimental[promoted]) { + //@ts-expect-error untyped assign + options[promoted] = experimental[promoted]; + delete experimental[promoted]; + log.warn( + `Option "experimental.${promoted}" is no longer experimental and has moved to "${promoted}". Please update your Svelte or Vite config.` + ); + } + } + if (experimental.generateMissingPreprocessorSourcemaps) { + log.warn('experimental.generateMissingPreprocessorSourcemaps has been removed.'); + } + } +} + +/** + * vite passes unresolved `root`option to config hook but we need the resolved value, so do it here + * + * @see https://github.com/sveltejs/vite-plugin-svelte/issues/113 + * @see https://github.com/vitejs/vite/blob/43c957de8a99bb326afd732c962f42127b0a4d1e/packages/vite/src/node/config.ts#L293 + * + * @param {import('vite').UserConfig} viteConfig + * @returns {string | undefined} + */ +function resolveViteRoot(viteConfig) { + return normalizePath(viteConfig.root ? path.resolve(viteConfig.root) : process.cwd()); +} + +/** + * @param {import('../types/options.d.ts').PreResolvedOptions} options + * @param {import('vite').UserConfig} config + * @returns {Promise>} + */ +export async function buildExtraViteConfig(options, config) { + /** @type {Partial} */ + const extraViteConfig = { + resolve: { + dedupe: [...SVELTE_IMPORTS] + } + // this option is still awaiting a PR in vite to be supported + // see https://github.com/sveltejs/vite-plugin-svelte/issues/60 + // knownJsSrcExtensions: options.extensions + }; + + const extraSvelteConfig = buildExtraConfigForSvelte(config); + const extraDepsConfig = await buildExtraConfigForDependencies(options, config); + // merge extra svelte and deps config, but make sure dep values are not contradicting svelte + extraViteConfig.optimizeDeps = { + include: [ + ...extraSvelteConfig.optimizeDeps.include, + ...extraDepsConfig.optimizeDeps.include.filter( + (dep) => !isDepExcluded(dep, extraSvelteConfig.optimizeDeps.exclude) + ) + ], + exclude: [ + ...extraSvelteConfig.optimizeDeps.exclude, + ...extraDepsConfig.optimizeDeps.exclude.filter( + (dep) => !isDepIncluded(dep, extraSvelteConfig.optimizeDeps.include) + ) + ] + }; + + extraViteConfig.ssr = { + external: [ + ...extraSvelteConfig.ssr.external, + ...extraDepsConfig.ssr.external.filter( + (dep) => !isDepNoExternaled(dep, extraSvelteConfig.ssr.noExternal) + ) + ], + noExternal: [ + ...extraSvelteConfig.ssr.noExternal, + ...extraDepsConfig.ssr.noExternal.filter( + (dep) => !isDepExternaled(dep, extraSvelteConfig.ssr.external) + ) + ] + }; + + // handle prebundling for svelte files + if (options.prebundleSvelteLibraries) { + extraViteConfig.optimizeDeps = { + ...extraViteConfig.optimizeDeps, + // Experimental Vite API to allow these extensions to be scanned and prebundled + extensions: options.extensions ?? ['.svelte'], + // Add esbuild plugin to prebundle Svelte files. + // Currently a placeholder as more information is needed after Vite config is resolved, + // the real Svelte plugin is added in `patchResolvedViteConfig()` + esbuildOptions: { + plugins: [ + { name: facadeEsbuildSveltePluginName, setup: () => {} }, + { name: facadeEsbuildSvelteModulePluginName, setup: () => {} } + ] + } + }; + } + + // enable hmrPartialAccept if not explicitly disabled + if (config.experimental?.hmrPartialAccept !== false) { + log.debug('enabling "experimental.hmrPartialAccept" in vite config', undefined, 'config'); + extraViteConfig.experimental = { hmrPartialAccept: true }; + } + validateViteConfig(extraViteConfig, config, options); + return extraViteConfig; +} + +/** + * @param {Partial} extraViteConfig + * @param {import('vite').UserConfig} config + * @param {import('../types/options.d.ts').PreResolvedOptions} options + */ +function validateViteConfig(extraViteConfig, config, options) { + const { prebundleSvelteLibraries, isBuild } = options; + if (prebundleSvelteLibraries) { + /** @type {(option: 'dev' | 'build' | boolean)=> boolean} */ + const isEnabled = (option) => option !== true && option !== (isBuild ? 'build' : 'dev'); + /** @type {(name: string, value: 'dev' | 'build' | boolean, recommendation: string)=> void} */ + const logWarning = (name, value, recommendation) => + log.warn.once( + `Incompatible options: \`prebundleSvelteLibraries: true\` and vite \`${name}: ${JSON.stringify( + value + )}\` ${isBuild ? 'during build.' : '.'} ${recommendation}` + ); + const viteOptimizeDepsDisabled = config.optimizeDeps?.disabled ?? 'build'; // fall back to vite default + const isOptimizeDepsEnabled = isEnabled(viteOptimizeDepsDisabled); + if (!isBuild && !isOptimizeDepsEnabled) { + logWarning( + 'optimizeDeps.disabled', + viteOptimizeDepsDisabled, + 'Forcing `optimizeDeps.disabled: "build"`. Disable prebundleSvelteLibraries or update your vite config to enable optimizeDeps during dev.' + ); + if (!extraViteConfig.optimizeDeps) { + extraViteConfig.optimizeDeps = {}; + } + extraViteConfig.optimizeDeps.disabled = 'build'; + } else if (isBuild && isOptimizeDepsEnabled) { + logWarning( + 'optimizeDeps.disabled', + viteOptimizeDepsDisabled, + 'Disable optimizeDeps or prebundleSvelteLibraries for build if you experience errors.' + ); + } + } +} + +/** + * @param {import('../types/options.d.ts').PreResolvedOptions} options + * @param {import('vite').UserConfig} config + * @returns {Promise} + */ +async function buildExtraConfigForDependencies(options, config) { + // extra handling for svelte dependencies in the project + const packagesWithoutSvelteExportsCondition = new Set(); + const depsConfig = await crawlFrameworkPkgs({ + root: options.root, + isBuild: options.isBuild, + viteUserConfig: config, + isFrameworkPkgByJson(pkgJson) { + let hasSvelteCondition = false; + if (typeof pkgJson.exports === 'object') { + // use replacer as a simple way to iterate over nested keys + JSON.stringify(pkgJson.exports, (key, value) => { + if (SVELTE_EXPORT_CONDITIONS.includes(key)) { + hasSvelteCondition = true; + } + return value; + }); + } + const hasSvelteField = !!pkgJson.svelte; + if (hasSvelteField && !hasSvelteCondition) { + packagesWithoutSvelteExportsCondition.add(`${pkgJson.name}@${pkgJson.version}`); + } + return hasSvelteCondition || hasSvelteField; + }, + isSemiFrameworkPkgByJson(pkgJson) { + return !!pkgJson.dependencies?.svelte || !!pkgJson.peerDependencies?.svelte; + }, + isFrameworkPkgByName(pkgName) { + const isNotSveltePackage = isCommonDepWithoutSvelteField(pkgName); + if (isNotSveltePackage) { + return false; + } else { + return undefined; + } + } + }); + if ( + !options.experimental?.disableSvelteResolveWarnings && + packagesWithoutSvelteExportsCondition?.size > 0 + ) { + log.warn( + `WARNING: The following packages have a svelte field in their package.json but no exports condition for svelte.\n\n${[ + ...packagesWithoutSvelteExportsCondition + ].join('\n')}\n\nPlease see ${FAQ_LINK_MISSING_EXPORTS_CONDITION} for details.` + ); + } + log.debug('extra config for dependencies generated by vitefu', depsConfig, 'config'); + + if (options.prebundleSvelteLibraries) { + // prebundling enabled, so we don't need extra dependency excludes + depsConfig.optimizeDeps.exclude = []; + // but keep dependency reinclusions of explicit user excludes + const userExclude = config.optimizeDeps?.exclude; + depsConfig.optimizeDeps.include = !userExclude + ? [] + : depsConfig.optimizeDeps.include.filter((dep) => { + // reincludes look like this: foo > bar > baz + // in case foo or bar are excluded, we have to retain the reinclude even with prebundling + return ( + dep.includes('>') && + dep + .split('>') + .slice(0, -1) + .some((d) => isDepExcluded(d.trim(), userExclude)) + ); + }); + } + if (options.disableDependencyReinclusion === true) { + depsConfig.optimizeDeps.include = depsConfig.optimizeDeps.include.filter( + (dep) => !dep.includes('>') + ); + } else if (Array.isArray(options.disableDependencyReinclusion)) { + const disabledDeps = options.disableDependencyReinclusion; + depsConfig.optimizeDeps.include = depsConfig.optimizeDeps.include.filter((dep) => { + if (!dep.includes('>')) return true; + const trimDep = dep.replace(/\s+/g, ''); + return disabledDeps.some((disabled) => trimDep.includes(`${disabled}>`)); + }); + } + + log.debug('post-processed extra config for dependencies', depsConfig, 'config'); + + return depsConfig; +} + +/** + * @param {import('vite').UserConfig} config + * @returns {import('vite').UserConfig & { optimizeDeps: { include: string[], exclude:string[] }, ssr: { noExternal:(string|RegExp)[], external: string[] } } } + */ +function buildExtraConfigForSvelte(config) { + // include svelte imports for optimization unless explicitly excluded + /** @type {string[]} */ + const include = []; + /** @type {string[]} */ + const exclude = []; + if (!isDepExcluded('svelte', config.optimizeDeps?.exclude ?? [])) { + const svelteImportsToInclude = SVELTE_IMPORTS.filter( + (si) => !(si.endsWith('/server') || si.includes('/server/')) + ); + log.debug( + `adding bare svelte packages to optimizeDeps.include: ${svelteImportsToInclude.join(', ')} `, + undefined, + 'config' + ); + include.push(...svelteImportsToInclude); + } else { + log.debug( + '"svelte" is excluded in optimizeDeps.exclude, skipped adding it to include.', + undefined, + 'config' + ); + } + /** @type {(string | RegExp)[]} */ + const noExternal = []; + /** @type {string[]} */ + const external = []; + // add svelte to ssr.noExternal unless it is present in ssr.external + // so it is correctly resolving according to the conditions in sveltes exports map + if (!isDepExternaled('svelte', config.ssr?.external ?? [])) { + noExternal.push('svelte', /^svelte\//); + } + // esm-env needs to be bundled by default for the development/production condition + // be properly used by svelte + if (!isDepExternaled('esm-env', config.ssr?.external ?? [])) { + noExternal.push('esm-env'); + } + return { optimizeDeps: { include, exclude }, ssr: { noExternal, external } }; +} + +/** + * @param {import('vite').ResolvedConfig} viteConfig + * @param {import('../types/options.d.ts').ResolvedOptions} options + */ +export function patchResolvedViteConfig(viteConfig, options) { + if (options.preprocess) { + for (const preprocessor of arraify(options.preprocess)) { + if (preprocessor.style && '__resolvedConfig' in preprocessor.style) { + preprocessor.style.__resolvedConfig = viteConfig; + } + } + } + + // replace facade esbuild plugin with a real one + const facadeEsbuildSveltePlugin = viteConfig.optimizeDeps.esbuildOptions?.plugins?.find( + (plugin) => plugin.name === facadeEsbuildSveltePluginName + ); + if (facadeEsbuildSveltePlugin) { + Object.assign(facadeEsbuildSveltePlugin, esbuildSveltePlugin(options)); + } + const facadeEsbuildSvelteModulePlugin = viteConfig.optimizeDeps.esbuildOptions?.plugins?.find( + (plugin) => plugin.name === facadeEsbuildSvelteModulePluginName + ); + if (facadeEsbuildSvelteModulePlugin) { + Object.assign(facadeEsbuildSvelteModulePlugin, esbuildSvelteModulePlugin(options)); + } +} + +/** + * Mutates `config` to ensure `resolve.mainFields` is set. If unset, it emulates Vite's default fallback. + * @param {string} name + * @param {import('vite').EnvironmentOptions} config + * @param {{ isSsrTargetWebworker?: boolean }} opts + */ +export function ensureConfigEnvironmentMainFields(name, config, opts) { + config.resolve ??= {}; + if (config.resolve.mainFields == null) { + if (config.consumer === 'client' || name === 'client' || opts.isSsrTargetWebworker) { + config.resolve.mainFields = [...defaultClientMainFields]; + } else { + config.resolve.mainFields = [...defaultServerMainFields]; + } + } + return true; +} + +/** + * Mutates `config` to ensure `resolve.conditions` is set. If unset, it emulates Vite's default fallback. + * @param {string} name + * @param {import('vite').EnvironmentOptions} config + * @param {{ isSsrTargetWebworker?: boolean }} opts + */ +export function ensureConfigEnvironmentConditions(name, config, opts) { + config.resolve ??= {}; + if (config.resolve.conditions == null) { + if (config.consumer === 'client' || name === 'client' || opts.isSsrTargetWebworker) { + config.resolve.conditions = [...defaultClientConditions]; + } else { + config.resolve.conditions = [...defaultServerConditions]; + } + } +} + +/** + * @template T + * @param {T | T[]} value + * @returns {T[]} + */ +function arraify(value) { + return Array.isArray(value) ? value : [value]; +} diff --git a/node_modules/@sveltejs/vite-plugin-svelte/src/utils/preprocess.js b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/preprocess.js new file mode 100644 index 0000000..602c649 --- /dev/null +++ b/node_modules/@sveltejs/vite-plugin-svelte/src/utils/preprocess.js @@ -0,0 +1,173 @@ +import MagicString from 'magic-string'; +import { log } from './log.js'; +import path from 'node:path'; +import { normalizePath } from 'vite'; + +/** + * this appends a *{} rule to component styles to force the svelte compiler to add style classes to all nodes + * That means adding/removing class rules from ' + * ) + * document.type //=> 'document' + * document.nodes.length //=> 2 + * ``` + */ +declare class Document_ extends Container { + nodes: Root[] + parent: undefined + type: 'document' + + constructor(defaults?: Document.DocumentProps) + + assign(overrides: Document.DocumentProps | object): this + clone(overrides?: Partial): this + cloneAfter(overrides?: Partial): this + cloneBefore(overrides?: Partial): this + + /** + * Returns a `Result` instance representing the document’s CSS roots. + * + * ```js + * const root1 = postcss.parse(css1, { from: 'a.css' }) + * const root2 = postcss.parse(css2, { from: 'b.css' }) + * const document = postcss.document() + * document.append(root1) + * document.append(root2) + * const result = document.toResult({ to: 'all.css', map: true }) + * ``` + * + * @param opts Options. + * @return Result with current document’s CSS. + */ + toResult(options?: ProcessOptions): Result +} + +declare class Document extends Document_ {} + +export = Document diff --git a/node_modules/postcss/lib/document.js b/node_modules/postcss/lib/document.js new file mode 100644 index 0000000..4468991 --- /dev/null +++ b/node_modules/postcss/lib/document.js @@ -0,0 +1,33 @@ +'use strict' + +let Container = require('./container') + +let LazyResult, Processor + +class Document extends Container { + constructor(defaults) { + // type needs to be passed to super, otherwise child roots won't be normalized correctly + super({ type: 'document', ...defaults }) + + if (!this.nodes) { + this.nodes = [] + } + } + + toResult(opts = {}) { + let lazy = new LazyResult(new Processor(), this, opts) + + return lazy.stringify() + } +} + +Document.registerLazyResult = dependant => { + LazyResult = dependant +} + +Document.registerProcessor = dependant => { + Processor = dependant +} + +module.exports = Document +Document.default = Document diff --git a/node_modules/postcss/lib/fromJSON.d.ts b/node_modules/postcss/lib/fromJSON.d.ts new file mode 100644 index 0000000..e1deedb --- /dev/null +++ b/node_modules/postcss/lib/fromJSON.d.ts @@ -0,0 +1,9 @@ +import { JSONHydrator } from './postcss.js' + +interface FromJSON extends JSONHydrator { + default: FromJSON +} + +declare const fromJSON: FromJSON + +export = fromJSON diff --git a/node_modules/postcss/lib/fromJSON.js b/node_modules/postcss/lib/fromJSON.js new file mode 100644 index 0000000..c9ac1a8 --- /dev/null +++ b/node_modules/postcss/lib/fromJSON.js @@ -0,0 +1,54 @@ +'use strict' + +let AtRule = require('./at-rule') +let Comment = require('./comment') +let Declaration = require('./declaration') +let Input = require('./input') +let PreviousMap = require('./previous-map') +let Root = require('./root') +let Rule = require('./rule') + +function fromJSON(json, inputs) { + if (Array.isArray(json)) return json.map(n => fromJSON(n)) + + let { inputs: ownInputs, ...defaults } = json + if (ownInputs) { + inputs = [] + for (let input of ownInputs) { + let inputHydrated = { ...input, __proto__: Input.prototype } + if (inputHydrated.map) { + inputHydrated.map = { + ...inputHydrated.map, + __proto__: PreviousMap.prototype + } + } + inputs.push(inputHydrated) + } + } + if (defaults.nodes) { + defaults.nodes = json.nodes.map(n => fromJSON(n, inputs)) + } + if (defaults.source) { + let { inputId, ...source } = defaults.source + defaults.source = source + if (inputId != null) { + defaults.source.input = inputs[inputId] + } + } + if (defaults.type === 'root') { + return new Root(defaults) + } else if (defaults.type === 'decl') { + return new Declaration(defaults) + } else if (defaults.type === 'rule') { + return new Rule(defaults) + } else if (defaults.type === 'comment') { + return new Comment(defaults) + } else if (defaults.type === 'atrule') { + return new AtRule(defaults) + } else { + throw new Error('Unknown node type: ' + json.type) + } +} + +module.exports = fromJSON +fromJSON.default = fromJSON diff --git a/node_modules/postcss/lib/input.d.ts b/node_modules/postcss/lib/input.d.ts new file mode 100644 index 0000000..260040f --- /dev/null +++ b/node_modules/postcss/lib/input.d.ts @@ -0,0 +1,206 @@ +import { CssSyntaxError, ProcessOptions } from './postcss.js' +import PreviousMap from './previous-map.js' + +declare namespace Input { + export interface FilePosition { + /** + * Column of inclusive start position in source file. + */ + column: number + + /** + * Column of exclusive end position in source file. + */ + endColumn?: number + + /** + * Line of exclusive end position in source file. + */ + endLine?: number + + /** + * Absolute path to the source file. + */ + file?: string + + /** + * Line of inclusive start position in source file. + */ + line: number + + /** + * Source code. + */ + source?: string + + /** + * URL for the source file. + */ + url: string + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Input_ as default } +} + +/** + * Represents the source CSS. + * + * ```js + * const root = postcss.parse(css, { from: file }) + * const input = root.source.input + * ``` + */ +declare class Input_ { + /** + * Input CSS source. + * + * ```js + * const input = postcss.parse('a{}', { from: file }).input + * input.css //=> "a{}" + * ``` + */ + css: string + + /** + * Input source with support for non-CSS documents. + * + * ```js + * const input = postcss.parse('a{}', { from: file, document: '' }).input + * input.document //=> "" + * input.css //=> "a{}" + * ``` + */ + document: string + + /** + * The absolute path to the CSS source file defined + * with the `from` option. + * + * ```js + * const root = postcss.parse(css, { from: 'a.css' }) + * root.source.input.file //=> '/home/ai/a.css' + * ``` + */ + file?: string + + /** + * The flag to indicate whether or not the source code has Unicode BOM. + */ + hasBOM: boolean + + /** + * The unique ID of the CSS source. It will be created if `from` option + * is not provided (because PostCSS does not know the file path). + * + * ```js + * const root = postcss.parse(css) + * root.source.input.file //=> undefined + * root.source.input.id //=> "" + * ``` + */ + id?: string + + /** + * The input source map passed from a compilation step before PostCSS + * (for example, from Sass compiler). + * + * ```js + * root.source.input.map.consumer().sources //=> ['a.sass'] + * ``` + */ + map: PreviousMap + + /** + * The CSS source identifier. Contains `Input#file` if the user + * set the `from` option, or `Input#id` if they did not. + * + * ```js + * const root = postcss.parse(css, { from: 'a.css' }) + * root.source.input.from //=> "/home/ai/a.css" + * + * const root = postcss.parse(css) + * root.source.input.from //=> "" + * ``` + */ + get from(): string + + /** + * @param css Input CSS source. + * @param opts Process options. + */ + constructor(css: string, opts?: ProcessOptions) + + error( + message: string, + start: + | { + column: number + line: number + } + | { + offset: number + }, + end: + | { + column: number + line: number + } + | { + offset: number + }, + opts?: { plugin?: CssSyntaxError['plugin'] } + ): CssSyntaxError + /** + * Returns `CssSyntaxError` with information about the error and its position. + */ + error( + message: string, + line: number, + column: number, + opts?: { plugin?: CssSyntaxError['plugin'] } + ): CssSyntaxError + error( + message: string, + offset: number, + opts?: { plugin?: CssSyntaxError['plugin'] } + ): CssSyntaxError + /** + * Converts source offset to line and column. + * + * @param offset Source offset. + */ + fromOffset(offset: number): { col: number; line: number } | null + /** + * Reads the input source map and returns a symbol position + * in the input source (e.g., in a Sass file that was compiled + * to CSS before being passed to PostCSS). Optionally takes an + * end position, exclusive. + * + * ```js + * root.source.input.origin(1, 1) //=> { file: 'a.css', line: 3, column: 1 } + * root.source.input.origin(1, 1, 1, 4) + * //=> { file: 'a.css', line: 3, column: 1, endLine: 3, endColumn: 4 } + * ``` + * + * @param line Line for inclusive start position in input CSS. + * @param column Column for inclusive start position in input CSS. + * @param endLine Line for exclusive end position in input CSS. + * @param endColumn Column for exclusive end position in input CSS. + * + * @return Position in input source. + */ + origin( + line: number, + column: number, + endLine?: number, + endColumn?: number + ): false | Input.FilePosition + + /** Converts this to a JSON-friendly object representation. */ + toJSON(): object +} + +declare class Input extends Input_ {} + +export = Input diff --git a/node_modules/postcss/lib/input.js b/node_modules/postcss/lib/input.js new file mode 100644 index 0000000..9773e0f --- /dev/null +++ b/node_modules/postcss/lib/input.js @@ -0,0 +1,251 @@ +'use strict' + +let { nanoid } = require('nanoid/non-secure') +let { isAbsolute, resolve } = require('path') +let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js') +let { fileURLToPath, pathToFileURL } = require('url') + +let CssSyntaxError = require('./css-syntax-error') +let PreviousMap = require('./previous-map') +let terminalHighlight = require('./terminal-highlight') + +let fromOffsetCache = Symbol('fromOffsetCache') + +let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator) +let pathAvailable = Boolean(resolve && isAbsolute) + +class Input { + get from() { + return this.file || this.id + } + + constructor(css, opts = {}) { + if ( + css === null || + typeof css === 'undefined' || + (typeof css === 'object' && !css.toString) + ) { + throw new Error(`PostCSS received ${css} instead of CSS string`) + } + + this.css = css.toString() + + if (this.css[0] === '\uFEFF' || this.css[0] === '\uFFFE') { + this.hasBOM = true + this.css = this.css.slice(1) + } else { + this.hasBOM = false + } + + this.document = this.css + if (opts.document) this.document = opts.document.toString() + + if (opts.from) { + if ( + !pathAvailable || + /^\w+:\/\//.test(opts.from) || + isAbsolute(opts.from) + ) { + this.file = opts.from + } else { + this.file = resolve(opts.from) + } + } + + if (pathAvailable && sourceMapAvailable) { + let map = new PreviousMap(this.css, opts) + if (map.text) { + this.map = map + let file = map.consumer().file + if (!this.file && file) this.file = this.mapResolve(file) + } + } + + if (!this.file) { + this.id = '' + } + if (this.map) this.map.file = this.from + } + + error(message, line, column, opts = {}) { + let endColumn, endLine, result + + if (line && typeof line === 'object') { + let start = line + let end = column + if (typeof start.offset === 'number') { + let pos = this.fromOffset(start.offset) + line = pos.line + column = pos.col + } else { + line = start.line + column = start.column + } + if (typeof end.offset === 'number') { + let pos = this.fromOffset(end.offset) + endLine = pos.line + endColumn = pos.col + } else { + endLine = end.line + endColumn = end.column + } + } else if (!column) { + let pos = this.fromOffset(line) + line = pos.line + column = pos.col + } + + let origin = this.origin(line, column, endLine, endColumn) + if (origin) { + result = new CssSyntaxError( + message, + origin.endLine === undefined + ? origin.line + : { column: origin.column, line: origin.line }, + origin.endLine === undefined + ? origin.column + : { column: origin.endColumn, line: origin.endLine }, + origin.source, + origin.file, + opts.plugin + ) + } else { + result = new CssSyntaxError( + message, + endLine === undefined ? line : { column, line }, + endLine === undefined ? column : { column: endColumn, line: endLine }, + this.css, + this.file, + opts.plugin + ) + } + + result.input = { column, endColumn, endLine, line, source: this.css } + if (this.file) { + if (pathToFileURL) { + result.input.url = pathToFileURL(this.file).toString() + } + result.input.file = this.file + } + + return result + } + + fromOffset(offset) { + let lastLine, lineToIndex + if (!this[fromOffsetCache]) { + let lines = this.css.split('\n') + lineToIndex = new Array(lines.length) + let prevIndex = 0 + + for (let i = 0, l = lines.length; i < l; i++) { + lineToIndex[i] = prevIndex + prevIndex += lines[i].length + 1 + } + + this[fromOffsetCache] = lineToIndex + } else { + lineToIndex = this[fromOffsetCache] + } + lastLine = lineToIndex[lineToIndex.length - 1] + + let min = 0 + if (offset >= lastLine) { + min = lineToIndex.length - 1 + } else { + let max = lineToIndex.length - 2 + let mid + while (min < max) { + mid = min + ((max - min) >> 1) + if (offset < lineToIndex[mid]) { + max = mid - 1 + } else if (offset >= lineToIndex[mid + 1]) { + min = mid + 1 + } else { + min = mid + break + } + } + } + return { + col: offset - lineToIndex[min] + 1, + line: min + 1 + } + } + + mapResolve(file) { + if (/^\w+:\/\//.test(file)) { + return file + } + return resolve(this.map.consumer().sourceRoot || this.map.root || '.', file) + } + + origin(line, column, endLine, endColumn) { + if (!this.map) return false + let consumer = this.map.consumer() + + let from = consumer.originalPositionFor({ column, line }) + if (!from.source) return false + + let to + if (typeof endLine === 'number') { + to = consumer.originalPositionFor({ column: endColumn, line: endLine }) + } + + let fromUrl + + if (isAbsolute(from.source)) { + fromUrl = pathToFileURL(from.source) + } else { + fromUrl = new URL( + from.source, + this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile) + ) + } + + let result = { + column: from.column, + endColumn: to && to.column, + endLine: to && to.line, + line: from.line, + url: fromUrl.toString() + } + + if (fromUrl.protocol === 'file:') { + if (fileURLToPath) { + result.file = fileURLToPath(fromUrl) + } else { + /* c8 ignore next 2 */ + throw new Error(`file: protocol is not available in this PostCSS build`) + } + } + + let source = consumer.sourceContentFor(from.source) + if (source) result.source = source + + return result + } + + toJSON() { + let json = {} + for (let name of ['hasBOM', 'css', 'file', 'id']) { + if (this[name] != null) { + json[name] = this[name] + } + } + if (this.map) { + json.map = { ...this.map } + if (json.map.consumerCache) { + json.map.consumerCache = undefined + } + } + return json + } +} + +module.exports = Input +Input.default = Input + +if (terminalHighlight && terminalHighlight.registerInput) { + terminalHighlight.registerInput(Input) +} diff --git a/node_modules/postcss/lib/lazy-result.d.ts b/node_modules/postcss/lib/lazy-result.d.ts new file mode 100644 index 0000000..2eb7279 --- /dev/null +++ b/node_modules/postcss/lib/lazy-result.d.ts @@ -0,0 +1,190 @@ +import Document from './document.js' +import { SourceMap } from './postcss.js' +import Processor from './processor.js' +import Result, { Message, ResultOptions } from './result.js' +import Root from './root.js' +import Warning from './warning.js' + +declare namespace LazyResult { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { LazyResult_ as default } +} + +/** + * A Promise proxy for the result of PostCSS transformations. + * + * A `LazyResult` instance is returned by `Processor#process`. + * + * ```js + * const lazy = postcss([autoprefixer]).process(css) + * ``` + */ +declare class LazyResult_ + implements PromiseLike> +{ + /** + * Processes input CSS through synchronous and asynchronous plugins + * and calls onRejected for each error thrown in any plugin. + * + * It implements standard Promise API. + * + * ```js + * postcss([autoprefixer]).process(css).then(result => { + * console.log(result.css) + * }).catch(error => { + * console.error(error) + * }) + * ``` + */ + catch: Promise>['catch'] + + /** + * Processes input CSS through synchronous and asynchronous plugins + * and calls onFinally on any error or when all plugins will finish work. + * + * It implements standard Promise API. + * + * ```js + * postcss([autoprefixer]).process(css).finally(() => { + * console.log('processing ended') + * }) + * ``` + */ + finally: Promise>['finally'] + + /** + * Processes input CSS through synchronous and asynchronous plugins + * and calls `onFulfilled` with a Result instance. If a plugin throws + * an error, the `onRejected` callback will be executed. + * + * It implements standard Promise API. + * + * ```js + * postcss([autoprefixer]).process(css, { from: cssPath }).then(result => { + * console.log(result.css) + * }) + * ``` + */ + then: Promise>['then'] + + /** + * An alias for the `css` property. Use it with syntaxes + * that generate non-CSS output. + * + * This property will only work with synchronous plugins. + * If the processor contains any asynchronous plugins + * it will throw an error. + * + * PostCSS runners should always use `LazyResult#then`. + */ + get content(): string + + /** + * Processes input CSS through synchronous plugins, converts `Root` + * to a CSS string and returns `Result#css`. + * + * This property will only work with synchronous plugins. + * If the processor contains any asynchronous plugins + * it will throw an error. + * + * PostCSS runners should always use `LazyResult#then`. + */ + get css(): string + + /** + * Processes input CSS through synchronous plugins + * and returns `Result#map`. + * + * This property will only work with synchronous plugins. + * If the processor contains any asynchronous plugins + * it will throw an error. + * + * PostCSS runners should always use `LazyResult#then`. + */ + get map(): SourceMap + + /** + * Processes input CSS through synchronous plugins + * and returns `Result#messages`. + * + * This property will only work with synchronous plugins. If the processor + * contains any asynchronous plugins it will throw an error. + * + * PostCSS runners should always use `LazyResult#then`. + */ + get messages(): Message[] + + /** + * Options from the `Processor#process` call. + */ + get opts(): ResultOptions + + /** + * Returns a `Processor` instance, which will be used + * for CSS transformations. + */ + get processor(): Processor + + /** + * Processes input CSS through synchronous plugins + * and returns `Result#root`. + * + * This property will only work with synchronous plugins. If the processor + * contains any asynchronous plugins it will throw an error. + * + * PostCSS runners should always use `LazyResult#then`. + */ + get root(): RootNode + + /** + * Returns the default string description of an object. + * Required to implement the Promise interface. + */ + get [Symbol.toStringTag](): string + + /** + * @param processor Processor used for this transformation. + * @param css CSS to parse and transform. + * @param opts Options from the `Processor#process` or `Root#toResult`. + */ + constructor(processor: Processor, css: string, opts: ResultOptions) + + /** + * Run plugin in async way and return `Result`. + * + * @return Result with output content. + */ + async(): Promise> + + /** + * Run plugin in sync way and return `Result`. + * + * @return Result with output content. + */ + sync(): Result + + /** + * Alias for the `LazyResult#css` property. + * + * ```js + * lazy + '' === lazy.css + * ``` + * + * @return Output CSS. + */ + toString(): string + + /** + * Processes input CSS through synchronous plugins + * and calls `Result#warnings`. + * + * @return Warnings from plugins. + */ + warnings(): Warning[] +} + +declare class LazyResult< + RootNode = Document | Root +> extends LazyResult_ {} + +export = LazyResult diff --git a/node_modules/postcss/lib/lazy-result.js b/node_modules/postcss/lib/lazy-result.js new file mode 100644 index 0000000..1ea52b8 --- /dev/null +++ b/node_modules/postcss/lib/lazy-result.js @@ -0,0 +1,550 @@ +'use strict' + +let Container = require('./container') +let Document = require('./document') +let MapGenerator = require('./map-generator') +let parse = require('./parse') +let Result = require('./result') +let Root = require('./root') +let stringify = require('./stringify') +let { isClean, my } = require('./symbols') +let warnOnce = require('./warn-once') + +const TYPE_TO_CLASS_NAME = { + atrule: 'AtRule', + comment: 'Comment', + decl: 'Declaration', + document: 'Document', + root: 'Root', + rule: 'Rule' +} + +const PLUGIN_PROPS = { + AtRule: true, + AtRuleExit: true, + Comment: true, + CommentExit: true, + Declaration: true, + DeclarationExit: true, + Document: true, + DocumentExit: true, + Once: true, + OnceExit: true, + postcssPlugin: true, + prepare: true, + Root: true, + RootExit: true, + Rule: true, + RuleExit: true +} + +const NOT_VISITORS = { + Once: true, + postcssPlugin: true, + prepare: true +} + +const CHILDREN = 0 + +function isPromise(obj) { + return typeof obj === 'object' && typeof obj.then === 'function' +} + +function getEvents(node) { + let key = false + let type = TYPE_TO_CLASS_NAME[node.type] + if (node.type === 'decl') { + key = node.prop.toLowerCase() + } else if (node.type === 'atrule') { + key = node.name.toLowerCase() + } + + if (key && node.append) { + return [ + type, + type + '-' + key, + CHILDREN, + type + 'Exit', + type + 'Exit-' + key + ] + } else if (key) { + return [type, type + '-' + key, type + 'Exit', type + 'Exit-' + key] + } else if (node.append) { + return [type, CHILDREN, type + 'Exit'] + } else { + return [type, type + 'Exit'] + } +} + +function toStack(node) { + let events + if (node.type === 'document') { + events = ['Document', CHILDREN, 'DocumentExit'] + } else if (node.type === 'root') { + events = ['Root', CHILDREN, 'RootExit'] + } else { + events = getEvents(node) + } + + return { + eventIndex: 0, + events, + iterator: 0, + node, + visitorIndex: 0, + visitors: [] + } +} + +function cleanMarks(node) { + node[isClean] = false + if (node.nodes) node.nodes.forEach(i => cleanMarks(i)) + return node +} + +let postcss = {} + +class LazyResult { + get content() { + return this.stringify().content + } + + get css() { + return this.stringify().css + } + + get map() { + return this.stringify().map + } + + get messages() { + return this.sync().messages + } + + get opts() { + return this.result.opts + } + + get processor() { + return this.result.processor + } + + get root() { + return this.sync().root + } + + get [Symbol.toStringTag]() { + return 'LazyResult' + } + + constructor(processor, css, opts) { + this.stringified = false + this.processed = false + + let root + if ( + typeof css === 'object' && + css !== null && + (css.type === 'root' || css.type === 'document') + ) { + root = cleanMarks(css) + } else if (css instanceof LazyResult || css instanceof Result) { + root = cleanMarks(css.root) + if (css.map) { + if (typeof opts.map === 'undefined') opts.map = {} + if (!opts.map.inline) opts.map.inline = false + opts.map.prev = css.map + } + } else { + let parser = parse + if (opts.syntax) parser = opts.syntax.parse + if (opts.parser) parser = opts.parser + if (parser.parse) parser = parser.parse + + try { + root = parser(css, opts) + } catch (error) { + this.processed = true + this.error = error + } + + if (root && !root[my]) { + /* c8 ignore next 2 */ + Container.rebuild(root) + } + } + + this.result = new Result(processor, root, opts) + this.helpers = { ...postcss, postcss, result: this.result } + this.plugins = this.processor.plugins.map(plugin => { + if (typeof plugin === 'object' && plugin.prepare) { + return { ...plugin, ...plugin.prepare(this.result) } + } else { + return plugin + } + }) + } + + async() { + if (this.error) return Promise.reject(this.error) + if (this.processed) return Promise.resolve(this.result) + if (!this.processing) { + this.processing = this.runAsync() + } + return this.processing + } + + catch(onRejected) { + return this.async().catch(onRejected) + } + + finally(onFinally) { + return this.async().then(onFinally, onFinally) + } + + getAsyncError() { + throw new Error('Use process(css).then(cb) to work with async plugins') + } + + handleError(error, node) { + let plugin = this.result.lastPlugin + try { + if (node) node.addToError(error) + this.error = error + if (error.name === 'CssSyntaxError' && !error.plugin) { + error.plugin = plugin.postcssPlugin + error.setMessage() + } else if (plugin.postcssVersion) { + if (process.env.NODE_ENV !== 'production') { + let pluginName = plugin.postcssPlugin + let pluginVer = plugin.postcssVersion + let runtimeVer = this.result.processor.version + let a = pluginVer.split('.') + let b = runtimeVer.split('.') + + if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) { + // eslint-disable-next-line no-console + console.error( + 'Unknown error from PostCSS plugin. Your current PostCSS ' + + 'version is ' + + runtimeVer + + ', but ' + + pluginName + + ' uses ' + + pluginVer + + '. Perhaps this is the source of the error below.' + ) + } + } + } + } catch (err) { + /* c8 ignore next 3 */ + // eslint-disable-next-line no-console + if (console && console.error) console.error(err) + } + return error + } + + prepareVisitors() { + this.listeners = {} + let add = (plugin, type, cb) => { + if (!this.listeners[type]) this.listeners[type] = [] + this.listeners[type].push([plugin, cb]) + } + for (let plugin of this.plugins) { + if (typeof plugin === 'object') { + for (let event in plugin) { + if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) { + throw new Error( + `Unknown event ${event} in ${plugin.postcssPlugin}. ` + + `Try to update PostCSS (${this.processor.version} now).` + ) + } + if (!NOT_VISITORS[event]) { + if (typeof plugin[event] === 'object') { + for (let filter in plugin[event]) { + if (filter === '*') { + add(plugin, event, plugin[event][filter]) + } else { + add( + plugin, + event + '-' + filter.toLowerCase(), + plugin[event][filter] + ) + } + } + } else if (typeof plugin[event] === 'function') { + add(plugin, event, plugin[event]) + } + } + } + } + } + this.hasListener = Object.keys(this.listeners).length > 0 + } + + async runAsync() { + this.plugin = 0 + for (let i = 0; i < this.plugins.length; i++) { + let plugin = this.plugins[i] + let promise = this.runOnRoot(plugin) + if (isPromise(promise)) { + try { + await promise + } catch (error) { + throw this.handleError(error) + } + } + } + + this.prepareVisitors() + if (this.hasListener) { + let root = this.result.root + while (!root[isClean]) { + root[isClean] = true + let stack = [toStack(root)] + while (stack.length > 0) { + let promise = this.visitTick(stack) + if (isPromise(promise)) { + try { + await promise + } catch (e) { + let node = stack[stack.length - 1].node + throw this.handleError(e, node) + } + } + } + } + + if (this.listeners.OnceExit) { + for (let [plugin, visitor] of this.listeners.OnceExit) { + this.result.lastPlugin = plugin + try { + if (root.type === 'document') { + let roots = root.nodes.map(subRoot => + visitor(subRoot, this.helpers) + ) + + await Promise.all(roots) + } else { + await visitor(root, this.helpers) + } + } catch (e) { + throw this.handleError(e) + } + } + } + } + + this.processed = true + return this.stringify() + } + + runOnRoot(plugin) { + this.result.lastPlugin = plugin + try { + if (typeof plugin === 'object' && plugin.Once) { + if (this.result.root.type === 'document') { + let roots = this.result.root.nodes.map(root => + plugin.Once(root, this.helpers) + ) + + if (isPromise(roots[0])) { + return Promise.all(roots) + } + + return roots + } + + return plugin.Once(this.result.root, this.helpers) + } else if (typeof plugin === 'function') { + return plugin(this.result.root, this.result) + } + } catch (error) { + throw this.handleError(error) + } + } + + stringify() { + if (this.error) throw this.error + if (this.stringified) return this.result + this.stringified = true + + this.sync() + + let opts = this.result.opts + let str = stringify + if (opts.syntax) str = opts.syntax.stringify + if (opts.stringifier) str = opts.stringifier + if (str.stringify) str = str.stringify + + let map = new MapGenerator(str, this.result.root, this.result.opts) + let data = map.generate() + this.result.css = data[0] + this.result.map = data[1] + + return this.result + } + + sync() { + if (this.error) throw this.error + if (this.processed) return this.result + this.processed = true + + if (this.processing) { + throw this.getAsyncError() + } + + for (let plugin of this.plugins) { + let promise = this.runOnRoot(plugin) + if (isPromise(promise)) { + throw this.getAsyncError() + } + } + + this.prepareVisitors() + if (this.hasListener) { + let root = this.result.root + while (!root[isClean]) { + root[isClean] = true + this.walkSync(root) + } + if (this.listeners.OnceExit) { + if (root.type === 'document') { + for (let subRoot of root.nodes) { + this.visitSync(this.listeners.OnceExit, subRoot) + } + } else { + this.visitSync(this.listeners.OnceExit, root) + } + } + } + + return this.result + } + + then(onFulfilled, onRejected) { + if (process.env.NODE_ENV !== 'production') { + if (!('from' in this.opts)) { + warnOnce( + 'Without `from` option PostCSS could generate wrong source map ' + + 'and will not find Browserslist config. Set it to CSS file path ' + + 'or to `undefined` to prevent this warning.' + ) + } + } + return this.async().then(onFulfilled, onRejected) + } + + toString() { + return this.css + } + + visitSync(visitors, node) { + for (let [plugin, visitor] of visitors) { + this.result.lastPlugin = plugin + let promise + try { + promise = visitor(node, this.helpers) + } catch (e) { + throw this.handleError(e, node.proxyOf) + } + if (node.type !== 'root' && node.type !== 'document' && !node.parent) { + return true + } + if (isPromise(promise)) { + throw this.getAsyncError() + } + } + } + + visitTick(stack) { + let visit = stack[stack.length - 1] + let { node, visitors } = visit + + if (node.type !== 'root' && node.type !== 'document' && !node.parent) { + stack.pop() + return + } + + if (visitors.length > 0 && visit.visitorIndex < visitors.length) { + let [plugin, visitor] = visitors[visit.visitorIndex] + visit.visitorIndex += 1 + if (visit.visitorIndex === visitors.length) { + visit.visitors = [] + visit.visitorIndex = 0 + } + this.result.lastPlugin = plugin + try { + return visitor(node.toProxy(), this.helpers) + } catch (e) { + throw this.handleError(e, node) + } + } + + if (visit.iterator !== 0) { + let iterator = visit.iterator + let child + while ((child = node.nodes[node.indexes[iterator]])) { + node.indexes[iterator] += 1 + if (!child[isClean]) { + child[isClean] = true + stack.push(toStack(child)) + return + } + } + visit.iterator = 0 + delete node.indexes[iterator] + } + + let events = visit.events + while (visit.eventIndex < events.length) { + let event = events[visit.eventIndex] + visit.eventIndex += 1 + if (event === CHILDREN) { + if (node.nodes && node.nodes.length) { + node[isClean] = true + visit.iterator = node.getIterator() + } + return + } else if (this.listeners[event]) { + visit.visitors = this.listeners[event] + return + } + } + stack.pop() + } + + walkSync(node) { + node[isClean] = true + let events = getEvents(node) + for (let event of events) { + if (event === CHILDREN) { + if (node.nodes) { + node.each(child => { + if (!child[isClean]) this.walkSync(child) + }) + } + } else { + let visitors = this.listeners[event] + if (visitors) { + if (this.visitSync(visitors, node.toProxy())) return + } + } + } + } + + warnings() { + return this.sync().warnings() + } +} + +LazyResult.registerPostcss = dependant => { + postcss = dependant +} + +module.exports = LazyResult +LazyResult.default = LazyResult + +Root.registerLazyResult(LazyResult) +Document.registerLazyResult(LazyResult) diff --git a/node_modules/postcss/lib/list.d.ts b/node_modules/postcss/lib/list.d.ts new file mode 100644 index 0000000..e262ad3 --- /dev/null +++ b/node_modules/postcss/lib/list.d.ts @@ -0,0 +1,60 @@ +declare namespace list { + type List = { + /** + * Safely splits comma-separated values (such as those for `transition-*` + * and `background` properties). + * + * ```js + * Once (root, { list }) { + * list.comma('black, linear-gradient(white, black)') + * //=> ['black', 'linear-gradient(white, black)'] + * } + * ``` + * + * @param str Comma-separated values. + * @return Split values. + */ + comma(str: string): string[] + + default: List + + /** + * Safely splits space-separated values (such as those for `background`, + * `border-radius`, and other shorthand properties). + * + * ```js + * Once (root, { list }) { + * list.space('1px calc(10% + 1px)') //=> ['1px', 'calc(10% + 1px)'] + * } + * ``` + * + * @param str Space-separated values. + * @return Split values. + */ + space(str: string): string[] + + /** + * Safely splits values. + * + * ```js + * Once (root, { list }) { + * list.split('1px calc(10% + 1px)', [' ', '\n', '\t']) //=> ['1px', 'calc(10% + 1px)'] + * } + * ``` + * + * @param string separated values. + * @param separators array of separators. + * @param last boolean indicator. + * @return Split values. + */ + split( + string: string, + separators: readonly string[], + last: boolean + ): string[] + } +} + +declare const list: list.List + +export = list diff --git a/node_modules/postcss/lib/list.js b/node_modules/postcss/lib/list.js new file mode 100644 index 0000000..1b31f98 --- /dev/null +++ b/node_modules/postcss/lib/list.js @@ -0,0 +1,58 @@ +'use strict' + +let list = { + comma(string) { + return list.split(string, [','], true) + }, + + space(string) { + let spaces = [' ', '\n', '\t'] + return list.split(string, spaces) + }, + + split(string, separators, last) { + let array = [] + let current = '' + let split = false + + let func = 0 + let inQuote = false + let prevQuote = '' + let escape = false + + for (let letter of string) { + if (escape) { + escape = false + } else if (letter === '\\') { + escape = true + } else if (inQuote) { + if (letter === prevQuote) { + inQuote = false + } + } else if (letter === '"' || letter === "'") { + inQuote = true + prevQuote = letter + } else if (letter === '(') { + func += 1 + } else if (letter === ')') { + if (func > 0) func -= 1 + } else if (func === 0) { + if (separators.includes(letter)) split = true + } + + if (split) { + if (current !== '') array.push(current.trim()) + current = '' + split = false + } else { + current += letter + } + } + + if (last || current !== '') array.push(current.trim()) + return array + } +} + +module.exports = list +list.default = list diff --git a/node_modules/postcss/lib/map-generator.js b/node_modules/postcss/lib/map-generator.js new file mode 100644 index 0000000..89069d3 --- /dev/null +++ b/node_modules/postcss/lib/map-generator.js @@ -0,0 +1,368 @@ +'use strict' + +let { dirname, relative, resolve, sep } = require('path') +let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js') +let { pathToFileURL } = require('url') + +let Input = require('./input') + +let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator) +let pathAvailable = Boolean(dirname && resolve && relative && sep) + +class MapGenerator { + constructor(stringify, root, opts, cssString) { + this.stringify = stringify + this.mapOpts = opts.map || {} + this.root = root + this.opts = opts + this.css = cssString + this.originalCSS = cssString + this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute + + this.memoizedFileURLs = new Map() + this.memoizedPaths = new Map() + this.memoizedURLs = new Map() + } + + addAnnotation() { + let content + + if (this.isInline()) { + content = + 'data:application/json;base64,' + this.toBase64(this.map.toString()) + } else if (typeof this.mapOpts.annotation === 'string') { + content = this.mapOpts.annotation + } else if (typeof this.mapOpts.annotation === 'function') { + content = this.mapOpts.annotation(this.opts.to, this.root) + } else { + content = this.outputFile() + '.map' + } + let eol = '\n' + if (this.css.includes('\r\n')) eol = '\r\n' + + this.css += eol + '/*# sourceMappingURL=' + content + ' */' + } + + applyPrevMaps() { + for (let prev of this.previous()) { + let from = this.toUrl(this.path(prev.file)) + let root = prev.root || dirname(prev.file) + let map + + if (this.mapOpts.sourcesContent === false) { + map = new SourceMapConsumer(prev.text) + if (map.sourcesContent) { + map.sourcesContent = null + } + } else { + map = prev.consumer() + } + + this.map.applySourceMap(map, from, this.toUrl(this.path(root))) + } + } + + clearAnnotation() { + if (this.mapOpts.annotation === false) return + + if (this.root) { + let node + for (let i = this.root.nodes.length - 1; i >= 0; i--) { + node = this.root.nodes[i] + if (node.type !== 'comment') continue + if (node.text.startsWith('# sourceMappingURL=')) { + this.root.removeChild(i) + } + } + } else if (this.css) { + this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, '') + } + } + + generate() { + this.clearAnnotation() + if (pathAvailable && sourceMapAvailable && this.isMap()) { + return this.generateMap() + } else { + let result = '' + this.stringify(this.root, i => { + result += i + }) + return [result] + } + } + + generateMap() { + if (this.root) { + this.generateString() + } else if (this.previous().length === 1) { + let prev = this.previous()[0].consumer() + prev.file = this.outputFile() + this.map = SourceMapGenerator.fromSourceMap(prev, { + ignoreInvalidMapping: true + }) + } else { + this.map = new SourceMapGenerator({ + file: this.outputFile(), + ignoreInvalidMapping: true + }) + this.map.addMapping({ + generated: { column: 0, line: 1 }, + original: { column: 0, line: 1 }, + source: this.opts.from + ? this.toUrl(this.path(this.opts.from)) + : '' + }) + } + + if (this.isSourcesContent()) this.setSourcesContent() + if (this.root && this.previous().length > 0) this.applyPrevMaps() + if (this.isAnnotation()) this.addAnnotation() + + if (this.isInline()) { + return [this.css] + } else { + return [this.css, this.map] + } + } + + generateString() { + this.css = '' + this.map = new SourceMapGenerator({ + file: this.outputFile(), + ignoreInvalidMapping: true + }) + + let line = 1 + let column = 1 + + let noSource = '' + let mapping = { + generated: { column: 0, line: 0 }, + original: { column: 0, line: 0 }, + source: '' + } + + let last, lines + this.stringify(this.root, (str, node, type) => { + this.css += str + + if (node && type !== 'end') { + mapping.generated.line = line + mapping.generated.column = column - 1 + if (node.source && node.source.start) { + mapping.source = this.sourcePath(node) + mapping.original.line = node.source.start.line + mapping.original.column = node.source.start.column - 1 + this.map.addMapping(mapping) + } else { + mapping.source = noSource + mapping.original.line = 1 + mapping.original.column = 0 + this.map.addMapping(mapping) + } + } + + lines = str.match(/\n/g) + if (lines) { + line += lines.length + last = str.lastIndexOf('\n') + column = str.length - last + } else { + column += str.length + } + + if (node && type !== 'start') { + let p = node.parent || { raws: {} } + let childless = + node.type === 'decl' || (node.type === 'atrule' && !node.nodes) + if (!childless || node !== p.last || p.raws.semicolon) { + if (node.source && node.source.end) { + mapping.source = this.sourcePath(node) + mapping.original.line = node.source.end.line + mapping.original.column = node.source.end.column - 1 + mapping.generated.line = line + mapping.generated.column = column - 2 + this.map.addMapping(mapping) + } else { + mapping.source = noSource + mapping.original.line = 1 + mapping.original.column = 0 + mapping.generated.line = line + mapping.generated.column = column - 1 + this.map.addMapping(mapping) + } + } + } + }) + } + + isAnnotation() { + if (this.isInline()) { + return true + } + if (typeof this.mapOpts.annotation !== 'undefined') { + return this.mapOpts.annotation + } + if (this.previous().length) { + return this.previous().some(i => i.annotation) + } + return true + } + + isInline() { + if (typeof this.mapOpts.inline !== 'undefined') { + return this.mapOpts.inline + } + + let annotation = this.mapOpts.annotation + if (typeof annotation !== 'undefined' && annotation !== true) { + return false + } + + if (this.previous().length) { + return this.previous().some(i => i.inline) + } + return true + } + + isMap() { + if (typeof this.opts.map !== 'undefined') { + return !!this.opts.map + } + return this.previous().length > 0 + } + + isSourcesContent() { + if (typeof this.mapOpts.sourcesContent !== 'undefined') { + return this.mapOpts.sourcesContent + } + if (this.previous().length) { + return this.previous().some(i => i.withContent()) + } + return true + } + + outputFile() { + if (this.opts.to) { + return this.path(this.opts.to) + } else if (this.opts.from) { + return this.path(this.opts.from) + } else { + return 'to.css' + } + } + + path(file) { + if (this.mapOpts.absolute) return file + if (file.charCodeAt(0) === 60 /* `<` */) return file + if (/^\w+:\/\//.test(file)) return file + let cached = this.memoizedPaths.get(file) + if (cached) return cached + + let from = this.opts.to ? dirname(this.opts.to) : '.' + + if (typeof this.mapOpts.annotation === 'string') { + from = dirname(resolve(from, this.mapOpts.annotation)) + } + + let path = relative(from, file) + this.memoizedPaths.set(file, path) + + return path + } + + previous() { + if (!this.previousMaps) { + this.previousMaps = [] + if (this.root) { + this.root.walk(node => { + if (node.source && node.source.input.map) { + let map = node.source.input.map + if (!this.previousMaps.includes(map)) { + this.previousMaps.push(map) + } + } + }) + } else { + let input = new Input(this.originalCSS, this.opts) + if (input.map) this.previousMaps.push(input.map) + } + } + + return this.previousMaps + } + + setSourcesContent() { + let already = {} + if (this.root) { + this.root.walk(node => { + if (node.source) { + let from = node.source.input.from + if (from && !already[from]) { + already[from] = true + let fromUrl = this.usesFileUrls + ? this.toFileUrl(from) + : this.toUrl(this.path(from)) + this.map.setSourceContent(fromUrl, node.source.input.css) + } + } + }) + } else if (this.css) { + let from = this.opts.from + ? this.toUrl(this.path(this.opts.from)) + : '' + this.map.setSourceContent(from, this.css) + } + } + + sourcePath(node) { + if (this.mapOpts.from) { + return this.toUrl(this.mapOpts.from) + } else if (this.usesFileUrls) { + return this.toFileUrl(node.source.input.from) + } else { + return this.toUrl(this.path(node.source.input.from)) + } + } + + toBase64(str) { + if (Buffer) { + return Buffer.from(str).toString('base64') + } else { + return window.btoa(unescape(encodeURIComponent(str))) + } + } + + toFileUrl(path) { + let cached = this.memoizedFileURLs.get(path) + if (cached) return cached + + if (pathToFileURL) { + let fileURL = pathToFileURL(path).toString() + this.memoizedFileURLs.set(path, fileURL) + + return fileURL + } else { + throw new Error( + '`map.absolute` option is not available in this PostCSS build' + ) + } + } + + toUrl(path) { + let cached = this.memoizedURLs.get(path) + if (cached) return cached + + if (sep === '\\') { + path = path.replace(/\\/g, '/') + } + + let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent) + this.memoizedURLs.set(path, url) + + return url + } +} + +module.exports = MapGenerator diff --git a/node_modules/postcss/lib/no-work-result.d.ts b/node_modules/postcss/lib/no-work-result.d.ts new file mode 100644 index 0000000..094f30a --- /dev/null +++ b/node_modules/postcss/lib/no-work-result.d.ts @@ -0,0 +1,46 @@ +import LazyResult from './lazy-result.js' +import { SourceMap } from './postcss.js' +import Processor from './processor.js' +import Result, { Message, ResultOptions } from './result.js' +import Root from './root.js' +import Warning from './warning.js' + +declare namespace NoWorkResult { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { NoWorkResult_ as default } +} + +/** + * A Promise proxy for the result of PostCSS transformations. + * This lazy result instance doesn't parse css unless `NoWorkResult#root` or `Result#root` + * are accessed. See the example below for details. + * A `NoWork` instance is returned by `Processor#process` ONLY when no plugins defined. + * + * ```js + * const noWorkResult = postcss().process(css) // No plugins are defined. + * // CSS is not parsed + * let root = noWorkResult.root // now css is parsed because we accessed the root + * ``` + */ +declare class NoWorkResult_ implements LazyResult { + catch: Promise>['catch'] + finally: Promise>['finally'] + then: Promise>['then'] + get content(): string + get css(): string + get map(): SourceMap + get messages(): Message[] + get opts(): ResultOptions + get processor(): Processor + get root(): Root + get [Symbol.toStringTag](): string + constructor(processor: Processor, css: string, opts: ResultOptions) + async(): Promise> + sync(): Result + toString(): string + warnings(): Warning[] +} + +declare class NoWorkResult extends NoWorkResult_ {} + +export = NoWorkResult diff --git a/node_modules/postcss/lib/no-work-result.js b/node_modules/postcss/lib/no-work-result.js new file mode 100644 index 0000000..dd46182 --- /dev/null +++ b/node_modules/postcss/lib/no-work-result.js @@ -0,0 +1,138 @@ +'use strict' + +let MapGenerator = require('./map-generator') +let parse = require('./parse') +const Result = require('./result') +let stringify = require('./stringify') +let warnOnce = require('./warn-once') + +class NoWorkResult { + get content() { + return this.result.css + } + + get css() { + return this.result.css + } + + get map() { + return this.result.map + } + + get messages() { + return [] + } + + get opts() { + return this.result.opts + } + + get processor() { + return this.result.processor + } + + get root() { + if (this._root) { + return this._root + } + + let root + let parser = parse + + try { + root = parser(this._css, this._opts) + } catch (error) { + this.error = error + } + + if (this.error) { + throw this.error + } else { + this._root = root + return root + } + } + + get [Symbol.toStringTag]() { + return 'NoWorkResult' + } + + constructor(processor, css, opts) { + css = css.toString() + this.stringified = false + + this._processor = processor + this._css = css + this._opts = opts + this._map = undefined + let root + + let str = stringify + this.result = new Result(this._processor, root, this._opts) + this.result.css = css + + let self = this + Object.defineProperty(this.result, 'root', { + get() { + return self.root + } + }) + + let map = new MapGenerator(str, root, this._opts, css) + if (map.isMap()) { + let [generatedCSS, generatedMap] = map.generate() + if (generatedCSS) { + this.result.css = generatedCSS + } + if (generatedMap) { + this.result.map = generatedMap + } + } else { + map.clearAnnotation() + this.result.css = map.css + } + } + + async() { + if (this.error) return Promise.reject(this.error) + return Promise.resolve(this.result) + } + + catch(onRejected) { + return this.async().catch(onRejected) + } + + finally(onFinally) { + return this.async().then(onFinally, onFinally) + } + + sync() { + if (this.error) throw this.error + return this.result + } + + then(onFulfilled, onRejected) { + if (process.env.NODE_ENV !== 'production') { + if (!('from' in this._opts)) { + warnOnce( + 'Without `from` option PostCSS could generate wrong source map ' + + 'and will not find Browserslist config. Set it to CSS file path ' + + 'or to `undefined` to prevent this warning.' + ) + } + } + + return this.async().then(onFulfilled, onRejected) + } + + toString() { + return this._css + } + + warnings() { + return [] + } +} + +module.exports = NoWorkResult +NoWorkResult.default = NoWorkResult diff --git a/node_modules/postcss/lib/node.d.ts b/node_modules/postcss/lib/node.d.ts new file mode 100644 index 0000000..aa7229f --- /dev/null +++ b/node_modules/postcss/lib/node.d.ts @@ -0,0 +1,541 @@ +import AtRule = require('./at-rule.js') + +import { AtRuleProps } from './at-rule.js' +import Comment, { CommentProps } from './comment.js' +import Container, { NewChild } from './container.js' +import CssSyntaxError from './css-syntax-error.js' +import Declaration, { DeclarationProps } from './declaration.js' +import Document from './document.js' +import Input from './input.js' +import { Stringifier, Syntax } from './postcss.js' +import Result from './result.js' +import Root from './root.js' +import Rule, { RuleProps } from './rule.js' +import Warning, { WarningOptions } from './warning.js' + +declare namespace Node { + export type ChildNode = AtRule.default | Comment | Declaration | Rule + + export type AnyNode = + | AtRule.default + | Comment + | Declaration + | Document + | Root + | Rule + + export type ChildProps = + | AtRuleProps + | CommentProps + | DeclarationProps + | RuleProps + + export interface Position { + /** + * Source line in file. In contrast to `offset` it starts from 1. + */ + column: number + + /** + * Source column in file. + */ + line: number + + /** + * Source offset in file. It starts from 0. + */ + offset: number + } + + export interface Range { + /** + * End position, exclusive. + */ + end: Position + + /** + * Start position, inclusive. + */ + start: Position + } + + /** + * Source represents an interface for the {@link Node.source} property. + */ + export interface Source { + /** + * The inclusive ending position for the source + * code of a node. + */ + end?: Position + + /** + * The source file from where a node has originated. + */ + input: Input + + /** + * The inclusive starting position for the source + * code of a node. + */ + start?: Position + } + + /** + * Interface represents an interface for an object received + * as parameter by Node class constructor. + */ + export interface NodeProps { + source?: Source + } + + export interface NodeErrorOptions { + /** + * An ending index inside a node's string that should be highlighted as + * source of error. + */ + endIndex?: number + /** + * An index inside a node's string that should be highlighted as source + * of error. + */ + index?: number + /** + * Plugin name that created this error. PostCSS will set it automatically. + */ + plugin?: string + /** + * A word inside a node's string, that should be highlighted as source + * of error. + */ + word?: string + } + + // eslint-disable-next-line @typescript-eslint/no-shadow + class Node extends Node_ {} + export { Node as default } +} + +/** + * It represents an abstract class that handles common + * methods for other CSS abstract syntax tree nodes. + * + * Any node that represents CSS selector or value should + * not extend the `Node` class. + */ +declare abstract class Node_ { + /** + * It represents parent of the current node. + * + * ```js + * root.nodes[0].parent === root //=> true + * ``` + */ + parent: Container | Document | undefined + + /** + * It represents unnecessary whitespace and characters present + * in the css source code. + * + * Information to generate byte-to-byte equal node string as it was + * in the origin input. + * + * The properties of the raws object are decided by parser, + * the default parser uses the following properties: + * + * * `before`: the space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + * * `after`: the space symbols after the last child of the node + * to the end of the node. + * * `between`: the symbols between the property and value + * for declarations, selector and `{` for rules, or last parameter + * and `{` for at-rules. + * * `semicolon`: contains true if the last child has + * an (optional) semicolon. + * * `afterName`: the space between the at-rule name and its parameters. + * * `left`: the space symbols between `/*` and the comment’s text. + * * `right`: the space symbols between the comment’s text + * and */. + * - `important`: the content of the important statement, + * if it is not just `!important`. + * + * PostCSS filters out the comments inside selectors, declaration values + * and at-rule parameters but it stores the origin content in raws. + * + * ```js + * const root = postcss.parse('a {\n color:black\n}') + * root.first.first.raws //=> { before: '\n ', between: ':' } + * ``` + */ + raws: any + + /** + * It represents information related to origin of a node and is required + * for generating source maps. + * + * The nodes that are created manually using the public APIs + * provided by PostCSS will have `source` undefined and + * will be absent in the source map. + * + * For this reason, the plugin developer should consider + * duplicating nodes as the duplicate node will have the + * same source as the original node by default or assign + * source to a node created manually. + * + * ```js + * decl.source.input.from //=> '/home/ai/source.css' + * decl.source.start //=> { line: 10, column: 2 } + * decl.source.end //=> { line: 10, column: 12 } + * ``` + * + * ```js + * // Incorrect method, source not specified! + * const prefixed = postcss.decl({ + * prop: '-moz-' + decl.prop, + * value: decl.value + * }) + * + * // Correct method, source is inherited when duplicating. + * const prefixed = decl.clone({ + * prop: '-moz-' + decl.prop + * }) + * ``` + * + * ```js + * if (atrule.name === 'add-link') { + * const rule = postcss.rule({ + * selector: 'a', + * source: atrule.source + * }) + * + * atrule.parent.insertBefore(atrule, rule) + * } + * ``` + */ + source?: Node.Source + + /** + * It represents type of a node in + * an abstract syntax tree. + * + * A type of node helps in identification of a node + * and perform operation based on it's type. + * + * ```js + * const declaration = new Declaration({ + * prop: 'color', + * value: 'black' + * }) + * + * declaration.type //=> 'decl' + * ``` + */ + type: string + + constructor(defaults?: object) + + /** + * Insert new node after current node to current node’s parent. + * + * Just alias for `node.parent.insertAfter(node, add)`. + * + * ```js + * decl.after('color: black') + * ``` + * + * @param newNode New node. + * @return This node for methods chain. + */ + after( + newNode: Node | Node.ChildProps | readonly Node[] | string | undefined + ): this + + /** + * It assigns properties to an existing node instance. + * + * ```js + * decl.assign({ prop: 'word-wrap', value: 'break-word' }) + * ``` + * + * @param overrides New properties to override the node. + * + * @return `this` for method chaining. + */ + assign(overrides: object): this + + /** + * Insert new node before current node to current node’s parent. + * + * Just alias for `node.parent.insertBefore(node, add)`. + * + * ```js + * decl.before('content: ""') + * ``` + * + * @param newNode New node. + * @return This node for methods chain. + */ + before( + newNode: Node | Node.ChildProps | readonly Node[] | string | undefined + ): this + + /** + * Clear the code style properties for the node and its children. + * + * ```js + * node.raws.before //=> ' ' + * node.cleanRaws() + * node.raws.before //=> undefined + * ``` + * + * @param keepBetween Keep the `raws.between` symbols. + */ + cleanRaws(keepBetween?: boolean): void + + /** + * It creates clone of an existing node, which includes all the properties + * and their values, that includes `raws` but not `type`. + * + * ```js + * decl.raws.before //=> "\n " + * const cloned = decl.clone({ prop: '-moz-' + decl.prop }) + * cloned.raws.before //=> "\n " + * cloned.toString() //=> -moz-transform: scale(0) + * ``` + * + * @param overrides New properties to override in the clone. + * + * @return Duplicate of the node instance. + */ + clone(overrides?: object): this + + /** + * Shortcut to clone the node and insert the resulting cloned node + * after the current node. + * + * @param overrides New properties to override in the clone. + * @return New node. + */ + cloneAfter(overrides?: object): this + + /** + * Shortcut to clone the node and insert the resulting cloned node + * before the current node. + * + * ```js + * decl.cloneBefore({ prop: '-moz-' + decl.prop }) + * ``` + * + * @param overrides Mew properties to override in the clone. + * + * @return New node + */ + cloneBefore(overrides?: object): this + + /** + * It creates an instance of the class `CssSyntaxError` and parameters passed + * to this method are assigned to the error instance. + * + * The error instance will have description for the + * error, original position of the node in the + * source, showing line and column number. + * + * If any previous map is present, it would be used + * to get original position of the source. + * + * The Previous Map here is referred to the source map + * generated by previous compilation, example: Less, + * Stylus and Sass. + * + * This method returns the error instance instead of + * throwing it. + * + * ```js + * if (!variables[name]) { + * throw decl.error(`Unknown variable ${name}`, { word: name }) + * // CssSyntaxError: postcss-vars:a.sass:4:3: Unknown variable $black + * // color: $black + * // a + * // ^ + * // background: white + * } + * ``` + * + * @param message Description for the error instance. + * @param options Options for the error instance. + * + * @return Error instance is returned. + */ + error(message: string, options?: Node.NodeErrorOptions): CssSyntaxError + + /** + * Returns the next child of the node’s parent. + * Returns `undefined` if the current node is the last child. + * + * ```js + * if (comment.text === 'delete next') { + * const next = comment.next() + * if (next) { + * next.remove() + * } + * } + * ``` + * + * @return Next node. + */ + next(): Node.ChildNode | undefined + + /** + * Get the position for a word or an index inside the node. + * + * @param opts Options. + * @return Position. + */ + positionBy(opts?: Pick): Node.Position + + /** + * Convert string index to line/column. + * + * @param index The symbol number in the node’s string. + * @return Symbol position in file. + */ + positionInside(index: number): Node.Position + + /** + * Returns the previous child of the node’s parent. + * Returns `undefined` if the current node is the first child. + * + * ```js + * const annotation = decl.prev() + * if (annotation.type === 'comment') { + * readAnnotation(annotation.text) + * } + * ``` + * + * @return Previous node. + */ + prev(): Node.ChildNode | undefined + + /** + * Get the range for a word or start and end index inside the node. + * The start index is inclusive; the end index is exclusive. + * + * @param opts Options. + * @return Range. + */ + rangeBy( + opts?: Pick + ): Node.Range + + /** + * Returns a `raws` value. If the node is missing + * the code style property (because the node was manually built or cloned), + * PostCSS will try to autodetect the code style property by looking + * at other nodes in the tree. + * + * ```js + * const root = postcss.parse('a { background: white }') + * root.nodes[0].append({ prop: 'color', value: 'black' }) + * root.nodes[0].nodes[1].raws.before //=> undefined + * root.nodes[0].nodes[1].raw('before') //=> ' ' + * ``` + * + * @param prop Name of code style property. + * @param defaultType Name of default value, it can be missed + * if the value is the same as prop. + * @return {string} Code style value. + */ + raw(prop: string, defaultType?: string): string + + /** + * It removes the node from its parent and deletes its parent property. + * + * ```js + * if (decl.prop.match(/^-webkit-/)) { + * decl.remove() + * } + * ``` + * + * @return `this` for method chaining. + */ + remove(): this + + /** + * Inserts node(s) before the current node and removes the current node. + * + * ```js + * AtRule: { + * mixin: atrule => { + * atrule.replaceWith(mixinRules[atrule.params]) + * } + * } + * ``` + * + * @param nodes Mode(s) to replace current one. + * @return Current node to methods chain. + */ + replaceWith(...nodes: NewChild[]): this + + /** + * Finds the Root instance of the node’s tree. + * + * ```js + * root.nodes[0].nodes[0].root() === root + * ``` + * + * @return Root parent. + */ + root(): Root + + /** + * Fix circular links on `JSON.stringify()`. + * + * @return Cleaned object. + */ + toJSON(): object + + /** + * It compiles the node to browser readable cascading style sheets string + * depending on it's type. + * + * ```js + * new Rule({ selector: 'a' }).toString() //=> "a {}" + * ``` + * + * @param stringifier A syntax to use in string generation. + * @return CSS string of this node. + */ + toString(stringifier?: Stringifier | Syntax): string + + /** + * It is a wrapper for {@link Result#warn}, providing convenient + * way of generating warnings. + * + * ```js + * Declaration: { + * bad: (decl, { result }) => { + * decl.warn(result, 'Deprecated property: bad') + * } + * } + * ``` + * + * @param result The `Result` instance that will receive the warning. + * @param message Description for the warning. + * @param options Options for the warning. + * + * @return `Warning` instance is returned + */ + warn(result: Result, message: string, options?: WarningOptions): Warning + + /** + * If this node isn't already dirty, marks it and its ancestors as such. This + * indicates to the LazyResult processor that the {@link Root} has been + * modified by the current plugin and may need to be processed again by other + * plugins. + */ + protected markDirty(): void +} + +declare class Node extends Node_ {} + +export = Node diff --git a/node_modules/postcss/lib/node.js b/node_modules/postcss/lib/node.js new file mode 100644 index 0000000..2b865ba --- /dev/null +++ b/node_modules/postcss/lib/node.js @@ -0,0 +1,434 @@ +'use strict' + +let CssSyntaxError = require('./css-syntax-error') +let Stringifier = require('./stringifier') +let stringify = require('./stringify') +let { isClean, my } = require('./symbols') + +function cloneNode(obj, parent) { + let cloned = new obj.constructor() + + for (let i in obj) { + if (!Object.prototype.hasOwnProperty.call(obj, i)) { + /* c8 ignore next 2 */ + continue + } + if (i === 'proxyCache') continue + let value = obj[i] + let type = typeof value + + if (i === 'parent' && type === 'object') { + if (parent) cloned[i] = parent + } else if (i === 'source') { + cloned[i] = value + } else if (Array.isArray(value)) { + cloned[i] = value.map(j => cloneNode(j, cloned)) + } else { + if (type === 'object' && value !== null) value = cloneNode(value) + cloned[i] = value + } + } + + return cloned +} + +function sourceOffset(inputCSS, position) { + // Not all custom syntaxes support `offset` in `source.start` and `source.end` + if ( + position && + typeof position.offset !== 'undefined' + ) { + return position.offset; + } + + let column = 1 + let line = 1 + let offset = 0 + + for (let i = 0; i < inputCSS.length; i++) { + if (line === position.line && column === position.column) { + offset = i + break + } + + if (inputCSS[i] === '\n') { + column = 1 + line += 1 + } else { + column += 1 + } + } + + return offset +} + +class Node { + get proxyOf() { + return this + } + + constructor(defaults = {}) { + this.raws = {} + this[isClean] = false + this[my] = true + + for (let name in defaults) { + if (name === 'nodes') { + this.nodes = [] + for (let node of defaults[name]) { + if (typeof node.clone === 'function') { + this.append(node.clone()) + } else { + this.append(node) + } + } + } else { + this[name] = defaults[name] + } + } + } + + addToError(error) { + error.postcssNode = this + if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) { + let s = this.source + error.stack = error.stack.replace( + /\n\s{4}at /, + `$&${s.input.from}:${s.start.line}:${s.start.column}$&` + ) + } + return error + } + + after(add) { + this.parent.insertAfter(this, add) + return this + } + + assign(overrides = {}) { + for (let name in overrides) { + this[name] = overrides[name] + } + return this + } + + before(add) { + this.parent.insertBefore(this, add) + return this + } + + cleanRaws(keepBetween) { + delete this.raws.before + delete this.raws.after + if (!keepBetween) delete this.raws.between + } + + clone(overrides = {}) { + let cloned = cloneNode(this) + for (let name in overrides) { + cloned[name] = overrides[name] + } + return cloned + } + + cloneAfter(overrides = {}) { + let cloned = this.clone(overrides) + this.parent.insertAfter(this, cloned) + return cloned + } + + cloneBefore(overrides = {}) { + let cloned = this.clone(overrides) + this.parent.insertBefore(this, cloned) + return cloned + } + + error(message, opts = {}) { + if (this.source) { + let { end, start } = this.rangeBy(opts) + return this.source.input.error( + message, + { column: start.column, line: start.line }, + { column: end.column, line: end.line }, + opts + ) + } + return new CssSyntaxError(message) + } + + getProxyProcessor() { + return { + get(node, prop) { + if (prop === 'proxyOf') { + return node + } else if (prop === 'root') { + return () => node.root().toProxy() + } else { + return node[prop] + } + }, + + set(node, prop, value) { + if (node[prop] === value) return true + node[prop] = value + if ( + prop === 'prop' || + prop === 'value' || + prop === 'name' || + prop === 'params' || + prop === 'important' || + /* c8 ignore next */ + prop === 'text' + ) { + node.markDirty() + } + return true + } + } + } + + /* c8 ignore next 3 */ + markClean() { + this[isClean] = true + } + + markDirty() { + if (this[isClean]) { + this[isClean] = false + let next = this + while ((next = next.parent)) { + next[isClean] = false + } + } + } + + next() { + if (!this.parent) return undefined + let index = this.parent.index(this) + return this.parent.nodes[index + 1] + } + + positionBy(opts) { + let pos = this.source.start + if (opts.index) { + pos = this.positionInside(opts.index) + } else if (opts.word) { + let inputString = ('document' in this.source.input) + ? this.source.input.document + : this.source.input.css + let stringRepresentation = inputString.slice( + sourceOffset(inputString, this.source.start), + sourceOffset(inputString, this.source.end) + ) + let index = stringRepresentation.indexOf(opts.word) + if (index !== -1) pos = this.positionInside(index) + } + return pos + } + + positionInside(index) { + let column = this.source.start.column + let line = this.source.start.line + let inputString = ('document' in this.source.input) + ? this.source.input.document + : this.source.input.css + let offset = sourceOffset(inputString, this.source.start) + let end = offset + index + + for (let i = offset; i < end; i++) { + if (inputString[i] === '\n') { + column = 1 + line += 1 + } else { + column += 1 + } + } + + return { column, line } + } + + prev() { + if (!this.parent) return undefined + let index = this.parent.index(this) + return this.parent.nodes[index - 1] + } + + rangeBy(opts) { + let start = { + column: this.source.start.column, + line: this.source.start.line + } + let end = this.source.end + ? { + column: this.source.end.column + 1, + line: this.source.end.line + } + : { + column: start.column + 1, + line: start.line + } + + if (opts.word) { + let inputString = ('document' in this.source.input) + ? this.source.input.document + : this.source.input.css + let stringRepresentation = inputString.slice( + sourceOffset(inputString, this.source.start), + sourceOffset(inputString, this.source.end) + ) + let index = stringRepresentation.indexOf(opts.word) + if (index !== -1) { + start = this.positionInside(index) + end = this.positionInside( + index + opts.word.length, + ) + } + } else { + if (opts.start) { + start = { + column: opts.start.column, + line: opts.start.line + } + } else if (opts.index) { + start = this.positionInside(opts.index) + } + + if (opts.end) { + end = { + column: opts.end.column, + line: opts.end.line + } + } else if (typeof opts.endIndex === 'number') { + end = this.positionInside(opts.endIndex) + } else if (opts.index) { + end = this.positionInside(opts.index + 1) + } + } + + if ( + end.line < start.line || + (end.line === start.line && end.column <= start.column) + ) { + end = { column: start.column + 1, line: start.line } + } + + return { end, start } + } + + raw(prop, defaultType) { + let str = new Stringifier() + return str.raw(this, prop, defaultType) + } + + remove() { + if (this.parent) { + this.parent.removeChild(this) + } + this.parent = undefined + return this + } + + replaceWith(...nodes) { + if (this.parent) { + let bookmark = this + let foundSelf = false + for (let node of nodes) { + if (node === this) { + foundSelf = true + } else if (foundSelf) { + this.parent.insertAfter(bookmark, node) + bookmark = node + } else { + this.parent.insertBefore(bookmark, node) + } + } + + if (!foundSelf) { + this.remove() + } + } + + return this + } + + root() { + let result = this + while (result.parent && result.parent.type !== 'document') { + result = result.parent + } + return result + } + + toJSON(_, inputs) { + let fixed = {} + let emitInputs = inputs == null + inputs = inputs || new Map() + let inputsNextIndex = 0 + + for (let name in this) { + if (!Object.prototype.hasOwnProperty.call(this, name)) { + /* c8 ignore next 2 */ + continue + } + if (name === 'parent' || name === 'proxyCache') continue + let value = this[name] + + if (Array.isArray(value)) { + fixed[name] = value.map(i => { + if (typeof i === 'object' && i.toJSON) { + return i.toJSON(null, inputs) + } else { + return i + } + }) + } else if (typeof value === 'object' && value.toJSON) { + fixed[name] = value.toJSON(null, inputs) + } else if (name === 'source') { + let inputId = inputs.get(value.input) + if (inputId == null) { + inputId = inputsNextIndex + inputs.set(value.input, inputsNextIndex) + inputsNextIndex++ + } + fixed[name] = { + end: value.end, + inputId, + start: value.start + } + } else { + fixed[name] = value + } + } + + if (emitInputs) { + fixed.inputs = [...inputs.keys()].map(input => input.toJSON()) + } + + return fixed + } + + toProxy() { + if (!this.proxyCache) { + this.proxyCache = new Proxy(this, this.getProxyProcessor()) + } + return this.proxyCache + } + + toString(stringifier = stringify) { + if (stringifier.stringify) stringifier = stringifier.stringify + let result = '' + stringifier(this, i => { + result += i + }) + return result + } + + warn(result, text, opts) { + let data = { node: this } + for (let i in opts) data[i] = opts[i] + return result.warn(text, data) + } +} + +module.exports = Node +Node.default = Node diff --git a/node_modules/postcss/lib/parse.d.ts b/node_modules/postcss/lib/parse.d.ts new file mode 100644 index 0000000..4c943a4 --- /dev/null +++ b/node_modules/postcss/lib/parse.d.ts @@ -0,0 +1,9 @@ +import { Parser } from './postcss.js' + +interface Parse extends Parser { + default: Parse +} + +declare const parse: Parse + +export = parse diff --git a/node_modules/postcss/lib/parse.js b/node_modules/postcss/lib/parse.js new file mode 100644 index 0000000..00a1037 --- /dev/null +++ b/node_modules/postcss/lib/parse.js @@ -0,0 +1,42 @@ +'use strict' + +let Container = require('./container') +let Input = require('./input') +let Parser = require('./parser') + +function parse(css, opts) { + let input = new Input(css, opts) + let parser = new Parser(input) + try { + parser.parse() + } catch (e) { + if (process.env.NODE_ENV !== 'production') { + if (e.name === 'CssSyntaxError' && opts && opts.from) { + if (/\.scss$/i.test(opts.from)) { + e.message += + '\nYou tried to parse SCSS with ' + + 'the standard CSS parser; ' + + 'try again with the postcss-scss parser' + } else if (/\.sass/i.test(opts.from)) { + e.message += + '\nYou tried to parse Sass with ' + + 'the standard CSS parser; ' + + 'try again with the postcss-sass parser' + } else if (/\.less$/i.test(opts.from)) { + e.message += + '\nYou tried to parse Less with ' + + 'the standard CSS parser; ' + + 'try again with the postcss-less parser' + } + } + } + throw e + } + + return parser.root +} + +module.exports = parse +parse.default = parse + +Container.registerParse(parse) diff --git a/node_modules/postcss/lib/parser.js b/node_modules/postcss/lib/parser.js new file mode 100644 index 0000000..64fb5d8 --- /dev/null +++ b/node_modules/postcss/lib/parser.js @@ -0,0 +1,611 @@ +'use strict' + +let AtRule = require('./at-rule') +let Comment = require('./comment') +let Declaration = require('./declaration') +let Root = require('./root') +let Rule = require('./rule') +let tokenizer = require('./tokenize') + +const SAFE_COMMENT_NEIGHBOR = { + empty: true, + space: true +} + +function findLastWithPosition(tokens) { + for (let i = tokens.length - 1; i >= 0; i--) { + let token = tokens[i] + let pos = token[3] || token[2] + if (pos) return pos + } +} + +class Parser { + constructor(input) { + this.input = input + + this.root = new Root() + this.current = this.root + this.spaces = '' + this.semicolon = false + + this.createTokenizer() + this.root.source = { input, start: { column: 1, line: 1, offset: 0 } } + } + + atrule(token) { + let node = new AtRule() + node.name = token[1].slice(1) + if (node.name === '') { + this.unnamedAtrule(node, token) + } + this.init(node, token[2]) + + let type + let prev + let shift + let last = false + let open = false + let params = [] + let brackets = [] + + while (!this.tokenizer.endOfFile()) { + token = this.tokenizer.nextToken() + type = token[0] + + if (type === '(' || type === '[') { + brackets.push(type === '(' ? ')' : ']') + } else if (type === '{' && brackets.length > 0) { + brackets.push('}') + } else if (type === brackets[brackets.length - 1]) { + brackets.pop() + } + + if (brackets.length === 0) { + if (type === ';') { + node.source.end = this.getPosition(token[2]) + node.source.end.offset++ + this.semicolon = true + break + } else if (type === '{') { + open = true + break + } else if (type === '}') { + if (params.length > 0) { + shift = params.length - 1 + prev = params[shift] + while (prev && prev[0] === 'space') { + prev = params[--shift] + } + if (prev) { + node.source.end = this.getPosition(prev[3] || prev[2]) + node.source.end.offset++ + } + } + this.end(token) + break + } else { + params.push(token) + } + } else { + params.push(token) + } + + if (this.tokenizer.endOfFile()) { + last = true + break + } + } + + node.raws.between = this.spacesAndCommentsFromEnd(params) + if (params.length) { + node.raws.afterName = this.spacesAndCommentsFromStart(params) + this.raw(node, 'params', params) + if (last) { + token = params[params.length - 1] + node.source.end = this.getPosition(token[3] || token[2]) + node.source.end.offset++ + this.spaces = node.raws.between + node.raws.between = '' + } + } else { + node.raws.afterName = '' + node.params = '' + } + + if (open) { + node.nodes = [] + this.current = node + } + } + + checkMissedSemicolon(tokens) { + let colon = this.colon(tokens) + if (colon === false) return + + let founded = 0 + let token + for (let j = colon - 1; j >= 0; j--) { + token = tokens[j] + if (token[0] !== 'space') { + founded += 1 + if (founded === 2) break + } + } + // If the token is a word, e.g. `!important`, `red` or any other valid property's value. + // Then we need to return the colon after that word token. [3] is the "end" colon of that word. + // And because we need it after that one we do +1 to get the next one. + throw this.input.error( + 'Missed semicolon', + token[0] === 'word' ? token[3] + 1 : token[2] + ) + } + + colon(tokens) { + let brackets = 0 + let prev, token, type + for (let [i, element] of tokens.entries()) { + token = element + type = token[0] + + if (type === '(') { + brackets += 1 + } + if (type === ')') { + brackets -= 1 + } + if (brackets === 0 && type === ':') { + if (!prev) { + this.doubleColon(token) + } else if (prev[0] === 'word' && prev[1] === 'progid') { + continue + } else { + return i + } + } + + prev = token + } + return false + } + + comment(token) { + let node = new Comment() + this.init(node, token[2]) + node.source.end = this.getPosition(token[3] || token[2]) + node.source.end.offset++ + + let text = token[1].slice(2, -2) + if (/^\s*$/.test(text)) { + node.text = '' + node.raws.left = text + node.raws.right = '' + } else { + let match = text.match(/^(\s*)([^]*\S)(\s*)$/) + node.text = match[2] + node.raws.left = match[1] + node.raws.right = match[3] + } + } + + createTokenizer() { + this.tokenizer = tokenizer(this.input) + } + + decl(tokens, customProperty) { + let node = new Declaration() + this.init(node, tokens[0][2]) + + let last = tokens[tokens.length - 1] + if (last[0] === ';') { + this.semicolon = true + tokens.pop() + } + + node.source.end = this.getPosition( + last[3] || last[2] || findLastWithPosition(tokens) + ) + node.source.end.offset++ + + while (tokens[0][0] !== 'word') { + if (tokens.length === 1) this.unknownWord(tokens) + node.raws.before += tokens.shift()[1] + } + node.source.start = this.getPosition(tokens[0][2]) + + node.prop = '' + while (tokens.length) { + let type = tokens[0][0] + if (type === ':' || type === 'space' || type === 'comment') { + break + } + node.prop += tokens.shift()[1] + } + + node.raws.between = '' + + let token + while (tokens.length) { + token = tokens.shift() + + if (token[0] === ':') { + node.raws.between += token[1] + break + } else { + if (token[0] === 'word' && /\w/.test(token[1])) { + this.unknownWord([token]) + } + node.raws.between += token[1] + } + } + + if (node.prop[0] === '_' || node.prop[0] === '*') { + node.raws.before += node.prop[0] + node.prop = node.prop.slice(1) + } + + let firstSpaces = [] + let next + while (tokens.length) { + next = tokens[0][0] + if (next !== 'space' && next !== 'comment') break + firstSpaces.push(tokens.shift()) + } + + this.precheckMissedSemicolon(tokens) + + for (let i = tokens.length - 1; i >= 0; i--) { + token = tokens[i] + if (token[1].toLowerCase() === '!important') { + node.important = true + let string = this.stringFrom(tokens, i) + string = this.spacesFromEnd(tokens) + string + if (string !== ' !important') node.raws.important = string + break + } else if (token[1].toLowerCase() === 'important') { + let cache = tokens.slice(0) + let str = '' + for (let j = i; j > 0; j--) { + let type = cache[j][0] + if (str.trim().startsWith('!') && type !== 'space') { + break + } + str = cache.pop()[1] + str + } + if (str.trim().startsWith('!')) { + node.important = true + node.raws.important = str + tokens = cache + } + } + + if (token[0] !== 'space' && token[0] !== 'comment') { + break + } + } + + let hasWord = tokens.some(i => i[0] !== 'space' && i[0] !== 'comment') + + if (hasWord) { + node.raws.between += firstSpaces.map(i => i[1]).join('') + firstSpaces = [] + } + this.raw(node, 'value', firstSpaces.concat(tokens), customProperty) + + if (node.value.includes(':') && !customProperty) { + this.checkMissedSemicolon(tokens) + } + } + + doubleColon(token) { + throw this.input.error( + 'Double colon', + { offset: token[2] }, + { offset: token[2] + token[1].length } + ) + } + + emptyRule(token) { + let node = new Rule() + this.init(node, token[2]) + node.selector = '' + node.raws.between = '' + this.current = node + } + + end(token) { + if (this.current.nodes && this.current.nodes.length) { + this.current.raws.semicolon = this.semicolon + } + this.semicolon = false + + this.current.raws.after = (this.current.raws.after || '') + this.spaces + this.spaces = '' + + if (this.current.parent) { + this.current.source.end = this.getPosition(token[2]) + this.current.source.end.offset++ + this.current = this.current.parent + } else { + this.unexpectedClose(token) + } + } + + endFile() { + if (this.current.parent) this.unclosedBlock() + if (this.current.nodes && this.current.nodes.length) { + this.current.raws.semicolon = this.semicolon + } + this.current.raws.after = (this.current.raws.after || '') + this.spaces + this.root.source.end = this.getPosition(this.tokenizer.position()) + } + + freeSemicolon(token) { + this.spaces += token[1] + if (this.current.nodes) { + let prev = this.current.nodes[this.current.nodes.length - 1] + if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) { + prev.raws.ownSemicolon = this.spaces + this.spaces = '' + prev.source.end = this.getPosition(token[2]) + prev.source.end.offset += prev.raws.ownSemicolon.length + } + } + } + + // Helpers + + getPosition(offset) { + let pos = this.input.fromOffset(offset) + return { + column: pos.col, + line: pos.line, + offset + } + } + + init(node, offset) { + this.current.push(node) + node.source = { + input: this.input, + start: this.getPosition(offset) + } + node.raws.before = this.spaces + this.spaces = '' + if (node.type !== 'comment') this.semicolon = false + } + + other(start) { + let end = false + let type = null + let colon = false + let bracket = null + let brackets = [] + let customProperty = start[1].startsWith('--') + + let tokens = [] + let token = start + while (token) { + type = token[0] + tokens.push(token) + + if (type === '(' || type === '[') { + if (!bracket) bracket = token + brackets.push(type === '(' ? ')' : ']') + } else if (customProperty && colon && type === '{') { + if (!bracket) bracket = token + brackets.push('}') + } else if (brackets.length === 0) { + if (type === ';') { + if (colon) { + this.decl(tokens, customProperty) + return + } else { + break + } + } else if (type === '{') { + this.rule(tokens) + return + } else if (type === '}') { + this.tokenizer.back(tokens.pop()) + end = true + break + } else if (type === ':') { + colon = true + } + } else if (type === brackets[brackets.length - 1]) { + brackets.pop() + if (brackets.length === 0) bracket = null + } + + token = this.tokenizer.nextToken() + } + + if (this.tokenizer.endOfFile()) end = true + if (brackets.length > 0) this.unclosedBracket(bracket) + + if (end && colon) { + if (!customProperty) { + while (tokens.length) { + token = tokens[tokens.length - 1][0] + if (token !== 'space' && token !== 'comment') break + this.tokenizer.back(tokens.pop()) + } + } + this.decl(tokens, customProperty) + } else { + this.unknownWord(tokens) + } + } + + parse() { + let token + while (!this.tokenizer.endOfFile()) { + token = this.tokenizer.nextToken() + + switch (token[0]) { + case 'space': + this.spaces += token[1] + break + + case ';': + this.freeSemicolon(token) + break + + case '}': + this.end(token) + break + + case 'comment': + this.comment(token) + break + + case 'at-word': + this.atrule(token) + break + + case '{': + this.emptyRule(token) + break + + default: + this.other(token) + break + } + } + this.endFile() + } + + precheckMissedSemicolon(/* tokens */) { + // Hook for Safe Parser + } + + raw(node, prop, tokens, customProperty) { + let token, type + let length = tokens.length + let value = '' + let clean = true + let next, prev + + for (let i = 0; i < length; i += 1) { + token = tokens[i] + type = token[0] + if (type === 'space' && i === length - 1 && !customProperty) { + clean = false + } else if (type === 'comment') { + prev = tokens[i - 1] ? tokens[i - 1][0] : 'empty' + next = tokens[i + 1] ? tokens[i + 1][0] : 'empty' + if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) { + if (value.slice(-1) === ',') { + clean = false + } else { + value += token[1] + } + } else { + clean = false + } + } else { + value += token[1] + } + } + if (!clean) { + let raw = tokens.reduce((all, i) => all + i[1], '') + node.raws[prop] = { raw, value } + } + node[prop] = value + } + + rule(tokens) { + tokens.pop() + + let node = new Rule() + this.init(node, tokens[0][2]) + + node.raws.between = this.spacesAndCommentsFromEnd(tokens) + this.raw(node, 'selector', tokens) + this.current = node + } + + spacesAndCommentsFromEnd(tokens) { + let lastTokenType + let spaces = '' + while (tokens.length) { + lastTokenType = tokens[tokens.length - 1][0] + if (lastTokenType !== 'space' && lastTokenType !== 'comment') break + spaces = tokens.pop()[1] + spaces + } + return spaces + } + + // Errors + + spacesAndCommentsFromStart(tokens) { + let next + let spaces = '' + while (tokens.length) { + next = tokens[0][0] + if (next !== 'space' && next !== 'comment') break + spaces += tokens.shift()[1] + } + return spaces + } + + spacesFromEnd(tokens) { + let lastTokenType + let spaces = '' + while (tokens.length) { + lastTokenType = tokens[tokens.length - 1][0] + if (lastTokenType !== 'space') break + spaces = tokens.pop()[1] + spaces + } + return spaces + } + + stringFrom(tokens, from) { + let result = '' + for (let i = from; i < tokens.length; i++) { + result += tokens[i][1] + } + tokens.splice(from, tokens.length - from) + return result + } + + unclosedBlock() { + let pos = this.current.source.start + throw this.input.error('Unclosed block', pos.line, pos.column) + } + + unclosedBracket(bracket) { + throw this.input.error( + 'Unclosed bracket', + { offset: bracket[2] }, + { offset: bracket[2] + 1 } + ) + } + + unexpectedClose(token) { + throw this.input.error( + 'Unexpected }', + { offset: token[2] }, + { offset: token[2] + 1 } + ) + } + + unknownWord(tokens) { + throw this.input.error( + 'Unknown word ' + tokens[0][1], + { offset: tokens[0][2] }, + { offset: tokens[0][2] + tokens[0][1].length } + ) + } + + unnamedAtrule(node, token) { + throw this.input.error( + 'At-rule without name', + { offset: token[2] }, + { offset: token[2] + token[1].length } + ) + } +} + +module.exports = Parser diff --git a/node_modules/postcss/lib/postcss.d.mts b/node_modules/postcss/lib/postcss.d.mts new file mode 100644 index 0000000..d343f3c --- /dev/null +++ b/node_modules/postcss/lib/postcss.d.mts @@ -0,0 +1,69 @@ +export { + // Type-only exports + AcceptedPlugin, + + AnyNode, + atRule, + AtRule, + AtRuleProps, + Builder, + ChildNode, + ChildProps, + comment, + Comment, + CommentProps, + Container, + ContainerProps, + CssSyntaxError, + decl, + Declaration, + DeclarationProps, + // postcss function / namespace + default, + document, + Document, + DocumentProps, + FilePosition, + fromJSON, + Helpers, + Input, + + JSONHydrator, + // This is a class, but it’s not re-exported. That’s why it’s exported as type-only here. + type LazyResult, + list, + Message, + Node, + NodeErrorOptions, + NodeProps, + OldPlugin, + parse, + Parser, + // @ts-expect-error This value exists, but it’s untyped. + plugin, + Plugin, + PluginCreator, + Position, + Postcss, + ProcessOptions, + Processor, + Result, + root, + Root, + RootProps, + rule, + Rule, + RuleProps, + Source, + SourceMap, + SourceMapOptions, + Stringifier, + // Value exports from postcss.mjs + stringify, + Syntax, + TransformCallback, + Transformer, + Warning, + + WarningOptions +} from './postcss.js' diff --git a/node_modules/postcss/lib/postcss.d.ts b/node_modules/postcss/lib/postcss.d.ts new file mode 100644 index 0000000..c5e3605 --- /dev/null +++ b/node_modules/postcss/lib/postcss.d.ts @@ -0,0 +1,458 @@ +import { RawSourceMap, SourceMapGenerator } from 'source-map-js' + +import AtRule, { AtRuleProps } from './at-rule.js' +import Comment, { CommentProps } from './comment.js' +import Container, { ContainerProps, NewChild } from './container.js' +import CssSyntaxError from './css-syntax-error.js' +import Declaration, { DeclarationProps } from './declaration.js' +import Document, { DocumentProps } from './document.js' +import Input, { FilePosition } from './input.js' +import LazyResult from './lazy-result.js' +import list from './list.js' +import Node, { + AnyNode, + ChildNode, + ChildProps, + NodeErrorOptions, + NodeProps, + Position, + Source +} from './node.js' +import Processor from './processor.js' +import Result, { Message } from './result.js' +import Root, { RootProps } from './root.js' +import Rule, { RuleProps } from './rule.js' +import Warning, { WarningOptions } from './warning.js' + +type DocumentProcessor = ( + document: Document, + helper: postcss.Helpers +) => Promise | void +type RootProcessor = ( + root: Root, + helper: postcss.Helpers +) => Promise | void +type DeclarationProcessor = ( + decl: Declaration, + helper: postcss.Helpers +) => Promise | void +type RuleProcessor = ( + rule: Rule, + helper: postcss.Helpers +) => Promise | void +type AtRuleProcessor = ( + atRule: AtRule, + helper: postcss.Helpers +) => Promise | void +type CommentProcessor = ( + comment: Comment, + helper: postcss.Helpers +) => Promise | void + +interface Processors { + /** + * Will be called on all`AtRule` nodes. + * + * Will be called again on node or children changes. + */ + AtRule?: { [name: string]: AtRuleProcessor } | AtRuleProcessor + + /** + * Will be called on all `AtRule` nodes, when all children will be processed. + * + * Will be called again on node or children changes. + */ + AtRuleExit?: { [name: string]: AtRuleProcessor } | AtRuleProcessor + + /** + * Will be called on all `Comment` nodes. + * + * Will be called again on node or children changes. + */ + Comment?: CommentProcessor + + /** + * Will be called on all `Comment` nodes after listeners + * for `Comment` event. + * + * Will be called again on node or children changes. + */ + CommentExit?: CommentProcessor + + /** + * Will be called on all `Declaration` nodes after listeners + * for `Declaration` event. + * + * Will be called again on node or children changes. + */ + Declaration?: { [prop: string]: DeclarationProcessor } | DeclarationProcessor + + /** + * Will be called on all `Declaration` nodes. + * + * Will be called again on node or children changes. + */ + DeclarationExit?: + | { [prop: string]: DeclarationProcessor } + | DeclarationProcessor + + /** + * Will be called on `Document` node. + * + * Will be called again on children changes. + */ + Document?: DocumentProcessor + + /** + * Will be called on `Document` node, when all children will be processed. + * + * Will be called again on children changes. + */ + DocumentExit?: DocumentProcessor + + /** + * Will be called on `Root` node once. + */ + Once?: RootProcessor + + /** + * Will be called on `Root` node once, when all children will be processed. + */ + OnceExit?: RootProcessor + + /** + * Will be called on `Root` node. + * + * Will be called again on children changes. + */ + Root?: RootProcessor + + /** + * Will be called on `Root` node, when all children will be processed. + * + * Will be called again on children changes. + */ + RootExit?: RootProcessor + + /** + * Will be called on all `Rule` nodes. + * + * Will be called again on node or children changes. + */ + Rule?: RuleProcessor + + /** + * Will be called on all `Rule` nodes, when all children will be processed. + * + * Will be called again on node or children changes. + */ + RuleExit?: RuleProcessor +} + +declare namespace postcss { + export { + AnyNode, + AtRule, + AtRuleProps, + ChildNode, + ChildProps, + Comment, + CommentProps, + Container, + ContainerProps, + CssSyntaxError, + Declaration, + DeclarationProps, + Document, + DocumentProps, + FilePosition, + Input, + LazyResult, + list, + Message, + NewChild, + Node, + NodeErrorOptions, + NodeProps, + Position, + Processor, + Result, + Root, + RootProps, + Rule, + RuleProps, + Source, + Warning, + WarningOptions + } + + export type SourceMap = { + toJSON(): RawSourceMap + } & SourceMapGenerator + + export type Helpers = { postcss: Postcss; result: Result } & Postcss + + export interface Plugin extends Processors { + postcssPlugin: string + prepare?: (result: Result) => Processors + } + + export interface PluginCreator { + (opts?: PluginOptions): Plugin | Processor + postcss: true + } + + export interface Transformer extends TransformCallback { + postcssPlugin: string + postcssVersion: string + } + + export interface TransformCallback { + (root: Root, result: Result): Promise | void + } + + export interface OldPlugin extends Transformer { + (opts?: T): Transformer + postcss: Transformer + } + + export type AcceptedPlugin = + | { + postcss: Processor | TransformCallback + } + | OldPlugin + | Plugin + | PluginCreator + | Processor + | TransformCallback + + export interface Parser { + ( + css: { toString(): string } | string, + opts?: Pick + ): RootNode + } + + export interface Builder { + (part: string, node?: AnyNode, type?: 'end' | 'start'): void + } + + export interface Stringifier { + (node: AnyNode, builder: Builder): void + } + + export interface JSONHydrator { + (data: object): Node + (data: object[]): Node[] + } + + export interface Syntax { + /** + * Function to generate AST by string. + */ + parse?: Parser + + /** + * Class to generate string by AST. + */ + stringify?: Stringifier + } + + export interface SourceMapOptions { + /** + * Use absolute path in generated source map. + */ + absolute?: boolean + + /** + * Indicates that PostCSS should add annotation comments to the CSS. + * By default, PostCSS will always add a comment with a path + * to the source map. PostCSS will not add annotations to CSS files + * that do not contain any comments. + * + * By default, PostCSS presumes that you want to save the source map as + * `opts.to + '.map'` and will use this path in the annotation comment. + * A different path can be set by providing a string value for annotation. + * + * If you have set `inline: true`, annotation cannot be disabled. + */ + annotation?: ((file: string, root: Root) => string) | boolean | string + + /** + * Override `from` in map’s sources. + */ + from?: string + + /** + * Indicates that the source map should be embedded in the output CSS + * as a Base64-encoded comment. By default, it is `true`. + * But if all previous maps are external, not inline, PostCSS will not embed + * the map even if you do not set this option. + * + * If you have an inline source map, the result.map property will be empty, + * as the source map will be contained within the text of `result.css`. + */ + inline?: boolean + + /** + * Source map content from a previous processing step (e.g., Sass). + * + * PostCSS will try to read the previous source map + * automatically (based on comments within the source CSS), but you can use + * this option to identify it manually. + * + * If desired, you can omit the previous map with prev: `false`. + */ + prev?: ((file: string) => string) | boolean | object | string + + /** + * Indicates that PostCSS should set the origin content (e.g., Sass source) + * of the source map. By default, it is true. But if all previous maps do not + * contain sources content, PostCSS will also leave it out even if you + * do not set this option. + */ + sourcesContent?: boolean + } + + export interface ProcessOptions { + /** + * Input file if it is not simple CSS file, but HTML with "||t==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},e}(),ao=function(){function e(t,r){r===void 0&&(r={}),this.options=r,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new ur(this,t,r.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},e.prototype.tokenizePart=function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var t=this.token;if(t===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return t;for(var r=0;r\xa0]/u,So=new RegExp(oi.source,"gu");var gr=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function li(e){var t;return gr.has(e.toLowerCase())&&((t=e[0])==null?void 0:t.toLowerCase())===e[0]}function ce(e){return!!e&&e.length>0}function Cr(e){return e.length===0?void 0:e[e.length-1]}function ci(e){return e.length===0?void 0:e[0]}var pt=Object.freeze({line:1,column:0}),ui=Object.freeze({source:"(synthetic)",start:pt,end:pt}),br=Object.freeze({source:"(nonexistent)",start:pt,end:pt}),ht=Object.freeze({source:"(broken)",start:pt,end:pt}),yr=class{constructor(t){this._whens=t}first(t){for(let r of this._whens){let s=r.match(t);if(ce(s))return s[0]}return null}},xe=class{get(t,r){let s=this._map.get(t);return s||(s=r(),this._map.set(t,s),s)}add(t,r){this._map.set(t,r)}match(t){let r=function(a){switch(a){case"Broken":case"InternalsSynthetic":case"NonExistent":return"IS_INVISIBLE";default:return a}}(t),s=[],n=this._map.get(r),i=this._map.get("MATCH_ANY");return n&&s.push(n),i&&s.push(i),s}constructor(){this._map=new Map}};function _s(e){return e(new kr).validate()}var kr=class{validate(){return(t,r)=>this.matchFor(t.kind,r.kind)(t,r)}matchFor(t,r){let s=this._whens.match(t);return ce(),new yr(s).first(r)}when(t,r,s){return this._whens.get(t,()=>new xe).add(r,s),this}constructor(){this._whens=new xe}},Sr=class e{static synthetic(t){let r=D.synthetic(t);return new e({loc:r,chars:t})}static load(t,r){return new e({loc:D.load(t,r[1]),chars:r[0]})}constructor(t){this.loc=t.loc,this.chars=t.chars}getString(){return this.chars}serialize(){return[this.chars,this.loc.serialize()]}},D=class e{static get NON_EXISTENT(){return new et("NonExistent",br).wrap()}static load(t,r){return typeof r=="number"?e.forCharPositions(t,r,r):typeof r=="string"?e.synthetic(r):Array.isArray(r)?e.forCharPositions(t,r[0],r[1]):r==="NonExistent"?e.NON_EXISTENT:r==="Broken"?e.broken(ht):void ds(r)}static forHbsLoc(t,r){let s=new mt(t,r.start),n=new mt(t,r.end);return new oe(t,{start:s,end:n},r).wrap()}static forCharPositions(t,r,s){let n=new Tt(t,r),i=new Tt(t,s);return new ae(t,{start:n,end:i}).wrap()}static synthetic(t){return new et("InternalsSynthetic",br,t).wrap()}static broken(t=ht){return new et("Broken",t).wrap()}constructor(t){var r;this.data=t,this.isInvisible=(r=t.kind)!=="CharPosition"&&r!=="HbsPosition"}getStart(){return this.data.getStart().wrap()}getEnd(){return this.data.getEnd().wrap()}get loc(){let t=this.data.toHbsSpan();return t===null?ht:t.toHbsLoc()}get module(){return this.data.getModule()}get startPosition(){return this.loc.start}get endPosition(){return this.loc.end}toJSON(){return this.loc}withStart(t){return J(t.data,this.data.getEnd())}withEnd(t){return J(this.data.getStart(),t.data)}asString(){return this.data.asString()}toSlice(t){let r=this.data.asString();return Ds&&t!==void 0&&r!==t&&console.warn(`unexpectedly found ${JSON.stringify(r)} when slicing source, but expected ${JSON.stringify(t)}`),new Sr({loc:this,chars:t||r})}get start(){return this.loc.start}set start(t){this.data.locDidUpdate({start:t})}get end(){return this.loc.end}set end(t){this.data.locDidUpdate({end:t})}get source(){return this.module}collapse(t){switch(t){case"start":return this.getStart().collapsed();case"end":return this.getEnd().collapsed()}}extend(t){return J(this.data.getStart(),t.data.getEnd())}serialize(){return this.data.serialize()}slice({skipStart:t=0,skipEnd:r=0}){return J(this.getStart().move(t).data,this.getEnd().move(-r).data)}sliceStartChars({skipStart:t=0,chars:r}){return J(this.getStart().move(t).data,this.getStart().move(t+r).data)}sliceEndChars({skipEnd:t=0,chars:r}){return J(this.getEnd().move(t-r).data,this.getStart().move(-t).data)}},Ut,ae=class{constructor(t,r){Lt(this,Ut);this.source=t,this.charPositions=r,this.kind="CharPosition",Y(this,Ut,null)}wrap(){return new D(this)}asString(){return this.source.slice(this.charPositions.start.charPos,this.charPositions.end.charPos)}getModule(){return this.source.module}getStart(){return this.charPositions.start}getEnd(){return this.charPositions.end}locDidUpdate(){}toHbsSpan(){let t=I(this,Ut);if(t===null){let r=this.charPositions.start.toHbsPos(),s=this.charPositions.end.toHbsPos();t=Y(this,Ut,r===null||s===null?ft:new oe(this.source,{start:r,end:s}))}return t===ft?null:t}serialize(){let{start:{charPos:t},end:{charPos:r}}=this.charPositions;return t===r?t:[t,r]}toCharPosSpan(){return this}};Ut=new WeakMap;var ut,Et,oe=class{constructor(t,r,s=null){Lt(this,ut);Lt(this,Et);this.source=t,this.hbsPositions=r,this.kind="HbsPosition",Y(this,ut,null),Y(this,Et,s)}serialize(){let t=this.toCharPosSpan();return t===null?"Broken":t.wrap().serialize()}wrap(){return new D(this)}updateProvided(t,r){I(this,Et)&&(I(this,Et)[r]=t),Y(this,ut,null),Y(this,Et,{start:t,end:t})}locDidUpdate({start:t,end:r}){t!==void 0&&(this.updateProvided(t,"start"),this.hbsPositions.start=new mt(this.source,t,null)),r!==void 0&&(this.updateProvided(r,"end"),this.hbsPositions.end=new mt(this.source,r,null))}asString(){let t=this.toCharPosSpan();return t===null?"":t.asString()}getModule(){return this.source.module}getStart(){return this.hbsPositions.start}getEnd(){return this.hbsPositions.end}toHbsLoc(){return{start:this.hbsPositions.start.hbsPos,end:this.hbsPositions.end.hbsPos}}toHbsSpan(){return this}toCharPosSpan(){let t=I(this,ut);if(t===null){let r=this.hbsPositions.start.toCharPos(),s=this.hbsPositions.end.toCharPos();if(!r||!s)return t=Y(this,ut,ft),null;t=Y(this,ut,new ae(this.source,{start:r,end:s}))}return t===ft?null:t}};ut=new WeakMap,Et=new WeakMap;var et=class{constructor(t,r,s=null){this.kind=t,this.loc=r,this.string=s}serialize(){switch(this.kind){case"Broken":case"NonExistent":return this.kind;case"InternalsSynthetic":return this.string||""}}wrap(){return new D(this)}asString(){return this.string||""}locDidUpdate({start:t,end:r}){t!==void 0&&(this.loc.start=t),r!==void 0&&(this.loc.end=r)}getModule(){return"an unknown module"}getStart(){return new le(this.kind,this.loc.start)}getEnd(){return new le(this.kind,this.loc.end)}toCharPosSpan(){return this}toHbsSpan(){return null}toHbsLoc(){return ht}},J=_s(e=>e.when("HbsPosition","HbsPosition",(t,r)=>new oe(t.source,{start:t,end:r}).wrap()).when("CharPosition","CharPosition",(t,r)=>new ae(t.source,{start:t,end:r}).wrap()).when("CharPosition","HbsPosition",(t,r)=>{let s=r.toCharPos();return s===null?new et("Broken",ht).wrap():J(t,s)}).when("HbsPosition","CharPosition",(t,r)=>{let s=t.toCharPos();return s===null?new et("Broken",ht).wrap():J(s,r)}).when("IS_INVISIBLE","MATCH_ANY",t=>new et(t.kind,ht).wrap()).when("MATCH_ANY","IS_INVISIBLE",(t,r)=>new et(r.kind,ht).wrap())),ft="BROKEN",Mt=class e{static forHbsPos(t,r){return new mt(t,r,null).wrap()}static broken(t=pt){return new le("Broken",t).wrap()}constructor(t){this.data=t}get offset(){let t=this.data.toCharPos();return t===null?null:t.offset}eql(t){return hi(this.data,t.data)}until(t){return J(this.data,t.data)}move(t){let r=this.data.toCharPos();if(r===null)return e.broken();{let s=r.offset+t;return r.source.validate(s)?new Tt(r.source,s).wrap():e.broken()}}collapsed(){return J(this.data,this.data)}toJSON(){return this.data.toJSON()}},Tt=class{constructor(t,r){this.source=t,this.charPos=r,this.kind="CharPosition",this._locPos=null}toCharPos(){return this}toJSON(){let t=this.toHbsPos();return t===null?pt:t.toJSON()}wrap(){return new Mt(this)}get offset(){return this.charPos}toHbsPos(){let t=this._locPos;if(t===null){let r=this.source.hbsPosFor(this.charPos);this._locPos=t=r===null?ft:new mt(this.source,r,this.charPos)}return t===ft?null:t}},mt=class{constructor(t,r,s=null){this.source=t,this.hbsPos=r,this.kind="HbsPosition",this._charPos=s===null?null:new Tt(t,s)}toCharPos(){let t=this._charPos;if(t===null){let r=this.source.charPosFor(this.hbsPos);this._charPos=t=r===null?ft:new Tt(this.source,r)}return t===ft?null:t}toJSON(){return this.hbsPos}wrap(){return new Mt(this)}toHbsPos(){return this}},le=class{constructor(t,r){this.kind=t,this.pos=r}toCharPos(){return null}toJSON(){return this.pos}wrap(){return new Mt(this)}get offset(){return null}},hi=_s(e=>e.when("HbsPosition","HbsPosition",({hbsPos:t},{hbsPos:r})=>t.column===r.column&&t.line===r.line).when("CharPosition","CharPosition",({charPos:t},{charPos:r})=>t===r).when("CharPosition","HbsPosition",({offset:t},r)=>{var s;return t===((s=r.toCharPos())==null?void 0:s.offset)}).when("HbsPosition","CharPosition",(t,{offset:r})=>{var s;return((s=t.toCharPos())==null?void 0:s.offset)===r}).when("MATCH_ANY","MATCH_ANY",()=>!1)),wt=class e{static from(t,r={}){var s;return new e(t,(s=r.meta)==null?void 0:s.moduleName)}constructor(t,r="an unknown module"){this.source=t,this.module=r}validate(t){return t>=0&&t<=this.source.length}slice(t,r){return this.source.slice(t,r)}offsetFor(t,r){return Mt.forHbsPos(this,{line:t,column:r})}spanFor({start:t,end:r}){return D.forHbsLoc(this,{start:{line:t.line,column:t.column},end:{line:r.line,column:r.column}})}hbsPosFor(t){let r=0,s=0;if(t>this.source.length)return null;for(;;){let n=this.source.indexOf(` +`,s);if(t<=n||n===-1)return{line:r+1,column:t-s};r+=1,s=n+1}}charPosFor(t){let{line:r,column:s}=t,n=this.source.length,i=0,a=0;for(;ao)return o;if(Ds){let c=this.hbsPosFor(a+s);c.line,c.column}return a+s}if(o===-1)return 0;i+=1,a=o+1}return n}};function v(e,t){let{module:r,loc:s}=t,{line:n,column:i}=s.start,a=t.asString(),o=a?` + +| +| ${a.split(` +`).join(` +| `)} +| + +`:"",c=new Error(`${e}: ${o}(error occurred in '${r}' @ line ${n} : column ${i})`);return c.name="SyntaxError",c.location=t,c.code=a,c}var pi={Template:["body"],Block:["body"],MustacheStatement:["path","params","hash"],BlockStatement:["path","params","hash","program","inverse"],ElementModifierStatement:["path","params","hash"],CommentStatement:[],MustacheCommentStatement:[],ElementNode:["attributes","modifiers","children","comments"],AttrNode:["value"],TextNode:[],ConcatStatement:["parts"],SubExpression:["path","params","hash"],PathExpression:[],StringLiteral:[],BooleanLiteral:[],NumberLiteral:[],NullLiteral:[],UndefinedLiteral:[],Hash:["pairs"],HashPair:["value"]},Pr=function(){function e(t,r,s,n){let i=Error.call(this,t);this.key=n,this.message=t,this.node=r,this.parent=s,i.stack&&(this.stack=i.stack)}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}();function Ts(e,t,r){return new Pr("Cannot remove a node unless it is part of an array",e,t,r)}function fi(e,t,r){return new Pr("Cannot replace a node with multiple nodes unless it is part of an array",e,t,r)}function Ns(e,t){return new Pr("Replacing and removing in key handlers is not yet supported.",e,null,t)}var zt=class{constructor(t,r=null,s=null){this.node=t,this.parent=r,this.parentKey=s}get parentNode(){return this.parent?this.parent.node:null}parents(){return{[Symbol.iterator]:()=>new vr(this)}}},vr=class{constructor(t){this.path=t}next(){return this.path.parent?(this.path=this.path.parent,{done:!1,value:this.path}):{done:!0,value:null}}};function Os(e){return typeof e=="function"?e:e.enter}function Bs(e){return typeof e=="function"?void 0:e.exit}function Ae(e,t){let r,s,n,{node:i,parent:a,parentKey:o}=t,c=function(h,p){if(h.Program&&(p==="Template"&&!h.Template||p==="Block"&&!h.Block))return h.Program;let m=h[p];return m!==void 0?m:h.All}(e,i.type);if(c!==void 0&&(r=Os(c),s=Bs(c)),r!==void 0&&(n=r(i,t)),n!=null){if(JSON.stringify(i)!==JSON.stringify(n))return Array.isArray(n)?(Is(e,n,a,o),n):Ae(e,new zt(n,a,o))||n;n=void 0}if(n===void 0){let h=pi[i.type];for(let p=0;ptypeof t=="string"?f.var({name:t,loc:D.synthetic(t)}):t)}function xs(e=[],t=[],r=!1,s){return f.blockItself({body:e,params:qs(t),chained:r,loc:T(s||null)})}function As(e=[],t=[],r){return f.template({body:e,blockParams:t,loc:T(r||null)})}function T(...e){if(e.length===1){let t=e[0];return t&&typeof t=="object"?D.forHbsLoc(pr(),t):D.forHbsLoc(pr(),ui)}{let[t,r,s,n,i]=e,a=i?new wt("",i):pr();return D.forHbsLoc(a,{start:{line:t,column:r},end:{line:s||t,column:n||r}})}}var bi={mustache:function(e,t=[],r=ie([]),s=!1,n,i){return f.mustache({path:ct(e),params:t,hash:r,trusting:s,strip:i,loc:T(n||null)})},block:function(e,t,r,s,n=null,i,a,o,c){let h,p=null;return h=s.type==="Template"?f.blockItself({params:qs(s.blockParams),body:s.body,loc:s.loc}):s,(n==null?void 0:n.type)==="Template"?(n.blockParams.length,p=f.blockItself({params:[],body:n.body,loc:n.loc})):p=n,f.block({path:ct(e),params:t||[],hash:r||ie([]),defaultBlock:h,elseBlock:p,loc:T(i||null),openStrip:a,inverseStrip:o,closeStrip:c})},comment:function(e,t){return f.comment({value:e,loc:T(t||null)})},mustacheComment:function(e,t){return f.mustacheComment({value:e,loc:T(t||null)})},element:function(e,t={}){let r,s,{attrs:n,blockParams:i,modifiers:a,comments:o,children:c,openTag:h,closeTag:p,loc:m}=t;typeof e=="string"?e.endsWith("/")?(r=ct(e.slice(0,-1)),s=!0):r=ct(e):"type"in e?(e.type,e.type,r=e):"path"in e?(e.path.type,e.path.type,r=e.path,s=e.selfClosing):(r=ct(e.name),s=e.selfClosing);let S=i==null?void 0:i.map(E=>typeof E=="string"?Ps(E):E),y=null;return p?y=T(p):p===void 0&&(y=s||li(r.original)?null:T(null)),f.element({path:r,selfClosing:s||!1,attributes:n||[],params:S||[],modifiers:a||[],comments:o||[],children:c||[],openTag:T(h||null),closeTag:y,loc:T(m||null)})},elementModifier:function(e,t,r,s){return f.elementModifier({path:ct(e),params:t||[],hash:r||ie([]),loc:T(s||null)})},attr:function(e,t,r){return f.attr({name:e,value:t,loc:T(r||null)})},text:function(e="",t){return f.text({chars:e,loc:T(t||null)})},sexpr:function(e,t=[],r=ie([]),s){return f.sexpr({path:ct(e),params:t,hash:r,loc:T(s||null)})},concat:function(e,t){if(!ce(e))throw new Error("b.concat requires at least one part");return f.concat({parts:e,loc:T(t||null)})},hash:ie,pair:function(e,t,r){return f.pair({key:e,value:t,loc:T(r||null)})},literal:Pe,program:function(e,t,r){return t&&t.length?xs(e,t,!1,r):As(e,[],r)},blockItself:xs,template:As,loc:T,pos:function(e,t){return f.pos({line:e,column:t})},path:ct,fullPath:function(e,t=[],r){return f.path({head:e,tail:t,loc:T(r||null)})},head:function(e,t){return f.head({original:e,loc:T(t||null)})},at:function(e,t){return f.atName({name:e,loc:T(t||null)})},var:Ps,this:function(e){return f.this({loc:T(e||null)})},string:fr("StringLiteral"),boolean:fr("BooleanLiteral"),number:fr("NumberLiteral"),undefined:()=>Pe("UndefinedLiteral",void 0),null:()=>Pe("NullLiteral",null)};function fr(e){return function(t,r){return Pe(e,t,r)}}var Ce={close:!1,open:!1},f=new class{pos({line:e,column:t}){return{line:e,column:t}}blockItself({body:e,params:t,chained:r=!1,loc:s}){return{type:"Block",body:e,params:t,get blockParams(){return this.params.map(n=>n.name)},set blockParams(n){this.params=n.map(i=>f.var({name:i,loc:D.synthetic(i)}))},chained:r,loc:s}}template({body:e,blockParams:t,loc:r}){return{type:"Template",body:e,blockParams:t,loc:r}}mustache({path:e,params:t,hash:r,trusting:s,loc:n,strip:i=Ce}){return function({path:a,params:o,hash:c,trusting:h,strip:p,loc:m}){let S={type:"MustacheStatement",path:a,params:o,hash:c,trusting:h,strip:p,loc:m};return Object.defineProperty(S,"escaped",{enumerable:!1,get(){return!this.trusting},set(y){this.trusting=!y}}),S}({path:e,params:t,hash:r,trusting:s,strip:i,loc:n})}block({path:e,params:t,hash:r,defaultBlock:s,elseBlock:n=null,loc:i,openStrip:a=Ce,inverseStrip:o=Ce,closeStrip:c=Ce}){return{type:"BlockStatement",path:e,params:t,hash:r,program:s,inverse:n,loc:i,openStrip:a,inverseStrip:o,closeStrip:c}}comment({value:e,loc:t}){return{type:"CommentStatement",value:e,loc:t}}mustacheComment({value:e,loc:t}){return{type:"MustacheCommentStatement",value:e,loc:t}}concat({parts:e,loc:t}){return{type:"ConcatStatement",parts:e,loc:t}}element({path:e,selfClosing:t,attributes:r,modifiers:s,params:n,comments:i,children:a,openTag:o,closeTag:c,loc:h}){let p=t;return{type:"ElementNode",path:e,attributes:r,modifiers:s,params:n,comments:i,children:a,openTag:o,closeTag:c,loc:h,get tag(){return this.path.original},set tag(m){this.path.original=m},get blockParams(){return this.params.map(m=>m.name)},set blockParams(m){this.params=m.map(S=>f.var({name:S,loc:D.synthetic(S)}))},get selfClosing(){return p},set selfClosing(m){p=m,this.closeTag=m?null:D.synthetic(``)}}}elementModifier({path:e,params:t,hash:r,loc:s}){return{type:"ElementModifierStatement",path:e,params:t,hash:r,loc:s}}attr({name:e,value:t,loc:r}){return{type:"AttrNode",name:e,value:t,loc:r}}text({chars:e,loc:t}){return{type:"TextNode",chars:e,loc:t}}sexpr({path:e,params:t,hash:r,loc:s}){return{type:"SubExpression",path:e,params:t,hash:r,loc:s}}path({head:e,tail:t,loc:r}){return function({head:s,tail:n,loc:i}){let a={type:"PathExpression",head:s,tail:n,get original(){return[this.head.original,...this.tail].join(".")},set original(o){let[c,...h]=o.split(".");this.head=bi.head(c,this.head.loc),this.tail=h},loc:i};return Object.defineProperty(a,"parts",{enumerable:!1,get(){let o=this.original.split(".");return o[0]==="this"?o.shift():o[0].startsWith("@")&&(o[0]=o[0].slice(1)),Object.freeze(o)},set(o){var h;let c=[...o];c[0]==="this"||(h=c[0])!=null&&h.startsWith("@")||(this.head.type==="ThisHead"?c.unshift("this"):this.head.type==="AtHead"&&(c[0]=`@${c[0]}`)),this.original=c.join(".")}}),Object.defineProperty(a,"this",{enumerable:!1,get(){return this.head.type==="ThisHead"}}),Object.defineProperty(a,"data",{enumerable:!1,get(){return this.head.type==="AtHead"}}),a}({head:e,tail:t,loc:r})}head({original:e,loc:t}){return e==="this"?this.this({loc:t}):e[0]==="@"?this.atName({name:e,loc:t}):this.var({name:e,loc:t})}this({loc:e}){return{type:"ThisHead",get original(){return"this"},loc:e}}atName({name:e,loc:t}){let r="",s={type:"AtHead",get name(){return r},set name(n){n[0],n.indexOf("."),r=n},get original(){return this.name},set original(n){this.name=n},loc:t};return s.name=e,s}var({name:e,loc:t}){let r="",s={type:"VarHead",get name(){return r},set name(n){n[0],n.indexOf("."),r=n},get original(){return this.name},set original(n){this.name=n},loc:t};return s.name=e,s}hash({pairs:e,loc:t}){return{type:"Hash",pairs:e,loc:t}}pair({key:e,value:t,loc:r}){return{type:"HashPair",key:e,value:t,loc:r}}literal({type:e,value:t,loc:r}){return function({type:s,value:n,loc:i}){let a={type:s,value:n,loc:i};return Object.defineProperty(a,"original",{enumerable:!1,get(){return this.value},set(o){this.value=o}}),a}({type:e,value:t,loc:r})}},Er=class{constructor(t,r=new cr(Es),s="precompile"){this.elementStack=[],this.currentAttribute=null,this.currentNode=null,this.source=t,this.lines=t.source.split(/\r\n?|\n/u),this.tokenizer=new ur(this,r,s)}offset(){let{line:t,column:r}=this.tokenizer;return this.source.offsetFor(t,r)}pos({line:t,column:r}){return this.source.offsetFor(t,r)}finish(t){return er({},t,{loc:t.start.until(this.offset())})}get currentAttr(){return this.currentAttribute}get currentTag(){let t=this.currentNode;return t&&(t.type==="StartTag"||t.type),t}get currentStartTag(){let t=this.currentNode;return t&&t.type,t}get currentEndTag(){let t=this.currentNode;return t&&t.type,t}get currentComment(){let t=this.currentNode;return t&&t.type,t}get currentData(){let t=this.currentNode;return t&&t.type,t}acceptNode(t){return this[t.type](t)}currentElement(){return Cr(this.elementStack)}sourceForNode(t,r){let s,n,i,a=t.loc.start.line-1,o=a-1,c=t.loc.start.column,h=[];for(r?(n=r.loc.end.line-1,i=r.loc.end.column):(n=t.loc.end.line-1,i=t.loc.end.column);o=C?-1:y.indexOf(P,E),w===-1||w+P.length>C?(E=C,U=this.source.spanFor(br)):(E=w,U=S.sliceStartChars({skipStart:E,chars:P.length}),E+=P.length),o.push(f.var({name:P,loc:U}))}}else a=Ls(this.source,t,i);let c=this.Program(a.program,o),h=a.inverse?this.Program(a.inverse,[]):null,p=f.block({path:r,params:s,hash:n,defaultBlock:c,elseBlock:h,loc:this.source.spanFor(t.loc),openStrip:t.openStrip,inverseStrip:t.inverseStrip,closeStrip:t.closeStrip});Ht(this.currentElement(),p)}MustacheStatement(t){var o;(o=this.pendingError)==null||o.mustache(this.source.spanFor(t.loc));let{tokenizer:r}=this;if(r.state==="comment")return void this.appendToCommentData(this.sourceForNode(t));let s,{escaped:n,loc:i,strip:a}=t;if("original"in t.path&&t.path.original==="...attributes")throw v("Illegal use of ...attributes",this.source.spanFor(t.loc));if(Rs(t.path))s=f.mustache({path:this.acceptNode(t.path),params:[],hash:f.hash({pairs:[],loc:this.source.spanFor(t.path.loc).collapse("end")}),trusting:!n,loc:this.source.spanFor(i),strip:a});else{let{path:c,params:h,hash:p}=mr(this,t);s=f.mustache({path:c,params:h,hash:p,trusting:!n,loc:this.source.spanFor(i),strip:a})}switch(r.state){case"tagOpen":case"tagName":throw v("Cannot use mustaches in an elements tagname",s.loc);case"beforeAttributeName":dr(this.currentStartTag,s);break;case"attributeName":case"afterAttributeName":this.beginAttributeValue(!1),this.finishAttributeValue(),dr(this.currentStartTag,s),r.transitionTo("beforeAttributeName");break;case"afterAttributeValueQuoted":dr(this.currentStartTag,s),r.transitionTo("beforeAttributeName");break;case"beforeAttributeValue":this.beginAttributeValue(!1),this.appendDynamicAttributeValuePart(s),r.transitionTo("attributeValueUnquoted");break;case"attributeValueDoubleQuoted":case"attributeValueSingleQuoted":case"attributeValueUnquoted":this.appendDynamicAttributeValuePart(s);break;default:Ht(this.currentElement(),s)}return s}appendDynamicAttributeValuePart(t){this.finalizeTextPart();let r=this.currentAttr;r.isDynamic=!0,r.parts.push(t)}finalizeTextPart(){let t=this.currentAttr.currentPart;t!==null&&(this.currentAttr.parts.push(t),this.startTextPart())}startTextPart(){this.currentAttr.currentPart=null}ContentStatement(t){(function(r,s){let n=s.loc.start.line,i=s.loc.start.column,a=function(o,c){if(c==="")return{lines:o.split(` +`).length-1,columns:0};let[h]=o.split(c),p=h.split(/\n/u),m=p.length-1;return{lines:m,columns:p[m].length}}(s.original,s.value);n+=a.lines,a.lines?i=a.columns:i+=a.columns,r.line=n,r.column=i})(this.tokenizer,t),this.tokenizer.tokenizePart(t.value),this.tokenizer.flushData()}CommentStatement(t){let{tokenizer:r}=this;if(r.state==="comment")return this.appendToCommentData(this.sourceForNode(t)),null;let{value:s,loc:n}=t,i=f.mustacheComment({value:s,loc:this.source.spanFor(n)});switch(r.state){case"beforeAttributeName":case"afterAttributeName":this.currentStartTag.comments.push(i);break;case"beforeData":case"data":Ht(this.currentElement(),i);break;default:throw v(`Using a Handlebars comment when in the \`${r.state}\` state is not supported`,this.source.spanFor(t.loc))}return i}PartialStatement(t){throw v("Handlebars partials are not supported",this.source.spanFor(t.loc))}PartialBlockStatement(t){throw v("Handlebars partial blocks are not supported",this.source.spanFor(t.loc))}Decorator(t){throw v("Handlebars decorators are not supported",this.source.spanFor(t.loc))}DecoratorBlock(t){throw v("Handlebars decorator blocks are not supported",this.source.spanFor(t.loc))}SubExpression(t){let{path:r,params:s,hash:n}=mr(this,t);return f.sexpr({path:r,params:s,hash:n,loc:this.source.spanFor(t.loc)})}PathExpression(t){let{original:r}=t,s;if(r.indexOf("/")!==-1){if(r.slice(0,2)==="./")throw v('Using "./" is not supported in Glimmer and unnecessary',this.source.spanFor(t.loc));if(r.slice(0,3)==="../")throw v('Changing context using "../" is not supported in Glimmer',this.source.spanFor(t.loc));if(r.indexOf(".")!==-1)throw v("Mixing '.' and '/' in paths is not supported in Glimmer; use only '.' to separate property paths",this.source.spanFor(t.loc));s=[t.parts.join("/")]}else{if(r===".")throw v("'.' is not a supported path in Glimmer; check for a path with a trailing '.'",this.source.spanFor(t.loc));s=t.parts}let n,i=!1;if(/^this(?:\..+)?$/u.test(r)&&(i=!0),i)n=f.this({loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+4}})});else if(t.data){let a=s.shift();if(a===void 0)throw v("Attempted to parse a path expression, but it was not valid. Paths beginning with @ must start with a-z.",this.source.spanFor(t.loc));n=f.atName({name:`@${a}`,loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+a.length+1}})})}else{let a=s.shift();if(a===void 0)throw v("Attempted to parse a path expression, but it was not valid. Paths must start with a-z or A-Z.",this.source.spanFor(t.loc));n=f.var({name:a,loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+a.length}})})}return f.path({head:n,tail:s,loc:this.source.spanFor(t.loc)})}Hash(t){let r=t.pairs.map(s=>f.pair({key:s.key,value:this.acceptNode(s.value),loc:this.source.spanFor(s.loc)}));return f.hash({pairs:r,loc:this.source.spanFor(t.loc)})}StringLiteral(t){return f.literal({type:"StringLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}BooleanLiteral(t){return f.literal({type:"BooleanLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}NumberLiteral(t){return f.literal({type:"NumberLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}UndefinedLiteral(t){return f.literal({type:"UndefinedLiteral",value:void 0,loc:this.source.spanFor(t.loc)})}NullLiteral(t){return f.literal({type:"NullLiteral",value:null,loc:this.source.spanFor(t.loc)})}constructor(...t){super(...t),this.pendingError=null}};function mr(e,t){let r;switch(t.path.type){case"PathExpression":r=e.PathExpression(t.path);break;case"SubExpression":r=e.SubExpression(t.path);break;case"StringLiteral":case"UndefinedLiteral":case"NullLiteral":case"NumberLiteral":case"BooleanLiteral":{let i;throw i=t.path.type==="BooleanLiteral"?t.path.original.toString():t.path.type==="StringLiteral"?`"${t.path.original}"`:t.path.type==="NullLiteral"?"null":t.path.type==="NumberLiteral"?t.path.value.toString():"undefined",v(`${t.path.type} "${t.path.type==="StringLiteral"?t.path.original:i}" cannot be called as a sub-expression, replace (${i}) with ${i}`,e.source.spanFor(t.path.loc))}}let s=t.params.map(i=>e.acceptNode(i)),n=ce(s)?Cr(s).loc:r.loc;return{path:r,params:s,hash:t.hash?e.Hash(t.hash):f.hash({pairs:[],loc:e.source.spanFor(n).collapse("end")})}}function dr(e,t){let{path:r,params:s,hash:n,loc:i}=t;if(Rs(r)){let o=`{{${function(c){return c.type==="UndefinedLiteral"?"undefined":JSON.stringify(c.value)}(r)}}}`;throw v(`In <${e.name} ... ${o} ..., ${o} is not a valid modifier`,t.loc)}let a=f.elementModifier({path:r,params:s,hash:n,loc:i});e.modifiers.push(a)}function Ls(e,t,r){if(!t.program.loc){let n=G(!1,t.program.body,0),i=G(!1,t.program.body,-1);if(n&&i)t.program.loc={...n.loc,end:i.loc.end};else{let a=e.spanFor(t.loc);t.program.loc=r.withEnd(a.getEnd())}}let s=e.spanFor(t.program.loc).getEnd();return t.inverse&&!t.inverse.loc&&(t.inverse.loc=s.collapsed()),t}function Ft(e){return/[\t\n\f ]/u.test(e)}var Tr=class extends wr{reset(){this.currentNode=null}beginComment(){this.currentNode={type:"CommentStatement",value:"",start:this.source.offsetFor(this.tagOpenLine,this.tagOpenColumn)}}appendToCommentData(t){this.currentComment.value+=t}finishComment(){Ht(this.currentElement(),f.comment(this.finish(this.currentComment)))}beginData(){this.currentNode={type:"TextNode",chars:"",start:this.offset()}}appendToData(t){this.currentData.chars+=t}finishData(){Ht(this.currentElement(),f.text(this.finish(this.currentData)))}tagOpen(){this.tagOpenLine=this.tokenizer.line,this.tagOpenColumn=this.tokenizer.column}beginStartTag(){this.currentNode={type:"StartTag",name:"",nameStart:null,nameEnd:null,attributes:[],modifiers:[],comments:[],params:[],selfClosing:!1,start:this.source.offsetFor(this.tagOpenLine,this.tagOpenColumn)}}beginEndTag(){this.currentNode={type:"EndTag",name:"",start:this.source.offsetFor(this.tagOpenLine,this.tagOpenColumn)}}finishTag(){let t=this.finish(this.currentTag);if(t.type==="StartTag"){if(this.finishStartTag(),t.name===":")throw v("Invalid named block named detected, you may have created a named block without a name, or you may have began your name with a number. Named blocks must have names that are at least one character long, and begin with a lower case letter",this.source.spanFor({start:this.currentTag.start.toJSON(),end:this.offset().toJSON()}));(gr.has(t.name)||t.selfClosing)&&this.finishEndTag(!0)}else t.type,t.type,this.finishEndTag(!1)}finishStartTag(){let{name:t,nameStart:r,nameEnd:s}=this.currentStartTag,n=r.until(s),[i,...a]=t.split("."),o=f.path({head:f.head({original:i,loc:n.sliceStartChars({chars:i.length})}),tail:a,loc:n}),{attributes:c,modifiers:h,comments:p,params:m,selfClosing:S,loc:y}=this.finish(this.currentStartTag),E=f.element({path:o,selfClosing:S,attributes:c,modifiers:h,comments:p,params:m,children:[],openTag:y,closeTag:S?null:D.broken(),loc:y});this.elementStack.push(E)}finishEndTag(t){let{start:r}=this.currentTag,s=this.finish(this.currentTag),n=this.elementStack.pop();this.validateEndTag(s,n,t);let i=this.currentElement();t?n.closeTag=null:n.selfClosing?n.closeTag:n.closeTag=r.until(this.offset()),n.loc=n.loc.withEnd(this.offset()),Ht(i,f.element(n))}markTagAsSelfClosing(){let t=this.currentTag;if(t.type!=="StartTag")throw v("Invalid end tag: closing tag must not be self-closing",this.source.spanFor({start:t.start.toJSON(),end:this.offset().toJSON()}));t.selfClosing=!0}appendToTagName(t){let r=this.currentTag;if(r.name+=t,r.type==="StartTag"){let s=this.offset();r.nameStart===null&&(r.nameEnd,r.nameStart=s.move(-1)),r.nameEnd=s}}beginAttribute(){let t=this.offset();this.currentAttribute={name:"",parts:[],currentPart:null,isQuoted:!1,isDynamic:!1,start:t,valueSpan:t.collapsed()}}appendToAttributeName(t){this.currentAttr.name+=t,this.currentAttr.name==="as"&&this.parsePossibleBlockParams()}beginAttributeValue(t){this.currentAttr.isQuoted=t,this.startTextPart(),this.currentAttr.valueSpan=this.offset().collapsed()}appendToAttributeValue(t){let r=this.currentAttr.parts,s=r[r.length-1],n=this.currentAttr.currentPart;if(n)n.chars+=t,n.loc=n.loc.withEnd(this.offset());else{let i=this.offset();i=t===` +`?s?s.loc.getEnd():this.currentAttr.valueSpan.getStart():i.move(-1),this.currentAttr.currentPart=f.text({chars:t,loc:i.collapsed()})}}finishAttributeValue(){this.finalizeTextPart();let t=this.currentTag,r=this.offset();if(t.type==="EndTag")throw v("Invalid end tag: closing tag must not have attributes",this.source.spanFor({start:t.start.toJSON(),end:r.toJSON()}));let{name:s,parts:n,start:i,isQuoted:a,isDynamic:o,valueSpan:c}=this.currentAttr;if(s.startsWith("|")&&n.length===0&&!a&&!o)throw v("Invalid block parameters syntax: block parameters must be preceded by the `as` keyword",i.until(i.move(s.length)));let h=this.assembleAttributeValue(n,a,o,i.until(r));h.loc=c.withEnd(r);let p=f.attr({name:s,value:h,loc:i.until(r)});this.currentStartTag.attributes.push(p)}parsePossibleBlockParams(){let t=/[!"#%&'()*+./;<=>@[\\\]^`{|}~]/u;this.tokenizer.state;let r=this.currentStartTag,s=this.currentAttr,n={state:"PossibleAs"},i={PossibleAs:o=>{if(n.state,Ft(o))n={state:"BeforeStartPipe"},this.tokenizer.transitionTo("afterAttributeName"),this.tokenizer.consume();else{if(o==="|")throw v('Invalid block parameters syntax: expecting at least one space character between "as" and "|"',s.start.until(this.offset().move(1)));n={state:"Done"}}},BeforeStartPipe:o=>{n.state,Ft(o)?this.tokenizer.consume():o==="|"?(n={state:"BeforeBlockParamName"},this.tokenizer.transitionTo("beforeAttributeName"),this.tokenizer.consume()):n={state:"Done"}},BeforeBlockParamName:o=>{if(n.state,Ft(o))this.tokenizer.consume();else if(o==="")n={state:"Done"},this.pendingError={mustache(c){throw v("Invalid block parameters syntax: mustaches cannot be used inside parameters list",c)},eof(c){throw v('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}};else if(o==="|"){if(r.params.length===0)throw v("Invalid block parameters syntax: empty parameters list, expecting at least one identifier",s.start.until(this.offset().move(1)));n={state:"AfterEndPipe"},this.tokenizer.consume()}else{if(o===">"||o==="/")throw v('Invalid block parameters syntax: incomplete parameters list, expecting "|" but the tag was closed prematurely',s.start.until(this.offset().move(1)));n={state:"BlockParamName",name:o,start:this.offset()},this.tokenizer.consume()}},BlockParamName:o=>{if(n.state,o==="")n={state:"Done"},this.pendingError={mustache(c){throw v("Invalid block parameters syntax: mustaches cannot be used inside parameters list",c)},eof(c){throw v('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}};else if(o==="|"||Ft(o)){let c=n.start.until(this.offset());if(n.name==="this"||t.test(n.name))throw v(`Invalid block parameters syntax: invalid identifier name \`${n.name}\``,c);r.params.push(f.var({name:n.name,loc:c})),n=o==="|"?{state:"AfterEndPipe"}:{state:"BeforeBlockParamName"},this.tokenizer.consume()}else{if(o===">"||o==="/")throw v('Invalid block parameters syntax: expecting "|" but the tag was closed prematurely',s.start.until(this.offset().move(1)));n.name+=o,this.tokenizer.consume()}},AfterEndPipe:o=>{n.state,Ft(o)?this.tokenizer.consume():o===""?(n={state:"Done"},this.pendingError={mustache(c){throw v("Invalid block parameters syntax: modifiers cannot follow parameters list",c)},eof(c){throw v('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}}):o===">"||o==="/"?n={state:"Done"}:(n={state:"Error",message:'Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',start:this.offset()},this.tokenizer.consume())},Error:o=>{if(n.state,o===""||o==="/"||o===">"||Ft(o))throw v(n.message,n.start.until(this.offset()));this.tokenizer.consume()},Done:()=>{}},a;do a=this.tokenizer.peek(),i[n.state](a);while(n.state!=="Done"&&a!=="");n.state}reportSyntaxError(t){throw v(t,this.offset().collapsed())}assembleConcatenatedValue(t){let r=ci(t),s=Cr(t);return f.concat({parts:t,loc:this.source.spanFor(r.loc).extend(this.source.spanFor(s.loc))})}validateEndTag(t,r,s){if(gr.has(t.name)&&!s)throw v(`<${t.name}> elements do not need end tags. You should remove it`,t.loc);if(r.type!=="ElementNode")throw v(`Closing tag without an open tag`,t.loc);if(r.tag!==t.name)throw v(`Closing tag did not match last open tag <${r.tag}> (on line ${r.loc.startPosition.line})`,t.loc)}assembleAttributeValue(t,r,s,n){if(s){if(r)return this.assembleConcatenatedValue(t);{let[i,a]=t;if(a===void 0||a.type==="TextNode"&&a.chars==="/")return i;throw v("An unquoted attribute value must be a string or a mustache, preceded by whitespace or a '=' character, and followed by whitespace, a '>' character, or '/>'",n)}}return ce(t)?t[0]:f.text({chars:"",loc:n})}constructor(...t){super(...t),this.tagOpenLine=0,this.tagOpenColumn=0}},yi={},Nr=class extends cr{constructor(){super({})}parse(){}};function Vs(e,t={}){var c,h,p;let r,s,n,i=t.mode||"precompile";typeof e=="string"?(r=new wt(e,(c=t.meta)==null?void 0:c.moduleName),s=i==="codemod"?Te(e,t.parseOptions):lr(e,t.parseOptions)):e instanceof wt?(r=e,s=i==="codemod"?Te(e.source,t.parseOptions):lr(e.source,t.parseOptions)):(r=new wt("",(h=t.meta)==null?void 0:h.moduleName),s=e),i==="codemod"&&(n=new Nr);let a=D.forCharPositions(r,0,r.source.length);s.loc={source:"(program)",start:a.startPosition,end:a.endPosition};let o=new Tr(r,n,i).parse(s,t.locals??[]);if((p=t.plugins)!=null&&p.ast)for(let m of t.plugins.ast)gi(o,m(er({},t,{syntax:yi},{plugins:void 0})).visitor);return o}var ki={resolution:()=>Ne.GetStrictKeyword,serialize:()=>"Strict",isAngleBracket:!1},vo={...ki,isAngleBracket:!0};var Le=` +`,Fs="\r",Hs=function(){function e(t){this.length=t.length;for(var r=[0],s=0;sthis.length)return null;for(var r=0,s=this.offsets;s[r+1]<=t;)r++;var n=t-s[r];return{line:r,column:n}},e.prototype.indexForLocation=function(t){var r=t.line,s=t.column;return r<0||r>=this.offsets.length||s<0||s>this.lengthOfLine(r)?null:this.offsets[r]+s},e.prototype.lengthOfLine=function(t){var r=this.offsets[t],s=t===this.offsets.length-1?this.length:this.offsets[t+1];return s-r},e}();function Si(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)}var Us=Si;function vi(e){let t=e.children??e.body;if(t)for(let r=0;rt.indexForLocation({line:n-1,column:i}),s=n=>{let{start:i,end:a}=n.loc;i.offset=r(i),a.offset=r(a)};return()=>({name:"prettierParsePlugin",visitor:{All(n){s(n),vi(n)}}})}function wi(e){let t;try{t=Vs(e,{mode:"codemod",plugins:{ast:[Ei(e)]}})}catch(r){let s=Ni(r);if(s){let n=Ti(r);throw Us(n,{loc:s,cause:r})}throw r}return t}function Ti(e){let{message:t}=e,r=t.split(` +`);return r.length>=4&&/^Parse error on line \d+:$/u.test(r[0])&&/^-*\^$/u.test(G(!1,r,-2))?G(!1,r,-1):r.length>=4&&/:\s?$/u.test(r[0])&&/^\(error occurred in '.*?' @ line \d+ : column \d+\)$/u.test(G(!1,r,-1))&&r[1]===""&&G(!1,r,-2)===""&&r.slice(2,-2).every(s=>s.startsWith("|"))?r[0].trim().slice(0,-1):t}function Ni(e){let{location:t,hash:r}=e;if(t){let{start:s,end:n}=t;return typeof n.line!="number"?{start:s}:t}if(r){let{loc:{last_line:s,last_column:n}}=r;return{start:{line:s,column:n+1}}}}var Ci={parse:wi,astFormat:"glimmer",locStart:St,locEnd:re};var Pi={glimmer:hs};return $s(xi);}); \ No newline at end of file diff --git a/node_modules/prettier/plugins/glimmer.mjs b/node_modules/prettier/plugins/glimmer.mjs new file mode 100644 index 0000000..74c91b2 --- /dev/null +++ b/node_modules/prettier/plugins/glimmer.mjs @@ -0,0 +1,30 @@ +var Ws=Object.defineProperty;var Or=e=>{throw TypeError(e)};var Fe=(e,t)=>{for(var r in t)Ws(e,r,{get:t[r],enumerable:!0})};var Br=(e,t,r)=>t.has(e)||Or("Cannot "+r);var I=(e,t,r)=>(Br(e,t,"read from private field"),r?r.call(e):t.get(e)),Lt=(e,t,r)=>t.has(e)?Or("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Y=(e,t,r,s)=>(Br(e,t,"write to private field"),s?s.call(e,r):t.set(e,r),r);var Pr={};Fe(Pr,{languages:()=>ps,parsers:()=>xr,printers:()=>wi});var js=(e,t,r,s)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,s):r.global?t.replace(r,s):t.split(r).join(s)},He=js;var Dt="string",Gt="array",Kt="cursor",_t="indent",Ot="align",Wt="trim",Bt="group",It="fill",bt="if-break",jt="indent-if-break",Qt="line-suffix",Jt="line-suffix-boundary",j="line",$t="label",Rt="break-parent",fe=new Set([Kt,_t,Ot,Wt,Bt,It,bt,jt,Qt,Jt,j,$t,Rt]);var Qs=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},G=Qs;function Js(e){if(typeof e=="string")return Dt;if(Array.isArray(e))return Gt;if(!e)return;let{type:t}=e;if(fe.has(t))return t}var qt=Js;var $s=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Xs(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', +Expected it to be 'string' or 'object'.`;if(qt(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let s=$s([...fe].map(n=>`'${n}'`));return`Unexpected doc.type '${e.type}'. +Expected it to be ${s}.`}var Ue=class extends Error{name="InvalidDocError";constructor(t){super(Xs(t)),this.doc=t}},Me=Ue;function tn(e,t){if(typeof e=="string")return t(e);let r=new Map;return s(e);function s(i){if(r.has(i))return r.get(i);let a=n(i);return r.set(i,a),a}function n(i){switch(qt(i)){case Gt:return t(i.map(s));case It:return t({...i,parts:i.parts.map(s)});case bt:return t({...i,breakContents:s(i.breakContents),flatContents:s(i.flatContents)});case Bt:{let{expandedStates:a,contents:o}=i;return a?(a=a.map(s),o=a[0]):o=s(o),t({...i,contents:o,expandedStates:a})}case Ot:case _t:case jt:case $t:case Qt:return t({...i,contents:s(i.contents)});case Dt:case Kt:case Wt:case Jt:case j:case Rt:return t(i);default:throw new Me(i)}}}function Ir(e,t=Rr){return tn(e,r=>typeof r=="string"?yt(t,r.split(` +`)):r)}var ze=()=>{},kt=ze,Ye=ze,qr=ze;function B(e){return kt(e),{type:_t,contents:e}}function en(e,t){return kt(t),{type:Ot,contents:t,n:e}}function R(e,t={}){return kt(e),Ye(t.expandedStates,!0),{type:Bt,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Xt(e){return en(-1,e)}function Ge(e){return qr(e),{type:It,parts:e}}function Ke(e,t="",r={}){return kt(e),t!==""&&kt(t),{type:bt,breakContents:e,flatContents:t,groupId:r.groupId}}var Vr={type:Rt};var rn={type:j,hard:!0},sn={type:j,hard:!0,literal:!0},L={type:j},H={type:j,soft:!0},tt=[rn,Vr],Rr=[sn,Vr];function yt(e,t){kt(e),Ye(t);let r=[];for(let s=0;si?s:r}var de=nn;function We(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var z,je=class{constructor(t){Lt(this,z);Y(this,z,new Set(t))}getLeadingWhitespaceCount(t){let r=I(this,z),s=0;for(let n=0;n=0&&r.has(t.charAt(n));n--)s++;return s}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return I(this,z).has(t.charAt(0))}hasTrailingWhitespace(t){return I(this,z).has(G(!1,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let s=`[${We([...I(this,z)].join(""))}]+`,n=new RegExp(r?`(${s})`:s,"u");return t.split(n)}hasWhitespaceCharacter(t){let r=I(this,z);return Array.prototype.some.call(t,s=>r.has(s))}hasNonWhitespaceCharacter(t){let r=I(this,z);return Array.prototype.some.call(t,s=>!r.has(s))}isWhitespaceOnly(t){let r=I(this,z);return Array.prototype.every.call(t,s=>r.has(s))}};z=new WeakMap;var Hr=je;var an=[" ",` +`,"\f","\r"," "],on=new Hr(an),K=on;function ln(e){return Array.isArray(e)&&e.length>0}var Zt=ln;var Qe=class extends Error{name="UnexpectedNodeError";constructor(t,r,s="type"){super(`Unexpected ${r} node ${s}: ${JSON.stringify(t[s])}.`),this.node=t}},Ur=Qe;function Mr(e,t,r){if(e.type==="TextNode"){let s=e.chars.trim();if(!s)return null;r.tag==="style"&&r.children.length===1&&r.children[0]===e?t.chars="":t.chars=K.split(s).join(" ")}e.type==="ElementNode"&&(delete t.startTag,delete t.openTag,delete t.parts,delete t.endTag,delete t.closeTag,delete t.nameNode,delete t.body,delete t.blockParamNodes,delete t.params,delete t.path),e.type==="Block"&&(delete t.blockParamNodes,delete t.params),e.type==="AttrNode"&&e.name.toLowerCase()==="class"&&delete t.value,e.type==="PathExpression"&&(t.head=e.head.original)}Mr.ignoredProperties=new Set(["loc","selfClosing"]);var zr=Mr;function cn(e){let{node:t}=e;if(t.type!=="TextNode")return;let{parent:r}=e;if(!(r.type==="ElementNode"&&r.tag==="style"&&r.children.length===1&&r.children[0]===t))return;let s=r.attributes.find(n=>n.type==="AttrNode"&&n.name==="lang");if(!(s&&!(s.value.type==="TextNode"&&(s.value.chars===""||s.value.chars==="css"))))return async n=>{let i=await n(t.chars,{parser:"css"});return i?[tt,i,Xt(H)]:[]}}var Yr=cn;var te=null;function ee(e){if(te!==null&&typeof te.property){let t=te;return te=ee.prototype=null,t}return te=ee.prototype=e??Object.create(null),new ee}var un=10;for(let e=0;e<=un;e++)ee();function Je(e){return ee(e)}function hn(e,t="type"){Je(e);function r(s){let n=s[t],i=e[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:s});return i}return r}var Gr=hn;var Kr={Template:["body"],Block:["body"],MustacheStatement:["path","params","hash"],BlockStatement:["path","params","hash","program","inverse"],ElementModifierStatement:["path","params","hash"],CommentStatement:[],MustacheCommentStatement:[],ElementNode:["attributes","modifiers","children","comments"],AttrNode:["value"],TextNode:[],ConcatStatement:["parts"],SubExpression:["path","params","hash"],PathExpression:[],StringLiteral:[],BooleanLiteral:[],NumberLiteral:[],NullLiteral:[],UndefinedLiteral:[],Hash:["pairs"],HashPair:["value"]};var pn=Gr(Kr),Wr=pn;function St(e){return e.loc.start.offset}function re(e){return e.loc.end.offset}var jr=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function Jr(e){return e.toUpperCase()===e}function fn(e){return e.type==="ElementNode"&&typeof e.tag=="string"&&!e.tag.startsWith(":")&&(Jr(e.tag[0])||e.tag.includes("."))}function mn(e){return jr.has(e.toLowerCase())&&!Jr(e[0])}function $e(e){return e.selfClosing===!0||mn(e.tag)||fn(e)&&e.children.every(t=>ge(t))}function ge(e){return e.type==="TextNode"&&!/\S/u.test(e.chars)}function Qr(e){return(e==null?void 0:e.type)==="MustacheCommentStatement"&&typeof e.value=="string"&&e.value.trim()==="prettier-ignore"}function $r(e){return Qr(e.node)||e.isInArray&&(e.key==="children"||e.key==="body"||e.key==="parts")&&Qr(e.siblings[e.index-2])}var is=2;function dn(e,t,r){var n,i,a,o,c,h,p,m,S;let{node:s}=e;switch(s.type){case"Block":case"Program":case"Template":return R(e.map(r,"body"));case"ElementNode":{let y=R(bn(e,r)),E=t.htmlWhitespaceSensitivity==="ignore"&&((n=e.next)==null?void 0:n.type)==="ElementNode"?H:"";if($e(s))return[y,E];let C=[""];return s.children.length===0?[y,B(C),E]:t.htmlWhitespaceSensitivity==="ignore"?[y,B(Xr(e,t,r)),tt,B(C),E]:[y,B(R(Xr(e,t,r))),B(C),E]}case"BlockStatement":return wn(e)?[Tn(e,r),es(e,r,t),rs(e,r,t)]:[vn(e,r),R([es(e,r,t),rs(e,r,t),Nn(e,r,t)])];case"ElementModifierStatement":return R(["{{",ns(e,r),"}}"]);case"MustacheStatement":return R([be(s),ns(e,r),ye(s)]);case"SubExpression":return R(["(",_n(e,r),H,")"]);case"AttrNode":{let{name:y,value:E}=s,C=E.type==="TextNode";if(C&&E.chars===""&&St(E)===re(E))return y;let w=C?de(E.chars,t.singleQuote):E.type==="ConcatStatement"?de(E.parts.map(q=>q.type==="TextNode"?q.chars:"").join(""),t.singleQuote):"",U=r("value");return[y,"=",w,y==="class"&&w?R(B(U)):U,w]}case"ConcatStatement":return e.map(r,"parts");case"Hash":return yt(L,e.map(r,"pairs"));case"HashPair":return[s.key,"=",r("value")];case"TextNode":{if(e.parent.tag==="pre"||e.parent.tag==="style")return s.chars;let y=He(!1,s.chars,"{{",String.raw`\{{`),E=xn(e);if(E){if(E==="class"){let X=y.trim().split(/\s+/u).join(" "),rt=!1,V=!1;return e.parent.type==="ConcatStatement"&&(((i=e.previous)==null?void 0:i.type)==="MustacheStatement"&&/^\s/u.test(y)&&(rt=!0),((a=e.next)==null?void 0:a.type)==="MustacheStatement"&&/\s$/u.test(y)&&X!==""&&(V=!0)),[rt?L:"",X,V?L:""]}return Ir(y)}let C=K.isWhitespaceOnly(y),{isFirst:x,isLast:w}=e;if(t.htmlWhitespaceSensitivity!=="ignore"){let X=w&&e.parent.type==="Template",rt=x&&e.parent.type==="Template";if(C){if(rt||X)return"";let A=[L],nt=Vt(y);return nt&&(A=se(nt)),w&&(A=A.map(ue=>Xt(ue))),A}let V=K.getLeadingWhitespace(y),xt=[];if(V){xt=[L];let A=Vt(V);A&&(xt=se(A)),y=y.slice(V.length)}let F=K.getTrailingWhitespace(y),st=[];if(F){if(!X){st=[L];let A=Vt(F);A&&(st=se(A)),w&&(st=st.map(nt=>Xt(nt)))}y=y.slice(0,-F.length)}return[...xt,Ge(ss(y)),...st]}let U=Vt(y),q=Pn(y),$=An(y);if((x||w)&&C&&(e.parent.type==="Block"||e.parent.type==="ElementNode"||e.parent.type==="Template"))return"";C&&U?(q=Math.min(U,is),$=0):((((o=e.next)==null?void 0:o.type)==="BlockStatement"||((c=e.next)==null?void 0:c.type)==="ElementNode")&&($=Math.max($,1)),(((h=e.previous)==null?void 0:h.type)==="BlockStatement"||((p=e.previous)==null?void 0:p.type)==="ElementNode")&&(q=Math.max(q,1)));let Nt="",Ct="";return $===0&&((m=e.next)==null?void 0:m.type)==="MustacheStatement"&&(Ct=" "),q===0&&((S=e.previous)==null?void 0:S.type)==="MustacheStatement"&&(Nt=" "),x&&(q=0,Nt=""),w&&($=0,Ct=""),K.hasLeadingWhitespace(y)&&(y=Nt+K.trimStart(y)),K.hasTrailingWhitespace(y)&&(y=K.trimEnd(y)+Ct),[...se(q),Ge(ss(y)),...se($)]}case"MustacheCommentStatement":{let y=St(s),E=re(s),C=t.originalText.charAt(y+2)==="~",x=t.originalText.charAt(E-3)==="~",w=s.value.includes("}}")?"--":"";return["{{",C?"~":"","!",w,s.value,w,x?"~":"","}}"]}case"PathExpression":return Rn(s);case"BooleanLiteral":return String(s.value);case"CommentStatement":return[""];case"StringLiteral":return Ln(e,t);case"NumberLiteral":return String(s.value);case"UndefinedLiteral":return"undefined";case"NullLiteral":return"null";case"AtHead":case"VarHead":case"ThisHead":default:throw new Ur(s,"Handlebars")}}function gn(e,t){return St(e)-St(t)}function bn(e,t){let{node:r}=e,s=["attributes","modifiers","comments"].filter(i=>Zt(r[i])),n=s.flatMap(i=>r[i]).sort(gn);for(let i of s)e.each(({node:a})=>{let o=n.indexOf(a);n.splice(o,1,[L,t()])},i);return Zt(r.blockParams)&&n.push(L,Ze(r)),["<",r.tag,B(n),yn(r)]}function Xr(e,t,r){let{node:s}=e,n=s.children.every(i=>ge(i));return t.htmlWhitespaceSensitivity==="ignore"&&n?"":e.map(({isFirst:i})=>{let a=r();return i&&t.htmlWhitespaceSensitivity==="ignore"?[H,a]:a},"children")}function yn(e){return $e(e)?Ke([H,"/>"],[" />",H]):Ke([H,">"],">")}function be(e){var s;let t=e.trusting?"{{{":"{{",r=(s=e.strip)!=null&&s.open?"~":"";return[t,r]}function ye(e){var s;let t=e.trusting?"}}}":"}}";return[(s=e.strip)!=null&&s.close?"~":"",t]}function kn(e){let t=be(e),r=e.openStrip.open?"~":"";return[t,r,"#"]}function Sn(e){let t=ye(e);return[e.openStrip.close?"~":"",t]}function Zr(e){let t=be(e),r=e.closeStrip.open?"~":"";return[t,r,"/"]}function ts(e){let t=ye(e);return[e.closeStrip.close?"~":"",t]}function as(e){let t=be(e),r=e.inverseStrip.open?"~":"";return[t,r]}function os(e){let t=ye(e);return[e.inverseStrip.close?"~":"",t]}function vn(e,t){let{node:r}=e,s=[],n=ke(e,t);return n&&s.push(R(n)),Zt(r.program.blockParams)&&s.push(Ze(r.program)),R([kn(r),Xe(e,t),s.length>0?B([L,yt(L,s)]):"",H,Sn(r)])}function En(e,t){return[t.htmlWhitespaceSensitivity==="ignore"?tt:"",as(e),"else",os(e)]}var ls=(e,t)=>e.head.type==="VarHead"&&t.head.type==="VarHead"&&e.head.name===t.head.name;function wn(e){var s;let{grandparent:t,node:r}=e;return((s=t==null?void 0:t.inverse)==null?void 0:s.body.length)===1&&t.inverse.body[0]===r&&ls(t.inverse.body[0].path,t.path)}function Tn(e,t){let{node:r,grandparent:s}=e;return R([as(s),["else"," ",s.inverse.body[0].path.head.name],B([L,R(ke(e,t)),...Zt(r.program.blockParams)?[L,Ze(r.program)]:[]]),H,os(s)])}function Nn(e,t,r){let{node:s}=e;return r.htmlWhitespaceSensitivity==="ignore"?[cs(s)?H:tt,Zr(s),t("path"),ts(s)]:[Zr(s),t("path"),ts(s)]}function cs(e){return e.type==="BlockStatement"&&e.program.body.every(t=>ge(t))}function Cn(e){return us(e)&&e.inverse.body.length===1&&e.inverse.body[0].type==="BlockStatement"&&ls(e.inverse.body[0].path,e.path)}function us(e){return e.type==="BlockStatement"&&e.inverse}function es(e,t,r){let{node:s}=e;if(cs(s))return"";let n=t("program");return r.htmlWhitespaceSensitivity==="ignore"?B([tt,n]):B(n)}function rs(e,t,r){let{node:s}=e,n=t("inverse"),i=r.htmlWhitespaceSensitivity==="ignore"?[tt,n]:n;return Cn(s)?i:us(s)?[En(s,r),B(i)]:""}function ss(e){return yt(L,K.split(e))}function xn(e){for(let t=0;t<2;t++){let r=e.getParentNode(t);if((r==null?void 0:r.type)==="AttrNode")return r.name.toLowerCase()}}function Vt(e){return e=typeof e=="string"?e:"",e.split(` +`).length-1}function Pn(e){e=typeof e=="string"?e:"";let t=(e.match(/^([^\S\n\r]*[\n\r])+/gu)||[])[0]||"";return Vt(t)}function An(e){e=typeof e=="string"?e:"";let t=(e.match(/([\n\r][^\S\n\r]*)+$/gu)||[])[0]||"";return Vt(t)}function se(e=0){return Array.from({length:Math.min(e,is)}).fill(tt)}function Ln(e,t){let{node:{value:r}}=e,s=de(r,Dn(e)?!t.singleQuote:t.singleQuote);return[s,He(!1,r,s,`\\${s}`),s]}function Dn(e){let{ancestors:t}=e,r=t.findIndex(s=>s.type!=="SubExpression");return r!==-1&&t[r+1].type==="ConcatStatement"&&t[r+2].type==="AttrNode"}function _n(e,t){let r=Xe(e,t),s=ke(e,t);return s?B([r,L,R(s)]):r}function ns(e,t){let r=Xe(e,t),s=ke(e,t);return s?[B([r,L,s]),H]:r}function Xe(e,t){return t("path")}function ke(e,t){var n;let{node:r}=e,s=[];return r.params.length>0&&s.push(...e.map(t,"params")),((n=r.hash)==null?void 0:n.pairs.length)>0&&s.push(t("hash")),s.length===0?"":yt(L,s)}function Ze(e){return["as |",e.blockParams.join(" "),"|"]}var On=new Set("!\"#%&'()*+,./;<=>@[\\]^`{|}~"),Bn=new Set(["true","false","null","undefined"]),In=(e,t)=>t===0&&e.startsWith("@")?!1:t!==0&&Bn.has(e)||/\s/u.test(e)||/^\d/u.test(e)||Array.prototype.some.call(e,r=>On.has(r));function Rn(e){return e.tail.length===0&&e.original.includes("/")?e.original:[e.head.original,...e.tail].map((r,s)=>In(r,s)?`[${r}]`:r).join(".")}var qn={print:dn,massageAstNode:zr,hasPrettierIgnore:$r,getVisitorKeys:Wr,embed:Yr},hs=qn;var ps=[{linguistLanguageId:155,name:"Handlebars",type:"markup",color:"#f7931e",aliases:["hbs","htmlbars"],extensions:[".handlebars",".hbs"],tmScope:"text.html.handlebars",aceMode:"handlebars",parsers:["glimmer"],vscodeLanguageIds:["handlebars"]}];var xr={};Fe(xr,{glimmer:()=>Ei});var Vn=Object.freeze([]);function ms(){return Vn}var Ma=ms(),za=ms();var tr=Object.assign;var fs=console;function ds(e,t="unexpected unreachable branch"){throw fs.log("unreachable",e),fs.log(`${t} :: ${JSON.stringify(e)} (${e})`),new Error("code reached unreachable")}var Fn=function(){var e=function(it,d,k,g){for(k=k||{},g=it.length;g--;k[it[g]]=d);return k},t=[2,44],r=[1,20],s=[5,14,15,19,29,34,39,44,47,48,52,56,60],n=[1,35],i=[1,38],a=[1,30],o=[1,31],c=[1,32],h=[1,33],p=[1,34],m=[1,37],S=[14,15,19,29,34,39,44,47,48,52,56,60],y=[14,15,19,29,34,44,47,48,52,56,60],E=[15,18],C=[14,15,19,29,34,47,48,52,56,60],x=[33,64,71,79,80,81,82,83,84],w=[23,33,55,64,67,71,74,79,80,81,82,83,84],U=[1,51],q=[23,33,55,64,67,71,74,79,80,81,82,83,84,86],$=[2,43],Nt=[55,64,71,79,80,81,82,83,84],Ct=[1,58],X=[1,59],rt=[1,66],V=[33,64,71,74,79,80,81,82,83,84],xt=[23,64,71,79,80,81,82,83,84],F=[1,76],st=[64,67,71,79,80,81,82,83,84],A=[33,74],nt=[23,33,55,67,71,74],ue=[1,106],De=[1,118],Ar=[71,76],_e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,expr:49,mustache_repetition0:50,mustache_option0:51,OPEN_UNESCAPED:52,mustache_repetition1:53,mustache_option1:54,CLOSE_UNESCAPED:55,OPEN_PARTIAL:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,sexpr:63,OPEN_SEXPR:64,sexpr_repetition0:65,sexpr_option0:66,CLOSE_SEXPR:67,hash:68,hash_repetition_plus0:69,hashSegment:70,ID:71,EQUALS:72,blockParams:73,OPEN_BLOCK_PARAMS:74,blockParams_repetition_plus0:75,CLOSE_BLOCK_PARAMS:76,path:77,dataName:78,STRING:79,NUMBER:80,BOOLEAN:81,UNDEFINED:82,NULL:83,DATA:84,pathSegments:85,SEP:86,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",52:"OPEN_UNESCAPED",55:"CLOSE_UNESCAPED",56:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",64:"OPEN_SEXPR",67:"CLOSE_SEXPR",71:"ID",72:"EQUALS",74:"OPEN_BLOCK_PARAMS",76:"CLOSE_BLOCK_PARAMS",79:"STRING",80:"NUMBER",81:"BOOLEAN",82:"UNDEFINED",83:"NULL",84:"DATA",86:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[49,1],[49,1],[63,5],[68,1],[70,3],[73,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[78,2],[77,1],[85,3],[85,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[50,0],[50,2],[51,0],[51,1],[53,0],[53,2],[54,0],[54,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[65,0],[65,2],[66,0],[66,1],[69,1],[69,2],[75,1],[75,2]],performAction:function(d,k,g,b,N,l,Pt){var u=l.length-1;switch(N){case 1:return l[u-1];case 2:this.$=b.prepareProgram(l[u]);break;case 3:case 4:case 5:case 6:case 7:case 8:case 20:case 27:case 28:case 33:case 34:this.$=l[u];break;case 9:this.$={type:"CommentStatement",value:b.stripComment(l[u]),strip:b.stripFlags(l[u],l[u]),loc:b.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:l[u],value:l[u],loc:b.locInfo(this._$)};break;case 11:this.$=b.prepareRawBlock(l[u-2],l[u-1],l[u],this._$);break;case 12:this.$={path:l[u-3],params:l[u-2],hash:l[u-1]};break;case 13:this.$=b.prepareBlock(l[u-3],l[u-2],l[u-1],l[u],!1,this._$);break;case 14:this.$=b.prepareBlock(l[u-3],l[u-2],l[u-1],l[u],!0,this._$);break;case 15:this.$={open:l[u-5],path:l[u-4],params:l[u-3],hash:l[u-2],blockParams:l[u-1],strip:b.stripFlags(l[u-5],l[u])};break;case 16:case 17:this.$={path:l[u-4],params:l[u-3],hash:l[u-2],blockParams:l[u-1],strip:b.stripFlags(l[u-5],l[u])};break;case 18:this.$={strip:b.stripFlags(l[u-1],l[u-1]),program:l[u]};break;case 19:var at=b.prepareBlock(l[u-2],l[u-1],l[u],l[u],!1,this._$),Yt=b.prepareProgram([at],l[u-1].loc);Yt.chained=!0,this.$={strip:l[u-2].strip,program:Yt,chain:!0};break;case 21:this.$={path:l[u-1],strip:b.stripFlags(l[u-2],l[u])};break;case 22:case 23:this.$=b.prepareMustache(l[u-3],l[u-2],l[u-1],l[u-4],b.stripFlags(l[u-4],l[u]),this._$);break;case 24:this.$={type:"PartialStatement",name:l[u-3],params:l[u-2],hash:l[u-1],indent:"",strip:b.stripFlags(l[u-4],l[u]),loc:b.locInfo(this._$)};break;case 25:this.$=b.preparePartialBlock(l[u-2],l[u-1],l[u],this._$);break;case 26:this.$={path:l[u-3],params:l[u-2],hash:l[u-1],strip:b.stripFlags(l[u-4],l[u])};break;case 29:this.$={type:"SubExpression",path:l[u-3],params:l[u-2],hash:l[u-1],loc:b.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:l[u],loc:b.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:b.id(l[u-2]),value:l[u],loc:b.locInfo(this._$)};break;case 32:this.$=b.id(l[u-1]);break;case 35:this.$={type:"StringLiteral",value:l[u],original:l[u],loc:b.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(l[u]),original:Number(l[u]),loc:b.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:l[u]==="true",original:l[u]==="true",loc:b.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:b.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:b.locInfo(this._$)};break;case 40:this.$=b.preparePath(!0,l[u],this._$);break;case 41:this.$=b.preparePath(!1,l[u],this._$);break;case 42:l[u-2].push({part:b.id(l[u]),original:l[u],separator:l[u-1]}),this.$=l[u-2];break;case 43:this.$=[{part:b.id(l[u]),original:l[u]}];break;case 44:case 46:case 48:case 56:case 62:case 68:case 76:case 80:case 84:case 88:case 92:this.$=[];break;case 45:case 47:case 49:case 57:case 63:case 69:case 77:case 81:case 85:case 89:case 93:case 97:case 99:l[u-1].push(l[u]);break;case 96:case 98:this.$=[l[u]];break}},table:[e([5,14,15,19,29,34,48,52,56,60],t,{3:1,4:2,6:3}),{1:[3]},{5:[1,4]},e([5,39,44,47],[2,2],{7:5,8:6,9:7,10:8,11:9,12:10,13:11,24:15,27:16,16:17,59:19,14:[1,12],15:r,19:[1,23],29:[1,21],34:[1,22],48:[1,13],52:[1,14],56:[1,18],60:[1,24]}),{1:[2,1]},e(s,[2,45]),e(s,[2,3]),e(s,[2,4]),e(s,[2,5]),e(s,[2,6]),e(s,[2,7]),e(s,[2,8]),e(s,[2,9]),{20:26,49:25,63:27,64:n,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:p,84:m,85:36},{20:26,49:39,63:27,64:n,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:p,84:m,85:36},e(S,t,{6:3,4:40}),e(y,t,{6:3,4:41}),e(E,[2,46],{17:42}),{20:26,49:43,63:27,64:n,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:p,84:m,85:36},e(C,t,{6:3,4:44}),e([5,14,15,18,19,29,34,39,44,47,48,52,56,60],[2,10]),{20:45,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:p,84:m,85:36},{20:46,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:p,84:m,85:36},{20:47,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:p,84:m,85:36},{20:26,49:48,63:27,64:n,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:p,84:m,85:36},e(x,[2,76],{50:49}),e(w,[2,27]),e(w,[2,28]),e(w,[2,33]),e(w,[2,34]),e(w,[2,35]),e(w,[2,36]),e(w,[2,37]),e(w,[2,38]),e(w,[2,39]),{20:26,49:50,63:27,64:n,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:p,84:m,85:36},e(w,[2,41],{86:U}),{71:i,85:52},e(q,$),e(Nt,[2,80],{53:53}),{25:54,38:56,39:Ct,43:57,44:X,45:55,47:[2,52]},{28:60,43:61,44:X,47:[2,54]},{13:63,15:r,18:[1,62]},e(x,[2,84],{57:64}),{26:65,47:rt},e(V,[2,56],{30:67}),e(V,[2,62],{35:68}),e(xt,[2,48],{21:69}),e(x,[2,88],{61:70}),{20:26,33:[2,78],49:72,51:71,63:27,64:n,68:73,69:74,70:75,71:F,77:28,78:29,79:a,80:o,81:c,82:h,83:p,84:m,85:36},e(st,[2,92],{65:77}),{71:[1,78]},e(w,[2,40],{86:U}),{20:26,49:80,54:79,55:[2,82],63:27,64:n,68:81,69:74,70:75,71:F,77:28,78:29,79:a,80:o,81:c,82:h,83:p,84:m,85:36},{26:82,47:rt},{47:[2,53]},e(S,t,{6:3,4:83}),{47:[2,20]},{20:84,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:p,84:m,85:36},e(C,t,{6:3,4:85}),{26:86,47:rt},{47:[2,55]},e(s,[2,11]),e(E,[2,47]),{20:26,33:[2,86],49:88,58:87,63:27,64:n,68:89,69:74,70:75,71:F,77:28,78:29,79:a,80:o,81:c,82:h,83:p,84:m,85:36},e(s,[2,25]),{20:90,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:p,84:m,85:36},e(A,[2,58],{20:26,63:27,77:28,78:29,85:36,69:74,70:75,31:91,49:92,68:93,64:n,71:F,79:a,80:o,81:c,82:h,83:p,84:m}),e(A,[2,64],{20:26,63:27,77:28,78:29,85:36,69:74,70:75,36:94,49:95,68:96,64:n,71:F,79:a,80:o,81:c,82:h,83:p,84:m}),{20:26,22:97,23:[2,50],49:98,63:27,64:n,68:99,69:74,70:75,71:F,77:28,78:29,79:a,80:o,81:c,82:h,83:p,84:m,85:36},{20:26,33:[2,90],49:101,62:100,63:27,64:n,68:102,69:74,70:75,71:F,77:28,78:29,79:a,80:o,81:c,82:h,83:p,84:m,85:36},{33:[1,103]},e(x,[2,77]),{33:[2,79]},e([23,33,55,67,74],[2,30],{70:104,71:[1,105]}),e(nt,[2,96]),e(q,$,{72:ue}),{20:26,49:108,63:27,64:n,66:107,67:[2,94],68:109,69:74,70:75,71:F,77:28,78:29,79:a,80:o,81:c,82:h,83:p,84:m,85:36},e(q,[2,42]),{55:[1,110]},e(Nt,[2,81]),{55:[2,83]},e(s,[2,13]),{38:56,39:Ct,43:57,44:X,45:112,46:111,47:[2,74]},e(V,[2,68],{40:113}),{47:[2,18]},e(s,[2,14]),{33:[1,114]},e(x,[2,85]),{33:[2,87]},{33:[1,115]},{32:116,33:[2,60],73:117,74:De},e(V,[2,57]),e(A,[2,59]),{33:[2,66],37:119,73:120,74:De},e(V,[2,63]),e(A,[2,65]),{23:[1,121]},e(xt,[2,49]),{23:[2,51]},{33:[1,122]},e(x,[2,89]),{33:[2,91]},e(s,[2,22]),e(nt,[2,97]),{72:ue},{20:26,49:123,63:27,64:n,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:p,84:m,85:36},{67:[1,124]},e(st,[2,93]),{67:[2,95]},e(s,[2,23]),{47:[2,19]},{47:[2,75]},e(A,[2,70],{20:26,63:27,77:28,78:29,85:36,69:74,70:75,41:125,49:126,68:127,64:n,71:F,79:a,80:o,81:c,82:h,83:p,84:m}),e(s,[2,24]),e(s,[2,21]),{33:[1,128]},{33:[2,61]},{71:[1,130],75:129},{33:[1,131]},{33:[2,67]},e(E,[2,12]),e(C,[2,26]),e(nt,[2,31]),e(w,[2,29]),{33:[2,72],42:132,73:133,74:De},e(V,[2,69]),e(A,[2,71]),e(S,[2,15]),{71:[1,135],76:[1,134]},e(Ar,[2,98]),e(y,[2,16]),{33:[1,136]},{33:[2,73]},{33:[2,32]},e(Ar,[2,99]),e(S,[2,17])],defaultActions:{4:[2,1],55:[2,53],57:[2,20],61:[2,55],73:[2,79],81:[2,83],85:[2,18],89:[2,87],99:[2,51],102:[2,91],109:[2,95],111:[2,19],112:[2,75],117:[2,61],120:[2,67],133:[2,73],134:[2,32]},parseError:function(d,k){if(k.recoverable)this.trace(d);else{var g=new Error(d);throw g.hash=k,g}},parse:function(d){var k=this,g=[0],b=[],N=[null],l=[],Pt=this.table,u="",at=0,Yt=0,Lr=0,zs=2,Dr=1,Ys=l.slice.call(arguments,1),P=Object.create(this.lexer),dt={yy:{}};for(var Be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Be)&&(dt.yy[Be]=this.yy[Be]);P.setInput(d,dt.yy),dt.yy.lexer=P,dt.yy.parser=this,typeof P.yylloc>"u"&&(P.yylloc={});var Ie=P.yylloc;l.push(Ie);var Gs=P.options&&P.options.ranges;typeof dt.yy.parseError=="function"?this.parseError=dt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ti(W){g.length=g.length-2*W,N.length=N.length-W,l.length=l.length-W}for(var Ks=function(){var W;return W=P.lex()||Dr,typeof W!="number"&&(W=k.symbols_[W]||W),W},O,Re,gt,M,Ni,qe,At={},he,Z,_r,pe;;){if(gt=g[g.length-1],this.defaultActions[gt]?M=this.defaultActions[gt]:((O===null||typeof O>"u")&&(O=Ks()),M=Pt[gt]&&Pt[gt][O]),typeof M>"u"||!M.length||!M[0]){var Ve="";pe=[];for(he in Pt[gt])this.terminals_[he]&&he>zs&&pe.push("'"+this.terminals_[he]+"'");P.showPosition?Ve="Parse error on line "+(at+1)+`: +`+P.showPosition()+` +Expecting `+pe.join(", ")+", got '"+(this.terminals_[O]||O)+"'":Ve="Parse error on line "+(at+1)+": Unexpected "+(O==Dr?"end of input":"'"+(this.terminals_[O]||O)+"'"),this.parseError(Ve,{text:P.match,token:this.terminals_[O]||O,line:P.yylineno,loc:Ie,expected:pe})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+gt+", token: "+O);switch(M[0]){case 1:g.push(O),N.push(P.yytext),l.push(P.yylloc),g.push(M[1]),O=null,Re?(O=Re,Re=null):(Yt=P.yyleng,u=P.yytext,at=P.yylineno,Ie=P.yylloc,Lr>0&&Lr--);break;case 2:if(Z=this.productions_[M[1]][1],At.$=N[N.length-Z],At._$={first_line:l[l.length-(Z||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(Z||1)].first_column,last_column:l[l.length-1].last_column},Gs&&(At._$.range=[l[l.length-(Z||1)].range[0],l[l.length-1].range[1]]),qe=this.performAction.apply(At,[u,Yt,at,dt.yy,M[1],N,l].concat(Ys)),typeof qe<"u")return qe;Z&&(g=g.slice(0,-1*Z*2),N=N.slice(0,-1*Z),l=l.slice(0,-1*Z)),g.push(this.productions_[M[1]][0]),N.push(At.$),l.push(At._$),_r=Pt[g[g.length-2]][g[g.length-1]],g.push(_r);break;case 3:return!0}}return!0}},Ms=function(){var it={EOF:1,parseError:function(k,g){if(this.yy.parser)this.yy.parser.parseError(k,g);else throw new Error(k)},setInput:function(d,k){return this.yy=k||this.yy||{},this._input=d,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var d=this._input[0];this.yytext+=d,this.yyleng++,this.offset++,this.match+=d,this.matched+=d;var k=d.match(/(?:\r\n?|\n).*/g);return k?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),d},unput:function(d){var k=d.length,g=d.split(/(?:\r\n?|\n)/g);this._input=d+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-k),this.offset-=k;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var N=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===b.length?this.yylloc.first_column:0)+b[b.length-g.length].length-g[0].length:this.yylloc.first_column-k},this.options.ranges&&(this.yylloc.range=[N[0],N[0]+this.yyleng-k]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(d){this.unput(this.match.slice(d))},pastInput:function(){var d=this.matched.substr(0,this.matched.length-this.match.length);return(d.length>20?"...":"")+d.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var d=this.match;return d.length<20&&(d+=this._input.substr(0,20-d.length)),(d.substr(0,20)+(d.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var d=this.pastInput(),k=new Array(d.length+1).join("-");return d+this.upcomingInput()+` +`+k+"^"},test_match:function(d,k){var g,b,N;if(this.options.backtrack_lexer&&(N={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(N.yylloc.range=this.yylloc.range.slice(0))),b=d[0].match(/(?:\r\n?|\n).*/g),b&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+d[0].length},this.yytext+=d[0],this.match+=d[0],this.matches=d,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(d[0].length),this.matched+=d[0],g=this.performAction.call(this,this.yy,this,k,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var l in N)this[l]=N[l];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var d,k,g,b;this._more||(this.yytext="",this.match="");for(var N=this._currentRules(),l=0;lk[0].length)){if(k=g,b=l,this.options.backtrack_lexer){if(d=this.test_match(g,N[l]),d!==!1)return d;if(this._backtrack){k=!1;continue}else return!1}else if(!this.options.flex)break}return k?(d=this.test_match(k,N[b]),d!==!1?d:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var k=this.next();return k||this.lex()},begin:function(k){this.conditionStack.push(k)},popState:function(){var k=this.conditionStack.length-1;return k>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(k){return k=this.conditionStack.length-1-Math.abs(k||0),k>=0?this.conditionStack[k]:"INITIAL"},pushState:function(k){this.begin(k)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(k,g,b,N){function l(u,at){return g.yytext=g.yytext.substring(u,g.yyleng-at+u)}var Pt=N;switch(b){case 0:if(g.yytext.slice(-2)==="\\\\"?(l(0,1),this.begin("mu")):g.yytext.slice(-1)==="\\"?(l(0,1),this.begin("emu")):this.begin("mu"),g.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(l(5,9),18);case 5:return 15;case 6:return this.popState(),14;break;case 7:return 64;case 8:return 67;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 56;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 52;case 20:return 48;case 21:this.unput(g.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 72;case 25:return 71;case 26:return 71;case 27:return 86;case 28:break;case 29:return this.popState(),55;break;case 30:return this.popState(),33;break;case 31:return g.yytext=l(1,2).replace(/\\"/g,'"'),79;break;case 32:return g.yytext=l(1,2).replace(/\\'/g,"'"),79;break;case 33:return 84;case 34:return 81;case 35:return 81;case 36:return 82;case 37:return 83;case 38:return 80;case 39:return 74;case 40:return 76;case 41:return 71;case 42:return g.yytext=g.yytext.replace(/\\([\\\]])/g,"$1"),71;break;case 43:return"INVALID";case 44:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}}};return it}();_e.lexer=Ms;function Oe(){this.yy={}}return Oe.prototype=_e,_e.Parser=Oe,new Oe}(),Se=Fn;var er=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function rr(e,t){var r=t&&t.loc,s,n,i,a;r&&(s=r.start.line,n=r.end.line,i=r.start.column,a=r.end.column,e+=" - "+s+":"+i);for(var o=Error.prototype.constructor.call(this,e),c=0;car,id:()=>Hn,prepareBlock:()=>Kn,prepareMustache:()=>Yn,preparePartialBlock:()=>jn,preparePath:()=>zn,prepareProgram:()=>Wn,prepareRawBlock:()=>Gn,stripComment:()=>Mn,stripFlags:()=>Un});function ir(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var r={loc:e.path.loc};throw new ot(e.path.original+" doesn't match "+t,r)}}function ar(e,t){this.source=e,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column}}function Hn(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e}function Un(e,t){return{open:e.charAt(2)==="~",close:t.charAt(t.length-3)==="~"}}function Mn(e){return e.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function zn(e,t,r){r=this.locInfo(r);for(var s=e?"@":"",n=[],i=0,a=0,o=t.length;a0)throw new ot("Invalid path: "+s,{loc:r});c===".."&&i++}else n.push(c)}return{type:"PathExpression",data:e,depth:i,parts:n,original:s,loc:r}}function Yn(e,t,r,s,n,i){var a=s.charAt(3)||s.charAt(2),o=a!=="{"&&a!=="&",c=/\*/.test(s);return{type:c?"Decorator":"MustacheStatement",path:e,params:t,hash:r,escaped:o,strip:n,loc:this.locInfo(i)}}function Gn(e,t,r,s){ir(e,r),s=this.locInfo(s);var n={type:"Program",body:t,strip:{},loc:s};return{type:"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:n,openStrip:{},inverseStrip:{},closeStrip:{},loc:s}}function Kn(e,t,r,s,n,i){s&&s.path&&ir(e,s);var a=/\*/.test(e.open);t.blockParams=e.blockParams;var o,c;if(r){if(a)throw new ot("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=s.strip),c=r.strip,o=r.program}return n&&(n=o,o=t,t=n),{type:a?"DecoratorBlock":"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:t,inverse:o,openStrip:e.strip,inverseStrip:c,closeStrip:s&&s.strip,loc:this.locInfo(i)}}function Wn(e,t){if(!t&&e.length){var r=e[0].loc,s=e[e.length-1].loc;r&&s&&(t={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:s.end.line,column:s.end.column}})}return{type:"Program",body:e,strip:{},loc:t}}function jn(e,t,r,s){return ir(e,r),{type:"PartialBlockStatement",name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:r&&r.strip,loc:this.locInfo(s)}}var Ss={};for(we in ne)Object.prototype.hasOwnProperty.call(ne,we)&&(Ss[we]=ne[we]);var we;function Te(e,t){if(e.type==="Program")return e;Se.yy=Ss,Se.yy.locInfo=function(s){return new ar(t&&t.srcName,s)};var r=Se.parse(e);return r}function or(e,t){var r=Te(e,t),s=new ks(t);return s.accept(r)}var Es={Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",amp:"&",AMP:"&",andand:"\u2A55",And:"\u2A53",and:"\u2227",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angmsd:"\u2221",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",apacir:"\u2A6F",ap:"\u2248",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250C",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252C",boxHd:"\u2564",boxhD:"\u2565",boxHD:"\u2566",boxhu:"\u2534",boxHu:"\u2567",boxhU:"\u2568",boxHU:"\u2569",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxul:"\u2518",boxuL:"\u255B",boxUl:"\u255C",boxUL:"\u255D",boxur:"\u2514",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255A",boxv:"\u2502",boxV:"\u2551",boxvh:"\u253C",boxvH:"\u256A",boxVh:"\u256B",boxVH:"\u256C",boxvl:"\u2524",boxvL:"\u2561",boxVl:"\u2562",boxVL:"\u2563",boxvr:"\u251C",boxvR:"\u255E",boxVr:"\u255F",boxVR:"\u2560",bprime:"\u2035",breve:"\u02D8",Breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",Bscr:"\u212C",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsolb:"\u29C5",bsol:"\\",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",cap:"\u2229",Cap:"\u22D2",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",CenterDot:"\xB7",cfr:"\u{1D520}",Cfr:"\u212D",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cir:"\u25CB",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",colon:":",Colon:"\u2237",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",conint:"\u222E",Conint:"\u222F",ContourIntegral:"\u222E",copf:"\u{1D554}",Copf:"\u2102",coprod:"\u2210",Coproduct:"\u2210",copy:"\xA9",COPY:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",cross:"\u2717",Cross:"\u2A2F",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cupbrcap:"\u2A48",cupcap:"\u2A46",CupCap:"\u224D",cup:"\u222A",Cup:"\u22D3",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dagger:"\u2020",Dagger:"\u2021",daleth:"\u2138",darr:"\u2193",Darr:"\u21A1",dArr:"\u21D3",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",ddagger:"\u2021",ddarr:"\u21CA",DD:"\u2145",dd:"\u2146",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",diamond:"\u22C4",Diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrowBar:"\u2913",downarrow:"\u2193",DownArrow:"\u2193",Downarrow:"\u21D3",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVectorBar:"\u2956",DownLeftVector:"\u21BD",DownRightTeeVector:"\u295F",DownRightVectorBar:"\u2957",DownRightVector:"\u21C1",DownTeeArrow:"\u21A7",DownTee:"\u22A4",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",Ecirc:"\xCA",ecirc:"\xEA",ecir:"\u2256",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",edot:"\u0117",eDot:"\u2251",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",escr:"\u212F",Escr:"\u2130",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",exponentiale:"\u2147",ExponentialE:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",forall:"\u2200",ForAll:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",Fscr:"\u2131",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",ge:"\u2265",gE:"\u2267",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",gescc:"\u2AA9",ges:"\u2A7E",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",gg:"\u226B",Gg:"\u22D9",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gla:"\u2AA5",gl:"\u2277",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gnE:"\u2269",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gtcc:"\u2AA7",gtcir:"\u2A7A",gt:">",GT:">",Gt:"\u226B",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",HARDcy:"\u042A",hardcy:"\u044A",harrcir:"\u2948",harr:"\u2194",hArr:"\u21D4",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",Hfr:"\u210C",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",Hopf:"\u210D",horbar:"\u2015",HorizontalLine:"\u2500",hscr:"\u{1D4BD}",Hscr:"\u210B",hslash:"\u210F",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xCD",iacute:"\xED",ic:"\u2063",Icirc:"\xCE",icirc:"\xEE",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",Ifr:"\u2111",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",Im:"\u2111",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",incare:"\u2105",in:"\u2208",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",intcal:"\u22BA",int:"\u222B",Int:"\u222C",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012E",iogon:"\u012F",Iopf:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",Iscr:"\u2110",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xCF",iuml:"\xEF",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",lang:"\u27E8",Lang:"\u27EA",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",larrb:"\u21E4",larrbfs:"\u291F",larr:"\u2190",Larr:"\u219E",lArr:"\u21D0",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",latail:"\u2919",lAtail:"\u291B",lat:"\u2AAB",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lBarr:"\u290E",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",Lcaron:"\u013D",lcaron:"\u013E",Lcedil:"\u013B",lcedil:"\u013C",lceil:"\u2308",lcub:"{",Lcy:"\u041B",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",lE:"\u2266",LeftAngleBracket:"\u27E8",LeftArrowBar:"\u21E4",leftarrow:"\u2190",LeftArrow:"\u2190",Leftarrow:"\u21D0",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVectorBar:"\u2959",LeftDownVector:"\u21C3",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTeeArrow:"\u21A4",LeftTee:"\u22A3",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangleBar:"\u29CF",LeftTriangle:"\u22B2",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVectorBar:"\u2958",LeftUpVector:"\u21BF",LeftVectorBar:"\u2952",LeftVector:"\u21BC",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",lescc:"\u2AA8",les:"\u2A7D",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",Lfr:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",llarr:"\u21C7",ll:"\u226A",Ll:"\u22D8",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoustache:"\u23B0",lmoust:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lnE:"\u2268",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftrightarrow:"\u27F7",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longmapsto:"\u27FC",longrightarrow:"\u27F6",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",Lscr:"\u2112",lsh:"\u21B0",Lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",ltcc:"\u2AA6",ltcir:"\u2A79",lt:"<",LT:"<",Lt:"\u226A",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",Mcy:"\u041C",mcy:"\u043C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",midast:"*",midcir:"\u2AF0",mid:"\u2223",middot:"\xB7",minusb:"\u229F",minus:"\u2212",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",Mscr:"\u2133",mstpos:"\u223E",Mu:"\u039C",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natural:"\u266E",naturals:"\u2115",natur:"\u266E",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",Ncy:"\u041D",ncy:"\u043D",ndash:"\u2013",nearhk:"\u2924",nearr:"\u2197",neArr:"\u21D7",nearrow:"\u2197",ne:"\u2260",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:` +`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangle:"\u22EB",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",nprec:"\u2280",npreceq:"\u2AAF\u0338",npre:"\u2AAF\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",Ocirc:"\xD4",ocirc:"\xF4",ocir:"\u229A",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",orarr:"\u21BB",Or:"\u2A54",or:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",otimesas:"\u2A36",Otimes:"\u2A37",otimes:"\u2297",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",para:"\xB6",parallel:"\u2225",par:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plus:"+",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",popf:"\u{1D561}",Popf:"\u2119",pound:"\xA3",prap:"\u2AB7",Pr:"\u2ABB",pr:"\u227A",prcue:"\u227C",precapprox:"\u2AB7",prec:"\u227A",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",pre:"\u2AAF",prE:"\u2AB3",precsim:"\u227E",prime:"\u2032",Prime:"\u2033",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportional:"\u221D",Proportion:"\u2237",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",Qopf:"\u211A",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',QUOT:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",Rang:"\u27EB",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarr:"\u2192",Rarr:"\u21A0",rArr:"\u21D2",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",rAtail:"\u291C",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rBarr:"\u290F",RBarr:"\u2910",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",Re:"\u211C",rect:"\u25AD",reg:"\xAE",REG:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",Rfr:"\u211C",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrowBar:"\u21E5",rightarrow:"\u2192",RightArrow:"\u2192",Rightarrow:"\u21D2",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVectorBar:"\u2955",RightDownVector:"\u21C2",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTeeArrow:"\u21A6",RightTee:"\u22A2",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangleBar:"\u29D0",RightTriangle:"\u22B3",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVectorBar:"\u2954",RightUpVector:"\u21BE",RightVectorBar:"\u2953",RightVector:"\u21C0",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoustache:"\u23B1",rmoust:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",Ropf:"\u211D",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",rscr:"\u{1D4C7}",Rscr:"\u211B",rsh:"\u21B1",Rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",Sacute:"\u015A",sacute:"\u015B",sbquo:"\u201A",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",Sc:"\u2ABC",sc:"\u227B",sccue:"\u227D",sce:"\u2AB0",scE:"\u2AB4",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdotb:"\u22A1",sdot:"\u22C5",sdote:"\u2A66",searhk:"\u2925",searr:"\u2198",seArr:"\u21D8",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",SOFTcy:"\u042C",softcy:"\u044C",solbar:"\u233F",solb:"\u29C4",sol:"/",Sopf:"\u{1D54A}",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",square:"\u25A1",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squ:"\u25A1",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",Sub:"\u22D0",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",Subset:"\u22D0",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succapprox:"\u2AB8",succ:"\u227B",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",sum:"\u2211",Sum:"\u2211",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",sup:"\u2283",Sup:"\u22D1",supdot:"\u2ABE",supdsub:"\u2AD8",supE:"\u2AC6",supe:"\u2287",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",supset:"\u2283",Supset:"\u22D1",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swarr:"\u2199",swArr:"\u21D9",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",Tau:"\u03A4",tau:"\u03C4",tbrk:"\u23B4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",Tfr:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",tilde:"\u02DC",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",timesbar:"\u2A31",timesb:"\u22A0",times:"\xD7",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",topbot:"\u2336",topcir:"\u2AF1",top:"\u22A4",Topf:"\u{1D54B}",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",TRADE:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",Tscr:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",uarr:"\u2191",Uarr:"\u219F",uArr:"\u21D1",Uarrocir:"\u2949",Ubrcy:"\u040E",ubrcy:"\u045E",Ubreve:"\u016C",ubreve:"\u016D",Ucirc:"\xDB",ucirc:"\xFB",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21C5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",Ufr:"\u{1D518}",ufr:"\u{1D532}",Ugrave:"\xD9",ugrave:"\xF9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",Umacr:"\u016A",umacr:"\u016B",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1D54C}",uopf:"\u{1D566}",UpArrowBar:"\u2912",uparrow:"\u2191",UpArrow:"\u2191",Uparrow:"\u21D1",UpArrowDownArrow:"\u21C5",updownarrow:"\u2195",UpDownArrow:"\u2195",Updownarrow:"\u21D5",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",upsi:"\u03C5",Upsi:"\u03D2",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTeeArrow:"\u21A5",UpTee:"\u22A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",utdot:"\u22F0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",Uuml:"\xDC",uuml:"\xFC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",vArr:"\u21D5",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vBar:"\u2AE8",Vbar:"\u2AEB",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",vdash:"\u22A2",vDash:"\u22A8",Vdash:"\u22A9",VDash:"\u22AB",Vdashl:"\u2AE6",veebar:"\u22BB",vee:"\u2228",Vee:"\u22C1",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",Verbar:"\u2016",vert:"|",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",Wedge:"\u22C0",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xharr:"\u27F7",xhArr:"\u27FA",Xi:"\u039E",xi:"\u03BE",xlarr:"\u27F5",xlArr:"\u27F8",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrarr:"\u27F6",xrArr:"\u27F9",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",Yacute:"\xDD",yacute:"\xFD",YAcy:"\u042F",yacy:"\u044F",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042B",ycy:"\u044B",yen:"\xA5",Yfr:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",yuml:"\xFF",Yuml:"\u0178",Zacute:"\u0179",zacute:"\u017A",Zcaron:"\u017D",zcaron:"\u017E",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017B",zdot:"\u017C",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",Zeta:"\u0396",zeta:"\u03B6",zfr:"\u{1D537}",Zfr:"\u2128",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",Zopf:"\u2124",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"},Qn=/^#[xX]([A-Fa-f0-9]+)$/,Jn=/^#([0-9]+)$/,$n=/^([A-Za-z0-9]+)$/,lr=function(){function e(t){this.named=t}return e.prototype.parse=function(t){if(t){var r=t.match(Qn);if(r)return String.fromCharCode(parseInt(r[1],16));if(r=t.match(Jn),r)return String.fromCharCode(parseInt(r[1],10));if(r=t.match($n),r)return this.named[r[1]]}},e}(),Xn=/[\t\n\f ]/,Zn=/[A-Za-z]/,ti=/\r\n?/g;function _(e){return Xn.test(e)}function vs(e){return Zn.test(e)}function ei(e){return e.replace(ti,` +`)}var cr=function(){function e(t,r,s){s===void 0&&(s="precompile"),this.delegate=t,this.entityParser=r,this.mode=s,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var n=this.peek();if(n==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&n===` +`){var i=this.tagNameBuffer.toLowerCase();(i==="pre"||i==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var n=this.peek(),i=this.tagNameBuffer;n==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):n==="&"&&i!=="script"&&i!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(n))},tagOpen:function(){var n=this.consume();n==="!"?this.transitionTo("markupDeclarationOpen"):n==="/"?this.transitionTo("endTagOpen"):(n==="@"||n===":"||vs(n))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(n))},markupDeclarationOpen:function(){var n=this.consume();if(n==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var i=n.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();i==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var n=this.consume();_(n)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var n=this.consume();_(n)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(n.toLowerCase()))},doctypeName:function(){var n=this.consume();_(n)?this.transitionTo("afterDoctypeName"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(n.toLowerCase())},afterDoctypeName:function(){var n=this.consume();if(!_(n))if(n===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var i=n.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),a=i.toUpperCase()==="PUBLIC",o=i.toUpperCase()==="SYSTEM";(a||o)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),a?this.transitionTo("afterDoctypePublicKeyword"):o&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var n=this.peek();_(n)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):n==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):n==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):n===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var n=this.consume();n==='"'?this.transitionTo("afterDoctypePublicIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(n)},doctypePublicIdentifierSingleQuoted:function(){var n=this.consume();n==="'"?this.transitionTo("afterDoctypePublicIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(n)},afterDoctypePublicIdentifier:function(){var n=this.consume();_(n)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):n==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):n==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var n=this.consume();_(n)||(n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):n==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):n==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var n=this.consume();n==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(n)},doctypeSystemIdentifierSingleQuoted:function(){var n=this.consume();n==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(n)},afterDoctypeSystemIdentifier:function(){var n=this.consume();_(n)||n===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var n=this.consume();n==="-"?this.transitionTo("commentStartDash"):n===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(n),this.transitionTo("comment"))},commentStartDash:function(){var n=this.consume();n==="-"?this.transitionTo("commentEnd"):n===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var n=this.consume();n==="-"?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(n)},commentEndDash:function(){var n=this.consume();n==="-"?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+n),this.transitionTo("comment"))},commentEnd:function(){var n=this.consume();n===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+n),this.transitionTo("comment"))},tagName:function(){var n=this.consume();_(n)?this.transitionTo("beforeAttributeName"):n==="/"?this.transitionTo("selfClosingStartTag"):n===">"?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(n)},endTagName:function(){var n=this.consume();_(n)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):n==="/"?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):n===">"?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(n)},beforeAttributeName:function(){var n=this.peek();if(_(n)){this.consume();return}else n==="/"?(this.transitionTo("selfClosingStartTag"),this.consume()):n===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):n==="="?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(n)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var n=this.peek();_(n)?(this.transitionTo("afterAttributeName"),this.consume()):n==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):n==="="?(this.transitionTo("beforeAttributeValue"),this.consume()):n===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):n==='"'||n==="'"||n==="<"?(this.delegate.reportSyntaxError(n+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(n)):(this.consume(),this.delegate.appendToAttributeName(n))},afterAttributeName:function(){var n=this.peek();if(_(n)){this.consume();return}else n==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):n==="="?(this.consume(),this.transitionTo("beforeAttributeValue")):n===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(n))},beforeAttributeValue:function(){var n=this.peek();_(n)?this.consume():n==='"'?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):n==="'"?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):n===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(n))},attributeValueDoubleQuoted:function(){var n=this.consume();n==='"'?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):n==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(n)},attributeValueSingleQuoted:function(){var n=this.consume();n==="'"?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):n==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(n)},attributeValueUnquoted:function(){var n=this.peek();_(n)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):n==="/"?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):n==="&"?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):n===">"?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(n))},afterAttributeValueQuoted:function(){var n=this.peek();_(n)?(this.consume(),this.transitionTo("beforeAttributeName")):n==="/"?(this.consume(),this.transitionTo("selfClosingStartTag")):n===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){var n=this.peek();n===">"?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var n=this.consume();(n==="@"||n===":"||vs(n))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(n))}},this.reset()}return e.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},e.prototype.transitionTo=function(t){this.state=t},e.prototype.tokenize=function(t){this.reset(),this.tokenizePart(t),this.tokenizeEOF()},e.prototype.tokenizePart=function(t){for(this.input+=ei(t);this.index"||t==="style"&&this.input.substring(this.index,this.index+8)!==""||t==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},e}(),eo=function(){function e(t,r){r===void 0&&(r={}),this.options=r,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new cr(this,t,r.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},e.prototype.tokenizePart=function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var t=this.token;if(t===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return t;for(var r=0;r\xa0]/u,mo=new RegExp(si.source,"gu");var dr=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function ni(e){var t;return dr.has(e.toLowerCase())&&((t=e[0])==null?void 0:t.toLowerCase())===e[0]}function ce(e){return!!e&&e.length>0}function Nr(e){return e.length===0?void 0:e[e.length-1]}function ii(e){return e.length===0?void 0:e[0]}var pt=Object.freeze({line:1,column:0}),ai=Object.freeze({source:"(synthetic)",start:pt,end:pt}),gr=Object.freeze({source:"(nonexistent)",start:pt,end:pt}),ht=Object.freeze({source:"(broken)",start:pt,end:pt}),br=class{constructor(t){this._whens=t}first(t){for(let r of this._whens){let s=r.match(t);if(ce(s))return s[0]}return null}},Pe=class{get(t,r){let s=this._map.get(t);return s||(s=r(),this._map.set(t,s),s)}add(t,r){this._map.set(t,r)}match(t){let r=function(a){switch(a){case"Broken":case"InternalsSynthetic":case"NonExistent":return"IS_INVISIBLE";default:return a}}(t),s=[],n=this._map.get(r),i=this._map.get("MATCH_ANY");return n&&s.push(n),i&&s.push(i),s}constructor(){this._map=new Map}};function _s(e){return e(new yr).validate()}var yr=class{validate(){return(t,r)=>this.matchFor(t.kind,r.kind)(t,r)}matchFor(t,r){let s=this._whens.match(t);return ce(),new br(s).first(r)}when(t,r,s){return this._whens.get(t,()=>new Pe).add(r,s),this}constructor(){this._whens=new Pe}},kr=class e{static synthetic(t){let r=D.synthetic(t);return new e({loc:r,chars:t})}static load(t,r){return new e({loc:D.load(t,r[1]),chars:r[0]})}constructor(t){this.loc=t.loc,this.chars=t.chars}getString(){return this.chars}serialize(){return[this.chars,this.loc.serialize()]}},D=class e{static get NON_EXISTENT(){return new et("NonExistent",gr).wrap()}static load(t,r){return typeof r=="number"?e.forCharPositions(t,r,r):typeof r=="string"?e.synthetic(r):Array.isArray(r)?e.forCharPositions(t,r[0],r[1]):r==="NonExistent"?e.NON_EXISTENT:r==="Broken"?e.broken(ht):void ds(r)}static forHbsLoc(t,r){let s=new mt(t,r.start),n=new mt(t,r.end);return new oe(t,{start:s,end:n},r).wrap()}static forCharPositions(t,r,s){let n=new Tt(t,r),i=new Tt(t,s);return new ae(t,{start:n,end:i}).wrap()}static synthetic(t){return new et("InternalsSynthetic",gr,t).wrap()}static broken(t=ht){return new et("Broken",t).wrap()}constructor(t){var r;this.data=t,this.isInvisible=(r=t.kind)!=="CharPosition"&&r!=="HbsPosition"}getStart(){return this.data.getStart().wrap()}getEnd(){return this.data.getEnd().wrap()}get loc(){let t=this.data.toHbsSpan();return t===null?ht:t.toHbsLoc()}get module(){return this.data.getModule()}get startPosition(){return this.loc.start}get endPosition(){return this.loc.end}toJSON(){return this.loc}withStart(t){return J(t.data,this.data.getEnd())}withEnd(t){return J(this.data.getStart(),t.data)}asString(){return this.data.asString()}toSlice(t){let r=this.data.asString();return Ds&&t!==void 0&&r!==t&&console.warn(`unexpectedly found ${JSON.stringify(r)} when slicing source, but expected ${JSON.stringify(t)}`),new kr({loc:this,chars:t||r})}get start(){return this.loc.start}set start(t){this.data.locDidUpdate({start:t})}get end(){return this.loc.end}set end(t){this.data.locDidUpdate({end:t})}get source(){return this.module}collapse(t){switch(t){case"start":return this.getStart().collapsed();case"end":return this.getEnd().collapsed()}}extend(t){return J(this.data.getStart(),t.data.getEnd())}serialize(){return this.data.serialize()}slice({skipStart:t=0,skipEnd:r=0}){return J(this.getStart().move(t).data,this.getEnd().move(-r).data)}sliceStartChars({skipStart:t=0,chars:r}){return J(this.getStart().move(t).data,this.getStart().move(t+r).data)}sliceEndChars({skipEnd:t=0,chars:r}){return J(this.getEnd().move(t-r).data,this.getStart().move(-t).data)}},Ut,ae=class{constructor(t,r){Lt(this,Ut);this.source=t,this.charPositions=r,this.kind="CharPosition",Y(this,Ut,null)}wrap(){return new D(this)}asString(){return this.source.slice(this.charPositions.start.charPos,this.charPositions.end.charPos)}getModule(){return this.source.module}getStart(){return this.charPositions.start}getEnd(){return this.charPositions.end}locDidUpdate(){}toHbsSpan(){let t=I(this,Ut);if(t===null){let r=this.charPositions.start.toHbsPos(),s=this.charPositions.end.toHbsPos();t=Y(this,Ut,r===null||s===null?ft:new oe(this.source,{start:r,end:s}))}return t===ft?null:t}serialize(){let{start:{charPos:t},end:{charPos:r}}=this.charPositions;return t===r?t:[t,r]}toCharPosSpan(){return this}};Ut=new WeakMap;var ut,Et,oe=class{constructor(t,r,s=null){Lt(this,ut);Lt(this,Et);this.source=t,this.hbsPositions=r,this.kind="HbsPosition",Y(this,ut,null),Y(this,Et,s)}serialize(){let t=this.toCharPosSpan();return t===null?"Broken":t.wrap().serialize()}wrap(){return new D(this)}updateProvided(t,r){I(this,Et)&&(I(this,Et)[r]=t),Y(this,ut,null),Y(this,Et,{start:t,end:t})}locDidUpdate({start:t,end:r}){t!==void 0&&(this.updateProvided(t,"start"),this.hbsPositions.start=new mt(this.source,t,null)),r!==void 0&&(this.updateProvided(r,"end"),this.hbsPositions.end=new mt(this.source,r,null))}asString(){let t=this.toCharPosSpan();return t===null?"":t.asString()}getModule(){return this.source.module}getStart(){return this.hbsPositions.start}getEnd(){return this.hbsPositions.end}toHbsLoc(){return{start:this.hbsPositions.start.hbsPos,end:this.hbsPositions.end.hbsPos}}toHbsSpan(){return this}toCharPosSpan(){let t=I(this,ut);if(t===null){let r=this.hbsPositions.start.toCharPos(),s=this.hbsPositions.end.toCharPos();if(!r||!s)return t=Y(this,ut,ft),null;t=Y(this,ut,new ae(this.source,{start:r,end:s}))}return t===ft?null:t}};ut=new WeakMap,Et=new WeakMap;var et=class{constructor(t,r,s=null){this.kind=t,this.loc=r,this.string=s}serialize(){switch(this.kind){case"Broken":case"NonExistent":return this.kind;case"InternalsSynthetic":return this.string||""}}wrap(){return new D(this)}asString(){return this.string||""}locDidUpdate({start:t,end:r}){t!==void 0&&(this.loc.start=t),r!==void 0&&(this.loc.end=r)}getModule(){return"an unknown module"}getStart(){return new le(this.kind,this.loc.start)}getEnd(){return new le(this.kind,this.loc.end)}toCharPosSpan(){return this}toHbsSpan(){return null}toHbsLoc(){return ht}},J=_s(e=>e.when("HbsPosition","HbsPosition",(t,r)=>new oe(t.source,{start:t,end:r}).wrap()).when("CharPosition","CharPosition",(t,r)=>new ae(t.source,{start:t,end:r}).wrap()).when("CharPosition","HbsPosition",(t,r)=>{let s=r.toCharPos();return s===null?new et("Broken",ht).wrap():J(t,s)}).when("HbsPosition","CharPosition",(t,r)=>{let s=t.toCharPos();return s===null?new et("Broken",ht).wrap():J(s,r)}).when("IS_INVISIBLE","MATCH_ANY",t=>new et(t.kind,ht).wrap()).when("MATCH_ANY","IS_INVISIBLE",(t,r)=>new et(r.kind,ht).wrap())),ft="BROKEN",Mt=class e{static forHbsPos(t,r){return new mt(t,r,null).wrap()}static broken(t=pt){return new le("Broken",t).wrap()}constructor(t){this.data=t}get offset(){let t=this.data.toCharPos();return t===null?null:t.offset}eql(t){return oi(this.data,t.data)}until(t){return J(this.data,t.data)}move(t){let r=this.data.toCharPos();if(r===null)return e.broken();{let s=r.offset+t;return r.source.validate(s)?new Tt(r.source,s).wrap():e.broken()}}collapsed(){return J(this.data,this.data)}toJSON(){return this.data.toJSON()}},Tt=class{constructor(t,r){this.source=t,this.charPos=r,this.kind="CharPosition",this._locPos=null}toCharPos(){return this}toJSON(){let t=this.toHbsPos();return t===null?pt:t.toJSON()}wrap(){return new Mt(this)}get offset(){return this.charPos}toHbsPos(){let t=this._locPos;if(t===null){let r=this.source.hbsPosFor(this.charPos);this._locPos=t=r===null?ft:new mt(this.source,r,this.charPos)}return t===ft?null:t}},mt=class{constructor(t,r,s=null){this.source=t,this.hbsPos=r,this.kind="HbsPosition",this._charPos=s===null?null:new Tt(t,s)}toCharPos(){let t=this._charPos;if(t===null){let r=this.source.charPosFor(this.hbsPos);this._charPos=t=r===null?ft:new Tt(this.source,r)}return t===ft?null:t}toJSON(){return this.hbsPos}wrap(){return new Mt(this)}toHbsPos(){return this}},le=class{constructor(t,r){this.kind=t,this.pos=r}toCharPos(){return null}toJSON(){return this.pos}wrap(){return new Mt(this)}get offset(){return null}},oi=_s(e=>e.when("HbsPosition","HbsPosition",({hbsPos:t},{hbsPos:r})=>t.column===r.column&&t.line===r.line).when("CharPosition","CharPosition",({charPos:t},{charPos:r})=>t===r).when("CharPosition","HbsPosition",({offset:t},r)=>{var s;return t===((s=r.toCharPos())==null?void 0:s.offset)}).when("HbsPosition","CharPosition",(t,{offset:r})=>{var s;return((s=t.toCharPos())==null?void 0:s.offset)===r}).when("MATCH_ANY","MATCH_ANY",()=>!1)),wt=class e{static from(t,r={}){var s;return new e(t,(s=r.meta)==null?void 0:s.moduleName)}constructor(t,r="an unknown module"){this.source=t,this.module=r}validate(t){return t>=0&&t<=this.source.length}slice(t,r){return this.source.slice(t,r)}offsetFor(t,r){return Mt.forHbsPos(this,{line:t,column:r})}spanFor({start:t,end:r}){return D.forHbsLoc(this,{start:{line:t.line,column:t.column},end:{line:r.line,column:r.column}})}hbsPosFor(t){let r=0,s=0;if(t>this.source.length)return null;for(;;){let n=this.source.indexOf(` +`,s);if(t<=n||n===-1)return{line:r+1,column:t-s};r+=1,s=n+1}}charPosFor(t){let{line:r,column:s}=t,n=this.source.length,i=0,a=0;for(;ao)return o;if(Ds){let c=this.hbsPosFor(a+s);c.line,c.column}return a+s}if(o===-1)return 0;i+=1,a=o+1}return n}};function v(e,t){let{module:r,loc:s}=t,{line:n,column:i}=s.start,a=t.asString(),o=a?` + +| +| ${a.split(` +`).join(` +| `)} +| + +`:"",c=new Error(`${e}: ${o}(error occurred in '${r}' @ line ${n} : column ${i})`);return c.name="SyntaxError",c.location=t,c.code=a,c}var li={Template:["body"],Block:["body"],MustacheStatement:["path","params","hash"],BlockStatement:["path","params","hash","program","inverse"],ElementModifierStatement:["path","params","hash"],CommentStatement:[],MustacheCommentStatement:[],ElementNode:["attributes","modifiers","children","comments"],AttrNode:["value"],TextNode:[],ConcatStatement:["parts"],SubExpression:["path","params","hash"],PathExpression:[],StringLiteral:[],BooleanLiteral:[],NumberLiteral:[],NullLiteral:[],UndefinedLiteral:[],Hash:["pairs"],HashPair:["value"]},Cr=function(){function e(t,r,s,n){let i=Error.call(this,t);this.key=n,this.message=t,this.node=r,this.parent=s,i.stack&&(this.stack=i.stack)}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}();function Ts(e,t,r){return new Cr("Cannot remove a node unless it is part of an array",e,t,r)}function ci(e,t,r){return new Cr("Cannot replace a node with multiple nodes unless it is part of an array",e,t,r)}function Ns(e,t){return new Cr("Replacing and removing in key handlers is not yet supported.",e,null,t)}var zt=class{constructor(t,r=null,s=null){this.node=t,this.parent=r,this.parentKey=s}get parentNode(){return this.parent?this.parent.node:null}parents(){return{[Symbol.iterator]:()=>new Sr(this)}}},Sr=class{constructor(t){this.path=t}next(){return this.path.parent?(this.path=this.path.parent,{done:!1,value:this.path}):{done:!0,value:null}}};function Os(e){return typeof e=="function"?e:e.enter}function Bs(e){return typeof e=="function"?void 0:e.exit}function Ae(e,t){let r,s,n,{node:i,parent:a,parentKey:o}=t,c=function(h,p){if(h.Program&&(p==="Template"&&!h.Template||p==="Block"&&!h.Block))return h.Program;let m=h[p];return m!==void 0?m:h.All}(e,i.type);if(c!==void 0&&(r=Os(c),s=Bs(c)),r!==void 0&&(n=r(i,t)),n!=null){if(JSON.stringify(i)!==JSON.stringify(n))return Array.isArray(n)?(Is(e,n,a,o),n):Ae(e,new zt(n,a,o))||n;n=void 0}if(n===void 0){let h=li[i.type];for(let p=0;ptypeof t=="string"?f.var({name:t,loc:D.synthetic(t)}):t)}function Ps(e=[],t=[],r=!1,s){return f.blockItself({body:e,params:qs(t),chained:r,loc:T(s||null)})}function As(e=[],t=[],r){return f.template({body:e,blockParams:t,loc:T(r||null)})}function T(...e){if(e.length===1){let t=e[0];return t&&typeof t=="object"?D.forHbsLoc(hr(),t):D.forHbsLoc(hr(),ai)}{let[t,r,s,n,i]=e,a=i?new wt("",i):hr();return D.forHbsLoc(a,{start:{line:t,column:r},end:{line:s||t,column:n||r}})}}var fi={mustache:function(e,t=[],r=ie([]),s=!1,n,i){return f.mustache({path:ct(e),params:t,hash:r,trusting:s,strip:i,loc:T(n||null)})},block:function(e,t,r,s,n=null,i,a,o,c){let h,p=null;return h=s.type==="Template"?f.blockItself({params:qs(s.blockParams),body:s.body,loc:s.loc}):s,(n==null?void 0:n.type)==="Template"?(n.blockParams.length,p=f.blockItself({params:[],body:n.body,loc:n.loc})):p=n,f.block({path:ct(e),params:t||[],hash:r||ie([]),defaultBlock:h,elseBlock:p,loc:T(i||null),openStrip:a,inverseStrip:o,closeStrip:c})},comment:function(e,t){return f.comment({value:e,loc:T(t||null)})},mustacheComment:function(e,t){return f.mustacheComment({value:e,loc:T(t||null)})},element:function(e,t={}){let r,s,{attrs:n,blockParams:i,modifiers:a,comments:o,children:c,openTag:h,closeTag:p,loc:m}=t;typeof e=="string"?e.endsWith("/")?(r=ct(e.slice(0,-1)),s=!0):r=ct(e):"type"in e?(e.type,e.type,r=e):"path"in e?(e.path.type,e.path.type,r=e.path,s=e.selfClosing):(r=ct(e.name),s=e.selfClosing);let S=i==null?void 0:i.map(E=>typeof E=="string"?xs(E):E),y=null;return p?y=T(p):p===void 0&&(y=s||ni(r.original)?null:T(null)),f.element({path:r,selfClosing:s||!1,attributes:n||[],params:S||[],modifiers:a||[],comments:o||[],children:c||[],openTag:T(h||null),closeTag:y,loc:T(m||null)})},elementModifier:function(e,t,r,s){return f.elementModifier({path:ct(e),params:t||[],hash:r||ie([]),loc:T(s||null)})},attr:function(e,t,r){return f.attr({name:e,value:t,loc:T(r||null)})},text:function(e="",t){return f.text({chars:e,loc:T(t||null)})},sexpr:function(e,t=[],r=ie([]),s){return f.sexpr({path:ct(e),params:t,hash:r,loc:T(s||null)})},concat:function(e,t){if(!ce(e))throw new Error("b.concat requires at least one part");return f.concat({parts:e,loc:T(t||null)})},hash:ie,pair:function(e,t,r){return f.pair({key:e,value:t,loc:T(r||null)})},literal:xe,program:function(e,t,r){return t&&t.length?Ps(e,t,!1,r):As(e,[],r)},blockItself:Ps,template:As,loc:T,pos:function(e,t){return f.pos({line:e,column:t})},path:ct,fullPath:function(e,t=[],r){return f.path({head:e,tail:t,loc:T(r||null)})},head:function(e,t){return f.head({original:e,loc:T(t||null)})},at:function(e,t){return f.atName({name:e,loc:T(t||null)})},var:xs,this:function(e){return f.this({loc:T(e||null)})},string:pr("StringLiteral"),boolean:pr("BooleanLiteral"),number:pr("NumberLiteral"),undefined:()=>xe("UndefinedLiteral",void 0),null:()=>xe("NullLiteral",null)};function pr(e){return function(t,r){return xe(e,t,r)}}var Ce={close:!1,open:!1},f=new class{pos({line:e,column:t}){return{line:e,column:t}}blockItself({body:e,params:t,chained:r=!1,loc:s}){return{type:"Block",body:e,params:t,get blockParams(){return this.params.map(n=>n.name)},set blockParams(n){this.params=n.map(i=>f.var({name:i,loc:D.synthetic(i)}))},chained:r,loc:s}}template({body:e,blockParams:t,loc:r}){return{type:"Template",body:e,blockParams:t,loc:r}}mustache({path:e,params:t,hash:r,trusting:s,loc:n,strip:i=Ce}){return function({path:a,params:o,hash:c,trusting:h,strip:p,loc:m}){let S={type:"MustacheStatement",path:a,params:o,hash:c,trusting:h,strip:p,loc:m};return Object.defineProperty(S,"escaped",{enumerable:!1,get(){return!this.trusting},set(y){this.trusting=!y}}),S}({path:e,params:t,hash:r,trusting:s,strip:i,loc:n})}block({path:e,params:t,hash:r,defaultBlock:s,elseBlock:n=null,loc:i,openStrip:a=Ce,inverseStrip:o=Ce,closeStrip:c=Ce}){return{type:"BlockStatement",path:e,params:t,hash:r,program:s,inverse:n,loc:i,openStrip:a,inverseStrip:o,closeStrip:c}}comment({value:e,loc:t}){return{type:"CommentStatement",value:e,loc:t}}mustacheComment({value:e,loc:t}){return{type:"MustacheCommentStatement",value:e,loc:t}}concat({parts:e,loc:t}){return{type:"ConcatStatement",parts:e,loc:t}}element({path:e,selfClosing:t,attributes:r,modifiers:s,params:n,comments:i,children:a,openTag:o,closeTag:c,loc:h}){let p=t;return{type:"ElementNode",path:e,attributes:r,modifiers:s,params:n,comments:i,children:a,openTag:o,closeTag:c,loc:h,get tag(){return this.path.original},set tag(m){this.path.original=m},get blockParams(){return this.params.map(m=>m.name)},set blockParams(m){this.params=m.map(S=>f.var({name:S,loc:D.synthetic(S)}))},get selfClosing(){return p},set selfClosing(m){p=m,this.closeTag=m?null:D.synthetic(``)}}}elementModifier({path:e,params:t,hash:r,loc:s}){return{type:"ElementModifierStatement",path:e,params:t,hash:r,loc:s}}attr({name:e,value:t,loc:r}){return{type:"AttrNode",name:e,value:t,loc:r}}text({chars:e,loc:t}){return{type:"TextNode",chars:e,loc:t}}sexpr({path:e,params:t,hash:r,loc:s}){return{type:"SubExpression",path:e,params:t,hash:r,loc:s}}path({head:e,tail:t,loc:r}){return function({head:s,tail:n,loc:i}){let a={type:"PathExpression",head:s,tail:n,get original(){return[this.head.original,...this.tail].join(".")},set original(o){let[c,...h]=o.split(".");this.head=fi.head(c,this.head.loc),this.tail=h},loc:i};return Object.defineProperty(a,"parts",{enumerable:!1,get(){let o=this.original.split(".");return o[0]==="this"?o.shift():o[0].startsWith("@")&&(o[0]=o[0].slice(1)),Object.freeze(o)},set(o){var h;let c=[...o];c[0]==="this"||(h=c[0])!=null&&h.startsWith("@")||(this.head.type==="ThisHead"?c.unshift("this"):this.head.type==="AtHead"&&(c[0]=`@${c[0]}`)),this.original=c.join(".")}}),Object.defineProperty(a,"this",{enumerable:!1,get(){return this.head.type==="ThisHead"}}),Object.defineProperty(a,"data",{enumerable:!1,get(){return this.head.type==="AtHead"}}),a}({head:e,tail:t,loc:r})}head({original:e,loc:t}){return e==="this"?this.this({loc:t}):e[0]==="@"?this.atName({name:e,loc:t}):this.var({name:e,loc:t})}this({loc:e}){return{type:"ThisHead",get original(){return"this"},loc:e}}atName({name:e,loc:t}){let r="",s={type:"AtHead",get name(){return r},set name(n){n[0],n.indexOf("."),r=n},get original(){return this.name},set original(n){this.name=n},loc:t};return s.name=e,s}var({name:e,loc:t}){let r="",s={type:"VarHead",get name(){return r},set name(n){n[0],n.indexOf("."),r=n},get original(){return this.name},set original(n){this.name=n},loc:t};return s.name=e,s}hash({pairs:e,loc:t}){return{type:"Hash",pairs:e,loc:t}}pair({key:e,value:t,loc:r}){return{type:"HashPair",key:e,value:t,loc:r}}literal({type:e,value:t,loc:r}){return function({type:s,value:n,loc:i}){let a={type:s,value:n,loc:i};return Object.defineProperty(a,"original",{enumerable:!1,get(){return this.value},set(o){this.value=o}}),a}({type:e,value:t,loc:r})}},vr=class{constructor(t,r=new lr(Es),s="precompile"){this.elementStack=[],this.currentAttribute=null,this.currentNode=null,this.source=t,this.lines=t.source.split(/\r\n?|\n/u),this.tokenizer=new cr(this,r,s)}offset(){let{line:t,column:r}=this.tokenizer;return this.source.offsetFor(t,r)}pos({line:t,column:r}){return this.source.offsetFor(t,r)}finish(t){return tr({},t,{loc:t.start.until(this.offset())})}get currentAttr(){return this.currentAttribute}get currentTag(){let t=this.currentNode;return t&&(t.type==="StartTag"||t.type),t}get currentStartTag(){let t=this.currentNode;return t&&t.type,t}get currentEndTag(){let t=this.currentNode;return t&&t.type,t}get currentComment(){let t=this.currentNode;return t&&t.type,t}get currentData(){let t=this.currentNode;return t&&t.type,t}acceptNode(t){return this[t.type](t)}currentElement(){return Nr(this.elementStack)}sourceForNode(t,r){let s,n,i,a=t.loc.start.line-1,o=a-1,c=t.loc.start.column,h=[];for(r?(n=r.loc.end.line-1,i=r.loc.end.column):(n=t.loc.end.line-1,i=t.loc.end.column);o=C?-1:y.indexOf(x,E),w===-1||w+x.length>C?(E=C,U=this.source.spanFor(gr)):(E=w,U=S.sliceStartChars({skipStart:E,chars:x.length}),E+=x.length),o.push(f.var({name:x,loc:U}))}}else a=Ls(this.source,t,i);let c=this.Program(a.program,o),h=a.inverse?this.Program(a.inverse,[]):null,p=f.block({path:r,params:s,hash:n,defaultBlock:c,elseBlock:h,loc:this.source.spanFor(t.loc),openStrip:t.openStrip,inverseStrip:t.inverseStrip,closeStrip:t.closeStrip});Ht(this.currentElement(),p)}MustacheStatement(t){var o;(o=this.pendingError)==null||o.mustache(this.source.spanFor(t.loc));let{tokenizer:r}=this;if(r.state==="comment")return void this.appendToCommentData(this.sourceForNode(t));let s,{escaped:n,loc:i,strip:a}=t;if("original"in t.path&&t.path.original==="...attributes")throw v("Illegal use of ...attributes",this.source.spanFor(t.loc));if(Rs(t.path))s=f.mustache({path:this.acceptNode(t.path),params:[],hash:f.hash({pairs:[],loc:this.source.spanFor(t.path.loc).collapse("end")}),trusting:!n,loc:this.source.spanFor(i),strip:a});else{let{path:c,params:h,hash:p}=fr(this,t);s=f.mustache({path:c,params:h,hash:p,trusting:!n,loc:this.source.spanFor(i),strip:a})}switch(r.state){case"tagOpen":case"tagName":throw v("Cannot use mustaches in an elements tagname",s.loc);case"beforeAttributeName":mr(this.currentStartTag,s);break;case"attributeName":case"afterAttributeName":this.beginAttributeValue(!1),this.finishAttributeValue(),mr(this.currentStartTag,s),r.transitionTo("beforeAttributeName");break;case"afterAttributeValueQuoted":mr(this.currentStartTag,s),r.transitionTo("beforeAttributeName");break;case"beforeAttributeValue":this.beginAttributeValue(!1),this.appendDynamicAttributeValuePart(s),r.transitionTo("attributeValueUnquoted");break;case"attributeValueDoubleQuoted":case"attributeValueSingleQuoted":case"attributeValueUnquoted":this.appendDynamicAttributeValuePart(s);break;default:Ht(this.currentElement(),s)}return s}appendDynamicAttributeValuePart(t){this.finalizeTextPart();let r=this.currentAttr;r.isDynamic=!0,r.parts.push(t)}finalizeTextPart(){let t=this.currentAttr.currentPart;t!==null&&(this.currentAttr.parts.push(t),this.startTextPart())}startTextPart(){this.currentAttr.currentPart=null}ContentStatement(t){(function(r,s){let n=s.loc.start.line,i=s.loc.start.column,a=function(o,c){if(c==="")return{lines:o.split(` +`).length-1,columns:0};let[h]=o.split(c),p=h.split(/\n/u),m=p.length-1;return{lines:m,columns:p[m].length}}(s.original,s.value);n+=a.lines,a.lines?i=a.columns:i+=a.columns,r.line=n,r.column=i})(this.tokenizer,t),this.tokenizer.tokenizePart(t.value),this.tokenizer.flushData()}CommentStatement(t){let{tokenizer:r}=this;if(r.state==="comment")return this.appendToCommentData(this.sourceForNode(t)),null;let{value:s,loc:n}=t,i=f.mustacheComment({value:s,loc:this.source.spanFor(n)});switch(r.state){case"beforeAttributeName":case"afterAttributeName":this.currentStartTag.comments.push(i);break;case"beforeData":case"data":Ht(this.currentElement(),i);break;default:throw v(`Using a Handlebars comment when in the \`${r.state}\` state is not supported`,this.source.spanFor(t.loc))}return i}PartialStatement(t){throw v("Handlebars partials are not supported",this.source.spanFor(t.loc))}PartialBlockStatement(t){throw v("Handlebars partial blocks are not supported",this.source.spanFor(t.loc))}Decorator(t){throw v("Handlebars decorators are not supported",this.source.spanFor(t.loc))}DecoratorBlock(t){throw v("Handlebars decorator blocks are not supported",this.source.spanFor(t.loc))}SubExpression(t){let{path:r,params:s,hash:n}=fr(this,t);return f.sexpr({path:r,params:s,hash:n,loc:this.source.spanFor(t.loc)})}PathExpression(t){let{original:r}=t,s;if(r.indexOf("/")!==-1){if(r.slice(0,2)==="./")throw v('Using "./" is not supported in Glimmer and unnecessary',this.source.spanFor(t.loc));if(r.slice(0,3)==="../")throw v('Changing context using "../" is not supported in Glimmer',this.source.spanFor(t.loc));if(r.indexOf(".")!==-1)throw v("Mixing '.' and '/' in paths is not supported in Glimmer; use only '.' to separate property paths",this.source.spanFor(t.loc));s=[t.parts.join("/")]}else{if(r===".")throw v("'.' is not a supported path in Glimmer; check for a path with a trailing '.'",this.source.spanFor(t.loc));s=t.parts}let n,i=!1;if(/^this(?:\..+)?$/u.test(r)&&(i=!0),i)n=f.this({loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+4}})});else if(t.data){let a=s.shift();if(a===void 0)throw v("Attempted to parse a path expression, but it was not valid. Paths beginning with @ must start with a-z.",this.source.spanFor(t.loc));n=f.atName({name:`@${a}`,loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+a.length+1}})})}else{let a=s.shift();if(a===void 0)throw v("Attempted to parse a path expression, but it was not valid. Paths must start with a-z or A-Z.",this.source.spanFor(t.loc));n=f.var({name:a,loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+a.length}})})}return f.path({head:n,tail:s,loc:this.source.spanFor(t.loc)})}Hash(t){let r=t.pairs.map(s=>f.pair({key:s.key,value:this.acceptNode(s.value),loc:this.source.spanFor(s.loc)}));return f.hash({pairs:r,loc:this.source.spanFor(t.loc)})}StringLiteral(t){return f.literal({type:"StringLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}BooleanLiteral(t){return f.literal({type:"BooleanLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}NumberLiteral(t){return f.literal({type:"NumberLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}UndefinedLiteral(t){return f.literal({type:"UndefinedLiteral",value:void 0,loc:this.source.spanFor(t.loc)})}NullLiteral(t){return f.literal({type:"NullLiteral",value:null,loc:this.source.spanFor(t.loc)})}constructor(...t){super(...t),this.pendingError=null}};function fr(e,t){let r;switch(t.path.type){case"PathExpression":r=e.PathExpression(t.path);break;case"SubExpression":r=e.SubExpression(t.path);break;case"StringLiteral":case"UndefinedLiteral":case"NullLiteral":case"NumberLiteral":case"BooleanLiteral":{let i;throw i=t.path.type==="BooleanLiteral"?t.path.original.toString():t.path.type==="StringLiteral"?`"${t.path.original}"`:t.path.type==="NullLiteral"?"null":t.path.type==="NumberLiteral"?t.path.value.toString():"undefined",v(`${t.path.type} "${t.path.type==="StringLiteral"?t.path.original:i}" cannot be called as a sub-expression, replace (${i}) with ${i}`,e.source.spanFor(t.path.loc))}}let s=t.params.map(i=>e.acceptNode(i)),n=ce(s)?Nr(s).loc:r.loc;return{path:r,params:s,hash:t.hash?e.Hash(t.hash):f.hash({pairs:[],loc:e.source.spanFor(n).collapse("end")})}}function mr(e,t){let{path:r,params:s,hash:n,loc:i}=t;if(Rs(r)){let o=`{{${function(c){return c.type==="UndefinedLiteral"?"undefined":JSON.stringify(c.value)}(r)}}}`;throw v(`In <${e.name} ... ${o} ..., ${o} is not a valid modifier`,t.loc)}let a=f.elementModifier({path:r,params:s,hash:n,loc:i});e.modifiers.push(a)}function Ls(e,t,r){if(!t.program.loc){let n=G(!1,t.program.body,0),i=G(!1,t.program.body,-1);if(n&&i)t.program.loc={...n.loc,end:i.loc.end};else{let a=e.spanFor(t.loc);t.program.loc=r.withEnd(a.getEnd())}}let s=e.spanFor(t.program.loc).getEnd();return t.inverse&&!t.inverse.loc&&(t.inverse.loc=s.collapsed()),t}function Ft(e){return/[\t\n\f ]/u.test(e)}var wr=class extends Er{reset(){this.currentNode=null}beginComment(){this.currentNode={type:"CommentStatement",value:"",start:this.source.offsetFor(this.tagOpenLine,this.tagOpenColumn)}}appendToCommentData(t){this.currentComment.value+=t}finishComment(){Ht(this.currentElement(),f.comment(this.finish(this.currentComment)))}beginData(){this.currentNode={type:"TextNode",chars:"",start:this.offset()}}appendToData(t){this.currentData.chars+=t}finishData(){Ht(this.currentElement(),f.text(this.finish(this.currentData)))}tagOpen(){this.tagOpenLine=this.tokenizer.line,this.tagOpenColumn=this.tokenizer.column}beginStartTag(){this.currentNode={type:"StartTag",name:"",nameStart:null,nameEnd:null,attributes:[],modifiers:[],comments:[],params:[],selfClosing:!1,start:this.source.offsetFor(this.tagOpenLine,this.tagOpenColumn)}}beginEndTag(){this.currentNode={type:"EndTag",name:"",start:this.source.offsetFor(this.tagOpenLine,this.tagOpenColumn)}}finishTag(){let t=this.finish(this.currentTag);if(t.type==="StartTag"){if(this.finishStartTag(),t.name===":")throw v("Invalid named block named detected, you may have created a named block without a name, or you may have began your name with a number. Named blocks must have names that are at least one character long, and begin with a lower case letter",this.source.spanFor({start:this.currentTag.start.toJSON(),end:this.offset().toJSON()}));(dr.has(t.name)||t.selfClosing)&&this.finishEndTag(!0)}else t.type,t.type,this.finishEndTag(!1)}finishStartTag(){let{name:t,nameStart:r,nameEnd:s}=this.currentStartTag,n=r.until(s),[i,...a]=t.split("."),o=f.path({head:f.head({original:i,loc:n.sliceStartChars({chars:i.length})}),tail:a,loc:n}),{attributes:c,modifiers:h,comments:p,params:m,selfClosing:S,loc:y}=this.finish(this.currentStartTag),E=f.element({path:o,selfClosing:S,attributes:c,modifiers:h,comments:p,params:m,children:[],openTag:y,closeTag:S?null:D.broken(),loc:y});this.elementStack.push(E)}finishEndTag(t){let{start:r}=this.currentTag,s=this.finish(this.currentTag),n=this.elementStack.pop();this.validateEndTag(s,n,t);let i=this.currentElement();t?n.closeTag=null:n.selfClosing?n.closeTag:n.closeTag=r.until(this.offset()),n.loc=n.loc.withEnd(this.offset()),Ht(i,f.element(n))}markTagAsSelfClosing(){let t=this.currentTag;if(t.type!=="StartTag")throw v("Invalid end tag: closing tag must not be self-closing",this.source.spanFor({start:t.start.toJSON(),end:this.offset().toJSON()}));t.selfClosing=!0}appendToTagName(t){let r=this.currentTag;if(r.name+=t,r.type==="StartTag"){let s=this.offset();r.nameStart===null&&(r.nameEnd,r.nameStart=s.move(-1)),r.nameEnd=s}}beginAttribute(){let t=this.offset();this.currentAttribute={name:"",parts:[],currentPart:null,isQuoted:!1,isDynamic:!1,start:t,valueSpan:t.collapsed()}}appendToAttributeName(t){this.currentAttr.name+=t,this.currentAttr.name==="as"&&this.parsePossibleBlockParams()}beginAttributeValue(t){this.currentAttr.isQuoted=t,this.startTextPart(),this.currentAttr.valueSpan=this.offset().collapsed()}appendToAttributeValue(t){let r=this.currentAttr.parts,s=r[r.length-1],n=this.currentAttr.currentPart;if(n)n.chars+=t,n.loc=n.loc.withEnd(this.offset());else{let i=this.offset();i=t===` +`?s?s.loc.getEnd():this.currentAttr.valueSpan.getStart():i.move(-1),this.currentAttr.currentPart=f.text({chars:t,loc:i.collapsed()})}}finishAttributeValue(){this.finalizeTextPart();let t=this.currentTag,r=this.offset();if(t.type==="EndTag")throw v("Invalid end tag: closing tag must not have attributes",this.source.spanFor({start:t.start.toJSON(),end:r.toJSON()}));let{name:s,parts:n,start:i,isQuoted:a,isDynamic:o,valueSpan:c}=this.currentAttr;if(s.startsWith("|")&&n.length===0&&!a&&!o)throw v("Invalid block parameters syntax: block parameters must be preceded by the `as` keyword",i.until(i.move(s.length)));let h=this.assembleAttributeValue(n,a,o,i.until(r));h.loc=c.withEnd(r);let p=f.attr({name:s,value:h,loc:i.until(r)});this.currentStartTag.attributes.push(p)}parsePossibleBlockParams(){let t=/[!"#%&'()*+./;<=>@[\\\]^`{|}~]/u;this.tokenizer.state;let r=this.currentStartTag,s=this.currentAttr,n={state:"PossibleAs"},i={PossibleAs:o=>{if(n.state,Ft(o))n={state:"BeforeStartPipe"},this.tokenizer.transitionTo("afterAttributeName"),this.tokenizer.consume();else{if(o==="|")throw v('Invalid block parameters syntax: expecting at least one space character between "as" and "|"',s.start.until(this.offset().move(1)));n={state:"Done"}}},BeforeStartPipe:o=>{n.state,Ft(o)?this.tokenizer.consume():o==="|"?(n={state:"BeforeBlockParamName"},this.tokenizer.transitionTo("beforeAttributeName"),this.tokenizer.consume()):n={state:"Done"}},BeforeBlockParamName:o=>{if(n.state,Ft(o))this.tokenizer.consume();else if(o==="")n={state:"Done"},this.pendingError={mustache(c){throw v("Invalid block parameters syntax: mustaches cannot be used inside parameters list",c)},eof(c){throw v('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}};else if(o==="|"){if(r.params.length===0)throw v("Invalid block parameters syntax: empty parameters list, expecting at least one identifier",s.start.until(this.offset().move(1)));n={state:"AfterEndPipe"},this.tokenizer.consume()}else{if(o===">"||o==="/")throw v('Invalid block parameters syntax: incomplete parameters list, expecting "|" but the tag was closed prematurely',s.start.until(this.offset().move(1)));n={state:"BlockParamName",name:o,start:this.offset()},this.tokenizer.consume()}},BlockParamName:o=>{if(n.state,o==="")n={state:"Done"},this.pendingError={mustache(c){throw v("Invalid block parameters syntax: mustaches cannot be used inside parameters list",c)},eof(c){throw v('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}};else if(o==="|"||Ft(o)){let c=n.start.until(this.offset());if(n.name==="this"||t.test(n.name))throw v(`Invalid block parameters syntax: invalid identifier name \`${n.name}\``,c);r.params.push(f.var({name:n.name,loc:c})),n=o==="|"?{state:"AfterEndPipe"}:{state:"BeforeBlockParamName"},this.tokenizer.consume()}else{if(o===">"||o==="/")throw v('Invalid block parameters syntax: expecting "|" but the tag was closed prematurely',s.start.until(this.offset().move(1)));n.name+=o,this.tokenizer.consume()}},AfterEndPipe:o=>{n.state,Ft(o)?this.tokenizer.consume():o===""?(n={state:"Done"},this.pendingError={mustache(c){throw v("Invalid block parameters syntax: modifiers cannot follow parameters list",c)},eof(c){throw v('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}}):o===">"||o==="/"?n={state:"Done"}:(n={state:"Error",message:'Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',start:this.offset()},this.tokenizer.consume())},Error:o=>{if(n.state,o===""||o==="/"||o===">"||Ft(o))throw v(n.message,n.start.until(this.offset()));this.tokenizer.consume()},Done:()=>{}},a;do a=this.tokenizer.peek(),i[n.state](a);while(n.state!=="Done"&&a!=="");n.state}reportSyntaxError(t){throw v(t,this.offset().collapsed())}assembleConcatenatedValue(t){let r=ii(t),s=Nr(t);return f.concat({parts:t,loc:this.source.spanFor(r.loc).extend(this.source.spanFor(s.loc))})}validateEndTag(t,r,s){if(dr.has(t.name)&&!s)throw v(`<${t.name}> elements do not need end tags. You should remove it`,t.loc);if(r.type!=="ElementNode")throw v(`Closing tag without an open tag`,t.loc);if(r.tag!==t.name)throw v(`Closing tag did not match last open tag <${r.tag}> (on line ${r.loc.startPosition.line})`,t.loc)}assembleAttributeValue(t,r,s,n){if(s){if(r)return this.assembleConcatenatedValue(t);{let[i,a]=t;if(a===void 0||a.type==="TextNode"&&a.chars==="/")return i;throw v("An unquoted attribute value must be a string or a mustache, preceded by whitespace or a '=' character, and followed by whitespace, a '>' character, or '/>'",n)}}return ce(t)?t[0]:f.text({chars:"",loc:n})}constructor(...t){super(...t),this.tagOpenLine=0,this.tagOpenColumn=0}},mi={},Tr=class extends lr{constructor(){super({})}parse(){}};function Vs(e,t={}){var c,h,p;let r,s,n,i=t.mode||"precompile";typeof e=="string"?(r=new wt(e,(c=t.meta)==null?void 0:c.moduleName),s=i==="codemod"?Te(e,t.parseOptions):or(e,t.parseOptions)):e instanceof wt?(r=e,s=i==="codemod"?Te(e.source,t.parseOptions):or(e.source,t.parseOptions)):(r=new wt("",(h=t.meta)==null?void 0:h.moduleName),s=e),i==="codemod"&&(n=new Tr);let a=D.forCharPositions(r,0,r.source.length);s.loc={source:"(program)",start:a.startPosition,end:a.endPosition};let o=new wr(r,n,i).parse(s,t.locals??[]);if((p=t.plugins)!=null&&p.ast)for(let m of t.plugins.ast)pi(o,m(tr({},t,{syntax:mi},{plugins:void 0})).visitor);return o}var di={resolution:()=>Ne.GetStrictKeyword,serialize:()=>"Strict",isAngleBracket:!1},go={...di,isAngleBracket:!0};var Le=` +`,Fs="\r",Hs=function(){function e(t){this.length=t.length;for(var r=[0],s=0;sthis.length)return null;for(var r=0,s=this.offsets;s[r+1]<=t;)r++;var n=t-s[r];return{line:r,column:n}},e.prototype.indexForLocation=function(t){var r=t.line,s=t.column;return r<0||r>=this.offsets.length||s<0||s>this.lengthOfLine(r)?null:this.offsets[r]+s},e.prototype.lengthOfLine=function(t){var r=this.offsets[t],s=t===this.offsets.length-1?this.length:this.offsets[t+1];return s-r},e}();function gi(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)}var Us=gi;function bi(e){let t=e.children??e.body;if(t)for(let r=0;rt.indexForLocation({line:n-1,column:i}),s=n=>{let{start:i,end:a}=n.loc;i.offset=r(i),a.offset=r(a)};return()=>({name:"prettierParsePlugin",visitor:{All(n){s(n),bi(n)}}})}function ki(e){let t;try{t=Vs(e,{mode:"codemod",plugins:{ast:[yi(e)]}})}catch(r){let s=vi(r);if(s){let n=Si(r);throw Us(n,{loc:s,cause:r})}throw r}return t}function Si(e){let{message:t}=e,r=t.split(` +`);return r.length>=4&&/^Parse error on line \d+:$/u.test(r[0])&&/^-*\^$/u.test(G(!1,r,-2))?G(!1,r,-1):r.length>=4&&/:\s?$/u.test(r[0])&&/^\(error occurred in '.*?' @ line \d+ : column \d+\)$/u.test(G(!1,r,-1))&&r[1]===""&&G(!1,r,-2)===""&&r.slice(2,-2).every(s=>s.startsWith("|"))?r[0].trim().slice(0,-1):t}function vi(e){let{location:t,hash:r}=e;if(t){let{start:s,end:n}=t;return typeof n.line!="number"?{start:s}:t}if(r){let{loc:{last_line:s,last_column:n}}=r;return{start:{line:s,column:n+1}}}}var Ei={parse:ki,astFormat:"glimmer",locStart:St,locEnd:re};var wi={glimmer:hs};var Do=Pr;export{Do as default,ps as languages,xr as parsers,wi as printers}; diff --git a/node_modules/prettier/plugins/graphql.d.ts b/node_modules/prettier/plugins/graphql.d.ts new file mode 100644 index 0000000..c4e28b1 --- /dev/null +++ b/node_modules/prettier/plugins/graphql.d.ts @@ -0,0 +1,5 @@ +import { Parser } from "../index.js"; + +export declare const parsers: { + graphql: Parser; +}; diff --git a/node_modules/prettier/plugins/graphql.js b/node_modules/prettier/plugins/graphql.js new file mode 100644 index 0000000..009841b --- /dev/null +++ b/node_modules/prettier/plugins/graphql.js @@ -0,0 +1,29 @@ +(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.graphql=e()}})(function(){"use strict";var ce=Object.defineProperty;var ft=Object.getOwnPropertyDescriptor;var ht=Object.getOwnPropertyNames;var dt=Object.prototype.hasOwnProperty;var ye=(e,t)=>{for(var n in t)ce(e,n,{get:t[n],enumerable:!0})},mt=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ht(t))!dt.call(e,r)&&r!==n&&ce(e,r,{get:()=>t[r],enumerable:!(i=ft(t,r))||i.enumerable});return e};var Et=e=>mt(ce({},"__esModule",{value:!0}),e);var fn={};ye(fn,{languages:()=>Je,options:()=>qe,parsers:()=>_e,printers:()=>pn});var Tt=(e,t,n,i)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(n,i):n.global?t.replace(n,i):t.split(n).join(i)},j=Tt;var G="indent";var $="group";var F="if-break";var C="line";var J="break-parent";var ve=()=>{},L=ve,pe=ve;function _(e){return L(e),{type:G,contents:e}}function x(e,t={}){return L(e),pe(t.expandedStates,!0),{type:$,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function I(e,t="",n={}){return L(e),t!==""&&L(t),{type:F,breakContents:e,flatContents:t,groupId:n.groupId}}var xt={type:J};var Ot={type:C,hard:!0};var k={type:C},p={type:C,soft:!0},f=[Ot,xt];function E(e,t){L(e),pe(t);let n=[];for(let i=0;i{let r=!!(i!=null&&i.backwards);if(n===!1)return!1;let{length:s}=t,a=n;for(;a>=0&&a0}var fe=Ct;var he=class extends Error{name="UnexpectedNodeError";constructor(t,n,i="type"){super(`Unexpected ${n} node ${i}: ${JSON.stringify(t[i])}.`),this.node=t}},Be=he;var w=null;function B(e){if(w!==null&&typeof w.property){let t=w;return w=B.prototype=null,t}return w=B.prototype=e??Object.create(null),new B}var St=10;for(let e=0;e<=St;e++)B();function de(e){return B(e)}function vt(e,t="type"){de(e);function n(i){let r=i[t],s=e[r];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:i});return s}return n}var Ue=vt;var H=class{constructor(t,n,i){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=i}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},U=class{constructor(t,n,i,r,s,a){this.kind=t,this.start=n,this.end=i,this.line=r,this.column=s,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},W={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},hr=new Set(Object.keys(W));var S;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(S||(S={}));var bt=Ue(W,"kind"),Ve=bt;function K(e){return e.loc.start}function z(e){return e.loc.end}function Ye(e){return/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/u.test(e)}function Me(e){return`# @format + +`+e}function Lt(e,t,n){let{node:i}=e;if(!i.description)return"";let r=[n("description")];return i.kind==="InputValueDefinition"&&!i.description.block?r.push(k):r.push(f),r}var g=Lt;function Rt(e,t,n){let{node:i}=e;switch(i.kind){case"Document":return[...E(f,A(e,t,n,"definitions")),f];case"OperationDefinition":{let r=t.originalText[K(i)]!=="{",s=!!i.name;return[r?i.operation:"",r&&s?[" ",n("name")]:"",r&&!s&&fe(i.variableDefinitions)?" ":"",je(e,n),y(e,n,i),!r&&!s?"":" ",n("selectionSet")]}case"FragmentDefinition":return["fragment ",n("name"),je(e,n)," on ",n("typeCondition"),y(e,n,i)," ",n("selectionSet")];case"SelectionSet":return["{",_([f,E(f,A(e,t,n,"selections"))]),f,"}"];case"Field":return x([i.alias?[n("alias"),": "]:"",n("name"),i.arguments.length>0?x(["(",_([p,E([I("",", "),p],A(e,t,n,"arguments"))]),p,")"]):"",y(e,n,i),i.selectionSet?" ":"",n("selectionSet")]);case"Name":return i.value;case"StringValue":if(i.block){let r=j(!1,i.value,'"""',String.raw`\"""`).split(` +`);return r.length===1&&(r[0]=r[0].trim()),r.every(s=>s==="")&&(r.length=0),E(f,['"""',...r,'"""'])}return['"',j(!1,j(!1,i.value,/["\\]/gu,String.raw`\$&`),` +`,String.raw`\n`),'"'];case"IntValue":case"FloatValue":case"EnumValue":return i.value;case"BooleanValue":return i.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",n("name")];case"ListValue":return x(["[",_([p,E([I("",", "),p],e.map(n,"values"))]),p,"]"]);case"ObjectValue":{let r=t.bracketSpacing&&i.fields.length>0?" ":"";return x(["{",r,_([p,E([I("",", "),p],e.map(n,"fields"))]),p,I("",r),"}"])}case"ObjectField":case"Argument":return[n("name"),": ",n("value")];case"Directive":return["@",n("name"),i.arguments.length>0?x(["(",_([p,E([I("",", "),p],A(e,t,n,"arguments"))]),p,")"]):""];case"NamedType":return n("name");case"VariableDefinition":return[n("variable"),": ",n("type"),i.defaultValue?[" = ",n("defaultValue")]:"",y(e,n,i)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:r}=i,s=[];return r.endsWith("TypeDefinition")?s.push(g(e,t,n)):s.push("extend "),r.startsWith("ObjectType")?s.push("type"):r.startsWith("InputObjectType")?s.push("input"):s.push("interface"),s.push(" ",n("name")),!r.startsWith("InputObjectType")&&i.interfaces.length>0&&s.push(" implements ",...wt(e,t,n)),s.push(y(e,n,i)),i.fields.length>0&&s.push([" {",_([f,E(f,A(e,t,n,"fields"))]),f,"}"]),s}case"FieldDefinition":return[g(e,t,n),n("name"),i.arguments.length>0?x(["(",_([p,E([I("",", "),p],A(e,t,n,"arguments"))]),p,")"]):"",": ",n("type"),y(e,n,i)];case"DirectiveDefinition":return[g(e,t,n),"directive ","@",n("name"),i.arguments.length>0?x(["(",_([p,E([I("",", "),p],A(e,t,n,"arguments"))]),p,")"]):"",i.repeatable?" repeatable":""," on ",...E(" | ",e.map(n,"locations"))];case"EnumTypeExtension":case"EnumTypeDefinition":return[g(e,t,n),i.kind==="EnumTypeExtension"?"extend ":"","enum ",n("name"),y(e,n,i),i.values.length>0?[" {",_([f,E(f,A(e,t,n,"values"))]),f,"}"]:""];case"EnumValueDefinition":return[g(e,t,n),n("name"),y(e,n,i)];case"InputValueDefinition":return[g(e,t,n),n("name"),": ",n("type"),i.defaultValue?[" = ",n("defaultValue")]:"",y(e,n,i)];case"SchemaExtension":return["extend schema",y(e,n,i),...i.operationTypes.length>0?[" {",_([f,E(f,A(e,t,n,"operationTypes"))]),f,"}"]:[]];case"SchemaDefinition":return[g(e,t,n),"schema",y(e,n,i)," {",i.operationTypes.length>0?_([f,E(f,A(e,t,n,"operationTypes"))]):"",f,"}"];case"OperationTypeDefinition":return[i.operation,": ",n("type")];case"FragmentSpread":return["...",n("name"),y(e,n,i)];case"InlineFragment":return["...",i.typeCondition?[" on ",n("typeCondition")]:"",y(e,n,i)," ",n("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return x([g(e,t,n),x([i.kind==="UnionTypeExtension"?"extend ":"","union ",n("name"),y(e,n,i),i.types.length>0?[" =",I(""," "),_([I([k,"| "]),E([k,"| "],e.map(n,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[g(e,t,n),i.kind==="ScalarTypeExtension"?"extend ":"","scalar ",n("name"),y(e,n,i)];case"NonNullType":return[n("type"),"!"];case"ListType":return["[",n("type"),"]"];default:throw new Be(i,"Graphql","kind")}}function y(e,t,n){if(n.directives.length===0)return"";let i=E(k,e.map(t,"directives"));return n.kind==="FragmentDefinition"||n.kind==="OperationDefinition"?x([k,i]):[" ",x(_([p,i]))]}function A(e,t,n,i){return e.map(({isLast:r,node:s})=>{let a=n();return!r&&we(t.originalText,z(s))?[a,f]:a},i)}function Pt(e){return e.kind!=="Comment"}function Ft(e){let t=e.node;if(t.kind==="Comment")return"#"+t.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(t))}function wt(e,t,n){let{node:i}=e,r=[],{interfaces:s}=i,a=e.map(n,"interfaces");for(let u=0;ui.value.trim()==="prettier-ignore")}var Ut={print:Rt,massageAstNode:Ge,hasPrettierIgnore:Bt,insertPragma:Me,printComment:Ft,canAttachComment:Pt,getVisitorKeys:Ve},$e=Ut;var Je=[{linguistLanguageId:139,name:"GraphQL",type:"data",color:"#e10098",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",aceMode:"text",parsers:["graphql"],vscodeLanguageIds:["graphql"]}];var Xe={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Vt={bracketSpacing:Xe.bracketSpacing},qe=Vt;var _e={};ye(_e,{graphql:()=>ln});function Qe(e){return typeof e=="object"&&e!==null}function He(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}var Yt=/\r\n|[\n\r]/g;function V(e,t){let n=0,i=1;for(let r of e.body.matchAll(Yt)){if(typeof r.index=="number"||He(!1),r.index>=t)break;n=r.index+r[0].length,i+=1}return{line:i,column:t+1-n}}function Ke(e){return me(e.source,V(e.source,e.start))}function me(e,t){let n=e.locationOffset.column-1,i="".padStart(n)+e.body,r=t.line-1,s=e.locationOffset.line-1,a=t.line+s,u=t.line===1?n:0,l=t.column+u,T=`${e.name}:${a}:${l} +`,h=i.split(/\r\n|[\n\r]/g),D=h[r];if(D.length>120){let O=Math.floor(l/80),ae=l%80,N=[];for(let b=0;b["|",b]),["|","^".padStart(ae)],["|",N[O+1]]])}return T+We([[`${a-1} |`,h[r-1]],[`${a} |`,D],["|","^".padStart(l)],[`${a+1} |`,h[r+1]]])}function We(e){let t=e.filter(([i,r])=>r!==void 0),n=Math.max(...t.map(([i])=>i.length));return t.map(([i,r])=>i.padStart(n)+(r?" "+r:"")).join(` +`)}function Mt(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var Z=class e extends Error{constructor(t,...n){var i,r,s;let{nodes:a,source:u,positions:l,path:T,originalError:h,extensions:D}=Mt(n);super(t),this.name="GraphQLError",this.path=T??void 0,this.originalError=h??void 0,this.nodes=ze(Array.isArray(a)?a:a?[a]:void 0);let O=ze((i=this.nodes)===null||i===void 0?void 0:i.map(N=>N.loc).filter(N=>N!=null));this.source=u??(O==null||(r=O[0])===null||r===void 0?void 0:r.source),this.positions=l??(O==null?void 0:O.map(N=>N.start)),this.locations=l&&u?l.map(N=>V(u,N)):O==null?void 0:O.map(N=>V(N.source,N.start));let ae=Qe(h==null?void 0:h.extensions)?h==null?void 0:h.extensions:void 0;this.extensions=(s=D??ae)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),h!=null&&h.stack?Object.defineProperty(this,"stack",{value:h.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=` + +`+Ke(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=` + +`+me(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function ze(e){return e===void 0||e.length===0?void 0:e}function d(e,t,n){return new Z(`Syntax Error: ${n}`,{source:e,positions:[t]})}var ee;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(ee||(ee={}));var c;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(c||(c={}));function Ze(e){return e===9||e===32}function R(e){return e>=48&&e<=57}function et(e){return e>=97&&e<=122||e>=65&&e<=90}function Ee(e){return et(e)||e===95}function tt(e){return et(e)||R(e)||e===95}function nt(e){var t;let n=Number.MAX_SAFE_INTEGER,i=null,r=-1;for(let a=0;au===0?a:a.slice(n)).slice((t=i)!==null&&t!==void 0?t:0,r+1)}function jt(e){let t=0;for(;t=0&&e<=55295||e>=57344&&e<=1114111}function ne(e,t){return st(e.charCodeAt(t))&&ot(e.charCodeAt(t+1))}function st(e){return e>=55296&&e<=56319}function ot(e){return e>=56320&&e<=57343}function v(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return o.EOF;if(n>=32&&n<=126){let i=String.fromCodePoint(n);return i==='"'?`'"'`:`"${i}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function m(e,t,n,i,r){let s=e.line,a=1+n-e.lineStart;return new U(t,n,i,s,a,r)}function Gt(e,t){let n=e.source.body,i=n.length,r=t;for(;r=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Ht(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` +`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw d(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Wt(e,t){let n=e.source.body,i=n.length,r=e.lineStart,s=t+3,a=s,u="",l=[];for(;s2?"["+nn(e)+"]":"{ "+n.map(([r,s])=>r+": "+se(s,t)).join(", ")+" }"}function tn(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),i=e.length-n,r=[];for(let s=0;s1&&r.push(`... ${i} more items`),"["+r.join(", ")+"]"}function nn(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var rn=globalThis.process&&!0,at=rn?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var i;let r=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(i=t.constructor)===null||i===void 0?void 0:i.name;if(r===s){let a=ie(t);throw new Error(`Cannot use ${r} "${a}" from another module or realm. + +Ensure that there is only one instance of "graphql" in the node_modules +directory. If different versions of "graphql" are the dependencies of other +relied on modules, use "resolutions" to ensure only one version is installed. + +https://yarnpkg.com/en/docs/selective-version-resolutions + +Duplicate "graphql" modules cannot be used at the same time since different +versions may have different capabilities and behavior. The data from one +version used in the function from another could produce confusing and +spurious results.`)}}return!1};var M=class{constructor(t,n="GraphQL request",i={line:1,column:1}){typeof t=="string"||re(!1,`Body must be a string. Received: ${ie(t)}.`),this.body=t,this.name=n,this.locationOffset=i,this.locationOffset.line>0||re(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||re(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function ct(e){return at(e,M)}function ut(e,t){let n=new Ne(e,t),i=n.parseDocument();return Object.defineProperty(i,"tokenCount",{enumerable:!1,value:n.tokenCount}),i}var Ne=class{constructor(t,n={}){let i=ct(t)?t:new M(t);this._lexer=new te(i),this._options=n,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let t=this.expectToken(o.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(o.SOF,this.parseDefinition,o.EOF)})}parseDefinition(){if(this.peek(o.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===o.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw d(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(o.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:S.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),i;return this.peek(o.NAME)&&(i=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:n,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(o.NAME);switch(t.value){case"query":return S.QUERY;case"mutation":return S.MUTATION;case"subscription":return S.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(o.PAREN_L,this.parseVariableDefinition,o.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(o.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(o.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(o.BRACE_L,this.parseSelection,o.BRACE_R)})}parseSelection(){return this.peek(o.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),i,r;return this.expectOptionalToken(o.COLON)?(i=n,r=this.parseName()):r=n,this.node(t,{kind:c.FIELD,alias:i,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.PAREN_L,n,o.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,i=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.ARGUMENT,name:i,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(o.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(o.NAME)?this.node(t,{kind:c.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:c.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case o.BRACKET_L:return this.parseList(t);case o.BRACE_L:return this.parseObject(t);case o.INT:return this.advanceLexer(),this.node(n,{kind:c.INT,value:n.value});case o.FLOAT:return this.advanceLexer(),this.node(n,{kind:c.FLOAT,value:n.value});case o.STRING:case o.BLOCK_STRING:return this.parseStringLiteral();case o.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:c.BOOLEAN,value:!0});case"false":return this.node(n,{kind:c.BOOLEAN,value:!1});case"null":return this.node(n,{kind:c.NULL});default:return this.node(n,{kind:c.ENUM,value:n.value})}case o.DOLLAR:if(t)if(this.expectToken(o.DOLLAR),this._lexer.token.kind===o.NAME){let i=this._lexer.token.value;throw d(this._lexer.source,n.start,`Unexpected variable "$${i}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:c.STRING,value:t.value,block:t.kind===o.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:c.LIST,values:this.any(o.BRACKET_L,n,o.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:c.OBJECT,fields:this.any(o.BRACE_L,n,o.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,i=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.OBJECT_FIELD,name:i,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(o.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(o.AT),this.node(n,{kind:c.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(o.BRACKET_L)){let i=this.parseTypeReference();this.expectToken(o.BRACKET_R),n=this.node(t,{kind:c.LIST_TYPE,type:i})}else n=this.parseNamedType();return this.expectOptionalToken(o.BANG)?this.node(t,{kind:c.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:c.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(o.STRING)||this.peek(o.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let i=this.parseConstDirectives(),r=this.many(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);return this.node(t,{kind:c.SCHEMA_DEFINITION,description:n,directives:i,operationTypes:r})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(o.COLON);let i=this.parseNamedType();return this.node(t,{kind:c.OPERATION_TYPE_DEFINITION,operation:n,type:i})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let i=this.parseName(),r=this.parseConstDirectives();return this.node(t,{kind:c.SCALAR_TYPE_DEFINITION,description:n,name:i,directives:r})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let i=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.OBJECT_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:s,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(o.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseFieldDefinition,o.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),i=this.parseName(),r=this.parseArgumentDefs();this.expectToken(o.COLON);let s=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:c.FIELD_DEFINITION,description:n,name:i,arguments:r,type:s,directives:a})}parseArgumentDefs(){return this.optionalMany(o.PAREN_L,this.parseInputValueDef,o.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),i=this.parseName();this.expectToken(o.COLON);let r=this.parseTypeReference(),s;this.expectOptionalToken(o.EQUALS)&&(s=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:c.INPUT_VALUE_DEFINITION,description:n,name:i,type:r,defaultValue:s,directives:a})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let i=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.INTERFACE_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:s,fields:a})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let i=this.parseName(),r=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:c.UNION_TYPE_DEFINITION,description:n,name:i,directives:r,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(o.EQUALS)?this.delimitedMany(o.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let i=this.parseName(),r=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:c.ENUM_TYPE_DEFINITION,description:n,name:i,directives:r,values:s})}parseEnumValuesDefinition(){return this.optionalMany(o.BRACE_L,this.parseEnumValueDefinition,o.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),i=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(t,{kind:c.ENUM_VALUE_DEFINITION,description:n,name:i,directives:r})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw d(this._lexer.source,this._lexer.token.start,`${oe(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let i=this.parseName(),r=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:i,directives:r,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseInputValueDef,o.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===o.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),i=this.optionalMany(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.SCHEMA_EXTENSION,directives:n,operationTypes:i})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),i=this.parseConstDirectives();if(i.length===0)throw this.unexpected();return this.node(t,{kind:c.SCALAR_TYPE_EXTENSION,name:n,directives:i})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.OBJECT_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:s})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.INTERFACE_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:s})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),i=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.UNION_TYPE_EXTENSION,name:n,directives:i,types:r})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),i=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.ENUM_TYPE_EXTENSION,name:n,directives:i,values:r})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),i=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:i,fields:r})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(o.AT);let i=this.parseName(),r=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(t,{kind:c.DIRECTIVE_DEFINITION,description:n,name:i,arguments:r,repeatable:s,locations:a})}parseDirectiveLocations(){return this.delimitedMany(o.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(ee,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new H(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw d(this._lexer.source,n.start,`Expected ${lt(t)}, found ${oe(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===o.NAME&&n.value===t)this.advanceLexer();else throw d(this._lexer.source,n.start,`Expected "${t}", found ${oe(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===o.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t??this._lexer.token;return d(this._lexer.source,n.start,`Unexpected ${oe(n)}.`)}any(t,n,i){this.expectToken(t);let r=[];for(;!this.expectOptionalToken(i);)r.push(n.call(this));return r}optionalMany(t,n,i){if(this.expectOptionalToken(t)){let r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}return[]}many(t,n,i){this.expectToken(t);let r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}delimitedMany(t,n){this.expectOptionalToken(t);let i=[];do i.push(n.call(this));while(this.expectOptionalToken(t));return i}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(n.kind!==o.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw d(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function oe(e){let t=e.value;return lt(e.kind)+(t!=null?` "${t}"`:"")}function lt(e){return it(e)?`"${e}"`:e}function sn(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}var pt=sn;function on(e){let t=[],{startToken:n,endToken:i}=e.loc;for(let r=n;r!==i;r=r.next)r.kind==="Comment"&&t.push({...r,loc:{start:r.start,end:r.end}});return t}var an={allowLegacyFragmentVariables:!0};function cn(e){if((e==null?void 0:e.name)==="GraphQLError"){let{message:t,locations:[n]}=e;return pt(t,{loc:{start:n},cause:e})}return e}function un(e){let t;try{t=ut(e,an)}catch(n){throw cn(n)}return t.comments=on(t),t}var ln={parse:un,astFormat:"graphql",hasPragma:Ye,locStart:K,locEnd:z};var pn={graphql:$e};return Et(fn);}); \ No newline at end of file diff --git a/node_modules/prettier/plugins/graphql.mjs b/node_modules/prettier/plugins/graphql.mjs new file mode 100644 index 0000000..de7c936 --- /dev/null +++ b/node_modules/prettier/plugins/graphql.mjs @@ -0,0 +1,29 @@ +var ft=Object.defineProperty;var ye=(e,t)=>{for(var n in t)ft(e,n,{get:t[n],enumerable:!0})};var _e={};ye(_e,{languages:()=>Je,options:()=>qe,parsers:()=>Ne,printers:()=>an});var ht=(e,t,n,i)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(n,i):n.global?t.replace(n,i):t.split(n).join(i)},j=ht;var G="indent";var $="group";var F="if-break";var C="line";var J="break-parent";var ve=()=>{},L=ve,le=ve;function _(e){return L(e),{type:G,contents:e}}function x(e,t={}){return L(e),le(t.expandedStates,!0),{type:$,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function I(e,t="",n={}){return L(e),t!==""&&L(t),{type:F,breakContents:e,flatContents:t,groupId:n.groupId}}var Tt={type:J};var Nt={type:C,hard:!0};var k={type:C},p={type:C,soft:!0},f=[Nt,Tt];function E(e,t){L(e),le(t);let n=[];for(let i=0;i{let r=!!(i!=null&&i.backwards);if(n===!1)return!1;let{length:s}=t,a=n;for(;a>=0&&a0}var pe=Dt;var fe=class extends Error{name="UnexpectedNodeError";constructor(t,n,i="type"){super(`Unexpected ${n} node ${i}: ${JSON.stringify(t[i])}.`),this.node=t}},Be=fe;var w=null;function B(e){if(w!==null&&typeof w.property){let t=w;return w=B.prototype=null,t}return w=B.prototype=e??Object.create(null),new B}var gt=10;for(let e=0;e<=gt;e++)B();function he(e){return B(e)}function At(e,t="type"){he(e);function n(i){let r=i[t],s=e[r];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:i});return s}return n}var Ue=At;var H=class{constructor(t,n,i){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=i}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},U=class{constructor(t,n,i,r,s,a){this.kind=t,this.start=n,this.end=i,this.line=r,this.column=s,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},W={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},cr=new Set(Object.keys(W));var S;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(S||(S={}));var kt=Ue(W,"kind"),Ve=kt;function K(e){return e.loc.start}function z(e){return e.loc.end}function Ye(e){return/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/u.test(e)}function Me(e){return`# @format + +`+e}function Ct(e,t,n){let{node:i}=e;if(!i.description)return"";let r=[n("description")];return i.kind==="InputValueDefinition"&&!i.description.block?r.push(k):r.push(f),r}var g=Ct;function St(e,t,n){let{node:i}=e;switch(i.kind){case"Document":return[...E(f,A(e,t,n,"definitions")),f];case"OperationDefinition":{let r=t.originalText[K(i)]!=="{",s=!!i.name;return[r?i.operation:"",r&&s?[" ",n("name")]:"",r&&!s&&pe(i.variableDefinitions)?" ":"",je(e,n),y(e,n,i),!r&&!s?"":" ",n("selectionSet")]}case"FragmentDefinition":return["fragment ",n("name"),je(e,n)," on ",n("typeCondition"),y(e,n,i)," ",n("selectionSet")];case"SelectionSet":return["{",_([f,E(f,A(e,t,n,"selections"))]),f,"}"];case"Field":return x([i.alias?[n("alias"),": "]:"",n("name"),i.arguments.length>0?x(["(",_([p,E([I("",", "),p],A(e,t,n,"arguments"))]),p,")"]):"",y(e,n,i),i.selectionSet?" ":"",n("selectionSet")]);case"Name":return i.value;case"StringValue":if(i.block){let r=j(!1,i.value,'"""',String.raw`\"""`).split(` +`);return r.length===1&&(r[0]=r[0].trim()),r.every(s=>s==="")&&(r.length=0),E(f,['"""',...r,'"""'])}return['"',j(!1,j(!1,i.value,/["\\]/gu,String.raw`\$&`),` +`,String.raw`\n`),'"'];case"IntValue":case"FloatValue":case"EnumValue":return i.value;case"BooleanValue":return i.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",n("name")];case"ListValue":return x(["[",_([p,E([I("",", "),p],e.map(n,"values"))]),p,"]"]);case"ObjectValue":{let r=t.bracketSpacing&&i.fields.length>0?" ":"";return x(["{",r,_([p,E([I("",", "),p],e.map(n,"fields"))]),p,I("",r),"}"])}case"ObjectField":case"Argument":return[n("name"),": ",n("value")];case"Directive":return["@",n("name"),i.arguments.length>0?x(["(",_([p,E([I("",", "),p],A(e,t,n,"arguments"))]),p,")"]):""];case"NamedType":return n("name");case"VariableDefinition":return[n("variable"),": ",n("type"),i.defaultValue?[" = ",n("defaultValue")]:"",y(e,n,i)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:r}=i,s=[];return r.endsWith("TypeDefinition")?s.push(g(e,t,n)):s.push("extend "),r.startsWith("ObjectType")?s.push("type"):r.startsWith("InputObjectType")?s.push("input"):s.push("interface"),s.push(" ",n("name")),!r.startsWith("InputObjectType")&&i.interfaces.length>0&&s.push(" implements ",...Lt(e,t,n)),s.push(y(e,n,i)),i.fields.length>0&&s.push([" {",_([f,E(f,A(e,t,n,"fields"))]),f,"}"]),s}case"FieldDefinition":return[g(e,t,n),n("name"),i.arguments.length>0?x(["(",_([p,E([I("",", "),p],A(e,t,n,"arguments"))]),p,")"]):"",": ",n("type"),y(e,n,i)];case"DirectiveDefinition":return[g(e,t,n),"directive ","@",n("name"),i.arguments.length>0?x(["(",_([p,E([I("",", "),p],A(e,t,n,"arguments"))]),p,")"]):"",i.repeatable?" repeatable":""," on ",...E(" | ",e.map(n,"locations"))];case"EnumTypeExtension":case"EnumTypeDefinition":return[g(e,t,n),i.kind==="EnumTypeExtension"?"extend ":"","enum ",n("name"),y(e,n,i),i.values.length>0?[" {",_([f,E(f,A(e,t,n,"values"))]),f,"}"]:""];case"EnumValueDefinition":return[g(e,t,n),n("name"),y(e,n,i)];case"InputValueDefinition":return[g(e,t,n),n("name"),": ",n("type"),i.defaultValue?[" = ",n("defaultValue")]:"",y(e,n,i)];case"SchemaExtension":return["extend schema",y(e,n,i),...i.operationTypes.length>0?[" {",_([f,E(f,A(e,t,n,"operationTypes"))]),f,"}"]:[]];case"SchemaDefinition":return[g(e,t,n),"schema",y(e,n,i)," {",i.operationTypes.length>0?_([f,E(f,A(e,t,n,"operationTypes"))]):"",f,"}"];case"OperationTypeDefinition":return[i.operation,": ",n("type")];case"FragmentSpread":return["...",n("name"),y(e,n,i)];case"InlineFragment":return["...",i.typeCondition?[" on ",n("typeCondition")]:"",y(e,n,i)," ",n("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return x([g(e,t,n),x([i.kind==="UnionTypeExtension"?"extend ":"","union ",n("name"),y(e,n,i),i.types.length>0?[" =",I(""," "),_([I([k,"| "]),E([k,"| "],e.map(n,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[g(e,t,n),i.kind==="ScalarTypeExtension"?"extend ":"","scalar ",n("name"),y(e,n,i)];case"NonNullType":return[n("type"),"!"];case"ListType":return["[",n("type"),"]"];default:throw new Be(i,"Graphql","kind")}}function y(e,t,n){if(n.directives.length===0)return"";let i=E(k,e.map(t,"directives"));return n.kind==="FragmentDefinition"||n.kind==="OperationDefinition"?x([k,i]):[" ",x(_([p,i]))]}function A(e,t,n,i){return e.map(({isLast:r,node:s})=>{let a=n();return!r&&we(t.originalText,z(s))?[a,f]:a},i)}function vt(e){return e.kind!=="Comment"}function bt(e){let t=e.node;if(t.kind==="Comment")return"#"+t.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(t))}function Lt(e,t,n){let{node:i}=e,r=[],{interfaces:s}=i,a=e.map(n,"interfaces");for(let u=0;ui.value.trim()==="prettier-ignore")}var Pt={print:St,massageAstNode:Ge,hasPrettierIgnore:Rt,insertPragma:Me,printComment:bt,canAttachComment:vt,getVisitorKeys:Ve},$e=Pt;var Je=[{linguistLanguageId:139,name:"GraphQL",type:"data",color:"#e10098",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",aceMode:"text",parsers:["graphql"],vscodeLanguageIds:["graphql"]}];var Xe={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Ft={bracketSpacing:Xe.bracketSpacing},qe=Ft;var Ne={};ye(Ne,{graphql:()=>on});function Qe(e){return typeof e=="object"&&e!==null}function He(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}var wt=/\r\n|[\n\r]/g;function V(e,t){let n=0,i=1;for(let r of e.body.matchAll(wt)){if(typeof r.index=="number"||He(!1),r.index>=t)break;n=r.index+r[0].length,i+=1}return{line:i,column:t+1-n}}function Ke(e){return de(e.source,V(e.source,e.start))}function de(e,t){let n=e.locationOffset.column-1,i="".padStart(n)+e.body,r=t.line-1,s=e.locationOffset.line-1,a=t.line+s,u=t.line===1?n:0,l=t.column+u,T=`${e.name}:${a}:${l} +`,h=i.split(/\r\n|[\n\r]/g),D=h[r];if(D.length>120){let O=Math.floor(l/80),ae=l%80,N=[];for(let b=0;b["|",b]),["|","^".padStart(ae)],["|",N[O+1]]])}return T+We([[`${a-1} |`,h[r-1]],[`${a} |`,D],["|","^".padStart(l)],[`${a+1} |`,h[r+1]]])}function We(e){let t=e.filter(([i,r])=>r!==void 0),n=Math.max(...t.map(([i])=>i.length));return t.map(([i,r])=>i.padStart(n)+(r?" "+r:"")).join(` +`)}function Bt(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var Z=class e extends Error{constructor(t,...n){var i,r,s;let{nodes:a,source:u,positions:l,path:T,originalError:h,extensions:D}=Bt(n);super(t),this.name="GraphQLError",this.path=T??void 0,this.originalError=h??void 0,this.nodes=ze(Array.isArray(a)?a:a?[a]:void 0);let O=ze((i=this.nodes)===null||i===void 0?void 0:i.map(N=>N.loc).filter(N=>N!=null));this.source=u??(O==null||(r=O[0])===null||r===void 0?void 0:r.source),this.positions=l??(O==null?void 0:O.map(N=>N.start)),this.locations=l&&u?l.map(N=>V(u,N)):O==null?void 0:O.map(N=>V(N.source,N.start));let ae=Qe(h==null?void 0:h.extensions)?h==null?void 0:h.extensions:void 0;this.extensions=(s=D??ae)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),h!=null&&h.stack?Object.defineProperty(this,"stack",{value:h.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=` + +`+Ke(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=` + +`+de(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function ze(e){return e===void 0||e.length===0?void 0:e}function d(e,t,n){return new Z(`Syntax Error: ${n}`,{source:e,positions:[t]})}var ee;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(ee||(ee={}));var c;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(c||(c={}));function Ze(e){return e===9||e===32}function R(e){return e>=48&&e<=57}function et(e){return e>=97&&e<=122||e>=65&&e<=90}function me(e){return et(e)||e===95}function tt(e){return et(e)||R(e)||e===95}function nt(e){var t;let n=Number.MAX_SAFE_INTEGER,i=null,r=-1;for(let a=0;au===0?a:a.slice(n)).slice((t=i)!==null&&t!==void 0?t:0,r+1)}function Ut(e){let t=0;for(;t=0&&e<=55295||e>=57344&&e<=1114111}function ne(e,t){return st(e.charCodeAt(t))&&ot(e.charCodeAt(t+1))}function st(e){return e>=55296&&e<=56319}function ot(e){return e>=56320&&e<=57343}function v(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return o.EOF;if(n>=32&&n<=126){let i=String.fromCodePoint(n);return i==='"'?`'"'`:`"${i}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function m(e,t,n,i,r){let s=e.line,a=1+n-e.lineStart;return new U(t,n,i,s,a,r)}function Vt(e,t){let n=e.source.body,i=n.length,r=t;for(;r=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Jt(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` +`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw d(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Xt(e,t){let n=e.source.body,i=n.length,r=e.lineStart,s=t+3,a=s,u="",l=[];for(;s2?"["+zt(e)+"]":"{ "+n.map(([r,s])=>r+": "+se(s,t)).join(", ")+" }"}function Kt(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),i=e.length-n,r=[];for(let s=0;s1&&r.push(`... ${i} more items`),"["+r.join(", ")+"]"}function zt(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var Zt=globalThis.process&&!0,at=Zt?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var i;let r=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(i=t.constructor)===null||i===void 0?void 0:i.name;if(r===s){let a=ie(t);throw new Error(`Cannot use ${r} "${a}" from another module or realm. + +Ensure that there is only one instance of "graphql" in the node_modules +directory. If different versions of "graphql" are the dependencies of other +relied on modules, use "resolutions" to ensure only one version is installed. + +https://yarnpkg.com/en/docs/selective-version-resolutions + +Duplicate "graphql" modules cannot be used at the same time since different +versions may have different capabilities and behavior. The data from one +version used in the function from another could produce confusing and +spurious results.`)}}return!1};var M=class{constructor(t,n="GraphQL request",i={line:1,column:1}){typeof t=="string"||re(!1,`Body must be a string. Received: ${ie(t)}.`),this.body=t,this.name=n,this.locationOffset=i,this.locationOffset.line>0||re(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||re(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function ct(e){return at(e,M)}function ut(e,t){let n=new Te(e,t),i=n.parseDocument();return Object.defineProperty(i,"tokenCount",{enumerable:!1,value:n.tokenCount}),i}var Te=class{constructor(t,n={}){let i=ct(t)?t:new M(t);this._lexer=new te(i),this._options=n,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let t=this.expectToken(o.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(o.SOF,this.parseDefinition,o.EOF)})}parseDefinition(){if(this.peek(o.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===o.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw d(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(o.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:S.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),i;return this.peek(o.NAME)&&(i=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:n,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(o.NAME);switch(t.value){case"query":return S.QUERY;case"mutation":return S.MUTATION;case"subscription":return S.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(o.PAREN_L,this.parseVariableDefinition,o.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(o.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(o.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(o.BRACE_L,this.parseSelection,o.BRACE_R)})}parseSelection(){return this.peek(o.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),i,r;return this.expectOptionalToken(o.COLON)?(i=n,r=this.parseName()):r=n,this.node(t,{kind:c.FIELD,alias:i,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.PAREN_L,n,o.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,i=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.ARGUMENT,name:i,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(o.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(o.NAME)?this.node(t,{kind:c.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:c.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case o.BRACKET_L:return this.parseList(t);case o.BRACE_L:return this.parseObject(t);case o.INT:return this.advanceLexer(),this.node(n,{kind:c.INT,value:n.value});case o.FLOAT:return this.advanceLexer(),this.node(n,{kind:c.FLOAT,value:n.value});case o.STRING:case o.BLOCK_STRING:return this.parseStringLiteral();case o.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:c.BOOLEAN,value:!0});case"false":return this.node(n,{kind:c.BOOLEAN,value:!1});case"null":return this.node(n,{kind:c.NULL});default:return this.node(n,{kind:c.ENUM,value:n.value})}case o.DOLLAR:if(t)if(this.expectToken(o.DOLLAR),this._lexer.token.kind===o.NAME){let i=this._lexer.token.value;throw d(this._lexer.source,n.start,`Unexpected variable "$${i}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:c.STRING,value:t.value,block:t.kind===o.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:c.LIST,values:this.any(o.BRACKET_L,n,o.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:c.OBJECT,fields:this.any(o.BRACE_L,n,o.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,i=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.OBJECT_FIELD,name:i,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(o.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(o.AT),this.node(n,{kind:c.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(o.BRACKET_L)){let i=this.parseTypeReference();this.expectToken(o.BRACKET_R),n=this.node(t,{kind:c.LIST_TYPE,type:i})}else n=this.parseNamedType();return this.expectOptionalToken(o.BANG)?this.node(t,{kind:c.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:c.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(o.STRING)||this.peek(o.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let i=this.parseConstDirectives(),r=this.many(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);return this.node(t,{kind:c.SCHEMA_DEFINITION,description:n,directives:i,operationTypes:r})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(o.COLON);let i=this.parseNamedType();return this.node(t,{kind:c.OPERATION_TYPE_DEFINITION,operation:n,type:i})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let i=this.parseName(),r=this.parseConstDirectives();return this.node(t,{kind:c.SCALAR_TYPE_DEFINITION,description:n,name:i,directives:r})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let i=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.OBJECT_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:s,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(o.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseFieldDefinition,o.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),i=this.parseName(),r=this.parseArgumentDefs();this.expectToken(o.COLON);let s=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:c.FIELD_DEFINITION,description:n,name:i,arguments:r,type:s,directives:a})}parseArgumentDefs(){return this.optionalMany(o.PAREN_L,this.parseInputValueDef,o.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),i=this.parseName();this.expectToken(o.COLON);let r=this.parseTypeReference(),s;this.expectOptionalToken(o.EQUALS)&&(s=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:c.INPUT_VALUE_DEFINITION,description:n,name:i,type:r,defaultValue:s,directives:a})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let i=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.INTERFACE_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:s,fields:a})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let i=this.parseName(),r=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:c.UNION_TYPE_DEFINITION,description:n,name:i,directives:r,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(o.EQUALS)?this.delimitedMany(o.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let i=this.parseName(),r=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:c.ENUM_TYPE_DEFINITION,description:n,name:i,directives:r,values:s})}parseEnumValuesDefinition(){return this.optionalMany(o.BRACE_L,this.parseEnumValueDefinition,o.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),i=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(t,{kind:c.ENUM_VALUE_DEFINITION,description:n,name:i,directives:r})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw d(this._lexer.source,this._lexer.token.start,`${oe(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let i=this.parseName(),r=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:i,directives:r,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseInputValueDef,o.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===o.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),i=this.optionalMany(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.SCHEMA_EXTENSION,directives:n,operationTypes:i})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),i=this.parseConstDirectives();if(i.length===0)throw this.unexpected();return this.node(t,{kind:c.SCALAR_TYPE_EXTENSION,name:n,directives:i})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.OBJECT_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:s})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.INTERFACE_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:s})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),i=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.UNION_TYPE_EXTENSION,name:n,directives:i,types:r})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),i=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.ENUM_TYPE_EXTENSION,name:n,directives:i,values:r})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),i=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:i,fields:r})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(o.AT);let i=this.parseName(),r=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(t,{kind:c.DIRECTIVE_DEFINITION,description:n,name:i,arguments:r,repeatable:s,locations:a})}parseDirectiveLocations(){return this.delimitedMany(o.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(ee,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new H(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw d(this._lexer.source,n.start,`Expected ${lt(t)}, found ${oe(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===o.NAME&&n.value===t)this.advanceLexer();else throw d(this._lexer.source,n.start,`Expected "${t}", found ${oe(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===o.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t??this._lexer.token;return d(this._lexer.source,n.start,`Unexpected ${oe(n)}.`)}any(t,n,i){this.expectToken(t);let r=[];for(;!this.expectOptionalToken(i);)r.push(n.call(this));return r}optionalMany(t,n,i){if(this.expectOptionalToken(t)){let r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}return[]}many(t,n,i){this.expectToken(t);let r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}delimitedMany(t,n){this.expectOptionalToken(t);let i=[];do i.push(n.call(this));while(this.expectOptionalToken(t));return i}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(n.kind!==o.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw d(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function oe(e){let t=e.value;return lt(e.kind)+(t!=null?` "${t}"`:"")}function lt(e){return it(e)?`"${e}"`:e}function en(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}var pt=en;function tn(e){let t=[],{startToken:n,endToken:i}=e.loc;for(let r=n;r!==i;r=r.next)r.kind==="Comment"&&t.push({...r,loc:{start:r.start,end:r.end}});return t}var nn={allowLegacyFragmentVariables:!0};function rn(e){if((e==null?void 0:e.name)==="GraphQLError"){let{message:t,locations:[n]}=e;return pt(t,{loc:{start:n},cause:e})}return e}function sn(e){let t;try{t=ut(e,nn)}catch(n){throw rn(n)}return t.comments=tn(t),t}var on={parse:sn,astFormat:"graphql",hasPragma:Ye,locStart:K,locEnd:z};var an={graphql:$e};var Si=_e;export{Si as default,Je as languages,qe as options,Ne as parsers,an as printers}; diff --git a/node_modules/prettier/plugins/html.d.ts b/node_modules/prettier/plugins/html.d.ts new file mode 100644 index 0000000..b2ef5f7 --- /dev/null +++ b/node_modules/prettier/plugins/html.d.ts @@ -0,0 +1,8 @@ +import { Parser } from "../index.js"; + +export declare const parsers: { + angular: Parser; + html: Parser; + lwc: Parser; + vue: Parser; +}; diff --git a/node_modules/prettier/plugins/html.js b/node_modules/prettier/plugins/html.js new file mode 100644 index 0000000..8ad95f3 --- /dev/null +++ b/node_modules/prettier/plugins/html.js @@ -0,0 +1,22 @@ +(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.html=e()}})(function(){"use strict";var Et=Object.defineProperty;var ui=Object.getOwnPropertyDescriptor;var li=Object.getOwnPropertyNames;var ci=Object.prototype.hasOwnProperty;var sn=t=>{throw TypeError(t)};var pi=(t,e,r)=>e in t?Et(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var an=(t,e)=>{for(var r in e)Et(t,r,{get:e[r],enumerable:!0})},hi=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of li(e))!ci.call(t,s)&&s!==r&&Et(t,s,{get:()=>e[s],enumerable:!(n=ui(e,s))||n.enumerable});return t};var fi=t=>hi(Et({},"__esModule",{value:!0}),t);var cr=(t,e,r)=>pi(t,typeof e!="symbol"?e+"":e,r),on=(t,e,r)=>e.has(t)||sn("Cannot "+r);var R=(t,e,r)=>(on(t,e,"read from private field"),r?r.call(t):e.get(t)),At=(t,e,r)=>e.has(t)?sn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),un=(t,e,r,n)=>(on(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var jo={};an(jo,{languages:()=>Ts,options:()=>ks,parsers:()=>en,printers:()=>Yo});var mi=(t,e,r,n)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(r,n):r.global?e.replace(r,n):e.split(r).join(n)},w=mi;var ye="string",Ge="array",Ye="cursor",we="indent",be="align",je="trim",Te="group",xe="fill",ce="if-break",ke="indent-if-break",Ke="line-suffix",Qe="line-suffix-boundary",j="line",Xe="label",Be="break-parent",Dt=new Set([Ye,we,be,je,Te,xe,ce,ke,Ke,Qe,j,Xe,Be]);var di=(t,e,r)=>{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[r<0?e.length+r:r]:e.at(r)},K=di;function gi(t){if(typeof t=="string")return ye;if(Array.isArray(t))return Ge;if(!t)return;let{type:e}=t;if(Dt.has(e))return e}var Le=gi;var Ci=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function Si(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', +Expected it to be 'string' or 'object'.`;if(Le(t))throw new Error("doc is valid.");let r=Object.prototype.toString.call(t);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=Ci([...Dt].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'. +Expected it to be ${n}.`}var pr=class extends Error{name="InvalidDocError";constructor(e){super(Si(e)),this.doc=e}},hr=pr;function fr(t,e){if(typeof t=="string")return e(t);let r=new Map;return n(t);function n(i){if(r.has(i))return r.get(i);let a=s(i);return r.set(i,a),a}function s(i){switch(Le(i)){case Ge:return e(i.map(n));case xe:return e({...i,parts:i.parts.map(n)});case ce:return e({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case Te:{let{expandedStates:a,contents:o}=i;return a?(a=a.map(n),o=a[0]):o=n(o),e({...i,contents:o,expandedStates:a})}case be:case we:case ke:case Xe:case Ke:return e({...i,contents:n(i.contents)});case ye:case Ye:case je:case Qe:case j:case Be:return e(i);default:throw new hr(i)}}}function B(t,e=ln){return fr(t,r=>typeof r=="string"?H(e,r.split(` +`)):r)}var mr=()=>{},ne=mr,dr=mr,cn=mr;function k(t){return ne(t),{type:we,contents:t}}function pn(t,e){return ne(e),{type:be,contents:e,n:t}}function E(t,e={}){return ne(t),dr(e.expandedStates,!0),{type:Te,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function hn(t){return pn(Number.NEGATIVE_INFINITY,t)}function fn(t){return pn({type:"root"},t)}function vt(t){return cn(t),{type:xe,parts:t}}function pe(t,e="",r={}){return ne(t),e!==""&&ne(e),{type:ce,breakContents:t,flatContents:e,groupId:r.groupId}}function mn(t,e){return ne(t),{type:ke,contents:t,groupId:e.groupId,negate:e.negate}}var se={type:Be};var Ei={type:j,hard:!0},Ai={type:j,hard:!0,literal:!0},_={type:j},v={type:j,soft:!0},S=[Ei,se],ln=[Ai,se];function H(t,e){ne(t),dr(e);let r=[];for(let n=0;ni?n:r}var gn=Di;function gr(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var V,Cr=class{constructor(e){At(this,V);un(this,V,new Set(e))}getLeadingWhitespaceCount(e){let r=R(this,V),n=0;for(let s=0;s=0&&r.has(e.charAt(s));s--)n++;return n}getLeadingWhitespace(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(0,r)}getTrailingWhitespace(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(e.length-r)}hasLeadingWhitespace(e){return R(this,V).has(e.charAt(0))}hasTrailingWhitespace(e){return R(this,V).has(K(!1,e,-1))}trimStart(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(r)}trimEnd(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-r)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,r=!1){let n=`[${gr([...R(this,V)].join(""))}]+`,s=new RegExp(r?`(${n})`:n,"u");return e.split(s)}hasWhitespaceCharacter(e){let r=R(this,V);return Array.prototype.some.call(e,n=>r.has(n))}hasNonWhitespaceCharacter(e){let r=R(this,V);return Array.prototype.some.call(e,n=>!r.has(n))}isWhitespaceOnly(e){let r=R(this,V);return Array.prototype.every.call(e,n=>r.has(n))}};V=new WeakMap;var Cn=Cr;var vi=[" ",` +`,"\f","\r"," "],yi=new Cn(vi),O=yi;var Sr=class extends Error{name="UnexpectedNodeError";constructor(e,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}},Sn=Sr;function wi(t){return(t==null?void 0:t.type)==="front-matter"}var Fe=wi;var bi=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan","keySpan","tagDefinition","tokens","valueTokens","switchValueSourceSpan","expSourceSpan","valueSourceSpan"]),Ti=new Set(["if","else if","for","switch","case"]);function _n(t,e){var r;if(t.type==="text"||t.type==="comment"||Fe(t)||t.type==="yaml"||t.type==="toml")return null;if(t.type==="attribute"&&delete e.value,t.type==="docType"&&delete e.value,t.type==="angularControlFlowBlock"&&((r=t.parameters)!=null&&r.children))for(let n of e.parameters.children)Ti.has(t.name)?delete n.expression:n.expression=n.expression.trim();t.type==="angularIcuExpression"&&(e.switchValue=t.switchValue.trim()),t.type==="angularLetDeclarationInitializer"&&delete e.value}_n.ignoredProperties=bi;var En=_n;async function xi(t,e){if(t.language==="yaml"){let r=t.value.trim(),n=r?await e(r,{parser:"yaml"}):"";return fn([t.startDelimiter,t.explicitLanguage,S,n,n?S:"",t.endDelimiter])}}var An=xi;function he(t,e=!0){return[k([v,t]),e?v:""]}function Q(t,e){let r=t.type==="NGRoot"?t.node.type==="NGMicrosyntax"&&t.node.body.length===1&&t.node.body[0].type==="NGMicrosyntaxExpression"?t.node.body[0].expression:t.node:t.type==="JsExpressionRoot"?t.node:t;return r&&(r.type==="ObjectExpression"||r.type==="ArrayExpression"||(e.parser==="__vue_expression"||e.parser==="__vue_ts_expression")&&(r.type==="TemplateLiteral"||r.type==="StringLiteral"))}async function T(t,e,r,n){r={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...r};let s=!0;n&&(r.__onHtmlBindingRoot=(a,o)=>{s=n(a,o)});let i=await e(t,r,e);return s?E(i):he(i)}function ki(t,e,r,n){let{node:s}=r,i=n.originalText.slice(s.sourceSpan.start.offset,s.sourceSpan.end.offset);return/^\s*$/u.test(i)?"":T(i,t,{parser:"__ng_directive",__isInHtmlAttribute:!1},Q)}var Dn=ki;var Bi=t=>String(t).split(/[/\\]/u).pop();function vn(t,e){if(!e)return;let r=Bi(e).toLowerCase();return t.find(({filenames:n})=>n==null?void 0:n.some(s=>s.toLowerCase()===r))??t.find(({extensions:n})=>n==null?void 0:n.some(s=>r.endsWith(s)))}function Li(t,e){if(e)return t.find(({name:r})=>r.toLowerCase()===e)??t.find(({aliases:r})=>r==null?void 0:r.includes(e))??t.find(({extensions:r})=>r==null?void 0:r.includes(`.${e}`))}function Fi(t,e){let r=t.plugins.flatMap(s=>s.languages??[]),n=Li(r,e.language)??vn(r,e.physicalFile)??vn(r,e.file)??(e.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var Ne=Fi;var yn="inline",wn={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",search:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",menu:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",input:"inline-block",button:"inline-block",fieldset:"block",details:"block",summary:"block",marquee:"inline-block",source:"block",track:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",select:"inline-block",option:"block",optgroup:"block"},bn="normal",Tn={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"};function Ni(t){return t.type==="element"&&!t.hasExplicitNamespace&&!["html","svg"].includes(t.namespace)}var fe=Ni;var Pi=t=>w(!1,t,/^[\t\f\r ]*\n/gu,""),_r=t=>Pi(O.trimEnd(t)),xn=t=>{let e=t,r=O.getLeadingWhitespace(e);r&&(e=e.slice(r.length));let n=O.getTrailingWhitespace(e);return n&&(e=e.slice(0,-n.length)),{leadingWhitespace:r,trailingWhitespace:n,text:e}};function wt(t,e){return!!(t.type==="ieConditionalComment"&&t.lastChild&&!t.lastChild.isSelfClosing&&!t.lastChild.endSourceSpan||t.type==="ieConditionalComment"&&!t.complete||me(t)&&t.children.some(r=>r.type!=="text"&&r.type!=="interpolation")||xt(t,e)&&!W(t)&&t.type!=="interpolation")}function de(t){return t.type==="attribute"||!t.parent||!t.prev?!1:Ii(t.prev)}function Ii(t){return t.type==="comment"&&t.value.trim()==="prettier-ignore"}function $(t){return t.type==="text"||t.type==="comment"}function W(t){return t.type==="element"&&(t.fullName==="script"||t.fullName==="style"||t.fullName==="svg:style"||t.fullName==="svg:script"||fe(t)&&(t.name==="script"||t.name==="style"))}function kn(t){return t.children&&!W(t)}function Bn(t){return W(t)||t.type==="interpolation"||Er(t)}function Er(t){return Hn(t).startsWith("pre")}function Ln(t,e){var s,i;let r=n();if(r&&!t.prev&&((i=(s=t.parent)==null?void 0:s.tagDefinition)!=null&&i.ignoreFirstLf))return t.type==="interpolation";return r;function n(){return Fe(t)||t.type==="angularControlFlowBlock"?!1:(t.type==="text"||t.type==="interpolation")&&t.prev&&(t.prev.type==="text"||t.prev.type==="interpolation")?!0:!t.parent||t.parent.cssDisplay==="none"?!1:me(t.parent)?!0:!(!t.prev&&(t.parent.type==="root"||me(t)&&t.parent||W(t.parent)||et(t.parent,e)||!Hi(t.parent.cssDisplay))||t.prev&&!Wi(t.prev.cssDisplay))}}function Fn(t,e){return Fe(t)||t.type==="angularControlFlowBlock"?!1:(t.type==="text"||t.type==="interpolation")&&t.next&&(t.next.type==="text"||t.next.type==="interpolation")?!0:!t.parent||t.parent.cssDisplay==="none"?!1:me(t.parent)?!0:!(!t.next&&(t.parent.type==="root"||me(t)&&t.parent||W(t.parent)||et(t.parent,e)||!Vi(t.parent.cssDisplay))||t.next&&!Ui(t.next.cssDisplay))}function Nn(t){return zi(t.cssDisplay)&&!W(t)}function Je(t){return Fe(t)||t.next&&t.sourceSpan.end&&t.sourceSpan.end.line+10&&(["body","script","style"].includes(t.name)||t.children.some(e=>$i(e)))||t.firstChild&&t.firstChild===t.lastChild&&t.firstChild.type!=="text"&&Rn(t.firstChild)&&(!t.lastChild.isTrailingSpaceSensitive||$n(t.lastChild))}function Ar(t){return t.type==="element"&&t.children.length>0&&(["html","head","ul","ol","select"].includes(t.name)||t.cssDisplay.startsWith("table")&&t.cssDisplay!=="table-cell")}function bt(t){return On(t)||t.prev&&Ri(t.prev)||In(t)}function Ri(t){return On(t)||t.type==="element"&&t.fullName==="br"||In(t)}function In(t){return Rn(t)&&$n(t)}function Rn(t){return t.hasLeadingSpaces&&(t.prev?t.prev.sourceSpan.end.linet.sourceSpan.end.line:t.parent.type==="root"||t.parent.endSourceSpan&&t.parent.endSourceSpan.start.line>t.sourceSpan.end.line)}function On(t){switch(t.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(t.name)}return!1}function Tt(t){return t.lastChild?Tt(t.lastChild):t}function $i(t){var e;return(e=t.children)==null?void 0:e.some(r=>r.type!=="text")}function Mn(t){if(t)switch(t){case"module":case"text/javascript":case"text/babel":case"application/javascript":return"babel";case"application/x-typescript":return"typescript";case"text/markdown":return"markdown";case"text/html":return"html";case"text/x-handlebars-template":return"glimmer";default:if(t.endsWith("json")||t.endsWith("importmap")||t==="speculationrules")return"json"}}function Oi(t,e){let{name:r,attrMap:n}=t;if(r!=="script"||Object.prototype.hasOwnProperty.call(n,"src"))return;let{type:s,lang:i}=t.attrMap;return!i&&!s?"babel":Ne(e,{language:i})??Mn(s)}function Mi(t,e){if(!xt(t,e))return;let{attrMap:r}=t;if(Object.prototype.hasOwnProperty.call(r,"src"))return;let{type:n,lang:s}=r;return Ne(e,{language:s})??Mn(n)}function qi(t,e){if(t.name!=="style")return;let{lang:r}=t.attrMap;return r?Ne(e,{language:r}):"css"}function Dr(t,e){return Oi(t,e)??qi(t,e)??Mi(t,e)}function Ze(t){return t==="block"||t==="list-item"||t.startsWith("table")}function Hi(t){return!Ze(t)&&t!=="inline-block"}function Vi(t){return!Ze(t)&&t!=="inline-block"}function Ui(t){return!Ze(t)}function Wi(t){return!Ze(t)}function zi(t){return!Ze(t)&&t!=="inline-block"}function me(t){return Hn(t).startsWith("pre")}function Gi(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.parent}return!1}function qn(t,e){var n;if(ge(t,e))return"block";if(((n=t.prev)==null?void 0:n.type)==="comment"){let s=t.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/u);if(s)return s[1]}let r=!1;if(t.type==="element"&&t.namespace==="svg")if(Gi(t,s=>s.fullName==="svg:foreignObject"))r=!0;else return t.name==="svg"?"inline-block":"block";switch(e.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:return t.type==="element"&&(!t.namespace||r||fe(t))&&wn[t.name]||yn}}function Hn(t){return t.type==="element"&&(!t.namespace||fe(t))&&Tn[t.name]||bn}function Yi(t){let e=Number.POSITIVE_INFINITY;for(let r of t.split(` +`)){if(r.length===0)continue;let n=O.getLeadingWhitespaceCount(r);if(n===0)return 0;r.length!==n&&nr.slice(e)).join(` +`)}function yr(t){return w(!1,w(!1,t,"'","'"),""",'"')}function N(t){return yr(t.value)}var ji=new Set(["template","style","script"]);function et(t,e){return ge(t,e)&&!ji.has(t.fullName)}function ge(t,e){return e.parser==="vue"&&t.type==="element"&&t.parent.type==="root"&&t.fullName.toLowerCase()!=="html"}function xt(t,e){return ge(t,e)&&(et(t,e)||t.attrMap.lang&&t.attrMap.lang!=="html")}function Vn(t){let e=t.fullName;return e.charAt(0)==="#"||e==="slot-scope"||e==="v-slot"||e.startsWith("v-slot:")}function Un(t,e){let r=t.parent;if(!ge(r,e))return!1;let n=r.fullName,s=t.fullName;return n==="script"&&s==="setup"||n==="style"&&s==="vars"}function kt(t,e=t.value){return t.parent.isWhitespaceSensitive?t.parent.isIndentationSensitive?B(e):B(vr(_r(e)),S):H(_,O.split(e))}function Bt(t,e){return ge(t,e)&&t.name==="script"}var wr=/\{\{(.+?)\}\}/su;async function Wn(t,e){let r=[];for(let[n,s]of t.split(wr).entries())if(n%2===0)r.push(B(s));else try{r.push(E(["{{",k([_,await T(s,e,{parser:"__ng_interpolation",__isInHtmlInterpolation:!0})]),_,"}}"]))}catch{r.push("{{",B(s),"}}")}return r}function br({parser:t}){return(e,r,n)=>T(N(n.node),e,{parser:t},Q)}var Ki=br({parser:"__ng_action"}),Qi=br({parser:"__ng_binding"}),Xi=br({parser:"__ng_directive"});function Ji(t,e){if(e.parser!=="angular")return;let{node:r}=t,n=r.fullName;if(n.startsWith("(")&&n.endsWith(")")||n.startsWith("on-"))return Ki;if(n.startsWith("[")&&n.endsWith("]")||/^bind(?:on)?-/u.test(n)||/^ng-(?:if|show|hide|class|style)$/u.test(n))return Qi;if(n.startsWith("*"))return Xi;let s=N(r);if(/^i18n(?:-.+)?$/u.test(n))return()=>he(vt(kt(r,s.trim())),!s.includes("@@"));if(wr.test(s))return i=>Wn(s,i)}var zn=Ji;function Zi(t,e){let{node:r}=t,n=N(r);if(r.fullName==="class"&&!e.parentParser&&!n.includes("{{"))return()=>n.trim().split(/\s+/u).join(" ")}var Gn=Zi;function Yn(t){return t===" "||t===` +`||t==="\f"||t==="\r"||t===" "}var ea=/^[ \t\n\r\u000c]+/,ta=/^[, \t\n\r\u000c]+/,ra=/^[^ \t\n\r\u000c]+/,na=/[,]+$/,jn=/^\d+$/,sa=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function ia(t){let e=t.length,r,n,s,i,a,o=0,u;function p(C){let A,D=C.exec(t.substring(o));if(D)return[A]=D,o+=A.length,A}let l=[];for(;;){if(p(ta),o>=e){if(l.length===0)throw new Error("Must contain one or more image candidate strings.");return l}u=o,r=p(ra),n=[],r.slice(-1)===","?(r=r.replace(na,""),d()):f()}function f(){for(p(ea),s="",i="in descriptor";;){if(a=t.charAt(o),i==="in descriptor")if(Yn(a))s&&(n.push(s),s="",i="after descriptor");else if(a===","){o+=1,s&&n.push(s),d();return}else if(a==="(")s+=a,i="in parens";else if(a===""){s&&n.push(s),d();return}else s+=a;else if(i==="in parens")if(a===")")s+=a,i="in descriptor";else if(a===""){n.push(s),d();return}else s+=a;else if(i==="after descriptor"&&!Yn(a))if(a===""){d();return}else i="in descriptor",o-=1;o+=1}}function d(){let C=!1,A,D,I,F,c={},g,y,q,x,U;for(F=0;Fua(N(t.node))}var Qn={width:"w",height:"h",density:"x"},oa=Object.keys(Qn);function ua(t){let e=Kn(t),r=oa.filter(l=>e.some(f=>Object.prototype.hasOwnProperty.call(f,l)));if(r.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[n]=r,s=Qn[n],i=e.map(l=>l.source.value),a=Math.max(...i.map(l=>l.length)),o=e.map(l=>l[n]?String(l[n].value):""),u=o.map(l=>{let f=l.indexOf(".");return f===-1?l.length:f}),p=Math.max(...u);return he(H([",",_],i.map((l,f)=>{let d=[l],C=o[f];if(C){let A=a-l.length+1,D=p-u[f],I=" ".repeat(A+D);d.push(pe(I," "),C+s)}return d})))}var Xn=aa;function Jn(t,e){let{node:r}=t,n=N(t.node).trim();if(r.fullName==="style"&&!e.parentParser&&!n.includes("{{"))return async s=>he(await s(n,{parser:"css",__isHTMLStyleAttribute:!0}))}var Tr=new WeakMap;function la(t,e){let{root:r}=t;return Tr.has(r)||Tr.set(r,r.children.some(n=>Bt(n,e)&&["ts","typescript"].includes(n.attrMap.lang))),Tr.get(r)}var Pe=la;function Zn(t,e,r){let{node:n}=r,s=N(n);return T(`type T<${s}> = any`,t,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},Q)}function es(t,e,{parseWithTs:r}){return T(`function _(${t}) {}`,e,{parser:r?"babel-ts":"babel",__isVueBindings:!0})}async function ts(t,e,r,n){let s=N(r.node),{left:i,operator:a,right:o}=ca(s),u=Pe(r,n);return[E(await T(`function _(${i}) {}`,t,{parser:u?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",a," ",await T(o,t,{parser:u?"__ts_expression":"__js_expression"})]}function ca(t){let e=/(.*?)\s+(in|of)\s+(.*)/su,r=/,([^,\]}]*)(?:,([^,\]}]*))?$/u,n=/^\(|\)$/gu,s=t.match(e);if(!s)return;let i={};if(i.for=s[3].trim(),!i.for)return;let a=w(!1,s[1].trim(),n,""),o=a.match(r);o?(i.alias=a.replace(r,""),i.iterator1=o[1].trim(),o[2]&&(i.iterator2=o[2].trim())):i.alias=a;let u=[i.alias,i.iterator1,i.iterator2];if(!u.some((p,l)=>!p&&(l===0||u.slice(l+1).some(Boolean))))return{left:u.filter(Boolean).join(","),operator:s[2],right:i.for}}function pa(t,e){if(e.parser!=="vue")return;let{node:r}=t,n=r.fullName;if(n==="v-for")return ts;if(n==="generic"&&Bt(r.parent,e))return Zn;let s=N(r),i=Pe(t,e);if(Vn(r)||Un(r,e))return a=>es(s,a,{parseWithTs:i});if(n.startsWith("@")||n.startsWith("v-on:"))return a=>ha(s,a,{parseWithTs:i});if(n.startsWith(":")||n.startsWith(".")||n.startsWith("v-bind:"))return a=>fa(s,a,{parseWithTs:i});if(n.startsWith("v-"))return a=>rs(s,a,{parseWithTs:i})}async function ha(t,e,{parseWithTs:r}){var n;try{return await rs(t,e,{parseWithTs:r})}catch(s){if(((n=s.cause)==null?void 0:n.code)!=="BABEL_PARSER_SYNTAX_ERROR")throw s}return T(t,e,{parser:r?"__vue_ts_event_binding":"__vue_event_binding"},Q)}function fa(t,e,{parseWithTs:r}){return T(t,e,{parser:r?"__vue_ts_expression":"__vue_expression"},Q)}function rs(t,e,{parseWithTs:r}){return T(t,e,{parser:r?"__ts_expression":"__js_expression"},Q)}var ns=pa;function ma(t,e){let{node:r}=t;if(r.value){if(/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(e.originalText.slice(r.valueSpan.start.offset,r.valueSpan.end.offset))||e.parser==="lwc"&&r.value.startsWith("{")&&r.value.endsWith("}"))return[r.rawName,"=",r.value];for(let n of[Xn,Jn,Gn,ns,zn]){let s=n(t,e);if(s)return da(s)}}}function da(t){return async(e,r,n,s)=>{let i=await t(e,r,n,s);if(i)return i=fr(i,a=>typeof a=="string"?w(!1,a,'"',"""):a),[n.node.rawName,'="',E(i),'"']}}var ss=ma;var is=new Proxy(()=>{},{get:()=>is}),xr=is;function ga(t){return Array.isArray(t)&&t.length>0}var Ie=ga;function J(t){return t.sourceSpan.start.offset}function Z(t){return t.sourceSpan.end.offset}function tt(t,e){return[t.isSelfClosing?"":Ca(t,e),Ce(t,e)]}function Ca(t,e){return t.lastChild&&Ee(t.lastChild)?"":[Sa(t,e),Lt(t,e)]}function Ce(t,e){return(t.next?X(t.next):_e(t.parent))?"":[Se(t,e),z(t,e)]}function Sa(t,e){return _e(t)?Se(t.lastChild,e):""}function z(t,e){return Ee(t)?Lt(t.parent,e):rt(t)?Ft(t.next,e):""}function Lt(t,e){if(xr.ok(!t.isSelfClosing),os(t,e))return"";switch(t.type){case"ieConditionalComment":return"";case"ieConditionalStartComment":return"]>";case"interpolation":return"}}";case"angularIcuExpression":return"}";case"element":if(t.isSelfClosing)return"/>";default:return">"}}function os(t,e){return!t.isSelfClosing&&!t.endSourceSpan&&(de(t)||wt(t.parent,e))}function X(t){return t.prev&&t.prev.type!=="docType"&&t.type!=="angularControlFlowBlock"&&!$(t.prev)&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces}function _e(t){var e;return((e=t.lastChild)==null?void 0:e.isTrailingSpaceSensitive)&&!t.lastChild.hasTrailingSpaces&&!$(Tt(t.lastChild))&&!me(t)}function Ee(t){return!t.next&&!t.hasTrailingSpaces&&t.isTrailingSpaceSensitive&&$(Tt(t))}function rt(t){return t.next&&!$(t.next)&&$(t)&&t.isTrailingSpaceSensitive&&!t.hasTrailingSpaces}function _a(t){let e=t.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/su);return e?e[1]?e[1].split(/\s+/u):!0:!1}function nt(t){return!t.prev&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces}function Ea(t,e,r){var f;let{node:n}=t;if(!Ie(n.attrs))return n.isSelfClosing?" ":"";let s=((f=n.prev)==null?void 0:f.type)==="comment"&&_a(n.prev.value),i=typeof s=="boolean"?()=>s:Array.isArray(s)?d=>s.includes(d.rawName):()=>!1,a=t.map(({node:d})=>i(d)?B(e.originalText.slice(J(d),Z(d))):r(),"attrs"),o=n.type==="element"&&n.fullName==="script"&&n.attrs.length===1&&n.attrs[0].fullName==="src"&&n.children.length===0,p=e.singleAttributePerLine&&n.attrs.length>1&&!ge(n,e)?S:_,l=[k([o?" ":_,H(p,a)])];return n.firstChild&&nt(n.firstChild)||n.isSelfClosing&&_e(n.parent)||o?l.push(n.isSelfClosing?" ":""):l.push(e.bracketSameLine?n.isSelfClosing?" ":"":n.isSelfClosing?_:v),l}function Aa(t){return t.firstChild&&nt(t.firstChild)?"":Nt(t)}function st(t,e,r){let{node:n}=t;return[Ae(n,e),Ea(t,e,r),n.isSelfClosing?"":Aa(n)]}function Ae(t,e){return t.prev&&rt(t.prev)?"":[G(t,e),Ft(t,e)]}function G(t,e){return nt(t)?Nt(t.parent):X(t)?Se(t.prev,e):""}var as="<${t.rawName}`;default:return`<${t.rawName}`}}function Nt(t){switch(xr.ok(!t.isSelfClosing),t.type){case"ieConditionalComment":return"]>";case"element":if(t.condition)return">";default:return">"}}function Da(t,e){if(!t.endSourceSpan)return"";let r=t.startSourceSpan.end.offset;t.firstChild&&nt(t.firstChild)&&(r-=Nt(t).length);let n=t.endSourceSpan.start.offset;return t.lastChild&&Ee(t.lastChild)?n+=Lt(t,e).length:_e(t)&&(n-=Se(t.lastChild,e).length),e.originalText.slice(r,n)}var Pt=Da;var va=new Set(["if","else if","for","switch","case"]);function ya(t,e){let{node:r}=t;switch(r.type){case"element":if(W(r)||r.type==="interpolation")return;if(!r.isSelfClosing&&xt(r,e)){let n=Dr(r,e);return n?async(s,i)=>{let a=Pt(r,e),o=/^\s*$/u.test(a),u="";return o||(u=await s(_r(a),{parser:n,__embeddedInHtml:!0}),o=u===""),[G(r,e),E(st(t,e,i)),o?"":S,u,o?"":S,tt(r,e),z(r,e)]}:void 0}break;case"text":if(W(r.parent)){let n=Dr(r.parent,e);if(n)return async s=>{let i=n==="markdown"?vr(r.value.replace(/^[^\S\n]*\n/u,"")):r.value,a={parser:n,__embeddedInHtml:!0};if(e.parser==="html"&&n==="babel"){let o="script",{attrMap:u}=r.parent;u&&(u.type==="module"||u.type==="text/babel"&&u["data-type"]==="module")&&(o="module"),a.__babelSourceType=o}return[se,G(r,e),await s(i,a),z(r,e)]}}else if(r.parent.type==="interpolation")return async n=>{let s={__isInHtmlInterpolation:!0,__embeddedInHtml:!0};return e.parser==="angular"?s.parser="__ng_interpolation":e.parser==="vue"?s.parser=Pe(t,e)?"__vue_ts_expression":"__vue_expression":s.parser="__js_expression",[k([_,await n(r.value,s)]),r.parent.next&&X(r.parent.next)?" ":_]};break;case"attribute":return ss(t,e);case"front-matter":return n=>An(r,n);case"angularControlFlowBlockParameters":return va.has(t.parent.name)?Dn:void 0;case"angularLetDeclarationInitializer":return n=>T(r.value,n,{parser:"__ng_binding",__isInHtmlAttribute:!1})}}var us=ya;var it=null;function at(t){if(it!==null&&typeof it.property){let e=it;return it=at.prototype=null,e}return it=at.prototype=t??Object.create(null),new at}var wa=10;for(let t=0;t<=wa;t++)at();function kr(t){return at(t)}function ba(t,e="type"){kr(t);function r(n){let s=n[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:n});return i}return r}var ls=ba;var Ta={"front-matter":[],root:["children"],element:["attrs","children"],ieConditionalComment:["children"],ieConditionalStartComment:[],ieConditionalEndComment:[],interpolation:["children"],text:["children"],docType:[],comment:[],attribute:[],cdata:[],angularControlFlowBlock:["children","parameters"],angularControlFlowBlockParameters:["children"],angularControlFlowBlockParameter:[],angularLetDeclaration:["init"],angularLetDeclarationInitializer:[],angularIcuExpression:["cases"],angularIcuCase:["expression"]},cs=Ta;var xa=ls(cs),ps=xa;function hs(t){return/^\s*/u.test(t)}function fs(t){return` + +`+t}var ms=new Map([["if",new Set(["else if","else"])],["else if",new Set(["else if","else"])],["for",new Set(["empty"])],["defer",new Set(["placeholder","error","loading"])],["placeholder",new Set(["placeholder","error","loading"])],["error",new Set(["placeholder","error","loading"])],["loading",new Set(["placeholder","error","loading"])]]);function ds(t){let e=Z(t);return t.type==="element"&&!t.endSourceSpan&&Ie(t.children)?Math.max(e,ds(K(!1,t.children,-1))):e}function ot(t,e,r){let n=t.node;if(de(n)){let s=ds(n);return[G(n,e),B(O.trimEnd(e.originalText.slice(J(n)+(n.prev&&rt(n.prev)?Ft(n).length:0),s-(n.next&&X(n.next)?Se(n,e).length:0)))),z(n,e)]}return r()}function It(t,e){return $(t)&&$(e)?t.isTrailingSpaceSensitive?t.hasTrailingSpaces?bt(e)?S:_:"":bt(e)?S:v:rt(t)&&(de(e)||e.firstChild||e.isSelfClosing||e.type==="element"&&e.attrs.length>0)||t.type==="element"&&t.isSelfClosing&&X(e)?"":!e.isLeadingSpaceSensitive||bt(e)||X(e)&&t.lastChild&&Ee(t.lastChild)&&t.lastChild.lastChild&&Ee(t.lastChild.lastChild)?S:e.hasLeadingSpaces?_:v}function Re(t,e,r){let{node:n}=t;if(Ar(n))return[se,...t.map(i=>{let a=i.node,o=a.prev?It(a.prev,a):"";return[o?[o,Je(a.prev)?S:""]:"",ot(i,e,r)]},"children")];let s=n.children.map(()=>Symbol(""));return t.map((i,a)=>{let o=i.node;if($(o)){if(o.prev&&$(o.prev)){let A=It(o.prev,o);if(A)return Je(o.prev)?[S,S,ot(i,e,r)]:[A,ot(i,e,r)]}return ot(i,e,r)}let u=[],p=[],l=[],f=[],d=o.prev?It(o.prev,o):"",C=o.next?It(o,o.next):"";return d&&(Je(o.prev)?u.push(S,S):d===S?u.push(S):$(o.prev)?p.push(d):p.push(pe("",v,{groupId:s[a-1]}))),C&&(Je(o)?$(o.next)&&f.push(S,S):C===S?$(o.next)&&f.push(S):l.push(C)),[...u,E([...p,E([ot(i,e,r),...l],{id:s[a]})]),...f]},"children")}function gs(t,e,r){let{node:n}=t,s=[];ka(t)&&s.push("} "),s.push("@",n.name),n.parameters&&s.push(" (",E(r("parameters")),")"),s.push(" {");let i=Cs(n);return n.children.length>0?(n.firstChild.hasLeadingSpaces=!0,n.lastChild.hasTrailingSpaces=!0,s.push(k([S,Re(t,e,r)])),i&&s.push(S,"}")):i&&s.push("}"),E(s,{shouldBreak:!0})}function Cs(t){var e,r;return!(((e=t.next)==null?void 0:e.type)==="angularControlFlowBlock"&&((r=ms.get(t.name))!=null&&r.has(t.next.name)))}function ka(t){let{previous:e}=t;return(e==null?void 0:e.type)==="angularControlFlowBlock"&&!de(e)&&!Cs(e)}function Ss(t,e,r){return[k([v,H([";",_],t.map(r,"children"))]),v]}function _s(t,e,r){let{node:n}=t;return[Ae(n,e),E([n.switchValue.trim(),", ",n.clause,n.cases.length>0?[",",k([_,H(_,t.map(r,"cases"))])]:"",v]),Ce(n,e)]}function Es(t,e,r){let{node:n}=t;return[n.value," {",E([k([v,t.map(({node:s,isLast:i})=>{let a=[r()];return s.type==="text"&&(s.hasLeadingSpaces&&a.unshift(_),s.hasTrailingSpaces&&!i&&a.push(_)),a},"expression")]),v]),"}"]}function As(t,e,r){let{node:n}=t;if(wt(n,e))return[G(n,e),E(st(t,e,r)),B(Pt(n,e)),...tt(n,e),z(n,e)];let s=n.children.length===1&&(n.firstChild.type==="interpolation"||n.firstChild.type==="angularIcuExpression")&&n.firstChild.isLeadingSpaceSensitive&&!n.firstChild.hasLeadingSpaces&&n.lastChild.isTrailingSpaceSensitive&&!n.lastChild.hasTrailingSpaces,i=Symbol("element-attr-group-id"),a=l=>E([E(st(t,e,r),{id:i}),l,tt(n,e)]),o=l=>s?mn(l,{groupId:i}):(W(n)||et(n,e))&&n.parent.type==="root"&&e.parser==="vue"&&!e.vueIndentScriptAndStyle?l:k(l),u=()=>s?pe(v,"",{groupId:i}):n.firstChild.hasLeadingSpaces&&n.firstChild.isLeadingSpaceSensitive?_:n.firstChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive?hn(v):v,p=()=>(n.next?X(n.next):_e(n.parent))?n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?" ":"":s?pe(v,"",{groupId:i}):n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?_:(n.lastChild.type==="comment"||n.lastChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${e.tabWidth*(t.ancestors.length-1)}}$`,"u").test(n.lastChild.value)?"":v;return n.children.length===0?a(n.hasDanglingSpaces&&n.isDanglingSpaceSensitive?_:""):a([Pn(n)?se:"",o([u(),Re(t,e,r)]),p()])}function ut(t){return t>=9&&t<=32||t==160}function Rt(t){return 48<=t&&t<=57}function lt(t){return t>=97&&t<=122||t>=65&&t<=90}function Ds(t){return t>=97&&t<=102||t>=65&&t<=70||Rt(t)}function $t(t){return t===10||t===13}function Br(t){return 48<=t&&t<=55}function Ot(t){return t===39||t===34||t===96}var Ba=/-+([a-z0-9])/g;function ys(t){return t.replace(Ba,(...e)=>e[1].toUpperCase())}var ie=class t{constructor(e,r,n,s){this.file=e,this.offset=r,this.line=n,this.col=s}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(e){let r=this.file.content,n=r.length,s=this.offset,i=this.line,a=this.col;for(;s>0&&e<0;)if(s--,e++,r.charCodeAt(s)==10){i--;let u=r.substring(0,s-1).lastIndexOf(String.fromCharCode(10));a=u>0?s-u:s}else a--;for(;s0;){let o=r.charCodeAt(s);s++,e--,o==10?(i++,a=0):a++}return new t(this.file,s,i,a)}getContext(e,r){let n=this.file.content,s=this.offset;if(s!=null){s>n.length-1&&(s=n.length-1);let i=s,a=0,o=0;for(;a0&&(s--,a++,!(n[s]==` +`&&++o==r)););for(a=0,o=0;a]${e.after}")`:this.msg}toString(){let e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}};var La=[Na,Pa,Ra,Oa,Ma,Va,qa,Ha,Ua,$a];function Fa(t,e){for(let r of La)r(t,e);return t}function Na(t){t.walk(e=>{if(e.type==="element"&&e.tagDefinition.ignoreFirstLf&&e.children.length>0&&e.children[0].type==="text"&&e.children[0].value[0]===` +`){let r=e.children[0];r.value.length===1?e.removeChild(r):r.value=r.value.slice(1)}})}function Pa(t){let e=r=>{var n,s;return r.type==="element"&&((n=r.prev)==null?void 0:n.type)==="ieConditionalStartComment"&&r.prev.sourceSpan.end.offset===r.startSourceSpan.start.offset&&((s=r.firstChild)==null?void 0:s.type)==="ieConditionalEndComment"&&r.firstChild.sourceSpan.start.offset===r.startSourceSpan.end.offset};t.walk(r=>{if(r.children)for(let n=0;n{if(n.children)for(let s=0;se.type==="cdata",e=>``)}function $a(t){let e=r=>{var n,s;return r.type==="element"&&r.attrs.length===0&&r.children.length===1&&r.firstChild.type==="text"&&!O.hasWhitespaceCharacter(r.children[0].value)&&!r.firstChild.hasLeadingSpaces&&!r.firstChild.hasTrailingSpaces&&r.isLeadingSpaceSensitive&&!r.hasLeadingSpaces&&r.isTrailingSpaceSensitive&&!r.hasTrailingSpaces&&((n=r.prev)==null?void 0:n.type)==="text"&&((s=r.next)==null?void 0:s.type)==="text"};t.walk(r=>{if(r.children)for(let n=0;n`+s.firstChild.value+``+a.value,i.sourceSpan=new h(i.sourceSpan.start,a.sourceSpan.end),i.isTrailingSpaceSensitive=a.isTrailingSpaceSensitive,i.hasTrailingSpaces=a.hasTrailingSpaces,r.removeChild(s),n--,r.removeChild(a)}})}function Oa(t,e){if(e.parser==="html")return;let r=/\{\{(.+?)\}\}/su;t.walk(n=>{if(kn(n))for(let s of n.children){if(s.type!=="text")continue;let i=s.sourceSpan.start,a=null,o=s.value.split(r);for(let u=0;u0&&n.insertChildBefore(s,{type:"text",value:p,sourceSpan:new h(i,a)});continue}a=i.moveBy(p.length+4),n.insertChildBefore(s,{type:"interpolation",sourceSpan:new h(i,a),children:p.length===0?[]:[{type:"text",value:p,sourceSpan:new h(i.moveBy(2),a.moveBy(-2))}]})}n.removeChild(s)}})}function Ma(t){t.walk(e=>{let r=e.$children;if(!r)return;if(r.length===0||r.length===1&&r[0].type==="text"&&O.trim(r[0].value).length===0){e.hasDanglingSpaces=r.length>0,e.$children=[];return}let n=Bn(e),s=Er(e);if(!n)for(let i=0;i{e.isSelfClosing=!e.children||e.type==="element"&&(e.tagDefinition.isVoid||e.endSourceSpan&&e.startSourceSpan.start===e.endSourceSpan.start&&e.startSourceSpan.end===e.endSourceSpan.end)})}function Ha(t,e){t.walk(r=>{r.type==="element"&&(r.hasHtmComponentClosingTag=r.endSourceSpan&&/^<\s*\/\s*\/\s*>$/u.test(e.originalText.slice(r.endSourceSpan.start.offset,r.endSourceSpan.end.offset)))})}function Va(t,e){t.walk(r=>{r.cssDisplay=qn(r,e)})}function Ua(t,e){t.walk(r=>{let{children:n}=r;if(n){if(n.length===0){r.isDanglingSpaceSensitive=Nn(r);return}for(let s of n)s.isLeadingSpaceSensitive=Ln(s,e),s.isTrailingSpaceSensitive=Fn(s,e);for(let s=0;s of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var xs="HTML",Ga={bracketSameLine:Lr.bracketSameLine,htmlWhitespaceSensitivity:{category:xs,type:"choice",default:"css",description:"How to handle whitespaces in HTML.",choices:[{value:"css",description:"Respect the default value of CSS display property."},{value:"strict",description:"Whitespaces are considered sensitive."},{value:"ignore",description:"Whitespaces are considered insensitive."}]},singleAttributePerLine:Lr.singleAttributePerLine,vueIndentScriptAndStyle:{category:xs,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},ks=Ga;var en={};an(en,{angular:()=>Wo,html:()=>Uo,lwc:()=>Go,vue:()=>zo});var Np=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g");var Bs;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"})(Bs||(Bs={}));var Ls;(function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default"})(Ls||(Ls={}));var Fs;(function(t){t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform"})(Fs||(Fs={}));var Fr={name:"custom-elements"},Nr={name:"no-errors-schema"};var ee;(function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"})(ee||(ee={}));var Ns;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"})(Ns||(Ns={}));var P;(function(t){t[t.RAW_TEXT=0]="RAW_TEXT",t[t.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",t[t.PARSABLE_DATA=2]="PARSABLE_DATA"})(P||(P={}));function ct(t,e=!0){if(t[0]!=":")return[null,t];let r=t.indexOf(":",1);if(r===-1){if(e)throw new Error(`Unsupported format "${t}" expecting ":namespace:name"`);return[null,t]}return[t.slice(1,r),t.slice(r+1)]}function Pr(t){return ct(t)[1]==="ng-container"}function Ir(t){return ct(t)[1]==="ng-content"}function Me(t){return t===null?null:ct(t)[0]}function qe(t,e){return t?`:${t}:${e}`:e}var Ht;function Rr(){return Ht||(Ht={},qt(ee.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),qt(ee.STYLE,["*|style"]),qt(ee.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","input|src","ins|cite","q|cite","source|src","track|src","video|poster","video|src"]),qt(ee.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"])),Ht}function qt(t,e){for(let r of e)Ht[r.toLowerCase()]=t}var Vt=class{};var Ya="boolean",ja="number",Ka="string",Qa="object",Xa=["[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume",":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":svg:graphics^:svg:|",":svg:animation^:svg:|*begin,*end,*repeat",":svg:geometry^:svg:|",":svg:componentTransferFunction^:svg:|",":svg:gradient^:svg:|",":svg:textContent^:svg:graphics|",":svg:textPositioning^:svg:textContent|","a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username","area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username","audio^media|","br^[HTMLElement]|clear","base^[HTMLElement]|href,target","body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink","button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value","canvas^[HTMLElement]|#height,#width","content^[HTMLElement]|select","dl^[HTMLElement]|!compact","data^[HTMLElement]|value","datalist^[HTMLElement]|","details^[HTMLElement]|!open","dialog^[HTMLElement]|!open,returnValue","dir^[HTMLElement]|!compact","div^[HTMLElement]|align","embed^[HTMLElement]|align,height,name,src,type,width","fieldset^[HTMLElement]|!disabled,name","font^[HTMLElement]|color,face,size","form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target","frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src","frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows","hr^[HTMLElement]|align,color,!noShade,size,width","head^[HTMLElement]|","h1,h2,h3,h4,h5,h6^[HTMLElement]|align","html^[HTMLElement]|version","iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width","img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width","input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type","map^[HTMLElement]|name","marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width","menu^[HTMLElement]|!compact","meta^[HTMLElement]|content,httpEquiv,media,name,scheme","meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value","ins,del^[HTMLElement]|cite,dateTime","ol^[HTMLElement]|!compact,!reversed,#start,type","object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width","optgroup^[HTMLElement]|!disabled,label","option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value","output^[HTMLElement]|defaultValue,%htmlFor,name,value","p^[HTMLElement]|align","param^[HTMLElement]|name,type,value,valueType","picture^[HTMLElement]|","pre^[HTMLElement]|#width","progress^[HTMLElement]|#max,#value","q,blockquote,cite^[HTMLElement]|","script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type","select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value","slot^[HTMLElement]|name","source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width","span^[HTMLElement]|","style^[HTMLElement]|!disabled,media,type","caption^[HTMLElement]|align","th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width","col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width","table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width","tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign","tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign","template^[HTMLElement]|","textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap","time^[HTMLElement]|dateTime","title^[HTMLElement]|text","track^[HTMLElement]|!default,kind,label,src,srclang","ul^[HTMLElement]|!compact,type","unknown^[HTMLElement]|","video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width",":svg:a^:svg:graphics|",":svg:animate^:svg:animation|",":svg:animateMotion^:svg:animation|",":svg:animateTransform^:svg:animation|",":svg:circle^:svg:geometry|",":svg:clipPath^:svg:graphics|",":svg:defs^:svg:graphics|",":svg:desc^:svg:|",":svg:discard^:svg:|",":svg:ellipse^:svg:geometry|",":svg:feBlend^:svg:|",":svg:feColorMatrix^:svg:|",":svg:feComponentTransfer^:svg:|",":svg:feComposite^:svg:|",":svg:feConvolveMatrix^:svg:|",":svg:feDiffuseLighting^:svg:|",":svg:feDisplacementMap^:svg:|",":svg:feDistantLight^:svg:|",":svg:feDropShadow^:svg:|",":svg:feFlood^:svg:|",":svg:feFuncA^:svg:componentTransferFunction|",":svg:feFuncB^:svg:componentTransferFunction|",":svg:feFuncG^:svg:componentTransferFunction|",":svg:feFuncR^:svg:componentTransferFunction|",":svg:feGaussianBlur^:svg:|",":svg:feImage^:svg:|",":svg:feMerge^:svg:|",":svg:feMergeNode^:svg:|",":svg:feMorphology^:svg:|",":svg:feOffset^:svg:|",":svg:fePointLight^:svg:|",":svg:feSpecularLighting^:svg:|",":svg:feSpotLight^:svg:|",":svg:feTile^:svg:|",":svg:feTurbulence^:svg:|",":svg:filter^:svg:|",":svg:foreignObject^:svg:graphics|",":svg:g^:svg:graphics|",":svg:image^:svg:graphics|decoding",":svg:line^:svg:geometry|",":svg:linearGradient^:svg:gradient|",":svg:mpath^:svg:|",":svg:marker^:svg:|",":svg:mask^:svg:|",":svg:metadata^:svg:|",":svg:path^:svg:geometry|",":svg:pattern^:svg:|",":svg:polygon^:svg:geometry|",":svg:polyline^:svg:geometry|",":svg:radialGradient^:svg:gradient|",":svg:rect^:svg:geometry|",":svg:svg^:svg:graphics|#currentScale,#zoomAndPan",":svg:script^:svg:|type",":svg:set^:svg:animation|",":svg:stop^:svg:|",":svg:style^:svg:|!disabled,media,title,type",":svg:switch^:svg:graphics|",":svg:symbol^:svg:|",":svg:tspan^:svg:textPositioning|",":svg:text^:svg:textPositioning|",":svg:textPath^:svg:textContent|",":svg:title^:svg:|",":svg:use^:svg:graphics|",":svg:view^:svg:|#zoomAndPan","data^[HTMLElement]|value","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|",":math:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforeinput,*beforematch,*beforetoggle,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contentvisibilityautostatechange,*contextlost,*contextmenu,*contextrestored,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*scrollend,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":math:math^:math:|",":math:maction^:math:|",":math:menclose^:math:|",":math:merror^:math:|",":math:mfenced^:math:|",":math:mfrac^:math:|",":math:mi^:math:|",":math:mmultiscripts^:math:|",":math:mn^:math:|",":math:mo^:math:|",":math:mover^:math:|",":math:mpadded^:math:|",":math:mphantom^:math:|",":math:mroot^:math:|",":math:mrow^:math:|",":math:ms^:math:|",":math:mspace^:math:|",":math:msqrt^:math:|",":math:mstyle^:math:|",":math:msub^:math:|",":math:msubsup^:math:|",":math:msup^:math:|",":math:mtable^:math:|",":math:mtd^:math:|",":math:mtext^:math:|",":math:mtr^:math:|",":math:munder^:math:|",":math:munderover^:math:|",":math:semantics^:math:|"],Ps=new Map(Object.entries({class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"})),Ja=Array.from(Ps).reduce((t,[e,r])=>(t.set(e,r),t),new Map),Ut=class extends Vt{constructor(){super(),this._schema=new Map,this._eventSchema=new Map,Xa.forEach(e=>{let r=new Map,n=new Set,[s,i]=e.split("|"),a=i.split(","),[o,u]=s.split("^");o.split(",").forEach(l=>{this._schema.set(l.toLowerCase(),r),this._eventSchema.set(l.toLowerCase(),n)});let p=u&&this._schema.get(u.toLowerCase());if(p){for(let[l,f]of p)r.set(l,f);for(let l of this._eventSchema.get(u.toLowerCase()))n.add(l)}a.forEach(l=>{if(l.length>0)switch(l[0]){case"*":n.add(l.substring(1));break;case"!":r.set(l.substring(1),Ya);break;case"#":r.set(l.substring(1),ja);break;case"%":r.set(l.substring(1),Qa);break;default:r.set(l,Ka)}})})}hasProperty(e,r,n){if(n.some(i=>i.name===Nr.name))return!0;if(e.indexOf("-")>-1){if(Pr(e)||Ir(e))return!1;if(n.some(i=>i.name===Fr.name))return!0}return(this._schema.get(e.toLowerCase())||this._schema.get("unknown")).has(r)}hasElement(e,r){return r.some(n=>n.name===Nr.name)||e.indexOf("-")>-1&&(Pr(e)||Ir(e)||r.some(n=>n.name===Fr.name))?!0:this._schema.has(e.toLowerCase())}securityContext(e,r,n){n&&(r=this.getMappedPropName(r)),e=e.toLowerCase(),r=r.toLowerCase();let s=Rr()[e+"|"+r];return s||(s=Rr()["*|"+r],s||ee.NONE)}getMappedPropName(e){return Ps.get(e)??e}getDefaultComponentElementName(){return"ng-component"}validateProperty(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${e}' is disallowed for security reasons, please use (${e.slice(2)})=... +If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let r=this._schema.get(e.toLowerCase())||this._schema.get("unknown");return Array.from(r.keys()).map(n=>Ja.get(n)??n)}allKnownEventsOfElement(e){return Array.from(this._eventSchema.get(e.toLowerCase())??[])}normalizeAnimationStyleProperty(e){return ys(e)}normalizeAnimationStyleValue(e,r,n){let s="",i=n.toString().trim(),a=null;if(Za(e)&&n!==0&&n!=="0")if(typeof n=="number")s="px";else{let o=n.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&o[1].length==0&&(a=`Please provide a CSS unit value for ${r}:${n}`)}return{error:a,value:i+s}}};function Za(t){switch(t){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var m=class{constructor({closedByChildren:e,implicitNamespacePrefix:r,contentType:n=P.PARSABLE_DATA,closedByParent:s=!1,isVoid:i=!1,ignoreFirstLf:a=!1,preventNamespaceInheritance:o=!1,canSelfClose:u=!1}={}){this.closedByChildren={},this.closedByParent=!1,e&&e.length>0&&e.forEach(p=>this.closedByChildren[p]=!0),this.isVoid=i,this.closedByParent=s||i,this.implicitNamespacePrefix=r||null,this.contentType=n,this.ignoreFirstLf=a,this.preventNamespaceInheritance=o,this.canSelfClose=u??i}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}getContentType(e){return typeof this.contentType=="object"?(e===void 0?void 0:this.contentType[e])??this.contentType.default:this.contentType}},Is,pt;function He(t){return pt||(Is=new m({canSelfClose:!0}),pt=Object.assign(Object.create(null),{base:new m({isVoid:!0}),meta:new m({isVoid:!0}),area:new m({isVoid:!0}),embed:new m({isVoid:!0}),link:new m({isVoid:!0}),img:new m({isVoid:!0}),input:new m({isVoid:!0}),param:new m({isVoid:!0}),hr:new m({isVoid:!0}),br:new m({isVoid:!0}),source:new m({isVoid:!0}),track:new m({isVoid:!0}),wbr:new m({isVoid:!0}),p:new m({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new m({closedByChildren:["tbody","tfoot"]}),tbody:new m({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new m({closedByChildren:["tbody"],closedByParent:!0}),tr:new m({closedByChildren:["tr"],closedByParent:!0}),td:new m({closedByChildren:["td","th"],closedByParent:!0}),th:new m({closedByChildren:["td","th"],closedByParent:!0}),col:new m({isVoid:!0}),svg:new m({implicitNamespacePrefix:"svg"}),foreignObject:new m({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new m({implicitNamespacePrefix:"math"}),li:new m({closedByChildren:["li"],closedByParent:!0}),dt:new m({closedByChildren:["dt","dd"]}),dd:new m({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new m({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new m({closedByChildren:["optgroup"],closedByParent:!0}),option:new m({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new m({ignoreFirstLf:!0}),listing:new m({ignoreFirstLf:!0}),style:new m({contentType:P.RAW_TEXT}),script:new m({contentType:P.RAW_TEXT}),title:new m({contentType:{default:P.ESCAPABLE_RAW_TEXT,svg:P.PARSABLE_DATA}}),textarea:new m({contentType:P.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new Ut().allKnownElementNames().forEach(e=>{!pt[e]&&Me(e)===null&&(pt[e]=new m({canSelfClose:!1}))})),pt[t]??Is}var ae=class{constructor(e,r){this.sourceSpan=e,this.i18n=r}},Wt=class extends ae{constructor(e,r,n,s){super(r,s),this.value=e,this.tokens=n,this.type="text"}visit(e,r){return e.visitText(this,r)}},zt=class extends ae{constructor(e,r,n,s){super(r,s),this.value=e,this.tokens=n,this.type="cdata"}visit(e,r){return e.visitCdata(this,r)}},Gt=class extends ae{constructor(e,r,n,s,i,a){super(s,a),this.switchValue=e,this.type=r,this.cases=n,this.switchValueSourceSpan=i}visit(e,r){return e.visitExpansion(this,r)}},Yt=class{constructor(e,r,n,s,i){this.value=e,this.expression=r,this.sourceSpan=n,this.valueSourceSpan=s,this.expSourceSpan=i,this.type="expansionCase"}visit(e,r){return e.visitExpansionCase(this,r)}},jt=class extends ae{constructor(e,r,n,s,i,a,o){super(n,o),this.name=e,this.value=r,this.keySpan=s,this.valueSpan=i,this.valueTokens=a,this.type="attribute"}visit(e,r){return e.visitAttribute(this,r)}get nameSpan(){return this.keySpan}},Y=class extends ae{constructor(e,r,n,s,i,a=null,o=null,u){super(s,u),this.name=e,this.attrs=r,this.children=n,this.startSourceSpan=i,this.endSourceSpan=a,this.nameSpan=o,this.type="element"}visit(e,r){return e.visitElement(this,r)}},Kt=class{constructor(e,r){this.value=e,this.sourceSpan=r,this.type="comment"}visit(e,r){return e.visitComment(this,r)}},Qt=class{constructor(e,r){this.value=e,this.sourceSpan=r,this.type="docType"}visit(e,r){return e.visitDocType(this,r)}},te=class extends ae{constructor(e,r,n,s,i,a,o=null,u){super(s,u),this.name=e,this.parameters=r,this.children=n,this.nameSpan=i,this.startSourceSpan=a,this.endSourceSpan=o,this.type="block"}visit(e,r){return e.visitBlock(this,r)}},ht=class{constructor(e,r){this.expression=e,this.sourceSpan=r,this.type="blockParameter",this.startSourceSpan=null,this.endSourceSpan=null}visit(e,r){return e.visitBlockParameter(this,r)}},ft=class{constructor(e,r,n,s,i){this.name=e,this.value=r,this.sourceSpan=n,this.nameSpan=s,this.valueSpan=i,this.type="letDeclaration",this.startSourceSpan=null,this.endSourceSpan=null}visit(e,r){return e.visitLetDeclaration(this,r)}};function Xt(t,e,r=null){let n=[],s=t.visit?i=>t.visit(i,r)||i.visit(t,r):i=>i.visit(t,r);return e.forEach(i=>{let a=s(i);a&&n.push(a)}),n}var mt=class{constructor(){}visitElement(e,r){this.visitChildren(r,n=>{n(e.attrs),n(e.children)})}visitAttribute(e,r){}visitText(e,r){}visitCdata(e,r){}visitComment(e,r){}visitDocType(e,r){}visitExpansion(e,r){return this.visitChildren(r,n=>{n(e.cases)})}visitExpansionCase(e,r){}visitBlock(e,r){this.visitChildren(r,n=>{n(e.parameters),n(e.children)})}visitBlockParameter(e,r){}visitLetDeclaration(e,r){}visitChildren(e,r){let n=[],s=this;function i(a){a&&n.push(Xt(s,a,e))}return r(i),Array.prototype.concat.apply([],n)}};var Ve={AElig:"\xC6",AMP:"&",amp:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",af:"\u2061",Aring:"\xC5",angst:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",colone:"\u2254",coloneq:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",setminus:"\u2216",setmn:"\u2216",smallsetminus:"\u2216",ssetmn:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",doublebarwedge:"\u2306",Bcy:"\u0411",Because:"\u2235",becaus:"\u2235",because:"\u2235",Bernoullis:"\u212C",Bscr:"\u212C",bernou:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",breve:"\u02D8",Bumpeq:"\u224E",HumpDownHump:"\u224E",bump:"\u224E",CHcy:"\u0427",COPY:"\xA9",copy:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",DD:"\u2145",Cayleys:"\u212D",Cfr:"\u212D",Ccaron:"\u010C",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",cedil:"\xB8",CenterDot:"\xB7",centerdot:"\xB7",middot:"\xB7",Chi:"\u03A7",CircleDot:"\u2299",odot:"\u2299",CircleMinus:"\u2296",ominus:"\u2296",CirclePlus:"\u2295",oplus:"\u2295",CircleTimes:"\u2297",otimes:"\u2297",ClockwiseContourIntegral:"\u2232",cwconint:"\u2232",CloseCurlyDoubleQuote:"\u201D",rdquo:"\u201D",rdquor:"\u201D",CloseCurlyQuote:"\u2019",rsquo:"\u2019",rsquor:"\u2019",Colon:"\u2237",Proportion:"\u2237",Colone:"\u2A74",Congruent:"\u2261",equiv:"\u2261",Conint:"\u222F",DoubleContourIntegral:"\u222F",ContourIntegral:"\u222E",conint:"\u222E",oint:"\u222E",Copf:"\u2102",complexes:"\u2102",Coproduct:"\u2210",coprod:"\u2210",CounterClockwiseContourIntegral:"\u2233",awconint:"\u2233",Cross:"\u2A2F",Cscr:"\u{1D49E}",Cup:"\u22D3",CupCap:"\u224D",asympeq:"\u224D",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",ddagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",DoubleLeftTee:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",nabla:"\u2207",Delta:"\u0394",Dfr:"\u{1D507}",DiacriticalAcute:"\xB4",acute:"\xB4",DiacriticalDot:"\u02D9",dot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",dblac:"\u02DD",DiacriticalGrave:"`",grave:"`",DiacriticalTilde:"\u02DC",tilde:"\u02DC",Diamond:"\u22C4",diam:"\u22C4",diamond:"\u22C4",DifferentialD:"\u2146",dd:"\u2146",Dopf:"\u{1D53B}",Dot:"\xA8",DoubleDot:"\xA8",die:"\xA8",uml:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",doteq:"\u2250",esdot:"\u2250",DoubleDownArrow:"\u21D3",Downarrow:"\u21D3",dArr:"\u21D3",DoubleLeftArrow:"\u21D0",Leftarrow:"\u21D0",lArr:"\u21D0",DoubleLeftRightArrow:"\u21D4",Leftrightarrow:"\u21D4",hArr:"\u21D4",iff:"\u21D4",DoubleLongLeftArrow:"\u27F8",Longleftarrow:"\u27F8",xlArr:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",Longleftrightarrow:"\u27FA",xhArr:"\u27FA",DoubleLongRightArrow:"\u27F9",Longrightarrow:"\u27F9",xrArr:"\u27F9",DoubleRightArrow:"\u21D2",Implies:"\u21D2",Rightarrow:"\u21D2",rArr:"\u21D2",DoubleRightTee:"\u22A8",vDash:"\u22A8",DoubleUpArrow:"\u21D1",Uparrow:"\u21D1",uArr:"\u21D1",DoubleUpDownArrow:"\u21D5",Updownarrow:"\u21D5",vArr:"\u21D5",DoubleVerticalBar:"\u2225",par:"\u2225",parallel:"\u2225",shortparallel:"\u2225",spar:"\u2225",DownArrow:"\u2193",ShortDownArrow:"\u2193",darr:"\u2193",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",duarr:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",leftharpoondown:"\u21BD",lhard:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",rhard:"\u21C1",rightharpoondown:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",top:"\u22A4",DownTeeArrow:"\u21A7",mapstodown:"\u21A7",Dscr:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ETH:"\xD0",Eacute:"\xC9",Ecaron:"\u011A",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrave:"\xC8",Element:"\u2208",in:"\u2208",isin:"\u2208",isinv:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",eqsim:"\u2242",esim:"\u2242",Equilibrium:"\u21CC",rightleftharpoons:"\u21CC",rlhar:"\u21CC",Escr:"\u2130",expectation:"\u2130",Esim:"\u2A73",Eta:"\u0397",Euml:"\xCB",Exists:"\u2203",exist:"\u2203",ExponentialE:"\u2147",ee:"\u2147",exponentiale:"\u2147",Fcy:"\u0424",Ffr:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",blacksquare:"\u25AA",squarf:"\u25AA",squf:"\u25AA",Fopf:"\u{1D53D}",ForAll:"\u2200",forall:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",gt:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1D50A}",Gg:"\u22D9",ggg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",ge:"\u2265",geq:"\u2265",GreaterEqualLess:"\u22DB",gel:"\u22DB",gtreqless:"\u22DB",GreaterFullEqual:"\u2267",gE:"\u2267",geqq:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",gl:"\u2277",gtrless:"\u2277",GreaterSlantEqual:"\u2A7E",geqslant:"\u2A7E",ges:"\u2A7E",GreaterTilde:"\u2273",gsim:"\u2273",gtrsim:"\u2273",Gscr:"\u{1D4A2}",Gt:"\u226B",NestedGreaterGreater:"\u226B",gg:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",caron:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",Poincareplane:"\u210C",HilbertSpace:"\u210B",Hscr:"\u210B",hamilt:"\u210B",Hopf:"\u210D",quaternions:"\u210D",HorizontalLine:"\u2500",boxh:"\u2500",Hstrok:"\u0126",HumpEqual:"\u224F",bumpe:"\u224F",bumpeq:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xCD",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Im:"\u2111",image:"\u2111",imagpart:"\u2111",Igrave:"\xCC",Imacr:"\u012A",ImaginaryI:"\u2148",ii:"\u2148",Int:"\u222C",Integral:"\u222B",int:"\u222B",Intersection:"\u22C2",bigcap:"\u22C2",xcap:"\u22C2",InvisibleComma:"\u2063",ic:"\u2063",InvisibleTimes:"\u2062",it:"\u2062",Iogon:"\u012E",Iopf:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",imagline:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",LJcy:"\u0409",LT:"<",lt:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Lscr:"\u2112",lagran:"\u2112",Larr:"\u219E",twoheadleftarrow:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",lang:"\u27E8",langle:"\u27E8",LeftArrow:"\u2190",ShortLeftArrow:"\u2190",larr:"\u2190",leftarrow:"\u2190",slarr:"\u2190",LeftArrowBar:"\u21E4",larrb:"\u21E4",LeftArrowRightArrow:"\u21C6",leftrightarrows:"\u21C6",lrarr:"\u21C6",LeftCeiling:"\u2308",lceil:"\u2308",LeftDoubleBracket:"\u27E6",lobrk:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",dharl:"\u21C3",downharpoonleft:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",lfloor:"\u230A",LeftRightArrow:"\u2194",harr:"\u2194",leftrightarrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",dashv:"\u22A3",LeftTeeArrow:"\u21A4",mapstoleft:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",vartriangleleft:"\u22B2",vltri:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",ltrie:"\u22B4",trianglelefteq:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",uharl:"\u21BF",upharpoonleft:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",leftharpoonup:"\u21BC",lharu:"\u21BC",LeftVectorBar:"\u2952",LessEqualGreater:"\u22DA",leg:"\u22DA",lesseqgtr:"\u22DA",LessFullEqual:"\u2266",lE:"\u2266",leqq:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",lg:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",leqslant:"\u2A7D",les:"\u2A7D",LessTilde:"\u2272",lesssim:"\u2272",lsim:"\u2272",Lfr:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",lAarr:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",longleftarrow:"\u27F5",xlarr:"\u27F5",LongLeftRightArrow:"\u27F7",longleftrightarrow:"\u27F7",xharr:"\u27F7",LongRightArrow:"\u27F6",longrightarrow:"\u27F6",xrarr:"\u27F6",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",swarr:"\u2199",swarrow:"\u2199",LowerRightArrow:"\u2198",searr:"\u2198",searrow:"\u2198",Lsh:"\u21B0",lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",NestedLessLess:"\u226A",ll:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mscr:"\u2133",phmmat:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",mnplus:"\u2213",mp:"\u2213",Mopf:"\u{1D544}",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",ZeroWidthSpace:"\u200B",NewLine:` +`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nbsp:"\xA0",Nopf:"\u2115",naturals:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",nequiv:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",npar:"\u2226",nparallel:"\u2226",nshortparallel:"\u2226",nspar:"\u2226",NotElement:"\u2209",notin:"\u2209",notinva:"\u2209",NotEqual:"\u2260",ne:"\u2260",NotEqualTilde:"\u2242\u0338",nesim:"\u2242\u0338",NotExists:"\u2204",nexist:"\u2204",nexists:"\u2204",NotGreater:"\u226F",ngt:"\u226F",ngtr:"\u226F",NotGreaterEqual:"\u2271",nge:"\u2271",ngeq:"\u2271",NotGreaterFullEqual:"\u2267\u0338",ngE:"\u2267\u0338",ngeqq:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",nGtv:"\u226B\u0338",NotGreaterLess:"\u2279",ntgl:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",NotGreaterTilde:"\u2275",ngsim:"\u2275",NotHumpDownHump:"\u224E\u0338",nbump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",nbumpe:"\u224F\u0338",NotLeftTriangle:"\u22EA",nltri:"\u22EA",ntriangleleft:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",nltrie:"\u22EC",ntrianglelefteq:"\u22EC",NotLess:"\u226E",nless:"\u226E",nlt:"\u226E",NotLessEqual:"\u2270",nle:"\u2270",nleq:"\u2270",NotLessGreater:"\u2278",ntlg:"\u2278",NotLessLess:"\u226A\u0338",nLtv:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",NotLessTilde:"\u2274",nlsim:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",npr:"\u2280",nprec:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",npre:"\u2AAF\u0338",npreceq:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",nprcue:"\u22E0",NotReverseElement:"\u220C",notni:"\u220C",notniva:"\u220C",NotRightTriangle:"\u22EB",nrtri:"\u22EB",ntriangleright:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",nrtrie:"\u22ED",ntrianglerighteq:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",nsqsube:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",nsqsupe:"\u22E3",NotSubset:"\u2282\u20D2",nsubset:"\u2282\u20D2",vnsub:"\u2282\u20D2",NotSubsetEqual:"\u2288",nsube:"\u2288",nsubseteq:"\u2288",NotSucceeds:"\u2281",nsc:"\u2281",nsucc:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",nsce:"\u2AB0\u0338",nsucceq:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",nsccue:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",nsupset:"\u2283\u20D2",vnsup:"\u2283\u20D2",NotSupersetEqual:"\u2289",nsupe:"\u2289",nsupseteq:"\u2289",NotTilde:"\u2241",nsim:"\u2241",NotTildeEqual:"\u2244",nsime:"\u2244",nsimeq:"\u2244",NotTildeFullEqual:"\u2247",ncong:"\u2247",NotTildeTilde:"\u2249",nap:"\u2249",napprox:"\u2249",NotVerticalBar:"\u2224",nmid:"\u2224",nshortmid:"\u2224",nsmid:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",ohm:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",ldquo:"\u201C",OpenCurlyQuote:"\u2018",lsquo:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",oline:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",tbrk:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",part:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",plusmn:"\xB1",pm:"\xB1",Popf:"\u2119",primes:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",pr:"\u227A",prec:"\u227A",PrecedesEqual:"\u2AAF",pre:"\u2AAF",preceq:"\u2AAF",PrecedesSlantEqual:"\u227C",prcue:"\u227C",preccurlyeq:"\u227C",PrecedesTilde:"\u227E",precsim:"\u227E",prsim:"\u227E",Prime:"\u2033",Product:"\u220F",prod:"\u220F",Proportional:"\u221D",prop:"\u221D",propto:"\u221D",varpropto:"\u221D",vprop:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',quot:'"',Qfr:"\u{1D514}",Qopf:"\u211A",rationals:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",drbkarow:"\u2910",REG:"\xAE",circledR:"\xAE",reg:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",twoheadrightarrow:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",Rfr:"\u211C",real:"\u211C",realpart:"\u211C",ReverseElement:"\u220B",SuchThat:"\u220B",ni:"\u220B",niv:"\u220B",ReverseEquilibrium:"\u21CB",leftrightharpoons:"\u21CB",lrhar:"\u21CB",ReverseUpEquilibrium:"\u296F",duhar:"\u296F",Rho:"\u03A1",RightAngleBracket:"\u27E9",rang:"\u27E9",rangle:"\u27E9",RightArrow:"\u2192",ShortRightArrow:"\u2192",rarr:"\u2192",rightarrow:"\u2192",srarr:"\u2192",RightArrowBar:"\u21E5",rarrb:"\u21E5",RightArrowLeftArrow:"\u21C4",rightleftarrows:"\u21C4",rlarr:"\u21C4",RightCeiling:"\u2309",rceil:"\u2309",RightDoubleBracket:"\u27E7",robrk:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",dharr:"\u21C2",downharpoonright:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rfloor:"\u230B",RightTee:"\u22A2",vdash:"\u22A2",RightTeeArrow:"\u21A6",map:"\u21A6",mapsto:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",vartriangleright:"\u22B3",vrtri:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",rtrie:"\u22B5",trianglerighteq:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",uharr:"\u21BE",upharpoonright:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",rharu:"\u21C0",rightharpoonup:"\u21C0",RightVectorBar:"\u2953",Ropf:"\u211D",reals:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",rAarr:"\u21DB",Rscr:"\u211B",realine:"\u211B",Rsh:"\u21B1",rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortUpArrow:"\u2191",UpArrow:"\u2191",uarr:"\u2191",uparrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",compfn:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",radic:"\u221A",Square:"\u25A1",squ:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",sqcap:"\u2293",SquareSubset:"\u228F",sqsub:"\u228F",sqsubset:"\u228F",SquareSubsetEqual:"\u2291",sqsube:"\u2291",sqsubseteq:"\u2291",SquareSuperset:"\u2290",sqsup:"\u2290",sqsupset:"\u2290",SquareSupersetEqual:"\u2292",sqsupe:"\u2292",sqsupseteq:"\u2292",SquareUnion:"\u2294",sqcup:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",sstarf:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",sube:"\u2286",subseteq:"\u2286",Succeeds:"\u227B",sc:"\u227B",succ:"\u227B",SucceedsEqual:"\u2AB0",sce:"\u2AB0",succeq:"\u2AB0",SucceedsSlantEqual:"\u227D",sccue:"\u227D",succcurlyeq:"\u227D",SucceedsTilde:"\u227F",scsim:"\u227F",succsim:"\u227F",Sum:"\u2211",sum:"\u2211",Sup:"\u22D1",Supset:"\u22D1",Superset:"\u2283",sup:"\u2283",supset:"\u2283",SupersetEqual:"\u2287",supe:"\u2287",supseteq:"\u2287",THORN:"\xDE",TRADE:"\u2122",trade:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",there4:"\u2234",therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",thinsp:"\u2009",Tilde:"\u223C",sim:"\u223C",thicksim:"\u223C",thksim:"\u223C",TildeEqual:"\u2243",sime:"\u2243",simeq:"\u2243",TildeFullEqual:"\u2245",cong:"\u2245",TildeTilde:"\u2248",ap:"\u2248",approx:"\u2248",asymp:"\u2248",thickapprox:"\u2248",thkap:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",tdot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",lowbar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",bbrk:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",bigcup:"\u22C3",xcup:"\u22C3",UnionPlus:"\u228E",uplus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",udarr:"\u21C5",UpDownArrow:"\u2195",updownarrow:"\u2195",varr:"\u2195",UpEquilibrium:"\u296E",udhar:"\u296E",UpTee:"\u22A5",bot:"\u22A5",bottom:"\u22A5",perp:"\u22A5",UpTeeArrow:"\u21A5",mapstoup:"\u21A5",UpperLeftArrow:"\u2196",nwarr:"\u2196",nwarrow:"\u2196",UpperRightArrow:"\u2197",nearr:"\u2197",nearrow:"\u2197",Upsi:"\u03D2",upsih:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",bigvee:"\u22C1",xvee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",mid:"\u2223",shortmid:"\u2223",smid:"\u2223",VerticalLine:"|",verbar:"|",vert:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",wr:"\u2240",wreath:"\u2240",VeryThinSpace:"\u200A",hairsp:"\u200A",Vfr:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",bigwedge:"\u22C0",xwedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",Zeta:"\u0396",Zfr:"\u2128",zeetrf:"\u2128",Zopf:"\u2124",integers:"\u2124",Zscr:"\u{1D4B5}",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",mstpos:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acy:"\u0430",aelig:"\xE6",afr:"\u{1D51E}",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",and:"\u2227",wedge:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",angle:"\u2220",ange:"\u29A4",angmsd:"\u2221",measuredangle:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angzarr:"\u237C",aogon:"\u0105",aopf:"\u{1D552}",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",approxeq:"\u224A",apid:"\u224B",apos:"'",aring:"\xE5",ascr:"\u{1D4B6}",ast:"*",midast:"*",atilde:"\xE3",auml:"\xE4",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",bcong:"\u224C",backepsilon:"\u03F6",bepsi:"\u03F6",backprime:"\u2035",bprime:"\u2035",backsim:"\u223D",bsim:"\u223D",backsimeq:"\u22CD",bsime:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrktbrk:"\u23B6",bcy:"\u0431",bdquo:"\u201E",ldquor:"\u201E",bemptyv:"\u29B0",beta:"\u03B2",beth:"\u2136",between:"\u226C",twixt:"\u226C",bfr:"\u{1D51F}",bigcirc:"\u25EF",xcirc:"\u25EF",bigodot:"\u2A00",xodot:"\u2A00",bigoplus:"\u2A01",xoplus:"\u2A01",bigotimes:"\u2A02",xotime:"\u2A02",bigsqcup:"\u2A06",xsqcup:"\u2A06",bigstar:"\u2605",starf:"\u2605",bigtriangledown:"\u25BD",xdtri:"\u25BD",bigtriangleup:"\u25B3",xutri:"\u25B3",biguplus:"\u2A04",xuplus:"\u2A04",bkarow:"\u290D",rbarr:"\u290D",blacklozenge:"\u29EB",lozf:"\u29EB",blacktriangle:"\u25B4",utrif:"\u25B4",blacktriangledown:"\u25BE",dtrif:"\u25BE",blacktriangleleft:"\u25C2",ltrif:"\u25C2",blacktriangleright:"\u25B8",rtrif:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\u{1D553}",bowtie:"\u22C8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255D",boxUR:"\u255A",boxUl:"\u255C",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256C",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256B",boxVl:"\u2562",boxVr:"\u255F",boxbox:"\u29C9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250C",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",minusb:"\u229F",boxplus:"\u229E",plusb:"\u229E",boxtimes:"\u22A0",timesb:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",brvbar:"\xA6",bscr:"\u{1D4B7}",bsemi:"\u204F",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bumpE:"\u2AAE",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cemptyv:"\u29B2",cent:"\xA2",cfr:"\u{1D520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",cire:"\u2257",circlearrowleft:"\u21BA",olarr:"\u21BA",circlearrowright:"\u21BB",orarr:"\u21BB",circledS:"\u24C8",oS:"\u24C8",circledast:"\u229B",oast:"\u229B",circledcirc:"\u229A",ocir:"\u229A",circleddash:"\u229D",odash:"\u229D",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",comma:",",commat:"@",comp:"\u2201",complement:"\u2201",congdot:"\u2A6D",copf:"\u{1D554}",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",curlyeqprec:"\u22DE",cuesc:"\u22DF",curlyeqsucc:"\u22DF",cularr:"\u21B6",curvearrowleft:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curvearrowright:"\u21B7",curarrm:"\u293C",curlyvee:"\u22CE",cuvee:"\u22CE",curlywedge:"\u22CF",cuwed:"\u22CF",curren:"\xA4",cwint:"\u2231",cylcty:"\u232D",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",dash:"\u2010",hyphen:"\u2010",dbkarow:"\u290F",rBarr:"\u290F",dcaron:"\u010F",dcy:"\u0434",ddarr:"\u21CA",downdownarrows:"\u21CA",ddotseq:"\u2A77",eDDot:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",diamondsuit:"\u2666",diams:"\u2666",digamma:"\u03DD",gammad:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",llcorner:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",doteqdot:"\u2251",eDot:"\u2251",dotminus:"\u2238",minusd:"\u2238",dotplus:"\u2214",plusdo:"\u2214",dotsquare:"\u22A1",sdotb:"\u22A1",drcorn:"\u231F",lrcorner:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",triangledown:"\u25BF",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",eqcirc:"\u2256",ecirc:"\xEA",ecolon:"\u2255",eqcolon:"\u2255",ecy:"\u044D",edot:"\u0117",efDot:"\u2252",fallingdotseq:"\u2252",efr:"\u{1D522}",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",eqslantgtr:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",eqslantless:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",varnothing:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",straightepsilon:"\u03F5",varepsilon:"\u03F5",equals:"=",equest:"\u225F",questeq:"\u225F",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",risingdotseq:"\u2253",erarr:"\u2971",escr:"\u212F",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",fork:"\u22D4",pitchfork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",half:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",sfrown:"\u2322",fscr:"\u{1D4BB}",gEl:"\u2A8C",gtreqqless:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gap:"\u2A86",gtrapprox:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",gimel:"\u2137",gjcy:"\u0453",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gneqq:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gnsim:"\u22E7",gopf:"\u{1D558}",gscr:"\u210A",gsime:"\u2A8E",gsiml:"\u2A90",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtrdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrarr:"\u2978",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hardcy:"\u044A",harrcir:"\u2948",harrw:"\u21AD",leftrightsquigarrow:"\u21AD",hbar:"\u210F",hslash:"\u210F",planck:"\u210F",plankv:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",mldr:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",hksearow:"\u2925",searhk:"\u2925",hkswarow:"\u2926",swarhk:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",larrhk:"\u21A9",hookrightarrow:"\u21AA",rarrhk:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",hstrok:"\u0127",hybull:"\u2043",iacute:"\xED",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",ifr:"\u{1D526}",igrave:"\xEC",iiiint:"\u2A0C",qint:"\u2A0C",iiint:"\u222D",tint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",imath:"\u0131",inodot:"\u0131",imof:"\u22B7",imped:"\u01B5",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",intcal:"\u22BA",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\u{1D55A}",iota:"\u03B9",iquest:"\xBF",iscr:"\u{1D4BE}",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",varkappa:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",lAtail:"\u291B",lBarr:"\u290E",lEg:"\u2A8B",lesseqqgtr:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lambda:"\u03BB",langd:"\u2991",lap:"\u2A85",lessapprox:"\u2A85",laquo:"\xAB",larrbfs:"\u291F",larrfs:"\u291D",larrlp:"\u21AB",looparrowleft:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",leftarrowtail:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lcub:"{",lbrack:"[",lsqb:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lcy:"\u043B",ldca:"\u2936",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leq:"\u2264",leftleftarrows:"\u21C7",llarr:"\u21C7",leftthreetimes:"\u22CB",lthree:"\u22CB",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessdot:"\u22D6",ltdot:"\u22D6",lfisht:"\u297C",lfr:"\u{1D529}",lgE:"\u2A91",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lneqq:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",longmapsto:"\u27FC",xmap:"\u27FC",looparrowright:"\u21AC",rarrlp:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",loz:"\u25CA",lozenge:"\u25CA",lpar:"(",lparlt:"\u2993",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",lsime:"\u2A8D",lsimg:"\u2A8F",lsquor:"\u201A",sbquo:"\u201A",lstrok:"\u0142",ltcc:"\u2AA6",ltcir:"\u2A79",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",triangleleft:"\u25C3",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",strns:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",midcir:"\u2AF0",minus:"\u2212",minusdu:"\u2A2A",mlcp:"\u2ADB",models:"\u22A7",mopf:"\u{1D55E}",mscr:"\u{1D4C2}",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nLeftarrow:"\u21CD",nlArr:"\u21CD",nLeftrightarrow:"\u21CE",nhArr:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nRightarrow:"\u21CF",nrArr:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nacute:"\u0144",nang:"\u2220\u20D2",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",natur:"\u266E",natural:"\u266E",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",neArr:"\u21D7",nearhk:"\u2924",nedot:"\u2250\u0338",nesear:"\u2928",toea:"\u2928",nfr:"\u{1D52B}",nharr:"\u21AE",nleftrightarrow:"\u21AE",nhpar:"\u2AF2",nis:"\u22FC",nisd:"\u22FA",njcy:"\u045A",nlE:"\u2266\u0338",nleqq:"\u2266\u0338",nlarr:"\u219A",nleftarrow:"\u219A",nldr:"\u2025",nopf:"\u{1D55F}",not:"\xAC",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinvb:"\u22F7",notinvc:"\u22F6",notnivb:"\u22FE",notnivc:"\u22FD",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",nrarr:"\u219B",nrightarrow:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nscr:"\u{1D4C3}",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsubseteqq:"\u2AC5\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupseteqq:"\u2AC6\u0338",ntilde:"\xF1",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22AD",nvHarr:"\u2904",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwArr:"\u21D6",nwarhk:"\u2923",nwnear:"\u2927",oacute:"\xF3",ocirc:"\xF4",ocy:"\u043E",odblac:"\u0151",odiv:"\u2A38",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\u{1D52C}",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",olcir:"\u29BE",olcross:"\u29BB",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",oopf:"\u{1D560}",opar:"\u29B7",operp:"\u29B9",or:"\u2228",vee:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",oscr:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",para:"\xB6",parsim:"\u2AF3",parsl:"\u2AFD",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",pertenk:"\u2031",pfr:"\u{1D52D}",phi:"\u03C6",phiv:"\u03D5",straightphi:"\u03D5",varphi:"\u03D5",phone:"\u260E",pi:"\u03C0",piv:"\u03D6",varpi:"\u03D6",planckh:"\u210E",plus:"+",plusacir:"\u2A23",pluscir:"\u2A22",plusdu:"\u2A25",pluse:"\u2A72",plussim:"\u2A26",plustwo:"\u2A27",pointint:"\u2A15",popf:"\u{1D561}",pound:"\xA3",prE:"\u2AB3",prap:"\u2AB7",precapprox:"\u2AB7",precnapprox:"\u2AB9",prnap:"\u2AB9",precneqq:"\u2AB5",prnE:"\u2AB5",precnsim:"\u22E8",prnsim:"\u22E8",prime:"\u2032",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prurel:"\u22B0",pscr:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",quatint:"\u2A16",quest:"?",rAtail:"\u291C",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",raemptyv:"\u29B3",rangd:"\u2992",range:"\u29A5",raquo:"\xBB",rarrap:"\u2975",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rightarrowtail:"\u21A3",rarrw:"\u219D",rightsquigarrow:"\u219D",ratail:"\u291A",ratio:"\u2236",rbbrk:"\u2773",rbrace:"}",rcub:"}",rbrack:"]",rsqb:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdsh:"\u21B3",rect:"\u25AD",rfisht:"\u297D",rfr:"\u{1D52F}",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",varrho:"\u03F1",rightrightarrows:"\u21C9",rrarr:"\u21C9",rightthreetimes:"\u22CC",rthree:"\u22CC",ring:"\u02DA",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",ropar:"\u2986",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rsaquo:"\u203A",rscr:"\u{1D4C7}",rtimes:"\u22CA",rtri:"\u25B9",triangleright:"\u25B9",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",scE:"\u2AB4",scap:"\u2AB8",succapprox:"\u2AB8",scaron:"\u0161",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",succneqq:"\u2AB6",scnap:"\u2ABA",succnapprox:"\u2ABA",scnsim:"\u22E9",succnsim:"\u22E9",scpolint:"\u2A13",scy:"\u0441",sdot:"\u22C5",sdote:"\u2A66",seArr:"\u21D8",sect:"\xA7",semi:";",seswar:"\u2929",tosa:"\u2929",sext:"\u2736",sfr:"\u{1D530}",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",varsigma:"\u03C2",simdot:"\u2A6A",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",smashp:"\u2A33",smeparsl:"\u29E4",smile:"\u2323",ssmile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",sqcaps:"\u2293\uFE00",sqcups:"\u2294\uFE00",sscr:"\u{1D4C8}",star:"\u2606",sub:"\u2282",subset:"\u2282",subE:"\u2AC5",subseteqq:"\u2AC5",subdot:"\u2ABD",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subsetneqq:"\u2ACB",subne:"\u228A",subsetneq:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supE:"\u2AC6",supseteqq:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supsetneqq:"\u2ACC",supne:"\u228B",supsetneq:"\u228B",supplus:"\u2AC0",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",telrec:"\u2315",tfr:"\u{1D531}",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",vartheta:"\u03D1",thorn:"\xFE",times:"\xD7",timesbar:"\u2A31",timesd:"\u2A30",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",topfork:"\u2ADA",tprime:"\u2034",triangle:"\u25B5",utri:"\u25B5",triangleq:"\u225C",trie:"\u225C",tridot:"\u25EC",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",uHar:"\u2963",uacute:"\xFA",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udblac:"\u0171",ufisht:"\u297E",ufr:"\u{1D532}",ugrave:"\xF9",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uogon:"\u0173",uopf:"\u{1D566}",upsi:"\u03C5",upsilon:"\u03C5",upuparrows:"\u21C8",uuarr:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\u{1D4CA}",utdot:"\u22F0",utilde:"\u0169",uuml:"\xFC",uwangle:"\u29A7",vBar:"\u2AE8",vBarv:"\u2AE9",vangrt:"\u299C",varsubsetneq:"\u228A\uFE00",vsubne:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",vsubnE:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",vsupne:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vsupnE:"\u2ACC\uFE00",vcy:"\u0432",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",vfr:"\u{1D533}",vopf:"\u{1D567}",vscr:"\u{1D4CB}",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedgeq:"\u2259",weierp:"\u2118",wp:"\u2118",wfr:"\u{1D534}",wopf:"\u{1D568}",wscr:"\u{1D4CC}",xfr:"\u{1D535}",xi:"\u03BE",xnis:"\u22FB",xopf:"\u{1D569}",xscr:"\u{1D4CD}",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"},to="\uE500";Ve.ngsp=to;var ro=[/@/,/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function Rs(t,e){if(e!=null&&!(Array.isArray(e)&&e.length==2))throw new Error(`Expected '${t}' to be an array, [start, end].`);if(e!=null){let r=e[0],n=e[1];ro.forEach(s=>{if(s.test(r)||s.test(n))throw new Error(`['${r}', '${n}'] contains unusable interpolation symbol.`)})}}var $r=class t{static fromArray(e){return e?(Rs("interpolation",e),new t(e[0],e[1])):Or}constructor(e,r){this.start=e,this.end=r}},Or=new $r("{{","}}");var gt=class extends Oe{constructor(e,r,n){super(n,e),this.tokenType=r}},Ur=class{constructor(e,r,n){this.tokens=e,this.errors=r,this.nonNormalizedIcuExpressions=n}};function Ks(t,e,r,n={}){let s=new Wr(new De(t,e),r,n);return s.tokenize(),new Ur(ko(s.tokens),s.errors,s.nonNormalizedIcuExpressions)}var Do=/\r\n?/g;function Ue(t){return`Unexpected character "${t===0?"EOF":String.fromCharCode(t)}"`}function Hs(t){return`Unknown entity "${t}" - use the "&#;" or "&#x;" syntax`}function vo(t,e){return`Unable to parse entity "${e}" - ${t} character reference entities must end with ";"`}var rr;(function(t){t.HEX="hexadecimal",t.DEC="decimal"})(rr||(rr={}));var Ct=class{constructor(e){this.error=e}},Wr=class{constructor(e,r,n){this._getTagContentType=r,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this._fullNameStack=[],this.tokens=[],this.errors=[],this.nonNormalizedIcuExpressions=[],this._tokenizeIcu=n.tokenizeExpansionForms||!1,this._interpolationConfig=n.interpolationConfig||Or,this._leadingTriviaCodePoints=n.leadingTriviaChars&&n.leadingTriviaChars.map(i=>i.codePointAt(0)||0),this._canSelfClose=n.canSelfClose||!1,this._allowHtmComponentClosingTags=n.allowHtmComponentClosingTags||!1;let s=n.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=n.escapedString?new zr(e,s):new nr(e,s),this._preserveLineEndings=n.preserveLineEndings||!1,this._i18nNormalizeLineEndingsInICUs=n.i18nNormalizeLineEndingsInICUs||!1,this._tokenizeBlocks=n.tokenizeBlocks??!0,this._tokenizeLet=n.tokenizeLet??!0;try{this._cursor.init()}catch(i){this.handleError(i)}}_processCarriageReturns(e){return this._preserveLineEndings?e:e.replace(Do,` +`)}tokenize(){for(;this._cursor.peek()!==0;){let e=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(47))this._consumeTagClose(e);else{let r=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=r,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeLet&&this._cursor.peek()===64&&!this._inInterpolation&&this._attemptStr("@let")?this._consumeLetDeclaration(e):this._tokenizeBlocks&&this._attemptCharCode(64)?this._consumeBlockStart(e):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(r){this.handleError(r)}}this._beginToken(34),this._endToken([])}_getBlockName(){let e=!1,r=this._cursor.clone();return this._attemptCharCodeUntilFn(n=>ut(n)?!e:Ws(n)?(e=!0,!1):!0),this._cursor.getChars(r).trim()}_consumeBlockStart(e){this._beginToken(25,e);let r=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(b),this._attemptCharCode(41))this._attemptCharCodeUntilFn(b);else{r.type=29;return}this._attemptCharCode(123)?(this._beginToken(26),this._endToken([])):r.type=29}_consumeBlockEnd(e){this._beginToken(27,e),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(zs);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(28);let e=this._cursor.clone(),r=null,n=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||r!==null;){let s=this._cursor.peek();if(s===92)this._cursor.advance();else if(s===r)r=null;else if(r===null&&Ot(s))r=s;else if(s===40&&r===null)n++;else if(s===41&&r===null){if(n===0)break;n>0&&n--}this._cursor.advance()}this._endToken([this._cursor.getChars(e)]),this._attemptCharCodeUntilFn(zs)}}_consumeLetDeclaration(e){if(this._beginToken(30,e),ut(this._cursor.peek()))this._attemptCharCodeUntilFn(b);else{let s=this._endToken([this._cursor.getChars(e)]);s.type=33;return}let r=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(b),!this._attemptCharCode(61)){r.type=33;return}this._attemptCharCodeUntilFn(s=>b(s)&&!$t(s)),this._consumeLetDeclarationValue(),this._cursor.peek()===59?(this._beginToken(32),this._endToken([]),this._cursor.advance()):(r.type=33,r.sourceSpan=this._cursor.getSpan(e))}_getLetDeclarationName(){let e=this._cursor.clone(),r=!1;return this._attemptCharCodeUntilFn(n=>lt(n)||n===36||n===95||r&&Rt(n)?(r=!0,!1):!0),this._cursor.getChars(e).trim()}_consumeLetDeclarationValue(){let e=this._cursor.clone();for(this._beginToken(31,e);this._cursor.peek()!==0;){let r=this._cursor.peek();if(r===59)break;Ot(r)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(n=>n===92?(this._cursor.advance(),!1):n===r)),this._cursor.advance()}this._endToken([this._cursor.getChars(e)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(To(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,r=this._cursor.clone()){this._currentTokenStart=r,this._currentTokenType=e}_endToken(e,r){if(this._currentTokenStart===null)throw new gt("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(r));if(this._currentTokenType===null)throw new gt("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));let n={type:this._currentTokenType,parts:e,sourceSpan:(r??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n}_createError(e,r){this._isInExpansionForm()&&(e+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let n=new gt(e,this._currentTokenType,r);return this._currentTokenStart=null,this._currentTokenType=null,new Ct(n)}handleError(e){if(e instanceof St&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),e instanceof Ct)this.errors.push(e.error);else throw e}_attemptCharCode(e){return this._cursor.peek()===e?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(e){return xo(this._cursor.peek(),e)?(this._cursor.advance(),!0):!1}_requireCharCode(e){let r=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(Ue(this._cursor.peek()),this._cursor.getSpan(r))}_attemptStr(e){let r=e.length;if(this._cursor.charsLeft()this._attemptStr("-->")),this._beginToken(11),this._requireStr("-->"),this._endToken([])}_consumeBogusComment(e){this._beginToken(10,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(11),this._cursor.advance(),this._endToken([])}_consumeCdata(e){this._beginToken(12,e),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(13),this._requireStr("]]>"),this._endToken([])}_consumeDocType(e){this._beginToken(18,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(19),this._cursor.advance(),this._endToken([])}_consumePrefixAndName(){let e=this._cursor.clone(),r="";for(;this._cursor.peek()!==58&&!yo(this._cursor.peek());)this._cursor.advance();let n;this._cursor.peek()===58?(r=this._cursor.getChars(e),this._cursor.advance(),n=this._cursor.clone()):n=e,this._requireCharCodeUntilFn(Vs,r===""?0:1);let s=this._cursor.getChars(n);return[r,s]}_consumeTagOpen(e){let r,n,s,i=[];try{if(!lt(this._cursor.peek()))throw this._createError(Ue(this._cursor.peek()),this._cursor.getSpan(e));for(s=this._consumeTagOpenStart(e),n=s.parts[0],r=s.parts[1],this._attemptCharCodeUntilFn(b);this._cursor.peek()!==47&&this._cursor.peek()!==62&&this._cursor.peek()!==60&&this._cursor.peek()!==0;){let[o,u]=this._consumeAttributeName();if(this._attemptCharCodeUntilFn(b),this._attemptCharCode(61)){this._attemptCharCodeUntilFn(b);let p=this._consumeAttributeValue();i.push({prefix:o,name:u,value:p})}else i.push({prefix:o,name:u});this._attemptCharCodeUntilFn(b)}this._consumeTagOpenEnd()}catch(o){if(o instanceof Ct){s?s.type=4:(this._beginToken(5,e),this._endToken(["<"]));return}throw o}if(this._canSelfClose&&this.tokens[this.tokens.length-1].type===2)return;let a=this._getTagContentType(r,n,this._fullNameStack.length>0,i);this._handleFullNameStackForTagOpen(n,r),a===P.RAW_TEXT?this._consumeRawTextWithTagClose(n,r,!1):a===P.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(n,r,!0)}_consumeRawTextWithTagClose(e,r,n){this._consumeRawText(n,()=>!this._attemptCharCode(60)||!this._attemptCharCode(47)||(this._attemptCharCodeUntilFn(b),!this._attemptStrCaseInsensitive(e?`${e}:${r}`:r))?!1:(this._attemptCharCodeUntilFn(b),this._attemptCharCode(62))),this._beginToken(3),this._requireCharCodeUntilFn(s=>s===62,3),this._cursor.advance(),this._endToken([e,r]),this._handleFullNameStackForTagClose(e,r)}_consumeTagOpenStart(e){this._beginToken(0,e);let r=this._consumePrefixAndName();return this._endToken(r)}_consumeAttributeName(){let e=this._cursor.peek();if(e===39||e===34)throw this._createError(Ue(e),this._cursor.getSpan());this._beginToken(14);let r=this._consumePrefixAndName();return this._endToken(r),r}_consumeAttributeValue(){let e;if(this._cursor.peek()===39||this._cursor.peek()===34){let r=this._cursor.peek();this._consumeQuote(r);let n=()=>this._cursor.peek()===r;e=this._consumeWithInterpolation(16,17,n,n),this._consumeQuote(r)}else{let r=()=>Vs(this._cursor.peek());e=this._consumeWithInterpolation(16,17,r,r)}return e}_consumeQuote(e){this._beginToken(15),this._requireCharCode(e),this._endToken([String.fromCodePoint(e)])}_consumeTagOpenEnd(){let e=this._attemptCharCode(47)?2:1;this._beginToken(e),this._requireCharCode(62),this._endToken([])}_consumeTagClose(e){if(this._beginToken(3,e),this._attemptCharCodeUntilFn(b),this._allowHtmComponentClosingTags&&this._attemptCharCode(47))this._attemptCharCodeUntilFn(b),this._requireCharCode(62),this._endToken([]);else{let[r,n]=this._consumePrefixAndName();this._attemptCharCodeUntilFn(b),this._requireCharCode(62),this._endToken([r,n]),this._handleFullNameStackForTagClose(r,n)}}_consumeExpansionFormStart(){this._beginToken(20),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(20),this._beginToken(7);let e=this._readUntil(44),r=this._processCarriageReturns(e);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([r]);else{let s=this._endToken([e]);r!==e&&this.nonNormalizedIcuExpressions.push(s)}this._requireCharCode(44),this._attemptCharCodeUntilFn(b),this._beginToken(7);let n=this._readUntil(44);this._endToken([n]),this._requireCharCode(44),this._attemptCharCodeUntilFn(b)}_consumeExpansionCaseStart(){this._beginToken(21);let e=this._readUntil(123).trim();this._endToken([e]),this._attemptCharCodeUntilFn(b),this._beginToken(22),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(b),this._expansionCaseStack.push(22)}_consumeExpansionCaseEnd(){this._beginToken(23),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(b),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(24),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(e,r,n,s){this._beginToken(e);let i=[];for(;!n();){let o=this._cursor.clone();this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(this._endToken([this._processCarriageReturns(i.join(""))],o),i.length=0,this._consumeInterpolation(r,o,s),this._beginToken(e)):this._cursor.peek()===38?(this._endToken([this._processCarriageReturns(i.join(""))]),i.length=0,this._consumeEntity(e),this._beginToken(e)):i.push(this._readChar())}this._inInterpolation=!1;let a=this._processCarriageReturns(i.join(""));return this._endToken([a]),a}_consumeInterpolation(e,r,n){let s=[];this._beginToken(e,r),s.push(this._interpolationConfig.start);let i=this._cursor.clone(),a=null,o=!1;for(;this._cursor.peek()!==0&&(n===null||!n());){let u=this._cursor.clone();if(this._isTagStart()){this._cursor=u,s.push(this._getProcessedChars(i,u)),this._endToken(s);return}if(a===null)if(this._attemptStr(this._interpolationConfig.end)){s.push(this._getProcessedChars(i,u)),s.push(this._interpolationConfig.end),this._endToken(s);return}else this._attemptStr("//")&&(o=!0);let p=this._cursor.peek();this._cursor.advance(),p===92?this._cursor.advance():p===a?a=null:!o&&a===null&&Ot(p)&&(a=p)}s.push(this._getProcessedChars(i,this._cursor)),this._endToken(s)}_getProcessedChars(e,r){return this._processCarriageReturns(r.getChars(e))}_isTextEnd(){return!!(this._isTagStart()||this._cursor.peek()===0||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===125&&this._isInExpansionCase())||this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansion()&&(this._isBlockStart()||this._cursor.peek()===64||this._cursor.peek()===125))}_isTagStart(){if(this._cursor.peek()===60){let e=this._cursor.clone();e.advance();let r=e.peek();if(97<=r&&r<=122||65<=r&&r<=90||r===47||r===33)return!0}return!1}_isBlockStart(){if(this._tokenizeBlocks&&this._cursor.peek()===64){let e=this._cursor.clone();if(e.advance(),Ws(e.peek()))return!0}return!1}_readUntil(e){let r=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(r)}_isInExpansion(){return this._isInExpansionCase()||this._isInExpansionForm()}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===22}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===20}isExpansionFormStart(){if(this._cursor.peek()!==123)return!1;if(this._interpolationConfig){let e=this._cursor.clone(),r=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!r}return!0}_handleFullNameStackForTagOpen(e,r){let n=qe(e,r);(this._fullNameStack.length===0||this._fullNameStack[this._fullNameStack.length-1]===n)&&this._fullNameStack.push(n)}_handleFullNameStackForTagClose(e,r){let n=qe(e,r);this._fullNameStack.length!==0&&this._fullNameStack[this._fullNameStack.length-1]===n&&this._fullNameStack.pop()}};function b(t){return!ut(t)||t===0}function Vs(t){return ut(t)||t===62||t===60||t===47||t===39||t===34||t===61||t===0}function yo(t){return(t<97||12257)}function wo(t){return t===59||t===0||!Ds(t)}function bo(t){return t===59||t===0||!lt(t)}function To(t){return t!==125}function xo(t,e){return Us(t)===Us(e)}function Us(t){return t>=97&&t<=122?t-97+65:t}function Ws(t){return lt(t)||Rt(t)||t===95}function zs(t){return t!==59&&b(t)}function ko(t){let e=[],r;for(let n=0;n0&&r.indexOf(e.peek())!==-1;)n===e&&(e=e.clone()),e.advance();let s=this.locationFromCursor(e),i=this.locationFromCursor(this),a=n!==e?this.locationFromCursor(n):s;return new h(s,i,a)}getChars(e){return this.input.substring(e.state.offset,this.state.offset)}charAt(e){return this.input.charCodeAt(e)}advanceState(e){if(e.offset>=this.end)throw this.state=e,new St('Unexpected character "EOF"',this);let r=this.charAt(e.offset);r===10?(e.line++,e.column=0):$t(r)||e.column++,e.offset++,this.updatePeek(e)}updatePeek(e){e.peek=e.offset>=this.end?0:this.charAt(e.offset)}locationFromCursor(e){return new ie(e.file,e.state.offset,e.state.line,e.state.column)}},zr=class t extends nr{constructor(e,r){e instanceof t?(super(e),this.internalState={...e.internalState}):(super(e,r),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new t(this)}getChars(e){let r=e.clone(),n="";for(;r.internalState.offsetthis.internalState.peek;if(e()===92)if(this.internalState={...this.state},this.advanceState(this.internalState),e()===110)this.state.peek=10;else if(e()===114)this.state.peek=13;else if(e()===118)this.state.peek=11;else if(e()===116)this.state.peek=9;else if(e()===98)this.state.peek=8;else if(e()===102)this.state.peek=12;else if(e()===117)if(this.advanceState(this.internalState),e()===123){this.advanceState(this.internalState);let r=this.clone(),n=0;for(;e()!==125;)this.advanceState(this.internalState),n++;this.state.peek=this.decodeHexDigits(r,n)}else{let r=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(r,4)}else if(e()===120){this.advanceState(this.internalState);let r=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(r,2)}else if(Br(e())){let r="",n=0,s=this.clone();for(;Br(e())&&n<3;)s=this.clone(),r+=String.fromCodePoint(e()),this.advanceState(this.internalState),n++;this.state.peek=parseInt(r,8),this.internalState=s.internalState}else $t(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(e,r){let n=this.input.slice(e.internalState.offset,e.internalState.offset+r),s=parseInt(n,16);if(isNaN(s))throw e.state=e.internalState,new St("Invalid hexadecimal escape sequence",e);return s}},St=class{constructor(e,r){this.msg=e,this.cursor=r}};var L=class t extends Oe{static create(e,r,n){return new t(e,r,n)}constructor(e,r,n){super(r,n),this.elementName=e}},jr=class{constructor(e,r){this.rootNodes=e,this.errors=r}},sr=class{constructor(e){this.getTagDefinition=e}parse(e,r,n,s=!1,i){let a=D=>(I,...F)=>D(I.toLowerCase(),...F),o=s?this.getTagDefinition:a(this.getTagDefinition),u=D=>o(D).getContentType(),p=s?i:a(i),f=Ks(e,r,i?(D,I,F,c)=>{let g=p(D,I,F,c);return g!==void 0?g:u(D)}:u,n),d=n&&n.canSelfClose||!1,C=n&&n.allowHtmComponentClosingTags||!1,A=new Kr(f.tokens,o,d,C,s);return A.build(),new jr(A.rootNodes,f.errors.concat(A.errors))}},Kr=class t{constructor(e,r,n,s,i){this.tokens=e,this.getTagDefinition=r,this.canSelfClose=n,this.allowHtmComponentClosingTags=s,this.isTagNameCaseSensitive=i,this._index=-1,this._containerStack=[],this.rootNodes=[],this.errors=[],this._advance()}build(){for(;this._peek.type!==34;)this._peek.type===0||this._peek.type===4?this._consumeStartTag(this._advance()):this._peek.type===3?(this._closeVoidElement(),this._consumeEndTag(this._advance())):this._peek.type===12?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===10?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===5||this._peek.type===7||this._peek.type===6?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===20?this._consumeExpansion(this._advance()):this._peek.type===25?(this._closeVoidElement(),this._consumeBlockOpen(this._advance())):this._peek.type===27?(this._closeVoidElement(),this._consumeBlockClose(this._advance())):this._peek.type===29?(this._closeVoidElement(),this._consumeIncompleteBlock(this._advance())):this._peek.type===30?(this._closeVoidElement(),this._consumeLet(this._advance())):this._peek.type===18?this._consumeDocType(this._advance()):this._peek.type===33?(this._closeVoidElement(),this._consumeIncompleteLet(this._advance())):this._advance();for(let e of this._containerStack)e instanceof te&&this.errors.push(L.create(e.name,e.sourceSpan,`Unclosed block "${e.name}"`))}_advance(){let e=this._peek;return this._index0)return this.errors=this.errors.concat(i.errors),null;let a=new h(e.sourceSpan.start,s.sourceSpan.end,e.sourceSpan.fullStart),o=new h(r.sourceSpan.start,s.sourceSpan.end,r.sourceSpan.fullStart);return new Yt(e.parts[0],i.rootNodes,a,e.sourceSpan,o)}_collectExpansionExpTokens(e){let r=[],n=[22];for(;;){if((this._peek.type===20||this._peek.type===22)&&n.push(this._peek.type),this._peek.type===23)if(Qs(n,22)){if(n.pop(),n.length===0)return r}else return this.errors.push(L.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===24)if(Qs(n,20))n.pop();else return this.errors.push(L.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===34)return this.errors.push(L.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;r.push(this._advance())}}_getText(e){let r=e.parts[0];if(r.length>0&&r[0]==` +`){let n=this._getClosestParentElement();n!=null&&n.children.length==0&&this.getTagDefinition(n.name).ignoreFirstLf&&(r=r.substring(1))}return r}_consumeText(e){let r=[e],n=e.sourceSpan,s=e.parts[0];if(s.length>0&&s[0]===` +`){let i=this._getContainer();i!=null&&i.children.length===0&&this.getTagDefinition(i.name).ignoreFirstLf&&(s=s.substring(1),r[0]={type:e.type,sourceSpan:e.sourceSpan,parts:[s]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)e=this._advance(),r.push(e),e.type===8?s+=e.parts.join("").replace(/&([^;]+);/g,Xs):e.type===9?s+=e.parts[0]:s+=e.parts.join("");if(s.length>0){let i=e.sourceSpan;this._addToParent(new Wt(s,new h(n.start,i.end,n.fullStart,n.details),r))}}_closeVoidElement(){let e=this._getContainer();e instanceof Y&&this.getTagDefinition(e.name).isVoid&&this._containerStack.pop()}_consumeStartTag(e){let[r,n]=e.parts,s=[];for(;this._peek.type===14;)s.push(this._consumeAttr(this._advance()));let i=this._getElementFullName(r,n,this._getClosestParentElement()),a=!1;if(this._peek.type===2){this._advance(),a=!0;let C=this.getTagDefinition(i);this.canSelfClose||C.canSelfClose||Me(i)!==null||C.isVoid||this.errors.push(L.create(i,e.sourceSpan,`Only void, custom and foreign elements can be self closed "${e.parts[1]}"`))}else this._peek.type===1&&(this._advance(),a=!1);let o=this._peek.sourceSpan.fullStart,u=new h(e.sourceSpan.start,o,e.sourceSpan.fullStart),p=new h(e.sourceSpan.start,o,e.sourceSpan.fullStart),l=new h(e.sourceSpan.start.moveBy(1),e.sourceSpan.end),f=new Y(i,s,[],u,p,void 0,l),d=this._getContainer();this._pushContainer(f,d instanceof Y&&this.getTagDefinition(d.name).isClosedByChild(f.name)),a?this._popContainer(i,Y,u):e.type===4&&(this._popContainer(i,Y,null),this.errors.push(L.create(i,u,`Opening tag "${i}" not terminated.`)))}_pushContainer(e,r){r&&this._containerStack.pop(),this._addToParent(e),this._containerStack.push(e)}_consumeEndTag(e){let r=this.allowHtmComponentClosingTags&&e.parts.length===0?null:this._getElementFullName(e.parts[0],e.parts[1],this._getClosestParentElement());if(r&&this.getTagDefinition(r).isVoid)this.errors.push(L.create(r,e.sourceSpan,`Void elements do not have end tags "${e.parts[1]}"`));else if(!this._popContainer(r,Y,e.sourceSpan)){let n=`Unexpected closing tag "${r}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(L.create(r,e.sourceSpan,n))}}_popContainer(e,r,n){let s=!1;for(let i=this._containerStack.length-1;i>=0;i--){let a=this._containerStack[i];if(Me(a.name)?a.name===e:(e==null||a.name.toLowerCase()===e.toLowerCase())&&a instanceof r)return a.endSourceSpan=n,a.sourceSpan.end=n!==null?n.end:a.sourceSpan.end,this._containerStack.splice(i,this._containerStack.length-i),!s;(a instanceof te||a instanceof Y&&!this.getTagDefinition(a.name).closedByParent)&&(s=!0)}return!1}_consumeAttr(e){let r=qe(e.parts[0],e.parts[1]),n=e.sourceSpan.end,s;this._peek.type===15&&(s=this._advance());let i="",a=[],o,u;if(this._peek.type===16)for(o=this._peek.sourceSpan,u=this._peek.sourceSpan.end;this._peek.type===16||this._peek.type===17||this._peek.type===9;){let f=this._advance();a.push(f),f.type===17?i+=f.parts.join("").replace(/&([^;]+);/g,Xs):f.type===9?i+=f.parts[0]:i+=f.parts.join(""),u=n=f.sourceSpan.end}this._peek.type===15&&(u=n=this._advance().sourceSpan.end);let l=o&&u&&new h((s==null?void 0:s.sourceSpan.start)??o.start,u,(s==null?void 0:s.sourceSpan.fullStart)??o.fullStart);return new jt(r,i,new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),e.sourceSpan,l,a.length>0?a:void 0,void 0)}_consumeBlockOpen(e){let r=[];for(;this._peek.type===28;){let o=this._advance();r.push(new ht(o.parts[0],o.sourceSpan))}this._peek.type===26&&this._advance();let n=this._peek.sourceSpan.fullStart,s=new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),i=new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),a=new te(e.parts[0],r,[],s,e.sourceSpan,i);this._pushContainer(a,!1)}_consumeBlockClose(e){this._popContainer(null,te,e.sourceSpan)||this.errors.push(L.create(null,e.sourceSpan,'Unexpected closing block. The block may have been closed earlier. If you meant to write the } character, you should use the "}" HTML entity instead.'))}_consumeIncompleteBlock(e){let r=[];for(;this._peek.type===28;){let o=this._advance();r.push(new ht(o.parts[0],o.sourceSpan))}let n=this._peek.sourceSpan.fullStart,s=new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),i=new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),a=new te(e.parts[0],r,[],s,e.sourceSpan,i);this._pushContainer(a,!1),this._popContainer(null,te,null),this.errors.push(L.create(e.parts[0],s,`Incomplete block "${e.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`))}_consumeLet(e){let r=e.parts[0],n,s;if(this._peek.type!==31){this.errors.push(L.create(e.parts[0],e.sourceSpan,`Invalid @let declaration "${r}". Declaration must have a value.`));return}else n=this._advance();if(this._peek.type!==32){this.errors.push(L.create(e.parts[0],e.sourceSpan,`Unterminated @let declaration "${r}". Declaration must be terminated with a semicolon.`));return}else s=this._advance();let i=s.sourceSpan.fullStart,a=new h(e.sourceSpan.start,i,e.sourceSpan.fullStart),o=e.sourceSpan.toString().lastIndexOf(r),u=e.sourceSpan.start.moveBy(o),p=new h(u,e.sourceSpan.end),l=new ft(r,n.parts[0],a,p,n.sourceSpan);this._addToParent(l)}_consumeIncompleteLet(e){let r=e.parts[0]??"",n=r?` "${r}"`:"";if(r.length>0){let s=e.sourceSpan.toString().lastIndexOf(r),i=e.sourceSpan.start.moveBy(s),a=new h(i,e.sourceSpan.end),o=new h(e.sourceSpan.start,e.sourceSpan.start.moveBy(0)),u=new ft(r,"",e.sourceSpan,a,o);this._addToParent(u)}this.errors.push(L.create(e.parts[0],e.sourceSpan,`Incomplete @let declaration${n}. @let declarations must be written as \`@let = ;\``))}_getContainer(){return this._containerStack.length>0?this._containerStack[this._containerStack.length-1]:null}_getClosestParentElement(){for(let e=this._containerStack.length-1;e>-1;e--)if(this._containerStack[e]instanceof Y)return this._containerStack[e];return null}_addToParent(e){let r=this._getContainer();r===null?this.rootNodes.push(e):r.children.push(e)}_getElementFullName(e,r,n){if(e===""&&(e=this.getTagDefinition(r).implicitNamespacePrefix||"",e===""&&n!=null)){let s=ct(n.name)[1];this.getTagDefinition(s).preventNamespaceInheritance||(e=Me(n.name))}return qe(e,r)}};function Qs(t,e){return t.length>0&&t[t.length-1]===e}function Xs(t,e){return Ve[e]!==void 0?Ve[e]||t:/^#x[a-f0-9]+$/i.test(e)?String.fromCodePoint(parseInt(e.slice(2),16)):/^#\d+$/.test(e)?String.fromCodePoint(parseInt(e.slice(1),10)):t}var ir=class extends sr{constructor(){super(He)}parse(e,r,n,s=!1,i){return super.parse(e,r,n,s,i)}};var Qr=null,Bo=()=>(Qr||(Qr=new ir),Qr);function Xr(t,e={}){let{canSelfClose:r=!1,allowHtmComponentClosingTags:n=!1,isTagNameCaseSensitive:s=!1,getTagContentType:i,tokenizeAngularBlocks:a=!1,tokenizeAngularLetDeclaration:o=!1}=e;return Bo().parse(t,"angular-html-parser",{tokenizeExpansionForms:a,interpolationConfig:void 0,canSelfClose:r,allowHtmComponentClosingTags:n,tokenizeBlocks:a,tokenizeLet:o},s,i)}function Lo(t,e){let r=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(r,e)}var Js=Lo;var _t=3;function Fo(t){let e=t.slice(0,_t);if(e!=="---"&&e!=="+++")return;let r=t.indexOf(` +`,_t);if(r===-1)return;let n=t.slice(_t,r).trim(),s=t.indexOf(` +${e}`,r),i=n;if(i||(i=e==="+++"?"toml":"yaml"),s===-1&&e==="---"&&i==="yaml"&&(s=t.indexOf(` +...`,r)),s===-1)return;let a=s+1+_t,o=t.charAt(a+1);if(!/\s?/u.test(o))return;let u=t.slice(0,a);return{type:"front-matter",language:i,explicitLanguage:n,value:t.slice(r+1,s),startDelimiter:e,endDelimiter:u.slice(-_t),raw:u}}function No(t){let e=Fo(t);if(!e)return{content:t};let{raw:r}=e;return{frontMatter:e,content:w(!1,r,/[^\n]/gu," ")+t.slice(r.length)}}var Zs=No;var ar={attrs:!0,children:!0,cases:!0,expression:!0},ei=new Set(["parent"]),le,Jr,Zr,ze=class ze{constructor(e={}){At(this,le);cr(this,"type");cr(this,"parent");for(let r of new Set([...ei,...Object.keys(e)]))this.setProperty(r,e[r])}setProperty(e,r){if(this[e]!==r){if(e in ar&&(r=r.map(n=>this.createChild(n))),!ei.has(e)){this[e]=r;return}Object.defineProperty(this,e,{value:r,enumerable:!1,configurable:!0})}}map(e){let r;for(let n in ar){let s=this[n];if(s){let i=Po(s,a=>a.map(e));r!==s&&(r||(r=new ze({parent:this.parent})),r.setProperty(n,i))}}if(r)for(let n in this)n in ar||(r[n]=this[n]);return e(r||this)}walk(e){for(let r in ar){let n=this[r];if(n)for(let s=0;s[e.fullName,e.value]))}};le=new WeakSet,Jr=function(){return this.type==="angularIcuCase"?"expression":this.type==="angularIcuExpression"?"cases":"children"},Zr=function(){var e;return((e=this.parent)==null?void 0:e.$children)??[]};var or=ze;function Po(t,e){let r=t.map(e);return r.some((n,s)=>n!==t[s])?r:t}var Io=[{regex:/^(\[if([^\]]*)\]>)(.*?){try{return[!0,e(i,o).children]}catch{return[!1,[{type:"text",value:i,sourceSpan:new h(o,u)}]]}})();return{type:"ieConditionalComment",complete:p,children:l,condition:w(!1,s.trim(),/\s+/gu," "),sourceSpan:t.sourceSpan,startSourceSpan:new h(t.sourceSpan.start,o),endSourceSpan:new h(u,t.sourceSpan.end)}}function $o(t,e,r){let[,n]=r;return{type:"ieConditionalStartComment",condition:w(!1,n.trim(),/\s+/gu," "),sourceSpan:t.sourceSpan}}function Oo(t){return{type:"ieConditionalEndComment",sourceSpan:t.sourceSpan}}var ur=new Map([["*",new Set(["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inert","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","popover","slot","spellcheck","style","tabindex","title","translate","writingsuggestions"])],["a",new Set(["charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","target","type"])],["applet",new Set(["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"])],["area",new Set(["alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","target","type"])],["audio",new Set(["autoplay","controls","crossorigin","loop","muted","preload","src"])],["base",new Set(["href","target"])],["basefont",new Set(["color","face","size"])],["blockquote",new Set(["cite"])],["body",new Set(["alink","background","bgcolor","link","text","vlink"])],["br",new Set(["clear"])],["button",new Set(["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","popovertarget","popovertargetaction","type","value"])],["canvas",new Set(["height","width"])],["caption",new Set(["align"])],["col",new Set(["align","char","charoff","span","valign","width"])],["colgroup",new Set(["align","char","charoff","span","valign","width"])],["data",new Set(["value"])],["del",new Set(["cite","datetime"])],["details",new Set(["name","open"])],["dialog",new Set(["open"])],["dir",new Set(["compact"])],["div",new Set(["align"])],["dl",new Set(["compact"])],["embed",new Set(["height","src","type","width"])],["fieldset",new Set(["disabled","form","name"])],["font",new Set(["color","face","size"])],["form",new Set(["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"])],["frame",new Set(["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"])],["frameset",new Set(["cols","rows"])],["h1",new Set(["align"])],["h2",new Set(["align"])],["h3",new Set(["align"])],["h4",new Set(["align"])],["h5",new Set(["align"])],["h6",new Set(["align"])],["head",new Set(["profile"])],["hr",new Set(["align","noshade","size","width"])],["html",new Set(["manifest","version"])],["iframe",new Set(["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","loading","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"])],["img",new Set(["align","alt","border","crossorigin","decoding","fetchpriority","height","hspace","ismap","loading","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"])],["input",new Set(["accept","align","alt","autocomplete","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","popovertarget","popovertargetaction","readonly","required","size","src","step","type","usemap","value","width"])],["ins",new Set(["cite","datetime"])],["isindex",new Set(["prompt"])],["label",new Set(["for","form"])],["legend",new Set(["align"])],["li",new Set(["type","value"])],["link",new Set(["as","blocking","charset","color","crossorigin","disabled","fetchpriority","href","hreflang","imagesizes","imagesrcset","integrity","media","referrerpolicy","rel","rev","sizes","target","type"])],["map",new Set(["name"])],["menu",new Set(["compact"])],["meta",new Set(["charset","content","http-equiv","media","name","scheme"])],["meter",new Set(["high","low","max","min","optimum","value"])],["object",new Set(["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","type","typemustmatch","usemap","vspace","width"])],["ol",new Set(["compact","reversed","start","type"])],["optgroup",new Set(["disabled","label"])],["option",new Set(["disabled","label","selected","value"])],["output",new Set(["for","form","name"])],["p",new Set(["align"])],["param",new Set(["name","type","value","valuetype"])],["pre",new Set(["width"])],["progress",new Set(["max","value"])],["q",new Set(["cite"])],["script",new Set(["async","blocking","charset","crossorigin","defer","fetchpriority","integrity","language","nomodule","referrerpolicy","src","type"])],["select",new Set(["autocomplete","disabled","form","multiple","name","required","size"])],["slot",new Set(["name"])],["source",new Set(["height","media","sizes","src","srcset","type","width"])],["style",new Set(["blocking","media","type"])],["table",new Set(["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"])],["tbody",new Set(["align","char","charoff","valign"])],["td",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["template",new Set(["shadowrootclonable","shadowrootdelegatesfocus","shadowrootmode"])],["textarea",new Set(["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","wrap"])],["tfoot",new Set(["align","char","charoff","valign"])],["th",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["thead",new Set(["align","char","charoff","valign"])],["time",new Set(["datetime"])],["tr",new Set(["align","bgcolor","char","charoff","valign"])],["track",new Set(["default","kind","label","src","srclang"])],["ul",new Set(["compact","type"])],["video",new Set(["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"])]]);var ri=new Set(["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"]);function Mo(t){if(t.type==="block"){if(t.name=w(!1,t.name.toLowerCase(),/\s+/gu," ").trim(),t.type="angularControlFlowBlock",!Ie(t.parameters)){delete t.parameters;return}for(let e of t.parameters)e.type="angularControlFlowBlockParameter";t.parameters={type:"angularControlFlowBlockParameters",children:t.parameters,sourceSpan:new h(t.parameters[0].sourceSpan.start,K(!1,t.parameters,-1).sourceSpan.end)}}}function qo(t){t.type==="letDeclaration"&&(t.type="angularLetDeclaration",t.id=t.name,t.init={type:"angularLetDeclarationInitializer",sourceSpan:new h(t.valueSpan.start,t.valueSpan.end),value:t.value},delete t.name,delete t.value)}function Ho(t){(t.type==="plural"||t.type==="select")&&(t.clause=t.type,t.type="angularIcuExpression"),t.type==="expansionCase"&&(t.type="angularIcuCase")}function si(t,e,r){let{name:n,canSelfClose:s=!0,normalizeTagName:i=!1,normalizeAttributeName:a=!1,allowHtmComponentClosingTags:o=!1,isTagNameCaseSensitive:u=!1,shouldParseAsRawText:p}=e,{rootNodes:l,errors:f}=Xr(t,{canSelfClose:s,allowHtmComponentClosingTags:o,isTagNameCaseSensitive:u,getTagContentType:p?(...c)=>p(...c)?P.RAW_TEXT:void 0:void 0,tokenizeAngularBlocks:n==="angular"?!0:void 0,tokenizeAngularLetDeclaration:n==="angular"?!0:void 0});if(n==="vue"){if(l.some(x=>x.type==="docType"&&x.value==="html"||x.type==="element"&&x.name.toLowerCase()==="html"))return si(t,ai,r);let g,y=()=>g??(g=Xr(t,{canSelfClose:s,allowHtmComponentClosingTags:o,isTagNameCaseSensitive:u})),q=x=>y().rootNodes.find(({startSourceSpan:U})=>U&&U.start.offset===x.startSourceSpan.start.offset)??x;for(let[x,U]of l.entries()){let{endSourceSpan:tn,startSourceSpan:oi}=U;if(tn===null)f=y().errors,l[x]=q(U);else if(Vo(U,r)){let rn=y().errors.find(nn=>nn.span.start.offset>oi.start.offset&&nn.span.start.offset0&&ni(f[0]);let d=c=>{let g=c.name.startsWith(":")?c.name.slice(1).split(":")[0]:null,y=c.nameSpan.toString(),q=g!==null&&y.startsWith(`${g}:`),x=q?y.slice(g.length+1):y;c.name=x,c.namespace=g,c.hasExplicitNamespace=q},C=c=>{switch(c.type){case"element":d(c);for(let g of c.attrs)d(g),g.valueSpan?(g.value=g.valueSpan.toString(),/["']/u.test(g.value[0])&&(g.value=g.value.slice(1,-1))):g.value=null;break;case"comment":c.value=c.sourceSpan.toString().slice(4,-3);break;case"text":c.value=c.sourceSpan.toString();break}},A=(c,g)=>{let y=c.toLowerCase();return g(y)?y:c},D=c=>{if(c.type==="element"&&(i&&(!c.namespace||c.namespace===c.tagDefinition.implicitNamespacePrefix||fe(c))&&(c.name=A(c.name,g=>ri.has(g))),a))for(let g of c.attrs)g.namespace||(g.name=A(g.name,y=>ur.has(c.name)&&(ur.get("*").has(y)||ur.get(c.name).has(y))))},I=c=>{c.sourceSpan&&c.endSourceSpan&&(c.sourceSpan=new h(c.sourceSpan.start,c.endSourceSpan.end))},F=c=>{if(c.type==="element"){let g=He(u?c.name:c.name.toLowerCase());!c.namespace||c.namespace===g.implicitNamespacePrefix||fe(c)?c.tagDefinition=g:c.tagDefinition=He("")}};return Xt(new class extends mt{visitExpansionCase(c,g){n==="angular"&&this.visitChildren(g,y=>{y(c.expression)})}visit(c){C(c),F(c),D(c),I(c)}},l),l}function Vo(t,e){var n;if(t.type!=="element"||t.name!=="template")return!1;let r=(n=t.attrs.find(s=>s.name==="lang"))==null?void 0:n.value;return!r||Ne(e,{language:r})==="html"}function ni(t){let{msg:e,span:{start:r,end:n}}=t;throw Js(e,{loc:{start:{line:r.line+1,column:r.col+1},end:{line:n.line+1,column:n.col+1}},cause:t})}function ii(t,e,r={},n=!0){let{frontMatter:s,content:i}=n?Zs(t):{frontMatter:null,content:t},a=new De(t,r.filepath),o=new ie(a,0,0,0),u=o.moveBy(t.length),p={type:"root",sourceSpan:new h(o,u),children:si(i,e,r)};if(s){let d=new ie(a,0,0,0),C=d.moveBy(s.raw.length);s.sourceSpan=new h(d,C),p.children.unshift(s)}let l=new or(p),f=(d,C)=>{let{offset:A}=C,D=w(!1,t.slice(0,A),/[^\n\r]/gu," "),F=ii(D+d,e,r,!1);F.sourceSpan=new h(C,K(!1,F.children,-1).sourceSpan.end);let c=F.children[0];return c.length===A?F.children.shift():(c.sourceSpan=new h(c.sourceSpan.start.moveBy(A),c.sourceSpan.end),c.value=c.value.slice(A)),F};return l.walk(d=>{if(d.type==="comment"){let C=ti(d,f);C&&d.parent.replaceChild(d,C)}Mo(d),qo(d),Ho(d)}),l}function lr(t){return{parse:(e,r)=>ii(e,t,r),hasPragma:hs,astFormat:"html",locStart:J,locEnd:Z}}var ai={name:"html",normalizeTagName:!0,normalizeAttributeName:!0,allowHtmComponentClosingTags:!0},Uo=lr(ai),Wo=lr({name:"angular"}),zo=lr({name:"vue",isTagNameCaseSensitive:!0,shouldParseAsRawText(t,e,r,n){return t.toLowerCase()!=="html"&&!r&&(t!=="template"||n.some(({name:s,value:i})=>s==="lang"&&i!=="html"&&i!==""&&i!==void 0))}}),Go=lr({name:"lwc",canSelfClose:!1});var Yo={html:bs};return fi(jo);}); \ No newline at end of file diff --git a/node_modules/prettier/plugins/html.mjs b/node_modules/prettier/plugins/html.mjs new file mode 100644 index 0000000..06f84c8 --- /dev/null +++ b/node_modules/prettier/plugins/html.mjs @@ -0,0 +1,22 @@ +var sn=Object.defineProperty;var an=t=>{throw TypeError(t)};var li=(t,e,r)=>e in t?sn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var on=(t,e)=>{for(var r in e)sn(t,r,{get:e[r],enumerable:!0})};var lr=(t,e,r)=>li(t,typeof e!="symbol"?e+"":e,r),un=(t,e,r)=>e.has(t)||an("Cannot "+r);var R=(t,e,r)=>(un(t,e,"read from private field"),r?r.call(t):e.get(t)),Et=(t,e,r)=>e.has(t)?an("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),ln=(t,e,r,n)=>(un(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var en={};on(en,{languages:()=>xs,options:()=>Bs,parsers:()=>Zr,printers:()=>Uo});var ci=(t,e,r,n)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(r,n):r.global?e.replace(r,n):e.split(r).join(n)},w=ci;var ye="string",Ge="array",Ye="cursor",we="indent",be="align",je="trim",Te="group",xe="fill",ce="if-break",ke="indent-if-break",Ke="line-suffix",Qe="line-suffix-boundary",j="line",Xe="label",Be="break-parent",At=new Set([Ye,we,be,je,Te,xe,ce,ke,Ke,Qe,j,Xe,Be]);var pi=(t,e,r)=>{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[r<0?e.length+r:r]:e.at(r)},K=pi;function hi(t){if(typeof t=="string")return ye;if(Array.isArray(t))return Ge;if(!t)return;let{type:e}=t;if(At.has(e))return e}var Le=hi;var fi=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function mi(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', +Expected it to be 'string' or 'object'.`;if(Le(t))throw new Error("doc is valid.");let r=Object.prototype.toString.call(t);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=fi([...At].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'. +Expected it to be ${n}.`}var cr=class extends Error{name="InvalidDocError";constructor(e){super(mi(e)),this.doc=e}},pr=cr;function hr(t,e){if(typeof t=="string")return e(t);let r=new Map;return n(t);function n(i){if(r.has(i))return r.get(i);let a=s(i);return r.set(i,a),a}function s(i){switch(Le(i)){case Ge:return e(i.map(n));case xe:return e({...i,parts:i.parts.map(n)});case ce:return e({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case Te:{let{expandedStates:a,contents:o}=i;return a?(a=a.map(n),o=a[0]):o=n(o),e({...i,contents:o,expandedStates:a})}case be:case we:case ke:case Xe:case Ke:return e({...i,contents:n(i.contents)});case ye:case Ye:case je:case Qe:case j:case Be:return e(i);default:throw new pr(i)}}}function B(t,e=cn){return hr(t,r=>typeof r=="string"?H(e,r.split(` +`)):r)}var fr=()=>{},ne=fr,mr=fr,pn=fr;function k(t){return ne(t),{type:we,contents:t}}function hn(t,e){return ne(e),{type:be,contents:e,n:t}}function E(t,e={}){return ne(t),mr(e.expandedStates,!0),{type:Te,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function fn(t){return hn(Number.NEGATIVE_INFINITY,t)}function mn(t){return hn({type:"root"},t)}function Dt(t){return pn(t),{type:xe,parts:t}}function pe(t,e="",r={}){return ne(t),e!==""&&ne(e),{type:ce,breakContents:t,flatContents:e,groupId:r.groupId}}function dn(t,e){return ne(t),{type:ke,contents:t,groupId:e.groupId,negate:e.negate}}var se={type:Be};var gi={type:j,hard:!0},Ci={type:j,hard:!0,literal:!0},_={type:j},v={type:j,soft:!0},S=[gi,se],cn=[Ci,se];function H(t,e){ne(t),mr(e);let r=[];for(let n=0;ni?n:r}var Cn=Si;function dr(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var V,gr=class{constructor(e){Et(this,V);ln(this,V,new Set(e))}getLeadingWhitespaceCount(e){let r=R(this,V),n=0;for(let s=0;s=0&&r.has(e.charAt(s));s--)n++;return n}getLeadingWhitespace(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(0,r)}getTrailingWhitespace(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(e.length-r)}hasLeadingWhitespace(e){return R(this,V).has(e.charAt(0))}hasTrailingWhitespace(e){return R(this,V).has(K(!1,e,-1))}trimStart(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(r)}trimEnd(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-r)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,r=!1){let n=`[${dr([...R(this,V)].join(""))}]+`,s=new RegExp(r?`(${n})`:n,"u");return e.split(s)}hasWhitespaceCharacter(e){let r=R(this,V);return Array.prototype.some.call(e,n=>r.has(n))}hasNonWhitespaceCharacter(e){let r=R(this,V);return Array.prototype.some.call(e,n=>!r.has(n))}isWhitespaceOnly(e){let r=R(this,V);return Array.prototype.every.call(e,n=>r.has(n))}};V=new WeakMap;var Sn=gr;var _i=[" ",` +`,"\f","\r"," "],Ei=new Sn(_i),O=Ei;var Cr=class extends Error{name="UnexpectedNodeError";constructor(e,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}},_n=Cr;function Ai(t){return(t==null?void 0:t.type)==="front-matter"}var Fe=Ai;var Di=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan","keySpan","tagDefinition","tokens","valueTokens","switchValueSourceSpan","expSourceSpan","valueSourceSpan"]),vi=new Set(["if","else if","for","switch","case"]);function En(t,e){var r;if(t.type==="text"||t.type==="comment"||Fe(t)||t.type==="yaml"||t.type==="toml")return null;if(t.type==="attribute"&&delete e.value,t.type==="docType"&&delete e.value,t.type==="angularControlFlowBlock"&&((r=t.parameters)!=null&&r.children))for(let n of e.parameters.children)vi.has(t.name)?delete n.expression:n.expression=n.expression.trim();t.type==="angularIcuExpression"&&(e.switchValue=t.switchValue.trim()),t.type==="angularLetDeclarationInitializer"&&delete e.value}En.ignoredProperties=Di;var An=En;async function yi(t,e){if(t.language==="yaml"){let r=t.value.trim(),n=r?await e(r,{parser:"yaml"}):"";return mn([t.startDelimiter,t.explicitLanguage,S,n,n?S:"",t.endDelimiter])}}var Dn=yi;function he(t,e=!0){return[k([v,t]),e?v:""]}function Q(t,e){let r=t.type==="NGRoot"?t.node.type==="NGMicrosyntax"&&t.node.body.length===1&&t.node.body[0].type==="NGMicrosyntaxExpression"?t.node.body[0].expression:t.node:t.type==="JsExpressionRoot"?t.node:t;return r&&(r.type==="ObjectExpression"||r.type==="ArrayExpression"||(e.parser==="__vue_expression"||e.parser==="__vue_ts_expression")&&(r.type==="TemplateLiteral"||r.type==="StringLiteral"))}async function T(t,e,r,n){r={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...r};let s=!0;n&&(r.__onHtmlBindingRoot=(a,o)=>{s=n(a,o)});let i=await e(t,r,e);return s?E(i):he(i)}function wi(t,e,r,n){let{node:s}=r,i=n.originalText.slice(s.sourceSpan.start.offset,s.sourceSpan.end.offset);return/^\s*$/u.test(i)?"":T(i,t,{parser:"__ng_directive",__isInHtmlAttribute:!1},Q)}var vn=wi;var bi=t=>String(t).split(/[/\\]/u).pop();function yn(t,e){if(!e)return;let r=bi(e).toLowerCase();return t.find(({filenames:n})=>n==null?void 0:n.some(s=>s.toLowerCase()===r))??t.find(({extensions:n})=>n==null?void 0:n.some(s=>r.endsWith(s)))}function Ti(t,e){if(e)return t.find(({name:r})=>r.toLowerCase()===e)??t.find(({aliases:r})=>r==null?void 0:r.includes(e))??t.find(({extensions:r})=>r==null?void 0:r.includes(`.${e}`))}function xi(t,e){let r=t.plugins.flatMap(s=>s.languages??[]),n=Ti(r,e.language)??yn(r,e.physicalFile)??yn(r,e.file)??(e.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var Ne=xi;var wn="inline",bn={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",search:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",menu:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",input:"inline-block",button:"inline-block",fieldset:"block",details:"block",summary:"block",marquee:"inline-block",source:"block",track:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",select:"inline-block",option:"block",optgroup:"block"},Tn="normal",xn={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"};function ki(t){return t.type==="element"&&!t.hasExplicitNamespace&&!["html","svg"].includes(t.namespace)}var fe=ki;var Bi=t=>w(!1,t,/^[\t\f\r ]*\n/gu,""),Sr=t=>Bi(O.trimEnd(t)),kn=t=>{let e=t,r=O.getLeadingWhitespace(e);r&&(e=e.slice(r.length));let n=O.getTrailingWhitespace(e);return n&&(e=e.slice(0,-n.length)),{leadingWhitespace:r,trailingWhitespace:n,text:e}};function yt(t,e){return!!(t.type==="ieConditionalComment"&&t.lastChild&&!t.lastChild.isSelfClosing&&!t.lastChild.endSourceSpan||t.type==="ieConditionalComment"&&!t.complete||me(t)&&t.children.some(r=>r.type!=="text"&&r.type!=="interpolation")||Tt(t,e)&&!W(t)&&t.type!=="interpolation")}function de(t){return t.type==="attribute"||!t.parent||!t.prev?!1:Li(t.prev)}function Li(t){return t.type==="comment"&&t.value.trim()==="prettier-ignore"}function $(t){return t.type==="text"||t.type==="comment"}function W(t){return t.type==="element"&&(t.fullName==="script"||t.fullName==="style"||t.fullName==="svg:style"||t.fullName==="svg:script"||fe(t)&&(t.name==="script"||t.name==="style"))}function Bn(t){return t.children&&!W(t)}function Ln(t){return W(t)||t.type==="interpolation"||_r(t)}function _r(t){return Vn(t).startsWith("pre")}function Fn(t,e){var s,i;let r=n();if(r&&!t.prev&&((i=(s=t.parent)==null?void 0:s.tagDefinition)!=null&&i.ignoreFirstLf))return t.type==="interpolation";return r;function n(){return Fe(t)||t.type==="angularControlFlowBlock"?!1:(t.type==="text"||t.type==="interpolation")&&t.prev&&(t.prev.type==="text"||t.prev.type==="interpolation")?!0:!t.parent||t.parent.cssDisplay==="none"?!1:me(t.parent)?!0:!(!t.prev&&(t.parent.type==="root"||me(t)&&t.parent||W(t.parent)||et(t.parent,e)||!$i(t.parent.cssDisplay))||t.prev&&!qi(t.prev.cssDisplay))}}function Nn(t,e){return Fe(t)||t.type==="angularControlFlowBlock"?!1:(t.type==="text"||t.type==="interpolation")&&t.next&&(t.next.type==="text"||t.next.type==="interpolation")?!0:!t.parent||t.parent.cssDisplay==="none"?!1:me(t.parent)?!0:!(!t.next&&(t.parent.type==="root"||me(t)&&t.parent||W(t.parent)||et(t.parent,e)||!Oi(t.parent.cssDisplay))||t.next&&!Mi(t.next.cssDisplay))}function Pn(t){return Hi(t.cssDisplay)&&!W(t)}function Je(t){return Fe(t)||t.next&&t.sourceSpan.end&&t.sourceSpan.end.line+10&&(["body","script","style"].includes(t.name)||t.children.some(e=>Ni(e)))||t.firstChild&&t.firstChild===t.lastChild&&t.firstChild.type!=="text"&&$n(t.firstChild)&&(!t.lastChild.isTrailingSpaceSensitive||On(t.lastChild))}function Er(t){return t.type==="element"&&t.children.length>0&&(["html","head","ul","ol","select"].includes(t.name)||t.cssDisplay.startsWith("table")&&t.cssDisplay!=="table-cell")}function wt(t){return Mn(t)||t.prev&&Fi(t.prev)||Rn(t)}function Fi(t){return Mn(t)||t.type==="element"&&t.fullName==="br"||Rn(t)}function Rn(t){return $n(t)&&On(t)}function $n(t){return t.hasLeadingSpaces&&(t.prev?t.prev.sourceSpan.end.linet.sourceSpan.end.line:t.parent.type==="root"||t.parent.endSourceSpan&&t.parent.endSourceSpan.start.line>t.sourceSpan.end.line)}function Mn(t){switch(t.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(t.name)}return!1}function bt(t){return t.lastChild?bt(t.lastChild):t}function Ni(t){var e;return(e=t.children)==null?void 0:e.some(r=>r.type!=="text")}function qn(t){if(t)switch(t){case"module":case"text/javascript":case"text/babel":case"application/javascript":return"babel";case"application/x-typescript":return"typescript";case"text/markdown":return"markdown";case"text/html":return"html";case"text/x-handlebars-template":return"glimmer";default:if(t.endsWith("json")||t.endsWith("importmap")||t==="speculationrules")return"json"}}function Pi(t,e){let{name:r,attrMap:n}=t;if(r!=="script"||Object.prototype.hasOwnProperty.call(n,"src"))return;let{type:s,lang:i}=t.attrMap;return!i&&!s?"babel":Ne(e,{language:i})??qn(s)}function Ii(t,e){if(!Tt(t,e))return;let{attrMap:r}=t;if(Object.prototype.hasOwnProperty.call(r,"src"))return;let{type:n,lang:s}=r;return Ne(e,{language:s})??qn(n)}function Ri(t,e){if(t.name!=="style")return;let{lang:r}=t.attrMap;return r?Ne(e,{language:r}):"css"}function Ar(t,e){return Pi(t,e)??Ri(t,e)??Ii(t,e)}function Ze(t){return t==="block"||t==="list-item"||t.startsWith("table")}function $i(t){return!Ze(t)&&t!=="inline-block"}function Oi(t){return!Ze(t)&&t!=="inline-block"}function Mi(t){return!Ze(t)}function qi(t){return!Ze(t)}function Hi(t){return!Ze(t)&&t!=="inline-block"}function me(t){return Vn(t).startsWith("pre")}function Vi(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.parent}return!1}function Hn(t,e){var n;if(ge(t,e))return"block";if(((n=t.prev)==null?void 0:n.type)==="comment"){let s=t.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/u);if(s)return s[1]}let r=!1;if(t.type==="element"&&t.namespace==="svg")if(Vi(t,s=>s.fullName==="svg:foreignObject"))r=!0;else return t.name==="svg"?"inline-block":"block";switch(e.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:return t.type==="element"&&(!t.namespace||r||fe(t))&&bn[t.name]||wn}}function Vn(t){return t.type==="element"&&(!t.namespace||fe(t))&&xn[t.name]||Tn}function Ui(t){let e=Number.POSITIVE_INFINITY;for(let r of t.split(` +`)){if(r.length===0)continue;let n=O.getLeadingWhitespaceCount(r);if(n===0)return 0;r.length!==n&&nr.slice(e)).join(` +`)}function vr(t){return w(!1,w(!1,t,"'","'"),""",'"')}function N(t){return vr(t.value)}var Wi=new Set(["template","style","script"]);function et(t,e){return ge(t,e)&&!Wi.has(t.fullName)}function ge(t,e){return e.parser==="vue"&&t.type==="element"&&t.parent.type==="root"&&t.fullName.toLowerCase()!=="html"}function Tt(t,e){return ge(t,e)&&(et(t,e)||t.attrMap.lang&&t.attrMap.lang!=="html")}function Un(t){let e=t.fullName;return e.charAt(0)==="#"||e==="slot-scope"||e==="v-slot"||e.startsWith("v-slot:")}function Wn(t,e){let r=t.parent;if(!ge(r,e))return!1;let n=r.fullName,s=t.fullName;return n==="script"&&s==="setup"||n==="style"&&s==="vars"}function xt(t,e=t.value){return t.parent.isWhitespaceSensitive?t.parent.isIndentationSensitive?B(e):B(Dr(Sr(e)),S):H(_,O.split(e))}function kt(t,e){return ge(t,e)&&t.name==="script"}var yr=/\{\{(.+?)\}\}/su;async function zn(t,e){let r=[];for(let[n,s]of t.split(yr).entries())if(n%2===0)r.push(B(s));else try{r.push(E(["{{",k([_,await T(s,e,{parser:"__ng_interpolation",__isInHtmlInterpolation:!0})]),_,"}}"]))}catch{r.push("{{",B(s),"}}")}return r}function wr({parser:t}){return(e,r,n)=>T(N(n.node),e,{parser:t},Q)}var zi=wr({parser:"__ng_action"}),Gi=wr({parser:"__ng_binding"}),Yi=wr({parser:"__ng_directive"});function ji(t,e){if(e.parser!=="angular")return;let{node:r}=t,n=r.fullName;if(n.startsWith("(")&&n.endsWith(")")||n.startsWith("on-"))return zi;if(n.startsWith("[")&&n.endsWith("]")||/^bind(?:on)?-/u.test(n)||/^ng-(?:if|show|hide|class|style)$/u.test(n))return Gi;if(n.startsWith("*"))return Yi;let s=N(r);if(/^i18n(?:-.+)?$/u.test(n))return()=>he(Dt(xt(r,s.trim())),!s.includes("@@"));if(yr.test(s))return i=>zn(s,i)}var Gn=ji;function Ki(t,e){let{node:r}=t,n=N(r);if(r.fullName==="class"&&!e.parentParser&&!n.includes("{{"))return()=>n.trim().split(/\s+/u).join(" ")}var Yn=Ki;function jn(t){return t===" "||t===` +`||t==="\f"||t==="\r"||t===" "}var Qi=/^[ \t\n\r\u000c]+/,Xi=/^[, \t\n\r\u000c]+/,Ji=/^[^ \t\n\r\u000c]+/,Zi=/[,]+$/,Kn=/^\d+$/,ea=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function ta(t){let e=t.length,r,n,s,i,a,o=0,u;function p(C){let A,D=C.exec(t.substring(o));if(D)return[A]=D,o+=A.length,A}let l=[];for(;;){if(p(Xi),o>=e){if(l.length===0)throw new Error("Must contain one or more image candidate strings.");return l}u=o,r=p(Ji),n=[],r.slice(-1)===","?(r=r.replace(Zi,""),d()):f()}function f(){for(p(Qi),s="",i="in descriptor";;){if(a=t.charAt(o),i==="in descriptor")if(jn(a))s&&(n.push(s),s="",i="after descriptor");else if(a===","){o+=1,s&&n.push(s),d();return}else if(a==="(")s+=a,i="in parens";else if(a===""){s&&n.push(s),d();return}else s+=a;else if(i==="in parens")if(a===")")s+=a,i="in descriptor";else if(a===""){n.push(s),d();return}else s+=a;else if(i==="after descriptor"&&!jn(a))if(a===""){d();return}else i="in descriptor",o-=1;o+=1}}function d(){let C=!1,A,D,I,F,c={},g,y,q,x,U;for(F=0;Fsa(N(t.node))}var Xn={width:"w",height:"h",density:"x"},na=Object.keys(Xn);function sa(t){let e=Qn(t),r=na.filter(l=>e.some(f=>Object.prototype.hasOwnProperty.call(f,l)));if(r.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[n]=r,s=Xn[n],i=e.map(l=>l.source.value),a=Math.max(...i.map(l=>l.length)),o=e.map(l=>l[n]?String(l[n].value):""),u=o.map(l=>{let f=l.indexOf(".");return f===-1?l.length:f}),p=Math.max(...u);return he(H([",",_],i.map((l,f)=>{let d=[l],C=o[f];if(C){let A=a-l.length+1,D=p-u[f],I=" ".repeat(A+D);d.push(pe(I," "),C+s)}return d})))}var Jn=ra;function Zn(t,e){let{node:r}=t,n=N(t.node).trim();if(r.fullName==="style"&&!e.parentParser&&!n.includes("{{"))return async s=>he(await s(n,{parser:"css",__isHTMLStyleAttribute:!0}))}var br=new WeakMap;function ia(t,e){let{root:r}=t;return br.has(r)||br.set(r,r.children.some(n=>kt(n,e)&&["ts","typescript"].includes(n.attrMap.lang))),br.get(r)}var Pe=ia;function es(t,e,r){let{node:n}=r,s=N(n);return T(`type T<${s}> = any`,t,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},Q)}function ts(t,e,{parseWithTs:r}){return T(`function _(${t}) {}`,e,{parser:r?"babel-ts":"babel",__isVueBindings:!0})}async function rs(t,e,r,n){let s=N(r.node),{left:i,operator:a,right:o}=aa(s),u=Pe(r,n);return[E(await T(`function _(${i}) {}`,t,{parser:u?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",a," ",await T(o,t,{parser:u?"__ts_expression":"__js_expression"})]}function aa(t){let e=/(.*?)\s+(in|of)\s+(.*)/su,r=/,([^,\]}]*)(?:,([^,\]}]*))?$/u,n=/^\(|\)$/gu,s=t.match(e);if(!s)return;let i={};if(i.for=s[3].trim(),!i.for)return;let a=w(!1,s[1].trim(),n,""),o=a.match(r);o?(i.alias=a.replace(r,""),i.iterator1=o[1].trim(),o[2]&&(i.iterator2=o[2].trim())):i.alias=a;let u=[i.alias,i.iterator1,i.iterator2];if(!u.some((p,l)=>!p&&(l===0||u.slice(l+1).some(Boolean))))return{left:u.filter(Boolean).join(","),operator:s[2],right:i.for}}function oa(t,e){if(e.parser!=="vue")return;let{node:r}=t,n=r.fullName;if(n==="v-for")return rs;if(n==="generic"&&kt(r.parent,e))return es;let s=N(r),i=Pe(t,e);if(Un(r)||Wn(r,e))return a=>ts(s,a,{parseWithTs:i});if(n.startsWith("@")||n.startsWith("v-on:"))return a=>ua(s,a,{parseWithTs:i});if(n.startsWith(":")||n.startsWith(".")||n.startsWith("v-bind:"))return a=>la(s,a,{parseWithTs:i});if(n.startsWith("v-"))return a=>ns(s,a,{parseWithTs:i})}async function ua(t,e,{parseWithTs:r}){var n;try{return await ns(t,e,{parseWithTs:r})}catch(s){if(((n=s.cause)==null?void 0:n.code)!=="BABEL_PARSER_SYNTAX_ERROR")throw s}return T(t,e,{parser:r?"__vue_ts_event_binding":"__vue_event_binding"},Q)}function la(t,e,{parseWithTs:r}){return T(t,e,{parser:r?"__vue_ts_expression":"__vue_expression"},Q)}function ns(t,e,{parseWithTs:r}){return T(t,e,{parser:r?"__ts_expression":"__js_expression"},Q)}var ss=oa;function ca(t,e){let{node:r}=t;if(r.value){if(/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(e.originalText.slice(r.valueSpan.start.offset,r.valueSpan.end.offset))||e.parser==="lwc"&&r.value.startsWith("{")&&r.value.endsWith("}"))return[r.rawName,"=",r.value];for(let n of[Jn,Zn,Yn,ss,Gn]){let s=n(t,e);if(s)return pa(s)}}}function pa(t){return async(e,r,n,s)=>{let i=await t(e,r,n,s);if(i)return i=hr(i,a=>typeof a=="string"?w(!1,a,'"',"""):a),[n.node.rawName,'="',E(i),'"']}}var is=ca;var as=new Proxy(()=>{},{get:()=>as}),Tr=as;function ha(t){return Array.isArray(t)&&t.length>0}var Ie=ha;function J(t){return t.sourceSpan.start.offset}function Z(t){return t.sourceSpan.end.offset}function tt(t,e){return[t.isSelfClosing?"":fa(t,e),Ce(t,e)]}function fa(t,e){return t.lastChild&&Ee(t.lastChild)?"":[ma(t,e),Bt(t,e)]}function Ce(t,e){return(t.next?X(t.next):_e(t.parent))?"":[Se(t,e),z(t,e)]}function ma(t,e){return _e(t)?Se(t.lastChild,e):""}function z(t,e){return Ee(t)?Bt(t.parent,e):rt(t)?Lt(t.next,e):""}function Bt(t,e){if(Tr.ok(!t.isSelfClosing),us(t,e))return"";switch(t.type){case"ieConditionalComment":return"";case"ieConditionalStartComment":return"]>";case"interpolation":return"}}";case"angularIcuExpression":return"}";case"element":if(t.isSelfClosing)return"/>";default:return">"}}function us(t,e){return!t.isSelfClosing&&!t.endSourceSpan&&(de(t)||yt(t.parent,e))}function X(t){return t.prev&&t.prev.type!=="docType"&&t.type!=="angularControlFlowBlock"&&!$(t.prev)&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces}function _e(t){var e;return((e=t.lastChild)==null?void 0:e.isTrailingSpaceSensitive)&&!t.lastChild.hasTrailingSpaces&&!$(bt(t.lastChild))&&!me(t)}function Ee(t){return!t.next&&!t.hasTrailingSpaces&&t.isTrailingSpaceSensitive&&$(bt(t))}function rt(t){return t.next&&!$(t.next)&&$(t)&&t.isTrailingSpaceSensitive&&!t.hasTrailingSpaces}function da(t){let e=t.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/su);return e?e[1]?e[1].split(/\s+/u):!0:!1}function nt(t){return!t.prev&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces}function ga(t,e,r){var f;let{node:n}=t;if(!Ie(n.attrs))return n.isSelfClosing?" ":"";let s=((f=n.prev)==null?void 0:f.type)==="comment"&&da(n.prev.value),i=typeof s=="boolean"?()=>s:Array.isArray(s)?d=>s.includes(d.rawName):()=>!1,a=t.map(({node:d})=>i(d)?B(e.originalText.slice(J(d),Z(d))):r(),"attrs"),o=n.type==="element"&&n.fullName==="script"&&n.attrs.length===1&&n.attrs[0].fullName==="src"&&n.children.length===0,p=e.singleAttributePerLine&&n.attrs.length>1&&!ge(n,e)?S:_,l=[k([o?" ":_,H(p,a)])];return n.firstChild&&nt(n.firstChild)||n.isSelfClosing&&_e(n.parent)||o?l.push(n.isSelfClosing?" ":""):l.push(e.bracketSameLine?n.isSelfClosing?" ":"":n.isSelfClosing?_:v),l}function Ca(t){return t.firstChild&&nt(t.firstChild)?"":Ft(t)}function st(t,e,r){let{node:n}=t;return[Ae(n,e),ga(t,e,r),n.isSelfClosing?"":Ca(n)]}function Ae(t,e){return t.prev&&rt(t.prev)?"":[G(t,e),Lt(t,e)]}function G(t,e){return nt(t)?Ft(t.parent):X(t)?Se(t.prev,e):""}var os="<${t.rawName}`;default:return`<${t.rawName}`}}function Ft(t){switch(Tr.ok(!t.isSelfClosing),t.type){case"ieConditionalComment":return"]>";case"element":if(t.condition)return">";default:return">"}}function Sa(t,e){if(!t.endSourceSpan)return"";let r=t.startSourceSpan.end.offset;t.firstChild&&nt(t.firstChild)&&(r-=Ft(t).length);let n=t.endSourceSpan.start.offset;return t.lastChild&&Ee(t.lastChild)?n+=Bt(t,e).length:_e(t)&&(n-=Se(t.lastChild,e).length),e.originalText.slice(r,n)}var Nt=Sa;var _a=new Set(["if","else if","for","switch","case"]);function Ea(t,e){let{node:r}=t;switch(r.type){case"element":if(W(r)||r.type==="interpolation")return;if(!r.isSelfClosing&&Tt(r,e)){let n=Ar(r,e);return n?async(s,i)=>{let a=Nt(r,e),o=/^\s*$/u.test(a),u="";return o||(u=await s(Sr(a),{parser:n,__embeddedInHtml:!0}),o=u===""),[G(r,e),E(st(t,e,i)),o?"":S,u,o?"":S,tt(r,e),z(r,e)]}:void 0}break;case"text":if(W(r.parent)){let n=Ar(r.parent,e);if(n)return async s=>{let i=n==="markdown"?Dr(r.value.replace(/^[^\S\n]*\n/u,"")):r.value,a={parser:n,__embeddedInHtml:!0};if(e.parser==="html"&&n==="babel"){let o="script",{attrMap:u}=r.parent;u&&(u.type==="module"||u.type==="text/babel"&&u["data-type"]==="module")&&(o="module"),a.__babelSourceType=o}return[se,G(r,e),await s(i,a),z(r,e)]}}else if(r.parent.type==="interpolation")return async n=>{let s={__isInHtmlInterpolation:!0,__embeddedInHtml:!0};return e.parser==="angular"?s.parser="__ng_interpolation":e.parser==="vue"?s.parser=Pe(t,e)?"__vue_ts_expression":"__vue_expression":s.parser="__js_expression",[k([_,await n(r.value,s)]),r.parent.next&&X(r.parent.next)?" ":_]};break;case"attribute":return is(t,e);case"front-matter":return n=>Dn(r,n);case"angularControlFlowBlockParameters":return _a.has(t.parent.name)?vn:void 0;case"angularLetDeclarationInitializer":return n=>T(r.value,n,{parser:"__ng_binding",__isInHtmlAttribute:!1})}}var ls=Ea;var it=null;function at(t){if(it!==null&&typeof it.property){let e=it;return it=at.prototype=null,e}return it=at.prototype=t??Object.create(null),new at}var Aa=10;for(let t=0;t<=Aa;t++)at();function xr(t){return at(t)}function Da(t,e="type"){xr(t);function r(n){let s=n[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:n});return i}return r}var cs=Da;var va={"front-matter":[],root:["children"],element:["attrs","children"],ieConditionalComment:["children"],ieConditionalStartComment:[],ieConditionalEndComment:[],interpolation:["children"],text:["children"],docType:[],comment:[],attribute:[],cdata:[],angularControlFlowBlock:["children","parameters"],angularControlFlowBlockParameters:["children"],angularControlFlowBlockParameter:[],angularLetDeclaration:["init"],angularLetDeclarationInitializer:[],angularIcuExpression:["cases"],angularIcuCase:["expression"]},ps=va;var ya=cs(ps),hs=ya;function fs(t){return/^\s*/u.test(t)}function ms(t){return` + +`+t}var ds=new Map([["if",new Set(["else if","else"])],["else if",new Set(["else if","else"])],["for",new Set(["empty"])],["defer",new Set(["placeholder","error","loading"])],["placeholder",new Set(["placeholder","error","loading"])],["error",new Set(["placeholder","error","loading"])],["loading",new Set(["placeholder","error","loading"])]]);function gs(t){let e=Z(t);return t.type==="element"&&!t.endSourceSpan&&Ie(t.children)?Math.max(e,gs(K(!1,t.children,-1))):e}function ot(t,e,r){let n=t.node;if(de(n)){let s=gs(n);return[G(n,e),B(O.trimEnd(e.originalText.slice(J(n)+(n.prev&&rt(n.prev)?Lt(n).length:0),s-(n.next&&X(n.next)?Se(n,e).length:0)))),z(n,e)]}return r()}function Pt(t,e){return $(t)&&$(e)?t.isTrailingSpaceSensitive?t.hasTrailingSpaces?wt(e)?S:_:"":wt(e)?S:v:rt(t)&&(de(e)||e.firstChild||e.isSelfClosing||e.type==="element"&&e.attrs.length>0)||t.type==="element"&&t.isSelfClosing&&X(e)?"":!e.isLeadingSpaceSensitive||wt(e)||X(e)&&t.lastChild&&Ee(t.lastChild)&&t.lastChild.lastChild&&Ee(t.lastChild.lastChild)?S:e.hasLeadingSpaces?_:v}function Re(t,e,r){let{node:n}=t;if(Er(n))return[se,...t.map(i=>{let a=i.node,o=a.prev?Pt(a.prev,a):"";return[o?[o,Je(a.prev)?S:""]:"",ot(i,e,r)]},"children")];let s=n.children.map(()=>Symbol(""));return t.map((i,a)=>{let o=i.node;if($(o)){if(o.prev&&$(o.prev)){let A=Pt(o.prev,o);if(A)return Je(o.prev)?[S,S,ot(i,e,r)]:[A,ot(i,e,r)]}return ot(i,e,r)}let u=[],p=[],l=[],f=[],d=o.prev?Pt(o.prev,o):"",C=o.next?Pt(o,o.next):"";return d&&(Je(o.prev)?u.push(S,S):d===S?u.push(S):$(o.prev)?p.push(d):p.push(pe("",v,{groupId:s[a-1]}))),C&&(Je(o)?$(o.next)&&f.push(S,S):C===S?$(o.next)&&f.push(S):l.push(C)),[...u,E([...p,E([ot(i,e,r),...l],{id:s[a]})]),...f]},"children")}function Cs(t,e,r){let{node:n}=t,s=[];wa(t)&&s.push("} "),s.push("@",n.name),n.parameters&&s.push(" (",E(r("parameters")),")"),s.push(" {");let i=Ss(n);return n.children.length>0?(n.firstChild.hasLeadingSpaces=!0,n.lastChild.hasTrailingSpaces=!0,s.push(k([S,Re(t,e,r)])),i&&s.push(S,"}")):i&&s.push("}"),E(s,{shouldBreak:!0})}function Ss(t){var e,r;return!(((e=t.next)==null?void 0:e.type)==="angularControlFlowBlock"&&((r=ds.get(t.name))!=null&&r.has(t.next.name)))}function wa(t){let{previous:e}=t;return(e==null?void 0:e.type)==="angularControlFlowBlock"&&!de(e)&&!Ss(e)}function _s(t,e,r){return[k([v,H([";",_],t.map(r,"children"))]),v]}function Es(t,e,r){let{node:n}=t;return[Ae(n,e),E([n.switchValue.trim(),", ",n.clause,n.cases.length>0?[",",k([_,H(_,t.map(r,"cases"))])]:"",v]),Ce(n,e)]}function As(t,e,r){let{node:n}=t;return[n.value," {",E([k([v,t.map(({node:s,isLast:i})=>{let a=[r()];return s.type==="text"&&(s.hasLeadingSpaces&&a.unshift(_),s.hasTrailingSpaces&&!i&&a.push(_)),a},"expression")]),v]),"}"]}function Ds(t,e,r){let{node:n}=t;if(yt(n,e))return[G(n,e),E(st(t,e,r)),B(Nt(n,e)),...tt(n,e),z(n,e)];let s=n.children.length===1&&(n.firstChild.type==="interpolation"||n.firstChild.type==="angularIcuExpression")&&n.firstChild.isLeadingSpaceSensitive&&!n.firstChild.hasLeadingSpaces&&n.lastChild.isTrailingSpaceSensitive&&!n.lastChild.hasTrailingSpaces,i=Symbol("element-attr-group-id"),a=l=>E([E(st(t,e,r),{id:i}),l,tt(n,e)]),o=l=>s?dn(l,{groupId:i}):(W(n)||et(n,e))&&n.parent.type==="root"&&e.parser==="vue"&&!e.vueIndentScriptAndStyle?l:k(l),u=()=>s?pe(v,"",{groupId:i}):n.firstChild.hasLeadingSpaces&&n.firstChild.isLeadingSpaceSensitive?_:n.firstChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive?fn(v):v,p=()=>(n.next?X(n.next):_e(n.parent))?n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?" ":"":s?pe(v,"",{groupId:i}):n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?_:(n.lastChild.type==="comment"||n.lastChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${e.tabWidth*(t.ancestors.length-1)}}$`,"u").test(n.lastChild.value)?"":v;return n.children.length===0?a(n.hasDanglingSpaces&&n.isDanglingSpaceSensitive?_:""):a([In(n)?se:"",o([u(),Re(t,e,r)]),p()])}function ut(t){return t>=9&&t<=32||t==160}function It(t){return 48<=t&&t<=57}function lt(t){return t>=97&&t<=122||t>=65&&t<=90}function vs(t){return t>=97&&t<=102||t>=65&&t<=70||It(t)}function Rt(t){return t===10||t===13}function kr(t){return 48<=t&&t<=55}function $t(t){return t===39||t===34||t===96}var ba=/-+([a-z0-9])/g;function ws(t){return t.replace(ba,(...e)=>e[1].toUpperCase())}var ie=class t{constructor(e,r,n,s){this.file=e,this.offset=r,this.line=n,this.col=s}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(e){let r=this.file.content,n=r.length,s=this.offset,i=this.line,a=this.col;for(;s>0&&e<0;)if(s--,e++,r.charCodeAt(s)==10){i--;let u=r.substring(0,s-1).lastIndexOf(String.fromCharCode(10));a=u>0?s-u:s}else a--;for(;s0;){let o=r.charCodeAt(s);s++,e--,o==10?(i++,a=0):a++}return new t(this.file,s,i,a)}getContext(e,r){let n=this.file.content,s=this.offset;if(s!=null){s>n.length-1&&(s=n.length-1);let i=s,a=0,o=0;for(;a0&&(s--,a++,!(n[s]==` +`&&++o==r)););for(a=0,o=0;a]${e.after}")`:this.msg}toString(){let e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}};var Ta=[ka,Ba,Fa,Pa,Ia,Oa,Ra,$a,Ma,Na];function xa(t,e){for(let r of Ta)r(t,e);return t}function ka(t){t.walk(e=>{if(e.type==="element"&&e.tagDefinition.ignoreFirstLf&&e.children.length>0&&e.children[0].type==="text"&&e.children[0].value[0]===` +`){let r=e.children[0];r.value.length===1?e.removeChild(r):r.value=r.value.slice(1)}})}function Ba(t){let e=r=>{var n,s;return r.type==="element"&&((n=r.prev)==null?void 0:n.type)==="ieConditionalStartComment"&&r.prev.sourceSpan.end.offset===r.startSourceSpan.start.offset&&((s=r.firstChild)==null?void 0:s.type)==="ieConditionalEndComment"&&r.firstChild.sourceSpan.start.offset===r.startSourceSpan.end.offset};t.walk(r=>{if(r.children)for(let n=0;n{if(n.children)for(let s=0;se.type==="cdata",e=>``)}function Na(t){let e=r=>{var n,s;return r.type==="element"&&r.attrs.length===0&&r.children.length===1&&r.firstChild.type==="text"&&!O.hasWhitespaceCharacter(r.children[0].value)&&!r.firstChild.hasLeadingSpaces&&!r.firstChild.hasTrailingSpaces&&r.isLeadingSpaceSensitive&&!r.hasLeadingSpaces&&r.isTrailingSpaceSensitive&&!r.hasTrailingSpaces&&((n=r.prev)==null?void 0:n.type)==="text"&&((s=r.next)==null?void 0:s.type)==="text"};t.walk(r=>{if(r.children)for(let n=0;n`+s.firstChild.value+``+a.value,i.sourceSpan=new h(i.sourceSpan.start,a.sourceSpan.end),i.isTrailingSpaceSensitive=a.isTrailingSpaceSensitive,i.hasTrailingSpaces=a.hasTrailingSpaces,r.removeChild(s),n--,r.removeChild(a)}})}function Pa(t,e){if(e.parser==="html")return;let r=/\{\{(.+?)\}\}/su;t.walk(n=>{if(Bn(n))for(let s of n.children){if(s.type!=="text")continue;let i=s.sourceSpan.start,a=null,o=s.value.split(r);for(let u=0;u0&&n.insertChildBefore(s,{type:"text",value:p,sourceSpan:new h(i,a)});continue}a=i.moveBy(p.length+4),n.insertChildBefore(s,{type:"interpolation",sourceSpan:new h(i,a),children:p.length===0?[]:[{type:"text",value:p,sourceSpan:new h(i.moveBy(2),a.moveBy(-2))}]})}n.removeChild(s)}})}function Ia(t){t.walk(e=>{let r=e.$children;if(!r)return;if(r.length===0||r.length===1&&r[0].type==="text"&&O.trim(r[0].value).length===0){e.hasDanglingSpaces=r.length>0,e.$children=[];return}let n=Ln(e),s=_r(e);if(!n)for(let i=0;i{e.isSelfClosing=!e.children||e.type==="element"&&(e.tagDefinition.isVoid||e.endSourceSpan&&e.startSourceSpan.start===e.endSourceSpan.start&&e.startSourceSpan.end===e.endSourceSpan.end)})}function $a(t,e){t.walk(r=>{r.type==="element"&&(r.hasHtmComponentClosingTag=r.endSourceSpan&&/^<\s*\/\s*\/\s*>$/u.test(e.originalText.slice(r.endSourceSpan.start.offset,r.endSourceSpan.end.offset)))})}function Oa(t,e){t.walk(r=>{r.cssDisplay=Hn(r,e)})}function Ma(t,e){t.walk(r=>{let{children:n}=r;if(n){if(n.length===0){r.isDanglingSpaceSensitive=Pn(r);return}for(let s of n)s.isLeadingSpaceSensitive=Fn(s,e),s.isTrailingSpaceSensitive=Nn(s,e);for(let s=0;s of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var ks="HTML",Va={bracketSameLine:Br.bracketSameLine,htmlWhitespaceSensitivity:{category:ks,type:"choice",default:"css",description:"How to handle whitespaces in HTML.",choices:[{value:"css",description:"Respect the default value of CSS display property."},{value:"strict",description:"Whitespaces are considered sensitive."},{value:"ignore",description:"Whitespaces are considered insensitive."}]},singleAttributePerLine:Br.singleAttributePerLine,vueIndentScriptAndStyle:{category:ks,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},Bs=Va;var Zr={};on(Zr,{angular:()=>qo,html:()=>Mo,lwc:()=>Vo,vue:()=>Ho});var xp=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g");var Ls;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"})(Ls||(Ls={}));var Fs;(function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default"})(Fs||(Fs={}));var Ns;(function(t){t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform"})(Ns||(Ns={}));var Lr={name:"custom-elements"},Fr={name:"no-errors-schema"};var ee;(function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"})(ee||(ee={}));var Ps;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"})(Ps||(Ps={}));var P;(function(t){t[t.RAW_TEXT=0]="RAW_TEXT",t[t.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",t[t.PARSABLE_DATA=2]="PARSABLE_DATA"})(P||(P={}));function ct(t,e=!0){if(t[0]!=":")return[null,t];let r=t.indexOf(":",1);if(r===-1){if(e)throw new Error(`Unsupported format "${t}" expecting ":namespace:name"`);return[null,t]}return[t.slice(1,r),t.slice(r+1)]}function Nr(t){return ct(t)[1]==="ng-container"}function Pr(t){return ct(t)[1]==="ng-content"}function Me(t){return t===null?null:ct(t)[0]}function qe(t,e){return t?`:${t}:${e}`:e}var qt;function Ir(){return qt||(qt={},Mt(ee.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),Mt(ee.STYLE,["*|style"]),Mt(ee.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","input|src","ins|cite","q|cite","source|src","track|src","video|poster","video|src"]),Mt(ee.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"])),qt}function Mt(t,e){for(let r of e)qt[r.toLowerCase()]=t}var Ht=class{};var Ua="boolean",Wa="number",za="string",Ga="object",Ya=["[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume",":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":svg:graphics^:svg:|",":svg:animation^:svg:|*begin,*end,*repeat",":svg:geometry^:svg:|",":svg:componentTransferFunction^:svg:|",":svg:gradient^:svg:|",":svg:textContent^:svg:graphics|",":svg:textPositioning^:svg:textContent|","a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username","area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username","audio^media|","br^[HTMLElement]|clear","base^[HTMLElement]|href,target","body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink","button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value","canvas^[HTMLElement]|#height,#width","content^[HTMLElement]|select","dl^[HTMLElement]|!compact","data^[HTMLElement]|value","datalist^[HTMLElement]|","details^[HTMLElement]|!open","dialog^[HTMLElement]|!open,returnValue","dir^[HTMLElement]|!compact","div^[HTMLElement]|align","embed^[HTMLElement]|align,height,name,src,type,width","fieldset^[HTMLElement]|!disabled,name","font^[HTMLElement]|color,face,size","form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target","frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src","frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows","hr^[HTMLElement]|align,color,!noShade,size,width","head^[HTMLElement]|","h1,h2,h3,h4,h5,h6^[HTMLElement]|align","html^[HTMLElement]|version","iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width","img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width","input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type","map^[HTMLElement]|name","marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width","menu^[HTMLElement]|!compact","meta^[HTMLElement]|content,httpEquiv,media,name,scheme","meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value","ins,del^[HTMLElement]|cite,dateTime","ol^[HTMLElement]|!compact,!reversed,#start,type","object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width","optgroup^[HTMLElement]|!disabled,label","option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value","output^[HTMLElement]|defaultValue,%htmlFor,name,value","p^[HTMLElement]|align","param^[HTMLElement]|name,type,value,valueType","picture^[HTMLElement]|","pre^[HTMLElement]|#width","progress^[HTMLElement]|#max,#value","q,blockquote,cite^[HTMLElement]|","script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type","select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value","slot^[HTMLElement]|name","source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width","span^[HTMLElement]|","style^[HTMLElement]|!disabled,media,type","caption^[HTMLElement]|align","th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width","col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width","table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width","tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign","tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign","template^[HTMLElement]|","textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap","time^[HTMLElement]|dateTime","title^[HTMLElement]|text","track^[HTMLElement]|!default,kind,label,src,srclang","ul^[HTMLElement]|!compact,type","unknown^[HTMLElement]|","video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width",":svg:a^:svg:graphics|",":svg:animate^:svg:animation|",":svg:animateMotion^:svg:animation|",":svg:animateTransform^:svg:animation|",":svg:circle^:svg:geometry|",":svg:clipPath^:svg:graphics|",":svg:defs^:svg:graphics|",":svg:desc^:svg:|",":svg:discard^:svg:|",":svg:ellipse^:svg:geometry|",":svg:feBlend^:svg:|",":svg:feColorMatrix^:svg:|",":svg:feComponentTransfer^:svg:|",":svg:feComposite^:svg:|",":svg:feConvolveMatrix^:svg:|",":svg:feDiffuseLighting^:svg:|",":svg:feDisplacementMap^:svg:|",":svg:feDistantLight^:svg:|",":svg:feDropShadow^:svg:|",":svg:feFlood^:svg:|",":svg:feFuncA^:svg:componentTransferFunction|",":svg:feFuncB^:svg:componentTransferFunction|",":svg:feFuncG^:svg:componentTransferFunction|",":svg:feFuncR^:svg:componentTransferFunction|",":svg:feGaussianBlur^:svg:|",":svg:feImage^:svg:|",":svg:feMerge^:svg:|",":svg:feMergeNode^:svg:|",":svg:feMorphology^:svg:|",":svg:feOffset^:svg:|",":svg:fePointLight^:svg:|",":svg:feSpecularLighting^:svg:|",":svg:feSpotLight^:svg:|",":svg:feTile^:svg:|",":svg:feTurbulence^:svg:|",":svg:filter^:svg:|",":svg:foreignObject^:svg:graphics|",":svg:g^:svg:graphics|",":svg:image^:svg:graphics|decoding",":svg:line^:svg:geometry|",":svg:linearGradient^:svg:gradient|",":svg:mpath^:svg:|",":svg:marker^:svg:|",":svg:mask^:svg:|",":svg:metadata^:svg:|",":svg:path^:svg:geometry|",":svg:pattern^:svg:|",":svg:polygon^:svg:geometry|",":svg:polyline^:svg:geometry|",":svg:radialGradient^:svg:gradient|",":svg:rect^:svg:geometry|",":svg:svg^:svg:graphics|#currentScale,#zoomAndPan",":svg:script^:svg:|type",":svg:set^:svg:animation|",":svg:stop^:svg:|",":svg:style^:svg:|!disabled,media,title,type",":svg:switch^:svg:graphics|",":svg:symbol^:svg:|",":svg:tspan^:svg:textPositioning|",":svg:text^:svg:textPositioning|",":svg:textPath^:svg:textContent|",":svg:title^:svg:|",":svg:use^:svg:graphics|",":svg:view^:svg:|#zoomAndPan","data^[HTMLElement]|value","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|",":math:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforeinput,*beforematch,*beforetoggle,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contentvisibilityautostatechange,*contextlost,*contextmenu,*contextrestored,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*scrollend,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":math:math^:math:|",":math:maction^:math:|",":math:menclose^:math:|",":math:merror^:math:|",":math:mfenced^:math:|",":math:mfrac^:math:|",":math:mi^:math:|",":math:mmultiscripts^:math:|",":math:mn^:math:|",":math:mo^:math:|",":math:mover^:math:|",":math:mpadded^:math:|",":math:mphantom^:math:|",":math:mroot^:math:|",":math:mrow^:math:|",":math:ms^:math:|",":math:mspace^:math:|",":math:msqrt^:math:|",":math:mstyle^:math:|",":math:msub^:math:|",":math:msubsup^:math:|",":math:msup^:math:|",":math:mtable^:math:|",":math:mtd^:math:|",":math:mtext^:math:|",":math:mtr^:math:|",":math:munder^:math:|",":math:munderover^:math:|",":math:semantics^:math:|"],Is=new Map(Object.entries({class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"})),ja=Array.from(Is).reduce((t,[e,r])=>(t.set(e,r),t),new Map),Vt=class extends Ht{constructor(){super(),this._schema=new Map,this._eventSchema=new Map,Ya.forEach(e=>{let r=new Map,n=new Set,[s,i]=e.split("|"),a=i.split(","),[o,u]=s.split("^");o.split(",").forEach(l=>{this._schema.set(l.toLowerCase(),r),this._eventSchema.set(l.toLowerCase(),n)});let p=u&&this._schema.get(u.toLowerCase());if(p){for(let[l,f]of p)r.set(l,f);for(let l of this._eventSchema.get(u.toLowerCase()))n.add(l)}a.forEach(l=>{if(l.length>0)switch(l[0]){case"*":n.add(l.substring(1));break;case"!":r.set(l.substring(1),Ua);break;case"#":r.set(l.substring(1),Wa);break;case"%":r.set(l.substring(1),Ga);break;default:r.set(l,za)}})})}hasProperty(e,r,n){if(n.some(i=>i.name===Fr.name))return!0;if(e.indexOf("-")>-1){if(Nr(e)||Pr(e))return!1;if(n.some(i=>i.name===Lr.name))return!0}return(this._schema.get(e.toLowerCase())||this._schema.get("unknown")).has(r)}hasElement(e,r){return r.some(n=>n.name===Fr.name)||e.indexOf("-")>-1&&(Nr(e)||Pr(e)||r.some(n=>n.name===Lr.name))?!0:this._schema.has(e.toLowerCase())}securityContext(e,r,n){n&&(r=this.getMappedPropName(r)),e=e.toLowerCase(),r=r.toLowerCase();let s=Ir()[e+"|"+r];return s||(s=Ir()["*|"+r],s||ee.NONE)}getMappedPropName(e){return Is.get(e)??e}getDefaultComponentElementName(){return"ng-component"}validateProperty(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${e}' is disallowed for security reasons, please use (${e.slice(2)})=... +If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let r=this._schema.get(e.toLowerCase())||this._schema.get("unknown");return Array.from(r.keys()).map(n=>ja.get(n)??n)}allKnownEventsOfElement(e){return Array.from(this._eventSchema.get(e.toLowerCase())??[])}normalizeAnimationStyleProperty(e){return ws(e)}normalizeAnimationStyleValue(e,r,n){let s="",i=n.toString().trim(),a=null;if(Ka(e)&&n!==0&&n!=="0")if(typeof n=="number")s="px";else{let o=n.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&o[1].length==0&&(a=`Please provide a CSS unit value for ${r}:${n}`)}return{error:a,value:i+s}}};function Ka(t){switch(t){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var m=class{constructor({closedByChildren:e,implicitNamespacePrefix:r,contentType:n=P.PARSABLE_DATA,closedByParent:s=!1,isVoid:i=!1,ignoreFirstLf:a=!1,preventNamespaceInheritance:o=!1,canSelfClose:u=!1}={}){this.closedByChildren={},this.closedByParent=!1,e&&e.length>0&&e.forEach(p=>this.closedByChildren[p]=!0),this.isVoid=i,this.closedByParent=s||i,this.implicitNamespacePrefix=r||null,this.contentType=n,this.ignoreFirstLf=a,this.preventNamespaceInheritance=o,this.canSelfClose=u??i}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}getContentType(e){return typeof this.contentType=="object"?(e===void 0?void 0:this.contentType[e])??this.contentType.default:this.contentType}},Rs,pt;function He(t){return pt||(Rs=new m({canSelfClose:!0}),pt=Object.assign(Object.create(null),{base:new m({isVoid:!0}),meta:new m({isVoid:!0}),area:new m({isVoid:!0}),embed:new m({isVoid:!0}),link:new m({isVoid:!0}),img:new m({isVoid:!0}),input:new m({isVoid:!0}),param:new m({isVoid:!0}),hr:new m({isVoid:!0}),br:new m({isVoid:!0}),source:new m({isVoid:!0}),track:new m({isVoid:!0}),wbr:new m({isVoid:!0}),p:new m({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new m({closedByChildren:["tbody","tfoot"]}),tbody:new m({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new m({closedByChildren:["tbody"],closedByParent:!0}),tr:new m({closedByChildren:["tr"],closedByParent:!0}),td:new m({closedByChildren:["td","th"],closedByParent:!0}),th:new m({closedByChildren:["td","th"],closedByParent:!0}),col:new m({isVoid:!0}),svg:new m({implicitNamespacePrefix:"svg"}),foreignObject:new m({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new m({implicitNamespacePrefix:"math"}),li:new m({closedByChildren:["li"],closedByParent:!0}),dt:new m({closedByChildren:["dt","dd"]}),dd:new m({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new m({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new m({closedByChildren:["optgroup"],closedByParent:!0}),option:new m({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new m({ignoreFirstLf:!0}),listing:new m({ignoreFirstLf:!0}),style:new m({contentType:P.RAW_TEXT}),script:new m({contentType:P.RAW_TEXT}),title:new m({contentType:{default:P.ESCAPABLE_RAW_TEXT,svg:P.PARSABLE_DATA}}),textarea:new m({contentType:P.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new Vt().allKnownElementNames().forEach(e=>{!pt[e]&&Me(e)===null&&(pt[e]=new m({canSelfClose:!1}))})),pt[t]??Rs}var ae=class{constructor(e,r){this.sourceSpan=e,this.i18n=r}},Ut=class extends ae{constructor(e,r,n,s){super(r,s),this.value=e,this.tokens=n,this.type="text"}visit(e,r){return e.visitText(this,r)}},Wt=class extends ae{constructor(e,r,n,s){super(r,s),this.value=e,this.tokens=n,this.type="cdata"}visit(e,r){return e.visitCdata(this,r)}},zt=class extends ae{constructor(e,r,n,s,i,a){super(s,a),this.switchValue=e,this.type=r,this.cases=n,this.switchValueSourceSpan=i}visit(e,r){return e.visitExpansion(this,r)}},Gt=class{constructor(e,r,n,s,i){this.value=e,this.expression=r,this.sourceSpan=n,this.valueSourceSpan=s,this.expSourceSpan=i,this.type="expansionCase"}visit(e,r){return e.visitExpansionCase(this,r)}},Yt=class extends ae{constructor(e,r,n,s,i,a,o){super(n,o),this.name=e,this.value=r,this.keySpan=s,this.valueSpan=i,this.valueTokens=a,this.type="attribute"}visit(e,r){return e.visitAttribute(this,r)}get nameSpan(){return this.keySpan}},Y=class extends ae{constructor(e,r,n,s,i,a=null,o=null,u){super(s,u),this.name=e,this.attrs=r,this.children=n,this.startSourceSpan=i,this.endSourceSpan=a,this.nameSpan=o,this.type="element"}visit(e,r){return e.visitElement(this,r)}},jt=class{constructor(e,r){this.value=e,this.sourceSpan=r,this.type="comment"}visit(e,r){return e.visitComment(this,r)}},Kt=class{constructor(e,r){this.value=e,this.sourceSpan=r,this.type="docType"}visit(e,r){return e.visitDocType(this,r)}},te=class extends ae{constructor(e,r,n,s,i,a,o=null,u){super(s,u),this.name=e,this.parameters=r,this.children=n,this.nameSpan=i,this.startSourceSpan=a,this.endSourceSpan=o,this.type="block"}visit(e,r){return e.visitBlock(this,r)}},ht=class{constructor(e,r){this.expression=e,this.sourceSpan=r,this.type="blockParameter",this.startSourceSpan=null,this.endSourceSpan=null}visit(e,r){return e.visitBlockParameter(this,r)}},ft=class{constructor(e,r,n,s,i){this.name=e,this.value=r,this.sourceSpan=n,this.nameSpan=s,this.valueSpan=i,this.type="letDeclaration",this.startSourceSpan=null,this.endSourceSpan=null}visit(e,r){return e.visitLetDeclaration(this,r)}};function Qt(t,e,r=null){let n=[],s=t.visit?i=>t.visit(i,r)||i.visit(t,r):i=>i.visit(t,r);return e.forEach(i=>{let a=s(i);a&&n.push(a)}),n}var mt=class{constructor(){}visitElement(e,r){this.visitChildren(r,n=>{n(e.attrs),n(e.children)})}visitAttribute(e,r){}visitText(e,r){}visitCdata(e,r){}visitComment(e,r){}visitDocType(e,r){}visitExpansion(e,r){return this.visitChildren(r,n=>{n(e.cases)})}visitExpansionCase(e,r){}visitBlock(e,r){this.visitChildren(r,n=>{n(e.parameters),n(e.children)})}visitBlockParameter(e,r){}visitLetDeclaration(e,r){}visitChildren(e,r){let n=[],s=this;function i(a){a&&n.push(Qt(s,a,e))}return r(i),Array.prototype.concat.apply([],n)}};var Ve={AElig:"\xC6",AMP:"&",amp:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",af:"\u2061",Aring:"\xC5",angst:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",colone:"\u2254",coloneq:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",setminus:"\u2216",setmn:"\u2216",smallsetminus:"\u2216",ssetmn:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",doublebarwedge:"\u2306",Bcy:"\u0411",Because:"\u2235",becaus:"\u2235",because:"\u2235",Bernoullis:"\u212C",Bscr:"\u212C",bernou:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",breve:"\u02D8",Bumpeq:"\u224E",HumpDownHump:"\u224E",bump:"\u224E",CHcy:"\u0427",COPY:"\xA9",copy:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",DD:"\u2145",Cayleys:"\u212D",Cfr:"\u212D",Ccaron:"\u010C",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",cedil:"\xB8",CenterDot:"\xB7",centerdot:"\xB7",middot:"\xB7",Chi:"\u03A7",CircleDot:"\u2299",odot:"\u2299",CircleMinus:"\u2296",ominus:"\u2296",CirclePlus:"\u2295",oplus:"\u2295",CircleTimes:"\u2297",otimes:"\u2297",ClockwiseContourIntegral:"\u2232",cwconint:"\u2232",CloseCurlyDoubleQuote:"\u201D",rdquo:"\u201D",rdquor:"\u201D",CloseCurlyQuote:"\u2019",rsquo:"\u2019",rsquor:"\u2019",Colon:"\u2237",Proportion:"\u2237",Colone:"\u2A74",Congruent:"\u2261",equiv:"\u2261",Conint:"\u222F",DoubleContourIntegral:"\u222F",ContourIntegral:"\u222E",conint:"\u222E",oint:"\u222E",Copf:"\u2102",complexes:"\u2102",Coproduct:"\u2210",coprod:"\u2210",CounterClockwiseContourIntegral:"\u2233",awconint:"\u2233",Cross:"\u2A2F",Cscr:"\u{1D49E}",Cup:"\u22D3",CupCap:"\u224D",asympeq:"\u224D",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",ddagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",DoubleLeftTee:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",nabla:"\u2207",Delta:"\u0394",Dfr:"\u{1D507}",DiacriticalAcute:"\xB4",acute:"\xB4",DiacriticalDot:"\u02D9",dot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",dblac:"\u02DD",DiacriticalGrave:"`",grave:"`",DiacriticalTilde:"\u02DC",tilde:"\u02DC",Diamond:"\u22C4",diam:"\u22C4",diamond:"\u22C4",DifferentialD:"\u2146",dd:"\u2146",Dopf:"\u{1D53B}",Dot:"\xA8",DoubleDot:"\xA8",die:"\xA8",uml:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",doteq:"\u2250",esdot:"\u2250",DoubleDownArrow:"\u21D3",Downarrow:"\u21D3",dArr:"\u21D3",DoubleLeftArrow:"\u21D0",Leftarrow:"\u21D0",lArr:"\u21D0",DoubleLeftRightArrow:"\u21D4",Leftrightarrow:"\u21D4",hArr:"\u21D4",iff:"\u21D4",DoubleLongLeftArrow:"\u27F8",Longleftarrow:"\u27F8",xlArr:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",Longleftrightarrow:"\u27FA",xhArr:"\u27FA",DoubleLongRightArrow:"\u27F9",Longrightarrow:"\u27F9",xrArr:"\u27F9",DoubleRightArrow:"\u21D2",Implies:"\u21D2",Rightarrow:"\u21D2",rArr:"\u21D2",DoubleRightTee:"\u22A8",vDash:"\u22A8",DoubleUpArrow:"\u21D1",Uparrow:"\u21D1",uArr:"\u21D1",DoubleUpDownArrow:"\u21D5",Updownarrow:"\u21D5",vArr:"\u21D5",DoubleVerticalBar:"\u2225",par:"\u2225",parallel:"\u2225",shortparallel:"\u2225",spar:"\u2225",DownArrow:"\u2193",ShortDownArrow:"\u2193",darr:"\u2193",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",duarr:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",leftharpoondown:"\u21BD",lhard:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",rhard:"\u21C1",rightharpoondown:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",top:"\u22A4",DownTeeArrow:"\u21A7",mapstodown:"\u21A7",Dscr:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ETH:"\xD0",Eacute:"\xC9",Ecaron:"\u011A",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrave:"\xC8",Element:"\u2208",in:"\u2208",isin:"\u2208",isinv:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",eqsim:"\u2242",esim:"\u2242",Equilibrium:"\u21CC",rightleftharpoons:"\u21CC",rlhar:"\u21CC",Escr:"\u2130",expectation:"\u2130",Esim:"\u2A73",Eta:"\u0397",Euml:"\xCB",Exists:"\u2203",exist:"\u2203",ExponentialE:"\u2147",ee:"\u2147",exponentiale:"\u2147",Fcy:"\u0424",Ffr:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",blacksquare:"\u25AA",squarf:"\u25AA",squf:"\u25AA",Fopf:"\u{1D53D}",ForAll:"\u2200",forall:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",gt:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1D50A}",Gg:"\u22D9",ggg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",ge:"\u2265",geq:"\u2265",GreaterEqualLess:"\u22DB",gel:"\u22DB",gtreqless:"\u22DB",GreaterFullEqual:"\u2267",gE:"\u2267",geqq:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",gl:"\u2277",gtrless:"\u2277",GreaterSlantEqual:"\u2A7E",geqslant:"\u2A7E",ges:"\u2A7E",GreaterTilde:"\u2273",gsim:"\u2273",gtrsim:"\u2273",Gscr:"\u{1D4A2}",Gt:"\u226B",NestedGreaterGreater:"\u226B",gg:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",caron:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",Poincareplane:"\u210C",HilbertSpace:"\u210B",Hscr:"\u210B",hamilt:"\u210B",Hopf:"\u210D",quaternions:"\u210D",HorizontalLine:"\u2500",boxh:"\u2500",Hstrok:"\u0126",HumpEqual:"\u224F",bumpe:"\u224F",bumpeq:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xCD",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Im:"\u2111",image:"\u2111",imagpart:"\u2111",Igrave:"\xCC",Imacr:"\u012A",ImaginaryI:"\u2148",ii:"\u2148",Int:"\u222C",Integral:"\u222B",int:"\u222B",Intersection:"\u22C2",bigcap:"\u22C2",xcap:"\u22C2",InvisibleComma:"\u2063",ic:"\u2063",InvisibleTimes:"\u2062",it:"\u2062",Iogon:"\u012E",Iopf:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",imagline:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",LJcy:"\u0409",LT:"<",lt:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Lscr:"\u2112",lagran:"\u2112",Larr:"\u219E",twoheadleftarrow:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",lang:"\u27E8",langle:"\u27E8",LeftArrow:"\u2190",ShortLeftArrow:"\u2190",larr:"\u2190",leftarrow:"\u2190",slarr:"\u2190",LeftArrowBar:"\u21E4",larrb:"\u21E4",LeftArrowRightArrow:"\u21C6",leftrightarrows:"\u21C6",lrarr:"\u21C6",LeftCeiling:"\u2308",lceil:"\u2308",LeftDoubleBracket:"\u27E6",lobrk:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",dharl:"\u21C3",downharpoonleft:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",lfloor:"\u230A",LeftRightArrow:"\u2194",harr:"\u2194",leftrightarrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",dashv:"\u22A3",LeftTeeArrow:"\u21A4",mapstoleft:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",vartriangleleft:"\u22B2",vltri:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",ltrie:"\u22B4",trianglelefteq:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",uharl:"\u21BF",upharpoonleft:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",leftharpoonup:"\u21BC",lharu:"\u21BC",LeftVectorBar:"\u2952",LessEqualGreater:"\u22DA",leg:"\u22DA",lesseqgtr:"\u22DA",LessFullEqual:"\u2266",lE:"\u2266",leqq:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",lg:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",leqslant:"\u2A7D",les:"\u2A7D",LessTilde:"\u2272",lesssim:"\u2272",lsim:"\u2272",Lfr:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",lAarr:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",longleftarrow:"\u27F5",xlarr:"\u27F5",LongLeftRightArrow:"\u27F7",longleftrightarrow:"\u27F7",xharr:"\u27F7",LongRightArrow:"\u27F6",longrightarrow:"\u27F6",xrarr:"\u27F6",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",swarr:"\u2199",swarrow:"\u2199",LowerRightArrow:"\u2198",searr:"\u2198",searrow:"\u2198",Lsh:"\u21B0",lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",NestedLessLess:"\u226A",ll:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mscr:"\u2133",phmmat:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",mnplus:"\u2213",mp:"\u2213",Mopf:"\u{1D544}",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",ZeroWidthSpace:"\u200B",NewLine:` +`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nbsp:"\xA0",Nopf:"\u2115",naturals:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",nequiv:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",npar:"\u2226",nparallel:"\u2226",nshortparallel:"\u2226",nspar:"\u2226",NotElement:"\u2209",notin:"\u2209",notinva:"\u2209",NotEqual:"\u2260",ne:"\u2260",NotEqualTilde:"\u2242\u0338",nesim:"\u2242\u0338",NotExists:"\u2204",nexist:"\u2204",nexists:"\u2204",NotGreater:"\u226F",ngt:"\u226F",ngtr:"\u226F",NotGreaterEqual:"\u2271",nge:"\u2271",ngeq:"\u2271",NotGreaterFullEqual:"\u2267\u0338",ngE:"\u2267\u0338",ngeqq:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",nGtv:"\u226B\u0338",NotGreaterLess:"\u2279",ntgl:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",NotGreaterTilde:"\u2275",ngsim:"\u2275",NotHumpDownHump:"\u224E\u0338",nbump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",nbumpe:"\u224F\u0338",NotLeftTriangle:"\u22EA",nltri:"\u22EA",ntriangleleft:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",nltrie:"\u22EC",ntrianglelefteq:"\u22EC",NotLess:"\u226E",nless:"\u226E",nlt:"\u226E",NotLessEqual:"\u2270",nle:"\u2270",nleq:"\u2270",NotLessGreater:"\u2278",ntlg:"\u2278",NotLessLess:"\u226A\u0338",nLtv:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",NotLessTilde:"\u2274",nlsim:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",npr:"\u2280",nprec:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",npre:"\u2AAF\u0338",npreceq:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",nprcue:"\u22E0",NotReverseElement:"\u220C",notni:"\u220C",notniva:"\u220C",NotRightTriangle:"\u22EB",nrtri:"\u22EB",ntriangleright:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",nrtrie:"\u22ED",ntrianglerighteq:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",nsqsube:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",nsqsupe:"\u22E3",NotSubset:"\u2282\u20D2",nsubset:"\u2282\u20D2",vnsub:"\u2282\u20D2",NotSubsetEqual:"\u2288",nsube:"\u2288",nsubseteq:"\u2288",NotSucceeds:"\u2281",nsc:"\u2281",nsucc:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",nsce:"\u2AB0\u0338",nsucceq:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",nsccue:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",nsupset:"\u2283\u20D2",vnsup:"\u2283\u20D2",NotSupersetEqual:"\u2289",nsupe:"\u2289",nsupseteq:"\u2289",NotTilde:"\u2241",nsim:"\u2241",NotTildeEqual:"\u2244",nsime:"\u2244",nsimeq:"\u2244",NotTildeFullEqual:"\u2247",ncong:"\u2247",NotTildeTilde:"\u2249",nap:"\u2249",napprox:"\u2249",NotVerticalBar:"\u2224",nmid:"\u2224",nshortmid:"\u2224",nsmid:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",ohm:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",ldquo:"\u201C",OpenCurlyQuote:"\u2018",lsquo:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",oline:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",tbrk:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",part:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",plusmn:"\xB1",pm:"\xB1",Popf:"\u2119",primes:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",pr:"\u227A",prec:"\u227A",PrecedesEqual:"\u2AAF",pre:"\u2AAF",preceq:"\u2AAF",PrecedesSlantEqual:"\u227C",prcue:"\u227C",preccurlyeq:"\u227C",PrecedesTilde:"\u227E",precsim:"\u227E",prsim:"\u227E",Prime:"\u2033",Product:"\u220F",prod:"\u220F",Proportional:"\u221D",prop:"\u221D",propto:"\u221D",varpropto:"\u221D",vprop:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',quot:'"',Qfr:"\u{1D514}",Qopf:"\u211A",rationals:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",drbkarow:"\u2910",REG:"\xAE",circledR:"\xAE",reg:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",twoheadrightarrow:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",Rfr:"\u211C",real:"\u211C",realpart:"\u211C",ReverseElement:"\u220B",SuchThat:"\u220B",ni:"\u220B",niv:"\u220B",ReverseEquilibrium:"\u21CB",leftrightharpoons:"\u21CB",lrhar:"\u21CB",ReverseUpEquilibrium:"\u296F",duhar:"\u296F",Rho:"\u03A1",RightAngleBracket:"\u27E9",rang:"\u27E9",rangle:"\u27E9",RightArrow:"\u2192",ShortRightArrow:"\u2192",rarr:"\u2192",rightarrow:"\u2192",srarr:"\u2192",RightArrowBar:"\u21E5",rarrb:"\u21E5",RightArrowLeftArrow:"\u21C4",rightleftarrows:"\u21C4",rlarr:"\u21C4",RightCeiling:"\u2309",rceil:"\u2309",RightDoubleBracket:"\u27E7",robrk:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",dharr:"\u21C2",downharpoonright:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rfloor:"\u230B",RightTee:"\u22A2",vdash:"\u22A2",RightTeeArrow:"\u21A6",map:"\u21A6",mapsto:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",vartriangleright:"\u22B3",vrtri:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",rtrie:"\u22B5",trianglerighteq:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",uharr:"\u21BE",upharpoonright:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",rharu:"\u21C0",rightharpoonup:"\u21C0",RightVectorBar:"\u2953",Ropf:"\u211D",reals:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",rAarr:"\u21DB",Rscr:"\u211B",realine:"\u211B",Rsh:"\u21B1",rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortUpArrow:"\u2191",UpArrow:"\u2191",uarr:"\u2191",uparrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",compfn:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",radic:"\u221A",Square:"\u25A1",squ:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",sqcap:"\u2293",SquareSubset:"\u228F",sqsub:"\u228F",sqsubset:"\u228F",SquareSubsetEqual:"\u2291",sqsube:"\u2291",sqsubseteq:"\u2291",SquareSuperset:"\u2290",sqsup:"\u2290",sqsupset:"\u2290",SquareSupersetEqual:"\u2292",sqsupe:"\u2292",sqsupseteq:"\u2292",SquareUnion:"\u2294",sqcup:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",sstarf:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",sube:"\u2286",subseteq:"\u2286",Succeeds:"\u227B",sc:"\u227B",succ:"\u227B",SucceedsEqual:"\u2AB0",sce:"\u2AB0",succeq:"\u2AB0",SucceedsSlantEqual:"\u227D",sccue:"\u227D",succcurlyeq:"\u227D",SucceedsTilde:"\u227F",scsim:"\u227F",succsim:"\u227F",Sum:"\u2211",sum:"\u2211",Sup:"\u22D1",Supset:"\u22D1",Superset:"\u2283",sup:"\u2283",supset:"\u2283",SupersetEqual:"\u2287",supe:"\u2287",supseteq:"\u2287",THORN:"\xDE",TRADE:"\u2122",trade:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",there4:"\u2234",therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",thinsp:"\u2009",Tilde:"\u223C",sim:"\u223C",thicksim:"\u223C",thksim:"\u223C",TildeEqual:"\u2243",sime:"\u2243",simeq:"\u2243",TildeFullEqual:"\u2245",cong:"\u2245",TildeTilde:"\u2248",ap:"\u2248",approx:"\u2248",asymp:"\u2248",thickapprox:"\u2248",thkap:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",tdot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",lowbar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",bbrk:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",bigcup:"\u22C3",xcup:"\u22C3",UnionPlus:"\u228E",uplus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",udarr:"\u21C5",UpDownArrow:"\u2195",updownarrow:"\u2195",varr:"\u2195",UpEquilibrium:"\u296E",udhar:"\u296E",UpTee:"\u22A5",bot:"\u22A5",bottom:"\u22A5",perp:"\u22A5",UpTeeArrow:"\u21A5",mapstoup:"\u21A5",UpperLeftArrow:"\u2196",nwarr:"\u2196",nwarrow:"\u2196",UpperRightArrow:"\u2197",nearr:"\u2197",nearrow:"\u2197",Upsi:"\u03D2",upsih:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",bigvee:"\u22C1",xvee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",mid:"\u2223",shortmid:"\u2223",smid:"\u2223",VerticalLine:"|",verbar:"|",vert:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",wr:"\u2240",wreath:"\u2240",VeryThinSpace:"\u200A",hairsp:"\u200A",Vfr:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",bigwedge:"\u22C0",xwedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",Zeta:"\u0396",Zfr:"\u2128",zeetrf:"\u2128",Zopf:"\u2124",integers:"\u2124",Zscr:"\u{1D4B5}",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",mstpos:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acy:"\u0430",aelig:"\xE6",afr:"\u{1D51E}",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",and:"\u2227",wedge:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",angle:"\u2220",ange:"\u29A4",angmsd:"\u2221",measuredangle:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angzarr:"\u237C",aogon:"\u0105",aopf:"\u{1D552}",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",approxeq:"\u224A",apid:"\u224B",apos:"'",aring:"\xE5",ascr:"\u{1D4B6}",ast:"*",midast:"*",atilde:"\xE3",auml:"\xE4",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",bcong:"\u224C",backepsilon:"\u03F6",bepsi:"\u03F6",backprime:"\u2035",bprime:"\u2035",backsim:"\u223D",bsim:"\u223D",backsimeq:"\u22CD",bsime:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrktbrk:"\u23B6",bcy:"\u0431",bdquo:"\u201E",ldquor:"\u201E",bemptyv:"\u29B0",beta:"\u03B2",beth:"\u2136",between:"\u226C",twixt:"\u226C",bfr:"\u{1D51F}",bigcirc:"\u25EF",xcirc:"\u25EF",bigodot:"\u2A00",xodot:"\u2A00",bigoplus:"\u2A01",xoplus:"\u2A01",bigotimes:"\u2A02",xotime:"\u2A02",bigsqcup:"\u2A06",xsqcup:"\u2A06",bigstar:"\u2605",starf:"\u2605",bigtriangledown:"\u25BD",xdtri:"\u25BD",bigtriangleup:"\u25B3",xutri:"\u25B3",biguplus:"\u2A04",xuplus:"\u2A04",bkarow:"\u290D",rbarr:"\u290D",blacklozenge:"\u29EB",lozf:"\u29EB",blacktriangle:"\u25B4",utrif:"\u25B4",blacktriangledown:"\u25BE",dtrif:"\u25BE",blacktriangleleft:"\u25C2",ltrif:"\u25C2",blacktriangleright:"\u25B8",rtrif:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\u{1D553}",bowtie:"\u22C8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255D",boxUR:"\u255A",boxUl:"\u255C",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256C",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256B",boxVl:"\u2562",boxVr:"\u255F",boxbox:"\u29C9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250C",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",minusb:"\u229F",boxplus:"\u229E",plusb:"\u229E",boxtimes:"\u22A0",timesb:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",brvbar:"\xA6",bscr:"\u{1D4B7}",bsemi:"\u204F",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bumpE:"\u2AAE",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cemptyv:"\u29B2",cent:"\xA2",cfr:"\u{1D520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",cire:"\u2257",circlearrowleft:"\u21BA",olarr:"\u21BA",circlearrowright:"\u21BB",orarr:"\u21BB",circledS:"\u24C8",oS:"\u24C8",circledast:"\u229B",oast:"\u229B",circledcirc:"\u229A",ocir:"\u229A",circleddash:"\u229D",odash:"\u229D",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",comma:",",commat:"@",comp:"\u2201",complement:"\u2201",congdot:"\u2A6D",copf:"\u{1D554}",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",curlyeqprec:"\u22DE",cuesc:"\u22DF",curlyeqsucc:"\u22DF",cularr:"\u21B6",curvearrowleft:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curvearrowright:"\u21B7",curarrm:"\u293C",curlyvee:"\u22CE",cuvee:"\u22CE",curlywedge:"\u22CF",cuwed:"\u22CF",curren:"\xA4",cwint:"\u2231",cylcty:"\u232D",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",dash:"\u2010",hyphen:"\u2010",dbkarow:"\u290F",rBarr:"\u290F",dcaron:"\u010F",dcy:"\u0434",ddarr:"\u21CA",downdownarrows:"\u21CA",ddotseq:"\u2A77",eDDot:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",diamondsuit:"\u2666",diams:"\u2666",digamma:"\u03DD",gammad:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",llcorner:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",doteqdot:"\u2251",eDot:"\u2251",dotminus:"\u2238",minusd:"\u2238",dotplus:"\u2214",plusdo:"\u2214",dotsquare:"\u22A1",sdotb:"\u22A1",drcorn:"\u231F",lrcorner:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",triangledown:"\u25BF",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",eqcirc:"\u2256",ecirc:"\xEA",ecolon:"\u2255",eqcolon:"\u2255",ecy:"\u044D",edot:"\u0117",efDot:"\u2252",fallingdotseq:"\u2252",efr:"\u{1D522}",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",eqslantgtr:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",eqslantless:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",varnothing:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",straightepsilon:"\u03F5",varepsilon:"\u03F5",equals:"=",equest:"\u225F",questeq:"\u225F",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",risingdotseq:"\u2253",erarr:"\u2971",escr:"\u212F",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",fork:"\u22D4",pitchfork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",half:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",sfrown:"\u2322",fscr:"\u{1D4BB}",gEl:"\u2A8C",gtreqqless:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gap:"\u2A86",gtrapprox:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",gimel:"\u2137",gjcy:"\u0453",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gneqq:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gnsim:"\u22E7",gopf:"\u{1D558}",gscr:"\u210A",gsime:"\u2A8E",gsiml:"\u2A90",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtrdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrarr:"\u2978",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hardcy:"\u044A",harrcir:"\u2948",harrw:"\u21AD",leftrightsquigarrow:"\u21AD",hbar:"\u210F",hslash:"\u210F",planck:"\u210F",plankv:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",mldr:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",hksearow:"\u2925",searhk:"\u2925",hkswarow:"\u2926",swarhk:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",larrhk:"\u21A9",hookrightarrow:"\u21AA",rarrhk:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",hstrok:"\u0127",hybull:"\u2043",iacute:"\xED",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",ifr:"\u{1D526}",igrave:"\xEC",iiiint:"\u2A0C",qint:"\u2A0C",iiint:"\u222D",tint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",imath:"\u0131",inodot:"\u0131",imof:"\u22B7",imped:"\u01B5",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",intcal:"\u22BA",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\u{1D55A}",iota:"\u03B9",iquest:"\xBF",iscr:"\u{1D4BE}",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",varkappa:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",lAtail:"\u291B",lBarr:"\u290E",lEg:"\u2A8B",lesseqqgtr:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lambda:"\u03BB",langd:"\u2991",lap:"\u2A85",lessapprox:"\u2A85",laquo:"\xAB",larrbfs:"\u291F",larrfs:"\u291D",larrlp:"\u21AB",looparrowleft:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",leftarrowtail:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lcub:"{",lbrack:"[",lsqb:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lcy:"\u043B",ldca:"\u2936",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leq:"\u2264",leftleftarrows:"\u21C7",llarr:"\u21C7",leftthreetimes:"\u22CB",lthree:"\u22CB",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessdot:"\u22D6",ltdot:"\u22D6",lfisht:"\u297C",lfr:"\u{1D529}",lgE:"\u2A91",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lneqq:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",longmapsto:"\u27FC",xmap:"\u27FC",looparrowright:"\u21AC",rarrlp:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",loz:"\u25CA",lozenge:"\u25CA",lpar:"(",lparlt:"\u2993",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",lsime:"\u2A8D",lsimg:"\u2A8F",lsquor:"\u201A",sbquo:"\u201A",lstrok:"\u0142",ltcc:"\u2AA6",ltcir:"\u2A79",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",triangleleft:"\u25C3",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",strns:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",midcir:"\u2AF0",minus:"\u2212",minusdu:"\u2A2A",mlcp:"\u2ADB",models:"\u22A7",mopf:"\u{1D55E}",mscr:"\u{1D4C2}",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nLeftarrow:"\u21CD",nlArr:"\u21CD",nLeftrightarrow:"\u21CE",nhArr:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nRightarrow:"\u21CF",nrArr:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nacute:"\u0144",nang:"\u2220\u20D2",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",natur:"\u266E",natural:"\u266E",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",neArr:"\u21D7",nearhk:"\u2924",nedot:"\u2250\u0338",nesear:"\u2928",toea:"\u2928",nfr:"\u{1D52B}",nharr:"\u21AE",nleftrightarrow:"\u21AE",nhpar:"\u2AF2",nis:"\u22FC",nisd:"\u22FA",njcy:"\u045A",nlE:"\u2266\u0338",nleqq:"\u2266\u0338",nlarr:"\u219A",nleftarrow:"\u219A",nldr:"\u2025",nopf:"\u{1D55F}",not:"\xAC",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinvb:"\u22F7",notinvc:"\u22F6",notnivb:"\u22FE",notnivc:"\u22FD",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",nrarr:"\u219B",nrightarrow:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nscr:"\u{1D4C3}",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsubseteqq:"\u2AC5\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupseteqq:"\u2AC6\u0338",ntilde:"\xF1",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22AD",nvHarr:"\u2904",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwArr:"\u21D6",nwarhk:"\u2923",nwnear:"\u2927",oacute:"\xF3",ocirc:"\xF4",ocy:"\u043E",odblac:"\u0151",odiv:"\u2A38",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\u{1D52C}",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",olcir:"\u29BE",olcross:"\u29BB",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",oopf:"\u{1D560}",opar:"\u29B7",operp:"\u29B9",or:"\u2228",vee:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",oscr:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",para:"\xB6",parsim:"\u2AF3",parsl:"\u2AFD",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",pertenk:"\u2031",pfr:"\u{1D52D}",phi:"\u03C6",phiv:"\u03D5",straightphi:"\u03D5",varphi:"\u03D5",phone:"\u260E",pi:"\u03C0",piv:"\u03D6",varpi:"\u03D6",planckh:"\u210E",plus:"+",plusacir:"\u2A23",pluscir:"\u2A22",plusdu:"\u2A25",pluse:"\u2A72",plussim:"\u2A26",plustwo:"\u2A27",pointint:"\u2A15",popf:"\u{1D561}",pound:"\xA3",prE:"\u2AB3",prap:"\u2AB7",precapprox:"\u2AB7",precnapprox:"\u2AB9",prnap:"\u2AB9",precneqq:"\u2AB5",prnE:"\u2AB5",precnsim:"\u22E8",prnsim:"\u22E8",prime:"\u2032",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prurel:"\u22B0",pscr:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",quatint:"\u2A16",quest:"?",rAtail:"\u291C",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",raemptyv:"\u29B3",rangd:"\u2992",range:"\u29A5",raquo:"\xBB",rarrap:"\u2975",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rightarrowtail:"\u21A3",rarrw:"\u219D",rightsquigarrow:"\u219D",ratail:"\u291A",ratio:"\u2236",rbbrk:"\u2773",rbrace:"}",rcub:"}",rbrack:"]",rsqb:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdsh:"\u21B3",rect:"\u25AD",rfisht:"\u297D",rfr:"\u{1D52F}",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",varrho:"\u03F1",rightrightarrows:"\u21C9",rrarr:"\u21C9",rightthreetimes:"\u22CC",rthree:"\u22CC",ring:"\u02DA",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",ropar:"\u2986",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rsaquo:"\u203A",rscr:"\u{1D4C7}",rtimes:"\u22CA",rtri:"\u25B9",triangleright:"\u25B9",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",scE:"\u2AB4",scap:"\u2AB8",succapprox:"\u2AB8",scaron:"\u0161",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",succneqq:"\u2AB6",scnap:"\u2ABA",succnapprox:"\u2ABA",scnsim:"\u22E9",succnsim:"\u22E9",scpolint:"\u2A13",scy:"\u0441",sdot:"\u22C5",sdote:"\u2A66",seArr:"\u21D8",sect:"\xA7",semi:";",seswar:"\u2929",tosa:"\u2929",sext:"\u2736",sfr:"\u{1D530}",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",varsigma:"\u03C2",simdot:"\u2A6A",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",smashp:"\u2A33",smeparsl:"\u29E4",smile:"\u2323",ssmile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",sqcaps:"\u2293\uFE00",sqcups:"\u2294\uFE00",sscr:"\u{1D4C8}",star:"\u2606",sub:"\u2282",subset:"\u2282",subE:"\u2AC5",subseteqq:"\u2AC5",subdot:"\u2ABD",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subsetneqq:"\u2ACB",subne:"\u228A",subsetneq:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supE:"\u2AC6",supseteqq:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supsetneqq:"\u2ACC",supne:"\u228B",supsetneq:"\u228B",supplus:"\u2AC0",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",telrec:"\u2315",tfr:"\u{1D531}",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",vartheta:"\u03D1",thorn:"\xFE",times:"\xD7",timesbar:"\u2A31",timesd:"\u2A30",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",topfork:"\u2ADA",tprime:"\u2034",triangle:"\u25B5",utri:"\u25B5",triangleq:"\u225C",trie:"\u225C",tridot:"\u25EC",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",uHar:"\u2963",uacute:"\xFA",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udblac:"\u0171",ufisht:"\u297E",ufr:"\u{1D532}",ugrave:"\xF9",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uogon:"\u0173",uopf:"\u{1D566}",upsi:"\u03C5",upsilon:"\u03C5",upuparrows:"\u21C8",uuarr:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\u{1D4CA}",utdot:"\u22F0",utilde:"\u0169",uuml:"\xFC",uwangle:"\u29A7",vBar:"\u2AE8",vBarv:"\u2AE9",vangrt:"\u299C",varsubsetneq:"\u228A\uFE00",vsubne:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",vsubnE:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",vsupne:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vsupnE:"\u2ACC\uFE00",vcy:"\u0432",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",vfr:"\u{1D533}",vopf:"\u{1D567}",vscr:"\u{1D4CB}",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedgeq:"\u2259",weierp:"\u2118",wp:"\u2118",wfr:"\u{1D534}",wopf:"\u{1D568}",wscr:"\u{1D4CC}",xfr:"\u{1D535}",xi:"\u03BE",xnis:"\u22FB",xopf:"\u{1D569}",xscr:"\u{1D4CD}",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"},Xa="\uE500";Ve.ngsp=Xa;var Ja=[/@/,/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function $s(t,e){if(e!=null&&!(Array.isArray(e)&&e.length==2))throw new Error(`Expected '${t}' to be an array, [start, end].`);if(e!=null){let r=e[0],n=e[1];Ja.forEach(s=>{if(s.test(r)||s.test(n))throw new Error(`['${r}', '${n}'] contains unusable interpolation symbol.`)})}}var Rr=class t{static fromArray(e){return e?($s("interpolation",e),new t(e[0],e[1])):$r}constructor(e,r){this.start=e,this.end=r}},$r=new Rr("{{","}}");var gt=class extends Oe{constructor(e,r,n){super(n,e),this.tokenType=r}},Vr=class{constructor(e,r,n){this.tokens=e,this.errors=r,this.nonNormalizedIcuExpressions=n}};function Qs(t,e,r,n={}){let s=new Ur(new De(t,e),r,n);return s.tokenize(),new Vr(wo(s.tokens),s.errors,s.nonNormalizedIcuExpressions)}var So=/\r\n?/g;function Ue(t){return`Unexpected character "${t===0?"EOF":String.fromCharCode(t)}"`}function Vs(t){return`Unknown entity "${t}" - use the "&#;" or "&#x;" syntax`}function _o(t,e){return`Unable to parse entity "${e}" - ${t} character reference entities must end with ";"`}var tr;(function(t){t.HEX="hexadecimal",t.DEC="decimal"})(tr||(tr={}));var Ct=class{constructor(e){this.error=e}},Ur=class{constructor(e,r,n){this._getTagContentType=r,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this._fullNameStack=[],this.tokens=[],this.errors=[],this.nonNormalizedIcuExpressions=[],this._tokenizeIcu=n.tokenizeExpansionForms||!1,this._interpolationConfig=n.interpolationConfig||$r,this._leadingTriviaCodePoints=n.leadingTriviaChars&&n.leadingTriviaChars.map(i=>i.codePointAt(0)||0),this._canSelfClose=n.canSelfClose||!1,this._allowHtmComponentClosingTags=n.allowHtmComponentClosingTags||!1;let s=n.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=n.escapedString?new Wr(e,s):new rr(e,s),this._preserveLineEndings=n.preserveLineEndings||!1,this._i18nNormalizeLineEndingsInICUs=n.i18nNormalizeLineEndingsInICUs||!1,this._tokenizeBlocks=n.tokenizeBlocks??!0,this._tokenizeLet=n.tokenizeLet??!0;try{this._cursor.init()}catch(i){this.handleError(i)}}_processCarriageReturns(e){return this._preserveLineEndings?e:e.replace(So,` +`)}tokenize(){for(;this._cursor.peek()!==0;){let e=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(47))this._consumeTagClose(e);else{let r=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=r,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeLet&&this._cursor.peek()===64&&!this._inInterpolation&&this._attemptStr("@let")?this._consumeLetDeclaration(e):this._tokenizeBlocks&&this._attemptCharCode(64)?this._consumeBlockStart(e):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(r){this.handleError(r)}}this._beginToken(34),this._endToken([])}_getBlockName(){let e=!1,r=this._cursor.clone();return this._attemptCharCodeUntilFn(n=>ut(n)?!e:zs(n)?(e=!0,!1):!0),this._cursor.getChars(r).trim()}_consumeBlockStart(e){this._beginToken(25,e);let r=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(b),this._attemptCharCode(41))this._attemptCharCodeUntilFn(b);else{r.type=29;return}this._attemptCharCode(123)?(this._beginToken(26),this._endToken([])):r.type=29}_consumeBlockEnd(e){this._beginToken(27,e),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(Gs);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(28);let e=this._cursor.clone(),r=null,n=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||r!==null;){let s=this._cursor.peek();if(s===92)this._cursor.advance();else if(s===r)r=null;else if(r===null&&$t(s))r=s;else if(s===40&&r===null)n++;else if(s===41&&r===null){if(n===0)break;n>0&&n--}this._cursor.advance()}this._endToken([this._cursor.getChars(e)]),this._attemptCharCodeUntilFn(Gs)}}_consumeLetDeclaration(e){if(this._beginToken(30,e),ut(this._cursor.peek()))this._attemptCharCodeUntilFn(b);else{let s=this._endToken([this._cursor.getChars(e)]);s.type=33;return}let r=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(b),!this._attemptCharCode(61)){r.type=33;return}this._attemptCharCodeUntilFn(s=>b(s)&&!Rt(s)),this._consumeLetDeclarationValue(),this._cursor.peek()===59?(this._beginToken(32),this._endToken([]),this._cursor.advance()):(r.type=33,r.sourceSpan=this._cursor.getSpan(e))}_getLetDeclarationName(){let e=this._cursor.clone(),r=!1;return this._attemptCharCodeUntilFn(n=>lt(n)||n===36||n===95||r&&It(n)?(r=!0,!1):!0),this._cursor.getChars(e).trim()}_consumeLetDeclarationValue(){let e=this._cursor.clone();for(this._beginToken(31,e);this._cursor.peek()!==0;){let r=this._cursor.peek();if(r===59)break;$t(r)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(n=>n===92?(this._cursor.advance(),!1):n===r)),this._cursor.advance()}this._endToken([this._cursor.getChars(e)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(vo(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,r=this._cursor.clone()){this._currentTokenStart=r,this._currentTokenType=e}_endToken(e,r){if(this._currentTokenStart===null)throw new gt("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(r));if(this._currentTokenType===null)throw new gt("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));let n={type:this._currentTokenType,parts:e,sourceSpan:(r??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n}_createError(e,r){this._isInExpansionForm()&&(e+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let n=new gt(e,this._currentTokenType,r);return this._currentTokenStart=null,this._currentTokenType=null,new Ct(n)}handleError(e){if(e instanceof St&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),e instanceof Ct)this.errors.push(e.error);else throw e}_attemptCharCode(e){return this._cursor.peek()===e?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(e){return yo(this._cursor.peek(),e)?(this._cursor.advance(),!0):!1}_requireCharCode(e){let r=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(Ue(this._cursor.peek()),this._cursor.getSpan(r))}_attemptStr(e){let r=e.length;if(this._cursor.charsLeft()this._attemptStr("-->")),this._beginToken(11),this._requireStr("-->"),this._endToken([])}_consumeBogusComment(e){this._beginToken(10,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(11),this._cursor.advance(),this._endToken([])}_consumeCdata(e){this._beginToken(12,e),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(13),this._requireStr("]]>"),this._endToken([])}_consumeDocType(e){this._beginToken(18,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(19),this._cursor.advance(),this._endToken([])}_consumePrefixAndName(){let e=this._cursor.clone(),r="";for(;this._cursor.peek()!==58&&!Eo(this._cursor.peek());)this._cursor.advance();let n;this._cursor.peek()===58?(r=this._cursor.getChars(e),this._cursor.advance(),n=this._cursor.clone()):n=e,this._requireCharCodeUntilFn(Us,r===""?0:1);let s=this._cursor.getChars(n);return[r,s]}_consumeTagOpen(e){let r,n,s,i=[];try{if(!lt(this._cursor.peek()))throw this._createError(Ue(this._cursor.peek()),this._cursor.getSpan(e));for(s=this._consumeTagOpenStart(e),n=s.parts[0],r=s.parts[1],this._attemptCharCodeUntilFn(b);this._cursor.peek()!==47&&this._cursor.peek()!==62&&this._cursor.peek()!==60&&this._cursor.peek()!==0;){let[o,u]=this._consumeAttributeName();if(this._attemptCharCodeUntilFn(b),this._attemptCharCode(61)){this._attemptCharCodeUntilFn(b);let p=this._consumeAttributeValue();i.push({prefix:o,name:u,value:p})}else i.push({prefix:o,name:u});this._attemptCharCodeUntilFn(b)}this._consumeTagOpenEnd()}catch(o){if(o instanceof Ct){s?s.type=4:(this._beginToken(5,e),this._endToken(["<"]));return}throw o}if(this._canSelfClose&&this.tokens[this.tokens.length-1].type===2)return;let a=this._getTagContentType(r,n,this._fullNameStack.length>0,i);this._handleFullNameStackForTagOpen(n,r),a===P.RAW_TEXT?this._consumeRawTextWithTagClose(n,r,!1):a===P.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(n,r,!0)}_consumeRawTextWithTagClose(e,r,n){this._consumeRawText(n,()=>!this._attemptCharCode(60)||!this._attemptCharCode(47)||(this._attemptCharCodeUntilFn(b),!this._attemptStrCaseInsensitive(e?`${e}:${r}`:r))?!1:(this._attemptCharCodeUntilFn(b),this._attemptCharCode(62))),this._beginToken(3),this._requireCharCodeUntilFn(s=>s===62,3),this._cursor.advance(),this._endToken([e,r]),this._handleFullNameStackForTagClose(e,r)}_consumeTagOpenStart(e){this._beginToken(0,e);let r=this._consumePrefixAndName();return this._endToken(r)}_consumeAttributeName(){let e=this._cursor.peek();if(e===39||e===34)throw this._createError(Ue(e),this._cursor.getSpan());this._beginToken(14);let r=this._consumePrefixAndName();return this._endToken(r),r}_consumeAttributeValue(){let e;if(this._cursor.peek()===39||this._cursor.peek()===34){let r=this._cursor.peek();this._consumeQuote(r);let n=()=>this._cursor.peek()===r;e=this._consumeWithInterpolation(16,17,n,n),this._consumeQuote(r)}else{let r=()=>Us(this._cursor.peek());e=this._consumeWithInterpolation(16,17,r,r)}return e}_consumeQuote(e){this._beginToken(15),this._requireCharCode(e),this._endToken([String.fromCodePoint(e)])}_consumeTagOpenEnd(){let e=this._attemptCharCode(47)?2:1;this._beginToken(e),this._requireCharCode(62),this._endToken([])}_consumeTagClose(e){if(this._beginToken(3,e),this._attemptCharCodeUntilFn(b),this._allowHtmComponentClosingTags&&this._attemptCharCode(47))this._attemptCharCodeUntilFn(b),this._requireCharCode(62),this._endToken([]);else{let[r,n]=this._consumePrefixAndName();this._attemptCharCodeUntilFn(b),this._requireCharCode(62),this._endToken([r,n]),this._handleFullNameStackForTagClose(r,n)}}_consumeExpansionFormStart(){this._beginToken(20),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(20),this._beginToken(7);let e=this._readUntil(44),r=this._processCarriageReturns(e);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([r]);else{let s=this._endToken([e]);r!==e&&this.nonNormalizedIcuExpressions.push(s)}this._requireCharCode(44),this._attemptCharCodeUntilFn(b),this._beginToken(7);let n=this._readUntil(44);this._endToken([n]),this._requireCharCode(44),this._attemptCharCodeUntilFn(b)}_consumeExpansionCaseStart(){this._beginToken(21);let e=this._readUntil(123).trim();this._endToken([e]),this._attemptCharCodeUntilFn(b),this._beginToken(22),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(b),this._expansionCaseStack.push(22)}_consumeExpansionCaseEnd(){this._beginToken(23),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(b),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(24),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(e,r,n,s){this._beginToken(e);let i=[];for(;!n();){let o=this._cursor.clone();this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(this._endToken([this._processCarriageReturns(i.join(""))],o),i.length=0,this._consumeInterpolation(r,o,s),this._beginToken(e)):this._cursor.peek()===38?(this._endToken([this._processCarriageReturns(i.join(""))]),i.length=0,this._consumeEntity(e),this._beginToken(e)):i.push(this._readChar())}this._inInterpolation=!1;let a=this._processCarriageReturns(i.join(""));return this._endToken([a]),a}_consumeInterpolation(e,r,n){let s=[];this._beginToken(e,r),s.push(this._interpolationConfig.start);let i=this._cursor.clone(),a=null,o=!1;for(;this._cursor.peek()!==0&&(n===null||!n());){let u=this._cursor.clone();if(this._isTagStart()){this._cursor=u,s.push(this._getProcessedChars(i,u)),this._endToken(s);return}if(a===null)if(this._attemptStr(this._interpolationConfig.end)){s.push(this._getProcessedChars(i,u)),s.push(this._interpolationConfig.end),this._endToken(s);return}else this._attemptStr("//")&&(o=!0);let p=this._cursor.peek();this._cursor.advance(),p===92?this._cursor.advance():p===a?a=null:!o&&a===null&&$t(p)&&(a=p)}s.push(this._getProcessedChars(i,this._cursor)),this._endToken(s)}_getProcessedChars(e,r){return this._processCarriageReturns(r.getChars(e))}_isTextEnd(){return!!(this._isTagStart()||this._cursor.peek()===0||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===125&&this._isInExpansionCase())||this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansion()&&(this._isBlockStart()||this._cursor.peek()===64||this._cursor.peek()===125))}_isTagStart(){if(this._cursor.peek()===60){let e=this._cursor.clone();e.advance();let r=e.peek();if(97<=r&&r<=122||65<=r&&r<=90||r===47||r===33)return!0}return!1}_isBlockStart(){if(this._tokenizeBlocks&&this._cursor.peek()===64){let e=this._cursor.clone();if(e.advance(),zs(e.peek()))return!0}return!1}_readUntil(e){let r=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(r)}_isInExpansion(){return this._isInExpansionCase()||this._isInExpansionForm()}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===22}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===20}isExpansionFormStart(){if(this._cursor.peek()!==123)return!1;if(this._interpolationConfig){let e=this._cursor.clone(),r=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!r}return!0}_handleFullNameStackForTagOpen(e,r){let n=qe(e,r);(this._fullNameStack.length===0||this._fullNameStack[this._fullNameStack.length-1]===n)&&this._fullNameStack.push(n)}_handleFullNameStackForTagClose(e,r){let n=qe(e,r);this._fullNameStack.length!==0&&this._fullNameStack[this._fullNameStack.length-1]===n&&this._fullNameStack.pop()}};function b(t){return!ut(t)||t===0}function Us(t){return ut(t)||t===62||t===60||t===47||t===39||t===34||t===61||t===0}function Eo(t){return(t<97||12257)}function Ao(t){return t===59||t===0||!vs(t)}function Do(t){return t===59||t===0||!lt(t)}function vo(t){return t!==125}function yo(t,e){return Ws(t)===Ws(e)}function Ws(t){return t>=97&&t<=122?t-97+65:t}function zs(t){return lt(t)||It(t)||t===95}function Gs(t){return t!==59&&b(t)}function wo(t){let e=[],r;for(let n=0;n0&&r.indexOf(e.peek())!==-1;)n===e&&(e=e.clone()),e.advance();let s=this.locationFromCursor(e),i=this.locationFromCursor(this),a=n!==e?this.locationFromCursor(n):s;return new h(s,i,a)}getChars(e){return this.input.substring(e.state.offset,this.state.offset)}charAt(e){return this.input.charCodeAt(e)}advanceState(e){if(e.offset>=this.end)throw this.state=e,new St('Unexpected character "EOF"',this);let r=this.charAt(e.offset);r===10?(e.line++,e.column=0):Rt(r)||e.column++,e.offset++,this.updatePeek(e)}updatePeek(e){e.peek=e.offset>=this.end?0:this.charAt(e.offset)}locationFromCursor(e){return new ie(e.file,e.state.offset,e.state.line,e.state.column)}},Wr=class t extends rr{constructor(e,r){e instanceof t?(super(e),this.internalState={...e.internalState}):(super(e,r),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new t(this)}getChars(e){let r=e.clone(),n="";for(;r.internalState.offsetthis.internalState.peek;if(e()===92)if(this.internalState={...this.state},this.advanceState(this.internalState),e()===110)this.state.peek=10;else if(e()===114)this.state.peek=13;else if(e()===118)this.state.peek=11;else if(e()===116)this.state.peek=9;else if(e()===98)this.state.peek=8;else if(e()===102)this.state.peek=12;else if(e()===117)if(this.advanceState(this.internalState),e()===123){this.advanceState(this.internalState);let r=this.clone(),n=0;for(;e()!==125;)this.advanceState(this.internalState),n++;this.state.peek=this.decodeHexDigits(r,n)}else{let r=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(r,4)}else if(e()===120){this.advanceState(this.internalState);let r=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(r,2)}else if(kr(e())){let r="",n=0,s=this.clone();for(;kr(e())&&n<3;)s=this.clone(),r+=String.fromCodePoint(e()),this.advanceState(this.internalState),n++;this.state.peek=parseInt(r,8),this.internalState=s.internalState}else Rt(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(e,r){let n=this.input.slice(e.internalState.offset,e.internalState.offset+r),s=parseInt(n,16);if(isNaN(s))throw e.state=e.internalState,new St("Invalid hexadecimal escape sequence",e);return s}},St=class{constructor(e,r){this.msg=e,this.cursor=r}};var L=class t extends Oe{static create(e,r,n){return new t(e,r,n)}constructor(e,r,n){super(r,n),this.elementName=e}},Yr=class{constructor(e,r){this.rootNodes=e,this.errors=r}},nr=class{constructor(e){this.getTagDefinition=e}parse(e,r,n,s=!1,i){let a=D=>(I,...F)=>D(I.toLowerCase(),...F),o=s?this.getTagDefinition:a(this.getTagDefinition),u=D=>o(D).getContentType(),p=s?i:a(i),f=Qs(e,r,i?(D,I,F,c)=>{let g=p(D,I,F,c);return g!==void 0?g:u(D)}:u,n),d=n&&n.canSelfClose||!1,C=n&&n.allowHtmComponentClosingTags||!1,A=new jr(f.tokens,o,d,C,s);return A.build(),new Yr(A.rootNodes,f.errors.concat(A.errors))}},jr=class t{constructor(e,r,n,s,i){this.tokens=e,this.getTagDefinition=r,this.canSelfClose=n,this.allowHtmComponentClosingTags=s,this.isTagNameCaseSensitive=i,this._index=-1,this._containerStack=[],this.rootNodes=[],this.errors=[],this._advance()}build(){for(;this._peek.type!==34;)this._peek.type===0||this._peek.type===4?this._consumeStartTag(this._advance()):this._peek.type===3?(this._closeVoidElement(),this._consumeEndTag(this._advance())):this._peek.type===12?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===10?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===5||this._peek.type===7||this._peek.type===6?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===20?this._consumeExpansion(this._advance()):this._peek.type===25?(this._closeVoidElement(),this._consumeBlockOpen(this._advance())):this._peek.type===27?(this._closeVoidElement(),this._consumeBlockClose(this._advance())):this._peek.type===29?(this._closeVoidElement(),this._consumeIncompleteBlock(this._advance())):this._peek.type===30?(this._closeVoidElement(),this._consumeLet(this._advance())):this._peek.type===18?this._consumeDocType(this._advance()):this._peek.type===33?(this._closeVoidElement(),this._consumeIncompleteLet(this._advance())):this._advance();for(let e of this._containerStack)e instanceof te&&this.errors.push(L.create(e.name,e.sourceSpan,`Unclosed block "${e.name}"`))}_advance(){let e=this._peek;return this._index0)return this.errors=this.errors.concat(i.errors),null;let a=new h(e.sourceSpan.start,s.sourceSpan.end,e.sourceSpan.fullStart),o=new h(r.sourceSpan.start,s.sourceSpan.end,r.sourceSpan.fullStart);return new Gt(e.parts[0],i.rootNodes,a,e.sourceSpan,o)}_collectExpansionExpTokens(e){let r=[],n=[22];for(;;){if((this._peek.type===20||this._peek.type===22)&&n.push(this._peek.type),this._peek.type===23)if(Xs(n,22)){if(n.pop(),n.length===0)return r}else return this.errors.push(L.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===24)if(Xs(n,20))n.pop();else return this.errors.push(L.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===34)return this.errors.push(L.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;r.push(this._advance())}}_getText(e){let r=e.parts[0];if(r.length>0&&r[0]==` +`){let n=this._getClosestParentElement();n!=null&&n.children.length==0&&this.getTagDefinition(n.name).ignoreFirstLf&&(r=r.substring(1))}return r}_consumeText(e){let r=[e],n=e.sourceSpan,s=e.parts[0];if(s.length>0&&s[0]===` +`){let i=this._getContainer();i!=null&&i.children.length===0&&this.getTagDefinition(i.name).ignoreFirstLf&&(s=s.substring(1),r[0]={type:e.type,sourceSpan:e.sourceSpan,parts:[s]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)e=this._advance(),r.push(e),e.type===8?s+=e.parts.join("").replace(/&([^;]+);/g,Js):e.type===9?s+=e.parts[0]:s+=e.parts.join("");if(s.length>0){let i=e.sourceSpan;this._addToParent(new Ut(s,new h(n.start,i.end,n.fullStart,n.details),r))}}_closeVoidElement(){let e=this._getContainer();e instanceof Y&&this.getTagDefinition(e.name).isVoid&&this._containerStack.pop()}_consumeStartTag(e){let[r,n]=e.parts,s=[];for(;this._peek.type===14;)s.push(this._consumeAttr(this._advance()));let i=this._getElementFullName(r,n,this._getClosestParentElement()),a=!1;if(this._peek.type===2){this._advance(),a=!0;let C=this.getTagDefinition(i);this.canSelfClose||C.canSelfClose||Me(i)!==null||C.isVoid||this.errors.push(L.create(i,e.sourceSpan,`Only void, custom and foreign elements can be self closed "${e.parts[1]}"`))}else this._peek.type===1&&(this._advance(),a=!1);let o=this._peek.sourceSpan.fullStart,u=new h(e.sourceSpan.start,o,e.sourceSpan.fullStart),p=new h(e.sourceSpan.start,o,e.sourceSpan.fullStart),l=new h(e.sourceSpan.start.moveBy(1),e.sourceSpan.end),f=new Y(i,s,[],u,p,void 0,l),d=this._getContainer();this._pushContainer(f,d instanceof Y&&this.getTagDefinition(d.name).isClosedByChild(f.name)),a?this._popContainer(i,Y,u):e.type===4&&(this._popContainer(i,Y,null),this.errors.push(L.create(i,u,`Opening tag "${i}" not terminated.`)))}_pushContainer(e,r){r&&this._containerStack.pop(),this._addToParent(e),this._containerStack.push(e)}_consumeEndTag(e){let r=this.allowHtmComponentClosingTags&&e.parts.length===0?null:this._getElementFullName(e.parts[0],e.parts[1],this._getClosestParentElement());if(r&&this.getTagDefinition(r).isVoid)this.errors.push(L.create(r,e.sourceSpan,`Void elements do not have end tags "${e.parts[1]}"`));else if(!this._popContainer(r,Y,e.sourceSpan)){let n=`Unexpected closing tag "${r}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(L.create(r,e.sourceSpan,n))}}_popContainer(e,r,n){let s=!1;for(let i=this._containerStack.length-1;i>=0;i--){let a=this._containerStack[i];if(Me(a.name)?a.name===e:(e==null||a.name.toLowerCase()===e.toLowerCase())&&a instanceof r)return a.endSourceSpan=n,a.sourceSpan.end=n!==null?n.end:a.sourceSpan.end,this._containerStack.splice(i,this._containerStack.length-i),!s;(a instanceof te||a instanceof Y&&!this.getTagDefinition(a.name).closedByParent)&&(s=!0)}return!1}_consumeAttr(e){let r=qe(e.parts[0],e.parts[1]),n=e.sourceSpan.end,s;this._peek.type===15&&(s=this._advance());let i="",a=[],o,u;if(this._peek.type===16)for(o=this._peek.sourceSpan,u=this._peek.sourceSpan.end;this._peek.type===16||this._peek.type===17||this._peek.type===9;){let f=this._advance();a.push(f),f.type===17?i+=f.parts.join("").replace(/&([^;]+);/g,Js):f.type===9?i+=f.parts[0]:i+=f.parts.join(""),u=n=f.sourceSpan.end}this._peek.type===15&&(u=n=this._advance().sourceSpan.end);let l=o&&u&&new h((s==null?void 0:s.sourceSpan.start)??o.start,u,(s==null?void 0:s.sourceSpan.fullStart)??o.fullStart);return new Yt(r,i,new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),e.sourceSpan,l,a.length>0?a:void 0,void 0)}_consumeBlockOpen(e){let r=[];for(;this._peek.type===28;){let o=this._advance();r.push(new ht(o.parts[0],o.sourceSpan))}this._peek.type===26&&this._advance();let n=this._peek.sourceSpan.fullStart,s=new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),i=new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),a=new te(e.parts[0],r,[],s,e.sourceSpan,i);this._pushContainer(a,!1)}_consumeBlockClose(e){this._popContainer(null,te,e.sourceSpan)||this.errors.push(L.create(null,e.sourceSpan,'Unexpected closing block. The block may have been closed earlier. If you meant to write the } character, you should use the "}" HTML entity instead.'))}_consumeIncompleteBlock(e){let r=[];for(;this._peek.type===28;){let o=this._advance();r.push(new ht(o.parts[0],o.sourceSpan))}let n=this._peek.sourceSpan.fullStart,s=new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),i=new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),a=new te(e.parts[0],r,[],s,e.sourceSpan,i);this._pushContainer(a,!1),this._popContainer(null,te,null),this.errors.push(L.create(e.parts[0],s,`Incomplete block "${e.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`))}_consumeLet(e){let r=e.parts[0],n,s;if(this._peek.type!==31){this.errors.push(L.create(e.parts[0],e.sourceSpan,`Invalid @let declaration "${r}". Declaration must have a value.`));return}else n=this._advance();if(this._peek.type!==32){this.errors.push(L.create(e.parts[0],e.sourceSpan,`Unterminated @let declaration "${r}". Declaration must be terminated with a semicolon.`));return}else s=this._advance();let i=s.sourceSpan.fullStart,a=new h(e.sourceSpan.start,i,e.sourceSpan.fullStart),o=e.sourceSpan.toString().lastIndexOf(r),u=e.sourceSpan.start.moveBy(o),p=new h(u,e.sourceSpan.end),l=new ft(r,n.parts[0],a,p,n.sourceSpan);this._addToParent(l)}_consumeIncompleteLet(e){let r=e.parts[0]??"",n=r?` "${r}"`:"";if(r.length>0){let s=e.sourceSpan.toString().lastIndexOf(r),i=e.sourceSpan.start.moveBy(s),a=new h(i,e.sourceSpan.end),o=new h(e.sourceSpan.start,e.sourceSpan.start.moveBy(0)),u=new ft(r,"",e.sourceSpan,a,o);this._addToParent(u)}this.errors.push(L.create(e.parts[0],e.sourceSpan,`Incomplete @let declaration${n}. @let declarations must be written as \`@let = ;\``))}_getContainer(){return this._containerStack.length>0?this._containerStack[this._containerStack.length-1]:null}_getClosestParentElement(){for(let e=this._containerStack.length-1;e>-1;e--)if(this._containerStack[e]instanceof Y)return this._containerStack[e];return null}_addToParent(e){let r=this._getContainer();r===null?this.rootNodes.push(e):r.children.push(e)}_getElementFullName(e,r,n){if(e===""&&(e=this.getTagDefinition(r).implicitNamespacePrefix||"",e===""&&n!=null)){let s=ct(n.name)[1];this.getTagDefinition(s).preventNamespaceInheritance||(e=Me(n.name))}return qe(e,r)}};function Xs(t,e){return t.length>0&&t[t.length-1]===e}function Js(t,e){return Ve[e]!==void 0?Ve[e]||t:/^#x[a-f0-9]+$/i.test(e)?String.fromCodePoint(parseInt(e.slice(2),16)):/^#\d+$/.test(e)?String.fromCodePoint(parseInt(e.slice(1),10)):t}var sr=class extends nr{constructor(){super(He)}parse(e,r,n,s=!1,i){return super.parse(e,r,n,s,i)}};var Kr=null,bo=()=>(Kr||(Kr=new sr),Kr);function Qr(t,e={}){let{canSelfClose:r=!1,allowHtmComponentClosingTags:n=!1,isTagNameCaseSensitive:s=!1,getTagContentType:i,tokenizeAngularBlocks:a=!1,tokenizeAngularLetDeclaration:o=!1}=e;return bo().parse(t,"angular-html-parser",{tokenizeExpansionForms:a,interpolationConfig:void 0,canSelfClose:r,allowHtmComponentClosingTags:n,tokenizeBlocks:a,tokenizeLet:o},s,i)}function To(t,e){let r=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(r,e)}var Zs=To;var _t=3;function xo(t){let e=t.slice(0,_t);if(e!=="---"&&e!=="+++")return;let r=t.indexOf(` +`,_t);if(r===-1)return;let n=t.slice(_t,r).trim(),s=t.indexOf(` +${e}`,r),i=n;if(i||(i=e==="+++"?"toml":"yaml"),s===-1&&e==="---"&&i==="yaml"&&(s=t.indexOf(` +...`,r)),s===-1)return;let a=s+1+_t,o=t.charAt(a+1);if(!/\s?/u.test(o))return;let u=t.slice(0,a);return{type:"front-matter",language:i,explicitLanguage:n,value:t.slice(r+1,s),startDelimiter:e,endDelimiter:u.slice(-_t),raw:u}}function ko(t){let e=xo(t);if(!e)return{content:t};let{raw:r}=e;return{frontMatter:e,content:w(!1,r,/[^\n]/gu," ")+t.slice(r.length)}}var ei=ko;var ir={attrs:!0,children:!0,cases:!0,expression:!0},ti=new Set(["parent"]),le,Xr,Jr,ze=class ze{constructor(e={}){Et(this,le);lr(this,"type");lr(this,"parent");for(let r of new Set([...ti,...Object.keys(e)]))this.setProperty(r,e[r])}setProperty(e,r){if(this[e]!==r){if(e in ir&&(r=r.map(n=>this.createChild(n))),!ti.has(e)){this[e]=r;return}Object.defineProperty(this,e,{value:r,enumerable:!1,configurable:!0})}}map(e){let r;for(let n in ir){let s=this[n];if(s){let i=Bo(s,a=>a.map(e));r!==s&&(r||(r=new ze({parent:this.parent})),r.setProperty(n,i))}}if(r)for(let n in this)n in ir||(r[n]=this[n]);return e(r||this)}walk(e){for(let r in ir){let n=this[r];if(n)for(let s=0;s[e.fullName,e.value]))}};le=new WeakSet,Xr=function(){return this.type==="angularIcuCase"?"expression":this.type==="angularIcuExpression"?"cases":"children"},Jr=function(){var e;return((e=this.parent)==null?void 0:e.$children)??[]};var ar=ze;function Bo(t,e){let r=t.map(e);return r.some((n,s)=>n!==t[s])?r:t}var Lo=[{regex:/^(\[if([^\]]*)\]>)(.*?){try{return[!0,e(i,o).children]}catch{return[!1,[{type:"text",value:i,sourceSpan:new h(o,u)}]]}})();return{type:"ieConditionalComment",complete:p,children:l,condition:w(!1,s.trim(),/\s+/gu," "),sourceSpan:t.sourceSpan,startSourceSpan:new h(t.sourceSpan.start,o),endSourceSpan:new h(u,t.sourceSpan.end)}}function No(t,e,r){let[,n]=r;return{type:"ieConditionalStartComment",condition:w(!1,n.trim(),/\s+/gu," "),sourceSpan:t.sourceSpan}}function Po(t){return{type:"ieConditionalEndComment",sourceSpan:t.sourceSpan}}var or=new Map([["*",new Set(["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inert","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","popover","slot","spellcheck","style","tabindex","title","translate","writingsuggestions"])],["a",new Set(["charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","target","type"])],["applet",new Set(["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"])],["area",new Set(["alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","target","type"])],["audio",new Set(["autoplay","controls","crossorigin","loop","muted","preload","src"])],["base",new Set(["href","target"])],["basefont",new Set(["color","face","size"])],["blockquote",new Set(["cite"])],["body",new Set(["alink","background","bgcolor","link","text","vlink"])],["br",new Set(["clear"])],["button",new Set(["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","popovertarget","popovertargetaction","type","value"])],["canvas",new Set(["height","width"])],["caption",new Set(["align"])],["col",new Set(["align","char","charoff","span","valign","width"])],["colgroup",new Set(["align","char","charoff","span","valign","width"])],["data",new Set(["value"])],["del",new Set(["cite","datetime"])],["details",new Set(["name","open"])],["dialog",new Set(["open"])],["dir",new Set(["compact"])],["div",new Set(["align"])],["dl",new Set(["compact"])],["embed",new Set(["height","src","type","width"])],["fieldset",new Set(["disabled","form","name"])],["font",new Set(["color","face","size"])],["form",new Set(["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"])],["frame",new Set(["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"])],["frameset",new Set(["cols","rows"])],["h1",new Set(["align"])],["h2",new Set(["align"])],["h3",new Set(["align"])],["h4",new Set(["align"])],["h5",new Set(["align"])],["h6",new Set(["align"])],["head",new Set(["profile"])],["hr",new Set(["align","noshade","size","width"])],["html",new Set(["manifest","version"])],["iframe",new Set(["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","loading","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"])],["img",new Set(["align","alt","border","crossorigin","decoding","fetchpriority","height","hspace","ismap","loading","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"])],["input",new Set(["accept","align","alt","autocomplete","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","popovertarget","popovertargetaction","readonly","required","size","src","step","type","usemap","value","width"])],["ins",new Set(["cite","datetime"])],["isindex",new Set(["prompt"])],["label",new Set(["for","form"])],["legend",new Set(["align"])],["li",new Set(["type","value"])],["link",new Set(["as","blocking","charset","color","crossorigin","disabled","fetchpriority","href","hreflang","imagesizes","imagesrcset","integrity","media","referrerpolicy","rel","rev","sizes","target","type"])],["map",new Set(["name"])],["menu",new Set(["compact"])],["meta",new Set(["charset","content","http-equiv","media","name","scheme"])],["meter",new Set(["high","low","max","min","optimum","value"])],["object",new Set(["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","type","typemustmatch","usemap","vspace","width"])],["ol",new Set(["compact","reversed","start","type"])],["optgroup",new Set(["disabled","label"])],["option",new Set(["disabled","label","selected","value"])],["output",new Set(["for","form","name"])],["p",new Set(["align"])],["param",new Set(["name","type","value","valuetype"])],["pre",new Set(["width"])],["progress",new Set(["max","value"])],["q",new Set(["cite"])],["script",new Set(["async","blocking","charset","crossorigin","defer","fetchpriority","integrity","language","nomodule","referrerpolicy","src","type"])],["select",new Set(["autocomplete","disabled","form","multiple","name","required","size"])],["slot",new Set(["name"])],["source",new Set(["height","media","sizes","src","srcset","type","width"])],["style",new Set(["blocking","media","type"])],["table",new Set(["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"])],["tbody",new Set(["align","char","charoff","valign"])],["td",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["template",new Set(["shadowrootclonable","shadowrootdelegatesfocus","shadowrootmode"])],["textarea",new Set(["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","wrap"])],["tfoot",new Set(["align","char","charoff","valign"])],["th",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["thead",new Set(["align","char","charoff","valign"])],["time",new Set(["datetime"])],["tr",new Set(["align","bgcolor","char","charoff","valign"])],["track",new Set(["default","kind","label","src","srclang"])],["ul",new Set(["compact","type"])],["video",new Set(["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"])]]);var ni=new Set(["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"]);function Io(t){if(t.type==="block"){if(t.name=w(!1,t.name.toLowerCase(),/\s+/gu," ").trim(),t.type="angularControlFlowBlock",!Ie(t.parameters)){delete t.parameters;return}for(let e of t.parameters)e.type="angularControlFlowBlockParameter";t.parameters={type:"angularControlFlowBlockParameters",children:t.parameters,sourceSpan:new h(t.parameters[0].sourceSpan.start,K(!1,t.parameters,-1).sourceSpan.end)}}}function Ro(t){t.type==="letDeclaration"&&(t.type="angularLetDeclaration",t.id=t.name,t.init={type:"angularLetDeclarationInitializer",sourceSpan:new h(t.valueSpan.start,t.valueSpan.end),value:t.value},delete t.name,delete t.value)}function $o(t){(t.type==="plural"||t.type==="select")&&(t.clause=t.type,t.type="angularIcuExpression"),t.type==="expansionCase"&&(t.type="angularIcuCase")}function ii(t,e,r){let{name:n,canSelfClose:s=!0,normalizeTagName:i=!1,normalizeAttributeName:a=!1,allowHtmComponentClosingTags:o=!1,isTagNameCaseSensitive:u=!1,shouldParseAsRawText:p}=e,{rootNodes:l,errors:f}=Qr(t,{canSelfClose:s,allowHtmComponentClosingTags:o,isTagNameCaseSensitive:u,getTagContentType:p?(...c)=>p(...c)?P.RAW_TEXT:void 0:void 0,tokenizeAngularBlocks:n==="angular"?!0:void 0,tokenizeAngularLetDeclaration:n==="angular"?!0:void 0});if(n==="vue"){if(l.some(x=>x.type==="docType"&&x.value==="html"||x.type==="element"&&x.name.toLowerCase()==="html"))return ii(t,oi,r);let g,y=()=>g??(g=Qr(t,{canSelfClose:s,allowHtmComponentClosingTags:o,isTagNameCaseSensitive:u})),q=x=>y().rootNodes.find(({startSourceSpan:U})=>U&&U.start.offset===x.startSourceSpan.start.offset)??x;for(let[x,U]of l.entries()){let{endSourceSpan:tn,startSourceSpan:ui}=U;if(tn===null)f=y().errors,l[x]=q(U);else if(Oo(U,r)){let rn=y().errors.find(nn=>nn.span.start.offset>ui.start.offset&&nn.span.start.offset0&&si(f[0]);let d=c=>{let g=c.name.startsWith(":")?c.name.slice(1).split(":")[0]:null,y=c.nameSpan.toString(),q=g!==null&&y.startsWith(`${g}:`),x=q?y.slice(g.length+1):y;c.name=x,c.namespace=g,c.hasExplicitNamespace=q},C=c=>{switch(c.type){case"element":d(c);for(let g of c.attrs)d(g),g.valueSpan?(g.value=g.valueSpan.toString(),/["']/u.test(g.value[0])&&(g.value=g.value.slice(1,-1))):g.value=null;break;case"comment":c.value=c.sourceSpan.toString().slice(4,-3);break;case"text":c.value=c.sourceSpan.toString();break}},A=(c,g)=>{let y=c.toLowerCase();return g(y)?y:c},D=c=>{if(c.type==="element"&&(i&&(!c.namespace||c.namespace===c.tagDefinition.implicitNamespacePrefix||fe(c))&&(c.name=A(c.name,g=>ni.has(g))),a))for(let g of c.attrs)g.namespace||(g.name=A(g.name,y=>or.has(c.name)&&(or.get("*").has(y)||or.get(c.name).has(y))))},I=c=>{c.sourceSpan&&c.endSourceSpan&&(c.sourceSpan=new h(c.sourceSpan.start,c.endSourceSpan.end))},F=c=>{if(c.type==="element"){let g=He(u?c.name:c.name.toLowerCase());!c.namespace||c.namespace===g.implicitNamespacePrefix||fe(c)?c.tagDefinition=g:c.tagDefinition=He("")}};return Qt(new class extends mt{visitExpansionCase(c,g){n==="angular"&&this.visitChildren(g,y=>{y(c.expression)})}visit(c){C(c),F(c),D(c),I(c)}},l),l}function Oo(t,e){var n;if(t.type!=="element"||t.name!=="template")return!1;let r=(n=t.attrs.find(s=>s.name==="lang"))==null?void 0:n.value;return!r||Ne(e,{language:r})==="html"}function si(t){let{msg:e,span:{start:r,end:n}}=t;throw Zs(e,{loc:{start:{line:r.line+1,column:r.col+1},end:{line:n.line+1,column:n.col+1}},cause:t})}function ai(t,e,r={},n=!0){let{frontMatter:s,content:i}=n?ei(t):{frontMatter:null,content:t},a=new De(t,r.filepath),o=new ie(a,0,0,0),u=o.moveBy(t.length),p={type:"root",sourceSpan:new h(o,u),children:ii(i,e,r)};if(s){let d=new ie(a,0,0,0),C=d.moveBy(s.raw.length);s.sourceSpan=new h(d,C),p.children.unshift(s)}let l=new ar(p),f=(d,C)=>{let{offset:A}=C,D=w(!1,t.slice(0,A),/[^\n\r]/gu," "),F=ai(D+d,e,r,!1);F.sourceSpan=new h(C,K(!1,F.children,-1).sourceSpan.end);let c=F.children[0];return c.length===A?F.children.shift():(c.sourceSpan=new h(c.sourceSpan.start.moveBy(A),c.sourceSpan.end),c.value=c.value.slice(A)),F};return l.walk(d=>{if(d.type==="comment"){let C=ri(d,f);C&&d.parent.replaceChild(d,C)}Io(d),Ro(d),$o(d)}),l}function ur(t){return{parse:(e,r)=>ai(e,t,r),hasPragma:fs,astFormat:"html",locStart:J,locEnd:Z}}var oi={name:"html",normalizeTagName:!0,normalizeAttributeName:!0,allowHtmComponentClosingTags:!0},Mo=ur(oi),qo=ur({name:"angular"}),Ho=ur({name:"vue",isTagNameCaseSensitive:!0,shouldParseAsRawText(t,e,r,n){return t.toLowerCase()!=="html"&&!r&&(t!=="template"||n.some(({name:s,value:i})=>s==="lang"&&i!=="html"&&i!==""&&i!==void 0))}}),Vo=ur({name:"lwc",canSelfClose:!1});var Uo={html:Ts};var Gh=en;export{Gh as default,xs as languages,Bs as options,Zr as parsers,Uo as printers}; diff --git a/node_modules/prettier/plugins/markdown.d.ts b/node_modules/prettier/plugins/markdown.d.ts new file mode 100644 index 0000000..8a82214 --- /dev/null +++ b/node_modules/prettier/plugins/markdown.d.ts @@ -0,0 +1,7 @@ +import { Parser } from "../index.js"; + +export declare const parsers: { + markdown: Parser; + mdx: Parser; + remark: Parser; +}; diff --git a/node_modules/prettier/plugins/markdown.js b/node_modules/prettier/plugins/markdown.js new file mode 100644 index 0000000..924b89b --- /dev/null +++ b/node_modules/prettier/plugins/markdown.js @@ -0,0 +1,63 @@ +(function(n){function e(){var i=n();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.markdown=e()}})(function(){"use strict";var ll=Object.create;var kr=Object.defineProperty;var fl=Object.getOwnPropertyDescriptor;var Dl=Object.getOwnPropertyNames;var pl=Object.getPrototypeOf,hl=Object.prototype.hasOwnProperty;var zn=e=>{throw TypeError(e)};var C=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Yn=(e,r)=>{for(var t in r)kr(e,t,{get:r[t],enumerable:!0})},Gn=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of Dl(r))!hl.call(e,a)&&a!==t&&kr(e,a,{get:()=>r[a],enumerable:!(n=fl(r,a))||n.enumerable});return e};var Ue=(e,r,t)=>(t=e!=null?ll(pl(e)):{},Gn(r||!e||!e.__esModule?kr(t,"default",{value:e,enumerable:!0}):t,e)),dl=e=>Gn(kr({},"__esModule",{value:!0}),e);var Vn=(e,r,t)=>r.has(e)||zn("Cannot "+t);var ce=(e,r,t)=>(Vn(e,r,"read from private field"),t?t.call(e):r.get(e)),jn=(e,r,t)=>r.has(e)?zn("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,t),$n=(e,r,t,n)=>(Vn(e,r,"write to private field"),n?n.call(e,t):r.set(e,t),t);var Br=C((Vm,Wn)=>{"use strict";Wn.exports=gl;function gl(e){return String(e).replace(/\s+/g," ")}});var Vi=C((Tv,Gi)=>{"use strict";Gi.exports=xf;var Dr=9,Mr=10,je=32,bf=33,yf=58,$e=91,Af=92,St=93,pr=94,zr=96,Yr=4,wf=1024;function xf(e){var r=this.Parser,t=this.Compiler;kf(r)&&Tf(r,e),Bf(t)&&qf(t)}function kf(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function Bf(e){return!!(e&&e.prototype&&e.prototype.visitors)}function Tf(e,r){for(var t=r||{},n=e.prototype,a=n.blockTokenizers,u=n.inlineTokenizers,i=n.blockMethods,o=n.inlineMethods,s=a.definition,l=u.reference,c=[],f=-1,p=i.length,d;++fYr&&(Z=void 0,ve=T);else{if(Z0&&(M=Ee[k-1],M.contentStart===M.contentEnd);)k--;for(Be=b(g.slice(0,M.contentEnd));++T{Lt.isRemarkParser=Sf;Lt.isRemarkCompiler=Of;function Sf(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function Of(e){return!!(e&&e.prototype&&e.prototype.visitors)}});var Xi=C((_v,Ji)=>{var ji=Pt();Ji.exports=Nf;var $i=9,Wi=32,Gr=36,Lf=48,Pf=57,Hi=92,If=["math","math-inline"],Ki="math-display";function Nf(e){let r=this.Parser,t=this.Compiler;ji.isRemarkParser(r)&&Rf(r,e),ji.isRemarkCompiler(t)&&Uf(t,e)}function Rf(e,r){let t=e.prototype,n=t.inlineMethods;u.locator=a,t.inlineTokenizers.math=u,n.splice(n.indexOf("text"),0,"math");function a(i,o){return i.indexOf("$",o)}function u(i,o,s){let l=o.length,c=!1,f=!1,p=0,d,D,h,m,F,y,E;if(o.charCodeAt(p)===Hi&&(f=!0,p++),o.charCodeAt(p)===Gr){if(p++,f)return s?!0:i(o.slice(0,p))({type:"text",value:"$"});if(o.charCodeAt(p)===Gr&&(c=!0,p++),h=o.charCodeAt(p),!(h===Wi||h===$i)){for(m=p;pPf)&&(!c||h===Gr)){F=p-1,p++,c&&p++,y=p;break}}else D===Hi&&(p++,h=o.charCodeAt(p+1));p++}if(y!==void 0)return s?!0:(E=o.slice(m,F+1),i(o.slice(0,y))({type:"inlineMath",value:E,data:{hName:"span",hProperties:{className:If.concat(c&&r.inlineMathDouble?[Ki]:[])},hChildren:[{type:"text",value:E}]}}))}}}}function Uf(e){let r=e.prototype;r.visitors.inlineMath=t;function t(n){let a="$";return(n.data&&n.data.hProperties&&n.data.hProperties.className||[]).includes(Ki)&&(a="$$"),a+n.value+a}}});var tu=C((Sv,ru)=>{var Qi=Pt();ru.exports=Gf;var Zi=10,hr=32,It=36,eu=` +`,Mf="$",zf=2,Yf=["math","math-display"];function Gf(){let e=this.Parser,r=this.Compiler;Qi.isRemarkParser(e)&&Vf(e),Qi.isRemarkCompiler(r)&&jf(r)}function Vf(e){let r=e.prototype,t=r.blockMethods,n=r.interruptParagraph,a=r.interruptList,u=r.interruptBlockquote;r.blockTokenizers.math=i,t.splice(t.indexOf("fencedCode")+1,0,"math"),n.splice(n.indexOf("fencedCode")+1,0,["math"]),a.splice(a.indexOf("fencedCode")+1,0,["math"]),u.splice(u.indexOf("fencedCode")+1,0,["math"]);function i(o,s,l){var c=s.length,f=0;let p,d,D,h,m,F,y,E,B,b,g;for(;fb&&s.charCodeAt(h-1)===hr;)h--;for(;h>b&&s.charCodeAt(h-1)===It;)B++,h--;for(F<=B&&s.indexOf(Mf,b)===h&&(E=!0,g=h);b<=g&&b-fb&&s.charCodeAt(g-1)===hr;)g--;if((!E||b!==g)&&d.push(s.slice(b,g)),E)break;f=D+1,D=s.indexOf(eu,f+1),D=D===-1?c:D}return d=d.join(` +`),o(s.slice(0,D))({type:"math",value:d,data:{hName:"div",hProperties:{className:Yf.concat()},hChildren:[{type:"text",value:d}]}})}}}}function jf(e){let r=e.prototype;r.visitors.math=t;function t(n){return`$$ +`+n.value+` +$$`}}});var iu=C((Ov,nu)=>{var $f=Xi(),Wf=tu();nu.exports=Hf;function Hf(e){var r=e||{};Wf.call(this,r),$f.call(this,r)}});var Ie=C((Lv,uu)=>{uu.exports=Jf;var Kf=Object.prototype.hasOwnProperty;function Jf(){for(var e={},r=0;r{typeof Object.create=="function"?Nt.exports=function(r,t){t&&(r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:Nt.exports=function(r,t){if(t){r.super_=t;var n=function(){};n.prototype=t.prototype,r.prototype=new n,r.prototype.constructor=r}}});var cu=C((Iv,su)=>{"use strict";var Xf=Ie(),ou=au();su.exports=Qf;function Qf(e){var r,t,n;ou(u,e),ou(a,u),r=u.prototype;for(t in r)n=r[t],n&&typeof n=="object"&&(r[t]="concat"in n?n.concat():Xf(n));return u;function a(i){return e.apply(this,i)}function u(){return this instanceof u?e.apply(this,arguments):new a(arguments)}}});var fu=C((Nv,lu)=>{"use strict";lu.exports=Zf;function Zf(e,r,t){return n;function n(){var a=t||this,u=a[e];return a[e]=!r,i;function i(){a[e]=u}}}});var pu=C((Rv,Du)=>{"use strict";Du.exports=eD;function eD(e){for(var r=String(e),t=[],n=/\r?\n|\r/g;n.exec(r);)t.push(n.lastIndex);return t.push(r.length+1),{toPoint:a,toPosition:a,toOffset:u};function a(i){var o=-1;if(i>-1&&ii)return{line:o+1,column:i-(t[o-1]||0)+1,offset:i}}return{}}function u(i){var o=i&&i.line,s=i&&i.column,l;return!isNaN(o)&&!isNaN(s)&&o-1 in t&&(l=(t[o-2]||0)+s-1||0),l>-1&&l{"use strict";hu.exports=rD;var Rt="\\";function rD(e,r){return t;function t(n){for(var a=0,u=n.indexOf(Rt),i=e[r],o=[],s;u!==-1;)o.push(n.slice(a,u)),a=u+1,s=n.charAt(a),(!s||i.indexOf(s)===-1)&&o.push(Rt),u=n.indexOf(Rt,a+1);return o.push(n.slice(a)),o.join("")}}});var mu=C((Mv,tD)=>{tD.exports={AElig:"\xC6",AMP:"&",Aacute:"\xC1",Acirc:"\xC2",Agrave:"\xC0",Aring:"\xC5",Atilde:"\xC3",Auml:"\xC4",COPY:"\xA9",Ccedil:"\xC7",ETH:"\xD0",Eacute:"\xC9",Ecirc:"\xCA",Egrave:"\xC8",Euml:"\xCB",GT:">",Iacute:"\xCD",Icirc:"\xCE",Igrave:"\xCC",Iuml:"\xCF",LT:"<",Ntilde:"\xD1",Oacute:"\xD3",Ocirc:"\xD4",Ograve:"\xD2",Oslash:"\xD8",Otilde:"\xD5",Ouml:"\xD6",QUOT:'"',REG:"\xAE",THORN:"\xDE",Uacute:"\xDA",Ucirc:"\xDB",Ugrave:"\xD9",Uuml:"\xDC",Yacute:"\xDD",aacute:"\xE1",acirc:"\xE2",acute:"\xB4",aelig:"\xE6",agrave:"\xE0",amp:"&",aring:"\xE5",atilde:"\xE3",auml:"\xE4",brvbar:"\xA6",ccedil:"\xE7",cedil:"\xB8",cent:"\xA2",copy:"\xA9",curren:"\xA4",deg:"\xB0",divide:"\xF7",eacute:"\xE9",ecirc:"\xEA",egrave:"\xE8",eth:"\xF0",euml:"\xEB",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE",gt:">",iacute:"\xED",icirc:"\xEE",iexcl:"\xA1",igrave:"\xEC",iquest:"\xBF",iuml:"\xEF",laquo:"\xAB",lt:"<",macr:"\xAF",micro:"\xB5",middot:"\xB7",nbsp:"\xA0",not:"\xAC",ntilde:"\xF1",oacute:"\xF3",ocirc:"\xF4",ograve:"\xF2",ordf:"\xAA",ordm:"\xBA",oslash:"\xF8",otilde:"\xF5",ouml:"\xF6",para:"\xB6",plusmn:"\xB1",pound:"\xA3",quot:'"',raquo:"\xBB",reg:"\xAE",sect:"\xA7",shy:"\xAD",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",szlig:"\xDF",thorn:"\xFE",times:"\xD7",uacute:"\xFA",ucirc:"\xFB",ugrave:"\xF9",uml:"\xA8",uuml:"\xFC",yacute:"\xFD",yen:"\xA5",yuml:"\xFF"}});var Fu=C((zv,nD)=>{nD.exports={"0":"\uFFFD","128":"\u20AC","130":"\u201A","131":"\u0192","132":"\u201E","133":"\u2026","134":"\u2020","135":"\u2021","136":"\u02C6","137":"\u2030","138":"\u0160","139":"\u2039","140":"\u0152","142":"\u017D","145":"\u2018","146":"\u2019","147":"\u201C","148":"\u201D","149":"\u2022","150":"\u2013","151":"\u2014","152":"\u02DC","153":"\u2122","154":"\u0161","155":"\u203A","156":"\u0153","158":"\u017E","159":"\u0178"}});var Ne=C((Yv,gu)=>{"use strict";gu.exports=iD;function iD(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=48&&r<=57}});var Eu=C((Gv,vu)=>{"use strict";vu.exports=uD;function uD(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=102||r>=65&&r<=70||r>=48&&r<=57}});var We=C((Vv,Cu)=>{"use strict";Cu.exports=aD;function aD(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=122||r>=65&&r<=90}});var yu=C((jv,bu)=>{"use strict";var oD=We(),sD=Ne();bu.exports=cD;function cD(e){return oD(e)||sD(e)}});var Au=C(($v,lD)=>{lD.exports={AEli:"\xC6",AElig:"\xC6",AM:"&",AMP:"&",Aacut:"\xC1",Aacute:"\xC1",Abreve:"\u0102",Acir:"\xC2",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrav:"\xC0",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",Arin:"\xC5",Aring:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",Atild:"\xC3",Atilde:"\xC3",Aum:"\xC4",Auml:"\xC4",Backslash:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",Bscr:"\u212C",Bumpeq:"\u224E",CHcy:"\u0427",COP:"\xA9",COPY:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",Cayleys:"\u212D",Ccaron:"\u010C",Ccedi:"\xC7",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",CenterDot:"\xB7",Cfr:"\u212D",Chi:"\u03A7",CircleDot:"\u2299",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",Colon:"\u2237",Colone:"\u2A74",Congruent:"\u2261",Conint:"\u222F",ContourIntegral:"\u222E",Copf:"\u2102",Coproduct:"\u2210",CounterClockwiseContourIntegral:"\u2233",Cross:"\u2A2F",Cscr:"\u{1D49E}",Cup:"\u22D3",CupCap:"\u224D",DD:"\u2145",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",Delta:"\u0394",Dfr:"\u{1D507}",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",Diamond:"\u22C4",DifferentialD:"\u2146",Dopf:"\u{1D53B}",Dot:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",Downarrow:"\u21D3",Dscr:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ET:"\xD0",ETH:"\xD0",Eacut:"\xC9",Eacute:"\xC9",Ecaron:"\u011A",Ecir:"\xCA",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrav:"\xC8",Egrave:"\xC8",Element:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",Equilibrium:"\u21CC",Escr:"\u2130",Esim:"\u2A73",Eta:"\u0397",Eum:"\xCB",Euml:"\xCB",Exists:"\u2203",ExponentialE:"\u2147",Fcy:"\u0424",Ffr:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",Fopf:"\u{1D53D}",ForAll:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",G:">",GT:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1D50A}",Gg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",Gt:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",HilbertSpace:"\u210B",Hopf:"\u210D",HorizontalLine:"\u2500",Hscr:"\u210B",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacut:"\xCD",Iacute:"\xCD",Icir:"\xCE",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Igrav:"\xCC",Igrave:"\xCC",Im:"\u2111",Imacr:"\u012A",ImaginaryI:"\u2148",Implies:"\u21D2",Int:"\u222C",Integral:"\u222B",Intersection:"\u22C2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Iogon:"\u012E",Iopf:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Ium:"\xCF",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",LJcy:"\u0409",L:"<",LT:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Larr:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",LeftRightArrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",Leftarrow:"\u21D0",Leftrightarrow:"\u21D4",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",Lfr:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",LongLeftRightArrow:"\u27F7",LongRightArrow:"\u27F6",Longleftarrow:"\u27F8",Longleftrightarrow:"\u27FA",Longrightarrow:"\u27F9",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",Mopf:"\u{1D544}",Mscr:"\u2133",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:` +`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntild:"\xD1",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacut:"\xD3",Oacute:"\xD3",Ocir:"\xD4",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograv:"\xD2",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslas:"\xD8",Oslash:"\xD8",Otild:"\xD5",Otilde:"\xD5",Otimes:"\u2A37",Oum:"\xD6",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUO:'"',QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",RE:"\xAE",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THOR:"\xDE",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacut:"\xDA",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucir:"\xDB",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrav:"\xD9",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uum:"\xDC",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacut:"\xDD",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",ZeroWidthSpace:"\u200B",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\u{1D4B5}",aacut:"\xE1",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acir:"\xE2",acirc:"\xE2",acut:"\xB4",acute:"\xB4",acy:"\u0430",aeli:"\xE6",aelig:"\xE6",af:"\u2061",afr:"\u{1D51E}",agrav:"\xE0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",am:"&",amp:"&",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",aopf:"\u{1D552}",ap:"\u2248",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",apid:"\u224B",apos:"'",approx:"\u2248",approxeq:"\u224A",arin:"\xE5",aring:"\xE5",ascr:"\u{1D4B6}",ast:"*",asymp:"\u2248",asympeq:"\u224D",atild:"\xE3",atilde:"\xE3",aum:"\xE4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",beta:"\u03B2",beth:"\u2136",between:"\u226C",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255D",boxUR:"\u255A",boxUl:"\u255C",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256C",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256B",boxVl:"\u2562",boxVr:"\u255F",boxbox:"\u29C9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250C",boxh:"\u2500",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",bprime:"\u2035",breve:"\u02D8",brvba:"\xA6",brvbar:"\xA6",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",bumpeq:"\u224F",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",ccaps:"\u2A4D",ccaron:"\u010D",ccedi:"\xE7",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cedi:"\xB8",cedil:"\xB8",cemptyv:"\u29B2",cen:"\xA2",cent:"\xA2",centerdot:"\xB7",cfr:"\u{1D520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledR:"\xAE",circledS:"\u24C8",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",conint:"\u222E",copf:"\u{1D554}",coprod:"\u2210",cop:"\xA9",copy:"\xA9",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curre:"\xA4",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dArr:"\u21D3",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",darr:"\u2193",dash:"\u2010",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",dcy:"\u0434",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",ddotseq:"\u2A77",de:"\xB0",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",dharl:"\u21C3",dharr:"\u21C2",diam:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divid:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",dot:"\u02D9",doteq:"\u2250",doteqdot:"\u2251",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",downarrow:"\u2193",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eDDot:"\u2A77",eDot:"\u2251",eacut:"\xE9",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\xEA",ecirc:"\xEA",ecolon:"\u2255",ecy:"\u044D",edot:"\u0117",ee:"\u2147",efDot:"\u2252",efr:"\u{1D522}",eg:"\u2A9A",egrav:"\xE8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",equals:"=",equest:"\u225F",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",erarr:"\u2971",escr:"\u212F",esdot:"\u2250",esim:"\u2242",eta:"\u03B7",et:"\xF0",eth:"\xF0",eum:"\xEB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",expectation:"\u2130",exponentiale:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac1:"\xBC",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac3:"\xBE",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",gE:"\u2267",gEl:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gammad:"\u03DD",gap:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",ge:"\u2265",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",gl:"\u2277",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\u{1D558}",grave:"`",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",g:">",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hArr:"\u21D4",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",hbar:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",hslash:"\u210F",hstrok:"\u0127",hybull:"\u2043",hyphen:"\u2010",iacut:"\xED",iacute:"\xED",ic:"\u2063",icir:"\xEE",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexc:"\xA1",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",igrav:"\xEC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",image:"\u2111",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",intcal:"\u22BA",integers:"\u2124",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\u{1D55A}",iota:"\u03B9",iprod:"\u2A3C",iques:"\xBF",iquest:"\xBF",iscr:"\u{1D4BE}",isin:"\u2208",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",iukcy:"\u0456",ium:"\xEF",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",lAarr:"\u21DA",lArr:"\u21D0",lAtail:"\u291B",lBarr:"\u290E",lE:"\u2266",lEg:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",laqu:"\xAB",laquo:"\xAB",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lceil:"\u2308",lcub:"{",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leftarrow:"\u2190",leftarrowtail:"\u21A2",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",leftthreetimes:"\u22CB",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",lessgtr:"\u2276",lesssim:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",l:"<",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",mac:"\xAF",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",measuredangle:"\u2221",mfr:"\u{1D52A}",mho:"\u2127",micr:"\xB5",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middo:"\xB7",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",mstpos:"\u223E",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nGtv:"\u226B\u0338",nLeftarrow:"\u21CD",nLeftrightarrow:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nLtv:"\u226A\u0338",nRightarrow:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nabla:"\u2207",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbs:"\xA0",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",neArr:"\u21D7",nearhk:"\u2924",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",nexist:"\u2204",nexists:"\u2204",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",ngsim:"\u2275",ngt:"\u226F",ngtr:"\u226F",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",nlArr:"\u21CD",nlE:"\u2266\u0338",nlarr:"\u219A",nldr:"\u2025",nle:"\u2270",nleftarrow:"\u219A",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nlsim:"\u2274",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nmid:"\u2224",nopf:"\u{1D55F}",no:"\xAC",not:"\xAC",notin:"\u2209",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntild:"\xF1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22AD",nvHarr:"\u2904",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwArr:"\u21D6",nwarhk:"\u2923",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",oS:"\u24C8",oacut:"\xF3",oacute:"\xF3",oast:"\u229B",ocir:"\xF4",ocirc:"\xF4",ocy:"\u043E",odash:"\u229D",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\u{1D52C}",ogon:"\u02DB",ograv:"\xF2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",oopf:"\u{1D560}",opar:"\u29B7",operp:"\u29B9",oplus:"\u2295",or:"\u2228",orarr:"\u21BB",ord:"\xBA",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oscr:"\u2134",oslas:"\xF8",oslash:"\xF8",osol:"\u2298",otild:"\xF5",otilde:"\xF5",otimes:"\u2297",otimesas:"\u2A36",oum:"\xF6",ouml:"\xF6",ovbar:"\u233D",par:"\xB6",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\u{1D52D}",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",plusm:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",pointint:"\u2A15",popf:"\u{1D561}",poun:"\xA3",pound:"\xA3",pr:"\u227A",prE:"\u2AB3",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",primes:"\u2119",prnE:"\u2AB5",prnap:"\u2AB9",prnsim:"\u22E8",prod:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quo:'"',quot:'"',rAarr:"\u21DB",rArr:"\u21D2",rAtail:"\u291C",rBarr:"\u290F",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raqu:"\xBB",raquo:"\xBB",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rceil:"\u2309",rcub:"}",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",re:"\xAE",reg:"\xAE",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",rightarrow:"\u2192",rightarrowtail:"\u21A3",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",rightthreetimes:"\u22CC",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",rsaquo:"\u203A",rscr:"\u{1D4C7}",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",sbquo:"\u201A",sc:"\u227B",scE:"\u2AB4",scap:"\u2AB8",scaron:"\u0161",sccue:"\u227D",sce:"\u2AB0",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",scnap:"\u2ABA",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",seArr:"\u21D8",searhk:"\u2925",searr:"\u2198",searrow:"\u2198",sec:"\xA7",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shortmid:"\u2223",shortparallel:"\u2225",sh:"\xAD",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",subE:"\u2AC5",subdot:"\u2ABD",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",sum:"\u2211",sung:"\u266A",sup:"\u2283",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supE:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swarhk:"\u2926",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szli:"\xDF",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tbrk:"\u23B4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",tfr:"\u{1D531}",there4:"\u2234",therefore:"\u2234",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",thor:"\xFE",thorn:"\xFE",tilde:"\u02DC",time:"\xD7",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uArr:"\u21D1",uHar:"\u2963",uacut:"\xFA",uacute:"\xFA",uarr:"\u2191",ubrcy:"\u045E",ubreve:"\u016D",ucir:"\xFB",ucirc:"\xFB",ucy:"\u0443",udarr:"\u21C5",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",ufr:"\u{1D532}",ugrav:"\xF9",ugrave:"\xF9",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",um:"\xA8",uml:"\xA8",uogon:"\u0173",uopf:"\u{1D566}",uparrow:"\u2191",updownarrow:"\u2195",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",upsi:"\u03C5",upsih:"\u03D2",upsilon:"\u03C5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\u{1D4CA}",utdot:"\u22F0",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uum:"\xFC",uuml:"\xFC",uwangle:"\u29A7",vArr:"\u21D5",vBar:"\u2AE8",vBarv:"\u2AE9",vDash:"\u22A8",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vcy:"\u0432",vdash:"\u22A2",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",vert:"|",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",wfr:"\u{1D534}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacut:"\xFD",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",ye:"\xA5",yen:"\xA5",yfr:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yum:"\xFF",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeetrf:"\u2128",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"}});var ku=C((Wv,xu)=>{"use strict";var wu=Au();xu.exports=DD;var fD={}.hasOwnProperty;function DD(e){return fD.call(wu,e)?wu[e]:!1}});var dr=C((Hv,Mu)=>{"use strict";var Bu=mu(),Tu=Fu(),pD=Ne(),hD=Eu(),Ou=yu(),dD=ku();Mu.exports=BD;var mD={}.hasOwnProperty,He=String.fromCharCode,FD=Function.prototype,qu={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},gD=9,_u=10,vD=12,ED=32,Su=38,CD=59,bD=60,yD=61,AD=35,wD=88,xD=120,kD=65533,Ke="named",Mt="hexadecimal",zt="decimal",Yt={};Yt[Mt]=16;Yt[zt]=10;var Vr={};Vr[Ke]=Ou;Vr[zt]=pD;Vr[Mt]=hD;var Lu=1,Pu=2,Iu=3,Nu=4,Ru=5,Ut=6,Uu=7,we={};we[Lu]="Named character references must be terminated by a semicolon";we[Pu]="Numeric character references must be terminated by a semicolon";we[Iu]="Named character references cannot be empty";we[Nu]="Numeric character references cannot be empty";we[Ru]="Named character references must be known";we[Ut]="Numeric character references cannot be disallowed";we[Uu]="Numeric character references cannot be outside the permissible Unicode range";function BD(e,r){var t={},n,a;r||(r={});for(a in qu)n=r[a],t[a]=n??qu[a];return(t.position.indent||t.position.start)&&(t.indent=t.position.indent||[],t.position=t.position.start),TD(e,t)}function TD(e,r){var t=r.additional,n=r.nonTerminated,a=r.text,u=r.reference,i=r.warning,o=r.textContext,s=r.referenceContext,l=r.warningContext,c=r.position,f=r.indent||[],p=e.length,d=0,D=-1,h=c.column||1,m=c.line||1,F="",y=[],E,B,b,g,A,w,v,x,k,T,q,R,O,S,_,L,Be,W,I;for(typeof t=="string"&&(t=t.charCodeAt(0)),L=ee(),x=i?Z:FD,d--,p++;++d65535&&(w-=65536,T+=He(w>>>10|55296),w=56320|w&1023),w=T+He(w))):S!==Ke&&x(Nu,W)),w?(ve(),L=ee(),d=I-1,h+=I-O+1,y.push(w),Be=ee(),Be.offset++,u&&u.call(s,w,{start:L,end:Be},e.slice(O-1,I)),L=Be):(g=e.slice(O-1,I),F+=g,h+=g.length,d=I-1)}else A===10&&(m++,D++,h=0),A===A?(F+=He(A),h++):ve();return y.join("");function ee(){return{line:m,column:h,offset:d+(c.offset||0)}}function Z(Ee,M){var Dt=ee();Dt.column+=M,Dt.offset+=M,i.call(l,we[Ee],Dt,Ee)}function ve(){F&&(y.push(F),a&&a.call(o,F,{start:L,end:ee()}),F="")}}function qD(e){return e>=55296&&e<=57343||e>1114111}function _D(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}});var Gu=C((Kv,Yu)=>{"use strict";var SD=Ie(),zu=dr();Yu.exports=OD;function OD(e){return t.raw=n,t;function r(u){for(var i=e.offset,o=u.line,s=[];++o&&o in i;)s.push((i[o]||0)+1);return{start:u,indent:s}}function t(u,i,o){zu(u,{position:r(i),warning:a,text:o,reference:o,textContext:e,referenceContext:e})}function n(u,i,o){return zu(u,SD(o,{position:r(i),warning:a}))}function a(u,i,o){o!==3&&e.file.message(u,i)}}});var $u=C((Jv,ju)=>{"use strict";ju.exports=LD;function LD(e){return r;function r(t,n){var a=this,u=a.offset,i=[],o=a[e+"Methods"],s=a[e+"Tokenizers"],l=n.line,c=n.column,f,p,d,D,h,m;if(!t)return i;for(w.now=E,w.file=a.file,F("");t;){for(f=-1,p=o.length,h=!1;++f{"use strict";Hu.exports=jr;var Gt=["\\","`","*","{","}","[","]","(",")","#","+","-",".","!","_",">"],Vt=Gt.concat(["~","|"]),Wu=Vt.concat([` +`,'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);jr.default=Gt;jr.gfm=Vt;jr.commonmark=Wu;function jr(e){var r=e||{};return r.commonmark?Wu:r.gfm?Vt:Gt}});var Xu=C((Qv,Ju)=>{"use strict";Ju.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","pre","section","source","title","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]});var jt=C((Zv,Qu)=>{"use strict";Qu.exports={position:!0,gfm:!0,commonmark:!1,pedantic:!1,blocks:Xu()}});var ea=C((eE,Zu)=>{"use strict";var ND=Ie(),RD=Ku(),UD=jt();Zu.exports=MD;function MD(e){var r=this,t=r.options,n,a;if(e==null)e={};else if(typeof e=="object")e=ND(e);else throw new Error("Invalid value `"+e+"` for setting `options`");for(n in UD){if(a=e[n],a==null&&(a=t[n]),n!=="blocks"&&typeof a!="boolean"||n==="blocks"&&typeof a!="object")throw new Error("Invalid value `"+a+"` for setting `options."+n+"`");e[n]=a}return r.options=e,r.escape=RD(e),r}});var na=C((rE,ta)=>{"use strict";ta.exports=ra;function ra(e){if(e==null)return VD;if(typeof e=="string")return GD(e);if(typeof e=="object")return"length"in e?YD(e):zD(e);if(typeof e=="function")return e;throw new Error("Expected function, string, or object as test")}function zD(e){return r;function r(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}function YD(e){for(var r=[],t=-1;++t{ia.exports=jD;function jD(e){return e}});var ca=C((nE,sa)=>{"use strict";sa.exports=$r;var $D=na(),WD=ua(),aa=!0,oa="skip",$t=!1;$r.CONTINUE=aa;$r.SKIP=oa;$r.EXIT=$t;function $r(e,r,t,n){var a,u;typeof r=="function"&&typeof t!="function"&&(n=t,t=r,r=null),u=$D(r),a=n?-1:1,i(e,null,[])();function i(o,s,l){var c=typeof o=="object"&&o!==null?o:{},f;return typeof c.type=="string"&&(f=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0,p.displayName="node ("+WD(c.type+(f?"<"+f+">":""))+")"),p;function p(){var d=l.concat(o),D=[],h,m;if((!r||u(o,s,l[l.length-1]||null))&&(D=HD(t(o,l)),D[0]===$t))return D;if(o.children&&D[0]!==oa)for(m=(n?o.children.length:-1)+a;m>-1&&m{"use strict";la.exports=Hr;var Wr=ca(),KD=Wr.CONTINUE,JD=Wr.SKIP,XD=Wr.EXIT;Hr.CONTINUE=KD;Hr.SKIP=JD;Hr.EXIT=XD;function Hr(e,r,t,n){typeof r=="function"&&typeof t!="function"&&(n=t,t=r,r=null),Wr(e,r,a,n);function a(u,i){var o=i[i.length-1],s=o?o.children.indexOf(u):null;return t(u,s,o)}}});var pa=C((uE,Da)=>{"use strict";var QD=fa();Da.exports=ZD;function ZD(e,r){return QD(e,r?ep:rp),e}function ep(e){delete e.position}function rp(e){e.position=void 0}});var ma=C((aE,da)=>{"use strict";var ha=Ie(),tp=pa();da.exports=up;var np=` +`,ip=/\r\n|\r/g;function up(){var e=this,r=String(e.file),t={line:1,column:1,offset:0},n=ha(t),a;return r=r.replace(ip,np),r.charCodeAt(0)===65279&&(r=r.slice(1),n.column++,n.offset++),a={type:"root",children:e.tokenizeBlock(r,n),position:{start:t,end:e.eof||ha(t)}},e.options.position||tp(a,!0),a}});var ga=C((oE,Fa)=>{"use strict";var ap=/^[ \t]*(\n|$)/;Fa.exports=op;function op(e,r,t){for(var n,a="",u=0,i=r.length;u{"use strict";var me="",Wt;va.exports=sp;function sp(e,r){if(typeof e!="string")throw new TypeError("expected a string");if(r===1)return e;if(r===2)return e+e;var t=e.length*r;if(Wt!==e||typeof Wt>"u")Wt=e,me="";else if(me.length>=t)return me.substr(0,t);for(;t>me.length&&r>1;)r&1&&(me+=e),r>>=1,e+=e;return me+=e,me=me.substr(0,t),me}});var Ht=C((cE,Ea)=>{"use strict";Ea.exports=cp;function cp(e){return String(e).replace(/\n+$/,"")}});var ya=C((lE,ba)=>{"use strict";var lp=Kr(),fp=Ht();ba.exports=hp;var Kt=` +`,Ca=" ",Jt=" ",Dp=4,pp=lp(Jt,Dp);function hp(e,r,t){for(var n=-1,a=r.length,u="",i="",o="",s="",l,c,f;++n{"use strict";wa.exports=gp;var Jr=` +`,mr=" ",Je=" ",dp="~",Aa="`",mp=3,Fp=4;function gp(e,r,t){var n=this,a=n.options.gfm,u=r.length+1,i=0,o="",s,l,c,f,p,d,D,h,m,F,y,E,B;if(a){for(;i=Fp)){for(D="";i{Xe=ka.exports=vp;function vp(e){return e.trim?e.trim():Xe.right(Xe.left(e))}Xe.left=function(e){return e.trimLeft?e.trimLeft():e.replace(/^\s\s*/,"")};Xe.right=function(e){if(e.trimRight)return e.trimRight();for(var r=/\s/,t=e.length;r.test(e.charAt(--t)););return e.slice(0,t+1)}});var Xr=C((DE,Ba)=>{"use strict";Ba.exports=Ep;function Ep(e,r,t,n){for(var a=e.length,u=-1,i,o;++u{"use strict";var Cp=Re(),bp=Xr();_a.exports=yp;var Xt=` +`,Ta=" ",Qt=" ",qa=">";function yp(e,r,t){for(var n=this,a=n.offset,u=n.blockTokenizers,i=n.interruptBlockquote,o=e.now(),s=o.line,l=r.length,c=[],f=[],p=[],d,D=0,h,m,F,y,E,B,b,g;D{"use strict";La.exports=wp;var Oa=` +`,Fr=" ",gr=" ",vr="#",Ap=6;function wp(e,r,t){for(var n=this,a=n.options.pedantic,u=r.length+1,i=-1,o=e.now(),s="",l="",c,f,p;++iAp)&&!(!p||!a&&r.charAt(i+1)===vr)){for(u=r.length+1,f="";++i{"use strict";Na.exports=Sp;var xp=" ",kp=` +`,Ia=" ",Bp="*",Tp="-",qp="_",_p=3;function Sp(e,r,t){for(var n=-1,a=r.length+1,u="",i,o,s,l;++n=_p&&(!i||i===kp)?(u+=l,t?!0:e(u)({type:"thematicBreak"})):void 0}});var Zt=C((mE,Ma)=>{"use strict";Ma.exports=Ip;var Ua=" ",Op=" ",Lp=1,Pp=4;function Ip(e){for(var r=0,t=0,n=e.charAt(r),a={},u,i=0;n===Ua||n===Op;){for(u=n===Ua?Pp:Lp,t+=u,u>1&&(t=Math.floor(t/u)*u);i{"use strict";var Np=Re(),Rp=Kr(),Up=Zt();Ya.exports=Yp;var za=` +`,Mp=" ",zp="!";function Yp(e,r){var t=e.split(za),n=t.length+1,a=1/0,u=[],i,o,s;for(t.unshift(Rp(Mp,r)+zp);n--;)if(o=Up(t[n]),u[n]=o.stops,Np(t[n]).length!==0)if(o.indent)o.indent>0&&o.indent{"use strict";var Gp=Re(),Vp=Kr(),Va=Ne(),jp=Zt(),$p=Ga(),Wp=Xr();Ha.exports=rh;var en="*",Hp="_",ja="+",rn="-",$a=".",Fe=" ",ae=` +`,Qr=" ",Wa=")",Kp="x",xe=4,Jp=/\n\n(?!\s*$)/,Xp=/^\[([ X\tx])][ \t]/,Qp=/^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/,Zp=/^([ \t]*)([*+-]|\d+[.)])([ \t]+)/,eh=/^( {1,4}|\t)?/gm;function rh(e,r,t){for(var n=this,a=n.options.commonmark,u=n.options.pedantic,i=n.blockTokenizers,o=n.interruptList,s=0,l=r.length,c=null,f,p,d,D,h,m,F,y,E,B,b,g,A,w,v,x,k,T,q,R=!1,O,S,_,L;s=k.indent&&(L=!0),D=r.charAt(s),E=null,!L){if(D===en||D===ja||D===rn)E=D,s++,f++;else{for(p="";s=k.indent||f>xe),y=!1,s=F;if(b=r.slice(F,m),B=F===s?b:r.slice(s,m),(E===en||E===Hp||E===rn)&&i.thematicBreak.call(n,e,b,!0))break;if(g=A,A=!y&&!Gp(B).length,L&&k)k.value=k.value.concat(x,b),v=v.concat(x,b),x=[];else if(y)x.length!==0&&(R=!0,k.value.push(""),k.trail=x.concat()),k={value:[b],indent:f,trail:[]},w.push(k),v=v.concat(x,b),x=[];else if(A){if(g&&!a)break;x.push(b)}else{if(g||Wp(o,i,n,[e,b,!0]))break;k.value=k.value.concat(x,b),v=v.concat(x,b),x=[]}s=m+1}for(O=e(v.join(ae)).reset({type:"list",ordered:d,start:c,spread:R,children:[]}),T=n.enterList(),q=n.enterBlock(),s=-1,l=w.length;++s{"use strict";Qa.exports=lh;var tn=` +`,uh=" ",Ja=" ",Xa="=",ah="-",oh=3,sh=1,ch=2;function lh(e,r,t){for(var n=this,a=e.now(),u=r.length,i=-1,o="",s,l,c,f,p;++i=oh){i--;break}o+=c}for(s="",l="";++i{"use strict";var fh="[a-zA-Z_:][a-zA-Z0-9:._-]*",Dh="[^\"'=<>`\\u0000-\\u0020]+",ph="'[^']*'",hh='"[^"]*"',dh="(?:"+Dh+"|"+ph+"|"+hh+")",mh="(?:\\s+"+fh+"(?:\\s*=\\s*"+dh+")?)",eo="<[A-Za-z][A-Za-z0-9\\-]*"+mh+"*\\s*\\/?>",ro="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Fh="|",gh="<[?].*?[?]>",vh="]*>",Eh="";nn.openCloseTag=new RegExp("^(?:"+eo+"|"+ro+")");nn.tag=new RegExp("^(?:"+eo+"|"+ro+"|"+Fh+"|"+gh+"|"+vh+"|"+Eh+")")});var uo=C((CE,io)=>{"use strict";var Ch=un().openCloseTag;io.exports=Ih;var bh=" ",yh=" ",to=` +`,Ah="<",wh=/^<(script|pre|style)(?=(\s|>|$))/i,xh=/<\/(script|pre|style)>/i,kh=/^/,Th=/^<\?/,qh=/\?>/,_h=/^/,Oh=/^/,no=/^$/,Ph=new RegExp(Ch.source+"\\s*$");function Ih(e,r,t){for(var n=this,a=n.options.blocks.join("|"),u=new RegExp("^|$))","i"),i=r.length,o=0,s,l,c,f,p,d,D,h=[[wh,xh,!0],[kh,Bh,!0],[Th,qh,!0],[_h,Sh,!0],[Oh,Lh,!0],[u,no,!0],[Ph,no,!1]];o{"use strict";ao.exports=Uh;var Nh=String.fromCharCode,Rh=/\s/;function Uh(e){return Rh.test(typeof e=="number"?Nh(e):e.charAt(0))}});var an=C((yE,oo)=>{"use strict";var Mh=Br();oo.exports=zh;function zh(e){return Mh(e).toLowerCase()}});var ho=C((AE,po)=>{"use strict";var Yh=oe(),Gh=an();po.exports=Wh;var so='"',co="'",Vh="\\",Qe=` +`,Zr=" ",et=" ",sn="[",Er="]",jh="(",$h=")",lo=":",fo="<",Do=">";function Wh(e,r,t){for(var n=this,a=n.options.commonmark,u=0,i=r.length,o="",s,l,c,f,p,d,D,h;u{"use strict";var Kh=oe();Fo.exports=ud;var Jh=" ",rt=` +`,Xh=" ",Qh="-",Zh=":",ed="\\",cn="|",rd=1,td=2,mo="left",nd="center",id="right";function ud(e,r,t){var n=this,a,u,i,o,s,l,c,f,p,d,D,h,m,F,y,E,B,b,g,A,w,v;if(n.options.gfm){for(a=0,E=0,l=r.length+1,c=[];aA){if(E1&&(p?(o+=f.slice(0,-1),f=f.charAt(f.length-1)):(o+=f,f="")),F=e.now(),e(o)({type:"tableCell",children:n.tokenizeInline(h,F)},s)),e(f+p),f="",h=""):(f&&(h+=f,f=""),h+=p,p===ed&&a!==l-2&&(h+=B.charAt(a+1),a++)),m=!1,a++}y||e(rt+u)}return g}}}});var Co=C((xE,Eo)=>{"use strict";var ad=Re(),od=Ht(),sd=Xr();Eo.exports=fd;var cd=" ",Cr=` +`,ld=" ",vo=4;function fd(e,r,t){for(var n=this,a=n.options,u=a.commonmark,i=n.blockTokenizers,o=n.interruptParagraph,s=r.indexOf(Cr),l=r.length,c,f,p,d,D;s=vo&&p!==Cr){s=r.indexOf(Cr,s+1);continue}}if(f=r.slice(s+1),sd(o,i,n,[e,f,!0]))break;if(c=s,s=r.indexOf(Cr,s+1),s!==-1&&ad(r.slice(c,s))===""){s=c;break}}return f=r.slice(0,s),t?!0:(D=e.now(),f=od(f),e(f)({type:"paragraph",children:n.tokenizeInline(f,D)}))}});var yo=C((kE,bo)=>{"use strict";bo.exports=Dd;function Dd(e,r){return e.indexOf("\\",r)}});var ko=C((BE,xo)=>{"use strict";var pd=yo();xo.exports=wo;wo.locator=pd;var hd=` +`,Ao="\\";function wo(e,r,t){var n=this,a,u;if(r.charAt(0)===Ao&&(a=r.charAt(1),n.escape.indexOf(a)!==-1))return t?!0:(a===hd?u={type:"break"}:u={type:"text",value:a},e(Ao+a)(u))}});var ln=C((TE,Bo)=>{"use strict";Bo.exports=dd;function dd(e,r){return e.indexOf("<",r)}});var Oo=C((qE,So)=>{"use strict";var To=oe(),md=dr(),Fd=ln();So.exports=hn;hn.locator=Fd;hn.notInLink=!0;var qo="<",fn=">",_o="@",Dn="/",pn="mailto:",tt=pn.length;function hn(e,r,t){var n=this,a="",u=r.length,i=0,o="",s=!1,l="",c,f,p,d,D;if(r.charAt(0)===qo){for(i++,a=qo;i{"use strict";Lo.exports=gd;function gd(e,r){var t=String(e),n=0,a;if(typeof r!="string")throw new Error("Expected character");for(a=t.indexOf(r);a!==-1;)n++,a=t.indexOf(r,a+r.length);return n}});var Ro=C((SE,No)=>{"use strict";No.exports=vd;var Io=["www.","http://","https://"];function vd(e,r){var t=-1,n,a,u;if(!this.options.gfm)return t;for(a=Io.length,n=-1;++n{"use strict";var Uo=Po(),Ed=dr(),Cd=Ne(),dn=We(),bd=oe(),yd=Ro();Yo.exports=Fn;Fn.locator=yd;Fn.notInLink=!0;var Ad=33,wd=38,xd=41,kd=42,Bd=44,Td=45,mn=46,qd=58,_d=59,Sd=63,Od=60,Mo=95,Ld=126,Pd="(",zo=")";function Fn(e,r,t){var n=this,a=n.options.gfm,u=n.inlineTokenizers,i=r.length,o=-1,s=!1,l,c,f,p,d,D,h,m,F,y,E,B,b,g;if(a){if(r.slice(0,4)==="www.")s=!0,p=4;else if(r.slice(0,7).toLowerCase()==="http://")p=7;else if(r.slice(0,8).toLowerCase()==="https://")p=8;else return;for(o=p-1,f=p,l=[];pF;)p=d+D.lastIndexOf(zo),D=r.slice(d,p),y--;if(r.charCodeAt(p-1)===_d&&(p--,dn(r.charCodeAt(p-1)))){for(m=p-2;dn(r.charCodeAt(m));)m--;r.charCodeAt(m)===wd&&(p=m)}return E=r.slice(0,p),b=Ed(E,{nonTerminated:!1}),s&&(b="http://"+b),g=n.enterLink(),n.inlineTokenizers={text:u.text},B=n.tokenizeInline(E,e.now()),n.inlineTokenizers=u,g(),e(E)({type:"link",title:null,url:b,children:B})}}}});var Wo=C((LE,$o)=>{"use strict";var Id=Ne(),Nd=We(),Rd=43,Ud=45,Md=46,zd=95;$o.exports=jo;function jo(e,r){var t=this,n,a;if(!this.options.gfm||(n=e.indexOf("@",r),n===-1))return-1;if(a=n,a===r||!Vo(e.charCodeAt(a-1)))return jo.call(t,e,n+1);for(;a>r&&Vo(e.charCodeAt(a-1));)a--;return a}function Vo(e){return Id(e)||Nd(e)||e===Rd||e===Ud||e===Md||e===zd}});var Xo=C((PE,Jo)=>{"use strict";var Yd=dr(),Ho=Ne(),Ko=We(),Gd=Wo();Jo.exports=En;En.locator=Gd;En.notInLink=!0;var Vd=43,gn=45,nt=46,jd=64,vn=95;function En(e,r,t){var n=this,a=n.options.gfm,u=n.inlineTokenizers,i=0,o=r.length,s=-1,l,c,f,p;if(a){for(l=r.charCodeAt(i);Ho(l)||Ko(l)||l===Vd||l===gn||l===nt||l===vn;)l=r.charCodeAt(++i);if(i!==0&&l===jd){for(i++;i{"use strict";var $d=We(),Wd=ln(),Hd=un().tag;Zo.exports=Qo;Qo.locator=Wd;var Kd="<",Jd="?",Xd="!",Qd="/",Zd=/^/i;function Qo(e,r,t){var n=this,a=r.length,u,i;if(!(r.charAt(0)!==Kd||a<3)&&(u=r.charAt(1),!(!$d(u)&&u!==Jd&&u!==Xd&&u!==Qd)&&(i=r.match(Hd),!!i)))return t?!0:(i=i[0],!n.inLink&&Zd.test(i)?n.inLink=!0:n.inLink&&e0.test(i)&&(n.inLink=!1),e(i)({type:"html",value:i}))}});var Cn=C((NE,rs)=>{"use strict";rs.exports=r0;function r0(e,r){var t=e.indexOf("[",r),n=e.indexOf("![",r);return n===-1||t{"use strict";var br=oe(),t0=Cn();os.exports=as;as.locator=t0;var n0=` +`,i0="!",ts='"',ns="'",Ze="(",yr=")",bn="<",yn=">",is="[",Ar="\\",u0="]",us="`";function as(e,r,t){var n=this,a="",u=0,i=r.charAt(0),o=n.options.pedantic,s=n.options.commonmark,l=n.options.gfm,c,f,p,d,D,h,m,F,y,E,B,b,g,A,w,v,x,k;if(i===i0&&(F=!0,a=i,i=r.charAt(++u)),i===is&&!(!F&&n.inLink)){for(a+=i,A="",u++,B=r.length,v=e.now(),g=0,v.column+=u,v.offset+=u;u=p&&(p=0):p=f}else if(i===Ar)u++,h+=r.charAt(u);else if((!p||l)&&i===is)g++;else if((!p||l)&&i===u0)if(g)g--;else{if(r.charAt(u+1)!==Ze)return;h+=Ze,c=!0,u++;break}A+=h,h="",u++}if(c){for(y=A,a+=A+h,u++;u{"use strict";var a0=oe(),o0=Cn(),s0=an();ls.exports=cs;cs.locator=o0;var An="link",c0="image",l0="shortcut",f0="collapsed",wn="full",D0="!",it="[",ut="\\",at="]";function cs(e,r,t){var n=this,a=n.options.commonmark,u=r.charAt(0),i=0,o=r.length,s="",l="",c=An,f=l0,p,d,D,h,m,F,y,E;if(u===D0&&(c=c0,l=u,u=r.charAt(++i)),u===it){for(i++,l+=u,F="",E=0;i{"use strict";Ds.exports=p0;function p0(e,r){var t=e.indexOf("**",r),n=e.indexOf("__",r);return n===-1?t:t===-1||n{"use strict";var h0=Re(),hs=oe(),d0=ps();ms.exports=ds;ds.locator=d0;var m0="\\",F0="*",g0="_";function ds(e,r,t){var n=this,a=0,u=r.charAt(a),i,o,s,l,c,f,p;if(!(u!==F0&&u!==g0||r.charAt(++a)!==u)&&(o=n.options.pedantic,s=u,c=s+s,f=r.length,a++,l="",u="",!(o&&hs(r.charAt(a)))))for(;a{"use strict";gs.exports=C0;var v0=String.fromCharCode,E0=/\w/;function C0(e){return E0.test(typeof e=="number"?v0(e):e.charAt(0))}});var Cs=C((GE,Es)=>{"use strict";Es.exports=b0;function b0(e,r){var t=e.indexOf("*",r),n=e.indexOf("_",r);return n===-1?t:t===-1||n{"use strict";var y0=Re(),A0=vs(),bs=oe(),w0=Cs();ws.exports=As;As.locator=w0;var x0="*",ys="_",k0="\\";function As(e,r,t){var n=this,a=0,u=r.charAt(a),i,o,s,l,c,f,p;if(!(u!==x0&&u!==ys)&&(o=n.options.pedantic,c=u,s=u,f=r.length,a++,l="",u="",!(o&&bs(r.charAt(a)))))for(;a{"use strict";ks.exports=B0;function B0(e,r){return e.indexOf("~~",r)}});var Os=C(($E,Ss)=>{"use strict";var Ts=oe(),T0=Bs();Ss.exports=_s;_s.locator=T0;var ot="~",qs="~~";function _s(e,r,t){var n=this,a="",u="",i="",o="",s,l,c;if(!(!n.options.gfm||r.charAt(0)!==ot||r.charAt(1)!==ot||Ts(r.charAt(2))))for(s=1,l=r.length,c=e.now(),c.column+=2,c.offset+=2;++s{"use strict";Ls.exports=q0;function q0(e,r){return e.indexOf("`",r)}});var Rs=C((HE,Ns)=>{"use strict";var _0=Ps();Ns.exports=Is;Is.locator=_0;var xn=10,kn=32,Bn=96;function Is(e,r,t){for(var n=r.length,a=0,u,i,o,s,l,c;a2&&(s===kn||s===xn)&&(l===kn||l===xn)){for(a++,n--;a{"use strict";Us.exports=S0;function S0(e,r){for(var t=e.indexOf(` +`,r);t>r&&e.charAt(t-1)===" ";)t--;return t}});var Gs=C((JE,Ys)=>{"use strict";var O0=Ms();Ys.exports=zs;zs.locator=O0;var L0=" ",P0=` +`,I0=2;function zs(e,r,t){for(var n=r.length,a=-1,u="",i;++a{"use strict";Vs.exports=N0;function N0(e,r,t){var n=this,a,u,i,o,s,l,c,f,p,d;if(t)return!0;for(a=n.inlineMethods,o=a.length,u=n.inlineTokenizers,i=-1,p=r.length;++i{"use strict";var R0=Ie(),st=fu(),U0=pu(),M0=du(),z0=Gu(),Tn=$u();Hs.exports=$s;function $s(e,r){this.file=r,this.offset={},this.options=R0(this.options),this.setOptions({}),this.inList=!1,this.inBlock=!1,this.inLink=!1,this.atStart=!0,this.toOffset=U0(r).toOffset,this.unescape=M0(this,"escape"),this.decode=z0(this)}var U=$s.prototype;U.setOptions=ea();U.parse=ma();U.options=jt();U.exitStart=st("atStart",!0);U.enterList=st("inList",!1);U.enterLink=st("inLink",!1);U.enterBlock=st("inBlock",!1);U.interruptParagraph=[["thematicBreak"],["list"],["atxHeading"],["fencedCode"],["blockquote"],["html"],["setextHeading",{commonmark:!1}],["definition",{commonmark:!1}]];U.interruptList=[["atxHeading",{pedantic:!1}],["fencedCode",{pedantic:!1}],["thematicBreak",{pedantic:!1}],["definition",{commonmark:!1}]];U.interruptBlockquote=[["indentedCode",{commonmark:!0}],["fencedCode",{commonmark:!0}],["atxHeading",{commonmark:!0}],["setextHeading",{commonmark:!0}],["thematicBreak",{commonmark:!0}],["html",{commonmark:!0}],["list",{commonmark:!0}],["definition",{commonmark:!1}]];U.blockTokenizers={blankLine:ga(),indentedCode:ya(),fencedCode:xa(),blockquote:Sa(),atxHeading:Pa(),thematicBreak:Ra(),list:Ka(),setextHeading:Za(),html:uo(),definition:ho(),table:go(),paragraph:Co()};U.inlineTokenizers={escape:ko(),autoLink:Oo(),url:Go(),email:Xo(),html:es(),link:ss(),reference:fs(),strong:Fs(),emphasis:xs(),deletion:Os(),code:Rs(),break:Gs(),text:js()};U.blockMethods=Ws(U.blockTokenizers);U.inlineMethods=Ws(U.inlineTokenizers);U.tokenizeBlock=Tn("block");U.tokenizeInline=Tn("inline");U.tokenizeFactory=Tn;function Ws(e){var r=[],t;for(t in e)r.push(t);return r}});var Zs=C((ZE,Qs)=>{"use strict";var Y0=cu(),G0=Ie(),Js=Ks();Qs.exports=Xs;Xs.Parser=Js;function Xs(e){var r=this.data("settings"),t=Y0(Js);t.prototype.options=G0(t.prototype.options,r,e),this.Parser=t}});var rc=C((eC,ec)=>{"use strict";ec.exports=V0;function V0(e){if(e)throw e}});var qn=C((rC,tc)=>{tc.exports=function(r){return r!=null&&r.constructor!=null&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}});var fc=C((tC,lc)=>{"use strict";var ct=Object.prototype.hasOwnProperty,cc=Object.prototype.toString,nc=Object.defineProperty,ic=Object.getOwnPropertyDescriptor,uc=function(r){return typeof Array.isArray=="function"?Array.isArray(r):cc.call(r)==="[object Array]"},ac=function(r){if(!r||cc.call(r)!=="[object Object]")return!1;var t=ct.call(r,"constructor"),n=r.constructor&&r.constructor.prototype&&ct.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!t&&!n)return!1;var a;for(a in r);return typeof a>"u"||ct.call(r,a)},oc=function(r,t){nc&&t.name==="__proto__"?nc(r,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):r[t.name]=t.newValue},sc=function(r,t){if(t==="__proto__")if(ct.call(r,t)){if(ic)return ic(r,t).value}else return;return r[t]};lc.exports=function e(){var r,t,n,a,u,i,o=arguments[0],s=1,l=arguments.length,c=!1;for(typeof o=="boolean"&&(c=o,o=arguments[1]||{},s=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});s{"use strict";Dc.exports=e=>{if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let r=Object.getPrototypeOf(e);return r===null||r===Object.prototype}});var dc=C((iC,hc)=>{"use strict";var j0=[].slice;hc.exports=$0;function $0(e,r){var t;return n;function n(){var i=j0.call(arguments,0),o=e.length>i.length,s;o&&i.push(a);try{s=e.apply(null,i)}catch(l){if(o&&t)throw l;return a(l)}o||(s&&typeof s.then=="function"?s.then(u,a):s instanceof Error?a(s):u(s))}function a(){t||(t=!0,r.apply(null,arguments))}function u(i){a(null,i)}}});var Ec=C((uC,vc)=>{"use strict";var Fc=dc();vc.exports=gc;gc.wrap=Fc;var mc=[].slice;function gc(){var e=[],r={};return r.run=t,r.use=n,r;function t(){var a=-1,u=mc.call(arguments,0,-1),i=arguments[arguments.length-1];if(typeof i!="function")throw new Error("Expected function as last argument, not "+i);o.apply(null,[null].concat(u));function o(s){var l=e[++a],c=mc.call(arguments,0),f=c.slice(1),p=u.length,d=-1;if(s){i(s);return}for(;++d{"use strict";var er={}.hasOwnProperty;yc.exports=W0;function W0(e){return!e||typeof e!="object"?"":er.call(e,"position")||er.call(e,"type")?Cc(e.position):er.call(e,"start")||er.call(e,"end")?Cc(e):er.call(e,"line")||er.call(e,"column")?_n(e):""}function _n(e){return(!e||typeof e!="object")&&(e={}),bc(e.line)+":"+bc(e.column)}function Cc(e){return(!e||typeof e!="object")&&(e={}),_n(e.start)+"-"+_n(e.end)}function bc(e){return e&&typeof e=="number"?e:1}});var kc=C((oC,xc)=>{"use strict";var H0=Ac();xc.exports=Sn;function wc(){}wc.prototype=Error.prototype;Sn.prototype=new wc;var ke=Sn.prototype;ke.file="";ke.name="";ke.reason="";ke.message="";ke.stack="";ke.fatal=null;ke.column=null;ke.line=null;function Sn(e,r,t){var n,a,u;typeof r=="string"&&(t=r,r=null),n=K0(t),a=H0(r)||"1:1",u={start:{line:null,column:null},end:{line:null,column:null}},r&&r.position&&(r=r.position),r&&(r.start?(u=r,r=r.start):u.start=r),e.stack&&(this.stack=e.stack,e=e.message),this.message=e,this.name=a,this.reason=e,this.line=r?r.line:null,this.column=r?r.column:null,this.location=u,this.source=n[0],this.ruleId=n[1]}function K0(e){var r=[null,null],t;return typeof e=="string"&&(t=e.indexOf(":"),t===-1?r[1]=e:(r[0]=e.slice(0,t),r[1]=e.slice(t+1))),r}});var Bc=C(rr=>{"use strict";rr.basename=J0;rr.dirname=X0;rr.extname=Q0;rr.join=Z0;rr.sep="/";function J0(e,r){var t=0,n=-1,a,u,i,o;if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');if(wr(e),a=e.length,r===void 0||!r.length||r.length>e.length){for(;a--;)if(e.charCodeAt(a)===47){if(i){t=a+1;break}}else n<0&&(i=!0,n=a+1);return n<0?"":e.slice(t,n)}if(r===e)return"";for(u=-1,o=r.length-1;a--;)if(e.charCodeAt(a)===47){if(i){t=a+1;break}}else u<0&&(i=!0,u=a+1),o>-1&&(e.charCodeAt(a)===r.charCodeAt(o--)?o<0&&(n=a):(o=-1,n=u));return t===n?n=u:n<0&&(n=e.length),e.slice(t,n)}function X0(e){var r,t,n;if(wr(e),!e.length)return".";for(r=-1,n=e.length;--n;)if(e.charCodeAt(n)===47){if(t){r=n;break}}else t||(t=!0);return r<0?e.charCodeAt(0)===47?"/":".":r===1&&e.charCodeAt(0)===47?"//":e.slice(0,r)}function Q0(e){var r=-1,t=0,n=-1,a=0,u,i,o;for(wr(e),o=e.length;o--;){if(i=e.charCodeAt(o),i===47){if(u){t=o+1;break}continue}n<0&&(u=!0,n=o+1),i===46?r<0?r=o:a!==1&&(a=1):r>-1&&(a=-1)}return r<0||n<0||a===0||a===1&&r===n-1&&r===t+1?"":e.slice(r,n)}function Z0(){for(var e=-1,r;++e2){if(s=t.lastIndexOf("/"),s!==t.length-1){s<0?(t="",n=0):(t=t.slice(0,s),n=t.length-1-t.lastIndexOf("/")),a=i,u=0;continue}}else if(t.length){t="",n=0,a=i,u=0;continue}}r&&(t=t.length?t+"/..":"..",n=2)}else t.length?t+="/"+e.slice(a+1,i):t=e.slice(a+1,i),n=i-a-1;a=i,u=0}else o===46&&u>-1?u++:u=-1}return t}function wr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}});var qc=C(Tc=>{"use strict";Tc.cwd=tm;function tm(){return"/"}});var Oc=C((lC,Sc)=>{"use strict";var se=Bc(),nm=qc(),im=qn();Sc.exports=ge;var um={}.hasOwnProperty,On=["history","path","basename","stem","extname","dirname"];ge.prototype.toString=mm;Object.defineProperty(ge.prototype,"path",{get:am,set:om});Object.defineProperty(ge.prototype,"dirname",{get:sm,set:cm});Object.defineProperty(ge.prototype,"basename",{get:lm,set:fm});Object.defineProperty(ge.prototype,"extname",{get:Dm,set:pm});Object.defineProperty(ge.prototype,"stem",{get:hm,set:dm});function ge(e){var r,t;if(!e)e={};else if(typeof e=="string"||im(e))e={contents:e};else if("message"in e&&"messages"in e)return e;if(!(this instanceof ge))return new ge(e);for(this.data={},this.messages=[],this.history=[],this.cwd=nm.cwd(),t=-1;++t-1)throw new Error("`extname` cannot contain multiple dots")}this.path=se.join(this.dirname,this.stem+(e||""))}function hm(){return typeof this.path=="string"?se.basename(this.path,this.extname):void 0}function dm(e){Pn(e,"stem"),Ln(e,"stem"),this.path=se.join(this.dirname||"",e+(this.extname||""))}function mm(e){return(this.contents||"").toString(e)}function Ln(e,r){if(e&&e.indexOf(se.sep)>-1)throw new Error("`"+r+"` cannot be a path: did not expect `"+se.sep+"`")}function Pn(e,r){if(!e)throw new Error("`"+r+"` cannot be empty")}function _c(e,r){if(!e)throw new Error("Setting `"+r+"` requires `path` to be set too")}});var Pc=C((fC,Lc)=>{"use strict";var Fm=kc(),lt=Oc();Lc.exports=lt;lt.prototype.message=gm;lt.prototype.info=Em;lt.prototype.fail=vm;function gm(e,r,t){var n=new Fm(e,r,t);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}function vm(){var e=this.message.apply(this,arguments);throw e.fatal=!0,e}function Em(){var e=this.message.apply(this,arguments);return e.fatal=null,e}});var Nc=C((DC,Ic)=>{"use strict";Ic.exports=Pc()});var $c=C((pC,jc)=>{"use strict";var Rc=rc(),Cm=qn(),ft=fc(),Uc=pc(),Gc=Ec(),xr=Nc();jc.exports=Vc().freeze();var bm=[].slice,ym={}.hasOwnProperty,Am=Gc().use(wm).use(xm).use(km);function wm(e,r){r.tree=e.parse(r.file)}function xm(e,r,t){e.run(r.tree,r.file,n);function n(a,u,i){a?t(a):(r.tree=u,r.file=i,t())}}function km(e,r){var t=e.stringify(r.tree,r.file);t==null||(typeof t=="string"||Cm(t)?("value"in r.file&&(r.file.value=t),r.file.contents=t):r.file.result=t)}function Vc(){var e=[],r=Gc(),t={},n=-1,a;return u.data=o,u.freeze=i,u.attachers=e,u.use=s,u.parse=c,u.stringify=d,u.run=f,u.runSync=p,u.process=D,u.processSync=h,u;function u(){for(var m=Vc(),F=-1;++Fzi,options:()=>Yi,parsers:()=>Mn,printers:()=>Um});var ml=(e,r,t,n)=>{if(!(e&&r==null))return r.replaceAll?r.replaceAll(t,n):t.global?r.replace(t,n):r.split(t).join(n)},N=ml;var Fl=(e,r,t)=>{if(!(e&&r==null))return Array.isArray(r)||typeof r=="string"?r[t<0?r.length+t:t]:r.at(t)},z=Fl;var Ui=Ue(Br(),1);function le(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var G="string",H="array",Ce="cursor",re="indent",te="align",fe="trim",J="group",X="fill",K="if-break",De="indent-if-break",pe="line-suffix",he="line-suffix-boundary",V="line",de="label",ne="break-parent",Tr=new Set([Ce,re,te,fe,J,X,K,De,pe,he,V,de,ne]);function vl(e){if(typeof e=="string")return G;if(Array.isArray(e))return H;if(!e)return;let{type:r}=e;if(Tr.has(r))return r}var Y=vl;var El=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Cl(e){let r=e===null?"null":typeof e;if(r!=="string"&&r!=="object")return`Unexpected doc '${r}', +Expected it to be 'string' or 'object'.`;if(Y(e))throw new Error("doc is valid.");let t=Object.prototype.toString.call(e);if(t!=="[object Object]")return`Unexpected doc '${t}'.`;let n=El([...Tr].map(a=>`'${a}'`));return`Unexpected doc.type '${e.type}'. +Expected it to be ${n}.`}var pt=class extends Error{name="InvalidDocError";constructor(r){super(Cl(r)),this.doc=r}},Te=pt;var Hn={};function bl(e,r,t,n){let a=[e];for(;a.length>0;){let u=a.pop();if(u===Hn){t(a.pop());continue}t&&a.push(u,Hn);let i=Y(u);if(!i)throw new Te(u);if((r==null?void 0:r(u))!==!1)switch(i){case H:case X:{let o=i===H?u:u.parts;for(let s=o.length,l=s-1;l>=0;--l)a.push(o[l]);break}case K:a.push(u.flatContents,u.breakContents);break;case J:if(n&&u.expandedStates)for(let o=u.expandedStates.length,s=o-1;s>=0;--s)a.push(u.expandedStates[s]);else a.push(u.contents);break;case te:case re:case De:case de:case pe:a.push(u.contents);break;case G:case Ce:case fe:case he:case V:case ne:break;default:throw new Te(u)}}}var ht=bl;function yl(e,r){if(typeof e=="string")return r(e);let t=new Map;return n(e);function n(u){if(t.has(u))return t.get(u);let i=a(u);return t.set(u,i),i}function a(u){switch(Y(u)){case H:return r(u.map(n));case X:return r({...u,parts:u.parts.map(n)});case K:return r({...u,breakContents:n(u.breakContents),flatContents:n(u.flatContents)});case J:{let{expandedStates:i,contents:o}=u;return i?(i=i.map(n),o=i[0]):o=n(o),r({...u,contents:o,expandedStates:i})}case te:case re:case De:case de:case pe:return r({...u,contents:n(u.contents)});case G:case Ce:case fe:case he:case V:case ne:return r(u);default:throw new Te(u)}}}function Kn(e){if(e.length>0){let r=z(!1,e,-1);!r.expandedStates&&!r.break&&(r.break="propagated")}return null}function Jn(e){let r=new Set,t=[];function n(u){if(u.type===ne&&Kn(t),u.type===J){if(t.push(u),r.has(u))return!1;r.add(u)}}function a(u){u.type===J&&t.pop().break&&Kn(t)}ht(e,n,a,!0)}function be(e,r=tr){return yl(e,t=>typeof t=="string"?qr(r,t.split(` +`)):t)}var dt=()=>{},qe=dt,mt=dt,Xn=dt;function nr(e){return qe(e),{type:re,contents:e}}function ye(e,r){return qe(r),{type:te,contents:r,n:e}}function Me(e,r={}){return qe(e),mt(r.expandedStates,!0),{type:J,id:r.id,contents:e,break:!!r.shouldBreak,expandedStates:r.expandedStates}}function _e(e){return ye({type:"root"},e)}function ze(e){return Xn(e),{type:X,parts:e}}function Qn(e,r="",t={}){return qe(e),r!==""&&qe(r),{type:K,breakContents:e,flatContents:r,groupId:t.groupId}}var ir={type:ne};var ur={type:V,hard:!0},Al={type:V,hard:!0,literal:!0},_r={type:V},Sr={type:V,soft:!0},P=[ur,ir],tr=[Al,ir];function qr(e,r){qe(e),mt(r);let t=[];for(let n=0;nMath.max(n,a.length/r.length),0)}var Or=wl;function xl(e,r){let t=e.match(new RegExp(`(${le(r)})+`,"gu"));if(t===null)return 0;let n=new Map,a=0;for(let u of t){let i=u.length/r.length;n.set(i,!0),i>a&&(a=i)}for(let u=1;uu?n:t}var ri=kl;var Ft=class extends Error{name="UnexpectedNodeError";constructor(r,t,n="type"){super(`Unexpected ${t} node ${n}: ${JSON.stringify(r[n])}.`),this.node=r}},ti=Ft;var oi=Ue(Br(),1);function Bl(e){return(e==null?void 0:e.type)==="front-matter"}var ni=Bl;var ar=3;function Tl(e){let r=e.slice(0,ar);if(r!=="---"&&r!=="+++")return;let t=e.indexOf(` +`,ar);if(t===-1)return;let n=e.slice(ar,t).trim(),a=e.indexOf(` +${r}`,t),u=n;if(u||(u=r==="+++"?"toml":"yaml"),a===-1&&r==="---"&&u==="yaml"&&(a=e.indexOf(` +...`,t)),a===-1)return;let i=a+1+ar,o=e.charAt(i+1);if(!/\s?/u.test(o))return;let s=e.slice(0,i);return{type:"front-matter",language:u,explicitLanguage:n,value:e.slice(t+1,a),startDelimiter:r,endDelimiter:s.slice(-ar),raw:s}}function ql(e){let r=Tl(e);if(!r)return{content:e};let{raw:t}=r;return{frontMatter:r,content:N(!1,t,/[^\n]/gu," ")+e.slice(t.length)}}var or=ql;var ii=["format","prettier"];function gt(e){let r=`@(${ii.join("|")})`,t=new RegExp([``,`\\{\\s*\\/\\*\\s*${r}\\s*\\*\\/\\s*\\}`,``].join("|"),"mu"),n=e.match(t);return(n==null?void 0:n.index)===0}var ui=e=>gt(or(e).content.trimStart()),ai=e=>{let r=or(e),t=``;return r.frontMatter?`${r.frontMatter.raw} + +${t} + +${r.content}`:`${t} + +${r.content}`};var _l=new Set(["position","raw"]);function si(e,r,t){if((e.type==="front-matter"||e.type==="code"||e.type==="yaml"||e.type==="import"||e.type==="export"||e.type==="jsx")&&delete r.value,e.type==="list"&&delete r.isAligned,(e.type==="list"||e.type==="listItem")&&delete r.spread,e.type==="text")return null;if(e.type==="inlineCode"&&(r.value=N(!1,e.value,` +`," ")),e.type==="wikiLink"&&(r.value=N(!1,e.value.trim(),/[\t\n]+/gu," ")),(e.type==="definition"||e.type==="linkReference"||e.type==="imageReference")&&(r.label=(0,oi.default)(e.label)),(e.type==="link"||e.type==="image")&&e.url&&e.url.includes("("))for(let n of"<>")r.url=N(!1,e.url,n,encodeURIComponent(n));if((e.type==="definition"||e.type==="link"||e.type==="image")&&e.title&&(r.title=N(!1,e.title,/\\(?=["')])/gu,"")),(t==null?void 0:t.type)==="root"&&t.children.length>0&&(t.children[0]===e||ni(t.children[0])&&t.children[1]===e)&&e.type==="html"&>(e.value))return null}si.ignoredProperties=_l;var ci=si;var li=/(?:[\u{2ea}-\u{2eb}\u{1100}-\u{11ff}\u{2e80}-\u{2e99}\u{2e9b}-\u{2ef3}\u{2f00}-\u{2fd5}\u{2ff0}-\u{303f}\u{3041}-\u{3096}\u{3099}-\u{30ff}\u{3105}-\u{312f}\u{3131}-\u{318e}\u{3190}-\u{4dbf}\u{4e00}-\u{9fff}\u{a700}-\u{a707}\u{a960}-\u{a97c}\u{ac00}-\u{d7a3}\u{d7b0}-\u{d7c6}\u{d7cb}-\u{d7fb}\u{f900}-\u{fa6d}\u{fa70}-\u{fad9}\u{fe10}-\u{fe1f}\u{fe30}-\u{fe6f}\u{ff00}-\u{ffef}\u{16fe3}\u{1aff0}-\u{1aff3}\u{1aff5}-\u{1affb}\u{1affd}-\u{1affe}\u{1b000}-\u{1b122}\u{1b132}\u{1b150}-\u{1b152}\u{1b155}\u{1b164}-\u{1b167}\u{1f200}\u{1f250}-\u{1f251}\u{20000}-\u{2a6df}\u{2a700}-\u{2b739}\u{2b740}-\u{2b81d}\u{2b820}-\u{2cea1}\u{2ceb0}-\u{2ebe0}\u{2f800}-\u{2fa1d}\u{30000}-\u{3134a}\u{31350}-\u{323af}])(?:[\u{fe00}-\u{fe0f}\u{e0100}-\u{e01ef}])?/u,Se=/(?:[\u{21}-\u{2f}\u{3a}-\u{40}\u{5b}-\u{60}\u{7b}-\u{7e}]|\p{General_Category=Connector_Punctuation}|\p{General_Category=Dash_Punctuation}|\p{General_Category=Close_Punctuation}|\p{General_Category=Final_Punctuation}|\p{General_Category=Initial_Punctuation}|\p{General_Category=Other_Punctuation}|\p{General_Category=Open_Punctuation})/u;async function Sl(e,r){if(e.language==="yaml"){let t=e.value.trim(),n=t?await r(t,{parser:"yaml"}):"";return _e([e.startDelimiter,e.explicitLanguage,P,n,n?P:"",e.endDelimiter])}}var fi=Sl;var Ol=e=>String(e).split(/[/\\]/u).pop();function Di(e,r){if(!r)return;let t=Ol(r).toLowerCase();return e.find(({filenames:n})=>n==null?void 0:n.some(a=>a.toLowerCase()===t))??e.find(({extensions:n})=>n==null?void 0:n.some(a=>t.endsWith(a)))}function Ll(e,r){if(r)return e.find(({name:t})=>t.toLowerCase()===r)??e.find(({aliases:t})=>t==null?void 0:t.includes(r))??e.find(({extensions:t})=>t==null?void 0:t.includes(`.${r}`))}function Pl(e,r){let t=e.plugins.flatMap(a=>a.languages??[]),n=Ll(t,r.language)??Di(t,r.physicalFile)??Di(t,r.file)??(r.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var pi=Pl;var Il=new Proxy(()=>{},{get:()=>Il});function Oe(e){return e.position.start.offset}function Le(e){return e.position.end.offset}var vt=new Set(["liquidNode","inlineCode","emphasis","esComment","strong","delete","wikiLink","link","linkReference","image","imageReference","footnote","footnoteReference","sentence","whitespace","word","break","inlineMath"]),Pr=new Set([...vt,"tableCell","paragraph","heading"]),Ge="non-cjk",ie="cj-letter",Pe="k-letter",sr="cjk-punctuation",Nl=/\p{Script_Extensions=Hangul}/u;function Ir(e){let r=[],t=e.split(/([\t\n ]+)/u);for(let[a,u]of t.entries()){if(a%2===1){r.push({type:"whitespace",value:/\n/u.test(u)?` +`:" "});continue}if((a===0||a===t.length-1)&&u==="")continue;let i=u.split(new RegExp(`(${li.source})`,"u"));for(let[o,s]of i.entries())if(!((o===0||o===i.length-1)&&s==="")){if(o%2===0){s!==""&&n({type:"word",value:s,kind:Ge,isCJ:!1,hasLeadingPunctuation:Se.test(s[0]),hasTrailingPunctuation:Se.test(z(!1,s,-1))});continue}if(Se.test(s)){n({type:"word",value:s,kind:sr,isCJ:!0,hasLeadingPunctuation:!0,hasTrailingPunctuation:!0});continue}if(Nl.test(s)){n({type:"word",value:s,kind:Pe,isCJ:!1,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1});continue}n({type:"word",value:s,kind:ie,isCJ:!0,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1})}}return r;function n(a){let u=z(!1,r,-1);(u==null?void 0:u.type)==="word"&&!i(Ge,sr)&&![u.value,a.value].some(o=>/\u3000/u.test(o))&&r.push({type:"whitespace",value:""}),r.push(a);function i(o,s){return u.kind===o&&a.kind===s||u.kind===s&&a.kind===o}}}function Ye(e,r){let t=r.originalText.slice(e.position.start.offset,e.position.end.offset),{numberText:n,leadingSpaces:a}=t.match(/^\s*(?\d+)(\.|\))(?\s*)/u).groups;return{number:Number(n),leadingSpaces:a}}function hi(e,r){return!e.ordered||e.children.length<2||Ye(e.children[1],r).number!==1?!1:Ye(e.children[0],r).number!==0?!0:e.children.length>2&&Ye(e.children[2],r).number===1}function Nr(e,r){let{value:t}=e;return e.position.end.offset===r.length&&t.endsWith(` +`)&&r.endsWith(` +`)?t.slice(0,-1):t}function Ae(e,r){return function t(n,a,u){let i={...r(n,a,u)};return i.children&&(i.children=i.children.map((o,s)=>t(o,s,[i,...u]))),i}(e,null,[])}function Et(e){if((e==null?void 0:e.type)!=="link"||e.children.length!==1)return!1;let[r]=e.children;return Oe(e)===Oe(r)&&Le(e)===Le(r)}function Rl(e,r){let{node:t}=e;if(t.type==="code"&&t.lang!==null){let n=pi(r,{language:t.lang});if(n)return async a=>{let u=r.__inJsTemplate?"~":"`",i=u.repeat(Math.max(3,Or(t.value,u)+1)),o={parser:n};t.lang==="ts"||t.lang==="typescript"?o.filepath="dummy.ts":t.lang==="tsx"&&(o.filepath="dummy.tsx");let s=await a(Nr(t,r.originalText),o);return _e([i,t.lang,t.meta?" "+t.meta:"",P,be(s),P,i])}}switch(t.type){case"front-matter":return n=>fi(t,n);case"import":case"export":return n=>n(t.value,{parser:"babel"});case"jsx":return n=>n(`<$>${t.value}`,{parser:"__js_expression",rootMarker:"mdx"})}return null}var di=Rl;var cr=null;function lr(e){if(cr!==null&&typeof cr.property){let r=cr;return cr=lr.prototype=null,r}return cr=lr.prototype=e??Object.create(null),new lr}var Ul=10;for(let e=0;e<=Ul;e++)lr();function Ct(e){return lr(e)}function Ml(e,r="type"){Ct(e);function t(n){let a=n[r],u=e[a];if(!Array.isArray(u))throw Object.assign(new Error(`Missing visitor keys for '${a}'.`),{node:n});return u}return t}var mi=Ml;var zl={"front-matter":[],root:["children"],paragraph:["children"],sentence:["children"],word:[],whitespace:[],emphasis:["children"],strong:["children"],delete:["children"],inlineCode:[],wikiLink:[],link:["children"],image:[],blockquote:["children"],heading:["children"],code:[],html:[],list:["children"],thematicBreak:[],linkReference:["children"],imageReference:[],definition:[],footnote:["children"],footnoteReference:[],footnoteDefinition:["children"],table:["children"],tableCell:["children"],break:[],liquidNode:[],import:[],export:[],esComment:[],jsx:[],math:[],inlineMath:[],tableRow:["children"],listItem:["children"],text:[]},Fi=zl;var Yl=mi(Fi),gi=Yl;function vi(e){switch(e){case"cr":return"\r";case"crlf":return`\r +`;default:return` +`}}var Ei=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE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DD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function Ci(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function bi(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var yi=e=>!(Ci(e)||bi(e));var Gl=/[^\x20-\x7F]/u;function Vl(e){if(!e)return 0;if(!Gl.test(e))return e.length;e=e.replace(Ei()," ");let r=0;for(let t of e){let n=t.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(r+=yi(n)?1:2)}return r}var fr=Vl;var j=Symbol("MODE_BREAK"),ue=Symbol("MODE_FLAT"),Ve=Symbol("cursor"),bt=Symbol("DOC_FILL_PRINTED_LENGTH");function Ai(){return{value:"",length:0,queue:[]}}function jl(e,r){return yt(e,{type:"indent"},r)}function $l(e,r,t){return r===Number.NEGATIVE_INFINITY?e.root||Ai():r<0?yt(e,{type:"dedent"},t):r?r.type==="root"?{...e,root:e}:yt(e,{type:typeof r=="string"?"stringAlign":"numberAlign",n:r},t):e}function yt(e,r,t){let n=r.type==="dedent"?e.queue.slice(0,-1):[...e.queue,r],a="",u=0,i=0,o=0;for(let D of n)switch(D.type){case"indent":c(),t.useTabs?s(1):l(t.tabWidth);break;case"stringAlign":c(),a+=D.n,u+=D.n.length;break;case"numberAlign":i+=1,o+=D.n;break;default:throw new Error(`Unexpected type '${D.type}'`)}return p(),{...e,value:a,length:u,queue:n};function s(D){a+=" ".repeat(D),u+=t.tabWidth*D}function l(D){a+=" ".repeat(D),u+=D}function c(){t.useTabs?f():p()}function f(){i>0&&s(i),d()}function p(){o>0&&l(o),d()}function d(){i=0,o=0}}function At(e){let r=0,t=0,n=e.length;e:for(;n--;){let a=e[n];if(a===Ve){t++;continue}for(let u=a.length-1;u>=0;u--){let i=a[u];if(i===" "||i===" ")r++;else{e[n]=a.slice(0,u+1);break e}}}if(r>0||t>0)for(e.length=n+1;t-- >0;)e.push(Ve);return r}function Rr(e,r,t,n,a,u){if(t===Number.POSITIVE_INFINITY)return!0;let i=r.length,o=[e],s=[];for(;t>=0;){if(o.length===0){if(i===0)return!0;o.push(r[--i]);continue}let{mode:l,doc:c}=o.pop(),f=Y(c);switch(f){case G:s.push(c),t-=fr(c);break;case H:case X:{let p=f===H?c:c.parts,d=c[bt]??0;for(let D=p.length-1;D>=d;D--)o.push({mode:l,doc:p[D]});break}case re:case te:case De:case de:o.push({mode:l,doc:c.contents});break;case fe:t+=At(s);break;case J:{if(u&&c.break)return!1;let p=c.break?j:l,d=c.expandedStates&&p===j?z(!1,c.expandedStates,-1):c.contents;o.push({mode:p,doc:d});break}case K:{let d=(c.groupId?a[c.groupId]||ue:l)===j?c.breakContents:c.flatContents;d&&o.push({mode:l,doc:d});break}case V:if(l===j||c.hard)return!0;c.soft||(s.push(" "),t--);break;case pe:n=!0;break;case he:if(n)return!1;break}}return!1}function wi(e,r){let t={},n=r.printWidth,a=vi(r.endOfLine),u=0,i=[{ind:Ai(),mode:j,doc:e}],o=[],s=!1,l=[],c=0;for(Jn(e);i.length>0;){let{ind:p,mode:d,doc:D}=i.pop();switch(Y(D)){case G:{let h=a!==` +`?N(!1,D,` +`,a):D;o.push(h),i.length>0&&(u+=fr(h));break}case H:for(let h=D.length-1;h>=0;h--)i.push({ind:p,mode:d,doc:D[h]});break;case Ce:if(c>=2)throw new Error("There are too many 'cursor' in doc.");o.push(Ve),c++;break;case re:i.push({ind:jl(p,r),mode:d,doc:D.contents});break;case te:i.push({ind:$l(p,D.n,r),mode:d,doc:D.contents});break;case fe:u-=At(o);break;case J:switch(d){case ue:if(!s){i.push({ind:p,mode:D.break?j:ue,doc:D.contents});break}case j:{s=!1;let h={ind:p,mode:ue,doc:D.contents},m=n-u,F=l.length>0;if(!D.break&&Rr(h,i,m,F,t))i.push(h);else if(D.expandedStates){let y=z(!1,D.expandedStates,-1);if(D.break){i.push({ind:p,mode:j,doc:y});break}else for(let E=1;E=D.expandedStates.length){i.push({ind:p,mode:j,doc:y});break}else{let B=D.expandedStates[E],b={ind:p,mode:ue,doc:B};if(Rr(b,i,m,F,t)){i.push(b);break}}}else i.push({ind:p,mode:j,doc:D.contents});break}}D.id&&(t[D.id]=z(!1,i,-1).mode);break;case X:{let h=n-u,m=D[bt]??0,{parts:F}=D,y=F.length-m;if(y===0)break;let E=F[m+0],B=F[m+1],b={ind:p,mode:ue,doc:E},g={ind:p,mode:j,doc:E},A=Rr(b,[],h,l.length>0,t,!0);if(y===1){A?i.push(b):i.push(g);break}let w={ind:p,mode:ue,doc:B},v={ind:p,mode:j,doc:B};if(y===2){A?i.push(w,b):i.push(v,g);break}let x=F[m+2],k={ind:p,mode:d,doc:{...D,[bt]:m+2}};Rr({ind:p,mode:ue,doc:[E,B,x]},[],h,l.length>0,t,!0)?i.push(k,w,b):A?i.push(k,v,b):i.push(k,v,g);break}case K:case De:{let h=D.groupId?t[D.groupId]:d;if(h===j){let m=D.type===K?D.breakContents:D.negate?D.contents:nr(D.contents);m&&i.push({ind:p,mode:d,doc:m})}if(h===ue){let m=D.type===K?D.flatContents:D.negate?nr(D.contents):D.contents;m&&i.push({ind:p,mode:d,doc:m})}break}case pe:l.push({ind:p,mode:d,doc:D.contents});break;case he:l.length>0&&i.push({ind:p,mode:d,doc:ur});break;case V:switch(d){case ue:if(D.hard)s=!0;else{D.soft||(o.push(" "),u+=1);break}case j:if(l.length>0){i.push({ind:p,mode:d,doc:D},...l.reverse()),l.length=0;break}D.literal?p.root?(o.push(a,p.root.value),u=p.root.length):(o.push(a),u=0):(u-=At(o),o.push(a+p.value),u=p.length);break}break;case de:i.push({ind:p,mode:d,doc:D.contents});break;case ne:break;default:throw new Te(D)}i.length===0&&l.length>0&&(i.push(...l.reverse()),l.length=0)}let f=o.indexOf(Ve);if(f!==-1){let p=o.indexOf(Ve,f+1);if(p===-1)return{formatted:o.filter(m=>m!==Ve).join("")};let d=o.slice(0,f).join(""),D=o.slice(f+1,p).join(""),h=o.slice(p+1).join("");return{formatted:d+D+h,cursorNodeStart:d.length,cursorNodeText:D}}return{formatted:o.join("")}}function xi(e,r,t){let{node:n}=e,a=[],u=e.map(()=>e.map(({index:f})=>{let p=wi(t(),r).formatted,d=fr(p);return a[f]=Math.max(a[f]??3,d),{text:p,width:d}},"children"),"children"),i=s(!1);if(r.proseWrap!=="never")return[ir,i];let o=s(!0);return[ir,Me(Qn(o,i))];function s(f){return qr(ur,[c(u[0],f),l(f),...u.slice(1).map(p=>c(p,f))].map(p=>`| ${p.join(" | ")} |`))}function l(f){return a.map((p,d)=>{let D=n.align[d],h=D==="center"||D==="left"?":":"-",m=D==="center"||D==="right"?":":"-",F=f?"-":"-".repeat(p-2);return`${h}${F}${m}`})}function c(f,p){return f.map(({text:d,width:D},h)=>{if(p)return d;let m=a[h]-D,F=n.align[h],y=0;F==="right"?y=m:F==="center"&&(y=Math.floor(m/2));let E=m-y;return`${" ".repeat(y)}${d}${" ".repeat(E)}`})}}function ki(e,r,t){let n=e.map(t,"children");return Wl(n)}function Wl(e){let r=[""];return function t(n){for(let a of n){let u=Y(a);if(u===H){t(a);continue}let i=a,o=[];u===X&&([i,...o]=a.parts),r.push([r.pop(),i],...o)}}(e),ze(r)}var Q,wt=class{constructor(r){jn(this,Q);$n(this,Q,new Set(r))}getLeadingWhitespaceCount(r){let t=ce(this,Q),n=0;for(let a=0;a=0&&t.has(r.charAt(a));a--)n++;return n}getLeadingWhitespace(r){let t=this.getLeadingWhitespaceCount(r);return r.slice(0,t)}getTrailingWhitespace(r){let t=this.getTrailingWhitespaceCount(r);return r.slice(r.length-t)}hasLeadingWhitespace(r){return ce(this,Q).has(r.charAt(0))}hasTrailingWhitespace(r){return ce(this,Q).has(z(!1,r,-1))}trimStart(r){let t=this.getLeadingWhitespaceCount(r);return r.slice(t)}trimEnd(r){let t=this.getTrailingWhitespaceCount(r);return r.slice(0,r.length-t)}trim(r){return this.trimEnd(this.trimStart(r))}split(r,t=!1){let n=`[${le([...ce(this,Q)].join(""))}]+`,a=new RegExp(t?`(${n})`:n,"u");return r.split(a)}hasWhitespaceCharacter(r){let t=ce(this,Q);return Array.prototype.some.call(r,n=>t.has(n))}hasNonWhitespaceCharacter(r){let t=ce(this,Q);return Array.prototype.some.call(r,n=>!t.has(n))}isWhitespaceOnly(r){let t=ce(this,Q);return Array.prototype.every.call(r,n=>t.has(n))}};Q=new WeakMap;var Bi=wt;var Hl=[" ",` +`,"\f","\r"," "],Kl=new Bi(Hl),xt=Kl;var Jl=/^.$/su;function Xl(e,r){return e=Ql(e,r),e=ef(e),e=tf(e,r),e=nf(e,r),e=rf(e),e}function Ql(e,r){return Ae(e,t=>t.type!=="text"||t.value==="*"||t.value==="_"||!Jl.test(t.value)||t.position.end.offset-t.position.start.offset===t.value.length?t:{...t,value:r.originalText.slice(t.position.start.offset,t.position.end.offset)})}function Zl(e,r,t){return Ae(e,n=>{if(!n.children)return n;let a=n.children.reduce((u,i)=>{let o=z(!1,u,-1);return o&&r(o,i)?u.splice(-1,1,t(o,i)):u.push(i),u},[]);return{...n,children:a}})}function ef(e){return Zl(e,(r,t)=>r.type==="text"&&t.type==="text",(r,t)=>({type:"text",value:r.value+t.value,position:{start:r.position.start,end:t.position.end}}))}function rf(e){return Ae(e,(r,t,[n])=>{if(r.type!=="text")return r;let{value:a}=r;return n.type==="paragraph"&&(t===0&&(a=xt.trimStart(a)),t===n.children.length-1&&(a=xt.trimEnd(a))),{type:"sentence",position:r.position,children:Ir(a)}})}function tf(e,r){return Ae(e,(t,n,a)=>{if(t.type==="code"){let u=/^\n?(?: {4,}|\t)/u.test(r.originalText.slice(t.position.start.offset,t.position.end.offset));if(t.isIndented=u,u)for(let i=0;i{if(a.type==="list"&&a.children.length>0){for(let o=0;o1)return!0;let s=t(u);if(s===-1)return!1;if(a.children.length===1)return s%r.tabWidth===0;let l=t(i);return s!==l?!1:s%r.tabWidth===0?!0:Ye(i,r).leadingSpaces.length>1}}var Ti=Xl;function qi(e,r){let t=[""];return e.each(()=>{let{node:n}=e,a=r();switch(n.type){case"whitespace":if(Y(a)!==G){t.push(a,"");break}default:t.push([t.pop(),a])}},"children"),ze(t)}var uf=new Set(["heading","tableCell","link","wikiLink"]),_i=new Set("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~");function af({parent:e}){if(e.usesCJSpaces===void 0){let r={" ":0,"":0},{children:t}=e;for(let n=1;nr[""]}return e.usesCJSpaces}function of(e,r){if(r)return!0;let{previous:t,next:n}=e;if(!t||!n)return!0;let a=t.kind,u=n.kind;return Si(a)&&Si(u)||a===Pe&&u===ie||u===Pe&&a===ie?!0:a===sr||u===sr||a===ie&&u===ie?!1:_i.has(n.value[0])||_i.has(z(!1,t.value,-1))?!0:t.hasTrailingPunctuation||n.hasLeadingPunctuation?!1:af(e)}function Si(e){return e===Ge||e===Pe}function sf(e,r,t,n){if(t!=="always"||e.hasAncestor(i=>uf.has(i.type)))return!1;if(n)return r!=="";let{previous:a,next:u}=e;return!a||!u?!0:r===""?!1:a.kind===Pe&&u.kind===ie||u.kind===Pe&&a.kind===ie?!0:!(a.isCJ||u.isCJ)}function kt(e,r,t,n){if(t==="preserve"&&r===` +`)return P;let a=r===" "||r===` +`&&of(e,n);return sf(e,r,t,n)?a?_r:Sr:a?" ":""}var cf=new Set(["listItem","definition"]);function lf(e,r,t){var a,u;let{node:n}=e;if(mf(e)){let i=[""],o=Ir(r.originalText.slice(n.position.start.offset,n.position.end.offset));for(let s of o){if(s.type==="word"){i.push([i.pop(),s.value]);continue}let l=kt(e,s.value,r.proseWrap,!0);if(Y(l)===G){i.push([i.pop(),l]);continue}i.push(l,"")}return ze(i)}switch(n.type){case"front-matter":return r.originalText.slice(n.position.start.offset,n.position.end.offset);case"root":return n.children.length===0?"":[pf(e,r,t),P];case"paragraph":return ki(e,r,t);case"sentence":return qi(e,t);case"word":{let i=N(!1,N(!1,n.value,"*",String.raw`\*`),new RegExp([`(^|${Se.source})(_+)`,`(_+)(${Se.source}|$)`].join("|"),"gu"),(l,c,f,p,d)=>N(!1,f?`${c}${f}`:`${p}${d}`,"_",String.raw`\_`)),o=(l,c,f)=>l.type==="sentence"&&f===0,s=(l,c,f)=>Et(l.children[f-1]);return i!==n.value&&(e.match(void 0,o,s)||e.match(void 0,o,(l,c,f)=>l.type==="emphasis"&&f===0,s))&&(i=i.replace(/^(\\?[*_])+/u,l=>N(!1,l,"\\",""))),i}case"whitespace":{let{next:i}=e,o=i&&/^>|^(?:[*+-]|#{1,6}|\d+[).])$/u.test(i.value)?"never":r.proseWrap;return kt(e,n.value,o)}case"emphasis":{let i;if(Et(n.children[0]))i=r.originalText[n.position.start.offset];else{let{previous:o,next:s}=e;i=(o==null?void 0:o.type)==="sentence"&&((a=z(!1,o.children,-1))==null?void 0:a.type)==="word"&&!z(!1,o.children,-1).hasTrailingPunctuation||(s==null?void 0:s.type)==="sentence"&&((u=s.children[0])==null?void 0:u.type)==="word"&&!s.children[0].hasLeadingPunctuation||e.hasAncestor(c=>c.type==="emphasis")?"*":"_"}return[i,$(e,r,t),i]}case"strong":return["**",$(e,r,t),"**"];case"delete":return["~~",$(e,r,t),"~~"];case"inlineCode":{let i=r.proseWrap==="preserve"?n.value:N(!1,n.value,` +`," "),o=Zn(i,"`"),s="`".repeat(o||1),l=i.startsWith("`")||i.endsWith("`")||/^[\n ]/u.test(i)&&/[\n ]$/u.test(i)&&/[^\n ]/u.test(i)?" ":"";return[s,l,i,l,s]}case"wikiLink":{let i="";return r.proseWrap==="preserve"?i=n.value:i=N(!1,n.value,/[\t\n]+/gu," "),["[[",i,"]]"]}case"link":switch(r.originalText[n.position.start.offset]){case"<":{let i="mailto:";return["<",n.url.startsWith(i)&&r.originalText.slice(n.position.start.offset+1,n.position.start.offset+1+i.length)!==i?n.url.slice(i.length):n.url,">"]}case"[":return["[",$(e,r,t),"](",Bt(n.url,")"),Ur(n.title,r),")"];default:return r.originalText.slice(n.position.start.offset,n.position.end.offset)}case"image":return["![",n.alt||"","](",Bt(n.url,")"),Ur(n.title,r),")"];case"blockquote":return["> ",ye("> ",$(e,r,t))];case"heading":return["#".repeat(n.depth)+" ",$(e,r,t)];case"code":{if(n.isIndented){let s=" ".repeat(4);return ye(s,[s,be(n.value,P)])}let i=r.__inJsTemplate?"~":"`",o=i.repeat(Math.max(3,Or(n.value,i)+1));return[o,n.lang||"",n.meta?" "+n.meta:"",P,be(Nr(n,r.originalText),P),P,o]}case"html":{let{parent:i,isLast:o}=e,s=i.type==="root"&&o?n.value.trimEnd():n.value,l=/^$/su.test(s);return be(s,l?P:_e(tr))}case"list":{let i=Li(n,e.parent),o=hi(n,r);return $(e,r,t,{processor(s){let l=f(),c=s.node;if(c.children.length===2&&c.children[1].type==="html"&&c.children[0].position.start.column!==c.children[1].position.start.column)return[l,Oi(s,r,t,l)];return[l,ye(" ".repeat(l.length),Oi(s,r,t,l))];function f(){let p=n.ordered?(s.isFirst?n.start:o?1:n.start+s.index)+(i%2===0?". ":") "):i%2===0?"- ":"* ";return(n.isAligned||n.hasIndentedCodeblock)&&n.ordered?ff(p,r):p}}})}case"thematicBreak":{let{ancestors:i}=e,o=i.findIndex(l=>l.type==="list");return o===-1?"---":Li(i[o],i[o+1])%2===0?"***":"---"}case"linkReference":return["[",$(e,r,t),"]",n.referenceType==="full"?Tt(n):n.referenceType==="collapsed"?"[]":""];case"imageReference":switch(n.referenceType){case"full":return["![",n.alt||"","]",Tt(n)];default:return["![",n.alt,"]",n.referenceType==="collapsed"?"[]":""]}case"definition":{let i=r.proseWrap==="always"?_r:" ";return Me([Tt(n),":",nr([i,Bt(n.url),n.title===null?"":[i,Ur(n.title,r,!1)]])])}case"footnote":return["[^",$(e,r,t),"]"];case"footnoteReference":return Ri(n);case"footnoteDefinition":{let i=n.children.length===1&&n.children[0].type==="paragraph"&&(r.proseWrap==="never"||r.proseWrap==="preserve"&&n.children[0].position.start.line===n.children[0].position.end.line);return[Ri(n),": ",i?$(e,r,t):Me([ye(" ".repeat(4),$(e,r,t,{processor:({isFirst:o})=>o?Me([Sr,t()]):t()}))])]}case"table":return xi(e,r,t);case"tableCell":return $(e,r,t);case"break":return/\s/u.test(r.originalText[n.position.start.offset])?[" ",_e(tr)]:["\\",P];case"liquidNode":return be(n.value,P);case"import":case"export":case"jsx":return n.value;case"esComment":return["{/* ",n.value," */}"];case"math":return["$$",P,n.value?[be(n.value,P),P]:"","$$"];case"inlineMath":return r.originalText.slice(Oe(n),Le(n));case"tableRow":case"listItem":case"text":default:throw new ti(n,"Markdown")}}function Oi(e,r,t,n){let{node:a}=e,u=a.checked===null?"":a.checked?"[x] ":"[ ] ";return[u,$(e,r,t,{processor({node:i,isFirst:o}){if(o&&i.type!=="list")return ye(" ".repeat(u.length),t());let s=" ".repeat(gf(r.tabWidth-n.length,0,3));return[s,ye(s,t())]}})]}function ff(e,r){let t=n();return e+" ".repeat(t>=4?0:t);function n(){let a=e.length%r.tabWidth;return a===0?0:r.tabWidth-a}}function Li(e,r){return Df(e,r,t=>t.ordered===e.ordered)}function Df(e,r,t){let n=-1;for(let a of r.children)if(a.type===e.type&&t(a)?n++:n=-1,a===e)return n}function pf(e,r,t){let n=[],a=null,{children:u}=e.node;for(let[i,o]of u.entries())switch(qt(o)){case"start":a===null&&(a={index:i,offset:o.position.end.offset});break;case"end":a!==null&&(n.push({start:a,end:{index:i,offset:o.position.start.offset}}),a=null);break;default:break}return $(e,r,t,{processor({index:i}){if(n.length>0){let o=n[0];if(i===o.start.index)return[Pi(u[o.start.index]),r.originalText.slice(o.start.offset,o.end.offset),Pi(u[o.end.index])];if(o.start.index{let i=a(e);i!==!1&&(u.length>0&&hf(e)&&(u.push(P),(df(e,r)||Ni(e))&&u.push(P),Ni(e)&&u.push(P)),u.push(i))},"children"),u}function Pi(e){if(e.type==="html")return e.value;if(e.type==="paragraph"&&Array.isArray(e.children)&&e.children.length===1&&e.children[0].type==="esComment")return["{/* ",e.children[0].value," */}"]}function qt(e){let r;if(e.type==="html")r=e.value.match(/^$/u);else{let t;e.type==="esComment"?t=e:e.type==="paragraph"&&e.children.length===1&&e.children[0].type==="esComment"&&(t=e.children[0]),t&&(r=t.value.match(/^prettier-ignore(?:-(start|end))?$/u))}return r?r[1]||"next":!1}function hf({node:e,parent:r}){let t=vt.has(e.type),n=e.type==="html"&&Pr.has(r.type);return!t&&!n}function Ii(e,r){return e.type==="listItem"&&(e.spread||r.originalText.charAt(e.position.end.offset-1)===` +`)}function df({node:e,previous:r,parent:t},n){if(Ii(r,n))return!0;let i=r.type===e.type&&cf.has(e.type),o=t.type==="listItem"&&!Ii(t,n),s=qt(r)==="next",l=e.type==="html"&&r.type==="html"&&r.position.end.line+1===e.position.start.line,c=e.type==="html"&&t.type==="listItem"&&r.type==="paragraph"&&r.position.end.line+1===e.position.start.line;return!(i||o||s||l||c)}function Ni({node:e,previous:r}){let t=r.type==="list",n=e.type==="code"&&e.isIndented;return t&&n}function mf(e){let r=e.findAncestor(t=>t.type==="linkReference"||t.type==="imageReference");return r&&(r.type!=="linkReference"||r.referenceType!=="full")}var Ff=(e,r)=>{for(let t of r)e=N(!1,e,t,encodeURIComponent(t));return e};function Bt(e,r=[]){let t=[" ",...Array.isArray(r)?r:[r]];return new RegExp(t.map(n=>le(n)).join("|"),"u").test(e)?`<${Ff(e,"<>")}>`:e}function Ur(e,r,t=!0){if(!e)return"";if(t)return" "+Ur(e,r,!1);if(e=N(!1,e,/\\(?=["')])/gu,""),e.includes('"')&&e.includes("'")&&!e.includes(")"))return`(${e})`;let n=ri(e,r.singleQuote);return e=N(!1,e,"\\","\\\\"),e=N(!1,e,n,`\\${n}`),`${n}${e}${n}`}function gf(e,r,t){return Math.max(r,Math.min(e,t))}function vf(e){return e.index>0&&qt(e.previous)==="next"}function Tt(e){return`[${(0,Ui.default)(e.label)}]`}function Ri(e){return`[^${e.label}]`}var Ef={preprocess:Ti,print:lf,embed:di,massageAstNode:ci,hasPrettierIgnore:vf,insertPragma:ai,getVisitorKeys:gi},Mi=Ef;var zi=[{linguistLanguageId:222,name:"Markdown",type:"prose",color:"#083fa1",aliases:["md","pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".md",".livemd",".markdown",".mdown",".mdwn",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],filenames:["contents.lr","README"],tmScope:"text.md",parsers:["markdown"],vscodeLanguageIds:["markdown"]},{linguistLanguageId:222,name:"MDX",type:"prose",color:"#083fa1",aliases:["md","pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".mdx"],filenames:[],tmScope:"text.md",parsers:["mdx"],vscodeLanguageIds:["mdx"]}];var _t={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Cf={proseWrap:_t.proseWrap,singleQuote:_t.singleQuote},Yi=Cf;var Mn={};Yn(Mn,{markdown:()=>Nm,mdx:()=>Rm,remark:()=>Nm});var il=Ue(Vi(),1),ul=Ue(iu(),1),al=Ue(Zs(),1),ol=Ue($c(),1);var Tm=/^import\s/u,qm=/^export\s/u,Wc=String.raw`[a-z][a-z0-9]*(\.[a-z][a-z0-9]*)*|`,Hc=/|/u,_m=/^\{\s*\/\*(.*)\*\/\s*\}/u,Sm=` + +`,Kc=e=>Tm.test(e),Un=e=>qm.test(e),Jc=(e,r)=>{let t=r.indexOf(Sm),n=r.slice(0,t);if(Un(n)||Kc(n))return e(n)({type:Un(n)?"export":"import",value:n})},Xc=(e,r)=>{let t=_m.exec(r);if(t)return e(t[0])({type:"esComment",value:t[1].trim()})};Jc.locator=e=>Un(e)||Kc(e)?-1:1;Xc.locator=(e,r)=>e.indexOf("{",r);var Qc=function(){let{Parser:e}=this,{blockTokenizers:r,blockMethods:t,inlineTokenizers:n,inlineMethods:a}=e.prototype;r.esSyntax=Jc,n.esComment=Xc,t.splice(t.indexOf("paragraph"),0,"esSyntax"),a.splice(a.indexOf("text"),0,"esComment")};var Om=function(){let e=this.Parser.prototype;e.blockMethods=["frontMatter",...e.blockMethods],e.blockTokenizers.frontMatter=r;function r(t,n){let a=or(n);if(a.frontMatter)return t(a.frontMatter.raw)(a.frontMatter)}r.onlyAtStart=!0},Zc=Om;function Lm(){return e=>Ae(e,(r,t,[n])=>r.type!=="html"||Hc.test(r.value)||Pr.has(n.type)?r:{...r,type:"jsx"})}var el=Lm;var Pm=function(){let e=this.Parser.prototype,r=e.inlineMethods;r.splice(r.indexOf("text"),0,"liquid"),e.inlineTokenizers.liquid=t;function t(n,a){let u=a.match(/^(\{%.*?%\}|\{\{.*?\}\})/su);if(u)return n(u[0])({type:"liquidNode",value:u[0]})}t.locator=function(n,a){return n.indexOf("{",a)}},rl=Pm;var Im=function(){let e="wikiLink",r=/^\[\[(?.+?)\]\]/su,t=this.Parser.prototype,n=t.inlineMethods;n.splice(n.indexOf("link"),0,e),t.inlineTokenizers.wikiLink=a;function a(u,i){let o=r.exec(i);if(o){let s=o.groups.linkContents.trim();return u(o[0])({type:e,value:s})}}a.locator=function(u,i){return u.indexOf("[",i)}},tl=Im;function sl({isMDX:e}){return r=>{let t=(0,ol.default)().use(al.default,{commonmark:!0,...e&&{blocks:[Wc]}}).use(il.default).use(Zc).use(ul.default).use(e?Qc:nl).use(rl).use(e?el:nl).use(tl);return t.run(t.parse(r))}}function nl(){}var cl={astFormat:"mdast",hasPragma:ui,locStart:Oe,locEnd:Le},Nm={...cl,parse:sl({isMDX:!1})},Rm={...cl,parse:sl({isMDX:!0})};var Um={mdast:Mi};return dl(Mm);}); \ No newline at end of file diff --git a/node_modules/prettier/plugins/markdown.mjs b/node_modules/prettier/plugins/markdown.mjs new file mode 100644 index 0000000..17e0707 --- /dev/null +++ b/node_modules/prettier/plugins/markdown.mjs @@ -0,0 +1,63 @@ +var ll=Object.create;var Dt=Object.defineProperty;var fl=Object.getOwnPropertyDescriptor;var Dl=Object.getOwnPropertyNames;var pl=Object.getPrototypeOf,hl=Object.prototype.hasOwnProperty;var Yn=e=>{throw TypeError(e)};var C=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Gn=(e,r)=>{for(var t in r)Dt(e,t,{get:r[t],enumerable:!0})},dl=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of Dl(r))!hl.call(e,a)&&a!==t&&Dt(e,a,{get:()=>r[a],enumerable:!(n=fl(r,a))||n.enumerable});return e};var Ue=(e,r,t)=>(t=e!=null?ll(pl(e)):{},dl(r||!e||!e.__esModule?Dt(t,"default",{value:e,enumerable:!0}):t,e));var Vn=(e,r,t)=>r.has(e)||Yn("Cannot "+t);var ce=(e,r,t)=>(Vn(e,r,"read from private field"),t?t.call(e):r.get(e)),jn=(e,r,t)=>r.has(e)?Yn("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,t),$n=(e,r,t,n)=>(Vn(e,r,"write to private field"),n?n.call(e,t):r.set(e,t),t);var kr=C((Gm,Wn)=>{"use strict";Wn.exports=gl;function gl(e){return String(e).replace(/\s+/g," ")}});var Vi=C((Bv,Gi)=>{"use strict";Gi.exports=xf;var Dr=9,Ur=10,je=32,bf=33,yf=58,$e=91,Af=92,St=93,pr=94,Mr=96,zr=4,wf=1024;function xf(e){var r=this.Parser,t=this.Compiler;kf(r)&&Tf(r,e),Bf(t)&&qf(t)}function kf(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function Bf(e){return!!(e&&e.prototype&&e.prototype.visitors)}function Tf(e,r){for(var t=r||{},n=e.prototype,a=n.blockTokenizers,u=n.inlineTokenizers,i=n.blockMethods,o=n.inlineMethods,s=a.definition,l=u.reference,c=[],f=-1,p=i.length,d;++fzr&&(Z=void 0,ve=T);else{if(Z0&&(M=Ee[k-1],M.contentStart===M.contentEnd);)k--;for(Be=b(g.slice(0,M.contentEnd));++T{Lt.isRemarkParser=Sf;Lt.isRemarkCompiler=Of;function Sf(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function Of(e){return!!(e&&e.prototype&&e.prototype.visitors)}});var Xi=C((qv,Ji)=>{var ji=Pt();Ji.exports=Nf;var $i=9,Wi=32,Yr=36,Lf=48,Pf=57,Hi=92,If=["math","math-inline"],Ki="math-display";function Nf(e){let r=this.Parser,t=this.Compiler;ji.isRemarkParser(r)&&Rf(r,e),ji.isRemarkCompiler(t)&&Uf(t,e)}function Rf(e,r){let t=e.prototype,n=t.inlineMethods;u.locator=a,t.inlineTokenizers.math=u,n.splice(n.indexOf("text"),0,"math");function a(i,o){return i.indexOf("$",o)}function u(i,o,s){let l=o.length,c=!1,f=!1,p=0,d,D,h,m,F,y,E;if(o.charCodeAt(p)===Hi&&(f=!0,p++),o.charCodeAt(p)===Yr){if(p++,f)return s?!0:i(o.slice(0,p))({type:"text",value:"$"});if(o.charCodeAt(p)===Yr&&(c=!0,p++),h=o.charCodeAt(p),!(h===Wi||h===$i)){for(m=p;pPf)&&(!c||h===Yr)){F=p-1,p++,c&&p++,y=p;break}}else D===Hi&&(p++,h=o.charCodeAt(p+1));p++}if(y!==void 0)return s?!0:(E=o.slice(m,F+1),i(o.slice(0,y))({type:"inlineMath",value:E,data:{hName:"span",hProperties:{className:If.concat(c&&r.inlineMathDouble?[Ki]:[])},hChildren:[{type:"text",value:E}]}}))}}}}function Uf(e){let r=e.prototype;r.visitors.inlineMath=t;function t(n){let a="$";return(n.data&&n.data.hProperties&&n.data.hProperties.className||[]).includes(Ki)&&(a="$$"),a+n.value+a}}});var tu=C((_v,ru)=>{var Qi=Pt();ru.exports=Gf;var Zi=10,hr=32,It=36,eu=` +`,Mf="$",zf=2,Yf=["math","math-display"];function Gf(){let e=this.Parser,r=this.Compiler;Qi.isRemarkParser(e)&&Vf(e),Qi.isRemarkCompiler(r)&&jf(r)}function Vf(e){let r=e.prototype,t=r.blockMethods,n=r.interruptParagraph,a=r.interruptList,u=r.interruptBlockquote;r.blockTokenizers.math=i,t.splice(t.indexOf("fencedCode")+1,0,"math"),n.splice(n.indexOf("fencedCode")+1,0,["math"]),a.splice(a.indexOf("fencedCode")+1,0,["math"]),u.splice(u.indexOf("fencedCode")+1,0,["math"]);function i(o,s,l){var c=s.length,f=0;let p,d,D,h,m,F,y,E,B,b,g;for(;fb&&s.charCodeAt(h-1)===hr;)h--;for(;h>b&&s.charCodeAt(h-1)===It;)B++,h--;for(F<=B&&s.indexOf(Mf,b)===h&&(E=!0,g=h);b<=g&&b-fb&&s.charCodeAt(g-1)===hr;)g--;if((!E||b!==g)&&d.push(s.slice(b,g)),E)break;f=D+1,D=s.indexOf(eu,f+1),D=D===-1?c:D}return d=d.join(` +`),o(s.slice(0,D))({type:"math",value:d,data:{hName:"div",hProperties:{className:Yf.concat()},hChildren:[{type:"text",value:d}]}})}}}}function jf(e){let r=e.prototype;r.visitors.math=t;function t(n){return`$$ +`+n.value+` +$$`}}});var iu=C((Sv,nu)=>{var $f=Xi(),Wf=tu();nu.exports=Hf;function Hf(e){var r=e||{};Wf.call(this,r),$f.call(this,r)}});var Ie=C((Ov,uu)=>{uu.exports=Jf;var Kf=Object.prototype.hasOwnProperty;function Jf(){for(var e={},r=0;r{typeof Object.create=="function"?Nt.exports=function(r,t){t&&(r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:Nt.exports=function(r,t){if(t){r.super_=t;var n=function(){};n.prototype=t.prototype,r.prototype=new n,r.prototype.constructor=r}}});var cu=C((Pv,su)=>{"use strict";var Xf=Ie(),ou=au();su.exports=Qf;function Qf(e){var r,t,n;ou(u,e),ou(a,u),r=u.prototype;for(t in r)n=r[t],n&&typeof n=="object"&&(r[t]="concat"in n?n.concat():Xf(n));return u;function a(i){return e.apply(this,i)}function u(){return this instanceof u?e.apply(this,arguments):new a(arguments)}}});var fu=C((Iv,lu)=>{"use strict";lu.exports=Zf;function Zf(e,r,t){return n;function n(){var a=t||this,u=a[e];return a[e]=!r,i;function i(){a[e]=u}}}});var pu=C((Nv,Du)=>{"use strict";Du.exports=eD;function eD(e){for(var r=String(e),t=[],n=/\r?\n|\r/g;n.exec(r);)t.push(n.lastIndex);return t.push(r.length+1),{toPoint:a,toPosition:a,toOffset:u};function a(i){var o=-1;if(i>-1&&ii)return{line:o+1,column:i-(t[o-1]||0)+1,offset:i}}return{}}function u(i){var o=i&&i.line,s=i&&i.column,l;return!isNaN(o)&&!isNaN(s)&&o-1 in t&&(l=(t[o-2]||0)+s-1||0),l>-1&&l{"use strict";hu.exports=rD;var Rt="\\";function rD(e,r){return t;function t(n){for(var a=0,u=n.indexOf(Rt),i=e[r],o=[],s;u!==-1;)o.push(n.slice(a,u)),a=u+1,s=n.charAt(a),(!s||i.indexOf(s)===-1)&&o.push(Rt),u=n.indexOf(Rt,a+1);return o.push(n.slice(a)),o.join("")}}});var mu=C((Uv,tD)=>{tD.exports={AElig:"\xC6",AMP:"&",Aacute:"\xC1",Acirc:"\xC2",Agrave:"\xC0",Aring:"\xC5",Atilde:"\xC3",Auml:"\xC4",COPY:"\xA9",Ccedil:"\xC7",ETH:"\xD0",Eacute:"\xC9",Ecirc:"\xCA",Egrave:"\xC8",Euml:"\xCB",GT:">",Iacute:"\xCD",Icirc:"\xCE",Igrave:"\xCC",Iuml:"\xCF",LT:"<",Ntilde:"\xD1",Oacute:"\xD3",Ocirc:"\xD4",Ograve:"\xD2",Oslash:"\xD8",Otilde:"\xD5",Ouml:"\xD6",QUOT:'"',REG:"\xAE",THORN:"\xDE",Uacute:"\xDA",Ucirc:"\xDB",Ugrave:"\xD9",Uuml:"\xDC",Yacute:"\xDD",aacute:"\xE1",acirc:"\xE2",acute:"\xB4",aelig:"\xE6",agrave:"\xE0",amp:"&",aring:"\xE5",atilde:"\xE3",auml:"\xE4",brvbar:"\xA6",ccedil:"\xE7",cedil:"\xB8",cent:"\xA2",copy:"\xA9",curren:"\xA4",deg:"\xB0",divide:"\xF7",eacute:"\xE9",ecirc:"\xEA",egrave:"\xE8",eth:"\xF0",euml:"\xEB",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE",gt:">",iacute:"\xED",icirc:"\xEE",iexcl:"\xA1",igrave:"\xEC",iquest:"\xBF",iuml:"\xEF",laquo:"\xAB",lt:"<",macr:"\xAF",micro:"\xB5",middot:"\xB7",nbsp:"\xA0",not:"\xAC",ntilde:"\xF1",oacute:"\xF3",ocirc:"\xF4",ograve:"\xF2",ordf:"\xAA",ordm:"\xBA",oslash:"\xF8",otilde:"\xF5",ouml:"\xF6",para:"\xB6",plusmn:"\xB1",pound:"\xA3",quot:'"',raquo:"\xBB",reg:"\xAE",sect:"\xA7",shy:"\xAD",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",szlig:"\xDF",thorn:"\xFE",times:"\xD7",uacute:"\xFA",ucirc:"\xFB",ugrave:"\xF9",uml:"\xA8",uuml:"\xFC",yacute:"\xFD",yen:"\xA5",yuml:"\xFF"}});var Fu=C((Mv,nD)=>{nD.exports={"0":"\uFFFD","128":"\u20AC","130":"\u201A","131":"\u0192","132":"\u201E","133":"\u2026","134":"\u2020","135":"\u2021","136":"\u02C6","137":"\u2030","138":"\u0160","139":"\u2039","140":"\u0152","142":"\u017D","145":"\u2018","146":"\u2019","147":"\u201C","148":"\u201D","149":"\u2022","150":"\u2013","151":"\u2014","152":"\u02DC","153":"\u2122","154":"\u0161","155":"\u203A","156":"\u0153","158":"\u017E","159":"\u0178"}});var Ne=C((zv,gu)=>{"use strict";gu.exports=iD;function iD(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=48&&r<=57}});var Eu=C((Yv,vu)=>{"use strict";vu.exports=uD;function uD(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=102||r>=65&&r<=70||r>=48&&r<=57}});var We=C((Gv,Cu)=>{"use strict";Cu.exports=aD;function aD(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=122||r>=65&&r<=90}});var yu=C((Vv,bu)=>{"use strict";var oD=We(),sD=Ne();bu.exports=cD;function cD(e){return oD(e)||sD(e)}});var Au=C((jv,lD)=>{lD.exports={AEli:"\xC6",AElig:"\xC6",AM:"&",AMP:"&",Aacut:"\xC1",Aacute:"\xC1",Abreve:"\u0102",Acir:"\xC2",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrav:"\xC0",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",Arin:"\xC5",Aring:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",Atild:"\xC3",Atilde:"\xC3",Aum:"\xC4",Auml:"\xC4",Backslash:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",Bscr:"\u212C",Bumpeq:"\u224E",CHcy:"\u0427",COP:"\xA9",COPY:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",Cayleys:"\u212D",Ccaron:"\u010C",Ccedi:"\xC7",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",CenterDot:"\xB7",Cfr:"\u212D",Chi:"\u03A7",CircleDot:"\u2299",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",Colon:"\u2237",Colone:"\u2A74",Congruent:"\u2261",Conint:"\u222F",ContourIntegral:"\u222E",Copf:"\u2102",Coproduct:"\u2210",CounterClockwiseContourIntegral:"\u2233",Cross:"\u2A2F",Cscr:"\u{1D49E}",Cup:"\u22D3",CupCap:"\u224D",DD:"\u2145",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",Delta:"\u0394",Dfr:"\u{1D507}",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",Diamond:"\u22C4",DifferentialD:"\u2146",Dopf:"\u{1D53B}",Dot:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",Downarrow:"\u21D3",Dscr:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ET:"\xD0",ETH:"\xD0",Eacut:"\xC9",Eacute:"\xC9",Ecaron:"\u011A",Ecir:"\xCA",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrav:"\xC8",Egrave:"\xC8",Element:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",Equilibrium:"\u21CC",Escr:"\u2130",Esim:"\u2A73",Eta:"\u0397",Eum:"\xCB",Euml:"\xCB",Exists:"\u2203",ExponentialE:"\u2147",Fcy:"\u0424",Ffr:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",Fopf:"\u{1D53D}",ForAll:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",G:">",GT:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1D50A}",Gg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",Gt:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",HilbertSpace:"\u210B",Hopf:"\u210D",HorizontalLine:"\u2500",Hscr:"\u210B",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacut:"\xCD",Iacute:"\xCD",Icir:"\xCE",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Igrav:"\xCC",Igrave:"\xCC",Im:"\u2111",Imacr:"\u012A",ImaginaryI:"\u2148",Implies:"\u21D2",Int:"\u222C",Integral:"\u222B",Intersection:"\u22C2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Iogon:"\u012E",Iopf:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Ium:"\xCF",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",LJcy:"\u0409",L:"<",LT:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Larr:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",LeftRightArrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",Leftarrow:"\u21D0",Leftrightarrow:"\u21D4",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",Lfr:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",LongLeftRightArrow:"\u27F7",LongRightArrow:"\u27F6",Longleftarrow:"\u27F8",Longleftrightarrow:"\u27FA",Longrightarrow:"\u27F9",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",Mopf:"\u{1D544}",Mscr:"\u2133",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:` +`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntild:"\xD1",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacut:"\xD3",Oacute:"\xD3",Ocir:"\xD4",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograv:"\xD2",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslas:"\xD8",Oslash:"\xD8",Otild:"\xD5",Otilde:"\xD5",Otimes:"\u2A37",Oum:"\xD6",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUO:'"',QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",RE:"\xAE",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THOR:"\xDE",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacut:"\xDA",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucir:"\xDB",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrav:"\xD9",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uum:"\xDC",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacut:"\xDD",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",ZeroWidthSpace:"\u200B",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\u{1D4B5}",aacut:"\xE1",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acir:"\xE2",acirc:"\xE2",acut:"\xB4",acute:"\xB4",acy:"\u0430",aeli:"\xE6",aelig:"\xE6",af:"\u2061",afr:"\u{1D51E}",agrav:"\xE0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",am:"&",amp:"&",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",aopf:"\u{1D552}",ap:"\u2248",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",apid:"\u224B",apos:"'",approx:"\u2248",approxeq:"\u224A",arin:"\xE5",aring:"\xE5",ascr:"\u{1D4B6}",ast:"*",asymp:"\u2248",asympeq:"\u224D",atild:"\xE3",atilde:"\xE3",aum:"\xE4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",beta:"\u03B2",beth:"\u2136",between:"\u226C",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255D",boxUR:"\u255A",boxUl:"\u255C",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256C",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256B",boxVl:"\u2562",boxVr:"\u255F",boxbox:"\u29C9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250C",boxh:"\u2500",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",bprime:"\u2035",breve:"\u02D8",brvba:"\xA6",brvbar:"\xA6",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",bumpeq:"\u224F",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",ccaps:"\u2A4D",ccaron:"\u010D",ccedi:"\xE7",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cedi:"\xB8",cedil:"\xB8",cemptyv:"\u29B2",cen:"\xA2",cent:"\xA2",centerdot:"\xB7",cfr:"\u{1D520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledR:"\xAE",circledS:"\u24C8",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",conint:"\u222E",copf:"\u{1D554}",coprod:"\u2210",cop:"\xA9",copy:"\xA9",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curre:"\xA4",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dArr:"\u21D3",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",darr:"\u2193",dash:"\u2010",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",dcy:"\u0434",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",ddotseq:"\u2A77",de:"\xB0",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",dharl:"\u21C3",dharr:"\u21C2",diam:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divid:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",dot:"\u02D9",doteq:"\u2250",doteqdot:"\u2251",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",downarrow:"\u2193",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eDDot:"\u2A77",eDot:"\u2251",eacut:"\xE9",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\xEA",ecirc:"\xEA",ecolon:"\u2255",ecy:"\u044D",edot:"\u0117",ee:"\u2147",efDot:"\u2252",efr:"\u{1D522}",eg:"\u2A9A",egrav:"\xE8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",equals:"=",equest:"\u225F",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",erarr:"\u2971",escr:"\u212F",esdot:"\u2250",esim:"\u2242",eta:"\u03B7",et:"\xF0",eth:"\xF0",eum:"\xEB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",expectation:"\u2130",exponentiale:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac1:"\xBC",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac3:"\xBE",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",gE:"\u2267",gEl:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gammad:"\u03DD",gap:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",ge:"\u2265",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",gl:"\u2277",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\u{1D558}",grave:"`",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",g:">",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hArr:"\u21D4",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",hbar:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",hslash:"\u210F",hstrok:"\u0127",hybull:"\u2043",hyphen:"\u2010",iacut:"\xED",iacute:"\xED",ic:"\u2063",icir:"\xEE",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexc:"\xA1",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",igrav:"\xEC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",image:"\u2111",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",intcal:"\u22BA",integers:"\u2124",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\u{1D55A}",iota:"\u03B9",iprod:"\u2A3C",iques:"\xBF",iquest:"\xBF",iscr:"\u{1D4BE}",isin:"\u2208",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",iukcy:"\u0456",ium:"\xEF",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",lAarr:"\u21DA",lArr:"\u21D0",lAtail:"\u291B",lBarr:"\u290E",lE:"\u2266",lEg:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",laqu:"\xAB",laquo:"\xAB",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lceil:"\u2308",lcub:"{",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leftarrow:"\u2190",leftarrowtail:"\u21A2",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",leftthreetimes:"\u22CB",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",lessgtr:"\u2276",lesssim:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",l:"<",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",mac:"\xAF",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",measuredangle:"\u2221",mfr:"\u{1D52A}",mho:"\u2127",micr:"\xB5",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middo:"\xB7",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",mstpos:"\u223E",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nGtv:"\u226B\u0338",nLeftarrow:"\u21CD",nLeftrightarrow:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nLtv:"\u226A\u0338",nRightarrow:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nabla:"\u2207",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbs:"\xA0",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",neArr:"\u21D7",nearhk:"\u2924",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",nexist:"\u2204",nexists:"\u2204",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",ngsim:"\u2275",ngt:"\u226F",ngtr:"\u226F",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",nlArr:"\u21CD",nlE:"\u2266\u0338",nlarr:"\u219A",nldr:"\u2025",nle:"\u2270",nleftarrow:"\u219A",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nlsim:"\u2274",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nmid:"\u2224",nopf:"\u{1D55F}",no:"\xAC",not:"\xAC",notin:"\u2209",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntild:"\xF1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22AD",nvHarr:"\u2904",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwArr:"\u21D6",nwarhk:"\u2923",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",oS:"\u24C8",oacut:"\xF3",oacute:"\xF3",oast:"\u229B",ocir:"\xF4",ocirc:"\xF4",ocy:"\u043E",odash:"\u229D",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\u{1D52C}",ogon:"\u02DB",ograv:"\xF2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",oopf:"\u{1D560}",opar:"\u29B7",operp:"\u29B9",oplus:"\u2295",or:"\u2228",orarr:"\u21BB",ord:"\xBA",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oscr:"\u2134",oslas:"\xF8",oslash:"\xF8",osol:"\u2298",otild:"\xF5",otilde:"\xF5",otimes:"\u2297",otimesas:"\u2A36",oum:"\xF6",ouml:"\xF6",ovbar:"\u233D",par:"\xB6",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\u{1D52D}",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",plusm:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",pointint:"\u2A15",popf:"\u{1D561}",poun:"\xA3",pound:"\xA3",pr:"\u227A",prE:"\u2AB3",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",primes:"\u2119",prnE:"\u2AB5",prnap:"\u2AB9",prnsim:"\u22E8",prod:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quo:'"',quot:'"',rAarr:"\u21DB",rArr:"\u21D2",rAtail:"\u291C",rBarr:"\u290F",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raqu:"\xBB",raquo:"\xBB",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rceil:"\u2309",rcub:"}",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",re:"\xAE",reg:"\xAE",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",rightarrow:"\u2192",rightarrowtail:"\u21A3",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",rightthreetimes:"\u22CC",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",rsaquo:"\u203A",rscr:"\u{1D4C7}",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",sbquo:"\u201A",sc:"\u227B",scE:"\u2AB4",scap:"\u2AB8",scaron:"\u0161",sccue:"\u227D",sce:"\u2AB0",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",scnap:"\u2ABA",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",seArr:"\u21D8",searhk:"\u2925",searr:"\u2198",searrow:"\u2198",sec:"\xA7",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shortmid:"\u2223",shortparallel:"\u2225",sh:"\xAD",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",subE:"\u2AC5",subdot:"\u2ABD",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",sum:"\u2211",sung:"\u266A",sup:"\u2283",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supE:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swarhk:"\u2926",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szli:"\xDF",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tbrk:"\u23B4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",tfr:"\u{1D531}",there4:"\u2234",therefore:"\u2234",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",thor:"\xFE",thorn:"\xFE",tilde:"\u02DC",time:"\xD7",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uArr:"\u21D1",uHar:"\u2963",uacut:"\xFA",uacute:"\xFA",uarr:"\u2191",ubrcy:"\u045E",ubreve:"\u016D",ucir:"\xFB",ucirc:"\xFB",ucy:"\u0443",udarr:"\u21C5",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",ufr:"\u{1D532}",ugrav:"\xF9",ugrave:"\xF9",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",um:"\xA8",uml:"\xA8",uogon:"\u0173",uopf:"\u{1D566}",uparrow:"\u2191",updownarrow:"\u2195",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",upsi:"\u03C5",upsih:"\u03D2",upsilon:"\u03C5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\u{1D4CA}",utdot:"\u22F0",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uum:"\xFC",uuml:"\xFC",uwangle:"\u29A7",vArr:"\u21D5",vBar:"\u2AE8",vBarv:"\u2AE9",vDash:"\u22A8",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vcy:"\u0432",vdash:"\u22A2",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",vert:"|",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",wfr:"\u{1D534}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacut:"\xFD",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",ye:"\xA5",yen:"\xA5",yfr:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yum:"\xFF",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeetrf:"\u2128",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"}});var ku=C(($v,xu)=>{"use strict";var wu=Au();xu.exports=DD;var fD={}.hasOwnProperty;function DD(e){return fD.call(wu,e)?wu[e]:!1}});var dr=C((Wv,Mu)=>{"use strict";var Bu=mu(),Tu=Fu(),pD=Ne(),hD=Eu(),Ou=yu(),dD=ku();Mu.exports=BD;var mD={}.hasOwnProperty,He=String.fromCharCode,FD=Function.prototype,qu={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},gD=9,_u=10,vD=12,ED=32,Su=38,CD=59,bD=60,yD=61,AD=35,wD=88,xD=120,kD=65533,Ke="named",Mt="hexadecimal",zt="decimal",Yt={};Yt[Mt]=16;Yt[zt]=10;var Gr={};Gr[Ke]=Ou;Gr[zt]=pD;Gr[Mt]=hD;var Lu=1,Pu=2,Iu=3,Nu=4,Ru=5,Ut=6,Uu=7,we={};we[Lu]="Named character references must be terminated by a semicolon";we[Pu]="Numeric character references must be terminated by a semicolon";we[Iu]="Named character references cannot be empty";we[Nu]="Numeric character references cannot be empty";we[Ru]="Named character references must be known";we[Ut]="Numeric character references cannot be disallowed";we[Uu]="Numeric character references cannot be outside the permissible Unicode range";function BD(e,r){var t={},n,a;r||(r={});for(a in qu)n=r[a],t[a]=n??qu[a];return(t.position.indent||t.position.start)&&(t.indent=t.position.indent||[],t.position=t.position.start),TD(e,t)}function TD(e,r){var t=r.additional,n=r.nonTerminated,a=r.text,u=r.reference,i=r.warning,o=r.textContext,s=r.referenceContext,l=r.warningContext,c=r.position,f=r.indent||[],p=e.length,d=0,D=-1,h=c.column||1,m=c.line||1,F="",y=[],E,B,b,g,A,w,v,x,k,T,q,R,O,S,_,L,Be,W,I;for(typeof t=="string"&&(t=t.charCodeAt(0)),L=ee(),x=i?Z:FD,d--,p++;++d65535&&(w-=65536,T+=He(w>>>10|55296),w=56320|w&1023),w=T+He(w))):S!==Ke&&x(Nu,W)),w?(ve(),L=ee(),d=I-1,h+=I-O+1,y.push(w),Be=ee(),Be.offset++,u&&u.call(s,w,{start:L,end:Be},e.slice(O-1,I)),L=Be):(g=e.slice(O-1,I),F+=g,h+=g.length,d=I-1)}else A===10&&(m++,D++,h=0),A===A?(F+=He(A),h++):ve();return y.join("");function ee(){return{line:m,column:h,offset:d+(c.offset||0)}}function Z(Ee,M){var ft=ee();ft.column+=M,ft.offset+=M,i.call(l,we[Ee],ft,Ee)}function ve(){F&&(y.push(F),a&&a.call(o,F,{start:L,end:ee()}),F="")}}function qD(e){return e>=55296&&e<=57343||e>1114111}function _D(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}});var Gu=C((Hv,Yu)=>{"use strict";var SD=Ie(),zu=dr();Yu.exports=OD;function OD(e){return t.raw=n,t;function r(u){for(var i=e.offset,o=u.line,s=[];++o&&o in i;)s.push((i[o]||0)+1);return{start:u,indent:s}}function t(u,i,o){zu(u,{position:r(i),warning:a,text:o,reference:o,textContext:e,referenceContext:e})}function n(u,i,o){return zu(u,SD(o,{position:r(i),warning:a}))}function a(u,i,o){o!==3&&e.file.message(u,i)}}});var $u=C((Kv,ju)=>{"use strict";ju.exports=LD;function LD(e){return r;function r(t,n){var a=this,u=a.offset,i=[],o=a[e+"Methods"],s=a[e+"Tokenizers"],l=n.line,c=n.column,f,p,d,D,h,m;if(!t)return i;for(w.now=E,w.file=a.file,F("");t;){for(f=-1,p=o.length,h=!1;++f{"use strict";Hu.exports=Vr;var Gt=["\\","`","*","{","}","[","]","(",")","#","+","-",".","!","_",">"],Vt=Gt.concat(["~","|"]),Wu=Vt.concat([` +`,'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);Vr.default=Gt;Vr.gfm=Vt;Vr.commonmark=Wu;function Vr(e){var r=e||{};return r.commonmark?Wu:r.gfm?Vt:Gt}});var Xu=C((Xv,Ju)=>{"use strict";Ju.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","pre","section","source","title","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]});var jt=C((Qv,Qu)=>{"use strict";Qu.exports={position:!0,gfm:!0,commonmark:!1,pedantic:!1,blocks:Xu()}});var ea=C((Zv,Zu)=>{"use strict";var ND=Ie(),RD=Ku(),UD=jt();Zu.exports=MD;function MD(e){var r=this,t=r.options,n,a;if(e==null)e={};else if(typeof e=="object")e=ND(e);else throw new Error("Invalid value `"+e+"` for setting `options`");for(n in UD){if(a=e[n],a==null&&(a=t[n]),n!=="blocks"&&typeof a!="boolean"||n==="blocks"&&typeof a!="object")throw new Error("Invalid value `"+a+"` for setting `options."+n+"`");e[n]=a}return r.options=e,r.escape=RD(e),r}});var na=C((eE,ta)=>{"use strict";ta.exports=ra;function ra(e){if(e==null)return VD;if(typeof e=="string")return GD(e);if(typeof e=="object")return"length"in e?YD(e):zD(e);if(typeof e=="function")return e;throw new Error("Expected function, string, or object as test")}function zD(e){return r;function r(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}function YD(e){for(var r=[],t=-1;++t{ia.exports=jD;function jD(e){return e}});var ca=C((tE,sa)=>{"use strict";sa.exports=jr;var $D=na(),WD=ua(),aa=!0,oa="skip",$t=!1;jr.CONTINUE=aa;jr.SKIP=oa;jr.EXIT=$t;function jr(e,r,t,n){var a,u;typeof r=="function"&&typeof t!="function"&&(n=t,t=r,r=null),u=$D(r),a=n?-1:1,i(e,null,[])();function i(o,s,l){var c=typeof o=="object"&&o!==null?o:{},f;return typeof c.type=="string"&&(f=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0,p.displayName="node ("+WD(c.type+(f?"<"+f+">":""))+")"),p;function p(){var d=l.concat(o),D=[],h,m;if((!r||u(o,s,l[l.length-1]||null))&&(D=HD(t(o,l)),D[0]===$t))return D;if(o.children&&D[0]!==oa)for(m=(n?o.children.length:-1)+a;m>-1&&m{"use strict";la.exports=Wr;var $r=ca(),KD=$r.CONTINUE,JD=$r.SKIP,XD=$r.EXIT;Wr.CONTINUE=KD;Wr.SKIP=JD;Wr.EXIT=XD;function Wr(e,r,t,n){typeof r=="function"&&typeof t!="function"&&(n=t,t=r,r=null),$r(e,r,a,n);function a(u,i){var o=i[i.length-1],s=o?o.children.indexOf(u):null;return t(u,s,o)}}});var pa=C((iE,Da)=>{"use strict";var QD=fa();Da.exports=ZD;function ZD(e,r){return QD(e,r?ep:rp),e}function ep(e){delete e.position}function rp(e){e.position=void 0}});var ma=C((uE,da)=>{"use strict";var ha=Ie(),tp=pa();da.exports=up;var np=` +`,ip=/\r\n|\r/g;function up(){var e=this,r=String(e.file),t={line:1,column:1,offset:0},n=ha(t),a;return r=r.replace(ip,np),r.charCodeAt(0)===65279&&(r=r.slice(1),n.column++,n.offset++),a={type:"root",children:e.tokenizeBlock(r,n),position:{start:t,end:e.eof||ha(t)}},e.options.position||tp(a,!0),a}});var ga=C((aE,Fa)=>{"use strict";var ap=/^[ \t]*(\n|$)/;Fa.exports=op;function op(e,r,t){for(var n,a="",u=0,i=r.length;u{"use strict";var me="",Wt;va.exports=sp;function sp(e,r){if(typeof e!="string")throw new TypeError("expected a string");if(r===1)return e;if(r===2)return e+e;var t=e.length*r;if(Wt!==e||typeof Wt>"u")Wt=e,me="";else if(me.length>=t)return me.substr(0,t);for(;t>me.length&&r>1;)r&1&&(me+=e),r>>=1,e+=e;return me+=e,me=me.substr(0,t),me}});var Ht=C((sE,Ea)=>{"use strict";Ea.exports=cp;function cp(e){return String(e).replace(/\n+$/,"")}});var ya=C((cE,ba)=>{"use strict";var lp=Hr(),fp=Ht();ba.exports=hp;var Kt=` +`,Ca=" ",Jt=" ",Dp=4,pp=lp(Jt,Dp);function hp(e,r,t){for(var n=-1,a=r.length,u="",i="",o="",s="",l,c,f;++n{"use strict";wa.exports=gp;var Kr=` +`,mr=" ",Je=" ",dp="~",Aa="`",mp=3,Fp=4;function gp(e,r,t){var n=this,a=n.options.gfm,u=r.length+1,i=0,o="",s,l,c,f,p,d,D,h,m,F,y,E,B;if(a){for(;i=Fp)){for(D="";i{Xe=ka.exports=vp;function vp(e){return e.trim?e.trim():Xe.right(Xe.left(e))}Xe.left=function(e){return e.trimLeft?e.trimLeft():e.replace(/^\s\s*/,"")};Xe.right=function(e){if(e.trimRight)return e.trimRight();for(var r=/\s/,t=e.length;r.test(e.charAt(--t)););return e.slice(0,t+1)}});var Jr=C((fE,Ba)=>{"use strict";Ba.exports=Ep;function Ep(e,r,t,n){for(var a=e.length,u=-1,i,o;++u{"use strict";var Cp=Re(),bp=Jr();_a.exports=yp;var Xt=` +`,Ta=" ",Qt=" ",qa=">";function yp(e,r,t){for(var n=this,a=n.offset,u=n.blockTokenizers,i=n.interruptBlockquote,o=e.now(),s=o.line,l=r.length,c=[],f=[],p=[],d,D=0,h,m,F,y,E,B,b,g;D{"use strict";La.exports=wp;var Oa=` +`,Fr=" ",gr=" ",vr="#",Ap=6;function wp(e,r,t){for(var n=this,a=n.options.pedantic,u=r.length+1,i=-1,o=e.now(),s="",l="",c,f,p;++iAp)&&!(!p||!a&&r.charAt(i+1)===vr)){for(u=r.length+1,f="";++i{"use strict";Na.exports=Sp;var xp=" ",kp=` +`,Ia=" ",Bp="*",Tp="-",qp="_",_p=3;function Sp(e,r,t){for(var n=-1,a=r.length+1,u="",i,o,s,l;++n=_p&&(!i||i===kp)?(u+=l,t?!0:e(u)({type:"thematicBreak"})):void 0}});var Zt=C((dE,Ma)=>{"use strict";Ma.exports=Ip;var Ua=" ",Op=" ",Lp=1,Pp=4;function Ip(e){for(var r=0,t=0,n=e.charAt(r),a={},u,i=0;n===Ua||n===Op;){for(u=n===Ua?Pp:Lp,t+=u,u>1&&(t=Math.floor(t/u)*u);i{"use strict";var Np=Re(),Rp=Hr(),Up=Zt();Ya.exports=Yp;var za=` +`,Mp=" ",zp="!";function Yp(e,r){var t=e.split(za),n=t.length+1,a=1/0,u=[],i,o,s;for(t.unshift(Rp(Mp,r)+zp);n--;)if(o=Up(t[n]),u[n]=o.stops,Np(t[n]).length!==0)if(o.indent)o.indent>0&&o.indent{"use strict";var Gp=Re(),Vp=Hr(),Va=Ne(),jp=Zt(),$p=Ga(),Wp=Jr();Ha.exports=rh;var en="*",Hp="_",ja="+",rn="-",$a=".",Fe=" ",ae=` +`,Xr=" ",Wa=")",Kp="x",xe=4,Jp=/\n\n(?!\s*$)/,Xp=/^\[([ X\tx])][ \t]/,Qp=/^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/,Zp=/^([ \t]*)([*+-]|\d+[.)])([ \t]+)/,eh=/^( {1,4}|\t)?/gm;function rh(e,r,t){for(var n=this,a=n.options.commonmark,u=n.options.pedantic,i=n.blockTokenizers,o=n.interruptList,s=0,l=r.length,c=null,f,p,d,D,h,m,F,y,E,B,b,g,A,w,v,x,k,T,q,R=!1,O,S,_,L;s=k.indent&&(L=!0),D=r.charAt(s),E=null,!L){if(D===en||D===ja||D===rn)E=D,s++,f++;else{for(p="";s=k.indent||f>xe),y=!1,s=F;if(b=r.slice(F,m),B=F===s?b:r.slice(s,m),(E===en||E===Hp||E===rn)&&i.thematicBreak.call(n,e,b,!0))break;if(g=A,A=!y&&!Gp(B).length,L&&k)k.value=k.value.concat(x,b),v=v.concat(x,b),x=[];else if(y)x.length!==0&&(R=!0,k.value.push(""),k.trail=x.concat()),k={value:[b],indent:f,trail:[]},w.push(k),v=v.concat(x,b),x=[];else if(A){if(g&&!a)break;x.push(b)}else{if(g||Wp(o,i,n,[e,b,!0]))break;k.value=k.value.concat(x,b),v=v.concat(x,b),x=[]}s=m+1}for(O=e(v.join(ae)).reset({type:"list",ordered:d,start:c,spread:R,children:[]}),T=n.enterList(),q=n.enterBlock(),s=-1,l=w.length;++s{"use strict";Qa.exports=lh;var tn=` +`,uh=" ",Ja=" ",Xa="=",ah="-",oh=3,sh=1,ch=2;function lh(e,r,t){for(var n=this,a=e.now(),u=r.length,i=-1,o="",s,l,c,f,p;++i=oh){i--;break}o+=c}for(s="",l="";++i{"use strict";var fh="[a-zA-Z_:][a-zA-Z0-9:._-]*",Dh="[^\"'=<>`\\u0000-\\u0020]+",ph="'[^']*'",hh='"[^"]*"',dh="(?:"+Dh+"|"+ph+"|"+hh+")",mh="(?:\\s+"+fh+"(?:\\s*=\\s*"+dh+")?)",eo="<[A-Za-z][A-Za-z0-9\\-]*"+mh+"*\\s*\\/?>",ro="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Fh="|",gh="<[?].*?[?]>",vh="]*>",Eh="";nn.openCloseTag=new RegExp("^(?:"+eo+"|"+ro+")");nn.tag=new RegExp("^(?:"+eo+"|"+ro+"|"+Fh+"|"+gh+"|"+vh+"|"+Eh+")")});var uo=C((EE,io)=>{"use strict";var Ch=un().openCloseTag;io.exports=Ih;var bh=" ",yh=" ",to=` +`,Ah="<",wh=/^<(script|pre|style)(?=(\s|>|$))/i,xh=/<\/(script|pre|style)>/i,kh=/^/,Th=/^<\?/,qh=/\?>/,_h=/^/,Oh=/^/,no=/^$/,Ph=new RegExp(Ch.source+"\\s*$");function Ih(e,r,t){for(var n=this,a=n.options.blocks.join("|"),u=new RegExp("^|$))","i"),i=r.length,o=0,s,l,c,f,p,d,D,h=[[wh,xh,!0],[kh,Bh,!0],[Th,qh,!0],[_h,Sh,!0],[Oh,Lh,!0],[u,no,!0],[Ph,no,!1]];o{"use strict";ao.exports=Uh;var Nh=String.fromCharCode,Rh=/\s/;function Uh(e){return Rh.test(typeof e=="number"?Nh(e):e.charAt(0))}});var an=C((bE,oo)=>{"use strict";var Mh=kr();oo.exports=zh;function zh(e){return Mh(e).toLowerCase()}});var ho=C((yE,po)=>{"use strict";var Yh=oe(),Gh=an();po.exports=Wh;var so='"',co="'",Vh="\\",Qe=` +`,Qr=" ",Zr=" ",sn="[",Er="]",jh="(",$h=")",lo=":",fo="<",Do=">";function Wh(e,r,t){for(var n=this,a=n.options.commonmark,u=0,i=r.length,o="",s,l,c,f,p,d,D,h;u{"use strict";var Kh=oe();Fo.exports=ud;var Jh=" ",et=` +`,Xh=" ",Qh="-",Zh=":",ed="\\",cn="|",rd=1,td=2,mo="left",nd="center",id="right";function ud(e,r,t){var n=this,a,u,i,o,s,l,c,f,p,d,D,h,m,F,y,E,B,b,g,A,w,v;if(n.options.gfm){for(a=0,E=0,l=r.length+1,c=[];aA){if(E1&&(p?(o+=f.slice(0,-1),f=f.charAt(f.length-1)):(o+=f,f="")),F=e.now(),e(o)({type:"tableCell",children:n.tokenizeInline(h,F)},s)),e(f+p),f="",h=""):(f&&(h+=f,f=""),h+=p,p===ed&&a!==l-2&&(h+=B.charAt(a+1),a++)),m=!1,a++}y||e(et+u)}return g}}}});var Co=C((wE,Eo)=>{"use strict";var ad=Re(),od=Ht(),sd=Jr();Eo.exports=fd;var cd=" ",Cr=` +`,ld=" ",vo=4;function fd(e,r,t){for(var n=this,a=n.options,u=a.commonmark,i=n.blockTokenizers,o=n.interruptParagraph,s=r.indexOf(Cr),l=r.length,c,f,p,d,D;s=vo&&p!==Cr){s=r.indexOf(Cr,s+1);continue}}if(f=r.slice(s+1),sd(o,i,n,[e,f,!0]))break;if(c=s,s=r.indexOf(Cr,s+1),s!==-1&&ad(r.slice(c,s))===""){s=c;break}}return f=r.slice(0,s),t?!0:(D=e.now(),f=od(f),e(f)({type:"paragraph",children:n.tokenizeInline(f,D)}))}});var yo=C((xE,bo)=>{"use strict";bo.exports=Dd;function Dd(e,r){return e.indexOf("\\",r)}});var ko=C((kE,xo)=>{"use strict";var pd=yo();xo.exports=wo;wo.locator=pd;var hd=` +`,Ao="\\";function wo(e,r,t){var n=this,a,u;if(r.charAt(0)===Ao&&(a=r.charAt(1),n.escape.indexOf(a)!==-1))return t?!0:(a===hd?u={type:"break"}:u={type:"text",value:a},e(Ao+a)(u))}});var ln=C((BE,Bo)=>{"use strict";Bo.exports=dd;function dd(e,r){return e.indexOf("<",r)}});var Oo=C((TE,So)=>{"use strict";var To=oe(),md=dr(),Fd=ln();So.exports=hn;hn.locator=Fd;hn.notInLink=!0;var qo="<",fn=">",_o="@",Dn="/",pn="mailto:",rt=pn.length;function hn(e,r,t){var n=this,a="",u=r.length,i=0,o="",s=!1,l="",c,f,p,d,D;if(r.charAt(0)===qo){for(i++,a=qo;i{"use strict";Lo.exports=gd;function gd(e,r){var t=String(e),n=0,a;if(typeof r!="string")throw new Error("Expected character");for(a=t.indexOf(r);a!==-1;)n++,a=t.indexOf(r,a+r.length);return n}});var Ro=C((_E,No)=>{"use strict";No.exports=vd;var Io=["www.","http://","https://"];function vd(e,r){var t=-1,n,a,u;if(!this.options.gfm)return t;for(a=Io.length,n=-1;++n{"use strict";var Uo=Po(),Ed=dr(),Cd=Ne(),dn=We(),bd=oe(),yd=Ro();Yo.exports=Fn;Fn.locator=yd;Fn.notInLink=!0;var Ad=33,wd=38,xd=41,kd=42,Bd=44,Td=45,mn=46,qd=58,_d=59,Sd=63,Od=60,Mo=95,Ld=126,Pd="(",zo=")";function Fn(e,r,t){var n=this,a=n.options.gfm,u=n.inlineTokenizers,i=r.length,o=-1,s=!1,l,c,f,p,d,D,h,m,F,y,E,B,b,g;if(a){if(r.slice(0,4)==="www.")s=!0,p=4;else if(r.slice(0,7).toLowerCase()==="http://")p=7;else if(r.slice(0,8).toLowerCase()==="https://")p=8;else return;for(o=p-1,f=p,l=[];pF;)p=d+D.lastIndexOf(zo),D=r.slice(d,p),y--;if(r.charCodeAt(p-1)===_d&&(p--,dn(r.charCodeAt(p-1)))){for(m=p-2;dn(r.charCodeAt(m));)m--;r.charCodeAt(m)===wd&&(p=m)}return E=r.slice(0,p),b=Ed(E,{nonTerminated:!1}),s&&(b="http://"+b),g=n.enterLink(),n.inlineTokenizers={text:u.text},B=n.tokenizeInline(E,e.now()),n.inlineTokenizers=u,g(),e(E)({type:"link",title:null,url:b,children:B})}}}});var Wo=C((OE,$o)=>{"use strict";var Id=Ne(),Nd=We(),Rd=43,Ud=45,Md=46,zd=95;$o.exports=jo;function jo(e,r){var t=this,n,a;if(!this.options.gfm||(n=e.indexOf("@",r),n===-1))return-1;if(a=n,a===r||!Vo(e.charCodeAt(a-1)))return jo.call(t,e,n+1);for(;a>r&&Vo(e.charCodeAt(a-1));)a--;return a}function Vo(e){return Id(e)||Nd(e)||e===Rd||e===Ud||e===Md||e===zd}});var Xo=C((LE,Jo)=>{"use strict";var Yd=dr(),Ho=Ne(),Ko=We(),Gd=Wo();Jo.exports=En;En.locator=Gd;En.notInLink=!0;var Vd=43,gn=45,tt=46,jd=64,vn=95;function En(e,r,t){var n=this,a=n.options.gfm,u=n.inlineTokenizers,i=0,o=r.length,s=-1,l,c,f,p;if(a){for(l=r.charCodeAt(i);Ho(l)||Ko(l)||l===Vd||l===gn||l===tt||l===vn;)l=r.charCodeAt(++i);if(i!==0&&l===jd){for(i++;i{"use strict";var $d=We(),Wd=ln(),Hd=un().tag;Zo.exports=Qo;Qo.locator=Wd;var Kd="<",Jd="?",Xd="!",Qd="/",Zd=/^/i;function Qo(e,r,t){var n=this,a=r.length,u,i;if(!(r.charAt(0)!==Kd||a<3)&&(u=r.charAt(1),!(!$d(u)&&u!==Jd&&u!==Xd&&u!==Qd)&&(i=r.match(Hd),!!i)))return t?!0:(i=i[0],!n.inLink&&Zd.test(i)?n.inLink=!0:n.inLink&&e0.test(i)&&(n.inLink=!1),e(i)({type:"html",value:i}))}});var Cn=C((IE,rs)=>{"use strict";rs.exports=r0;function r0(e,r){var t=e.indexOf("[",r),n=e.indexOf("![",r);return n===-1||t{"use strict";var br=oe(),t0=Cn();os.exports=as;as.locator=t0;var n0=` +`,i0="!",ts='"',ns="'",Ze="(",yr=")",bn="<",yn=">",is="[",Ar="\\",u0="]",us="`";function as(e,r,t){var n=this,a="",u=0,i=r.charAt(0),o=n.options.pedantic,s=n.options.commonmark,l=n.options.gfm,c,f,p,d,D,h,m,F,y,E,B,b,g,A,w,v,x,k;if(i===i0&&(F=!0,a=i,i=r.charAt(++u)),i===is&&!(!F&&n.inLink)){for(a+=i,A="",u++,B=r.length,v=e.now(),g=0,v.column+=u,v.offset+=u;u=p&&(p=0):p=f}else if(i===Ar)u++,h+=r.charAt(u);else if((!p||l)&&i===is)g++;else if((!p||l)&&i===u0)if(g)g--;else{if(r.charAt(u+1)!==Ze)return;h+=Ze,c=!0,u++;break}A+=h,h="",u++}if(c){for(y=A,a+=A+h,u++;u{"use strict";var a0=oe(),o0=Cn(),s0=an();ls.exports=cs;cs.locator=o0;var An="link",c0="image",l0="shortcut",f0="collapsed",wn="full",D0="!",nt="[",it="\\",ut="]";function cs(e,r,t){var n=this,a=n.options.commonmark,u=r.charAt(0),i=0,o=r.length,s="",l="",c=An,f=l0,p,d,D,h,m,F,y,E;if(u===D0&&(c=c0,l=u,u=r.charAt(++i)),u===nt){for(i++,l+=u,F="",E=0;i{"use strict";Ds.exports=p0;function p0(e,r){var t=e.indexOf("**",r),n=e.indexOf("__",r);return n===-1?t:t===-1||n{"use strict";var h0=Re(),hs=oe(),d0=ps();ms.exports=ds;ds.locator=d0;var m0="\\",F0="*",g0="_";function ds(e,r,t){var n=this,a=0,u=r.charAt(a),i,o,s,l,c,f,p;if(!(u!==F0&&u!==g0||r.charAt(++a)!==u)&&(o=n.options.pedantic,s=u,c=s+s,f=r.length,a++,l="",u="",!(o&&hs(r.charAt(a)))))for(;a{"use strict";gs.exports=C0;var v0=String.fromCharCode,E0=/\w/;function C0(e){return E0.test(typeof e=="number"?v0(e):e.charAt(0))}});var Cs=C((YE,Es)=>{"use strict";Es.exports=b0;function b0(e,r){var t=e.indexOf("*",r),n=e.indexOf("_",r);return n===-1?t:t===-1||n{"use strict";var y0=Re(),A0=vs(),bs=oe(),w0=Cs();ws.exports=As;As.locator=w0;var x0="*",ys="_",k0="\\";function As(e,r,t){var n=this,a=0,u=r.charAt(a),i,o,s,l,c,f,p;if(!(u!==x0&&u!==ys)&&(o=n.options.pedantic,c=u,s=u,f=r.length,a++,l="",u="",!(o&&bs(r.charAt(a)))))for(;a{"use strict";ks.exports=B0;function B0(e,r){return e.indexOf("~~",r)}});var Os=C((jE,Ss)=>{"use strict";var Ts=oe(),T0=Bs();Ss.exports=_s;_s.locator=T0;var at="~",qs="~~";function _s(e,r,t){var n=this,a="",u="",i="",o="",s,l,c;if(!(!n.options.gfm||r.charAt(0)!==at||r.charAt(1)!==at||Ts(r.charAt(2))))for(s=1,l=r.length,c=e.now(),c.column+=2,c.offset+=2;++s{"use strict";Ls.exports=q0;function q0(e,r){return e.indexOf("`",r)}});var Rs=C((WE,Ns)=>{"use strict";var _0=Ps();Ns.exports=Is;Is.locator=_0;var xn=10,kn=32,Bn=96;function Is(e,r,t){for(var n=r.length,a=0,u,i,o,s,l,c;a2&&(s===kn||s===xn)&&(l===kn||l===xn)){for(a++,n--;a{"use strict";Us.exports=S0;function S0(e,r){for(var t=e.indexOf(` +`,r);t>r&&e.charAt(t-1)===" ";)t--;return t}});var Gs=C((KE,Ys)=>{"use strict";var O0=Ms();Ys.exports=zs;zs.locator=O0;var L0=" ",P0=` +`,I0=2;function zs(e,r,t){for(var n=r.length,a=-1,u="",i;++a{"use strict";Vs.exports=N0;function N0(e,r,t){var n=this,a,u,i,o,s,l,c,f,p,d;if(t)return!0;for(a=n.inlineMethods,o=a.length,u=n.inlineTokenizers,i=-1,p=r.length;++i{"use strict";var R0=Ie(),ot=fu(),U0=pu(),M0=du(),z0=Gu(),Tn=$u();Hs.exports=$s;function $s(e,r){this.file=r,this.offset={},this.options=R0(this.options),this.setOptions({}),this.inList=!1,this.inBlock=!1,this.inLink=!1,this.atStart=!0,this.toOffset=U0(r).toOffset,this.unescape=M0(this,"escape"),this.decode=z0(this)}var U=$s.prototype;U.setOptions=ea();U.parse=ma();U.options=jt();U.exitStart=ot("atStart",!0);U.enterList=ot("inList",!1);U.enterLink=ot("inLink",!1);U.enterBlock=ot("inBlock",!1);U.interruptParagraph=[["thematicBreak"],["list"],["atxHeading"],["fencedCode"],["blockquote"],["html"],["setextHeading",{commonmark:!1}],["definition",{commonmark:!1}]];U.interruptList=[["atxHeading",{pedantic:!1}],["fencedCode",{pedantic:!1}],["thematicBreak",{pedantic:!1}],["definition",{commonmark:!1}]];U.interruptBlockquote=[["indentedCode",{commonmark:!0}],["fencedCode",{commonmark:!0}],["atxHeading",{commonmark:!0}],["setextHeading",{commonmark:!0}],["thematicBreak",{commonmark:!0}],["html",{commonmark:!0}],["list",{commonmark:!0}],["definition",{commonmark:!1}]];U.blockTokenizers={blankLine:ga(),indentedCode:ya(),fencedCode:xa(),blockquote:Sa(),atxHeading:Pa(),thematicBreak:Ra(),list:Ka(),setextHeading:Za(),html:uo(),definition:ho(),table:go(),paragraph:Co()};U.inlineTokenizers={escape:ko(),autoLink:Oo(),url:Go(),email:Xo(),html:es(),link:ss(),reference:fs(),strong:Fs(),emphasis:xs(),deletion:Os(),code:Rs(),break:Gs(),text:js()};U.blockMethods=Ws(U.blockTokenizers);U.inlineMethods=Ws(U.inlineTokenizers);U.tokenizeBlock=Tn("block");U.tokenizeInline=Tn("inline");U.tokenizeFactory=Tn;function Ws(e){var r=[],t;for(t in e)r.push(t);return r}});var Zs=C((QE,Qs)=>{"use strict";var Y0=cu(),G0=Ie(),Js=Ks();Qs.exports=Xs;Xs.Parser=Js;function Xs(e){var r=this.data("settings"),t=Y0(Js);t.prototype.options=G0(t.prototype.options,r,e),this.Parser=t}});var rc=C((ZE,ec)=>{"use strict";ec.exports=V0;function V0(e){if(e)throw e}});var qn=C((eC,tc)=>{tc.exports=function(r){return r!=null&&r.constructor!=null&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}});var fc=C((rC,lc)=>{"use strict";var st=Object.prototype.hasOwnProperty,cc=Object.prototype.toString,nc=Object.defineProperty,ic=Object.getOwnPropertyDescriptor,uc=function(r){return typeof Array.isArray=="function"?Array.isArray(r):cc.call(r)==="[object Array]"},ac=function(r){if(!r||cc.call(r)!=="[object Object]")return!1;var t=st.call(r,"constructor"),n=r.constructor&&r.constructor.prototype&&st.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!t&&!n)return!1;var a;for(a in r);return typeof a>"u"||st.call(r,a)},oc=function(r,t){nc&&t.name==="__proto__"?nc(r,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):r[t.name]=t.newValue},sc=function(r,t){if(t==="__proto__")if(st.call(r,t)){if(ic)return ic(r,t).value}else return;return r[t]};lc.exports=function e(){var r,t,n,a,u,i,o=arguments[0],s=1,l=arguments.length,c=!1;for(typeof o=="boolean"&&(c=o,o=arguments[1]||{},s=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});s{"use strict";Dc.exports=e=>{if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let r=Object.getPrototypeOf(e);return r===null||r===Object.prototype}});var dc=C((nC,hc)=>{"use strict";var j0=[].slice;hc.exports=$0;function $0(e,r){var t;return n;function n(){var i=j0.call(arguments,0),o=e.length>i.length,s;o&&i.push(a);try{s=e.apply(null,i)}catch(l){if(o&&t)throw l;return a(l)}o||(s&&typeof s.then=="function"?s.then(u,a):s instanceof Error?a(s):u(s))}function a(){t||(t=!0,r.apply(null,arguments))}function u(i){a(null,i)}}});var Ec=C((iC,vc)=>{"use strict";var Fc=dc();vc.exports=gc;gc.wrap=Fc;var mc=[].slice;function gc(){var e=[],r={};return r.run=t,r.use=n,r;function t(){var a=-1,u=mc.call(arguments,0,-1),i=arguments[arguments.length-1];if(typeof i!="function")throw new Error("Expected function as last argument, not "+i);o.apply(null,[null].concat(u));function o(s){var l=e[++a],c=mc.call(arguments,0),f=c.slice(1),p=u.length,d=-1;if(s){i(s);return}for(;++d{"use strict";var er={}.hasOwnProperty;yc.exports=W0;function W0(e){return!e||typeof e!="object"?"":er.call(e,"position")||er.call(e,"type")?Cc(e.position):er.call(e,"start")||er.call(e,"end")?Cc(e):er.call(e,"line")||er.call(e,"column")?_n(e):""}function _n(e){return(!e||typeof e!="object")&&(e={}),bc(e.line)+":"+bc(e.column)}function Cc(e){return(!e||typeof e!="object")&&(e={}),_n(e.start)+"-"+_n(e.end)}function bc(e){return e&&typeof e=="number"?e:1}});var kc=C((aC,xc)=>{"use strict";var H0=Ac();xc.exports=Sn;function wc(){}wc.prototype=Error.prototype;Sn.prototype=new wc;var ke=Sn.prototype;ke.file="";ke.name="";ke.reason="";ke.message="";ke.stack="";ke.fatal=null;ke.column=null;ke.line=null;function Sn(e,r,t){var n,a,u;typeof r=="string"&&(t=r,r=null),n=K0(t),a=H0(r)||"1:1",u={start:{line:null,column:null},end:{line:null,column:null}},r&&r.position&&(r=r.position),r&&(r.start?(u=r,r=r.start):u.start=r),e.stack&&(this.stack=e.stack,e=e.message),this.message=e,this.name=a,this.reason=e,this.line=r?r.line:null,this.column=r?r.column:null,this.location=u,this.source=n[0],this.ruleId=n[1]}function K0(e){var r=[null,null],t;return typeof e=="string"&&(t=e.indexOf(":"),t===-1?r[1]=e:(r[0]=e.slice(0,t),r[1]=e.slice(t+1))),r}});var Bc=C(rr=>{"use strict";rr.basename=J0;rr.dirname=X0;rr.extname=Q0;rr.join=Z0;rr.sep="/";function J0(e,r){var t=0,n=-1,a,u,i,o;if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');if(wr(e),a=e.length,r===void 0||!r.length||r.length>e.length){for(;a--;)if(e.charCodeAt(a)===47){if(i){t=a+1;break}}else n<0&&(i=!0,n=a+1);return n<0?"":e.slice(t,n)}if(r===e)return"";for(u=-1,o=r.length-1;a--;)if(e.charCodeAt(a)===47){if(i){t=a+1;break}}else u<0&&(i=!0,u=a+1),o>-1&&(e.charCodeAt(a)===r.charCodeAt(o--)?o<0&&(n=a):(o=-1,n=u));return t===n?n=u:n<0&&(n=e.length),e.slice(t,n)}function X0(e){var r,t,n;if(wr(e),!e.length)return".";for(r=-1,n=e.length;--n;)if(e.charCodeAt(n)===47){if(t){r=n;break}}else t||(t=!0);return r<0?e.charCodeAt(0)===47?"/":".":r===1&&e.charCodeAt(0)===47?"//":e.slice(0,r)}function Q0(e){var r=-1,t=0,n=-1,a=0,u,i,o;for(wr(e),o=e.length;o--;){if(i=e.charCodeAt(o),i===47){if(u){t=o+1;break}continue}n<0&&(u=!0,n=o+1),i===46?r<0?r=o:a!==1&&(a=1):r>-1&&(a=-1)}return r<0||n<0||a===0||a===1&&r===n-1&&r===t+1?"":e.slice(r,n)}function Z0(){for(var e=-1,r;++e2){if(s=t.lastIndexOf("/"),s!==t.length-1){s<0?(t="",n=0):(t=t.slice(0,s),n=t.length-1-t.lastIndexOf("/")),a=i,u=0;continue}}else if(t.length){t="",n=0,a=i,u=0;continue}}r&&(t=t.length?t+"/..":"..",n=2)}else t.length?t+="/"+e.slice(a+1,i):t=e.slice(a+1,i),n=i-a-1;a=i,u=0}else o===46&&u>-1?u++:u=-1}return t}function wr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}});var qc=C(Tc=>{"use strict";Tc.cwd=tm;function tm(){return"/"}});var Oc=C((cC,Sc)=>{"use strict";var se=Bc(),nm=qc(),im=qn();Sc.exports=ge;var um={}.hasOwnProperty,On=["history","path","basename","stem","extname","dirname"];ge.prototype.toString=mm;Object.defineProperty(ge.prototype,"path",{get:am,set:om});Object.defineProperty(ge.prototype,"dirname",{get:sm,set:cm});Object.defineProperty(ge.prototype,"basename",{get:lm,set:fm});Object.defineProperty(ge.prototype,"extname",{get:Dm,set:pm});Object.defineProperty(ge.prototype,"stem",{get:hm,set:dm});function ge(e){var r,t;if(!e)e={};else if(typeof e=="string"||im(e))e={contents:e};else if("message"in e&&"messages"in e)return e;if(!(this instanceof ge))return new ge(e);for(this.data={},this.messages=[],this.history=[],this.cwd=nm.cwd(),t=-1;++t-1)throw new Error("`extname` cannot contain multiple dots")}this.path=se.join(this.dirname,this.stem+(e||""))}function hm(){return typeof this.path=="string"?se.basename(this.path,this.extname):void 0}function dm(e){Pn(e,"stem"),Ln(e,"stem"),this.path=se.join(this.dirname||"",e+(this.extname||""))}function mm(e){return(this.contents||"").toString(e)}function Ln(e,r){if(e&&e.indexOf(se.sep)>-1)throw new Error("`"+r+"` cannot be a path: did not expect `"+se.sep+"`")}function Pn(e,r){if(!e)throw new Error("`"+r+"` cannot be empty")}function _c(e,r){if(!e)throw new Error("Setting `"+r+"` requires `path` to be set too")}});var Pc=C((lC,Lc)=>{"use strict";var Fm=kc(),ct=Oc();Lc.exports=ct;ct.prototype.message=gm;ct.prototype.info=Em;ct.prototype.fail=vm;function gm(e,r,t){var n=new Fm(e,r,t);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}function vm(){var e=this.message.apply(this,arguments);throw e.fatal=!0,e}function Em(){var e=this.message.apply(this,arguments);return e.fatal=null,e}});var Nc=C((fC,Ic)=>{"use strict";Ic.exports=Pc()});var $c=C((DC,jc)=>{"use strict";var Rc=rc(),Cm=qn(),lt=fc(),Uc=pc(),Gc=Ec(),xr=Nc();jc.exports=Vc().freeze();var bm=[].slice,ym={}.hasOwnProperty,Am=Gc().use(wm).use(xm).use(km);function wm(e,r){r.tree=e.parse(r.file)}function xm(e,r,t){e.run(r.tree,r.file,n);function n(a,u,i){a?t(a):(r.tree=u,r.file=i,t())}}function km(e,r){var t=e.stringify(r.tree,r.file);t==null||(typeof t=="string"||Cm(t)?("value"in r.file&&(r.file.value=t),r.file.contents=t):r.file.result=t)}function Vc(){var e=[],r=Gc(),t={},n=-1,a;return u.data=o,u.freeze=i,u.attachers=e,u.use=s,u.parse=c,u.stringify=d,u.run=f,u.runSync=p,u.process=D,u.processSync=h,u;function u(){for(var m=Vc(),F=-1;++Fzi,options:()=>Yi,parsers:()=>Mn,printers:()=>Um});var ml=(e,r,t,n)=>{if(!(e&&r==null))return r.replaceAll?r.replaceAll(t,n):t.global?r.replace(t,n):r.split(t).join(n)},N=ml;var Fl=(e,r,t)=>{if(!(e&&r==null))return Array.isArray(r)||typeof r=="string"?r[t<0?r.length+t:t]:r.at(t)},z=Fl;var Ui=Ue(kr(),1);function le(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var G="string",H="array",Ce="cursor",re="indent",te="align",fe="trim",J="group",X="fill",K="if-break",De="indent-if-break",pe="line-suffix",he="line-suffix-boundary",V="line",de="label",ne="break-parent",Br=new Set([Ce,re,te,fe,J,X,K,De,pe,he,V,de,ne]);function vl(e){if(typeof e=="string")return G;if(Array.isArray(e))return H;if(!e)return;let{type:r}=e;if(Br.has(r))return r}var Y=vl;var El=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Cl(e){let r=e===null?"null":typeof e;if(r!=="string"&&r!=="object")return`Unexpected doc '${r}', +Expected it to be 'string' or 'object'.`;if(Y(e))throw new Error("doc is valid.");let t=Object.prototype.toString.call(e);if(t!=="[object Object]")return`Unexpected doc '${t}'.`;let n=El([...Br].map(a=>`'${a}'`));return`Unexpected doc.type '${e.type}'. +Expected it to be ${n}.`}var pt=class extends Error{name="InvalidDocError";constructor(r){super(Cl(r)),this.doc=r}},Te=pt;var Hn={};function bl(e,r,t,n){let a=[e];for(;a.length>0;){let u=a.pop();if(u===Hn){t(a.pop());continue}t&&a.push(u,Hn);let i=Y(u);if(!i)throw new Te(u);if((r==null?void 0:r(u))!==!1)switch(i){case H:case X:{let o=i===H?u:u.parts;for(let s=o.length,l=s-1;l>=0;--l)a.push(o[l]);break}case K:a.push(u.flatContents,u.breakContents);break;case J:if(n&&u.expandedStates)for(let o=u.expandedStates.length,s=o-1;s>=0;--s)a.push(u.expandedStates[s]);else a.push(u.contents);break;case te:case re:case De:case de:case pe:a.push(u.contents);break;case G:case Ce:case fe:case he:case V:case ne:break;default:throw new Te(u)}}}var ht=bl;function yl(e,r){if(typeof e=="string")return r(e);let t=new Map;return n(e);function n(u){if(t.has(u))return t.get(u);let i=a(u);return t.set(u,i),i}function a(u){switch(Y(u)){case H:return r(u.map(n));case X:return r({...u,parts:u.parts.map(n)});case K:return r({...u,breakContents:n(u.breakContents),flatContents:n(u.flatContents)});case J:{let{expandedStates:i,contents:o}=u;return i?(i=i.map(n),o=i[0]):o=n(o),r({...u,contents:o,expandedStates:i})}case te:case re:case De:case de:case pe:return r({...u,contents:n(u.contents)});case G:case Ce:case fe:case he:case V:case ne:return r(u);default:throw new Te(u)}}}function Kn(e){if(e.length>0){let r=z(!1,e,-1);!r.expandedStates&&!r.break&&(r.break="propagated")}return null}function Jn(e){let r=new Set,t=[];function n(u){if(u.type===ne&&Kn(t),u.type===J){if(t.push(u),r.has(u))return!1;r.add(u)}}function a(u){u.type===J&&t.pop().break&&Kn(t)}ht(e,n,a,!0)}function be(e,r=tr){return yl(e,t=>typeof t=="string"?Tr(r,t.split(` +`)):t)}var dt=()=>{},qe=dt,mt=dt,Xn=dt;function nr(e){return qe(e),{type:re,contents:e}}function ye(e,r){return qe(r),{type:te,contents:r,n:e}}function Me(e,r={}){return qe(e),mt(r.expandedStates,!0),{type:J,id:r.id,contents:e,break:!!r.shouldBreak,expandedStates:r.expandedStates}}function _e(e){return ye({type:"root"},e)}function ze(e){return Xn(e),{type:X,parts:e}}function Qn(e,r="",t={}){return qe(e),r!==""&&qe(r),{type:K,breakContents:e,flatContents:r,groupId:t.groupId}}var ir={type:ne};var ur={type:V,hard:!0},Al={type:V,hard:!0,literal:!0},qr={type:V},_r={type:V,soft:!0},P=[ur,ir],tr=[Al,ir];function Tr(e,r){qe(e),mt(r);let t=[];for(let n=0;nMath.max(n,a.length/r.length),0)}var Sr=wl;function xl(e,r){let t=e.match(new RegExp(`(${le(r)})+`,"gu"));if(t===null)return 0;let n=new Map,a=0;for(let u of t){let i=u.length/r.length;n.set(i,!0),i>a&&(a=i)}for(let u=1;uu?n:t}var ri=kl;var Ft=class extends Error{name="UnexpectedNodeError";constructor(r,t,n="type"){super(`Unexpected ${t} node ${n}: ${JSON.stringify(r[n])}.`),this.node=r}},ti=Ft;var oi=Ue(kr(),1);function Bl(e){return(e==null?void 0:e.type)==="front-matter"}var ni=Bl;var ar=3;function Tl(e){let r=e.slice(0,ar);if(r!=="---"&&r!=="+++")return;let t=e.indexOf(` +`,ar);if(t===-1)return;let n=e.slice(ar,t).trim(),a=e.indexOf(` +${r}`,t),u=n;if(u||(u=r==="+++"?"toml":"yaml"),a===-1&&r==="---"&&u==="yaml"&&(a=e.indexOf(` +...`,t)),a===-1)return;let i=a+1+ar,o=e.charAt(i+1);if(!/\s?/u.test(o))return;let s=e.slice(0,i);return{type:"front-matter",language:u,explicitLanguage:n,value:e.slice(t+1,a),startDelimiter:r,endDelimiter:s.slice(-ar),raw:s}}function ql(e){let r=Tl(e);if(!r)return{content:e};let{raw:t}=r;return{frontMatter:r,content:N(!1,t,/[^\n]/gu," ")+e.slice(t.length)}}var or=ql;var ii=["format","prettier"];function gt(e){let r=`@(${ii.join("|")})`,t=new RegExp([``,`\\{\\s*\\/\\*\\s*${r}\\s*\\*\\/\\s*\\}`,``].join("|"),"mu"),n=e.match(t);return(n==null?void 0:n.index)===0}var ui=e=>gt(or(e).content.trimStart()),ai=e=>{let r=or(e),t=``;return r.frontMatter?`${r.frontMatter.raw} + +${t} + +${r.content}`:`${t} + +${r.content}`};var _l=new Set(["position","raw"]);function si(e,r,t){if((e.type==="front-matter"||e.type==="code"||e.type==="yaml"||e.type==="import"||e.type==="export"||e.type==="jsx")&&delete r.value,e.type==="list"&&delete r.isAligned,(e.type==="list"||e.type==="listItem")&&delete r.spread,e.type==="text")return null;if(e.type==="inlineCode"&&(r.value=N(!1,e.value,` +`," ")),e.type==="wikiLink"&&(r.value=N(!1,e.value.trim(),/[\t\n]+/gu," ")),(e.type==="definition"||e.type==="linkReference"||e.type==="imageReference")&&(r.label=(0,oi.default)(e.label)),(e.type==="link"||e.type==="image")&&e.url&&e.url.includes("("))for(let n of"<>")r.url=N(!1,e.url,n,encodeURIComponent(n));if((e.type==="definition"||e.type==="link"||e.type==="image")&&e.title&&(r.title=N(!1,e.title,/\\(?=["')])/gu,"")),(t==null?void 0:t.type)==="root"&&t.children.length>0&&(t.children[0]===e||ni(t.children[0])&&t.children[1]===e)&&e.type==="html"&>(e.value))return null}si.ignoredProperties=_l;var ci=si;var li=/(?:[\u{2ea}-\u{2eb}\u{1100}-\u{11ff}\u{2e80}-\u{2e99}\u{2e9b}-\u{2ef3}\u{2f00}-\u{2fd5}\u{2ff0}-\u{303f}\u{3041}-\u{3096}\u{3099}-\u{30ff}\u{3105}-\u{312f}\u{3131}-\u{318e}\u{3190}-\u{4dbf}\u{4e00}-\u{9fff}\u{a700}-\u{a707}\u{a960}-\u{a97c}\u{ac00}-\u{d7a3}\u{d7b0}-\u{d7c6}\u{d7cb}-\u{d7fb}\u{f900}-\u{fa6d}\u{fa70}-\u{fad9}\u{fe10}-\u{fe1f}\u{fe30}-\u{fe6f}\u{ff00}-\u{ffef}\u{16fe3}\u{1aff0}-\u{1aff3}\u{1aff5}-\u{1affb}\u{1affd}-\u{1affe}\u{1b000}-\u{1b122}\u{1b132}\u{1b150}-\u{1b152}\u{1b155}\u{1b164}-\u{1b167}\u{1f200}\u{1f250}-\u{1f251}\u{20000}-\u{2a6df}\u{2a700}-\u{2b739}\u{2b740}-\u{2b81d}\u{2b820}-\u{2cea1}\u{2ceb0}-\u{2ebe0}\u{2f800}-\u{2fa1d}\u{30000}-\u{3134a}\u{31350}-\u{323af}])(?:[\u{fe00}-\u{fe0f}\u{e0100}-\u{e01ef}])?/u,Se=/(?:[\u{21}-\u{2f}\u{3a}-\u{40}\u{5b}-\u{60}\u{7b}-\u{7e}]|\p{General_Category=Connector_Punctuation}|\p{General_Category=Dash_Punctuation}|\p{General_Category=Close_Punctuation}|\p{General_Category=Final_Punctuation}|\p{General_Category=Initial_Punctuation}|\p{General_Category=Other_Punctuation}|\p{General_Category=Open_Punctuation})/u;async function Sl(e,r){if(e.language==="yaml"){let t=e.value.trim(),n=t?await r(t,{parser:"yaml"}):"";return _e([e.startDelimiter,e.explicitLanguage,P,n,n?P:"",e.endDelimiter])}}var fi=Sl;var Ol=e=>String(e).split(/[/\\]/u).pop();function Di(e,r){if(!r)return;let t=Ol(r).toLowerCase();return e.find(({filenames:n})=>n==null?void 0:n.some(a=>a.toLowerCase()===t))??e.find(({extensions:n})=>n==null?void 0:n.some(a=>t.endsWith(a)))}function Ll(e,r){if(r)return e.find(({name:t})=>t.toLowerCase()===r)??e.find(({aliases:t})=>t==null?void 0:t.includes(r))??e.find(({extensions:t})=>t==null?void 0:t.includes(`.${r}`))}function Pl(e,r){let t=e.plugins.flatMap(a=>a.languages??[]),n=Ll(t,r.language)??Di(t,r.physicalFile)??Di(t,r.file)??(r.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var pi=Pl;var Il=new Proxy(()=>{},{get:()=>Il});function Oe(e){return e.position.start.offset}function Le(e){return e.position.end.offset}var vt=new Set(["liquidNode","inlineCode","emphasis","esComment","strong","delete","wikiLink","link","linkReference","image","imageReference","footnote","footnoteReference","sentence","whitespace","word","break","inlineMath"]),Lr=new Set([...vt,"tableCell","paragraph","heading"]),Ge="non-cjk",ie="cj-letter",Pe="k-letter",sr="cjk-punctuation",Nl=/\p{Script_Extensions=Hangul}/u;function Pr(e){let r=[],t=e.split(/([\t\n ]+)/u);for(let[a,u]of t.entries()){if(a%2===1){r.push({type:"whitespace",value:/\n/u.test(u)?` +`:" "});continue}if((a===0||a===t.length-1)&&u==="")continue;let i=u.split(new RegExp(`(${li.source})`,"u"));for(let[o,s]of i.entries())if(!((o===0||o===i.length-1)&&s==="")){if(o%2===0){s!==""&&n({type:"word",value:s,kind:Ge,isCJ:!1,hasLeadingPunctuation:Se.test(s[0]),hasTrailingPunctuation:Se.test(z(!1,s,-1))});continue}if(Se.test(s)){n({type:"word",value:s,kind:sr,isCJ:!0,hasLeadingPunctuation:!0,hasTrailingPunctuation:!0});continue}if(Nl.test(s)){n({type:"word",value:s,kind:Pe,isCJ:!1,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1});continue}n({type:"word",value:s,kind:ie,isCJ:!0,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1})}}return r;function n(a){let u=z(!1,r,-1);(u==null?void 0:u.type)==="word"&&!i(Ge,sr)&&![u.value,a.value].some(o=>/\u3000/u.test(o))&&r.push({type:"whitespace",value:""}),r.push(a);function i(o,s){return u.kind===o&&a.kind===s||u.kind===s&&a.kind===o}}}function Ye(e,r){let t=r.originalText.slice(e.position.start.offset,e.position.end.offset),{numberText:n,leadingSpaces:a}=t.match(/^\s*(?\d+)(\.|\))(?\s*)/u).groups;return{number:Number(n),leadingSpaces:a}}function hi(e,r){return!e.ordered||e.children.length<2||Ye(e.children[1],r).number!==1?!1:Ye(e.children[0],r).number!==0?!0:e.children.length>2&&Ye(e.children[2],r).number===1}function Ir(e,r){let{value:t}=e;return e.position.end.offset===r.length&&t.endsWith(` +`)&&r.endsWith(` +`)?t.slice(0,-1):t}function Ae(e,r){return function t(n,a,u){let i={...r(n,a,u)};return i.children&&(i.children=i.children.map((o,s)=>t(o,s,[i,...u]))),i}(e,null,[])}function Et(e){if((e==null?void 0:e.type)!=="link"||e.children.length!==1)return!1;let[r]=e.children;return Oe(e)===Oe(r)&&Le(e)===Le(r)}function Rl(e,r){let{node:t}=e;if(t.type==="code"&&t.lang!==null){let n=pi(r,{language:t.lang});if(n)return async a=>{let u=r.__inJsTemplate?"~":"`",i=u.repeat(Math.max(3,Sr(t.value,u)+1)),o={parser:n};t.lang==="ts"||t.lang==="typescript"?o.filepath="dummy.ts":t.lang==="tsx"&&(o.filepath="dummy.tsx");let s=await a(Ir(t,r.originalText),o);return _e([i,t.lang,t.meta?" "+t.meta:"",P,be(s),P,i])}}switch(t.type){case"front-matter":return n=>fi(t,n);case"import":case"export":return n=>n(t.value,{parser:"babel"});case"jsx":return n=>n(`<$>${t.value}`,{parser:"__js_expression",rootMarker:"mdx"})}return null}var di=Rl;var cr=null;function lr(e){if(cr!==null&&typeof cr.property){let r=cr;return cr=lr.prototype=null,r}return cr=lr.prototype=e??Object.create(null),new lr}var Ul=10;for(let e=0;e<=Ul;e++)lr();function Ct(e){return lr(e)}function Ml(e,r="type"){Ct(e);function t(n){let a=n[r],u=e[a];if(!Array.isArray(u))throw Object.assign(new Error(`Missing visitor keys for '${a}'.`),{node:n});return u}return t}var mi=Ml;var zl={"front-matter":[],root:["children"],paragraph:["children"],sentence:["children"],word:[],whitespace:[],emphasis:["children"],strong:["children"],delete:["children"],inlineCode:[],wikiLink:[],link:["children"],image:[],blockquote:["children"],heading:["children"],code:[],html:[],list:["children"],thematicBreak:[],linkReference:["children"],imageReference:[],definition:[],footnote:["children"],footnoteReference:[],footnoteDefinition:["children"],table:["children"],tableCell:["children"],break:[],liquidNode:[],import:[],export:[],esComment:[],jsx:[],math:[],inlineMath:[],tableRow:["children"],listItem:["children"],text:[]},Fi=zl;var Yl=mi(Fi),gi=Yl;function vi(e){switch(e){case"cr":return"\r";case"crlf":return`\r +`;default:return` +`}}var Ei=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF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DED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function Ci(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function bi(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var yi=e=>!(Ci(e)||bi(e));var Gl=/[^\x20-\x7F]/u;function Vl(e){if(!e)return 0;if(!Gl.test(e))return e.length;e=e.replace(Ei()," ");let r=0;for(let t of e){let n=t.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(r+=yi(n)?1:2)}return r}var fr=Vl;var j=Symbol("MODE_BREAK"),ue=Symbol("MODE_FLAT"),Ve=Symbol("cursor"),bt=Symbol("DOC_FILL_PRINTED_LENGTH");function Ai(){return{value:"",length:0,queue:[]}}function jl(e,r){return yt(e,{type:"indent"},r)}function $l(e,r,t){return r===Number.NEGATIVE_INFINITY?e.root||Ai():r<0?yt(e,{type:"dedent"},t):r?r.type==="root"?{...e,root:e}:yt(e,{type:typeof r=="string"?"stringAlign":"numberAlign",n:r},t):e}function yt(e,r,t){let n=r.type==="dedent"?e.queue.slice(0,-1):[...e.queue,r],a="",u=0,i=0,o=0;for(let D of n)switch(D.type){case"indent":c(),t.useTabs?s(1):l(t.tabWidth);break;case"stringAlign":c(),a+=D.n,u+=D.n.length;break;case"numberAlign":i+=1,o+=D.n;break;default:throw new Error(`Unexpected type '${D.type}'`)}return p(),{...e,value:a,length:u,queue:n};function s(D){a+=" ".repeat(D),u+=t.tabWidth*D}function l(D){a+=" ".repeat(D),u+=D}function c(){t.useTabs?f():p()}function f(){i>0&&s(i),d()}function p(){o>0&&l(o),d()}function d(){i=0,o=0}}function At(e){let r=0,t=0,n=e.length;e:for(;n--;){let a=e[n];if(a===Ve){t++;continue}for(let u=a.length-1;u>=0;u--){let i=a[u];if(i===" "||i===" ")r++;else{e[n]=a.slice(0,u+1);break e}}}if(r>0||t>0)for(e.length=n+1;t-- >0;)e.push(Ve);return r}function Nr(e,r,t,n,a,u){if(t===Number.POSITIVE_INFINITY)return!0;let i=r.length,o=[e],s=[];for(;t>=0;){if(o.length===0){if(i===0)return!0;o.push(r[--i]);continue}let{mode:l,doc:c}=o.pop(),f=Y(c);switch(f){case G:s.push(c),t-=fr(c);break;case H:case X:{let p=f===H?c:c.parts,d=c[bt]??0;for(let D=p.length-1;D>=d;D--)o.push({mode:l,doc:p[D]});break}case re:case te:case De:case de:o.push({mode:l,doc:c.contents});break;case fe:t+=At(s);break;case J:{if(u&&c.break)return!1;let p=c.break?j:l,d=c.expandedStates&&p===j?z(!1,c.expandedStates,-1):c.contents;o.push({mode:p,doc:d});break}case K:{let d=(c.groupId?a[c.groupId]||ue:l)===j?c.breakContents:c.flatContents;d&&o.push({mode:l,doc:d});break}case V:if(l===j||c.hard)return!0;c.soft||(s.push(" "),t--);break;case pe:n=!0;break;case he:if(n)return!1;break}}return!1}function wi(e,r){let t={},n=r.printWidth,a=vi(r.endOfLine),u=0,i=[{ind:Ai(),mode:j,doc:e}],o=[],s=!1,l=[],c=0;for(Jn(e);i.length>0;){let{ind:p,mode:d,doc:D}=i.pop();switch(Y(D)){case G:{let h=a!==` +`?N(!1,D,` +`,a):D;o.push(h),i.length>0&&(u+=fr(h));break}case H:for(let h=D.length-1;h>=0;h--)i.push({ind:p,mode:d,doc:D[h]});break;case Ce:if(c>=2)throw new Error("There are too many 'cursor' in doc.");o.push(Ve),c++;break;case re:i.push({ind:jl(p,r),mode:d,doc:D.contents});break;case te:i.push({ind:$l(p,D.n,r),mode:d,doc:D.contents});break;case fe:u-=At(o);break;case J:switch(d){case ue:if(!s){i.push({ind:p,mode:D.break?j:ue,doc:D.contents});break}case j:{s=!1;let h={ind:p,mode:ue,doc:D.contents},m=n-u,F=l.length>0;if(!D.break&&Nr(h,i,m,F,t))i.push(h);else if(D.expandedStates){let y=z(!1,D.expandedStates,-1);if(D.break){i.push({ind:p,mode:j,doc:y});break}else for(let E=1;E=D.expandedStates.length){i.push({ind:p,mode:j,doc:y});break}else{let B=D.expandedStates[E],b={ind:p,mode:ue,doc:B};if(Nr(b,i,m,F,t)){i.push(b);break}}}else i.push({ind:p,mode:j,doc:D.contents});break}}D.id&&(t[D.id]=z(!1,i,-1).mode);break;case X:{let h=n-u,m=D[bt]??0,{parts:F}=D,y=F.length-m;if(y===0)break;let E=F[m+0],B=F[m+1],b={ind:p,mode:ue,doc:E},g={ind:p,mode:j,doc:E},A=Nr(b,[],h,l.length>0,t,!0);if(y===1){A?i.push(b):i.push(g);break}let w={ind:p,mode:ue,doc:B},v={ind:p,mode:j,doc:B};if(y===2){A?i.push(w,b):i.push(v,g);break}let x=F[m+2],k={ind:p,mode:d,doc:{...D,[bt]:m+2}};Nr({ind:p,mode:ue,doc:[E,B,x]},[],h,l.length>0,t,!0)?i.push(k,w,b):A?i.push(k,v,b):i.push(k,v,g);break}case K:case De:{let h=D.groupId?t[D.groupId]:d;if(h===j){let m=D.type===K?D.breakContents:D.negate?D.contents:nr(D.contents);m&&i.push({ind:p,mode:d,doc:m})}if(h===ue){let m=D.type===K?D.flatContents:D.negate?nr(D.contents):D.contents;m&&i.push({ind:p,mode:d,doc:m})}break}case pe:l.push({ind:p,mode:d,doc:D.contents});break;case he:l.length>0&&i.push({ind:p,mode:d,doc:ur});break;case V:switch(d){case ue:if(D.hard)s=!0;else{D.soft||(o.push(" "),u+=1);break}case j:if(l.length>0){i.push({ind:p,mode:d,doc:D},...l.reverse()),l.length=0;break}D.literal?p.root?(o.push(a,p.root.value),u=p.root.length):(o.push(a),u=0):(u-=At(o),o.push(a+p.value),u=p.length);break}break;case de:i.push({ind:p,mode:d,doc:D.contents});break;case ne:break;default:throw new Te(D)}i.length===0&&l.length>0&&(i.push(...l.reverse()),l.length=0)}let f=o.indexOf(Ve);if(f!==-1){let p=o.indexOf(Ve,f+1);if(p===-1)return{formatted:o.filter(m=>m!==Ve).join("")};let d=o.slice(0,f).join(""),D=o.slice(f+1,p).join(""),h=o.slice(p+1).join("");return{formatted:d+D+h,cursorNodeStart:d.length,cursorNodeText:D}}return{formatted:o.join("")}}function xi(e,r,t){let{node:n}=e,a=[],u=e.map(()=>e.map(({index:f})=>{let p=wi(t(),r).formatted,d=fr(p);return a[f]=Math.max(a[f]??3,d),{text:p,width:d}},"children"),"children"),i=s(!1);if(r.proseWrap!=="never")return[ir,i];let o=s(!0);return[ir,Me(Qn(o,i))];function s(f){return Tr(ur,[c(u[0],f),l(f),...u.slice(1).map(p=>c(p,f))].map(p=>`| ${p.join(" | ")} |`))}function l(f){return a.map((p,d)=>{let D=n.align[d],h=D==="center"||D==="left"?":":"-",m=D==="center"||D==="right"?":":"-",F=f?"-":"-".repeat(p-2);return`${h}${F}${m}`})}function c(f,p){return f.map(({text:d,width:D},h)=>{if(p)return d;let m=a[h]-D,F=n.align[h],y=0;F==="right"?y=m:F==="center"&&(y=Math.floor(m/2));let E=m-y;return`${" ".repeat(y)}${d}${" ".repeat(E)}`})}}function ki(e,r,t){let n=e.map(t,"children");return Wl(n)}function Wl(e){let r=[""];return function t(n){for(let a of n){let u=Y(a);if(u===H){t(a);continue}let i=a,o=[];u===X&&([i,...o]=a.parts),r.push([r.pop(),i],...o)}}(e),ze(r)}var Q,wt=class{constructor(r){jn(this,Q);$n(this,Q,new Set(r))}getLeadingWhitespaceCount(r){let t=ce(this,Q),n=0;for(let a=0;a=0&&t.has(r.charAt(a));a--)n++;return n}getLeadingWhitespace(r){let t=this.getLeadingWhitespaceCount(r);return r.slice(0,t)}getTrailingWhitespace(r){let t=this.getTrailingWhitespaceCount(r);return r.slice(r.length-t)}hasLeadingWhitespace(r){return ce(this,Q).has(r.charAt(0))}hasTrailingWhitespace(r){return ce(this,Q).has(z(!1,r,-1))}trimStart(r){let t=this.getLeadingWhitespaceCount(r);return r.slice(t)}trimEnd(r){let t=this.getTrailingWhitespaceCount(r);return r.slice(0,r.length-t)}trim(r){return this.trimEnd(this.trimStart(r))}split(r,t=!1){let n=`[${le([...ce(this,Q)].join(""))}]+`,a=new RegExp(t?`(${n})`:n,"u");return r.split(a)}hasWhitespaceCharacter(r){let t=ce(this,Q);return Array.prototype.some.call(r,n=>t.has(n))}hasNonWhitespaceCharacter(r){let t=ce(this,Q);return Array.prototype.some.call(r,n=>!t.has(n))}isWhitespaceOnly(r){let t=ce(this,Q);return Array.prototype.every.call(r,n=>t.has(n))}};Q=new WeakMap;var Bi=wt;var Hl=[" ",` +`,"\f","\r"," "],Kl=new Bi(Hl),xt=Kl;var Jl=/^.$/su;function Xl(e,r){return e=Ql(e,r),e=ef(e),e=tf(e,r),e=nf(e,r),e=rf(e),e}function Ql(e,r){return Ae(e,t=>t.type!=="text"||t.value==="*"||t.value==="_"||!Jl.test(t.value)||t.position.end.offset-t.position.start.offset===t.value.length?t:{...t,value:r.originalText.slice(t.position.start.offset,t.position.end.offset)})}function Zl(e,r,t){return Ae(e,n=>{if(!n.children)return n;let a=n.children.reduce((u,i)=>{let o=z(!1,u,-1);return o&&r(o,i)?u.splice(-1,1,t(o,i)):u.push(i),u},[]);return{...n,children:a}})}function ef(e){return Zl(e,(r,t)=>r.type==="text"&&t.type==="text",(r,t)=>({type:"text",value:r.value+t.value,position:{start:r.position.start,end:t.position.end}}))}function rf(e){return Ae(e,(r,t,[n])=>{if(r.type!=="text")return r;let{value:a}=r;return n.type==="paragraph"&&(t===0&&(a=xt.trimStart(a)),t===n.children.length-1&&(a=xt.trimEnd(a))),{type:"sentence",position:r.position,children:Pr(a)}})}function tf(e,r){return Ae(e,(t,n,a)=>{if(t.type==="code"){let u=/^\n?(?: {4,}|\t)/u.test(r.originalText.slice(t.position.start.offset,t.position.end.offset));if(t.isIndented=u,u)for(let i=0;i{if(a.type==="list"&&a.children.length>0){for(let o=0;o1)return!0;let s=t(u);if(s===-1)return!1;if(a.children.length===1)return s%r.tabWidth===0;let l=t(i);return s!==l?!1:s%r.tabWidth===0?!0:Ye(i,r).leadingSpaces.length>1}}var Ti=Xl;function qi(e,r){let t=[""];return e.each(()=>{let{node:n}=e,a=r();switch(n.type){case"whitespace":if(Y(a)!==G){t.push(a,"");break}default:t.push([t.pop(),a])}},"children"),ze(t)}var uf=new Set(["heading","tableCell","link","wikiLink"]),_i=new Set("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~");function af({parent:e}){if(e.usesCJSpaces===void 0){let r={" ":0,"":0},{children:t}=e;for(let n=1;nr[""]}return e.usesCJSpaces}function of(e,r){if(r)return!0;let{previous:t,next:n}=e;if(!t||!n)return!0;let a=t.kind,u=n.kind;return Si(a)&&Si(u)||a===Pe&&u===ie||u===Pe&&a===ie?!0:a===sr||u===sr||a===ie&&u===ie?!1:_i.has(n.value[0])||_i.has(z(!1,t.value,-1))?!0:t.hasTrailingPunctuation||n.hasLeadingPunctuation?!1:af(e)}function Si(e){return e===Ge||e===Pe}function sf(e,r,t,n){if(t!=="always"||e.hasAncestor(i=>uf.has(i.type)))return!1;if(n)return r!=="";let{previous:a,next:u}=e;return!a||!u?!0:r===""?!1:a.kind===Pe&&u.kind===ie||u.kind===Pe&&a.kind===ie?!0:!(a.isCJ||u.isCJ)}function kt(e,r,t,n){if(t==="preserve"&&r===` +`)return P;let a=r===" "||r===` +`&&of(e,n);return sf(e,r,t,n)?a?qr:_r:a?" ":""}var cf=new Set(["listItem","definition"]);function lf(e,r,t){var a,u;let{node:n}=e;if(mf(e)){let i=[""],o=Pr(r.originalText.slice(n.position.start.offset,n.position.end.offset));for(let s of o){if(s.type==="word"){i.push([i.pop(),s.value]);continue}let l=kt(e,s.value,r.proseWrap,!0);if(Y(l)===G){i.push([i.pop(),l]);continue}i.push(l,"")}return ze(i)}switch(n.type){case"front-matter":return r.originalText.slice(n.position.start.offset,n.position.end.offset);case"root":return n.children.length===0?"":[pf(e,r,t),P];case"paragraph":return ki(e,r,t);case"sentence":return qi(e,t);case"word":{let i=N(!1,N(!1,n.value,"*",String.raw`\*`),new RegExp([`(^|${Se.source})(_+)`,`(_+)(${Se.source}|$)`].join("|"),"gu"),(l,c,f,p,d)=>N(!1,f?`${c}${f}`:`${p}${d}`,"_",String.raw`\_`)),o=(l,c,f)=>l.type==="sentence"&&f===0,s=(l,c,f)=>Et(l.children[f-1]);return i!==n.value&&(e.match(void 0,o,s)||e.match(void 0,o,(l,c,f)=>l.type==="emphasis"&&f===0,s))&&(i=i.replace(/^(\\?[*_])+/u,l=>N(!1,l,"\\",""))),i}case"whitespace":{let{next:i}=e,o=i&&/^>|^(?:[*+-]|#{1,6}|\d+[).])$/u.test(i.value)?"never":r.proseWrap;return kt(e,n.value,o)}case"emphasis":{let i;if(Et(n.children[0]))i=r.originalText[n.position.start.offset];else{let{previous:o,next:s}=e;i=(o==null?void 0:o.type)==="sentence"&&((a=z(!1,o.children,-1))==null?void 0:a.type)==="word"&&!z(!1,o.children,-1).hasTrailingPunctuation||(s==null?void 0:s.type)==="sentence"&&((u=s.children[0])==null?void 0:u.type)==="word"&&!s.children[0].hasLeadingPunctuation||e.hasAncestor(c=>c.type==="emphasis")?"*":"_"}return[i,$(e,r,t),i]}case"strong":return["**",$(e,r,t),"**"];case"delete":return["~~",$(e,r,t),"~~"];case"inlineCode":{let i=r.proseWrap==="preserve"?n.value:N(!1,n.value,` +`," "),o=Zn(i,"`"),s="`".repeat(o||1),l=i.startsWith("`")||i.endsWith("`")||/^[\n ]/u.test(i)&&/[\n ]$/u.test(i)&&/[^\n ]/u.test(i)?" ":"";return[s,l,i,l,s]}case"wikiLink":{let i="";return r.proseWrap==="preserve"?i=n.value:i=N(!1,n.value,/[\t\n]+/gu," "),["[[",i,"]]"]}case"link":switch(r.originalText[n.position.start.offset]){case"<":{let i="mailto:";return["<",n.url.startsWith(i)&&r.originalText.slice(n.position.start.offset+1,n.position.start.offset+1+i.length)!==i?n.url.slice(i.length):n.url,">"]}case"[":return["[",$(e,r,t),"](",Bt(n.url,")"),Rr(n.title,r),")"];default:return r.originalText.slice(n.position.start.offset,n.position.end.offset)}case"image":return["![",n.alt||"","](",Bt(n.url,")"),Rr(n.title,r),")"];case"blockquote":return["> ",ye("> ",$(e,r,t))];case"heading":return["#".repeat(n.depth)+" ",$(e,r,t)];case"code":{if(n.isIndented){let s=" ".repeat(4);return ye(s,[s,be(n.value,P)])}let i=r.__inJsTemplate?"~":"`",o=i.repeat(Math.max(3,Sr(n.value,i)+1));return[o,n.lang||"",n.meta?" "+n.meta:"",P,be(Ir(n,r.originalText),P),P,o]}case"html":{let{parent:i,isLast:o}=e,s=i.type==="root"&&o?n.value.trimEnd():n.value,l=/^$/su.test(s);return be(s,l?P:_e(tr))}case"list":{let i=Li(n,e.parent),o=hi(n,r);return $(e,r,t,{processor(s){let l=f(),c=s.node;if(c.children.length===2&&c.children[1].type==="html"&&c.children[0].position.start.column!==c.children[1].position.start.column)return[l,Oi(s,r,t,l)];return[l,ye(" ".repeat(l.length),Oi(s,r,t,l))];function f(){let p=n.ordered?(s.isFirst?n.start:o?1:n.start+s.index)+(i%2===0?". ":") "):i%2===0?"- ":"* ";return(n.isAligned||n.hasIndentedCodeblock)&&n.ordered?ff(p,r):p}}})}case"thematicBreak":{let{ancestors:i}=e,o=i.findIndex(l=>l.type==="list");return o===-1?"---":Li(i[o],i[o+1])%2===0?"***":"---"}case"linkReference":return["[",$(e,r,t),"]",n.referenceType==="full"?Tt(n):n.referenceType==="collapsed"?"[]":""];case"imageReference":switch(n.referenceType){case"full":return["![",n.alt||"","]",Tt(n)];default:return["![",n.alt,"]",n.referenceType==="collapsed"?"[]":""]}case"definition":{let i=r.proseWrap==="always"?qr:" ";return Me([Tt(n),":",nr([i,Bt(n.url),n.title===null?"":[i,Rr(n.title,r,!1)]])])}case"footnote":return["[^",$(e,r,t),"]"];case"footnoteReference":return Ri(n);case"footnoteDefinition":{let i=n.children.length===1&&n.children[0].type==="paragraph"&&(r.proseWrap==="never"||r.proseWrap==="preserve"&&n.children[0].position.start.line===n.children[0].position.end.line);return[Ri(n),": ",i?$(e,r,t):Me([ye(" ".repeat(4),$(e,r,t,{processor:({isFirst:o})=>o?Me([_r,t()]):t()}))])]}case"table":return xi(e,r,t);case"tableCell":return $(e,r,t);case"break":return/\s/u.test(r.originalText[n.position.start.offset])?[" ",_e(tr)]:["\\",P];case"liquidNode":return be(n.value,P);case"import":case"export":case"jsx":return n.value;case"esComment":return["{/* ",n.value," */}"];case"math":return["$$",P,n.value?[be(n.value,P),P]:"","$$"];case"inlineMath":return r.originalText.slice(Oe(n),Le(n));case"tableRow":case"listItem":case"text":default:throw new ti(n,"Markdown")}}function Oi(e,r,t,n){let{node:a}=e,u=a.checked===null?"":a.checked?"[x] ":"[ ] ";return[u,$(e,r,t,{processor({node:i,isFirst:o}){if(o&&i.type!=="list")return ye(" ".repeat(u.length),t());let s=" ".repeat(gf(r.tabWidth-n.length,0,3));return[s,ye(s,t())]}})]}function ff(e,r){let t=n();return e+" ".repeat(t>=4?0:t);function n(){let a=e.length%r.tabWidth;return a===0?0:r.tabWidth-a}}function Li(e,r){return Df(e,r,t=>t.ordered===e.ordered)}function Df(e,r,t){let n=-1;for(let a of r.children)if(a.type===e.type&&t(a)?n++:n=-1,a===e)return n}function pf(e,r,t){let n=[],a=null,{children:u}=e.node;for(let[i,o]of u.entries())switch(qt(o)){case"start":a===null&&(a={index:i,offset:o.position.end.offset});break;case"end":a!==null&&(n.push({start:a,end:{index:i,offset:o.position.start.offset}}),a=null);break;default:break}return $(e,r,t,{processor({index:i}){if(n.length>0){let o=n[0];if(i===o.start.index)return[Pi(u[o.start.index]),r.originalText.slice(o.start.offset,o.end.offset),Pi(u[o.end.index])];if(o.start.index{let i=a(e);i!==!1&&(u.length>0&&hf(e)&&(u.push(P),(df(e,r)||Ni(e))&&u.push(P),Ni(e)&&u.push(P)),u.push(i))},"children"),u}function Pi(e){if(e.type==="html")return e.value;if(e.type==="paragraph"&&Array.isArray(e.children)&&e.children.length===1&&e.children[0].type==="esComment")return["{/* ",e.children[0].value," */}"]}function qt(e){let r;if(e.type==="html")r=e.value.match(/^$/u);else{let t;e.type==="esComment"?t=e:e.type==="paragraph"&&e.children.length===1&&e.children[0].type==="esComment"&&(t=e.children[0]),t&&(r=t.value.match(/^prettier-ignore(?:-(start|end))?$/u))}return r?r[1]||"next":!1}function hf({node:e,parent:r}){let t=vt.has(e.type),n=e.type==="html"&&Lr.has(r.type);return!t&&!n}function Ii(e,r){return e.type==="listItem"&&(e.spread||r.originalText.charAt(e.position.end.offset-1)===` +`)}function df({node:e,previous:r,parent:t},n){if(Ii(r,n))return!0;let i=r.type===e.type&&cf.has(e.type),o=t.type==="listItem"&&!Ii(t,n),s=qt(r)==="next",l=e.type==="html"&&r.type==="html"&&r.position.end.line+1===e.position.start.line,c=e.type==="html"&&t.type==="listItem"&&r.type==="paragraph"&&r.position.end.line+1===e.position.start.line;return!(i||o||s||l||c)}function Ni({node:e,previous:r}){let t=r.type==="list",n=e.type==="code"&&e.isIndented;return t&&n}function mf(e){let r=e.findAncestor(t=>t.type==="linkReference"||t.type==="imageReference");return r&&(r.type!=="linkReference"||r.referenceType!=="full")}var Ff=(e,r)=>{for(let t of r)e=N(!1,e,t,encodeURIComponent(t));return e};function Bt(e,r=[]){let t=[" ",...Array.isArray(r)?r:[r]];return new RegExp(t.map(n=>le(n)).join("|"),"u").test(e)?`<${Ff(e,"<>")}>`:e}function Rr(e,r,t=!0){if(!e)return"";if(t)return" "+Rr(e,r,!1);if(e=N(!1,e,/\\(?=["')])/gu,""),e.includes('"')&&e.includes("'")&&!e.includes(")"))return`(${e})`;let n=ri(e,r.singleQuote);return e=N(!1,e,"\\","\\\\"),e=N(!1,e,n,`\\${n}`),`${n}${e}${n}`}function gf(e,r,t){return Math.max(r,Math.min(e,t))}function vf(e){return e.index>0&&qt(e.previous)==="next"}function Tt(e){return`[${(0,Ui.default)(e.label)}]`}function Ri(e){return`[^${e.label}]`}var Ef={preprocess:Ti,print:lf,embed:di,massageAstNode:ci,hasPrettierIgnore:vf,insertPragma:ai,getVisitorKeys:gi},Mi=Ef;var zi=[{linguistLanguageId:222,name:"Markdown",type:"prose",color:"#083fa1",aliases:["md","pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".md",".livemd",".markdown",".mdown",".mdwn",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],filenames:["contents.lr","README"],tmScope:"text.md",parsers:["markdown"],vscodeLanguageIds:["markdown"]},{linguistLanguageId:222,name:"MDX",type:"prose",color:"#083fa1",aliases:["md","pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".mdx"],filenames:[],tmScope:"text.md",parsers:["mdx"],vscodeLanguageIds:["mdx"]}];var _t={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Cf={proseWrap:_t.proseWrap,singleQuote:_t.singleQuote},Yi=Cf;var Mn={};Gn(Mn,{markdown:()=>Nm,mdx:()=>Rm,remark:()=>Nm});var il=Ue(Vi(),1),ul=Ue(iu(),1),al=Ue(Zs(),1),ol=Ue($c(),1);var Tm=/^import\s/u,qm=/^export\s/u,Wc=String.raw`[a-z][a-z0-9]*(\.[a-z][a-z0-9]*)*|`,Hc=/|/u,_m=/^\{\s*\/\*(.*)\*\/\s*\}/u,Sm=` + +`,Kc=e=>Tm.test(e),Un=e=>qm.test(e),Jc=(e,r)=>{let t=r.indexOf(Sm),n=r.slice(0,t);if(Un(n)||Kc(n))return e(n)({type:Un(n)?"export":"import",value:n})},Xc=(e,r)=>{let t=_m.exec(r);if(t)return e(t[0])({type:"esComment",value:t[1].trim()})};Jc.locator=e=>Un(e)||Kc(e)?-1:1;Xc.locator=(e,r)=>e.indexOf("{",r);var Qc=function(){let{Parser:e}=this,{blockTokenizers:r,blockMethods:t,inlineTokenizers:n,inlineMethods:a}=e.prototype;r.esSyntax=Jc,n.esComment=Xc,t.splice(t.indexOf("paragraph"),0,"esSyntax"),a.splice(a.indexOf("text"),0,"esComment")};var Om=function(){let e=this.Parser.prototype;e.blockMethods=["frontMatter",...e.blockMethods],e.blockTokenizers.frontMatter=r;function r(t,n){let a=or(n);if(a.frontMatter)return t(a.frontMatter.raw)(a.frontMatter)}r.onlyAtStart=!0},Zc=Om;function Lm(){return e=>Ae(e,(r,t,[n])=>r.type!=="html"||Hc.test(r.value)||Lr.has(n.type)?r:{...r,type:"jsx"})}var el=Lm;var Pm=function(){let e=this.Parser.prototype,r=e.inlineMethods;r.splice(r.indexOf("text"),0,"liquid"),e.inlineTokenizers.liquid=t;function t(n,a){let u=a.match(/^(\{%.*?%\}|\{\{.*?\}\})/su);if(u)return n(u[0])({type:"liquidNode",value:u[0]})}t.locator=function(n,a){return n.indexOf("{",a)}},rl=Pm;var Im=function(){let e="wikiLink",r=/^\[\[(?.+?)\]\]/su,t=this.Parser.prototype,n=t.inlineMethods;n.splice(n.indexOf("link"),0,e),t.inlineTokenizers.wikiLink=a;function a(u,i){let o=r.exec(i);if(o){let s=o.groups.linkContents.trim();return u(o[0])({type:e,value:s})}}a.locator=function(u,i){return u.indexOf("[",i)}},tl=Im;function sl({isMDX:e}){return r=>{let t=(0,ol.default)().use(al.default,{commonmark:!0,...e&&{blocks:[Wc]}}).use(il.default).use(Zc).use(ul.default).use(e?Qc:nl).use(rl).use(e?el:nl).use(tl);return t.run(t.parse(r))}}function nl(){}var cl={astFormat:"mdast",hasPragma:ui,locStart:Oe,locEnd:Le},Nm={...cl,parse:sl({isMDX:!1})},Rm={...cl,parse:sl({isMDX:!0})};var Um={mdast:Mi};var OC=zn;export{OC as default,zi as languages,Yi as options,Mn as parsers,Um as printers}; diff --git a/node_modules/prettier/plugins/meriyah.d.ts b/node_modules/prettier/plugins/meriyah.d.ts new file mode 100644 index 0000000..6541de5 --- /dev/null +++ b/node_modules/prettier/plugins/meriyah.d.ts @@ -0,0 +1,5 @@ +import { Parser } from "../index.js"; + +export declare const parsers: { + meriyah: Parser; +}; diff --git a/node_modules/prettier/plugins/meriyah.js b/node_modules/prettier/plugins/meriyah.js new file mode 100644 index 0000000..203a56a --- /dev/null +++ b/node_modules/prettier/plugins/meriyah.js @@ -0,0 +1,4 @@ +(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.meriyah=e()}})(function(){"use strict";var x2=Object.defineProperty;var Ne=Object.getOwnPropertyDescriptor;var Ve=Object.getOwnPropertyNames;var Oe=Object.prototype.hasOwnProperty;var In=(n,e)=>{for(var u in e)x2(n,u,{get:e[u],enumerable:!0})},Re=(n,e,u,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Ve(e))!Oe.call(n,o)&&o!==u&&x2(n,o,{get:()=>e[o],enumerable:!(t=Ne(e,o))||t.enumerable});return n};var Ue=n=>Re(x2({},"__esModule",{value:!0}),n);var Q1={};In(Q1,{parsers:()=>Bn});var Bn={};In(Bn,{meriyah:()=>Y1});var Me=(n,e,u,t)=>{if(!(n&&e==null))return e.replaceAll?e.replaceAll(u,t):u.global?e.replace(u,t):e.split(u).join(t)},i2=Me;var Je={0:"Unexpected token",30:"Unexpected token: '%0'",1:"Octal escape sequences are not allowed in strict mode",2:"Octal escape sequences are not allowed in template strings",3:"\\8 and \\9 are not allowed in template strings",4:"Private identifier #%0 is not defined",5:"Illegal Unicode escape sequence",6:"Invalid code point %0",7:"Invalid hexadecimal escape sequence",9:"Octal literals are not allowed in strict mode",8:"Decimal integer literals with a leading zero are forbidden in strict mode",10:"Expected number in radix %0",151:"Invalid left-hand side assignment to a destructible right-hand side",11:"Non-number found after exponent indicator",12:"Invalid BigIntLiteral",13:"No identifiers allowed directly after numeric literal",14:"Escapes \\8 or \\9 are not syntactically valid escapes",15:"Escapes \\8 or \\9 are not allowed in strict mode",16:"Unterminated string literal",17:"Unterminated template literal",18:"Multiline comment was not closed properly",19:"The identifier contained dynamic unicode escape that was not closed",20:"Illegal character '%0'",21:"Missing hexadecimal digits",22:"Invalid implicit octal",23:"Invalid line break in string literal",24:"Only unicode escapes are legal in identifier names",25:"Expected '%0'",26:"Invalid left-hand side in assignment",27:"Invalid left-hand side in async arrow",28:'Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass',29:"Member access on super must be in a method",31:"Await expression not allowed in formal parameter",32:"Yield expression not allowed in formal parameter",95:"Unexpected token: 'escaped keyword'",33:"Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses",123:"Async functions can only be declared at the top level or inside a block",34:"Unterminated regular expression",35:"Unexpected regular expression flag",36:"Duplicate regular expression flag '%0'",37:"%0 functions must have exactly %1 argument%2",38:"Setter function argument must not be a rest parameter",39:"%0 declaration must have a name in this context",40:"Function name may not contain any reserved words or be eval or arguments in strict mode",41:"The rest operator is missing an argument",42:"A getter cannot be a generator",43:"A setter cannot be a generator",44:"A computed property name must be followed by a colon or paren",134:"Object literal keys that are strings or numbers must be a method or have a colon",46:"Found `* async x(){}` but this should be `async * x(){}`",45:"Getters and setters can not be generators",47:"'%0' can not be generator method",48:"No line break is allowed after '=>'",49:"The left-hand side of the arrow can only be destructed through assignment",50:"The binding declaration is not destructible",51:"Async arrow can not be followed by new expression",52:"Classes may not have a static property named 'prototype'",53:"Class constructor may not be a %0",54:"Duplicate constructor method in class",55:"Invalid increment/decrement operand",56:"Invalid use of `new` keyword on an increment/decrement expression",57:"`=>` is an invalid assignment target",58:"Rest element may not have a trailing comma",59:"Missing initializer in %0 declaration",60:"'for-%0' loop head declarations can not have an initializer",61:"Invalid left-hand side in for-%0 loop: Must have a single binding",62:"Invalid shorthand property initializer",63:"Property name __proto__ appears more than once in object literal",64:"Let is disallowed as a lexically bound name",65:"Invalid use of '%0' inside new expression",66:"Illegal 'use strict' directive in function with non-simple parameter list",67:'Identifier "let" disallowed as left-hand side expression in strict mode',68:"Illegal continue statement",69:"Illegal break statement",70:"Cannot have `let[...]` as a var name in strict mode",71:"Invalid destructuring assignment target",72:"Rest parameter may not have a default initializer",73:"The rest argument must the be last parameter",74:"Invalid rest argument",76:"In strict mode code, functions can only be declared at top level or inside a block",77:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement",78:"Without web compatibility enabled functions can not be declared at top level, inside a block, or as the body of an if statement",79:"Class declaration can't appear in single-statement context",80:"Invalid left-hand side in for-%0",81:"Invalid assignment in for-%0",82:"for await (... of ...) is only valid in async functions and async generators",83:"The first token after the template expression should be a continuation of the template",85:"`let` declaration not allowed here and `let` cannot be a regular var name in strict mode",84:"`let \n [` is a restricted production at the start of a statement",86:"Catch clause requires exactly one parameter, not more (and no trailing comma)",87:"Catch clause parameter does not support default values",88:"Missing catch or finally after try",89:"More than one default clause in switch statement",90:"Illegal newline after throw",91:"Strict mode code may not include a with statement",92:"Illegal return statement",93:"The left hand side of the for-header binding declaration is not destructible",94:"new.target only allowed within functions or static blocks",96:"'#' not followed by identifier",102:"Invalid keyword",101:"Can not use 'let' as a class name",100:"'A lexical declaration can't define a 'let' binding",99:"Can not use `let` as variable name in strict mode",97:"'%0' may not be used as an identifier in this context",98:"Await is only valid in async functions",103:"The %0 keyword can only be used with the module goal",104:"Unicode codepoint must not be greater than 0x10FFFF",105:"%0 source must be string",106:"Only a identifier or string can be used to indicate alias",107:"Only '*' or '{...}' can be imported after default",108:"Trailing decorator may be followed by method",109:"Decorators can't be used with a constructor",110:"Can not use `await` as identifier in module or async func",111:"Can not use `await` as identifier in module",112:"HTML comments are only allowed with web compatibility (Annex B)",113:"The identifier 'let' must not be in expression position in strict mode",114:"Cannot assign to `eval` and `arguments` in strict mode",115:"The left-hand side of a for-of loop may not start with 'let'",116:"Block body arrows can not be immediately invoked without a group",117:"Block body arrows can not be immediately accessed without a group",118:"Unexpected strict mode reserved word",119:"Unexpected eval or arguments in strict mode",120:"Decorators must not be followed by a semicolon",121:"Calling delete on expression not allowed in strict mode",122:"Pattern can not have a tail",124:"Can not have a `yield` expression on the left side of a ternary",125:"An arrow function can not have a postfix update operator",126:"Invalid object literal key character after generator star",127:"Private fields can not be deleted",129:"Classes may not have a field called constructor",128:"Classes may not have a private element named constructor",130:"A class field initializer or static block may not contain arguments",131:"Generators can only be declared at the top level or inside a block",132:"Async methods are a restricted production and cannot have a newline following it",133:"Unexpected character after object literal property name",135:"Invalid key token",136:"Label '%0' has already been declared",137:"continue statement must be nested within an iteration statement",138:"Undefined label '%0'",139:"Trailing comma is disallowed inside import(...) arguments",140:"Invalid binding in JSON import",141:"import() requires exactly one argument",142:"Cannot use new with import(...)",143:"... is not allowed in import()",144:"Expected '=>'",145:"Duplicate binding '%0'",146:"Duplicate private identifier #%0",147:"Cannot export a duplicate name '%0'",150:"Duplicate %0 for-binding",148:"Exported binding '%0' needs to refer to a top-level declared variable",149:"Unexpected private field",153:"Numeric separators are not allowed at the end of numeric literals",152:"Only one underscore is allowed as numeric separator",154:"JSX value should be either an expression or a quoted JSX text",155:"Expected corresponding JSX closing tag for %0",156:"Adjacent JSX elements must be wrapped in an enclosing tag",157:"JSX attributes must only be assigned a non-empty 'expression'",158:"'%0' has already been declared",159:"'%0' shadowed a catch clause binding",160:"Dot property must be an identifier",161:"Encountered invalid input after spread/rest argument",162:"Catch without try",163:"Finally without try",164:"Expected corresponding closing tag for JSX fragment",165:"Coalescing and logical operators used together in the same expression must be disambiguated with parentheses",166:"Invalid tagged template on optional chain",167:"Invalid optional chain from super property",168:"Invalid optional chain from new expression",169:'Cannot use "import.meta" outside a module',170:"Leading decorators must be attached to a class declaration",171:"An export name cannot include a lone surrogate, found %0",172:"A string literal cannot be used as an exported binding without `from`",173:"Private fields can't be accessed on super",174:"The only valid meta property for import is 'import.meta'",175:"'import.meta' must not contain escaped characters",176:'cannot use "await" as identifier inside an async function',177:'cannot use "await" in static blocks'},m2=class extends SyntaxError{constructor(e,u,t,o,i,l,f,...d){let g="["+u+":"+t+"-"+i+":"+l+"]: "+Je[f].replace(/%(\d+)/g,(m,y)=>d[y]);super(`${g}`),this.start=e,this.end=o,this.range=[e,o],this.loc={start:{line:u,column:t},end:{line:i,column:l}},this.description=g}};function c(n,e,...u){throw new m2(n.tokenIndex,n.tokenLine,n.tokenColumn,n.index,n.line,n.column,e,...u)}function z2(n){throw new m2(n.tokenIndex,n.tokenLine,n.tokenColumn,n.index,n.line,n.column,n.type,...n.params)}function $(n,e,u,t,o,i,l,...f){throw new m2(n,e,u,t,o,i,l,...f)}function h2(n,e,u,t,o,i,l){throw new m2(n,e,u,t,o,i,l)}function je(n){return(On[(n>>>5)+0]>>>n&31&1)!==0}function Vn(n){return(On[(n>>>5)+34816]>>>n&31&1)!==0}var On=((n,e)=>{let u=new Uint32Array(104448),t=0,o=0;for(;t<3822;){let i=n[t++];if(i<0)o-=i;else{let l=n[t++];i&2&&(l=e[l]),i&1?u.fill(l,o,o+=n[t++]):u[o++]=l}}return u})([-1,2,26,2,27,2,5,-1,0,77595648,3,44,2,3,0,14,2,63,2,64,3,0,3,0,3168796671,0,4294956992,2,1,2,0,2,41,3,0,4,0,4294966523,3,0,4,2,16,2,65,2,0,0,4294836735,0,3221225471,0,4294901942,2,66,0,134152192,3,0,2,0,4294951935,3,0,2,0,2683305983,0,2684354047,2,18,2,0,0,4294961151,3,0,2,2,19,2,0,0,608174079,2,0,2,60,2,7,2,6,0,4286611199,3,0,2,2,1,3,0,3,0,4294901711,2,40,0,4089839103,0,2961209759,0,1342439375,0,4294543342,0,3547201023,0,1577204103,0,4194240,0,4294688750,2,2,0,80831,0,4261478351,0,4294549486,2,2,0,2967484831,0,196559,0,3594373100,0,3288319768,0,8469959,2,203,2,3,0,4093640191,0,660618719,0,65487,0,4294828015,0,4092591615,0,1616920031,0,982991,2,3,2,0,0,2163244511,0,4227923919,0,4236247022,2,71,0,4284449919,0,851904,2,4,2,12,0,67076095,-1,2,72,0,1073741743,0,4093607775,-1,0,50331649,0,3265266687,2,33,0,4294844415,0,4278190047,2,20,2,137,-1,3,0,2,2,23,2,0,2,10,2,0,2,15,2,22,3,0,10,2,74,2,0,2,75,2,76,2,77,2,0,2,78,2,0,2,11,0,261632,2,25,3,0,2,2,13,2,4,3,0,18,2,79,2,5,3,0,2,2,80,0,2151677951,2,29,2,9,0,909311,3,0,2,0,814743551,2,49,0,67090432,3,0,2,2,42,2,0,2,6,2,0,2,30,2,8,0,268374015,2,110,2,51,2,0,2,81,0,134153215,-1,2,7,2,0,2,8,0,2684354559,0,67044351,0,3221160064,2,17,-1,3,0,2,2,53,0,1046528,3,0,3,2,9,2,0,2,54,0,4294960127,2,10,2,6,2,11,0,4294377472,2,12,3,0,16,2,13,2,0,2,82,2,10,2,0,2,83,2,84,2,85,2,210,2,55,0,1048577,2,86,2,14,-1,2,14,0,131042,2,87,2,88,2,89,2,0,2,34,-83,3,0,7,0,1046559,2,0,2,15,2,0,0,2147516671,2,21,3,90,2,2,0,-16,2,91,0,524222462,2,4,2,0,0,4269801471,2,4,3,0,2,2,28,2,16,3,0,2,2,17,2,0,-1,2,18,-16,3,0,206,-2,3,0,692,2,73,-1,2,18,2,10,3,0,8,2,93,2,133,2,0,0,3220242431,3,0,3,2,19,2,94,2,95,3,0,2,2,96,2,0,2,97,2,46,2,0,0,4351,2,0,2,9,3,0,2,0,67043391,0,3909091327,2,0,2,24,2,9,2,20,3,0,2,0,67076097,2,8,2,0,2,21,0,67059711,0,4236247039,3,0,2,0,939524103,0,8191999,2,101,2,102,2,22,2,23,3,0,3,0,67057663,3,0,349,2,103,2,104,2,7,-264,3,0,11,2,24,3,0,2,2,32,-1,0,3774349439,2,105,2,106,3,0,2,2,19,2,107,3,0,10,2,10,2,18,2,0,2,47,2,0,2,31,2,108,2,25,0,1638399,2,183,2,109,3,0,3,2,20,2,26,2,27,2,5,2,28,2,0,2,8,2,111,-1,2,112,2,113,2,114,-1,3,0,3,2,12,-2,2,0,2,29,-3,2,163,-4,2,20,2,0,2,36,0,1,2,0,2,67,2,6,2,12,2,10,2,0,2,115,-1,3,0,4,2,10,2,23,2,116,2,7,2,0,2,117,2,0,2,118,2,119,2,120,2,0,2,9,3,0,9,2,21,2,30,2,31,2,121,2,122,-2,2,123,2,124,2,30,2,21,2,8,-2,2,125,2,30,2,32,-2,2,0,2,39,-2,0,4277137519,0,2269118463,-1,3,20,2,-1,2,33,2,38,2,0,3,30,2,2,35,2,19,-3,3,0,2,2,34,-1,2,0,2,35,2,0,2,35,2,0,2,48,2,0,0,4294950463,2,37,-7,2,0,0,203775,2,57,2,167,2,20,2,43,2,36,2,18,2,37,2,18,2,126,2,21,3,0,2,2,38,0,2151677888,2,0,2,12,0,4294901764,2,144,2,0,2,58,2,56,0,5242879,3,0,2,0,402644511,-1,2,128,2,39,0,3,-1,2,129,2,130,2,0,0,67045375,2,40,0,4226678271,0,3766565279,0,2039759,2,132,2,41,0,1046437,0,6,3,0,2,0,3288270847,0,3,3,0,2,0,67043519,-5,2,0,0,4282384383,0,1056964609,-1,3,0,2,0,67043345,-1,2,0,2,42,2,23,2,50,2,11,2,61,2,38,-5,2,0,2,12,-3,3,0,2,0,2147484671,2,134,0,4190109695,2,52,-2,2,135,0,4244635647,0,27,2,0,2,8,2,43,2,0,2,68,2,18,2,0,2,42,-6,2,0,2,45,2,59,2,44,2,45,2,46,2,47,0,8388351,-2,2,136,0,3028287487,2,48,2,138,0,33259519,2,49,-9,2,21,0,4294836223,0,3355443199,0,134152199,-2,2,69,-2,3,0,28,2,32,-3,3,0,3,2,17,3,0,6,2,50,-81,2,18,3,0,2,2,36,3,0,33,2,25,2,30,3,0,124,2,12,3,0,18,2,38,-213,2,0,2,32,-54,3,0,17,2,42,2,8,2,23,2,0,2,8,2,23,2,51,2,0,2,21,2,52,2,139,2,25,-13,2,0,2,53,-6,3,0,2,-4,3,0,2,0,4294936575,2,0,0,4294934783,-2,0,196635,3,0,191,2,54,3,0,38,2,30,2,55,2,34,-278,2,140,3,0,9,2,141,2,142,2,56,3,0,11,2,7,-72,3,0,3,2,143,0,1677656575,-130,2,26,-16,2,0,2,24,2,38,-16,0,4161266656,0,4071,2,205,-4,2,57,-13,3,0,2,2,58,2,0,2,145,2,146,2,62,2,0,2,147,2,148,2,149,3,0,10,2,150,2,151,2,22,3,58,2,3,152,2,3,59,2,0,4294954999,2,0,-16,2,0,2,92,2,0,0,2105343,0,4160749584,2,177,-34,2,8,2,154,-6,0,4194303871,0,4294903771,2,0,2,60,2,100,-3,2,0,0,1073684479,0,17407,-9,2,18,2,17,2,0,2,32,-14,2,18,2,32,-6,2,18,2,12,-15,2,155,3,0,6,0,8323103,-1,3,0,2,2,61,-37,2,62,2,156,2,157,2,158,2,159,2,160,-105,2,26,-32,3,0,1335,-1,3,0,129,2,32,3,0,6,2,10,3,0,180,2,161,3,0,233,2,162,3,0,18,2,10,-77,3,0,16,2,10,-47,3,0,154,2,6,3,0,130,2,25,-22250,3,0,7,2,25,-6130,3,5,2,-1,0,69207040,3,44,2,3,0,14,2,63,2,64,-3,0,3168731136,0,4294956864,2,1,2,0,2,41,3,0,4,0,4294966275,3,0,4,2,16,2,65,2,0,2,34,-1,2,18,2,66,-1,2,0,0,2047,0,4294885376,3,0,2,0,3145727,0,2617294944,0,4294770688,2,25,2,67,3,0,2,0,131135,2,98,0,70256639,0,71303167,0,272,2,42,2,6,0,32511,2,0,2,49,-1,2,99,2,68,0,4278255616,0,4294836227,0,4294549473,0,600178175,0,2952806400,0,268632067,0,4294543328,0,57540095,0,1577058304,0,1835008,0,4294688736,2,70,2,69,0,33554435,2,131,2,70,2,164,0,131075,0,3594373096,0,67094296,2,69,-1,0,4294828e3,0,603979263,0,654311424,0,3,0,4294828001,0,602930687,2,171,0,393219,0,4294828016,0,671088639,0,2154840064,0,4227858435,0,4236247008,2,71,2,38,-1,2,4,0,917503,2,38,-1,2,72,0,537788335,0,4026531935,-1,0,1,-1,2,33,2,73,0,7936,-3,2,0,0,2147485695,0,1010761728,0,4292984930,0,16387,2,0,2,15,2,22,3,0,10,2,74,2,0,2,75,2,76,2,77,2,0,2,78,2,0,2,12,-1,2,25,3,0,2,2,13,2,4,3,0,18,2,79,2,5,3,0,2,2,80,0,2147745791,3,19,2,0,122879,2,0,2,9,0,276824064,-2,3,0,2,2,42,2,0,0,4294903295,2,0,2,30,2,8,-1,2,18,2,51,2,0,2,81,2,49,-1,2,21,2,0,2,29,-2,0,128,-2,2,28,2,9,0,8160,-1,2,127,0,4227907585,2,0,2,37,2,0,2,50,2,184,2,10,2,6,2,11,-1,0,74440192,3,0,6,-2,3,0,8,2,13,2,0,2,82,2,10,2,0,2,83,2,84,2,85,-3,2,86,2,14,-3,2,87,2,88,2,89,2,0,2,34,-83,3,0,7,0,817183,2,0,2,15,2,0,0,33023,2,21,3,90,2,-17,2,91,0,524157950,2,4,2,0,2,92,2,4,2,0,2,22,2,28,2,16,3,0,2,2,17,2,0,-1,2,18,-16,3,0,206,-2,3,0,692,2,73,-1,2,18,2,10,3,0,8,2,93,0,3072,2,0,0,2147516415,2,10,3,0,2,2,25,2,94,2,95,3,0,2,2,96,2,0,2,97,2,46,0,4294965179,0,7,2,0,2,9,2,95,2,9,-1,0,1761345536,2,98,0,4294901823,2,38,2,20,2,99,2,35,2,100,0,2080440287,2,0,2,34,2,153,0,3296722943,2,0,0,1046675455,0,939524101,0,1837055,2,101,2,102,2,22,2,23,3,0,3,0,7,3,0,349,2,103,2,104,2,7,-264,3,0,11,2,24,3,0,2,2,32,-1,0,2700607615,2,105,2,106,3,0,2,2,19,2,107,3,0,10,2,10,2,18,2,0,2,47,2,0,2,31,2,108,-3,2,109,3,0,3,2,20,-1,3,5,2,2,110,2,0,2,8,2,111,-1,2,112,2,113,2,114,-1,3,0,3,2,12,-2,2,0,2,29,-8,2,20,2,0,2,36,-1,2,0,2,67,2,6,2,30,2,10,2,0,2,115,-1,3,0,4,2,10,2,18,2,116,2,7,2,0,2,117,2,0,2,118,2,119,2,120,2,0,2,9,3,0,9,2,21,2,30,2,31,2,121,2,122,-2,2,123,2,124,2,30,2,21,2,8,-2,2,125,2,30,2,32,-2,2,0,2,39,-2,0,4277075969,2,30,-1,3,20,2,-1,2,33,2,126,2,0,3,30,2,2,35,2,19,-3,3,0,2,2,34,-1,2,0,2,35,2,0,2,35,2,0,2,50,2,98,0,4294934591,2,37,-7,2,0,0,197631,2,57,-1,2,20,2,43,2,37,2,18,0,3,2,18,2,126,2,21,2,127,2,54,-1,0,2490368,2,127,2,25,2,18,2,34,2,127,2,38,0,4294901904,0,4718591,2,127,2,35,0,335544350,-1,2,128,0,2147487743,0,1,-1,2,129,2,130,2,8,-1,2,131,2,70,0,3758161920,0,3,2,132,0,12582911,0,655360,-1,2,0,2,29,0,2147485568,0,3,2,0,2,25,0,176,-5,2,0,2,17,2,192,-1,2,0,2,25,2,209,-1,2,0,0,16779263,-2,2,12,-1,2,38,-5,2,0,2,133,-3,3,0,2,2,55,2,134,0,2147549183,0,2,-2,2,135,2,36,0,10,0,4294965249,0,67633151,0,4026597376,2,0,0,536871935,2,18,2,0,2,42,-6,2,0,0,1,2,59,2,17,0,1,2,46,2,25,-3,2,136,2,36,2,137,2,138,0,16778239,-10,2,35,0,4294836212,2,9,-3,2,69,-2,3,0,28,2,32,-3,3,0,3,2,17,3,0,6,2,50,-81,2,18,3,0,2,2,36,3,0,33,2,25,0,126,3,0,124,2,12,3,0,18,2,38,-213,2,10,-55,3,0,17,2,42,2,8,2,18,2,0,2,8,2,18,2,60,2,0,2,25,2,50,2,139,2,25,-13,2,0,2,73,-6,3,0,2,-4,3,0,2,0,67583,-1,2,107,-2,0,11,3,0,191,2,54,3,0,38,2,30,2,55,2,34,-278,2,140,3,0,9,2,141,2,142,2,56,3,0,11,2,7,-72,3,0,3,2,143,2,144,-187,3,0,2,2,58,2,0,2,145,2,146,2,62,2,0,2,147,2,148,2,149,3,0,10,2,150,2,151,2,22,3,58,2,3,152,2,3,59,2,2,153,-57,2,8,2,154,-7,2,18,2,0,2,60,-4,2,0,0,1065361407,0,16384,-9,2,18,2,60,2,0,2,133,-14,2,18,2,133,-6,2,18,0,81919,-15,2,155,3,0,6,2,126,-1,3,0,2,0,2063,-37,2,62,2,156,2,157,2,158,2,159,2,160,-138,3,0,1335,-1,3,0,129,2,32,3,0,6,2,10,3,0,180,2,161,3,0,233,2,162,3,0,18,2,10,-77,3,0,16,2,10,-47,3,0,154,2,6,3,0,130,2,25,-28386,2,0,0,1,-1,2,55,2,0,0,8193,-21,2,201,0,10255,0,4,-11,2,69,2,182,-1,0,71680,-1,2,174,0,4292900864,0,268435519,-5,2,163,-1,2,173,-1,0,6144,-2,2,46,-1,2,168,-1,0,2147532800,2,164,2,170,0,8355840,-2,0,4,-4,2,198,0,205128192,0,1333757536,0,2147483696,0,423953,0,747766272,0,2717763192,0,4286578751,0,278545,2,165,0,4294886464,0,33292336,0,417809,2,165,0,1327482464,0,4278190128,0,700594195,0,1006647527,0,4286497336,0,4160749631,2,166,0,201327104,0,3634348576,0,8323120,2,166,0,202375680,0,2678047264,0,4293984304,2,166,-1,0,983584,0,48,0,58720273,0,3489923072,0,10517376,0,4293066815,0,1,2,213,2,167,2,0,0,2089,0,3221225552,0,201359520,2,0,-2,0,256,0,122880,0,16777216,2,163,0,4160757760,2,0,-6,2,179,-11,0,3263218176,-1,0,49664,0,2160197632,0,8388802,-1,0,12713984,-1,2,168,2,186,2,187,-2,2,175,-20,0,3758096385,-2,2,169,2,195,2,94,2,180,0,4294057984,-2,2,176,2,172,0,4227874816,-2,2,169,-1,2,170,-1,2,181,2,55,0,4026593280,0,14,0,4292919296,-1,2,178,0,939588608,-1,0,805306368,-1,2,55,2,171,2,172,2,173,2,211,2,0,-2,0,8192,-4,0,267386880,-1,0,117440512,0,7168,-1,2,170,2,168,2,174,2,188,-16,2,175,-1,0,1426112704,2,176,-1,2,196,0,271581216,0,2149777408,2,25,2,174,2,55,0,851967,2,189,-1,2,177,2,190,-4,2,178,-20,2,98,2,208,-56,0,3145728,2,191,-10,0,32505856,-1,2,179,-1,0,2147385088,2,94,1,2155905152,2,-3,2,176,2,0,0,67108864,-2,2,180,-6,2,181,2,25,0,1,-1,0,1,-1,2,182,-3,2,126,2,69,-2,2,100,-2,0,32704,2,55,-915,2,183,-1,2,207,-10,2,194,-5,2,185,-6,0,3759456256,2,19,-1,2,184,-1,2,185,-2,0,4227874752,-3,0,2146435072,2,186,-2,0,1006649344,2,55,-1,2,94,0,201375744,-3,0,134217720,2,94,0,4286677377,0,32896,-1,2,178,-3,0,4227907584,-349,0,65520,0,1920,2,167,3,0,264,-11,2,173,-2,2,187,2,0,0,520617856,0,2692743168,0,36,-3,0,524280,-13,2,193,-1,0,4294934272,2,25,2,187,-1,2,215,0,2158720,-3,2,186,0,1,-4,2,55,0,3808625411,0,3489628288,0,4096,0,1207959680,0,3221274624,2,0,-3,2,188,0,120,0,7340032,-2,2,189,2,4,2,25,2,176,3,0,4,2,186,-1,2,190,2,167,-1,0,8176,2,170,2,188,0,1073741824,-1,0,4290773232,2,0,-4,2,176,2,197,0,15728640,2,167,-1,2,174,-1,0,134250480,0,4720640,0,3825467396,-1,2,180,-9,2,94,2,181,0,4294967040,2,137,0,4160880640,3,0,2,0,704,0,1849688064,2,191,-1,2,55,0,4294901887,2,0,0,130547712,0,1879048192,2,212,3,0,2,-1,2,192,2,193,-1,0,17829776,0,2025848832,0,4261477888,-2,2,0,-1,0,4286580608,-1,0,29360128,2,200,0,16252928,0,3791388672,2,130,3,0,2,-2,2,206,2,0,-1,2,107,-1,0,66584576,-1,2,199,-1,0,448,0,4294918080,3,0,6,2,55,-1,0,4294755328,0,4294967267,2,7,-1,2,174,2,187,2,25,2,98,2,25,2,194,2,94,-2,0,245760,2,195,-1,2,163,2,202,0,4227923456,-1,2,196,2,174,2,94,-3,0,4292870145,0,262144,-1,2,95,2,0,0,1073758848,2,197,-1,0,4227921920,2,198,0,68289024,0,528402016,0,4292927536,0,46080,2,191,0,4265609306,0,4294967289,-2,0,268435456,2,95,-2,2,199,3,0,5,-1,2,200,2,176,2,0,-2,0,4227923936,2,67,-1,2,187,2,197,2,99,2,168,2,178,2,204,3,0,5,-1,2,167,3,0,3,-2,0,2146959360,0,9440640,0,104857600,0,4227923840,3,0,2,0,768,2,201,2,28,-2,2,174,-2,2,202,-1,2,169,2,98,3,0,5,-1,0,4227923964,0,512,0,8388608,2,203,2,183,2,193,0,4286578944,3,0,2,0,1152,0,1266679808,2,199,0,576,0,4261707776,2,98,3,0,9,2,169,0,131072,0,939524096,2,188,3,0,2,2,16,-1,0,2147221504,-28,2,187,3,0,3,-3,0,4292902912,-6,2,99,3,0,81,2,25,-2,2,107,-33,2,18,2,181,-124,2,188,-18,2,204,3,0,213,-1,2,187,3,0,54,-17,2,169,2,55,2,205,-1,2,55,2,197,0,4290822144,-2,0,67174336,0,520093700,2,18,3,0,13,-1,2,187,3,0,6,-2,2,188,3,0,3,-2,0,30720,-1,0,32512,3,0,2,0,4294770656,-191,2,185,-38,2,181,2,8,2,206,3,0,278,0,2417033215,-9,0,4294705144,0,4292411391,0,65295,-11,2,167,3,0,72,-3,0,3758159872,0,201391616,3,0,123,-7,2,187,-13,2,180,3,0,2,-1,2,173,2,207,-3,2,99,2,0,-7,2,181,-1,0,384,-1,0,133693440,-3,2,208,-2,2,110,3,0,3,3,180,2,-2,2,94,2,169,3,0,4,-2,2,196,-1,2,163,0,335552923,2,209,-1,0,538974272,0,2214592512,0,132e3,-10,0,192,-8,2,210,-21,0,134213632,2,162,3,0,34,2,55,0,4294965279,3,0,6,0,100663424,0,63524,-1,2,214,2,152,3,0,3,-1,0,3221282816,0,4294917120,3,0,9,2,25,2,211,-1,2,212,3,0,14,2,25,2,187,3,0,6,2,25,2,213,3,0,15,0,2147520640,-6,0,4286578784,2,0,-2,0,1006694400,3,0,24,2,36,-1,0,4292870144,3,0,2,0,1,2,176,3,0,6,2,209,0,4110942569,0,1432950139,0,2701658217,0,4026532864,0,4026532881,2,0,2,47,3,0,8,-1,2,178,-2,2,180,0,98304,0,65537,2,181,-5,2,214,2,0,2,37,2,202,2,167,0,4294770176,2,110,3,0,4,-30,2,192,0,3758153728,-3,0,125829120,-2,2,187,0,4294897664,2,178,-1,2,199,-1,2,174,0,4026580992,2,95,2,0,-10,2,180,0,3758145536,0,31744,-1,0,1610628992,0,4261477376,-4,2,215,-2,2,187,3,0,32,-1335,2,0,-129,2,187,-6,2,176,-180,0,65532,-233,2,177,-18,2,176,3,0,77,-16,2,176,3,0,47,-154,2,170,-130,2,18,3,0,22250,-7,2,18,3,0,6128],[4294967295,4294967291,4092460543,4294828031,4294967294,134217726,4294903807,268435455,2147483647,1048575,1073741823,3892314111,134217727,1061158911,536805376,4294910143,4294901759,32767,4294901760,262143,536870911,8388607,4160749567,4294902783,4294918143,65535,67043328,2281701374,4294967264,2097151,4194303,255,67108863,4294967039,511,524287,131071,63,127,3238002687,4294549487,4290772991,33554431,4294901888,4286578687,67043329,4294705152,4294770687,67043583,1023,15,2047999,67043343,67051519,16777215,2147483648,4294902e3,28,4292870143,4294966783,16383,67047423,4294967279,262083,20511,41943039,493567,4294959104,603979775,65536,602799615,805044223,4294965206,8191,1031749119,4294917631,2134769663,4286578493,4282253311,4294942719,33540095,4294905855,2868854591,1608515583,265232348,534519807,2147614720,1060109444,4093640016,17376,2139062143,224,4169138175,4294909951,4286578688,4294967292,4294965759,535511039,4294966272,4294967280,32768,8289918,4294934399,4294901775,4294965375,1602223615,4294967259,4294443008,268369920,4292804608,4294967232,486341884,4294963199,3087007615,1073692671,4128527,4279238655,4294902015,4160684047,4290246655,469499899,4294967231,134086655,4294966591,2445279231,3670015,31,4294967288,4294705151,3221208447,4294902271,4294549472,4294921215,4095,4285526655,4294966527,4294966143,64,4294966719,3774873592,1877934080,262151,2555904,536807423,67043839,3758096383,3959414372,3755993023,2080374783,4294835295,4294967103,4160749565,4294934527,4087,2016,2147446655,184024726,2862017156,1593309078,268434431,268434414,4294901763,4294901761,536870912,2952790016,202506752,139264,4026531840,402653184,4261412864,63488,1610612736,4227922944,49152,65280,3233808384,3221225472,65534,61440,57152,4293918720,4290772992,25165824,57344,4227915776,4278190080,3758096384,4227858432,4160749568,3758129152,4294836224,4194304,251658240,196608,4294963200,2143289344,2097152,64512,417808,4227923712,12582912,50331648,65528,65472,4294967168,15360,4294966784,65408,4294965248,16,12288,4294934528,2080374784,2013265920,4294950912,524288]);function A(n){return n.column++,n.currentChar=n.source.charCodeAt(++n.index)}function tn(n){let e=n.currentChar;if((e&64512)!==55296)return 0;let u=n.source.charCodeAt(n.index+1);return(u&64512)!==56320?0:65536+((e&1023)<<10)+(u&1023)}function on(n,e){n.currentChar=n.source.charCodeAt(++n.index),n.flags|=1,(e&4)===0&&(n.column=0,n.line++)}function k2(n){n.flags|=1,n.currentChar=n.source.charCodeAt(++n.index),n.column=0,n.line++}function Xe(n){return n===160||n===65279||n===133||n===5760||n>=8192&&n<=8203||n===8239||n===8287||n===12288||n===8201||n===65519}function W(n){return n<65?n-48:n-65+10&15}function He(n){switch(n){case 134283266:return"NumericLiteral";case 134283267:return"StringLiteral";case 86021:case 86022:return"BooleanLiteral";case 86023:return"NullLiteral";case 65540:return"RegularExpression";case 67174408:case 67174409:case 131:return"TemplateLiteral";default:return(n&143360)===143360?"Identifier":(n&4096)===4096?"Keyword":"Punctuator"}}var N=[0,0,0,0,0,0,0,0,0,0,1032,0,0,2056,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8192,0,3,0,0,8192,0,0,0,256,0,33024,0,0,242,242,114,114,114,114,114,114,594,594,0,0,16384,0,0,0,0,67,67,67,67,67,67,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,1,0,0,4099,0,71,71,71,71,71,71,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,16384,0,0,0,0],ze=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],Rn=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0];function M2(n){return n<=127?ze[n]>0:Vn(n)}function V2(n){return n<=127?Rn[n]>0:je(n)||n===8204||n===8205}var Un=["SingleLine","MultiLine","HTMLOpen","HTMLClose","HashbangComment"];function Ke(n){let{source:e}=n;n.currentChar===35&&e.charCodeAt(n.index+1)===33&&(A(n),A(n),ln(n,e,0,4,n.tokenIndex,n.tokenLine,n.tokenColumn))}function Ln(n,e,u,t,o,i,l,f){return t&512&&c(n,0),ln(n,e,u,o,i,l,f)}function ln(n,e,u,t,o,i,l){let{index:f}=n;for(n.tokenIndex=n.index,n.tokenLine=n.line,n.tokenColumn=n.column;n.index=n.source.length)return c(n,34)}let o=n.index-1,i=X.Empty,l=n.currentChar,{index:f}=n;for(;V2(l);){switch(l){case 103:i&X.Global&&c(n,36,"g"),i|=X.Global;break;case 105:i&X.IgnoreCase&&c(n,36,"i"),i|=X.IgnoreCase;break;case 109:i&X.Multiline&&c(n,36,"m"),i|=X.Multiline;break;case 117:i&X.Unicode&&c(n,36,"u"),i&X.UnicodeSets&&c(n,36,"vu"),i|=X.Unicode;break;case 118:i&X.Unicode&&c(n,36,"uv"),i&X.UnicodeSets&&c(n,36,"v"),i|=X.UnicodeSets;break;case 121:i&X.Sticky&&c(n,36,"y"),i|=X.Sticky;break;case 115:i&X.DotAll&&c(n,36,"s"),i|=X.DotAll;break;case 100:i&X.Indices&&c(n,36,"d"),i|=X.Indices;break;default:c(n,35)}l=A(n)}let d=n.source.slice(f,n.index),g=n.source.slice(u,o);return n.tokenRegExp={pattern:g,flags:d},e&128&&(n.tokenRaw=n.source.slice(n.tokenIndex,n.index)),n.tokenValue=_e(n,g,d),65540}function _e(n,e,u){try{return new RegExp(e,u)}catch{try{return new RegExp(e,u),null}catch{c(n,34)}}}function Ye(n,e,u){let{index:t}=n,o="",i=A(n),l=n.index;for(;(N[i]&8)===0;){if(i===u)return o+=n.source.slice(l,n.index),A(n),e&128&&(n.tokenRaw=n.source.slice(t,n.index)),n.tokenValue=o,134283267;if((i&8)===8&&i===92){if(o+=n.source.slice(l,n.index),i=A(n),i<127||i===8232||i===8233){let f=Mn(n,e,i);f>=0?o+=String.fromCodePoint(f):Jn(n,f,0)}else o+=String.fromCodePoint(i);l=n.index+1}n.index>=n.end&&c(n,16),i=A(n)}c(n,16)}function Mn(n,e,u,t=0){switch(u){case 98:return 8;case 102:return 12;case 114:return 13;case 110:return 10;case 116:return 9;case 118:return 11;case 13:if(n.index1114111)return-5;return n.currentChar<1||n.currentChar!==125?-4:i}else{if((N[o]&64)===0)return-4;let i=n.source.charCodeAt(n.index+1);if((N[i]&64)===0)return-4;let l=n.source.charCodeAt(n.index+2);if((N[l]&64)===0)return-4;let f=n.source.charCodeAt(n.index+3);return(N[f]&64)===0?-4:(n.index+=3,n.column+=3,n.currentChar=n.source.charCodeAt(n.index),W(o)<<12|W(i)<<8|W(l)<<4|W(f))}}case 56:case 57:if(t||(e&64)===0||e&256)return-3;n.flags|=4096;default:return u}}function Jn(n,e,u){switch(e){case-1:return;case-2:c(n,u?2:1);case-3:c(n,u?3:14);case-4:c(n,7);case-5:c(n,104)}}function jn(n,e){let{index:u}=n,t=67174409,o="",i=A(n);for(;i!==96;){if(i===36&&n.source.charCodeAt(n.index+1)===123){A(n),t=67174408;break}else if(i===92)if(i=A(n),i>126)o+=String.fromCodePoint(i);else{let{index:l,line:f,column:d}=n,g=Mn(n,e|256,i,1);if(g>=0)o+=String.fromCodePoint(g);else if(g!==-1&&e&16384){n.index=l,n.line=f,n.column=d,o=null,i=Qe(n,i),i<0&&(t=67174408);break}else Jn(n,g,1)}else n.index=n.end&&c(n,17),i=A(n)}return A(n),n.tokenValue=o,n.tokenRaw=n.source.slice(u+1,n.index-(t===67174409?1:2)),t}function Qe(n,e){for(;e!==96;){switch(e){case 36:{let u=n.index+1;if(u=n.end&&c(n,17),e=A(n)}return e}function Ze(n,e){return n.index>=n.end&&c(n,0),n.index--,n.column--,jn(n,e)}function Fn(n,e,u){let t=n.currentChar,o=0,i=9,l=u&64?0:1,f=0,d=0;if(u&64)o="."+v2(n,t),t=n.currentChar,t===110&&c(n,12);else{if(t===48)if(t=A(n),(t|32)===120){for(u=136,t=A(n);N[t]&4160;){if(t===95){d||c(n,152),d=0,t=A(n);continue}d=1,o=o*16+W(t),f++,t=A(n)}(f===0||!d)&&c(n,f===0?21:153)}else if((t|32)===111){for(u=132,t=A(n);N[t]&4128;){if(t===95){d||c(n,152),d=0,t=A(n);continue}d=1,o=o*8+(t-48),f++,t=A(n)}(f===0||!d)&&c(n,f===0?0:153)}else if((t|32)===98){for(u=130,t=A(n);N[t]&4224;){if(t===95){d||c(n,152),d=0,t=A(n);continue}d=1,o=o*2+(t-48),f++,t=A(n)}(f===0||!d)&&c(n,f===0?0:153)}else if(N[t]&32)for(e&256&&c(n,1),u=1;N[t]&16;){if(N[t]&512){u=32,l=0;break}o=o*8+(t-48),t=A(n)}else N[t]&512?(e&256&&c(n,1),n.flags|=64,u=32):t===95&&c(n,0);if(u&48){if(l){for(;i>=0&&N[t]&4112;){if(t===95){t=A(n),(t===95||u&32)&&h2(n.index,n.line,n.column,n.index+1,n.line,n.column,152),d=1;continue}d=0,o=10*o+(t-48),t=A(n),--i}if(d&&h2(n.index,n.line,n.column,n.index+1,n.line,n.column,153),i>=0&&!M2(t)&&t!==46)return n.tokenValue=o,e&128&&(n.tokenRaw=n.source.slice(n.tokenIndex,n.index)),134283266}o+=v2(n,t),t=n.currentChar,t===46&&(A(n)===95&&c(n,0),u=64,o+="."+v2(n,n.currentChar),t=n.currentChar)}}let g=n.index,m=0;if(t===110&&u&128)m=1,t=A(n);else if((t|32)===101){t=A(n),N[t]&256&&(t=A(n));let{index:y}=n;(N[t]&16)===0&&c(n,11),o+=n.source.substring(g,y)+v2(n,t),t=n.currentChar}return(n.index","(","{",".","...","}",")",";",",","[","]",":","?","'",'"',"++","--","=","<<=",">>=",">>>=","**=","+=","-=","*=","/=","%=","^=","|=","&=","||=","&&=","??=","typeof","delete","void","!","~","+","-","in","instanceof","*","%","/","**","&&","||","===","!==","==","!=","<=",">=","<",">","<<",">>",">>>","&","|","^","var","let","const","break","case","catch","class","continue","debugger","default","do","else","export","extends","finally","for","function","if","import","new","return","super","switch","this","throw","try","while","with","implements","interface","package","private","protected","public","static","yield","as","async","await","constructor","get","set","accessor","from","of","enum","eval","arguments","escaped keyword","escaped future reserved keyword","reserved if strict","#","BigIntLiteral","??","?.","WhiteSpace","Illegal","LineTerminator","PrivateField","Template","@","target","meta","LineFeed","Escaped","JSXText"],Xn=Object.create(null,{this:{value:86111},function:{value:86104},if:{value:20569},return:{value:20572},var:{value:86088},else:{value:20563},for:{value:20567},new:{value:86107},in:{value:8673330},typeof:{value:16863275},while:{value:20578},case:{value:20556},break:{value:20555},try:{value:20577},catch:{value:20557},delete:{value:16863276},throw:{value:86112},switch:{value:86110},continue:{value:20559},default:{value:20561},instanceof:{value:8411187},do:{value:20562},void:{value:16863277},finally:{value:20566},async:{value:209005},await:{value:209006},class:{value:86094},const:{value:86090},constructor:{value:12399},debugger:{value:20560},export:{value:20564},extends:{value:20565},false:{value:86021},from:{value:12403},get:{value:12400},implements:{value:36964},import:{value:86106},interface:{value:36965},let:{value:241737},null:{value:86023},of:{value:274548},package:{value:36966},private:{value:36967},protected:{value:36968},public:{value:36969},set:{value:12401},static:{value:36970},super:{value:86109},true:{value:86022},with:{value:20579},yield:{value:241771},enum:{value:86133},eval:{value:537079926},as:{value:77932},arguments:{value:537079927},target:{value:209029},meta:{value:209030},accessor:{value:12402}});function qn(n,e,u){for(;Rn[A(n)];);return n.tokenValue=n.source.slice(n.tokenIndex,n.index),n.currentChar!==92&&n.currentChar<=126?Xn[n.tokenValue]||208897:fn(n,e,0,u)}function Ge(n,e){let u=Hn(n);return M2(u)||c(n,5),n.tokenValue=String.fromCodePoint(u),fn(n,e,1,N[u]&4)}function fn(n,e,u,t){let o=n.index;for(;n.index0)V2(l)||c(n,20,String.fromCodePoint(l)),n.currentChar=l,n.index++,n.column++;else if(!V2(n.currentChar))break;A(n)}n.index<=n.end&&(n.tokenValue+=n.source.slice(o,n.index));let{length:i}=n.tokenValue;if(t&&i>=2&&i<=11){let l=Xn[n.tokenValue];return l===void 0?208897|(u?-2147483648:0):u?l===209006?(e&524800)===0?l|-2147483648:-2147483528:e&256?l===36970||(l&36864)===36864?-2147483527:(l&20480)===20480?e&67108864&&(e&2048)===0?l|-2147483648:-2147483528:-2147274630:e&67108864&&(e&2048)===0&&(l&20480)===20480?l|-2147483648:l===241771?e&67108864?-2147274630:e&262144?-2147483528:l|-2147483648:l===209005?-2147274630:(l&36864)===36864?l|12288|-2147483648:-2147483528:l}return 208897|(u?-2147483648:0)}function xe(n){let e=A(n);if(e===92)return 130;let u=tn(n);return u&&(e=u),M2(e)||c(n,96),130}function Hn(n){return n.source.charCodeAt(n.index+1)!==117&&c(n,5),n.currentChar=n.source.charCodeAt(n.index+=2),re(n)}function re(n){let e=0,u=n.currentChar;if(u===123){let l=n.index-2;for(;N[A(n)]&64;)e=e<<4|W(n.currentChar),e>1114111&&h2(l,n.line,n.column,n.index,n.line,n.column,104);return n.currentChar!==125&&h2(l,n.line,n.column,n.index,n.line,n.column,7),A(n),e}(N[u]&64)===0&&c(n,7);let t=n.source.charCodeAt(n.index+1);(N[t]&64)===0&&c(n,7);let o=n.source.charCodeAt(n.index+2);(N[o]&64)===0&&c(n,7);let i=n.source.charCodeAt(n.index+3);return(N[i]&64)===0&&c(n,7),e=W(u)<<12|W(t)<<8|W(o)<<4|W(i),n.currentChar=n.source.charCodeAt(n.index+=4),e}var pe=[128,128,128,128,128,128,128,128,128,127,135,127,127,129,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,127,16842798,134283267,130,208897,8391477,8390213,134283267,67174411,16,8391476,25233968,18,25233969,67108877,8457014,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,21,1074790417,8456256,1077936155,8390721,22,132,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,69271571,136,20,8389959,208897,131,4096,4096,4096,4096,4096,4096,4096,208897,4096,208897,208897,4096,208897,4096,208897,4096,208897,4096,4096,4096,208897,4096,4096,208897,4096,4096,2162700,8389702,1074790415,16842799,128];function b(n,e){n.flags=(n.flags|1)^1,n.startIndex=n.index,n.startColumn=n.column,n.startLine=n.line,n.setToken(zn(n,e,0))}function zn(n,e,u){let t=n.index===0,{source:o}=n,i=n.index,l=n.line,f=n.column;for(;n.index=n.end)return 8391476;let m=n.currentChar;return m===61?(A(n),4194338):m!==42?8391476:A(n)!==61?8391735:(A(n),4194335)}case 8389959:return A(n)!==61?8389959:(A(n),4194341);case 25233968:{A(n);let m=n.currentChar;return m===43?(A(n),33619993):m===61?(A(n),4194336):25233968}case 25233969:{A(n);let m=n.currentChar;if(m===45){if(A(n),(u&1||t)&&n.currentChar===62){(e&64)===0&&c(n,112),A(n),u=Ln(n,o,u,e,3,i,l,f),i=n.tokenIndex,l=n.tokenLine,f=n.tokenColumn;continue}return 33619994}return m===61?(A(n),4194337):25233969}case 8457014:{if(A(n),n.index=48&&m<=57)return Fn(n,e,80);if(m===46){let y=n.index+1;if(y=48&&m<=57)))return A(n),67108990}return 22}}}else{if((d^8232)<=1){u=u&-5|1,k2(n);continue}let g=tn(n);if(g>0&&(d=g),Vn(d))return n.tokenValue="",fn(n,e,0,0);if(Xe(d)){A(n);continue}c(n,20,String.fromCodePoint(d))}}return 1048576}function nu(n,e){return n.startIndex=n.tokenIndex=n.index,n.startColumn=n.tokenColumn=n.column,n.startLine=n.tokenLine=n.line,n.setToken(N[n.currentChar]&8192?eu(n,e):zn(n,e,0)),n.getToken()}function eu(n,e){let u=n.currentChar,t=A(n),o=n.index;for(;t!==u;)n.index>=n.end&&c(n,16),t=A(n);return t!==u&&c(n,16),n.tokenValue=n.source.slice(o,n.index),A(n),e&128&&(n.tokenRaw=n.source.slice(n.tokenIndex,n.index)),134283267}function w2(n,e){if(n.startIndex=n.tokenIndex=n.index,n.startColumn=n.tokenColumn=n.column,n.startLine=n.tokenLine=n.line,n.index>=n.end){n.setToken(1048576);return}if(n.currentChar===60){A(n),n.setToken(8456256);return}if(n.currentChar===123){A(n),n.setToken(2162700);return}let u=0;for(;n.index1&&i&32&&n.getToken()&262144&&c(n,61,V[n.getToken()&255]),f}function Pn(n,e,u,t,o,i){let{tokenIndex:l,tokenLine:f,tokenColumn:d}=n,g=n.getToken(),m=null,y=ge(n,e,u,t,o,i,l,f,d);return n.getToken()===1077936155?(b(n,e|8192),m=M(n,e,t,1,0,n.tokenIndex,n.tokenLine,n.tokenColumn),(i&32||(g&2097152)===0)&&(n.getToken()===274548||n.getToken()===8673330&&(g&2097152||(o&4)===0||e&256))&&$(l,f,d,n.index,n.line,n.column,60,n.getToken()===274548?"of":"in")):(o&16||(g&2097152)>0)&&(n.getToken()&262144)!==262144&&c(n,59,o&16?"const":"destructuring"),s(n,e,l,f,d,{type:"VariableDeclarator",id:y,init:m})}function Nu(n,e,u,t,o,i,l,f){b(n,e);let d=((e&524288)>0||(e&512)>0&&(e&2048)>0)&&P(n,e,209006);C(n,e|8192,67174411),u&&(u=j(u,1));let g=null,m=null,y=0,a=null,k=n.getToken()===86088||n.getToken()===241737||n.getToken()===86090,h,{tokenIndex:T,tokenLine:E,tokenColumn:w}=n,I=n.getToken();if(k?I===241737?(a=R(n,e),n.getToken()&2240512?(n.getToken()===8673330?e&256&&c(n,67):a=s(n,e,T,E,w,{type:"VariableDeclaration",kind:"let",declarations:s2(n,e|33554432,u,t,8,32)}),n.assignable=1):e&256?c(n,67):(k=!1,n.assignable=1,a=O(n,e,t,a,0,0,T,E,w),n.getToken()===274548&&c(n,115))):(b(n,e),a=s(n,e,T,E,w,I===86088?{type:"VariableDeclaration",kind:"var",declarations:s2(n,e|33554432,u,t,4,32)}:{type:"VariableDeclaration",kind:"const",declarations:s2(n,e|33554432,u,t,16,32)}),n.assignable=1):I===1074790417?d&&c(n,82):(I&2097152)===2097152?(a=I===2162700?Z(n,e,void 0,t,1,0,0,2,32,T,E,w):Q(n,e,void 0,t,1,0,0,2,32,T,E,w),y=n.destructible,y&64&&c(n,63),n.assignable=y&16?2:1,a=O(n,e|33554432,t,a,0,0,n.tokenIndex,n.tokenLine,n.tokenColumn)):a=Y(n,e|33554432,t,1,0,1,T,E,w),(n.getToken()&262144)===262144){if(n.getToken()===274548){n.assignable&2&&c(n,80,d?"await":"of"),r(n,a),b(n,e|8192),h=M(n,e,t,1,0,n.tokenIndex,n.tokenLine,n.tokenColumn),C(n,e|8192,16);let F=C2(n,e,u,t,o);return s(n,e,i,l,f,{type:"ForOfStatement",left:a,right:h,body:F,await:d})}n.assignable&2&&c(n,80,"in"),r(n,a),b(n,e|8192),d&&c(n,82),h=z(n,e,t,0,1,n.tokenIndex,n.tokenLine,n.tokenColumn),C(n,e|8192,16);let q=C2(n,e,u,t,o);return s(n,e,i,l,f,{type:"ForInStatement",body:q,left:a,right:h})}d&&c(n,82),k||(y&8&&n.getToken()!==1077936155&&c(n,80,"loop"),a=J(n,e|33554432,t,0,0,T,E,w,a)),n.getToken()===18&&(a=e2(n,e,t,0,n.tokenIndex,n.tokenLine,n.tokenColumn,a)),C(n,e|8192,1074790417),n.getToken()!==1074790417&&(g=z(n,e,t,0,1,n.tokenIndex,n.tokenLine,n.tokenColumn)),C(n,e|8192,1074790417),n.getToken()!==16&&(m=z(n,e,t,0,1,n.tokenIndex,n.tokenLine,n.tokenColumn)),C(n,e|8192,16);let v=C2(n,e,u,t,o);return s(n,e,i,l,f,{type:"ForStatement",init:a,test:g,update:m,body:v})}function xn(n,e,u){return B2(e,n.getToken())||c(n,118),(n.getToken()&537079808)===537079808&&c(n,119),u&&d2(n,e,u,n.tokenValue,8,0),R(n,e)}function Vu(n,e,u){let t=n.tokenIndex,o=n.tokenLine,i=n.tokenColumn;b(n,e);let l=null,{tokenIndex:f,tokenLine:d,tokenColumn:g}=n,m=[];if(n.getToken()===134283267)l=H(n,e);else{if(n.getToken()&143360){let a=xn(n,e,u);if(m=[s(n,e,f,d,g,{type:"ImportDefaultSpecifier",local:a})],P(n,e,18))switch(n.getToken()){case 8391476:m.push(vn(n,e,u));break;case 2162700:Nn(n,e,u,m);break;default:c(n,107)}}else switch(n.getToken()){case 8391476:m=[vn(n,e,u)];break;case 2162700:Nn(n,e,u,m);break;case 67174411:return pn(n,e,void 0,t,o,i);case 67108877:return rn(n,e,t,o,i);default:c(n,30,V[n.getToken()&255])}l=Ou(n,e)}let y={type:"ImportDeclaration",specifiers:m,source:l};return e&1&&(y.attributes=en(n,e,m)),K(n,e|8192),s(n,e,t,o,i,y)}function vn(n,e,u){let{tokenIndex:t,tokenLine:o,tokenColumn:i}=n;return b(n,e),C(n,e,77932),(n.getToken()&134217728)===134217728&&$(t,o,i,n.index,n.line,n.column,30,V[n.getToken()&255]),s(n,e,t,o,i,{type:"ImportNamespaceSpecifier",local:xn(n,e,u)})}function Ou(n,e){return C(n,e,12403),n.getToken()!==134283267&&c(n,105,"Import"),H(n,e)}function Nn(n,e,u,t){for(b(n,e);n.getToken()&143360||n.getToken()===134283267;){let{tokenValue:o,tokenIndex:i,tokenLine:l,tokenColumn:f}=n,d=n.getToken(),g=O2(n,e),m;P(n,e,77932)?((n.getToken()&134217728)===134217728||n.getToken()===18?c(n,106):J2(n,e,16,n.getToken(),0),o=n.tokenValue,m=R(n,e)):g.type==="Identifier"?(J2(n,e,16,d,0),m=g):c(n,25,V[108]),u&&d2(n,e,u,o,8,0),t.push(s(n,e,i,l,f,{type:"ImportSpecifier",local:m,imported:g})),n.getToken()!==1074790415&&C(n,e,18)}return C(n,e,1074790415),t}function rn(n,e,u,t,o){let i=ne(n,e,s(n,e,u,t,o,{type:"Identifier",name:"import"}),u,t,o);return i=O(n,e,void 0,i,0,0,u,t,o),i=J(n,e,void 0,0,0,u,t,o,i),n.getToken()===18&&(i=e2(n,e,void 0,0,u,t,o,i)),A2(n,e,i,u,t,o)}function pn(n,e,u,t,o,i){let l=ee(n,e,u,0,t,o,i);return l=O(n,e,u,l,0,0,t,o,i),n.getToken()===18&&(l=e2(n,e,u,0,t,o,i,l)),A2(n,e,l,t,o,i)}function Ru(n,e,u){let t=n.tokenIndex,o=n.tokenLine,i=n.tokenColumn;b(n,e|8192);let l=[],f=null,d=null,g=null;if(P(n,e|8192,20561)){switch(n.getToken()){case 86104:{f=f2(n,e,u,void 0,4,1,1,0,n.tokenIndex,n.tokenLine,n.tokenColumn);break}case 132:case 86094:f=un(n,e,u,void 0,1,n.tokenIndex,n.tokenLine,n.tokenColumn);break;case 209005:{let{tokenIndex:y,tokenLine:a,tokenColumn:k}=n;f=R(n,e);let{flags:h}=n;(h&1)===0&&(n.getToken()===86104?f=f2(n,e,u,void 0,4,1,1,1,y,a,k):n.getToken()===67174411?(f=hn(n,e,void 0,f,1,1,0,h,y,a,k),f=O(n,e,void 0,f,0,0,y,a,k),f=J(n,e,void 0,0,0,y,a,k,f)):n.getToken()&143360&&(u&&(u=K2(n,e,n.tokenValue)),f=R(n,e),f=F2(n,e,u,void 0,[f],1,y,a,k)));break}default:f=M(n,e,void 0,1,0,n.tokenIndex,n.tokenLine,n.tokenColumn),K(n,e|8192)}return u&&g2(n,"default"),s(n,e,t,o,i,{type:"ExportDefaultDeclaration",declaration:f})}switch(n.getToken()){case 8391476:{b(n,e);let y=null;P(n,e,77932)&&(u&&g2(n,n.tokenValue),y=O2(n,e)),C(n,e,12403),n.getToken()!==134283267&&c(n,105,"Export"),d=H(n,e);let k={type:"ExportAllDeclaration",source:d,exported:y};return e&1&&(k.attributes=en(n,e)),K(n,e|8192),s(n,e,t,o,i,k)}case 2162700:{b(n,e);let y=[],a=[],k=0;for(;n.getToken()&143360||n.getToken()===134283267;){let{tokenIndex:h,tokenValue:T,tokenLine:E,tokenColumn:w}=n,I=O2(n,e);I.type==="Literal"&&(k=1);let v;n.getToken()===77932?(b(n,e),(n.getToken()&143360)===0&&n.getToken()!==134283267&&c(n,106),u&&(y.push(n.tokenValue),a.push(T)),v=O2(n,e)):(u&&(y.push(n.tokenValue),a.push(n.tokenValue)),v=I),l.push(s(n,e,h,E,w,{type:"ExportSpecifier",local:I,exported:v})),n.getToken()!==1074790415&&C(n,e,18)}C(n,e,1074790415),P(n,e,12403)?(n.getToken()!==134283267&&c(n,105,"Export"),d=H(n,e),e&1&&(g=en(n,e,l)),u&&y.forEach(h=>g2(n,h))):(k&&c(n,172),u&&(y.forEach(h=>g2(n,h)),a.forEach(h=>du(n,h)))),K(n,e|8192);break}case 86094:f=un(n,e,u,void 0,2,n.tokenIndex,n.tokenLine,n.tokenColumn);break;case 86104:f=f2(n,e,u,void 0,4,1,2,0,n.tokenIndex,n.tokenLine,n.tokenColumn);break;case 241737:f=nn(n,e,u,void 0,8,64,n.tokenIndex,n.tokenLine,n.tokenColumn);break;case 86090:f=nn(n,e,u,void 0,16,64,n.tokenIndex,n.tokenLine,n.tokenColumn);break;case 86088:f=Gn(n,e,u,void 0,64,n.tokenIndex,n.tokenLine,n.tokenColumn);break;case 209005:{let{tokenIndex:y,tokenLine:a,tokenColumn:k}=n;if(b(n,e),(n.flags&1)===0&&n.getToken()===86104){f=f2(n,e,u,void 0,4,1,2,1,y,a,k);break}}default:c(n,30,V[n.getToken()&255])}let m={type:"ExportNamedDeclaration",declaration:f,specifiers:l,source:d};return g&&(m.attributes=g),s(n,e,t,o,i,m)}function M(n,e,u,t,o,i,l,f){let d=_(n,e,u,2,0,t,o,1,i,l,f);return d=O(n,e,u,d,o,0,i,l,f),J(n,e,u,o,0,i,l,f,d)}function e2(n,e,u,t,o,i,l,f){let d=[f];for(;P(n,e|8192,18);)d.push(M(n,e,u,1,t,n.tokenIndex,n.tokenLine,n.tokenColumn));return s(n,e,o,i,l,{type:"SequenceExpression",expressions:d})}function z(n,e,u,t,o,i,l,f){let d=M(n,e,u,o,t,i,l,f);return n.getToken()===18?e2(n,e,u,t,i,l,f,d):d}function J(n,e,u,t,o,i,l,f,d){let g=n.getToken();if((g&4194304)===4194304){n.assignable&2&&c(n,26),(!o&&g===1077936155&&d.type==="ArrayExpression"||d.type==="ObjectExpression")&&r(n,d),b(n,e|8192);let m=M(n,e,u,1,t,n.tokenIndex,n.tokenLine,n.tokenColumn);return n.assignable=2,s(n,e,i,l,f,o?{type:"AssignmentPattern",left:d,right:m}:{type:"AssignmentExpression",left:d,operator:V[g&255],right:m})}return(g&8388608)===8388608&&(d=l2(n,e,u,t,i,l,f,4,g,d)),P(n,e|8192,22)&&(d=c2(n,e,u,d,i,l,f)),d}function N2(n,e,u,t,o,i,l,f,d){let g=n.getToken();b(n,e|8192);let m=M(n,e,u,1,t,n.tokenIndex,n.tokenLine,n.tokenColumn);return d=s(n,e,i,l,f,o?{type:"AssignmentPattern",left:d,right:m}:{type:"AssignmentExpression",left:d,operator:V[g&255],right:m}),n.assignable=2,d}function c2(n,e,u,t,o,i,l){let f=M(n,(e|33554432)^33554432,u,1,0,n.tokenIndex,n.tokenLine,n.tokenColumn);C(n,e|8192,21),n.assignable=1;let d=M(n,e,u,1,0,n.tokenIndex,n.tokenLine,n.tokenColumn);return n.assignable=2,s(n,e,o,i,l,{type:"ConditionalExpression",test:t,consequent:f,alternate:d})}function l2(n,e,u,t,o,i,l,f,d,g){let m=-((e&33554432)>0)&8673330,y,a;for(n.assignable=2;n.getToken()&8388608&&(y=n.getToken(),a=y&3840,(y&524288&&d&268435456||d&524288&&y&268435456)&&c(n,165),!(a+((y===8391735)<<8)-((m===y)<<12)<=f));)b(n,e|8192),g=s(n,e,o,i,l,{type:y&524288||y&268435456?"LogicalExpression":"BinaryExpression",left:g,right:l2(n,e,u,t,n.tokenIndex,n.tokenLine,n.tokenColumn,a,y,Y(n,e,u,0,t,1,n.tokenIndex,n.tokenLine,n.tokenColumn)),operator:V[y&255]});return n.getToken()===1077936155&&c(n,26),g}function Uu(n,e,u,t,o,i,l,f){t||c(n,0);let d=n.getToken();b(n,e|8192);let g=Y(n,e,u,0,f,1,n.tokenIndex,n.tokenLine,n.tokenColumn);return n.getToken()===8391735&&c(n,33),e&256&&d===16863276&&(g.type==="Identifier"?c(n,121):uu(g)&&c(n,127)),n.assignable=2,s(n,e,o,i,l,{type:"UnaryExpression",operator:V[d&255],argument:g,prefix:!0})}function Mu(n,e,u,t,o,i,l,f,d,g){let m=n.getToken(),y=R(n,e),{flags:a}=n;if((a&1)===0){if(n.getToken()===86104)return te(n,e,u,1,t,f,d,g);if(B2(e,n.getToken()))return o||c(n,0),(n.getToken()&36864)===36864&&(n.flags|=256),le(n,e,u,i,f,d,g)}return!l&&n.getToken()===67174411?hn(n,e,u,y,i,1,0,a,f,d,g):n.getToken()===10?($2(n,e,m),l&&c(n,51),(m&36864)===36864&&(n.flags|=256),_2(n,e,u,n.tokenValue,y,l,i,0,f,d,g)):(n.assignable=1,y)}function Ju(n,e,u,t,o,i,l,f){if(t&&(n.destructible|=256),e&262144){b(n,e|8192),e&2097152&&c(n,32),o||c(n,26),n.getToken()===22&&c(n,124);let d=null,g=!1;return(n.flags&1)===0?(g=P(n,e|8192,8391476),(n.getToken()&77824||g)&&(d=M(n,e,u,1,0,n.tokenIndex,n.tokenLine,n.tokenColumn))):n.getToken()===8391476&&c(n,30,V[n.getToken()&255]),n.assignable=2,s(n,e,i,l,f,{type:"YieldExpression",argument:d,delegate:g})}return e&256&&c(n,97,"yield"),sn(n,e,u,i,l,f)}function ju(n,e,u,t,o,i,l,f){o&&(n.destructible|=128),e&268435456&&c(n,177);let d=sn(n,e,u,i,l,f);if(d.type==="ArrowFunctionExpression"||(n.getToken()&65536)===0)return e&524288&&$(i,l,f,n.startIndex,n.startLine,n.startColumn,176),e&512&&$(i,l,f,n.startIndex,n.startLine,n.startColumn,110),e&2097152&&e&524288&&$(i,l,f,n.startIndex,n.startLine,n.startColumn,110),d;if(e&2097152&&$(i,l,f,n.startIndex,n.startLine,n.startColumn,31),e&524288||e&512&&e&2048){t&&$(i,l,f,n.startIndex,n.startLine,n.startColumn,0);let m=Y(n,e,u,0,0,1,n.tokenIndex,n.tokenLine,n.tokenColumn);return n.getToken()===8391735&&c(n,33),n.assignable=2,s(n,e,i,l,f,{type:"AwaitExpression",argument:m})}return e&512&&$(i,l,f,n.startIndex,n.startLine,n.startColumn,98),d}function W2(n,e,u,t,o,i,l){let{tokenIndex:f,tokenLine:d,tokenColumn:g}=n;C(n,e|8192,2162700);let m=[];if(n.getToken()!==1074790415){for(;n.getToken()===134283267;){let{index:y,tokenIndex:a,tokenValue:k}=n,h=n.getToken(),T=H(n,e);Kn(n,y,a,k)&&(e|=256,n.flags&128&&$(a,d,g,n.index,n.line,n.column,66),n.flags&64&&$(a,d,g,n.index,n.line,n.column,9),n.flags&4096&&$(a,d,g,n.index,n.line,n.column,15),l&&z2(l)),m.push(cn(n,e,T,h,a,n.tokenLine,n.tokenColumn))}e&256&&(i&&((i&537079808)===537079808&&c(n,119),(i&36864)===36864&&c(n,40)),n.flags&512&&c(n,119),n.flags&256&&c(n,118))}for(n.flags=(n.flags|512|256|64|4096)^4928,n.destructible=(n.destructible|256)^256;n.getToken()!==1074790415;)m.push(I2(n,e,u,t,4,{}));return C(n,o&24?e|8192:e,1074790415),n.flags&=-4289,n.getToken()===1077936155&&c(n,26),s(n,e,f,d,g,{type:"BlockStatement",body:m})}function Xu(n,e,u,t,o){switch(b(n,e),n.getToken()){case 67108990:c(n,167);case 67174411:{(e&131072)===0&&c(n,28),n.assignable=2;break}case 69271571:case 67108877:{(e&65536)===0&&c(n,29),n.assignable=1;break}default:c(n,30,"super")}return s(n,e,u,t,o,{type:"Super"})}function Y(n,e,u,t,o,i,l,f,d){let g=_(n,e,u,2,0,t,o,i,l,f,d);return O(n,e,u,g,o,0,l,f,d)}function Hu(n,e,u,t,o,i){n.assignable&2&&c(n,55);let l=n.getToken();return b(n,e),n.assignable=2,s(n,e,t,o,i,{type:"UpdateExpression",argument:u,operator:V[l&255],prefix:!1})}function O(n,e,u,t,o,i,l,f,d){if((n.getToken()&33619968)===33619968&&(n.flags&1)===0)t=Hu(n,e,t,l,f,d);else if((n.getToken()&67108864)===67108864){switch(e=(e|33554432)^33554432,n.getToken()){case 67108877:{b(n,(e|67108864|2048)^2048),e&4096&&n.getToken()===130&&n.tokenValue==="super"&&c(n,173),n.assignable=1;let g=mn(n,e|16384,u);t=s(n,e,l,f,d,{type:"MemberExpression",object:t,computed:!1,property:g});break}case 69271571:{let g=!1;(n.flags&2048)===2048&&(g=!0,n.flags=(n.flags|2048)^2048),b(n,e|8192);let{tokenIndex:m,tokenLine:y,tokenColumn:a}=n,k=z(n,e,u,o,1,m,y,a);C(n,e,20),n.assignable=1,t=s(n,e,l,f,d,{type:"MemberExpression",object:t,computed:!0,property:k}),g&&(n.flags|=2048);break}case 67174411:{if((n.flags&1024)===1024)return n.flags=(n.flags|1024)^1024,t;let g=!1;(n.flags&2048)===2048&&(g=!0,n.flags=(n.flags|2048)^2048);let m=yn(n,e,u,o);n.assignable=2,t=s(n,e,l,f,d,{type:"CallExpression",callee:t,arguments:m}),g&&(n.flags|=2048);break}case 67108990:{b(n,(e|67108864|2048)^2048),n.flags|=2048,n.assignable=2,t=zu(n,e,u,t,l,f,d);break}default:(n.flags&2048)===2048&&c(n,166),n.assignable=2,t=s(n,e,l,f,d,{type:"TaggedTemplateExpression",tag:t,quasi:n.getToken()===67174408?an(n,e|16384,u):kn(n,e,n.tokenIndex,n.tokenLine,n.tokenColumn)})}t=O(n,e,u,t,0,1,l,f,d)}return i===0&&(n.flags&2048)===2048&&(n.flags=(n.flags|2048)^2048,t=s(n,e,l,f,d,{type:"ChainExpression",expression:t})),t}function zu(n,e,u,t,o,i,l){let f=!1,d;if((n.getToken()===69271571||n.getToken()===67174411)&&(n.flags&2048)===2048&&(f=!0,n.flags=(n.flags|2048)^2048),n.getToken()===69271571){b(n,e|8192);let{tokenIndex:g,tokenLine:m,tokenColumn:y}=n,a=z(n,e,u,0,1,g,m,y);C(n,e,20),n.assignable=2,d=s(n,e,o,i,l,{type:"MemberExpression",object:t,computed:!0,optional:!0,property:a})}else if(n.getToken()===67174411){let g=yn(n,e,u,0);n.assignable=2,d=s(n,e,o,i,l,{type:"CallExpression",callee:t,arguments:g,optional:!0})}else{let g=mn(n,e,u);n.assignable=2,d=s(n,e,o,i,l,{type:"MemberExpression",object:t,computed:!1,optional:!0,property:g})}return f&&(n.flags|=2048),d}function mn(n,e,u){return(n.getToken()&143360)===0&&n.getToken()!==-2147483528&&n.getToken()!==-2147483527&&n.getToken()!==130&&c(n,160),n.getToken()===130?H2(n,e,u,0,n.tokenIndex,n.tokenLine,n.tokenColumn):R(n,e)}function Ku(n,e,u,t,o,i,l,f){t&&c(n,56),o||c(n,0);let d=n.getToken();b(n,e|8192);let g=Y(n,e,u,0,0,1,n.tokenIndex,n.tokenLine,n.tokenColumn);return n.assignable&2&&c(n,55),n.assignable=2,s(n,e,i,l,f,{type:"UpdateExpression",argument:g,operator:V[d&255],prefix:!0})}function _(n,e,u,t,o,i,l,f,d,g,m){if((n.getToken()&143360)===143360){switch(n.getToken()){case 209006:return ju(n,e,u,o,l,d,g,m);case 241771:return Ju(n,e,u,l,i,d,g,m);case 209005:return Mu(n,e,u,l,f,i,o,d,g,m)}let{tokenValue:y}=n,a=n.getToken(),k=R(n,e|16384);return n.getToken()===10?(f||c(n,0),$2(n,e,a),(a&36864)===36864&&(n.flags|=256),_2(n,e,u,y,k,o,i,0,d,g,m)):(e&4096&&!(e&8388608)&&!(e&2097152)&&n.tokenValue==="arguments"&&c(n,130),(a&255)===73&&(e&256&&c(n,113),t&24&&c(n,100)),n.assignable=e&256&&(a&537079808)===537079808?2:1,k)}if((n.getToken()&134217728)===134217728)return H(n,e);switch(n.getToken()){case 33619993:case 33619994:return Ku(n,e,u,o,f,d,g,m);case 16863276:case 16842798:case 16842799:case 25233968:case 25233969:case 16863275:case 16863277:return Uu(n,e,u,f,d,g,m,l);case 86104:return te(n,e,u,0,l,d,g,m);case 2162700:return ru(n,e,u,i?0:1,l,d,g,m);case 69271571:return xu(n,e,u,i?0:1,l,d,g,m);case 67174411:return n1(n,e|16384,u,i,1,0,d,g,m);case 86021:case 86022:case 86023:return Zu(n,e,d,g,m);case 86111:return Gu(n,e);case 65540:return t1(n,e,d,g,m);case 132:case 86094:return i1(n,e,u,l,d,g,m);case 86109:return Xu(n,e,d,g,m);case 67174409:return kn(n,e,d,g,m);case 67174408:return an(n,e,u);case 86107:return e1(n,e,u,l,d,g,m);case 134283388:return ue(n,e,d,g,m);case 130:return H2(n,e,u,0,d,g,m);case 86106:return $u(n,e,u,o,l,d,g,m);case 8456256:if(e&8)return Q2(n,e,u,0,d,g,m);default:if(B2(e,n.getToken()))return sn(n,e,u,d,g,m);c(n,30,V[n.getToken()&255])}}function $u(n,e,u,t,o,i,l,f){let d=R(n,e);return n.getToken()===67108877?ne(n,e,d,i,l,f):(t&&c(n,142),d=ee(n,e,u,o,i,l,f),n.assignable=2,O(n,e,u,d,o,0,i,l,f))}function ne(n,e,u,t,o,i){(e&512)===0&&c(n,169),b(n,e);let l=n.getToken();return l!==209030&&n.tokenValue!=="meta"?c(n,174):l&-2147483648&&c(n,175),n.assignable=2,s(n,e,t,o,i,{type:"MetaProperty",meta:u,property:R(n,e)})}function ee(n,e,u,t,o,i,l){C(n,e|8192,67174411),n.getToken()===14&&c(n,143);let d={type:"ImportExpression",source:M(n,e,u,1,t,n.tokenIndex,n.tokenLine,n.tokenColumn)};if(e&1){let g=null;if(n.getToken()===18&&(C(n,e,18),n.getToken()!==16)){let m=(e|33554432)^33554432;g=M(n,m,u,1,t,n.tokenIndex,n.tokenLine,n.tokenColumn)}d.options=g,P(n,e,18)}return C(n,e,16),s(n,e,o,i,l,d)}function en(n,e,u=null){if(!P(n,e,20579))return[];C(n,e,2162700);let t=[],o=new Set;for(;n.getToken()!==1074790415;){let i=n.tokenIndex,l=n.tokenLine,f=n.tokenColumn,d=_u(n,e);C(n,e,21);let g=Wu(n,e),m=d.type==="Literal"?d.value:d.name;m==="type"&&g.value==="json"&&(u===null||u.length===1&&(u[0].type==="ImportDefaultSpecifier"||u[0].type==="ImportNamespaceSpecifier"||u[0].type==="ImportSpecifier"&&u[0].imported.type==="Identifier"&&u[0].imported.name==="default"||u[0].type==="ExportSpecifier"&&u[0].local.type==="Identifier"&&u[0].local.name==="default")||c(n,140)),o.has(m)&&c(n,145,`${m}`),o.add(m),t.push(s(n,e,i,l,f,{type:"ImportAttribute",key:d,value:g})),n.getToken()!==1074790415&&C(n,e,18)}return C(n,e,1074790415),t}function Wu(n,e){if(n.getToken()===134283267)return H(n,e);c(n,30,V[n.getToken()&255])}function _u(n,e){if(n.getToken()===134283267)return H(n,e);if(n.getToken()&143360)return R(n,e);c(n,30,V[n.getToken()&255])}function Yu(n,e){let u=e.length;for(let t=0;t56319||++t>=u||(e.charCodeAt(t)&64512)!==56320)&&c(n,171,JSON.stringify(e.charAt(t--)))}}function O2(n,e){if(n.getToken()===134283267)return Yu(n,n.tokenValue),H(n,e);if(n.getToken()&143360)return R(n,e);c(n,30,V[n.getToken()&255])}function ue(n,e,u,t,o){let{tokenRaw:i,tokenValue:l}=n;return b(n,e),n.assignable=2,s(n,e,u,t,o,e&128?{type:"Literal",value:l,bigint:i.slice(0,-1),raw:i}:{type:"Literal",value:l,bigint:i.slice(0,-1)})}function kn(n,e,u,t,o){n.assignable=2;let{tokenValue:i,tokenRaw:l,tokenIndex:f,tokenLine:d,tokenColumn:g}=n;C(n,e,67174409);let m=[R2(n,e,i,l,f,d,g,!0)];return s(n,e,u,t,o,{type:"TemplateLiteral",expressions:[],quasis:m})}function an(n,e,u){e=(e|33554432)^33554432;let{tokenValue:t,tokenRaw:o,tokenIndex:i,tokenLine:l,tokenColumn:f}=n;C(n,e&-16385|8192,67174408);let d=[R2(n,e,t,o,i,l,f,!1)],g=[z(n,e&-16385,u,0,1,n.tokenIndex,n.tokenLine,n.tokenColumn)];for(n.getToken()!==1074790415&&c(n,83);n.setToken(Ze(n,e),!0)!==67174409;){let{tokenValue:m,tokenRaw:y,tokenIndex:a,tokenLine:k,tokenColumn:h}=n;C(n,e&-16385|8192,67174408),d.push(R2(n,e,m,y,a,k,h,!1)),g.push(z(n,e,u,0,1,n.tokenIndex,n.tokenLine,n.tokenColumn)),n.getToken()!==1074790415&&c(n,83)}{let{tokenValue:m,tokenRaw:y,tokenIndex:a,tokenLine:k,tokenColumn:h}=n;C(n,e,67174409),d.push(R2(n,e,m,y,a,k,h,!0))}return s(n,e,i,l,f,{type:"TemplateLiteral",expressions:g,quasis:d})}function R2(n,e,u,t,o,i,l,f){let d=s(n,e,o,i,l,{type:"TemplateElement",value:{cooked:u,raw:t},tail:f}),g=f?1:2;return e&2&&(d.start+=1,d.range[0]+=1,d.end-=g,d.range[1]-=g),e&4&&(d.loc.start.column+=1,d.loc.end.column-=g),d}function Qu(n,e,u,t,o,i){e=(e|33554432)^33554432,C(n,e|8192,14);let l=M(n,e,u,1,0,n.tokenIndex,n.tokenLine,n.tokenColumn);return n.assignable=1,s(n,e,t,o,i,{type:"SpreadElement",argument:l})}function yn(n,e,u,t){b(n,e|8192);let o=[];if(n.getToken()===16)return b(n,e|16384),o;for(;n.getToken()!==16&&(n.getToken()===14?o.push(Qu(n,e,u,n.tokenIndex,n.tokenLine,n.tokenColumn)):o.push(M(n,e,u,1,t,n.tokenIndex,n.tokenLine,n.tokenColumn)),!(n.getToken()!==18||(b(n,e|8192),n.getToken()===16))););return C(n,e|16384,16),o}function R(n,e){let{tokenValue:u,tokenIndex:t,tokenLine:o,tokenColumn:i}=n,l=u==="await"&&(n.getToken()&-2147483648)===0;return b(n,e|(l?8192:0)),s(n,e,t,o,i,{type:"Identifier",name:u})}function H(n,e){let{tokenValue:u,tokenRaw:t,tokenIndex:o,tokenLine:i,tokenColumn:l}=n;return n.getToken()===134283388?ue(n,e,o,i,l):(b(n,e),n.assignable=2,s(n,e,o,i,l,e&128?{type:"Literal",value:u,raw:t}:{type:"Literal",value:u}))}function Zu(n,e,u,t,o){let i=V[n.getToken()&255],l=n.getToken()===86023?null:i==="true";return b(n,e),n.assignable=2,s(n,e,u,t,o,e&128?{type:"Literal",value:l,raw:i}:{type:"Literal",value:l})}function Gu(n,e){let{tokenIndex:u,tokenLine:t,tokenColumn:o}=n;return b(n,e),n.assignable=2,s(n,e,u,t,o,{type:"ThisExpression"})}function f2(n,e,u,t,o,i,l,f,d,g,m){b(n,e|8192);let y=i?dn(n,e,8391476):0,a=null,k,h=u?a2():void 0;if(n.getToken()===67174411)(l&1)===0&&c(n,39,"Function");else{let v=o&4&&((e&2048)===0||(e&512)===0)?4:64|(f?1024:0)|(y?1024:0);$n(n,e,n.getToken()),u&&(v&4?Yn(n,e,u,n.tokenValue,v):d2(n,e,u,n.tokenValue,v,o),h=j(h,256),l&&l&2&&g2(n,n.tokenValue)),k=n.getToken(),n.getToken()&143360?a=R(n,e):c(n,30,V[n.getToken()&255])}let T=7274496;e=(e|T)^T|16777216|(f?524288:0)|(y?262144:0)|(y?0:67108864),u&&(h=j(h,512));let E=oe(n,(e|2097152)&-268435457,h,t,0,1),w=268471296,I=W2(n,(e|w)^w|8388608|1048576,u?j(h,128):h,t,8,k,h==null?void 0:h.scopeError);return s(n,e,d,g,m,{type:"FunctionDeclaration",id:a,params:E,body:I,async:f===1,generator:y===1})}function te(n,e,u,t,o,i,l,f){b(n,e|8192);let d=dn(n,e,8391476),g=(t?524288:0)|(d?262144:0),m=null,y,a=e&16?a2():void 0,k=275709952;n.getToken()&143360&&($n(n,(e|k)^k|g,n.getToken()),a&&(a=j(a,256)),y=n.getToken(),m=R(n,e)),e=(e|k)^k|16777216|g|(d?0:67108864),a&&(a=j(a,512));let h=oe(n,(e|2097152)&-268435457,a,u,o,1),T=W2(n,e&-33594369|8388608|1048576,a&&j(a,128),u,0,y,a==null?void 0:a.scopeError);return n.assignable=2,s(n,e,i,l,f,{type:"FunctionExpression",id:m,params:h,body:T,async:t===1,generator:d===1})}function xu(n,e,u,t,o,i,l,f){let d=Q(n,e,void 0,u,t,o,0,2,0,i,l,f);return n.destructible&64&&c(n,63),n.destructible&8&&c(n,62),d}function Q(n,e,u,t,o,i,l,f,d,g,m,y){b(n,e|8192);let a=[],k=0;for(e=(e|33554432)^33554432;n.getToken()!==20;)if(P(n,e|8192,18))a.push(null);else{let T,{tokenIndex:E,tokenLine:w,tokenColumn:I,tokenValue:v}=n,q=n.getToken();if(q&143360)if(T=_(n,e,t,f,0,1,i,1,E,w,I),n.getToken()===1077936155){n.assignable&2&&c(n,26),b(n,e|8192),u&&n2(n,e,u,v,f,d);let F=M(n,e,t,1,i,n.tokenIndex,n.tokenLine,n.tokenColumn);T=s(n,e,E,w,I,l?{type:"AssignmentPattern",left:T,right:F}:{type:"AssignmentExpression",operator:"=",left:T,right:F}),k|=n.destructible&256?256:0|n.destructible&128?128:0}else n.getToken()===18||n.getToken()===20?(n.assignable&2?k|=16:u&&n2(n,e,u,v,f,d),k|=n.destructible&256?256:0|n.destructible&128?128:0):(k|=f&1?32:(f&2)===0?16:0,T=O(n,e,t,T,i,0,E,w,I),n.getToken()!==18&&n.getToken()!==20?(n.getToken()!==1077936155&&(k|=16),T=J(n,e,t,i,l,E,w,I,T)):n.getToken()!==1077936155&&(k|=n.assignable&2?16:32));else q&2097152?(T=n.getToken()===2162700?Z(n,e,u,t,0,i,l,f,d,E,w,I):Q(n,e,u,t,0,i,l,f,d,E,w,I),k|=n.destructible,n.assignable=n.destructible&16?2:1,n.getToken()===18||n.getToken()===20?n.assignable&2&&(k|=16):n.destructible&8?c(n,71):(T=O(n,e,t,T,i,0,E,w,I),k=n.assignable&2?16:0,n.getToken()!==18&&n.getToken()!==20?T=J(n,e,t,i,l,E,w,I,T):n.getToken()!==1077936155&&(k|=n.assignable&2?16:32))):q===14?(T=b2(n,e,u,t,20,f,d,0,i,l,E,w,I),k|=n.destructible,n.getToken()!==18&&n.getToken()!==20&&c(n,30,V[n.getToken()&255])):(T=Y(n,e,t,1,0,1,E,w,I),n.getToken()!==18&&n.getToken()!==20?(T=J(n,e,t,i,l,E,w,I,T),(f&3)===0&&q===67174411&&(k|=16)):n.assignable&2?k|=16:q===67174411&&(k|=n.assignable&1&&f&3?32:16));if(a.push(T),P(n,e|8192,18)){if(n.getToken()===20)break}else break}C(n,e,20);let h=s(n,e,g,m,y,{type:l?"ArrayPattern":"ArrayExpression",elements:a});return!o&&n.getToken()&4194304?ie(n,e,t,k,i,l,g,m,y,h):(n.destructible=k,h)}function ie(n,e,u,t,o,i,l,f,d,g){n.getToken()!==1077936155&&c(n,26),b(n,e|8192),t&16&&c(n,26),i||r(n,g);let{tokenIndex:m,tokenLine:y,tokenColumn:a}=n,k=M(n,e,u,1,o,m,y,a);return n.destructible=(t|64|8)^72|(n.destructible&128?128:0)|(n.destructible&256?256:0),s(n,e,l,f,d,i?{type:"AssignmentPattern",left:g,right:k}:{type:"AssignmentExpression",left:g,operator:"=",right:k})}function b2(n,e,u,t,o,i,l,f,d,g,m,y,a){b(n,e|8192);let k=null,h=0,{tokenValue:T,tokenIndex:E,tokenLine:w,tokenColumn:I}=n,v=n.getToken();if(v&143360)n.assignable=1,k=_(n,e,t,i,0,1,d,1,E,w,I),v=n.getToken(),k=O(n,e,t,k,d,0,E,w,I),n.getToken()!==18&&n.getToken()!==o&&(n.assignable&2&&n.getToken()===1077936155&&c(n,71),h|=16,k=J(n,e,t,d,g,E,w,I,k)),n.assignable&2?h|=16:v===o||v===18?u&&n2(n,e,u,T,i,l):h|=32,h|=n.destructible&128?128:0;else if(v===o)c(n,41);else if(v&2097152)k=n.getToken()===2162700?Z(n,e,u,t,1,d,g,i,l,E,w,I):Q(n,e,u,t,1,d,g,i,l,E,w,I),v=n.getToken(),v!==1077936155&&v!==o&&v!==18?(n.destructible&8&&c(n,71),k=O(n,e,t,k,d,0,E,w,I),h|=n.assignable&2?16:0,(n.getToken()&4194304)===4194304?(n.getToken()!==1077936155&&(h|=16),k=J(n,e,t,d,g,E,w,I,k)):((n.getToken()&8388608)===8388608&&(k=l2(n,e,t,1,E,w,I,4,v,k)),P(n,e|8192,22)&&(k=c2(n,e,t,k,E,w,I)),h|=n.assignable&2?16:32)):h|=o===1074790415&&v!==1077936155?16:n.destructible;else{h|=32,k=Y(n,e,t,1,d,1,n.tokenIndex,n.tokenLine,n.tokenColumn);let{tokenIndex:q,tokenLine:F,tokenColumn:U}=n,D=n.getToken();return D===1077936155?(n.assignable&2&&c(n,26),k=J(n,e,t,d,g,q,F,U,k),h|=16):(D===18?h|=16:D!==o&&(k=J(n,e,t,d,g,q,F,U,k)),h|=n.assignable&1?32:16),n.destructible=h,n.getToken()!==o&&n.getToken()!==18&&c(n,161),s(n,e,m,y,a,{type:g?"RestElement":"SpreadElement",argument:k})}if(n.getToken()!==o)if(i&1&&(h|=f?16:32),P(n,e|8192,1077936155)){h&16&&c(n,26),r(n,k);let q=M(n,e,t,1,d,n.tokenIndex,n.tokenLine,n.tokenColumn);k=s(n,e,E,w,I,g?{type:"AssignmentPattern",left:k,right:q}:{type:"AssignmentExpression",left:k,operator:"=",right:q}),h=16}else h|=16;return n.destructible=h,s(n,e,m,y,a,{type:g?"RestElement":"SpreadElement",argument:k})}function x(n,e,u,t,o,i,l,f){var a;let d=2883584|((t&64)===0?4325376:0);e=(e|d)^d|(t&8?262144:0)|(t&16?524288:0)|(t&64?4194304:0)|65536|8388608|16777216;let g=e&16?j(a2(),512):void 0,m=pu(n,(e|2097152)&-268435457,g,u,t,1,o);g&&(g=j(g,128));let y=W2(n,e&-301992961|8388608|1048576,g,u,0,void 0,(a=g==null?void 0:g.parent)==null?void 0:a.scopeError);return s(n,e,i,l,f,{type:"FunctionExpression",params:m,body:y,async:(t&16)>0,generator:(t&8)>0,id:null})}function ru(n,e,u,t,o,i,l,f){let d=Z(n,e,void 0,u,t,o,0,2,0,i,l,f);return n.destructible&64&&c(n,63),n.destructible&8&&c(n,62),d}function Z(n,e,u,t,o,i,l,f,d,g,m,y){b(n,e);let a=[],k=0,h=0;for(e=(e|33554432)^33554432;n.getToken()!==1074790415;){let{tokenValue:E,tokenLine:w,tokenColumn:I,tokenIndex:v}=n,q=n.getToken();if(q===14)a.push(b2(n,e,u,t,1074790415,f,d,0,i,l,v,w,I));else{let F=0,U=null,D;if(n.getToken()&143360||n.getToken()===-2147483528||n.getToken()===-2147483527)if(n.getToken()===-2147483527&&(k|=16),U=R(n,e),n.getToken()===18||n.getToken()===1074790415||n.getToken()===1077936155)if(F|=4,e&256&&(q&537079808)===537079808?k|=16:J2(n,e,f,q,0),u&&n2(n,e,u,E,f,d),P(n,e|8192,1077936155)){k|=8;let B=M(n,e,t,1,i,n.tokenIndex,n.tokenLine,n.tokenColumn);k|=n.destructible&256?256:0|n.destructible&128?128:0,D=s(n,e,v,w,I,{type:"AssignmentPattern",left:e&134217728?Object.assign({},U):U,right:B})}else k|=(q===209006?128:0)|(q===-2147483528?16:0),D=e&134217728?Object.assign({},U):U;else if(P(n,e|8192,21)){let{tokenIndex:B,tokenLine:L,tokenColumn:S}=n;if(E==="__proto__"&&h++,n.getToken()&143360){let D2=n.getToken(),t2=n.tokenValue;D=_(n,e,t,f,0,1,i,1,B,L,S);let p=n.getToken();D=O(n,e,t,D,i,0,B,L,S),n.getToken()===18||n.getToken()===1074790415?p===1077936155||p===1074790415||p===18?(k|=n.destructible&128?128:0,n.assignable&2?k|=16:u&&(D2&143360)===143360&&n2(n,e,u,t2,f,d)):k|=n.assignable&1?32:16:(n.getToken()&4194304)===4194304?(n.assignable&2?k|=16:p!==1077936155?k|=32:u&&n2(n,e,u,t2,f,d),D=J(n,e,t,i,l,B,L,S,D)):(k|=16,(n.getToken()&8388608)===8388608&&(D=l2(n,e,t,1,B,L,S,4,p,D)),P(n,e|8192,22)&&(D=c2(n,e,t,D,B,L,S)))}else(n.getToken()&2097152)===2097152?(D=n.getToken()===69271571?Q(n,e,u,t,0,i,l,f,d,B,L,S):Z(n,e,u,t,0,i,l,f,d,B,L,S),k=n.destructible,n.assignable=k&16?2:1,n.getToken()===18||n.getToken()===1074790415?n.assignable&2&&(k|=16):n.destructible&8?c(n,71):(D=O(n,e,t,D,i,0,B,L,S),k=n.assignable&2?16:0,(n.getToken()&4194304)===4194304?D=N2(n,e,t,i,l,B,L,S,D):((n.getToken()&8388608)===8388608&&(D=l2(n,e,t,1,B,L,S,4,q,D)),P(n,e|8192,22)&&(D=c2(n,e,t,D,B,L,S)),k|=n.assignable&2?16:32))):(D=Y(n,e,t,1,i,1,B,L,S),k|=n.assignable&1?32:16,n.getToken()===18||n.getToken()===1074790415?n.assignable&2&&(k|=16):(D=O(n,e,t,D,i,0,B,L,S),k=n.assignable&2?16:0,n.getToken()!==18&&q!==1074790415&&(n.getToken()!==1077936155&&(k|=16),D=J(n,e,t,i,l,B,L,S,D))))}else n.getToken()===69271571?(k|=16,q===209005&&(F|=16),F|=(q===12400?256:q===12401?512:1)|2,U=y2(n,e,t,i),k|=n.assignable,D=x(n,e,t,F,i,n.tokenIndex,n.tokenLine,n.tokenColumn)):n.getToken()&143360?(k|=16,q===-2147483528&&c(n,95),q===209005?(n.flags&1&&c(n,132),F|=17):q===12400?F|=256:q===12401?F|=512:c(n,0),U=R(n,e),D=x(n,e,t,F,i,n.tokenIndex,n.tokenLine,n.tokenColumn)):n.getToken()===67174411?(k|=16,F|=1,D=x(n,e,t,F,i,n.tokenIndex,n.tokenLine,n.tokenColumn)):n.getToken()===8391476?(k|=16,q===12400?c(n,42):q===12401?c(n,43):q!==209005&&c(n,30,V[52]),b(n,e),F|=9|(q===209005?16:0),n.getToken()&143360?U=R(n,e):(n.getToken()&134217728)===134217728?U=H(n,e):n.getToken()===69271571?(F|=2,U=y2(n,e,t,i),k|=n.assignable):c(n,30,V[n.getToken()&255]),D=x(n,e,t,F,i,n.tokenIndex,n.tokenLine,n.tokenColumn)):(n.getToken()&134217728)===134217728?(q===209005&&(F|=16),F|=q===12400?256:q===12401?512:1,k|=16,U=H(n,e),D=x(n,e,t,F,i,n.tokenIndex,n.tokenLine,n.tokenColumn)):c(n,133);else if((n.getToken()&134217728)===134217728)if(U=H(n,e),n.getToken()===21){C(n,e|8192,21);let{tokenIndex:B,tokenLine:L,tokenColumn:S}=n;if(E==="__proto__"&&h++,n.getToken()&143360){D=_(n,e,t,f,0,1,i,1,B,L,S);let{tokenValue:D2}=n,t2=n.getToken();D=O(n,e,t,D,i,0,B,L,S),n.getToken()===18||n.getToken()===1074790415?t2===1077936155||t2===1074790415||t2===18?n.assignable&2?k|=16:u&&n2(n,e,u,D2,f,d):k|=n.assignable&1?32:16:n.getToken()===1077936155?(n.assignable&2&&(k|=16),D=J(n,e,t,i,l,B,L,S,D)):(k|=16,D=J(n,e,t,i,l,B,L,S,D))}else(n.getToken()&2097152)===2097152?(D=n.getToken()===69271571?Q(n,e,u,t,0,i,l,f,d,B,L,S):Z(n,e,u,t,0,i,l,f,d,B,L,S),k=n.destructible,n.assignable=k&16?2:1,n.getToken()===18||n.getToken()===1074790415?n.assignable&2&&(k|=16):(n.destructible&8)!==8&&(D=O(n,e,t,D,i,0,B,L,S),k=n.assignable&2?16:0,(n.getToken()&4194304)===4194304?D=N2(n,e,t,i,l,B,L,S,D):((n.getToken()&8388608)===8388608&&(D=l2(n,e,t,1,B,L,S,4,q,D)),P(n,e|8192,22)&&(D=c2(n,e,t,D,B,L,S)),k|=n.assignable&2?16:32))):(D=Y(n,e,t,1,0,1,B,L,S),k|=n.assignable&1?32:16,n.getToken()===18||n.getToken()===1074790415?n.assignable&2&&(k|=16):(D=O(n,e,t,D,i,0,B,L,S),k=n.assignable&1?0:16,n.getToken()!==18&&n.getToken()!==1074790415&&(n.getToken()!==1077936155&&(k|=16),D=J(n,e,t,i,l,B,L,S,D))))}else n.getToken()===67174411?(F|=1,D=x(n,e,t,F,i,n.tokenIndex,n.tokenLine,n.tokenColumn),k=n.assignable|16):c(n,134);else if(n.getToken()===69271571)if(U=y2(n,e,t,i),k|=n.destructible&256?256:0,F|=2,n.getToken()===21){b(n,e|8192);let{tokenIndex:B,tokenLine:L,tokenColumn:S,tokenValue:D2}=n,t2=n.getToken();if(n.getToken()&143360){D=_(n,e,t,f,0,1,i,1,B,L,S);let p=n.getToken();D=O(n,e,t,D,i,0,B,L,S),(n.getToken()&4194304)===4194304?(k|=n.assignable&2?16:p===1077936155?0:32,D=N2(n,e,t,i,l,B,L,S,D)):n.getToken()===18||n.getToken()===1074790415?p===1077936155||p===1074790415||p===18?n.assignable&2?k|=16:u&&(t2&143360)===143360&&n2(n,e,u,D2,f,d):k|=n.assignable&1?32:16:(k|=16,D=J(n,e,t,i,l,B,L,S,D))}else(n.getToken()&2097152)===2097152?(D=n.getToken()===69271571?Q(n,e,u,t,0,i,l,f,d,B,L,S):Z(n,e,u,t,0,i,l,f,d,B,L,S),k=n.destructible,n.assignable=k&16?2:1,n.getToken()===18||n.getToken()===1074790415?n.assignable&2&&(k|=16):k&8?c(n,62):(D=O(n,e,t,D,i,0,B,L,S),k=n.assignable&2?k|16:0,(n.getToken()&4194304)===4194304?(n.getToken()!==1077936155&&(k|=16),D=N2(n,e,t,i,l,B,L,S,D)):((n.getToken()&8388608)===8388608&&(D=l2(n,e,t,1,B,L,S,4,q,D)),P(n,e|8192,22)&&(D=c2(n,e,t,D,B,L,S)),k|=n.assignable&2?16:32))):(D=Y(n,e,t,1,0,1,B,L,S),k|=n.assignable&1?32:16,n.getToken()===18||n.getToken()===1074790415?n.assignable&2&&(k|=16):(D=O(n,e,t,D,i,0,B,L,S),k=n.assignable&1?0:16,n.getToken()!==18&&n.getToken()!==1074790415&&(n.getToken()!==1077936155&&(k|=16),D=J(n,e,t,i,l,B,L,S,D))))}else n.getToken()===67174411?(F|=1,D=x(n,e,t,F,i,n.tokenIndex,w,I),k=16):c(n,44);else if(q===8391476)if(C(n,e|8192,8391476),F|=8,n.getToken()&143360){let B=n.getToken();U=R(n,e),F|=1,n.getToken()===67174411?(k|=16,D=x(n,e,t,F,i,n.tokenIndex,n.tokenLine,n.tokenColumn)):$(n.tokenIndex,n.tokenLine,n.tokenColumn,n.index,n.line,n.column,B===209005?46:B===12400||n.getToken()===12401?45:47,V[B&255])}else(n.getToken()&134217728)===134217728?(k|=16,U=H(n,e),F|=1,D=x(n,e,t,F,i,v,w,I)):n.getToken()===69271571?(k|=16,F|=3,U=y2(n,e,t,i),D=x(n,e,t,F,i,n.tokenIndex,n.tokenLine,n.tokenColumn)):c(n,126);else c(n,30,V[q&255]);k|=n.destructible&128?128:0,n.destructible=k,a.push(s(n,e,v,w,I,{type:"Property",key:U,value:D,kind:F&768?F&512?"set":"get":"init",computed:(F&2)>0,method:(F&1)>0,shorthand:(F&4)>0}))}if(k|=n.destructible,n.getToken()!==18)break;b(n,e)}C(n,e,1074790415),h>1&&(k|=64);let T=s(n,e,g,m,y,{type:l?"ObjectPattern":"ObjectExpression",properties:a});return!o&&n.getToken()&4194304?ie(n,e,t,k,i,l,g,m,y,T):(n.destructible=k,T)}function pu(n,e,u,t,o,i,l){C(n,e,67174411);let f=[];if(n.flags=(n.flags|128)^128,n.getToken()===16)return o&512&&c(n,37,"Setter","one",""),b(n,e),f;o&256&&c(n,37,"Getter","no","s"),o&512&&n.getToken()===14&&c(n,38),e=(e|33554432)^33554432;let d=0,g=0;for(;n.getToken()!==18;){let m=null,{tokenIndex:y,tokenLine:a,tokenColumn:k}=n;if(n.getToken()&143360?((e&256)===0&&((n.getToken()&36864)===36864&&(n.flags|=256),(n.getToken()&537079808)===537079808&&(n.flags|=512)),m=An(n,e,u,o|1,0,y,a,k)):(n.getToken()===2162700?m=Z(n,e,u,t,1,l,1,i,0,y,a,k):n.getToken()===69271571?m=Q(n,e,u,t,1,l,1,i,0,y,a,k):n.getToken()===14&&(m=b2(n,e,u,t,16,i,0,0,l,1,y,a,k)),g=1,n.destructible&48&&c(n,50)),n.getToken()===1077936155){b(n,e|8192),g=1;let h=M(n,e,t,1,0,n.tokenIndex,n.tokenLine,n.tokenColumn);m=s(n,e,y,a,k,{type:"AssignmentPattern",left:m,right:h})}if(d++,f.push(m),!P(n,e,18)||n.getToken()===16)break}return o&512&&d!==1&&c(n,37,"Setter","one",""),u&&u.scopeError&&z2(u.scopeError),g&&(n.flags|=128),C(n,e,16),f}function y2(n,e,u,t){b(n,e|8192);let o=M(n,(e|33554432)^33554432,u,1,t,n.tokenIndex,n.tokenLine,n.tokenColumn);return C(n,e,20),o}function n1(n,e,u,t,o,i,l,f,d){n.flags=(n.flags|128)^128;let{tokenIndex:g,tokenLine:m,tokenColumn:y}=n;b(n,e|8192|67108864);let a=e&16?j(a2(),1024):void 0;if(e=(e|33554432)^33554432,P(n,e,16))return X2(n,e,a,u,[],t,0,l,f,d);let k=0;n.destructible&=-385;let h,T=[],E=0,w=0,I=0,{tokenIndex:v,tokenLine:q,tokenColumn:F}=n;for(n.assignable=1;n.getToken()!==16;){let{tokenIndex:U,tokenLine:D,tokenColumn:B}=n,L=n.getToken();if(L&143360)a&&d2(n,e,a,n.tokenValue,1,0),(L&537079808)===537079808?w=1:(L&36864)===36864&&(I=1),h=_(n,e,u,o,0,1,1,1,U,D,B),n.getToken()===16||n.getToken()===18?n.assignable&2&&(k|=16,w=1):(n.getToken()===1077936155?w=1:k|=16,h=O(n,e,u,h,1,0,U,D,B),n.getToken()!==16&&n.getToken()!==18&&(h=J(n,e,u,1,0,U,D,B,h)));else if((L&2097152)===2097152)h=L===2162700?Z(n,e|67108864,a,u,0,1,0,o,i,U,D,B):Q(n,e|67108864,a,u,0,1,0,o,i,U,D,B),k|=n.destructible,w=1,n.assignable=2,n.getToken()!==16&&n.getToken()!==18&&(k&8&&c(n,122),h=O(n,e,u,h,0,0,U,D,B),k|=16,n.getToken()!==16&&n.getToken()!==18&&(h=J(n,e,u,0,0,U,D,B,h)));else if(L===14){h=b2(n,e,a,u,16,o,i,0,1,0,U,D,B),n.destructible&16&&c(n,74),w=1,E&&(n.getToken()===16||n.getToken()===18)&&T.push(h),k|=8;break}else{if(k|=16,h=M(n,e,u,1,1,U,D,B),E&&(n.getToken()===16||n.getToken()===18)&&T.push(h),n.getToken()===18&&(E||(E=1,T=[h])),E){for(;P(n,e|8192,18);)T.push(M(n,e,u,1,1,n.tokenIndex,n.tokenLine,n.tokenColumn));n.assignable=2,h=s(n,e,v,q,F,{type:"SequenceExpression",expressions:T})}return C(n,e,16),n.destructible=k,h}if(E&&(n.getToken()===16||n.getToken()===18)&&T.push(h),!P(n,e|8192,18))break;if(E||(E=1,T=[h]),n.getToken()===16){k|=8;break}}return E&&(n.assignable=2,h=s(n,e,v,q,F,{type:"SequenceExpression",expressions:T})),C(n,e,16),k&16&&k&8&&c(n,151),k|=n.destructible&256?256:0|n.destructible&128?128:0,n.getToken()===10?(k&48&&c(n,49),e&524800&&k&128&&c(n,31),e&262400&&k&256&&c(n,32),w&&(n.flags|=128),I&&(n.flags|=256),X2(n,e,a,u,E?T:[h],t,0,l,f,d)):(k&64&&c(n,63),k&8&&c(n,144),n.destructible=(n.destructible|256)^256|k,e&32?s(n,e,g,m,y,{type:"ParenthesizedExpression",expression:h}):h)}function sn(n,e,u,t,o,i){let{tokenValue:l}=n,f=0,d=0;(n.getToken()&537079808)===537079808?f=1:(n.getToken()&36864)===36864&&(d=1);let g=R(n,e);if(n.assignable=1,n.getToken()===10){let m;return e&16&&(m=K2(n,e,l)),f&&(n.flags|=128),d&&(n.flags|=256),F2(n,e,m,u,[g],0,t,o,i)}return g}function _2(n,e,u,t,o,i,l,f,d,g,m){l||c(n,57),i&&c(n,51),n.flags&=-129;let y=e&16?K2(n,e,t):void 0;return F2(n,e,y,u,[o],f,d,g,m)}function X2(n,e,u,t,o,i,l,f,d,g){i||c(n,57);for(let m=0;m0&&n.tokenValue==="constructor"&&c(n,109),n.getToken()===1074790415&&c(n,108),P(n,e,1074790417)){E>0&&c(n,120);continue}h.push(de(n,e,t,y,u,i,T,0,f,n.tokenIndex,n.tokenLine,n.tokenColumn))}return C(n,l&8?e|8192:e,1074790415),y&&fu(y),n.flags=n.flags&-33|k,s(n,e,d,g,m,{type:"ClassBody",body:h})}function de(n,e,u,t,o,i,l,f,d,g,m,y){let a=f?32:0,k=null,{tokenIndex:h,tokenLine:T,tokenColumn:E}=n,w=n.getToken();if(w&176128||w===-2147483528)switch(k=R(n,e),w){case 36970:if(!f&&n.getToken()!==67174411&&(n.getToken()&1048576)!==1048576&&n.getToken()!==1077936155)return de(n,e,u,t,o,i,l,1,d,g,m,y);break;case 209005:if(n.getToken()!==67174411&&(n.flags&1)===0){if((n.getToken()&1073741824)===1073741824)return T2(n,e,t,k,a,l,h,T,E);a|=16|(dn(n,e,8391476)?8:0)}break;case 12400:if(n.getToken()!==67174411){if((n.getToken()&1073741824)===1073741824)return T2(n,e,t,k,a,l,h,T,E);a|=256}break;case 12401:if(n.getToken()!==67174411){if((n.getToken()&1073741824)===1073741824)return T2(n,e,t,k,a,l,h,T,E);a|=512}break;case 12402:if(n.getToken()!==67174411&&(n.flags&1)===0){if((n.getToken()&1073741824)===1073741824)return T2(n,e,t,k,a,l,h,T,E);e&1&&(a|=1024)}break}else if(w===69271571)a|=2,k=y2(n,o,t,d);else if((w&134217728)===134217728)k=H(n,e);else if(w===8391476)a|=8,b(n,e);else if(n.getToken()===130)a|=8192,k=H2(n,e|4096,t,768,h,T,E);else if((n.getToken()&1073741824)===1073741824)a|=128;else{if(f&&w===2162700)return Su(n,e|4096,u,t,h,T,E);w===-2147483527?(k=R(n,e),n.getToken()!==67174411&&c(n,30,V[n.getToken()&255])):c(n,30,V[n.getToken()&255])}if(a&1816&&(n.getToken()&143360||n.getToken()===-2147483528||n.getToken()===-2147483527?k=R(n,e):(n.getToken()&134217728)===134217728?k=H(n,e):n.getToken()===69271571?(a|=2,k=y2(n,e,t,0)):n.getToken()===130?(a|=8192,k=H2(n,e,t,a,h,T,E)):c(n,135)),(a&2)===0&&(n.tokenValue==="constructor"?((n.getToken()&1073741824)===1073741824?c(n,129):(a&32)===0&&n.getToken()===67174411&&(a&920?c(n,53,"accessor"):(e&131072)===0&&(n.flags&32?c(n,54):n.flags|=32)),a|=64):(a&8192)===0&&a&32&&n.tokenValue==="prototype"&&c(n,52)),a&1024||n.getToken()!==67174411&&(a&768)===0)return T2(n,e,t,k,a,l,h,T,E);let I=x(n,e|4096,t,a,d,n.tokenIndex,n.tokenLine,n.tokenColumn);return s(n,e,g,m,y,{type:"MethodDefinition",kind:(a&32)===0&&a&64?"constructor":a&256?"get":a&512?"set":"method",static:(a&32)>0,computed:(a&2)>0,key:k,value:I,...e&1?{decorators:l}:null})}function H2(n,e,u,t,o,i,l){b(n,e);let{tokenValue:f}=n;return f==="constructor"&&c(n,128),e&16&&(u||c(n,4,f),t?ou(n,u,f,t):lu(n,u,f)),b(n,e),s(n,e,o,i,l,{type:"PrivateIdentifier",name:f})}function T2(n,e,u,t,o,i,l,f,d){let g=null;if(o&8&&c(n,0),n.getToken()===1077936155){b(n,e|8192);let{tokenIndex:m,tokenLine:y,tokenColumn:a}=n;n.getToken()===537079927&&c(n,119);let k=2883584|((o&64)===0?4325376:0);e=(e|k)^k|(o&8?262144:0)|(o&16?524288:0)|(o&64?4194304:0)|65536|16777216,g=_(n,e|4096,u,2,0,1,0,1,m,y,a),((n.getToken()&1073741824)!==1073741824||(n.getToken()&4194304)===4194304)&&(g=O(n,e|4096,u,g,0,0,m,y,a),g=J(n,e|4096,u,0,0,m,y,a,g))}return K(n,e),s(n,e,l,f,d,{type:o&1024?"AccessorProperty":"PropertyDefinition",key:t,value:g,static:(o&32)>0,computed:(o&2)>0,...e&1?{decorators:i}:null})}function ge(n,e,u,t,o,i,l,f,d){if(n.getToken()&143360||(e&256)===0&&n.getToken()===-2147483527)return An(n,e,u,o,i,l,f,d);(n.getToken()&2097152)!==2097152&&c(n,30,V[n.getToken()&255]);let g=n.getToken()===69271571?Q(n,e,u,t,1,0,1,o,i,l,f,d):Z(n,e,u,t,1,0,1,o,i,l,f,d);return n.destructible&16&&c(n,50),n.destructible&32&&c(n,50),g}function An(n,e,u,t,o,i,l,f){let{tokenValue:d}=n,g=n.getToken();return e&256&&((g&537079808)===537079808?c(n,119):((g&36864)===36864||g===-2147483527)&&c(n,118)),(g&20480)===20480&&c(n,102),g===241771&&(e&262144&&c(n,32),e&512&&c(n,111)),(g&255)===73&&t&24&&c(n,100),g===209006&&(e&524288&&c(n,176),e&512&&c(n,110)),b(n,e),u&&n2(n,e,u,d,t,o),s(n,e,i,l,f,{type:"Identifier",name:d})}function Q2(n,e,u,t,o,i,l){if(t||C(n,e,8456256),n.getToken()===8390721){let m=l1(n,e,o,i,l),[y,a]=c1(n,e,u,t);return s(n,e,o,i,l,{type:"JSXFragment",openingFragment:m,children:y,closingFragment:a})}n.getToken()===8457014&&c(n,30,V[n.getToken()&255]);let f=null,d=[],g=a1(n,e,u,t,o,i,l);if(!g.selfClosing){[d,f]=g1(n,e,u,t);let m=j2(f.name);j2(g.name)!==m&&c(n,155,m)}return s(n,e,o,i,l,{type:"JSXElement",children:d,openingElement:g,closingElement:f})}function l1(n,e,u,t,o){return w2(n,e),s(n,e,u,t,o,{type:"JSXOpeningFragment"})}function f1(n,e,u,t,o,i){C(n,e,8457014);let l=me(n,e,n.tokenIndex,n.tokenLine,n.tokenColumn);return n.getToken()!==8390721&&c(n,25,V[65]),u?w2(n,e):b(n,e),s(n,e,t,o,i,{type:"JSXClosingElement",name:l})}function d1(n,e,u,t,o,i){return C(n,e,8457014),n.getToken()!==8390721&&c(n,25,V[65]),u?w2(n,e):b(n,e),s(n,e,t,o,i,{type:"JSXClosingFragment"})}function g1(n,e,u,t){let o=[];for(;;){let i=m1(n,e,u,t,n.tokenIndex,n.tokenLine,n.tokenColumn);if(i.type==="JSXClosingElement")return[o,i];o.push(i)}}function c1(n,e,u,t){let o=[];for(;;){let i=k1(n,e,u,t,n.tokenIndex,n.tokenLine,n.tokenColumn);if(i.type==="JSXClosingFragment")return[o,i];o.push(i)}}function m1(n,e,u,t,o,i,l){if(n.getToken()===137)return ce(n,e,o,i,l);if(n.getToken()===2162700)return bn(n,e,u,1,0,o,i,l);if(n.getToken()===8456256)return b(n,e),n.getToken()===8457014?f1(n,e,t,o,i,l):Q2(n,e,u,1,o,i,l);c(n,0)}function k1(n,e,u,t,o,i,l){if(n.getToken()===137)return ce(n,e,o,i,l);if(n.getToken()===2162700)return bn(n,e,u,1,0,o,i,l);if(n.getToken()===8456256)return b(n,e),n.getToken()===8457014?d1(n,e,t,o,i,l):Q2(n,e,u,1,o,i,l);c(n,0)}function ce(n,e,u,t,o){b(n,e);let i={type:"JSXText",value:n.tokenValue};return e&128&&(i.raw=n.tokenRaw),s(n,e,u,t,o,i)}function a1(n,e,u,t,o,i,l){(n.getToken()&143360)!==143360&&(n.getToken()&4096)!==4096&&c(n,0);let f=me(n,e,n.tokenIndex,n.tokenLine,n.tokenColumn),d=s1(n,e,u),g=n.getToken()===8457014;return g&&C(n,e,8457014),n.getToken()!==8390721&&c(n,25,V[65]),t||!g?w2(n,e):b(n,e),s(n,e,o,i,l,{type:"JSXOpeningElement",name:f,attributes:d,selfClosing:g})}function me(n,e,u,t,o){r2(n);let i=Z2(n,e,u,t,o);if(n.getToken()===21)return ke(n,e,i,u,t,o);for(;P(n,e,67108877);)r2(n),i=y1(n,e,i,u,t,o);return i}function y1(n,e,u,t,o,i){let l=Z2(n,e,n.tokenIndex,n.tokenLine,n.tokenColumn);return s(n,e,t,o,i,{type:"JSXMemberExpression",object:u,property:l})}function s1(n,e,u){let t=[];for(;n.getToken()!==8457014&&n.getToken()!==8390721&&n.getToken()!==1048576;)t.push(A1(n,e,u,n.tokenIndex,n.tokenLine,n.tokenColumn));return t}function h1(n,e,u,t,o,i){b(n,e),C(n,e,14);let l=M(n,e,u,1,0,n.tokenIndex,n.tokenLine,n.tokenColumn);return C(n,e,1074790415),s(n,e,t,o,i,{type:"JSXSpreadAttribute",argument:l})}function A1(n,e,u,t,o,i){if(n.getToken()===2162700)return h1(n,e,u,t,o,i);r2(n);let l=null,f=Z2(n,e,t,o,i);if(n.getToken()===21&&(f=ke(n,e,f,t,o,i)),n.getToken()===1077936155){let d=nu(n,e),{tokenIndex:g,tokenLine:m,tokenColumn:y}=n;switch(d){case 134283267:l=H(n,e);break;case 8456256:l=Q2(n,e,u,0,g,m,y);break;case 2162700:l=bn(n,e,u,0,1,g,m,y);break;default:c(n,154)}}return s(n,e,t,o,i,{type:"JSXAttribute",value:l,name:f})}function ke(n,e,u,t,o,i){C(n,e,21);let l=Z2(n,e,n.tokenIndex,n.tokenLine,n.tokenColumn);return s(n,e,t,o,i,{type:"JSXNamespacedName",namespace:u,name:l})}function bn(n,e,u,t,o,i,l,f){b(n,e|8192);let{tokenIndex:d,tokenLine:g,tokenColumn:m}=n;if(n.getToken()===14)return b1(n,e,u,i,l,f);let y=null;return n.getToken()===1074790415?(o&&c(n,157),y=D1(n,e,n.startIndex,n.startLine,n.startColumn)):y=M(n,e,u,1,0,d,g,m),n.getToken()!==1074790415&&c(n,25,V[15]),t?w2(n,e):b(n,e),s(n,e,i,l,f,{type:"JSXExpressionContainer",expression:y})}function b1(n,e,u,t,o,i){C(n,e,14);let l=M(n,e,u,1,0,n.tokenIndex,n.tokenLine,n.tokenColumn);return C(n,e,1074790415),s(n,e,t,o,i,{type:"JSXSpreadChild",expression:l})}function D1(n,e,u,t,o){return n.startIndex=n.tokenIndex,n.startLine=n.tokenLine,n.startColumn=n.tokenColumn,s(n,e,u,t,o,{type:"JSXEmptyExpression"})}function Z2(n,e,u,t,o){n.getToken()&143360||c(n,30,V[n.getToken()&255]);let{tokenValue:i}=n;return b(n,e),s(n,e,u,t,o,{type:"JSXIdentifier",name:i})}function ae(n,e){return ku(n,e,0)}function T1(n,e){let u=new SyntaxError(n+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(u,e)}var ye=T1;function C1(n){let e=[];for(let u of n)try{return u()}catch(t){e.push(t)}throw Object.assign(new Error("All combinations failed"),{errors:e})}var se=C1;var E1=(n,e,u)=>{if(!(n&&e==null))return Array.isArray(e)||typeof e=="string"?e[u<0?e.length+u:u]:e.at(u)},Dn=E1;function w1(n){return Array.isArray(n)&&n.length>0}var he=w1;function G(n){var t,o,i;let e=((t=n.range)==null?void 0:t[0])??n.start,u=(i=((o=n.declaration)==null?void 0:o.decorators)??n.decorators)==null?void 0:i[0];return u?Math.min(G(u),e):e}function u2(n){var e;return((e=n.range)==null?void 0:e[1])??n.end}function B1(n){let e=new Set(n);return u=>e.has(u==null?void 0:u.type)}var Ae=B1;var I1=Ae(["Block","CommentBlock","MultiLine"]),q2=I1;function L1(n){let e=`*${n.value}*`.split(` +`);return e.length>1&&e.every(u=>u.trimStart()[0]==="*")}var Tn=L1;function F1(n){return q2(n)&&n.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(n.value)}var be=F1;var S2=null;function P2(n){if(S2!==null&&typeof S2.property){let e=S2;return S2=P2.prototype=null,e}return S2=P2.prototype=n??Object.create(null),new P2}var q1=10;for(let n=0;n<=q1;n++)P2();function Cn(n){return P2(n)}function S1(n,e="type"){Cn(n);function u(t){let o=t[e],i=n[o];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${o}'.`),{node:t});return i}return u}var De=S1;var Te={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","typeParameters","params","predicate","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:["body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],ImportExpression:["source","options"],MetaProperty:["meta","property"],ClassMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","typeParameters","quasi","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["decorators","variance","key","typeAnnotation","value"],ClassAccessorProperty:["decorators","key","typeAnnotation","value"],ClassPrivateProperty:["decorators","variance","key","typeAnnotation","value"],ClassPrivateMethod:["decorators","key","typeParameters","params","returnType","body"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source","attributes"],DeclareExportAllDeclaration:["source","attributes"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","this","params","rest","returnType"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["variance","id","key","value"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["qualification","id"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","typeParameters","typeArguments","attributes"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","nameType","typeAnnotation"],TSTemplateLiteralType:["quasis","types"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumBody:["members"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","options","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],AsConstExpression:["expression"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:["name","typeAnnotation"],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclareEnum:["id","body"],DeclareHook:["id"],DeclareNamespace:["id","body"],EnumBigIntBody:["members"],EnumBigIntMember:["id","init"],HookDeclaration:["id","params","body","typeParameters","returnType"],HookTypeAnnotation:["params","returnType","rest","typeParameters"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],SatisfiesExpression:["expression","typeAnnotation"]};var P1=De(Te),Ce=P1;function En(n,e){if(!(n!==null&&typeof n=="object"))return n;if(Array.isArray(n)){for(let t=0;t{var l;(l=i.leadingComments)!=null&&l.some(be)&&o.add(G(i))}),n=G2(n,i=>{if(i.type==="ParenthesizedExpression"){let{expression:l}=i;if(l.type==="TypeCastExpression")return l.range=[...i.range],l;let f=G(i);if(!o.has(f))return l.extra={...l.extra,parenthesized:!0},l}})}if(n=G2(n,o=>{switch(o.type){case"LogicalExpression":if(Ee(o))return wn(o);break;case"VariableDeclaration":{let i=Dn(!1,o.declarations,-1);i!=null&&i.init&&t[u2(i)]!==";"&&(o.range=[G(o),u2(i)]);break}case"TSParenthesizedType":return o.typeAnnotation;case"TSTypeParameter":if(typeof o.name=="string"){let i=G(o);o.name={type:"Identifier",name:o.name,range:[i,i+o.name.length]}}break;case"TopicReference":n.extra={...n.extra,__isUsingHackPipeline:!0};break;case"TSUnionType":case"TSIntersectionType":if(o.types.length===1)return o.types[0];break}}),he(n.comments)){let o=Dn(!1,n.comments,-1);for(let i=n.comments.length-2;i>=0;i--){let l=n.comments[i];u2(l)===G(o)&&q2(l)&&q2(o)&&Tn(l)&&Tn(o)&&(n.comments.splice(i+1,1),l.value+="*//*"+o.value,l.range=[G(l),u2(o)]),o=l}}return n.type==="Program"&&(n.range=[0,t.length]),n}function Ee(n){return n.type==="LogicalExpression"&&n.right.type==="LogicalExpression"&&n.operator===n.right.operator}function wn(n){return Ee(n)?wn({type:"LogicalExpression",operator:n.operator,left:wn({type:"LogicalExpression",operator:n.operator,left:n.left,right:n.right.left,range:[G(n.left),u2(n.right.left)]}),right:n.right.right,range:[G(n),u2(n)]}):n}var we=v1;var N1=/\*\/$/,V1=/^\/\*\*?/,O1=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,R1=/(^|\s+)\/\/([^\n\r]*)/g,Be=/^(\r?\n)+/,U1=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,Ie=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,M1=/(\r?\n|^) *\* ?/g,J1=[];function Le(n){let e=n.match(O1);return e?e[0].trimStart():""}function Fe(n){let e=` +`;n=i2(!1,n.replace(V1,"").replace(N1,""),M1,"$1");let u="";for(;u!==n;)u=n,n=i2(!1,n,U1,`${e}$1 $2${e}`);n=n.replace(Be,"").trimEnd();let t=Object.create(null),o=i2(!1,n,Ie,"").replace(Be,"").trimEnd(),i;for(;i=Ie.exec(n);){let l=i2(!1,i[2],R1,"");if(typeof t[i[1]]=="string"||Array.isArray(t[i[1]])){let f=t[i[1]];t[i[1]]=[...J1,...Array.isArray(f)?f:[f],l]}else t[i[1]]=l}return{comments:o,pragmas:t}}function j1(n){if(!n.startsWith("#!"))return"";let e=n.indexOf(` +`);return e===-1?n:n.slice(0,e)}var qe=j1;function X1(n){let e=qe(n);e&&(n=n.slice(e.length+1));let u=Le(n),{pragmas:t,comments:o}=Fe(u);return{shebang:e,text:n,pragmas:t,comments:o}}function Se(n){let{pragmas:e}=X1(n);return Object.prototype.hasOwnProperty.call(e,"prettier")||Object.prototype.hasOwnProperty.call(e,"format")}function H1(n){return n=typeof n=="function"?{parse:n}:n,{astFormat:"estree",hasPragma:Se,locStart:G,locEnd:u2,...n}}var Pe=H1;function z1(n){let{filepath:e}=n;if(e){if(e=e.toLowerCase(),e.endsWith(".cjs")||e.endsWith(".cts"))return"script";if(e.endsWith(".mjs")||e.endsWith(".mts"))return"module"}}var ve=z1;var K1={next:!0,ranges:!0,webcompat:!0,loc:!0,raw:!0,directives:!0,globalReturn:!0,impliedStrict:!1,preserveParens:!1,lexical:!1,jsx:!0,uniqueKeyInPattern:!1};function $1(n,e){let u=[],t=[],o=ae(n,{...K1,module:e==="module",onComment:u,onToken:t});return o.comments=u,o.tokens=t,o}function W1(n){let{message:e,loc:u}=n;if(!u)return n;let t=`[${[u.start,u.end].map(({line:o,column:i})=>[o,i].join(":")).join("-")}]: `;return e.startsWith(t)&&(e=e.slice(t.length)),ye(e,{loc:{start:{line:u.start.line,column:u.start.column+1},end:{line:u.end.line,column:u.end.column+1}},cause:n})}function _1(n,e={}){let u=ve(e),t=(u?[u]:["module","script"]).map(i=>()=>$1(n,i)),o;try{o=se(t)}catch({errors:[i]}){throw W1(i)}return we(o,{parser:"meriyah",text:n})}var Y1=Pe(_1);return Ue(Q1);}); \ No newline at end of file diff --git a/node_modules/prettier/plugins/meriyah.mjs b/node_modules/prettier/plugins/meriyah.mjs new file mode 100644 index 0000000..bf1e175 --- /dev/null +++ b/node_modules/prettier/plugins/meriyah.mjs @@ -0,0 +1,4 @@ +var Ne=Object.defineProperty;var In=(n,e)=>{for(var u in e)Ne(n,u,{get:e[u],enumerable:!0})};var Bn={};In(Bn,{parsers:()=>wn});var wn={};In(wn,{meriyah:()=>K1});var Ve=(n,e,u,t)=>{if(!(n&&e==null))return e.replaceAll?e.replaceAll(u,t):u.global?e.replace(u,t):e.split(u).join(t)},i2=Ve;var Oe={0:"Unexpected token",30:"Unexpected token: '%0'",1:"Octal escape sequences are not allowed in strict mode",2:"Octal escape sequences are not allowed in template strings",3:"\\8 and \\9 are not allowed in template strings",4:"Private identifier #%0 is not defined",5:"Illegal Unicode escape sequence",6:"Invalid code point %0",7:"Invalid hexadecimal escape sequence",9:"Octal literals are not allowed in strict mode",8:"Decimal integer literals with a leading zero are forbidden in strict mode",10:"Expected number in radix %0",151:"Invalid left-hand side assignment to a destructible right-hand side",11:"Non-number found after exponent indicator",12:"Invalid BigIntLiteral",13:"No identifiers allowed directly after numeric literal",14:"Escapes \\8 or \\9 are not syntactically valid escapes",15:"Escapes \\8 or \\9 are not allowed in strict mode",16:"Unterminated string literal",17:"Unterminated template literal",18:"Multiline comment was not closed properly",19:"The identifier contained dynamic unicode escape that was not closed",20:"Illegal character '%0'",21:"Missing hexadecimal digits",22:"Invalid implicit octal",23:"Invalid line break in string literal",24:"Only unicode escapes are legal in identifier names",25:"Expected '%0'",26:"Invalid left-hand side in assignment",27:"Invalid left-hand side in async arrow",28:'Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass',29:"Member access on super must be in a method",31:"Await expression not allowed in formal parameter",32:"Yield expression not allowed in formal parameter",95:"Unexpected token: 'escaped keyword'",33:"Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses",123:"Async functions can only be declared at the top level or inside a block",34:"Unterminated regular expression",35:"Unexpected regular expression flag",36:"Duplicate regular expression flag '%0'",37:"%0 functions must have exactly %1 argument%2",38:"Setter function argument must not be a rest parameter",39:"%0 declaration must have a name in this context",40:"Function name may not contain any reserved words or be eval or arguments in strict mode",41:"The rest operator is missing an argument",42:"A getter cannot be a generator",43:"A setter cannot be a generator",44:"A computed property name must be followed by a colon or paren",134:"Object literal keys that are strings or numbers must be a method or have a colon",46:"Found `* async x(){}` but this should be `async * x(){}`",45:"Getters and setters can not be generators",47:"'%0' can not be generator method",48:"No line break is allowed after '=>'",49:"The left-hand side of the arrow can only be destructed through assignment",50:"The binding declaration is not destructible",51:"Async arrow can not be followed by new expression",52:"Classes may not have a static property named 'prototype'",53:"Class constructor may not be a %0",54:"Duplicate constructor method in class",55:"Invalid increment/decrement operand",56:"Invalid use of `new` keyword on an increment/decrement expression",57:"`=>` is an invalid assignment target",58:"Rest element may not have a trailing comma",59:"Missing initializer in %0 declaration",60:"'for-%0' loop head declarations can not have an initializer",61:"Invalid left-hand side in for-%0 loop: Must have a single binding",62:"Invalid shorthand property initializer",63:"Property name __proto__ appears more than once in object literal",64:"Let is disallowed as a lexically bound name",65:"Invalid use of '%0' inside new expression",66:"Illegal 'use strict' directive in function with non-simple parameter list",67:'Identifier "let" disallowed as left-hand side expression in strict mode',68:"Illegal continue statement",69:"Illegal break statement",70:"Cannot have `let[...]` as a var name in strict mode",71:"Invalid destructuring assignment target",72:"Rest parameter may not have a default initializer",73:"The rest argument must the be last parameter",74:"Invalid rest argument",76:"In strict mode code, functions can only be declared at top level or inside a block",77:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement",78:"Without web compatibility enabled functions can not be declared at top level, inside a block, or as the body of an if statement",79:"Class declaration can't appear in single-statement context",80:"Invalid left-hand side in for-%0",81:"Invalid assignment in for-%0",82:"for await (... of ...) is only valid in async functions and async generators",83:"The first token after the template expression should be a continuation of the template",85:"`let` declaration not allowed here and `let` cannot be a regular var name in strict mode",84:"`let \n [` is a restricted production at the start of a statement",86:"Catch clause requires exactly one parameter, not more (and no trailing comma)",87:"Catch clause parameter does not support default values",88:"Missing catch or finally after try",89:"More than one default clause in switch statement",90:"Illegal newline after throw",91:"Strict mode code may not include a with statement",92:"Illegal return statement",93:"The left hand side of the for-header binding declaration is not destructible",94:"new.target only allowed within functions or static blocks",96:"'#' not followed by identifier",102:"Invalid keyword",101:"Can not use 'let' as a class name",100:"'A lexical declaration can't define a 'let' binding",99:"Can not use `let` as variable name in strict mode",97:"'%0' may not be used as an identifier in this context",98:"Await is only valid in async functions",103:"The %0 keyword can only be used with the module goal",104:"Unicode codepoint must not be greater than 0x10FFFF",105:"%0 source must be string",106:"Only a identifier or string can be used to indicate alias",107:"Only '*' or '{...}' can be imported after default",108:"Trailing decorator may be followed by method",109:"Decorators can't be used with a constructor",110:"Can not use `await` as identifier in module or async func",111:"Can not use `await` as identifier in module",112:"HTML comments are only allowed with web compatibility (Annex B)",113:"The identifier 'let' must not be in expression position in strict mode",114:"Cannot assign to `eval` and `arguments` in strict mode",115:"The left-hand side of a for-of loop may not start with 'let'",116:"Block body arrows can not be immediately invoked without a group",117:"Block body arrows can not be immediately accessed without a group",118:"Unexpected strict mode reserved word",119:"Unexpected eval or arguments in strict mode",120:"Decorators must not be followed by a semicolon",121:"Calling delete on expression not allowed in strict mode",122:"Pattern can not have a tail",124:"Can not have a `yield` expression on the left side of a ternary",125:"An arrow function can not have a postfix update operator",126:"Invalid object literal key character after generator star",127:"Private fields can not be deleted",129:"Classes may not have a field called constructor",128:"Classes may not have a private element named constructor",130:"A class field initializer or static block may not contain arguments",131:"Generators can only be declared at the top level or inside a block",132:"Async methods are a restricted production and cannot have a newline following it",133:"Unexpected character after object literal property name",135:"Invalid key token",136:"Label '%0' has already been declared",137:"continue statement must be nested within an iteration statement",138:"Undefined label '%0'",139:"Trailing comma is disallowed inside import(...) arguments",140:"Invalid binding in JSON import",141:"import() requires exactly one argument",142:"Cannot use new with import(...)",143:"... is not allowed in import()",144:"Expected '=>'",145:"Duplicate binding '%0'",146:"Duplicate private identifier #%0",147:"Cannot export a duplicate name '%0'",150:"Duplicate %0 for-binding",148:"Exported binding '%0' needs to refer to a top-level declared variable",149:"Unexpected private field",153:"Numeric separators are not allowed at the end of numeric literals",152:"Only one underscore is allowed as numeric separator",154:"JSX value should be either an expression or a quoted JSX text",155:"Expected corresponding JSX closing tag for %0",156:"Adjacent JSX elements must be wrapped in an enclosing tag",157:"JSX attributes must only be assigned a non-empty 'expression'",158:"'%0' has already been declared",159:"'%0' shadowed a catch clause binding",160:"Dot property must be an identifier",161:"Encountered invalid input after spread/rest argument",162:"Catch without try",163:"Finally without try",164:"Expected corresponding closing tag for JSX fragment",165:"Coalescing and logical operators used together in the same expression must be disambiguated with parentheses",166:"Invalid tagged template on optional chain",167:"Invalid optional chain from super property",168:"Invalid optional chain from new expression",169:'Cannot use "import.meta" outside a module',170:"Leading decorators must be attached to a class declaration",171:"An export name cannot include a lone surrogate, found %0",172:"A string literal cannot be used as an exported binding without `from`",173:"Private fields can't be accessed on super",174:"The only valid meta property for import is 'import.meta'",175:"'import.meta' must not contain escaped characters",176:'cannot use "await" as identifier inside an async function',177:'cannot use "await" in static blocks'},m2=class extends SyntaxError{constructor(e,u,t,o,i,l,f,...d){let g="["+u+":"+t+"-"+i+":"+l+"]: "+Oe[f].replace(/%(\d+)/g,(m,y)=>d[y]);super(`${g}`),this.start=e,this.end=o,this.range=[e,o],this.loc={start:{line:u,column:t},end:{line:i,column:l}},this.description=g}};function c(n,e,...u){throw new m2(n.tokenIndex,n.tokenLine,n.tokenColumn,n.index,n.line,n.column,e,...u)}function z2(n){throw new m2(n.tokenIndex,n.tokenLine,n.tokenColumn,n.index,n.line,n.column,n.type,...n.params)}function $(n,e,u,t,o,i,l,...f){throw new m2(n,e,u,t,o,i,l,...f)}function h2(n,e,u,t,o,i,l){throw new m2(n,e,u,t,o,i,l)}function Re(n){return(On[(n>>>5)+0]>>>n&31&1)!==0}function Vn(n){return(On[(n>>>5)+34816]>>>n&31&1)!==0}var On=((n,e)=>{let u=new Uint32Array(104448),t=0,o=0;for(;t<3822;){let i=n[t++];if(i<0)o-=i;else{let l=n[t++];i&2&&(l=e[l]),i&1?u.fill(l,o,o+=n[t++]):u[o++]=l}}return u})([-1,2,26,2,27,2,5,-1,0,77595648,3,44,2,3,0,14,2,63,2,64,3,0,3,0,3168796671,0,4294956992,2,1,2,0,2,41,3,0,4,0,4294966523,3,0,4,2,16,2,65,2,0,0,4294836735,0,3221225471,0,4294901942,2,66,0,134152192,3,0,2,0,4294951935,3,0,2,0,2683305983,0,2684354047,2,18,2,0,0,4294961151,3,0,2,2,19,2,0,0,608174079,2,0,2,60,2,7,2,6,0,4286611199,3,0,2,2,1,3,0,3,0,4294901711,2,40,0,4089839103,0,2961209759,0,1342439375,0,4294543342,0,3547201023,0,1577204103,0,4194240,0,4294688750,2,2,0,80831,0,4261478351,0,4294549486,2,2,0,2967484831,0,196559,0,3594373100,0,3288319768,0,8469959,2,203,2,3,0,4093640191,0,660618719,0,65487,0,4294828015,0,4092591615,0,1616920031,0,982991,2,3,2,0,0,2163244511,0,4227923919,0,4236247022,2,71,0,4284449919,0,851904,2,4,2,12,0,67076095,-1,2,72,0,1073741743,0,4093607775,-1,0,50331649,0,3265266687,2,33,0,4294844415,0,4278190047,2,20,2,137,-1,3,0,2,2,23,2,0,2,10,2,0,2,15,2,22,3,0,10,2,74,2,0,2,75,2,76,2,77,2,0,2,78,2,0,2,11,0,261632,2,25,3,0,2,2,13,2,4,3,0,18,2,79,2,5,3,0,2,2,80,0,2151677951,2,29,2,9,0,909311,3,0,2,0,814743551,2,49,0,67090432,3,0,2,2,42,2,0,2,6,2,0,2,30,2,8,0,268374015,2,110,2,51,2,0,2,81,0,134153215,-1,2,7,2,0,2,8,0,2684354559,0,67044351,0,3221160064,2,17,-1,3,0,2,2,53,0,1046528,3,0,3,2,9,2,0,2,54,0,4294960127,2,10,2,6,2,11,0,4294377472,2,12,3,0,16,2,13,2,0,2,82,2,10,2,0,2,83,2,84,2,85,2,210,2,55,0,1048577,2,86,2,14,-1,2,14,0,131042,2,87,2,88,2,89,2,0,2,34,-83,3,0,7,0,1046559,2,0,2,15,2,0,0,2147516671,2,21,3,90,2,2,0,-16,2,91,0,524222462,2,4,2,0,0,4269801471,2,4,3,0,2,2,28,2,16,3,0,2,2,17,2,0,-1,2,18,-16,3,0,206,-2,3,0,692,2,73,-1,2,18,2,10,3,0,8,2,93,2,133,2,0,0,3220242431,3,0,3,2,19,2,94,2,95,3,0,2,2,96,2,0,2,97,2,46,2,0,0,4351,2,0,2,9,3,0,2,0,67043391,0,3909091327,2,0,2,24,2,9,2,20,3,0,2,0,67076097,2,8,2,0,2,21,0,67059711,0,4236247039,3,0,2,0,939524103,0,8191999,2,101,2,102,2,22,2,23,3,0,3,0,67057663,3,0,349,2,103,2,104,2,7,-264,3,0,11,2,24,3,0,2,2,32,-1,0,3774349439,2,105,2,106,3,0,2,2,19,2,107,3,0,10,2,10,2,18,2,0,2,47,2,0,2,31,2,108,2,25,0,1638399,2,183,2,109,3,0,3,2,20,2,26,2,27,2,5,2,28,2,0,2,8,2,111,-1,2,112,2,113,2,114,-1,3,0,3,2,12,-2,2,0,2,29,-3,2,163,-4,2,20,2,0,2,36,0,1,2,0,2,67,2,6,2,12,2,10,2,0,2,115,-1,3,0,4,2,10,2,23,2,116,2,7,2,0,2,117,2,0,2,118,2,119,2,120,2,0,2,9,3,0,9,2,21,2,30,2,31,2,121,2,122,-2,2,123,2,124,2,30,2,21,2,8,-2,2,125,2,30,2,32,-2,2,0,2,39,-2,0,4277137519,0,2269118463,-1,3,20,2,-1,2,33,2,38,2,0,3,30,2,2,35,2,19,-3,3,0,2,2,34,-1,2,0,2,35,2,0,2,35,2,0,2,48,2,0,0,4294950463,2,37,-7,2,0,0,203775,2,57,2,167,2,20,2,43,2,36,2,18,2,37,2,18,2,126,2,21,3,0,2,2,38,0,2151677888,2,0,2,12,0,4294901764,2,144,2,0,2,58,2,56,0,5242879,3,0,2,0,402644511,-1,2,128,2,39,0,3,-1,2,129,2,130,2,0,0,67045375,2,40,0,4226678271,0,3766565279,0,2039759,2,132,2,41,0,1046437,0,6,3,0,2,0,3288270847,0,3,3,0,2,0,67043519,-5,2,0,0,4282384383,0,1056964609,-1,3,0,2,0,67043345,-1,2,0,2,42,2,23,2,50,2,11,2,61,2,38,-5,2,0,2,12,-3,3,0,2,0,2147484671,2,134,0,4190109695,2,52,-2,2,135,0,4244635647,0,27,2,0,2,8,2,43,2,0,2,68,2,18,2,0,2,42,-6,2,0,2,45,2,59,2,44,2,45,2,46,2,47,0,8388351,-2,2,136,0,3028287487,2,48,2,138,0,33259519,2,49,-9,2,21,0,4294836223,0,3355443199,0,134152199,-2,2,69,-2,3,0,28,2,32,-3,3,0,3,2,17,3,0,6,2,50,-81,2,18,3,0,2,2,36,3,0,33,2,25,2,30,3,0,124,2,12,3,0,18,2,38,-213,2,0,2,32,-54,3,0,17,2,42,2,8,2,23,2,0,2,8,2,23,2,51,2,0,2,21,2,52,2,139,2,25,-13,2,0,2,53,-6,3,0,2,-4,3,0,2,0,4294936575,2,0,0,4294934783,-2,0,196635,3,0,191,2,54,3,0,38,2,30,2,55,2,34,-278,2,140,3,0,9,2,141,2,142,2,56,3,0,11,2,7,-72,3,0,3,2,143,0,1677656575,-130,2,26,-16,2,0,2,24,2,38,-16,0,4161266656,0,4071,2,205,-4,2,57,-13,3,0,2,2,58,2,0,2,145,2,146,2,62,2,0,2,147,2,148,2,149,3,0,10,2,150,2,151,2,22,3,58,2,3,152,2,3,59,2,0,4294954999,2,0,-16,2,0,2,92,2,0,0,2105343,0,4160749584,2,177,-34,2,8,2,154,-6,0,4194303871,0,4294903771,2,0,2,60,2,100,-3,2,0,0,1073684479,0,17407,-9,2,18,2,17,2,0,2,32,-14,2,18,2,32,-6,2,18,2,12,-15,2,155,3,0,6,0,8323103,-1,3,0,2,2,61,-37,2,62,2,156,2,157,2,158,2,159,2,160,-105,2,26,-32,3,0,1335,-1,3,0,129,2,32,3,0,6,2,10,3,0,180,2,161,3,0,233,2,162,3,0,18,2,10,-77,3,0,16,2,10,-47,3,0,154,2,6,3,0,130,2,25,-22250,3,0,7,2,25,-6130,3,5,2,-1,0,69207040,3,44,2,3,0,14,2,63,2,64,-3,0,3168731136,0,4294956864,2,1,2,0,2,41,3,0,4,0,4294966275,3,0,4,2,16,2,65,2,0,2,34,-1,2,18,2,66,-1,2,0,0,2047,0,4294885376,3,0,2,0,3145727,0,2617294944,0,4294770688,2,25,2,67,3,0,2,0,131135,2,98,0,70256639,0,71303167,0,272,2,42,2,6,0,32511,2,0,2,49,-1,2,99,2,68,0,4278255616,0,4294836227,0,4294549473,0,600178175,0,2952806400,0,268632067,0,4294543328,0,57540095,0,1577058304,0,1835008,0,4294688736,2,70,2,69,0,33554435,2,131,2,70,2,164,0,131075,0,3594373096,0,67094296,2,69,-1,0,4294828e3,0,603979263,0,654311424,0,3,0,4294828001,0,602930687,2,171,0,393219,0,4294828016,0,671088639,0,2154840064,0,4227858435,0,4236247008,2,71,2,38,-1,2,4,0,917503,2,38,-1,2,72,0,537788335,0,4026531935,-1,0,1,-1,2,33,2,73,0,7936,-3,2,0,0,2147485695,0,1010761728,0,4292984930,0,16387,2,0,2,15,2,22,3,0,10,2,74,2,0,2,75,2,76,2,77,2,0,2,78,2,0,2,12,-1,2,25,3,0,2,2,13,2,4,3,0,18,2,79,2,5,3,0,2,2,80,0,2147745791,3,19,2,0,122879,2,0,2,9,0,276824064,-2,3,0,2,2,42,2,0,0,4294903295,2,0,2,30,2,8,-1,2,18,2,51,2,0,2,81,2,49,-1,2,21,2,0,2,29,-2,0,128,-2,2,28,2,9,0,8160,-1,2,127,0,4227907585,2,0,2,37,2,0,2,50,2,184,2,10,2,6,2,11,-1,0,74440192,3,0,6,-2,3,0,8,2,13,2,0,2,82,2,10,2,0,2,83,2,84,2,85,-3,2,86,2,14,-3,2,87,2,88,2,89,2,0,2,34,-83,3,0,7,0,817183,2,0,2,15,2,0,0,33023,2,21,3,90,2,-17,2,91,0,524157950,2,4,2,0,2,92,2,4,2,0,2,22,2,28,2,16,3,0,2,2,17,2,0,-1,2,18,-16,3,0,206,-2,3,0,692,2,73,-1,2,18,2,10,3,0,8,2,93,0,3072,2,0,0,2147516415,2,10,3,0,2,2,25,2,94,2,95,3,0,2,2,96,2,0,2,97,2,46,0,4294965179,0,7,2,0,2,9,2,95,2,9,-1,0,1761345536,2,98,0,4294901823,2,38,2,20,2,99,2,35,2,100,0,2080440287,2,0,2,34,2,153,0,3296722943,2,0,0,1046675455,0,939524101,0,1837055,2,101,2,102,2,22,2,23,3,0,3,0,7,3,0,349,2,103,2,104,2,7,-264,3,0,11,2,24,3,0,2,2,32,-1,0,2700607615,2,105,2,106,3,0,2,2,19,2,107,3,0,10,2,10,2,18,2,0,2,47,2,0,2,31,2,108,-3,2,109,3,0,3,2,20,-1,3,5,2,2,110,2,0,2,8,2,111,-1,2,112,2,113,2,114,-1,3,0,3,2,12,-2,2,0,2,29,-8,2,20,2,0,2,36,-1,2,0,2,67,2,6,2,30,2,10,2,0,2,115,-1,3,0,4,2,10,2,18,2,116,2,7,2,0,2,117,2,0,2,118,2,119,2,120,2,0,2,9,3,0,9,2,21,2,30,2,31,2,121,2,122,-2,2,123,2,124,2,30,2,21,2,8,-2,2,125,2,30,2,32,-2,2,0,2,39,-2,0,4277075969,2,30,-1,3,20,2,-1,2,33,2,126,2,0,3,30,2,2,35,2,19,-3,3,0,2,2,34,-1,2,0,2,35,2,0,2,35,2,0,2,50,2,98,0,4294934591,2,37,-7,2,0,0,197631,2,57,-1,2,20,2,43,2,37,2,18,0,3,2,18,2,126,2,21,2,127,2,54,-1,0,2490368,2,127,2,25,2,18,2,34,2,127,2,38,0,4294901904,0,4718591,2,127,2,35,0,335544350,-1,2,128,0,2147487743,0,1,-1,2,129,2,130,2,8,-1,2,131,2,70,0,3758161920,0,3,2,132,0,12582911,0,655360,-1,2,0,2,29,0,2147485568,0,3,2,0,2,25,0,176,-5,2,0,2,17,2,192,-1,2,0,2,25,2,209,-1,2,0,0,16779263,-2,2,12,-1,2,38,-5,2,0,2,133,-3,3,0,2,2,55,2,134,0,2147549183,0,2,-2,2,135,2,36,0,10,0,4294965249,0,67633151,0,4026597376,2,0,0,536871935,2,18,2,0,2,42,-6,2,0,0,1,2,59,2,17,0,1,2,46,2,25,-3,2,136,2,36,2,137,2,138,0,16778239,-10,2,35,0,4294836212,2,9,-3,2,69,-2,3,0,28,2,32,-3,3,0,3,2,17,3,0,6,2,50,-81,2,18,3,0,2,2,36,3,0,33,2,25,0,126,3,0,124,2,12,3,0,18,2,38,-213,2,10,-55,3,0,17,2,42,2,8,2,18,2,0,2,8,2,18,2,60,2,0,2,25,2,50,2,139,2,25,-13,2,0,2,73,-6,3,0,2,-4,3,0,2,0,67583,-1,2,107,-2,0,11,3,0,191,2,54,3,0,38,2,30,2,55,2,34,-278,2,140,3,0,9,2,141,2,142,2,56,3,0,11,2,7,-72,3,0,3,2,143,2,144,-187,3,0,2,2,58,2,0,2,145,2,146,2,62,2,0,2,147,2,148,2,149,3,0,10,2,150,2,151,2,22,3,58,2,3,152,2,3,59,2,2,153,-57,2,8,2,154,-7,2,18,2,0,2,60,-4,2,0,0,1065361407,0,16384,-9,2,18,2,60,2,0,2,133,-14,2,18,2,133,-6,2,18,0,81919,-15,2,155,3,0,6,2,126,-1,3,0,2,0,2063,-37,2,62,2,156,2,157,2,158,2,159,2,160,-138,3,0,1335,-1,3,0,129,2,32,3,0,6,2,10,3,0,180,2,161,3,0,233,2,162,3,0,18,2,10,-77,3,0,16,2,10,-47,3,0,154,2,6,3,0,130,2,25,-28386,2,0,0,1,-1,2,55,2,0,0,8193,-21,2,201,0,10255,0,4,-11,2,69,2,182,-1,0,71680,-1,2,174,0,4292900864,0,268435519,-5,2,163,-1,2,173,-1,0,6144,-2,2,46,-1,2,168,-1,0,2147532800,2,164,2,170,0,8355840,-2,0,4,-4,2,198,0,205128192,0,1333757536,0,2147483696,0,423953,0,747766272,0,2717763192,0,4286578751,0,278545,2,165,0,4294886464,0,33292336,0,417809,2,165,0,1327482464,0,4278190128,0,700594195,0,1006647527,0,4286497336,0,4160749631,2,166,0,201327104,0,3634348576,0,8323120,2,166,0,202375680,0,2678047264,0,4293984304,2,166,-1,0,983584,0,48,0,58720273,0,3489923072,0,10517376,0,4293066815,0,1,2,213,2,167,2,0,0,2089,0,3221225552,0,201359520,2,0,-2,0,256,0,122880,0,16777216,2,163,0,4160757760,2,0,-6,2,179,-11,0,3263218176,-1,0,49664,0,2160197632,0,8388802,-1,0,12713984,-1,2,168,2,186,2,187,-2,2,175,-20,0,3758096385,-2,2,169,2,195,2,94,2,180,0,4294057984,-2,2,176,2,172,0,4227874816,-2,2,169,-1,2,170,-1,2,181,2,55,0,4026593280,0,14,0,4292919296,-1,2,178,0,939588608,-1,0,805306368,-1,2,55,2,171,2,172,2,173,2,211,2,0,-2,0,8192,-4,0,267386880,-1,0,117440512,0,7168,-1,2,170,2,168,2,174,2,188,-16,2,175,-1,0,1426112704,2,176,-1,2,196,0,271581216,0,2149777408,2,25,2,174,2,55,0,851967,2,189,-1,2,177,2,190,-4,2,178,-20,2,98,2,208,-56,0,3145728,2,191,-10,0,32505856,-1,2,179,-1,0,2147385088,2,94,1,2155905152,2,-3,2,176,2,0,0,67108864,-2,2,180,-6,2,181,2,25,0,1,-1,0,1,-1,2,182,-3,2,126,2,69,-2,2,100,-2,0,32704,2,55,-915,2,183,-1,2,207,-10,2,194,-5,2,185,-6,0,3759456256,2,19,-1,2,184,-1,2,185,-2,0,4227874752,-3,0,2146435072,2,186,-2,0,1006649344,2,55,-1,2,94,0,201375744,-3,0,134217720,2,94,0,4286677377,0,32896,-1,2,178,-3,0,4227907584,-349,0,65520,0,1920,2,167,3,0,264,-11,2,173,-2,2,187,2,0,0,520617856,0,2692743168,0,36,-3,0,524280,-13,2,193,-1,0,4294934272,2,25,2,187,-1,2,215,0,2158720,-3,2,186,0,1,-4,2,55,0,3808625411,0,3489628288,0,4096,0,1207959680,0,3221274624,2,0,-3,2,188,0,120,0,7340032,-2,2,189,2,4,2,25,2,176,3,0,4,2,186,-1,2,190,2,167,-1,0,8176,2,170,2,188,0,1073741824,-1,0,4290773232,2,0,-4,2,176,2,197,0,15728640,2,167,-1,2,174,-1,0,134250480,0,4720640,0,3825467396,-1,2,180,-9,2,94,2,181,0,4294967040,2,137,0,4160880640,3,0,2,0,704,0,1849688064,2,191,-1,2,55,0,4294901887,2,0,0,130547712,0,1879048192,2,212,3,0,2,-1,2,192,2,193,-1,0,17829776,0,2025848832,0,4261477888,-2,2,0,-1,0,4286580608,-1,0,29360128,2,200,0,16252928,0,3791388672,2,130,3,0,2,-2,2,206,2,0,-1,2,107,-1,0,66584576,-1,2,199,-1,0,448,0,4294918080,3,0,6,2,55,-1,0,4294755328,0,4294967267,2,7,-1,2,174,2,187,2,25,2,98,2,25,2,194,2,94,-2,0,245760,2,195,-1,2,163,2,202,0,4227923456,-1,2,196,2,174,2,94,-3,0,4292870145,0,262144,-1,2,95,2,0,0,1073758848,2,197,-1,0,4227921920,2,198,0,68289024,0,528402016,0,4292927536,0,46080,2,191,0,4265609306,0,4294967289,-2,0,268435456,2,95,-2,2,199,3,0,5,-1,2,200,2,176,2,0,-2,0,4227923936,2,67,-1,2,187,2,197,2,99,2,168,2,178,2,204,3,0,5,-1,2,167,3,0,3,-2,0,2146959360,0,9440640,0,104857600,0,4227923840,3,0,2,0,768,2,201,2,28,-2,2,174,-2,2,202,-1,2,169,2,98,3,0,5,-1,0,4227923964,0,512,0,8388608,2,203,2,183,2,193,0,4286578944,3,0,2,0,1152,0,1266679808,2,199,0,576,0,4261707776,2,98,3,0,9,2,169,0,131072,0,939524096,2,188,3,0,2,2,16,-1,0,2147221504,-28,2,187,3,0,3,-3,0,4292902912,-6,2,99,3,0,81,2,25,-2,2,107,-33,2,18,2,181,-124,2,188,-18,2,204,3,0,213,-1,2,187,3,0,54,-17,2,169,2,55,2,205,-1,2,55,2,197,0,4290822144,-2,0,67174336,0,520093700,2,18,3,0,13,-1,2,187,3,0,6,-2,2,188,3,0,3,-2,0,30720,-1,0,32512,3,0,2,0,4294770656,-191,2,185,-38,2,181,2,8,2,206,3,0,278,0,2417033215,-9,0,4294705144,0,4292411391,0,65295,-11,2,167,3,0,72,-3,0,3758159872,0,201391616,3,0,123,-7,2,187,-13,2,180,3,0,2,-1,2,173,2,207,-3,2,99,2,0,-7,2,181,-1,0,384,-1,0,133693440,-3,2,208,-2,2,110,3,0,3,3,180,2,-2,2,94,2,169,3,0,4,-2,2,196,-1,2,163,0,335552923,2,209,-1,0,538974272,0,2214592512,0,132e3,-10,0,192,-8,2,210,-21,0,134213632,2,162,3,0,34,2,55,0,4294965279,3,0,6,0,100663424,0,63524,-1,2,214,2,152,3,0,3,-1,0,3221282816,0,4294917120,3,0,9,2,25,2,211,-1,2,212,3,0,14,2,25,2,187,3,0,6,2,25,2,213,3,0,15,0,2147520640,-6,0,4286578784,2,0,-2,0,1006694400,3,0,24,2,36,-1,0,4292870144,3,0,2,0,1,2,176,3,0,6,2,209,0,4110942569,0,1432950139,0,2701658217,0,4026532864,0,4026532881,2,0,2,47,3,0,8,-1,2,178,-2,2,180,0,98304,0,65537,2,181,-5,2,214,2,0,2,37,2,202,2,167,0,4294770176,2,110,3,0,4,-30,2,192,0,3758153728,-3,0,125829120,-2,2,187,0,4294897664,2,178,-1,2,199,-1,2,174,0,4026580992,2,95,2,0,-10,2,180,0,3758145536,0,31744,-1,0,1610628992,0,4261477376,-4,2,215,-2,2,187,3,0,32,-1335,2,0,-129,2,187,-6,2,176,-180,0,65532,-233,2,177,-18,2,176,3,0,77,-16,2,176,3,0,47,-154,2,170,-130,2,18,3,0,22250,-7,2,18,3,0,6128],[4294967295,4294967291,4092460543,4294828031,4294967294,134217726,4294903807,268435455,2147483647,1048575,1073741823,3892314111,134217727,1061158911,536805376,4294910143,4294901759,32767,4294901760,262143,536870911,8388607,4160749567,4294902783,4294918143,65535,67043328,2281701374,4294967264,2097151,4194303,255,67108863,4294967039,511,524287,131071,63,127,3238002687,4294549487,4290772991,33554431,4294901888,4286578687,67043329,4294705152,4294770687,67043583,1023,15,2047999,67043343,67051519,16777215,2147483648,4294902e3,28,4292870143,4294966783,16383,67047423,4294967279,262083,20511,41943039,493567,4294959104,603979775,65536,602799615,805044223,4294965206,8191,1031749119,4294917631,2134769663,4286578493,4282253311,4294942719,33540095,4294905855,2868854591,1608515583,265232348,534519807,2147614720,1060109444,4093640016,17376,2139062143,224,4169138175,4294909951,4286578688,4294967292,4294965759,535511039,4294966272,4294967280,32768,8289918,4294934399,4294901775,4294965375,1602223615,4294967259,4294443008,268369920,4292804608,4294967232,486341884,4294963199,3087007615,1073692671,4128527,4279238655,4294902015,4160684047,4290246655,469499899,4294967231,134086655,4294966591,2445279231,3670015,31,4294967288,4294705151,3221208447,4294902271,4294549472,4294921215,4095,4285526655,4294966527,4294966143,64,4294966719,3774873592,1877934080,262151,2555904,536807423,67043839,3758096383,3959414372,3755993023,2080374783,4294835295,4294967103,4160749565,4294934527,4087,2016,2147446655,184024726,2862017156,1593309078,268434431,268434414,4294901763,4294901761,536870912,2952790016,202506752,139264,4026531840,402653184,4261412864,63488,1610612736,4227922944,49152,65280,3233808384,3221225472,65534,61440,57152,4293918720,4290772992,25165824,57344,4227915776,4278190080,3758096384,4227858432,4160749568,3758129152,4294836224,4194304,251658240,196608,4294963200,2143289344,2097152,64512,417808,4227923712,12582912,50331648,65528,65472,4294967168,15360,4294966784,65408,4294965248,16,12288,4294934528,2080374784,2013265920,4294950912,524288]);function A(n){return n.column++,n.currentChar=n.source.charCodeAt(++n.index)}function un(n){let e=n.currentChar;if((e&64512)!==55296)return 0;let u=n.source.charCodeAt(n.index+1);return(u&64512)!==56320?0:65536+((e&1023)<<10)+(u&1023)}function tn(n,e){n.currentChar=n.source.charCodeAt(++n.index),n.flags|=1,(e&4)===0&&(n.column=0,n.line++)}function k2(n){n.flags|=1,n.currentChar=n.source.charCodeAt(++n.index),n.column=0,n.line++}function Ue(n){return n===160||n===65279||n===133||n===5760||n>=8192&&n<=8203||n===8239||n===8287||n===12288||n===8201||n===65519}function W(n){return n<65?n-48:n-65+10&15}function Me(n){switch(n){case 134283266:return"NumericLiteral";case 134283267:return"StringLiteral";case 86021:case 86022:return"BooleanLiteral";case 86023:return"NullLiteral";case 65540:return"RegularExpression";case 67174408:case 67174409:case 131:return"TemplateLiteral";default:return(n&143360)===143360?"Identifier":(n&4096)===4096?"Keyword":"Punctuator"}}var N=[0,0,0,0,0,0,0,0,0,0,1032,0,0,2056,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8192,0,3,0,0,8192,0,0,0,256,0,33024,0,0,242,242,114,114,114,114,114,114,594,594,0,0,16384,0,0,0,0,67,67,67,67,67,67,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,1,0,0,4099,0,71,71,71,71,71,71,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,16384,0,0,0,0],Je=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],Rn=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0];function M2(n){return n<=127?Je[n]>0:Vn(n)}function V2(n){return n<=127?Rn[n]>0:Re(n)||n===8204||n===8205}var Un=["SingleLine","MultiLine","HTMLOpen","HTMLClose","HashbangComment"];function je(n){let{source:e}=n;n.currentChar===35&&e.charCodeAt(n.index+1)===33&&(A(n),A(n),on(n,e,0,4,n.tokenIndex,n.tokenLine,n.tokenColumn))}function Ln(n,e,u,t,o,i,l,f){return t&512&&c(n,0),on(n,e,u,o,i,l,f)}function on(n,e,u,t,o,i,l){let{index:f}=n;for(n.tokenIndex=n.index,n.tokenLine=n.line,n.tokenColumn=n.column;n.index=n.source.length)return c(n,34)}let o=n.index-1,i=X.Empty,l=n.currentChar,{index:f}=n;for(;V2(l);){switch(l){case 103:i&X.Global&&c(n,36,"g"),i|=X.Global;break;case 105:i&X.IgnoreCase&&c(n,36,"i"),i|=X.IgnoreCase;break;case 109:i&X.Multiline&&c(n,36,"m"),i|=X.Multiline;break;case 117:i&X.Unicode&&c(n,36,"u"),i&X.UnicodeSets&&c(n,36,"vu"),i|=X.Unicode;break;case 118:i&X.Unicode&&c(n,36,"uv"),i&X.UnicodeSets&&c(n,36,"v"),i|=X.UnicodeSets;break;case 121:i&X.Sticky&&c(n,36,"y"),i|=X.Sticky;break;case 115:i&X.DotAll&&c(n,36,"s"),i|=X.DotAll;break;case 100:i&X.Indices&&c(n,36,"d"),i|=X.Indices;break;default:c(n,35)}l=A(n)}let d=n.source.slice(f,n.index),g=n.source.slice(u,o);return n.tokenRegExp={pattern:g,flags:d},e&128&&(n.tokenRaw=n.source.slice(n.tokenIndex,n.index)),n.tokenValue=ze(n,g,d),65540}function ze(n,e,u){try{return new RegExp(e,u)}catch{try{return new RegExp(e,u),null}catch{c(n,34)}}}function Ke(n,e,u){let{index:t}=n,o="",i=A(n),l=n.index;for(;(N[i]&8)===0;){if(i===u)return o+=n.source.slice(l,n.index),A(n),e&128&&(n.tokenRaw=n.source.slice(t,n.index)),n.tokenValue=o,134283267;if((i&8)===8&&i===92){if(o+=n.source.slice(l,n.index),i=A(n),i<127||i===8232||i===8233){let f=Mn(n,e,i);f>=0?o+=String.fromCodePoint(f):Jn(n,f,0)}else o+=String.fromCodePoint(i);l=n.index+1}n.index>=n.end&&c(n,16),i=A(n)}c(n,16)}function Mn(n,e,u,t=0){switch(u){case 98:return 8;case 102:return 12;case 114:return 13;case 110:return 10;case 116:return 9;case 118:return 11;case 13:if(n.index1114111)return-5;return n.currentChar<1||n.currentChar!==125?-4:i}else{if((N[o]&64)===0)return-4;let i=n.source.charCodeAt(n.index+1);if((N[i]&64)===0)return-4;let l=n.source.charCodeAt(n.index+2);if((N[l]&64)===0)return-4;let f=n.source.charCodeAt(n.index+3);return(N[f]&64)===0?-4:(n.index+=3,n.column+=3,n.currentChar=n.source.charCodeAt(n.index),W(o)<<12|W(i)<<8|W(l)<<4|W(f))}}case 56:case 57:if(t||(e&64)===0||e&256)return-3;n.flags|=4096;default:return u}}function Jn(n,e,u){switch(e){case-1:return;case-2:c(n,u?2:1);case-3:c(n,u?3:14);case-4:c(n,7);case-5:c(n,104)}}function jn(n,e){let{index:u}=n,t=67174409,o="",i=A(n);for(;i!==96;){if(i===36&&n.source.charCodeAt(n.index+1)===123){A(n),t=67174408;break}else if(i===92)if(i=A(n),i>126)o+=String.fromCodePoint(i);else{let{index:l,line:f,column:d}=n,g=Mn(n,e|256,i,1);if(g>=0)o+=String.fromCodePoint(g);else if(g!==-1&&e&16384){n.index=l,n.line=f,n.column=d,o=null,i=$e(n,i),i<0&&(t=67174408);break}else Jn(n,g,1)}else n.index=n.end&&c(n,17),i=A(n)}return A(n),n.tokenValue=o,n.tokenRaw=n.source.slice(u+1,n.index-(t===67174409?1:2)),t}function $e(n,e){for(;e!==96;){switch(e){case 36:{let u=n.index+1;if(u=n.end&&c(n,17),e=A(n)}return e}function We(n,e){return n.index>=n.end&&c(n,0),n.index--,n.column--,jn(n,e)}function Fn(n,e,u){let t=n.currentChar,o=0,i=9,l=u&64?0:1,f=0,d=0;if(u&64)o="."+v2(n,t),t=n.currentChar,t===110&&c(n,12);else{if(t===48)if(t=A(n),(t|32)===120){for(u=136,t=A(n);N[t]&4160;){if(t===95){d||c(n,152),d=0,t=A(n);continue}d=1,o=o*16+W(t),f++,t=A(n)}(f===0||!d)&&c(n,f===0?21:153)}else if((t|32)===111){for(u=132,t=A(n);N[t]&4128;){if(t===95){d||c(n,152),d=0,t=A(n);continue}d=1,o=o*8+(t-48),f++,t=A(n)}(f===0||!d)&&c(n,f===0?0:153)}else if((t|32)===98){for(u=130,t=A(n);N[t]&4224;){if(t===95){d||c(n,152),d=0,t=A(n);continue}d=1,o=o*2+(t-48),f++,t=A(n)}(f===0||!d)&&c(n,f===0?0:153)}else if(N[t]&32)for(e&256&&c(n,1),u=1;N[t]&16;){if(N[t]&512){u=32,l=0;break}o=o*8+(t-48),t=A(n)}else N[t]&512?(e&256&&c(n,1),n.flags|=64,u=32):t===95&&c(n,0);if(u&48){if(l){for(;i>=0&&N[t]&4112;){if(t===95){t=A(n),(t===95||u&32)&&h2(n.index,n.line,n.column,n.index+1,n.line,n.column,152),d=1;continue}d=0,o=10*o+(t-48),t=A(n),--i}if(d&&h2(n.index,n.line,n.column,n.index+1,n.line,n.column,153),i>=0&&!M2(t)&&t!==46)return n.tokenValue=o,e&128&&(n.tokenRaw=n.source.slice(n.tokenIndex,n.index)),134283266}o+=v2(n,t),t=n.currentChar,t===46&&(A(n)===95&&c(n,0),u=64,o+="."+v2(n,n.currentChar),t=n.currentChar)}}let g=n.index,m=0;if(t===110&&u&128)m=1,t=A(n);else if((t|32)===101){t=A(n),N[t]&256&&(t=A(n));let{index:y}=n;(N[t]&16)===0&&c(n,11),o+=n.source.substring(g,y)+v2(n,t),t=n.currentChar}return(n.index","(","{",".","...","}",")",";",",","[","]",":","?","'",'"',"++","--","=","<<=",">>=",">>>=","**=","+=","-=","*=","/=","%=","^=","|=","&=","||=","&&=","??=","typeof","delete","void","!","~","+","-","in","instanceof","*","%","/","**","&&","||","===","!==","==","!=","<=",">=","<",">","<<",">>",">>>","&","|","^","var","let","const","break","case","catch","class","continue","debugger","default","do","else","export","extends","finally","for","function","if","import","new","return","super","switch","this","throw","try","while","with","implements","interface","package","private","protected","public","static","yield","as","async","await","constructor","get","set","accessor","from","of","enum","eval","arguments","escaped keyword","escaped future reserved keyword","reserved if strict","#","BigIntLiteral","??","?.","WhiteSpace","Illegal","LineTerminator","PrivateField","Template","@","target","meta","LineFeed","Escaped","JSXText"],Xn=Object.create(null,{this:{value:86111},function:{value:86104},if:{value:20569},return:{value:20572},var:{value:86088},else:{value:20563},for:{value:20567},new:{value:86107},in:{value:8673330},typeof:{value:16863275},while:{value:20578},case:{value:20556},break:{value:20555},try:{value:20577},catch:{value:20557},delete:{value:16863276},throw:{value:86112},switch:{value:86110},continue:{value:20559},default:{value:20561},instanceof:{value:8411187},do:{value:20562},void:{value:16863277},finally:{value:20566},async:{value:209005},await:{value:209006},class:{value:86094},const:{value:86090},constructor:{value:12399},debugger:{value:20560},export:{value:20564},extends:{value:20565},false:{value:86021},from:{value:12403},get:{value:12400},implements:{value:36964},import:{value:86106},interface:{value:36965},let:{value:241737},null:{value:86023},of:{value:274548},package:{value:36966},private:{value:36967},protected:{value:36968},public:{value:36969},set:{value:12401},static:{value:36970},super:{value:86109},true:{value:86022},with:{value:20579},yield:{value:241771},enum:{value:86133},eval:{value:537079926},as:{value:77932},arguments:{value:537079927},target:{value:209029},meta:{value:209030},accessor:{value:12402}});function qn(n,e,u){for(;Rn[A(n)];);return n.tokenValue=n.source.slice(n.tokenIndex,n.index),n.currentChar!==92&&n.currentChar<=126?Xn[n.tokenValue]||208897:ln(n,e,0,u)}function _e(n,e){let u=Hn(n);return M2(u)||c(n,5),n.tokenValue=String.fromCodePoint(u),ln(n,e,1,N[u]&4)}function ln(n,e,u,t){let o=n.index;for(;n.index0)V2(l)||c(n,20,String.fromCodePoint(l)),n.currentChar=l,n.index++,n.column++;else if(!V2(n.currentChar))break;A(n)}n.index<=n.end&&(n.tokenValue+=n.source.slice(o,n.index));let{length:i}=n.tokenValue;if(t&&i>=2&&i<=11){let l=Xn[n.tokenValue];return l===void 0?208897|(u?-2147483648:0):u?l===209006?(e&524800)===0?l|-2147483648:-2147483528:e&256?l===36970||(l&36864)===36864?-2147483527:(l&20480)===20480?e&67108864&&(e&2048)===0?l|-2147483648:-2147483528:-2147274630:e&67108864&&(e&2048)===0&&(l&20480)===20480?l|-2147483648:l===241771?e&67108864?-2147274630:e&262144?-2147483528:l|-2147483648:l===209005?-2147274630:(l&36864)===36864?l|12288|-2147483648:-2147483528:l}return 208897|(u?-2147483648:0)}function Ye(n){let e=A(n);if(e===92)return 130;let u=un(n);return u&&(e=u),M2(e)||c(n,96),130}function Hn(n){return n.source.charCodeAt(n.index+1)!==117&&c(n,5),n.currentChar=n.source.charCodeAt(n.index+=2),Qe(n)}function Qe(n){let e=0,u=n.currentChar;if(u===123){let l=n.index-2;for(;N[A(n)]&64;)e=e<<4|W(n.currentChar),e>1114111&&h2(l,n.line,n.column,n.index,n.line,n.column,104);return n.currentChar!==125&&h2(l,n.line,n.column,n.index,n.line,n.column,7),A(n),e}(N[u]&64)===0&&c(n,7);let t=n.source.charCodeAt(n.index+1);(N[t]&64)===0&&c(n,7);let o=n.source.charCodeAt(n.index+2);(N[o]&64)===0&&c(n,7);let i=n.source.charCodeAt(n.index+3);return(N[i]&64)===0&&c(n,7),e=W(u)<<12|W(t)<<8|W(o)<<4|W(i),n.currentChar=n.source.charCodeAt(n.index+=4),e}var Ze=[128,128,128,128,128,128,128,128,128,127,135,127,127,129,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,127,16842798,134283267,130,208897,8391477,8390213,134283267,67174411,16,8391476,25233968,18,25233969,67108877,8457014,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,21,1074790417,8456256,1077936155,8390721,22,132,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,69271571,136,20,8389959,208897,131,4096,4096,4096,4096,4096,4096,4096,208897,4096,208897,208897,4096,208897,4096,208897,4096,208897,4096,4096,4096,208897,4096,4096,208897,4096,4096,2162700,8389702,1074790415,16842799,128];function b(n,e){n.flags=(n.flags|1)^1,n.startIndex=n.index,n.startColumn=n.column,n.startLine=n.line,n.setToken(zn(n,e,0))}function zn(n,e,u){let t=n.index===0,{source:o}=n,i=n.index,l=n.line,f=n.column;for(;n.index=n.end)return 8391476;let m=n.currentChar;return m===61?(A(n),4194338):m!==42?8391476:A(n)!==61?8391735:(A(n),4194335)}case 8389959:return A(n)!==61?8389959:(A(n),4194341);case 25233968:{A(n);let m=n.currentChar;return m===43?(A(n),33619993):m===61?(A(n),4194336):25233968}case 25233969:{A(n);let m=n.currentChar;if(m===45){if(A(n),(u&1||t)&&n.currentChar===62){(e&64)===0&&c(n,112),A(n),u=Ln(n,o,u,e,3,i,l,f),i=n.tokenIndex,l=n.tokenLine,f=n.tokenColumn;continue}return 33619994}return m===61?(A(n),4194337):25233969}case 8457014:{if(A(n),n.index=48&&m<=57)return Fn(n,e,80);if(m===46){let y=n.index+1;if(y=48&&m<=57)))return A(n),67108990}return 22}}}else{if((d^8232)<=1){u=u&-5|1,k2(n);continue}let g=un(n);if(g>0&&(d=g),Vn(d))return n.tokenValue="",ln(n,e,0,0);if(Ue(d)){A(n);continue}c(n,20,String.fromCodePoint(d))}}return 1048576}function Ge(n,e){return n.startIndex=n.tokenIndex=n.index,n.startColumn=n.tokenColumn=n.column,n.startLine=n.tokenLine=n.line,n.setToken(N[n.currentChar]&8192?xe(n,e):zn(n,e,0)),n.getToken()}function xe(n,e){let u=n.currentChar,t=A(n),o=n.index;for(;t!==u;)n.index>=n.end&&c(n,16),t=A(n);return t!==u&&c(n,16),n.tokenValue=n.source.slice(o,n.index),A(n),e&128&&(n.tokenRaw=n.source.slice(n.tokenIndex,n.index)),134283267}function w2(n,e){if(n.startIndex=n.tokenIndex=n.index,n.startColumn=n.tokenColumn=n.column,n.startLine=n.tokenLine=n.line,n.index>=n.end){n.setToken(1048576);return}if(n.currentChar===60){A(n),n.setToken(8456256);return}if(n.currentChar===123){A(n),n.setToken(2162700);return}let u=0;for(;n.index1&&i&32&&n.getToken()&262144&&c(n,61,V[n.getToken()&255]),f}function Pn(n,e,u,t,o,i){let{tokenIndex:l,tokenLine:f,tokenColumn:d}=n,g=n.getToken(),m=null,y=ge(n,e,u,t,o,i,l,f,d);return n.getToken()===1077936155?(b(n,e|8192),m=M(n,e,t,1,0,n.tokenIndex,n.tokenLine,n.tokenColumn),(i&32||(g&2097152)===0)&&(n.getToken()===274548||n.getToken()===8673330&&(g&2097152||(o&4)===0||e&256))&&$(l,f,d,n.index,n.line,n.column,60,n.getToken()===274548?"of":"in")):(o&16||(g&2097152)>0)&&(n.getToken()&262144)!==262144&&c(n,59,o&16?"const":"destructuring"),s(n,e,l,f,d,{type:"VariableDeclarator",id:y,init:m})}function qu(n,e,u,t,o,i,l,f){b(n,e);let d=((e&524288)>0||(e&512)>0&&(e&2048)>0)&&P(n,e,209006);C(n,e|8192,67174411),u&&(u=j(u,1));let g=null,m=null,y=0,a=null,k=n.getToken()===86088||n.getToken()===241737||n.getToken()===86090,h,{tokenIndex:T,tokenLine:E,tokenColumn:w}=n,I=n.getToken();if(k?I===241737?(a=R(n,e),n.getToken()&2240512?(n.getToken()===8673330?e&256&&c(n,67):a=s(n,e,T,E,w,{type:"VariableDeclaration",kind:"let",declarations:s2(n,e|33554432,u,t,8,32)}),n.assignable=1):e&256?c(n,67):(k=!1,n.assignable=1,a=O(n,e,t,a,0,0,T,E,w),n.getToken()===274548&&c(n,115))):(b(n,e),a=s(n,e,T,E,w,I===86088?{type:"VariableDeclaration",kind:"var",declarations:s2(n,e|33554432,u,t,4,32)}:{type:"VariableDeclaration",kind:"const",declarations:s2(n,e|33554432,u,t,16,32)}),n.assignable=1):I===1074790417?d&&c(n,82):(I&2097152)===2097152?(a=I===2162700?Z(n,e,void 0,t,1,0,0,2,32,T,E,w):Q(n,e,void 0,t,1,0,0,2,32,T,E,w),y=n.destructible,y&64&&c(n,63),n.assignable=y&16?2:1,a=O(n,e|33554432,t,a,0,0,n.tokenIndex,n.tokenLine,n.tokenColumn)):a=Y(n,e|33554432,t,1,0,1,T,E,w),(n.getToken()&262144)===262144){if(n.getToken()===274548){n.assignable&2&&c(n,80,d?"await":"of"),r(n,a),b(n,e|8192),h=M(n,e,t,1,0,n.tokenIndex,n.tokenLine,n.tokenColumn),C(n,e|8192,16);let F=C2(n,e,u,t,o);return s(n,e,i,l,f,{type:"ForOfStatement",left:a,right:h,body:F,await:d})}n.assignable&2&&c(n,80,"in"),r(n,a),b(n,e|8192),d&&c(n,82),h=z(n,e,t,0,1,n.tokenIndex,n.tokenLine,n.tokenColumn),C(n,e|8192,16);let q=C2(n,e,u,t,o);return s(n,e,i,l,f,{type:"ForInStatement",body:q,left:a,right:h})}d&&c(n,82),k||(y&8&&n.getToken()!==1077936155&&c(n,80,"loop"),a=J(n,e|33554432,t,0,0,T,E,w,a)),n.getToken()===18&&(a=e2(n,e,t,0,n.tokenIndex,n.tokenLine,n.tokenColumn,a)),C(n,e|8192,1074790417),n.getToken()!==1074790417&&(g=z(n,e,t,0,1,n.tokenIndex,n.tokenLine,n.tokenColumn)),C(n,e|8192,1074790417),n.getToken()!==16&&(m=z(n,e,t,0,1,n.tokenIndex,n.tokenLine,n.tokenColumn)),C(n,e|8192,16);let v=C2(n,e,u,t,o);return s(n,e,i,l,f,{type:"ForStatement",init:a,test:g,update:m,body:v})}function xn(n,e,u){return B2(e,n.getToken())||c(n,118),(n.getToken()&537079808)===537079808&&c(n,119),u&&d2(n,e,u,n.tokenValue,8,0),R(n,e)}function Su(n,e,u){let t=n.tokenIndex,o=n.tokenLine,i=n.tokenColumn;b(n,e);let l=null,{tokenIndex:f,tokenLine:d,tokenColumn:g}=n,m=[];if(n.getToken()===134283267)l=H(n,e);else{if(n.getToken()&143360){let a=xn(n,e,u);if(m=[s(n,e,f,d,g,{type:"ImportDefaultSpecifier",local:a})],P(n,e,18))switch(n.getToken()){case 8391476:m.push(vn(n,e,u));break;case 2162700:Nn(n,e,u,m);break;default:c(n,107)}}else switch(n.getToken()){case 8391476:m=[vn(n,e,u)];break;case 2162700:Nn(n,e,u,m);break;case 67174411:return pn(n,e,void 0,t,o,i);case 67108877:return rn(n,e,t,o,i);default:c(n,30,V[n.getToken()&255])}l=Pu(n,e)}let y={type:"ImportDeclaration",specifiers:m,source:l};return e&1&&(y.attributes=nn(n,e,m)),K(n,e|8192),s(n,e,t,o,i,y)}function vn(n,e,u){let{tokenIndex:t,tokenLine:o,tokenColumn:i}=n;return b(n,e),C(n,e,77932),(n.getToken()&134217728)===134217728&&$(t,o,i,n.index,n.line,n.column,30,V[n.getToken()&255]),s(n,e,t,o,i,{type:"ImportNamespaceSpecifier",local:xn(n,e,u)})}function Pu(n,e){return C(n,e,12403),n.getToken()!==134283267&&c(n,105,"Import"),H(n,e)}function Nn(n,e,u,t){for(b(n,e);n.getToken()&143360||n.getToken()===134283267;){let{tokenValue:o,tokenIndex:i,tokenLine:l,tokenColumn:f}=n,d=n.getToken(),g=O2(n,e),m;P(n,e,77932)?((n.getToken()&134217728)===134217728||n.getToken()===18?c(n,106):J2(n,e,16,n.getToken(),0),o=n.tokenValue,m=R(n,e)):g.type==="Identifier"?(J2(n,e,16,d,0),m=g):c(n,25,V[108]),u&&d2(n,e,u,o,8,0),t.push(s(n,e,i,l,f,{type:"ImportSpecifier",local:m,imported:g})),n.getToken()!==1074790415&&C(n,e,18)}return C(n,e,1074790415),t}function rn(n,e,u,t,o){let i=ne(n,e,s(n,e,u,t,o,{type:"Identifier",name:"import"}),u,t,o);return i=O(n,e,void 0,i,0,0,u,t,o),i=J(n,e,void 0,0,0,u,t,o,i),n.getToken()===18&&(i=e2(n,e,void 0,0,u,t,o,i)),A2(n,e,i,u,t,o)}function pn(n,e,u,t,o,i){let l=ee(n,e,u,0,t,o,i);return l=O(n,e,u,l,0,0,t,o,i),n.getToken()===18&&(l=e2(n,e,u,0,t,o,i,l)),A2(n,e,l,t,o,i)}function vu(n,e,u){let t=n.tokenIndex,o=n.tokenLine,i=n.tokenColumn;b(n,e|8192);let l=[],f=null,d=null,g=null;if(P(n,e|8192,20561)){switch(n.getToken()){case 86104:{f=f2(n,e,u,void 0,4,1,1,0,n.tokenIndex,n.tokenLine,n.tokenColumn);break}case 132:case 86094:f=en(n,e,u,void 0,1,n.tokenIndex,n.tokenLine,n.tokenColumn);break;case 209005:{let{tokenIndex:y,tokenLine:a,tokenColumn:k}=n;f=R(n,e);let{flags:h}=n;(h&1)===0&&(n.getToken()===86104?f=f2(n,e,u,void 0,4,1,1,1,y,a,k):n.getToken()===67174411?(f=sn(n,e,void 0,f,1,1,0,h,y,a,k),f=O(n,e,void 0,f,0,0,y,a,k),f=J(n,e,void 0,0,0,y,a,k,f)):n.getToken()&143360&&(u&&(u=K2(n,e,n.tokenValue)),f=R(n,e),f=F2(n,e,u,void 0,[f],1,y,a,k)));break}default:f=M(n,e,void 0,1,0,n.tokenIndex,n.tokenLine,n.tokenColumn),K(n,e|8192)}return u&&g2(n,"default"),s(n,e,t,o,i,{type:"ExportDefaultDeclaration",declaration:f})}switch(n.getToken()){case 8391476:{b(n,e);let y=null;P(n,e,77932)&&(u&&g2(n,n.tokenValue),y=O2(n,e)),C(n,e,12403),n.getToken()!==134283267&&c(n,105,"Export"),d=H(n,e);let k={type:"ExportAllDeclaration",source:d,exported:y};return e&1&&(k.attributes=nn(n,e)),K(n,e|8192),s(n,e,t,o,i,k)}case 2162700:{b(n,e);let y=[],a=[],k=0;for(;n.getToken()&143360||n.getToken()===134283267;){let{tokenIndex:h,tokenValue:T,tokenLine:E,tokenColumn:w}=n,I=O2(n,e);I.type==="Literal"&&(k=1);let v;n.getToken()===77932?(b(n,e),(n.getToken()&143360)===0&&n.getToken()!==134283267&&c(n,106),u&&(y.push(n.tokenValue),a.push(T)),v=O2(n,e)):(u&&(y.push(n.tokenValue),a.push(n.tokenValue)),v=I),l.push(s(n,e,h,E,w,{type:"ExportSpecifier",local:I,exported:v})),n.getToken()!==1074790415&&C(n,e,18)}C(n,e,1074790415),P(n,e,12403)?(n.getToken()!==134283267&&c(n,105,"Export"),d=H(n,e),e&1&&(g=nn(n,e,l)),u&&y.forEach(h=>g2(n,h))):(k&&c(n,172),u&&(y.forEach(h=>g2(n,h)),a.forEach(h=>iu(n,h)))),K(n,e|8192);break}case 86094:f=en(n,e,u,void 0,2,n.tokenIndex,n.tokenLine,n.tokenColumn);break;case 86104:f=f2(n,e,u,void 0,4,1,2,0,n.tokenIndex,n.tokenLine,n.tokenColumn);break;case 241737:f=p2(n,e,u,void 0,8,64,n.tokenIndex,n.tokenLine,n.tokenColumn);break;case 86090:f=p2(n,e,u,void 0,16,64,n.tokenIndex,n.tokenLine,n.tokenColumn);break;case 86088:f=Gn(n,e,u,void 0,64,n.tokenIndex,n.tokenLine,n.tokenColumn);break;case 209005:{let{tokenIndex:y,tokenLine:a,tokenColumn:k}=n;if(b(n,e),(n.flags&1)===0&&n.getToken()===86104){f=f2(n,e,u,void 0,4,1,2,1,y,a,k);break}}default:c(n,30,V[n.getToken()&255])}let m={type:"ExportNamedDeclaration",declaration:f,specifiers:l,source:d};return g&&(m.attributes=g),s(n,e,t,o,i,m)}function M(n,e,u,t,o,i,l,f){let d=_(n,e,u,2,0,t,o,1,i,l,f);return d=O(n,e,u,d,o,0,i,l,f),J(n,e,u,o,0,i,l,f,d)}function e2(n,e,u,t,o,i,l,f){let d=[f];for(;P(n,e|8192,18);)d.push(M(n,e,u,1,t,n.tokenIndex,n.tokenLine,n.tokenColumn));return s(n,e,o,i,l,{type:"SequenceExpression",expressions:d})}function z(n,e,u,t,o,i,l,f){let d=M(n,e,u,o,t,i,l,f);return n.getToken()===18?e2(n,e,u,t,i,l,f,d):d}function J(n,e,u,t,o,i,l,f,d){let g=n.getToken();if((g&4194304)===4194304){n.assignable&2&&c(n,26),(!o&&g===1077936155&&d.type==="ArrayExpression"||d.type==="ObjectExpression")&&r(n,d),b(n,e|8192);let m=M(n,e,u,1,t,n.tokenIndex,n.tokenLine,n.tokenColumn);return n.assignable=2,s(n,e,i,l,f,o?{type:"AssignmentPattern",left:d,right:m}:{type:"AssignmentExpression",left:d,operator:V[g&255],right:m})}return(g&8388608)===8388608&&(d=l2(n,e,u,t,i,l,f,4,g,d)),P(n,e|8192,22)&&(d=c2(n,e,u,d,i,l,f)),d}function N2(n,e,u,t,o,i,l,f,d){let g=n.getToken();b(n,e|8192);let m=M(n,e,u,1,t,n.tokenIndex,n.tokenLine,n.tokenColumn);return d=s(n,e,i,l,f,o?{type:"AssignmentPattern",left:d,right:m}:{type:"AssignmentExpression",left:d,operator:V[g&255],right:m}),n.assignable=2,d}function c2(n,e,u,t,o,i,l){let f=M(n,(e|33554432)^33554432,u,1,0,n.tokenIndex,n.tokenLine,n.tokenColumn);C(n,e|8192,21),n.assignable=1;let d=M(n,e,u,1,0,n.tokenIndex,n.tokenLine,n.tokenColumn);return n.assignable=2,s(n,e,o,i,l,{type:"ConditionalExpression",test:t,consequent:f,alternate:d})}function l2(n,e,u,t,o,i,l,f,d,g){let m=-((e&33554432)>0)&8673330,y,a;for(n.assignable=2;n.getToken()&8388608&&(y=n.getToken(),a=y&3840,(y&524288&&d&268435456||d&524288&&y&268435456)&&c(n,165),!(a+((y===8391735)<<8)-((m===y)<<12)<=f));)b(n,e|8192),g=s(n,e,o,i,l,{type:y&524288||y&268435456?"LogicalExpression":"BinaryExpression",left:g,right:l2(n,e,u,t,n.tokenIndex,n.tokenLine,n.tokenColumn,a,y,Y(n,e,u,0,t,1,n.tokenIndex,n.tokenLine,n.tokenColumn)),operator:V[y&255]});return n.getToken()===1077936155&&c(n,26),g}function Nu(n,e,u,t,o,i,l,f){t||c(n,0);let d=n.getToken();b(n,e|8192);let g=Y(n,e,u,0,f,1,n.tokenIndex,n.tokenLine,n.tokenColumn);return n.getToken()===8391735&&c(n,33),e&256&&d===16863276&&(g.type==="Identifier"?c(n,121):re(g)&&c(n,127)),n.assignable=2,s(n,e,o,i,l,{type:"UnaryExpression",operator:V[d&255],argument:g,prefix:!0})}function Vu(n,e,u,t,o,i,l,f,d,g){let m=n.getToken(),y=R(n,e),{flags:a}=n;if((a&1)===0){if(n.getToken()===86104)return te(n,e,u,1,t,f,d,g);if(B2(e,n.getToken()))return o||c(n,0),(n.getToken()&36864)===36864&&(n.flags|=256),le(n,e,u,i,f,d,g)}return!l&&n.getToken()===67174411?sn(n,e,u,y,i,1,0,a,f,d,g):n.getToken()===10?($2(n,e,m),l&&c(n,51),(m&36864)===36864&&(n.flags|=256),_2(n,e,u,n.tokenValue,y,l,i,0,f,d,g)):(n.assignable=1,y)}function Ou(n,e,u,t,o,i,l,f){if(t&&(n.destructible|=256),e&262144){b(n,e|8192),e&2097152&&c(n,32),o||c(n,26),n.getToken()===22&&c(n,124);let d=null,g=!1;return(n.flags&1)===0?(g=P(n,e|8192,8391476),(n.getToken()&77824||g)&&(d=M(n,e,u,1,0,n.tokenIndex,n.tokenLine,n.tokenColumn))):n.getToken()===8391476&&c(n,30,V[n.getToken()&255]),n.assignable=2,s(n,e,i,l,f,{type:"YieldExpression",argument:d,delegate:g})}return e&256&&c(n,97,"yield"),yn(n,e,u,i,l,f)}function Ru(n,e,u,t,o,i,l,f){o&&(n.destructible|=128),e&268435456&&c(n,177);let d=yn(n,e,u,i,l,f);if(d.type==="ArrowFunctionExpression"||(n.getToken()&65536)===0)return e&524288&&$(i,l,f,n.startIndex,n.startLine,n.startColumn,176),e&512&&$(i,l,f,n.startIndex,n.startLine,n.startColumn,110),e&2097152&&e&524288&&$(i,l,f,n.startIndex,n.startLine,n.startColumn,110),d;if(e&2097152&&$(i,l,f,n.startIndex,n.startLine,n.startColumn,31),e&524288||e&512&&e&2048){t&&$(i,l,f,n.startIndex,n.startLine,n.startColumn,0);let m=Y(n,e,u,0,0,1,n.tokenIndex,n.tokenLine,n.tokenColumn);return n.getToken()===8391735&&c(n,33),n.assignable=2,s(n,e,i,l,f,{type:"AwaitExpression",argument:m})}return e&512&&$(i,l,f,n.startIndex,n.startLine,n.startColumn,98),d}function W2(n,e,u,t,o,i,l){let{tokenIndex:f,tokenLine:d,tokenColumn:g}=n;C(n,e|8192,2162700);let m=[];if(n.getToken()!==1074790415){for(;n.getToken()===134283267;){let{index:y,tokenIndex:a,tokenValue:k}=n,h=n.getToken(),T=H(n,e);Kn(n,y,a,k)&&(e|=256,n.flags&128&&$(a,d,g,n.index,n.line,n.column,66),n.flags&64&&$(a,d,g,n.index,n.line,n.column,9),n.flags&4096&&$(a,d,g,n.index,n.line,n.column,15),l&&z2(l)),m.push(gn(n,e,T,h,a,n.tokenLine,n.tokenColumn))}e&256&&(i&&((i&537079808)===537079808&&c(n,119),(i&36864)===36864&&c(n,40)),n.flags&512&&c(n,119),n.flags&256&&c(n,118))}for(n.flags=(n.flags|512|256|64|4096)^4928,n.destructible=(n.destructible|256)^256;n.getToken()!==1074790415;)m.push(I2(n,e,u,t,4,{}));return C(n,o&24?e|8192:e,1074790415),n.flags&=-4289,n.getToken()===1077936155&&c(n,26),s(n,e,f,d,g,{type:"BlockStatement",body:m})}function Uu(n,e,u,t,o){switch(b(n,e),n.getToken()){case 67108990:c(n,167);case 67174411:{(e&131072)===0&&c(n,28),n.assignable=2;break}case 69271571:case 67108877:{(e&65536)===0&&c(n,29),n.assignable=1;break}default:c(n,30,"super")}return s(n,e,u,t,o,{type:"Super"})}function Y(n,e,u,t,o,i,l,f,d){let g=_(n,e,u,2,0,t,o,i,l,f,d);return O(n,e,u,g,o,0,l,f,d)}function Mu(n,e,u,t,o,i){n.assignable&2&&c(n,55);let l=n.getToken();return b(n,e),n.assignable=2,s(n,e,t,o,i,{type:"UpdateExpression",argument:u,operator:V[l&255],prefix:!1})}function O(n,e,u,t,o,i,l,f,d){if((n.getToken()&33619968)===33619968&&(n.flags&1)===0)t=Mu(n,e,t,l,f,d);else if((n.getToken()&67108864)===67108864){switch(e=(e|33554432)^33554432,n.getToken()){case 67108877:{b(n,(e|67108864|2048)^2048),e&4096&&n.getToken()===130&&n.tokenValue==="super"&&c(n,173),n.assignable=1;let g=cn(n,e|16384,u);t=s(n,e,l,f,d,{type:"MemberExpression",object:t,computed:!1,property:g});break}case 69271571:{let g=!1;(n.flags&2048)===2048&&(g=!0,n.flags=(n.flags|2048)^2048),b(n,e|8192);let{tokenIndex:m,tokenLine:y,tokenColumn:a}=n,k=z(n,e,u,o,1,m,y,a);C(n,e,20),n.assignable=1,t=s(n,e,l,f,d,{type:"MemberExpression",object:t,computed:!0,property:k}),g&&(n.flags|=2048);break}case 67174411:{if((n.flags&1024)===1024)return n.flags=(n.flags|1024)^1024,t;let g=!1;(n.flags&2048)===2048&&(g=!0,n.flags=(n.flags|2048)^2048);let m=an(n,e,u,o);n.assignable=2,t=s(n,e,l,f,d,{type:"CallExpression",callee:t,arguments:m}),g&&(n.flags|=2048);break}case 67108990:{b(n,(e|67108864|2048)^2048),n.flags|=2048,n.assignable=2,t=Ju(n,e,u,t,l,f,d);break}default:(n.flags&2048)===2048&&c(n,166),n.assignable=2,t=s(n,e,l,f,d,{type:"TaggedTemplateExpression",tag:t,quasi:n.getToken()===67174408?kn(n,e|16384,u):mn(n,e,n.tokenIndex,n.tokenLine,n.tokenColumn)})}t=O(n,e,u,t,0,1,l,f,d)}return i===0&&(n.flags&2048)===2048&&(n.flags=(n.flags|2048)^2048,t=s(n,e,l,f,d,{type:"ChainExpression",expression:t})),t}function Ju(n,e,u,t,o,i,l){let f=!1,d;if((n.getToken()===69271571||n.getToken()===67174411)&&(n.flags&2048)===2048&&(f=!0,n.flags=(n.flags|2048)^2048),n.getToken()===69271571){b(n,e|8192);let{tokenIndex:g,tokenLine:m,tokenColumn:y}=n,a=z(n,e,u,0,1,g,m,y);C(n,e,20),n.assignable=2,d=s(n,e,o,i,l,{type:"MemberExpression",object:t,computed:!0,optional:!0,property:a})}else if(n.getToken()===67174411){let g=an(n,e,u,0);n.assignable=2,d=s(n,e,o,i,l,{type:"CallExpression",callee:t,arguments:g,optional:!0})}else{let g=cn(n,e,u);n.assignable=2,d=s(n,e,o,i,l,{type:"MemberExpression",object:t,computed:!1,optional:!0,property:g})}return f&&(n.flags|=2048),d}function cn(n,e,u){return(n.getToken()&143360)===0&&n.getToken()!==-2147483528&&n.getToken()!==-2147483527&&n.getToken()!==130&&c(n,160),n.getToken()===130?H2(n,e,u,0,n.tokenIndex,n.tokenLine,n.tokenColumn):R(n,e)}function ju(n,e,u,t,o,i,l,f){t&&c(n,56),o||c(n,0);let d=n.getToken();b(n,e|8192);let g=Y(n,e,u,0,0,1,n.tokenIndex,n.tokenLine,n.tokenColumn);return n.assignable&2&&c(n,55),n.assignable=2,s(n,e,i,l,f,{type:"UpdateExpression",argument:g,operator:V[d&255],prefix:!0})}function _(n,e,u,t,o,i,l,f,d,g,m){if((n.getToken()&143360)===143360){switch(n.getToken()){case 209006:return Ru(n,e,u,o,l,d,g,m);case 241771:return Ou(n,e,u,l,i,d,g,m);case 209005:return Vu(n,e,u,l,f,i,o,d,g,m)}let{tokenValue:y}=n,a=n.getToken(),k=R(n,e|16384);return n.getToken()===10?(f||c(n,0),$2(n,e,a),(a&36864)===36864&&(n.flags|=256),_2(n,e,u,y,k,o,i,0,d,g,m)):(e&4096&&!(e&8388608)&&!(e&2097152)&&n.tokenValue==="arguments"&&c(n,130),(a&255)===73&&(e&256&&c(n,113),t&24&&c(n,100)),n.assignable=e&256&&(a&537079808)===537079808?2:1,k)}if((n.getToken()&134217728)===134217728)return H(n,e);switch(n.getToken()){case 33619993:case 33619994:return ju(n,e,u,o,f,d,g,m);case 16863276:case 16842798:case 16842799:case 25233968:case 25233969:case 16863275:case 16863277:return Nu(n,e,u,f,d,g,m,l);case 86104:return te(n,e,u,0,l,d,g,m);case 2162700:return Qu(n,e,u,i?0:1,l,d,g,m);case 69271571:return Yu(n,e,u,i?0:1,l,d,g,m);case 67174411:return Gu(n,e|16384,u,i,1,0,d,g,m);case 86021:case 86022:case 86023:return Wu(n,e,d,g,m);case 86111:return _u(n,e);case 65540:return pu(n,e,d,g,m);case 132:case 86094:return n1(n,e,u,l,d,g,m);case 86109:return Uu(n,e,d,g,m);case 67174409:return mn(n,e,d,g,m);case 67174408:return kn(n,e,u);case 86107:return xu(n,e,u,l,d,g,m);case 134283388:return ue(n,e,d,g,m);case 130:return H2(n,e,u,0,d,g,m);case 86106:return Xu(n,e,u,o,l,d,g,m);case 8456256:if(e&8)return Q2(n,e,u,0,d,g,m);default:if(B2(e,n.getToken()))return yn(n,e,u,d,g,m);c(n,30,V[n.getToken()&255])}}function Xu(n,e,u,t,o,i,l,f){let d=R(n,e);return n.getToken()===67108877?ne(n,e,d,i,l,f):(t&&c(n,142),d=ee(n,e,u,o,i,l,f),n.assignable=2,O(n,e,u,d,o,0,i,l,f))}function ne(n,e,u,t,o,i){(e&512)===0&&c(n,169),b(n,e);let l=n.getToken();return l!==209030&&n.tokenValue!=="meta"?c(n,174):l&-2147483648&&c(n,175),n.assignable=2,s(n,e,t,o,i,{type:"MetaProperty",meta:u,property:R(n,e)})}function ee(n,e,u,t,o,i,l){C(n,e|8192,67174411),n.getToken()===14&&c(n,143);let d={type:"ImportExpression",source:M(n,e,u,1,t,n.tokenIndex,n.tokenLine,n.tokenColumn)};if(e&1){let g=null;if(n.getToken()===18&&(C(n,e,18),n.getToken()!==16)){let m=(e|33554432)^33554432;g=M(n,m,u,1,t,n.tokenIndex,n.tokenLine,n.tokenColumn)}d.options=g,P(n,e,18)}return C(n,e,16),s(n,e,o,i,l,d)}function nn(n,e,u=null){if(!P(n,e,20579))return[];C(n,e,2162700);let t=[],o=new Set;for(;n.getToken()!==1074790415;){let i=n.tokenIndex,l=n.tokenLine,f=n.tokenColumn,d=zu(n,e);C(n,e,21);let g=Hu(n,e),m=d.type==="Literal"?d.value:d.name;m==="type"&&g.value==="json"&&(u===null||u.length===1&&(u[0].type==="ImportDefaultSpecifier"||u[0].type==="ImportNamespaceSpecifier"||u[0].type==="ImportSpecifier"&&u[0].imported.type==="Identifier"&&u[0].imported.name==="default"||u[0].type==="ExportSpecifier"&&u[0].local.type==="Identifier"&&u[0].local.name==="default")||c(n,140)),o.has(m)&&c(n,145,`${m}`),o.add(m),t.push(s(n,e,i,l,f,{type:"ImportAttribute",key:d,value:g})),n.getToken()!==1074790415&&C(n,e,18)}return C(n,e,1074790415),t}function Hu(n,e){if(n.getToken()===134283267)return H(n,e);c(n,30,V[n.getToken()&255])}function zu(n,e){if(n.getToken()===134283267)return H(n,e);if(n.getToken()&143360)return R(n,e);c(n,30,V[n.getToken()&255])}function Ku(n,e){let u=e.length;for(let t=0;t56319||++t>=u||(e.charCodeAt(t)&64512)!==56320)&&c(n,171,JSON.stringify(e.charAt(t--)))}}function O2(n,e){if(n.getToken()===134283267)return Ku(n,n.tokenValue),H(n,e);if(n.getToken()&143360)return R(n,e);c(n,30,V[n.getToken()&255])}function ue(n,e,u,t,o){let{tokenRaw:i,tokenValue:l}=n;return b(n,e),n.assignable=2,s(n,e,u,t,o,e&128?{type:"Literal",value:l,bigint:i.slice(0,-1),raw:i}:{type:"Literal",value:l,bigint:i.slice(0,-1)})}function mn(n,e,u,t,o){n.assignable=2;let{tokenValue:i,tokenRaw:l,tokenIndex:f,tokenLine:d,tokenColumn:g}=n;C(n,e,67174409);let m=[R2(n,e,i,l,f,d,g,!0)];return s(n,e,u,t,o,{type:"TemplateLiteral",expressions:[],quasis:m})}function kn(n,e,u){e=(e|33554432)^33554432;let{tokenValue:t,tokenRaw:o,tokenIndex:i,tokenLine:l,tokenColumn:f}=n;C(n,e&-16385|8192,67174408);let d=[R2(n,e,t,o,i,l,f,!1)],g=[z(n,e&-16385,u,0,1,n.tokenIndex,n.tokenLine,n.tokenColumn)];for(n.getToken()!==1074790415&&c(n,83);n.setToken(We(n,e),!0)!==67174409;){let{tokenValue:m,tokenRaw:y,tokenIndex:a,tokenLine:k,tokenColumn:h}=n;C(n,e&-16385|8192,67174408),d.push(R2(n,e,m,y,a,k,h,!1)),g.push(z(n,e,u,0,1,n.tokenIndex,n.tokenLine,n.tokenColumn)),n.getToken()!==1074790415&&c(n,83)}{let{tokenValue:m,tokenRaw:y,tokenIndex:a,tokenLine:k,tokenColumn:h}=n;C(n,e,67174409),d.push(R2(n,e,m,y,a,k,h,!0))}return s(n,e,i,l,f,{type:"TemplateLiteral",expressions:g,quasis:d})}function R2(n,e,u,t,o,i,l,f){let d=s(n,e,o,i,l,{type:"TemplateElement",value:{cooked:u,raw:t},tail:f}),g=f?1:2;return e&2&&(d.start+=1,d.range[0]+=1,d.end-=g,d.range[1]-=g),e&4&&(d.loc.start.column+=1,d.loc.end.column-=g),d}function $u(n,e,u,t,o,i){e=(e|33554432)^33554432,C(n,e|8192,14);let l=M(n,e,u,1,0,n.tokenIndex,n.tokenLine,n.tokenColumn);return n.assignable=1,s(n,e,t,o,i,{type:"SpreadElement",argument:l})}function an(n,e,u,t){b(n,e|8192);let o=[];if(n.getToken()===16)return b(n,e|16384),o;for(;n.getToken()!==16&&(n.getToken()===14?o.push($u(n,e,u,n.tokenIndex,n.tokenLine,n.tokenColumn)):o.push(M(n,e,u,1,t,n.tokenIndex,n.tokenLine,n.tokenColumn)),!(n.getToken()!==18||(b(n,e|8192),n.getToken()===16))););return C(n,e|16384,16),o}function R(n,e){let{tokenValue:u,tokenIndex:t,tokenLine:o,tokenColumn:i}=n,l=u==="await"&&(n.getToken()&-2147483648)===0;return b(n,e|(l?8192:0)),s(n,e,t,o,i,{type:"Identifier",name:u})}function H(n,e){let{tokenValue:u,tokenRaw:t,tokenIndex:o,tokenLine:i,tokenColumn:l}=n;return n.getToken()===134283388?ue(n,e,o,i,l):(b(n,e),n.assignable=2,s(n,e,o,i,l,e&128?{type:"Literal",value:u,raw:t}:{type:"Literal",value:u}))}function Wu(n,e,u,t,o){let i=V[n.getToken()&255],l=n.getToken()===86023?null:i==="true";return b(n,e),n.assignable=2,s(n,e,u,t,o,e&128?{type:"Literal",value:l,raw:i}:{type:"Literal",value:l})}function _u(n,e){let{tokenIndex:u,tokenLine:t,tokenColumn:o}=n;return b(n,e),n.assignable=2,s(n,e,u,t,o,{type:"ThisExpression"})}function f2(n,e,u,t,o,i,l,f,d,g,m){b(n,e|8192);let y=i?fn(n,e,8391476):0,a=null,k,h=u?a2():void 0;if(n.getToken()===67174411)(l&1)===0&&c(n,39,"Function");else{let v=o&4&&((e&2048)===0||(e&512)===0)?4:64|(f?1024:0)|(y?1024:0);$n(n,e,n.getToken()),u&&(v&4?Yn(n,e,u,n.tokenValue,v):d2(n,e,u,n.tokenValue,v,o),h=j(h,256),l&&l&2&&g2(n,n.tokenValue)),k=n.getToken(),n.getToken()&143360?a=R(n,e):c(n,30,V[n.getToken()&255])}let T=7274496;e=(e|T)^T|16777216|(f?524288:0)|(y?262144:0)|(y?0:67108864),u&&(h=j(h,512));let E=oe(n,(e|2097152)&-268435457,h,t,0,1),w=268471296,I=W2(n,(e|w)^w|8388608|1048576,u?j(h,128):h,t,8,k,h==null?void 0:h.scopeError);return s(n,e,d,g,m,{type:"FunctionDeclaration",id:a,params:E,body:I,async:f===1,generator:y===1})}function te(n,e,u,t,o,i,l,f){b(n,e|8192);let d=fn(n,e,8391476),g=(t?524288:0)|(d?262144:0),m=null,y,a=e&16?a2():void 0,k=275709952;n.getToken()&143360&&($n(n,(e|k)^k|g,n.getToken()),a&&(a=j(a,256)),y=n.getToken(),m=R(n,e)),e=(e|k)^k|16777216|g|(d?0:67108864),a&&(a=j(a,512));let h=oe(n,(e|2097152)&-268435457,a,u,o,1),T=W2(n,e&-33594369|8388608|1048576,a&&j(a,128),u,0,y,a==null?void 0:a.scopeError);return n.assignable=2,s(n,e,i,l,f,{type:"FunctionExpression",id:m,params:h,body:T,async:t===1,generator:d===1})}function Yu(n,e,u,t,o,i,l,f){let d=Q(n,e,void 0,u,t,o,0,2,0,i,l,f);return n.destructible&64&&c(n,63),n.destructible&8&&c(n,62),d}function Q(n,e,u,t,o,i,l,f,d,g,m,y){b(n,e|8192);let a=[],k=0;for(e=(e|33554432)^33554432;n.getToken()!==20;)if(P(n,e|8192,18))a.push(null);else{let T,{tokenIndex:E,tokenLine:w,tokenColumn:I,tokenValue:v}=n,q=n.getToken();if(q&143360)if(T=_(n,e,t,f,0,1,i,1,E,w,I),n.getToken()===1077936155){n.assignable&2&&c(n,26),b(n,e|8192),u&&n2(n,e,u,v,f,d);let F=M(n,e,t,1,i,n.tokenIndex,n.tokenLine,n.tokenColumn);T=s(n,e,E,w,I,l?{type:"AssignmentPattern",left:T,right:F}:{type:"AssignmentExpression",operator:"=",left:T,right:F}),k|=n.destructible&256?256:0|n.destructible&128?128:0}else n.getToken()===18||n.getToken()===20?(n.assignable&2?k|=16:u&&n2(n,e,u,v,f,d),k|=n.destructible&256?256:0|n.destructible&128?128:0):(k|=f&1?32:(f&2)===0?16:0,T=O(n,e,t,T,i,0,E,w,I),n.getToken()!==18&&n.getToken()!==20?(n.getToken()!==1077936155&&(k|=16),T=J(n,e,t,i,l,E,w,I,T)):n.getToken()!==1077936155&&(k|=n.assignable&2?16:32));else q&2097152?(T=n.getToken()===2162700?Z(n,e,u,t,0,i,l,f,d,E,w,I):Q(n,e,u,t,0,i,l,f,d,E,w,I),k|=n.destructible,n.assignable=n.destructible&16?2:1,n.getToken()===18||n.getToken()===20?n.assignable&2&&(k|=16):n.destructible&8?c(n,71):(T=O(n,e,t,T,i,0,E,w,I),k=n.assignable&2?16:0,n.getToken()!==18&&n.getToken()!==20?T=J(n,e,t,i,l,E,w,I,T):n.getToken()!==1077936155&&(k|=n.assignable&2?16:32))):q===14?(T=b2(n,e,u,t,20,f,d,0,i,l,E,w,I),k|=n.destructible,n.getToken()!==18&&n.getToken()!==20&&c(n,30,V[n.getToken()&255])):(T=Y(n,e,t,1,0,1,E,w,I),n.getToken()!==18&&n.getToken()!==20?(T=J(n,e,t,i,l,E,w,I,T),(f&3)===0&&q===67174411&&(k|=16)):n.assignable&2?k|=16:q===67174411&&(k|=n.assignable&1&&f&3?32:16));if(a.push(T),P(n,e|8192,18)){if(n.getToken()===20)break}else break}C(n,e,20);let h=s(n,e,g,m,y,{type:l?"ArrayPattern":"ArrayExpression",elements:a});return!o&&n.getToken()&4194304?ie(n,e,t,k,i,l,g,m,y,h):(n.destructible=k,h)}function ie(n,e,u,t,o,i,l,f,d,g){n.getToken()!==1077936155&&c(n,26),b(n,e|8192),t&16&&c(n,26),i||r(n,g);let{tokenIndex:m,tokenLine:y,tokenColumn:a}=n,k=M(n,e,u,1,o,m,y,a);return n.destructible=(t|64|8)^72|(n.destructible&128?128:0)|(n.destructible&256?256:0),s(n,e,l,f,d,i?{type:"AssignmentPattern",left:g,right:k}:{type:"AssignmentExpression",left:g,operator:"=",right:k})}function b2(n,e,u,t,o,i,l,f,d,g,m,y,a){b(n,e|8192);let k=null,h=0,{tokenValue:T,tokenIndex:E,tokenLine:w,tokenColumn:I}=n,v=n.getToken();if(v&143360)n.assignable=1,k=_(n,e,t,i,0,1,d,1,E,w,I),v=n.getToken(),k=O(n,e,t,k,d,0,E,w,I),n.getToken()!==18&&n.getToken()!==o&&(n.assignable&2&&n.getToken()===1077936155&&c(n,71),h|=16,k=J(n,e,t,d,g,E,w,I,k)),n.assignable&2?h|=16:v===o||v===18?u&&n2(n,e,u,T,i,l):h|=32,h|=n.destructible&128?128:0;else if(v===o)c(n,41);else if(v&2097152)k=n.getToken()===2162700?Z(n,e,u,t,1,d,g,i,l,E,w,I):Q(n,e,u,t,1,d,g,i,l,E,w,I),v=n.getToken(),v!==1077936155&&v!==o&&v!==18?(n.destructible&8&&c(n,71),k=O(n,e,t,k,d,0,E,w,I),h|=n.assignable&2?16:0,(n.getToken()&4194304)===4194304?(n.getToken()!==1077936155&&(h|=16),k=J(n,e,t,d,g,E,w,I,k)):((n.getToken()&8388608)===8388608&&(k=l2(n,e,t,1,E,w,I,4,v,k)),P(n,e|8192,22)&&(k=c2(n,e,t,k,E,w,I)),h|=n.assignable&2?16:32)):h|=o===1074790415&&v!==1077936155?16:n.destructible;else{h|=32,k=Y(n,e,t,1,d,1,n.tokenIndex,n.tokenLine,n.tokenColumn);let{tokenIndex:q,tokenLine:F,tokenColumn:U}=n,D=n.getToken();return D===1077936155?(n.assignable&2&&c(n,26),k=J(n,e,t,d,g,q,F,U,k),h|=16):(D===18?h|=16:D!==o&&(k=J(n,e,t,d,g,q,F,U,k)),h|=n.assignable&1?32:16),n.destructible=h,n.getToken()!==o&&n.getToken()!==18&&c(n,161),s(n,e,m,y,a,{type:g?"RestElement":"SpreadElement",argument:k})}if(n.getToken()!==o)if(i&1&&(h|=f?16:32),P(n,e|8192,1077936155)){h&16&&c(n,26),r(n,k);let q=M(n,e,t,1,d,n.tokenIndex,n.tokenLine,n.tokenColumn);k=s(n,e,E,w,I,g?{type:"AssignmentPattern",left:k,right:q}:{type:"AssignmentExpression",left:k,operator:"=",right:q}),h=16}else h|=16;return n.destructible=h,s(n,e,m,y,a,{type:g?"RestElement":"SpreadElement",argument:k})}function x(n,e,u,t,o,i,l,f){var a;let d=2883584|((t&64)===0?4325376:0);e=(e|d)^d|(t&8?262144:0)|(t&16?524288:0)|(t&64?4194304:0)|65536|8388608|16777216;let g=e&16?j(a2(),512):void 0,m=Zu(n,(e|2097152)&-268435457,g,u,t,1,o);g&&(g=j(g,128));let y=W2(n,e&-301992961|8388608|1048576,g,u,0,void 0,(a=g==null?void 0:g.parent)==null?void 0:a.scopeError);return s(n,e,i,l,f,{type:"FunctionExpression",params:m,body:y,async:(t&16)>0,generator:(t&8)>0,id:null})}function Qu(n,e,u,t,o,i,l,f){let d=Z(n,e,void 0,u,t,o,0,2,0,i,l,f);return n.destructible&64&&c(n,63),n.destructible&8&&c(n,62),d}function Z(n,e,u,t,o,i,l,f,d,g,m,y){b(n,e);let a=[],k=0,h=0;for(e=(e|33554432)^33554432;n.getToken()!==1074790415;){let{tokenValue:E,tokenLine:w,tokenColumn:I,tokenIndex:v}=n,q=n.getToken();if(q===14)a.push(b2(n,e,u,t,1074790415,f,d,0,i,l,v,w,I));else{let F=0,U=null,D;if(n.getToken()&143360||n.getToken()===-2147483528||n.getToken()===-2147483527)if(n.getToken()===-2147483527&&(k|=16),U=R(n,e),n.getToken()===18||n.getToken()===1074790415||n.getToken()===1077936155)if(F|=4,e&256&&(q&537079808)===537079808?k|=16:J2(n,e,f,q,0),u&&n2(n,e,u,E,f,d),P(n,e|8192,1077936155)){k|=8;let B=M(n,e,t,1,i,n.tokenIndex,n.tokenLine,n.tokenColumn);k|=n.destructible&256?256:0|n.destructible&128?128:0,D=s(n,e,v,w,I,{type:"AssignmentPattern",left:e&134217728?Object.assign({},U):U,right:B})}else k|=(q===209006?128:0)|(q===-2147483528?16:0),D=e&134217728?Object.assign({},U):U;else if(P(n,e|8192,21)){let{tokenIndex:B,tokenLine:L,tokenColumn:S}=n;if(E==="__proto__"&&h++,n.getToken()&143360){let D2=n.getToken(),t2=n.tokenValue;D=_(n,e,t,f,0,1,i,1,B,L,S);let p=n.getToken();D=O(n,e,t,D,i,0,B,L,S),n.getToken()===18||n.getToken()===1074790415?p===1077936155||p===1074790415||p===18?(k|=n.destructible&128?128:0,n.assignable&2?k|=16:u&&(D2&143360)===143360&&n2(n,e,u,t2,f,d)):k|=n.assignable&1?32:16:(n.getToken()&4194304)===4194304?(n.assignable&2?k|=16:p!==1077936155?k|=32:u&&n2(n,e,u,t2,f,d),D=J(n,e,t,i,l,B,L,S,D)):(k|=16,(n.getToken()&8388608)===8388608&&(D=l2(n,e,t,1,B,L,S,4,p,D)),P(n,e|8192,22)&&(D=c2(n,e,t,D,B,L,S)))}else(n.getToken()&2097152)===2097152?(D=n.getToken()===69271571?Q(n,e,u,t,0,i,l,f,d,B,L,S):Z(n,e,u,t,0,i,l,f,d,B,L,S),k=n.destructible,n.assignable=k&16?2:1,n.getToken()===18||n.getToken()===1074790415?n.assignable&2&&(k|=16):n.destructible&8?c(n,71):(D=O(n,e,t,D,i,0,B,L,S),k=n.assignable&2?16:0,(n.getToken()&4194304)===4194304?D=N2(n,e,t,i,l,B,L,S,D):((n.getToken()&8388608)===8388608&&(D=l2(n,e,t,1,B,L,S,4,q,D)),P(n,e|8192,22)&&(D=c2(n,e,t,D,B,L,S)),k|=n.assignable&2?16:32))):(D=Y(n,e,t,1,i,1,B,L,S),k|=n.assignable&1?32:16,n.getToken()===18||n.getToken()===1074790415?n.assignable&2&&(k|=16):(D=O(n,e,t,D,i,0,B,L,S),k=n.assignable&2?16:0,n.getToken()!==18&&q!==1074790415&&(n.getToken()!==1077936155&&(k|=16),D=J(n,e,t,i,l,B,L,S,D))))}else n.getToken()===69271571?(k|=16,q===209005&&(F|=16),F|=(q===12400?256:q===12401?512:1)|2,U=y2(n,e,t,i),k|=n.assignable,D=x(n,e,t,F,i,n.tokenIndex,n.tokenLine,n.tokenColumn)):n.getToken()&143360?(k|=16,q===-2147483528&&c(n,95),q===209005?(n.flags&1&&c(n,132),F|=17):q===12400?F|=256:q===12401?F|=512:c(n,0),U=R(n,e),D=x(n,e,t,F,i,n.tokenIndex,n.tokenLine,n.tokenColumn)):n.getToken()===67174411?(k|=16,F|=1,D=x(n,e,t,F,i,n.tokenIndex,n.tokenLine,n.tokenColumn)):n.getToken()===8391476?(k|=16,q===12400?c(n,42):q===12401?c(n,43):q!==209005&&c(n,30,V[52]),b(n,e),F|=9|(q===209005?16:0),n.getToken()&143360?U=R(n,e):(n.getToken()&134217728)===134217728?U=H(n,e):n.getToken()===69271571?(F|=2,U=y2(n,e,t,i),k|=n.assignable):c(n,30,V[n.getToken()&255]),D=x(n,e,t,F,i,n.tokenIndex,n.tokenLine,n.tokenColumn)):(n.getToken()&134217728)===134217728?(q===209005&&(F|=16),F|=q===12400?256:q===12401?512:1,k|=16,U=H(n,e),D=x(n,e,t,F,i,n.tokenIndex,n.tokenLine,n.tokenColumn)):c(n,133);else if((n.getToken()&134217728)===134217728)if(U=H(n,e),n.getToken()===21){C(n,e|8192,21);let{tokenIndex:B,tokenLine:L,tokenColumn:S}=n;if(E==="__proto__"&&h++,n.getToken()&143360){D=_(n,e,t,f,0,1,i,1,B,L,S);let{tokenValue:D2}=n,t2=n.getToken();D=O(n,e,t,D,i,0,B,L,S),n.getToken()===18||n.getToken()===1074790415?t2===1077936155||t2===1074790415||t2===18?n.assignable&2?k|=16:u&&n2(n,e,u,D2,f,d):k|=n.assignable&1?32:16:n.getToken()===1077936155?(n.assignable&2&&(k|=16),D=J(n,e,t,i,l,B,L,S,D)):(k|=16,D=J(n,e,t,i,l,B,L,S,D))}else(n.getToken()&2097152)===2097152?(D=n.getToken()===69271571?Q(n,e,u,t,0,i,l,f,d,B,L,S):Z(n,e,u,t,0,i,l,f,d,B,L,S),k=n.destructible,n.assignable=k&16?2:1,n.getToken()===18||n.getToken()===1074790415?n.assignable&2&&(k|=16):(n.destructible&8)!==8&&(D=O(n,e,t,D,i,0,B,L,S),k=n.assignable&2?16:0,(n.getToken()&4194304)===4194304?D=N2(n,e,t,i,l,B,L,S,D):((n.getToken()&8388608)===8388608&&(D=l2(n,e,t,1,B,L,S,4,q,D)),P(n,e|8192,22)&&(D=c2(n,e,t,D,B,L,S)),k|=n.assignable&2?16:32))):(D=Y(n,e,t,1,0,1,B,L,S),k|=n.assignable&1?32:16,n.getToken()===18||n.getToken()===1074790415?n.assignable&2&&(k|=16):(D=O(n,e,t,D,i,0,B,L,S),k=n.assignable&1?0:16,n.getToken()!==18&&n.getToken()!==1074790415&&(n.getToken()!==1077936155&&(k|=16),D=J(n,e,t,i,l,B,L,S,D))))}else n.getToken()===67174411?(F|=1,D=x(n,e,t,F,i,n.tokenIndex,n.tokenLine,n.tokenColumn),k=n.assignable|16):c(n,134);else if(n.getToken()===69271571)if(U=y2(n,e,t,i),k|=n.destructible&256?256:0,F|=2,n.getToken()===21){b(n,e|8192);let{tokenIndex:B,tokenLine:L,tokenColumn:S,tokenValue:D2}=n,t2=n.getToken();if(n.getToken()&143360){D=_(n,e,t,f,0,1,i,1,B,L,S);let p=n.getToken();D=O(n,e,t,D,i,0,B,L,S),(n.getToken()&4194304)===4194304?(k|=n.assignable&2?16:p===1077936155?0:32,D=N2(n,e,t,i,l,B,L,S,D)):n.getToken()===18||n.getToken()===1074790415?p===1077936155||p===1074790415||p===18?n.assignable&2?k|=16:u&&(t2&143360)===143360&&n2(n,e,u,D2,f,d):k|=n.assignable&1?32:16:(k|=16,D=J(n,e,t,i,l,B,L,S,D))}else(n.getToken()&2097152)===2097152?(D=n.getToken()===69271571?Q(n,e,u,t,0,i,l,f,d,B,L,S):Z(n,e,u,t,0,i,l,f,d,B,L,S),k=n.destructible,n.assignable=k&16?2:1,n.getToken()===18||n.getToken()===1074790415?n.assignable&2&&(k|=16):k&8?c(n,62):(D=O(n,e,t,D,i,0,B,L,S),k=n.assignable&2?k|16:0,(n.getToken()&4194304)===4194304?(n.getToken()!==1077936155&&(k|=16),D=N2(n,e,t,i,l,B,L,S,D)):((n.getToken()&8388608)===8388608&&(D=l2(n,e,t,1,B,L,S,4,q,D)),P(n,e|8192,22)&&(D=c2(n,e,t,D,B,L,S)),k|=n.assignable&2?16:32))):(D=Y(n,e,t,1,0,1,B,L,S),k|=n.assignable&1?32:16,n.getToken()===18||n.getToken()===1074790415?n.assignable&2&&(k|=16):(D=O(n,e,t,D,i,0,B,L,S),k=n.assignable&1?0:16,n.getToken()!==18&&n.getToken()!==1074790415&&(n.getToken()!==1077936155&&(k|=16),D=J(n,e,t,i,l,B,L,S,D))))}else n.getToken()===67174411?(F|=1,D=x(n,e,t,F,i,n.tokenIndex,w,I),k=16):c(n,44);else if(q===8391476)if(C(n,e|8192,8391476),F|=8,n.getToken()&143360){let B=n.getToken();U=R(n,e),F|=1,n.getToken()===67174411?(k|=16,D=x(n,e,t,F,i,n.tokenIndex,n.tokenLine,n.tokenColumn)):$(n.tokenIndex,n.tokenLine,n.tokenColumn,n.index,n.line,n.column,B===209005?46:B===12400||n.getToken()===12401?45:47,V[B&255])}else(n.getToken()&134217728)===134217728?(k|=16,U=H(n,e),F|=1,D=x(n,e,t,F,i,v,w,I)):n.getToken()===69271571?(k|=16,F|=3,U=y2(n,e,t,i),D=x(n,e,t,F,i,n.tokenIndex,n.tokenLine,n.tokenColumn)):c(n,126);else c(n,30,V[q&255]);k|=n.destructible&128?128:0,n.destructible=k,a.push(s(n,e,v,w,I,{type:"Property",key:U,value:D,kind:F&768?F&512?"set":"get":"init",computed:(F&2)>0,method:(F&1)>0,shorthand:(F&4)>0}))}if(k|=n.destructible,n.getToken()!==18)break;b(n,e)}C(n,e,1074790415),h>1&&(k|=64);let T=s(n,e,g,m,y,{type:l?"ObjectPattern":"ObjectExpression",properties:a});return!o&&n.getToken()&4194304?ie(n,e,t,k,i,l,g,m,y,T):(n.destructible=k,T)}function Zu(n,e,u,t,o,i,l){C(n,e,67174411);let f=[];if(n.flags=(n.flags|128)^128,n.getToken()===16)return o&512&&c(n,37,"Setter","one",""),b(n,e),f;o&256&&c(n,37,"Getter","no","s"),o&512&&n.getToken()===14&&c(n,38),e=(e|33554432)^33554432;let d=0,g=0;for(;n.getToken()!==18;){let m=null,{tokenIndex:y,tokenLine:a,tokenColumn:k}=n;if(n.getToken()&143360?((e&256)===0&&((n.getToken()&36864)===36864&&(n.flags|=256),(n.getToken()&537079808)===537079808&&(n.flags|=512)),m=hn(n,e,u,o|1,0,y,a,k)):(n.getToken()===2162700?m=Z(n,e,u,t,1,l,1,i,0,y,a,k):n.getToken()===69271571?m=Q(n,e,u,t,1,l,1,i,0,y,a,k):n.getToken()===14&&(m=b2(n,e,u,t,16,i,0,0,l,1,y,a,k)),g=1,n.destructible&48&&c(n,50)),n.getToken()===1077936155){b(n,e|8192),g=1;let h=M(n,e,t,1,0,n.tokenIndex,n.tokenLine,n.tokenColumn);m=s(n,e,y,a,k,{type:"AssignmentPattern",left:m,right:h})}if(d++,f.push(m),!P(n,e,18)||n.getToken()===16)break}return o&512&&d!==1&&c(n,37,"Setter","one",""),u&&u.scopeError&&z2(u.scopeError),g&&(n.flags|=128),C(n,e,16),f}function y2(n,e,u,t){b(n,e|8192);let o=M(n,(e|33554432)^33554432,u,1,t,n.tokenIndex,n.tokenLine,n.tokenColumn);return C(n,e,20),o}function Gu(n,e,u,t,o,i,l,f,d){n.flags=(n.flags|128)^128;let{tokenIndex:g,tokenLine:m,tokenColumn:y}=n;b(n,e|8192|67108864);let a=e&16?j(a2(),1024):void 0;if(e=(e|33554432)^33554432,P(n,e,16))return X2(n,e,a,u,[],t,0,l,f,d);let k=0;n.destructible&=-385;let h,T=[],E=0,w=0,I=0,{tokenIndex:v,tokenLine:q,tokenColumn:F}=n;for(n.assignable=1;n.getToken()!==16;){let{tokenIndex:U,tokenLine:D,tokenColumn:B}=n,L=n.getToken();if(L&143360)a&&d2(n,e,a,n.tokenValue,1,0),(L&537079808)===537079808?w=1:(L&36864)===36864&&(I=1),h=_(n,e,u,o,0,1,1,1,U,D,B),n.getToken()===16||n.getToken()===18?n.assignable&2&&(k|=16,w=1):(n.getToken()===1077936155?w=1:k|=16,h=O(n,e,u,h,1,0,U,D,B),n.getToken()!==16&&n.getToken()!==18&&(h=J(n,e,u,1,0,U,D,B,h)));else if((L&2097152)===2097152)h=L===2162700?Z(n,e|67108864,a,u,0,1,0,o,i,U,D,B):Q(n,e|67108864,a,u,0,1,0,o,i,U,D,B),k|=n.destructible,w=1,n.assignable=2,n.getToken()!==16&&n.getToken()!==18&&(k&8&&c(n,122),h=O(n,e,u,h,0,0,U,D,B),k|=16,n.getToken()!==16&&n.getToken()!==18&&(h=J(n,e,u,0,0,U,D,B,h)));else if(L===14){h=b2(n,e,a,u,16,o,i,0,1,0,U,D,B),n.destructible&16&&c(n,74),w=1,E&&(n.getToken()===16||n.getToken()===18)&&T.push(h),k|=8;break}else{if(k|=16,h=M(n,e,u,1,1,U,D,B),E&&(n.getToken()===16||n.getToken()===18)&&T.push(h),n.getToken()===18&&(E||(E=1,T=[h])),E){for(;P(n,e|8192,18);)T.push(M(n,e,u,1,1,n.tokenIndex,n.tokenLine,n.tokenColumn));n.assignable=2,h=s(n,e,v,q,F,{type:"SequenceExpression",expressions:T})}return C(n,e,16),n.destructible=k,h}if(E&&(n.getToken()===16||n.getToken()===18)&&T.push(h),!P(n,e|8192,18))break;if(E||(E=1,T=[h]),n.getToken()===16){k|=8;break}}return E&&(n.assignable=2,h=s(n,e,v,q,F,{type:"SequenceExpression",expressions:T})),C(n,e,16),k&16&&k&8&&c(n,151),k|=n.destructible&256?256:0|n.destructible&128?128:0,n.getToken()===10?(k&48&&c(n,49),e&524800&&k&128&&c(n,31),e&262400&&k&256&&c(n,32),w&&(n.flags|=128),I&&(n.flags|=256),X2(n,e,a,u,E?T:[h],t,0,l,f,d)):(k&64&&c(n,63),k&8&&c(n,144),n.destructible=(n.destructible|256)^256|k,e&32?s(n,e,g,m,y,{type:"ParenthesizedExpression",expression:h}):h)}function yn(n,e,u,t,o,i){let{tokenValue:l}=n,f=0,d=0;(n.getToken()&537079808)===537079808?f=1:(n.getToken()&36864)===36864&&(d=1);let g=R(n,e);if(n.assignable=1,n.getToken()===10){let m;return e&16&&(m=K2(n,e,l)),f&&(n.flags|=128),d&&(n.flags|=256),F2(n,e,m,u,[g],0,t,o,i)}return g}function _2(n,e,u,t,o,i,l,f,d,g,m){l||c(n,57),i&&c(n,51),n.flags&=-129;let y=e&16?K2(n,e,t):void 0;return F2(n,e,y,u,[o],f,d,g,m)}function X2(n,e,u,t,o,i,l,f,d,g){i||c(n,57);for(let m=0;m0&&n.tokenValue==="constructor"&&c(n,109),n.getToken()===1074790415&&c(n,108),P(n,e,1074790417)){E>0&&c(n,120);continue}h.push(de(n,e,t,y,u,i,T,0,f,n.tokenIndex,n.tokenLine,n.tokenColumn))}return C(n,l&8?e|8192:e,1074790415),y&&tu(y),n.flags=n.flags&-33|k,s(n,e,d,g,m,{type:"ClassBody",body:h})}function de(n,e,u,t,o,i,l,f,d,g,m,y){let a=f?32:0,k=null,{tokenIndex:h,tokenLine:T,tokenColumn:E}=n,w=n.getToken();if(w&176128||w===-2147483528)switch(k=R(n,e),w){case 36970:if(!f&&n.getToken()!==67174411&&(n.getToken()&1048576)!==1048576&&n.getToken()!==1077936155)return de(n,e,u,t,o,i,l,1,d,g,m,y);break;case 209005:if(n.getToken()!==67174411&&(n.flags&1)===0){if((n.getToken()&1073741824)===1073741824)return T2(n,e,t,k,a,l,h,T,E);a|=16|(fn(n,e,8391476)?8:0)}break;case 12400:if(n.getToken()!==67174411){if((n.getToken()&1073741824)===1073741824)return T2(n,e,t,k,a,l,h,T,E);a|=256}break;case 12401:if(n.getToken()!==67174411){if((n.getToken()&1073741824)===1073741824)return T2(n,e,t,k,a,l,h,T,E);a|=512}break;case 12402:if(n.getToken()!==67174411&&(n.flags&1)===0){if((n.getToken()&1073741824)===1073741824)return T2(n,e,t,k,a,l,h,T,E);e&1&&(a|=1024)}break}else if(w===69271571)a|=2,k=y2(n,o,t,d);else if((w&134217728)===134217728)k=H(n,e);else if(w===8391476)a|=8,b(n,e);else if(n.getToken()===130)a|=8192,k=H2(n,e|4096,t,768,h,T,E);else if((n.getToken()&1073741824)===1073741824)a|=128;else{if(f&&w===2162700)return Iu(n,e|4096,u,t,h,T,E);w===-2147483527?(k=R(n,e),n.getToken()!==67174411&&c(n,30,V[n.getToken()&255])):c(n,30,V[n.getToken()&255])}if(a&1816&&(n.getToken()&143360||n.getToken()===-2147483528||n.getToken()===-2147483527?k=R(n,e):(n.getToken()&134217728)===134217728?k=H(n,e):n.getToken()===69271571?(a|=2,k=y2(n,e,t,0)):n.getToken()===130?(a|=8192,k=H2(n,e,t,a,h,T,E)):c(n,135)),(a&2)===0&&(n.tokenValue==="constructor"?((n.getToken()&1073741824)===1073741824?c(n,129):(a&32)===0&&n.getToken()===67174411&&(a&920?c(n,53,"accessor"):(e&131072)===0&&(n.flags&32?c(n,54):n.flags|=32)),a|=64):(a&8192)===0&&a&32&&n.tokenValue==="prototype"&&c(n,52)),a&1024||n.getToken()!==67174411&&(a&768)===0)return T2(n,e,t,k,a,l,h,T,E);let I=x(n,e|4096,t,a,d,n.tokenIndex,n.tokenLine,n.tokenColumn);return s(n,e,g,m,y,{type:"MethodDefinition",kind:(a&32)===0&&a&64?"constructor":a&256?"get":a&512?"set":"method",static:(a&32)>0,computed:(a&2)>0,key:k,value:I,...e&1?{decorators:l}:null})}function H2(n,e,u,t,o,i,l){b(n,e);let{tokenValue:f}=n;return f==="constructor"&&c(n,128),e&16&&(u||c(n,4,f),t?eu(n,u,f,t):uu(n,u,f)),b(n,e),s(n,e,o,i,l,{type:"PrivateIdentifier",name:f})}function T2(n,e,u,t,o,i,l,f,d){let g=null;if(o&8&&c(n,0),n.getToken()===1077936155){b(n,e|8192);let{tokenIndex:m,tokenLine:y,tokenColumn:a}=n;n.getToken()===537079927&&c(n,119);let k=2883584|((o&64)===0?4325376:0);e=(e|k)^k|(o&8?262144:0)|(o&16?524288:0)|(o&64?4194304:0)|65536|16777216,g=_(n,e|4096,u,2,0,1,0,1,m,y,a),((n.getToken()&1073741824)!==1073741824||(n.getToken()&4194304)===4194304)&&(g=O(n,e|4096,u,g,0,0,m,y,a),g=J(n,e|4096,u,0,0,m,y,a,g))}return K(n,e),s(n,e,l,f,d,{type:o&1024?"AccessorProperty":"PropertyDefinition",key:t,value:g,static:(o&32)>0,computed:(o&2)>0,...e&1?{decorators:i}:null})}function ge(n,e,u,t,o,i,l,f,d){if(n.getToken()&143360||(e&256)===0&&n.getToken()===-2147483527)return hn(n,e,u,o,i,l,f,d);(n.getToken()&2097152)!==2097152&&c(n,30,V[n.getToken()&255]);let g=n.getToken()===69271571?Q(n,e,u,t,1,0,1,o,i,l,f,d):Z(n,e,u,t,1,0,1,o,i,l,f,d);return n.destructible&16&&c(n,50),n.destructible&32&&c(n,50),g}function hn(n,e,u,t,o,i,l,f){let{tokenValue:d}=n,g=n.getToken();return e&256&&((g&537079808)===537079808?c(n,119):((g&36864)===36864||g===-2147483527)&&c(n,118)),(g&20480)===20480&&c(n,102),g===241771&&(e&262144&&c(n,32),e&512&&c(n,111)),(g&255)===73&&t&24&&c(n,100),g===209006&&(e&524288&&c(n,176),e&512&&c(n,110)),b(n,e),u&&n2(n,e,u,d,t,o),s(n,e,i,l,f,{type:"Identifier",name:d})}function Q2(n,e,u,t,o,i,l){if(t||C(n,e,8456256),n.getToken()===8390721){let m=u1(n,e,o,i,l),[y,a]=l1(n,e,u,t);return s(n,e,o,i,l,{type:"JSXFragment",openingFragment:m,children:y,closingFragment:a})}n.getToken()===8457014&&c(n,30,V[n.getToken()&255]);let f=null,d=[],g=g1(n,e,u,t,o,i,l);if(!g.selfClosing){[d,f]=o1(n,e,u,t);let m=j2(f.name);j2(g.name)!==m&&c(n,155,m)}return s(n,e,o,i,l,{type:"JSXElement",children:d,openingElement:g,closingElement:f})}function u1(n,e,u,t,o){return w2(n,e),s(n,e,u,t,o,{type:"JSXOpeningFragment"})}function t1(n,e,u,t,o,i){C(n,e,8457014);let l=me(n,e,n.tokenIndex,n.tokenLine,n.tokenColumn);return n.getToken()!==8390721&&c(n,25,V[65]),u?w2(n,e):b(n,e),s(n,e,t,o,i,{type:"JSXClosingElement",name:l})}function i1(n,e,u,t,o,i){return C(n,e,8457014),n.getToken()!==8390721&&c(n,25,V[65]),u?w2(n,e):b(n,e),s(n,e,t,o,i,{type:"JSXClosingFragment"})}function o1(n,e,u,t){let o=[];for(;;){let i=f1(n,e,u,t,n.tokenIndex,n.tokenLine,n.tokenColumn);if(i.type==="JSXClosingElement")return[o,i];o.push(i)}}function l1(n,e,u,t){let o=[];for(;;){let i=d1(n,e,u,t,n.tokenIndex,n.tokenLine,n.tokenColumn);if(i.type==="JSXClosingFragment")return[o,i];o.push(i)}}function f1(n,e,u,t,o,i,l){if(n.getToken()===137)return ce(n,e,o,i,l);if(n.getToken()===2162700)return An(n,e,u,1,0,o,i,l);if(n.getToken()===8456256)return b(n,e),n.getToken()===8457014?t1(n,e,t,o,i,l):Q2(n,e,u,1,o,i,l);c(n,0)}function d1(n,e,u,t,o,i,l){if(n.getToken()===137)return ce(n,e,o,i,l);if(n.getToken()===2162700)return An(n,e,u,1,0,o,i,l);if(n.getToken()===8456256)return b(n,e),n.getToken()===8457014?i1(n,e,t,o,i,l):Q2(n,e,u,1,o,i,l);c(n,0)}function ce(n,e,u,t,o){b(n,e);let i={type:"JSXText",value:n.tokenValue};return e&128&&(i.raw=n.tokenRaw),s(n,e,u,t,o,i)}function g1(n,e,u,t,o,i,l){(n.getToken()&143360)!==143360&&(n.getToken()&4096)!==4096&&c(n,0);let f=me(n,e,n.tokenIndex,n.tokenLine,n.tokenColumn),d=m1(n,e,u),g=n.getToken()===8457014;return g&&C(n,e,8457014),n.getToken()!==8390721&&c(n,25,V[65]),t||!g?w2(n,e):b(n,e),s(n,e,o,i,l,{type:"JSXOpeningElement",name:f,attributes:d,selfClosing:g})}function me(n,e,u,t,o){x2(n);let i=Z2(n,e,u,t,o);if(n.getToken()===21)return ke(n,e,i,u,t,o);for(;P(n,e,67108877);)x2(n),i=c1(n,e,i,u,t,o);return i}function c1(n,e,u,t,o,i){let l=Z2(n,e,n.tokenIndex,n.tokenLine,n.tokenColumn);return s(n,e,t,o,i,{type:"JSXMemberExpression",object:u,property:l})}function m1(n,e,u){let t=[];for(;n.getToken()!==8457014&&n.getToken()!==8390721&&n.getToken()!==1048576;)t.push(a1(n,e,u,n.tokenIndex,n.tokenLine,n.tokenColumn));return t}function k1(n,e,u,t,o,i){b(n,e),C(n,e,14);let l=M(n,e,u,1,0,n.tokenIndex,n.tokenLine,n.tokenColumn);return C(n,e,1074790415),s(n,e,t,o,i,{type:"JSXSpreadAttribute",argument:l})}function a1(n,e,u,t,o,i){if(n.getToken()===2162700)return k1(n,e,u,t,o,i);x2(n);let l=null,f=Z2(n,e,t,o,i);if(n.getToken()===21&&(f=ke(n,e,f,t,o,i)),n.getToken()===1077936155){let d=Ge(n,e),{tokenIndex:g,tokenLine:m,tokenColumn:y}=n;switch(d){case 134283267:l=H(n,e);break;case 8456256:l=Q2(n,e,u,0,g,m,y);break;case 2162700:l=An(n,e,u,0,1,g,m,y);break;default:c(n,154)}}return s(n,e,t,o,i,{type:"JSXAttribute",value:l,name:f})}function ke(n,e,u,t,o,i){C(n,e,21);let l=Z2(n,e,n.tokenIndex,n.tokenLine,n.tokenColumn);return s(n,e,t,o,i,{type:"JSXNamespacedName",namespace:u,name:l})}function An(n,e,u,t,o,i,l,f){b(n,e|8192);let{tokenIndex:d,tokenLine:g,tokenColumn:m}=n;if(n.getToken()===14)return y1(n,e,u,i,l,f);let y=null;return n.getToken()===1074790415?(o&&c(n,157),y=s1(n,e,n.startIndex,n.startLine,n.startColumn)):y=M(n,e,u,1,0,d,g,m),n.getToken()!==1074790415&&c(n,25,V[15]),t?w2(n,e):b(n,e),s(n,e,i,l,f,{type:"JSXExpressionContainer",expression:y})}function y1(n,e,u,t,o,i){C(n,e,14);let l=M(n,e,u,1,0,n.tokenIndex,n.tokenLine,n.tokenColumn);return C(n,e,1074790415),s(n,e,t,o,i,{type:"JSXSpreadChild",expression:l})}function s1(n,e,u,t,o){return n.startIndex=n.tokenIndex,n.startLine=n.tokenLine,n.startColumn=n.tokenColumn,s(n,e,u,t,o,{type:"JSXEmptyExpression"})}function Z2(n,e,u,t,o){n.getToken()&143360||c(n,30,V[n.getToken()&255]);let{tokenValue:i}=n;return b(n,e),s(n,e,u,t,o,{type:"JSXIdentifier",name:i})}function ae(n,e){return du(n,e,0)}function h1(n,e){let u=new SyntaxError(n+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(u,e)}var ye=h1;function A1(n){let e=[];for(let u of n)try{return u()}catch(t){e.push(t)}throw Object.assign(new Error("All combinations failed"),{errors:e})}var se=A1;var b1=(n,e,u)=>{if(!(n&&e==null))return Array.isArray(e)||typeof e=="string"?e[u<0?e.length+u:u]:e.at(u)},bn=b1;function D1(n){return Array.isArray(n)&&n.length>0}var he=D1;function G(n){var t,o,i;let e=((t=n.range)==null?void 0:t[0])??n.start,u=(i=((o=n.declaration)==null?void 0:o.decorators)??n.decorators)==null?void 0:i[0];return u?Math.min(G(u),e):e}function u2(n){var e;return((e=n.range)==null?void 0:e[1])??n.end}function T1(n){let e=new Set(n);return u=>e.has(u==null?void 0:u.type)}var Ae=T1;var C1=Ae(["Block","CommentBlock","MultiLine"]),q2=C1;function E1(n){let e=`*${n.value}*`.split(` +`);return e.length>1&&e.every(u=>u.trimStart()[0]==="*")}var Dn=E1;function w1(n){return q2(n)&&n.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(n.value)}var be=w1;var S2=null;function P2(n){if(S2!==null&&typeof S2.property){let e=S2;return S2=P2.prototype=null,e}return S2=P2.prototype=n??Object.create(null),new P2}var B1=10;for(let n=0;n<=B1;n++)P2();function Tn(n){return P2(n)}function I1(n,e="type"){Tn(n);function u(t){let o=t[e],i=n[o];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${o}'.`),{node:t});return i}return u}var De=I1;var Te={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","typeParameters","params","predicate","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:["body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],ImportExpression:["source","options"],MetaProperty:["meta","property"],ClassMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","typeParameters","quasi","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["decorators","variance","key","typeAnnotation","value"],ClassAccessorProperty:["decorators","key","typeAnnotation","value"],ClassPrivateProperty:["decorators","variance","key","typeAnnotation","value"],ClassPrivateMethod:["decorators","key","typeParameters","params","returnType","body"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source","attributes"],DeclareExportAllDeclaration:["source","attributes"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","this","params","rest","returnType"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["variance","id","key","value"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["qualification","id"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","typeParameters","typeArguments","attributes"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","nameType","typeAnnotation"],TSTemplateLiteralType:["quasis","types"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumBody:["members"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","options","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],AsConstExpression:["expression"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:["name","typeAnnotation"],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclareEnum:["id","body"],DeclareHook:["id"],DeclareNamespace:["id","body"],EnumBigIntBody:["members"],EnumBigIntMember:["id","init"],HookDeclaration:["id","params","body","typeParameters","returnType"],HookTypeAnnotation:["params","returnType","rest","typeParameters"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],SatisfiesExpression:["expression","typeAnnotation"]};var L1=De(Te),Ce=L1;function Cn(n,e){if(!(n!==null&&typeof n=="object"))return n;if(Array.isArray(n)){for(let t=0;t{var l;(l=i.leadingComments)!=null&&l.some(be)&&o.add(G(i))}),n=G2(n,i=>{if(i.type==="ParenthesizedExpression"){let{expression:l}=i;if(l.type==="TypeCastExpression")return l.range=[...i.range],l;let f=G(i);if(!o.has(f))return l.extra={...l.extra,parenthesized:!0},l}})}if(n=G2(n,o=>{switch(o.type){case"LogicalExpression":if(Ee(o))return En(o);break;case"VariableDeclaration":{let i=bn(!1,o.declarations,-1);i!=null&&i.init&&t[u2(i)]!==";"&&(o.range=[G(o),u2(i)]);break}case"TSParenthesizedType":return o.typeAnnotation;case"TSTypeParameter":if(typeof o.name=="string"){let i=G(o);o.name={type:"Identifier",name:o.name,range:[i,i+o.name.length]}}break;case"TopicReference":n.extra={...n.extra,__isUsingHackPipeline:!0};break;case"TSUnionType":case"TSIntersectionType":if(o.types.length===1)return o.types[0];break}}),he(n.comments)){let o=bn(!1,n.comments,-1);for(let i=n.comments.length-2;i>=0;i--){let l=n.comments[i];u2(l)===G(o)&&q2(l)&&q2(o)&&Dn(l)&&Dn(o)&&(n.comments.splice(i+1,1),l.value+="*//*"+o.value,l.range=[G(l),u2(o)]),o=l}}return n.type==="Program"&&(n.range=[0,t.length]),n}function Ee(n){return n.type==="LogicalExpression"&&n.right.type==="LogicalExpression"&&n.operator===n.right.operator}function En(n){return Ee(n)?En({type:"LogicalExpression",operator:n.operator,left:En({type:"LogicalExpression",operator:n.operator,left:n.left,right:n.right.left,range:[G(n.left),u2(n.right.left)]}),right:n.right.right,range:[G(n),u2(n)]}):n}var we=F1;var q1=/\*\/$/,S1=/^\/\*\*?/,P1=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,v1=/(^|\s+)\/\/([^\n\r]*)/g,Be=/^(\r?\n)+/,N1=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,Ie=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,V1=/(\r?\n|^) *\* ?/g,O1=[];function Le(n){let e=n.match(P1);return e?e[0].trimStart():""}function Fe(n){let e=` +`;n=i2(!1,n.replace(S1,"").replace(q1,""),V1,"$1");let u="";for(;u!==n;)u=n,n=i2(!1,n,N1,`${e}$1 $2${e}`);n=n.replace(Be,"").trimEnd();let t=Object.create(null),o=i2(!1,n,Ie,"").replace(Be,"").trimEnd(),i;for(;i=Ie.exec(n);){let l=i2(!1,i[2],v1,"");if(typeof t[i[1]]=="string"||Array.isArray(t[i[1]])){let f=t[i[1]];t[i[1]]=[...O1,...Array.isArray(f)?f:[f],l]}else t[i[1]]=l}return{comments:o,pragmas:t}}function R1(n){if(!n.startsWith("#!"))return"";let e=n.indexOf(` +`);return e===-1?n:n.slice(0,e)}var qe=R1;function U1(n){let e=qe(n);e&&(n=n.slice(e.length+1));let u=Le(n),{pragmas:t,comments:o}=Fe(u);return{shebang:e,text:n,pragmas:t,comments:o}}function Se(n){let{pragmas:e}=U1(n);return Object.prototype.hasOwnProperty.call(e,"prettier")||Object.prototype.hasOwnProperty.call(e,"format")}function M1(n){return n=typeof n=="function"?{parse:n}:n,{astFormat:"estree",hasPragma:Se,locStart:G,locEnd:u2,...n}}var Pe=M1;function J1(n){let{filepath:e}=n;if(e){if(e=e.toLowerCase(),e.endsWith(".cjs")||e.endsWith(".cts"))return"script";if(e.endsWith(".mjs")||e.endsWith(".mts"))return"module"}}var ve=J1;var j1={next:!0,ranges:!0,webcompat:!0,loc:!0,raw:!0,directives:!0,globalReturn:!0,impliedStrict:!1,preserveParens:!1,lexical:!1,jsx:!0,uniqueKeyInPattern:!1};function X1(n,e){let u=[],t=[],o=ae(n,{...j1,module:e==="module",onComment:u,onToken:t});return o.comments=u,o.tokens=t,o}function H1(n){let{message:e,loc:u}=n;if(!u)return n;let t=`[${[u.start,u.end].map(({line:o,column:i})=>[o,i].join(":")).join("-")}]: `;return e.startsWith(t)&&(e=e.slice(t.length)),ye(e,{loc:{start:{line:u.start.line,column:u.start.column+1},end:{line:u.end.line,column:u.end.column+1}},cause:n})}function z1(n,e={}){let u=ve(e),t=(u?[u]:["module","script"]).map(i=>()=>X1(n,i)),o;try{o=se(t)}catch({errors:[i]}){throw H1(i)}return we(o,{parser:"meriyah",text:n})}var K1=Pe(z1);var $0=Bn;export{$0 as default,wn as parsers}; diff --git a/node_modules/prettier/plugins/postcss.d.ts b/node_modules/prettier/plugins/postcss.d.ts new file mode 100644 index 0000000..493d3f4 --- /dev/null +++ b/node_modules/prettier/plugins/postcss.d.ts @@ -0,0 +1,7 @@ +import { Parser } from "../index.js"; + +export declare const parsers: { + css: Parser; + less: Parser; + scss: Parser; +}; diff --git a/node_modules/prettier/plugins/postcss.js b/node_modules/prettier/plugins/postcss.js new file mode 100644 index 0000000..5f141ad --- /dev/null +++ b/node_modules/prettier/plugins/postcss.js @@ -0,0 +1,54 @@ +(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.postcss=e()}})(function(){"use strict";var hl=Object.create;var Tt=Object.defineProperty;var dl=Object.getOwnPropertyDescriptor;var ml=Object.getOwnPropertyNames;var yl=Object.getPrototypeOf,gl=Object.prototype.hasOwnProperty;var g=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Zs=(t,e)=>{for(var s in e)Tt(t,s,{get:e[s],enumerable:!0})},en=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ml(e))!gl.call(t,n)&&n!==s&&Tt(t,n,{get:()=>e[n],enumerable:!(r=dl(e,n))||r.enumerable});return t};var xe=(t,e,s)=>(s=t!=null?hl(yl(t)):{},en(e||!t||!t.__esModule?Tt(s,"default",{value:t,enumerable:!0}):s,t)),wl=t=>en(Tt({},"__esModule",{value:!0}),t);var bi=g((bv,ss)=>{var _=String,xi=function(){return{isColorSupported:!1,reset:_,bold:_,dim:_,italic:_,underline:_,inverse:_,hidden:_,strikethrough:_,black:_,red:_,green:_,yellow:_,blue:_,magenta:_,cyan:_,white:_,gray:_,bgBlack:_,bgRed:_,bgGreen:_,bgYellow:_,bgBlue:_,bgMagenta:_,bgCyan:_,bgWhite:_,blackBright:_,redBright:_,greenBright:_,yellowBright:_,blueBright:_,magentaBright:_,cyanBright:_,whiteBright:_,bgBlackBright:_,bgRedBright:_,bgGreenBright:_,bgYellowBright:_,bgBlueBright:_,bgMagentaBright:_,bgCyanBright:_,bgWhiteBright:_}};ss.exports=xi();ss.exports.createColors=xi});var ns=g(()=>{});var Yt=g((kv,ki)=>{"use strict";var _i=bi(),Ei=ns(),ot=class t extends Error{constructor(e,s,r,n,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),typeof s<"u"&&typeof r<"u"&&(typeof s=="number"?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let s=this.source;e==null&&(e=_i.isColorSupported);let r=f=>f,n=f=>f,i=f=>f;if(e){let{bold:f,gray:p,red:l}=_i.createColors(!0);n=y=>f(l(y)),r=y=>p(y),Ei&&(i=y=>Ei(y))}let o=s.split(/\r?\n/),u=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),c=String(a).length;return o.slice(u,a).map((f,p)=>{let l=u+1+p,y=" "+(" "+l).slice(-c)+" | ";if(l===this.line){if(f.length>160){let h=20,d=Math.max(0,this.column-h),m=Math.max(this.column+h,this.endColumn+h),b=f.slice(d,m),w=r(y.replace(/\d/g," "))+f.slice(0,Math.min(this.column-1,h-1)).replace(/[^\t]/g," ");return n(">")+r(y)+i(b)+` + `+w+n("^")}let x=r(y.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+r(y)+i(f)+` + `+x+n("^")}return" "+r(y)+i(f)}).join(` +`)}toString(){let e=this.showSourceCode();return e&&(e=` + +`+e+` +`),this.name+": "+this.message+e}};ki.exports=ot;ot.default=ot});var Vt=g((Sv,Ti)=>{"use strict";var Si={after:` +`,beforeClose:` +`,beforeComment:` +`,beforeDecl:` +`,beforeOpen:" ",beforeRule:` +`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function wc(t){return t[0].toUpperCase()+t.slice(1)}var at=class{constructor(e){this.builder=e}atrule(e,s){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let i=(e.raws.between||"")+(s?";":"");this.builder(r+n+i,e)}}beforeAfter(e,s){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):s==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&n.type!=="root";)i+=1,n=n.parent;if(r.includes(` +`)){let o=this.raw(e,null,"indent");if(o.length)for(let u=0;u0&&e.nodes[s].type==="comment";)s-=1;let r=this.raw(e,"semicolon");for(let n=0;n{if(n=a.raws[s],typeof n<"u")return!1})}return typeof n>"u"&&(n=Si[r]),o.rawCache[r]=n,n}rawBeforeClose(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return s=r.raws.after,s.includes(` +`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawBeforeComment(e,s){let r;return e.walkComments(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(` +`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(s,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,s){let r;return e.walkDecls(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(` +`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(s,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let s;return e.walk(r=>{if(r.type!=="decl"&&(s=r.raws.between,typeof s<"u"))return!1}),s}rawBeforeRule(e){let s;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return s=r.raws.before,s.includes(` +`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawColon(e){let s;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return s=r.raws.between.replace(/[^\s:]/g,""),!1}),s}rawEmptyBody(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(s=r.raws.after,typeof s<"u"))return!1}),s}rawIndent(e){if(e.raws.indent)return e.raws.indent;let s;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof r.raws.before<"u"){let i=r.raws.before.split(` +`);return s=i[i.length-1],s=s.replace(/\S/g,""),!1}}),s}rawSemicolon(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(s=r.raws.semicolon,typeof s<"u"))return!1}),s}rawValue(e,s){let r=e[s],n=e.raws[s];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,s){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,s)}};Ti.exports=at;at.default=at});var ut=g((Tv,Ci)=>{"use strict";var vc=Vt();function is(t,e){new vc(e).stringify(t)}Ci.exports=is;is.default=is});var zt=g((Cv,os)=>{"use strict";os.exports.isClean=Symbol("isClean");os.exports.my=Symbol("my")});var pt=g((Ov,Oi)=>{"use strict";var xc=Yt(),bc=Vt(),_c=ut(),{isClean:lt,my:Ec}=zt();function as(t,e){let s=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let n=t[r],i=typeof n;r==="parent"&&i==="object"?e&&(s[r]=e):r==="source"?s[r]=n:Array.isArray(n)?s[r]=n.map(o=>as(o,s)):(i==="object"&&n!==null&&(n=as(n)),s[r]=n)}return s}function ct(t,e){if(e&&typeof e.offset<"u")return e.offset;let s=1,r=1,n=0;for(let i=0;ie.root().toProxy():e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="prop"||s==="value"||s==="name"||s==="params"||s==="important"||s==="text")&&e.markDirty()),!0}}}markClean(){this[lt]=!0}markDirty(){if(this[lt]){this[lt]=!1;let e=this;for(;e=e.parent;)e[lt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e){let s=this.source.start;if(e.index)s=this.positionInside(e.index);else if(e.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(ct(r,this.source.start),ct(r,this.source.end)).indexOf(e.word);i!==-1&&(s=this.positionInside(i))}return s}positionInside(e){let s=this.source.start.column,r=this.source.start.line,n="document"in this.source.input?this.source.input.document:this.source.input.css,i=ct(n,this.source.start),o=i+e;for(let u=i;utypeof a=="object"&&a.toJSON?a.toJSON(null,s):a);else if(typeof u=="object"&&u.toJSON)r[o]=u.toJSON(null,s);else if(o==="source"){let a=s.get(u.input);a==null&&(a=i,s.set(u.input,i),i++),r[o]={end:u.end,inputId:a,start:u.start}}else r[o]=u}return n&&(r.inputs=[...s.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=_c){e.stringify&&(e=e.stringify);let s="";return e(this,r=>{s+=r}),s}warn(e,s,r){let n={node:this};for(let i in r)n[i]=r[i];return e.warn(s,n)}};Oi.exports=ft;ft.default=ft});var Re=g((Av,Ai)=>{"use strict";var kc=pt(),ht=class extends kc{constructor(e){super(e),this.type="comment"}};Ai.exports=ht;ht.default=ht});var mt=g((Nv,Ni)=>{"use strict";var Sc=pt(),dt=class extends Sc{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}};Ni.exports=dt;dt.default=dt});var le=g((Pv,Ui)=>{"use strict";var Pi=Re(),Ri=mt(),Tc=pt(),{isClean:Ii,my:qi}=zt(),us,Li,Di,ls;function Bi(t){return t.map(e=>(e.nodes&&(e.nodes=Bi(e.nodes)),delete e.source,e))}function Mi(t){if(t[Ii]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)Mi(e)}var z=class t extends Tc{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let s of e){let r=this.normalize(s,this.last);for(let n of r)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let s of this.nodes)s.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let s=this.getIterator(),r,n;for(;this.indexes[s]e[s](...r.map(n=>typeof n=="function"?(i,o)=>n(i.toProxy(),o):n)):s==="every"||s==="some"?r=>e[s]((n,...i)=>r(n.toProxy(),...i)):s==="root"?()=>e.root().toProxy():s==="nodes"?e.nodes.map(r=>r.toProxy()):s==="first"||s==="last"?e[s].toProxy():e[s]:e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="name"||s==="params"||s==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,s){let r=this.index(e),n=this.normalize(s,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of n)this.proxyOf.nodes.splice(r+1,0,o);let i;for(let o in this.indexes)i=this.indexes[o],r"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Ri(e)]}else if(e.selector||e.selectors)e=[new ls(e)];else if(e.name)e=[new us(e)];else if(e.text)e=[new Pi(e)];else throw new Error("Unknown node type in node creation");return e.map(n=>(n[qi]||t.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[Ii]&&Mi(n),n.raws||(n.raws={}),typeof n.raws.before>"u"&&s&&typeof s.raws.before<"u"&&(n.raws.before=s.raws.before.replace(/\S/g,"")),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let s of e){let r=this.normalize(s,this.first,"prepend").reverse();for(let n of r)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let s;for(let r in this.indexes)s=this.indexes[r],s>=e&&(this.indexes[r]=s-1);return this.markDirty(),this}replaceValues(e,s,r){return r||(r=s,s={}),this.walkDecls(n=>{s.props&&!s.props.includes(n.prop)||s.fast&&!n.value.includes(s.fast)||(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((s,r)=>{let n;try{n=e(s,r)}catch(i){throw s.addToError(i)}return n!==!1&&s.walk&&(n=s.walk(e)),n})}walkAtRules(e,s){return s?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="atrule"&&e.test(r.name))return s(r,n)}):this.walk((r,n)=>{if(r.type==="atrule"&&r.name===e)return s(r,n)}):(s=e,this.walk((r,n)=>{if(r.type==="atrule")return s(r,n)}))}walkComments(e){return this.walk((s,r)=>{if(s.type==="comment")return e(s,r)})}walkDecls(e,s){return s?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="decl"&&e.test(r.prop))return s(r,n)}):this.walk((r,n)=>{if(r.type==="decl"&&r.prop===e)return s(r,n)}):(s=e,this.walk((r,n)=>{if(r.type==="decl")return s(r,n)}))}walkRules(e,s){return s?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="rule"&&e.test(r.selector))return s(r,n)}):this.walk((r,n)=>{if(r.type==="rule"&&r.selector===e)return s(r,n)}):(s=e,this.walk((r,n)=>{if(r.type==="rule")return s(r,n)}))}};z.registerParse=t=>{Li=t};z.registerRule=t=>{ls=t};z.registerAtRule=t=>{us=t};z.registerRoot=t=>{Di=t};Ui.exports=z;z.default=z;z.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,us.prototype):t.type==="rule"?Object.setPrototypeOf(t,ls.prototype):t.type==="decl"?Object.setPrototypeOf(t,Ri.prototype):t.type==="comment"?Object.setPrototypeOf(t,Pi.prototype):t.type==="root"&&Object.setPrototypeOf(t,Di.prototype),t[qi]=!0,t.nodes&&t.nodes.forEach(e=>{z.rebuild(e)})}});var $i=g((Rv,Fi)=>{var Cc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Oc=(t,e=21)=>(s=e)=>{let r="",n=s|0;for(;n--;)r+=t[Math.random()*t.length|0];return r},Ac=(t=21)=>{let e="",s=t|0;for(;s--;)e+=Cc[Math.random()*64|0];return e};Fi.exports={nanoid:Ac,customAlphabet:Oc}});var Wi=g(()=>{});var cs=g((Lv,Yi)=>{Yi.exports=class{}});var qe=g((Bv,ji)=>{"use strict";var{nanoid:Nc}=$i(),{isAbsolute:hs,resolve:ds}={},{SourceMapConsumer:Pc,SourceMapGenerator:Rc}=Wi(),{fileURLToPath:Vi,pathToFileURL:Gt}={},zi=Yt(),Ic=cs(),fs=ns(),ps=Symbol("fromOffsetCache"),qc=!!(Pc&&Rc),Gi=!!(ds&&hs),Ie=class{get from(){return this.file||this.id}constructor(e,s={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,s.document&&(this.document=s.document.toString()),s.from&&(!Gi||/^\w+:\/\//.test(s.from)||hs(s.from)?this.file=s.from:this.file=ds(s.from)),Gi&&qc){let r=new Ic(this.css,s);if(r.text){this.map=r;let n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(e,s,r,n={}){let i,o,u;if(s&&typeof s=="object"){let c=s,f=r;if(typeof c.offset=="number"){let p=this.fromOffset(c.offset);s=p.line,r=p.col}else s=c.line,r=c.column;if(typeof f.offset=="number"){let p=this.fromOffset(f.offset);o=p.line,i=p.col}else o=f.line,i=f.column}else if(!r){let c=this.fromOffset(s);s=c.line,r=c.col}let a=this.origin(s,r,o,i);return a?u=new zi(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,n.plugin):u=new zi(e,o===void 0?s:{column:r,line:s},o===void 0?r:{column:i,line:o},this.css,this.file,n.plugin),u.input={column:r,endColumn:i,endLine:o,line:s,source:this.css},this.file&&(Gt&&(u.input.url=Gt(this.file).toString()),u.input.file=this.file),u}fromOffset(e){let s,r;if(this[ps])r=this[ps];else{let i=this.css.split(` +`);r=new Array(i.length);let o=0;for(let u=0,a=i.length;u=s)n=r.length-1;else{let i=r.length-2,o;for(;n>1),e=r[o+1])n=o+1;else{n=o;break}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ds(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,s,r,n){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:s,line:e});if(!o.source)return!1;let u;typeof r=="number"&&(u=i.originalPositionFor({column:n,line:r}));let a;hs(o.source)?a=Gt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Gt(this.map.mapFile));let c={column:o.column,endColumn:u&&u.column,endLine:u&&u.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Vi)c.file=Vi(a);else throw new Error("file: protocol is not available in this PostCSS build");let f=i.sourceContentFor(o.source);return f&&(c.source=f),c}toJSON(){let e={};for(let s of["hasBOM","css","file","id"])this[s]!=null&&(e[s]=this[s]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};ji.exports=Ie;Ie.default=Ie;fs&&fs.registerInput&&fs.registerInput(Ie)});var jt=g((Mv,Ki)=>{"use strict";var Hi=le(),Le=class extends Hi{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};Ki.exports=Le;Le.default=Le;Hi.registerAtRule(Le)});var De=g((Uv,Zi)=>{"use strict";var Qi=le(),Ji,Xi,ce=class extends Qi{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,s,r){let n=super.normalize(e);if(s){if(r==="prepend")this.nodes.length>1?s.raws.before=this.nodes[1].raws.before:delete s.raws.before;else if(this.first!==s)for(let i of n)i.raws.before=s.raws.before}return n}removeChild(e,s){let r=this.index(e);return!s&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Ji(new Xi,this,e).stringify()}};ce.registerLazyResult=t=>{Ji=t};ce.registerProcessor=t=>{Xi=t};Zi.exports=ce;ce.default=ce;Qi.registerRoot(ce)});var ms=g((Fv,eo)=>{"use strict";var yt={comma(t){return yt.split(t,[","],!0)},space(t){let e=[" ",` +`," "];return yt.split(t,e)},split(t,e,s){let r=[],n="",i=!1,o=0,u=!1,a="",c=!1;for(let f of t)c?c=!1:f==="\\"?c=!0:u?f===a&&(u=!1):f==='"'||f==="'"?(u=!0,a=f):f==="("?o+=1:f===")"?o>0&&(o-=1):o===0&&e.includes(f)&&(i=!0),i?(n!==""&&r.push(n.trim()),n="",i=!1):n+=f;return(s||n!=="")&&r.push(n.trim()),r}};eo.exports=yt;yt.default=yt});var Ht=g(($v,ro)=>{"use strict";var to=le(),Lc=ms(),Be=class extends to{get selectors(){return Lc.comma(this.selector)}set selectors(e){let s=this.selector?this.selector.match(/,\s*/):null,r=s?s[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};ro.exports=Be;Be.default=Be;to.registerRule(Be)});var Jt=g((Wv,no)=>{"use strict";var Kt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Qt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Dc=/.[\r\n"'(/\\]/,so=/[\da-f]/i;no.exports=function(e,s={}){let r=e.css.valueOf(),n=s.ignoreErrors,i,o,u,a,c,f,p,l,y,x,h=r.length,d=0,m=[],b=[];function w(){return d}function v(W){throw e.error("Unclosed "+W,d)}function N(){return b.length===0&&d>=h}function F(W){if(b.length)return b.pop();if(d>=h)return;let T=W?W.ignoreUnclosed:!1;switch(i=r.charCodeAt(d),i){case 10:case 32:case 9:case 13:case 12:{a=d;do a+=1,i=r.charCodeAt(a);while(i===32||i===10||i===9||i===13||i===12);f=["space",r.slice(d,a)],d=a-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let C=String.fromCharCode(i);f=[C,C,d];break}case 40:{if(x=m.length?m.pop()[1]:"",y=r.charCodeAt(d+1),x==="url"&&y!==39&&y!==34&&y!==32&&y!==10&&y!==9&&y!==12&&y!==13){a=d;do{if(p=!1,a=r.indexOf(")",a+1),a===-1)if(n||T){a=d;break}else v("bracket");for(l=a;r.charCodeAt(l-1)===92;)l-=1,p=!p}while(p);f=["brackets",r.slice(d,a+1),d,a],d=a}else a=r.indexOf(")",d+1),o=r.slice(d,a+1),a===-1||Dc.test(o)?f=["(","(",d]:(f=["brackets",o,d,a],d=a);break}case 39:case 34:{c=i===39?"'":'"',a=d;do{if(p=!1,a=r.indexOf(c,a+1),a===-1)if(n||T){a=d+1;break}else v("string");for(l=a;r.charCodeAt(l-1)===92;)l-=1,p=!p}while(p);f=["string",r.slice(d,a+1),d,a],d=a;break}case 64:{Kt.lastIndex=d+1,Kt.test(r),Kt.lastIndex===0?a=r.length-1:a=Kt.lastIndex-2,f=["at-word",r.slice(d,a+1),d,a],d=a;break}case 92:{for(a=d,u=!0;r.charCodeAt(a+1)===92;)a+=1,u=!u;if(i=r.charCodeAt(a+1),u&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(a+=1,so.test(r.charAt(a)))){for(;so.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===32&&(a+=1)}f=["word",r.slice(d,a+1),d,a],d=a;break}default:{i===47&&r.charCodeAt(d+1)===42?(a=r.indexOf("*/",d+2)+1,a===0&&(n||T?a=r.length:v("comment")),f=["comment",r.slice(d,a+1),d,a],d=a):(Qt.lastIndex=d+1,Qt.test(r),Qt.lastIndex===0?a=r.length-1:a=Qt.lastIndex-2,f=["word",r.slice(d,a+1),d,a],m.push(f),d=a);break}}return d++,f}function Q(W){b.push(W)}return{back:Q,endOfFile:N,nextToken:F,position:w}}});var Xt=g((Yv,ao)=>{"use strict";var Bc=jt(),Mc=Re(),Uc=mt(),Fc=De(),io=Ht(),$c=Jt(),oo={empty:!0,space:!0};function Wc(t){for(let e=t.length-1;e>=0;e--){let s=t[e],r=s[3]||s[2];if(r)return r}}var ys=class{constructor(e){this.input=e,this.root=new Fc,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let s=new Bc;s.name=e[1].slice(1),s.name===""&&this.unnamedAtrule(s,e),this.init(s,e[2]);let r,n,i,o=!1,u=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(a.length>0){for(i=a.length-1,n=a[i];n&&n[0]==="space";)n=a[--i];n&&(s.source.end=this.getPosition(n[3]||n[2]),s.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(s.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(s,"params",a),o&&(e=a[a.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),u&&(s.nodes=[],this.current=s)}checkMissedSemicolon(e){let s=this.colon(e);if(s===!1)return;let r=0,n;for(let i=s-1;i>=0&&(n=e[i],!(n[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(e){let s=0,r,n,i;for(let[o,u]of e.entries()){if(n=u,i=n[0],i==="("&&(s+=1),i===")"&&(s-=1),s===0&&i===":")if(!r)this.doubleColon(n);else{if(r[0]==="word"&&r[1]==="progid")continue;return o}r=n}return!1}comment(e){let s=new Mc;this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))s.text="",s.raws.left=r,s.raws.right="";else{let n=r.match(/^(\s*)([^]*\S)(\s*)$/);s.text=n[2],s.raws.left=n[1],s.raws.right=n[3]}}createTokenizer(){this.tokenizer=$c(this.input)}decl(e,s){let r=new Uc;this.init(r,e[0][2]);let n=e[e.length-1];for(n[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||Wc(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let i;for(;e.length;)if(i=e.shift(),i[0]===":"){r.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],u;for(;e.length&&(u=e[0][0],!(u!=="space"&&u!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(i=e[c],i[1].toLowerCase()==="!important"){r.important=!0;let f=this.stringFrom(e,c);f=this.spacesFromEnd(e)+f,f!==" !important"&&(r.raws.important=f);break}else if(i[1].toLowerCase()==="important"){let f=e.slice(0),p="";for(let l=c;l>0;l--){let y=f[l][0];if(p.trim().startsWith("!")&&y!=="space")break;p=f.pop()[1]+p}p.trim().startsWith("!")&&(r.important=!0,r.raws.important=p,e=f)}if(i[0]!=="space"&&i[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),s),r.value.includes(":")&&!s&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let s=new io;this.init(s,e[2]),s.selector="",s.raws.between="",this.current=s}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let s=this.current.nodes[this.current.nodes.length-1];s&&s.type==="rule"&&!s.raws.ownSemicolon&&(s.raws.ownSemicolon=this.spaces,this.spaces="",s.source.end=this.getPosition(e[2]),s.source.end.offset+=s.raws.ownSemicolon.length)}}getPosition(e){let s=this.input.fromOffset(e);return{column:s.col,line:s.line,offset:e}}init(e,s){this.current.push(e),e.source={input:this.input,start:this.getPosition(s)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let s=!1,r=null,n=!1,i=null,o=[],u=e[1].startsWith("--"),a=[],c=e;for(;c;){if(r=c[0],a.push(c),r==="("||r==="[")i||(i=c),o.push(r==="("?")":"]");else if(u&&n&&r==="{")i||(i=c),o.push("}");else if(o.length===0)if(r===";")if(n){this.decl(a,u);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),s=!0;break}else r===":"&&(n=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(s=!0),o.length>0&&this.unclosedBracket(i),s&&n){if(!u)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,u)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,s,r,n){let i,o,u=r.length,a="",c=!0,f,p;for(let l=0;ly+x[1],"");e.raws[s]={raw:l,value:a}}e[s]=a}rule(e){e.pop();let s=new io;this.init(s,e[0][2]),s.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(s,"selector",e),this.current=s}spacesAndCommentsFromEnd(e){let s,r="";for(;e.length&&(s=e[e.length-1][0],!(s!=="space"&&s!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let s,r="";for(;e.length&&(s=e[0][0],!(s!=="space"&&s!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let s,r="";for(;e.length&&(s=e[e.length-1][0],s==="space");)r=e.pop()[1]+r;return r}stringFrom(e,s){let r="";for(let n=s;n{"use strict";var Yc=le(),Vc=qe(),zc=Xt();function Zt(t,e){let s=new Vc(t,e),r=new zc(s);try{r.parse()}catch(n){throw n}return r.root}uo.exports=Zt;Zt.default=Zt;Yc.registerParse(Zt)});var lo=g((zv,gs)=>{var Gc=Jt(),jc=qe();gs.exports={isInlineComment(t){if(t[0]==="word"&&t[1].slice(0,2)==="//"){let e=t,s=[],r,n;for(;t;){if(/\r?\n/.test(t[1])){if(/['"].*\r?\n/.test(t[1])){s.push(t[1].substring(0,t[1].indexOf(` +`))),n=t[1].substring(t[1].indexOf(` +`));let o=this.input.css.valueOf().substring(this.tokenizer.position());n+=o,r=t[3]+o.length-n.length}else this.tokenizer.back(t);break}s.push(t[1]),r=t[2],t=this.tokenizer.nextToken({ignoreUnclosed:!0})}let i=["comment",s.join(""),e[2],r];return this.inlineComment(i),n&&(this.input=new jc(n),this.tokenizer=Gc(this.input)),!0}else if(t[1]==="/"){let e=this.tokenizer.nextToken({ignoreUnclosed:!0});if(e[0]==="comment"&&/^\/\*/.test(e[1]))return e[0]="word",e[1]=e[1].slice(1),t[1]="//",this.tokenizer.back(e),gs.exports.isInlineComment.bind(this)(t)}return!1}}});var fo=g((Gv,co)=>{co.exports={interpolation(t){let e=[t,this.tokenizer.nextToken()],s=["word","}"];if(e[0][1].length>1||e[1][0]!=="{")return this.tokenizer.back(e[1]),!1;for(t=this.tokenizer.nextToken();t&&s.includes(t[0]);)e.push(t),t=this.tokenizer.nextToken();let r=e.map(u=>u[1]),[n]=e,i=e.pop(),o=["word",r.join(""),n[2],i[2]];return this.tokenizer.back(t),this.tokenizer.back(o),!0}}});var ho=g((jv,po)=>{var Hc=/^#[0-9a-fA-F]{6}$|^#[0-9a-fA-F]{3}$/,Kc=/\.[0-9]/,Qc=t=>{let[,e]=t,[s]=e;return(s==="."||s==="#")&&Hc.test(e)===!1&&Kc.test(e)===!1};po.exports={isMixinToken:Qc}});var yo=g((Hv,mo)=>{var Jc=Jt(),Xc=/^url\((.+)\)/;mo.exports=t=>{let{name:e,params:s=""}=t;if(e==="import"&&s.length){t.import=!0;let r=Jc({css:s});for(t.filename=s.replace(Xc,"$1");!r.endOfFile();){let[n,i]=r.nextToken();if(n==="word"&&i==="url")return;if(n==="brackets"){t.options=i,t.filename=s.replace(i,"").trim();break}}}}});var xo=g((Kv,vo)=>{var go=/:$/,wo=/^:(\s+)?/;vo.exports=t=>{let{name:e,params:s=""}=t;if(t.name.slice(-1)===":"){if(go.test(e)){let[r]=e.match(go);t.name=e.replace(r,""),t.raws.afterName=r+(t.raws.afterName||""),t.variable=!0,t.value=t.params}if(wo.test(s)){let[r]=s.match(wo);t.value=s.replace(r,""),t.raws.afterName=(t.raws.afterName||"")+r,t.variable=!0}}}});var Eo=g((Jv,_o)=>{var Zc=Re(),ef=Xt(),{isInlineComment:tf}=lo(),{interpolation:bo}=fo(),{isMixinToken:rf}=ho(),sf=yo(),nf=xo(),of=/(!\s*important)$/i;_o.exports=class extends ef{constructor(...e){super(...e),this.lastNode=null}atrule(e){bo.bind(this)(e)||(super.atrule(e),sf(this.lastNode),nf(this.lastNode))}decl(...e){super.decl(...e),/extend\(.+\)/i.test(this.lastNode.value)&&(this.lastNode.extend=!0)}each(e){e[0][1]=` ${e[0][1]}`;let s=e.findIndex(u=>u[0]==="("),r=e.reverse().find(u=>u[0]===")"),n=e.reverse().indexOf(r),o=e.splice(s,n).map(u=>u[1]).join("");for(let u of e.reverse())this.tokenizer.back(u);this.atrule(this.tokenizer.nextToken()),this.lastNode.function=!0,this.lastNode.params=o}init(e,s,r){super.init(e,s,r),this.lastNode=e}inlineComment(e){let s=new Zc,r=e[1].slice(2);if(this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.inline=!0,s.raws.begin="//",/^\s*$/.test(r))s.text="",s.raws.left=r,s.raws.right="";else{let n=r.match(/^(\s*)([^]*[^\s])(\s*)$/);[,s.raws.left,s.text,s.raws.right]=n}}mixin(e){let[s]=e,r=s[1].slice(0,1),n=e.findIndex(c=>c[0]==="brackets"),i=e.findIndex(c=>c[0]==="("),o="";if((n<0||n>3)&&i>0){let c=e.reduce((w,v,N)=>v[0]===")"?N:w),p=e.slice(i,c+i).map(w=>w[1]).join(""),[l]=e.slice(i),y=[l[2],l[3]],[x]=e.slice(c,c+1),h=[x[2],x[3]],d=["brackets",p].concat(y,h),m=e.slice(0,i),b=e.slice(c+1);e=m,e.push(d),e=e.concat(b)}let u=[];for(let c of e)if((c[1]==="!"||u.length)&&u.push(c),c[1]==="important")break;if(u.length){let[c]=u,f=e.indexOf(c),p=u[u.length-1],l=[c[2],c[3]],y=[p[4],p[5]],h=["word",u.map(d=>d[1]).join("")].concat(l,y);e.splice(f,u.length,h)}let a=e.findIndex(c=>of.test(c[1]));a>0&&([,o]=e[a],e.splice(a,1));for(let c of e.reverse())this.tokenizer.back(c);this.atrule(this.tokenizer.nextToken()),this.lastNode.mixin=!0,this.lastNode.raws.identifier=r,o&&(this.lastNode.important=!0,this.lastNode.raws.important=o)}other(e){tf.bind(this)(e)||super.other(e)}rule(e){let s=e[e.length-1],r=e[e.length-2];if(r[0]==="at-word"&&s[0]==="{"&&(this.tokenizer.back(s),bo.bind(this)(r))){let i=this.tokenizer.nextToken();e=e.slice(0,e.length-2).concat([i]);for(let o of e.reverse())this.tokenizer.back(o);return}super.rule(e),/:extend\(.+\)/i.test(this.lastNode.selector)&&(this.lastNode.extend=!0)}unknownWord(e){let[s]=e;if(e[0][1]==="each"&&e[1][0]==="("){this.each(e);return}if(rf(s)){this.mixin(e);return}super.unknownWord(e)}}});var So=g((Zv,ko)=>{var af=Vt();ko.exports=class extends af{atrule(e,s){if(!e.mixin&&!e.variable&&!e.function){super.atrule(e,s);return}let n=`${e.function?"":e.raws.identifier||"@"}${e.name}`,i=e.params?this.rawValue(e,"params"):"",o=e.raws.important||"";if(e.variable&&(i=e.value),typeof e.raws.afterName<"u"?n+=e.raws.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i+o);else{let u=(e.raws.between||"")+o+(s?";":"");this.builder(n+i+u,e)}}comment(e){if(e.inline){let s=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(`//${s}${e.text}${r}`,e)}else super.comment(e)}}});var To=g((ex,ws)=>{var uf=qe(),lf=Eo(),cf=So();ws.exports={parse(t,e){let s=new uf(t,e),r=new lf(s);return r.parse(),r.root.walk(n=>{let i=s.css.lastIndexOf(n.source.input.css);if(i===0)return;if(i+n.source.input.css.length!==s.css.length)throw new Error("Invalid state detected in postcss-less");let o=i+n.source.start.offset,u=s.fromOffset(i+n.source.start.offset);if(n.source.start={offset:o,line:u.line,column:u.col},n.source.end){let a=i+n.source.end.offset,c=s.fromOffset(i+n.source.end.offset);n.source.end={offset:a,line:c.line,column:c.col}}}),r.root},stringify(t,e){new cf(e).stringify(t)},nodeToString(t){let e="";return ws.exports.stringify(t,s=>{e+=s}),e}}});var er=g((tx,Ao)=>{"use strict";var ff=le(),Co,Oo,ye=class extends ff{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Co(new Oo,this,e).stringify()}};ye.registerLazyResult=t=>{Co=t};ye.registerProcessor=t=>{Oo=t};Ao.exports=ye;ye.default=ye});var Po=g((rx,No)=>{"use strict";var pf=jt(),hf=Re(),df=mt(),mf=qe(),yf=cs(),gf=De(),wf=Ht();function wt(t,e){if(Array.isArray(t))return t.map(n=>wt(n));let{inputs:s,...r}=t;if(s){e=[];for(let n of s){let i={...n,__proto__:mf.prototype};i.map&&(i.map={...i.map,__proto__:yf.prototype}),e.push(i)}}if(r.nodes&&(r.nodes=t.nodes.map(n=>wt(n,e))),r.source){let{inputId:n,...i}=r.source;r.source=i,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new gf(r);if(r.type==="decl")return new df(r);if(r.type==="rule")return new wf(r);if(r.type==="comment")return new hf(r);if(r.type==="atrule")return new pf(r);throw new Error("Unknown node type: "+t.type)}No.exports=wt;wt.default=wt});var vs=g((sx,Ro)=>{Ro.exports=class{generate(){}}});var xs=g((ix,Io)=>{"use strict";var vt=class{constructor(e,s={}){if(this.type="warning",this.text=e,s.node&&s.node.source){let r=s.node.rangeBy(s);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in s)this[r]=s[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};Io.exports=vt;vt.default=vt});var tr=g((ox,qo)=>{"use strict";var vf=xs(),xt=class{get content(){return this.css}constructor(e,s,r){this.processor=e,this.messages=[],this.root=s,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,s={}){s.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(s.plugin=this.lastPlugin.postcssPlugin);let r=new vf(e,s);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};qo.exports=xt;xt.default=xt});var bs=g((ax,Do)=>{"use strict";var Lo={};Do.exports=function(e){Lo[e]||(Lo[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))}});var ks=g((lx,Fo)=>{"use strict";var xf=le(),bf=er(),_f=vs(),Ef=gt(),Bo=tr(),kf=De(),Sf=ut(),{isClean:K,my:Tf}=zt(),ux=bs(),Cf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Of={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Af={Once:!0,postcssPlugin:!0,prepare:!0},Me=0;function bt(t){return typeof t=="object"&&typeof t.then=="function"}function Uo(t){let e=!1,s=Cf[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[s,s+"-"+e,Me,s+"Exit",s+"Exit-"+e]:e?[s,s+"-"+e,s+"Exit",s+"Exit-"+e]:t.append?[s,Me,s+"Exit"]:[s,s+"Exit"]}function Mo(t){let e;return t.type==="document"?e=["Document",Me,"DocumentExit"]:t.type==="root"?e=["Root",Me,"RootExit"]:e=Uo(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function _s(t){return t[K]=!1,t.nodes&&t.nodes.forEach(e=>_s(e)),t}var Es={},fe=class t{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,s,r){this.stringified=!1,this.processed=!1;let n;if(typeof s=="object"&&s!==null&&(s.type==="root"||s.type==="document"))n=_s(s);else if(s instanceof t||s instanceof Bo)n=_s(s.root),s.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let i=Ef;r.syntax&&(i=r.syntax.parse),r.parser&&(i=r.parser),i.parse&&(i=i.parse);try{n=i(s,r)}catch(o){this.processed=!0,this.error=o}n&&!n[Tf]&&xf.rebuild(n)}this.result=new Bo(e,n,r),this.helpers={...Es,postcss:Es,result:this.result},this.plugins=this.processor.plugins.map(i=>typeof i=="object"&&i.prepare?{...i,...i.prepare(this.result)}:i)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,s){let r=this.result.lastPlugin;try{s&&s.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(n){console&&console.error&&console.error(n)}return e}prepareVisitors(){this.listeners={};let e=(s,r,n)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([s,n])};for(let s of this.plugins)if(typeof s=="object")for(let r in s){if(!Of[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${s.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Af[r])if(typeof s[r]=="object")for(let n in s[r])n==="*"?e(s,r,s[r][n]):e(s,r+"-"+n.toLowerCase(),s[r][n]);else typeof s[r]=="function"&&e(s,r,s[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e0;){let r=this.visitTick(s);if(bt(r))try{await r}catch(n){let i=s[s.length-1].node;throw this.handleError(n,i)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;try{if(e.type==="document"){let n=e.nodes.map(i=>r(i,this.helpers));await Promise.all(n)}else await r(e,this.helpers)}catch(n){throw this.handleError(n)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let s=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return bt(s[0])?Promise.all(s):s}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(s){throw this.handleError(s)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,s=Sf;e.syntax&&(s=e.syntax.stringify),e.stringifier&&(s=e.stringifier),s.stringify&&(s=s.stringify);let n=new _f(s,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let s=this.runOnRoot(e);if(bt(s))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[K];)e[K]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let s of e.nodes)this.visitSync(this.listeners.OnceExit,s);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,s){return this.async().then(e,s)}toString(){return this.css}visitSync(e,s){for(let[r,n]of e){this.result.lastPlugin=r;let i;try{i=n(s,this.helpers)}catch(o){throw this.handleError(o,s.proxyOf)}if(s.type!=="root"&&s.type!=="document"&&!s.parent)return!0;if(bt(i))throw this.getAsyncError()}}visitTick(e){let s=e[e.length-1],{node:r,visitors:n}=s;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(n.length>0&&s.visitorIndex{n[K]||this.walkSync(n)});else{let n=this.listeners[r];if(n&&this.visitSync(n,e.toProxy()))return}}warnings(){return this.sync().warnings()}};fe.registerPostcss=t=>{Es=t};Fo.exports=fe;fe.default=fe;kf.registerLazyResult(fe);bf.registerLazyResult(fe)});var Wo=g((fx,$o)=>{"use strict";var Nf=vs(),Pf=gt(),Rf=tr(),If=ut(),cx=bs(),_t=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,s=Pf;try{e=s(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,s,r){s=s.toString(),this.stringified=!1,this._processor=e,this._css=s,this._opts=r,this._map=void 0;let n,i=If;this.result=new Rf(this._processor,n,this._opts),this.result.css=s;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let u=new Nf(i,n,this._opts,s);if(u.isMap()){let[a,c]=u.generate();a&&(this.result.css=a),c&&(this.result.map=c)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,s){return this.async().then(e,s)}toString(){return this._css}warnings(){return[]}};$o.exports=_t;_t.default=_t});var Vo=g((px,Yo)=>{"use strict";var qf=er(),Lf=ks(),Df=Wo(),Bf=De(),ge=class{constructor(e=[]){this.version="8.5.3",this.plugins=this.normalize(e)}normalize(e){let s=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))s=s.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)s.push(r);else if(typeof r=="function")s.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return s}process(e,s={}){return!this.plugins.length&&!s.parser&&!s.stringifier&&!s.syntax?new Df(this,e,s):new Lf(this,e,s)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};Yo.exports=ge;ge.default=ge;Bf.registerProcessor(ge);qf.registerProcessor(ge)});var rr=g((hx,Jo)=>{"use strict";var zo=jt(),Go=Re(),Mf=le(),Uf=Yt(),jo=mt(),Ho=er(),Ff=Po(),$f=qe(),Wf=ks(),Yf=ms(),Vf=pt(),zf=gt(),Ss=Vo(),Gf=tr(),Ko=De(),Qo=Ht(),jf=ut(),Hf=xs();function k(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new Ss(t)}k.plugin=function(e,s){let r=!1;function n(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: +https://evilmartians.com/chronicles/postcss-8-plugin-migration`));let u=s(...o);return u.postcssPlugin=e,u.postcssVersion=new Ss().version,u}let i;return Object.defineProperty(n,"postcss",{get(){return i||(i=n()),i}}),n.process=function(o,u,a){return k([n(a)]).process(o,u)},n};k.stringify=jf;k.parse=zf;k.fromJSON=Ff;k.list=Yf;k.comment=t=>new Go(t);k.atRule=t=>new zo(t);k.decl=t=>new jo(t);k.rule=t=>new Qo(t);k.root=t=>new Ko(t);k.document=t=>new Ho(t);k.CssSyntaxError=Uf;k.Declaration=jo;k.Container=Mf;k.Processor=Ss;k.Document=Ho;k.Comment=Go;k.Warning=Hf;k.AtRule=zo;k.Result=Gf;k.Input=$f;k.Rule=Qo;k.Root=Ko;k.Node=Vf;Wf.registerPostcss(k);Jo.exports=k;k.default=k});var Zo=g((dx,Xo)=>{var{Container:Kf}=rr(),Ts=class extends Kf{constructor(e){super(e),this.type="decl",this.isNested=!0,this.nodes||(this.nodes=[])}};Xo.exports=Ts});var ra=g((mx,ta)=>{"use strict";var sr=/[\t\n\f\r "#'()/;[\\\]{}]/g,nr=/[,\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Qf=/.[\r\n"'(/\\]/,ea=/[\da-f]/i,ir=/[\n\f\r]/g;ta.exports=function(e,s={}){let r=e.css.valueOf(),n=s.ignoreErrors,i,o,u,a,c,f,p,l,y,x=r.length,h=0,d=[],m=[],b;function w(){return h}function v(T){throw e.error("Unclosed "+T,h)}function N(){return m.length===0&&h>=x}function F(){let T=1,C=!1,O=!1;for(;T>0;)o+=1,r.length<=o&&v("interpolation"),i=r.charCodeAt(o),l=r.charCodeAt(o+1),C?!O&&i===C?(C=!1,O=!1):i===92?O=!O:O&&(O=!1):i===39||i===34?C=i:i===125?T-=1:i===35&&l===123&&(T+=1)}function Q(T){if(m.length)return m.pop();if(h>=x)return;let C=T?T.ignoreUnclosed:!1;switch(i=r.charCodeAt(h),i){case 10:case 32:case 9:case 13:case 12:{o=h;do o+=1,i=r.charCodeAt(o);while(i===32||i===10||i===9||i===13||i===12);y=["space",r.slice(h,o)],h=o-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let O=String.fromCharCode(i);y=[O,O,h];break}case 44:{y=["word",",",h,h+1];break}case 40:{if(p=d.length?d.pop()[1]:"",l=r.charCodeAt(h+1),p==="url"&&l!==39&&l!==34){for(b=1,f=!1,o=h+1;o<=r.length-1;){if(l=r.charCodeAt(o),l===92)f=!f;else if(l===40)b+=1;else if(l===41&&(b-=1,b===0))break;o+=1}a=r.slice(h,o+1),y=["brackets",a,h,o],h=o}else o=r.indexOf(")",h+1),a=r.slice(h,o+1),o===-1||Qf.test(a)?y=["(","(",h]:(y=["brackets",a,h,o],h=o);break}case 39:case 34:{for(u=i,o=h,f=!1;o{var{Comment:Jf}=rr(),Xf=Xt(),Zf=Zo(),ep=ra(),Cs=class extends Xf{atrule(e){let s=e[1],r=e;for(;!this.tokenizer.endOfFile();){let n=this.tokenizer.nextToken();if(n[0]==="word"&&n[2]===r[3]+1)s+=n[1],r=n;else{this.tokenizer.back(n);break}}super.atrule(["at-word",s,e[2],r[3]])}comment(e){if(e[4]==="inline"){let s=new Jf;this.init(s,e[2]),s.raws.inline=!0;let r=this.input.fromOffset(e[3]);s.source.end={column:r.col,line:r.line,offset:e[3]+1};let n=e[1].slice(2);if(/^\s*$/.test(n))s.text="",s.raws.left=n,s.raws.right="";else{let i=n.match(/^(\s*)([^]*\S)(\s*)$/),o=i[2].replace(/(\*\/|\/\*)/g,"*//*");s.text=o,s.raws.left=i[1],s.raws.right=i[3],s.raws.text=i[2]}}else super.comment(e)}createTokenizer(){this.tokenizer=ep(this.input)}raw(e,s,r,n){if(super.raw(e,s,r,n),e.raws[s]){let i=e.raws[s].raw;e.raws[s].raw=r.reduce((o,u)=>{if(u[0]==="comment"&&u[4]==="inline"){let a=u[1].slice(2).replace(/(\*\/|\/\*)/g,"*//*");return o+"/*"+a+"*/"}else return o+u[1]},""),i!==e.raws[s].raw&&(e.raws[s].scss=i)}}rule(e){let s=!1,r=0,n="";for(let i of e)if(s)i[0]!=="comment"&&i[0]!=="{"&&(n+=i[1]);else{if(i[0]==="space"&&i[1].includes(` +`))break;i[0]==="("?r+=1:i[0]===")"?r-=1:r===0&&i[0]===":"&&(s=!0)}if(!s||n.trim()===""||/^[#:A-Za-z-]/.test(n))super.rule(e);else{e.pop();let i=new Zf;this.init(i,e[0][2]);let o;for(let a=e.length-1;a>=0;a--)if(e[a][0]!=="space"){o=e[a];break}if(o[3]){let a=this.input.fromOffset(o[3]);i.source.end={column:a.col,line:a.line,offset:o[3]+1}}else{let a=this.input.fromOffset(o[2]);i.source.end={column:a.col,line:a.line,offset:o[2]+1}}for(;e[0][0]!=="word";)i.raws.before+=e.shift()[1];if(e[0][2]){let a=this.input.fromOffset(e[0][2]);i.source.start={column:a.col,line:a.line,offset:e[0][2]}}for(i.prop="";e.length;){let a=e[0][0];if(a===":"||a==="space"||a==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let u;for(;e.length;)if(u=e.shift(),u[0]===":"){i.raws.between+=u[1];break}else i.raws.between+=u[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1)),i.raws.between+=this.spacesAndCommentsFromStart(e),this.precheckMissedSemicolon(e);for(let a=e.length-1;a>0;a--){if(u=e[a],u[1]==="!important"){i.important=!0;let c=this.stringFrom(e,a);c=this.spacesFromEnd(e)+c,c!==" !important"&&(i.raws.important=c);break}else if(u[1]==="important"){let c=e.slice(0),f="";for(let p=a;p>0;p--){let l=c[p][0];if(f.trim().indexOf("!")===0&&l!=="space")break;f=c.pop()[1]+f}f.trim().indexOf("!")===0&&(i.important=!0,i.raws.important=f,e=c)}if(u[0]!=="space"&&u[0]!=="comment")break}this.raw(i,"value",e),i.value.includes(":")&&this.checkMissedSemicolon(e),this.current=i}}};sa.exports=Cs});var oa=g((gx,ia)=>{var{Input:tp}=rr(),rp=na();ia.exports=function(e,s){let r=new tp(e,s),n=new rp(r);return n.parse(),n.root}});var As=g(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});function np(t){this.after=t.after,this.before=t.before,this.type=t.type,this.value=t.value,this.sourceIndex=t.sourceIndex}Os.default=np});var Ps=g(Ns=>{"use strict";Object.defineProperty(Ns,"__esModule",{value:!0});var ip=As(),ua=op(ip);function op(t){return t&&t.__esModule?t:{default:t}}function Et(t){var e=this;this.constructor(t),this.nodes=t.nodes,this.after===void 0&&(this.after=this.nodes.length>0?this.nodes[this.nodes.length-1].after:""),this.before===void 0&&(this.before=this.nodes.length>0?this.nodes[0].before:""),this.sourceIndex===void 0&&(this.sourceIndex=this.before.length),this.nodes.forEach(function(s){s.parent=e})}Et.prototype=Object.create(ua.default.prototype);Et.constructor=ua.default;Et.prototype.walk=function(e,s){for(var r=typeof e=="string"||e instanceof RegExp,n=r?s:e,i=typeof e=="string"?new RegExp(e):e,o=0;o{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.parseMediaFeature=fa;kt.parseMediaQuery=Is;kt.parseMediaList=lp;var ap=As(),la=ca(ap),up=Ps(),Rs=ca(up);function ca(t){return t&&t.__esModule?t:{default:t}}function fa(t){var e=arguments.length<=1||arguments[1]===void 0?0:arguments[1],s=[{mode:"normal",character:null}],r=[],n=0,i="",o=null,u=null,a=e,c=t;t[0]==="("&&t[t.length-1]===")"&&(c=t.substring(1,t.length-1),a++);for(var f=0;f0&&(s[c-1].after=i.before),i.type===void 0){if(c>0){if(s[c-1].type==="media-feature-expression"){i.type="keyword";continue}if(s[c-1].value==="not"||s[c-1].value==="only"){i.type="media-type";continue}if(s[c-1].value==="and"){i.type="media-feature-expression";continue}s[c-1].type==="media-type"&&(s[c+1]?i.type=s[c+1].type==="media-feature-expression"?"keyword":"media-feature-expression":i.type="media-feature-expression")}if(c===0){if(!s[c+1]){i.type="media-type";continue}if(s[c+1]&&(s[c+1].type==="media-feature-expression"||s[c+1].type==="keyword")){i.type="media-type";continue}if(s[c+2]){if(s[c+2].type==="media-feature-expression"){i.type="media-type",s[c+1].type="keyword";continue}if(s[c+2].type==="keyword"){i.type="keyword",s[c+1].type="media-type";continue}}if(s[c+3]&&s[c+3].type==="media-feature-expression"){i.type="keyword",s[c+1].type="media-type",s[c+2].type="keyword";continue}}}return s}function lp(t){var e=[],s=0,r=0,n=/^(\s*)url\s*\(/.exec(t);if(n!==null){for(var i=n[0].length,o=1;o>0;){var u=t[i];u==="("&&o++,u===")"&&o--,i++}e.unshift(new la.default({type:"url",value:t.substring(0,i).trim(),sourceIndex:n[1].length,before:n[1],after:/^(\s*)/.exec(t.substring(i))[1]})),s=i}for(var a=s;a{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});qs.default=dp;var cp=Ps(),fp=hp(cp),pp=pa();function hp(t){return t&&t.__esModule?t:{default:t}}function dp(t){return new fp.default({nodes:(0,pp.parseMediaList)(t),type:"media-query-list",value:t.trim()})}});var Ds=g((Tx,ya)=>{ya.exports=function(e,s){if(s=typeof s=="number"?s:1/0,!s)return Array.isArray(e)?e.map(function(n){return n}):e;return r(e,1);function r(n,i){return n.reduce(function(o,u){return Array.isArray(u)&&i{ga.exports=function(t,e){for(var s=-1,r=[];(s=t.indexOf(e,s+1))!==-1;)r.push(s);return r}});var Ms=g((Ox,wa)=>{"use strict";function gp(t,e){for(var s=1,r=t.length,n=t[0],i=t[0],o=1;o{"use strict";or.__esModule=!0;var va=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function xp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var bp=function t(e,s){if((typeof e>"u"?"undefined":va(e))!=="object")return e;var r=new e.constructor;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=typeof i>"u"?"undefined":va(i);n==="parent"&&o==="object"?s&&(r[n]=s):i instanceof Array?r[n]=i.map(function(u){return t(u,r)}):r[n]=t(i,r)}return r},_p=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};xp(this,t);for(var s in e)this[s]=e[s];var r=e.spaces;r=r===void 0?{}:r;var n=r.before,i=n===void 0?"":n,o=r.after,u=o===void 0?"":o;this.spaces={before:i,after:u}}return t.prototype.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},t.prototype.replaceWith=function(){if(this.parent){for(var s in arguments)this.parent.insertBefore(this,arguments[s]);this.remove()}return this},t.prototype.next=function(){return this.parent.at(this.parent.index(this)+1)},t.prototype.prev=function(){return this.parent.at(this.parent.index(this)-1)},t.prototype.clone=function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=bp(this);for(var n in s)r[n]=s[n];return r},t.prototype.toString=function(){return[this.spaces.before,String(this.value),this.spaces.after].join("")},t}();or.default=_p;xa.exports=or.default});var B=g(M=>{"use strict";M.__esModule=!0;var Ax=M.TAG="tag",Nx=M.STRING="string",Px=M.SELECTOR="selector",Rx=M.ROOT="root",Ix=M.PSEUDO="pseudo",qx=M.NESTING="nesting",Lx=M.ID="id",Dx=M.COMMENT="comment",Bx=M.COMBINATOR="combinator",Mx=M.CLASS="class",Ux=M.ATTRIBUTE="attribute",Fx=M.UNIVERSAL="universal"});var ur=g((ar,ba)=>{"use strict";ar.__esModule=!0;var Ep=function(){function t(e,s){for(var r=0;r=r&&(this.indexes[i]=n-1);return this},e.prototype.removeAll=function(){for(var i=this.nodes,r=Array.isArray(i),n=0,i=r?i:i[Symbol.iterator]();;){var o;if(r){if(n>=i.length)break;o=i[n++]}else{if(n=i.next(),n.done)break;o=n.value}var u=o;u.parent=void 0}return this.nodes=[],this},e.prototype.empty=function(){return this.removeAll()},e.prototype.insertAfter=function(r,n){var i=this.index(r);this.nodes.splice(i+1,0,n);var o=void 0;for(var u in this.indexes)o=this.indexes[u],i<=o&&(this.indexes[u]=o+this.nodes.length);return this},e.prototype.insertBefore=function(r,n){var i=this.index(r);this.nodes.splice(i,0,n);var o=void 0;for(var u in this.indexes)o=this.indexes[u],i<=o&&(this.indexes[u]=o+this.nodes.length);return this},e.prototype.each=function(r){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var n=this.lastEach;if(this.indexes[n]=0,!!this.length){for(var i=void 0,o=void 0;this.indexes[n]{"use strict";lr.__esModule=!0;var Ip=ur(),qp=Dp(Ip),Lp=B();function Dp(t){return t&&t.__esModule?t:{default:t}}function Bp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Mp(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Up(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Fp=function(t){Up(e,t);function e(s){Bp(this,e);var r=Mp(this,t.call(this,s));return r.type=Lp.ROOT,r}return e.prototype.toString=function(){var r=this.reduce(function(n,i){var o=String(i);return o?n+o+",":""},"").slice(0,-1);return this.trailingComma?r+",":r},e}(qp.default);lr.default=Fp;_a.exports=lr.default});var Sa=g((cr,ka)=>{"use strict";cr.__esModule=!0;var $p=ur(),Wp=Vp($p),Yp=B();function Vp(t){return t&&t.__esModule?t:{default:t}}function zp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gp(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function jp(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Hp=function(t){jp(e,t);function e(s){zp(this,e);var r=Gp(this,t.call(this,s));return r.type=Yp.SELECTOR,r}return e}(Wp.default);cr.default=Hp;ka.exports=cr.default});var Ue=g((fr,Ta)=>{"use strict";fr.__esModule=!0;var Kp=function(){function t(e,s){for(var r=0;r{"use strict";pr.__esModule=!0;var sh=Ue(),nh=oh(sh),ih=B();function oh(t){return t&&t.__esModule?t:{default:t}}function ah(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uh(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function lh(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var ch=function(t){lh(e,t);function e(s){ah(this,e);var r=uh(this,t.call(this,s));return r.type=ih.CLASS,r}return e.prototype.toString=function(){return[this.spaces.before,this.ns,"."+this.value,this.spaces.after].join("")},e}(nh.default);pr.default=ch;Ca.exports=pr.default});var Na=g((hr,Aa)=>{"use strict";hr.__esModule=!0;var fh=we(),ph=dh(fh),hh=B();function dh(t){return t&&t.__esModule?t:{default:t}}function mh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yh(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function gh(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var wh=function(t){gh(e,t);function e(s){mh(this,e);var r=yh(this,t.call(this,s));return r.type=hh.COMMENT,r}return e}(ph.default);hr.default=wh;Aa.exports=hr.default});var Ra=g((dr,Pa)=>{"use strict";dr.__esModule=!0;var vh=Ue(),xh=_h(vh),bh=B();function _h(t){return t&&t.__esModule?t:{default:t}}function Eh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kh(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Sh(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Th=function(t){Sh(e,t);function e(s){Eh(this,e);var r=kh(this,t.call(this,s));return r.type=bh.ID,r}return e.prototype.toString=function(){return[this.spaces.before,this.ns,"#"+this.value,this.spaces.after].join("")},e}(xh.default);dr.default=Th;Pa.exports=dr.default});var qa=g((mr,Ia)=>{"use strict";mr.__esModule=!0;var Ch=Ue(),Oh=Nh(Ch),Ah=B();function Nh(t){return t&&t.__esModule?t:{default:t}}function Ph(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rh(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Ih(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var qh=function(t){Ih(e,t);function e(s){Ph(this,e);var r=Rh(this,t.call(this,s));return r.type=Ah.TAG,r}return e}(Oh.default);mr.default=qh;Ia.exports=mr.default});var Da=g((yr,La)=>{"use strict";yr.__esModule=!0;var Lh=we(),Dh=Mh(Lh),Bh=B();function Mh(t){return t&&t.__esModule?t:{default:t}}function Uh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fh(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function $h(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Wh=function(t){$h(e,t);function e(s){Uh(this,e);var r=Fh(this,t.call(this,s));return r.type=Bh.STRING,r}return e}(Dh.default);yr.default=Wh;La.exports=yr.default});var Ma=g((gr,Ba)=>{"use strict";gr.__esModule=!0;var Yh=ur(),Vh=Gh(Yh),zh=B();function Gh(t){return t&&t.__esModule?t:{default:t}}function jh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Hh(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Kh(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Qh=function(t){Kh(e,t);function e(s){jh(this,e);var r=Hh(this,t.call(this,s));return r.type=zh.PSEUDO,r}return e.prototype.toString=function(){var r=this.length?"("+this.map(String).join(",")+")":"";return[this.spaces.before,String(this.value),r,this.spaces.after].join("")},e}(Vh.default);gr.default=Qh;Ba.exports=gr.default});var Fa=g((wr,Ua)=>{"use strict";wr.__esModule=!0;var Jh=Ue(),Xh=ed(Jh),Zh=B();function ed(t){return t&&t.__esModule?t:{default:t}}function td(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rd(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function sd(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var nd=function(t){sd(e,t);function e(s){td(this,e);var r=rd(this,t.call(this,s));return r.type=Zh.ATTRIBUTE,r.raws={},r}return e.prototype.toString=function(){var r=[this.spaces.before,"[",this.ns,this.attribute];return this.operator&&r.push(this.operator),this.value&&r.push(this.value),this.raws.insensitive?r.push(this.raws.insensitive):this.insensitive&&r.push(" i"),r.push("]"),r.concat(this.spaces.after).join("")},e}(Xh.default);wr.default=nd;Ua.exports=wr.default});var Wa=g((vr,$a)=>{"use strict";vr.__esModule=!0;var id=Ue(),od=ud(id),ad=B();function ud(t){return t&&t.__esModule?t:{default:t}}function ld(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cd(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function fd(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var pd=function(t){fd(e,t);function e(s){ld(this,e);var r=cd(this,t.call(this,s));return r.type=ad.UNIVERSAL,r.value="*",r}return e}(od.default);vr.default=pd;$a.exports=vr.default});var Va=g((xr,Ya)=>{"use strict";xr.__esModule=!0;var hd=we(),dd=yd(hd),md=B();function yd(t){return t&&t.__esModule?t:{default:t}}function gd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wd(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function vd(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var xd=function(t){vd(e,t);function e(s){gd(this,e);var r=wd(this,t.call(this,s));return r.type=md.COMBINATOR,r}return e}(dd.default);xr.default=xd;Ya.exports=xr.default});var Ga=g((br,za)=>{"use strict";br.__esModule=!0;var bd=we(),_d=kd(bd),Ed=B();function kd(t){return t&&t.__esModule?t:{default:t}}function Sd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Td(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Cd(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Od=function(t){Cd(e,t);function e(s){Sd(this,e);var r=Td(this,t.call(this,s));return r.type=Ed.NESTING,r.value="&",r}return e}(_d.default);br.default=Od;za.exports=br.default});var Ha=g((_r,ja)=>{"use strict";_r.__esModule=!0;_r.default=Ad;function Ad(t){return t.sort(function(e,s){return e-s})}ja.exports=_r.default});var su=g((Sr,ru)=>{"use strict";Sr.__esModule=!0;Sr.default=Fd;var Ka=39,Nd=34,Us=92,Qa=47,St=10,Fs=32,$s=12,Ws=9,Ys=13,Ja=43,Xa=62,Za=126,eu=124,Pd=44,Rd=40,Id=41,qd=91,Ld=93,Dd=59,tu=42,Bd=58,Md=38,Ud=64,Er=/[ \n\t\r\{\(\)'"\\;/]/g,kr=/[ \n\t\r\(\)\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g;function Fd(t){for(var e=[],s=t.css.valueOf(),r=void 0,n=void 0,i=void 0,o=void 0,u=void 0,a=void 0,c=void 0,f=void 0,p=void 0,l=void 0,y=void 0,x=s.length,h=-1,d=1,m=0,b=function(v,N){if(t.safe)s+=N,n=s.length-1;else throw t.error("Unclosed "+v,d,m-h,m)};m0?(f=d+u,p=n-o[u].length):(f=d,p=h),e.push(["comment",a,d,m-h,f,n-p,m]),h=p,d=f,m=n):(kr.lastIndex=m+1,kr.test(s),kr.lastIndex===0?n=s.length-1:n=kr.lastIndex-2,e.push(["word",s.slice(m,n+1),d,m-h,d,n-h,m]),m=n);break}m++}return e}ru.exports=Sr.default});var ou=g((Tr,iu)=>{"use strict";Tr.__esModule=!0;var $d=function(){function t(e,s){for(var r=0;r1?(o[0]===""&&(o[0]=!0),u.attribute=this.parseValue(o[2]),u.namespace=this.parseNamespace(o[0])):u.attribute=this.parseValue(i[0]),r=new lm.default(u),i[2]){var a=i[2].split(/(\s+i\s*?)$/),c=a[0].trim();r.value=this.lossy?c:a[0],a[1]&&(r.insensitive=!0,this.lossy||(r.raws.insensitive=a[1])),r.quoted=c[0]==="'"||c[0]==='"',r.raws.unquoted=r.quoted?c.slice(1,-1):c}this.newNode(r),this.position++},t.prototype.combinator=function(){if(this.currToken[1]==="|")return this.namespace();for(var s=new hm.default({value:"",source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]});this.position1&&s.nextToken&&s.nextToken[0]==="("&&s.error("Misplaced parenthesis.")})}else this.error('Unexpected "'+this.currToken[0]+'" found.')},t.prototype.space=function(){var s=this.currToken;this.position===0||this.prevToken[0]===","||this.prevToken[0]==="("?(this.spaces=this.parseSpace(s[1]),this.position++):this.position===this.tokens.length-1||this.nextToken[0]===","||this.nextToken[0]===")"?(this.current.last.spaces.after=this.parseSpace(s[1]),this.position++):this.combinator()},t.prototype.string=function(){var s=this.currToken;this.newNode(new im.default({value:this.currToken[1],source:{start:{line:s[2],column:s[3]},end:{line:s[4],column:s[5]}},sourceIndex:s[6]})),this.position++},t.prototype.universal=function(s){var r=this.nextToken;if(r&&r[1]==="|")return this.position++,this.namespace();this.newNode(new fm.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]}),s),this.position++},t.prototype.splitWord=function(s,r){for(var n=this,i=this.nextToken,o=this.currToken[1];i&&i[0]==="word";){this.position++;var u=this.currToken[1];if(o+=u,u.lastIndexOf("\\")===u.length-1){var a=this.nextToken;a&&a[0]==="space"&&(o+=this.parseSpace(a[1]," "),this.position++)}i=this.nextToken}var c=(0,Vs.default)(o,"."),f=(0,Vs.default)(o,"#"),p=(0,Vs.default)(o,"#{");p.length&&(f=f.filter(function(y){return!~p.indexOf(y)}));var l=(0,gm.default)((0,Gd.default)((0,Yd.default)([[0],c,f])));l.forEach(function(y,x){var h=l[x+1]||o.length,d=o.slice(y,h);if(x===0&&r)return r.call(n,d,l.length);var m=void 0;~c.indexOf(y)?m=new Jd.default({value:d.slice(1),source:{start:{line:n.currToken[2],column:n.currToken[3]+y},end:{line:n.currToken[4],column:n.currToken[3]+(h-1)}},sourceIndex:n.currToken[6]+l[x]}):~f.indexOf(y)?m=new tm.default({value:d.slice(1),source:{start:{line:n.currToken[2],column:n.currToken[3]+y},end:{line:n.currToken[4],column:n.currToken[3]+(h-1)}},sourceIndex:n.currToken[6]+l[x]}):m=new sm.default({value:d,source:{start:{line:n.currToken[2],column:n.currToken[3]+y},end:{line:n.currToken[4],column:n.currToken[3]+(h-1)}},sourceIndex:n.currToken[6]+l[x]}),n.newNode(m,s)}),this.position++},t.prototype.word=function(s){var r=this.nextToken;return r&&r[1]==="|"?(this.position++,this.namespace()):this.splitWord(s)},t.prototype.loop=function(){for(;this.position{"use strict";Cr.__esModule=!0;var km=function(){function t(e,s){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},n=new Tm.default({css:s,error:function(o){throw new Error(o)},options:r});return this.res=n,this.func(n),this},km(t,[{key:"result",get:function(){return String(this.res)}}]),t}();Cr.default=Am;au.exports=Cr.default});var G=g((zx,cu)=>{"use strict";var Gs=function(t,e){let s=new t.constructor;for(let r in t){if(!t.hasOwnProperty(r))continue;let n=t[r],i=typeof n;r==="parent"&&i==="object"?e&&(s[r]=e):r==="source"?s[r]=n:n instanceof Array?s[r]=n.map(o=>Gs(o,s)):r!=="before"&&r!=="after"&&r!=="between"&&r!=="semicolon"&&(i==="object"&&n!==null&&(n=Gs(n)),s[r]=n)}return s};cu.exports=class{constructor(e){e=e||{},this.raws={before:"",after:""};for(let s in e)this[s]=e[s]}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}toString(){return[this.raws.before,String(this.value),this.raws.after].join("")}clone(e){e=e||{};let s=Gs(this);for(let r in e)s[r]=e[r];return s}cloneBefore(e){e=e||{};let s=this.clone(e);return this.parent.insertBefore(this,s),s}cloneAfter(e){e=e||{};let s=this.clone(e);return this.parent.insertAfter(this,s),s}replaceWith(){let e=Array.prototype.slice.call(arguments);if(this.parent){for(let s of e)this.parent.insertBefore(this,s);this.remove()}return this}moveTo(e){return this.cleanRaws(this.root()===e.root()),this.remove(),e.append(this),this}moveBefore(e){return this.cleanRaws(this.root()===e.root()),this.remove(),e.parent.insertBefore(e,this),this}moveAfter(e){return this.cleanRaws(this.root()===e.root()),this.remove(),e.parent.insertAfter(e,this),this}next(){let e=this.parent.index(this);return this.parent.nodes[e+1]}prev(){let e=this.parent.index(this);return this.parent.nodes[e-1]}toJSON(){let e={};for(let s in this){if(!this.hasOwnProperty(s)||s==="parent")continue;let r=this[s];r instanceof Array?e[s]=r.map(n=>typeof n=="object"&&n.toJSON?n.toJSON():n):typeof r=="object"&&r.toJSON?e[s]=r.toJSON():e[s]=r}return e}root(){let e=this;for(;e.parent;)e=e.parent;return e}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}positionInside(e){let s=this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i{"use strict";var Pm=G(),Fe=class extends Pm{constructor(e){super(e),this.nodes||(this.nodes=[])}push(e){return e.parent=this,this.nodes.push(e),this}each(e){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let s=this.lastEach,r,n;if(this.indexes[s]=0,!!this.nodes){for(;this.indexes[s]{let n=e(s,r);return n!==!1&&s.walk&&(n=s.walk(e)),n})}walkType(e,s){if(!e||!s)throw new Error("Parameters {type} and {callback} are required.");let r=typeof e=="function";return this.walk((n,i)=>{if(r&&n instanceof e||!r&&n.type===e)return s.call(this,n,i)})}append(e){return e.parent=this,this.nodes.push(e),this}prepend(e){return e.parent=this,this.nodes.unshift(e),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let s of this.nodes)s.cleanRaws(e)}insertAfter(e,s){let r=this.index(e),n;this.nodes.splice(r+1,0,s);for(let i in this.indexes)n=this.indexes[i],r<=n&&(this.indexes[i]=n+this.nodes.length);return this}insertBefore(e,s){let r=this.index(e),n;this.nodes.splice(r,0,s);for(let i in this.indexes)n=this.indexes[i],r<=n&&(this.indexes[i]=n+this.nodes.length);return this}removeChild(e){e=this.index(e),this.nodes[e].parent=void 0,this.nodes.splice(e,1);let s;for(let r in this.indexes)s=this.indexes[r],s>=e&&(this.indexes[r]=s-1);return this}removeAll(){for(let e of this.nodes)e.parent=void 0;return this.nodes=[],this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){return typeof e=="number"?e:this.nodes.indexOf(e)}get first(){if(this.nodes)return this.nodes[0]}get last(){if(this.nodes)return this.nodes[this.nodes.length-1]}toString(){let e=this.nodes.map(String).join("");return this.value&&(e=this.value+e),this.raws.before&&(e=this.raws.before+e),this.raws.after&&(e+=this.raws.after),e}};Fe.registerWalker=t=>{let e="walk"+t.name;e.lastIndexOf("s")!==e.length-1&&(e+="s"),!Fe.prototype[e]&&(Fe.prototype[e]=function(s){return this.walkType(t,s)})};fu.exports=Fe});var hu=g((Hx,pu)=>{"use strict";var Rm=U();pu.exports=class extends Rm{constructor(e){super(e),this.type="root"}}});var mu=g((Qx,du)=>{"use strict";var Im=U();du.exports=class extends Im{constructor(e){super(e),this.type="value",this.unbalanced=0}}});var wu=g((Jx,gu)=>{"use strict";var yu=U(),Or=class extends yu{constructor(e){super(e),this.type="atword"}toString(){let e=this.quoted?this.raws.quote:"";return[this.raws.before,"@",String.prototype.toString.call(this.value),this.raws.after].join("")}};yu.registerWalker(Or);gu.exports=Or});var xu=g((Xx,vu)=>{"use strict";var qm=U(),Lm=G(),Ar=class extends Lm{constructor(e){super(e),this.type="colon"}};qm.registerWalker(Ar);vu.exports=Ar});var _u=g((Zx,bu)=>{"use strict";var Dm=U(),Bm=G(),Nr=class extends Bm{constructor(e){super(e),this.type="comma"}};Dm.registerWalker(Nr);bu.exports=Nr});var ku=g((eb,Eu)=>{"use strict";var Mm=U(),Um=G(),Pr=class extends Um{constructor(e){super(e),this.type="comment",this.inline=Object(e).inline||!1}toString(){return[this.raws.before,this.inline?"//":"/*",String(this.value),this.inline?"":"*/",this.raws.after].join("")}};Mm.registerWalker(Pr);Eu.exports=Pr});var Cu=g((tb,Tu)=>{"use strict";var Su=U(),Rr=class extends Su{constructor(e){super(e),this.type="func",this.unbalanced=-1}};Su.registerWalker(Rr);Tu.exports=Rr});var Au=g((rb,Ou)=>{"use strict";var Fm=U(),$m=G(),Ir=class extends $m{constructor(e){super(e),this.type="number",this.unit=Object(e).unit||""}toString(){return[this.raws.before,String(this.value),this.unit,this.raws.after].join("")}};Fm.registerWalker(Ir);Ou.exports=Ir});var Pu=g((sb,Nu)=>{"use strict";var Wm=U(),Ym=G(),qr=class extends Ym{constructor(e){super(e),this.type="operator"}};Wm.registerWalker(qr);Nu.exports=qr});var Iu=g((nb,Ru)=>{"use strict";var Vm=U(),zm=G(),Lr=class extends zm{constructor(e){super(e),this.type="paren",this.parenType=""}};Vm.registerWalker(Lr);Ru.exports=Lr});var Lu=g((ib,qu)=>{"use strict";var Gm=U(),jm=G(),Dr=class extends jm{constructor(e){super(e),this.type="string"}toString(){let e=this.quoted?this.raws.quote:"";return[this.raws.before,e,this.value+"",e,this.raws.after].join("")}};Gm.registerWalker(Dr);qu.exports=Dr});var Bu=g((ob,Du)=>{"use strict";var Hm=U(),Km=G(),Br=class extends Km{constructor(e){super(e),this.type="word"}};Hm.registerWalker(Br);Du.exports=Br});var Uu=g((ab,Mu)=>{"use strict";var Qm=U(),Jm=G(),Mr=class extends Jm{constructor(e){super(e),this.type="unicode-range"}};Qm.registerWalker(Mr);Mu.exports=Mr});var $u=g((ub,Fu)=>{"use strict";var js=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred while tokzenizing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}};Fu.exports=js});var Vu=g((lb,Yu)=>{"use strict";var Ur=/[ \n\t\r\{\(\)'"\\;,/]/g,Xm=/[ \n\t\r\(\)\{\}\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g,$e=/[ \n\t\r\(\)\{\}\*:;@!&'"\-\+\|~>,\[\]\\]|\//g,Zm=/^[a-z0-9]/i,ey=/^[a-f0-9?\-]/i,Wu=$u();Yu.exports=function(e,s){s=s||{};let r=[],n=e.valueOf(),i=n.length,o=-1,u=1,a=0,c=0,f=null,p,l,y,x,h,d,m,b,w,v,N,F;function Q(T){let C=`Unclosed ${T} at line: ${u}, column: ${a-o}, token: ${a}`;throw new Wu(C)}function W(){let T=`Syntax error at line: ${u}, column: ${a-o}, token: ${a}`;throw new Wu(T)}for(;a0&&r[r.length-1][0]==="word"&&r[r.length-1][1]==="url",r.push(["(","(",u,a-o,u,l-o,a]);break;case 41:c--,f=f&&c>0,r.push([")",")",u,a-o,u,l-o,a]);break;case 39:case 34:y=p===39?"'":'"',l=a;do for(v=!1,l=n.indexOf(y,l+1),l===-1&&Q("quote",y),N=l;n.charCodeAt(N-1)===92;)N-=1,v=!v;while(v);r.push(["string",n.slice(a,l+1),u,a-o,u,l-o,a]),a=l;break;case 64:Ur.lastIndex=a+1,Ur.test(n),Ur.lastIndex===0?l=n.length-1:l=Ur.lastIndex-2,r.push(["atword",n.slice(a,l+1),u,a-o,u,l-o,a]),a=l;break;case 92:l=a,p=n.charCodeAt(l+1),m&&p!==47&&p!==32&&p!==10&&p!==9&&p!==13&&p!==12&&(l+=1),r.push(["word",n.slice(a,l+1),u,a-o,u,l-o,a]),a=l;break;case 43:case 45:case 42:l=a+1,F=n.slice(a+1,l+1);let T=n.slice(a-1,a);if(p===45&&F.charCodeAt(0)===45){l++,r.push(["word",n.slice(a,l),u,a-o,u,l-o,a]),a=l-1;break}r.push(["operator",n.slice(a,l),u,a-o,u,l-o,a]),a=l-1;break;default:if(p===47&&(n.charCodeAt(a+1)===42||s.loose&&!f&&n.charCodeAt(a+1)===47)){if(n.charCodeAt(a+1)===42)l=n.indexOf("*/",a+2)+1,l===0&&Q("comment","*/");else{let O=n.indexOf(` +`,a+2);l=O!==-1?O-1:i}d=n.slice(a,l+1),x=d.split(` +`),h=x.length-1,h>0?(b=u+h,w=l-x[h].length):(b=u,w=o),r.push(["comment",d,u,a-o,b,l-w,a]),o=w,u=b,a=l}else if(p===35&&!Zm.test(n.slice(a+1,a+2)))l=a+1,r.push(["#",n.slice(a,l),u,a-o,u,l-o,a]),a=l-1;else if((p===117||p===85)&&n.charCodeAt(a+1)===43){l=a+2;do l+=1,p=n.charCodeAt(l);while(l=48&&p<=57&&(C=$e),C.lastIndex=a+1,C.test(n),C.lastIndex===0?l=n.length-1:l=C.lastIndex-2,C===$e||p===46){let O=n.charCodeAt(l),ve=n.charCodeAt(l+1),Xs=n.charCodeAt(l+2);(O===101||O===69)&&(ve===45||ve===43)&&Xs>=48&&Xs<=57&&($e.lastIndex=l+2,$e.test(n),$e.lastIndex===0?l=n.length-1:l=$e.lastIndex-2)}r.push(["word",n.slice(a,l+1),u,a-o,u,l-o,a]),a=l}break}a++}return r}});var Gu=g((cb,zu)=>{"use strict";var Hs=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred while parsing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}};zu.exports=Hs});var Qu=g((pb,Ku)=>{"use strict";var ty=hu(),ry=mu(),sy=wu(),ny=xu(),iy=_u(),oy=ku(),ay=Cu(),uy=Au(),ly=Pu(),ju=Iu(),cy=Lu(),Hu=Bu(),fy=Uu(),py=Vu(),hy=Ds(),dy=Bs(),my=Ms(),yy=Gu();function gy(t){return t.sort((e,s)=>e-s)}Ku.exports=class{constructor(e,s){let r={loose:!1};this.cache=[],this.input=e,this.options=Object.assign({},r,s),this.position=0,this.unbalanced=0,this.root=new ty;let n=new ry;this.root.append(n),this.current=n,this.tokens=py(e,this.options)}parse(){return this.loop()}colon(){let e=this.currToken;this.newNode(new ny({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}comma(){let e=this.currToken;this.newNode(new iy({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}comment(){let e=!1,s=this.currToken[1].replace(/\/\*|\*\//g,""),r;this.options.loose&&s.startsWith("//")&&(s=s.substring(2),e=!0),r=new oy({value:s,inline:e,source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]}),this.newNode(r),this.position++}error(e,s){throw new yy(e+` at line: ${s[2]}, column ${s[3]}`)}loop(){for(;this.position0&&(this.current.type==="func"&&this.current.value==="calc"?this.prevToken[0]!=="space"&&this.prevToken[0]!=="("?this.error("Syntax Error",this.currToken):this.nextToken[0]!=="space"&&this.nextToken[0]!=="word"?this.error("Syntax Error",this.currToken):this.nextToken[0]==="word"&&this.current.last.type!=="operator"&&this.current.last.value!=="("&&this.error("Syntax Error",this.currToken):(this.nextToken[0]==="space"||this.nextToken[0]==="operator"||this.prevToken[0]==="operator")&&this.error("Syntax Error",this.currToken)),this.options.loose){if((!this.current.nodes.length||this.current.last&&this.current.last.type==="operator")&&this.nextToken[0]==="word")return this.word()}else if(this.nextToken[0]==="word")return this.word()}return s=new ly({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]}),this.position++,this.newNode(s)}parseTokens(){switch(this.currToken[0]){case"space":this.space();break;case"colon":this.colon();break;case"comma":this.comma();break;case"comment":this.comment();break;case"(":this.parenOpen();break;case")":this.parenClose();break;case"atword":case"word":this.word();break;case"operator":this.operator();break;case"string":this.string();break;case"unicoderange":this.unicodeRange();break;default:this.word();break}}parenOpen(){let e=1,s=this.position+1,r=this.currToken,n;for(;s=this.tokens.length-1&&!this.current.unbalanced)&&(this.current.unbalanced--,this.current.unbalanced<0&&this.error("Expected opening parenthesis",e),!this.current.unbalanced&&this.cache.length&&(this.current=this.cache.pop()))}space(){let e=this.currToken;this.position===this.tokens.length-1||this.nextToken[0]===","||this.nextToken[0]===")"?(this.current.last.raws.after+=e[1],this.position++):(this.spaces=e[1],this.position++)}unicodeRange(){let e=this.currToken;this.newNode(new fy({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}splitWord(){let e=this.nextToken,s=this.currToken[1],r=/^[\+\-]?((\d+(\.\d*)?)|(\.\d+))([eE][\+\-]?\d+)?/,n=/^(?!\#([a-z0-9]+))[\#\{\}]/gi,i,o;if(!n.test(s))for(;e&&e[0]==="word";){this.position++;let u=this.currToken[1];s+=u,e=this.nextToken}i=dy(s,"@"),o=gy(my(hy([[0],i]))),o.forEach((u,a)=>{let c=o[a+1]||s.length,f=s.slice(u,c),p;if(~i.indexOf(u))p=new sy({value:f.slice(1),source:{start:{line:this.currToken[2],column:this.currToken[3]+u},end:{line:this.currToken[4],column:this.currToken[3]+(c-1)}},sourceIndex:this.currToken[6]+o[a]});else if(r.test(this.currToken[1])){let l=f.replace(r,"");p=new uy({value:f.replace(l,""),source:{start:{line:this.currToken[2],column:this.currToken[3]+u},end:{line:this.currToken[4],column:this.currToken[3]+(c-1)}},sourceIndex:this.currToken[6]+o[a],unit:l})}else p=new(e&&e[0]==="("?ay:Hu)({value:f,source:{start:{line:this.currToken[2],column:this.currToken[3]+u},end:{line:this.currToken[4],column:this.currToken[3]+(c-1)}},sourceIndex:this.currToken[6]+o[a]}),p.type==="word"?(p.isHex=/^#(.+)/.test(f),p.isColor=/^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(f)):this.cache.push(this.current);this.newNode(p)}),this.position++}string(){let e=this.currToken,s=this.currToken[1],r=/^(\"|\')/,n=r.test(s),i="",o;n&&(i=s.match(r)[0],s=s.slice(1,s.length-1)),o=new cy({value:s,source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6],quoted:n}),o.raws.quote=i,this.newNode(o),this.position++}word(){return this.splitWord()}newNode(e){return this.spaces&&(e.raws.before+=this.spaces,this.spaces=""),this.current.append(e)}get currToken(){return this.tokens[this.position]}get nextToken(){return this.tokens[this.position+1]}get prevToken(){return this.tokens[this.position-1]}}});var qy={};Zs(qy,{languages:()=>gi,options:()=>vi,parsers:()=>Js,printers:()=>Iy});var vl=(t,e,s,r)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(s,r):s.global?e.replace(s,r):e.split(s).join(r)},E=vl;var be="string",We="array",Ye="cursor",te="indent",_e="align",Ve="trim",re="group",se="fill",ne="if-break",ze="indent-if-break",Ee="line-suffix",Ge="line-suffix-boundary",j="line",je="label",ke="break-parent",Ct=new Set([Ye,te,_e,Ve,re,se,ne,ze,Ee,Ge,j,je,ke]);var xl=(t,e,s)=>{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[s<0?e.length+s:s]:e.at(s)},$=xl;function bl(t){if(typeof t=="string")return be;if(Array.isArray(t))return We;if(!t)return;let{type:e}=t;if(Ct.has(e))return e}var H=bl;var _l=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function El(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', +Expected it to be 'string' or 'object'.`;if(H(t))throw new Error("doc is valid.");let s=Object.prototype.toString.call(t);if(s!=="[object Object]")return`Unexpected doc '${s}'.`;let r=_l([...Ct].map(n=>`'${n}'`));return`Unexpected doc.type '${t.type}'. +Expected it to be ${r}.`}var Wr=class extends Error{name="InvalidDocError";constructor(e){super(El(e)),this.doc=e}},Yr=Wr;function Sl(t,e){if(typeof t=="string")return e(t);let s=new Map;return r(t);function r(i){if(s.has(i))return s.get(i);let o=n(i);return s.set(i,o),o}function n(i){switch(H(i)){case We:return e(i.map(r));case se:return e({...i,parts:i.parts.map(r)});case ne:return e({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case re:{let{expandedStates:o,contents:u}=i;return o?(o=o.map(r),u=o[0]):u=r(u),e({...i,contents:u,expandedStates:o})}case _e:case te:case ze:case je:case Ee:return e({...i,contents:r(i.contents)});case be:case Ye:case Ve:case Ge:case j:case ke:return e(i);default:throw new Yr(i)}}}function Tl(t){return t.type===j&&!t.hard?t.soft?"":" ":t.type===ne?t.flatContents:t}function tn(t){return Sl(t,Tl)}var Vr=()=>{},ie=Vr,He=Vr,rn=Vr;function q(t){return ie(t),{type:te,contents:t}}function sn(t,e){return ie(e),{type:_e,contents:e,n:t}}function L(t,e={}){return ie(t),He(e.expandedStates,!0),{type:re,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function nn(t){return sn({type:"root"},t)}function oe(t){return sn(-1,t)}function Se(t){return rn(t),{type:se,parts:t}}function Ot(t,e="",s={}){return ie(t),e!==""&&ie(e),{type:ne,breakContents:t,flatContents:e,groupId:s.groupId}}function on(t){return ie(t),{type:Ee,contents:t}}var Ke={type:ke};var Cl={type:j,hard:!0};var A={type:j},D={type:j,soft:!0},S=[Cl,Ke];function Y(t,e){ie(t),He(e);let s=[];for(let r=0;r0}var ae=Ol;var an=new Proxy(()=>{},{get:()=>an}),un=an;var At="'",ln='"';function Al(t,e){let s=e===!0||e===At?At:ln,r=s===At?ln:At,n=0,i=0;for(let o of t)o===s?n++:o===r&&i++;return n>i?r:s}var cn=Al;function Nl(t,e,s){let r=e==='"'?"'":'"',i=E(!1,t,/\\(.)|(["'])/gsu,(o,u,a)=>u===r?u:a===e?"\\"+a:a||(s&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(u)?u:"\\"+u));return e+i+e}var fn=Nl;function Pl(t,e){un.ok(/^(?["']).*\k$/su.test(t));let s=t.slice(1,-1),r=e.parser==="json"||e.parser==="jsonc"||e.parser==="json5"&&e.quoteProps==="preserve"&&!e.singleQuote?'"':e.__isInHtmlAttribute?"'":cn(s,e.singleQuote);return t.charAt(0)===r?t:fn(s,r,!1)}var Nt=Pl;var zr=class extends Error{name="UnexpectedNodeError";constructor(e,s,r="type"){super(`Unexpected ${s} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},pn=zr;function Rl(t){return(t==null?void 0:t.type)==="front-matter"}var Te=Rl;var Il=new Set(["raw","raws","sourceIndex","source","before","after","trailingComma","spaces"]);function hn(t,e,s){if(Te(t)&&t.language==="yaml"&&delete e.value,t.type==="css-comment"&&s.type==="css-root"&&s.nodes.length>0&&((s.nodes[0]===t||Te(s.nodes[0])&&s.nodes[1]===t)&&(delete e.text,/^\*\s*@(?:format|prettier)\s*$/u.test(t.text))||s.type==="css-root"&&$(!1,s.nodes,-1)===t))return null;if(t.type==="value-root"&&delete e.text,(t.type==="media-query"||t.type==="media-query-list"||t.type==="media-feature-expression")&&delete e.value,t.type==="css-rule"&&delete e.params,(t.type==="media-feature"||t.type==="media-keyword"||t.type==="media-type"||t.type==="media-unknown"||t.type==="media-url"||t.type==="media-value"||t.type==="selector-attribute"||t.type==="selector-string"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="value-string")&&t.value&&(e.value=ql(t.value)),t.type==="selector-combinator"&&(e.value=E(!1,e.value,/\s+/gu," ")),t.type==="media-feature"&&(e.value=E(!1,e.value," ","")),(t.type==="value-word"&&(t.isColor&&t.isHex||["initial","inherit","unset","revert"].includes(t.value.toLowerCase()))||t.type==="media-feature"||t.type==="selector-root-invalid"||t.type==="selector-pseudo")&&(e.value=e.value.toLowerCase()),t.type==="css-decl"&&(e.prop=t.prop.toLowerCase()),(t.type==="css-atrule"||t.type==="css-import")&&(e.name=t.name.toLowerCase()),t.type==="value-number"&&(e.unit=t.unit.toLowerCase()),t.type==="value-unknown"&&(e.value=E(!1,e.value,/;$/gu,"")),t.type==="selector-attribute"&&(e.attribute=t.attribute.trim(),t.namespace&&typeof t.namespace=="string"&&(e.namespace=t.namespace.trim()||!0),t.value&&(e.value=E(!1,e.value.trim(),/^["']|["']$/gu,""),delete e.quoted)),(t.type==="media-value"||t.type==="media-type"||t.type==="value-number"||t.type==="selector-root-invalid"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="selector-tag")&&t.value&&(e.value=E(!1,e.value,/([\d+.e-]+)([a-z]*)/giu,(r,n,i)=>{let o=Number(n);return Number.isNaN(o)?r:o+i.toLowerCase()})),t.type==="selector-tag"){let r=e.value.toLowerCase();["from","to"].includes(r)&&(e.value=r)}if(t.type==="css-atrule"&&t.name.toLowerCase()==="supports"&&delete e.value,t.type==="selector-unknown"&&delete e.value,t.type==="value-comma_group"){let r=t.groups.findIndex(n=>n.type==="value-number"&&n.unit==="...");r!==-1&&(e.groups[r].unit="",e.groups.splice(r+1,0,{type:"value-word",value:"...",isColor:!1,isHex:!1}))}if(t.type==="value-comma_group"&&t.groups.some(r=>r.type==="value-atword"&&r.value.endsWith("[")||r.type==="value-word"&&r.value.startsWith("]")))return{type:"value-atword",value:t.groups.map(r=>r.value).join(""),group:{open:null,close:null,groups:[],type:"value-paren_group"}}}hn.ignoredProperties=Il;function ql(t){return E(!1,E(!1,t,"'",'"'),/\\([^\da-f])/giu,"$1")}var dn=hn;async function Ll(t,e){if(t.language==="yaml"){let s=t.value.trim(),r=s?await e(s,{parser:"yaml"}):"";return nn([t.startDelimiter,t.explicitLanguage,S,r,r?S:"",t.endDelimiter])}}var mn=Ll;function yn(t){let{node:e}=t;if(e.type==="front-matter")return async s=>{let r=await mn(e,s);return r?[r,S]:void 0}}yn.getVisitorKeys=t=>t.type==="css-root"?["frontMatter"]:[];var gn=yn;var Qe=null;function Je(t){if(Qe!==null&&typeof Qe.property){let e=Qe;return Qe=Je.prototype=null,e}return Qe=Je.prototype=t??Object.create(null),new Je}var Dl=10;for(let t=0;t<=Dl;t++)Je();function Gr(t){return Je(t)}function Bl(t,e="type"){Gr(t);function s(r){let n=r[e],i=t[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:r});return i}return s}var wn=Bl;var Ml={"front-matter":[],"css-root":["frontMatter","nodes"],"css-comment":[],"css-rule":["selector","nodes"],"css-decl":["value","selector","nodes"],"css-atrule":["selector","params","value","nodes"],"media-query-list":["nodes"],"media-query":["nodes"],"media-type":[],"media-feature-expression":["nodes"],"media-feature":[],"media-colon":[],"media-value":[],"media-keyword":[],"media-url":[],"media-unknown":[],"selector-root":["nodes"],"selector-selector":["nodes"],"selector-comment":[],"selector-string":[],"selector-tag":[],"selector-id":[],"selector-class":[],"selector-attribute":[],"selector-combinator":["nodes"],"selector-universal":[],"selector-pseudo":["nodes"],"selector-nesting":[],"selector-unknown":[],"value-value":["group"],"value-root":["group"],"value-comment":[],"value-comma_group":["groups"],"value-paren_group":["open","groups","close"],"value-func":["group"],"value-paren":[],"value-number":[],"value-operator":[],"value-word":[],"value-colon":[],"value-comma":[],"value-string":[],"value-atword":[],"value-unicode-range":[],"value-unknown":[]},vn=Ml;var Ul=wn(vn),xn=Ul;function Fl(t,e){let s=0;for(let r=0;r{let n=!!(r!=null&&r.backwards);if(s===!1)return!1;let{length:i}=e,o=s;for(;o>=0&&oCn(c,e[c])).map(c=>`${n} ${c}${s}`).join("");if(!t){if(o.length===0)return"";if(o.length===1&&!Array.isArray(e[o[0]])){let c=e[o[0]];return`${r} ${Cn(o[0],c)[0]}${i}`}}let a=t.split(s).map(c=>`${n} ${c}`).join(s)+s;return r+s+(t?a:"")+(t&&o.length>0?n+s:"")+u+i}function Cn(t,e){return[...An,...Array.isArray(e)?e:[e]].map(s=>`@${t} ${s}`.trim())}function jl(t){if(!t.startsWith("#!"))return"";let e=t.indexOf(` +`);return e===-1?t:t.slice(0,e)}var qn=jl;function Ln(t){let e=qn(t);e&&(t=t.slice(e.length+1));let s=Nn(t),{pragmas:r,comments:n}=Rn(s);return{shebang:e,text:t,pragmas:r,comments:n}}function Dn(t){let{pragmas:e}=Ln(t);return Object.prototype.hasOwnProperty.call(e,"prettier")||Object.prototype.hasOwnProperty.call(e,"format")}function Bn(t){let{shebang:e,text:s,pragmas:r,comments:n}=Ln(t),i=Pn(s),o=In({pragmas:{format:"",...r},comments:n.trimStart()});return(e?`${e} +`:"")+o+(i.startsWith(` +`)?` +`:` + +`)+i}var Xe=3;function Hl(t){let e=t.slice(0,Xe);if(e!=="---"&&e!=="+++")return;let s=t.indexOf(` +`,Xe);if(s===-1)return;let r=t.slice(Xe,s).trim(),n=t.indexOf(` +${e}`,s),i=r;if(i||(i=e==="+++"?"toml":"yaml"),n===-1&&e==="---"&&i==="yaml"&&(n=t.indexOf(` +...`,s)),n===-1)return;let o=n+1+Xe,u=t.charAt(o+1);if(!/\s?/u.test(u))return;let a=t.slice(0,o);return{type:"front-matter",language:i,explicitLanguage:r,value:t.slice(s+1,n),startDelimiter:e,endDelimiter:a.slice(-Xe),raw:a}}function Kl(t){let e=Hl(t);if(!e)return{content:t};let{raw:s}=e;return{frontMatter:e,content:E(!1,s,/[^\n]/gu," ")+t.slice(s.length)}}var Ze=Kl;function Mn(t){return Dn(Ze(t).content)}function Un(t){let{frontMatter:e,content:s}=Ze(t);return(e?e.raw+` + +`:"")+Bn(s)}var Ql=new Set(["red","green","blue","alpha","a","rgb","hue","h","saturation","s","lightness","l","whiteness","w","blackness","b","tint","shade","blend","blenda","contrast","hsl","hsla","hwb","hwba"]);function Fn(t){var e,s;return(s=(e=t.findAncestor(r=>r.type==="css-decl"))==null?void 0:e.prop)==null?void 0:s.toLowerCase()}var Jl=new Set(["initial","inherit","unset","revert"]);function $n(t){return Jl.has(t.toLowerCase())}function Wn(t,e){var r;let s=t.findAncestor(n=>n.type==="css-atrule");return((r=s==null?void 0:s.name)==null?void 0:r.toLowerCase().endsWith("keyframes"))&&["from","to"].includes(e.toLowerCase())}function ue(t){return t.includes("$")||t.includes("@")||t.includes("#")||t.startsWith("%")||t.startsWith("--")||t.startsWith(":--")||t.includes("(")&&t.includes(")")?t:t.toLowerCase()}function Ce(t,e){var r;let s=t.findAncestor(n=>n.type==="value-func");return((r=s==null?void 0:s.value)==null?void 0:r.toLowerCase())===e}function Yn(t){var r;let e=t.findAncestor(n=>n.type==="css-rule"),s=(r=e==null?void 0:e.raws)==null?void 0:r.selector;return s&&(s.startsWith(":import")||s.startsWith(":export"))}function Oe(t,e){let s=Array.isArray(e)?e:[e],r=t.findAncestor(n=>n.type==="css-atrule");return r&&s.includes(r.name.toLowerCase())}function Vn(t){var s;let{node:e}=t;return e.groups[0].value==="url"&&e.groups.length===2&&((s=t.findAncestor(r=>r.type==="css-atrule"))==null?void 0:s.name)==="import"}function zn(t){return t.type==="value-func"&&t.value.toLowerCase()==="url"}function Gn(t){return t.type==="value-func"&&t.value.toLowerCase()==="var"}function jn(t){let{selector:e}=t;return e?typeof e=="string"&&/^@.+:.*$/u.test(e)||e.value&&/^@.+:.*$/u.test(e.value):!1}function Hn(t){return t.type==="value-word"&&["from","through","end"].includes(t.value)}function Kn(t){return t.type==="value-word"&&["and","or","not"].includes(t.value)}function Qn(t){return t.type==="value-word"&&t.value==="in"}function qt(t){return t.type==="value-operator"&&t.value==="*"}function et(t){return t.type==="value-operator"&&t.value==="/"}function J(t){return t.type==="value-operator"&&t.value==="+"}function he(t){return t.type==="value-operator"&&t.value==="-"}function Xl(t){return t.type==="value-operator"&&t.value==="%"}function Lt(t){return qt(t)||et(t)||J(t)||he(t)||Xl(t)}function Jn(t){return t.type==="value-word"&&["==","!="].includes(t.value)}function Xn(t){return t.type==="value-word"&&["<",">","<=",">="].includes(t.value)}function tt(t,e){return e.parser==="scss"&&t.type==="css-atrule"&&["if","else","for","each","while"].includes(t.name)}function Jr(t){var e;return((e=t.raws)==null?void 0:e.params)&&/^\(\s*\)$/u.test(t.raws.params)}function Dt(t){return t.name.startsWith("prettier-placeholder")}function Zn(t){return t.prop.startsWith("@prettier-placeholder")}function ei(t,e){return t.value==="$$"&&t.type==="value-func"&&(e==null?void 0:e.type)==="value-word"&&!e.raws.before}function ti(t){var e,s;return((e=t.value)==null?void 0:e.type)==="value-root"&&((s=t.value.group)==null?void 0:s.type)==="value-value"&&t.prop.toLowerCase()==="composes"}function ri(t){var e,s,r;return((r=(s=(e=t.value)==null?void 0:e.group)==null?void 0:s.group)==null?void 0:r.type)==="value-paren_group"&&t.value.group.group.open!==null&&t.value.group.group.close!==null}function de(t){var e;return((e=t.raws)==null?void 0:e.before)===""}function Bt(t){var e,s;return t.type==="value-comma_group"&&((s=(e=t.groups)==null?void 0:e[1])==null?void 0:s.type)==="value-colon"}function Qr(t){var e;return t.type==="value-paren_group"&&((e=t.groups)==null?void 0:e[0])&&Bt(t.groups[0])}function Xr(t,e){var i;if(e.parser!=="scss")return!1;let{node:s}=t;if(s.groups.length===0)return!1;let r=t.grandparent;if(!Qr(s)&&!(r&&Qr(r)))return!1;let n=t.findAncestor(o=>o.type==="css-decl");return!!((i=n==null?void 0:n.prop)!=null&&i.startsWith("$")||Qr(r)||r.type==="value-func")}function Ae(t){return t.type==="value-comment"&&t.inline}function Mt(t){return t.type==="value-word"&&t.value==="#"}function Zr(t){return t.type==="value-word"&&t.value==="{"}function Ut(t){return t.type==="value-word"&&t.value==="}"}function rt(t){return["value-word","value-atword"].includes(t.type)}function st(t){return(t==null?void 0:t.type)==="value-colon"}function si(t,e){if(!Bt(e))return!1;let{groups:s}=e,r=s.indexOf(t);return r===-1?!1:st(s[r+1])}function ni(t){return t.value&&["not","and","or"].includes(t.value.toLowerCase())}function ii(t){return t.type!=="value-func"?!1:Ql.has(t.value.toLowerCase())}function Ne(t){return/\/\//u.test(t.split(/[\n\r]/u).pop())}function nt(t){return(t==null?void 0:t.type)==="value-atword"&&t.value.startsWith("prettier-placeholder-")}function oi(t,e){var s,r;if(((s=t.open)==null?void 0:s.value)!=="("||((r=t.close)==null?void 0:r.value)!==")"||t.groups.some(n=>n.type!=="value-comma_group"))return!1;if(e.type==="value-comma_group"){let n=e.groups.indexOf(t)-1,i=e.groups[n];if((i==null?void 0:i.type)==="value-word"&&i.value==="with")return!0}return!1}function it(t){var e,s;return t.type==="value-paren_group"&&((e=t.open)==null?void 0:e.value)==="("&&((s=t.close)==null?void 0:s.value)===")"}function Zl(t,e,s){var d;let{node:r}=t,n=t.parent,i=t.grandparent,o=Fn(t),u=o&&n.type==="value-value"&&(o==="grid"||o.startsWith("grid-template")),a=t.findAncestor(m=>m.type==="css-atrule"),c=a&&tt(a,e),f=r.groups.some(m=>Ae(m)),p=t.map(s,"groups"),l=[""],y=Ce(t,"url"),x=!1,h=!1;for(let m=0;m2&&r.groups.slice(0,m).every(O=>O.type==="value-comment")&&!Ae(b)&&(l[l.length-2]=oe($(!1,l,-2))),Oe(t,"forward")&&w.type==="value-word"&&w.value&&b!==void 0&&b.type==="value-word"&&b.value==="as"&&v.type==="value-operator"&&v.value==="*"||!v||w.type==="value-word"&&w.value.endsWith("-")&&nt(v))continue;if(w.type==="value-string"&&w.quoted){let O=w.value.lastIndexOf("#{"),ve=w.value.lastIndexOf("}");O!==-1&&ve!==-1?x=O>ve:O!==-1?x=!0:ve!==-1&&(x=!1)}if(x||st(w)||st(v)||w.type==="value-atword"&&(w.value===""||w.value.endsWith("["))||v.type==="value-word"&&v.value.startsWith("]")||w.value==="~"||w.type!=="value-string"&&w.value&&w.value.includes("\\")&&v&&v.type!=="value-comment"||b!=null&&b.value&&b.value.indexOf("\\")===b.value.length-1&&w.type==="value-operator"&&w.value==="/"||w.value==="\\"||ei(w,v)||Mt(w)||Zr(w)||Ut(v)||Zr(v)&&de(v)||Ut(w)&&de(v)||w.value==="--"&&Mt(v))continue;let F=Lt(w),Q=Lt(v);if((F&&Mt(v)||Q&&Ut(w))&&de(v)||!b&&et(w)||Ce(t,"calc")&&(J(w)||J(v)||he(w)||he(v))&&de(v))continue;let W=(J(w)||he(w))&&m===0&&(v.type==="value-number"||v.isHex)&&i&&ii(i)&&!de(v),T=(N==null?void 0:N.type)==="value-func"||N&&rt(N)||w.type==="value-func"||rt(w),C=v.type==="value-func"||rt(v)||(b==null?void 0:b.type)==="value-func"||b&&rt(b);if(e.parser==="scss"&&F&&w.value==="-"&&v.type==="value-func"&&R(w)!==P(v)){l.push([l.pop()," "]);continue}if(!(!(qt(v)||qt(w))&&!Ce(t,"calc")&&!W&&(et(v)&&!T||et(w)&&!C||J(v)&&!T||J(w)&&!C||he(v)||he(w))&&(de(v)||F&&(!b||b&&Lt(b))))&&!((e.parser==="scss"||e.parser==="less")&&F&&w.value==="-"&&it(v)&&R(w)===P(v.open)&&v.open.value==="(")){if(Ae(w)){if(n.type==="value-paren_group"){l.push(oe(S),"");continue}l.push(S,"");continue}if(c&&(Jn(v)||Xn(v)||Kn(v)||Qn(w)||Hn(w))){l.push([l.pop()," "]);continue}if(a&&a.name.toLowerCase()==="namespace"){l.push([l.pop()," "]);continue}if(u){w.source&&v.source&&w.source.start.line!==v.source.start.line?(l.push(S,""),h=!0):l.push([l.pop()," "]);continue}if(Q){l.push([l.pop()," "]);continue}if((v==null?void 0:v.value)!=="..."&&!(nt(w)&&nt(v)&&R(w)===P(v))){if(nt(w)&&it(v)&&R(w)===P(v.open)){l.push(D,"");continue}if(w.value==="with"&&it(v)){l=[[Se(l)," "]];continue}(d=w.value)!=null&&d.endsWith("#")&&v.value==="{"&&it(v.group)||Ae(v)&&!N||l.push(A,"")}}}return f&&l.push([l.pop(),Ke]),h&&l.unshift("",S),c?L(q(l)):Vn(t)?L(Se(l)):L(q(Se(l)))}var ai=Zl;function ec(t){return t.length===1?t:t.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/u,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/u,"$1").replace(/^([+-])?\./u,"$10.").replace(/(\.\d+?)0+(?=e|$)/u,"$1").replace(/\.(?=e|$)/u,"")}var ui=ec;var es=new Map([["em","em"],["rem","rem"],["ex","ex"],["rex","rex"],["cap","cap"],["rcap","rcap"],["ch","ch"],["rch","rch"],["ic","ic"],["ric","ric"],["lh","lh"],["rlh","rlh"],["vw","vw"],["svw","svw"],["lvw","lvw"],["dvw","dvw"],["vh","vh"],["svh","svh"],["lvh","lvh"],["dvh","dvh"],["vi","vi"],["svi","svi"],["lvi","lvi"],["dvi","dvi"],["vb","vb"],["svb","svb"],["lvb","lvb"],["dvb","dvb"],["vmin","vmin"],["svmin","svmin"],["lvmin","lvmin"],["dvmin","dvmin"],["vmax","vmax"],["svmax","svmax"],["lvmax","lvmax"],["dvmax","dvmax"],["cm","cm"],["mm","mm"],["q","Q"],["in","in"],["pt","pt"],["pc","pc"],["px","px"],["deg","deg"],["grad","grad"],["rad","rad"],["turn","turn"],["s","s"],["ms","ms"],["hz","Hz"],["khz","kHz"],["dpi","dpi"],["dpcm","dpcm"],["dppx","dppx"],["x","x"],["cqw","cqw"],["cqh","cqh"],["cqi","cqi"],["cqb","cqb"],["cqmin","cqmin"],["cqmax","cqmax"],["fr","fr"]]);function li(t){let e=t.toLowerCase();return es.has(e)?es.get(e):t}var ci=/(["'])(?:(?!\1)[^\\]|\\.)*\1/gsu,tc=/(?:\d*\.\d+|\d+\.?)(?:e[+-]?\d+)?/giu,rc=/[a-z]+/giu,sc=/[$@]?[_a-z\u0080-\uFFFF][\w\u0080-\uFFFF-]*/giu,nc=new RegExp(ci.source+`|(${sc.source})?(${tc.source})(${rc.source})?`,"giu");function V(t,e){return E(!1,t,ci,s=>Nt(s,e))}function fi(t,e){let s=e.singleQuote?"'":'"';return t.includes('"')||t.includes("'")?t:s+t+s}function me(t){return E(!1,t,nc,(e,s,r,n,i)=>!r&&n?ts(n)+ue(i||""):e)}function ts(t){return ui(t).replace(/\.0(?=$|e)/u,"")}function pi(t){return t.trailingComma==="es5"||t.trailingComma==="all"}function ic(t,e,s){let r=!!(s!=null&&s.backwards);if(e===!1)return!1;let n=t.charAt(e);if(r){if(t.charAt(e-1)==="\r"&&n===` +`)return e-2;if(n===` +`||n==="\r"||n==="\u2028"||n==="\u2029")return e-1}else{if(n==="\r"&&t.charAt(e+1)===` +`)return e+2;if(n===` +`||n==="\r"||n==="\u2028"||n==="\u2029")return e+1}return e}var Ft=ic;function oc(t,e,s={}){let r=Rt(t,s.backwards?e-1:e,s),n=Ft(t,r,s);return r!==n}var $t=oc;function ac(t,e){if(e===!1)return!1;if(t.charAt(e)==="/"&&t.charAt(e+1)==="*"){for(let s=e+2;ss.type==="value-comment"))&&pi(e)&&t.callParent(()=>Xr(t,e))?Ot(","):""}function mi(t,e,s){let{node:r,parent:n}=t,i=t.map(({node:y})=>typeof y=="string"?y:s(),"groups");if(n&&zn(n)&&(r.groups.length===1||r.groups.length>0&&r.groups[0].type==="value-comma_group"&&r.groups[0].groups.length>0&&r.groups[0].groups[0].type==="value-word"&&r.groups[0].groups[0].value.startsWith("data:")))return[r.open?s("open"):"",Y(",",i),r.close?s("close"):""];if(!r.open){let y=rs(t);He(i);let x=hc(Y(",",i),2),h=Y(y?S:A,x);return q(y?[S,h]:L([pc(t)?D:"",Se(h)]))}let o=t.map(({node:y,isLast:x,index:h})=>{var b;let d=i[h];Bt(y)&&y.type==="value-comma_group"&&y.groups&&y.groups[0].type!=="value-paren_group"&&((b=y.groups[2])==null?void 0:b.type)==="value-paren_group"&&H(d)===re&&H(d.contents)===te&&H(d.contents.contents)===se&&(d=L(oe(d)));let m=[d,x?fc(t,e):","];if(!x&&y.type==="value-comma_group"&&ae(y.groups)){let w=$(!1,y.groups,-1);!w.source&&w.close&&(w=w.close),w.source&&Wt(e.originalText,R(w))&&m.push(S)}return m},"groups"),u=si(r,n),a=oi(r,n),c=Xr(t,e),f=a||c&&!u,p=a||u,l=L([r.open?s("open"):"",q([D,Y(A,o)]),D,r.close?s("close"):""],{shouldBreak:f});return p?oe(l):l}function rs(t){return t.match(e=>e.type==="value-paren_group"&&!e.open&&e.groups.some(s=>s.type==="value-comma_group"),(e,s)=>s==="group"&&e.type==="value-value",(e,s)=>s==="group"&&e.type==="value-root",(e,s)=>s==="value"&&(e.type==="css-decl"&&!e.prop.startsWith("--")||e.type==="css-atrule"&&e.variable))}function pc(t){return t.match(e=>e.type==="value-paren_group"&&!e.open,(e,s)=>s==="group"&&e.type==="value-value",(e,s)=>s==="group"&&e.type==="value-root",(e,s)=>s==="value"&&e.type==="css-decl")}function hc(t,e){let s=[];for(let r=0;r{let{node:n,previous:i}=t;if((i==null?void 0:i.type)==="css-comment"&&i.text.trim()==="prettier-ignore"?r.push(e.originalText.slice(P(n),R(n))):r.push(s()),t.isLast)return;let{next:o}=t;o.type==="css-comment"&&!$t(e.originalText,P(o),{backwards:!0})&&!Te(n)||o.type==="css-atrule"&&o.name==="else"&&n.type!=="css-comment"?r.push(" "):(r.push(e.__isHTMLStyleAttribute?A:S),Wt(e.originalText,R(n))&&!Te(n)&&r.push(S))},"nodes"),r}var Pe=dc;function mc(t,e,s){var n,i,o,u,a,c;let{node:r}=t;switch(r.type){case"front-matter":return[r.raw,S];case"css-root":{let f=Pe(t,e,s),p=r.raws.after.trim();return p.startsWith(";")&&(p=p.slice(1).trim()),[r.frontMatter?[s("frontMatter"),S]:"",f,p?` ${p}`:"",r.nodes.length>0?S:""]}case"css-comment":{let f=r.inline||r.raws.inline,p=e.originalText.slice(P(r),R(r));return f?p.trimEnd():p}case"css-rule":return[s("selector"),r.important?" !important":"",r.nodes?[((n=r.selector)==null?void 0:n.type)==="selector-unknown"&&Ne(r.selector.value)?A:r.selector?" ":"","{",r.nodes.length>0?q([S,Pe(t,e,s)]):"",S,"}",jn(r)?";":""]:";"];case"css-decl":{let f=t.parent,{between:p}=r.raws,l=p.trim(),y=l===":",x=typeof r.value=="string"&&/^ *$/u.test(r.value),h=typeof r.value=="string"?r.value:s("value");return h=ti(r)?tn(h):h,!y&&Ne(l)&&!((o=(i=r.value)==null?void 0:i.group)!=null&&o.group&&t.call(()=>rs(t),"value","group","group"))&&(h=q([S,oe(h)])),[E(!1,r.raws.before,/[\s;]/gu,""),f.type==="css-atrule"&&f.variable||Yn(t)?r.prop:ue(r.prop),l.startsWith("//")?" ":"",l,r.extend||x?"":" ",e.parser==="less"&&r.extend&&r.selector?["extend(",s("selector"),")"]:"",h,r.raws.important?r.raws.important.replace(/\s*!\s*important/iu," !important"):r.important?" !important":"",r.raws.scssDefault?r.raws.scssDefault.replace(/\s*!default/iu," !default"):r.scssDefault?" !default":"",r.raws.scssGlobal?r.raws.scssGlobal.replace(/\s*!global/iu," !global"):r.scssGlobal?" !global":"",r.nodes?[" {",q([D,Pe(t,e,s)]),D,"}"]:Zn(r)&&!f.raws.semicolon&&e.originalText[R(r)-1]!==";"?"":e.__isHTMLStyleAttribute&&t.isLast?Ot(";"):";"]}case"css-atrule":{let f=t.parent,p=Dt(r)&&!f.raws.semicolon&&e.originalText[R(r)-1]!==";";if(e.parser==="less"){if(r.mixin)return[s("selector"),r.important?" !important":"",p?"":";"];if(r.function)return[r.name,typeof r.params=="string"?r.params:s("params"),p?"":";"];if(r.variable)return["@",r.name,": ",r.value?s("value"):"",r.raws.between.trim()?r.raws.between.trim()+" ":"",r.nodes?["{",q([r.nodes.length>0?D:"",Pe(t,e,s)]),D,"}"]:"",p?"":";"]}let l=r.name==="import"&&((u=r.params)==null?void 0:u.type)==="value-unknown"&&r.params.value.endsWith(";");return["@",Jr(r)||r.name.endsWith(":")||Dt(r)?r.name:ue(r.name),r.params?[Jr(r)?"":Dt(r)?r.raws.afterName===""?"":r.name.endsWith(":")?" ":/^\s*\n\s*\n/u.test(r.raws.afterName)?[S,S]:/^\s*\n/u.test(r.raws.afterName)?S:" ":" ",typeof r.params=="string"?r.params:s("params")]:"",r.selector?q([" ",s("selector")]):"",r.value?L([" ",s("value"),tt(r,e)?ri(r)?" ":A:""]):r.name==="else"?" ":"",r.nodes?[tt(r,e)?"":r.selector&&!r.selector.nodes&&typeof r.selector.value=="string"&&Ne(r.selector.value)||!r.selector&&typeof r.params=="string"&&Ne(r.params)?A:" ","{",q([r.nodes.length>0?D:"",Pe(t,e,s)]),D,"}"]:p||l?"":";"]}case"media-query-list":{let f=[];return t.each(({node:p})=>{p.type==="media-query"&&p.value===""||f.push(s())},"nodes"),L(q(Y(A,f)))}case"media-query":return[Y(" ",t.map(s,"nodes")),t.isLast?"":","];case"media-type":return me(V(r.value,e));case"media-feature-expression":return r.nodes?["(",...t.map(s,"nodes"),")"]:r.value;case"media-feature":return ue(V(E(!1,r.value,/ +/gu," "),e));case"media-colon":return[r.value," "];case"media-value":return me(V(r.value,e));case"media-keyword":return V(r.value,e);case"media-url":return V(E(!1,E(!1,r.value,/^url\(\s+/giu,"url("),/\s+\)$/gu,")"),e);case"media-unknown":return r.value;case"selector-root":return L([Oe(t,"custom-selector")?[t.findAncestor(f=>f.type==="css-atrule").customSelector,A]:"",Y([",",Oe(t,["extend","custom-selector","nest"])?A:S],t.map(s,"nodes"))]);case"selector-selector":{let f=r.nodes.length>1;return L((f?q:p=>p)(t.map(s,"nodes")))}case"selector-comment":return r.value;case"selector-string":return V(r.value,e);case"selector-tag":return[r.namespace?[r.namespace===!0?"":r.namespace.trim(),"|"]:"",((a=t.previous)==null?void 0:a.type)==="selector-nesting"?r.value:me(Wn(t,r.value)?r.value.toLowerCase():r.value)];case"selector-id":return["#",r.value];case"selector-class":return[".",me(V(r.value,e))];case"selector-attribute":return["[",r.namespace?[r.namespace===!0?"":r.namespace.trim(),"|"]:"",r.attribute.trim(),r.operator??"",r.value?fi(V(r.value.trim(),e),e):"",r.insensitive?" i":"","]"];case"selector-combinator":{if(r.value==="+"||r.value===">"||r.value==="~"||r.value===">>>"){let l=t.parent;return[l.type==="selector-selector"&&l.nodes[0]===r?"":A,r.value,t.isLast?"":" "]}let f=r.value.trim().startsWith("(")?A:"",p=me(V(r.value.trim(),e))||A;return[f,p]}case"selector-universal":return[r.namespace?[r.namespace===!0?"":r.namespace.trim(),"|"]:"",r.value];case"selector-pseudo":return[ue(r.value),ae(r.nodes)?L(["(",q([D,Y([",",A],t.map(s,"nodes"))]),D,")"]):""];case"selector-nesting":return r.value;case"selector-unknown":{let f=t.findAncestor(y=>y.type==="css-rule");if(f!=null&&f.isSCSSNesterProperty)return me(V(ue(r.value),e));let p=t.parent;if((c=p.raws)!=null&&c.selector){let y=P(p),x=y+p.raws.selector.length;return e.originalText.slice(y,x).trim()}let l=t.grandparent;if(p.type==="value-paren_group"&&(l==null?void 0:l.type)==="value-func"&&l.value==="selector"){let y=R(p.open)+1,x=P(p.close),h=e.originalText.slice(y,x).trim();return Ne(h)?[Ke,h]:h}return r.value}case"value-value":case"value-root":return s("group");case"value-comment":return e.originalText.slice(P(r),R(r));case"value-comma_group":return ai(t,e,s);case"value-paren_group":return mi(t,e,s);case"value-func":return[r.value,Oe(t,"supports")&&ni(r)?" ":"",s("group")];case"value-paren":return r.value;case"value-number":return[ts(r.value),li(r.unit)];case"value-operator":return r.value;case"value-word":return r.isColor&&r.isHex||$n(r.value)?r.value.toLowerCase():r.value;case"value-colon":{let{previous:f}=t;return L([r.value,typeof(f==null?void 0:f.value)=="string"&&f.value.endsWith("\\")||Ce(t,"url")?"":A])}case"value-string":return Nt(r.raws.quote+r.value+r.raws.quote,e);case"value-atword":return["@",r.value];case"value-unicode-range":return r.value;case"value-unknown":return r.value;case"value-comma":default:throw new pn(r,"PostCSS")}}var yc={print:mc,embed:gn,insertPragma:Un,massageAstNode:dn,getVisitorKeys:xn},yi=yc;var gi=[{linguistLanguageId:50,name:"CSS",type:"markup",tmScope:"source.css",aceMode:"css",codemirrorMode:"css",codemirrorMimeType:"text/css",color:"#563d7c",extensions:[".css",".wxss"],parsers:["css"],vscodeLanguageIds:["css"]},{linguistLanguageId:262764437,name:"PostCSS",type:"markup",color:"#dc3a0c",tmScope:"source.postcss",group:"CSS",extensions:[".pcss",".postcss"],aceMode:"text",parsers:["css"],vscodeLanguageIds:["postcss"]},{linguistLanguageId:198,name:"Less",type:"markup",color:"#1d365d",aliases:["less-css"],extensions:[".less"],tmScope:"source.css.less",aceMode:"less",codemirrorMode:"css",codemirrorMimeType:"text/css",parsers:["less"],vscodeLanguageIds:["less"]},{linguistLanguageId:329,name:"SCSS",type:"markup",color:"#c6538c",tmScope:"source.css.scss",aceMode:"scss",codemirrorMode:"css",codemirrorMimeType:"text/x-scss",extensions:[".scss"],parsers:["scss"],vscodeLanguageIds:["scss"]}];var wi={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var gc={singleQuote:wi.singleQuote},vi=gc;var Js={};Zs(Js,{css:()=>Ny,less:()=>Py,scss:()=>Ry});var ol=xe(gt(),1),al=xe(To(),1),ul=xe(oa(),1);function sp(t,e){let s=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(s,e)}var aa=sp;var da=xe(ha(),1);function X(t,e,s){if(t&&typeof t=="object"){delete t.parent;for(let r in t)X(t[r],e,s),r==="type"&&typeof t[r]=="string"&&!t[r].startsWith(e)&&(!s||!s.test(t[r]))&&(t[r]=e+t[r])}return t}function Ls(t){if(t&&typeof t=="object"){delete t.parent;for(let e in t)Ls(t[e]);!Array.isArray(t)&&t.value&&!t.type&&(t.type="unknown")}return t}var mp=da.default.default;function yp(t){let e;try{e=mp(t)}catch{return{type:"selector-unknown",value:t}}return X(Ls(e),"media-")}var ma=yp;var lu=xe(uu(),1);function Nm(t){if(/\/\/|\/\*/u.test(t))return{type:"selector-unknown",value:t.trim()};let e;try{new lu.default(s=>{e=s}).process(t)}catch{return{type:"selector-unknown",value:t}}return X(e,"selector-")}var ee=Nm;var rl=xe(Qu(),1);var wy=t=>{for(;t.parent;)t=t.parent;return t},Fr=wy;function vy(t){return Fr(t).text.slice(t.group.open.sourceIndex+1,t.group.close.sourceIndex).trim()}var Ju=vy;function xy(t){if(ae(t)){for(let e=t.length-1;e>0;e--)if(t[e].type==="word"&&t[e].value==="{"&&t[e-1].type==="word"&&t[e-1].value.endsWith("#"))return!0}return!1}var Xu=xy;function by(t){return t.some(e=>e.type==="string"||e.type==="func"&&!e.value.endsWith("\\"))}var Zu=by;function _y(t,e){return!!(e.parser==="scss"&&(t==null?void 0:t.type)==="word"&&t.value.startsWith("$"))}var el=_y;var tl=t=>t.type==="paren"&&t.value===")";function Ey(t,e){var a;let{nodes:s}=t,r={open:null,close:null,groups:[],type:"paren_group"},n=[r],i=r,o={groups:[],type:"comma_group"},u=[o];for(let c=0;c0&&r.groups.push(o),r.close=f,u.length===1)throw new Error("Unbalanced parenthesis");u.pop(),o=$(!1,u,-1),o.groups.push(r),n.pop(),r=$(!1,n,-1)}else if(f.type==="comma"){if(c===s.length-3&&s[c+1].type==="comment"&&tl(s[c+2]))continue;r.groups.push(o),o={groups:[],type:"comma_group"},u[u.length-1]=o}else o.groups.push(f)}return o.groups.length>0&&r.groups.push(o),i}function $r(t){return t.type==="paren_group"&&!t.open&&!t.close&&t.groups.length===1||t.type==="comma_group"&&t.groups.length===1?$r(t.groups[0]):t.type==="paren_group"||t.type==="comma_group"?{...t,groups:t.groups.map($r)}:t}function sl(t,e){if(t&&typeof t=="object")for(let s in t)s!=="parent"&&(sl(t[s],e),s==="nodes"&&(t.group=$r(Ey(t,e)),delete t[s]));return t}function ky(t,e){if(e.parser==="less"&&t.startsWith("~`"))return{type:"value-unknown",value:t};let s=null;try{s=new rl.default(t,{loose:!0}).parse()}catch{return{type:"value-unknown",value:t}}s.text=t;let r=sl(s,e);return X(r,"value-",/^selector-/u)}var pe=ky;var Sy=new Set(["import","use","forward"]);function Ty(t){return Sy.has(t)}var nl=Ty;function Cy(t,e){return e.parser!=="scss"||!t.selector?!1:t.selector.replace(/\/\*.*?\*\//u,"").replace(/\/\/.*\n/u,"").trim().endsWith(":")}var il=Cy;var Oy=/(\s*)(!default).*$/u,Ay=/(\s*)(!global).*$/u;function ll(t,e){var s,r;if(t&&typeof t=="object"){delete t.parent;for(let u in t)ll(t[u],e);if(!t.type)return t;if(t.raws??(t.raws={}),t.type==="css-decl"&&typeof t.prop=="string"&&t.prop.startsWith("--")&&typeof t.value=="string"&&t.value.startsWith("{")){let u;if(t.value.trimEnd().endsWith("}")){let a=e.originalText.slice(0,t.source.start.offset),c="a".repeat(t.prop.length)+e.originalText.slice(t.source.start.offset+t.prop.length,t.source.end.offset),f=E(!1,a,/[^\n]/gu," ")+c,p;e.parser==="scss"?p=pl:e.parser==="less"?p=fl:p=cl;let l;try{l=p(f,{...e})}catch{}((s=l==null?void 0:l.nodes)==null?void 0:s.length)===1&&l.nodes[0].type==="css-rule"&&(u=l.nodes[0].nodes)}return u?t.value={type:"css-rule",nodes:u}:t.value={type:"value-unknown",value:t.raws.value.raw},t}let n="";typeof t.selector=="string"&&(n=t.raws.selector?t.raws.selector.scss??t.raws.selector.raw:t.selector,t.raws.between&&t.raws.between.trim().length>0&&(n+=t.raws.between),t.raws.selector=n);let i="";typeof t.value=="string"&&(i=t.raws.value?t.raws.value.scss??t.raws.value.raw:t.value,t.raws.value=i.trim());let o="";if(typeof t.params=="string"&&(o=t.raws.params?t.raws.params.scss??t.raws.params.raw:t.params,t.raws.afterName&&t.raws.afterName.trim().length>0&&(o=t.raws.afterName+o),t.raws.between&&t.raws.between.trim().length>0&&(o=o+t.raws.between),o=o.trim(),t.raws.params=o),n.trim().length>0)return n.startsWith("@")&&n.endsWith(":")?t:t.mixin?(t.selector=pe(n,e),t):(il(t,e)&&(t.isSCSSNesterProperty=!0),t.selector=ee(n),t);if(i.trim().length>0){let u=i.match(Oy);u&&(i=i.slice(0,u.index),t.scssDefault=!0,u[0].trim()!=="!default"&&(t.raws.scssDefault=u[0]));let a=i.match(Ay);if(a&&(i=i.slice(0,a.index),t.scssGlobal=!0,a[0].trim()!=="!global"&&(t.raws.scssGlobal=a[0])),i.startsWith("progid:"))return{type:"value-unknown",value:i};t.value=pe(i,e)}if(e.parser==="less"&&t.type==="css-decl"&&i.startsWith("extend(")&&(t.extend||(t.extend=t.raws.between===":"),t.extend&&!t.selector&&(delete t.value,t.selector=ee(i.slice(7,-1)))),t.type==="css-atrule"){if(e.parser==="less"){if(t.mixin){let u=t.raws.identifier+t.name+t.raws.afterName+t.raws.params;return t.selector=ee(u),delete t.params,t}if(t.function)return t}if(e.parser==="css"&&t.name==="custom-selector"){let u=t.params.match(/:--\S+\s+/u)[0].trim();return t.customSelector=u,t.selector=ee(t.params.slice(u.length).trim()),delete t.params,t}if(e.parser==="less"){if(t.name.includes(":")&&!t.params){t.variable=!0;let u=t.name.split(":");t.name=u[0],t.value=pe(u.slice(1).join(":"),e)}if(!["page","nest","keyframes"].includes(t.name)&&((r=t.params)==null?void 0:r[0])===":"){t.variable=!0;let u=t.params.slice(1);u&&(t.value=pe(u,e)),t.raws.afterName+=":"}if(t.variable)return delete t.params,t.value||delete t.value,t}}if(t.type==="css-atrule"&&o.length>0){let{name:u}=t,a=t.name.toLowerCase();return u==="warn"||u==="error"?(t.params={type:"media-unknown",value:o},t):u==="extend"||u==="nest"?(t.selector=ee(o),delete t.params,t):u==="at-root"?(/^\(\s*(?:without|with)\s*:.+\)$/su.test(o)?t.params=pe(o,e):(t.selector=ee(o),delete t.params),t):nl(a)?(t.import=!0,delete t.filename,t.params=pe(o,e),t):["namespace","supports","if","else","for","each","while","debug","mixin","include","function","return","define-mixin","add-mixin"].includes(u)?(o=o.replace(/(\$\S+?)(\s+)?\.{3}/u,"$1...$2"),o=o.replace(/^(?!if)(\S+)(\s+)\(/u,"$1($2"),t.value=pe(o,e),delete t.params,t):["media","custom-media"].includes(a)?o.includes("#{")?{type:"media-unknown",value:o}:(t.params=ma(o),t):(t.params=o,t)}}return t}function Ks(t,e,s){let r=Ze(e),{frontMatter:n}=r;e=r.content;let i;try{i=t(e,{map:!1})}catch(o){let{name:u,reason:a,line:c,column:f}=o;throw typeof c!="number"?o:aa(`${u}: ${a}`,{loc:{start:{line:c,column:f}},cause:o})}return s.originalText=e,i=ll(X(i,"css-"),s),Kr(i,e),n&&(n.source={startOffset:0,endOffset:n.raw.length},i.frontMatter=n),i}function cl(t,e={}){return Ks(ol.default.default,t,e)}function fl(t,e={}){return Ks(s=>al.default.parse(kn(s)),t,e)}function pl(t,e={}){return Ks(ul.default,t,e)}var Qs={astFormat:"postcss",hasPragma:Mn,locStart:P,locEnd:R},Ny={...Qs,parse:cl},Py={...Qs,parse:fl},Ry={...Qs,parse:pl};var Iy={postcss:yi};return wl(qy);}); \ No newline at end of file diff --git a/node_modules/prettier/plugins/postcss.mjs b/node_modules/prettier/plugins/postcss.mjs new file mode 100644 index 0000000..c056287 --- /dev/null +++ b/node_modules/prettier/plugins/postcss.mjs @@ -0,0 +1,54 @@ +var hl=Object.create;var $r=Object.defineProperty;var dl=Object.getOwnPropertyDescriptor;var ml=Object.getOwnPropertyNames;var yl=Object.getPrototypeOf,gl=Object.prototype.hasOwnProperty;var g=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),en=(t,e)=>{for(var s in e)$r(t,s,{get:e[s],enumerable:!0})},wl=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ml(e))!gl.call(t,n)&&n!==s&&$r(t,n,{get:()=>e[n],enumerable:!(r=dl(e,n))||r.enumerable});return t};var xe=(t,e,s)=>(s=t!=null?hl(yl(t)):{},wl(e||!t||!t.__esModule?$r(s,"default",{value:t,enumerable:!0}):s,t));var bi=g((xv,ss)=>{var _=String,xi=function(){return{isColorSupported:!1,reset:_,bold:_,dim:_,italic:_,underline:_,inverse:_,hidden:_,strikethrough:_,black:_,red:_,green:_,yellow:_,blue:_,magenta:_,cyan:_,white:_,gray:_,bgBlack:_,bgRed:_,bgGreen:_,bgYellow:_,bgBlue:_,bgMagenta:_,bgCyan:_,bgWhite:_,blackBright:_,redBright:_,greenBright:_,yellowBright:_,blueBright:_,magentaBright:_,cyanBright:_,whiteBright:_,bgBlackBright:_,bgRedBright:_,bgGreenBright:_,bgYellowBright:_,bgBlueBright:_,bgMagentaBright:_,bgCyanBright:_,bgWhiteBright:_}};ss.exports=xi();ss.exports.createColors=xi});var ns=g(()=>{});var Wt=g((Ev,ki)=>{"use strict";var _i=bi(),Ei=ns(),ot=class t extends Error{constructor(e,s,r,n,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),typeof s<"u"&&typeof r<"u"&&(typeof s=="number"?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let s=this.source;e==null&&(e=_i.isColorSupported);let r=f=>f,n=f=>f,i=f=>f;if(e){let{bold:f,gray:p,red:l}=_i.createColors(!0);n=y=>f(l(y)),r=y=>p(y),Ei&&(i=y=>Ei(y))}let o=s.split(/\r?\n/),u=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),c=String(a).length;return o.slice(u,a).map((f,p)=>{let l=u+1+p,y=" "+(" "+l).slice(-c)+" | ";if(l===this.line){if(f.length>160){let h=20,d=Math.max(0,this.column-h),m=Math.max(this.column+h,this.endColumn+h),b=f.slice(d,m),w=r(y.replace(/\d/g," "))+f.slice(0,Math.min(this.column-1,h-1)).replace(/[^\t]/g," ");return n(">")+r(y)+i(b)+` + `+w+n("^")}let x=r(y.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+r(y)+i(f)+` + `+x+n("^")}return" "+r(y)+i(f)}).join(` +`)}toString(){let e=this.showSourceCode();return e&&(e=` + +`+e+` +`),this.name+": "+this.message+e}};ki.exports=ot;ot.default=ot});var Yt=g((kv,Ti)=>{"use strict";var Si={after:` +`,beforeClose:` +`,beforeComment:` +`,beforeDecl:` +`,beforeOpen:" ",beforeRule:` +`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function wc(t){return t[0].toUpperCase()+t.slice(1)}var at=class{constructor(e){this.builder=e}atrule(e,s){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let i=(e.raws.between||"")+(s?";":"");this.builder(r+n+i,e)}}beforeAfter(e,s){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):s==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&n.type!=="root";)i+=1,n=n.parent;if(r.includes(` +`)){let o=this.raw(e,null,"indent");if(o.length)for(let u=0;u0&&e.nodes[s].type==="comment";)s-=1;let r=this.raw(e,"semicolon");for(let n=0;n{if(n=a.raws[s],typeof n<"u")return!1})}return typeof n>"u"&&(n=Si[r]),o.rawCache[r]=n,n}rawBeforeClose(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return s=r.raws.after,s.includes(` +`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawBeforeComment(e,s){let r;return e.walkComments(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(` +`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(s,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,s){let r;return e.walkDecls(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(` +`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(s,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let s;return e.walk(r=>{if(r.type!=="decl"&&(s=r.raws.between,typeof s<"u"))return!1}),s}rawBeforeRule(e){let s;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return s=r.raws.before,s.includes(` +`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawColon(e){let s;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return s=r.raws.between.replace(/[^\s:]/g,""),!1}),s}rawEmptyBody(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(s=r.raws.after,typeof s<"u"))return!1}),s}rawIndent(e){if(e.raws.indent)return e.raws.indent;let s;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof r.raws.before<"u"){let i=r.raws.before.split(` +`);return s=i[i.length-1],s=s.replace(/\S/g,""),!1}}),s}rawSemicolon(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(s=r.raws.semicolon,typeof s<"u"))return!1}),s}rawValue(e,s){let r=e[s],n=e.raws[s];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,s){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,s)}};Ti.exports=at;at.default=at});var ut=g((Sv,Ci)=>{"use strict";var vc=Yt();function is(t,e){new vc(e).stringify(t)}Ci.exports=is;is.default=is});var Vt=g((Tv,os)=>{"use strict";os.exports.isClean=Symbol("isClean");os.exports.my=Symbol("my")});var pt=g((Cv,Oi)=>{"use strict";var xc=Wt(),bc=Yt(),_c=ut(),{isClean:lt,my:Ec}=Vt();function as(t,e){let s=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let n=t[r],i=typeof n;r==="parent"&&i==="object"?e&&(s[r]=e):r==="source"?s[r]=n:Array.isArray(n)?s[r]=n.map(o=>as(o,s)):(i==="object"&&n!==null&&(n=as(n)),s[r]=n)}return s}function ct(t,e){if(e&&typeof e.offset<"u")return e.offset;let s=1,r=1,n=0;for(let i=0;ie.root().toProxy():e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="prop"||s==="value"||s==="name"||s==="params"||s==="important"||s==="text")&&e.markDirty()),!0}}}markClean(){this[lt]=!0}markDirty(){if(this[lt]){this[lt]=!1;let e=this;for(;e=e.parent;)e[lt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e){let s=this.source.start;if(e.index)s=this.positionInside(e.index);else if(e.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(ct(r,this.source.start),ct(r,this.source.end)).indexOf(e.word);i!==-1&&(s=this.positionInside(i))}return s}positionInside(e){let s=this.source.start.column,r=this.source.start.line,n="document"in this.source.input?this.source.input.document:this.source.input.css,i=ct(n,this.source.start),o=i+e;for(let u=i;utypeof a=="object"&&a.toJSON?a.toJSON(null,s):a);else if(typeof u=="object"&&u.toJSON)r[o]=u.toJSON(null,s);else if(o==="source"){let a=s.get(u.input);a==null&&(a=i,s.set(u.input,i),i++),r[o]={end:u.end,inputId:a,start:u.start}}else r[o]=u}return n&&(r.inputs=[...s.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=_c){e.stringify&&(e=e.stringify);let s="";return e(this,r=>{s+=r}),s}warn(e,s,r){let n={node:this};for(let i in r)n[i]=r[i];return e.warn(s,n)}};Oi.exports=ft;ft.default=ft});var Re=g((Ov,Ai)=>{"use strict";var kc=pt(),ht=class extends kc{constructor(e){super(e),this.type="comment"}};Ai.exports=ht;ht.default=ht});var mt=g((Av,Ni)=>{"use strict";var Sc=pt(),dt=class extends Sc{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}};Ni.exports=dt;dt.default=dt});var le=g((Nv,Ui)=>{"use strict";var Pi=Re(),Ri=mt(),Tc=pt(),{isClean:Ii,my:qi}=Vt(),us,Li,Di,ls;function Bi(t){return t.map(e=>(e.nodes&&(e.nodes=Bi(e.nodes)),delete e.source,e))}function Mi(t){if(t[Ii]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)Mi(e)}var z=class t extends Tc{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let s of e){let r=this.normalize(s,this.last);for(let n of r)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let s of this.nodes)s.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let s=this.getIterator(),r,n;for(;this.indexes[s]e[s](...r.map(n=>typeof n=="function"?(i,o)=>n(i.toProxy(),o):n)):s==="every"||s==="some"?r=>e[s]((n,...i)=>r(n.toProxy(),...i)):s==="root"?()=>e.root().toProxy():s==="nodes"?e.nodes.map(r=>r.toProxy()):s==="first"||s==="last"?e[s].toProxy():e[s]:e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="name"||s==="params"||s==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,s){let r=this.index(e),n=this.normalize(s,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of n)this.proxyOf.nodes.splice(r+1,0,o);let i;for(let o in this.indexes)i=this.indexes[o],r"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Ri(e)]}else if(e.selector||e.selectors)e=[new ls(e)];else if(e.name)e=[new us(e)];else if(e.text)e=[new Pi(e)];else throw new Error("Unknown node type in node creation");return e.map(n=>(n[qi]||t.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[Ii]&&Mi(n),n.raws||(n.raws={}),typeof n.raws.before>"u"&&s&&typeof s.raws.before<"u"&&(n.raws.before=s.raws.before.replace(/\S/g,"")),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let s of e){let r=this.normalize(s,this.first,"prepend").reverse();for(let n of r)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let s;for(let r in this.indexes)s=this.indexes[r],s>=e&&(this.indexes[r]=s-1);return this.markDirty(),this}replaceValues(e,s,r){return r||(r=s,s={}),this.walkDecls(n=>{s.props&&!s.props.includes(n.prop)||s.fast&&!n.value.includes(s.fast)||(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((s,r)=>{let n;try{n=e(s,r)}catch(i){throw s.addToError(i)}return n!==!1&&s.walk&&(n=s.walk(e)),n})}walkAtRules(e,s){return s?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="atrule"&&e.test(r.name))return s(r,n)}):this.walk((r,n)=>{if(r.type==="atrule"&&r.name===e)return s(r,n)}):(s=e,this.walk((r,n)=>{if(r.type==="atrule")return s(r,n)}))}walkComments(e){return this.walk((s,r)=>{if(s.type==="comment")return e(s,r)})}walkDecls(e,s){return s?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="decl"&&e.test(r.prop))return s(r,n)}):this.walk((r,n)=>{if(r.type==="decl"&&r.prop===e)return s(r,n)}):(s=e,this.walk((r,n)=>{if(r.type==="decl")return s(r,n)}))}walkRules(e,s){return s?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="rule"&&e.test(r.selector))return s(r,n)}):this.walk((r,n)=>{if(r.type==="rule"&&r.selector===e)return s(r,n)}):(s=e,this.walk((r,n)=>{if(r.type==="rule")return s(r,n)}))}};z.registerParse=t=>{Li=t};z.registerRule=t=>{ls=t};z.registerAtRule=t=>{us=t};z.registerRoot=t=>{Di=t};Ui.exports=z;z.default=z;z.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,us.prototype):t.type==="rule"?Object.setPrototypeOf(t,ls.prototype):t.type==="decl"?Object.setPrototypeOf(t,Ri.prototype):t.type==="comment"?Object.setPrototypeOf(t,Pi.prototype):t.type==="root"&&Object.setPrototypeOf(t,Di.prototype),t[qi]=!0,t.nodes&&t.nodes.forEach(e=>{z.rebuild(e)})}});var $i=g((Pv,Fi)=>{var Cc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Oc=(t,e=21)=>(s=e)=>{let r="",n=s|0;for(;n--;)r+=t[Math.random()*t.length|0];return r},Ac=(t=21)=>{let e="",s=t|0;for(;s--;)e+=Cc[Math.random()*64|0];return e};Fi.exports={nanoid:Ac,customAlphabet:Oc}});var Wi=g(()=>{});var cs=g((qv,Yi)=>{Yi.exports=class{}});var qe=g((Dv,ji)=>{"use strict";var{nanoid:Nc}=$i(),{isAbsolute:hs,resolve:ds}={},{SourceMapConsumer:Pc,SourceMapGenerator:Rc}=Wi(),{fileURLToPath:Vi,pathToFileURL:zt}={},zi=Wt(),Ic=cs(),fs=ns(),ps=Symbol("fromOffsetCache"),qc=!!(Pc&&Rc),Gi=!!(ds&&hs),Ie=class{get from(){return this.file||this.id}constructor(e,s={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,s.document&&(this.document=s.document.toString()),s.from&&(!Gi||/^\w+:\/\//.test(s.from)||hs(s.from)?this.file=s.from:this.file=ds(s.from)),Gi&&qc){let r=new Ic(this.css,s);if(r.text){this.map=r;let n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(e,s,r,n={}){let i,o,u;if(s&&typeof s=="object"){let c=s,f=r;if(typeof c.offset=="number"){let p=this.fromOffset(c.offset);s=p.line,r=p.col}else s=c.line,r=c.column;if(typeof f.offset=="number"){let p=this.fromOffset(f.offset);o=p.line,i=p.col}else o=f.line,i=f.column}else if(!r){let c=this.fromOffset(s);s=c.line,r=c.col}let a=this.origin(s,r,o,i);return a?u=new zi(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,n.plugin):u=new zi(e,o===void 0?s:{column:r,line:s},o===void 0?r:{column:i,line:o},this.css,this.file,n.plugin),u.input={column:r,endColumn:i,endLine:o,line:s,source:this.css},this.file&&(zt&&(u.input.url=zt(this.file).toString()),u.input.file=this.file),u}fromOffset(e){let s,r;if(this[ps])r=this[ps];else{let i=this.css.split(` +`);r=new Array(i.length);let o=0;for(let u=0,a=i.length;u=s)n=r.length-1;else{let i=r.length-2,o;for(;n>1),e=r[o+1])n=o+1;else{n=o;break}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ds(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,s,r,n){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:s,line:e});if(!o.source)return!1;let u;typeof r=="number"&&(u=i.originalPositionFor({column:n,line:r}));let a;hs(o.source)?a=zt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||zt(this.map.mapFile));let c={column:o.column,endColumn:u&&u.column,endLine:u&&u.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Vi)c.file=Vi(a);else throw new Error("file: protocol is not available in this PostCSS build");let f=i.sourceContentFor(o.source);return f&&(c.source=f),c}toJSON(){let e={};for(let s of["hasBOM","css","file","id"])this[s]!=null&&(e[s]=this[s]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};ji.exports=Ie;Ie.default=Ie;fs&&fs.registerInput&&fs.registerInput(Ie)});var Gt=g((Bv,Ki)=>{"use strict";var Hi=le(),Le=class extends Hi{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};Ki.exports=Le;Le.default=Le;Hi.registerAtRule(Le)});var De=g((Mv,Zi)=>{"use strict";var Qi=le(),Ji,Xi,ce=class extends Qi{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,s,r){let n=super.normalize(e);if(s){if(r==="prepend")this.nodes.length>1?s.raws.before=this.nodes[1].raws.before:delete s.raws.before;else if(this.first!==s)for(let i of n)i.raws.before=s.raws.before}return n}removeChild(e,s){let r=this.index(e);return!s&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Ji(new Xi,this,e).stringify()}};ce.registerLazyResult=t=>{Ji=t};ce.registerProcessor=t=>{Xi=t};Zi.exports=ce;ce.default=ce;Qi.registerRoot(ce)});var ms=g((Uv,eo)=>{"use strict";var yt={comma(t){return yt.split(t,[","],!0)},space(t){let e=[" ",` +`," "];return yt.split(t,e)},split(t,e,s){let r=[],n="",i=!1,o=0,u=!1,a="",c=!1;for(let f of t)c?c=!1:f==="\\"?c=!0:u?f===a&&(u=!1):f==='"'||f==="'"?(u=!0,a=f):f==="("?o+=1:f===")"?o>0&&(o-=1):o===0&&e.includes(f)&&(i=!0),i?(n!==""&&r.push(n.trim()),n="",i=!1):n+=f;return(s||n!=="")&&r.push(n.trim()),r}};eo.exports=yt;yt.default=yt});var jt=g((Fv,ro)=>{"use strict";var to=le(),Lc=ms(),Be=class extends to{get selectors(){return Lc.comma(this.selector)}set selectors(e){let s=this.selector?this.selector.match(/,\s*/):null,r=s?s[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};ro.exports=Be;Be.default=Be;to.registerRule(Be)});var Qt=g(($v,no)=>{"use strict";var Ht=/[\t\n\f\r "#'()/;[\\\]{}]/g,Kt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Dc=/.[\r\n"'(/\\]/,so=/[\da-f]/i;no.exports=function(e,s={}){let r=e.css.valueOf(),n=s.ignoreErrors,i,o,u,a,c,f,p,l,y,x,h=r.length,d=0,m=[],b=[];function w(){return d}function v(W){throw e.error("Unclosed "+W,d)}function N(){return b.length===0&&d>=h}function F(W){if(b.length)return b.pop();if(d>=h)return;let T=W?W.ignoreUnclosed:!1;switch(i=r.charCodeAt(d),i){case 10:case 32:case 9:case 13:case 12:{a=d;do a+=1,i=r.charCodeAt(a);while(i===32||i===10||i===9||i===13||i===12);f=["space",r.slice(d,a)],d=a-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let C=String.fromCharCode(i);f=[C,C,d];break}case 40:{if(x=m.length?m.pop()[1]:"",y=r.charCodeAt(d+1),x==="url"&&y!==39&&y!==34&&y!==32&&y!==10&&y!==9&&y!==12&&y!==13){a=d;do{if(p=!1,a=r.indexOf(")",a+1),a===-1)if(n||T){a=d;break}else v("bracket");for(l=a;r.charCodeAt(l-1)===92;)l-=1,p=!p}while(p);f=["brackets",r.slice(d,a+1),d,a],d=a}else a=r.indexOf(")",d+1),o=r.slice(d,a+1),a===-1||Dc.test(o)?f=["(","(",d]:(f=["brackets",o,d,a],d=a);break}case 39:case 34:{c=i===39?"'":'"',a=d;do{if(p=!1,a=r.indexOf(c,a+1),a===-1)if(n||T){a=d+1;break}else v("string");for(l=a;r.charCodeAt(l-1)===92;)l-=1,p=!p}while(p);f=["string",r.slice(d,a+1),d,a],d=a;break}case 64:{Ht.lastIndex=d+1,Ht.test(r),Ht.lastIndex===0?a=r.length-1:a=Ht.lastIndex-2,f=["at-word",r.slice(d,a+1),d,a],d=a;break}case 92:{for(a=d,u=!0;r.charCodeAt(a+1)===92;)a+=1,u=!u;if(i=r.charCodeAt(a+1),u&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(a+=1,so.test(r.charAt(a)))){for(;so.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===32&&(a+=1)}f=["word",r.slice(d,a+1),d,a],d=a;break}default:{i===47&&r.charCodeAt(d+1)===42?(a=r.indexOf("*/",d+2)+1,a===0&&(n||T?a=r.length:v("comment")),f=["comment",r.slice(d,a+1),d,a],d=a):(Kt.lastIndex=d+1,Kt.test(r),Kt.lastIndex===0?a=r.length-1:a=Kt.lastIndex-2,f=["word",r.slice(d,a+1),d,a],m.push(f),d=a);break}}return d++,f}function Q(W){b.push(W)}return{back:Q,endOfFile:N,nextToken:F,position:w}}});var Jt=g((Wv,ao)=>{"use strict";var Bc=Gt(),Mc=Re(),Uc=mt(),Fc=De(),io=jt(),$c=Qt(),oo={empty:!0,space:!0};function Wc(t){for(let e=t.length-1;e>=0;e--){let s=t[e],r=s[3]||s[2];if(r)return r}}var ys=class{constructor(e){this.input=e,this.root=new Fc,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let s=new Bc;s.name=e[1].slice(1),s.name===""&&this.unnamedAtrule(s,e),this.init(s,e[2]);let r,n,i,o=!1,u=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(a.length>0){for(i=a.length-1,n=a[i];n&&n[0]==="space";)n=a[--i];n&&(s.source.end=this.getPosition(n[3]||n[2]),s.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(s.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(s,"params",a),o&&(e=a[a.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),u&&(s.nodes=[],this.current=s)}checkMissedSemicolon(e){let s=this.colon(e);if(s===!1)return;let r=0,n;for(let i=s-1;i>=0&&(n=e[i],!(n[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(e){let s=0,r,n,i;for(let[o,u]of e.entries()){if(n=u,i=n[0],i==="("&&(s+=1),i===")"&&(s-=1),s===0&&i===":")if(!r)this.doubleColon(n);else{if(r[0]==="word"&&r[1]==="progid")continue;return o}r=n}return!1}comment(e){let s=new Mc;this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))s.text="",s.raws.left=r,s.raws.right="";else{let n=r.match(/^(\s*)([^]*\S)(\s*)$/);s.text=n[2],s.raws.left=n[1],s.raws.right=n[3]}}createTokenizer(){this.tokenizer=$c(this.input)}decl(e,s){let r=new Uc;this.init(r,e[0][2]);let n=e[e.length-1];for(n[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||Wc(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let i;for(;e.length;)if(i=e.shift(),i[0]===":"){r.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],u;for(;e.length&&(u=e[0][0],!(u!=="space"&&u!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(i=e[c],i[1].toLowerCase()==="!important"){r.important=!0;let f=this.stringFrom(e,c);f=this.spacesFromEnd(e)+f,f!==" !important"&&(r.raws.important=f);break}else if(i[1].toLowerCase()==="important"){let f=e.slice(0),p="";for(let l=c;l>0;l--){let y=f[l][0];if(p.trim().startsWith("!")&&y!=="space")break;p=f.pop()[1]+p}p.trim().startsWith("!")&&(r.important=!0,r.raws.important=p,e=f)}if(i[0]!=="space"&&i[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),s),r.value.includes(":")&&!s&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let s=new io;this.init(s,e[2]),s.selector="",s.raws.between="",this.current=s}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let s=this.current.nodes[this.current.nodes.length-1];s&&s.type==="rule"&&!s.raws.ownSemicolon&&(s.raws.ownSemicolon=this.spaces,this.spaces="",s.source.end=this.getPosition(e[2]),s.source.end.offset+=s.raws.ownSemicolon.length)}}getPosition(e){let s=this.input.fromOffset(e);return{column:s.col,line:s.line,offset:e}}init(e,s){this.current.push(e),e.source={input:this.input,start:this.getPosition(s)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let s=!1,r=null,n=!1,i=null,o=[],u=e[1].startsWith("--"),a=[],c=e;for(;c;){if(r=c[0],a.push(c),r==="("||r==="[")i||(i=c),o.push(r==="("?")":"]");else if(u&&n&&r==="{")i||(i=c),o.push("}");else if(o.length===0)if(r===";")if(n){this.decl(a,u);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),s=!0;break}else r===":"&&(n=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(s=!0),o.length>0&&this.unclosedBracket(i),s&&n){if(!u)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,u)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,s,r,n){let i,o,u=r.length,a="",c=!0,f,p;for(let l=0;ly+x[1],"");e.raws[s]={raw:l,value:a}}e[s]=a}rule(e){e.pop();let s=new io;this.init(s,e[0][2]),s.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(s,"selector",e),this.current=s}spacesAndCommentsFromEnd(e){let s,r="";for(;e.length&&(s=e[e.length-1][0],!(s!=="space"&&s!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let s,r="";for(;e.length&&(s=e[0][0],!(s!=="space"&&s!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let s,r="";for(;e.length&&(s=e[e.length-1][0],s==="space");)r=e.pop()[1]+r;return r}stringFrom(e,s){let r="";for(let n=s;n{"use strict";var Yc=le(),Vc=qe(),zc=Jt();function Xt(t,e){let s=new Vc(t,e),r=new zc(s);try{r.parse()}catch(n){throw n}return r.root}uo.exports=Xt;Xt.default=Xt;Yc.registerParse(Xt)});var lo=g((Vv,gs)=>{var Gc=Qt(),jc=qe();gs.exports={isInlineComment(t){if(t[0]==="word"&&t[1].slice(0,2)==="//"){let e=t,s=[],r,n;for(;t;){if(/\r?\n/.test(t[1])){if(/['"].*\r?\n/.test(t[1])){s.push(t[1].substring(0,t[1].indexOf(` +`))),n=t[1].substring(t[1].indexOf(` +`));let o=this.input.css.valueOf().substring(this.tokenizer.position());n+=o,r=t[3]+o.length-n.length}else this.tokenizer.back(t);break}s.push(t[1]),r=t[2],t=this.tokenizer.nextToken({ignoreUnclosed:!0})}let i=["comment",s.join(""),e[2],r];return this.inlineComment(i),n&&(this.input=new jc(n),this.tokenizer=Gc(this.input)),!0}else if(t[1]==="/"){let e=this.tokenizer.nextToken({ignoreUnclosed:!0});if(e[0]==="comment"&&/^\/\*/.test(e[1]))return e[0]="word",e[1]=e[1].slice(1),t[1]="//",this.tokenizer.back(e),gs.exports.isInlineComment.bind(this)(t)}return!1}}});var fo=g((zv,co)=>{co.exports={interpolation(t){let e=[t,this.tokenizer.nextToken()],s=["word","}"];if(e[0][1].length>1||e[1][0]!=="{")return this.tokenizer.back(e[1]),!1;for(t=this.tokenizer.nextToken();t&&s.includes(t[0]);)e.push(t),t=this.tokenizer.nextToken();let r=e.map(u=>u[1]),[n]=e,i=e.pop(),o=["word",r.join(""),n[2],i[2]];return this.tokenizer.back(t),this.tokenizer.back(o),!0}}});var ho=g((Gv,po)=>{var Hc=/^#[0-9a-fA-F]{6}$|^#[0-9a-fA-F]{3}$/,Kc=/\.[0-9]/,Qc=t=>{let[,e]=t,[s]=e;return(s==="."||s==="#")&&Hc.test(e)===!1&&Kc.test(e)===!1};po.exports={isMixinToken:Qc}});var yo=g((jv,mo)=>{var Jc=Qt(),Xc=/^url\((.+)\)/;mo.exports=t=>{let{name:e,params:s=""}=t;if(e==="import"&&s.length){t.import=!0;let r=Jc({css:s});for(t.filename=s.replace(Xc,"$1");!r.endOfFile();){let[n,i]=r.nextToken();if(n==="word"&&i==="url")return;if(n==="brackets"){t.options=i,t.filename=s.replace(i,"").trim();break}}}}});var xo=g((Hv,vo)=>{var go=/:$/,wo=/^:(\s+)?/;vo.exports=t=>{let{name:e,params:s=""}=t;if(t.name.slice(-1)===":"){if(go.test(e)){let[r]=e.match(go);t.name=e.replace(r,""),t.raws.afterName=r+(t.raws.afterName||""),t.variable=!0,t.value=t.params}if(wo.test(s)){let[r]=s.match(wo);t.value=s.replace(r,""),t.raws.afterName=(t.raws.afterName||"")+r,t.variable=!0}}}});var Eo=g((Qv,_o)=>{var Zc=Re(),ef=Jt(),{isInlineComment:tf}=lo(),{interpolation:bo}=fo(),{isMixinToken:rf}=ho(),sf=yo(),nf=xo(),of=/(!\s*important)$/i;_o.exports=class extends ef{constructor(...e){super(...e),this.lastNode=null}atrule(e){bo.bind(this)(e)||(super.atrule(e),sf(this.lastNode),nf(this.lastNode))}decl(...e){super.decl(...e),/extend\(.+\)/i.test(this.lastNode.value)&&(this.lastNode.extend=!0)}each(e){e[0][1]=` ${e[0][1]}`;let s=e.findIndex(u=>u[0]==="("),r=e.reverse().find(u=>u[0]===")"),n=e.reverse().indexOf(r),o=e.splice(s,n).map(u=>u[1]).join("");for(let u of e.reverse())this.tokenizer.back(u);this.atrule(this.tokenizer.nextToken()),this.lastNode.function=!0,this.lastNode.params=o}init(e,s,r){super.init(e,s,r),this.lastNode=e}inlineComment(e){let s=new Zc,r=e[1].slice(2);if(this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.inline=!0,s.raws.begin="//",/^\s*$/.test(r))s.text="",s.raws.left=r,s.raws.right="";else{let n=r.match(/^(\s*)([^]*[^\s])(\s*)$/);[,s.raws.left,s.text,s.raws.right]=n}}mixin(e){let[s]=e,r=s[1].slice(0,1),n=e.findIndex(c=>c[0]==="brackets"),i=e.findIndex(c=>c[0]==="("),o="";if((n<0||n>3)&&i>0){let c=e.reduce((w,v,N)=>v[0]===")"?N:w),p=e.slice(i,c+i).map(w=>w[1]).join(""),[l]=e.slice(i),y=[l[2],l[3]],[x]=e.slice(c,c+1),h=[x[2],x[3]],d=["brackets",p].concat(y,h),m=e.slice(0,i),b=e.slice(c+1);e=m,e.push(d),e=e.concat(b)}let u=[];for(let c of e)if((c[1]==="!"||u.length)&&u.push(c),c[1]==="important")break;if(u.length){let[c]=u,f=e.indexOf(c),p=u[u.length-1],l=[c[2],c[3]],y=[p[4],p[5]],h=["word",u.map(d=>d[1]).join("")].concat(l,y);e.splice(f,u.length,h)}let a=e.findIndex(c=>of.test(c[1]));a>0&&([,o]=e[a],e.splice(a,1));for(let c of e.reverse())this.tokenizer.back(c);this.atrule(this.tokenizer.nextToken()),this.lastNode.mixin=!0,this.lastNode.raws.identifier=r,o&&(this.lastNode.important=!0,this.lastNode.raws.important=o)}other(e){tf.bind(this)(e)||super.other(e)}rule(e){let s=e[e.length-1],r=e[e.length-2];if(r[0]==="at-word"&&s[0]==="{"&&(this.tokenizer.back(s),bo.bind(this)(r))){let i=this.tokenizer.nextToken();e=e.slice(0,e.length-2).concat([i]);for(let o of e.reverse())this.tokenizer.back(o);return}super.rule(e),/:extend\(.+\)/i.test(this.lastNode.selector)&&(this.lastNode.extend=!0)}unknownWord(e){let[s]=e;if(e[0][1]==="each"&&e[1][0]==="("){this.each(e);return}if(rf(s)){this.mixin(e);return}super.unknownWord(e)}}});var So=g((Xv,ko)=>{var af=Yt();ko.exports=class extends af{atrule(e,s){if(!e.mixin&&!e.variable&&!e.function){super.atrule(e,s);return}let n=`${e.function?"":e.raws.identifier||"@"}${e.name}`,i=e.params?this.rawValue(e,"params"):"",o=e.raws.important||"";if(e.variable&&(i=e.value),typeof e.raws.afterName<"u"?n+=e.raws.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i+o);else{let u=(e.raws.between||"")+o+(s?";":"");this.builder(n+i+u,e)}}comment(e){if(e.inline){let s=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(`//${s}${e.text}${r}`,e)}else super.comment(e)}}});var To=g((Zv,ws)=>{var uf=qe(),lf=Eo(),cf=So();ws.exports={parse(t,e){let s=new uf(t,e),r=new lf(s);return r.parse(),r.root.walk(n=>{let i=s.css.lastIndexOf(n.source.input.css);if(i===0)return;if(i+n.source.input.css.length!==s.css.length)throw new Error("Invalid state detected in postcss-less");let o=i+n.source.start.offset,u=s.fromOffset(i+n.source.start.offset);if(n.source.start={offset:o,line:u.line,column:u.col},n.source.end){let a=i+n.source.end.offset,c=s.fromOffset(i+n.source.end.offset);n.source.end={offset:a,line:c.line,column:c.col}}}),r.root},stringify(t,e){new cf(e).stringify(t)},nodeToString(t){let e="";return ws.exports.stringify(t,s=>{e+=s}),e}}});var Zt=g((ex,Ao)=>{"use strict";var ff=le(),Co,Oo,ye=class extends ff{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Co(new Oo,this,e).stringify()}};ye.registerLazyResult=t=>{Co=t};ye.registerProcessor=t=>{Oo=t};Ao.exports=ye;ye.default=ye});var Po=g((tx,No)=>{"use strict";var pf=Gt(),hf=Re(),df=mt(),mf=qe(),yf=cs(),gf=De(),wf=jt();function wt(t,e){if(Array.isArray(t))return t.map(n=>wt(n));let{inputs:s,...r}=t;if(s){e=[];for(let n of s){let i={...n,__proto__:mf.prototype};i.map&&(i.map={...i.map,__proto__:yf.prototype}),e.push(i)}}if(r.nodes&&(r.nodes=t.nodes.map(n=>wt(n,e))),r.source){let{inputId:n,...i}=r.source;r.source=i,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new gf(r);if(r.type==="decl")return new df(r);if(r.type==="rule")return new wf(r);if(r.type==="comment")return new hf(r);if(r.type==="atrule")return new pf(r);throw new Error("Unknown node type: "+t.type)}No.exports=wt;wt.default=wt});var vs=g((rx,Ro)=>{Ro.exports=class{generate(){}}});var xs=g((nx,Io)=>{"use strict";var vt=class{constructor(e,s={}){if(this.type="warning",this.text=e,s.node&&s.node.source){let r=s.node.rangeBy(s);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in s)this[r]=s[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};Io.exports=vt;vt.default=vt});var er=g((ix,qo)=>{"use strict";var vf=xs(),xt=class{get content(){return this.css}constructor(e,s,r){this.processor=e,this.messages=[],this.root=s,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,s={}){s.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(s.plugin=this.lastPlugin.postcssPlugin);let r=new vf(e,s);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};qo.exports=xt;xt.default=xt});var bs=g((ox,Do)=>{"use strict";var Lo={};Do.exports=function(e){Lo[e]||(Lo[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))}});var ks=g((ux,Fo)=>{"use strict";var xf=le(),bf=Zt(),_f=vs(),Ef=gt(),Bo=er(),kf=De(),Sf=ut(),{isClean:K,my:Tf}=Vt(),ax=bs(),Cf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Of={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Af={Once:!0,postcssPlugin:!0,prepare:!0},Me=0;function bt(t){return typeof t=="object"&&typeof t.then=="function"}function Uo(t){let e=!1,s=Cf[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[s,s+"-"+e,Me,s+"Exit",s+"Exit-"+e]:e?[s,s+"-"+e,s+"Exit",s+"Exit-"+e]:t.append?[s,Me,s+"Exit"]:[s,s+"Exit"]}function Mo(t){let e;return t.type==="document"?e=["Document",Me,"DocumentExit"]:t.type==="root"?e=["Root",Me,"RootExit"]:e=Uo(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function _s(t){return t[K]=!1,t.nodes&&t.nodes.forEach(e=>_s(e)),t}var Es={},fe=class t{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,s,r){this.stringified=!1,this.processed=!1;let n;if(typeof s=="object"&&s!==null&&(s.type==="root"||s.type==="document"))n=_s(s);else if(s instanceof t||s instanceof Bo)n=_s(s.root),s.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let i=Ef;r.syntax&&(i=r.syntax.parse),r.parser&&(i=r.parser),i.parse&&(i=i.parse);try{n=i(s,r)}catch(o){this.processed=!0,this.error=o}n&&!n[Tf]&&xf.rebuild(n)}this.result=new Bo(e,n,r),this.helpers={...Es,postcss:Es,result:this.result},this.plugins=this.processor.plugins.map(i=>typeof i=="object"&&i.prepare?{...i,...i.prepare(this.result)}:i)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,s){let r=this.result.lastPlugin;try{s&&s.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(n){console&&console.error&&console.error(n)}return e}prepareVisitors(){this.listeners={};let e=(s,r,n)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([s,n])};for(let s of this.plugins)if(typeof s=="object")for(let r in s){if(!Of[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${s.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Af[r])if(typeof s[r]=="object")for(let n in s[r])n==="*"?e(s,r,s[r][n]):e(s,r+"-"+n.toLowerCase(),s[r][n]);else typeof s[r]=="function"&&e(s,r,s[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e0;){let r=this.visitTick(s);if(bt(r))try{await r}catch(n){let i=s[s.length-1].node;throw this.handleError(n,i)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;try{if(e.type==="document"){let n=e.nodes.map(i=>r(i,this.helpers));await Promise.all(n)}else await r(e,this.helpers)}catch(n){throw this.handleError(n)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let s=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return bt(s[0])?Promise.all(s):s}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(s){throw this.handleError(s)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,s=Sf;e.syntax&&(s=e.syntax.stringify),e.stringifier&&(s=e.stringifier),s.stringify&&(s=s.stringify);let n=new _f(s,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let s=this.runOnRoot(e);if(bt(s))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[K];)e[K]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let s of e.nodes)this.visitSync(this.listeners.OnceExit,s);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,s){return this.async().then(e,s)}toString(){return this.css}visitSync(e,s){for(let[r,n]of e){this.result.lastPlugin=r;let i;try{i=n(s,this.helpers)}catch(o){throw this.handleError(o,s.proxyOf)}if(s.type!=="root"&&s.type!=="document"&&!s.parent)return!0;if(bt(i))throw this.getAsyncError()}}visitTick(e){let s=e[e.length-1],{node:r,visitors:n}=s;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(n.length>0&&s.visitorIndex{n[K]||this.walkSync(n)});else{let n=this.listeners[r];if(n&&this.visitSync(n,e.toProxy()))return}}warnings(){return this.sync().warnings()}};fe.registerPostcss=t=>{Es=t};Fo.exports=fe;fe.default=fe;kf.registerLazyResult(fe);bf.registerLazyResult(fe)});var Wo=g((cx,$o)=>{"use strict";var Nf=vs(),Pf=gt(),Rf=er(),If=ut(),lx=bs(),_t=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,s=Pf;try{e=s(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,s,r){s=s.toString(),this.stringified=!1,this._processor=e,this._css=s,this._opts=r,this._map=void 0;let n,i=If;this.result=new Rf(this._processor,n,this._opts),this.result.css=s;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let u=new Nf(i,n,this._opts,s);if(u.isMap()){let[a,c]=u.generate();a&&(this.result.css=a),c&&(this.result.map=c)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,s){return this.async().then(e,s)}toString(){return this._css}warnings(){return[]}};$o.exports=_t;_t.default=_t});var Vo=g((fx,Yo)=>{"use strict";var qf=Zt(),Lf=ks(),Df=Wo(),Bf=De(),ge=class{constructor(e=[]){this.version="8.5.3",this.plugins=this.normalize(e)}normalize(e){let s=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))s=s.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)s.push(r);else if(typeof r=="function")s.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return s}process(e,s={}){return!this.plugins.length&&!s.parser&&!s.stringifier&&!s.syntax?new Df(this,e,s):new Lf(this,e,s)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};Yo.exports=ge;ge.default=ge;Bf.registerProcessor(ge);qf.registerProcessor(ge)});var tr=g((px,Jo)=>{"use strict";var zo=Gt(),Go=Re(),Mf=le(),Uf=Wt(),jo=mt(),Ho=Zt(),Ff=Po(),$f=qe(),Wf=ks(),Yf=ms(),Vf=pt(),zf=gt(),Ss=Vo(),Gf=er(),Ko=De(),Qo=jt(),jf=ut(),Hf=xs();function k(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new Ss(t)}k.plugin=function(e,s){let r=!1;function n(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: +https://evilmartians.com/chronicles/postcss-8-plugin-migration`));let u=s(...o);return u.postcssPlugin=e,u.postcssVersion=new Ss().version,u}let i;return Object.defineProperty(n,"postcss",{get(){return i||(i=n()),i}}),n.process=function(o,u,a){return k([n(a)]).process(o,u)},n};k.stringify=jf;k.parse=zf;k.fromJSON=Ff;k.list=Yf;k.comment=t=>new Go(t);k.atRule=t=>new zo(t);k.decl=t=>new jo(t);k.rule=t=>new Qo(t);k.root=t=>new Ko(t);k.document=t=>new Ho(t);k.CssSyntaxError=Uf;k.Declaration=jo;k.Container=Mf;k.Processor=Ss;k.Document=Ho;k.Comment=Go;k.Warning=Hf;k.AtRule=zo;k.Result=Gf;k.Input=$f;k.Rule=Qo;k.Root=Ko;k.Node=Vf;Wf.registerPostcss(k);Jo.exports=k;k.default=k});var Zo=g((hx,Xo)=>{var{Container:Kf}=tr(),Ts=class extends Kf{constructor(e){super(e),this.type="decl",this.isNested=!0,this.nodes||(this.nodes=[])}};Xo.exports=Ts});var ra=g((dx,ta)=>{"use strict";var rr=/[\t\n\f\r "#'()/;[\\\]{}]/g,sr=/[,\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Qf=/.[\r\n"'(/\\]/,ea=/[\da-f]/i,nr=/[\n\f\r]/g;ta.exports=function(e,s={}){let r=e.css.valueOf(),n=s.ignoreErrors,i,o,u,a,c,f,p,l,y,x=r.length,h=0,d=[],m=[],b;function w(){return h}function v(T){throw e.error("Unclosed "+T,h)}function N(){return m.length===0&&h>=x}function F(){let T=1,C=!1,O=!1;for(;T>0;)o+=1,r.length<=o&&v("interpolation"),i=r.charCodeAt(o),l=r.charCodeAt(o+1),C?!O&&i===C?(C=!1,O=!1):i===92?O=!O:O&&(O=!1):i===39||i===34?C=i:i===125?T-=1:i===35&&l===123&&(T+=1)}function Q(T){if(m.length)return m.pop();if(h>=x)return;let C=T?T.ignoreUnclosed:!1;switch(i=r.charCodeAt(h),i){case 10:case 32:case 9:case 13:case 12:{o=h;do o+=1,i=r.charCodeAt(o);while(i===32||i===10||i===9||i===13||i===12);y=["space",r.slice(h,o)],h=o-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let O=String.fromCharCode(i);y=[O,O,h];break}case 44:{y=["word",",",h,h+1];break}case 40:{if(p=d.length?d.pop()[1]:"",l=r.charCodeAt(h+1),p==="url"&&l!==39&&l!==34){for(b=1,f=!1,o=h+1;o<=r.length-1;){if(l=r.charCodeAt(o),l===92)f=!f;else if(l===40)b+=1;else if(l===41&&(b-=1,b===0))break;o+=1}a=r.slice(h,o+1),y=["brackets",a,h,o],h=o}else o=r.indexOf(")",h+1),a=r.slice(h,o+1),o===-1||Qf.test(a)?y=["(","(",h]:(y=["brackets",a,h,o],h=o);break}case 39:case 34:{for(u=i,o=h,f=!1;o{var{Comment:Jf}=tr(),Xf=Jt(),Zf=Zo(),ep=ra(),Cs=class extends Xf{atrule(e){let s=e[1],r=e;for(;!this.tokenizer.endOfFile();){let n=this.tokenizer.nextToken();if(n[0]==="word"&&n[2]===r[3]+1)s+=n[1],r=n;else{this.tokenizer.back(n);break}}super.atrule(["at-word",s,e[2],r[3]])}comment(e){if(e[4]==="inline"){let s=new Jf;this.init(s,e[2]),s.raws.inline=!0;let r=this.input.fromOffset(e[3]);s.source.end={column:r.col,line:r.line,offset:e[3]+1};let n=e[1].slice(2);if(/^\s*$/.test(n))s.text="",s.raws.left=n,s.raws.right="";else{let i=n.match(/^(\s*)([^]*\S)(\s*)$/),o=i[2].replace(/(\*\/|\/\*)/g,"*//*");s.text=o,s.raws.left=i[1],s.raws.right=i[3],s.raws.text=i[2]}}else super.comment(e)}createTokenizer(){this.tokenizer=ep(this.input)}raw(e,s,r,n){if(super.raw(e,s,r,n),e.raws[s]){let i=e.raws[s].raw;e.raws[s].raw=r.reduce((o,u)=>{if(u[0]==="comment"&&u[4]==="inline"){let a=u[1].slice(2).replace(/(\*\/|\/\*)/g,"*//*");return o+"/*"+a+"*/"}else return o+u[1]},""),i!==e.raws[s].raw&&(e.raws[s].scss=i)}}rule(e){let s=!1,r=0,n="";for(let i of e)if(s)i[0]!=="comment"&&i[0]!=="{"&&(n+=i[1]);else{if(i[0]==="space"&&i[1].includes(` +`))break;i[0]==="("?r+=1:i[0]===")"?r-=1:r===0&&i[0]===":"&&(s=!0)}if(!s||n.trim()===""||/^[#:A-Za-z-]/.test(n))super.rule(e);else{e.pop();let i=new Zf;this.init(i,e[0][2]);let o;for(let a=e.length-1;a>=0;a--)if(e[a][0]!=="space"){o=e[a];break}if(o[3]){let a=this.input.fromOffset(o[3]);i.source.end={column:a.col,line:a.line,offset:o[3]+1}}else{let a=this.input.fromOffset(o[2]);i.source.end={column:a.col,line:a.line,offset:o[2]+1}}for(;e[0][0]!=="word";)i.raws.before+=e.shift()[1];if(e[0][2]){let a=this.input.fromOffset(e[0][2]);i.source.start={column:a.col,line:a.line,offset:e[0][2]}}for(i.prop="";e.length;){let a=e[0][0];if(a===":"||a==="space"||a==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let u;for(;e.length;)if(u=e.shift(),u[0]===":"){i.raws.between+=u[1];break}else i.raws.between+=u[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1)),i.raws.between+=this.spacesAndCommentsFromStart(e),this.precheckMissedSemicolon(e);for(let a=e.length-1;a>0;a--){if(u=e[a],u[1]==="!important"){i.important=!0;let c=this.stringFrom(e,a);c=this.spacesFromEnd(e)+c,c!==" !important"&&(i.raws.important=c);break}else if(u[1]==="important"){let c=e.slice(0),f="";for(let p=a;p>0;p--){let l=c[p][0];if(f.trim().indexOf("!")===0&&l!=="space")break;f=c.pop()[1]+f}f.trim().indexOf("!")===0&&(i.important=!0,i.raws.important=f,e=c)}if(u[0]!=="space"&&u[0]!=="comment")break}this.raw(i,"value",e),i.value.includes(":")&&this.checkMissedSemicolon(e),this.current=i}}};sa.exports=Cs});var oa=g((yx,ia)=>{var{Input:tp}=tr(),rp=na();ia.exports=function(e,s){let r=new tp(e,s),n=new rp(r);return n.parse(),n.root}});var As=g(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});function np(t){this.after=t.after,this.before=t.before,this.type=t.type,this.value=t.value,this.sourceIndex=t.sourceIndex}Os.default=np});var Ps=g(Ns=>{"use strict";Object.defineProperty(Ns,"__esModule",{value:!0});var ip=As(),ua=op(ip);function op(t){return t&&t.__esModule?t:{default:t}}function Et(t){var e=this;this.constructor(t),this.nodes=t.nodes,this.after===void 0&&(this.after=this.nodes.length>0?this.nodes[this.nodes.length-1].after:""),this.before===void 0&&(this.before=this.nodes.length>0?this.nodes[0].before:""),this.sourceIndex===void 0&&(this.sourceIndex=this.before.length),this.nodes.forEach(function(s){s.parent=e})}Et.prototype=Object.create(ua.default.prototype);Et.constructor=ua.default;Et.prototype.walk=function(e,s){for(var r=typeof e=="string"||e instanceof RegExp,n=r?s:e,i=typeof e=="string"?new RegExp(e):e,o=0;o{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.parseMediaFeature=fa;kt.parseMediaQuery=Is;kt.parseMediaList=lp;var ap=As(),la=ca(ap),up=Ps(),Rs=ca(up);function ca(t){return t&&t.__esModule?t:{default:t}}function fa(t){var e=arguments.length<=1||arguments[1]===void 0?0:arguments[1],s=[{mode:"normal",character:null}],r=[],n=0,i="",o=null,u=null,a=e,c=t;t[0]==="("&&t[t.length-1]===")"&&(c=t.substring(1,t.length-1),a++);for(var f=0;f0&&(s[c-1].after=i.before),i.type===void 0){if(c>0){if(s[c-1].type==="media-feature-expression"){i.type="keyword";continue}if(s[c-1].value==="not"||s[c-1].value==="only"){i.type="media-type";continue}if(s[c-1].value==="and"){i.type="media-feature-expression";continue}s[c-1].type==="media-type"&&(s[c+1]?i.type=s[c+1].type==="media-feature-expression"?"keyword":"media-feature-expression":i.type="media-feature-expression")}if(c===0){if(!s[c+1]){i.type="media-type";continue}if(s[c+1]&&(s[c+1].type==="media-feature-expression"||s[c+1].type==="keyword")){i.type="media-type";continue}if(s[c+2]){if(s[c+2].type==="media-feature-expression"){i.type="media-type",s[c+1].type="keyword";continue}if(s[c+2].type==="keyword"){i.type="keyword",s[c+1].type="media-type";continue}}if(s[c+3]&&s[c+3].type==="media-feature-expression"){i.type="keyword",s[c+1].type="media-type",s[c+2].type="keyword";continue}}}return s}function lp(t){var e=[],s=0,r=0,n=/^(\s*)url\s*\(/.exec(t);if(n!==null){for(var i=n[0].length,o=1;o>0;){var u=t[i];u==="("&&o++,u===")"&&o--,i++}e.unshift(new la.default({type:"url",value:t.substring(0,i).trim(),sourceIndex:n[1].length,before:n[1],after:/^(\s*)/.exec(t.substring(i))[1]})),s=i}for(var a=s;a{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});qs.default=dp;var cp=Ps(),fp=hp(cp),pp=pa();function hp(t){return t&&t.__esModule?t:{default:t}}function dp(t){return new fp.default({nodes:(0,pp.parseMediaList)(t),type:"media-query-list",value:t.trim()})}});var Ds=g((Sx,ya)=>{ya.exports=function(e,s){if(s=typeof s=="number"?s:1/0,!s)return Array.isArray(e)?e.map(function(n){return n}):e;return r(e,1);function r(n,i){return n.reduce(function(o,u){return Array.isArray(u)&&i{ga.exports=function(t,e){for(var s=-1,r=[];(s=t.indexOf(e,s+1))!==-1;)r.push(s);return r}});var Ms=g((Cx,wa)=>{"use strict";function gp(t,e){for(var s=1,r=t.length,n=t[0],i=t[0],o=1;o{"use strict";ir.__esModule=!0;var va=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function xp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var bp=function t(e,s){if((typeof e>"u"?"undefined":va(e))!=="object")return e;var r=new e.constructor;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=typeof i>"u"?"undefined":va(i);n==="parent"&&o==="object"?s&&(r[n]=s):i instanceof Array?r[n]=i.map(function(u){return t(u,r)}):r[n]=t(i,r)}return r},_p=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};xp(this,t);for(var s in e)this[s]=e[s];var r=e.spaces;r=r===void 0?{}:r;var n=r.before,i=n===void 0?"":n,o=r.after,u=o===void 0?"":o;this.spaces={before:i,after:u}}return t.prototype.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},t.prototype.replaceWith=function(){if(this.parent){for(var s in arguments)this.parent.insertBefore(this,arguments[s]);this.remove()}return this},t.prototype.next=function(){return this.parent.at(this.parent.index(this)+1)},t.prototype.prev=function(){return this.parent.at(this.parent.index(this)-1)},t.prototype.clone=function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=bp(this);for(var n in s)r[n]=s[n];return r},t.prototype.toString=function(){return[this.spaces.before,String(this.value),this.spaces.after].join("")},t}();ir.default=_p;xa.exports=ir.default});var B=g(M=>{"use strict";M.__esModule=!0;var Ox=M.TAG="tag",Ax=M.STRING="string",Nx=M.SELECTOR="selector",Px=M.ROOT="root",Rx=M.PSEUDO="pseudo",Ix=M.NESTING="nesting",qx=M.ID="id",Lx=M.COMMENT="comment",Dx=M.COMBINATOR="combinator",Bx=M.CLASS="class",Mx=M.ATTRIBUTE="attribute",Ux=M.UNIVERSAL="universal"});var ar=g((or,ba)=>{"use strict";or.__esModule=!0;var Ep=function(){function t(e,s){for(var r=0;r=r&&(this.indexes[i]=n-1);return this},e.prototype.removeAll=function(){for(var i=this.nodes,r=Array.isArray(i),n=0,i=r?i:i[Symbol.iterator]();;){var o;if(r){if(n>=i.length)break;o=i[n++]}else{if(n=i.next(),n.done)break;o=n.value}var u=o;u.parent=void 0}return this.nodes=[],this},e.prototype.empty=function(){return this.removeAll()},e.prototype.insertAfter=function(r,n){var i=this.index(r);this.nodes.splice(i+1,0,n);var o=void 0;for(var u in this.indexes)o=this.indexes[u],i<=o&&(this.indexes[u]=o+this.nodes.length);return this},e.prototype.insertBefore=function(r,n){var i=this.index(r);this.nodes.splice(i,0,n);var o=void 0;for(var u in this.indexes)o=this.indexes[u],i<=o&&(this.indexes[u]=o+this.nodes.length);return this},e.prototype.each=function(r){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var n=this.lastEach;if(this.indexes[n]=0,!!this.length){for(var i=void 0,o=void 0;this.indexes[n]{"use strict";ur.__esModule=!0;var Ip=ar(),qp=Dp(Ip),Lp=B();function Dp(t){return t&&t.__esModule?t:{default:t}}function Bp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Mp(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Up(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Fp=function(t){Up(e,t);function e(s){Bp(this,e);var r=Mp(this,t.call(this,s));return r.type=Lp.ROOT,r}return e.prototype.toString=function(){var r=this.reduce(function(n,i){var o=String(i);return o?n+o+",":""},"").slice(0,-1);return this.trailingComma?r+",":r},e}(qp.default);ur.default=Fp;_a.exports=ur.default});var Sa=g((lr,ka)=>{"use strict";lr.__esModule=!0;var $p=ar(),Wp=Vp($p),Yp=B();function Vp(t){return t&&t.__esModule?t:{default:t}}function zp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gp(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function jp(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Hp=function(t){jp(e,t);function e(s){zp(this,e);var r=Gp(this,t.call(this,s));return r.type=Yp.SELECTOR,r}return e}(Wp.default);lr.default=Hp;ka.exports=lr.default});var Ue=g((cr,Ta)=>{"use strict";cr.__esModule=!0;var Kp=function(){function t(e,s){for(var r=0;r{"use strict";fr.__esModule=!0;var sh=Ue(),nh=oh(sh),ih=B();function oh(t){return t&&t.__esModule?t:{default:t}}function ah(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uh(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function lh(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var ch=function(t){lh(e,t);function e(s){ah(this,e);var r=uh(this,t.call(this,s));return r.type=ih.CLASS,r}return e.prototype.toString=function(){return[this.spaces.before,this.ns,"."+this.value,this.spaces.after].join("")},e}(nh.default);fr.default=ch;Ca.exports=fr.default});var Na=g((pr,Aa)=>{"use strict";pr.__esModule=!0;var fh=we(),ph=dh(fh),hh=B();function dh(t){return t&&t.__esModule?t:{default:t}}function mh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yh(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function gh(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var wh=function(t){gh(e,t);function e(s){mh(this,e);var r=yh(this,t.call(this,s));return r.type=hh.COMMENT,r}return e}(ph.default);pr.default=wh;Aa.exports=pr.default});var Ra=g((hr,Pa)=>{"use strict";hr.__esModule=!0;var vh=Ue(),xh=_h(vh),bh=B();function _h(t){return t&&t.__esModule?t:{default:t}}function Eh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kh(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Sh(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Th=function(t){Sh(e,t);function e(s){Eh(this,e);var r=kh(this,t.call(this,s));return r.type=bh.ID,r}return e.prototype.toString=function(){return[this.spaces.before,this.ns,"#"+this.value,this.spaces.after].join("")},e}(xh.default);hr.default=Th;Pa.exports=hr.default});var qa=g((dr,Ia)=>{"use strict";dr.__esModule=!0;var Ch=Ue(),Oh=Nh(Ch),Ah=B();function Nh(t){return t&&t.__esModule?t:{default:t}}function Ph(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rh(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Ih(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var qh=function(t){Ih(e,t);function e(s){Ph(this,e);var r=Rh(this,t.call(this,s));return r.type=Ah.TAG,r}return e}(Oh.default);dr.default=qh;Ia.exports=dr.default});var Da=g((mr,La)=>{"use strict";mr.__esModule=!0;var Lh=we(),Dh=Mh(Lh),Bh=B();function Mh(t){return t&&t.__esModule?t:{default:t}}function Uh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fh(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function $h(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Wh=function(t){$h(e,t);function e(s){Uh(this,e);var r=Fh(this,t.call(this,s));return r.type=Bh.STRING,r}return e}(Dh.default);mr.default=Wh;La.exports=mr.default});var Ma=g((yr,Ba)=>{"use strict";yr.__esModule=!0;var Yh=ar(),Vh=Gh(Yh),zh=B();function Gh(t){return t&&t.__esModule?t:{default:t}}function jh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Hh(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Kh(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Qh=function(t){Kh(e,t);function e(s){jh(this,e);var r=Hh(this,t.call(this,s));return r.type=zh.PSEUDO,r}return e.prototype.toString=function(){var r=this.length?"("+this.map(String).join(",")+")":"";return[this.spaces.before,String(this.value),r,this.spaces.after].join("")},e}(Vh.default);yr.default=Qh;Ba.exports=yr.default});var Fa=g((gr,Ua)=>{"use strict";gr.__esModule=!0;var Jh=Ue(),Xh=ed(Jh),Zh=B();function ed(t){return t&&t.__esModule?t:{default:t}}function td(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rd(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function sd(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var nd=function(t){sd(e,t);function e(s){td(this,e);var r=rd(this,t.call(this,s));return r.type=Zh.ATTRIBUTE,r.raws={},r}return e.prototype.toString=function(){var r=[this.spaces.before,"[",this.ns,this.attribute];return this.operator&&r.push(this.operator),this.value&&r.push(this.value),this.raws.insensitive?r.push(this.raws.insensitive):this.insensitive&&r.push(" i"),r.push("]"),r.concat(this.spaces.after).join("")},e}(Xh.default);gr.default=nd;Ua.exports=gr.default});var Wa=g((wr,$a)=>{"use strict";wr.__esModule=!0;var id=Ue(),od=ud(id),ad=B();function ud(t){return t&&t.__esModule?t:{default:t}}function ld(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cd(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function fd(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var pd=function(t){fd(e,t);function e(s){ld(this,e);var r=cd(this,t.call(this,s));return r.type=ad.UNIVERSAL,r.value="*",r}return e}(od.default);wr.default=pd;$a.exports=wr.default});var Va=g((vr,Ya)=>{"use strict";vr.__esModule=!0;var hd=we(),dd=yd(hd),md=B();function yd(t){return t&&t.__esModule?t:{default:t}}function gd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wd(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function vd(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var xd=function(t){vd(e,t);function e(s){gd(this,e);var r=wd(this,t.call(this,s));return r.type=md.COMBINATOR,r}return e}(dd.default);vr.default=xd;Ya.exports=vr.default});var Ga=g((xr,za)=>{"use strict";xr.__esModule=!0;var bd=we(),_d=kd(bd),Ed=B();function kd(t){return t&&t.__esModule?t:{default:t}}function Sd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Td(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Cd(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Od=function(t){Cd(e,t);function e(s){Sd(this,e);var r=Td(this,t.call(this,s));return r.type=Ed.NESTING,r.value="&",r}return e}(_d.default);xr.default=Od;za.exports=xr.default});var Ha=g((br,ja)=>{"use strict";br.__esModule=!0;br.default=Ad;function Ad(t){return t.sort(function(e,s){return e-s})}ja.exports=br.default});var su=g((kr,ru)=>{"use strict";kr.__esModule=!0;kr.default=Fd;var Ka=39,Nd=34,Us=92,Qa=47,St=10,Fs=32,$s=12,Ws=9,Ys=13,Ja=43,Xa=62,Za=126,eu=124,Pd=44,Rd=40,Id=41,qd=91,Ld=93,Dd=59,tu=42,Bd=58,Md=38,Ud=64,_r=/[ \n\t\r\{\(\)'"\\;/]/g,Er=/[ \n\t\r\(\)\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g;function Fd(t){for(var e=[],s=t.css.valueOf(),r=void 0,n=void 0,i=void 0,o=void 0,u=void 0,a=void 0,c=void 0,f=void 0,p=void 0,l=void 0,y=void 0,x=s.length,h=-1,d=1,m=0,b=function(v,N){if(t.safe)s+=N,n=s.length-1;else throw t.error("Unclosed "+v,d,m-h,m)};m0?(f=d+u,p=n-o[u].length):(f=d,p=h),e.push(["comment",a,d,m-h,f,n-p,m]),h=p,d=f,m=n):(Er.lastIndex=m+1,Er.test(s),Er.lastIndex===0?n=s.length-1:n=Er.lastIndex-2,e.push(["word",s.slice(m,n+1),d,m-h,d,n-h,m]),m=n);break}m++}return e}ru.exports=kr.default});var ou=g((Sr,iu)=>{"use strict";Sr.__esModule=!0;var $d=function(){function t(e,s){for(var r=0;r1?(o[0]===""&&(o[0]=!0),u.attribute=this.parseValue(o[2]),u.namespace=this.parseNamespace(o[0])):u.attribute=this.parseValue(i[0]),r=new lm.default(u),i[2]){var a=i[2].split(/(\s+i\s*?)$/),c=a[0].trim();r.value=this.lossy?c:a[0],a[1]&&(r.insensitive=!0,this.lossy||(r.raws.insensitive=a[1])),r.quoted=c[0]==="'"||c[0]==='"',r.raws.unquoted=r.quoted?c.slice(1,-1):c}this.newNode(r),this.position++},t.prototype.combinator=function(){if(this.currToken[1]==="|")return this.namespace();for(var s=new hm.default({value:"",source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]});this.position1&&s.nextToken&&s.nextToken[0]==="("&&s.error("Misplaced parenthesis.")})}else this.error('Unexpected "'+this.currToken[0]+'" found.')},t.prototype.space=function(){var s=this.currToken;this.position===0||this.prevToken[0]===","||this.prevToken[0]==="("?(this.spaces=this.parseSpace(s[1]),this.position++):this.position===this.tokens.length-1||this.nextToken[0]===","||this.nextToken[0]===")"?(this.current.last.spaces.after=this.parseSpace(s[1]),this.position++):this.combinator()},t.prototype.string=function(){var s=this.currToken;this.newNode(new im.default({value:this.currToken[1],source:{start:{line:s[2],column:s[3]},end:{line:s[4],column:s[5]}},sourceIndex:s[6]})),this.position++},t.prototype.universal=function(s){var r=this.nextToken;if(r&&r[1]==="|")return this.position++,this.namespace();this.newNode(new fm.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]}),s),this.position++},t.prototype.splitWord=function(s,r){for(var n=this,i=this.nextToken,o=this.currToken[1];i&&i[0]==="word";){this.position++;var u=this.currToken[1];if(o+=u,u.lastIndexOf("\\")===u.length-1){var a=this.nextToken;a&&a[0]==="space"&&(o+=this.parseSpace(a[1]," "),this.position++)}i=this.nextToken}var c=(0,Vs.default)(o,"."),f=(0,Vs.default)(o,"#"),p=(0,Vs.default)(o,"#{");p.length&&(f=f.filter(function(y){return!~p.indexOf(y)}));var l=(0,gm.default)((0,Gd.default)((0,Yd.default)([[0],c,f])));l.forEach(function(y,x){var h=l[x+1]||o.length,d=o.slice(y,h);if(x===0&&r)return r.call(n,d,l.length);var m=void 0;~c.indexOf(y)?m=new Jd.default({value:d.slice(1),source:{start:{line:n.currToken[2],column:n.currToken[3]+y},end:{line:n.currToken[4],column:n.currToken[3]+(h-1)}},sourceIndex:n.currToken[6]+l[x]}):~f.indexOf(y)?m=new tm.default({value:d.slice(1),source:{start:{line:n.currToken[2],column:n.currToken[3]+y},end:{line:n.currToken[4],column:n.currToken[3]+(h-1)}},sourceIndex:n.currToken[6]+l[x]}):m=new sm.default({value:d,source:{start:{line:n.currToken[2],column:n.currToken[3]+y},end:{line:n.currToken[4],column:n.currToken[3]+(h-1)}},sourceIndex:n.currToken[6]+l[x]}),n.newNode(m,s)}),this.position++},t.prototype.word=function(s){var r=this.nextToken;return r&&r[1]==="|"?(this.position++,this.namespace()):this.splitWord(s)},t.prototype.loop=function(){for(;this.position{"use strict";Tr.__esModule=!0;var km=function(){function t(e,s){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},n=new Tm.default({css:s,error:function(o){throw new Error(o)},options:r});return this.res=n,this.func(n),this},km(t,[{key:"result",get:function(){return String(this.res)}}]),t}();Tr.default=Am;au.exports=Tr.default});var G=g((Vx,cu)=>{"use strict";var Gs=function(t,e){let s=new t.constructor;for(let r in t){if(!t.hasOwnProperty(r))continue;let n=t[r],i=typeof n;r==="parent"&&i==="object"?e&&(s[r]=e):r==="source"?s[r]=n:n instanceof Array?s[r]=n.map(o=>Gs(o,s)):r!=="before"&&r!=="after"&&r!=="between"&&r!=="semicolon"&&(i==="object"&&n!==null&&(n=Gs(n)),s[r]=n)}return s};cu.exports=class{constructor(e){e=e||{},this.raws={before:"",after:""};for(let s in e)this[s]=e[s]}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}toString(){return[this.raws.before,String(this.value),this.raws.after].join("")}clone(e){e=e||{};let s=Gs(this);for(let r in e)s[r]=e[r];return s}cloneBefore(e){e=e||{};let s=this.clone(e);return this.parent.insertBefore(this,s),s}cloneAfter(e){e=e||{};let s=this.clone(e);return this.parent.insertAfter(this,s),s}replaceWith(){let e=Array.prototype.slice.call(arguments);if(this.parent){for(let s of e)this.parent.insertBefore(this,s);this.remove()}return this}moveTo(e){return this.cleanRaws(this.root()===e.root()),this.remove(),e.append(this),this}moveBefore(e){return this.cleanRaws(this.root()===e.root()),this.remove(),e.parent.insertBefore(e,this),this}moveAfter(e){return this.cleanRaws(this.root()===e.root()),this.remove(),e.parent.insertAfter(e,this),this}next(){let e=this.parent.index(this);return this.parent.nodes[e+1]}prev(){let e=this.parent.index(this);return this.parent.nodes[e-1]}toJSON(){let e={};for(let s in this){if(!this.hasOwnProperty(s)||s==="parent")continue;let r=this[s];r instanceof Array?e[s]=r.map(n=>typeof n=="object"&&n.toJSON?n.toJSON():n):typeof r=="object"&&r.toJSON?e[s]=r.toJSON():e[s]=r}return e}root(){let e=this;for(;e.parent;)e=e.parent;return e}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}positionInside(e){let s=this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i{"use strict";var Pm=G(),Fe=class extends Pm{constructor(e){super(e),this.nodes||(this.nodes=[])}push(e){return e.parent=this,this.nodes.push(e),this}each(e){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let s=this.lastEach,r,n;if(this.indexes[s]=0,!!this.nodes){for(;this.indexes[s]{let n=e(s,r);return n!==!1&&s.walk&&(n=s.walk(e)),n})}walkType(e,s){if(!e||!s)throw new Error("Parameters {type} and {callback} are required.");let r=typeof e=="function";return this.walk((n,i)=>{if(r&&n instanceof e||!r&&n.type===e)return s.call(this,n,i)})}append(e){return e.parent=this,this.nodes.push(e),this}prepend(e){return e.parent=this,this.nodes.unshift(e),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let s of this.nodes)s.cleanRaws(e)}insertAfter(e,s){let r=this.index(e),n;this.nodes.splice(r+1,0,s);for(let i in this.indexes)n=this.indexes[i],r<=n&&(this.indexes[i]=n+this.nodes.length);return this}insertBefore(e,s){let r=this.index(e),n;this.nodes.splice(r,0,s);for(let i in this.indexes)n=this.indexes[i],r<=n&&(this.indexes[i]=n+this.nodes.length);return this}removeChild(e){e=this.index(e),this.nodes[e].parent=void 0,this.nodes.splice(e,1);let s;for(let r in this.indexes)s=this.indexes[r],s>=e&&(this.indexes[r]=s-1);return this}removeAll(){for(let e of this.nodes)e.parent=void 0;return this.nodes=[],this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){return typeof e=="number"?e:this.nodes.indexOf(e)}get first(){if(this.nodes)return this.nodes[0]}get last(){if(this.nodes)return this.nodes[this.nodes.length-1]}toString(){let e=this.nodes.map(String).join("");return this.value&&(e=this.value+e),this.raws.before&&(e=this.raws.before+e),this.raws.after&&(e+=this.raws.after),e}};Fe.registerWalker=t=>{let e="walk"+t.name;e.lastIndexOf("s")!==e.length-1&&(e+="s"),!Fe.prototype[e]&&(Fe.prototype[e]=function(s){return this.walkType(t,s)})};fu.exports=Fe});var hu=g((jx,pu)=>{"use strict";var Rm=U();pu.exports=class extends Rm{constructor(e){super(e),this.type="root"}}});var mu=g((Kx,du)=>{"use strict";var Im=U();du.exports=class extends Im{constructor(e){super(e),this.type="value",this.unbalanced=0}}});var wu=g((Qx,gu)=>{"use strict";var yu=U(),Cr=class extends yu{constructor(e){super(e),this.type="atword"}toString(){let e=this.quoted?this.raws.quote:"";return[this.raws.before,"@",String.prototype.toString.call(this.value),this.raws.after].join("")}};yu.registerWalker(Cr);gu.exports=Cr});var xu=g((Jx,vu)=>{"use strict";var qm=U(),Lm=G(),Or=class extends Lm{constructor(e){super(e),this.type="colon"}};qm.registerWalker(Or);vu.exports=Or});var _u=g((Xx,bu)=>{"use strict";var Dm=U(),Bm=G(),Ar=class extends Bm{constructor(e){super(e),this.type="comma"}};Dm.registerWalker(Ar);bu.exports=Ar});var ku=g((Zx,Eu)=>{"use strict";var Mm=U(),Um=G(),Nr=class extends Um{constructor(e){super(e),this.type="comment",this.inline=Object(e).inline||!1}toString(){return[this.raws.before,this.inline?"//":"/*",String(this.value),this.inline?"":"*/",this.raws.after].join("")}};Mm.registerWalker(Nr);Eu.exports=Nr});var Cu=g((eb,Tu)=>{"use strict";var Su=U(),Pr=class extends Su{constructor(e){super(e),this.type="func",this.unbalanced=-1}};Su.registerWalker(Pr);Tu.exports=Pr});var Au=g((tb,Ou)=>{"use strict";var Fm=U(),$m=G(),Rr=class extends $m{constructor(e){super(e),this.type="number",this.unit=Object(e).unit||""}toString(){return[this.raws.before,String(this.value),this.unit,this.raws.after].join("")}};Fm.registerWalker(Rr);Ou.exports=Rr});var Pu=g((rb,Nu)=>{"use strict";var Wm=U(),Ym=G(),Ir=class extends Ym{constructor(e){super(e),this.type="operator"}};Wm.registerWalker(Ir);Nu.exports=Ir});var Iu=g((sb,Ru)=>{"use strict";var Vm=U(),zm=G(),qr=class extends zm{constructor(e){super(e),this.type="paren",this.parenType=""}};Vm.registerWalker(qr);Ru.exports=qr});var Lu=g((nb,qu)=>{"use strict";var Gm=U(),jm=G(),Lr=class extends jm{constructor(e){super(e),this.type="string"}toString(){let e=this.quoted?this.raws.quote:"";return[this.raws.before,e,this.value+"",e,this.raws.after].join("")}};Gm.registerWalker(Lr);qu.exports=Lr});var Bu=g((ib,Du)=>{"use strict";var Hm=U(),Km=G(),Dr=class extends Km{constructor(e){super(e),this.type="word"}};Hm.registerWalker(Dr);Du.exports=Dr});var Uu=g((ob,Mu)=>{"use strict";var Qm=U(),Jm=G(),Br=class extends Jm{constructor(e){super(e),this.type="unicode-range"}};Qm.registerWalker(Br);Mu.exports=Br});var $u=g((ab,Fu)=>{"use strict";var js=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred while tokzenizing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}};Fu.exports=js});var Vu=g((ub,Yu)=>{"use strict";var Mr=/[ \n\t\r\{\(\)'"\\;,/]/g,Xm=/[ \n\t\r\(\)\{\}\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g,$e=/[ \n\t\r\(\)\{\}\*:;@!&'"\-\+\|~>,\[\]\\]|\//g,Zm=/^[a-z0-9]/i,ey=/^[a-f0-9?\-]/i,Wu=$u();Yu.exports=function(e,s){s=s||{};let r=[],n=e.valueOf(),i=n.length,o=-1,u=1,a=0,c=0,f=null,p,l,y,x,h,d,m,b,w,v,N,F;function Q(T){let C=`Unclosed ${T} at line: ${u}, column: ${a-o}, token: ${a}`;throw new Wu(C)}function W(){let T=`Syntax error at line: ${u}, column: ${a-o}, token: ${a}`;throw new Wu(T)}for(;a0&&r[r.length-1][0]==="word"&&r[r.length-1][1]==="url",r.push(["(","(",u,a-o,u,l-o,a]);break;case 41:c--,f=f&&c>0,r.push([")",")",u,a-o,u,l-o,a]);break;case 39:case 34:y=p===39?"'":'"',l=a;do for(v=!1,l=n.indexOf(y,l+1),l===-1&&Q("quote",y),N=l;n.charCodeAt(N-1)===92;)N-=1,v=!v;while(v);r.push(["string",n.slice(a,l+1),u,a-o,u,l-o,a]),a=l;break;case 64:Mr.lastIndex=a+1,Mr.test(n),Mr.lastIndex===0?l=n.length-1:l=Mr.lastIndex-2,r.push(["atword",n.slice(a,l+1),u,a-o,u,l-o,a]),a=l;break;case 92:l=a,p=n.charCodeAt(l+1),m&&p!==47&&p!==32&&p!==10&&p!==9&&p!==13&&p!==12&&(l+=1),r.push(["word",n.slice(a,l+1),u,a-o,u,l-o,a]),a=l;break;case 43:case 45:case 42:l=a+1,F=n.slice(a+1,l+1);let T=n.slice(a-1,a);if(p===45&&F.charCodeAt(0)===45){l++,r.push(["word",n.slice(a,l),u,a-o,u,l-o,a]),a=l-1;break}r.push(["operator",n.slice(a,l),u,a-o,u,l-o,a]),a=l-1;break;default:if(p===47&&(n.charCodeAt(a+1)===42||s.loose&&!f&&n.charCodeAt(a+1)===47)){if(n.charCodeAt(a+1)===42)l=n.indexOf("*/",a+2)+1,l===0&&Q("comment","*/");else{let O=n.indexOf(` +`,a+2);l=O!==-1?O-1:i}d=n.slice(a,l+1),x=d.split(` +`),h=x.length-1,h>0?(b=u+h,w=l-x[h].length):(b=u,w=o),r.push(["comment",d,u,a-o,b,l-w,a]),o=w,u=b,a=l}else if(p===35&&!Zm.test(n.slice(a+1,a+2)))l=a+1,r.push(["#",n.slice(a,l),u,a-o,u,l-o,a]),a=l-1;else if((p===117||p===85)&&n.charCodeAt(a+1)===43){l=a+2;do l+=1,p=n.charCodeAt(l);while(l=48&&p<=57&&(C=$e),C.lastIndex=a+1,C.test(n),C.lastIndex===0?l=n.length-1:l=C.lastIndex-2,C===$e||p===46){let O=n.charCodeAt(l),ve=n.charCodeAt(l+1),Zs=n.charCodeAt(l+2);(O===101||O===69)&&(ve===45||ve===43)&&Zs>=48&&Zs<=57&&($e.lastIndex=l+2,$e.test(n),$e.lastIndex===0?l=n.length-1:l=$e.lastIndex-2)}r.push(["word",n.slice(a,l+1),u,a-o,u,l-o,a]),a=l}break}a++}return r}});var Gu=g((lb,zu)=>{"use strict";var Hs=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred while parsing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}};zu.exports=Hs});var Qu=g((fb,Ku)=>{"use strict";var ty=hu(),ry=mu(),sy=wu(),ny=xu(),iy=_u(),oy=ku(),ay=Cu(),uy=Au(),ly=Pu(),ju=Iu(),cy=Lu(),Hu=Bu(),fy=Uu(),py=Vu(),hy=Ds(),dy=Bs(),my=Ms(),yy=Gu();function gy(t){return t.sort((e,s)=>e-s)}Ku.exports=class{constructor(e,s){let r={loose:!1};this.cache=[],this.input=e,this.options=Object.assign({},r,s),this.position=0,this.unbalanced=0,this.root=new ty;let n=new ry;this.root.append(n),this.current=n,this.tokens=py(e,this.options)}parse(){return this.loop()}colon(){let e=this.currToken;this.newNode(new ny({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}comma(){let e=this.currToken;this.newNode(new iy({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}comment(){let e=!1,s=this.currToken[1].replace(/\/\*|\*\//g,""),r;this.options.loose&&s.startsWith("//")&&(s=s.substring(2),e=!0),r=new oy({value:s,inline:e,source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]}),this.newNode(r),this.position++}error(e,s){throw new yy(e+` at line: ${s[2]}, column ${s[3]}`)}loop(){for(;this.position0&&(this.current.type==="func"&&this.current.value==="calc"?this.prevToken[0]!=="space"&&this.prevToken[0]!=="("?this.error("Syntax Error",this.currToken):this.nextToken[0]!=="space"&&this.nextToken[0]!=="word"?this.error("Syntax Error",this.currToken):this.nextToken[0]==="word"&&this.current.last.type!=="operator"&&this.current.last.value!=="("&&this.error("Syntax Error",this.currToken):(this.nextToken[0]==="space"||this.nextToken[0]==="operator"||this.prevToken[0]==="operator")&&this.error("Syntax Error",this.currToken)),this.options.loose){if((!this.current.nodes.length||this.current.last&&this.current.last.type==="operator")&&this.nextToken[0]==="word")return this.word()}else if(this.nextToken[0]==="word")return this.word()}return s=new ly({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]}),this.position++,this.newNode(s)}parseTokens(){switch(this.currToken[0]){case"space":this.space();break;case"colon":this.colon();break;case"comma":this.comma();break;case"comment":this.comment();break;case"(":this.parenOpen();break;case")":this.parenClose();break;case"atword":case"word":this.word();break;case"operator":this.operator();break;case"string":this.string();break;case"unicoderange":this.unicodeRange();break;default:this.word();break}}parenOpen(){let e=1,s=this.position+1,r=this.currToken,n;for(;s=this.tokens.length-1&&!this.current.unbalanced)&&(this.current.unbalanced--,this.current.unbalanced<0&&this.error("Expected opening parenthesis",e),!this.current.unbalanced&&this.cache.length&&(this.current=this.cache.pop()))}space(){let e=this.currToken;this.position===this.tokens.length-1||this.nextToken[0]===","||this.nextToken[0]===")"?(this.current.last.raws.after+=e[1],this.position++):(this.spaces=e[1],this.position++)}unicodeRange(){let e=this.currToken;this.newNode(new fy({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}splitWord(){let e=this.nextToken,s=this.currToken[1],r=/^[\+\-]?((\d+(\.\d*)?)|(\.\d+))([eE][\+\-]?\d+)?/,n=/^(?!\#([a-z0-9]+))[\#\{\}]/gi,i,o;if(!n.test(s))for(;e&&e[0]==="word";){this.position++;let u=this.currToken[1];s+=u,e=this.nextToken}i=dy(s,"@"),o=gy(my(hy([[0],i]))),o.forEach((u,a)=>{let c=o[a+1]||s.length,f=s.slice(u,c),p;if(~i.indexOf(u))p=new sy({value:f.slice(1),source:{start:{line:this.currToken[2],column:this.currToken[3]+u},end:{line:this.currToken[4],column:this.currToken[3]+(c-1)}},sourceIndex:this.currToken[6]+o[a]});else if(r.test(this.currToken[1])){let l=f.replace(r,"");p=new uy({value:f.replace(l,""),source:{start:{line:this.currToken[2],column:this.currToken[3]+u},end:{line:this.currToken[4],column:this.currToken[3]+(c-1)}},sourceIndex:this.currToken[6]+o[a],unit:l})}else p=new(e&&e[0]==="("?ay:Hu)({value:f,source:{start:{line:this.currToken[2],column:this.currToken[3]+u},end:{line:this.currToken[4],column:this.currToken[3]+(c-1)}},sourceIndex:this.currToken[6]+o[a]}),p.type==="word"?(p.isHex=/^#(.+)/.test(f),p.isColor=/^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(f)):this.cache.push(this.current);this.newNode(p)}),this.position++}string(){let e=this.currToken,s=this.currToken[1],r=/^(\"|\')/,n=r.test(s),i="",o;n&&(i=s.match(r)[0],s=s.slice(1,s.length-1)),o=new cy({value:s,source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6],quoted:n}),o.raws.quote=i,this.newNode(o),this.position++}word(){return this.splitWord()}newNode(e){return this.spaces&&(e.raws.before+=this.spaces,this.spaces=""),this.current.append(e)}get currToken(){return this.tokens[this.position]}get nextToken(){return this.tokens[this.position+1]}get prevToken(){return this.tokens[this.position-1]}}});var Xs={};en(Xs,{languages:()=>gi,options:()=>vi,parsers:()=>Js,printers:()=>Iy});var vl=(t,e,s,r)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(s,r):s.global?e.replace(s,r):e.split(s).join(r)},E=vl;var be="string",We="array",Ye="cursor",te="indent",_e="align",Ve="trim",re="group",se="fill",ne="if-break",ze="indent-if-break",Ee="line-suffix",Ge="line-suffix-boundary",j="line",je="label",ke="break-parent",Tt=new Set([Ye,te,_e,Ve,re,se,ne,ze,Ee,Ge,j,je,ke]);var xl=(t,e,s)=>{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[s<0?e.length+s:s]:e.at(s)},$=xl;function bl(t){if(typeof t=="string")return be;if(Array.isArray(t))return We;if(!t)return;let{type:e}=t;if(Tt.has(e))return e}var H=bl;var _l=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function El(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', +Expected it to be 'string' or 'object'.`;if(H(t))throw new Error("doc is valid.");let s=Object.prototype.toString.call(t);if(s!=="[object Object]")return`Unexpected doc '${s}'.`;let r=_l([...Tt].map(n=>`'${n}'`));return`Unexpected doc.type '${t.type}'. +Expected it to be ${r}.`}var Wr=class extends Error{name="InvalidDocError";constructor(e){super(El(e)),this.doc=e}},Yr=Wr;function Sl(t,e){if(typeof t=="string")return e(t);let s=new Map;return r(t);function r(i){if(s.has(i))return s.get(i);let o=n(i);return s.set(i,o),o}function n(i){switch(H(i)){case We:return e(i.map(r));case se:return e({...i,parts:i.parts.map(r)});case ne:return e({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case re:{let{expandedStates:o,contents:u}=i;return o?(o=o.map(r),u=o[0]):u=r(u),e({...i,contents:u,expandedStates:o})}case _e:case te:case ze:case je:case Ee:return e({...i,contents:r(i.contents)});case be:case Ye:case Ve:case Ge:case j:case ke:return e(i);default:throw new Yr(i)}}}function Tl(t){return t.type===j&&!t.hard?t.soft?"":" ":t.type===ne?t.flatContents:t}function tn(t){return Sl(t,Tl)}var Vr=()=>{},ie=Vr,He=Vr,rn=Vr;function q(t){return ie(t),{type:te,contents:t}}function sn(t,e){return ie(e),{type:_e,contents:e,n:t}}function L(t,e={}){return ie(t),He(e.expandedStates,!0),{type:re,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function nn(t){return sn({type:"root"},t)}function oe(t){return sn(-1,t)}function Se(t){return rn(t),{type:se,parts:t}}function Ct(t,e="",s={}){return ie(t),e!==""&&ie(e),{type:ne,breakContents:t,flatContents:e,groupId:s.groupId}}function on(t){return ie(t),{type:Ee,contents:t}}var Ke={type:ke};var Cl={type:j,hard:!0};var A={type:j},D={type:j,soft:!0},S=[Cl,Ke];function Y(t,e){ie(t),He(e);let s=[];for(let r=0;r0}var ae=Ol;var an=new Proxy(()=>{},{get:()=>an}),un=an;var Ot="'",ln='"';function Al(t,e){let s=e===!0||e===Ot?Ot:ln,r=s===Ot?ln:Ot,n=0,i=0;for(let o of t)o===s?n++:o===r&&i++;return n>i?r:s}var cn=Al;function Nl(t,e,s){let r=e==='"'?"'":'"',i=E(!1,t,/\\(.)|(["'])/gsu,(o,u,a)=>u===r?u:a===e?"\\"+a:a||(s&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(u)?u:"\\"+u));return e+i+e}var fn=Nl;function Pl(t,e){un.ok(/^(?["']).*\k$/su.test(t));let s=t.slice(1,-1),r=e.parser==="json"||e.parser==="jsonc"||e.parser==="json5"&&e.quoteProps==="preserve"&&!e.singleQuote?'"':e.__isInHtmlAttribute?"'":cn(s,e.singleQuote);return t.charAt(0)===r?t:fn(s,r,!1)}var At=Pl;var zr=class extends Error{name="UnexpectedNodeError";constructor(e,s,r="type"){super(`Unexpected ${s} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},pn=zr;function Rl(t){return(t==null?void 0:t.type)==="front-matter"}var Te=Rl;var Il=new Set(["raw","raws","sourceIndex","source","before","after","trailingComma","spaces"]);function hn(t,e,s){if(Te(t)&&t.language==="yaml"&&delete e.value,t.type==="css-comment"&&s.type==="css-root"&&s.nodes.length>0&&((s.nodes[0]===t||Te(s.nodes[0])&&s.nodes[1]===t)&&(delete e.text,/^\*\s*@(?:format|prettier)\s*$/u.test(t.text))||s.type==="css-root"&&$(!1,s.nodes,-1)===t))return null;if(t.type==="value-root"&&delete e.text,(t.type==="media-query"||t.type==="media-query-list"||t.type==="media-feature-expression")&&delete e.value,t.type==="css-rule"&&delete e.params,(t.type==="media-feature"||t.type==="media-keyword"||t.type==="media-type"||t.type==="media-unknown"||t.type==="media-url"||t.type==="media-value"||t.type==="selector-attribute"||t.type==="selector-string"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="value-string")&&t.value&&(e.value=ql(t.value)),t.type==="selector-combinator"&&(e.value=E(!1,e.value,/\s+/gu," ")),t.type==="media-feature"&&(e.value=E(!1,e.value," ","")),(t.type==="value-word"&&(t.isColor&&t.isHex||["initial","inherit","unset","revert"].includes(t.value.toLowerCase()))||t.type==="media-feature"||t.type==="selector-root-invalid"||t.type==="selector-pseudo")&&(e.value=e.value.toLowerCase()),t.type==="css-decl"&&(e.prop=t.prop.toLowerCase()),(t.type==="css-atrule"||t.type==="css-import")&&(e.name=t.name.toLowerCase()),t.type==="value-number"&&(e.unit=t.unit.toLowerCase()),t.type==="value-unknown"&&(e.value=E(!1,e.value,/;$/gu,"")),t.type==="selector-attribute"&&(e.attribute=t.attribute.trim(),t.namespace&&typeof t.namespace=="string"&&(e.namespace=t.namespace.trim()||!0),t.value&&(e.value=E(!1,e.value.trim(),/^["']|["']$/gu,""),delete e.quoted)),(t.type==="media-value"||t.type==="media-type"||t.type==="value-number"||t.type==="selector-root-invalid"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="selector-tag")&&t.value&&(e.value=E(!1,e.value,/([\d+.e-]+)([a-z]*)/giu,(r,n,i)=>{let o=Number(n);return Number.isNaN(o)?r:o+i.toLowerCase()})),t.type==="selector-tag"){let r=e.value.toLowerCase();["from","to"].includes(r)&&(e.value=r)}if(t.type==="css-atrule"&&t.name.toLowerCase()==="supports"&&delete e.value,t.type==="selector-unknown"&&delete e.value,t.type==="value-comma_group"){let r=t.groups.findIndex(n=>n.type==="value-number"&&n.unit==="...");r!==-1&&(e.groups[r].unit="",e.groups.splice(r+1,0,{type:"value-word",value:"...",isColor:!1,isHex:!1}))}if(t.type==="value-comma_group"&&t.groups.some(r=>r.type==="value-atword"&&r.value.endsWith("[")||r.type==="value-word"&&r.value.startsWith("]")))return{type:"value-atword",value:t.groups.map(r=>r.value).join(""),group:{open:null,close:null,groups:[],type:"value-paren_group"}}}hn.ignoredProperties=Il;function ql(t){return E(!1,E(!1,t,"'",'"'),/\\([^\da-f])/giu,"$1")}var dn=hn;async function Ll(t,e){if(t.language==="yaml"){let s=t.value.trim(),r=s?await e(s,{parser:"yaml"}):"";return nn([t.startDelimiter,t.explicitLanguage,S,r,r?S:"",t.endDelimiter])}}var mn=Ll;function yn(t){let{node:e}=t;if(e.type==="front-matter")return async s=>{let r=await mn(e,s);return r?[r,S]:void 0}}yn.getVisitorKeys=t=>t.type==="css-root"?["frontMatter"]:[];var gn=yn;var Qe=null;function Je(t){if(Qe!==null&&typeof Qe.property){let e=Qe;return Qe=Je.prototype=null,e}return Qe=Je.prototype=t??Object.create(null),new Je}var Dl=10;for(let t=0;t<=Dl;t++)Je();function Gr(t){return Je(t)}function Bl(t,e="type"){Gr(t);function s(r){let n=r[e],i=t[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:r});return i}return s}var wn=Bl;var Ml={"front-matter":[],"css-root":["frontMatter","nodes"],"css-comment":[],"css-rule":["selector","nodes"],"css-decl":["value","selector","nodes"],"css-atrule":["selector","params","value","nodes"],"media-query-list":["nodes"],"media-query":["nodes"],"media-type":[],"media-feature-expression":["nodes"],"media-feature":[],"media-colon":[],"media-value":[],"media-keyword":[],"media-url":[],"media-unknown":[],"selector-root":["nodes"],"selector-selector":["nodes"],"selector-comment":[],"selector-string":[],"selector-tag":[],"selector-id":[],"selector-class":[],"selector-attribute":[],"selector-combinator":["nodes"],"selector-universal":[],"selector-pseudo":["nodes"],"selector-nesting":[],"selector-unknown":[],"value-value":["group"],"value-root":["group"],"value-comment":[],"value-comma_group":["groups"],"value-paren_group":["open","groups","close"],"value-func":["group"],"value-paren":[],"value-number":[],"value-operator":[],"value-word":[],"value-colon":[],"value-comma":[],"value-string":[],"value-atword":[],"value-unicode-range":[],"value-unknown":[]},vn=Ml;var Ul=wn(vn),xn=Ul;function Fl(t,e){let s=0;for(let r=0;r{let n=!!(r!=null&&r.backwards);if(s===!1)return!1;let{length:i}=e,o=s;for(;o>=0&&oCn(c,e[c])).map(c=>`${n} ${c}${s}`).join("");if(!t){if(o.length===0)return"";if(o.length===1&&!Array.isArray(e[o[0]])){let c=e[o[0]];return`${r} ${Cn(o[0],c)[0]}${i}`}}let a=t.split(s).map(c=>`${n} ${c}`).join(s)+s;return r+s+(t?a:"")+(t&&o.length>0?n+s:"")+u+i}function Cn(t,e){return[...An,...Array.isArray(e)?e:[e]].map(s=>`@${t} ${s}`.trim())}function jl(t){if(!t.startsWith("#!"))return"";let e=t.indexOf(` +`);return e===-1?t:t.slice(0,e)}var qn=jl;function Ln(t){let e=qn(t);e&&(t=t.slice(e.length+1));let s=Nn(t),{pragmas:r,comments:n}=Rn(s);return{shebang:e,text:t,pragmas:r,comments:n}}function Dn(t){let{pragmas:e}=Ln(t);return Object.prototype.hasOwnProperty.call(e,"prettier")||Object.prototype.hasOwnProperty.call(e,"format")}function Bn(t){let{shebang:e,text:s,pragmas:r,comments:n}=Ln(t),i=Pn(s),o=In({pragmas:{format:"",...r},comments:n.trimStart()});return(e?`${e} +`:"")+o+(i.startsWith(` +`)?` +`:` + +`)+i}var Xe=3;function Hl(t){let e=t.slice(0,Xe);if(e!=="---"&&e!=="+++")return;let s=t.indexOf(` +`,Xe);if(s===-1)return;let r=t.slice(Xe,s).trim(),n=t.indexOf(` +${e}`,s),i=r;if(i||(i=e==="+++"?"toml":"yaml"),n===-1&&e==="---"&&i==="yaml"&&(n=t.indexOf(` +...`,s)),n===-1)return;let o=n+1+Xe,u=t.charAt(o+1);if(!/\s?/u.test(u))return;let a=t.slice(0,o);return{type:"front-matter",language:i,explicitLanguage:r,value:t.slice(s+1,n),startDelimiter:e,endDelimiter:a.slice(-Xe),raw:a}}function Kl(t){let e=Hl(t);if(!e)return{content:t};let{raw:s}=e;return{frontMatter:e,content:E(!1,s,/[^\n]/gu," ")+t.slice(s.length)}}var Ze=Kl;function Mn(t){return Dn(Ze(t).content)}function Un(t){let{frontMatter:e,content:s}=Ze(t);return(e?e.raw+` + +`:"")+Bn(s)}var Ql=new Set(["red","green","blue","alpha","a","rgb","hue","h","saturation","s","lightness","l","whiteness","w","blackness","b","tint","shade","blend","blenda","contrast","hsl","hsla","hwb","hwba"]);function Fn(t){var e,s;return(s=(e=t.findAncestor(r=>r.type==="css-decl"))==null?void 0:e.prop)==null?void 0:s.toLowerCase()}var Jl=new Set(["initial","inherit","unset","revert"]);function $n(t){return Jl.has(t.toLowerCase())}function Wn(t,e){var r;let s=t.findAncestor(n=>n.type==="css-atrule");return((r=s==null?void 0:s.name)==null?void 0:r.toLowerCase().endsWith("keyframes"))&&["from","to"].includes(e.toLowerCase())}function ue(t){return t.includes("$")||t.includes("@")||t.includes("#")||t.startsWith("%")||t.startsWith("--")||t.startsWith(":--")||t.includes("(")&&t.includes(")")?t:t.toLowerCase()}function Ce(t,e){var r;let s=t.findAncestor(n=>n.type==="value-func");return((r=s==null?void 0:s.value)==null?void 0:r.toLowerCase())===e}function Yn(t){var r;let e=t.findAncestor(n=>n.type==="css-rule"),s=(r=e==null?void 0:e.raws)==null?void 0:r.selector;return s&&(s.startsWith(":import")||s.startsWith(":export"))}function Oe(t,e){let s=Array.isArray(e)?e:[e],r=t.findAncestor(n=>n.type==="css-atrule");return r&&s.includes(r.name.toLowerCase())}function Vn(t){var s;let{node:e}=t;return e.groups[0].value==="url"&&e.groups.length===2&&((s=t.findAncestor(r=>r.type==="css-atrule"))==null?void 0:s.name)==="import"}function zn(t){return t.type==="value-func"&&t.value.toLowerCase()==="url"}function Gn(t){return t.type==="value-func"&&t.value.toLowerCase()==="var"}function jn(t){let{selector:e}=t;return e?typeof e=="string"&&/^@.+:.*$/u.test(e)||e.value&&/^@.+:.*$/u.test(e.value):!1}function Hn(t){return t.type==="value-word"&&["from","through","end"].includes(t.value)}function Kn(t){return t.type==="value-word"&&["and","or","not"].includes(t.value)}function Qn(t){return t.type==="value-word"&&t.value==="in"}function It(t){return t.type==="value-operator"&&t.value==="*"}function et(t){return t.type==="value-operator"&&t.value==="/"}function J(t){return t.type==="value-operator"&&t.value==="+"}function he(t){return t.type==="value-operator"&&t.value==="-"}function Xl(t){return t.type==="value-operator"&&t.value==="%"}function qt(t){return It(t)||et(t)||J(t)||he(t)||Xl(t)}function Jn(t){return t.type==="value-word"&&["==","!="].includes(t.value)}function Xn(t){return t.type==="value-word"&&["<",">","<=",">="].includes(t.value)}function tt(t,e){return e.parser==="scss"&&t.type==="css-atrule"&&["if","else","for","each","while"].includes(t.name)}function Jr(t){var e;return((e=t.raws)==null?void 0:e.params)&&/^\(\s*\)$/u.test(t.raws.params)}function Lt(t){return t.name.startsWith("prettier-placeholder")}function Zn(t){return t.prop.startsWith("@prettier-placeholder")}function ei(t,e){return t.value==="$$"&&t.type==="value-func"&&(e==null?void 0:e.type)==="value-word"&&!e.raws.before}function ti(t){var e,s;return((e=t.value)==null?void 0:e.type)==="value-root"&&((s=t.value.group)==null?void 0:s.type)==="value-value"&&t.prop.toLowerCase()==="composes"}function ri(t){var e,s,r;return((r=(s=(e=t.value)==null?void 0:e.group)==null?void 0:s.group)==null?void 0:r.type)==="value-paren_group"&&t.value.group.group.open!==null&&t.value.group.group.close!==null}function de(t){var e;return((e=t.raws)==null?void 0:e.before)===""}function Dt(t){var e,s;return t.type==="value-comma_group"&&((s=(e=t.groups)==null?void 0:e[1])==null?void 0:s.type)==="value-colon"}function Qr(t){var e;return t.type==="value-paren_group"&&((e=t.groups)==null?void 0:e[0])&&Dt(t.groups[0])}function Xr(t,e){var i;if(e.parser!=="scss")return!1;let{node:s}=t;if(s.groups.length===0)return!1;let r=t.grandparent;if(!Qr(s)&&!(r&&Qr(r)))return!1;let n=t.findAncestor(o=>o.type==="css-decl");return!!((i=n==null?void 0:n.prop)!=null&&i.startsWith("$")||Qr(r)||r.type==="value-func")}function Ae(t){return t.type==="value-comment"&&t.inline}function Bt(t){return t.type==="value-word"&&t.value==="#"}function Zr(t){return t.type==="value-word"&&t.value==="{"}function Mt(t){return t.type==="value-word"&&t.value==="}"}function rt(t){return["value-word","value-atword"].includes(t.type)}function st(t){return(t==null?void 0:t.type)==="value-colon"}function si(t,e){if(!Dt(e))return!1;let{groups:s}=e,r=s.indexOf(t);return r===-1?!1:st(s[r+1])}function ni(t){return t.value&&["not","and","or"].includes(t.value.toLowerCase())}function ii(t){return t.type!=="value-func"?!1:Ql.has(t.value.toLowerCase())}function Ne(t){return/\/\//u.test(t.split(/[\n\r]/u).pop())}function nt(t){return(t==null?void 0:t.type)==="value-atword"&&t.value.startsWith("prettier-placeholder-")}function oi(t,e){var s,r;if(((s=t.open)==null?void 0:s.value)!=="("||((r=t.close)==null?void 0:r.value)!==")"||t.groups.some(n=>n.type!=="value-comma_group"))return!1;if(e.type==="value-comma_group"){let n=e.groups.indexOf(t)-1,i=e.groups[n];if((i==null?void 0:i.type)==="value-word"&&i.value==="with")return!0}return!1}function it(t){var e,s;return t.type==="value-paren_group"&&((e=t.open)==null?void 0:e.value)==="("&&((s=t.close)==null?void 0:s.value)===")"}function Zl(t,e,s){var d;let{node:r}=t,n=t.parent,i=t.grandparent,o=Fn(t),u=o&&n.type==="value-value"&&(o==="grid"||o.startsWith("grid-template")),a=t.findAncestor(m=>m.type==="css-atrule"),c=a&&tt(a,e),f=r.groups.some(m=>Ae(m)),p=t.map(s,"groups"),l=[""],y=Ce(t,"url"),x=!1,h=!1;for(let m=0;m2&&r.groups.slice(0,m).every(O=>O.type==="value-comment")&&!Ae(b)&&(l[l.length-2]=oe($(!1,l,-2))),Oe(t,"forward")&&w.type==="value-word"&&w.value&&b!==void 0&&b.type==="value-word"&&b.value==="as"&&v.type==="value-operator"&&v.value==="*"||!v||w.type==="value-word"&&w.value.endsWith("-")&&nt(v))continue;if(w.type==="value-string"&&w.quoted){let O=w.value.lastIndexOf("#{"),ve=w.value.lastIndexOf("}");O!==-1&&ve!==-1?x=O>ve:O!==-1?x=!0:ve!==-1&&(x=!1)}if(x||st(w)||st(v)||w.type==="value-atword"&&(w.value===""||w.value.endsWith("["))||v.type==="value-word"&&v.value.startsWith("]")||w.value==="~"||w.type!=="value-string"&&w.value&&w.value.includes("\\")&&v&&v.type!=="value-comment"||b!=null&&b.value&&b.value.indexOf("\\")===b.value.length-1&&w.type==="value-operator"&&w.value==="/"||w.value==="\\"||ei(w,v)||Bt(w)||Zr(w)||Mt(v)||Zr(v)&&de(v)||Mt(w)&&de(v)||w.value==="--"&&Bt(v))continue;let F=qt(w),Q=qt(v);if((F&&Bt(v)||Q&&Mt(w))&&de(v)||!b&&et(w)||Ce(t,"calc")&&(J(w)||J(v)||he(w)||he(v))&&de(v))continue;let W=(J(w)||he(w))&&m===0&&(v.type==="value-number"||v.isHex)&&i&&ii(i)&&!de(v),T=(N==null?void 0:N.type)==="value-func"||N&&rt(N)||w.type==="value-func"||rt(w),C=v.type==="value-func"||rt(v)||(b==null?void 0:b.type)==="value-func"||b&&rt(b);if(e.parser==="scss"&&F&&w.value==="-"&&v.type==="value-func"&&R(w)!==P(v)){l.push([l.pop()," "]);continue}if(!(!(It(v)||It(w))&&!Ce(t,"calc")&&!W&&(et(v)&&!T||et(w)&&!C||J(v)&&!T||J(w)&&!C||he(v)||he(w))&&(de(v)||F&&(!b||b&&qt(b))))&&!((e.parser==="scss"||e.parser==="less")&&F&&w.value==="-"&&it(v)&&R(w)===P(v.open)&&v.open.value==="(")){if(Ae(w)){if(n.type==="value-paren_group"){l.push(oe(S),"");continue}l.push(S,"");continue}if(c&&(Jn(v)||Xn(v)||Kn(v)||Qn(w)||Hn(w))){l.push([l.pop()," "]);continue}if(a&&a.name.toLowerCase()==="namespace"){l.push([l.pop()," "]);continue}if(u){w.source&&v.source&&w.source.start.line!==v.source.start.line?(l.push(S,""),h=!0):l.push([l.pop()," "]);continue}if(Q){l.push([l.pop()," "]);continue}if((v==null?void 0:v.value)!=="..."&&!(nt(w)&&nt(v)&&R(w)===P(v))){if(nt(w)&&it(v)&&R(w)===P(v.open)){l.push(D,"");continue}if(w.value==="with"&&it(v)){l=[[Se(l)," "]];continue}(d=w.value)!=null&&d.endsWith("#")&&v.value==="{"&&it(v.group)||Ae(v)&&!N||l.push(A,"")}}}return f&&l.push([l.pop(),Ke]),h&&l.unshift("",S),c?L(q(l)):Vn(t)?L(Se(l)):L(q(Se(l)))}var ai=Zl;function ec(t){return t.length===1?t:t.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/u,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/u,"$1").replace(/^([+-])?\./u,"$10.").replace(/(\.\d+?)0+(?=e|$)/u,"$1").replace(/\.(?=e|$)/u,"")}var ui=ec;var es=new Map([["em","em"],["rem","rem"],["ex","ex"],["rex","rex"],["cap","cap"],["rcap","rcap"],["ch","ch"],["rch","rch"],["ic","ic"],["ric","ric"],["lh","lh"],["rlh","rlh"],["vw","vw"],["svw","svw"],["lvw","lvw"],["dvw","dvw"],["vh","vh"],["svh","svh"],["lvh","lvh"],["dvh","dvh"],["vi","vi"],["svi","svi"],["lvi","lvi"],["dvi","dvi"],["vb","vb"],["svb","svb"],["lvb","lvb"],["dvb","dvb"],["vmin","vmin"],["svmin","svmin"],["lvmin","lvmin"],["dvmin","dvmin"],["vmax","vmax"],["svmax","svmax"],["lvmax","lvmax"],["dvmax","dvmax"],["cm","cm"],["mm","mm"],["q","Q"],["in","in"],["pt","pt"],["pc","pc"],["px","px"],["deg","deg"],["grad","grad"],["rad","rad"],["turn","turn"],["s","s"],["ms","ms"],["hz","Hz"],["khz","kHz"],["dpi","dpi"],["dpcm","dpcm"],["dppx","dppx"],["x","x"],["cqw","cqw"],["cqh","cqh"],["cqi","cqi"],["cqb","cqb"],["cqmin","cqmin"],["cqmax","cqmax"],["fr","fr"]]);function li(t){let e=t.toLowerCase();return es.has(e)?es.get(e):t}var ci=/(["'])(?:(?!\1)[^\\]|\\.)*\1/gsu,tc=/(?:\d*\.\d+|\d+\.?)(?:e[+-]?\d+)?/giu,rc=/[a-z]+/giu,sc=/[$@]?[_a-z\u0080-\uFFFF][\w\u0080-\uFFFF-]*/giu,nc=new RegExp(ci.source+`|(${sc.source})?(${tc.source})(${rc.source})?`,"giu");function V(t,e){return E(!1,t,ci,s=>At(s,e))}function fi(t,e){let s=e.singleQuote?"'":'"';return t.includes('"')||t.includes("'")?t:s+t+s}function me(t){return E(!1,t,nc,(e,s,r,n,i)=>!r&&n?ts(n)+ue(i||""):e)}function ts(t){return ui(t).replace(/\.0(?=$|e)/u,"")}function pi(t){return t.trailingComma==="es5"||t.trailingComma==="all"}function ic(t,e,s){let r=!!(s!=null&&s.backwards);if(e===!1)return!1;let n=t.charAt(e);if(r){if(t.charAt(e-1)==="\r"&&n===` +`)return e-2;if(n===` +`||n==="\r"||n==="\u2028"||n==="\u2029")return e-1}else{if(n==="\r"&&t.charAt(e+1)===` +`)return e+2;if(n===` +`||n==="\r"||n==="\u2028"||n==="\u2029")return e+1}return e}var Ut=ic;function oc(t,e,s={}){let r=Pt(t,s.backwards?e-1:e,s),n=Ut(t,r,s);return r!==n}var Ft=oc;function ac(t,e){if(e===!1)return!1;if(t.charAt(e)==="/"&&t.charAt(e+1)==="*"){for(let s=e+2;ss.type==="value-comment"))&&pi(e)&&t.callParent(()=>Xr(t,e))?Ct(","):""}function mi(t,e,s){let{node:r,parent:n}=t,i=t.map(({node:y})=>typeof y=="string"?y:s(),"groups");if(n&&zn(n)&&(r.groups.length===1||r.groups.length>0&&r.groups[0].type==="value-comma_group"&&r.groups[0].groups.length>0&&r.groups[0].groups[0].type==="value-word"&&r.groups[0].groups[0].value.startsWith("data:")))return[r.open?s("open"):"",Y(",",i),r.close?s("close"):""];if(!r.open){let y=rs(t);He(i);let x=hc(Y(",",i),2),h=Y(y?S:A,x);return q(y?[S,h]:L([pc(t)?D:"",Se(h)]))}let o=t.map(({node:y,isLast:x,index:h})=>{var b;let d=i[h];Dt(y)&&y.type==="value-comma_group"&&y.groups&&y.groups[0].type!=="value-paren_group"&&((b=y.groups[2])==null?void 0:b.type)==="value-paren_group"&&H(d)===re&&H(d.contents)===te&&H(d.contents.contents)===se&&(d=L(oe(d)));let m=[d,x?fc(t,e):","];if(!x&&y.type==="value-comma_group"&&ae(y.groups)){let w=$(!1,y.groups,-1);!w.source&&w.close&&(w=w.close),w.source&&$t(e.originalText,R(w))&&m.push(S)}return m},"groups"),u=si(r,n),a=oi(r,n),c=Xr(t,e),f=a||c&&!u,p=a||u,l=L([r.open?s("open"):"",q([D,Y(A,o)]),D,r.close?s("close"):""],{shouldBreak:f});return p?oe(l):l}function rs(t){return t.match(e=>e.type==="value-paren_group"&&!e.open&&e.groups.some(s=>s.type==="value-comma_group"),(e,s)=>s==="group"&&e.type==="value-value",(e,s)=>s==="group"&&e.type==="value-root",(e,s)=>s==="value"&&(e.type==="css-decl"&&!e.prop.startsWith("--")||e.type==="css-atrule"&&e.variable))}function pc(t){return t.match(e=>e.type==="value-paren_group"&&!e.open,(e,s)=>s==="group"&&e.type==="value-value",(e,s)=>s==="group"&&e.type==="value-root",(e,s)=>s==="value"&&e.type==="css-decl")}function hc(t,e){let s=[];for(let r=0;r{let{node:n,previous:i}=t;if((i==null?void 0:i.type)==="css-comment"&&i.text.trim()==="prettier-ignore"?r.push(e.originalText.slice(P(n),R(n))):r.push(s()),t.isLast)return;let{next:o}=t;o.type==="css-comment"&&!Ft(e.originalText,P(o),{backwards:!0})&&!Te(n)||o.type==="css-atrule"&&o.name==="else"&&n.type!=="css-comment"?r.push(" "):(r.push(e.__isHTMLStyleAttribute?A:S),$t(e.originalText,R(n))&&!Te(n)&&r.push(S))},"nodes"),r}var Pe=dc;function mc(t,e,s){var n,i,o,u,a,c;let{node:r}=t;switch(r.type){case"front-matter":return[r.raw,S];case"css-root":{let f=Pe(t,e,s),p=r.raws.after.trim();return p.startsWith(";")&&(p=p.slice(1).trim()),[r.frontMatter?[s("frontMatter"),S]:"",f,p?` ${p}`:"",r.nodes.length>0?S:""]}case"css-comment":{let f=r.inline||r.raws.inline,p=e.originalText.slice(P(r),R(r));return f?p.trimEnd():p}case"css-rule":return[s("selector"),r.important?" !important":"",r.nodes?[((n=r.selector)==null?void 0:n.type)==="selector-unknown"&&Ne(r.selector.value)?A:r.selector?" ":"","{",r.nodes.length>0?q([S,Pe(t,e,s)]):"",S,"}",jn(r)?";":""]:";"];case"css-decl":{let f=t.parent,{between:p}=r.raws,l=p.trim(),y=l===":",x=typeof r.value=="string"&&/^ *$/u.test(r.value),h=typeof r.value=="string"?r.value:s("value");return h=ti(r)?tn(h):h,!y&&Ne(l)&&!((o=(i=r.value)==null?void 0:i.group)!=null&&o.group&&t.call(()=>rs(t),"value","group","group"))&&(h=q([S,oe(h)])),[E(!1,r.raws.before,/[\s;]/gu,""),f.type==="css-atrule"&&f.variable||Yn(t)?r.prop:ue(r.prop),l.startsWith("//")?" ":"",l,r.extend||x?"":" ",e.parser==="less"&&r.extend&&r.selector?["extend(",s("selector"),")"]:"",h,r.raws.important?r.raws.important.replace(/\s*!\s*important/iu," !important"):r.important?" !important":"",r.raws.scssDefault?r.raws.scssDefault.replace(/\s*!default/iu," !default"):r.scssDefault?" !default":"",r.raws.scssGlobal?r.raws.scssGlobal.replace(/\s*!global/iu," !global"):r.scssGlobal?" !global":"",r.nodes?[" {",q([D,Pe(t,e,s)]),D,"}"]:Zn(r)&&!f.raws.semicolon&&e.originalText[R(r)-1]!==";"?"":e.__isHTMLStyleAttribute&&t.isLast?Ct(";"):";"]}case"css-atrule":{let f=t.parent,p=Lt(r)&&!f.raws.semicolon&&e.originalText[R(r)-1]!==";";if(e.parser==="less"){if(r.mixin)return[s("selector"),r.important?" !important":"",p?"":";"];if(r.function)return[r.name,typeof r.params=="string"?r.params:s("params"),p?"":";"];if(r.variable)return["@",r.name,": ",r.value?s("value"):"",r.raws.between.trim()?r.raws.between.trim()+" ":"",r.nodes?["{",q([r.nodes.length>0?D:"",Pe(t,e,s)]),D,"}"]:"",p?"":";"]}let l=r.name==="import"&&((u=r.params)==null?void 0:u.type)==="value-unknown"&&r.params.value.endsWith(";");return["@",Jr(r)||r.name.endsWith(":")||Lt(r)?r.name:ue(r.name),r.params?[Jr(r)?"":Lt(r)?r.raws.afterName===""?"":r.name.endsWith(":")?" ":/^\s*\n\s*\n/u.test(r.raws.afterName)?[S,S]:/^\s*\n/u.test(r.raws.afterName)?S:" ":" ",typeof r.params=="string"?r.params:s("params")]:"",r.selector?q([" ",s("selector")]):"",r.value?L([" ",s("value"),tt(r,e)?ri(r)?" ":A:""]):r.name==="else"?" ":"",r.nodes?[tt(r,e)?"":r.selector&&!r.selector.nodes&&typeof r.selector.value=="string"&&Ne(r.selector.value)||!r.selector&&typeof r.params=="string"&&Ne(r.params)?A:" ","{",q([r.nodes.length>0?D:"",Pe(t,e,s)]),D,"}"]:p||l?"":";"]}case"media-query-list":{let f=[];return t.each(({node:p})=>{p.type==="media-query"&&p.value===""||f.push(s())},"nodes"),L(q(Y(A,f)))}case"media-query":return[Y(" ",t.map(s,"nodes")),t.isLast?"":","];case"media-type":return me(V(r.value,e));case"media-feature-expression":return r.nodes?["(",...t.map(s,"nodes"),")"]:r.value;case"media-feature":return ue(V(E(!1,r.value,/ +/gu," "),e));case"media-colon":return[r.value," "];case"media-value":return me(V(r.value,e));case"media-keyword":return V(r.value,e);case"media-url":return V(E(!1,E(!1,r.value,/^url\(\s+/giu,"url("),/\s+\)$/gu,")"),e);case"media-unknown":return r.value;case"selector-root":return L([Oe(t,"custom-selector")?[t.findAncestor(f=>f.type==="css-atrule").customSelector,A]:"",Y([",",Oe(t,["extend","custom-selector","nest"])?A:S],t.map(s,"nodes"))]);case"selector-selector":{let f=r.nodes.length>1;return L((f?q:p=>p)(t.map(s,"nodes")))}case"selector-comment":return r.value;case"selector-string":return V(r.value,e);case"selector-tag":return[r.namespace?[r.namespace===!0?"":r.namespace.trim(),"|"]:"",((a=t.previous)==null?void 0:a.type)==="selector-nesting"?r.value:me(Wn(t,r.value)?r.value.toLowerCase():r.value)];case"selector-id":return["#",r.value];case"selector-class":return[".",me(V(r.value,e))];case"selector-attribute":return["[",r.namespace?[r.namespace===!0?"":r.namespace.trim(),"|"]:"",r.attribute.trim(),r.operator??"",r.value?fi(V(r.value.trim(),e),e):"",r.insensitive?" i":"","]"];case"selector-combinator":{if(r.value==="+"||r.value===">"||r.value==="~"||r.value===">>>"){let l=t.parent;return[l.type==="selector-selector"&&l.nodes[0]===r?"":A,r.value,t.isLast?"":" "]}let f=r.value.trim().startsWith("(")?A:"",p=me(V(r.value.trim(),e))||A;return[f,p]}case"selector-universal":return[r.namespace?[r.namespace===!0?"":r.namespace.trim(),"|"]:"",r.value];case"selector-pseudo":return[ue(r.value),ae(r.nodes)?L(["(",q([D,Y([",",A],t.map(s,"nodes"))]),D,")"]):""];case"selector-nesting":return r.value;case"selector-unknown":{let f=t.findAncestor(y=>y.type==="css-rule");if(f!=null&&f.isSCSSNesterProperty)return me(V(ue(r.value),e));let p=t.parent;if((c=p.raws)!=null&&c.selector){let y=P(p),x=y+p.raws.selector.length;return e.originalText.slice(y,x).trim()}let l=t.grandparent;if(p.type==="value-paren_group"&&(l==null?void 0:l.type)==="value-func"&&l.value==="selector"){let y=R(p.open)+1,x=P(p.close),h=e.originalText.slice(y,x).trim();return Ne(h)?[Ke,h]:h}return r.value}case"value-value":case"value-root":return s("group");case"value-comment":return e.originalText.slice(P(r),R(r));case"value-comma_group":return ai(t,e,s);case"value-paren_group":return mi(t,e,s);case"value-func":return[r.value,Oe(t,"supports")&&ni(r)?" ":"",s("group")];case"value-paren":return r.value;case"value-number":return[ts(r.value),li(r.unit)];case"value-operator":return r.value;case"value-word":return r.isColor&&r.isHex||$n(r.value)?r.value.toLowerCase():r.value;case"value-colon":{let{previous:f}=t;return L([r.value,typeof(f==null?void 0:f.value)=="string"&&f.value.endsWith("\\")||Ce(t,"url")?"":A])}case"value-string":return At(r.raws.quote+r.value+r.raws.quote,e);case"value-atword":return["@",r.value];case"value-unicode-range":return r.value;case"value-unknown":return r.value;case"value-comma":default:throw new pn(r,"PostCSS")}}var yc={print:mc,embed:gn,insertPragma:Un,massageAstNode:dn,getVisitorKeys:xn},yi=yc;var gi=[{linguistLanguageId:50,name:"CSS",type:"markup",tmScope:"source.css",aceMode:"css",codemirrorMode:"css",codemirrorMimeType:"text/css",color:"#563d7c",extensions:[".css",".wxss"],parsers:["css"],vscodeLanguageIds:["css"]},{linguistLanguageId:262764437,name:"PostCSS",type:"markup",color:"#dc3a0c",tmScope:"source.postcss",group:"CSS",extensions:[".pcss",".postcss"],aceMode:"text",parsers:["css"],vscodeLanguageIds:["postcss"]},{linguistLanguageId:198,name:"Less",type:"markup",color:"#1d365d",aliases:["less-css"],extensions:[".less"],tmScope:"source.css.less",aceMode:"less",codemirrorMode:"css",codemirrorMimeType:"text/css",parsers:["less"],vscodeLanguageIds:["less"]},{linguistLanguageId:329,name:"SCSS",type:"markup",color:"#c6538c",tmScope:"source.css.scss",aceMode:"scss",codemirrorMode:"css",codemirrorMimeType:"text/x-scss",extensions:[".scss"],parsers:["scss"],vscodeLanguageIds:["scss"]}];var wi={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var gc={singleQuote:wi.singleQuote},vi=gc;var Js={};en(Js,{css:()=>Ny,less:()=>Py,scss:()=>Ry});var ol=xe(gt(),1),al=xe(To(),1),ul=xe(oa(),1);function sp(t,e){let s=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(s,e)}var aa=sp;var da=xe(ha(),1);function X(t,e,s){if(t&&typeof t=="object"){delete t.parent;for(let r in t)X(t[r],e,s),r==="type"&&typeof t[r]=="string"&&!t[r].startsWith(e)&&(!s||!s.test(t[r]))&&(t[r]=e+t[r])}return t}function Ls(t){if(t&&typeof t=="object"){delete t.parent;for(let e in t)Ls(t[e]);!Array.isArray(t)&&t.value&&!t.type&&(t.type="unknown")}return t}var mp=da.default.default;function yp(t){let e;try{e=mp(t)}catch{return{type:"selector-unknown",value:t}}return X(Ls(e),"media-")}var ma=yp;var lu=xe(uu(),1);function Nm(t){if(/\/\/|\/\*/u.test(t))return{type:"selector-unknown",value:t.trim()};let e;try{new lu.default(s=>{e=s}).process(t)}catch{return{type:"selector-unknown",value:t}}return X(e,"selector-")}var ee=Nm;var rl=xe(Qu(),1);var wy=t=>{for(;t.parent;)t=t.parent;return t},Ur=wy;function vy(t){return Ur(t).text.slice(t.group.open.sourceIndex+1,t.group.close.sourceIndex).trim()}var Ju=vy;function xy(t){if(ae(t)){for(let e=t.length-1;e>0;e--)if(t[e].type==="word"&&t[e].value==="{"&&t[e-1].type==="word"&&t[e-1].value.endsWith("#"))return!0}return!1}var Xu=xy;function by(t){return t.some(e=>e.type==="string"||e.type==="func"&&!e.value.endsWith("\\"))}var Zu=by;function _y(t,e){return!!(e.parser==="scss"&&(t==null?void 0:t.type)==="word"&&t.value.startsWith("$"))}var el=_y;var tl=t=>t.type==="paren"&&t.value===")";function Ey(t,e){var a;let{nodes:s}=t,r={open:null,close:null,groups:[],type:"paren_group"},n=[r],i=r,o={groups:[],type:"comma_group"},u=[o];for(let c=0;c0&&r.groups.push(o),r.close=f,u.length===1)throw new Error("Unbalanced parenthesis");u.pop(),o=$(!1,u,-1),o.groups.push(r),n.pop(),r=$(!1,n,-1)}else if(f.type==="comma"){if(c===s.length-3&&s[c+1].type==="comment"&&tl(s[c+2]))continue;r.groups.push(o),o={groups:[],type:"comma_group"},u[u.length-1]=o}else o.groups.push(f)}return o.groups.length>0&&r.groups.push(o),i}function Fr(t){return t.type==="paren_group"&&!t.open&&!t.close&&t.groups.length===1||t.type==="comma_group"&&t.groups.length===1?Fr(t.groups[0]):t.type==="paren_group"||t.type==="comma_group"?{...t,groups:t.groups.map(Fr)}:t}function sl(t,e){if(t&&typeof t=="object")for(let s in t)s!=="parent"&&(sl(t[s],e),s==="nodes"&&(t.group=Fr(Ey(t,e)),delete t[s]));return t}function ky(t,e){if(e.parser==="less"&&t.startsWith("~`"))return{type:"value-unknown",value:t};let s=null;try{s=new rl.default(t,{loose:!0}).parse()}catch{return{type:"value-unknown",value:t}}s.text=t;let r=sl(s,e);return X(r,"value-",/^selector-/u)}var pe=ky;var Sy=new Set(["import","use","forward"]);function Ty(t){return Sy.has(t)}var nl=Ty;function Cy(t,e){return e.parser!=="scss"||!t.selector?!1:t.selector.replace(/\/\*.*?\*\//u,"").replace(/\/\/.*\n/u,"").trim().endsWith(":")}var il=Cy;var Oy=/(\s*)(!default).*$/u,Ay=/(\s*)(!global).*$/u;function ll(t,e){var s,r;if(t&&typeof t=="object"){delete t.parent;for(let u in t)ll(t[u],e);if(!t.type)return t;if(t.raws??(t.raws={}),t.type==="css-decl"&&typeof t.prop=="string"&&t.prop.startsWith("--")&&typeof t.value=="string"&&t.value.startsWith("{")){let u;if(t.value.trimEnd().endsWith("}")){let a=e.originalText.slice(0,t.source.start.offset),c="a".repeat(t.prop.length)+e.originalText.slice(t.source.start.offset+t.prop.length,t.source.end.offset),f=E(!1,a,/[^\n]/gu," ")+c,p;e.parser==="scss"?p=pl:e.parser==="less"?p=fl:p=cl;let l;try{l=p(f,{...e})}catch{}((s=l==null?void 0:l.nodes)==null?void 0:s.length)===1&&l.nodes[0].type==="css-rule"&&(u=l.nodes[0].nodes)}return u?t.value={type:"css-rule",nodes:u}:t.value={type:"value-unknown",value:t.raws.value.raw},t}let n="";typeof t.selector=="string"&&(n=t.raws.selector?t.raws.selector.scss??t.raws.selector.raw:t.selector,t.raws.between&&t.raws.between.trim().length>0&&(n+=t.raws.between),t.raws.selector=n);let i="";typeof t.value=="string"&&(i=t.raws.value?t.raws.value.scss??t.raws.value.raw:t.value,t.raws.value=i.trim());let o="";if(typeof t.params=="string"&&(o=t.raws.params?t.raws.params.scss??t.raws.params.raw:t.params,t.raws.afterName&&t.raws.afterName.trim().length>0&&(o=t.raws.afterName+o),t.raws.between&&t.raws.between.trim().length>0&&(o=o+t.raws.between),o=o.trim(),t.raws.params=o),n.trim().length>0)return n.startsWith("@")&&n.endsWith(":")?t:t.mixin?(t.selector=pe(n,e),t):(il(t,e)&&(t.isSCSSNesterProperty=!0),t.selector=ee(n),t);if(i.trim().length>0){let u=i.match(Oy);u&&(i=i.slice(0,u.index),t.scssDefault=!0,u[0].trim()!=="!default"&&(t.raws.scssDefault=u[0]));let a=i.match(Ay);if(a&&(i=i.slice(0,a.index),t.scssGlobal=!0,a[0].trim()!=="!global"&&(t.raws.scssGlobal=a[0])),i.startsWith("progid:"))return{type:"value-unknown",value:i};t.value=pe(i,e)}if(e.parser==="less"&&t.type==="css-decl"&&i.startsWith("extend(")&&(t.extend||(t.extend=t.raws.between===":"),t.extend&&!t.selector&&(delete t.value,t.selector=ee(i.slice(7,-1)))),t.type==="css-atrule"){if(e.parser==="less"){if(t.mixin){let u=t.raws.identifier+t.name+t.raws.afterName+t.raws.params;return t.selector=ee(u),delete t.params,t}if(t.function)return t}if(e.parser==="css"&&t.name==="custom-selector"){let u=t.params.match(/:--\S+\s+/u)[0].trim();return t.customSelector=u,t.selector=ee(t.params.slice(u.length).trim()),delete t.params,t}if(e.parser==="less"){if(t.name.includes(":")&&!t.params){t.variable=!0;let u=t.name.split(":");t.name=u[0],t.value=pe(u.slice(1).join(":"),e)}if(!["page","nest","keyframes"].includes(t.name)&&((r=t.params)==null?void 0:r[0])===":"){t.variable=!0;let u=t.params.slice(1);u&&(t.value=pe(u,e)),t.raws.afterName+=":"}if(t.variable)return delete t.params,t.value||delete t.value,t}}if(t.type==="css-atrule"&&o.length>0){let{name:u}=t,a=t.name.toLowerCase();return u==="warn"||u==="error"?(t.params={type:"media-unknown",value:o},t):u==="extend"||u==="nest"?(t.selector=ee(o),delete t.params,t):u==="at-root"?(/^\(\s*(?:without|with)\s*:.+\)$/su.test(o)?t.params=pe(o,e):(t.selector=ee(o),delete t.params),t):nl(a)?(t.import=!0,delete t.filename,t.params=pe(o,e),t):["namespace","supports","if","else","for","each","while","debug","mixin","include","function","return","define-mixin","add-mixin"].includes(u)?(o=o.replace(/(\$\S+?)(\s+)?\.{3}/u,"$1...$2"),o=o.replace(/^(?!if)(\S+)(\s+)\(/u,"$1($2"),t.value=pe(o,e),delete t.params,t):["media","custom-media"].includes(a)?o.includes("#{")?{type:"media-unknown",value:o}:(t.params=ma(o),t):(t.params=o,t)}}return t}function Ks(t,e,s){let r=Ze(e),{frontMatter:n}=r;e=r.content;let i;try{i=t(e,{map:!1})}catch(o){let{name:u,reason:a,line:c,column:f}=o;throw typeof c!="number"?o:aa(`${u}: ${a}`,{loc:{start:{line:c,column:f}},cause:o})}return s.originalText=e,i=ll(X(i,"css-"),s),Kr(i,e),n&&(n.source={startOffset:0,endOffset:n.raw.length},i.frontMatter=n),i}function cl(t,e={}){return Ks(ol.default.default,t,e)}function fl(t,e={}){return Ks(s=>al.default.parse(kn(s)),t,e)}function pl(t,e={}){return Ks(ul.default,t,e)}var Qs={astFormat:"postcss",hasPragma:Mn,locStart:P,locEnd:R},Ny={...Qs,parse:cl},Py={...Qs,parse:fl},Ry={...Qs,parse:pl};var Iy={postcss:yi};var Gb=Xs;export{Gb as default,gi as languages,vi as options,Js as parsers,Iy as printers}; diff --git a/node_modules/prettier/plugins/typescript.d.ts b/node_modules/prettier/plugins/typescript.d.ts new file mode 100644 index 0000000..e8e0f75 --- /dev/null +++ b/node_modules/prettier/plugins/typescript.d.ts @@ -0,0 +1,5 @@ +import { Parser } from "../index.js"; + +export declare const parsers: { + typescript: Parser; +}; diff --git a/node_modules/prettier/plugins/typescript.js b/node_modules/prettier/plugins/typescript.js new file mode 100644 index 0000000..ee062e8 --- /dev/null +++ b/node_modules/prettier/plugins/typescript.js @@ -0,0 +1,20 @@ +(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.typescript=e()}})(function(){"use strict";var Zc=Object.defineProperty;var $0=Object.getOwnPropertyDescriptor;var Q0=Object.getOwnPropertyNames;var K0=Object.prototype.hasOwnProperty;var vd=e=>{throw TypeError(e)};var Z0=(e,t,a)=>t in e?Zc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var Td=(e,t)=>{for(var a in t)Zc(e,a,{get:t[a],enumerable:!0})},ey=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let m of Q0(t))!K0.call(e,m)&&m!==a&&Zc(e,m,{get:()=>t[m],enumerable:!(o=$0(t,m))||o.enumerable});return e};var ty=e=>ey(Zc({},"__esModule",{value:!0}),e);var qi=(e,t,a)=>Z0(e,typeof t!="symbol"?t+"":t,a),ny=(e,t,a)=>t.has(e)||vd("Cannot "+a);var gp=(e,t,a)=>t.has(e)?vd("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,a);var ge=(e,t,a)=>(ny(e,t,"access private method"),a);var q4={};Td(q4,{parsers:()=>dd});var dd={};Td(dd,{typescript:()=>B4});var ry=()=>()=>{},Ia=ry;var iy=(e,t,a,o)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(a,o):a.global?t.replace(a,o):t.split(a).join(o)},Sr=iy;var Sm="5.7";var bt=[],ay=new Map;function ts(e){return e!==void 0?e.length:0}function Un(e,t){if(e!==void 0)for(let a=0;a0;return!1}function Xp(e,t){return t===void 0||t.length===0?e:e===void 0||e.length===0?t:[...e,...t]}function ly(e,t,a=$p){if(e===void 0||t===void 0)return e===t;if(e.length!==t.length)return!1;for(let o=0;oe==null?void 0:e.at(t):(e,t)=>{if(e!==void 0&&(t=Ip(e,t),t>1),l=a(e[P],P);switch(o(l,t)){case-1:v=P+1;break;case 0:return P;case 1:A=P-1;break}}return~v}function gy(e,t,a,o,m){if(e&&e.length>0){let v=e.length;if(v>0){let A=o===void 0||o<0?0:o,P=m===void 0||A+m>v-1?v-1:A+m,l;for(arguments.length<=2?(l=e[A],A++):l=a;A<=P;)l=t(l,e[A],A),A++;return l}}return a}var Am=Object.prototype.hasOwnProperty;function Cr(e,t){return Am.call(e,t)}function by(e){let t=[];for(let a in e)Am.call(e,a)&&t.push(a);return t}function vy(){let e=new Map;return e.add=Ty,e.remove=xy,e}function Ty(e,t){let a=this.get(e);return a!==void 0?a.push(t):this.set(e,a=[t]),a}function xy(e,t){let a=this.get(e);a!==void 0&&(Ny(a,t),a.length||this.delete(e))}function Yr(e){return Array.isArray(e)}function vp(e){return Yr(e)?e:[e]}function Sy(e,t){return e!==void 0&&t(e)?e:void 0}function kr(e,t){return e!==void 0&&t(e)?e:B.fail(`Invalid cast. The supplied value ${e} did not pass the test '${B.getFunctionName(t)}'.`)}function Fa(e){}function wy(){return!0}function gt(e){return e}function Sd(e){let t;return()=>(e&&(t=e(),e=void 0),t)}function Kn(e){let t=new Map;return a=>{let o=`${typeof a}:${a}`,m=t.get(o);return m===void 0&&!t.has(o)&&(m=e(a),t.set(o,m)),m}}function $p(e,t){return e===t}function Qp(e,t){return e===t||e!==void 0&&t!==void 0&&e.toUpperCase()===t.toUpperCase()}function ky(e,t){return $p(e,t)}function Ey(e,t){return e===t?0:e===void 0?-1:t===void 0?1:ea?P-a:1),h=Math.floor(t.length>a+P?a+P:t.length);m[0]=P;let y=P;for(let x=1;xa)return;let g=o;o=m,m=g}let A=o[t.length];return A>a?void 0:A}function Dy(e,t,a){let o=e.length-t.length;return o>=0&&(a?Qp(e.slice(o),t):e.indexOf(t,o)===o)}function Py(e,t){e[t]=e[e.length-1],e.pop()}function Ny(e,t){return Iy(e,a=>a===t)}function Iy(e,t){for(let a=0;a{let t=0;e.currentLogLevel=2,e.isDebugging=!1;function a(L){return e.currentLogLevel<=L}e.shouldLog=a;function o(L,se){e.loggingHost&&a(L)&&e.loggingHost.log(L,se)}function m(L){o(3,L)}e.log=m,(L=>{function se(Ke){o(1,Ke)}L.error=se;function fe(Ke){o(2,Ke)}L.warn=fe;function Te(Ke){o(3,Ke)}L.log=Te;function He(Ke){o(4,Ke)}L.trace=He})(m=e.log||(e.log={}));let v={};function A(){return t}e.getAssertionLevel=A;function P(L){let se=t;if(t=L,L>se)for(let fe of by(v)){let Te=v[fe];Te!==void 0&&e[fe]!==Te.assertion&&L>=Te.level&&(e[fe]=Te,v[fe]=void 0)}}e.setAssertionLevel=P;function l(L){return t>=L}e.shouldAssert=l;function Q(L,se){return l(L)?!0:(v[se]={level:L,assertion:e[se]},e[se]=Fa,!1)}function h(L,se){debugger;let fe=new Error(L?`Debug Failure. ${L}`:"Debug Failure.");throw Error.captureStackTrace&&Error.captureStackTrace(fe,se||h),fe}e.fail=h;function y(L,se,fe){return h(`${se||"Unexpected node."}\r +Node ${Ot(L.kind)} was unexpected.`,fe||y)}e.failBadSyntaxKind=y;function g(L,se,fe,Te){L||(se=se?`False expression: ${se}`:"False expression.",fe&&(se+=`\r +Verbose Debug Information: `+(typeof fe=="string"?fe:fe())),h(se,Te||g))}e.assert=g;function x(L,se,fe,Te,He){if(L!==se){let Ke=fe?Te?`${fe} ${Te}`:fe:"";h(`Expected ${L} === ${se}. ${Ke}`,He||x)}}e.assertEqual=x;function I(L,se,fe,Te){L>=se&&h(`Expected ${L} < ${se}. ${fe||""}`,Te||I)}e.assertLessThan=I;function re(L,se,fe){L>se&&h(`Expected ${L} <= ${se}`,fe||re)}e.assertLessThanOrEqual=re;function he(L,se,fe){L= ${se}`,fe||he)}e.assertGreaterThanOrEqual=he;function ye(L,se,fe){L==null&&h(se,fe||ye)}e.assertIsDefined=ye;function de(L,se,fe){return ye(L,se,fe||de),L}e.checkDefined=de;function M(L,se,fe){for(let Te of L)ye(Te,se,fe||M)}e.assertEachIsDefined=M;function ae(L,se,fe){return M(L,se,fe||ae),L}e.checkEachDefined=ae;function Oe(L,se="Illegal value:",fe){let Te=typeof L=="object"&&Cr(L,"kind")&&Cr(L,"pos")?"SyntaxKind: "+Ot(L.kind):JSON.stringify(L);return h(`${se} ${Te}`,fe||Oe)}e.assertNever=Oe;function V(L,se,fe,Te){Q(1,"assertEachNode")&&g(se===void 0||Yp(L,se),fe||"Unexpected node.",()=>`Node array did not pass test '${bn(se)}'.`,Te||V)}e.assertEachNode=V;function oe(L,se,fe,Te){Q(1,"assertNode")&&g(L!==void 0&&(se===void 0||se(L)),fe||"Unexpected node.",()=>`Node ${Ot(L==null?void 0:L.kind)} did not pass test '${bn(se)}'.`,Te||oe)}e.assertNode=oe;function W(L,se,fe,Te){Q(1,"assertNotNode")&&g(L===void 0||se===void 0||!se(L),fe||"Unexpected node.",()=>`Node ${Ot(L.kind)} should not have passed test '${bn(se)}'.`,Te||W)}e.assertNotNode=W;function dt(L,se,fe,Te){Q(1,"assertOptionalNode")&&g(se===void 0||L===void 0||se(L),fe||"Unexpected node.",()=>`Node ${Ot(L==null?void 0:L.kind)} did not pass test '${bn(se)}'.`,Te||dt)}e.assertOptionalNode=dt;function nr(L,se,fe,Te){Q(1,"assertOptionalToken")&&g(se===void 0||L===void 0||L.kind===se,fe||"Unexpected node.",()=>`Node ${Ot(L==null?void 0:L.kind)} was not a '${Ot(se)}' token.`,Te||nr)}e.assertOptionalToken=nr;function gn(L,se,fe){Q(1,"assertMissingNode")&&g(L===void 0,se||"Unexpected node.",()=>`Node ${Ot(L.kind)} was unexpected'.`,fe||gn)}e.assertMissingNode=gn;function rr(L){}e.type=rr;function bn(L){if(typeof L!="function")return"";if(Cr(L,"name"))return L.name;{let se=Function.prototype.toString.call(L),fe=/^function\s+([\w$]+)\s*\(/.exec(se);return fe?fe[1]:""}}e.getFunctionName=bn;function In(L){return`{ name: ${cs(L.escapedName)}; flags: ${ct(L.flags)}; declarations: ${Np(L.declarations,se=>Ot(se.kind))} }`}e.formatSymbol=In;function Ge(L=0,se,fe){let Te=Pr(se);if(L===0)return Te.length>0&&Te[0][0]===0?Te[0][1]:"0";if(fe){let He=[],Ke=L;for(let[st,Dt]of Te){if(st>L)break;st!==0&&st&L&&(He.push(Dt),Ke&=~st)}if(Ke===0)return He.join("|")}else for(let[He,Ke]of Te)if(He===L)return Ke;return L.toString()}e.formatEnum=Ge;let ir=new Map;function Pr(L){let se=ir.get(L);if(se)return se;let fe=[];for(let He in L){let Ke=L[He];typeof Ke=="number"&&fe.push([Ke,He])}let Te=fy(fe,(He,Ke)=>Cm(He[0],Ke[0]));return ir.set(L,Te),Te}function Ot(L){return Ge(L,Ie,!1)}e.formatSyntaxKind=Ot;function Bn(L){return Ge(L,Om,!1)}e.formatSnippetKind=Bn;function On(L){return Ge(L,Dr,!1)}e.formatScriptKind=On;function Mt(L){return Ge(L,on,!0)}e.formatNodeFlags=Mt;function vt(L){return Ge(L,Pm,!0)}e.formatNodeCheckFlags=vt;function Qe(L){return Ge(L,Kp,!0)}e.formatModifierFlags=Qe;function qn(L){return Ge(L,Im,!0)}e.formatTransformFlags=qn;function $t(L){return Ge(L,Mm,!0)}e.formatEmitFlags=$t;function ct(L){return Ge(L,Zp,!0)}e.formatSymbolFlags=ct;function _t(L){return Ge(L,nn,!0)}e.formatTypeFlags=_t;function Ut(L){return Ge(L,Nm,!0)}e.formatSignatureFlags=Ut;function Jt(L){return Ge(L,ef,!0)}e.formatObjectFlags=Jt;function lt(L){return Ge(L,Mp,!0)}e.formatFlowFlags=lt;function ar(L){return Ge(L,Dm,!0)}e.formatRelationComparisonResult=ar;function mt(L){return Ge(L,CheckMode,!0)}e.formatCheckMode=mt;function vn(L){return Ge(L,SignatureCheckMode,!0)}e.formatSignatureCheckMode=vn;function yt(L){return Ge(L,TypeFacts,!0)}e.formatTypeFacts=yt;let cn=!1,nt;function Bt(L){"__debugFlowFlags"in L||Object.defineProperties(L,{__tsDebuggerDisplay:{value(){let se=this.flags&2?"FlowStart":this.flags&4?"FlowBranchLabel":this.flags&8?"FlowLoopLabel":this.flags&16?"FlowAssignment":this.flags&32?"FlowTrueCondition":this.flags&64?"FlowFalseCondition":this.flags&128?"FlowSwitchClause":this.flags&256?"FlowArrayMutation":this.flags&512?"FlowCall":this.flags&1024?"FlowReduceLabel":this.flags&1?"FlowUnreachable":"UnknownFlow",fe=this.flags&-2048;return`${se}${fe?` (${lt(fe)})`:""}`}},__debugFlowFlags:{get(){return Ge(this.flags,Mp,!0)}},__debugToString:{value(){return mr(this)}}})}function rn(L){return cn&&(typeof Object.setPrototypeOf=="function"?(nt||(nt=Object.create(Object.prototype),Bt(nt)),Object.setPrototypeOf(L,nt)):Bt(L)),L}e.attachFlowNodeDebugInfo=rn;let _r;function fr(L){"__tsDebuggerDisplay"in L||Object.defineProperties(L,{__tsDebuggerDisplay:{value(se){return se=String(se).replace(/(?:,[\s\w]+:[^,]+)+\]$/,"]"),`NodeArray ${se}`}}})}function dr(L){cn&&(typeof Object.setPrototypeOf=="function"?(_r||(_r=Object.create(Array.prototype),fr(_r)),Object.setPrototypeOf(L,_r)):fr(L))}e.attachNodeArrayDebugInfo=dr;function zn(){if(cn)return;let L=new WeakMap,se=new WeakMap;Object.defineProperties(At.getSymbolConstructor().prototype,{__tsDebuggerDisplay:{value(){let Te=this.flags&33554432?"TransientSymbol":"Symbol",He=this.flags&-33554433;return`${Te} '${jp(this)}'${He?` (${ct(He)})`:""}`}},__debugFlags:{get(){return ct(this.flags)}}}),Object.defineProperties(At.getTypeConstructor().prototype,{__tsDebuggerDisplay:{value(){let Te=this.flags&67359327?`IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName?` (${this.debugIntrinsicName})`:""}`:this.flags&98304?"NullableType":this.flags&384?`LiteralType ${JSON.stringify(this.value)}`:this.flags&2048?`LiteralType ${this.value.negative?"-":""}${this.value.base10Value}n`:this.flags&8192?"UniqueESSymbolType":this.flags&32?"EnumType":this.flags&1048576?"UnionType":this.flags&2097152?"IntersectionType":this.flags&4194304?"IndexType":this.flags&8388608?"IndexedAccessType":this.flags&16777216?"ConditionalType":this.flags&33554432?"SubstitutionType":this.flags&262144?"TypeParameter":this.flags&524288?this.objectFlags&3?"InterfaceType":this.objectFlags&4?"TypeReference":this.objectFlags&8?"TupleType":this.objectFlags&16?"AnonymousType":this.objectFlags&32?"MappedType":this.objectFlags&1024?"ReverseMappedType":this.objectFlags&256?"EvolvingArrayType":"ObjectType":"Type",He=this.flags&524288?this.objectFlags&-1344:0;return`${Te}${this.symbol?` '${jp(this.symbol)}'`:""}${He?` (${Jt(He)})`:""}`}},__debugFlags:{get(){return _t(this.flags)}},__debugObjectFlags:{get(){return this.flags&524288?Jt(this.objectFlags):""}},__debugTypeToString:{value(){let Te=L.get(this);return Te===void 0&&(Te=this.checker.typeToString(this),L.set(this,Te)),Te}}}),Object.defineProperties(At.getSignatureConstructor().prototype,{__debugFlags:{get(){return Ut(this.flags)}},__debugSignatureToString:{value(){var Te;return(Te=this.checker)==null?void 0:Te.signatureToString(this)}}});let fe=[At.getNodeConstructor(),At.getIdentifierConstructor(),At.getTokenConstructor(),At.getSourceFileConstructor()];for(let Te of fe)Cr(Te.prototype,"__debugKind")||Object.defineProperties(Te.prototype,{__tsDebuggerDisplay:{value(){return`${Ua(this)?"GeneratedIdentifier":tt(this)?`Identifier '${Pn(this)}'`:gi(this)?`PrivateIdentifier '${Pn(this)}'`:Ya(this)?`StringLiteral ${JSON.stringify(this.text.length<10?this.text:this.text.slice(10)+"...")}`:ta(this)?`NumericLiteral ${this.text}`:C1(this)?`BigIntLiteral ${this.text}n`:Af(this)?"TypeParameterDeclaration":ds(this)?"ParameterDeclaration":Cf(this)?"ConstructorDeclaration":bl(this)?"GetAccessorDeclaration":hs(this)?"SetAccessorDeclaration":O1(this)?"CallSignatureDeclaration":M1(this)?"ConstructSignatureDeclaration":Df(this)?"IndexSignatureDeclaration":J1(this)?"TypePredicateNode":Pf(this)?"TypeReferenceNode":Nf(this)?"FunctionTypeNode":If(this)?"ConstructorTypeNode":Vb(this)?"TypeQueryNode":L1(this)?"TypeLiteralNode":Wb(this)?"ArrayTypeNode":Gb(this)?"TupleTypeNode":Yb(this)?"OptionalTypeNode":Xb(this)?"RestTypeNode":R1(this)?"UnionTypeNode":U1(this)?"IntersectionTypeNode":Hb(this)?"ConditionalTypeNode":$b(this)?"InferTypeNode":B1(this)?"ParenthesizedTypeNode":Qb(this)?"ThisTypeNode":q1(this)?"TypeOperatorNode":Kb(this)?"IndexedAccessTypeNode":z1(this)?"MappedTypeNode":Zb(this)?"LiteralTypeNode":j1(this)?"NamedTupleMember":e6(this)?"ImportTypeNode":Ot(this.kind)}${this.flags?` (${Mt(this.flags)})`:""}`}},__debugKind:{get(){return Ot(this.kind)}},__debugNodeFlags:{get(){return Mt(this.flags)}},__debugModifierFlags:{get(){return Qe(Q2(this))}},__debugTransformFlags:{get(){return qn(this.transformFlags)}},__debugIsParseTreeNode:{get(){return hl(this)}},__debugEmitFlags:{get(){return $t(za(this))}},__debugGetText:{value(He){if(La(this))return"";let Ke=se.get(this);if(Ke===void 0){let st=gg(this),Dt=st&&hi(st);Ke=Dt?Rd(Dt,st,He):"",se.set(this,Ke)}return Ke}}});cn=!0}e.enableDebugInfo=zn;function Fn(L){let se=L&7,fe=se===0?"in out":se===3?"[bivariant]":se===2?"in":se===1?"out":se===4?"[independent]":"";return L&8?fe+=" (unmeasurable)":L&16&&(fe+=" (unreliable)"),fe}e.formatVariance=Fn;class Nr{__debugToString(){var se;switch(this.kind){case 3:return((se=this.debugInfo)==null?void 0:se.call(this))||"(function mapper)";case 0:return`${this.source.__debugTypeToString()} -> ${this.target.__debugTypeToString()}`;case 1:return xd(this.sources,this.targets||Np(this.sources,()=>"any"),(fe,Te)=>`${fe.__debugTypeToString()} -> ${typeof Te=="string"?Te:Te.__debugTypeToString()}`).join(", ");case 2:return xd(this.sources,this.targets,(fe,Te)=>`${fe.__debugTypeToString()} -> ${Te().__debugTypeToString()}`).join(", ");case 5:case 4:return`m1: ${this.mapper1.__debugToString().split(` +`).join(` + `)} +m2: ${this.mapper2.__debugToString().split(` +`).join(` + `)}`;default:return Oe(this)}}}e.DebugTypeMapper=Nr;function Vn(L){return e.isDebugging?Object.setPrototypeOf(L,Nr.prototype):L}e.attachDebugPrototypeIfDebug=Vn;function Ce(L){return console.log(mr(L))}e.printControlFlowGraph=Ce;function mr(L){let se=-1;function fe(u){return u.id||(u.id=se,se--),u.id}let Te;(u=>{u.lr="\u2500",u.ud="\u2502",u.dr="\u256D",u.dl="\u256E",u.ul="\u256F",u.ur="\u2570",u.udr="\u251C",u.udl="\u2524",u.dlr="\u252C",u.ulr="\u2534",u.udlr="\u256B"})(Te||(Te={}));let He;(u=>{u[u.None=0]="None",u[u.Up=1]="Up",u[u.Down=2]="Down",u[u.Left=4]="Left",u[u.Right=8]="Right",u[u.UpDown=3]="UpDown",u[u.LeftRight=12]="LeftRight",u[u.UpLeft=5]="UpLeft",u[u.UpRight=9]="UpRight",u[u.DownLeft=6]="DownLeft",u[u.DownRight=10]="DownRight",u[u.UpDownLeft=7]="UpDownLeft",u[u.UpDownRight=11]="UpDownRight",u[u.UpLeftRight=13]="UpLeftRight",u[u.DownLeftRight=14]="DownLeftRight",u[u.UpDownLeftRight=15]="UpDownLeftRight",u[u.NoChildren=16]="NoChildren"})(He||(He={}));let Ke=2032,st=882,Dt=Object.create(null),Tt=[],ut=[],Ir=Se(L,new Set);for(let u of Tt)u.text=rt(u.flowNode,u.circular),be(u);let hr=We(Ir),Mn=Ze(hr);return Ye(Ir,0),ln();function Wn(u){return!!(u.flags&128)}function Si(u){return!!(u.flags&12)&&!!u.antecedent}function R(u){return!!(u.flags&Ke)}function $(u){return!!(u.flags&st)}function K(u){let Ne=[];for(let Me of u.edges)Me.source===u&&Ne.push(Me.target);return Ne}function xe(u){let Ne=[];for(let Me of u.edges)Me.target===u&&Ne.push(Me.source);return Ne}function Se(u,Ne){let Me=fe(u),U=Dt[Me];if(U&&Ne.has(u))return U.circular=!0,U={id:-1,flowNode:u,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:"circularity"},Tt.push(U),U;if(Ne.add(u),!U)if(Dt[Me]=U={id:Me,flowNode:u,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:!1},Tt.push(U),Si(u))for(let ze of u.antecedent)we(U,ze,Ne);else R(u)&&we(U,u.antecedent,Ne);return Ne.delete(u),U}function we(u,Ne,Me){let U=Se(Ne,Me),ze={source:u,target:U};ut.push(ze),u.edges.push(ze),U.edges.push(ze)}function be(u){if(u.level!==-1)return u.level;let Ne=0;for(let Me of xe(u))Ne=Math.max(Ne,be(Me)+1);return u.level=Ne}function We(u){let Ne=0;for(let Me of K(u))Ne=Math.max(Ne,We(Me));return Ne+1}function Ze(u){let Ne=J(Array(u),0);for(let Me of Tt)Ne[Me.level]=Math.max(Ne[Me.level],Me.text.length);return Ne}function Ye(u,Ne){if(u.lane===-1){u.lane=Ne,u.endLane=Ne;let Me=K(u);for(let U=0;U0&&Ne++;let ze=Me[U];Ye(ze,Ne),ze.endLane>u.endLane&&(Ne=ze.endLane)}u.endLane=Ne}}function Ee(u){if(u&2)return"Start";if(u&4)return"Branch";if(u&8)return"Loop";if(u&16)return"Assignment";if(u&32)return"True";if(u&64)return"False";if(u&128)return"SwitchClause";if(u&256)return"ArrayMutation";if(u&512)return"Call";if(u&1024)return"ReduceLabel";if(u&1)return"Unreachable";throw new Error}function Tn(u){let Ne=hi(u);return Rd(Ne,u,!1)}function rt(u,Ne){let Me=Ee(u.flags);if(Ne&&(Me=`${Me}#${fe(u)}`),Wn(u)){let U=[],{switchStatement:ze,clauseStart:an,clauseEnd:Ve}=u.node;for(let $e=an;$eVe.lane)+1,Me=J(Array(Ne),""),U=Mn.map(()=>Array(Ne)),ze=Mn.map(()=>J(Array(Ne),0));for(let Ve of Tt){U[Ve.level][Ve.lane]=Ve;let $e=K(Ve);for(let kt=0;kt<$e.length;kt++){let Nt=$e[kt],qt=8;Nt.lane===Ve.lane&&(qt|=4),kt>0&&(qt|=1),kt<$e.length-1&&(qt|=2),ze[Ve.level][Nt.lane]|=qt}$e.length===0&&(ze[Ve.level][Ve.lane]|=16);let Pt=xe(Ve);for(let kt=0;kt0&&(qt|=1),kt0?ze[Ve-1][$e]:0,kt=$e>0?ze[Ve][$e-1]:0,Nt=ze[Ve][$e];Nt||(Pt&8&&(Nt|=12),kt&2&&(Nt|=3),ze[Ve][$e]=Nt)}for(let Ve=0;Ve0?u.repeat(Ne):"";let Me="";for(;Me.length{},Oy=()=>{},sl,Ie=(e=>(e[e.Unknown=0]="Unknown",e[e.EndOfFileToken=1]="EndOfFileToken",e[e.SingleLineCommentTrivia=2]="SingleLineCommentTrivia",e[e.MultiLineCommentTrivia=3]="MultiLineCommentTrivia",e[e.NewLineTrivia=4]="NewLineTrivia",e[e.WhitespaceTrivia=5]="WhitespaceTrivia",e[e.ShebangTrivia=6]="ShebangTrivia",e[e.ConflictMarkerTrivia=7]="ConflictMarkerTrivia",e[e.NonTextFileMarkerTrivia=8]="NonTextFileMarkerTrivia",e[e.NumericLiteral=9]="NumericLiteral",e[e.BigIntLiteral=10]="BigIntLiteral",e[e.StringLiteral=11]="StringLiteral",e[e.JsxText=12]="JsxText",e[e.JsxTextAllWhiteSpaces=13]="JsxTextAllWhiteSpaces",e[e.RegularExpressionLiteral=14]="RegularExpressionLiteral",e[e.NoSubstitutionTemplateLiteral=15]="NoSubstitutionTemplateLiteral",e[e.TemplateHead=16]="TemplateHead",e[e.TemplateMiddle=17]="TemplateMiddle",e[e.TemplateTail=18]="TemplateTail",e[e.OpenBraceToken=19]="OpenBraceToken",e[e.CloseBraceToken=20]="CloseBraceToken",e[e.OpenParenToken=21]="OpenParenToken",e[e.CloseParenToken=22]="CloseParenToken",e[e.OpenBracketToken=23]="OpenBracketToken",e[e.CloseBracketToken=24]="CloseBracketToken",e[e.DotToken=25]="DotToken",e[e.DotDotDotToken=26]="DotDotDotToken",e[e.SemicolonToken=27]="SemicolonToken",e[e.CommaToken=28]="CommaToken",e[e.QuestionDotToken=29]="QuestionDotToken",e[e.LessThanToken=30]="LessThanToken",e[e.LessThanSlashToken=31]="LessThanSlashToken",e[e.GreaterThanToken=32]="GreaterThanToken",e[e.LessThanEqualsToken=33]="LessThanEqualsToken",e[e.GreaterThanEqualsToken=34]="GreaterThanEqualsToken",e[e.EqualsEqualsToken=35]="EqualsEqualsToken",e[e.ExclamationEqualsToken=36]="ExclamationEqualsToken",e[e.EqualsEqualsEqualsToken=37]="EqualsEqualsEqualsToken",e[e.ExclamationEqualsEqualsToken=38]="ExclamationEqualsEqualsToken",e[e.EqualsGreaterThanToken=39]="EqualsGreaterThanToken",e[e.PlusToken=40]="PlusToken",e[e.MinusToken=41]="MinusToken",e[e.AsteriskToken=42]="AsteriskToken",e[e.AsteriskAsteriskToken=43]="AsteriskAsteriskToken",e[e.SlashToken=44]="SlashToken",e[e.PercentToken=45]="PercentToken",e[e.PlusPlusToken=46]="PlusPlusToken",e[e.MinusMinusToken=47]="MinusMinusToken",e[e.LessThanLessThanToken=48]="LessThanLessThanToken",e[e.GreaterThanGreaterThanToken=49]="GreaterThanGreaterThanToken",e[e.GreaterThanGreaterThanGreaterThanToken=50]="GreaterThanGreaterThanGreaterThanToken",e[e.AmpersandToken=51]="AmpersandToken",e[e.BarToken=52]="BarToken",e[e.CaretToken=53]="CaretToken",e[e.ExclamationToken=54]="ExclamationToken",e[e.TildeToken=55]="TildeToken",e[e.AmpersandAmpersandToken=56]="AmpersandAmpersandToken",e[e.BarBarToken=57]="BarBarToken",e[e.QuestionToken=58]="QuestionToken",e[e.ColonToken=59]="ColonToken",e[e.AtToken=60]="AtToken",e[e.QuestionQuestionToken=61]="QuestionQuestionToken",e[e.BacktickToken=62]="BacktickToken",e[e.HashToken=63]="HashToken",e[e.EqualsToken=64]="EqualsToken",e[e.PlusEqualsToken=65]="PlusEqualsToken",e[e.MinusEqualsToken=66]="MinusEqualsToken",e[e.AsteriskEqualsToken=67]="AsteriskEqualsToken",e[e.AsteriskAsteriskEqualsToken=68]="AsteriskAsteriskEqualsToken",e[e.SlashEqualsToken=69]="SlashEqualsToken",e[e.PercentEqualsToken=70]="PercentEqualsToken",e[e.LessThanLessThanEqualsToken=71]="LessThanLessThanEqualsToken",e[e.GreaterThanGreaterThanEqualsToken=72]="GreaterThanGreaterThanEqualsToken",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=73]="GreaterThanGreaterThanGreaterThanEqualsToken",e[e.AmpersandEqualsToken=74]="AmpersandEqualsToken",e[e.BarEqualsToken=75]="BarEqualsToken",e[e.BarBarEqualsToken=76]="BarBarEqualsToken",e[e.AmpersandAmpersandEqualsToken=77]="AmpersandAmpersandEqualsToken",e[e.QuestionQuestionEqualsToken=78]="QuestionQuestionEqualsToken",e[e.CaretEqualsToken=79]="CaretEqualsToken",e[e.Identifier=80]="Identifier",e[e.PrivateIdentifier=81]="PrivateIdentifier",e[e.JSDocCommentTextToken=82]="JSDocCommentTextToken",e[e.BreakKeyword=83]="BreakKeyword",e[e.CaseKeyword=84]="CaseKeyword",e[e.CatchKeyword=85]="CatchKeyword",e[e.ClassKeyword=86]="ClassKeyword",e[e.ConstKeyword=87]="ConstKeyword",e[e.ContinueKeyword=88]="ContinueKeyword",e[e.DebuggerKeyword=89]="DebuggerKeyword",e[e.DefaultKeyword=90]="DefaultKeyword",e[e.DeleteKeyword=91]="DeleteKeyword",e[e.DoKeyword=92]="DoKeyword",e[e.ElseKeyword=93]="ElseKeyword",e[e.EnumKeyword=94]="EnumKeyword",e[e.ExportKeyword=95]="ExportKeyword",e[e.ExtendsKeyword=96]="ExtendsKeyword",e[e.FalseKeyword=97]="FalseKeyword",e[e.FinallyKeyword=98]="FinallyKeyword",e[e.ForKeyword=99]="ForKeyword",e[e.FunctionKeyword=100]="FunctionKeyword",e[e.IfKeyword=101]="IfKeyword",e[e.ImportKeyword=102]="ImportKeyword",e[e.InKeyword=103]="InKeyword",e[e.InstanceOfKeyword=104]="InstanceOfKeyword",e[e.NewKeyword=105]="NewKeyword",e[e.NullKeyword=106]="NullKeyword",e[e.ReturnKeyword=107]="ReturnKeyword",e[e.SuperKeyword=108]="SuperKeyword",e[e.SwitchKeyword=109]="SwitchKeyword",e[e.ThisKeyword=110]="ThisKeyword",e[e.ThrowKeyword=111]="ThrowKeyword",e[e.TrueKeyword=112]="TrueKeyword",e[e.TryKeyword=113]="TryKeyword",e[e.TypeOfKeyword=114]="TypeOfKeyword",e[e.VarKeyword=115]="VarKeyword",e[e.VoidKeyword=116]="VoidKeyword",e[e.WhileKeyword=117]="WhileKeyword",e[e.WithKeyword=118]="WithKeyword",e[e.ImplementsKeyword=119]="ImplementsKeyword",e[e.InterfaceKeyword=120]="InterfaceKeyword",e[e.LetKeyword=121]="LetKeyword",e[e.PackageKeyword=122]="PackageKeyword",e[e.PrivateKeyword=123]="PrivateKeyword",e[e.ProtectedKeyword=124]="ProtectedKeyword",e[e.PublicKeyword=125]="PublicKeyword",e[e.StaticKeyword=126]="StaticKeyword",e[e.YieldKeyword=127]="YieldKeyword",e[e.AbstractKeyword=128]="AbstractKeyword",e[e.AccessorKeyword=129]="AccessorKeyword",e[e.AsKeyword=130]="AsKeyword",e[e.AssertsKeyword=131]="AssertsKeyword",e[e.AssertKeyword=132]="AssertKeyword",e[e.AnyKeyword=133]="AnyKeyword",e[e.AsyncKeyword=134]="AsyncKeyword",e[e.AwaitKeyword=135]="AwaitKeyword",e[e.BooleanKeyword=136]="BooleanKeyword",e[e.ConstructorKeyword=137]="ConstructorKeyword",e[e.DeclareKeyword=138]="DeclareKeyword",e[e.GetKeyword=139]="GetKeyword",e[e.InferKeyword=140]="InferKeyword",e[e.IntrinsicKeyword=141]="IntrinsicKeyword",e[e.IsKeyword=142]="IsKeyword",e[e.KeyOfKeyword=143]="KeyOfKeyword",e[e.ModuleKeyword=144]="ModuleKeyword",e[e.NamespaceKeyword=145]="NamespaceKeyword",e[e.NeverKeyword=146]="NeverKeyword",e[e.OutKeyword=147]="OutKeyword",e[e.ReadonlyKeyword=148]="ReadonlyKeyword",e[e.RequireKeyword=149]="RequireKeyword",e[e.NumberKeyword=150]="NumberKeyword",e[e.ObjectKeyword=151]="ObjectKeyword",e[e.SatisfiesKeyword=152]="SatisfiesKeyword",e[e.SetKeyword=153]="SetKeyword",e[e.StringKeyword=154]="StringKeyword",e[e.SymbolKeyword=155]="SymbolKeyword",e[e.TypeKeyword=156]="TypeKeyword",e[e.UndefinedKeyword=157]="UndefinedKeyword",e[e.UniqueKeyword=158]="UniqueKeyword",e[e.UnknownKeyword=159]="UnknownKeyword",e[e.UsingKeyword=160]="UsingKeyword",e[e.FromKeyword=161]="FromKeyword",e[e.GlobalKeyword=162]="GlobalKeyword",e[e.BigIntKeyword=163]="BigIntKeyword",e[e.OverrideKeyword=164]="OverrideKeyword",e[e.OfKeyword=165]="OfKeyword",e[e.QualifiedName=166]="QualifiedName",e[e.ComputedPropertyName=167]="ComputedPropertyName",e[e.TypeParameter=168]="TypeParameter",e[e.Parameter=169]="Parameter",e[e.Decorator=170]="Decorator",e[e.PropertySignature=171]="PropertySignature",e[e.PropertyDeclaration=172]="PropertyDeclaration",e[e.MethodSignature=173]="MethodSignature",e[e.MethodDeclaration=174]="MethodDeclaration",e[e.ClassStaticBlockDeclaration=175]="ClassStaticBlockDeclaration",e[e.Constructor=176]="Constructor",e[e.GetAccessor=177]="GetAccessor",e[e.SetAccessor=178]="SetAccessor",e[e.CallSignature=179]="CallSignature",e[e.ConstructSignature=180]="ConstructSignature",e[e.IndexSignature=181]="IndexSignature",e[e.TypePredicate=182]="TypePredicate",e[e.TypeReference=183]="TypeReference",e[e.FunctionType=184]="FunctionType",e[e.ConstructorType=185]="ConstructorType",e[e.TypeQuery=186]="TypeQuery",e[e.TypeLiteral=187]="TypeLiteral",e[e.ArrayType=188]="ArrayType",e[e.TupleType=189]="TupleType",e[e.OptionalType=190]="OptionalType",e[e.RestType=191]="RestType",e[e.UnionType=192]="UnionType",e[e.IntersectionType=193]="IntersectionType",e[e.ConditionalType=194]="ConditionalType",e[e.InferType=195]="InferType",e[e.ParenthesizedType=196]="ParenthesizedType",e[e.ThisType=197]="ThisType",e[e.TypeOperator=198]="TypeOperator",e[e.IndexedAccessType=199]="IndexedAccessType",e[e.MappedType=200]="MappedType",e[e.LiteralType=201]="LiteralType",e[e.NamedTupleMember=202]="NamedTupleMember",e[e.TemplateLiteralType=203]="TemplateLiteralType",e[e.TemplateLiteralTypeSpan=204]="TemplateLiteralTypeSpan",e[e.ImportType=205]="ImportType",e[e.ObjectBindingPattern=206]="ObjectBindingPattern",e[e.ArrayBindingPattern=207]="ArrayBindingPattern",e[e.BindingElement=208]="BindingElement",e[e.ArrayLiteralExpression=209]="ArrayLiteralExpression",e[e.ObjectLiteralExpression=210]="ObjectLiteralExpression",e[e.PropertyAccessExpression=211]="PropertyAccessExpression",e[e.ElementAccessExpression=212]="ElementAccessExpression",e[e.CallExpression=213]="CallExpression",e[e.NewExpression=214]="NewExpression",e[e.TaggedTemplateExpression=215]="TaggedTemplateExpression",e[e.TypeAssertionExpression=216]="TypeAssertionExpression",e[e.ParenthesizedExpression=217]="ParenthesizedExpression",e[e.FunctionExpression=218]="FunctionExpression",e[e.ArrowFunction=219]="ArrowFunction",e[e.DeleteExpression=220]="DeleteExpression",e[e.TypeOfExpression=221]="TypeOfExpression",e[e.VoidExpression=222]="VoidExpression",e[e.AwaitExpression=223]="AwaitExpression",e[e.PrefixUnaryExpression=224]="PrefixUnaryExpression",e[e.PostfixUnaryExpression=225]="PostfixUnaryExpression",e[e.BinaryExpression=226]="BinaryExpression",e[e.ConditionalExpression=227]="ConditionalExpression",e[e.TemplateExpression=228]="TemplateExpression",e[e.YieldExpression=229]="YieldExpression",e[e.SpreadElement=230]="SpreadElement",e[e.ClassExpression=231]="ClassExpression",e[e.OmittedExpression=232]="OmittedExpression",e[e.ExpressionWithTypeArguments=233]="ExpressionWithTypeArguments",e[e.AsExpression=234]="AsExpression",e[e.NonNullExpression=235]="NonNullExpression",e[e.MetaProperty=236]="MetaProperty",e[e.SyntheticExpression=237]="SyntheticExpression",e[e.SatisfiesExpression=238]="SatisfiesExpression",e[e.TemplateSpan=239]="TemplateSpan",e[e.SemicolonClassElement=240]="SemicolonClassElement",e[e.Block=241]="Block",e[e.EmptyStatement=242]="EmptyStatement",e[e.VariableStatement=243]="VariableStatement",e[e.ExpressionStatement=244]="ExpressionStatement",e[e.IfStatement=245]="IfStatement",e[e.DoStatement=246]="DoStatement",e[e.WhileStatement=247]="WhileStatement",e[e.ForStatement=248]="ForStatement",e[e.ForInStatement=249]="ForInStatement",e[e.ForOfStatement=250]="ForOfStatement",e[e.ContinueStatement=251]="ContinueStatement",e[e.BreakStatement=252]="BreakStatement",e[e.ReturnStatement=253]="ReturnStatement",e[e.WithStatement=254]="WithStatement",e[e.SwitchStatement=255]="SwitchStatement",e[e.LabeledStatement=256]="LabeledStatement",e[e.ThrowStatement=257]="ThrowStatement",e[e.TryStatement=258]="TryStatement",e[e.DebuggerStatement=259]="DebuggerStatement",e[e.VariableDeclaration=260]="VariableDeclaration",e[e.VariableDeclarationList=261]="VariableDeclarationList",e[e.FunctionDeclaration=262]="FunctionDeclaration",e[e.ClassDeclaration=263]="ClassDeclaration",e[e.InterfaceDeclaration=264]="InterfaceDeclaration",e[e.TypeAliasDeclaration=265]="TypeAliasDeclaration",e[e.EnumDeclaration=266]="EnumDeclaration",e[e.ModuleDeclaration=267]="ModuleDeclaration",e[e.ModuleBlock=268]="ModuleBlock",e[e.CaseBlock=269]="CaseBlock",e[e.NamespaceExportDeclaration=270]="NamespaceExportDeclaration",e[e.ImportEqualsDeclaration=271]="ImportEqualsDeclaration",e[e.ImportDeclaration=272]="ImportDeclaration",e[e.ImportClause=273]="ImportClause",e[e.NamespaceImport=274]="NamespaceImport",e[e.NamedImports=275]="NamedImports",e[e.ImportSpecifier=276]="ImportSpecifier",e[e.ExportAssignment=277]="ExportAssignment",e[e.ExportDeclaration=278]="ExportDeclaration",e[e.NamedExports=279]="NamedExports",e[e.NamespaceExport=280]="NamespaceExport",e[e.ExportSpecifier=281]="ExportSpecifier",e[e.MissingDeclaration=282]="MissingDeclaration",e[e.ExternalModuleReference=283]="ExternalModuleReference",e[e.JsxElement=284]="JsxElement",e[e.JsxSelfClosingElement=285]="JsxSelfClosingElement",e[e.JsxOpeningElement=286]="JsxOpeningElement",e[e.JsxClosingElement=287]="JsxClosingElement",e[e.JsxFragment=288]="JsxFragment",e[e.JsxOpeningFragment=289]="JsxOpeningFragment",e[e.JsxClosingFragment=290]="JsxClosingFragment",e[e.JsxAttribute=291]="JsxAttribute",e[e.JsxAttributes=292]="JsxAttributes",e[e.JsxSpreadAttribute=293]="JsxSpreadAttribute",e[e.JsxExpression=294]="JsxExpression",e[e.JsxNamespacedName=295]="JsxNamespacedName",e[e.CaseClause=296]="CaseClause",e[e.DefaultClause=297]="DefaultClause",e[e.HeritageClause=298]="HeritageClause",e[e.CatchClause=299]="CatchClause",e[e.ImportAttributes=300]="ImportAttributes",e[e.ImportAttribute=301]="ImportAttribute",e[e.AssertClause=300]="AssertClause",e[e.AssertEntry=301]="AssertEntry",e[e.ImportTypeAssertionContainer=302]="ImportTypeAssertionContainer",e[e.PropertyAssignment=303]="PropertyAssignment",e[e.ShorthandPropertyAssignment=304]="ShorthandPropertyAssignment",e[e.SpreadAssignment=305]="SpreadAssignment",e[e.EnumMember=306]="EnumMember",e[e.SourceFile=307]="SourceFile",e[e.Bundle=308]="Bundle",e[e.JSDocTypeExpression=309]="JSDocTypeExpression",e[e.JSDocNameReference=310]="JSDocNameReference",e[e.JSDocMemberName=311]="JSDocMemberName",e[e.JSDocAllType=312]="JSDocAllType",e[e.JSDocUnknownType=313]="JSDocUnknownType",e[e.JSDocNullableType=314]="JSDocNullableType",e[e.JSDocNonNullableType=315]="JSDocNonNullableType",e[e.JSDocOptionalType=316]="JSDocOptionalType",e[e.JSDocFunctionType=317]="JSDocFunctionType",e[e.JSDocVariadicType=318]="JSDocVariadicType",e[e.JSDocNamepathType=319]="JSDocNamepathType",e[e.JSDoc=320]="JSDoc",e[e.JSDocComment=320]="JSDocComment",e[e.JSDocText=321]="JSDocText",e[e.JSDocTypeLiteral=322]="JSDocTypeLiteral",e[e.JSDocSignature=323]="JSDocSignature",e[e.JSDocLink=324]="JSDocLink",e[e.JSDocLinkCode=325]="JSDocLinkCode",e[e.JSDocLinkPlain=326]="JSDocLinkPlain",e[e.JSDocTag=327]="JSDocTag",e[e.JSDocAugmentsTag=328]="JSDocAugmentsTag",e[e.JSDocImplementsTag=329]="JSDocImplementsTag",e[e.JSDocAuthorTag=330]="JSDocAuthorTag",e[e.JSDocDeprecatedTag=331]="JSDocDeprecatedTag",e[e.JSDocClassTag=332]="JSDocClassTag",e[e.JSDocPublicTag=333]="JSDocPublicTag",e[e.JSDocPrivateTag=334]="JSDocPrivateTag",e[e.JSDocProtectedTag=335]="JSDocProtectedTag",e[e.JSDocReadonlyTag=336]="JSDocReadonlyTag",e[e.JSDocOverrideTag=337]="JSDocOverrideTag",e[e.JSDocCallbackTag=338]="JSDocCallbackTag",e[e.JSDocOverloadTag=339]="JSDocOverloadTag",e[e.JSDocEnumTag=340]="JSDocEnumTag",e[e.JSDocParameterTag=341]="JSDocParameterTag",e[e.JSDocReturnTag=342]="JSDocReturnTag",e[e.JSDocThisTag=343]="JSDocThisTag",e[e.JSDocTypeTag=344]="JSDocTypeTag",e[e.JSDocTemplateTag=345]="JSDocTemplateTag",e[e.JSDocTypedefTag=346]="JSDocTypedefTag",e[e.JSDocSeeTag=347]="JSDocSeeTag",e[e.JSDocPropertyTag=348]="JSDocPropertyTag",e[e.JSDocThrowsTag=349]="JSDocThrowsTag",e[e.JSDocSatisfiesTag=350]="JSDocSatisfiesTag",e[e.JSDocImportTag=351]="JSDocImportTag",e[e.SyntaxList=352]="SyntaxList",e[e.NotEmittedStatement=353]="NotEmittedStatement",e[e.NotEmittedTypeElement=354]="NotEmittedTypeElement",e[e.PartiallyEmittedExpression=355]="PartiallyEmittedExpression",e[e.CommaListExpression=356]="CommaListExpression",e[e.SyntheticReferenceExpression=357]="SyntheticReferenceExpression",e[e.Count=358]="Count",e[e.FirstAssignment=64]="FirstAssignment",e[e.LastAssignment=79]="LastAssignment",e[e.FirstCompoundAssignment=65]="FirstCompoundAssignment",e[e.LastCompoundAssignment=79]="LastCompoundAssignment",e[e.FirstReservedWord=83]="FirstReservedWord",e[e.LastReservedWord=118]="LastReservedWord",e[e.FirstKeyword=83]="FirstKeyword",e[e.LastKeyword=165]="LastKeyword",e[e.FirstFutureReservedWord=119]="FirstFutureReservedWord",e[e.LastFutureReservedWord=127]="LastFutureReservedWord",e[e.FirstTypeNode=182]="FirstTypeNode",e[e.LastTypeNode=205]="LastTypeNode",e[e.FirstPunctuation=19]="FirstPunctuation",e[e.LastPunctuation=79]="LastPunctuation",e[e.FirstToken=0]="FirstToken",e[e.LastToken=165]="LastToken",e[e.FirstTriviaToken=2]="FirstTriviaToken",e[e.LastTriviaToken=7]="LastTriviaToken",e[e.FirstLiteralToken=9]="FirstLiteralToken",e[e.LastLiteralToken=15]="LastLiteralToken",e[e.FirstTemplateToken=15]="FirstTemplateToken",e[e.LastTemplateToken=18]="LastTemplateToken",e[e.FirstBinaryOperator=30]="FirstBinaryOperator",e[e.LastBinaryOperator=79]="LastBinaryOperator",e[e.FirstStatement=243]="FirstStatement",e[e.LastStatement=259]="LastStatement",e[e.FirstNode=166]="FirstNode",e[e.FirstJSDocNode=309]="FirstJSDocNode",e[e.LastJSDocNode=351]="LastJSDocNode",e[e.FirstJSDocTagNode=327]="FirstJSDocTagNode",e[e.LastJSDocTagNode=351]="LastJSDocTagNode",e[e.FirstContextualKeyword=128]="FirstContextualKeyword",e[e.LastContextualKeyword=165]="LastContextualKeyword",e))(Ie||{}),on=(e=>(e[e.None=0]="None",e[e.Let=1]="Let",e[e.Const=2]="Const",e[e.Using=4]="Using",e[e.AwaitUsing=6]="AwaitUsing",e[e.NestedNamespace=8]="NestedNamespace",e[e.Synthesized=16]="Synthesized",e[e.Namespace=32]="Namespace",e[e.OptionalChain=64]="OptionalChain",e[e.ExportContext=128]="ExportContext",e[e.ContainsThis=256]="ContainsThis",e[e.HasImplicitReturn=512]="HasImplicitReturn",e[e.HasExplicitReturn=1024]="HasExplicitReturn",e[e.GlobalAugmentation=2048]="GlobalAugmentation",e[e.HasAsyncFunctions=4096]="HasAsyncFunctions",e[e.DisallowInContext=8192]="DisallowInContext",e[e.YieldContext=16384]="YieldContext",e[e.DecoratorContext=32768]="DecoratorContext",e[e.AwaitContext=65536]="AwaitContext",e[e.DisallowConditionalTypesContext=131072]="DisallowConditionalTypesContext",e[e.ThisNodeHasError=262144]="ThisNodeHasError",e[e.JavaScriptFile=524288]="JavaScriptFile",e[e.ThisNodeOrAnySubNodesHasError=1048576]="ThisNodeOrAnySubNodesHasError",e[e.HasAggregatedChildData=2097152]="HasAggregatedChildData",e[e.PossiblyContainsDynamicImport=4194304]="PossiblyContainsDynamicImport",e[e.PossiblyContainsImportMeta=8388608]="PossiblyContainsImportMeta",e[e.JSDoc=16777216]="JSDoc",e[e.Ambient=33554432]="Ambient",e[e.InWithStatement=67108864]="InWithStatement",e[e.JsonFile=134217728]="JsonFile",e[e.TypeCached=268435456]="TypeCached",e[e.Deprecated=536870912]="Deprecated",e[e.BlockScoped=7]="BlockScoped",e[e.Constant=6]="Constant",e[e.ReachabilityCheckFlags=1536]="ReachabilityCheckFlags",e[e.ReachabilityAndEmitFlags=5632]="ReachabilityAndEmitFlags",e[e.ContextFlags=101441536]="ContextFlags",e[e.TypeExcludesFlags=81920]="TypeExcludesFlags",e[e.PermanentlySetIncrementalFlags=12582912]="PermanentlySetIncrementalFlags",e[e.IdentifierHasExtendedUnicodeEscape=256]="IdentifierHasExtendedUnicodeEscape",e[e.IdentifierIsInJSDocNamespace=4096]="IdentifierIsInJSDocNamespace",e))(on||{}),Kp=(e=>(e[e.None=0]="None",e[e.Public=1]="Public",e[e.Private=2]="Private",e[e.Protected=4]="Protected",e[e.Readonly=8]="Readonly",e[e.Override=16]="Override",e[e.Export=32]="Export",e[e.Abstract=64]="Abstract",e[e.Ambient=128]="Ambient",e[e.Static=256]="Static",e[e.Accessor=512]="Accessor",e[e.Async=1024]="Async",e[e.Default=2048]="Default",e[e.Const=4096]="Const",e[e.In=8192]="In",e[e.Out=16384]="Out",e[e.Decorator=32768]="Decorator",e[e.Deprecated=65536]="Deprecated",e[e.JSDocPublic=8388608]="JSDocPublic",e[e.JSDocPrivate=16777216]="JSDocPrivate",e[e.JSDocProtected=33554432]="JSDocProtected",e[e.JSDocReadonly=67108864]="JSDocReadonly",e[e.JSDocOverride=134217728]="JSDocOverride",e[e.SyntacticOrJSDocModifiers=31]="SyntacticOrJSDocModifiers",e[e.SyntacticOnlyModifiers=65504]="SyntacticOnlyModifiers",e[e.SyntacticModifiers=65535]="SyntacticModifiers",e[e.JSDocCacheOnlyModifiers=260046848]="JSDocCacheOnlyModifiers",e[e.JSDocOnlyModifiers=65536]="JSDocOnlyModifiers",e[e.NonCacheOnlyModifiers=131071]="NonCacheOnlyModifiers",e[e.HasComputedJSDocModifiers=268435456]="HasComputedJSDocModifiers",e[e.HasComputedFlags=536870912]="HasComputedFlags",e[e.AccessibilityModifier=7]="AccessibilityModifier",e[e.ParameterPropertyModifier=31]="ParameterPropertyModifier",e[e.NonPublicAccessibilityModifier=6]="NonPublicAccessibilityModifier",e[e.TypeScriptModifier=28895]="TypeScriptModifier",e[e.ExportDefault=2080]="ExportDefault",e[e.All=131071]="All",e[e.Modifier=98303]="Modifier",e))(Kp||{});var Dm=(e=>(e[e.None=0]="None",e[e.Succeeded=1]="Succeeded",e[e.Failed=2]="Failed",e[e.ReportsUnmeasurable=8]="ReportsUnmeasurable",e[e.ReportsUnreliable=16]="ReportsUnreliable",e[e.ReportsMask=24]="ReportsMask",e[e.ComplexityOverflow=32]="ComplexityOverflow",e[e.StackDepthOverflow=64]="StackDepthOverflow",e[e.Overflow=96]="Overflow",e))(Dm||{});var Mp=(e=>(e[e.Unreachable=1]="Unreachable",e[e.Start=2]="Start",e[e.BranchLabel=4]="BranchLabel",e[e.LoopLabel=8]="LoopLabel",e[e.Assignment=16]="Assignment",e[e.TrueCondition=32]="TrueCondition",e[e.FalseCondition=64]="FalseCondition",e[e.SwitchClause=128]="SwitchClause",e[e.ArrayMutation=256]="ArrayMutation",e[e.Call=512]="Call",e[e.ReduceLabel=1024]="ReduceLabel",e[e.Referenced=2048]="Referenced",e[e.Shared=4096]="Shared",e[e.Label=12]="Label",e[e.Condition=96]="Condition",e))(Mp||{});var Zp=(e=>(e[e.None=0]="None",e[e.FunctionScopedVariable=1]="FunctionScopedVariable",e[e.BlockScopedVariable=2]="BlockScopedVariable",e[e.Property=4]="Property",e[e.EnumMember=8]="EnumMember",e[e.Function=16]="Function",e[e.Class=32]="Class",e[e.Interface=64]="Interface",e[e.ConstEnum=128]="ConstEnum",e[e.RegularEnum=256]="RegularEnum",e[e.ValueModule=512]="ValueModule",e[e.NamespaceModule=1024]="NamespaceModule",e[e.TypeLiteral=2048]="TypeLiteral",e[e.ObjectLiteral=4096]="ObjectLiteral",e[e.Method=8192]="Method",e[e.Constructor=16384]="Constructor",e[e.GetAccessor=32768]="GetAccessor",e[e.SetAccessor=65536]="SetAccessor",e[e.Signature=131072]="Signature",e[e.TypeParameter=262144]="TypeParameter",e[e.TypeAlias=524288]="TypeAlias",e[e.ExportValue=1048576]="ExportValue",e[e.Alias=2097152]="Alias",e[e.Prototype=4194304]="Prototype",e[e.ExportStar=8388608]="ExportStar",e[e.Optional=16777216]="Optional",e[e.Transient=33554432]="Transient",e[e.Assignment=67108864]="Assignment",e[e.ModuleExports=134217728]="ModuleExports",e[e.All=-1]="All",e[e.Enum=384]="Enum",e[e.Variable=3]="Variable",e[e.Value=111551]="Value",e[e.Type=788968]="Type",e[e.Namespace=1920]="Namespace",e[e.Module=1536]="Module",e[e.Accessor=98304]="Accessor",e[e.FunctionScopedVariableExcludes=111550]="FunctionScopedVariableExcludes",e[e.BlockScopedVariableExcludes=111551]="BlockScopedVariableExcludes",e[e.ParameterExcludes=111551]="ParameterExcludes",e[e.PropertyExcludes=0]="PropertyExcludes",e[e.EnumMemberExcludes=900095]="EnumMemberExcludes",e[e.FunctionExcludes=110991]="FunctionExcludes",e[e.ClassExcludes=899503]="ClassExcludes",e[e.InterfaceExcludes=788872]="InterfaceExcludes",e[e.RegularEnumExcludes=899327]="RegularEnumExcludes",e[e.ConstEnumExcludes=899967]="ConstEnumExcludes",e[e.ValueModuleExcludes=110735]="ValueModuleExcludes",e[e.NamespaceModuleExcludes=0]="NamespaceModuleExcludes",e[e.MethodExcludes=103359]="MethodExcludes",e[e.GetAccessorExcludes=46015]="GetAccessorExcludes",e[e.SetAccessorExcludes=78783]="SetAccessorExcludes",e[e.AccessorExcludes=13247]="AccessorExcludes",e[e.TypeParameterExcludes=526824]="TypeParameterExcludes",e[e.TypeAliasExcludes=788968]="TypeAliasExcludes",e[e.AliasExcludes=2097152]="AliasExcludes",e[e.ModuleMember=2623475]="ModuleMember",e[e.ExportHasLocal=944]="ExportHasLocal",e[e.BlockScoped=418]="BlockScoped",e[e.PropertyOrAccessor=98308]="PropertyOrAccessor",e[e.ClassMember=106500]="ClassMember",e[e.ExportSupportsDefaultModifier=112]="ExportSupportsDefaultModifier",e[e.ExportDoesNotSupportDefaultModifier=-113]="ExportDoesNotSupportDefaultModifier",e[e.Classifiable=2885600]="Classifiable",e[e.LateBindingContainer=6256]="LateBindingContainer",e))(Zp||{});var Pm=(e=>(e[e.None=0]="None",e[e.TypeChecked=1]="TypeChecked",e[e.LexicalThis=2]="LexicalThis",e[e.CaptureThis=4]="CaptureThis",e[e.CaptureNewTarget=8]="CaptureNewTarget",e[e.SuperInstance=16]="SuperInstance",e[e.SuperStatic=32]="SuperStatic",e[e.ContextChecked=64]="ContextChecked",e[e.MethodWithSuperPropertyAccessInAsync=128]="MethodWithSuperPropertyAccessInAsync",e[e.MethodWithSuperPropertyAssignmentInAsync=256]="MethodWithSuperPropertyAssignmentInAsync",e[e.CaptureArguments=512]="CaptureArguments",e[e.EnumValuesComputed=1024]="EnumValuesComputed",e[e.LexicalModuleMergesWithClass=2048]="LexicalModuleMergesWithClass",e[e.LoopWithCapturedBlockScopedBinding=4096]="LoopWithCapturedBlockScopedBinding",e[e.ContainsCapturedBlockScopeBinding=8192]="ContainsCapturedBlockScopeBinding",e[e.CapturedBlockScopedBinding=16384]="CapturedBlockScopedBinding",e[e.BlockScopedBindingInLoop=32768]="BlockScopedBindingInLoop",e[e.NeedsLoopOutParameter=65536]="NeedsLoopOutParameter",e[e.AssignmentsMarked=131072]="AssignmentsMarked",e[e.ContainsConstructorReference=262144]="ContainsConstructorReference",e[e.ConstructorReference=536870912]="ConstructorReference",e[e.ContainsClassWithPrivateIdentifiers=1048576]="ContainsClassWithPrivateIdentifiers",e[e.ContainsSuperPropertyInStaticInitializer=2097152]="ContainsSuperPropertyInStaticInitializer",e[e.InCheckIdentifier=4194304]="InCheckIdentifier",e[e.PartiallyTypeChecked=8388608]="PartiallyTypeChecked",e[e.LazyFlags=539358128]="LazyFlags",e))(Pm||{}),nn=(e=>(e[e.Any=1]="Any",e[e.Unknown=2]="Unknown",e[e.String=4]="String",e[e.Number=8]="Number",e[e.Boolean=16]="Boolean",e[e.Enum=32]="Enum",e[e.BigInt=64]="BigInt",e[e.StringLiteral=128]="StringLiteral",e[e.NumberLiteral=256]="NumberLiteral",e[e.BooleanLiteral=512]="BooleanLiteral",e[e.EnumLiteral=1024]="EnumLiteral",e[e.BigIntLiteral=2048]="BigIntLiteral",e[e.ESSymbol=4096]="ESSymbol",e[e.UniqueESSymbol=8192]="UniqueESSymbol",e[e.Void=16384]="Void",e[e.Undefined=32768]="Undefined",e[e.Null=65536]="Null",e[e.Never=131072]="Never",e[e.TypeParameter=262144]="TypeParameter",e[e.Object=524288]="Object",e[e.Union=1048576]="Union",e[e.Intersection=2097152]="Intersection",e[e.Index=4194304]="Index",e[e.IndexedAccess=8388608]="IndexedAccess",e[e.Conditional=16777216]="Conditional",e[e.Substitution=33554432]="Substitution",e[e.NonPrimitive=67108864]="NonPrimitive",e[e.TemplateLiteral=134217728]="TemplateLiteral",e[e.StringMapping=268435456]="StringMapping",e[e.Reserved1=536870912]="Reserved1",e[e.Reserved2=1073741824]="Reserved2",e[e.AnyOrUnknown=3]="AnyOrUnknown",e[e.Nullable=98304]="Nullable",e[e.Literal=2944]="Literal",e[e.Unit=109472]="Unit",e[e.Freshable=2976]="Freshable",e[e.StringOrNumberLiteral=384]="StringOrNumberLiteral",e[e.StringOrNumberLiteralOrUnique=8576]="StringOrNumberLiteralOrUnique",e[e.DefinitelyFalsy=117632]="DefinitelyFalsy",e[e.PossiblyFalsy=117724]="PossiblyFalsy",e[e.Intrinsic=67359327]="Intrinsic",e[e.StringLike=402653316]="StringLike",e[e.NumberLike=296]="NumberLike",e[e.BigIntLike=2112]="BigIntLike",e[e.BooleanLike=528]="BooleanLike",e[e.EnumLike=1056]="EnumLike",e[e.ESSymbolLike=12288]="ESSymbolLike",e[e.VoidLike=49152]="VoidLike",e[e.Primitive=402784252]="Primitive",e[e.DefinitelyNonNullable=470302716]="DefinitelyNonNullable",e[e.DisjointDomains=469892092]="DisjointDomains",e[e.UnionOrIntersection=3145728]="UnionOrIntersection",e[e.StructuredType=3670016]="StructuredType",e[e.TypeVariable=8650752]="TypeVariable",e[e.InstantiableNonPrimitive=58982400]="InstantiableNonPrimitive",e[e.InstantiablePrimitive=406847488]="InstantiablePrimitive",e[e.Instantiable=465829888]="Instantiable",e[e.StructuredOrInstantiable=469499904]="StructuredOrInstantiable",e[e.ObjectFlagsType=3899393]="ObjectFlagsType",e[e.Simplifiable=25165824]="Simplifiable",e[e.Singleton=67358815]="Singleton",e[e.Narrowable=536624127]="Narrowable",e[e.IncludesMask=473694207]="IncludesMask",e[e.IncludesMissingType=262144]="IncludesMissingType",e[e.IncludesNonWideningType=4194304]="IncludesNonWideningType",e[e.IncludesWildcard=8388608]="IncludesWildcard",e[e.IncludesEmptyObject=16777216]="IncludesEmptyObject",e[e.IncludesInstantiable=33554432]="IncludesInstantiable",e[e.IncludesConstrainedTypeVariable=536870912]="IncludesConstrainedTypeVariable",e[e.IncludesError=1073741824]="IncludesError",e[e.NotPrimitiveUnion=36323331]="NotPrimitiveUnion",e))(nn||{}),ef=(e=>(e[e.None=0]="None",e[e.Class=1]="Class",e[e.Interface=2]="Interface",e[e.Reference=4]="Reference",e[e.Tuple=8]="Tuple",e[e.Anonymous=16]="Anonymous",e[e.Mapped=32]="Mapped",e[e.Instantiated=64]="Instantiated",e[e.ObjectLiteral=128]="ObjectLiteral",e[e.EvolvingArray=256]="EvolvingArray",e[e.ObjectLiteralPatternWithComputedProperties=512]="ObjectLiteralPatternWithComputedProperties",e[e.ReverseMapped=1024]="ReverseMapped",e[e.JsxAttributes=2048]="JsxAttributes",e[e.JSLiteral=4096]="JSLiteral",e[e.FreshLiteral=8192]="FreshLiteral",e[e.ArrayLiteral=16384]="ArrayLiteral",e[e.PrimitiveUnion=32768]="PrimitiveUnion",e[e.ContainsWideningType=65536]="ContainsWideningType",e[e.ContainsObjectOrArrayLiteral=131072]="ContainsObjectOrArrayLiteral",e[e.NonInferrableType=262144]="NonInferrableType",e[e.CouldContainTypeVariablesComputed=524288]="CouldContainTypeVariablesComputed",e[e.CouldContainTypeVariables=1048576]="CouldContainTypeVariables",e[e.ClassOrInterface=3]="ClassOrInterface",e[e.RequiresWidening=196608]="RequiresWidening",e[e.PropagatingFlags=458752]="PropagatingFlags",e[e.InstantiatedMapped=96]="InstantiatedMapped",e[e.ObjectTypeKindMask=1343]="ObjectTypeKindMask",e[e.ContainsSpread=2097152]="ContainsSpread",e[e.ObjectRestType=4194304]="ObjectRestType",e[e.InstantiationExpressionType=8388608]="InstantiationExpressionType",e[e.SingleSignatureType=134217728]="SingleSignatureType",e[e.IsClassInstanceClone=16777216]="IsClassInstanceClone",e[e.IdenticalBaseTypeCalculated=33554432]="IdenticalBaseTypeCalculated",e[e.IdenticalBaseTypeExists=67108864]="IdenticalBaseTypeExists",e[e.IsGenericTypeComputed=2097152]="IsGenericTypeComputed",e[e.IsGenericObjectType=4194304]="IsGenericObjectType",e[e.IsGenericIndexType=8388608]="IsGenericIndexType",e[e.IsGenericType=12582912]="IsGenericType",e[e.ContainsIntersections=16777216]="ContainsIntersections",e[e.IsUnknownLikeUnionComputed=33554432]="IsUnknownLikeUnionComputed",e[e.IsUnknownLikeUnion=67108864]="IsUnknownLikeUnion",e[e.IsNeverIntersectionComputed=16777216]="IsNeverIntersectionComputed",e[e.IsNeverIntersection=33554432]="IsNeverIntersection",e[e.IsConstrainedTypeVariable=67108864]="IsConstrainedTypeVariable",e))(ef||{});var Nm=(e=>(e[e.None=0]="None",e[e.HasRestParameter=1]="HasRestParameter",e[e.HasLiteralTypes=2]="HasLiteralTypes",e[e.Abstract=4]="Abstract",e[e.IsInnerCallChain=8]="IsInnerCallChain",e[e.IsOuterCallChain=16]="IsOuterCallChain",e[e.IsUntypedSignatureInJSFile=32]="IsUntypedSignatureInJSFile",e[e.IsNonInferrable=64]="IsNonInferrable",e[e.IsSignatureCandidateForOverloadFailure=128]="IsSignatureCandidateForOverloadFailure",e[e.PropagatingFlags=167]="PropagatingFlags",e[e.CallChainFlags=24]="CallChainFlags",e))(Nm||{});var Dr=(e=>(e[e.Unknown=0]="Unknown",e[e.JS=1]="JS",e[e.JSX=2]="JSX",e[e.TS=3]="TS",e[e.TSX=4]="TSX",e[e.External=5]="External",e[e.JSON=6]="JSON",e[e.Deferred=7]="Deferred",e))(Dr||{}),ys=(e=>(e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ES2020=7]="ES2020",e[e.ES2021=8]="ES2021",e[e.ES2022=9]="ES2022",e[e.ES2023=10]="ES2023",e[e.ES2024=11]="ES2024",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest",e))(ys||{}),xl=(e=>(e[e.Standard=0]="Standard",e[e.JSX=1]="JSX",e))(xl||{});var Nn=(e=>(e.Ts=".ts",e.Tsx=".tsx",e.Dts=".d.ts",e.Js=".js",e.Jsx=".jsx",e.Json=".json",e.TsBuildInfo=".tsbuildinfo",e.Mjs=".mjs",e.Mts=".mts",e.Dmts=".d.mts",e.Cjs=".cjs",e.Cts=".cts",e.Dcts=".d.cts",e))(Nn||{}),Im=(e=>(e[e.None=0]="None",e[e.ContainsTypeScript=1]="ContainsTypeScript",e[e.ContainsJsx=2]="ContainsJsx",e[e.ContainsESNext=4]="ContainsESNext",e[e.ContainsES2022=8]="ContainsES2022",e[e.ContainsES2021=16]="ContainsES2021",e[e.ContainsES2020=32]="ContainsES2020",e[e.ContainsES2019=64]="ContainsES2019",e[e.ContainsES2018=128]="ContainsES2018",e[e.ContainsES2017=256]="ContainsES2017",e[e.ContainsES2016=512]="ContainsES2016",e[e.ContainsES2015=1024]="ContainsES2015",e[e.ContainsGenerator=2048]="ContainsGenerator",e[e.ContainsDestructuringAssignment=4096]="ContainsDestructuringAssignment",e[e.ContainsTypeScriptClassSyntax=8192]="ContainsTypeScriptClassSyntax",e[e.ContainsLexicalThis=16384]="ContainsLexicalThis",e[e.ContainsRestOrSpread=32768]="ContainsRestOrSpread",e[e.ContainsObjectRestOrSpread=65536]="ContainsObjectRestOrSpread",e[e.ContainsComputedPropertyName=131072]="ContainsComputedPropertyName",e[e.ContainsBlockScopedBinding=262144]="ContainsBlockScopedBinding",e[e.ContainsBindingPattern=524288]="ContainsBindingPattern",e[e.ContainsYield=1048576]="ContainsYield",e[e.ContainsAwait=2097152]="ContainsAwait",e[e.ContainsHoistedDeclarationOrCompletion=4194304]="ContainsHoistedDeclarationOrCompletion",e[e.ContainsDynamicImport=8388608]="ContainsDynamicImport",e[e.ContainsClassFields=16777216]="ContainsClassFields",e[e.ContainsDecorators=33554432]="ContainsDecorators",e[e.ContainsPossibleTopLevelAwait=67108864]="ContainsPossibleTopLevelAwait",e[e.ContainsLexicalSuper=134217728]="ContainsLexicalSuper",e[e.ContainsUpdateExpressionForIdentifier=268435456]="ContainsUpdateExpressionForIdentifier",e[e.ContainsPrivateIdentifierInExpression=536870912]="ContainsPrivateIdentifierInExpression",e[e.HasComputedFlags=-2147483648]="HasComputedFlags",e[e.AssertTypeScript=1]="AssertTypeScript",e[e.AssertJsx=2]="AssertJsx",e[e.AssertESNext=4]="AssertESNext",e[e.AssertES2022=8]="AssertES2022",e[e.AssertES2021=16]="AssertES2021",e[e.AssertES2020=32]="AssertES2020",e[e.AssertES2019=64]="AssertES2019",e[e.AssertES2018=128]="AssertES2018",e[e.AssertES2017=256]="AssertES2017",e[e.AssertES2016=512]="AssertES2016",e[e.AssertES2015=1024]="AssertES2015",e[e.AssertGenerator=2048]="AssertGenerator",e[e.AssertDestructuringAssignment=4096]="AssertDestructuringAssignment",e[e.OuterExpressionExcludes=-2147483648]="OuterExpressionExcludes",e[e.PropertyAccessExcludes=-2147483648]="PropertyAccessExcludes",e[e.NodeExcludes=-2147483648]="NodeExcludes",e[e.ArrowFunctionExcludes=-2072174592]="ArrowFunctionExcludes",e[e.FunctionExcludes=-1937940480]="FunctionExcludes",e[e.ConstructorExcludes=-1937948672]="ConstructorExcludes",e[e.MethodOrAccessorExcludes=-2005057536]="MethodOrAccessorExcludes",e[e.PropertyExcludes=-2013249536]="PropertyExcludes",e[e.ClassExcludes=-2147344384]="ClassExcludes",e[e.ModuleExcludes=-1941676032]="ModuleExcludes",e[e.TypeExcludes=-2]="TypeExcludes",e[e.ObjectLiteralExcludes=-2147278848]="ObjectLiteralExcludes",e[e.ArrayLiteralOrCallOrNewExcludes=-2147450880]="ArrayLiteralOrCallOrNewExcludes",e[e.VariableDeclarationListExcludes=-2146893824]="VariableDeclarationListExcludes",e[e.ParameterExcludes=-2147483648]="ParameterExcludes",e[e.CatchClauseExcludes=-2147418112]="CatchClauseExcludes",e[e.BindingPatternExcludes=-2147450880]="BindingPatternExcludes",e[e.ContainsLexicalThisOrSuper=134234112]="ContainsLexicalThisOrSuper",e[e.PropertyNamePropagatingFlags=134234112]="PropertyNamePropagatingFlags",e))(Im||{}),Om=(e=>(e[e.TabStop=0]="TabStop",e[e.Placeholder=1]="Placeholder",e[e.Choice=2]="Choice",e[e.Variable=3]="Variable",e))(Om||{}),Mm=(e=>(e[e.None=0]="None",e[e.SingleLine=1]="SingleLine",e[e.MultiLine=2]="MultiLine",e[e.AdviseOnEmitNode=4]="AdviseOnEmitNode",e[e.NoSubstitution=8]="NoSubstitution",e[e.CapturesThis=16]="CapturesThis",e[e.NoLeadingSourceMap=32]="NoLeadingSourceMap",e[e.NoTrailingSourceMap=64]="NoTrailingSourceMap",e[e.NoSourceMap=96]="NoSourceMap",e[e.NoNestedSourceMaps=128]="NoNestedSourceMaps",e[e.NoTokenLeadingSourceMaps=256]="NoTokenLeadingSourceMaps",e[e.NoTokenTrailingSourceMaps=512]="NoTokenTrailingSourceMaps",e[e.NoTokenSourceMaps=768]="NoTokenSourceMaps",e[e.NoLeadingComments=1024]="NoLeadingComments",e[e.NoTrailingComments=2048]="NoTrailingComments",e[e.NoComments=3072]="NoComments",e[e.NoNestedComments=4096]="NoNestedComments",e[e.HelperName=8192]="HelperName",e[e.ExportName=16384]="ExportName",e[e.LocalName=32768]="LocalName",e[e.InternalName=65536]="InternalName",e[e.Indented=131072]="Indented",e[e.NoIndentation=262144]="NoIndentation",e[e.AsyncFunctionBody=524288]="AsyncFunctionBody",e[e.ReuseTempVariableScope=1048576]="ReuseTempVariableScope",e[e.CustomPrologue=2097152]="CustomPrologue",e[e.NoHoisting=4194304]="NoHoisting",e[e.Iterator=8388608]="Iterator",e[e.NoAsciiEscaping=16777216]="NoAsciiEscaping",e))(Mm||{});var Q_={Classes:2,ForOf:2,Generators:2,Iteration:2,SpreadElements:2,RestElements:2,TaggedTemplates:2,DestructuringAssignment:2,BindingPatterns:2,ArrowFunctions:2,BlockScopedVariables:2,ObjectAssign:2,RegularExpressionFlagsUnicode:2,RegularExpressionFlagsSticky:2,Exponentiation:3,AsyncFunctions:4,ForAwaitOf:5,AsyncGenerators:5,AsyncIteration:5,ObjectSpreadRest:5,RegularExpressionFlagsDotAll:5,BindinglessCatch:6,BigInt:7,NullishCoalesce:7,OptionalChaining:7,LogicalAssignment:8,TopLevelAwait:9,ClassFields:9,PrivateNamesAndClassStaticBlocks:9,RegularExpressionFlagsHasIndices:9,ShebangComments:10,RegularExpressionFlagsUnicodeSets:11,UsingAndAwaitUsing:99,ClassAndClassElementDecorators:99};var Jm={reference:{args:[{name:"types",optional:!0,captureSpan:!0},{name:"lib",optional:!0,captureSpan:!0},{name:"path",optional:!0,captureSpan:!0},{name:"no-default-lib",optional:!0},{name:"resolution-mode",optional:!0},{name:"preserve",optional:!0}],kind:1},"amd-dependency":{args:[{name:"path"},{name:"name",optional:!0}],kind:1},"amd-module":{args:[{name:"name"}],kind:1},"ts-check":{kind:2},"ts-nocheck":{kind:2},jsx:{args:[{name:"factory"}],kind:4},jsxfrag:{args:[{name:"factory"}],kind:4},jsximportsource:{args:[{name:"factory"}],kind:4},jsxruntime:{args:[{name:"factory"}],kind:4}},Ga=(e=>(e[e.ParseAll=0]="ParseAll",e[e.ParseNone=1]="ParseNone",e[e.ParseForTypeErrors=2]="ParseForTypeErrors",e[e.ParseForTypeInfo=3]="ParseForTypeInfo",e))(Ga||{});var Ki="/",My="\\",kd="://",Jy=/\\/g;function Ly(e){return e===47||e===92}function jy(e,t){return e.length>t.length&&Dy(e,t)}function tf(e){return e.length>0&&Ly(e.charCodeAt(e.length-1))}function Ed(e){return e>=97&&e<=122||e>=65&&e<=90}function Ry(e,t){let a=e.charCodeAt(t);if(a===58)return t+1;if(a===37&&e.charCodeAt(t+1)===51){let o=e.charCodeAt(t+2);if(o===97||o===65)return t+3}return-1}function Uy(e){if(!e)return 0;let t=e.charCodeAt(0);if(t===47||t===92){if(e.charCodeAt(1)!==t)return 1;let o=e.indexOf(t===47?Ki:My,2);return o<0?e.length:o+1}if(Ed(t)&&e.charCodeAt(1)===58){let o=e.charCodeAt(2);if(o===47||o===92)return 3;if(e.length===2)return 2}let a=e.indexOf(kd);if(a!==-1){let o=a+kd.length,m=e.indexOf(Ki,o);if(m!==-1){let v=e.slice(0,a),A=e.slice(o,m);if(v==="file"&&(A===""||A==="localhost")&&Ed(e.charCodeAt(m+1))){let P=Ry(e,m+2);if(P!==-1){if(e.charCodeAt(P)===47)return~(P+1);if(P===e.length)return~P}}return~(m+1)}return~e.length}return 0}function fl(e){let t=Uy(e);return t<0?~t:t}function Lm(e,t,a){if(e=dl(e),fl(e)===e.length)return"";e=Rm(e);let m=e.slice(Math.max(fl(e),e.lastIndexOf(Ki)+1)),v=t!==void 0&&a!==void 0?jm(m,t,a):void 0;return v?m.slice(0,m.length-v.length):m}function Ad(e,t,a){if(pl(t,".")||(t="."+t),e.length>=t.length&&e.charCodeAt(e.length-t.length)===46){let o=e.slice(e.length-t.length);if(a(o,t))return o}}function By(e,t,a){if(typeof t=="string")return Ad(e,t,a)||"";for(let o of t){let m=Ad(e,o,a);if(m)return m}return""}function jm(e,t,a){if(t)return By(Rm(e),t,a?Qp:ky);let o=Lm(e),m=o.lastIndexOf(".");return m>=0?o.substring(m):""}function qy(e,t){let a=e.substring(0,t),o=e.substring(t).split(Ki);return o.length&&!Yi(o)&&o.pop(),[a,...o]}function zy(e,t=""){return e=Wy(t,e),qy(e,fl(e))}function Fy(e,t){return e.length===0?"":(e[0]&&nf(e[0]))+e.slice(1,t).join(Ki)}function dl(e){return e.includes("\\")?e.replace(Jy,Ki):e}function Vy(e){if(!Xt(e))return[];let t=[e[0]];for(let a=1;a1){if(t[t.length-1]!==".."){t.pop();continue}}else if(t[0])continue}t.push(o)}}return t}function Wy(e,...t){e&&(e=dl(e));for(let a of t)a&&(a=dl(a),!e||fl(a)!==0?e=a:e=nf(e)+a);return e}function Gy(e){if(e=dl(e),!Cd.test(e))return e;let t=e.replace(/\/\.\//g,"/").replace(/^\.\//,"");if(t!==e&&(e=t,!Cd.test(e)))return e;let a=Fy(Vy(zy(e)));return a&&tf(e)?nf(a):a}function Rm(e){return tf(e)?e.substr(0,e.length-1):e}function nf(e){return tf(e)?e:e+Ki}var Cd=/\/\/|(?:^|\/)\.\.?(?:$|\/)/;function r(e,t,a,o,m,v,A){return{code:e,category:t,key:a,message:o,reportsUnnecessary:m,elidedInCompatabilityPyramid:v,reportsDeprecated:A}}var E={Unterminated_string_literal:r(1002,1,"Unterminated_string_literal_1002","Unterminated string literal."),Identifier_expected:r(1003,1,"Identifier_expected_1003","Identifier expected."),_0_expected:r(1005,1,"_0_expected_1005","'{0}' expected."),A_file_cannot_have_a_reference_to_itself:r(1006,1,"A_file_cannot_have_a_reference_to_itself_1006","A file cannot have a reference to itself."),The_parser_expected_to_find_a_1_to_match_the_0_token_here:r(1007,1,"The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007","The parser expected to find a '{1}' to match the '{0}' token here."),Trailing_comma_not_allowed:r(1009,1,"Trailing_comma_not_allowed_1009","Trailing comma not allowed."),Asterisk_Slash_expected:r(1010,1,"Asterisk_Slash_expected_1010","'*/' expected."),An_element_access_expression_should_take_an_argument:r(1011,1,"An_element_access_expression_should_take_an_argument_1011","An element access expression should take an argument."),Unexpected_token:r(1012,1,"Unexpected_token_1012","Unexpected token."),A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma:r(1013,1,"A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013","A rest parameter or binding pattern may not have a trailing comma."),A_rest_parameter_must_be_last_in_a_parameter_list:r(1014,1,"A_rest_parameter_must_be_last_in_a_parameter_list_1014","A rest parameter must be last in a parameter list."),Parameter_cannot_have_question_mark_and_initializer:r(1015,1,"Parameter_cannot_have_question_mark_and_initializer_1015","Parameter cannot have question mark and initializer."),A_required_parameter_cannot_follow_an_optional_parameter:r(1016,1,"A_required_parameter_cannot_follow_an_optional_parameter_1016","A required parameter cannot follow an optional parameter."),An_index_signature_cannot_have_a_rest_parameter:r(1017,1,"An_index_signature_cannot_have_a_rest_parameter_1017","An index signature cannot have a rest parameter."),An_index_signature_parameter_cannot_have_an_accessibility_modifier:r(1018,1,"An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018","An index signature parameter cannot have an accessibility modifier."),An_index_signature_parameter_cannot_have_a_question_mark:r(1019,1,"An_index_signature_parameter_cannot_have_a_question_mark_1019","An index signature parameter cannot have a question mark."),An_index_signature_parameter_cannot_have_an_initializer:r(1020,1,"An_index_signature_parameter_cannot_have_an_initializer_1020","An index signature parameter cannot have an initializer."),An_index_signature_must_have_a_type_annotation:r(1021,1,"An_index_signature_must_have_a_type_annotation_1021","An index signature must have a type annotation."),An_index_signature_parameter_must_have_a_type_annotation:r(1022,1,"An_index_signature_parameter_must_have_a_type_annotation_1022","An index signature parameter must have a type annotation."),readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature:r(1024,1,"readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024","'readonly' modifier can only appear on a property declaration or index signature."),An_index_signature_cannot_have_a_trailing_comma:r(1025,1,"An_index_signature_cannot_have_a_trailing_comma_1025","An index signature cannot have a trailing comma."),Accessibility_modifier_already_seen:r(1028,1,"Accessibility_modifier_already_seen_1028","Accessibility modifier already seen."),_0_modifier_must_precede_1_modifier:r(1029,1,"_0_modifier_must_precede_1_modifier_1029","'{0}' modifier must precede '{1}' modifier."),_0_modifier_already_seen:r(1030,1,"_0_modifier_already_seen_1030","'{0}' modifier already seen."),_0_modifier_cannot_appear_on_class_elements_of_this_kind:r(1031,1,"_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031","'{0}' modifier cannot appear on class elements of this kind."),super_must_be_followed_by_an_argument_list_or_member_access:r(1034,1,"super_must_be_followed_by_an_argument_list_or_member_access_1034","'super' must be followed by an argument list or member access."),Only_ambient_modules_can_use_quoted_names:r(1035,1,"Only_ambient_modules_can_use_quoted_names_1035","Only ambient modules can use quoted names."),Statements_are_not_allowed_in_ambient_contexts:r(1036,1,"Statements_are_not_allowed_in_ambient_contexts_1036","Statements are not allowed in ambient contexts."),A_declare_modifier_cannot_be_used_in_an_already_ambient_context:r(1038,1,"A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038","A 'declare' modifier cannot be used in an already ambient context."),Initializers_are_not_allowed_in_ambient_contexts:r(1039,1,"Initializers_are_not_allowed_in_ambient_contexts_1039","Initializers are not allowed in ambient contexts."),_0_modifier_cannot_be_used_in_an_ambient_context:r(1040,1,"_0_modifier_cannot_be_used_in_an_ambient_context_1040","'{0}' modifier cannot be used in an ambient context."),_0_modifier_cannot_be_used_here:r(1042,1,"_0_modifier_cannot_be_used_here_1042","'{0}' modifier cannot be used here."),_0_modifier_cannot_appear_on_a_module_or_namespace_element:r(1044,1,"_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044","'{0}' modifier cannot appear on a module or namespace element."),Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier:r(1046,1,"Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046","Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."),A_rest_parameter_cannot_be_optional:r(1047,1,"A_rest_parameter_cannot_be_optional_1047","A rest parameter cannot be optional."),A_rest_parameter_cannot_have_an_initializer:r(1048,1,"A_rest_parameter_cannot_have_an_initializer_1048","A rest parameter cannot have an initializer."),A_set_accessor_must_have_exactly_one_parameter:r(1049,1,"A_set_accessor_must_have_exactly_one_parameter_1049","A 'set' accessor must have exactly one parameter."),A_set_accessor_cannot_have_an_optional_parameter:r(1051,1,"A_set_accessor_cannot_have_an_optional_parameter_1051","A 'set' accessor cannot have an optional parameter."),A_set_accessor_parameter_cannot_have_an_initializer:r(1052,1,"A_set_accessor_parameter_cannot_have_an_initializer_1052","A 'set' accessor parameter cannot have an initializer."),A_set_accessor_cannot_have_rest_parameter:r(1053,1,"A_set_accessor_cannot_have_rest_parameter_1053","A 'set' accessor cannot have rest parameter."),A_get_accessor_cannot_have_parameters:r(1054,1,"A_get_accessor_cannot_have_parameters_1054","A 'get' accessor cannot have parameters."),Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value:r(1055,1,"Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compa_1055","Type '{0}' is not a valid async function return type in ES5 because it does not refer to a Promise-compatible constructor value."),Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher:r(1056,1,"Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056","Accessors are only available when targeting ECMAScript 5 and higher."),The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:r(1058,1,"The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058","The return type of an async function must either be a valid promise or must not contain a callable 'then' member."),A_promise_must_have_a_then_method:r(1059,1,"A_promise_must_have_a_then_method_1059","A promise must have a 'then' method."),The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback:r(1060,1,"The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060","The first parameter of the 'then' method of a promise must be a callback."),Enum_member_must_have_initializer:r(1061,1,"Enum_member_must_have_initializer_1061","Enum member must have initializer."),Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method:r(1062,1,"Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062","Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."),An_export_assignment_cannot_be_used_in_a_namespace:r(1063,1,"An_export_assignment_cannot_be_used_in_a_namespace_1063","An export assignment cannot be used in a namespace."),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0:r(1064,1,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064","The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type:r(1065,1,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1065","The return type of an async function or method must be the global Promise type."),In_ambient_enum_declarations_member_initializer_must_be_constant_expression:r(1066,1,"In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066","In ambient enum declarations member initializer must be constant expression."),Unexpected_token_A_constructor_method_accessor_or_property_was_expected:r(1068,1,"Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068","Unexpected token. A constructor, method, accessor, or property was expected."),Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces:r(1069,1,"Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069","Unexpected token. A type parameter name was expected without curly braces."),_0_modifier_cannot_appear_on_a_type_member:r(1070,1,"_0_modifier_cannot_appear_on_a_type_member_1070","'{0}' modifier cannot appear on a type member."),_0_modifier_cannot_appear_on_an_index_signature:r(1071,1,"_0_modifier_cannot_appear_on_an_index_signature_1071","'{0}' modifier cannot appear on an index signature."),A_0_modifier_cannot_be_used_with_an_import_declaration:r(1079,1,"A_0_modifier_cannot_be_used_with_an_import_declaration_1079","A '{0}' modifier cannot be used with an import declaration."),Invalid_reference_directive_syntax:r(1084,1,"Invalid_reference_directive_syntax_1084","Invalid 'reference' directive syntax."),_0_modifier_cannot_appear_on_a_constructor_declaration:r(1089,1,"_0_modifier_cannot_appear_on_a_constructor_declaration_1089","'{0}' modifier cannot appear on a constructor declaration."),_0_modifier_cannot_appear_on_a_parameter:r(1090,1,"_0_modifier_cannot_appear_on_a_parameter_1090","'{0}' modifier cannot appear on a parameter."),Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:r(1091,1,"Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091","Only a single variable declaration is allowed in a 'for...in' statement."),Type_parameters_cannot_appear_on_a_constructor_declaration:r(1092,1,"Type_parameters_cannot_appear_on_a_constructor_declaration_1092","Type parameters cannot appear on a constructor declaration."),Type_annotation_cannot_appear_on_a_constructor_declaration:r(1093,1,"Type_annotation_cannot_appear_on_a_constructor_declaration_1093","Type annotation cannot appear on a constructor declaration."),An_accessor_cannot_have_type_parameters:r(1094,1,"An_accessor_cannot_have_type_parameters_1094","An accessor cannot have type parameters."),A_set_accessor_cannot_have_a_return_type_annotation:r(1095,1,"A_set_accessor_cannot_have_a_return_type_annotation_1095","A 'set' accessor cannot have a return type annotation."),An_index_signature_must_have_exactly_one_parameter:r(1096,1,"An_index_signature_must_have_exactly_one_parameter_1096","An index signature must have exactly one parameter."),_0_list_cannot_be_empty:r(1097,1,"_0_list_cannot_be_empty_1097","'{0}' list cannot be empty."),Type_parameter_list_cannot_be_empty:r(1098,1,"Type_parameter_list_cannot_be_empty_1098","Type parameter list cannot be empty."),Type_argument_list_cannot_be_empty:r(1099,1,"Type_argument_list_cannot_be_empty_1099","Type argument list cannot be empty."),Invalid_use_of_0_in_strict_mode:r(1100,1,"Invalid_use_of_0_in_strict_mode_1100","Invalid use of '{0}' in strict mode."),with_statements_are_not_allowed_in_strict_mode:r(1101,1,"with_statements_are_not_allowed_in_strict_mode_1101","'with' statements are not allowed in strict mode."),delete_cannot_be_called_on_an_identifier_in_strict_mode:r(1102,1,"delete_cannot_be_called_on_an_identifier_in_strict_mode_1102","'delete' cannot be called on an identifier in strict mode."),for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:r(1103,1,"for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103","'for await' loops are only allowed within async functions and at the top levels of modules."),A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement:r(1104,1,"A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104","A 'continue' statement can only be used within an enclosing iteration statement."),A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:r(1105,1,"A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105","A 'break' statement can only be used within an enclosing iteration or switch statement."),The_left_hand_side_of_a_for_of_statement_may_not_be_async:r(1106,1,"The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106","The left-hand side of a 'for...of' statement may not be 'async'."),Jump_target_cannot_cross_function_boundary:r(1107,1,"Jump_target_cannot_cross_function_boundary_1107","Jump target cannot cross function boundary."),A_return_statement_can_only_be_used_within_a_function_body:r(1108,1,"A_return_statement_can_only_be_used_within_a_function_body_1108","A 'return' statement can only be used within a function body."),Expression_expected:r(1109,1,"Expression_expected_1109","Expression expected."),Type_expected:r(1110,1,"Type_expected_1110","Type expected."),Private_field_0_must_be_declared_in_an_enclosing_class:r(1111,1,"Private_field_0_must_be_declared_in_an_enclosing_class_1111","Private field '{0}' must be declared in an enclosing class."),A_default_clause_cannot_appear_more_than_once_in_a_switch_statement:r(1113,1,"A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113","A 'default' clause cannot appear more than once in a 'switch' statement."),Duplicate_label_0:r(1114,1,"Duplicate_label_0_1114","Duplicate label '{0}'."),A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement:r(1115,1,"A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115","A 'continue' statement can only jump to a label of an enclosing iteration statement."),A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:r(1116,1,"A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116","A 'break' statement can only jump to a label of an enclosing statement."),An_object_literal_cannot_have_multiple_properties_with_the_same_name:r(1117,1,"An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117","An object literal cannot have multiple properties with the same name."),An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name:r(1118,1,"An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118","An object literal cannot have multiple get/set accessors with the same name."),An_object_literal_cannot_have_property_and_accessor_with_the_same_name:r(1119,1,"An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119","An object literal cannot have property and accessor with the same name."),An_export_assignment_cannot_have_modifiers:r(1120,1,"An_export_assignment_cannot_have_modifiers_1120","An export assignment cannot have modifiers."),Octal_literals_are_not_allowed_Use_the_syntax_0:r(1121,1,"Octal_literals_are_not_allowed_Use_the_syntax_0_1121","Octal literals are not allowed. Use the syntax '{0}'."),Variable_declaration_list_cannot_be_empty:r(1123,1,"Variable_declaration_list_cannot_be_empty_1123","Variable declaration list cannot be empty."),Digit_expected:r(1124,1,"Digit_expected_1124","Digit expected."),Hexadecimal_digit_expected:r(1125,1,"Hexadecimal_digit_expected_1125","Hexadecimal digit expected."),Unexpected_end_of_text:r(1126,1,"Unexpected_end_of_text_1126","Unexpected end of text."),Invalid_character:r(1127,1,"Invalid_character_1127","Invalid character."),Declaration_or_statement_expected:r(1128,1,"Declaration_or_statement_expected_1128","Declaration or statement expected."),Statement_expected:r(1129,1,"Statement_expected_1129","Statement expected."),case_or_default_expected:r(1130,1,"case_or_default_expected_1130","'case' or 'default' expected."),Property_or_signature_expected:r(1131,1,"Property_or_signature_expected_1131","Property or signature expected."),Enum_member_expected:r(1132,1,"Enum_member_expected_1132","Enum member expected."),Variable_declaration_expected:r(1134,1,"Variable_declaration_expected_1134","Variable declaration expected."),Argument_expression_expected:r(1135,1,"Argument_expression_expected_1135","Argument expression expected."),Property_assignment_expected:r(1136,1,"Property_assignment_expected_1136","Property assignment expected."),Expression_or_comma_expected:r(1137,1,"Expression_or_comma_expected_1137","Expression or comma expected."),Parameter_declaration_expected:r(1138,1,"Parameter_declaration_expected_1138","Parameter declaration expected."),Type_parameter_declaration_expected:r(1139,1,"Type_parameter_declaration_expected_1139","Type parameter declaration expected."),Type_argument_expected:r(1140,1,"Type_argument_expected_1140","Type argument expected."),String_literal_expected:r(1141,1,"String_literal_expected_1141","String literal expected."),Line_break_not_permitted_here:r(1142,1,"Line_break_not_permitted_here_1142","Line break not permitted here."),or_expected:r(1144,1,"or_expected_1144","'{' or ';' expected."),or_JSX_element_expected:r(1145,1,"or_JSX_element_expected_1145","'{' or JSX element expected."),Declaration_expected:r(1146,1,"Declaration_expected_1146","Declaration expected."),Import_declarations_in_a_namespace_cannot_reference_a_module:r(1147,1,"Import_declarations_in_a_namespace_cannot_reference_a_module_1147","Import declarations in a namespace cannot reference a module."),Cannot_use_imports_exports_or_module_augmentations_when_module_is_none:r(1148,1,"Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148","Cannot use imports, exports, or module augmentations when '--module' is 'none'."),File_name_0_differs_from_already_included_file_name_1_only_in_casing:r(1149,1,"File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149","File name '{0}' differs from already included file name '{1}' only in casing."),_0_declarations_must_be_initialized:r(1155,1,"_0_declarations_must_be_initialized_1155","'{0}' declarations must be initialized."),_0_declarations_can_only_be_declared_inside_a_block:r(1156,1,"_0_declarations_can_only_be_declared_inside_a_block_1156","'{0}' declarations can only be declared inside a block."),Unterminated_template_literal:r(1160,1,"Unterminated_template_literal_1160","Unterminated template literal."),Unterminated_regular_expression_literal:r(1161,1,"Unterminated_regular_expression_literal_1161","Unterminated regular expression literal."),An_object_member_cannot_be_declared_optional:r(1162,1,"An_object_member_cannot_be_declared_optional_1162","An object member cannot be declared optional."),A_yield_expression_is_only_allowed_in_a_generator_body:r(1163,1,"A_yield_expression_is_only_allowed_in_a_generator_body_1163","A 'yield' expression is only allowed in a generator body."),Computed_property_names_are_not_allowed_in_enums:r(1164,1,"Computed_property_names_are_not_allowed_in_enums_1164","Computed property names are not allowed in enums."),A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:r(1165,1,"A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165","A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type:r(1166,1,"A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166","A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type."),A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:r(1168,1,"A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168","A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:r(1169,1,"A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169","A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:r(1170,1,"A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170","A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_comma_expression_is_not_allowed_in_a_computed_property_name:r(1171,1,"A_comma_expression_is_not_allowed_in_a_computed_property_name_1171","A comma expression is not allowed in a computed property name."),extends_clause_already_seen:r(1172,1,"extends_clause_already_seen_1172","'extends' clause already seen."),extends_clause_must_precede_implements_clause:r(1173,1,"extends_clause_must_precede_implements_clause_1173","'extends' clause must precede 'implements' clause."),Classes_can_only_extend_a_single_class:r(1174,1,"Classes_can_only_extend_a_single_class_1174","Classes can only extend a single class."),implements_clause_already_seen:r(1175,1,"implements_clause_already_seen_1175","'implements' clause already seen."),Interface_declaration_cannot_have_implements_clause:r(1176,1,"Interface_declaration_cannot_have_implements_clause_1176","Interface declaration cannot have 'implements' clause."),Binary_digit_expected:r(1177,1,"Binary_digit_expected_1177","Binary digit expected."),Octal_digit_expected:r(1178,1,"Octal_digit_expected_1178","Octal digit expected."),Unexpected_token_expected:r(1179,1,"Unexpected_token_expected_1179","Unexpected token. '{' expected."),Property_destructuring_pattern_expected:r(1180,1,"Property_destructuring_pattern_expected_1180","Property destructuring pattern expected."),Array_element_destructuring_pattern_expected:r(1181,1,"Array_element_destructuring_pattern_expected_1181","Array element destructuring pattern expected."),A_destructuring_declaration_must_have_an_initializer:r(1182,1,"A_destructuring_declaration_must_have_an_initializer_1182","A destructuring declaration must have an initializer."),An_implementation_cannot_be_declared_in_ambient_contexts:r(1183,1,"An_implementation_cannot_be_declared_in_ambient_contexts_1183","An implementation cannot be declared in ambient contexts."),Modifiers_cannot_appear_here:r(1184,1,"Modifiers_cannot_appear_here_1184","Modifiers cannot appear here."),Merge_conflict_marker_encountered:r(1185,1,"Merge_conflict_marker_encountered_1185","Merge conflict marker encountered."),A_rest_element_cannot_have_an_initializer:r(1186,1,"A_rest_element_cannot_have_an_initializer_1186","A rest element cannot have an initializer."),A_parameter_property_may_not_be_declared_using_a_binding_pattern:r(1187,1,"A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187","A parameter property may not be declared using a binding pattern."),Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement:r(1188,1,"Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188","Only a single variable declaration is allowed in a 'for...of' statement."),The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:r(1189,1,"The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189","The variable declaration of a 'for...in' statement cannot have an initializer."),The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer:r(1190,1,"The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190","The variable declaration of a 'for...of' statement cannot have an initializer."),An_import_declaration_cannot_have_modifiers:r(1191,1,"An_import_declaration_cannot_have_modifiers_1191","An import declaration cannot have modifiers."),Module_0_has_no_default_export:r(1192,1,"Module_0_has_no_default_export_1192","Module '{0}' has no default export."),An_export_declaration_cannot_have_modifiers:r(1193,1,"An_export_declaration_cannot_have_modifiers_1193","An export declaration cannot have modifiers."),Export_declarations_are_not_permitted_in_a_namespace:r(1194,1,"Export_declarations_are_not_permitted_in_a_namespace_1194","Export declarations are not permitted in a namespace."),export_Asterisk_does_not_re_export_a_default:r(1195,1,"export_Asterisk_does_not_re_export_a_default_1195","'export *' does not re-export a default."),Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified:r(1196,1,"Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified_1196","Catch clause variable type annotation must be 'any' or 'unknown' if specified."),Catch_clause_variable_cannot_have_an_initializer:r(1197,1,"Catch_clause_variable_cannot_have_an_initializer_1197","Catch clause variable cannot have an initializer."),An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive:r(1198,1,"An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198","An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."),Unterminated_Unicode_escape_sequence:r(1199,1,"Unterminated_Unicode_escape_sequence_1199","Unterminated Unicode escape sequence."),Line_terminator_not_permitted_before_arrow:r(1200,1,"Line_terminator_not_permitted_before_arrow_1200","Line terminator not permitted before arrow."),Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead:r(1202,1,"Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202",`Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.`),Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead:r(1203,1,"Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203","Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."),Re_exporting_a_type_when_0_is_enabled_requires_using_export_type:r(1205,1,"Re_exporting_a_type_when_0_is_enabled_requires_using_export_type_1205","Re-exporting a type when '{0}' is enabled requires using 'export type'."),Decorators_are_not_valid_here:r(1206,1,"Decorators_are_not_valid_here_1206","Decorators are not valid here."),Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name:r(1207,1,"Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207","Decorators cannot be applied to multiple get/set accessors of the same name."),Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0:r(1209,1,"Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209","Invalid optional chain from new expression. Did you mean to call '{0}()'?"),Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode:r(1210,1,"Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210","Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."),A_class_declaration_without_the_default_modifier_must_have_a_name:r(1211,1,"A_class_declaration_without_the_default_modifier_must_have_a_name_1211","A class declaration without the 'default' modifier must have a name."),Identifier_expected_0_is_a_reserved_word_in_strict_mode:r(1212,1,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212","Identifier expected. '{0}' is a reserved word in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode:r(1213,1,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213","Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode:r(1214,1,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214","Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode."),Invalid_use_of_0_Modules_are_automatically_in_strict_mode:r(1215,1,"Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215","Invalid use of '{0}'. Modules are automatically in strict mode."),Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules:r(1216,1,"Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216","Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."),Export_assignment_is_not_supported_when_module_flag_is_system:r(1218,1,"Export_assignment_is_not_supported_when_module_flag_is_system_1218","Export assignment is not supported when '--module' flag is 'system'."),Generators_are_not_allowed_in_an_ambient_context:r(1221,1,"Generators_are_not_allowed_in_an_ambient_context_1221","Generators are not allowed in an ambient context."),An_overload_signature_cannot_be_declared_as_a_generator:r(1222,1,"An_overload_signature_cannot_be_declared_as_a_generator_1222","An overload signature cannot be declared as a generator."),_0_tag_already_specified:r(1223,1,"_0_tag_already_specified_1223","'{0}' tag already specified."),Signature_0_must_be_a_type_predicate:r(1224,1,"Signature_0_must_be_a_type_predicate_1224","Signature '{0}' must be a type predicate."),Cannot_find_parameter_0:r(1225,1,"Cannot_find_parameter_0_1225","Cannot find parameter '{0}'."),Type_predicate_0_is_not_assignable_to_1:r(1226,1,"Type_predicate_0_is_not_assignable_to_1_1226","Type predicate '{0}' is not assignable to '{1}'."),Parameter_0_is_not_in_the_same_position_as_parameter_1:r(1227,1,"Parameter_0_is_not_in_the_same_position_as_parameter_1_1227","Parameter '{0}' is not in the same position as parameter '{1}'."),A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods:r(1228,1,"A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228","A type predicate is only allowed in return type position for functions and methods."),A_type_predicate_cannot_reference_a_rest_parameter:r(1229,1,"A_type_predicate_cannot_reference_a_rest_parameter_1229","A type predicate cannot reference a rest parameter."),A_type_predicate_cannot_reference_element_0_in_a_binding_pattern:r(1230,1,"A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230","A type predicate cannot reference element '{0}' in a binding pattern."),An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration:r(1231,1,"An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231","An export assignment must be at the top level of a file or module declaration."),An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module:r(1232,1,"An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1232","An import declaration can only be used at the top level of a namespace or module."),An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module:r(1233,1,"An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1233","An export declaration can only be used at the top level of a namespace or module."),An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:r(1234,1,"An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234","An ambient module declaration is only allowed at the top level in a file."),A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module:r(1235,1,"A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235","A namespace declaration is only allowed at the top level of a namespace or module."),The_return_type_of_a_property_decorator_function_must_be_either_void_or_any:r(1236,1,"The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236","The return type of a property decorator function must be either 'void' or 'any'."),The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any:r(1237,1,"The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237","The return type of a parameter decorator function must be either 'void' or 'any'."),Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression:r(1238,1,"Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238","Unable to resolve signature of class decorator when called as an expression."),Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression:r(1239,1,"Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239","Unable to resolve signature of parameter decorator when called as an expression."),Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression:r(1240,1,"Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240","Unable to resolve signature of property decorator when called as an expression."),Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression:r(1241,1,"Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241","Unable to resolve signature of method decorator when called as an expression."),abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration:r(1242,1,"abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242","'abstract' modifier can only appear on a class, method, or property declaration."),_0_modifier_cannot_be_used_with_1_modifier:r(1243,1,"_0_modifier_cannot_be_used_with_1_modifier_1243","'{0}' modifier cannot be used with '{1}' modifier."),Abstract_methods_can_only_appear_within_an_abstract_class:r(1244,1,"Abstract_methods_can_only_appear_within_an_abstract_class_1244","Abstract methods can only appear within an abstract class."),Method_0_cannot_have_an_implementation_because_it_is_marked_abstract:r(1245,1,"Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245","Method '{0}' cannot have an implementation because it is marked abstract."),An_interface_property_cannot_have_an_initializer:r(1246,1,"An_interface_property_cannot_have_an_initializer_1246","An interface property cannot have an initializer."),A_type_literal_property_cannot_have_an_initializer:r(1247,1,"A_type_literal_property_cannot_have_an_initializer_1247","A type literal property cannot have an initializer."),A_class_member_cannot_have_the_0_keyword:r(1248,1,"A_class_member_cannot_have_the_0_keyword_1248","A class member cannot have the '{0}' keyword."),A_decorator_can_only_decorate_a_method_implementation_not_an_overload:r(1249,1,"A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249","A decorator can only decorate a method implementation, not an overload."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5:r(1250,1,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_1250","Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definitions_are_automatically_in_strict_mode:r(1251,1,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definiti_1251","Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Class definitions are automatically in strict mode."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_automatically_in_strict_mode:r(1252,1,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_au_1252","Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Modules are automatically in strict mode."),Abstract_properties_can_only_appear_within_an_abstract_class:r(1253,1,"Abstract_properties_can_only_appear_within_an_abstract_class_1253","Abstract properties can only appear within an abstract class."),A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference:r(1254,1,"A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254","A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."),A_definite_assignment_assertion_is_not_permitted_in_this_context:r(1255,1,"A_definite_assignment_assertion_is_not_permitted_in_this_context_1255","A definite assignment assertion '!' is not permitted in this context."),A_required_element_cannot_follow_an_optional_element:r(1257,1,"A_required_element_cannot_follow_an_optional_element_1257","A required element cannot follow an optional element."),A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration:r(1258,1,"A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258","A default export must be at the top level of a file or module declaration."),Module_0_can_only_be_default_imported_using_the_1_flag:r(1259,1,"Module_0_can_only_be_default_imported_using_the_1_flag_1259","Module '{0}' can only be default-imported using the '{1}' flag"),Keywords_cannot_contain_escape_characters:r(1260,1,"Keywords_cannot_contain_escape_characters_1260","Keywords cannot contain escape characters."),Already_included_file_name_0_differs_from_file_name_1_only_in_casing:r(1261,1,"Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261","Already included file name '{0}' differs from file name '{1}' only in casing."),Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module:r(1262,1,"Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module_1262","Identifier expected. '{0}' is a reserved word at the top-level of a module."),Declarations_with_initializers_cannot_also_have_definite_assignment_assertions:r(1263,1,"Declarations_with_initializers_cannot_also_have_definite_assignment_assertions_1263","Declarations with initializers cannot also have definite assignment assertions."),Declarations_with_definite_assignment_assertions_must_also_have_type_annotations:r(1264,1,"Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264","Declarations with definite assignment assertions must also have type annotations."),A_rest_element_cannot_follow_another_rest_element:r(1265,1,"A_rest_element_cannot_follow_another_rest_element_1265","A rest element cannot follow another rest element."),An_optional_element_cannot_follow_a_rest_element:r(1266,1,"An_optional_element_cannot_follow_a_rest_element_1266","An optional element cannot follow a rest element."),Property_0_cannot_have_an_initializer_because_it_is_marked_abstract:r(1267,1,"Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267","Property '{0}' cannot have an initializer because it is marked abstract."),An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type:r(1268,1,"An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268","An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."),Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled:r(1269,1,"Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled_1269","Cannot use 'export import' on a type or type-only namespace when '{0}' is enabled."),Decorator_function_return_type_0_is_not_assignable_to_type_1:r(1270,1,"Decorator_function_return_type_0_is_not_assignable_to_type_1_1270","Decorator function return type '{0}' is not assignable to type '{1}'."),Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any:r(1271,1,"Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any_1271","Decorator function return type is '{0}' but is expected to be 'void' or 'any'."),A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled:r(1272,1,"A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272","A type referenced in a decorated signature must be imported with 'import type' or a namespace import when 'isolatedModules' and 'emitDecoratorMetadata' are enabled."),_0_modifier_cannot_appear_on_a_type_parameter:r(1273,1,"_0_modifier_cannot_appear_on_a_type_parameter_1273","'{0}' modifier cannot appear on a type parameter"),_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias:r(1274,1,"_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274","'{0}' modifier can only appear on a type parameter of a class, interface or type alias"),accessor_modifier_can_only_appear_on_a_property_declaration:r(1275,1,"accessor_modifier_can_only_appear_on_a_property_declaration_1275","'accessor' modifier can only appear on a property declaration."),An_accessor_property_cannot_be_declared_optional:r(1276,1,"An_accessor_property_cannot_be_declared_optional_1276","An 'accessor' property cannot be declared optional."),_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class:r(1277,1,"_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class_1277","'{0}' modifier can only appear on a type parameter of a function, method or class"),The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0:r(1278,1,"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0_1278","The runtime will invoke the decorator with {1} arguments, but the decorator expects {0}."),The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0:r(1279,1,"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0_1279","The runtime will invoke the decorator with {1} arguments, but the decorator expects at least {0}."),Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement:r(1280,1,"Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to__1280","Namespaces are not allowed in global script files when '{0}' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement."),Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead:r(1281,1,"Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead_1281","Cannot access '{0}' from another file without qualification when '{1}' is enabled. Use '{2}' instead."),An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:r(1282,1,"An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers__1282","An 'export =' declaration must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:r(1283,1,"An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolve_1283","An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:r(1284,1,"An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_1284","An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:r(1285,1,"An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_1285","An 'export default' must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled:r(1286,1,"ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286","ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled."),A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled:r(1287,1,"A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287","A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."),An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled:r(1288,1,"An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288","An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:r(1289,1,"_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1289","'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default:r(1290,1,"_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1290","'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:r(1291,1,"_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1291","'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default:r(1292,1,"_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1292","'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve:r(1293,1,"ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve_1293","ESM syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'."),with_statements_are_not_allowed_in_an_async_function_block:r(1300,1,"with_statements_are_not_allowed_in_an_async_function_block_1300","'with' statements are not allowed in an async function block."),await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:r(1308,1,"await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308","'await' expressions are only allowed within async functions and at the top levels of modules."),The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level:r(1309,1,"The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309","The current file is a CommonJS module and cannot use 'await' at the top level."),Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern:r(1312,1,"Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312","Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."),The_body_of_an_if_statement_cannot_be_the_empty_statement:r(1313,1,"The_body_of_an_if_statement_cannot_be_the_empty_statement_1313","The body of an 'if' statement cannot be the empty statement."),Global_module_exports_may_only_appear_in_module_files:r(1314,1,"Global_module_exports_may_only_appear_in_module_files_1314","Global module exports may only appear in module files."),Global_module_exports_may_only_appear_in_declaration_files:r(1315,1,"Global_module_exports_may_only_appear_in_declaration_files_1315","Global module exports may only appear in declaration files."),Global_module_exports_may_only_appear_at_top_level:r(1316,1,"Global_module_exports_may_only_appear_at_top_level_1316","Global module exports may only appear at top level."),A_parameter_property_cannot_be_declared_using_a_rest_parameter:r(1317,1,"A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317","A parameter property cannot be declared using a rest parameter."),An_abstract_accessor_cannot_have_an_implementation:r(1318,1,"An_abstract_accessor_cannot_have_an_implementation_1318","An abstract accessor cannot have an implementation."),A_default_export_can_only_be_used_in_an_ECMAScript_style_module:r(1319,1,"A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319","A default export can only be used in an ECMAScript-style module."),Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:r(1320,1,"Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320","Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."),Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:r(1321,1,"Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321","Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."),Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:r(1322,1,"Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322","Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."),Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext:r(1323,1,"Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323","Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'."),Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_nodenext_or_preserve:r(1324,1,"Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_nodene_1324","Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'nodenext', or 'preserve'."),Argument_of_dynamic_import_cannot_be_spread_element:r(1325,1,"Argument_of_dynamic_import_cannot_be_spread_element_1325","Argument of dynamic import cannot be spread element."),This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments:r(1326,1,"This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326","This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."),String_literal_with_double_quotes_expected:r(1327,1,"String_literal_with_double_quotes_expected_1327","String literal with double quotes expected."),Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal:r(1328,1,"Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328","Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."),_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0:r(1329,1,"_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329","'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"),A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly:r(1330,1,"A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330","A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'."),A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly:r(1331,1,"A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331","A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'."),A_variable_whose_type_is_a_unique_symbol_type_must_be_const:r(1332,1,"A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332","A variable whose type is a 'unique symbol' type must be 'const'."),unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name:r(1333,1,"unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333","'unique symbol' types may not be used on a variable declaration with a binding name."),unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement:r(1334,1,"unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334","'unique symbol' types are only allowed on variables in a variable statement."),unique_symbol_types_are_not_allowed_here:r(1335,1,"unique_symbol_types_are_not_allowed_here_1335","'unique symbol' types are not allowed here."),An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead:r(1337,1,"An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337","An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."),infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type:r(1338,1,"infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338","'infer' declarations are only permitted in the 'extends' clause of a conditional type."),Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here:r(1339,1,"Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339","Module '{0}' does not refer to a value, but is used as a value here."),Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0:r(1340,1,"Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340","Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"),Class_constructor_may_not_be_an_accessor:r(1341,1,"Class_constructor_may_not_be_an_accessor_1341","Class constructor may not be an accessor."),The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext:r(1343,1,"The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343","The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."),A_label_is_not_allowed_here:r(1344,1,"A_label_is_not_allowed_here_1344","'A label is not allowed here."),An_expression_of_type_void_cannot_be_tested_for_truthiness:r(1345,1,"An_expression_of_type_void_cannot_be_tested_for_truthiness_1345","An expression of type 'void' cannot be tested for truthiness."),This_parameter_is_not_allowed_with_use_strict_directive:r(1346,1,"This_parameter_is_not_allowed_with_use_strict_directive_1346","This parameter is not allowed with 'use strict' directive."),use_strict_directive_cannot_be_used_with_non_simple_parameter_list:r(1347,1,"use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347","'use strict' directive cannot be used with non-simple parameter list."),Non_simple_parameter_declared_here:r(1348,1,"Non_simple_parameter_declared_here_1348","Non-simple parameter declared here."),use_strict_directive_used_here:r(1349,1,"use_strict_directive_used_here_1349","'use strict' directive used here."),Print_the_final_configuration_instead_of_building:r(1350,3,"Print_the_final_configuration_instead_of_building_1350","Print the final configuration instead of building."),An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal:r(1351,1,"An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351","An identifier or keyword cannot immediately follow a numeric literal."),A_bigint_literal_cannot_use_exponential_notation:r(1352,1,"A_bigint_literal_cannot_use_exponential_notation_1352","A bigint literal cannot use exponential notation."),A_bigint_literal_must_be_an_integer:r(1353,1,"A_bigint_literal_must_be_an_integer_1353","A bigint literal must be an integer."),readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types:r(1354,1,"readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354","'readonly' type modifier is only permitted on array and tuple literal types."),A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals:r(1355,1,"A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355","A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals."),Did_you_mean_to_mark_this_function_as_async:r(1356,1,"Did_you_mean_to_mark_this_function_as_async_1356","Did you mean to mark this function as 'async'?"),An_enum_member_name_must_be_followed_by_a_or:r(1357,1,"An_enum_member_name_must_be_followed_by_a_or_1357","An enum member name must be followed by a ',', '=', or '}'."),Tagged_template_expressions_are_not_permitted_in_an_optional_chain:r(1358,1,"Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358","Tagged template expressions are not permitted in an optional chain."),Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:r(1359,1,"Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359","Identifier expected. '{0}' is a reserved word that cannot be used here."),Type_0_does_not_satisfy_the_expected_type_1:r(1360,1,"Type_0_does_not_satisfy_the_expected_type_1_1360","Type '{0}' does not satisfy the expected type '{1}'."),_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type:r(1361,1,"_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361","'{0}' cannot be used as a value because it was imported using 'import type'."),_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type:r(1362,1,"_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362","'{0}' cannot be used as a value because it was exported using 'export type'."),A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both:r(1363,1,"A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363","A type-only import can specify a default import or named bindings, but not both."),Convert_to_type_only_export:r(1364,3,"Convert_to_type_only_export_1364","Convert to type-only export"),Convert_all_re_exported_types_to_type_only_exports:r(1365,3,"Convert_all_re_exported_types_to_type_only_exports_1365","Convert all re-exported types to type-only exports"),Split_into_two_separate_import_declarations:r(1366,3,"Split_into_two_separate_import_declarations_1366","Split into two separate import declarations"),Split_all_invalid_type_only_imports:r(1367,3,"Split_all_invalid_type_only_imports_1367","Split all invalid type-only imports"),Class_constructor_may_not_be_a_generator:r(1368,1,"Class_constructor_may_not_be_a_generator_1368","Class constructor may not be a generator."),Did_you_mean_0:r(1369,3,"Did_you_mean_0_1369","Did you mean '{0}'?"),await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:r(1375,1,"await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375","'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),_0_was_imported_here:r(1376,3,"_0_was_imported_here_1376","'{0}' was imported here."),_0_was_exported_here:r(1377,3,"_0_was_exported_here_1377","'{0}' was exported here."),Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:r(1378,1,"Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378","Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type:r(1379,1,"An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379","An import alias cannot reference a declaration that was exported using 'export type'."),An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type:r(1380,1,"An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380","An import alias cannot reference a declaration that was imported using 'import type'."),Unexpected_token_Did_you_mean_or_rbrace:r(1381,1,"Unexpected_token_Did_you_mean_or_rbrace_1381","Unexpected token. Did you mean `{'}'}` or `}`?"),Unexpected_token_Did_you_mean_or_gt:r(1382,1,"Unexpected_token_Did_you_mean_or_gt_1382","Unexpected token. Did you mean `{'>'}` or `>`?"),Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:r(1385,1,"Function_type_notation_must_be_parenthesized_when_used_in_a_union_type_1385","Function type notation must be parenthesized when used in a union type."),Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type:r(1386,1,"Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type_1386","Constructor type notation must be parenthesized when used in a union type."),Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:r(1387,1,"Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387","Function type notation must be parenthesized when used in an intersection type."),Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:r(1388,1,"Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1388","Constructor type notation must be parenthesized when used in an intersection type."),_0_is_not_allowed_as_a_variable_declaration_name:r(1389,1,"_0_is_not_allowed_as_a_variable_declaration_name_1389","'{0}' is not allowed as a variable declaration name."),_0_is_not_allowed_as_a_parameter_name:r(1390,1,"_0_is_not_allowed_as_a_parameter_name_1390","'{0}' is not allowed as a parameter name."),An_import_alias_cannot_use_import_type:r(1392,1,"An_import_alias_cannot_use_import_type_1392","An import alias cannot use 'import type'"),Imported_via_0_from_file_1:r(1393,3,"Imported_via_0_from_file_1_1393","Imported via {0} from file '{1}'"),Imported_via_0_from_file_1_with_packageId_2:r(1394,3,"Imported_via_0_from_file_1_with_packageId_2_1394","Imported via {0} from file '{1}' with packageId '{2}'"),Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions:r(1395,3,"Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions_1395","Imported via {0} from file '{1}' to import 'importHelpers' as specified in compilerOptions"),Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions:r(1396,3,"Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396","Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"),Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions:r(1397,3,"Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397","Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"),Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions:r(1398,3,"Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398","Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"),File_is_included_via_import_here:r(1399,3,"File_is_included_via_import_here_1399","File is included via import here."),Referenced_via_0_from_file_1:r(1400,3,"Referenced_via_0_from_file_1_1400","Referenced via '{0}' from file '{1}'"),File_is_included_via_reference_here:r(1401,3,"File_is_included_via_reference_here_1401","File is included via reference here."),Type_library_referenced_via_0_from_file_1:r(1402,3,"Type_library_referenced_via_0_from_file_1_1402","Type library referenced via '{0}' from file '{1}'"),Type_library_referenced_via_0_from_file_1_with_packageId_2:r(1403,3,"Type_library_referenced_via_0_from_file_1_with_packageId_2_1403","Type library referenced via '{0}' from file '{1}' with packageId '{2}'"),File_is_included_via_type_library_reference_here:r(1404,3,"File_is_included_via_type_library_reference_here_1404","File is included via type library reference here."),Library_referenced_via_0_from_file_1:r(1405,3,"Library_referenced_via_0_from_file_1_1405","Library referenced via '{0}' from file '{1}'"),File_is_included_via_library_reference_here:r(1406,3,"File_is_included_via_library_reference_here_1406","File is included via library reference here."),Matched_by_include_pattern_0_in_1:r(1407,3,"Matched_by_include_pattern_0_in_1_1407","Matched by include pattern '{0}' in '{1}'"),File_is_matched_by_include_pattern_specified_here:r(1408,3,"File_is_matched_by_include_pattern_specified_here_1408","File is matched by include pattern specified here."),Part_of_files_list_in_tsconfig_json:r(1409,3,"Part_of_files_list_in_tsconfig_json_1409","Part of 'files' list in tsconfig.json"),File_is_matched_by_files_list_specified_here:r(1410,3,"File_is_matched_by_files_list_specified_here_1410","File is matched by 'files' list specified here."),Output_from_referenced_project_0_included_because_1_specified:r(1411,3,"Output_from_referenced_project_0_included_because_1_specified_1411","Output from referenced project '{0}' included because '{1}' specified"),Output_from_referenced_project_0_included_because_module_is_specified_as_none:r(1412,3,"Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412","Output from referenced project '{0}' included because '--module' is specified as 'none'"),File_is_output_from_referenced_project_specified_here:r(1413,3,"File_is_output_from_referenced_project_specified_here_1413","File is output from referenced project specified here."),Source_from_referenced_project_0_included_because_1_specified:r(1414,3,"Source_from_referenced_project_0_included_because_1_specified_1414","Source from referenced project '{0}' included because '{1}' specified"),Source_from_referenced_project_0_included_because_module_is_specified_as_none:r(1415,3,"Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415","Source from referenced project '{0}' included because '--module' is specified as 'none'"),File_is_source_from_referenced_project_specified_here:r(1416,3,"File_is_source_from_referenced_project_specified_here_1416","File is source from referenced project specified here."),Entry_point_of_type_library_0_specified_in_compilerOptions:r(1417,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_1417","Entry point of type library '{0}' specified in compilerOptions"),Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1:r(1418,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418","Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"),File_is_entry_point_of_type_library_specified_here:r(1419,3,"File_is_entry_point_of_type_library_specified_here_1419","File is entry point of type library specified here."),Entry_point_for_implicit_type_library_0:r(1420,3,"Entry_point_for_implicit_type_library_0_1420","Entry point for implicit type library '{0}'"),Entry_point_for_implicit_type_library_0_with_packageId_1:r(1421,3,"Entry_point_for_implicit_type_library_0_with_packageId_1_1421","Entry point for implicit type library '{0}' with packageId '{1}'"),Library_0_specified_in_compilerOptions:r(1422,3,"Library_0_specified_in_compilerOptions_1422","Library '{0}' specified in compilerOptions"),File_is_library_specified_here:r(1423,3,"File_is_library_specified_here_1423","File is library specified here."),Default_library:r(1424,3,"Default_library_1424","Default library"),Default_library_for_target_0:r(1425,3,"Default_library_for_target_0_1425","Default library for target '{0}'"),File_is_default_library_for_target_specified_here:r(1426,3,"File_is_default_library_for_target_specified_here_1426","File is default library for target specified here."),Root_file_specified_for_compilation:r(1427,3,"Root_file_specified_for_compilation_1427","Root file specified for compilation"),File_is_output_of_project_reference_source_0:r(1428,3,"File_is_output_of_project_reference_source_0_1428","File is output of project reference source '{0}'"),File_redirects_to_file_0:r(1429,3,"File_redirects_to_file_0_1429","File redirects to file '{0}'"),The_file_is_in_the_program_because_Colon:r(1430,3,"The_file_is_in_the_program_because_Colon_1430","The file is in the program because:"),for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:r(1431,1,"for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431","'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:r(1432,1,"Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432","Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters:r(1433,1,"Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters_1433","Neither decorators nor modifiers may be applied to 'this' parameters."),Unexpected_keyword_or_identifier:r(1434,1,"Unexpected_keyword_or_identifier_1434","Unexpected keyword or identifier."),Unknown_keyword_or_identifier_Did_you_mean_0:r(1435,1,"Unknown_keyword_or_identifier_Did_you_mean_0_1435","Unknown keyword or identifier. Did you mean '{0}'?"),Decorators_must_precede_the_name_and_all_keywords_of_property_declarations:r(1436,1,"Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436","Decorators must precede the name and all keywords of property declarations."),Namespace_must_be_given_a_name:r(1437,1,"Namespace_must_be_given_a_name_1437","Namespace must be given a name."),Interface_must_be_given_a_name:r(1438,1,"Interface_must_be_given_a_name_1438","Interface must be given a name."),Type_alias_must_be_given_a_name:r(1439,1,"Type_alias_must_be_given_a_name_1439","Type alias must be given a name."),Variable_declaration_not_allowed_at_this_location:r(1440,1,"Variable_declaration_not_allowed_at_this_location_1440","Variable declaration not allowed at this location."),Cannot_start_a_function_call_in_a_type_annotation:r(1441,1,"Cannot_start_a_function_call_in_a_type_annotation_1441","Cannot start a function call in a type annotation."),Expected_for_property_initializer:r(1442,1,"Expected_for_property_initializer_1442","Expected '=' for property initializer."),Module_declaration_names_may_only_use_or_quoted_strings:r(1443,1,"Module_declaration_names_may_only_use_or_quoted_strings_1443",`Module declaration names may only use ' or " quoted strings.`),_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled:r(1448,1,"_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_1448","'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled."),Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed:r(1449,3,"Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449","Preserve unused imported values in the JavaScript output that would otherwise be removed."),Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments:r(1450,3,"Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments_1450","Dynamic imports can only accept a module specifier and an optional set of attributes as arguments"),Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression:r(1451,1,"Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451","Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"),resolution_mode_should_be_either_require_or_import:r(1453,1,"resolution_mode_should_be_either_require_or_import_1453","`resolution-mode` should be either `require` or `import`."),resolution_mode_can_only_be_set_for_type_only_imports:r(1454,1,"resolution_mode_can_only_be_set_for_type_only_imports_1454","`resolution-mode` can only be set for type-only imports."),resolution_mode_is_the_only_valid_key_for_type_import_assertions:r(1455,1,"resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455","`resolution-mode` is the only valid key for type import assertions."),Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require:r(1456,1,"Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456","Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."),Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk:r(1457,3,"Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457","Matched by default include pattern '**/*'"),File_is_ECMAScript_module_because_0_has_field_type_with_value_module:r(1458,3,"File_is_ECMAScript_module_because_0_has_field_type_with_value_module_1458",`File is ECMAScript module because '{0}' has field "type" with value "module"`),File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module:r(1459,3,"File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459",`File is CommonJS module because '{0}' has field "type" whose value is not "module"`),File_is_CommonJS_module_because_0_does_not_have_field_type:r(1460,3,"File_is_CommonJS_module_because_0_does_not_have_field_type_1460",`File is CommonJS module because '{0}' does not have field "type"`),File_is_CommonJS_module_because_package_json_was_not_found:r(1461,3,"File_is_CommonJS_module_because_package_json_was_not_found_1461","File is CommonJS module because 'package.json' was not found"),resolution_mode_is_the_only_valid_key_for_type_import_attributes:r(1463,1,"resolution_mode_is_the_only_valid_key_for_type_import_attributes_1463","'resolution-mode' is the only valid key for type import attributes."),Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require:r(1464,1,"Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1464","Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'."),The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output:r(1470,1,"The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470","The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."),Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead:r(1471,1,"Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471","Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."),catch_or_finally_expected:r(1472,1,"catch_or_finally_expected_1472","'catch' or 'finally' expected."),An_import_declaration_can_only_be_used_at_the_top_level_of_a_module:r(1473,1,"An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473","An import declaration can only be used at the top level of a module."),An_export_declaration_can_only_be_used_at_the_top_level_of_a_module:r(1474,1,"An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474","An export declaration can only be used at the top level of a module."),Control_what_method_is_used_to_detect_module_format_JS_files:r(1475,3,"Control_what_method_is_used_to_detect_module_format_JS_files_1475","Control what method is used to detect module-format JS files."),auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules:r(1476,3,"auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476",'"auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.'),An_instantiation_expression_cannot_be_followed_by_a_property_access:r(1477,1,"An_instantiation_expression_cannot_be_followed_by_a_property_access_1477","An instantiation expression cannot be followed by a property access."),Identifier_or_string_literal_expected:r(1478,1,"Identifier_or_string_literal_expected_1478","Identifier or string literal expected."),The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead:r(1479,1,"The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479",`The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("{0}")' call instead.`),To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module:r(1480,3,"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480",'To convert this file to an ECMAScript module, change its file extension to \'{0}\' or create a local package.json file with `{ "type": "module" }`.'),To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1:r(1481,3,"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481",`To convert this file to an ECMAScript module, change its file extension to '{0}', or add the field \`"type": "module"\` to '{1}'.`),To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0:r(1482,3,"To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482",'To convert this file to an ECMAScript module, add the field `"type": "module"` to \'{0}\'.'),To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module:r(1483,3,"To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483",'To convert this file to an ECMAScript module, create a local package.json file with `{ "type": "module" }`.'),_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:r(1484,1,"_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled_1484","'{0}' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:r(1485,1,"_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimMo_1485","'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),Decorator_used_before_export_here:r(1486,1,"Decorator_used_before_export_here_1486","Decorator used before 'export' here."),Octal_escape_sequences_are_not_allowed_Use_the_syntax_0:r(1487,1,"Octal_escape_sequences_are_not_allowed_Use_the_syntax_0_1487","Octal escape sequences are not allowed. Use the syntax '{0}'."),Escape_sequence_0_is_not_allowed:r(1488,1,"Escape_sequence_0_is_not_allowed_1488","Escape sequence '{0}' is not allowed."),Decimals_with_leading_zeros_are_not_allowed:r(1489,1,"Decimals_with_leading_zeros_are_not_allowed_1489","Decimals with leading zeros are not allowed."),File_appears_to_be_binary:r(1490,1,"File_appears_to_be_binary_1490","File appears to be binary."),_0_modifier_cannot_appear_on_a_using_declaration:r(1491,1,"_0_modifier_cannot_appear_on_a_using_declaration_1491","'{0}' modifier cannot appear on a 'using' declaration."),_0_declarations_may_not_have_binding_patterns:r(1492,1,"_0_declarations_may_not_have_binding_patterns_1492","'{0}' declarations may not have binding patterns."),The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration:r(1493,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493","The left-hand side of a 'for...in' statement cannot be a 'using' declaration."),The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration:r(1494,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494","The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),_0_modifier_cannot_appear_on_an_await_using_declaration:r(1495,1,"_0_modifier_cannot_appear_on_an_await_using_declaration_1495","'{0}' modifier cannot appear on an 'await using' declaration."),Identifier_string_literal_or_number_literal_expected:r(1496,1,"Identifier_string_literal_or_number_literal_expected_1496","Identifier, string literal, or number literal expected."),Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator:r(1497,1,"Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator_1497","Expression must be enclosed in parentheses to be used as a decorator."),Invalid_syntax_in_decorator:r(1498,1,"Invalid_syntax_in_decorator_1498","Invalid syntax in decorator."),Unknown_regular_expression_flag:r(1499,1,"Unknown_regular_expression_flag_1499","Unknown regular expression flag."),Duplicate_regular_expression_flag:r(1500,1,"Duplicate_regular_expression_flag_1500","Duplicate regular expression flag."),This_regular_expression_flag_is_only_available_when_targeting_0_or_later:r(1501,1,"This_regular_expression_flag_is_only_available_when_targeting_0_or_later_1501","This regular expression flag is only available when targeting '{0}' or later."),The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously:r(1502,1,"The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously_1502","The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously."),Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later:r(1503,1,"Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later_1503","Named capturing groups are only available when targeting 'ES2018' or later."),Subpattern_flags_must_be_present_when_there_is_a_minus_sign:r(1504,1,"Subpattern_flags_must_be_present_when_there_is_a_minus_sign_1504","Subpattern flags must be present when there is a minus sign."),Incomplete_quantifier_Digit_expected:r(1505,1,"Incomplete_quantifier_Digit_expected_1505","Incomplete quantifier. Digit expected."),Numbers_out_of_order_in_quantifier:r(1506,1,"Numbers_out_of_order_in_quantifier_1506","Numbers out of order in quantifier."),There_is_nothing_available_for_repetition:r(1507,1,"There_is_nothing_available_for_repetition_1507","There is nothing available for repetition."),Unexpected_0_Did_you_mean_to_escape_it_with_backslash:r(1508,1,"Unexpected_0_Did_you_mean_to_escape_it_with_backslash_1508","Unexpected '{0}'. Did you mean to escape it with backslash?"),This_regular_expression_flag_cannot_be_toggled_within_a_subpattern:r(1509,1,"This_regular_expression_flag_cannot_be_toggled_within_a_subpattern_1509","This regular expression flag cannot be toggled within a subpattern."),k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets:r(1510,1,"k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets_1510","'\\k' must be followed by a capturing group name enclosed in angle brackets."),q_is_only_available_inside_character_class:r(1511,1,"q_is_only_available_inside_character_class_1511","'\\q' is only available inside character class."),c_must_be_followed_by_an_ASCII_letter:r(1512,1,"c_must_be_followed_by_an_ASCII_letter_1512","'\\c' must be followed by an ASCII letter."),Undetermined_character_escape:r(1513,1,"Undetermined_character_escape_1513","Undetermined character escape."),Expected_a_capturing_group_name:r(1514,1,"Expected_a_capturing_group_name_1514","Expected a capturing group name."),Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other:r(1515,1,"Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other_1515","Named capturing groups with the same name must be mutually exclusive to each other."),A_character_class_range_must_not_be_bounded_by_another_character_class:r(1516,1,"A_character_class_range_must_not_be_bounded_by_another_character_class_1516","A character class range must not be bounded by another character class."),Range_out_of_order_in_character_class:r(1517,1,"Range_out_of_order_in_character_class_1517","Range out of order in character class."),Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class:r(1518,1,"Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_characte_1518","Anything that would possibly match more than a single character is invalid inside a negated character class."),Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead:r(1519,1,"Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead_1519","Operators must not be mixed within a character class. Wrap it in a nested class instead."),Expected_a_class_set_operand:r(1520,1,"Expected_a_class_set_operand_1520","Expected a class set operand."),q_must_be_followed_by_string_alternatives_enclosed_in_braces:r(1521,1,"q_must_be_followed_by_string_alternatives_enclosed_in_braces_1521","'\\q' must be followed by string alternatives enclosed in braces."),A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash:r(1522,1,"A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backs_1522","A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash?"),Expected_a_Unicode_property_name:r(1523,1,"Expected_a_Unicode_property_name_1523","Expected a Unicode property name."),Unknown_Unicode_property_name:r(1524,1,"Unknown_Unicode_property_name_1524","Unknown Unicode property name."),Expected_a_Unicode_property_value:r(1525,1,"Expected_a_Unicode_property_value_1525","Expected a Unicode property value."),Unknown_Unicode_property_value:r(1526,1,"Unknown_Unicode_property_value_1526","Unknown Unicode property value."),Expected_a_Unicode_property_name_or_value:r(1527,1,"Expected_a_Unicode_property_name_or_value_1527","Expected a Unicode property name or value."),Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_the_Unicode_Sets_v_flag_is_set:r(1528,1,"Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_t_1528","Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set."),Unknown_Unicode_property_name_or_value:r(1529,1,"Unknown_Unicode_property_name_or_value_1529","Unknown Unicode property name or value."),Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set:r(1530,1,"Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v__1530","Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."),_0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces:r(1531,1,"_0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces_1531","'\\{0}' must be followed by a Unicode property value expression enclosed in braces."),There_is_no_capturing_group_named_0_in_this_regular_expression:r(1532,1,"There_is_no_capturing_group_named_0_in_this_regular_expression_1532","There is no capturing group named '{0}' in this regular expression."),This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_regular_expression:r(1533,1,"This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_r_1533","This backreference refers to a group that does not exist. There are only {0} capturing groups in this regular expression."),This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regular_expression:r(1534,1,"This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regul_1534","This backreference refers to a group that does not exist. There are no capturing groups in this regular expression."),This_character_cannot_be_escaped_in_a_regular_expression:r(1535,1,"This_character_cannot_be_escaped_in_a_regular_expression_1535","This character cannot be escaped in a regular expression."),Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead:r(1536,1,"Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended__1536","Octal escape sequences and backreferences are not allowed in a character class. If this was intended as an escape sequence, use the syntax '{0}' instead."),Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class:r(1537,1,"Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_1537","Decimal escape sequences and backreferences are not allowed in a character class."),Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set:r(1538,1,"Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_se_1538","Unicode escape sequences are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."),A_bigint_literal_cannot_be_used_as_a_property_name:r(1539,1,"A_bigint_literal_cannot_be_used_as_a_property_name_1539","A 'bigint' literal cannot be used as a property name."),A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead:r(1540,2,"A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540","A 'namespace' declaration should not be declared using the 'module' keyword. Please use the 'namespace' keyword instead.",void 0,void 0,!0),Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute:r(1541,1,"Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribut_1541","Type-only import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute."),Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute:r(1542,1,"Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute_1542","Type import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute."),Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_module_is_set_to_0:r(1543,1,"Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543",`Importing a JSON file into an ECMAScript module requires a 'type: "json"' import attribute when 'module' is set to '{0}'.`),Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0:r(1544,1,"Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0_1544","Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to '{0}'."),The_types_of_0_are_incompatible_between_these_types:r(2200,1,"The_types_of_0_are_incompatible_between_these_types_2200","The types of '{0}' are incompatible between these types."),The_types_returned_by_0_are_incompatible_between_these_types:r(2201,1,"The_types_returned_by_0_are_incompatible_between_these_types_2201","The types returned by '{0}' are incompatible between these types."),Call_signature_return_types_0_and_1_are_incompatible:r(2202,1,"Call_signature_return_types_0_and_1_are_incompatible_2202","Call signature return types '{0}' and '{1}' are incompatible.",void 0,!0),Construct_signature_return_types_0_and_1_are_incompatible:r(2203,1,"Construct_signature_return_types_0_and_1_are_incompatible_2203","Construct signature return types '{0}' and '{1}' are incompatible.",void 0,!0),Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1:r(2204,1,"Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204","Call signatures with no arguments have incompatible return types '{0}' and '{1}'.",void 0,!0),Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1:r(2205,1,"Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205","Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.",void 0,!0),The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement:r(2206,1,"The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206","The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."),The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement:r(2207,1,"The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207","The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."),This_type_parameter_might_need_an_extends_0_constraint:r(2208,1,"This_type_parameter_might_need_an_extends_0_constraint_2208","This type parameter might need an `extends {0}` constraint."),The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:r(2209,1,"The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209","The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:r(2210,1,"The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210","The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),Add_extends_constraint:r(2211,3,"Add_extends_constraint_2211","Add `extends` constraint."),Add_extends_constraint_to_all_type_parameters:r(2212,3,"Add_extends_constraint_to_all_type_parameters_2212","Add `extends` constraint to all type parameters"),Duplicate_identifier_0:r(2300,1,"Duplicate_identifier_0_2300","Duplicate identifier '{0}'."),Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:r(2301,1,"Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301","Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),Static_members_cannot_reference_class_type_parameters:r(2302,1,"Static_members_cannot_reference_class_type_parameters_2302","Static members cannot reference class type parameters."),Circular_definition_of_import_alias_0:r(2303,1,"Circular_definition_of_import_alias_0_2303","Circular definition of import alias '{0}'."),Cannot_find_name_0:r(2304,1,"Cannot_find_name_0_2304","Cannot find name '{0}'."),Module_0_has_no_exported_member_1:r(2305,1,"Module_0_has_no_exported_member_1_2305","Module '{0}' has no exported member '{1}'."),File_0_is_not_a_module:r(2306,1,"File_0_is_not_a_module_2306","File '{0}' is not a module."),Cannot_find_module_0_or_its_corresponding_type_declarations:r(2307,1,"Cannot_find_module_0_or_its_corresponding_type_declarations_2307","Cannot find module '{0}' or its corresponding type declarations."),Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity:r(2308,1,"Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308","Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."),An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements:r(2309,1,"An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309","An export assignment cannot be used in a module with other exported elements."),Type_0_recursively_references_itself_as_a_base_type:r(2310,1,"Type_0_recursively_references_itself_as_a_base_type_2310","Type '{0}' recursively references itself as a base type."),Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function:r(2311,1,"Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311","Cannot find name '{0}'. Did you mean to write this in an async function?"),An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members:r(2312,1,"An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312","An interface can only extend an object type or intersection of object types with statically known members."),Type_parameter_0_has_a_circular_constraint:r(2313,1,"Type_parameter_0_has_a_circular_constraint_2313","Type parameter '{0}' has a circular constraint."),Generic_type_0_requires_1_type_argument_s:r(2314,1,"Generic_type_0_requires_1_type_argument_s_2314","Generic type '{0}' requires {1} type argument(s)."),Type_0_is_not_generic:r(2315,1,"Type_0_is_not_generic_2315","Type '{0}' is not generic."),Global_type_0_must_be_a_class_or_interface_type:r(2316,1,"Global_type_0_must_be_a_class_or_interface_type_2316","Global type '{0}' must be a class or interface type."),Global_type_0_must_have_1_type_parameter_s:r(2317,1,"Global_type_0_must_have_1_type_parameter_s_2317","Global type '{0}' must have {1} type parameter(s)."),Cannot_find_global_type_0:r(2318,1,"Cannot_find_global_type_0_2318","Cannot find global type '{0}'."),Named_property_0_of_types_1_and_2_are_not_identical:r(2319,1,"Named_property_0_of_types_1_and_2_are_not_identical_2319","Named property '{0}' of types '{1}' and '{2}' are not identical."),Interface_0_cannot_simultaneously_extend_types_1_and_2:r(2320,1,"Interface_0_cannot_simultaneously_extend_types_1_and_2_2320","Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."),Excessive_stack_depth_comparing_types_0_and_1:r(2321,1,"Excessive_stack_depth_comparing_types_0_and_1_2321","Excessive stack depth comparing types '{0}' and '{1}'."),Type_0_is_not_assignable_to_type_1:r(2322,1,"Type_0_is_not_assignable_to_type_1_2322","Type '{0}' is not assignable to type '{1}'."),Cannot_redeclare_exported_variable_0:r(2323,1,"Cannot_redeclare_exported_variable_0_2323","Cannot redeclare exported variable '{0}'."),Property_0_is_missing_in_type_1:r(2324,1,"Property_0_is_missing_in_type_1_2324","Property '{0}' is missing in type '{1}'."),Property_0_is_private_in_type_1_but_not_in_type_2:r(2325,1,"Property_0_is_private_in_type_1_but_not_in_type_2_2325","Property '{0}' is private in type '{1}' but not in type '{2}'."),Types_of_property_0_are_incompatible:r(2326,1,"Types_of_property_0_are_incompatible_2326","Types of property '{0}' are incompatible."),Property_0_is_optional_in_type_1_but_required_in_type_2:r(2327,1,"Property_0_is_optional_in_type_1_but_required_in_type_2_2327","Property '{0}' is optional in type '{1}' but required in type '{2}'."),Types_of_parameters_0_and_1_are_incompatible:r(2328,1,"Types_of_parameters_0_and_1_are_incompatible_2328","Types of parameters '{0}' and '{1}' are incompatible."),Index_signature_for_type_0_is_missing_in_type_1:r(2329,1,"Index_signature_for_type_0_is_missing_in_type_1_2329","Index signature for type '{0}' is missing in type '{1}'."),_0_and_1_index_signatures_are_incompatible:r(2330,1,"_0_and_1_index_signatures_are_incompatible_2330","'{0}' and '{1}' index signatures are incompatible."),this_cannot_be_referenced_in_a_module_or_namespace_body:r(2331,1,"this_cannot_be_referenced_in_a_module_or_namespace_body_2331","'this' cannot be referenced in a module or namespace body."),this_cannot_be_referenced_in_current_location:r(2332,1,"this_cannot_be_referenced_in_current_location_2332","'this' cannot be referenced in current location."),this_cannot_be_referenced_in_a_static_property_initializer:r(2334,1,"this_cannot_be_referenced_in_a_static_property_initializer_2334","'this' cannot be referenced in a static property initializer."),super_can_only_be_referenced_in_a_derived_class:r(2335,1,"super_can_only_be_referenced_in_a_derived_class_2335","'super' can only be referenced in a derived class."),super_cannot_be_referenced_in_constructor_arguments:r(2336,1,"super_cannot_be_referenced_in_constructor_arguments_2336","'super' cannot be referenced in constructor arguments."),Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors:r(2337,1,"Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337","Super calls are not permitted outside constructors or in nested functions inside constructors."),super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class:r(2338,1,"super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338","'super' property access is permitted only in a constructor, member function, or member accessor of a derived class."),Property_0_does_not_exist_on_type_1:r(2339,1,"Property_0_does_not_exist_on_type_1_2339","Property '{0}' does not exist on type '{1}'."),Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword:r(2340,1,"Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340","Only public and protected methods of the base class are accessible via the 'super' keyword."),Property_0_is_private_and_only_accessible_within_class_1:r(2341,1,"Property_0_is_private_and_only_accessible_within_class_1_2341","Property '{0}' is private and only accessible within class '{1}'."),This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0:r(2343,1,"This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343","This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'."),Type_0_does_not_satisfy_the_constraint_1:r(2344,1,"Type_0_does_not_satisfy_the_constraint_1_2344","Type '{0}' does not satisfy the constraint '{1}'."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1:r(2345,1,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345","Argument of type '{0}' is not assignable to parameter of type '{1}'."),Untyped_function_calls_may_not_accept_type_arguments:r(2347,1,"Untyped_function_calls_may_not_accept_type_arguments_2347","Untyped function calls may not accept type arguments."),Value_of_type_0_is_not_callable_Did_you_mean_to_include_new:r(2348,1,"Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348","Value of type '{0}' is not callable. Did you mean to include 'new'?"),This_expression_is_not_callable:r(2349,1,"This_expression_is_not_callable_2349","This expression is not callable."),Only_a_void_function_can_be_called_with_the_new_keyword:r(2350,1,"Only_a_void_function_can_be_called_with_the_new_keyword_2350","Only a void function can be called with the 'new' keyword."),This_expression_is_not_constructable:r(2351,1,"This_expression_is_not_constructable_2351","This expression is not constructable."),Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first:r(2352,1,"Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352","Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first."),Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1:r(2353,1,"Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353","Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."),This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found:r(2354,1,"This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354","This syntax requires an imported helper but module '{0}' cannot be found."),A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value:r(2355,1,"A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value_2355","A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value."),An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type:r(2356,1,"An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356","An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."),The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access:r(2357,1,"The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357","The operand of an increment or decrement operator must be a variable or a property access."),The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter:r(2358,1,"The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358","The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."),The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method:r(2359,1,"The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_2359","The right-hand side of an 'instanceof' expression must be either of type 'any', a class, function, or other type assignable to the 'Function' interface type, or an object type with a 'Symbol.hasInstance' method."),The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:r(2362,1,"The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362","The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:r(2363,1,"The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363","The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access:r(2364,1,"The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364","The left-hand side of an assignment expression must be a variable or a property access."),Operator_0_cannot_be_applied_to_types_1_and_2:r(2365,1,"Operator_0_cannot_be_applied_to_types_1_and_2_2365","Operator '{0}' cannot be applied to types '{1}' and '{2}'."),Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined:r(2366,1,"Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366","Function lacks ending return statement and return type does not include 'undefined'."),This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap:r(2367,1,"This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367","This comparison appears to be unintentional because the types '{0}' and '{1}' have no overlap."),Type_parameter_name_cannot_be_0:r(2368,1,"Type_parameter_name_cannot_be_0_2368","Type parameter name cannot be '{0}'."),A_parameter_property_is_only_allowed_in_a_constructor_implementation:r(2369,1,"A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369","A parameter property is only allowed in a constructor implementation."),A_rest_parameter_must_be_of_an_array_type:r(2370,1,"A_rest_parameter_must_be_of_an_array_type_2370","A rest parameter must be of an array type."),A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation:r(2371,1,"A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371","A parameter initializer is only allowed in a function or constructor implementation."),Parameter_0_cannot_reference_itself:r(2372,1,"Parameter_0_cannot_reference_itself_2372","Parameter '{0}' cannot reference itself."),Parameter_0_cannot_reference_identifier_1_declared_after_it:r(2373,1,"Parameter_0_cannot_reference_identifier_1_declared_after_it_2373","Parameter '{0}' cannot reference identifier '{1}' declared after it."),Duplicate_index_signature_for_type_0:r(2374,1,"Duplicate_index_signature_for_type_0_2374","Duplicate index signature for type '{0}'."),Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties:r(2375,1,"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375","Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers:r(2376,1,"A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376","A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers."),Constructors_for_derived_classes_must_contain_a_super_call:r(2377,1,"Constructors_for_derived_classes_must_contain_a_super_call_2377","Constructors for derived classes must contain a 'super' call."),A_get_accessor_must_return_a_value:r(2378,1,"A_get_accessor_must_return_a_value_2378","A 'get' accessor must return a value."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties:r(2379,1,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379","Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),Overload_signatures_must_all_be_exported_or_non_exported:r(2383,1,"Overload_signatures_must_all_be_exported_or_non_exported_2383","Overload signatures must all be exported or non-exported."),Overload_signatures_must_all_be_ambient_or_non_ambient:r(2384,1,"Overload_signatures_must_all_be_ambient_or_non_ambient_2384","Overload signatures must all be ambient or non-ambient."),Overload_signatures_must_all_be_public_private_or_protected:r(2385,1,"Overload_signatures_must_all_be_public_private_or_protected_2385","Overload signatures must all be public, private or protected."),Overload_signatures_must_all_be_optional_or_required:r(2386,1,"Overload_signatures_must_all_be_optional_or_required_2386","Overload signatures must all be optional or required."),Function_overload_must_be_static:r(2387,1,"Function_overload_must_be_static_2387","Function overload must be static."),Function_overload_must_not_be_static:r(2388,1,"Function_overload_must_not_be_static_2388","Function overload must not be static."),Function_implementation_name_must_be_0:r(2389,1,"Function_implementation_name_must_be_0_2389","Function implementation name must be '{0}'."),Constructor_implementation_is_missing:r(2390,1,"Constructor_implementation_is_missing_2390","Constructor implementation is missing."),Function_implementation_is_missing_or_not_immediately_following_the_declaration:r(2391,1,"Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391","Function implementation is missing or not immediately following the declaration."),Multiple_constructor_implementations_are_not_allowed:r(2392,1,"Multiple_constructor_implementations_are_not_allowed_2392","Multiple constructor implementations are not allowed."),Duplicate_function_implementation:r(2393,1,"Duplicate_function_implementation_2393","Duplicate function implementation."),This_overload_signature_is_not_compatible_with_its_implementation_signature:r(2394,1,"This_overload_signature_is_not_compatible_with_its_implementation_signature_2394","This overload signature is not compatible with its implementation signature."),Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local:r(2395,1,"Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395","Individual declarations in merged declaration '{0}' must be all exported or all local."),Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters:r(2396,1,"Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396","Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."),Declaration_name_conflicts_with_built_in_global_identifier_0:r(2397,1,"Declaration_name_conflicts_with_built_in_global_identifier_0_2397","Declaration name conflicts with built-in global identifier '{0}'."),constructor_cannot_be_used_as_a_parameter_property_name:r(2398,1,"constructor_cannot_be_used_as_a_parameter_property_name_2398","'constructor' cannot be used as a parameter property name."),Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference:r(2399,1,"Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399","Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."),Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference:r(2400,1,"Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400","Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."),A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers:r(2401,1,"A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401","A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers."),Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference:r(2402,1,"Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402","Expression resolves to '_super' that compiler uses to capture base class reference."),Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2:r(2403,1,"Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403","Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."),The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:r(2404,1,"The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404","The left-hand side of a 'for...in' statement cannot use a type annotation."),The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any:r(2405,1,"The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405","The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."),The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access:r(2406,1,"The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406","The left-hand side of a 'for...in' statement must be a variable or a property access."),The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0:r(2407,1,"The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407","The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."),Setters_cannot_return_a_value:r(2408,1,"Setters_cannot_return_a_value_2408","Setters cannot return a value."),Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class:r(2409,1,"Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409","Return type of constructor signature must be assignable to the instance type of the class."),The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any:r(2410,1,"The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410","The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."),Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target:r(2412,1,"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412","Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."),Property_0_of_type_1_is_not_assignable_to_2_index_type_3:r(2411,1,"Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411","Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."),_0_index_type_1_is_not_assignable_to_2_index_type_3:r(2413,1,"_0_index_type_1_is_not_assignable_to_2_index_type_3_2413","'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."),Class_name_cannot_be_0:r(2414,1,"Class_name_cannot_be_0_2414","Class name cannot be '{0}'."),Class_0_incorrectly_extends_base_class_1:r(2415,1,"Class_0_incorrectly_extends_base_class_1_2415","Class '{0}' incorrectly extends base class '{1}'."),Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2:r(2416,1,"Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416","Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."),Class_static_side_0_incorrectly_extends_base_class_static_side_1:r(2417,1,"Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417","Class static side '{0}' incorrectly extends base class static side '{1}'."),Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1:r(2418,1,"Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418","Type of computed property's value is '{0}', which is not assignable to type '{1}'."),Types_of_construct_signatures_are_incompatible:r(2419,1,"Types_of_construct_signatures_are_incompatible_2419","Types of construct signatures are incompatible."),Class_0_incorrectly_implements_interface_1:r(2420,1,"Class_0_incorrectly_implements_interface_1_2420","Class '{0}' incorrectly implements interface '{1}'."),A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members:r(2422,1,"A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422","A class can only implement an object type or intersection of object types with statically known members."),Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor:r(2423,1,"Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423","Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."),Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function:r(2425,1,"Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425","Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."),Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function:r(2426,1,"Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426","Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."),Interface_name_cannot_be_0:r(2427,1,"Interface_name_cannot_be_0_2427","Interface name cannot be '{0}'."),All_declarations_of_0_must_have_identical_type_parameters:r(2428,1,"All_declarations_of_0_must_have_identical_type_parameters_2428","All declarations of '{0}' must have identical type parameters."),Interface_0_incorrectly_extends_interface_1:r(2430,1,"Interface_0_incorrectly_extends_interface_1_2430","Interface '{0}' incorrectly extends interface '{1}'."),Enum_name_cannot_be_0:r(2431,1,"Enum_name_cannot_be_0_2431","Enum name cannot be '{0}'."),In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element:r(2432,1,"In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432","In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."),A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged:r(2433,1,"A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433","A namespace declaration cannot be in a different file from a class or function with which it is merged."),A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged:r(2434,1,"A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434","A namespace declaration cannot be located prior to a class or function with which it is merged."),Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces:r(2435,1,"Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435","Ambient modules cannot be nested in other modules or namespaces."),Ambient_module_declaration_cannot_specify_relative_module_name:r(2436,1,"Ambient_module_declaration_cannot_specify_relative_module_name_2436","Ambient module declaration cannot specify relative module name."),Module_0_is_hidden_by_a_local_declaration_with_the_same_name:r(2437,1,"Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437","Module '{0}' is hidden by a local declaration with the same name."),Import_name_cannot_be_0:r(2438,1,"Import_name_cannot_be_0_2438","Import name cannot be '{0}'."),Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name:r(2439,1,"Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439","Import or export declaration in an ambient module declaration cannot reference module through relative module name."),Import_declaration_conflicts_with_local_declaration_of_0:r(2440,1,"Import_declaration_conflicts_with_local_declaration_of_0_2440","Import declaration conflicts with local declaration of '{0}'."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module:r(2441,1,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module."),Types_have_separate_declarations_of_a_private_property_0:r(2442,1,"Types_have_separate_declarations_of_a_private_property_0_2442","Types have separate declarations of a private property '{0}'."),Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2:r(2443,1,"Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443","Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."),Property_0_is_protected_in_type_1_but_public_in_type_2:r(2444,1,"Property_0_is_protected_in_type_1_but_public_in_type_2_2444","Property '{0}' is protected in type '{1}' but public in type '{2}'."),Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses:r(2445,1,"Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445","Property '{0}' is protected and only accessible within class '{1}' and its subclasses."),Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2:r(2446,1,"Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446","Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'."),The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead:r(2447,1,"The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447","The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."),Block_scoped_variable_0_used_before_its_declaration:r(2448,1,"Block_scoped_variable_0_used_before_its_declaration_2448","Block-scoped variable '{0}' used before its declaration."),Class_0_used_before_its_declaration:r(2449,1,"Class_0_used_before_its_declaration_2449","Class '{0}' used before its declaration."),Enum_0_used_before_its_declaration:r(2450,1,"Enum_0_used_before_its_declaration_2450","Enum '{0}' used before its declaration."),Cannot_redeclare_block_scoped_variable_0:r(2451,1,"Cannot_redeclare_block_scoped_variable_0_2451","Cannot redeclare block-scoped variable '{0}'."),An_enum_member_cannot_have_a_numeric_name:r(2452,1,"An_enum_member_cannot_have_a_numeric_name_2452","An enum member cannot have a numeric name."),Variable_0_is_used_before_being_assigned:r(2454,1,"Variable_0_is_used_before_being_assigned_2454","Variable '{0}' is used before being assigned."),Type_alias_0_circularly_references_itself:r(2456,1,"Type_alias_0_circularly_references_itself_2456","Type alias '{0}' circularly references itself."),Type_alias_name_cannot_be_0:r(2457,1,"Type_alias_name_cannot_be_0_2457","Type alias name cannot be '{0}'."),An_AMD_module_cannot_have_multiple_name_assignments:r(2458,1,"An_AMD_module_cannot_have_multiple_name_assignments_2458","An AMD module cannot have multiple name assignments."),Module_0_declares_1_locally_but_it_is_not_exported:r(2459,1,"Module_0_declares_1_locally_but_it_is_not_exported_2459","Module '{0}' declares '{1}' locally, but it is not exported."),Module_0_declares_1_locally_but_it_is_exported_as_2:r(2460,1,"Module_0_declares_1_locally_but_it_is_exported_as_2_2460","Module '{0}' declares '{1}' locally, but it is exported as '{2}'."),Type_0_is_not_an_array_type:r(2461,1,"Type_0_is_not_an_array_type_2461","Type '{0}' is not an array type."),A_rest_element_must_be_last_in_a_destructuring_pattern:r(2462,1,"A_rest_element_must_be_last_in_a_destructuring_pattern_2462","A rest element must be last in a destructuring pattern."),A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature:r(2463,1,"A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463","A binding pattern parameter cannot be optional in an implementation signature."),A_computed_property_name_must_be_of_type_string_number_symbol_or_any:r(2464,1,"A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464","A computed property name must be of type 'string', 'number', 'symbol', or 'any'."),this_cannot_be_referenced_in_a_computed_property_name:r(2465,1,"this_cannot_be_referenced_in_a_computed_property_name_2465","'this' cannot be referenced in a computed property name."),super_cannot_be_referenced_in_a_computed_property_name:r(2466,1,"super_cannot_be_referenced_in_a_computed_property_name_2466","'super' cannot be referenced in a computed property name."),A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type:r(2467,1,"A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467","A computed property name cannot reference a type parameter from its containing type."),Cannot_find_global_value_0:r(2468,1,"Cannot_find_global_value_0_2468","Cannot find global value '{0}'."),The_0_operator_cannot_be_applied_to_type_symbol:r(2469,1,"The_0_operator_cannot_be_applied_to_type_symbol_2469","The '{0}' operator cannot be applied to type 'symbol'."),Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher:r(2472,1,"Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472","Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."),Enum_declarations_must_all_be_const_or_non_const:r(2473,1,"Enum_declarations_must_all_be_const_or_non_const_2473","Enum declarations must all be const or non-const."),const_enum_member_initializers_must_be_constant_expressions:r(2474,1,"const_enum_member_initializers_must_be_constant_expressions_2474","const enum member initializers must be constant expressions."),const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query:r(2475,1,"const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475","'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query."),A_const_enum_member_can_only_be_accessed_using_a_string_literal:r(2476,1,"A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476","A const enum member can only be accessed using a string literal."),const_enum_member_initializer_was_evaluated_to_a_non_finite_value:r(2477,1,"const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477","'const' enum member initializer was evaluated to a non-finite value."),const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN:r(2478,1,"const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478","'const' enum member initializer was evaluated to disallowed value 'NaN'."),let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations:r(2480,1,"let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480","'let' is not allowed to be used as a name in 'let' or 'const' declarations."),Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1:r(2481,1,"Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481","Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."),The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation:r(2483,1,"The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483","The left-hand side of a 'for...of' statement cannot use a type annotation."),Export_declaration_conflicts_with_exported_declaration_of_0:r(2484,1,"Export_declaration_conflicts_with_exported_declaration_of_0_2484","Export declaration conflicts with exported declaration of '{0}'."),The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access:r(2487,1,"The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487","The left-hand side of a 'for...of' statement must be a variable or a property access."),Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator:r(2488,1,"Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488","Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."),An_iterator_must_have_a_next_method:r(2489,1,"An_iterator_must_have_a_next_method_2489","An iterator must have a 'next()' method."),The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property:r(2490,1,"The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490","The type returned by the '{0}()' method of an iterator must have a 'value' property."),The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern:r(2491,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491","The left-hand side of a 'for...in' statement cannot be a destructuring pattern."),Cannot_redeclare_identifier_0_in_catch_clause:r(2492,1,"Cannot_redeclare_identifier_0_in_catch_clause_2492","Cannot redeclare identifier '{0}' in catch clause."),Tuple_type_0_of_length_1_has_no_element_at_index_2:r(2493,1,"Tuple_type_0_of_length_1_has_no_element_at_index_2_2493","Tuple type '{0}' of length '{1}' has no element at index '{2}'."),Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher:r(2494,1,"Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494","Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher."),Type_0_is_not_an_array_type_or_a_string_type:r(2495,1,"Type_0_is_not_an_array_type_or_a_string_type_2495","Type '{0}' is not an array type or a string type."),The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_function_expression:r(2496,1,"The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_func_2496","The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression."),This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export:r(2497,1,"This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497","This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export."),Module_0_uses_export_and_cannot_be_used_with_export_Asterisk:r(2498,1,"Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498","Module '{0}' uses 'export =' and cannot be used with 'export *'."),An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments:r(2499,1,"An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499","An interface can only extend an identifier/qualified-name with optional type arguments."),A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments:r(2500,1,"A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500","A class can only implement an identifier/qualified-name with optional type arguments."),A_rest_element_cannot_contain_a_binding_pattern:r(2501,1,"A_rest_element_cannot_contain_a_binding_pattern_2501","A rest element cannot contain a binding pattern."),_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation:r(2502,1,"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502","'{0}' is referenced directly or indirectly in its own type annotation."),Cannot_find_namespace_0:r(2503,1,"Cannot_find_namespace_0_2503","Cannot find namespace '{0}'."),Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:r(2504,1,"Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504","Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator."),A_generator_cannot_have_a_void_type_annotation:r(2505,1,"A_generator_cannot_have_a_void_type_annotation_2505","A generator cannot have a 'void' type annotation."),_0_is_referenced_directly_or_indirectly_in_its_own_base_expression:r(2506,1,"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506","'{0}' is referenced directly or indirectly in its own base expression."),Type_0_is_not_a_constructor_function_type:r(2507,1,"Type_0_is_not_a_constructor_function_type_2507","Type '{0}' is not a constructor function type."),No_base_constructor_has_the_specified_number_of_type_arguments:r(2508,1,"No_base_constructor_has_the_specified_number_of_type_arguments_2508","No base constructor has the specified number of type arguments."),Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members:r(2509,1,"Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509","Base constructor return type '{0}' is not an object type or intersection of object types with statically known members."),Base_constructors_must_all_have_the_same_return_type:r(2510,1,"Base_constructors_must_all_have_the_same_return_type_2510","Base constructors must all have the same return type."),Cannot_create_an_instance_of_an_abstract_class:r(2511,1,"Cannot_create_an_instance_of_an_abstract_class_2511","Cannot create an instance of an abstract class."),Overload_signatures_must_all_be_abstract_or_non_abstract:r(2512,1,"Overload_signatures_must_all_be_abstract_or_non_abstract_2512","Overload signatures must all be abstract or non-abstract."),Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression:r(2513,1,"Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513","Abstract method '{0}' in class '{1}' cannot be accessed via super expression."),A_tuple_type_cannot_be_indexed_with_a_negative_value:r(2514,1,"A_tuple_type_cannot_be_indexed_with_a_negative_value_2514","A tuple type cannot be indexed with a negative value."),Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2:r(2515,1,"Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515","Non-abstract class '{0}' does not implement inherited abstract member {1} from class '{2}'."),All_declarations_of_an_abstract_method_must_be_consecutive:r(2516,1,"All_declarations_of_an_abstract_method_must_be_consecutive_2516","All declarations of an abstract method must be consecutive."),Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type:r(2517,1,"Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517","Cannot assign an abstract constructor type to a non-abstract constructor type."),A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard:r(2518,1,"A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518","A 'this'-based type guard is not compatible with a parameter-based type guard."),An_async_iterator_must_have_a_next_method:r(2519,1,"An_async_iterator_must_have_a_next_method_2519","An async iterator must have a 'next()' method."),Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions:r(2520,1,"Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520","Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."),The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_standard_function_or_method:r(2522,1,"The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_sta_2522","The 'arguments' object cannot be referenced in an async function or method in ES5. Consider using a standard function or method."),yield_expressions_cannot_be_used_in_a_parameter_initializer:r(2523,1,"yield_expressions_cannot_be_used_in_a_parameter_initializer_2523","'yield' expressions cannot be used in a parameter initializer."),await_expressions_cannot_be_used_in_a_parameter_initializer:r(2524,1,"await_expressions_cannot_be_used_in_a_parameter_initializer_2524","'await' expressions cannot be used in a parameter initializer."),A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface:r(2526,1,"A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526","A 'this' type is available only in a non-static member of a class or interface."),The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary:r(2527,1,"The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527","The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."),A_module_cannot_have_multiple_default_exports:r(2528,1,"A_module_cannot_have_multiple_default_exports_2528","A module cannot have multiple default exports."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions:r(2529,1,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions."),Property_0_is_incompatible_with_index_signature:r(2530,1,"Property_0_is_incompatible_with_index_signature_2530","Property '{0}' is incompatible with index signature."),Object_is_possibly_null:r(2531,1,"Object_is_possibly_null_2531","Object is possibly 'null'."),Object_is_possibly_undefined:r(2532,1,"Object_is_possibly_undefined_2532","Object is possibly 'undefined'."),Object_is_possibly_null_or_undefined:r(2533,1,"Object_is_possibly_null_or_undefined_2533","Object is possibly 'null' or 'undefined'."),A_function_returning_never_cannot_have_a_reachable_end_point:r(2534,1,"A_function_returning_never_cannot_have_a_reachable_end_point_2534","A function returning 'never' cannot have a reachable end point."),Type_0_cannot_be_used_to_index_type_1:r(2536,1,"Type_0_cannot_be_used_to_index_type_1_2536","Type '{0}' cannot be used to index type '{1}'."),Type_0_has_no_matching_index_signature_for_type_1:r(2537,1,"Type_0_has_no_matching_index_signature_for_type_1_2537","Type '{0}' has no matching index signature for type '{1}'."),Type_0_cannot_be_used_as_an_index_type:r(2538,1,"Type_0_cannot_be_used_as_an_index_type_2538","Type '{0}' cannot be used as an index type."),Cannot_assign_to_0_because_it_is_not_a_variable:r(2539,1,"Cannot_assign_to_0_because_it_is_not_a_variable_2539","Cannot assign to '{0}' because it is not a variable."),Cannot_assign_to_0_because_it_is_a_read_only_property:r(2540,1,"Cannot_assign_to_0_because_it_is_a_read_only_property_2540","Cannot assign to '{0}' because it is a read-only property."),Index_signature_in_type_0_only_permits_reading:r(2542,1,"Index_signature_in_type_0_only_permits_reading_2542","Index signature in type '{0}' only permits reading."),Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference:r(2543,1,"Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543","Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."),Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference:r(2544,1,"Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544","Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."),A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any:r(2545,1,"A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545","A mixin class must have a constructor with a single rest parameter of type 'any[]'."),The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property:r(2547,1,"The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547","The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property."),Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:r(2548,1,"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548","Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:r(2549,1,"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549","Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later:r(2550,1,"Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_c_2550","Property '{0}' does not exist on type '{1}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{2}' or later."),Property_0_does_not_exist_on_type_1_Did_you_mean_2:r(2551,1,"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"),Cannot_find_name_0_Did_you_mean_1:r(2552,1,"Cannot_find_name_0_Did_you_mean_1_2552","Cannot find name '{0}'. Did you mean '{1}'?"),Computed_values_are_not_permitted_in_an_enum_with_string_valued_members:r(2553,1,"Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553","Computed values are not permitted in an enum with string valued members."),Expected_0_arguments_but_got_1:r(2554,1,"Expected_0_arguments_but_got_1_2554","Expected {0} arguments, but got {1}."),Expected_at_least_0_arguments_but_got_1:r(2555,1,"Expected_at_least_0_arguments_but_got_1_2555","Expected at least {0} arguments, but got {1}."),A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter:r(2556,1,"A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556","A spread argument must either have a tuple type or be passed to a rest parameter."),Expected_0_type_arguments_but_got_1:r(2558,1,"Expected_0_type_arguments_but_got_1_2558","Expected {0} type arguments, but got {1}."),Type_0_has_no_properties_in_common_with_type_1:r(2559,1,"Type_0_has_no_properties_in_common_with_type_1_2559","Type '{0}' has no properties in common with type '{1}'."),Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it:r(2560,1,"Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560","Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"),Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2:r(2561,1,"Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561","Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"),Base_class_expressions_cannot_reference_class_type_parameters:r(2562,1,"Base_class_expressions_cannot_reference_class_type_parameters_2562","Base class expressions cannot reference class type parameters."),The_containing_function_or_module_body_is_too_large_for_control_flow_analysis:r(2563,1,"The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563","The containing function or module body is too large for control flow analysis."),Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor:r(2564,1,"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564","Property '{0}' has no initializer and is not definitely assigned in the constructor."),Property_0_is_used_before_being_assigned:r(2565,1,"Property_0_is_used_before_being_assigned_2565","Property '{0}' is used before being assigned."),A_rest_element_cannot_have_a_property_name:r(2566,1,"A_rest_element_cannot_have_a_property_name_2566","A rest element cannot have a property name."),Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations:r(2567,1,"Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567","Enum declarations can only merge with namespace or other enum declarations."),Property_0_may_not_exist_on_type_1_Did_you_mean_2:r(2568,1,"Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568","Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"),Could_not_find_name_0_Did_you_mean_1:r(2570,1,"Could_not_find_name_0_Did_you_mean_1_2570","Could not find name '{0}'. Did you mean '{1}'?"),Object_is_of_type_unknown:r(2571,1,"Object_is_of_type_unknown_2571","Object is of type 'unknown'."),A_rest_element_type_must_be_an_array_type:r(2574,1,"A_rest_element_type_must_be_an_array_type_2574","A rest element type must be an array type."),No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments:r(2575,1,"No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575","No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."),Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead:r(2576,1,"Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576","Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?"),Return_type_annotation_circularly_references_itself:r(2577,1,"Return_type_annotation_circularly_references_itself_2577","Return type annotation circularly references itself."),Unused_ts_expect_error_directive:r(2578,1,"Unused_ts_expect_error_directive_2578","Unused '@ts-expect-error' directive."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode:r(2580,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2580","Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery:r(2581,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2581","Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha:r(2582,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2582","Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`."),Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later:r(2583,1,"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583","Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later."),Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom:r(2584,1,"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584","Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later:r(2585,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585","'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later."),Cannot_assign_to_0_because_it_is_a_constant:r(2588,1,"Cannot_assign_to_0_because_it_is_a_constant_2588","Cannot assign to '{0}' because it is a constant."),Type_instantiation_is_excessively_deep_and_possibly_infinite:r(2589,1,"Type_instantiation_is_excessively_deep_and_possibly_infinite_2589","Type instantiation is excessively deep and possibly infinite."),Expression_produces_a_union_type_that_is_too_complex_to_represent:r(2590,1,"Expression_produces_a_union_type_that_is_too_complex_to_represent_2590","Expression produces a union type that is too complex to represent."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig:r(2591,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2591","Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig:r(2592,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2592","Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig:r(2593,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2593","Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig."),This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag:r(2594,1,"This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag_2594","This module is declared with 'export =', and can only be used with a default import when using the '{0}' flag."),_0_can_only_be_imported_by_using_a_default_import:r(2595,1,"_0_can_only_be_imported_by_using_a_default_import_2595","'{0}' can only be imported by using a default import."),_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:r(2596,1,"_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import_2596","'{0}' can only be imported by turning on the 'esModuleInterop' flag and using a default import."),_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import:r(2597,1,"_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import_2597","'{0}' can only be imported by using a 'require' call or by using a default import."),_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:r(2598,1,"_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using__2598","'{0}' can only be imported by using a 'require' call or by turning on the 'esModuleInterop' flag and using a default import."),JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist:r(2602,1,"JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602","JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."),Property_0_in_type_1_is_not_assignable_to_type_2:r(2603,1,"Property_0_in_type_1_is_not_assignable_to_type_2_2603","Property '{0}' in type '{1}' is not assignable to type '{2}'."),JSX_element_type_0_does_not_have_any_construct_or_call_signatures:r(2604,1,"JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604","JSX element type '{0}' does not have any construct or call signatures."),Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property:r(2606,1,"Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606","Property '{0}' of JSX spread attribute is not assignable to target property."),JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property:r(2607,1,"JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607","JSX element class does not support attributes because it does not have a '{0}' property."),The_global_type_JSX_0_may_not_have_more_than_one_property:r(2608,1,"The_global_type_JSX_0_may_not_have_more_than_one_property_2608","The global type 'JSX.{0}' may not have more than one property."),JSX_spread_child_must_be_an_array_type:r(2609,1,"JSX_spread_child_must_be_an_array_type_2609","JSX spread child must be an array type."),_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property:r(2610,1,"_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610","'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."),_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor:r(2611,1,"_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611","'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."),Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration:r(2612,1,"Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612","Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."),Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead:r(2613,1,"Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613","Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"),Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead:r(2614,1,"Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614","Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"),Type_of_property_0_circularly_references_itself_in_mapped_type_1:r(2615,1,"Type_of_property_0_circularly_references_itself_in_mapped_type_1_2615","Type of property '{0}' circularly references itself in mapped type '{1}'."),_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import:r(2616,1,"_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import_2616","'{0}' can only be imported by using 'import {1} = require({2})' or a default import."),_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:r(2617,1,"_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_us_2617","'{0}' can only be imported by using 'import {1} = require({2})' or by turning on the 'esModuleInterop' flag and using a default import."),Source_has_0_element_s_but_target_requires_1:r(2618,1,"Source_has_0_element_s_but_target_requires_1_2618","Source has {0} element(s) but target requires {1}."),Source_has_0_element_s_but_target_allows_only_1:r(2619,1,"Source_has_0_element_s_but_target_allows_only_1_2619","Source has {0} element(s) but target allows only {1}."),Target_requires_0_element_s_but_source_may_have_fewer:r(2620,1,"Target_requires_0_element_s_but_source_may_have_fewer_2620","Target requires {0} element(s) but source may have fewer."),Target_allows_only_0_element_s_but_source_may_have_more:r(2621,1,"Target_allows_only_0_element_s_but_source_may_have_more_2621","Target allows only {0} element(s) but source may have more."),Source_provides_no_match_for_required_element_at_position_0_in_target:r(2623,1,"Source_provides_no_match_for_required_element_at_position_0_in_target_2623","Source provides no match for required element at position {0} in target."),Source_provides_no_match_for_variadic_element_at_position_0_in_target:r(2624,1,"Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624","Source provides no match for variadic element at position {0} in target."),Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target:r(2625,1,"Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625","Variadic element at position {0} in source does not match element at position {1} in target."),Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target:r(2626,1,"Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626","Type at position {0} in source is not compatible with type at position {1} in target."),Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target:r(2627,1,"Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627","Type at positions {0} through {1} in source is not compatible with type at position {2} in target."),Cannot_assign_to_0_because_it_is_an_enum:r(2628,1,"Cannot_assign_to_0_because_it_is_an_enum_2628","Cannot assign to '{0}' because it is an enum."),Cannot_assign_to_0_because_it_is_a_class:r(2629,1,"Cannot_assign_to_0_because_it_is_a_class_2629","Cannot assign to '{0}' because it is a class."),Cannot_assign_to_0_because_it_is_a_function:r(2630,1,"Cannot_assign_to_0_because_it_is_a_function_2630","Cannot assign to '{0}' because it is a function."),Cannot_assign_to_0_because_it_is_a_namespace:r(2631,1,"Cannot_assign_to_0_because_it_is_a_namespace_2631","Cannot assign to '{0}' because it is a namespace."),Cannot_assign_to_0_because_it_is_an_import:r(2632,1,"Cannot_assign_to_0_because_it_is_an_import_2632","Cannot assign to '{0}' because it is an import."),JSX_property_access_expressions_cannot_include_JSX_namespace_names:r(2633,1,"JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633","JSX property access expressions cannot include JSX namespace names"),_0_index_signatures_are_incompatible:r(2634,1,"_0_index_signatures_are_incompatible_2634","'{0}' index signatures are incompatible."),Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable:r(2635,1,"Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635","Type '{0}' has no signatures for which the type argument list is applicable."),Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation:r(2636,1,"Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation_2636","Type '{0}' is not assignable to type '{1}' as implied by variance annotation."),Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types:r(2637,1,"Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637","Variance annotations are only supported in type aliases for object, function, constructor, and mapped types."),Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator:r(2638,1,"Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638","Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."),React_components_cannot_include_JSX_namespace_names:r(2639,1,"React_components_cannot_include_JSX_namespace_names_2639","React components cannot include JSX namespace names"),Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity:r(2649,1,"Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649","Cannot augment module '{0}' with value exports because it resolves to a non-module entity."),Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more:r(2650,1,"Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and__2650","Non-abstract class expression is missing implementations for the following members of '{0}': {1} and {2} more."),A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums:r(2651,1,"A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651","A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."),Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead:r(2652,1,"Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652","Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."),Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1:r(2653,1,"Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653","Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."),Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2:r(2654,1,"Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_2654","Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2}."),Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more:r(2655,1,"Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more_2655","Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2} and {3} more."),Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1:r(2656,1,"Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_2656","Non-abstract class expression is missing implementations for the following members of '{0}': {1}."),JSX_expressions_must_have_one_parent_element:r(2657,1,"JSX_expressions_must_have_one_parent_element_2657","JSX expressions must have one parent element."),Type_0_provides_no_match_for_the_signature_1:r(2658,1,"Type_0_provides_no_match_for_the_signature_1_2658","Type '{0}' provides no match for the signature '{1}'."),super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher:r(2659,1,"super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659","'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."),super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions:r(2660,1,"super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660","'super' can only be referenced in members of derived classes or object literal expressions."),Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module:r(2661,1,"Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661","Cannot export '{0}'. Only local declarations can be exported from a module."),Cannot_find_name_0_Did_you_mean_the_static_member_1_0:r(2662,1,"Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662","Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"),Cannot_find_name_0_Did_you_mean_the_instance_member_this_0:r(2663,1,"Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663","Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?"),Invalid_module_name_in_augmentation_module_0_cannot_be_found:r(2664,1,"Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664","Invalid module name in augmentation, module '{0}' cannot be found."),Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented:r(2665,1,"Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665","Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented."),Exports_and_export_assignments_are_not_permitted_in_module_augmentations:r(2666,1,"Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666","Exports and export assignments are not permitted in module augmentations."),Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module:r(2667,1,"Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667","Imports are not permitted in module augmentations. Consider moving them to the enclosing external module."),export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible:r(2668,1,"export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668","'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible."),Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations:r(2669,1,"Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669","Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."),Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context:r(2670,1,"Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670","Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context."),Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity:r(2671,1,"Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671","Cannot augment module '{0}' because it resolves to a non-module entity."),Cannot_assign_a_0_constructor_type_to_a_1_constructor_type:r(2672,1,"Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672","Cannot assign a '{0}' constructor type to a '{1}' constructor type."),Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration:r(2673,1,"Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673","Constructor of class '{0}' is private and only accessible within the class declaration."),Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration:r(2674,1,"Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674","Constructor of class '{0}' is protected and only accessible within the class declaration."),Cannot_extend_a_class_0_Class_constructor_is_marked_as_private:r(2675,1,"Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675","Cannot extend a class '{0}'. Class constructor is marked as private."),Accessors_must_both_be_abstract_or_non_abstract:r(2676,1,"Accessors_must_both_be_abstract_or_non_abstract_2676","Accessors must both be abstract or non-abstract."),A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type:r(2677,1,"A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677","A type predicate's type must be assignable to its parameter's type."),Type_0_is_not_comparable_to_type_1:r(2678,1,"Type_0_is_not_comparable_to_type_1_2678","Type '{0}' is not comparable to type '{1}'."),A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void:r(2679,1,"A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679","A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."),A_0_parameter_must_be_the_first_parameter:r(2680,1,"A_0_parameter_must_be_the_first_parameter_2680","A '{0}' parameter must be the first parameter."),A_constructor_cannot_have_a_this_parameter:r(2681,1,"A_constructor_cannot_have_a_this_parameter_2681","A constructor cannot have a 'this' parameter."),this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation:r(2683,1,"this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683","'this' implicitly has type 'any' because it does not have a type annotation."),The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1:r(2684,1,"The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684","The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."),The_this_types_of_each_signature_are_incompatible:r(2685,1,"The_this_types_of_each_signature_are_incompatible_2685","The 'this' types of each signature are incompatible."),_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead:r(2686,1,"_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686","'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."),All_declarations_of_0_must_have_identical_modifiers:r(2687,1,"All_declarations_of_0_must_have_identical_modifiers_2687","All declarations of '{0}' must have identical modifiers."),Cannot_find_type_definition_file_for_0:r(2688,1,"Cannot_find_type_definition_file_for_0_2688","Cannot find type definition file for '{0}'."),Cannot_extend_an_interface_0_Did_you_mean_implements:r(2689,1,"Cannot_extend_an_interface_0_Did_you_mean_implements_2689","Cannot extend an interface '{0}'. Did you mean 'implements'?"),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0:r(2690,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0_2690","'{0}' only refers to a type, but is being used as a value here. Did you mean to use '{1} in {0}'?"),_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible:r(2692,1,"_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692","'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here:r(2693,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693","'{0}' only refers to a type, but is being used as a value here."),Namespace_0_has_no_exported_member_1:r(2694,1,"Namespace_0_has_no_exported_member_1_2694","Namespace '{0}' has no exported member '{1}'."),Left_side_of_comma_operator_is_unused_and_has_no_side_effects:r(2695,1,"Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695","Left side of comma operator is unused and has no side effects.",!0),The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead:r(2696,1,"The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696","The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"),An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:r(2697,1,"An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697","An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."),Spread_types_may_only_be_created_from_object_types:r(2698,1,"Spread_types_may_only_be_created_from_object_types_2698","Spread types may only be created from object types."),Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1:r(2699,1,"Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699","Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."),Rest_types_may_only_be_created_from_object_types:r(2700,1,"Rest_types_may_only_be_created_from_object_types_2700","Rest types may only be created from object types."),The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access:r(2701,1,"The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701","The target of an object rest assignment must be a variable or a property access."),_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here:r(2702,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702","'{0}' only refers to a type, but is being used as a namespace here."),The_operand_of_a_delete_operator_must_be_a_property_reference:r(2703,1,"The_operand_of_a_delete_operator_must_be_a_property_reference_2703","The operand of a 'delete' operator must be a property reference."),The_operand_of_a_delete_operator_cannot_be_a_read_only_property:r(2704,1,"The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704","The operand of a 'delete' operator cannot be a read-only property."),An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:r(2705,1,"An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_2705","An async function or method in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."),Required_type_parameters_may_not_follow_optional_type_parameters:r(2706,1,"Required_type_parameters_may_not_follow_optional_type_parameters_2706","Required type parameters may not follow optional type parameters."),Generic_type_0_requires_between_1_and_2_type_arguments:r(2707,1,"Generic_type_0_requires_between_1_and_2_type_arguments_2707","Generic type '{0}' requires between {1} and {2} type arguments."),Cannot_use_namespace_0_as_a_value:r(2708,1,"Cannot_use_namespace_0_as_a_value_2708","Cannot use namespace '{0}' as a value."),Cannot_use_namespace_0_as_a_type:r(2709,1,"Cannot_use_namespace_0_as_a_type_2709","Cannot use namespace '{0}' as a type."),_0_are_specified_twice_The_attribute_named_0_will_be_overwritten:r(2710,1,"_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710","'{0}' are specified twice. The attribute named '{0}' will be overwritten."),A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:r(2711,1,"A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711","A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."),A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:r(2712,1,"A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_t_2712","A dynamic import call in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."),Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1:r(2713,1,"Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713",`Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}["{1}"]'?`),The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context:r(2714,1,"The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714","The expression of an export assignment must be an identifier or qualified name in an ambient context."),Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor:r(2715,1,"Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715","Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."),Type_parameter_0_has_a_circular_default:r(2716,1,"Type_parameter_0_has_a_circular_default_2716","Type parameter '{0}' has a circular default."),Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:r(2717,1,"Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717","Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."),Duplicate_property_0:r(2718,1,"Duplicate_property_0_2718","Duplicate property '{0}'."),Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated:r(2719,1,"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719","Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."),Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass:r(2720,1,"Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720","Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"),Cannot_invoke_an_object_which_is_possibly_null:r(2721,1,"Cannot_invoke_an_object_which_is_possibly_null_2721","Cannot invoke an object which is possibly 'null'."),Cannot_invoke_an_object_which_is_possibly_undefined:r(2722,1,"Cannot_invoke_an_object_which_is_possibly_undefined_2722","Cannot invoke an object which is possibly 'undefined'."),Cannot_invoke_an_object_which_is_possibly_null_or_undefined:r(2723,1,"Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723","Cannot invoke an object which is possibly 'null' or 'undefined'."),_0_has_no_exported_member_named_1_Did_you_mean_2:r(2724,1,"_0_has_no_exported_member_named_1_Did_you_mean_2_2724","'{0}' has no exported member named '{1}'. Did you mean '{2}'?"),Class_name_cannot_be_Object_when_targeting_ES5_with_module_0:r(2725,1,"Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725","Class name cannot be 'Object' when targeting ES5 with module {0}."),Cannot_find_lib_definition_for_0:r(2726,1,"Cannot_find_lib_definition_for_0_2726","Cannot find lib definition for '{0}'."),Cannot_find_lib_definition_for_0_Did_you_mean_1:r(2727,1,"Cannot_find_lib_definition_for_0_Did_you_mean_1_2727","Cannot find lib definition for '{0}'. Did you mean '{1}'?"),_0_is_declared_here:r(2728,3,"_0_is_declared_here_2728","'{0}' is declared here."),Property_0_is_used_before_its_initialization:r(2729,1,"Property_0_is_used_before_its_initialization_2729","Property '{0}' is used before its initialization."),An_arrow_function_cannot_have_a_this_parameter:r(2730,1,"An_arrow_function_cannot_have_a_this_parameter_2730","An arrow function cannot have a 'this' parameter."),Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String:r(2731,1,"Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731","Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."),Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension:r(2732,1,"Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732","Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension."),Property_0_was_also_declared_here:r(2733,1,"Property_0_was_also_declared_here_2733","Property '{0}' was also declared here."),Are_you_missing_a_semicolon:r(2734,1,"Are_you_missing_a_semicolon_2734","Are you missing a semicolon?"),Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1:r(2735,1,"Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735","Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"),Operator_0_cannot_be_applied_to_type_1:r(2736,1,"Operator_0_cannot_be_applied_to_type_1_2736","Operator '{0}' cannot be applied to type '{1}'."),BigInt_literals_are_not_available_when_targeting_lower_than_ES2020:r(2737,1,"BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737","BigInt literals are not available when targeting lower than ES2020."),An_outer_value_of_this_is_shadowed_by_this_container:r(2738,3,"An_outer_value_of_this_is_shadowed_by_this_container_2738","An outer value of 'this' is shadowed by this container."),Type_0_is_missing_the_following_properties_from_type_1_Colon_2:r(2739,1,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739","Type '{0}' is missing the following properties from type '{1}': {2}"),Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more:r(2740,1,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740","Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more."),Property_0_is_missing_in_type_1_but_required_in_type_2:r(2741,1,"Property_0_is_missing_in_type_1_but_required_in_type_2_2741","Property '{0}' is missing in type '{1}' but required in type '{2}'."),The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary:r(2742,1,"The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742","The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary."),No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments:r(2743,1,"No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743","No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments."),Type_parameter_defaults_can_only_reference_previously_declared_type_parameters:r(2744,1,"Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744","Type parameter defaults can only reference previously declared type parameters."),This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided:r(2745,1,"This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745","This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided."),This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided:r(2746,1,"This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746","This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided."),_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2:r(2747,1,"_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747","'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."),Cannot_access_ambient_const_enums_when_0_is_enabled:r(2748,1,"Cannot_access_ambient_const_enums_when_0_is_enabled_2748","Cannot access ambient const enums when '{0}' is enabled."),_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0:r(2749,1,"_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0_2749","'{0}' refers to a value, but is being used as a type here. Did you mean 'typeof {0}'?"),The_implementation_signature_is_declared_here:r(2750,1,"The_implementation_signature_is_declared_here_2750","The implementation signature is declared here."),Circularity_originates_in_type_at_this_location:r(2751,1,"Circularity_originates_in_type_at_this_location_2751","Circularity originates in type at this location."),The_first_export_default_is_here:r(2752,1,"The_first_export_default_is_here_2752","The first export default is here."),Another_export_default_is_here:r(2753,1,"Another_export_default_is_here_2753","Another export default is here."),super_may_not_use_type_arguments:r(2754,1,"super_may_not_use_type_arguments_2754","'super' may not use type arguments."),No_constituent_of_type_0_is_callable:r(2755,1,"No_constituent_of_type_0_is_callable_2755","No constituent of type '{0}' is callable."),Not_all_constituents_of_type_0_are_callable:r(2756,1,"Not_all_constituents_of_type_0_are_callable_2756","Not all constituents of type '{0}' are callable."),Type_0_has_no_call_signatures:r(2757,1,"Type_0_has_no_call_signatures_2757","Type '{0}' has no call signatures."),Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other:r(2758,1,"Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758","Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other."),No_constituent_of_type_0_is_constructable:r(2759,1,"No_constituent_of_type_0_is_constructable_2759","No constituent of type '{0}' is constructable."),Not_all_constituents_of_type_0_are_constructable:r(2760,1,"Not_all_constituents_of_type_0_are_constructable_2760","Not all constituents of type '{0}' are constructable."),Type_0_has_no_construct_signatures:r(2761,1,"Type_0_has_no_construct_signatures_2761","Type '{0}' has no construct signatures."),Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other:r(2762,1,"Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762","Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0:r(2763,1,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0:r(2764,1,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0:r(2765,1,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'."),Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0:r(2766,1,"Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766","Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'."),The_0_property_of_an_iterator_must_be_a_method:r(2767,1,"The_0_property_of_an_iterator_must_be_a_method_2767","The '{0}' property of an iterator must be a method."),The_0_property_of_an_async_iterator_must_be_a_method:r(2768,1,"The_0_property_of_an_async_iterator_must_be_a_method_2768","The '{0}' property of an async iterator must be a method."),No_overload_matches_this_call:r(2769,1,"No_overload_matches_this_call_2769","No overload matches this call."),The_last_overload_gave_the_following_error:r(2770,1,"The_last_overload_gave_the_following_error_2770","The last overload gave the following error."),The_last_overload_is_declared_here:r(2771,1,"The_last_overload_is_declared_here_2771","The last overload is declared here."),Overload_0_of_1_2_gave_the_following_error:r(2772,1,"Overload_0_of_1_2_gave_the_following_error_2772","Overload {0} of {1}, '{2}', gave the following error."),Did_you_forget_to_use_await:r(2773,1,"Did_you_forget_to_use_await_2773","Did you forget to use 'await'?"),This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead:r(2774,1,"This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774","This condition will always return true since this function is always defined. Did you mean to call it instead?"),Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation:r(2775,1,"Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775","Assertions require every name in the call target to be declared with an explicit type annotation."),Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name:r(2776,1,"Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776","Assertions require the call target to be an identifier or qualified name."),The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access:r(2777,1,"The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777","The operand of an increment or decrement operator may not be an optional property access."),The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access:r(2778,1,"The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778","The target of an object rest assignment may not be an optional property access."),The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access:r(2779,1,"The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779","The left-hand side of an assignment expression may not be an optional property access."),The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access:r(2780,1,"The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780","The left-hand side of a 'for...in' statement may not be an optional property access."),The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access:r(2781,1,"The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781","The left-hand side of a 'for...of' statement may not be an optional property access."),_0_needs_an_explicit_type_annotation:r(2782,3,"_0_needs_an_explicit_type_annotation_2782","'{0}' needs an explicit type annotation."),_0_is_specified_more_than_once_so_this_usage_will_be_overwritten:r(2783,1,"_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783","'{0}' is specified more than once, so this usage will be overwritten."),get_and_set_accessors_cannot_declare_this_parameters:r(2784,1,"get_and_set_accessors_cannot_declare_this_parameters_2784","'get' and 'set' accessors cannot declare 'this' parameters."),This_spread_always_overwrites_this_property:r(2785,1,"This_spread_always_overwrites_this_property_2785","This spread always overwrites this property."),_0_cannot_be_used_as_a_JSX_component:r(2786,1,"_0_cannot_be_used_as_a_JSX_component_2786","'{0}' cannot be used as a JSX component."),Its_return_type_0_is_not_a_valid_JSX_element:r(2787,1,"Its_return_type_0_is_not_a_valid_JSX_element_2787","Its return type '{0}' is not a valid JSX element."),Its_instance_type_0_is_not_a_valid_JSX_element:r(2788,1,"Its_instance_type_0_is_not_a_valid_JSX_element_2788","Its instance type '{0}' is not a valid JSX element."),Its_element_type_0_is_not_a_valid_JSX_element:r(2789,1,"Its_element_type_0_is_not_a_valid_JSX_element_2789","Its element type '{0}' is not a valid JSX element."),The_operand_of_a_delete_operator_must_be_optional:r(2790,1,"The_operand_of_a_delete_operator_must_be_optional_2790","The operand of a 'delete' operator must be optional."),Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later:r(2791,1,"Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_lat_2791","Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later."),Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option:r(2792,1,"Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792","Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?"),The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible:r(2793,1,"The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_2793","The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible."),Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise:r(2794,1,"Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise_2794","Expected {0} arguments, but got {1}. Did you forget to include 'void' in your type argument to 'Promise'?"),The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types:r(2795,1,"The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types_2795","The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types."),It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked:r(2796,1,"It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tag_2796","It is likely that you are missing a comma to separate these two template expressions. They form a tagged template expression which cannot be invoked."),A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract:r(2797,1,"A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797","A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."),The_declaration_was_marked_as_deprecated_here:r(2798,1,"The_declaration_was_marked_as_deprecated_here_2798","The declaration was marked as deprecated here."),Type_produces_a_tuple_type_that_is_too_large_to_represent:r(2799,1,"Type_produces_a_tuple_type_that_is_too_large_to_represent_2799","Type produces a tuple type that is too large to represent."),Expression_produces_a_tuple_type_that_is_too_large_to_represent:r(2800,1,"Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800","Expression produces a tuple type that is too large to represent."),This_condition_will_always_return_true_since_this_0_is_always_defined:r(2801,1,"This_condition_will_always_return_true_since_this_0_is_always_defined_2801","This condition will always return true since this '{0}' is always defined."),Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher:r(2802,1,"Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802","Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher."),Cannot_assign_to_private_method_0_Private_methods_are_not_writable:r(2803,1,"Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803","Cannot assign to private method '{0}'. Private methods are not writable."),Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name:r(2804,1,"Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804","Duplicate identifier '{0}'. Static and instance elements cannot share the same private name."),Private_accessor_was_defined_without_a_getter:r(2806,1,"Private_accessor_was_defined_without_a_getter_2806","Private accessor was defined without a getter."),This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0:r(2807,1,"This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807","This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."),A_get_accessor_must_be_at_least_as_accessible_as_the_setter:r(2808,1,"A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808","A get accessor must be at least as accessible as the setter"),Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses:r(2809,1,"Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809","Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses."),Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments:r(2810,1,"Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810","Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."),Initializer_for_property_0:r(2811,1,"Initializer_for_property_0_2811","Initializer for property '{0}'"),Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom:r(2812,1,"Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812","Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."),Class_declaration_cannot_implement_overload_list_for_0:r(2813,1,"Class_declaration_cannot_implement_overload_list_for_0_2813","Class declaration cannot implement overload list for '{0}'."),Function_with_bodies_can_only_merge_with_classes_that_are_ambient:r(2814,1,"Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814","Function with bodies can only merge with classes that are ambient."),arguments_cannot_be_referenced_in_property_initializers:r(2815,1,"arguments_cannot_be_referenced_in_property_initializers_2815","'arguments' cannot be referenced in property initializers."),Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class:r(2816,1,"Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816","Cannot use 'this' in a static property initializer of a decorated class."),Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block:r(2817,1,"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817","Property '{0}' has no initializer and is not definitely assigned in a class static block."),Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers:r(2818,1,"Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818","Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."),Namespace_name_cannot_be_0:r(2819,1,"Namespace_name_cannot_be_0_2819","Namespace name cannot be '{0}'."),Type_0_is_not_assignable_to_type_1_Did_you_mean_2:r(2820,1,"Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820","Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve:r(2821,1,"Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve_2821","Import assertions are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'."),Import_assertions_cannot_be_used_with_type_only_imports_or_exports:r(2822,1,"Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822","Import assertions cannot be used with type-only imports or exports."),Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve:r(2823,1,"Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve_2823","Import attributes are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'."),Cannot_find_namespace_0_Did_you_mean_1:r(2833,1,"Cannot_find_namespace_0_Did_you_mean_1_2833","Cannot find namespace '{0}'. Did you mean '{1}'?"),Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path:r(2834,1,"Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834","Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."),Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0:r(2835,1,"Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835","Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"),Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:r(2836,1,"Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2836","Import assertions are not allowed on statements that compile to CommonJS 'require' calls."),Import_assertion_values_must_be_string_literal_expressions:r(2837,1,"Import_assertion_values_must_be_string_literal_expressions_2837","Import assertion values must be string literal expressions."),All_declarations_of_0_must_have_identical_constraints:r(2838,1,"All_declarations_of_0_must_have_identical_constraints_2838","All declarations of '{0}' must have identical constraints."),This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value:r(2839,1,"This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839","This condition will always return '{0}' since JavaScript compares objects by reference, not value."),An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types:r(2840,1,"An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types_2840","An interface cannot extend a primitive type like '{0}'. It can only extend other named object types."),_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation:r(2842,1,"_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842","'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"),We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here:r(2843,1,"We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843","We can only write a type for '{0}' by adding a type for the entire parameter here."),Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:r(2844,1,"Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844","Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),This_condition_will_always_return_0:r(2845,1,"This_condition_will_always_return_0_2845","This condition will always return '{0}'."),A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead:r(2846,1,"A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_f_2846","A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?"),The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression:r(2848,1,"The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression_2848","The right-hand side of an 'instanceof' expression must not be an instantiation expression."),Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1:r(2849,1,"Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1_2849","Target signature provides too few arguments. Expected {0} or more, but got {1}."),The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined:r(2850,1,"The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_n_2850","The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined:r(2851,1,"The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851","The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:r(2852,1,"await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852","'await using' statements are only allowed within async functions and at the top levels of modules."),await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:r(2853,1,"await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853","'await using' statements are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:r(2854,1,"Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854","Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super:r(2855,1,"Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855","Class field '{0}' defined by the parent class is not accessible in the child class via super."),Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:r(2856,1,"Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2856","Import attributes are not allowed on statements that compile to CommonJS 'require' calls."),Import_attributes_cannot_be_used_with_type_only_imports_or_exports:r(2857,1,"Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857","Import attributes cannot be used with type-only imports or exports."),Import_attribute_values_must_be_string_literal_expressions:r(2858,1,"Import_attribute_values_must_be_string_literal_expressions_2858","Import attribute values must be string literal expressions."),Excessive_complexity_comparing_types_0_and_1:r(2859,1,"Excessive_complexity_comparing_types_0_and_1_2859","Excessive complexity comparing types '{0}' and '{1}'."),The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method:r(2860,1,"The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860","The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."),An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression:r(2861,1,"An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861","An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."),Type_0_is_generic_and_can_only_be_indexed_for_reading:r(2862,1,"Type_0_is_generic_and_can_only_be_indexed_for_reading_2862","Type '{0}' is generic and can only be indexed for reading."),A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values:r(2863,1,"A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863","A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values."),A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types:r(2864,1,"A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864","A class cannot implement a primitive type like '{0}'. It can only implement other named object types."),Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled:r(2865,1,"Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_2865","Import '{0}' conflicts with local value, so must be declared with a type-only import when 'isolatedModules' is enabled."),Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled:r(2866,1,"Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_w_2866","Import '{0}' conflicts with global value used in this file, so must be declared with a type-only import when 'isolatedModules' is enabled."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun:r(2867,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2867","Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig:r(2868,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2868","Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun` and then add 'bun' to the types field in your tsconfig."),Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish:r(2869,1,"Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish_2869","Right operand of ?? is unreachable because the left operand is never nullish."),This_binary_expression_is_never_nullish_Are_you_missing_parentheses:r(2870,1,"This_binary_expression_is_never_nullish_Are_you_missing_parentheses_2870","This binary expression is never nullish. Are you missing parentheses?"),This_expression_is_always_nullish:r(2871,1,"This_expression_is_always_nullish_2871","This expression is always nullish."),This_kind_of_expression_is_always_truthy:r(2872,1,"This_kind_of_expression_is_always_truthy_2872","This kind of expression is always truthy."),This_kind_of_expression_is_always_falsy:r(2873,1,"This_kind_of_expression_is_always_falsy_2873","This kind of expression is always falsy."),This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found:r(2874,1,"This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found_2874","This JSX tag requires '{0}' to be in scope, but it could not be found."),This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_for_the_appropriate_package_installed:r(2875,1,"This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_fo_2875","This JSX tag requires the module path '{0}' to exist, but none could be found. Make sure you have types for the appropriate package installed."),This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolves_to_0:r(2876,1,"This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolv_2876",'This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "{0}".'),This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_during_emit_because_it_is_not_a_relative_path:r(2877,1,"This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877","This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path."),This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_between_the_projects_output_files_is_not_the_same_as_the_relative_path_between_its_input_files:r(2878,1,"This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878","This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files."),Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found:r(2879,1,"Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879","Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found."),Import_declaration_0_is_using_private_name_1:r(4e3,1,"Import_declaration_0_is_using_private_name_1_4000","Import declaration '{0}' is using private name '{1}'."),Type_parameter_0_of_exported_class_has_or_is_using_private_name_1:r(4002,1,"Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002","Type parameter '{0}' of exported class has or is using private name '{1}'."),Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1:r(4004,1,"Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004","Type parameter '{0}' of exported interface has or is using private name '{1}'."),Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:r(4006,1,"Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006","Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:r(4008,1,"Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008","Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:r(4010,1,"Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010","Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:r(4012,1,"Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012","Type parameter '{0}' of public method from exported class has or is using private name '{1}'."),Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:r(4014,1,"Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014","Type parameter '{0}' of method from exported interface has or is using private name '{1}'."),Type_parameter_0_of_exported_function_has_or_is_using_private_name_1:r(4016,1,"Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016","Type parameter '{0}' of exported function has or is using private name '{1}'."),Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:r(4019,1,"Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019","Implements clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_class_0_has_or_is_using_private_name_1:r(4020,1,"extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020","'extends' clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_class_has_or_is_using_private_name_0:r(4021,1,"extends_clause_of_exported_class_has_or_is_using_private_name_0_4021","'extends' clause of exported class has or is using private name '{0}'."),extends_clause_of_exported_interface_0_has_or_is_using_private_name_1:r(4022,1,"extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022","'extends' clause of exported interface '{0}' has or is using private name '{1}'."),Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4023,1,"Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023","Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."),Exported_variable_0_has_or_is_using_name_1_from_private_module_2:r(4024,1,"Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024","Exported variable '{0}' has or is using name '{1}' from private module '{2}'."),Exported_variable_0_has_or_is_using_private_name_1:r(4025,1,"Exported_variable_0_has_or_is_using_private_name_1_4025","Exported variable '{0}' has or is using private name '{1}'."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4026,1,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026","Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:r(4027,1,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027","Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:r(4028,1,"Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028","Public static property '{0}' of exported class has or is using private name '{1}'."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4029,1,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029","Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:r(4030,1,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030","Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_property_0_of_exported_class_has_or_is_using_private_name_1:r(4031,1,"Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031","Public property '{0}' of exported class has or is using private name '{1}'."),Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:r(4032,1,"Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032","Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Property_0_of_exported_interface_has_or_is_using_private_name_1:r(4033,1,"Property_0_of_exported_interface_has_or_is_using_private_name_1_4033","Property '{0}' of exported interface has or is using private name '{1}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:r(4034,1,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034","Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1:r(4035,1,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035","Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:r(4036,1,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036","Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1:r(4037,1,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037","Parameter type of public setter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4038,1,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038","Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:r(4039,1,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039","Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1:r(4040,1,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040","Return type of public static getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4041,1,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041","Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:r(4042,1,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042","Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1:r(4043,1,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043","Return type of public getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:r(4044,1,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044","Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0:r(4045,1,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045","Return type of constructor signature from exported interface has or is using private name '{0}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:r(4046,1,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046","Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0:r(4047,1,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047","Return type of call signature from exported interface has or is using private name '{0}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:r(4048,1,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048","Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0:r(4049,1,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049","Return type of index signature from exported interface has or is using private name '{0}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:r(4050,1,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050","Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:r(4051,1,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051","Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:r(4052,1,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052","Return type of public static method from exported class has or is using private name '{0}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:r(4053,1,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053","Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:r(4054,1,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054","Return type of public method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:r(4055,1,"Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055","Return type of public method from exported class has or is using private name '{0}'."),Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:r(4056,1,"Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056","Return type of method from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0:r(4057,1,"Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057","Return type of method from exported interface has or is using private name '{0}'."),Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:r(4058,1,"Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058","Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:r(4059,1,"Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059","Return type of exported function has or is using name '{0}' from private module '{1}'."),Return_type_of_exported_function_has_or_is_using_private_name_0:r(4060,1,"Return_type_of_exported_function_has_or_is_using_private_name_0_4060","Return type of exported function has or is using private name '{0}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4061,1,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061","Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:r(4062,1,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062","Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1:r(4063,1,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063","Parameter '{0}' of constructor from exported class has or is using private name '{1}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:r(4064,1,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064","Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:r(4065,1,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065","Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:r(4066,1,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066","Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:r(4067,1,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067","Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4068,1,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068","Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:r(4069,1,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069","Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:r(4070,1,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070","Parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4071,1,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071","Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:r(4072,1,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072","Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:r(4073,1,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073","Parameter '{0}' of public method from exported class has or is using private name '{1}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:r(4074,1,"Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074","Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:r(4075,1,"Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075","Parameter '{0}' of method from exported interface has or is using private name '{1}'."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4076,1,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076","Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:r(4077,1,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077","Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."),Parameter_0_of_exported_function_has_or_is_using_private_name_1:r(4078,1,"Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078","Parameter '{0}' of exported function has or is using private name '{1}'."),Exported_type_alias_0_has_or_is_using_private_name_1:r(4081,1,"Exported_type_alias_0_has_or_is_using_private_name_1_4081","Exported type alias '{0}' has or is using private name '{1}'."),Default_export_of_the_module_has_or_is_using_private_name_0:r(4082,1,"Default_export_of_the_module_has_or_is_using_private_name_0_4082","Default export of the module has or is using private name '{0}'."),Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1:r(4083,1,"Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083","Type parameter '{0}' of exported type alias has or is using private name '{1}'."),Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2:r(4084,1,"Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084","Exported type alias '{0}' has or is using private name '{1}' from module {2}."),Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1:r(4085,1,"Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1_4085","Extends clause for inferred type '{0}' has or is using private name '{1}'."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:r(4091,1,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091","Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1:r(4092,1,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092","Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."),Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected:r(4094,1,"Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected_4094","Property '{0}' of exported anonymous class type may not be private or protected."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4095,1,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095","Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:r(4096,1,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096","Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_method_0_of_exported_class_has_or_is_using_private_name_1:r(4097,1,"Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097","Public static method '{0}' of exported class has or is using private name '{1}'."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4098,1,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098","Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:r(4099,1,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099","Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_method_0_of_exported_class_has_or_is_using_private_name_1:r(4100,1,"Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100","Public method '{0}' of exported class has or is using private name '{1}'."),Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:r(4101,1,"Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101","Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Method_0_of_exported_interface_has_or_is_using_private_name_1:r(4102,1,"Method_0_of_exported_interface_has_or_is_using_private_name_1_4102","Method '{0}' of exported interface has or is using private name '{1}'."),Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1:r(4103,1,"Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103","Type parameter '{0}' of exported mapped object type is using private name '{1}'."),The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1:r(4104,1,"The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104","The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'."),Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter:r(4105,1,"Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105","Private or protected member '{0}' cannot be accessed on a type parameter."),Parameter_0_of_accessor_has_or_is_using_private_name_1:r(4106,1,"Parameter_0_of_accessor_has_or_is_using_private_name_1_4106","Parameter '{0}' of accessor has or is using private name '{1}'."),Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2:r(4107,1,"Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107","Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."),Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4108,1,"Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108","Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."),Type_arguments_for_0_circularly_reference_themselves:r(4109,1,"Type_arguments_for_0_circularly_reference_themselves_4109","Type arguments for '{0}' circularly reference themselves."),Tuple_type_arguments_circularly_reference_themselves:r(4110,1,"Tuple_type_arguments_circularly_reference_themselves_4110","Tuple type arguments circularly reference themselves."),Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0:r(4111,1,"Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111","Property '{0}' comes from an index signature, so it must be accessed with ['{0}']."),This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class:r(4112,1,"This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112","This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class."),This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0:r(4113,1,"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113","This member cannot have an 'override' modifier because it is not declared in the base class '{0}'."),This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0:r(4114,1,"This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114","This member must have an 'override' modifier because it overrides a member in the base class '{0}'."),This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0:r(4115,1,"This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115","This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'."),This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0:r(4116,1,"This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116","This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."),This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:r(4117,1,"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117","This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"),The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized:r(4118,1,"The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118","The type of this node cannot be serialized because its property '{0}' cannot be serialized."),This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:r(4119,1,"This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119","This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:r(4120,1,"This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120","This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class:r(4121,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121","This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0:r(4122,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122","This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:r(4123,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123","This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next:r(4124,1,"Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124","Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given:r(4125,1,"Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125","Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given."),One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value:r(4126,1,"One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126","One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value."),The_current_host_does_not_support_the_0_option:r(5001,1,"The_current_host_does_not_support_the_0_option_5001","The current host does not support the '{0}' option."),Cannot_find_the_common_subdirectory_path_for_the_input_files:r(5009,1,"Cannot_find_the_common_subdirectory_path_for_the_input_files_5009","Cannot find the common subdirectory path for the input files."),File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:r(5010,1,"File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010","File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),Cannot_read_file_0_Colon_1:r(5012,1,"Cannot_read_file_0_Colon_1_5012","Cannot read file '{0}': {1}."),Unknown_compiler_option_0:r(5023,1,"Unknown_compiler_option_0_5023","Unknown compiler option '{0}'."),Compiler_option_0_requires_a_value_of_type_1:r(5024,1,"Compiler_option_0_requires_a_value_of_type_1_5024","Compiler option '{0}' requires a value of type {1}."),Unknown_compiler_option_0_Did_you_mean_1:r(5025,1,"Unknown_compiler_option_0_Did_you_mean_1_5025","Unknown compiler option '{0}'. Did you mean '{1}'?"),Could_not_write_file_0_Colon_1:r(5033,1,"Could_not_write_file_0_Colon_1_5033","Could not write file '{0}': {1}."),Option_project_cannot_be_mixed_with_source_files_on_a_command_line:r(5042,1,"Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042","Option 'project' cannot be mixed with source files on a command line."),Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher:r(5047,1,"Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047","Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."),Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided:r(5051,1,"Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051","Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided."),Option_0_cannot_be_specified_without_specifying_option_1:r(5052,1,"Option_0_cannot_be_specified_without_specifying_option_1_5052","Option '{0}' cannot be specified without specifying option '{1}'."),Option_0_cannot_be_specified_with_option_1:r(5053,1,"Option_0_cannot_be_specified_with_option_1_5053","Option '{0}' cannot be specified with option '{1}'."),A_tsconfig_json_file_is_already_defined_at_Colon_0:r(5054,1,"A_tsconfig_json_file_is_already_defined_at_Colon_0_5054","A 'tsconfig.json' file is already defined at: '{0}'."),Cannot_write_file_0_because_it_would_overwrite_input_file:r(5055,1,"Cannot_write_file_0_because_it_would_overwrite_input_file_5055","Cannot write file '{0}' because it would overwrite input file."),Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files:r(5056,1,"Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056","Cannot write file '{0}' because it would be overwritten by multiple input files."),Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0:r(5057,1,"Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057","Cannot find a tsconfig.json file at the specified directory: '{0}'."),The_specified_path_does_not_exist_Colon_0:r(5058,1,"The_specified_path_does_not_exist_Colon_0_5058","The specified path does not exist: '{0}'."),Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier:r(5059,1,"Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059","Invalid value for '--reactNamespace'. '{0}' is not a valid identifier."),Pattern_0_can_have_at_most_one_Asterisk_character:r(5061,1,"Pattern_0_can_have_at_most_one_Asterisk_character_5061","Pattern '{0}' can have at most one '*' character."),Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character:r(5062,1,"Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062","Substitution '{0}' in pattern '{1}' can have at most one '*' character."),Substitutions_for_pattern_0_should_be_an_array:r(5063,1,"Substitutions_for_pattern_0_should_be_an_array_5063","Substitutions for pattern '{0}' should be an array."),Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2:r(5064,1,"Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064","Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'."),File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:r(5065,1,"File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065","File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."),Substitutions_for_pattern_0_shouldn_t_be_an_empty_array:r(5066,1,"Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066","Substitutions for pattern '{0}' shouldn't be an empty array."),Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name:r(5067,1,"Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067","Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."),Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig:r(5068,1,"Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068","Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."),Option_0_cannot_be_specified_without_specifying_option_1_or_option_2:r(5069,1,"Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069","Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."),Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic:r(5070,1,"Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic_5070","Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'."),Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd:r(5071,1,"Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd_5071","Option '--resolveJsonModule' cannot be specified when 'module' is set to 'none', 'system', or 'umd'."),Unknown_build_option_0:r(5072,1,"Unknown_build_option_0_5072","Unknown build option '{0}'."),Build_option_0_requires_a_value_of_type_1:r(5073,1,"Build_option_0_requires_a_value_of_type_1_5073","Build option '{0}' requires a value of type {1}."),Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified:r(5074,1,"Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074","Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified."),_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2:r(5075,1,"_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075","'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."),_0_and_1_operations_cannot_be_mixed_without_parentheses:r(5076,1,"_0_and_1_operations_cannot_be_mixed_without_parentheses_5076","'{0}' and '{1}' operations cannot be mixed without parentheses."),Unknown_build_option_0_Did_you_mean_1:r(5077,1,"Unknown_build_option_0_Did_you_mean_1_5077","Unknown build option '{0}'. Did you mean '{1}'?"),Unknown_watch_option_0:r(5078,1,"Unknown_watch_option_0_5078","Unknown watch option '{0}'."),Unknown_watch_option_0_Did_you_mean_1:r(5079,1,"Unknown_watch_option_0_Did_you_mean_1_5079","Unknown watch option '{0}'. Did you mean '{1}'?"),Watch_option_0_requires_a_value_of_type_1:r(5080,1,"Watch_option_0_requires_a_value_of_type_1_5080","Watch option '{0}' requires a value of type {1}."),Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0:r(5081,1,"Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081","Cannot find a tsconfig.json file at the current directory: {0}."),_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1:r(5082,1,"_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082","'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."),Cannot_read_file_0:r(5083,1,"Cannot_read_file_0_5083","Cannot read file '{0}'."),A_tuple_member_cannot_be_both_optional_and_rest:r(5085,1,"A_tuple_member_cannot_be_both_optional_and_rest_5085","A tuple member cannot be both optional and rest."),A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type:r(5086,1,"A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086","A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."),A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type:r(5087,1,"A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087","A labeled tuple element is declared as rest with a '...' before the name, rather than before the type."),The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary:r(5088,1,"The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088","The inferred type of '{0}' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary."),Option_0_cannot_be_specified_when_option_jsx_is_1:r(5089,1,"Option_0_cannot_be_specified_when_option_jsx_is_1_5089","Option '{0}' cannot be specified when option 'jsx' is '{1}'."),Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash:r(5090,1,"Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash_5090","Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?"),Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled:r(5091,1,"Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled_5091","Option 'preserveConstEnums' cannot be disabled when '{0}' is enabled."),The_root_value_of_a_0_file_must_be_an_object:r(5092,1,"The_root_value_of_a_0_file_must_be_an_object_5092","The root value of a '{0}' file must be an object."),Compiler_option_0_may_only_be_used_with_build:r(5093,1,"Compiler_option_0_may_only_be_used_with_build_5093","Compiler option '--{0}' may only be used with '--build'."),Compiler_option_0_may_not_be_used_with_build:r(5094,1,"Compiler_option_0_may_not_be_used_with_build_5094","Compiler option '--{0}' may not be used with '--build'."),Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later:r(5095,1,"Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later_5095","Option '{0}' can only be used when 'module' is set to 'preserve' or to 'es2015' or later."),Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set:r(5096,1,"Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096","Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."),An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled:r(5097,1,"An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097","An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."),Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler:r(5098,1,"Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098","Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."),Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error:r(5101,1,"Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101",`Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`),Option_0_has_been_removed_Please_remove_it_from_your_configuration:r(5102,1,"Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102","Option '{0}' has been removed. Please remove it from your configuration."),Invalid_value_for_ignoreDeprecations:r(5103,1,"Invalid_value_for_ignoreDeprecations_5103","Invalid value for '--ignoreDeprecations'."),Option_0_is_redundant_and_cannot_be_specified_with_option_1:r(5104,1,"Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104","Option '{0}' is redundant and cannot be specified with option '{1}'."),Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System:r(5105,1,"Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105","Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."),Use_0_instead:r(5106,3,"Use_0_instead_5106","Use '{0}' instead."),Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error:r(5107,1,"Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107",`Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`),Option_0_1_has_been_removed_Please_remove_it_from_your_configuration:r(5108,1,"Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108","Option '{0}={1}' has been removed. Please remove it from your configuration."),Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1:r(5109,1,"Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109","Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."),Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1:r(5110,1,"Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110","Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."),Generates_a_sourcemap_for_each_corresponding_d_ts_file:r(6e3,3,"Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000","Generates a sourcemap for each corresponding '.d.ts' file."),Concatenate_and_emit_output_to_single_file:r(6001,3,"Concatenate_and_emit_output_to_single_file_6001","Concatenate and emit output to single file."),Generates_corresponding_d_ts_file:r(6002,3,"Generates_corresponding_d_ts_file_6002","Generates corresponding '.d.ts' file."),Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations:r(6004,3,"Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004","Specify the location where debugger should locate TypeScript files instead of source locations."),Watch_input_files:r(6005,3,"Watch_input_files_6005","Watch input files."),Redirect_output_structure_to_the_directory:r(6006,3,"Redirect_output_structure_to_the_directory_6006","Redirect output structure to the directory."),Do_not_erase_const_enum_declarations_in_generated_code:r(6007,3,"Do_not_erase_const_enum_declarations_in_generated_code_6007","Do not erase const enum declarations in generated code."),Do_not_emit_outputs_if_any_errors_were_reported:r(6008,3,"Do_not_emit_outputs_if_any_errors_were_reported_6008","Do not emit outputs if any errors were reported."),Do_not_emit_comments_to_output:r(6009,3,"Do_not_emit_comments_to_output_6009","Do not emit comments to output."),Do_not_emit_outputs:r(6010,3,"Do_not_emit_outputs_6010","Do not emit outputs."),Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking:r(6011,3,"Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011","Allow default imports from modules with no default export. This does not affect code emit, just typechecking."),Skip_type_checking_of_declaration_files:r(6012,3,"Skip_type_checking_of_declaration_files_6012","Skip type checking of declaration files."),Do_not_resolve_the_real_path_of_symlinks:r(6013,3,"Do_not_resolve_the_real_path_of_symlinks_6013","Do not resolve the real path of symlinks."),Only_emit_d_ts_declaration_files:r(6014,3,"Only_emit_d_ts_declaration_files_6014","Only emit '.d.ts' declaration files."),Specify_ECMAScript_target_version:r(6015,3,"Specify_ECMAScript_target_version_6015","Specify ECMAScript target version."),Specify_module_code_generation:r(6016,3,"Specify_module_code_generation_6016","Specify module code generation."),Print_this_message:r(6017,3,"Print_this_message_6017","Print this message."),Print_the_compiler_s_version:r(6019,3,"Print_the_compiler_s_version_6019","Print the compiler's version."),Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json:r(6020,3,"Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020","Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."),Syntax_Colon_0:r(6023,3,"Syntax_Colon_0_6023","Syntax: {0}"),options:r(6024,3,"options_6024","options"),file:r(6025,3,"file_6025","file"),Examples_Colon_0:r(6026,3,"Examples_Colon_0_6026","Examples: {0}"),Options_Colon:r(6027,3,"Options_Colon_6027","Options:"),Version_0:r(6029,3,"Version_0_6029","Version {0}"),Insert_command_line_options_and_files_from_a_file:r(6030,3,"Insert_command_line_options_and_files_from_a_file_6030","Insert command line options and files from a file."),Starting_compilation_in_watch_mode:r(6031,3,"Starting_compilation_in_watch_mode_6031","Starting compilation in watch mode..."),File_change_detected_Starting_incremental_compilation:r(6032,3,"File_change_detected_Starting_incremental_compilation_6032","File change detected. Starting incremental compilation..."),KIND:r(6034,3,"KIND_6034","KIND"),FILE:r(6035,3,"FILE_6035","FILE"),VERSION:r(6036,3,"VERSION_6036","VERSION"),LOCATION:r(6037,3,"LOCATION_6037","LOCATION"),DIRECTORY:r(6038,3,"DIRECTORY_6038","DIRECTORY"),STRATEGY:r(6039,3,"STRATEGY_6039","STRATEGY"),FILE_OR_DIRECTORY:r(6040,3,"FILE_OR_DIRECTORY_6040","FILE OR DIRECTORY"),Errors_Files:r(6041,3,"Errors_Files_6041","Errors Files"),Generates_corresponding_map_file:r(6043,3,"Generates_corresponding_map_file_6043","Generates corresponding '.map' file."),Compiler_option_0_expects_an_argument:r(6044,1,"Compiler_option_0_expects_an_argument_6044","Compiler option '{0}' expects an argument."),Unterminated_quoted_string_in_response_file_0:r(6045,1,"Unterminated_quoted_string_in_response_file_0_6045","Unterminated quoted string in response file '{0}'."),Argument_for_0_option_must_be_Colon_1:r(6046,1,"Argument_for_0_option_must_be_Colon_1_6046","Argument for '{0}' option must be: {1}."),Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1:r(6048,1,"Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048","Locale must be of the form or -. For example '{0}' or '{1}'."),Unable_to_open_file_0:r(6050,1,"Unable_to_open_file_0_6050","Unable to open file '{0}'."),Corrupted_locale_file_0:r(6051,1,"Corrupted_locale_file_0_6051","Corrupted locale file {0}."),Raise_error_on_expressions_and_declarations_with_an_implied_any_type:r(6052,3,"Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052","Raise error on expressions and declarations with an implied 'any' type."),File_0_not_found:r(6053,1,"File_0_not_found_6053","File '{0}' not found."),File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1:r(6054,1,"File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054","File '{0}' has an unsupported extension. The only supported extensions are {1}."),Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures:r(6055,3,"Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055","Suppress noImplicitAny errors for indexing objects lacking index signatures."),Do_not_emit_declarations_for_code_that_has_an_internal_annotation:r(6056,3,"Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056","Do not emit declarations for code that has an '@internal' annotation."),Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir:r(6058,3,"Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058","Specify the root directory of input files. Use to control the output directory structure with --outDir."),File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files:r(6059,1,"File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059","File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."),Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix:r(6060,3,"Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060","Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."),NEWLINE:r(6061,3,"NEWLINE_6061","NEWLINE"),Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line:r(6064,1,"Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064","Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."),Enables_experimental_support_for_ES7_decorators:r(6065,3,"Enables_experimental_support_for_ES7_decorators_6065","Enables experimental support for ES7 decorators."),Enables_experimental_support_for_emitting_type_metadata_for_decorators:r(6066,3,"Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066","Enables experimental support for emitting type metadata for decorators."),Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file:r(6070,3,"Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070","Initializes a TypeScript project and creates a tsconfig.json file."),Successfully_created_a_tsconfig_json_file:r(6071,3,"Successfully_created_a_tsconfig_json_file_6071","Successfully created a tsconfig.json file."),Suppress_excess_property_checks_for_object_literals:r(6072,3,"Suppress_excess_property_checks_for_object_literals_6072","Suppress excess property checks for object literals."),Stylize_errors_and_messages_using_color_and_context_experimental:r(6073,3,"Stylize_errors_and_messages_using_color_and_context_experimental_6073","Stylize errors and messages using color and context (experimental)."),Do_not_report_errors_on_unused_labels:r(6074,3,"Do_not_report_errors_on_unused_labels_6074","Do not report errors on unused labels."),Report_error_when_not_all_code_paths_in_function_return_a_value:r(6075,3,"Report_error_when_not_all_code_paths_in_function_return_a_value_6075","Report error when not all code paths in function return a value."),Report_errors_for_fallthrough_cases_in_switch_statement:r(6076,3,"Report_errors_for_fallthrough_cases_in_switch_statement_6076","Report errors for fallthrough cases in switch statement."),Do_not_report_errors_on_unreachable_code:r(6077,3,"Do_not_report_errors_on_unreachable_code_6077","Do not report errors on unreachable code."),Disallow_inconsistently_cased_references_to_the_same_file:r(6078,3,"Disallow_inconsistently_cased_references_to_the_same_file_6078","Disallow inconsistently-cased references to the same file."),Specify_library_files_to_be_included_in_the_compilation:r(6079,3,"Specify_library_files_to_be_included_in_the_compilation_6079","Specify library files to be included in the compilation."),Specify_JSX_code_generation:r(6080,3,"Specify_JSX_code_generation_6080","Specify JSX code generation."),Only_amd_and_system_modules_are_supported_alongside_0:r(6082,1,"Only_amd_and_system_modules_are_supported_alongside_0_6082","Only 'amd' and 'system' modules are supported alongside --{0}."),Base_directory_to_resolve_non_absolute_module_names:r(6083,3,"Base_directory_to_resolve_non_absolute_module_names_6083","Base directory to resolve non-absolute module names."),Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit:r(6084,3,"Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084","[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"),Enable_tracing_of_the_name_resolution_process:r(6085,3,"Enable_tracing_of_the_name_resolution_process_6085","Enable tracing of the name resolution process."),Resolving_module_0_from_1:r(6086,3,"Resolving_module_0_from_1_6086","======== Resolving module '{0}' from '{1}'. ========"),Explicitly_specified_module_resolution_kind_Colon_0:r(6087,3,"Explicitly_specified_module_resolution_kind_Colon_0_6087","Explicitly specified module resolution kind: '{0}'."),Module_resolution_kind_is_not_specified_using_0:r(6088,3,"Module_resolution_kind_is_not_specified_using_0_6088","Module resolution kind is not specified, using '{0}'."),Module_name_0_was_successfully_resolved_to_1:r(6089,3,"Module_name_0_was_successfully_resolved_to_1_6089","======== Module name '{0}' was successfully resolved to '{1}'. ========"),Module_name_0_was_not_resolved:r(6090,3,"Module_name_0_was_not_resolved_6090","======== Module name '{0}' was not resolved. ========"),paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0:r(6091,3,"paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091","'paths' option is specified, looking for a pattern to match module name '{0}'."),Module_name_0_matched_pattern_1:r(6092,3,"Module_name_0_matched_pattern_1_6092","Module name '{0}', matched pattern '{1}'."),Trying_substitution_0_candidate_module_location_Colon_1:r(6093,3,"Trying_substitution_0_candidate_module_location_Colon_1_6093","Trying substitution '{0}', candidate module location: '{1}'."),Resolving_module_name_0_relative_to_base_url_1_2:r(6094,3,"Resolving_module_name_0_relative_to_base_url_1_2_6094","Resolving module name '{0}' relative to base url '{1}' - '{2}'."),Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1:r(6095,3,"Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1_6095","Loading module as file / folder, candidate module location '{0}', target file types: {1}."),File_0_does_not_exist:r(6096,3,"File_0_does_not_exist_6096","File '{0}' does not exist."),File_0_exists_use_it_as_a_name_resolution_result:r(6097,3,"File_0_exists_use_it_as_a_name_resolution_result_6097","File '{0}' exists - use it as a name resolution result."),Loading_module_0_from_node_modules_folder_target_file_types_Colon_1:r(6098,3,"Loading_module_0_from_node_modules_folder_target_file_types_Colon_1_6098","Loading module '{0}' from 'node_modules' folder, target file types: {1}."),Found_package_json_at_0:r(6099,3,"Found_package_json_at_0_6099","Found 'package.json' at '{0}'."),package_json_does_not_have_a_0_field:r(6100,3,"package_json_does_not_have_a_0_field_6100","'package.json' does not have a '{0}' field."),package_json_has_0_field_1_that_references_2:r(6101,3,"package_json_has_0_field_1_that_references_2_6101","'package.json' has '{0}' field '{1}' that references '{2}'."),Allow_javascript_files_to_be_compiled:r(6102,3,"Allow_javascript_files_to_be_compiled_6102","Allow javascript files to be compiled."),Checking_if_0_is_the_longest_matching_prefix_for_1_2:r(6104,3,"Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104","Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."),Expected_type_of_0_field_in_package_json_to_be_1_got_2:r(6105,3,"Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105","Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'."),baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1:r(6106,3,"baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106","'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."),rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0:r(6107,3,"rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107","'rootDirs' option is set, using it to resolve relative module name '{0}'."),Longest_matching_prefix_for_0_is_1:r(6108,3,"Longest_matching_prefix_for_0_is_1_6108","Longest matching prefix for '{0}' is '{1}'."),Loading_0_from_the_root_dir_1_candidate_location_2:r(6109,3,"Loading_0_from_the_root_dir_1_candidate_location_2_6109","Loading '{0}' from the root dir '{1}', candidate location '{2}'."),Trying_other_entries_in_rootDirs:r(6110,3,"Trying_other_entries_in_rootDirs_6110","Trying other entries in 'rootDirs'."),Module_resolution_using_rootDirs_has_failed:r(6111,3,"Module_resolution_using_rootDirs_has_failed_6111","Module resolution using 'rootDirs' has failed."),Do_not_emit_use_strict_directives_in_module_output:r(6112,3,"Do_not_emit_use_strict_directives_in_module_output_6112","Do not emit 'use strict' directives in module output."),Enable_strict_null_checks:r(6113,3,"Enable_strict_null_checks_6113","Enable strict null checks."),Unknown_option_excludes_Did_you_mean_exclude:r(6114,1,"Unknown_option_excludes_Did_you_mean_exclude_6114","Unknown option 'excludes'. Did you mean 'exclude'?"),Raise_error_on_this_expressions_with_an_implied_any_type:r(6115,3,"Raise_error_on_this_expressions_with_an_implied_any_type_6115","Raise error on 'this' expressions with an implied 'any' type."),Resolving_type_reference_directive_0_containing_file_1_root_directory_2:r(6116,3,"Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116","======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"),Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2:r(6119,3,"Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119","======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"),Type_reference_directive_0_was_not_resolved:r(6120,3,"Type_reference_directive_0_was_not_resolved_6120","======== Type reference directive '{0}' was not resolved. ========"),Resolving_with_primary_search_path_0:r(6121,3,"Resolving_with_primary_search_path_0_6121","Resolving with primary search path '{0}'."),Root_directory_cannot_be_determined_skipping_primary_search_paths:r(6122,3,"Root_directory_cannot_be_determined_skipping_primary_search_paths_6122","Root directory cannot be determined, skipping primary search paths."),Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set:r(6123,3,"Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123","======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========"),Type_declaration_files_to_be_included_in_compilation:r(6124,3,"Type_declaration_files_to_be_included_in_compilation_6124","Type declaration files to be included in compilation."),Looking_up_in_node_modules_folder_initial_location_0:r(6125,3,"Looking_up_in_node_modules_folder_initial_location_0_6125","Looking up in 'node_modules' folder, initial location '{0}'."),Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder:r(6126,3,"Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126","Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder."),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1:r(6127,3,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127","======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========"),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set:r(6128,3,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128","======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========"),Resolving_real_path_for_0_result_1:r(6130,3,"Resolving_real_path_for_0_result_1_6130","Resolving real path for '{0}', result '{1}'."),Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system:r(6131,1,"Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131","Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'."),File_name_0_has_a_1_extension_stripping_it:r(6132,3,"File_name_0_has_a_1_extension_stripping_it_6132","File name '{0}' has a '{1}' extension - stripping it."),_0_is_declared_but_its_value_is_never_read:r(6133,1,"_0_is_declared_but_its_value_is_never_read_6133","'{0}' is declared but its value is never read.",!0),Report_errors_on_unused_locals:r(6134,3,"Report_errors_on_unused_locals_6134","Report errors on unused locals."),Report_errors_on_unused_parameters:r(6135,3,"Report_errors_on_unused_parameters_6135","Report errors on unused parameters."),The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files:r(6136,3,"The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136","The maximum dependency depth to search under node_modules and load JavaScript files."),Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1:r(6137,1,"Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137","Cannot import type declaration files. Consider importing '{0}' instead of '{1}'."),Property_0_is_declared_but_its_value_is_never_read:r(6138,1,"Property_0_is_declared_but_its_value_is_never_read_6138","Property '{0}' is declared but its value is never read.",!0),Import_emit_helpers_from_tslib:r(6139,3,"Import_emit_helpers_from_tslib_6139","Import emit helpers from 'tslib'."),Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2:r(6140,1,"Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140","Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."),Parse_in_strict_mode_and_emit_use_strict_for_each_source_file:r(6141,3,"Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141",'Parse in strict mode and emit "use strict" for each source file.'),Module_0_was_resolved_to_1_but_jsx_is_not_set:r(6142,1,"Module_0_was_resolved_to_1_but_jsx_is_not_set_6142","Module '{0}' was resolved to '{1}', but '--jsx' is not set."),Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1:r(6144,3,"Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144","Module '{0}' was resolved as locally declared ambient module in file '{1}'."),Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h:r(6146,3,"Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146","Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."),Resolution_for_module_0_was_found_in_cache_from_location_1:r(6147,3,"Resolution_for_module_0_was_found_in_cache_from_location_1_6147","Resolution for module '{0}' was found in cache from location '{1}'."),Directory_0_does_not_exist_skipping_all_lookups_in_it:r(6148,3,"Directory_0_does_not_exist_skipping_all_lookups_in_it_6148","Directory '{0}' does not exist, skipping all lookups in it."),Show_diagnostic_information:r(6149,3,"Show_diagnostic_information_6149","Show diagnostic information."),Show_verbose_diagnostic_information:r(6150,3,"Show_verbose_diagnostic_information_6150","Show verbose diagnostic information."),Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file:r(6151,3,"Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151","Emit a single file with source maps instead of having a separate file."),Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set:r(6152,3,"Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152","Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set."),Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule:r(6153,3,"Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153","Transpile each file as a separate module (similar to 'ts.transpileModule')."),Print_names_of_generated_files_part_of_the_compilation:r(6154,3,"Print_names_of_generated_files_part_of_the_compilation_6154","Print names of generated files part of the compilation."),Print_names_of_files_part_of_the_compilation:r(6155,3,"Print_names_of_files_part_of_the_compilation_6155","Print names of files part of the compilation."),The_locale_used_when_displaying_messages_to_the_user_e_g_en_us:r(6156,3,"The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156","The locale used when displaying messages to the user (e.g. 'en-us')"),Do_not_generate_custom_helper_functions_like_extends_in_compiled_output:r(6157,3,"Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157","Do not generate custom helper functions like '__extends' in compiled output."),Do_not_include_the_default_library_file_lib_d_ts:r(6158,3,"Do_not_include_the_default_library_file_lib_d_ts_6158","Do not include the default library file (lib.d.ts)."),Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files:r(6159,3,"Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159","Do not add triple-slash references or imported modules to the list of compiled files."),Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files:r(6160,3,"Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160","[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files."),List_of_folders_to_include_type_definitions_from:r(6161,3,"List_of_folders_to_include_type_definitions_from_6161","List of folders to include type definitions from."),Disable_size_limitations_on_JavaScript_projects:r(6162,3,"Disable_size_limitations_on_JavaScript_projects_6162","Disable size limitations on JavaScript projects."),The_character_set_of_the_input_files:r(6163,3,"The_character_set_of_the_input_files_6163","The character set of the input files."),Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1:r(6164,3,"Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1_6164","Skipping module '{0}' that looks like an absolute URI, target file types: {1}."),Do_not_truncate_error_messages:r(6165,3,"Do_not_truncate_error_messages_6165","Do not truncate error messages."),Output_directory_for_generated_declaration_files:r(6166,3,"Output_directory_for_generated_declaration_files_6166","Output directory for generated declaration files."),A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl:r(6167,3,"A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167","A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."),List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime:r(6168,3,"List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168","List of root folders whose combined content represents the structure of the project at runtime."),Show_all_compiler_options:r(6169,3,"Show_all_compiler_options_6169","Show all compiler options."),Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file:r(6170,3,"Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170","[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"),Command_line_Options:r(6171,3,"Command_line_Options_6171","Command-line Options"),Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5:r(6179,3,"Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_6179","Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5'."),Enable_all_strict_type_checking_options:r(6180,3,"Enable_all_strict_type_checking_options_6180","Enable all strict type-checking options."),Scoped_package_detected_looking_in_0:r(6182,3,"Scoped_package_detected_looking_in_0_6182","Scoped package detected, looking in '{0}'"),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:r(6183,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:r(6184,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Enable_strict_checking_of_function_types:r(6186,3,"Enable_strict_checking_of_function_types_6186","Enable strict checking of function types."),Enable_strict_checking_of_property_initialization_in_classes:r(6187,3,"Enable_strict_checking_of_property_initialization_in_classes_6187","Enable strict checking of property initialization in classes."),Numeric_separators_are_not_allowed_here:r(6188,1,"Numeric_separators_are_not_allowed_here_6188","Numeric separators are not allowed here."),Multiple_consecutive_numeric_separators_are_not_permitted:r(6189,1,"Multiple_consecutive_numeric_separators_are_not_permitted_6189","Multiple consecutive numeric separators are not permitted."),Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen:r(6191,3,"Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191","Whether to keep outdated console output in watch mode instead of clearing the screen."),All_imports_in_import_declaration_are_unused:r(6192,1,"All_imports_in_import_declaration_are_unused_6192","All imports in import declaration are unused.",!0),Found_1_error_Watching_for_file_changes:r(6193,3,"Found_1_error_Watching_for_file_changes_6193","Found 1 error. Watching for file changes."),Found_0_errors_Watching_for_file_changes:r(6194,3,"Found_0_errors_Watching_for_file_changes_6194","Found {0} errors. Watching for file changes."),Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols:r(6195,3,"Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195","Resolve 'keyof' to string valued property names only (no numbers or symbols)."),_0_is_declared_but_never_used:r(6196,1,"_0_is_declared_but_never_used_6196","'{0}' is declared but never used.",!0),Include_modules_imported_with_json_extension:r(6197,3,"Include_modules_imported_with_json_extension_6197","Include modules imported with '.json' extension"),All_destructured_elements_are_unused:r(6198,1,"All_destructured_elements_are_unused_6198","All destructured elements are unused.",!0),All_variables_are_unused:r(6199,1,"All_variables_are_unused_6199","All variables are unused.",!0),Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0:r(6200,1,"Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200","Definitions of the following identifiers conflict with those in another file: {0}"),Conflicts_are_in_this_file:r(6201,3,"Conflicts_are_in_this_file_6201","Conflicts are in this file."),Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0:r(6202,1,"Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202","Project references may not form a circular graph. Cycle detected: {0}"),_0_was_also_declared_here:r(6203,3,"_0_was_also_declared_here_6203","'{0}' was also declared here."),and_here:r(6204,3,"and_here_6204","and here."),All_type_parameters_are_unused:r(6205,1,"All_type_parameters_are_unused_6205","All type parameters are unused."),package_json_has_a_typesVersions_field_with_version_specific_path_mappings:r(6206,3,"package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206","'package.json' has a 'typesVersions' field with version-specific path mappings."),package_json_does_not_have_a_typesVersions_entry_that_matches_version_0:r(6207,3,"package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207","'package.json' does not have a 'typesVersions' entry that matches version '{0}'."),package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2:r(6208,3,"package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208","'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'."),package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range:r(6209,3,"package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209","'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range."),An_argument_for_0_was_not_provided:r(6210,3,"An_argument_for_0_was_not_provided_6210","An argument for '{0}' was not provided."),An_argument_matching_this_binding_pattern_was_not_provided:r(6211,3,"An_argument_matching_this_binding_pattern_was_not_provided_6211","An argument matching this binding pattern was not provided."),Did_you_mean_to_call_this_expression:r(6212,3,"Did_you_mean_to_call_this_expression_6212","Did you mean to call this expression?"),Did_you_mean_to_use_new_with_this_expression:r(6213,3,"Did_you_mean_to_use_new_with_this_expression_6213","Did you mean to use 'new' with this expression?"),Enable_strict_bind_call_and_apply_methods_on_functions:r(6214,3,"Enable_strict_bind_call_and_apply_methods_on_functions_6214","Enable strict 'bind', 'call', and 'apply' methods on functions."),Using_compiler_options_of_project_reference_redirect_0:r(6215,3,"Using_compiler_options_of_project_reference_redirect_0_6215","Using compiler options of project reference redirect '{0}'."),Found_1_error:r(6216,3,"Found_1_error_6216","Found 1 error."),Found_0_errors:r(6217,3,"Found_0_errors_6217","Found {0} errors."),Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2:r(6218,3,"Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218","======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========"),Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3:r(6219,3,"Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219","======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========"),package_json_had_a_falsy_0_field:r(6220,3,"package_json_had_a_falsy_0_field_6220","'package.json' had a falsy '{0}' field."),Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects:r(6221,3,"Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221","Disable use of source files instead of declaration files from referenced projects."),Emit_class_fields_with_Define_instead_of_Set:r(6222,3,"Emit_class_fields_with_Define_instead_of_Set_6222","Emit class fields with Define instead of Set."),Generates_a_CPU_profile:r(6223,3,"Generates_a_CPU_profile_6223","Generates a CPU profile."),Disable_solution_searching_for_this_project:r(6224,3,"Disable_solution_searching_for_this_project_6224","Disable solution searching for this project."),Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory:r(6225,3,"Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225","Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."),Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling:r(6226,3,"Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226","Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling'."),Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize:r(6227,3,"Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227","Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority', 'FixedChunkSize'."),Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3:r(6229,1,"Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229","Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."),Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line:r(6230,1,"Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230","Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."),Could_not_resolve_the_path_0_with_the_extensions_Colon_1:r(6231,1,"Could_not_resolve_the_path_0_with_the_extensions_Colon_1_6231","Could not resolve the path '{0}' with the extensions: {1}."),Declaration_augments_declaration_in_another_file_This_cannot_be_serialized:r(6232,1,"Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232","Declaration augments declaration in another file. This cannot be serialized."),This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file:r(6233,1,"This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233","This is the declaration being augmented. Consider moving the augmenting declaration into the same file."),This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without:r(6234,1,"This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without_6234","This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?"),Disable_loading_referenced_projects:r(6235,3,"Disable_loading_referenced_projects_6235","Disable loading referenced projects."),Arguments_for_the_rest_parameter_0_were_not_provided:r(6236,1,"Arguments_for_the_rest_parameter_0_were_not_provided_6236","Arguments for the rest parameter '{0}' were not provided."),Generates_an_event_trace_and_a_list_of_types:r(6237,3,"Generates_an_event_trace_and_a_list_of_types_6237","Generates an event trace and a list of types."),Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react:r(6238,1,"Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react_6238","Specify the module specifier to be used to import the 'jsx' and 'jsxs' factory functions from. eg, react"),File_0_exists_according_to_earlier_cached_lookups:r(6239,3,"File_0_exists_according_to_earlier_cached_lookups_6239","File '{0}' exists according to earlier cached lookups."),File_0_does_not_exist_according_to_earlier_cached_lookups:r(6240,3,"File_0_does_not_exist_according_to_earlier_cached_lookups_6240","File '{0}' does not exist according to earlier cached lookups."),Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1:r(6241,3,"Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241","Resolution for type reference directive '{0}' was found in cache from location '{1}'."),Resolving_type_reference_directive_0_containing_file_1:r(6242,3,"Resolving_type_reference_directive_0_containing_file_1_6242","======== Resolving type reference directive '{0}', containing file '{1}'. ========"),Interpret_optional_property_types_as_written_rather_than_adding_undefined:r(6243,3,"Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243","Interpret optional property types as written, rather than adding 'undefined'."),Modules:r(6244,3,"Modules_6244","Modules"),File_Management:r(6245,3,"File_Management_6245","File Management"),Emit:r(6246,3,"Emit_6246","Emit"),JavaScript_Support:r(6247,3,"JavaScript_Support_6247","JavaScript Support"),Type_Checking:r(6248,3,"Type_Checking_6248","Type Checking"),Editor_Support:r(6249,3,"Editor_Support_6249","Editor Support"),Watch_and_Build_Modes:r(6250,3,"Watch_and_Build_Modes_6250","Watch and Build Modes"),Compiler_Diagnostics:r(6251,3,"Compiler_Diagnostics_6251","Compiler Diagnostics"),Interop_Constraints:r(6252,3,"Interop_Constraints_6252","Interop Constraints"),Backwards_Compatibility:r(6253,3,"Backwards_Compatibility_6253","Backwards Compatibility"),Language_and_Environment:r(6254,3,"Language_and_Environment_6254","Language and Environment"),Projects:r(6255,3,"Projects_6255","Projects"),Output_Formatting:r(6256,3,"Output_Formatting_6256","Output Formatting"),Completeness:r(6257,3,"Completeness_6257","Completeness"),_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file:r(6258,1,"_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258","'{0}' should be set inside the 'compilerOptions' object of the config json file"),Found_1_error_in_0:r(6259,3,"Found_1_error_in_0_6259","Found 1 error in {0}"),Found_0_errors_in_the_same_file_starting_at_Colon_1:r(6260,3,"Found_0_errors_in_the_same_file_starting_at_Colon_1_6260","Found {0} errors in the same file, starting at: {1}"),Found_0_errors_in_1_files:r(6261,3,"Found_0_errors_in_1_files_6261","Found {0} errors in {1} files."),File_name_0_has_a_1_extension_looking_up_2_instead:r(6262,3,"File_name_0_has_a_1_extension_looking_up_2_instead_6262","File name '{0}' has a '{1}' extension - looking up '{2}' instead."),Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set:r(6263,1,"Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set_6263","Module '{0}' was resolved to '{1}', but '--allowArbitraryExtensions' is not set."),Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present:r(6264,3,"Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present_6264","Enable importing files with any extension, provided a declaration file is present."),Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder:r(6265,3,"Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_no_6265","Resolving type reference directive for program that specifies custom typeRoots, skipping lookup in 'node_modules' folder."),Option_0_can_only_be_specified_on_command_line:r(6266,1,"Option_0_can_only_be_specified_on_command_line_6266","Option '{0}' can only be specified on command line."),Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve:r(6270,3,"Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270","Directory '{0}' has no containing package.json scope. Imports will not resolve."),Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1:r(6271,3,"Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271","Import specifier '{0}' does not exist in package.json scope at path '{1}'."),Invalid_import_specifier_0_has_no_possible_resolutions:r(6272,3,"Invalid_import_specifier_0_has_no_possible_resolutions_6272","Invalid import specifier '{0}' has no possible resolutions."),package_json_scope_0_has_no_imports_defined:r(6273,3,"package_json_scope_0_has_no_imports_defined_6273","package.json scope '{0}' has no imports defined."),package_json_scope_0_explicitly_maps_specifier_1_to_null:r(6274,3,"package_json_scope_0_explicitly_maps_specifier_1_to_null_6274","package.json scope '{0}' explicitly maps specifier '{1}' to null."),package_json_scope_0_has_invalid_type_for_target_of_specifier_1:r(6275,3,"package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275","package.json scope '{0}' has invalid type for target of specifier '{1}'"),Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1:r(6276,3,"Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276","Export specifier '{0}' does not exist in package.json scope at path '{1}'."),Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update:r(6277,3,"Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_i_6277","Resolution of non-relative name failed; trying with modern Node resolution features disabled to see if npm library needs configuration update."),There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings:r(6278,3,"There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The__6278",`There are types at '{0}', but this result could not be resolved when respecting package.json "exports". The '{1}' library may need to update its package.json or typings.`),Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update:r(6279,3,"Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_ne_6279","Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update."),There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler:r(6280,3,"There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setti_6280","There are types at '{0}', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'."),package_json_has_a_peerDependencies_field:r(6281,3,"package_json_has_a_peerDependencies_field_6281","'package.json' has a 'peerDependencies' field."),Found_peerDependency_0_with_1_version:r(6282,3,"Found_peerDependency_0_with_1_version_6282","Found peerDependency '{0}' with '{1}' version."),Failed_to_find_peerDependency_0:r(6283,3,"Failed_to_find_peerDependency_0_6283","Failed to find peerDependency '{0}'."),Enable_project_compilation:r(6302,3,"Enable_project_compilation_6302","Enable project compilation"),Composite_projects_may_not_disable_declaration_emit:r(6304,1,"Composite_projects_may_not_disable_declaration_emit_6304","Composite projects may not disable declaration emit."),Output_file_0_has_not_been_built_from_source_file_1:r(6305,1,"Output_file_0_has_not_been_built_from_source_file_1_6305","Output file '{0}' has not been built from source file '{1}'."),Referenced_project_0_must_have_setting_composite_Colon_true:r(6306,1,"Referenced_project_0_must_have_setting_composite_Colon_true_6306",`Referenced project '{0}' must have setting "composite": true.`),File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern:r(6307,1,"File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307","File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern."),Referenced_project_0_may_not_disable_emit:r(6310,1,"Referenced_project_0_may_not_disable_emit_6310","Referenced project '{0}' may not disable emit."),Project_0_is_out_of_date_because_output_1_is_older_than_input_2:r(6350,3,"Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350","Project '{0}' is out of date because output '{1}' is older than input '{2}'"),Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2:r(6351,3,"Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351","Project '{0}' is up to date because newest input '{1}' is older than output '{2}'"),Project_0_is_out_of_date_because_output_file_1_does_not_exist:r(6352,3,"Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352","Project '{0}' is out of date because output file '{1}' does not exist"),Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date:r(6353,3,"Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353","Project '{0}' is out of date because its dependency '{1}' is out of date"),Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies:r(6354,3,"Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354","Project '{0}' is up to date with .d.ts files from its dependencies"),Projects_in_this_build_Colon_0:r(6355,3,"Projects_in_this_build_Colon_0_6355","Projects in this build: {0}"),A_non_dry_build_would_delete_the_following_files_Colon_0:r(6356,3,"A_non_dry_build_would_delete_the_following_files_Colon_0_6356","A non-dry build would delete the following files: {0}"),A_non_dry_build_would_build_project_0:r(6357,3,"A_non_dry_build_would_build_project_0_6357","A non-dry build would build project '{0}'"),Building_project_0:r(6358,3,"Building_project_0_6358","Building project '{0}'..."),Updating_output_timestamps_of_project_0:r(6359,3,"Updating_output_timestamps_of_project_0_6359","Updating output timestamps of project '{0}'..."),Project_0_is_up_to_date:r(6361,3,"Project_0_is_up_to_date_6361","Project '{0}' is up to date"),Skipping_build_of_project_0_because_its_dependency_1_has_errors:r(6362,3,"Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362","Skipping build of project '{0}' because its dependency '{1}' has errors"),Project_0_can_t_be_built_because_its_dependency_1_has_errors:r(6363,3,"Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363","Project '{0}' can't be built because its dependency '{1}' has errors"),Build_one_or_more_projects_and_their_dependencies_if_out_of_date:r(6364,3,"Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364","Build one or more projects and their dependencies, if out of date"),Delete_the_outputs_of_all_projects:r(6365,3,"Delete_the_outputs_of_all_projects_6365","Delete the outputs of all projects."),Show_what_would_be_built_or_deleted_if_specified_with_clean:r(6367,3,"Show_what_would_be_built_or_deleted_if_specified_with_clean_6367","Show what would be built (or deleted, if specified with '--clean')"),Option_build_must_be_the_first_command_line_argument:r(6369,1,"Option_build_must_be_the_first_command_line_argument_6369","Option '--build' must be the first command line argument."),Options_0_and_1_cannot_be_combined:r(6370,1,"Options_0_and_1_cannot_be_combined_6370","Options '{0}' and '{1}' cannot be combined."),Updating_unchanged_output_timestamps_of_project_0:r(6371,3,"Updating_unchanged_output_timestamps_of_project_0_6371","Updating unchanged output timestamps of project '{0}'..."),A_non_dry_build_would_update_timestamps_for_output_of_project_0:r(6374,3,"A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374","A non-dry build would update timestamps for output of project '{0}'"),Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1:r(6377,1,"Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377","Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'"),Composite_projects_may_not_disable_incremental_compilation:r(6379,1,"Composite_projects_may_not_disable_incremental_compilation_6379","Composite projects may not disable incremental compilation."),Specify_file_to_store_incremental_compilation_information:r(6380,3,"Specify_file_to_store_incremental_compilation_information_6380","Specify file to store incremental compilation information"),Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2:r(6381,3,"Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381","Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"),Skipping_build_of_project_0_because_its_dependency_1_was_not_built:r(6382,3,"Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382","Skipping build of project '{0}' because its dependency '{1}' was not built"),Project_0_can_t_be_built_because_its_dependency_1_was_not_built:r(6383,3,"Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383","Project '{0}' can't be built because its dependency '{1}' was not built"),Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it:r(6384,3,"Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384","Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it."),_0_is_deprecated:r(6385,2,"_0_is_deprecated_6385","'{0}' is deprecated.",void 0,void 0,!0),Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found:r(6386,3,"Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_nativ_6386","Performance timings for '--diagnostics' or '--extendedDiagnostics' are not available in this session. A native implementation of the Web Performance API could not be found."),The_signature_0_of_1_is_deprecated:r(6387,2,"The_signature_0_of_1_is_deprecated_6387","The signature '{0}' of '{1}' is deprecated.",void 0,void 0,!0),Project_0_is_being_forcibly_rebuilt:r(6388,3,"Project_0_is_being_forcibly_rebuilt_6388","Project '{0}' is being forcibly rebuilt"),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved:r(6389,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389","Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2:r(6390,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:r(6391,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved:r(6392,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3:r(6393,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4:r(6394,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved:r(6395,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3:r(6396,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4:r(6397,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved:r(6398,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted:r(6399,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399","Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes were not emitted"),Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files:r(6400,3,"Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400","Project '{0}' is up to date but needs to update timestamps of output files that are older than input files"),Project_0_is_out_of_date_because_there_was_error_reading_file_1:r(6401,3,"Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401","Project '{0}' is out of date because there was error reading file '{1}'"),Resolving_in_0_mode_with_conditions_1:r(6402,3,"Resolving_in_0_mode_with_conditions_1_6402","Resolving in {0} mode with conditions {1}."),Matched_0_condition_1:r(6403,3,"Matched_0_condition_1_6403","Matched '{0}' condition '{1}'."),Using_0_subpath_1_with_target_2:r(6404,3,"Using_0_subpath_1_with_target_2_6404","Using '{0}' subpath '{1}' with target '{2}'."),Saw_non_matching_condition_0:r(6405,3,"Saw_non_matching_condition_0_6405","Saw non-matching condition '{0}'."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions:r(6406,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions_6406","Project '{0}' is out of date because buildinfo file '{1}' indicates there is change in compilerOptions"),Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set:r(6407,3,"Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noE_6407","Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set."),Use_the_package_json_exports_field_when_resolving_package_imports:r(6408,3,"Use_the_package_json_exports_field_when_resolving_package_imports_6408","Use the package.json 'exports' field when resolving package imports."),Use_the_package_json_imports_field_when_resolving_imports:r(6409,3,"Use_the_package_json_imports_field_when_resolving_imports_6409","Use the package.json 'imports' field when resolving imports."),Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports:r(6410,3,"Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports_6410","Conditions to set in addition to the resolver-specific defaults when resolving imports."),true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false:r(6411,3,"true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false_6411","`true` when 'moduleResolution' is 'node16', 'nodenext', or 'bundler'; otherwise `false`."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more:r(6412,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_6412","Project '{0}' is out of date because buildinfo file '{1}' indicates that file '{2}' was root file of compilation but not any more."),Entering_conditional_exports:r(6413,3,"Entering_conditional_exports_6413","Entering conditional exports."),Resolved_under_condition_0:r(6414,3,"Resolved_under_condition_0_6414","Resolved under condition '{0}'."),Failed_to_resolve_under_condition_0:r(6415,3,"Failed_to_resolve_under_condition_0_6415","Failed to resolve under condition '{0}'."),Exiting_conditional_exports:r(6416,3,"Exiting_conditional_exports_6416","Exiting conditional exports."),Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0:r(6417,3,"Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417","Searching all ancestor node_modules directories for preferred extensions: {0}."),Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0:r(6418,3,"Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418","Searching all ancestor node_modules directories for fallback extensions: {0}."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors:r(6419,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors_6419","Project '{0}' is out of date because buildinfo file '{1}' indicates that program needs to report errors."),Project_0_is_out_of_date_because_1:r(6420,3,"Project_0_is_out_of_date_because_1_6420","Project '{0}' is out of date because {1}."),Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_in_output_files:r(6421,3,"Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_i_6421","Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files."),The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1:r(6500,3,"The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500","The expected type comes from property '{0}' which is declared here on type '{1}'"),The_expected_type_comes_from_this_index_signature:r(6501,3,"The_expected_type_comes_from_this_index_signature_6501","The expected type comes from this index signature."),The_expected_type_comes_from_the_return_type_of_this_signature:r(6502,3,"The_expected_type_comes_from_the_return_type_of_this_signature_6502","The expected type comes from the return type of this signature."),Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing:r(6503,3,"Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503","Print names of files that are part of the compilation and then stop processing."),File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option:r(6504,1,"File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504","File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"),Print_names_of_files_and_the_reason_they_are_part_of_the_compilation:r(6505,3,"Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505","Print names of files and the reason they are part of the compilation."),Consider_adding_a_declare_modifier_to_this_class:r(6506,3,"Consider_adding_a_declare_modifier_to_this_class_6506","Consider adding a 'declare' modifier to this class."),Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files:r(6600,3,"Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600","Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files."),Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export:r(6601,3,"Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601","Allow 'import x from y' when a module doesn't have a default export."),Allow_accessing_UMD_globals_from_modules:r(6602,3,"Allow_accessing_UMD_globals_from_modules_6602","Allow accessing UMD globals from modules."),Disable_error_reporting_for_unreachable_code:r(6603,3,"Disable_error_reporting_for_unreachable_code_6603","Disable error reporting for unreachable code."),Disable_error_reporting_for_unused_labels:r(6604,3,"Disable_error_reporting_for_unused_labels_6604","Disable error reporting for unused labels."),Ensure_use_strict_is_always_emitted:r(6605,3,"Ensure_use_strict_is_always_emitted_6605","Ensure 'use strict' is always emitted."),Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it:r(6606,3,"Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606","Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it."),Specify_the_base_directory_to_resolve_non_relative_module_names:r(6607,3,"Specify_the_base_directory_to_resolve_non_relative_module_names_6607","Specify the base directory to resolve non-relative module names."),No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files:r(6608,3,"No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608","No longer supported. In early versions, manually set the text encoding for reading files."),Enable_error_reporting_in_type_checked_JavaScript_files:r(6609,3,"Enable_error_reporting_in_type_checked_JavaScript_files_6609","Enable error reporting in type-checked JavaScript files."),Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references:r(6611,3,"Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611","Enable constraints that allow a TypeScript project to be used with project references."),Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project:r(6612,3,"Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612","Generate .d.ts files from TypeScript and JavaScript files in your project."),Specify_the_output_directory_for_generated_declaration_files:r(6613,3,"Specify_the_output_directory_for_generated_declaration_files_6613","Specify the output directory for generated declaration files."),Create_sourcemaps_for_d_ts_files:r(6614,3,"Create_sourcemaps_for_d_ts_files_6614","Create sourcemaps for d.ts files."),Output_compiler_performance_information_after_building:r(6615,3,"Output_compiler_performance_information_after_building_6615","Output compiler performance information after building."),Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project:r(6616,3,"Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616","Disables inference for type acquisition by looking at filenames in a project."),Reduce_the_number_of_projects_loaded_automatically_by_TypeScript:r(6617,3,"Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617","Reduce the number of projects loaded automatically by TypeScript."),Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server:r(6618,3,"Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618","Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."),Opt_a_project_out_of_multi_project_reference_checking_when_editing:r(6619,3,"Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619","Opt a project out of multi-project reference checking when editing."),Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects:r(6620,3,"Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620","Disable preferring source files instead of declaration files when referencing composite projects."),Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration:r(6621,3,"Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621","Emit more compliant, but verbose and less performant JavaScript for iteration."),Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files:r(6622,3,"Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622","Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."),Only_output_d_ts_files_and_not_JavaScript_files:r(6623,3,"Only_output_d_ts_files_and_not_JavaScript_files_6623","Only output d.ts files and not JavaScript files."),Emit_design_type_metadata_for_decorated_declarations_in_source_files:r(6624,3,"Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624","Emit design-type metadata for decorated declarations in source files."),Disable_the_type_acquisition_for_JavaScript_projects:r(6625,3,"Disable_the_type_acquisition_for_JavaScript_projects_6625","Disable the type acquisition for JavaScript projects"),Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility:r(6626,3,"Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626","Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility."),Filters_results_from_the_include_option:r(6627,3,"Filters_results_from_the_include_option_6627","Filters results from the `include` option."),Remove_a_list_of_directories_from_the_watch_process:r(6628,3,"Remove_a_list_of_directories_from_the_watch_process_6628","Remove a list of directories from the watch process."),Remove_a_list_of_files_from_the_watch_mode_s_processing:r(6629,3,"Remove_a_list_of_files_from_the_watch_mode_s_processing_6629","Remove a list of files from the watch mode's processing."),Enable_experimental_support_for_legacy_experimental_decorators:r(6630,3,"Enable_experimental_support_for_legacy_experimental_decorators_6630","Enable experimental support for legacy experimental decorators."),Print_files_read_during_the_compilation_including_why_it_was_included:r(6631,3,"Print_files_read_during_the_compilation_including_why_it_was_included_6631","Print files read during the compilation including why it was included."),Output_more_detailed_compiler_performance_information_after_building:r(6632,3,"Output_more_detailed_compiler_performance_information_after_building_6632","Output more detailed compiler performance information after building."),Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited:r(6633,3,"Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633","Specify one or more path or node module references to base configuration files from which settings are inherited."),Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers:r(6634,3,"Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634","Specify what approach the watcher should use if the system runs out of native file watchers."),Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include:r(6635,3,"Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635","Include a list of files. This does not support glob patterns, as opposed to `include`."),Build_all_projects_including_those_that_appear_to_be_up_to_date:r(6636,3,"Build_all_projects_including_those_that_appear_to_be_up_to_date_6636","Build all projects, including those that appear to be up to date."),Ensure_that_casing_is_correct_in_imports:r(6637,3,"Ensure_that_casing_is_correct_in_imports_6637","Ensure that casing is correct in imports."),Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging:r(6638,3,"Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638","Emit a v8 CPU profile of the compiler run for debugging."),Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file:r(6639,3,"Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639","Allow importing helper functions from tslib once per project, instead of including them per-file."),Skip_building_downstream_projects_on_error_in_upstream_project:r(6640,3,"Skip_building_downstream_projects_on_error_in_upstream_project_6640","Skip building downstream projects on error in upstream project."),Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation:r(6641,3,"Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641","Specify a list of glob patterns that match files to be included in compilation."),Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects:r(6642,3,"Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642","Save .tsbuildinfo files to allow for incremental compilation of projects."),Include_sourcemap_files_inside_the_emitted_JavaScript:r(6643,3,"Include_sourcemap_files_inside_the_emitted_JavaScript_6643","Include sourcemap files inside the emitted JavaScript."),Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript:r(6644,3,"Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644","Include source code in the sourcemaps inside the emitted JavaScript."),Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports:r(6645,3,"Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645","Ensure that each file can be safely transpiled without relying on other imports."),Specify_what_JSX_code_is_generated:r(6646,3,"Specify_what_JSX_code_is_generated_6646","Specify what JSX code is generated."),Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h:r(6647,3,"Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647","Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'."),Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment:r(6648,3,"Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648","Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."),Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk:r(6649,3,"Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649","Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'."),Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option:r(6650,3,"Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650","Make keyof only return strings instead of string, numbers or symbols. Legacy option."),Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment:r(6651,3,"Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651","Specify a set of bundled library declaration files that describe the target runtime environment."),Print_the_names_of_emitted_files_after_a_compilation:r(6652,3,"Print_the_names_of_emitted_files_after_a_compilation_6652","Print the names of emitted files after a compilation."),Print_all_of_the_files_read_during_the_compilation:r(6653,3,"Print_all_of_the_files_read_during_the_compilation_6653","Print all of the files read during the compilation."),Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit:r(6654,3,"Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654","Set the language of the messaging from TypeScript. This does not affect emit."),Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations:r(6655,3,"Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655","Specify the location where debugger should locate map files instead of generated locations."),Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs:r(6656,3,"Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656","Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'."),Specify_what_module_code_is_generated:r(6657,3,"Specify_what_module_code_is_generated_6657","Specify what module code is generated."),Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier:r(6658,3,"Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658","Specify how TypeScript looks up a file from a given module specifier."),Set_the_newline_character_for_emitting_files:r(6659,3,"Set_the_newline_character_for_emitting_files_6659","Set the newline character for emitting files."),Disable_emitting_files_from_a_compilation:r(6660,3,"Disable_emitting_files_from_a_compilation_6660","Disable emitting files from a compilation."),Disable_generating_custom_helper_functions_like_extends_in_compiled_output:r(6661,3,"Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661","Disable generating custom helper functions like '__extends' in compiled output."),Disable_emitting_files_if_any_type_checking_errors_are_reported:r(6662,3,"Disable_emitting_files_if_any_type_checking_errors_are_reported_6662","Disable emitting files if any type checking errors are reported."),Disable_truncating_types_in_error_messages:r(6663,3,"Disable_truncating_types_in_error_messages_6663","Disable truncating types in error messages."),Enable_error_reporting_for_fallthrough_cases_in_switch_statements:r(6664,3,"Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664","Enable error reporting for fallthrough cases in switch statements."),Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type:r(6665,3,"Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665","Enable error reporting for expressions and declarations with an implied 'any' type."),Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier:r(6666,3,"Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666","Ensure overriding members in derived classes are marked with an override modifier."),Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function:r(6667,3,"Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667","Enable error reporting for codepaths that do not explicitly return in a function."),Enable_error_reporting_when_this_is_given_the_type_any:r(6668,3,"Enable_error_reporting_when_this_is_given_the_type_any_6668","Enable error reporting when 'this' is given the type 'any'."),Disable_adding_use_strict_directives_in_emitted_JavaScript_files:r(6669,3,"Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669","Disable adding 'use strict' directives in emitted JavaScript files."),Disable_including_any_library_files_including_the_default_lib_d_ts:r(6670,3,"Disable_including_any_library_files_including_the_default_lib_d_ts_6670","Disable including any library files, including the default lib.d.ts."),Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type:r(6671,3,"Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671","Enforces using indexed accessors for keys declared using an indexed type."),Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project:r(6672,3,"Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672","Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project."),Disable_strict_checking_of_generic_signatures_in_function_types:r(6673,3,"Disable_strict_checking_of_generic_signatures_in_function_types_6673","Disable strict checking of generic signatures in function types."),Add_undefined_to_a_type_when_accessed_using_an_index:r(6674,3,"Add_undefined_to_a_type_when_accessed_using_an_index_6674","Add 'undefined' to a type when accessed using an index."),Enable_error_reporting_when_local_variables_aren_t_read:r(6675,3,"Enable_error_reporting_when_local_variables_aren_t_read_6675","Enable error reporting when local variables aren't read."),Raise_an_error_when_a_function_parameter_isn_t_read:r(6676,3,"Raise_an_error_when_a_function_parameter_isn_t_read_6676","Raise an error when a function parameter isn't read."),Deprecated_setting_Use_outFile_instead:r(6677,3,"Deprecated_setting_Use_outFile_instead_6677","Deprecated setting. Use 'outFile' instead."),Specify_an_output_folder_for_all_emitted_files:r(6678,3,"Specify_an_output_folder_for_all_emitted_files_6678","Specify an output folder for all emitted files."),Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output:r(6679,3,"Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679","Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output."),Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations:r(6680,3,"Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680","Specify a set of entries that re-map imports to additional lookup locations."),Specify_a_list_of_language_service_plugins_to_include:r(6681,3,"Specify_a_list_of_language_service_plugins_to_include_6681","Specify a list of language service plugins to include."),Disable_erasing_const_enum_declarations_in_generated_code:r(6682,3,"Disable_erasing_const_enum_declarations_in_generated_code_6682","Disable erasing 'const enum' declarations in generated code."),Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node:r(6683,3,"Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683","Disable resolving symlinks to their realpath. This correlates to the same flag in node."),Disable_wiping_the_console_in_watch_mode:r(6684,3,"Disable_wiping_the_console_in_watch_mode_6684","Disable wiping the console in watch mode."),Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read:r(6685,3,"Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685","Enable color and formatting in TypeScript's output to make compiler errors easier to read."),Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit:r(6686,3,"Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686","Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit."),Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references:r(6687,3,"Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687","Specify an array of objects that specify paths for projects. Used in project references."),Disable_emitting_comments:r(6688,3,"Disable_emitting_comments_6688","Disable emitting comments."),Enable_importing_json_files:r(6689,3,"Enable_importing_json_files_6689","Enable importing .json files."),Specify_the_root_folder_within_your_source_files:r(6690,3,"Specify_the_root_folder_within_your_source_files_6690","Specify the root folder within your source files."),Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules:r(6691,3,"Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691","Allow multiple folders to be treated as one when resolving modules."),Skip_type_checking_d_ts_files_that_are_included_with_TypeScript:r(6692,3,"Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692","Skip type checking .d.ts files that are included with TypeScript."),Skip_type_checking_all_d_ts_files:r(6693,3,"Skip_type_checking_all_d_ts_files_6693","Skip type checking all .d.ts files."),Create_source_map_files_for_emitted_JavaScript_files:r(6694,3,"Create_source_map_files_for_emitted_JavaScript_files_6694","Create source map files for emitted JavaScript files."),Specify_the_root_path_for_debuggers_to_find_the_reference_source_code:r(6695,3,"Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695","Specify the root path for debuggers to find the reference source code."),Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function:r(6697,3,"Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697","Check that the arguments for 'bind', 'call', and 'apply' methods match the original function."),When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible:r(6698,3,"When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698","When assigning functions, check to ensure parameters and the return values are subtype-compatible."),When_type_checking_take_into_account_null_and_undefined:r(6699,3,"When_type_checking_take_into_account_null_and_undefined_6699","When type checking, take into account 'null' and 'undefined'."),Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor:r(6700,3,"Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700","Check for class properties that are declared but not set in the constructor."),Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments:r(6701,3,"Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701","Disable emitting declarations that have '@internal' in their JSDoc comments."),Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals:r(6702,3,"Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702","Disable reporting of excess property errors during the creation of object literals."),Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures:r(6703,3,"Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703","Suppress 'noImplicitAny' errors when indexing objects that lack index signatures."),Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively:r(6704,3,"Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704","Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."),Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations:r(6705,3,"Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705","Set the JavaScript language version for emitted JavaScript and include compatible library declarations."),Log_paths_used_during_the_moduleResolution_process:r(6706,3,"Log_paths_used_during_the_moduleResolution_process_6706","Log paths used during the 'moduleResolution' process."),Specify_the_path_to_tsbuildinfo_incremental_compilation_file:r(6707,3,"Specify_the_path_to_tsbuildinfo_incremental_compilation_file_6707","Specify the path to .tsbuildinfo incremental compilation file."),Specify_options_for_automatic_acquisition_of_declaration_files:r(6709,3,"Specify_options_for_automatic_acquisition_of_declaration_files_6709","Specify options for automatic acquisition of declaration files."),Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types:r(6710,3,"Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710","Specify multiple folders that act like './node_modules/@types'."),Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file:r(6711,3,"Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711","Specify type package names to be included without being referenced in a source file."),Emit_ECMAScript_standard_compliant_class_fields:r(6712,3,"Emit_ECMAScript_standard_compliant_class_fields_6712","Emit ECMAScript-standard-compliant class fields."),Enable_verbose_logging:r(6713,3,"Enable_verbose_logging_6713","Enable verbose logging."),Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality:r(6714,3,"Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714","Specify how directories are watched on systems that lack recursive file-watching functionality."),Specify_how_the_TypeScript_watch_mode_works:r(6715,3,"Specify_how_the_TypeScript_watch_mode_works_6715","Specify how the TypeScript watch mode works."),Require_undeclared_properties_from_index_signatures_to_use_element_accesses:r(6717,3,"Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717","Require undeclared properties from index signatures to use element accesses."),Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types:r(6718,3,"Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718","Specify emit/checking behavior for imports that are only used for types."),Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files:r(6719,3,"Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files_6719","Require sufficient annotation on exports so other tools can trivially generate declaration files."),Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any:r(6720,3,"Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any_6720","Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'."),Default_catch_clause_variables_as_unknown_instead_of_any:r(6803,3,"Default_catch_clause_variables_as_unknown_instead_of_any_6803","Default catch clause variables as 'unknown' instead of 'any'."),Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting:r(6804,3,"Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804","Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."),Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported:r(6805,3,"Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported_6805","Disable full type checking (only critical parse and emit errors will be reported)."),Check_side_effect_imports:r(6806,3,"Check_side_effect_imports_6806","Check side effect imports."),This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2:r(6807,1,"This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2_6807","This operation can be simplified. This shift is identical to `{0} {1} {2}`."),one_of_Colon:r(6900,3,"one_of_Colon_6900","one of:"),one_or_more_Colon:r(6901,3,"one_or_more_Colon_6901","one or more:"),type_Colon:r(6902,3,"type_Colon_6902","type:"),default_Colon:r(6903,3,"default_Colon_6903","default:"),module_system_or_esModuleInterop:r(6904,3,"module_system_or_esModuleInterop_6904",'module === "system" or esModuleInterop'),false_unless_strict_is_set:r(6905,3,"false_unless_strict_is_set_6905","`false`, unless `strict` is set"),false_unless_composite_is_set:r(6906,3,"false_unless_composite_is_set_6906","`false`, unless `composite` is set"),node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified:r(6907,3,"node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907",'`["node_modules", "bower_components", "jspm_packages"]`, plus the value of `outDir` if one is specified.'),if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk:r(6908,3,"if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908",'`[]` if `files` is specified, otherwise `["**/*"]`'),true_if_composite_false_otherwise:r(6909,3,"true_if_composite_false_otherwise_6909","`true` if `composite`, `false` otherwise"),module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node:r(69010,3,"module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010","module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`"),Computed_from_the_list_of_input_files:r(6911,3,"Computed_from_the_list_of_input_files_6911","Computed from the list of input files"),Platform_specific:r(6912,3,"Platform_specific_6912","Platform specific"),You_can_learn_about_all_of_the_compiler_options_at_0:r(6913,3,"You_can_learn_about_all_of_the_compiler_options_at_0_6913","You can learn about all of the compiler options at {0}"),Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon:r(6914,3,"Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914","Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:"),Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0:r(6915,3,"Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915","Using --build, -b will make tsc behave more like a build orchestrator than a compiler. This is used to trigger building composite projects which you can learn more about at {0}"),COMMON_COMMANDS:r(6916,3,"COMMON_COMMANDS_6916","COMMON COMMANDS"),ALL_COMPILER_OPTIONS:r(6917,3,"ALL_COMPILER_OPTIONS_6917","ALL COMPILER OPTIONS"),WATCH_OPTIONS:r(6918,3,"WATCH_OPTIONS_6918","WATCH OPTIONS"),BUILD_OPTIONS:r(6919,3,"BUILD_OPTIONS_6919","BUILD OPTIONS"),COMMON_COMPILER_OPTIONS:r(6920,3,"COMMON_COMPILER_OPTIONS_6920","COMMON COMPILER OPTIONS"),COMMAND_LINE_FLAGS:r(6921,3,"COMMAND_LINE_FLAGS_6921","COMMAND LINE FLAGS"),tsc_Colon_The_TypeScript_Compiler:r(6922,3,"tsc_Colon_The_TypeScript_Compiler_6922","tsc: The TypeScript Compiler"),Compiles_the_current_project_tsconfig_json_in_the_working_directory:r(6923,3,"Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923","Compiles the current project (tsconfig.json in the working directory.)"),Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options:r(6924,3,"Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924","Ignoring tsconfig.json, compiles the specified files with default compiler options."),Build_a_composite_project_in_the_working_directory:r(6925,3,"Build_a_composite_project_in_the_working_directory_6925","Build a composite project in the working directory."),Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory:r(6926,3,"Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926","Creates a tsconfig.json with the recommended settings in the working directory."),Compiles_the_TypeScript_project_located_at_the_specified_path:r(6927,3,"Compiles_the_TypeScript_project_located_at_the_specified_path_6927","Compiles the TypeScript project located at the specified path."),An_expanded_version_of_this_information_showing_all_possible_compiler_options:r(6928,3,"An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928","An expanded version of this information, showing all possible compiler options"),Compiles_the_current_project_with_additional_settings:r(6929,3,"Compiles_the_current_project_with_additional_settings_6929","Compiles the current project, with additional settings."),true_for_ES2022_and_above_including_ESNext:r(6930,3,"true_for_ES2022_and_above_including_ESNext_6930","`true` for ES2022 and above, including ESNext."),List_of_file_name_suffixes_to_search_when_resolving_a_module:r(6931,1,"List_of_file_name_suffixes_to_search_when_resolving_a_module_6931","List of file name suffixes to search when resolving a module."),Variable_0_implicitly_has_an_1_type:r(7005,1,"Variable_0_implicitly_has_an_1_type_7005","Variable '{0}' implicitly has an '{1}' type."),Parameter_0_implicitly_has_an_1_type:r(7006,1,"Parameter_0_implicitly_has_an_1_type_7006","Parameter '{0}' implicitly has an '{1}' type."),Member_0_implicitly_has_an_1_type:r(7008,1,"Member_0_implicitly_has_an_1_type_7008","Member '{0}' implicitly has an '{1}' type."),new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type:r(7009,1,"new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009","'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."),_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:r(7010,1,"_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010","'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."),Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:r(7011,1,"Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011","Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."),This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation:r(7012,1,"This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation_7012","This overload implicitly returns the type '{0}' because it lacks a return type annotation."),Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:r(7013,1,"Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013","Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."),Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:r(7014,1,"Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014","Function type, which lacks return-type annotation, implicitly has an '{0}' return type."),Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number:r(7015,1,"Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015","Element implicitly has an 'any' type because index expression is not of type 'number'."),Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type:r(7016,1,"Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016","Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type."),Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature:r(7017,1,"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017","Element implicitly has an 'any' type because type '{0}' has no index signature."),Object_literal_s_property_0_implicitly_has_an_1_type:r(7018,1,"Object_literal_s_property_0_implicitly_has_an_1_type_7018","Object literal's property '{0}' implicitly has an '{1}' type."),Rest_parameter_0_implicitly_has_an_any_type:r(7019,1,"Rest_parameter_0_implicitly_has_an_any_type_7019","Rest parameter '{0}' implicitly has an 'any[]' type."),Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:r(7020,1,"Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020","Call signature, which lacks return-type annotation, implicitly has an 'any' return type."),_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer:r(7022,1,"_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022","'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."),_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:r(7023,1,"_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023","'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:r(7024,1,"Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024","Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation:r(7025,1,"Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation_7025","Generator implicitly has yield type '{0}'. Consider supplying a return type annotation."),JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists:r(7026,1,"JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026","JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."),Unreachable_code_detected:r(7027,1,"Unreachable_code_detected_7027","Unreachable code detected.",!0),Unused_label:r(7028,1,"Unused_label_7028","Unused label.",!0),Fallthrough_case_in_switch:r(7029,1,"Fallthrough_case_in_switch_7029","Fallthrough case in switch."),Not_all_code_paths_return_a_value:r(7030,1,"Not_all_code_paths_return_a_value_7030","Not all code paths return a value."),Binding_element_0_implicitly_has_an_1_type:r(7031,1,"Binding_element_0_implicitly_has_an_1_type_7031","Binding element '{0}' implicitly has an '{1}' type."),Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation:r(7032,1,"Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032","Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation."),Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation:r(7033,1,"Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033","Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation."),Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined:r(7034,1,"Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034","Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined."),Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0:r(7035,1,"Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare__7035","Try `npm i --save-dev @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`"),Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0:r(7036,1,"Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036","Dynamic import's specifier must be of type 'string', but here has type '{0}'."),Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports:r(7037,3,"Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037","Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."),Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead:r(7038,3,"Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038","Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead."),Mapped_object_type_implicitly_has_an_any_template_type:r(7039,1,"Mapped_object_type_implicitly_has_an_any_template_type_7039","Mapped object type implicitly has an 'any' template type."),If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1:r(7040,1,"If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040","If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}'"),The_containing_arrow_function_captures_the_global_value_of_this:r(7041,1,"The_containing_arrow_function_captures_the_global_value_of_this_7041","The containing arrow function captures the global value of 'this'."),Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used:r(7042,1,"Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042","Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used."),Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:r(7043,2,"Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043","Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:r(7044,2,"Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044","Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:r(7045,2,"Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045","Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage:r(7046,2,"Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046","Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage."),Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage:r(7047,2,"Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047","Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage."),Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage:r(7048,2,"Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048","Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage."),Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage:r(7049,2,"Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049","Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage."),_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage:r(7050,2,"_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050","'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage."),Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1:r(7051,1,"Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051","Parameter has a name but no type. Did you mean '{0}: {1}'?"),Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1:r(7052,1,"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052","Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?"),Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1:r(7053,1,"Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053","Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'."),No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1:r(7054,1,"No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054","No index signature with a parameter of type '{0}' was found on type '{1}'."),_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type:r(7055,1,"_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055","'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type."),The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed:r(7056,1,"The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_ty_7056","The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed."),yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation:r(7057,1,"yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057","'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."),If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1:r(7058,1,"If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058","If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"),This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead:r(7059,1,"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059","This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."),This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint:r(7060,1,"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060","This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."),A_mapped_type_may_not_declare_properties_or_methods:r(7061,1,"A_mapped_type_may_not_declare_properties_or_methods_7061","A mapped type may not declare properties or methods."),You_cannot_rename_this_element:r(8e3,1,"You_cannot_rename_this_element_8000","You cannot rename this element."),You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library:r(8001,1,"You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001","You cannot rename elements that are defined in the standard TypeScript library."),import_can_only_be_used_in_TypeScript_files:r(8002,1,"import_can_only_be_used_in_TypeScript_files_8002","'import ... =' can only be used in TypeScript files."),export_can_only_be_used_in_TypeScript_files:r(8003,1,"export_can_only_be_used_in_TypeScript_files_8003","'export =' can only be used in TypeScript files."),Type_parameter_declarations_can_only_be_used_in_TypeScript_files:r(8004,1,"Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004","Type parameter declarations can only be used in TypeScript files."),implements_clauses_can_only_be_used_in_TypeScript_files:r(8005,1,"implements_clauses_can_only_be_used_in_TypeScript_files_8005","'implements' clauses can only be used in TypeScript files."),_0_declarations_can_only_be_used_in_TypeScript_files:r(8006,1,"_0_declarations_can_only_be_used_in_TypeScript_files_8006","'{0}' declarations can only be used in TypeScript files."),Type_aliases_can_only_be_used_in_TypeScript_files:r(8008,1,"Type_aliases_can_only_be_used_in_TypeScript_files_8008","Type aliases can only be used in TypeScript files."),The_0_modifier_can_only_be_used_in_TypeScript_files:r(8009,1,"The_0_modifier_can_only_be_used_in_TypeScript_files_8009","The '{0}' modifier can only be used in TypeScript files."),Type_annotations_can_only_be_used_in_TypeScript_files:r(8010,1,"Type_annotations_can_only_be_used_in_TypeScript_files_8010","Type annotations can only be used in TypeScript files."),Type_arguments_can_only_be_used_in_TypeScript_files:r(8011,1,"Type_arguments_can_only_be_used_in_TypeScript_files_8011","Type arguments can only be used in TypeScript files."),Parameter_modifiers_can_only_be_used_in_TypeScript_files:r(8012,1,"Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012","Parameter modifiers can only be used in TypeScript files."),Non_null_assertions_can_only_be_used_in_TypeScript_files:r(8013,1,"Non_null_assertions_can_only_be_used_in_TypeScript_files_8013","Non-null assertions can only be used in TypeScript files."),Type_assertion_expressions_can_only_be_used_in_TypeScript_files:r(8016,1,"Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016","Type assertion expressions can only be used in TypeScript files."),Signature_declarations_can_only_be_used_in_TypeScript_files:r(8017,1,"Signature_declarations_can_only_be_used_in_TypeScript_files_8017","Signature declarations can only be used in TypeScript files."),Report_errors_in_js_files:r(8019,3,"Report_errors_in_js_files_8019","Report errors in .js files."),JSDoc_types_can_only_be_used_inside_documentation_comments:r(8020,1,"JSDoc_types_can_only_be_used_inside_documentation_comments_8020","JSDoc types can only be used inside documentation comments."),JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags:r(8021,1,"JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021","JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."),JSDoc_0_is_not_attached_to_a_class:r(8022,1,"JSDoc_0_is_not_attached_to_a_class_8022","JSDoc '@{0}' is not attached to a class."),JSDoc_0_1_does_not_match_the_extends_2_clause:r(8023,1,"JSDoc_0_1_does_not_match_the_extends_2_clause_8023","JSDoc '@{0} {1}' does not match the 'extends {2}' clause."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name:r(8024,1,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024","JSDoc '@param' tag has name '{0}', but there is no parameter with that name."),Class_declarations_cannot_have_more_than_one_augments_or_extends_tag:r(8025,1,"Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025","Class declarations cannot have more than one '@augments' or '@extends' tag."),Expected_0_type_arguments_provide_these_with_an_extends_tag:r(8026,1,"Expected_0_type_arguments_provide_these_with_an_extends_tag_8026","Expected {0} type arguments; provide these with an '@extends' tag."),Expected_0_1_type_arguments_provide_these_with_an_extends_tag:r(8027,1,"Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027","Expected {0}-{1} type arguments; provide these with an '@extends' tag."),JSDoc_may_only_appear_in_the_last_parameter_of_a_signature:r(8028,1,"JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028","JSDoc '...' may only appear in the last parameter of a signature."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type:r(8029,1,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029","JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."),The_type_of_a_function_declaration_must_match_the_function_s_signature:r(8030,1,"The_type_of_a_function_declaration_must_match_the_function_s_signature_8030","The type of a function declaration must match the function's signature."),You_cannot_rename_a_module_via_a_global_import:r(8031,1,"You_cannot_rename_a_module_via_a_global_import_8031","You cannot rename a module via a global import."),Qualified_name_0_is_not_allowed_without_a_leading_param_object_1:r(8032,1,"Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032","Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."),A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags:r(8033,1,"A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033","A JSDoc '@typedef' comment may not contain multiple '@type' tags."),The_tag_was_first_specified_here:r(8034,1,"The_tag_was_first_specified_here_8034","The tag was first specified here."),You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder:r(8035,1,"You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035","You cannot rename elements that are defined in a 'node_modules' folder."),You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder:r(8036,1,"You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036","You cannot rename elements that are defined in another 'node_modules' folder."),Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files:r(8037,1,"Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037","Type satisfaction expressions can only be used in TypeScript files."),Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export:r(8038,1,"Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export_8038","Decorators may not appear after 'export' or 'export default' if they also appear before 'export'."),A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag:r(8039,1,"A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag_8039","A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag"),Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit:r(9005,1,"Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005","Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."),Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit:r(9006,1,"Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006","Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."),Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations:r(9007,1,"Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9007","Function must have an explicit return type annotation with --isolatedDeclarations."),Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations:r(9008,1,"Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9008","Method must have an explicit return type annotation with --isolatedDeclarations."),At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations:r(9009,1,"At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9009","At least one accessor must have an explicit type annotation with --isolatedDeclarations."),Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations:r(9010,1,"Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9010","Variable must have an explicit type annotation with --isolatedDeclarations."),Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations:r(9011,1,"Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9011","Parameter must have an explicit type annotation with --isolatedDeclarations."),Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations:r(9012,1,"Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9012","Property must have an explicit type annotation with --isolatedDeclarations."),Expression_type_can_t_be_inferred_with_isolatedDeclarations:r(9013,1,"Expression_type_can_t_be_inferred_with_isolatedDeclarations_9013","Expression type can't be inferred with --isolatedDeclarations."),Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations:r(9014,1,"Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedD_9014","Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations."),Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations:r(9015,1,"Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations_9015","Objects that contain spread assignments can't be inferred with --isolatedDeclarations."),Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations:r(9016,1,"Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations_9016","Objects that contain shorthand properties can't be inferred with --isolatedDeclarations."),Only_const_arrays_can_be_inferred_with_isolatedDeclarations:r(9017,1,"Only_const_arrays_can_be_inferred_with_isolatedDeclarations_9017","Only const arrays can be inferred with --isolatedDeclarations."),Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations:r(9018,1,"Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations_9018","Arrays with spread elements can't inferred with --isolatedDeclarations."),Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations:r(9019,1,"Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations_9019","Binding elements can't be exported directly with --isolatedDeclarations."),Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations:r(9020,1,"Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDecl_9020","Enum member initializers must be computable without references to external symbols with --isolatedDeclarations."),Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations:r(9021,1,"Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations_9021","Extends clause can't contain an expression with --isolatedDeclarations."),Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations:r(9022,1,"Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations_9022","Inference from class expressions is not supported with --isolatedDeclarations."),Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function:r(9023,1,"Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations__9023","Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function."),Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_supported_with_isolatedDeclarations:r(9025,1,"Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_sup_9025","Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations."),Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations:r(9026,1,"Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_support_9026","Declaration emit for this file requires preserving this import for augmentations. This is not supported with --isolatedDeclarations."),Add_a_type_annotation_to_the_variable_0:r(9027,1,"Add_a_type_annotation_to_the_variable_0_9027","Add a type annotation to the variable {0}."),Add_a_type_annotation_to_the_parameter_0:r(9028,1,"Add_a_type_annotation_to_the_parameter_0_9028","Add a type annotation to the parameter {0}."),Add_a_type_annotation_to_the_property_0:r(9029,1,"Add_a_type_annotation_to_the_property_0_9029","Add a type annotation to the property {0}."),Add_a_return_type_to_the_function_expression:r(9030,1,"Add_a_return_type_to_the_function_expression_9030","Add a return type to the function expression."),Add_a_return_type_to_the_function_declaration:r(9031,1,"Add_a_return_type_to_the_function_declaration_9031","Add a return type to the function declaration."),Add_a_return_type_to_the_get_accessor_declaration:r(9032,1,"Add_a_return_type_to_the_get_accessor_declaration_9032","Add a return type to the get accessor declaration."),Add_a_type_to_parameter_of_the_set_accessor_declaration:r(9033,1,"Add_a_type_to_parameter_of_the_set_accessor_declaration_9033","Add a type to parameter of the set accessor declaration."),Add_a_return_type_to_the_method:r(9034,1,"Add_a_return_type_to_the_method_9034","Add a return type to the method"),Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit:r(9035,1,"Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit_9035","Add satisfies and a type assertion to this expression (satisfies T as T) to make the type explicit."),Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it:r(9036,1,"Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it_9036","Move the expression in default export to a variable and add a type annotation to it."),Default_exports_can_t_be_inferred_with_isolatedDeclarations:r(9037,1,"Default_exports_can_t_be_inferred_with_isolatedDeclarations_9037","Default exports can't be inferred with --isolatedDeclarations."),Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations:r(9038,1,"Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations_9038","Computed property names on class or object literals cannot be inferred with --isolatedDeclarations."),Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations:r(9039,1,"Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations_9039","Type containing private name '{0}' can't be used with --isolatedDeclarations."),JSX_attributes_must_only_be_assigned_a_non_empty_expression:r(17e3,1,"JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000","JSX attributes must only be assigned a non-empty 'expression'."),JSX_elements_cannot_have_multiple_attributes_with_the_same_name:r(17001,1,"JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001","JSX elements cannot have multiple attributes with the same name."),Expected_corresponding_JSX_closing_tag_for_0:r(17002,1,"Expected_corresponding_JSX_closing_tag_for_0_17002","Expected corresponding JSX closing tag for '{0}'."),Cannot_use_JSX_unless_the_jsx_flag_is_provided:r(17004,1,"Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004","Cannot use JSX unless the '--jsx' flag is provided."),A_constructor_cannot_contain_a_super_call_when_its_class_extends_null:r(17005,1,"A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005","A constructor cannot contain a 'super' call when its class extends 'null'."),An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:r(17006,1,"An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006","An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:r(17007,1,"A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007","A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),JSX_element_0_has_no_corresponding_closing_tag:r(17008,1,"JSX_element_0_has_no_corresponding_closing_tag_17008","JSX element '{0}' has no corresponding closing tag."),super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class:r(17009,1,"super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009","'super' must be called before accessing 'this' in the constructor of a derived class."),Unknown_type_acquisition_option_0:r(17010,1,"Unknown_type_acquisition_option_0_17010","Unknown type acquisition option '{0}'."),super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class:r(17011,1,"super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011","'super' must be called before accessing a property of 'super' in the constructor of a derived class."),_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2:r(17012,1,"_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012","'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?"),Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor:r(17013,1,"Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013","Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor."),JSX_fragment_has_no_corresponding_closing_tag:r(17014,1,"JSX_fragment_has_no_corresponding_closing_tag_17014","JSX fragment has no corresponding closing tag."),Expected_corresponding_closing_tag_for_JSX_fragment:r(17015,1,"Expected_corresponding_closing_tag_for_JSX_fragment_17015","Expected corresponding closing tag for JSX fragment."),The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option:r(17016,1,"The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_com_17016","The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option."),An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments:r(17017,1,"An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments_17017","An @jsxFrag pragma is required when using an @jsx pragma with JSX fragments."),Unknown_type_acquisition_option_0_Did_you_mean_1:r(17018,1,"Unknown_type_acquisition_option_0_Did_you_mean_1_17018","Unknown type acquisition option '{0}'. Did you mean '{1}'?"),_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:r(17019,1,"_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17019","'{0}' at the end of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"),_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:r(17020,1,"_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17020","'{0}' at the start of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"),Unicode_escape_sequence_cannot_appear_here:r(17021,1,"Unicode_escape_sequence_cannot_appear_here_17021","Unicode escape sequence cannot appear here."),Circularity_detected_while_resolving_configuration_Colon_0:r(18e3,1,"Circularity_detected_while_resolving_configuration_Colon_0_18000","Circularity detected while resolving configuration: {0}"),The_files_list_in_config_file_0_is_empty:r(18002,1,"The_files_list_in_config_file_0_is_empty_18002","The 'files' list in config file '{0}' is empty."),No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2:r(18003,1,"No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003","No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."),File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module:r(80001,2,"File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001","File is a CommonJS module; it may be converted to an ES module."),This_constructor_function_may_be_converted_to_a_class_declaration:r(80002,2,"This_constructor_function_may_be_converted_to_a_class_declaration_80002","This constructor function may be converted to a class declaration."),Import_may_be_converted_to_a_default_import:r(80003,2,"Import_may_be_converted_to_a_default_import_80003","Import may be converted to a default import."),JSDoc_types_may_be_moved_to_TypeScript_types:r(80004,2,"JSDoc_types_may_be_moved_to_TypeScript_types_80004","JSDoc types may be moved to TypeScript types."),require_call_may_be_converted_to_an_import:r(80005,2,"require_call_may_be_converted_to_an_import_80005","'require' call may be converted to an import."),This_may_be_converted_to_an_async_function:r(80006,2,"This_may_be_converted_to_an_async_function_80006","This may be converted to an async function."),await_has_no_effect_on_the_type_of_this_expression:r(80007,2,"await_has_no_effect_on_the_type_of_this_expression_80007","'await' has no effect on the type of this expression."),Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers:r(80008,2,"Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008","Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers."),JSDoc_typedef_may_be_converted_to_TypeScript_type:r(80009,2,"JSDoc_typedef_may_be_converted_to_TypeScript_type_80009","JSDoc typedef may be converted to TypeScript type."),JSDoc_typedefs_may_be_converted_to_TypeScript_types:r(80010,2,"JSDoc_typedefs_may_be_converted_to_TypeScript_types_80010","JSDoc typedefs may be converted to TypeScript types."),Add_missing_super_call:r(90001,3,"Add_missing_super_call_90001","Add missing 'super()' call"),Make_super_call_the_first_statement_in_the_constructor:r(90002,3,"Make_super_call_the_first_statement_in_the_constructor_90002","Make 'super()' call the first statement in the constructor"),Change_extends_to_implements:r(90003,3,"Change_extends_to_implements_90003","Change 'extends' to 'implements'"),Remove_unused_declaration_for_Colon_0:r(90004,3,"Remove_unused_declaration_for_Colon_0_90004","Remove unused declaration for: '{0}'"),Remove_import_from_0:r(90005,3,"Remove_import_from_0_90005","Remove import from '{0}'"),Implement_interface_0:r(90006,3,"Implement_interface_0_90006","Implement interface '{0}'"),Implement_inherited_abstract_class:r(90007,3,"Implement_inherited_abstract_class_90007","Implement inherited abstract class"),Add_0_to_unresolved_variable:r(90008,3,"Add_0_to_unresolved_variable_90008","Add '{0}.' to unresolved variable"),Remove_variable_statement:r(90010,3,"Remove_variable_statement_90010","Remove variable statement"),Remove_template_tag:r(90011,3,"Remove_template_tag_90011","Remove template tag"),Remove_type_parameters:r(90012,3,"Remove_type_parameters_90012","Remove type parameters"),Import_0_from_1:r(90013,3,"Import_0_from_1_90013",`Import '{0}' from "{1}"`),Change_0_to_1:r(90014,3,"Change_0_to_1_90014","Change '{0}' to '{1}'"),Declare_property_0:r(90016,3,"Declare_property_0_90016","Declare property '{0}'"),Add_index_signature_for_property_0:r(90017,3,"Add_index_signature_for_property_0_90017","Add index signature for property '{0}'"),Disable_checking_for_this_file:r(90018,3,"Disable_checking_for_this_file_90018","Disable checking for this file"),Ignore_this_error_message:r(90019,3,"Ignore_this_error_message_90019","Ignore this error message"),Initialize_property_0_in_the_constructor:r(90020,3,"Initialize_property_0_in_the_constructor_90020","Initialize property '{0}' in the constructor"),Initialize_static_property_0:r(90021,3,"Initialize_static_property_0_90021","Initialize static property '{0}'"),Change_spelling_to_0:r(90022,3,"Change_spelling_to_0_90022","Change spelling to '{0}'"),Declare_method_0:r(90023,3,"Declare_method_0_90023","Declare method '{0}'"),Declare_static_method_0:r(90024,3,"Declare_static_method_0_90024","Declare static method '{0}'"),Prefix_0_with_an_underscore:r(90025,3,"Prefix_0_with_an_underscore_90025","Prefix '{0}' with an underscore"),Rewrite_as_the_indexed_access_type_0:r(90026,3,"Rewrite_as_the_indexed_access_type_0_90026","Rewrite as the indexed access type '{0}'"),Declare_static_property_0:r(90027,3,"Declare_static_property_0_90027","Declare static property '{0}'"),Call_decorator_expression:r(90028,3,"Call_decorator_expression_90028","Call decorator expression"),Add_async_modifier_to_containing_function:r(90029,3,"Add_async_modifier_to_containing_function_90029","Add async modifier to containing function"),Replace_infer_0_with_unknown:r(90030,3,"Replace_infer_0_with_unknown_90030","Replace 'infer {0}' with 'unknown'"),Replace_all_unused_infer_with_unknown:r(90031,3,"Replace_all_unused_infer_with_unknown_90031","Replace all unused 'infer' with 'unknown'"),Add_parameter_name:r(90034,3,"Add_parameter_name_90034","Add parameter name"),Declare_private_property_0:r(90035,3,"Declare_private_property_0_90035","Declare private property '{0}'"),Replace_0_with_Promise_1:r(90036,3,"Replace_0_with_Promise_1_90036","Replace '{0}' with 'Promise<{1}>'"),Fix_all_incorrect_return_type_of_an_async_functions:r(90037,3,"Fix_all_incorrect_return_type_of_an_async_functions_90037","Fix all incorrect return type of an async functions"),Declare_private_method_0:r(90038,3,"Declare_private_method_0_90038","Declare private method '{0}'"),Remove_unused_destructuring_declaration:r(90039,3,"Remove_unused_destructuring_declaration_90039","Remove unused destructuring declaration"),Remove_unused_declarations_for_Colon_0:r(90041,3,"Remove_unused_declarations_for_Colon_0_90041","Remove unused declarations for: '{0}'"),Declare_a_private_field_named_0:r(90053,3,"Declare_a_private_field_named_0_90053","Declare a private field named '{0}'."),Includes_imports_of_types_referenced_by_0:r(90054,3,"Includes_imports_of_types_referenced_by_0_90054","Includes imports of types referenced by '{0}'"),Remove_type_from_import_declaration_from_0:r(90055,3,"Remove_type_from_import_declaration_from_0_90055",`Remove 'type' from import declaration from "{0}"`),Remove_type_from_import_of_0_from_1:r(90056,3,"Remove_type_from_import_of_0_from_1_90056",`Remove 'type' from import of '{0}' from "{1}"`),Add_import_from_0:r(90057,3,"Add_import_from_0_90057",'Add import from "{0}"'),Update_import_from_0:r(90058,3,"Update_import_from_0_90058",'Update import from "{0}"'),Export_0_from_module_1:r(90059,3,"Export_0_from_module_1_90059","Export '{0}' from module '{1}'"),Export_all_referenced_locals:r(90060,3,"Export_all_referenced_locals_90060","Export all referenced locals"),Update_modifiers_of_0:r(90061,3,"Update_modifiers_of_0_90061","Update modifiers of '{0}'"),Add_annotation_of_type_0:r(90062,3,"Add_annotation_of_type_0_90062","Add annotation of type '{0}'"),Add_return_type_0:r(90063,3,"Add_return_type_0_90063","Add return type '{0}'"),Extract_base_class_to_variable:r(90064,3,"Extract_base_class_to_variable_90064","Extract base class to variable"),Extract_default_export_to_variable:r(90065,3,"Extract_default_export_to_variable_90065","Extract default export to variable"),Extract_binding_expressions_to_variable:r(90066,3,"Extract_binding_expressions_to_variable_90066","Extract binding expressions to variable"),Add_all_missing_type_annotations:r(90067,3,"Add_all_missing_type_annotations_90067","Add all missing type annotations"),Add_satisfies_and_an_inline_type_assertion_with_0:r(90068,3,"Add_satisfies_and_an_inline_type_assertion_with_0_90068","Add satisfies and an inline type assertion with '{0}'"),Extract_to_variable_and_replace_with_0_as_typeof_0:r(90069,3,"Extract_to_variable_and_replace_with_0_as_typeof_0_90069","Extract to variable and replace with '{0} as typeof {0}'"),Mark_array_literal_as_const:r(90070,3,"Mark_array_literal_as_const_90070","Mark array literal as const"),Annotate_types_of_properties_expando_function_in_a_namespace:r(90071,3,"Annotate_types_of_properties_expando_function_in_a_namespace_90071","Annotate types of properties expando function in a namespace"),Convert_function_to_an_ES2015_class:r(95001,3,"Convert_function_to_an_ES2015_class_95001","Convert function to an ES2015 class"),Convert_0_to_1_in_0:r(95003,3,"Convert_0_to_1_in_0_95003","Convert '{0}' to '{1} in {0}'"),Extract_to_0_in_1:r(95004,3,"Extract_to_0_in_1_95004","Extract to {0} in {1}"),Extract_function:r(95005,3,"Extract_function_95005","Extract function"),Extract_constant:r(95006,3,"Extract_constant_95006","Extract constant"),Extract_to_0_in_enclosing_scope:r(95007,3,"Extract_to_0_in_enclosing_scope_95007","Extract to {0} in enclosing scope"),Extract_to_0_in_1_scope:r(95008,3,"Extract_to_0_in_1_scope_95008","Extract to {0} in {1} scope"),Annotate_with_type_from_JSDoc:r(95009,3,"Annotate_with_type_from_JSDoc_95009","Annotate with type from JSDoc"),Infer_type_of_0_from_usage:r(95011,3,"Infer_type_of_0_from_usage_95011","Infer type of '{0}' from usage"),Infer_parameter_types_from_usage:r(95012,3,"Infer_parameter_types_from_usage_95012","Infer parameter types from usage"),Convert_to_default_import:r(95013,3,"Convert_to_default_import_95013","Convert to default import"),Install_0:r(95014,3,"Install_0_95014","Install '{0}'"),Replace_import_with_0:r(95015,3,"Replace_import_with_0_95015","Replace import with '{0}'."),Use_synthetic_default_member:r(95016,3,"Use_synthetic_default_member_95016","Use synthetic 'default' member."),Convert_to_ES_module:r(95017,3,"Convert_to_ES_module_95017","Convert to ES module"),Add_undefined_type_to_property_0:r(95018,3,"Add_undefined_type_to_property_0_95018","Add 'undefined' type to property '{0}'"),Add_initializer_to_property_0:r(95019,3,"Add_initializer_to_property_0_95019","Add initializer to property '{0}'"),Add_definite_assignment_assertion_to_property_0:r(95020,3,"Add_definite_assignment_assertion_to_property_0_95020","Add definite assignment assertion to property '{0}'"),Convert_all_type_literals_to_mapped_type:r(95021,3,"Convert_all_type_literals_to_mapped_type_95021","Convert all type literals to mapped type"),Add_all_missing_members:r(95022,3,"Add_all_missing_members_95022","Add all missing members"),Infer_all_types_from_usage:r(95023,3,"Infer_all_types_from_usage_95023","Infer all types from usage"),Delete_all_unused_declarations:r(95024,3,"Delete_all_unused_declarations_95024","Delete all unused declarations"),Prefix_all_unused_declarations_with_where_possible:r(95025,3,"Prefix_all_unused_declarations_with_where_possible_95025","Prefix all unused declarations with '_' where possible"),Fix_all_detected_spelling_errors:r(95026,3,"Fix_all_detected_spelling_errors_95026","Fix all detected spelling errors"),Add_initializers_to_all_uninitialized_properties:r(95027,3,"Add_initializers_to_all_uninitialized_properties_95027","Add initializers to all uninitialized properties"),Add_definite_assignment_assertions_to_all_uninitialized_properties:r(95028,3,"Add_definite_assignment_assertions_to_all_uninitialized_properties_95028","Add definite assignment assertions to all uninitialized properties"),Add_undefined_type_to_all_uninitialized_properties:r(95029,3,"Add_undefined_type_to_all_uninitialized_properties_95029","Add undefined type to all uninitialized properties"),Change_all_jsdoc_style_types_to_TypeScript:r(95030,3,"Change_all_jsdoc_style_types_to_TypeScript_95030","Change all jsdoc-style types to TypeScript"),Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types:r(95031,3,"Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031","Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)"),Implement_all_unimplemented_interfaces:r(95032,3,"Implement_all_unimplemented_interfaces_95032","Implement all unimplemented interfaces"),Install_all_missing_types_packages:r(95033,3,"Install_all_missing_types_packages_95033","Install all missing types packages"),Rewrite_all_as_indexed_access_types:r(95034,3,"Rewrite_all_as_indexed_access_types_95034","Rewrite all as indexed access types"),Convert_all_to_default_imports:r(95035,3,"Convert_all_to_default_imports_95035","Convert all to default imports"),Make_all_super_calls_the_first_statement_in_their_constructor:r(95036,3,"Make_all_super_calls_the_first_statement_in_their_constructor_95036","Make all 'super()' calls the first statement in their constructor"),Add_qualifier_to_all_unresolved_variables_matching_a_member_name:r(95037,3,"Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037","Add qualifier to all unresolved variables matching a member name"),Change_all_extended_interfaces_to_implements:r(95038,3,"Change_all_extended_interfaces_to_implements_95038","Change all extended interfaces to 'implements'"),Add_all_missing_super_calls:r(95039,3,"Add_all_missing_super_calls_95039","Add all missing super calls"),Implement_all_inherited_abstract_classes:r(95040,3,"Implement_all_inherited_abstract_classes_95040","Implement all inherited abstract classes"),Add_all_missing_async_modifiers:r(95041,3,"Add_all_missing_async_modifiers_95041","Add all missing 'async' modifiers"),Add_ts_ignore_to_all_error_messages:r(95042,3,"Add_ts_ignore_to_all_error_messages_95042","Add '@ts-ignore' to all error messages"),Annotate_everything_with_types_from_JSDoc:r(95043,3,"Annotate_everything_with_types_from_JSDoc_95043","Annotate everything with types from JSDoc"),Add_to_all_uncalled_decorators:r(95044,3,"Add_to_all_uncalled_decorators_95044","Add '()' to all uncalled decorators"),Convert_all_constructor_functions_to_classes:r(95045,3,"Convert_all_constructor_functions_to_classes_95045","Convert all constructor functions to classes"),Generate_get_and_set_accessors:r(95046,3,"Generate_get_and_set_accessors_95046","Generate 'get' and 'set' accessors"),Convert_require_to_import:r(95047,3,"Convert_require_to_import_95047","Convert 'require' to 'import'"),Convert_all_require_to_import:r(95048,3,"Convert_all_require_to_import_95048","Convert all 'require' to 'import'"),Move_to_a_new_file:r(95049,3,"Move_to_a_new_file_95049","Move to a new file"),Remove_unreachable_code:r(95050,3,"Remove_unreachable_code_95050","Remove unreachable code"),Remove_all_unreachable_code:r(95051,3,"Remove_all_unreachable_code_95051","Remove all unreachable code"),Add_missing_typeof:r(95052,3,"Add_missing_typeof_95052","Add missing 'typeof'"),Remove_unused_label:r(95053,3,"Remove_unused_label_95053","Remove unused label"),Remove_all_unused_labels:r(95054,3,"Remove_all_unused_labels_95054","Remove all unused labels"),Convert_0_to_mapped_object_type:r(95055,3,"Convert_0_to_mapped_object_type_95055","Convert '{0}' to mapped object type"),Convert_namespace_import_to_named_imports:r(95056,3,"Convert_namespace_import_to_named_imports_95056","Convert namespace import to named imports"),Convert_named_imports_to_namespace_import:r(95057,3,"Convert_named_imports_to_namespace_import_95057","Convert named imports to namespace import"),Add_or_remove_braces_in_an_arrow_function:r(95058,3,"Add_or_remove_braces_in_an_arrow_function_95058","Add or remove braces in an arrow function"),Add_braces_to_arrow_function:r(95059,3,"Add_braces_to_arrow_function_95059","Add braces to arrow function"),Remove_braces_from_arrow_function:r(95060,3,"Remove_braces_from_arrow_function_95060","Remove braces from arrow function"),Convert_default_export_to_named_export:r(95061,3,"Convert_default_export_to_named_export_95061","Convert default export to named export"),Convert_named_export_to_default_export:r(95062,3,"Convert_named_export_to_default_export_95062","Convert named export to default export"),Add_missing_enum_member_0:r(95063,3,"Add_missing_enum_member_0_95063","Add missing enum member '{0}'"),Add_all_missing_imports:r(95064,3,"Add_all_missing_imports_95064","Add all missing imports"),Convert_to_async_function:r(95065,3,"Convert_to_async_function_95065","Convert to async function"),Convert_all_to_async_functions:r(95066,3,"Convert_all_to_async_functions_95066","Convert all to async functions"),Add_missing_call_parentheses:r(95067,3,"Add_missing_call_parentheses_95067","Add missing call parentheses"),Add_all_missing_call_parentheses:r(95068,3,"Add_all_missing_call_parentheses_95068","Add all missing call parentheses"),Add_unknown_conversion_for_non_overlapping_types:r(95069,3,"Add_unknown_conversion_for_non_overlapping_types_95069","Add 'unknown' conversion for non-overlapping types"),Add_unknown_to_all_conversions_of_non_overlapping_types:r(95070,3,"Add_unknown_to_all_conversions_of_non_overlapping_types_95070","Add 'unknown' to all conversions of non-overlapping types"),Add_missing_new_operator_to_call:r(95071,3,"Add_missing_new_operator_to_call_95071","Add missing 'new' operator to call"),Add_missing_new_operator_to_all_calls:r(95072,3,"Add_missing_new_operator_to_all_calls_95072","Add missing 'new' operator to all calls"),Add_names_to_all_parameters_without_names:r(95073,3,"Add_names_to_all_parameters_without_names_95073","Add names to all parameters without names"),Enable_the_experimentalDecorators_option_in_your_configuration_file:r(95074,3,"Enable_the_experimentalDecorators_option_in_your_configuration_file_95074","Enable the 'experimentalDecorators' option in your configuration file"),Convert_parameters_to_destructured_object:r(95075,3,"Convert_parameters_to_destructured_object_95075","Convert parameters to destructured object"),Extract_type:r(95077,3,"Extract_type_95077","Extract type"),Extract_to_type_alias:r(95078,3,"Extract_to_type_alias_95078","Extract to type alias"),Extract_to_typedef:r(95079,3,"Extract_to_typedef_95079","Extract to typedef"),Infer_this_type_of_0_from_usage:r(95080,3,"Infer_this_type_of_0_from_usage_95080","Infer 'this' type of '{0}' from usage"),Add_const_to_unresolved_variable:r(95081,3,"Add_const_to_unresolved_variable_95081","Add 'const' to unresolved variable"),Add_const_to_all_unresolved_variables:r(95082,3,"Add_const_to_all_unresolved_variables_95082","Add 'const' to all unresolved variables"),Add_await:r(95083,3,"Add_await_95083","Add 'await'"),Add_await_to_initializer_for_0:r(95084,3,"Add_await_to_initializer_for_0_95084","Add 'await' to initializer for '{0}'"),Fix_all_expressions_possibly_missing_await:r(95085,3,"Fix_all_expressions_possibly_missing_await_95085","Fix all expressions possibly missing 'await'"),Remove_unnecessary_await:r(95086,3,"Remove_unnecessary_await_95086","Remove unnecessary 'await'"),Remove_all_unnecessary_uses_of_await:r(95087,3,"Remove_all_unnecessary_uses_of_await_95087","Remove all unnecessary uses of 'await'"),Enable_the_jsx_flag_in_your_configuration_file:r(95088,3,"Enable_the_jsx_flag_in_your_configuration_file_95088","Enable the '--jsx' flag in your configuration file"),Add_await_to_initializers:r(95089,3,"Add_await_to_initializers_95089","Add 'await' to initializers"),Extract_to_interface:r(95090,3,"Extract_to_interface_95090","Extract to interface"),Convert_to_a_bigint_numeric_literal:r(95091,3,"Convert_to_a_bigint_numeric_literal_95091","Convert to a bigint numeric literal"),Convert_all_to_bigint_numeric_literals:r(95092,3,"Convert_all_to_bigint_numeric_literals_95092","Convert all to bigint numeric literals"),Convert_const_to_let:r(95093,3,"Convert_const_to_let_95093","Convert 'const' to 'let'"),Prefix_with_declare:r(95094,3,"Prefix_with_declare_95094","Prefix with 'declare'"),Prefix_all_incorrect_property_declarations_with_declare:r(95095,3,"Prefix_all_incorrect_property_declarations_with_declare_95095","Prefix all incorrect property declarations with 'declare'"),Convert_to_template_string:r(95096,3,"Convert_to_template_string_95096","Convert to template string"),Add_export_to_make_this_file_into_a_module:r(95097,3,"Add_export_to_make_this_file_into_a_module_95097","Add 'export {}' to make this file into a module"),Set_the_target_option_in_your_configuration_file_to_0:r(95098,3,"Set_the_target_option_in_your_configuration_file_to_0_95098","Set the 'target' option in your configuration file to '{0}'"),Set_the_module_option_in_your_configuration_file_to_0:r(95099,3,"Set_the_module_option_in_your_configuration_file_to_0_95099","Set the 'module' option in your configuration file to '{0}'"),Convert_invalid_character_to_its_html_entity_code:r(95100,3,"Convert_invalid_character_to_its_html_entity_code_95100","Convert invalid character to its html entity code"),Convert_all_invalid_characters_to_HTML_entity_code:r(95101,3,"Convert_all_invalid_characters_to_HTML_entity_code_95101","Convert all invalid characters to HTML entity code"),Convert_all_const_to_let:r(95102,3,"Convert_all_const_to_let_95102","Convert all 'const' to 'let'"),Convert_function_expression_0_to_arrow_function:r(95105,3,"Convert_function_expression_0_to_arrow_function_95105","Convert function expression '{0}' to arrow function"),Convert_function_declaration_0_to_arrow_function:r(95106,3,"Convert_function_declaration_0_to_arrow_function_95106","Convert function declaration '{0}' to arrow function"),Fix_all_implicit_this_errors:r(95107,3,"Fix_all_implicit_this_errors_95107","Fix all implicit-'this' errors"),Wrap_invalid_character_in_an_expression_container:r(95108,3,"Wrap_invalid_character_in_an_expression_container_95108","Wrap invalid character in an expression container"),Wrap_all_invalid_characters_in_an_expression_container:r(95109,3,"Wrap_all_invalid_characters_in_an_expression_container_95109","Wrap all invalid characters in an expression container"),Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file:r(95110,3,"Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110","Visit https://aka.ms/tsconfig to read more about this file"),Add_a_return_statement:r(95111,3,"Add_a_return_statement_95111","Add a return statement"),Remove_braces_from_arrow_function_body:r(95112,3,"Remove_braces_from_arrow_function_body_95112","Remove braces from arrow function body"),Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal:r(95113,3,"Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113","Wrap the following body with parentheses which should be an object literal"),Add_all_missing_return_statement:r(95114,3,"Add_all_missing_return_statement_95114","Add all missing return statement"),Remove_braces_from_all_arrow_function_bodies_with_relevant_issues:r(95115,3,"Remove_braces_from_all_arrow_function_bodies_with_relevant_issues_95115","Remove braces from all arrow function bodies with relevant issues"),Wrap_all_object_literal_with_parentheses:r(95116,3,"Wrap_all_object_literal_with_parentheses_95116","Wrap all object literal with parentheses"),Move_labeled_tuple_element_modifiers_to_labels:r(95117,3,"Move_labeled_tuple_element_modifiers_to_labels_95117","Move labeled tuple element modifiers to labels"),Convert_overload_list_to_single_signature:r(95118,3,"Convert_overload_list_to_single_signature_95118","Convert overload list to single signature"),Generate_get_and_set_accessors_for_all_overriding_properties:r(95119,3,"Generate_get_and_set_accessors_for_all_overriding_properties_95119","Generate 'get' and 'set' accessors for all overriding properties"),Wrap_in_JSX_fragment:r(95120,3,"Wrap_in_JSX_fragment_95120","Wrap in JSX fragment"),Wrap_all_unparented_JSX_in_JSX_fragment:r(95121,3,"Wrap_all_unparented_JSX_in_JSX_fragment_95121","Wrap all unparented JSX in JSX fragment"),Convert_arrow_function_or_function_expression:r(95122,3,"Convert_arrow_function_or_function_expression_95122","Convert arrow function or function expression"),Convert_to_anonymous_function:r(95123,3,"Convert_to_anonymous_function_95123","Convert to anonymous function"),Convert_to_named_function:r(95124,3,"Convert_to_named_function_95124","Convert to named function"),Convert_to_arrow_function:r(95125,3,"Convert_to_arrow_function_95125","Convert to arrow function"),Remove_parentheses:r(95126,3,"Remove_parentheses_95126","Remove parentheses"),Could_not_find_a_containing_arrow_function:r(95127,3,"Could_not_find_a_containing_arrow_function_95127","Could not find a containing arrow function"),Containing_function_is_not_an_arrow_function:r(95128,3,"Containing_function_is_not_an_arrow_function_95128","Containing function is not an arrow function"),Could_not_find_export_statement:r(95129,3,"Could_not_find_export_statement_95129","Could not find export statement"),This_file_already_has_a_default_export:r(95130,3,"This_file_already_has_a_default_export_95130","This file already has a default export"),Could_not_find_import_clause:r(95131,3,"Could_not_find_import_clause_95131","Could not find import clause"),Could_not_find_namespace_import_or_named_imports:r(95132,3,"Could_not_find_namespace_import_or_named_imports_95132","Could not find namespace import or named imports"),Selection_is_not_a_valid_type_node:r(95133,3,"Selection_is_not_a_valid_type_node_95133","Selection is not a valid type node"),No_type_could_be_extracted_from_this_type_node:r(95134,3,"No_type_could_be_extracted_from_this_type_node_95134","No type could be extracted from this type node"),Could_not_find_property_for_which_to_generate_accessor:r(95135,3,"Could_not_find_property_for_which_to_generate_accessor_95135","Could not find property for which to generate accessor"),Name_is_not_valid:r(95136,3,"Name_is_not_valid_95136","Name is not valid"),Can_only_convert_property_with_modifier:r(95137,3,"Can_only_convert_property_with_modifier_95137","Can only convert property with modifier"),Switch_each_misused_0_to_1:r(95138,3,"Switch_each_misused_0_to_1_95138","Switch each misused '{0}' to '{1}'"),Convert_to_optional_chain_expression:r(95139,3,"Convert_to_optional_chain_expression_95139","Convert to optional chain expression"),Could_not_find_convertible_access_expression:r(95140,3,"Could_not_find_convertible_access_expression_95140","Could not find convertible access expression"),Could_not_find_matching_access_expressions:r(95141,3,"Could_not_find_matching_access_expressions_95141","Could not find matching access expressions"),Can_only_convert_logical_AND_access_chains:r(95142,3,"Can_only_convert_logical_AND_access_chains_95142","Can only convert logical AND access chains"),Add_void_to_Promise_resolved_without_a_value:r(95143,3,"Add_void_to_Promise_resolved_without_a_value_95143","Add 'void' to Promise resolved without a value"),Add_void_to_all_Promises_resolved_without_a_value:r(95144,3,"Add_void_to_all_Promises_resolved_without_a_value_95144","Add 'void' to all Promises resolved without a value"),Use_element_access_for_0:r(95145,3,"Use_element_access_for_0_95145","Use element access for '{0}'"),Use_element_access_for_all_undeclared_properties:r(95146,3,"Use_element_access_for_all_undeclared_properties_95146","Use element access for all undeclared properties."),Delete_all_unused_imports:r(95147,3,"Delete_all_unused_imports_95147","Delete all unused imports"),Infer_function_return_type:r(95148,3,"Infer_function_return_type_95148","Infer function return type"),Return_type_must_be_inferred_from_a_function:r(95149,3,"Return_type_must_be_inferred_from_a_function_95149","Return type must be inferred from a function"),Could_not_determine_function_return_type:r(95150,3,"Could_not_determine_function_return_type_95150","Could not determine function return type"),Could_not_convert_to_arrow_function:r(95151,3,"Could_not_convert_to_arrow_function_95151","Could not convert to arrow function"),Could_not_convert_to_named_function:r(95152,3,"Could_not_convert_to_named_function_95152","Could not convert to named function"),Could_not_convert_to_anonymous_function:r(95153,3,"Could_not_convert_to_anonymous_function_95153","Could not convert to anonymous function"),Can_only_convert_string_concatenations_and_string_literals:r(95154,3,"Can_only_convert_string_concatenations_and_string_literals_95154","Can only convert string concatenations and string literals"),Selection_is_not_a_valid_statement_or_statements:r(95155,3,"Selection_is_not_a_valid_statement_or_statements_95155","Selection is not a valid statement or statements"),Add_missing_function_declaration_0:r(95156,3,"Add_missing_function_declaration_0_95156","Add missing function declaration '{0}'"),Add_all_missing_function_declarations:r(95157,3,"Add_all_missing_function_declarations_95157","Add all missing function declarations"),Method_not_implemented:r(95158,3,"Method_not_implemented_95158","Method not implemented."),Function_not_implemented:r(95159,3,"Function_not_implemented_95159","Function not implemented."),Add_override_modifier:r(95160,3,"Add_override_modifier_95160","Add 'override' modifier"),Remove_override_modifier:r(95161,3,"Remove_override_modifier_95161","Remove 'override' modifier"),Add_all_missing_override_modifiers:r(95162,3,"Add_all_missing_override_modifiers_95162","Add all missing 'override' modifiers"),Remove_all_unnecessary_override_modifiers:r(95163,3,"Remove_all_unnecessary_override_modifiers_95163","Remove all unnecessary 'override' modifiers"),Can_only_convert_named_export:r(95164,3,"Can_only_convert_named_export_95164","Can only convert named export"),Add_missing_properties:r(95165,3,"Add_missing_properties_95165","Add missing properties"),Add_all_missing_properties:r(95166,3,"Add_all_missing_properties_95166","Add all missing properties"),Add_missing_attributes:r(95167,3,"Add_missing_attributes_95167","Add missing attributes"),Add_all_missing_attributes:r(95168,3,"Add_all_missing_attributes_95168","Add all missing attributes"),Add_undefined_to_optional_property_type:r(95169,3,"Add_undefined_to_optional_property_type_95169","Add 'undefined' to optional property type"),Convert_named_imports_to_default_import:r(95170,3,"Convert_named_imports_to_default_import_95170","Convert named imports to default import"),Delete_unused_param_tag_0:r(95171,3,"Delete_unused_param_tag_0_95171","Delete unused '@param' tag '{0}'"),Delete_all_unused_param_tags:r(95172,3,"Delete_all_unused_param_tags_95172","Delete all unused '@param' tags"),Rename_param_tag_name_0_to_1:r(95173,3,"Rename_param_tag_name_0_to_1_95173","Rename '@param' tag name '{0}' to '{1}'"),Use_0:r(95174,3,"Use_0_95174","Use `{0}`."),Use_Number_isNaN_in_all_conditions:r(95175,3,"Use_Number_isNaN_in_all_conditions_95175","Use `Number.isNaN` in all conditions."),Convert_typedef_to_TypeScript_type:r(95176,3,"Convert_typedef_to_TypeScript_type_95176","Convert typedef to TypeScript type."),Convert_all_typedef_to_TypeScript_types:r(95177,3,"Convert_all_typedef_to_TypeScript_types_95177","Convert all typedef to TypeScript types."),Move_to_file:r(95178,3,"Move_to_file_95178","Move to file"),Cannot_move_to_file_selected_file_is_invalid:r(95179,3,"Cannot_move_to_file_selected_file_is_invalid_95179","Cannot move to file, selected file is invalid"),Use_import_type:r(95180,3,"Use_import_type_95180","Use 'import type'"),Use_type_0:r(95181,3,"Use_type_0_95181","Use 'type {0}'"),Fix_all_with_type_only_imports:r(95182,3,"Fix_all_with_type_only_imports_95182","Fix all with type-only imports"),Cannot_move_statements_to_the_selected_file:r(95183,3,"Cannot_move_statements_to_the_selected_file_95183","Cannot move statements to the selected file"),Inline_variable:r(95184,3,"Inline_variable_95184","Inline variable"),Could_not_find_variable_to_inline:r(95185,3,"Could_not_find_variable_to_inline_95185","Could not find variable to inline."),Variables_with_multiple_declarations_cannot_be_inlined:r(95186,3,"Variables_with_multiple_declarations_cannot_be_inlined_95186","Variables with multiple declarations cannot be inlined."),Add_missing_comma_for_object_member_completion_0:r(95187,3,"Add_missing_comma_for_object_member_completion_0_95187","Add missing comma for object member completion '{0}'."),Add_missing_parameter_to_0:r(95188,3,"Add_missing_parameter_to_0_95188","Add missing parameter to '{0}'"),Add_missing_parameters_to_0:r(95189,3,"Add_missing_parameters_to_0_95189","Add missing parameters to '{0}'"),Add_all_missing_parameters:r(95190,3,"Add_all_missing_parameters_95190","Add all missing parameters"),Add_optional_parameter_to_0:r(95191,3,"Add_optional_parameter_to_0_95191","Add optional parameter to '{0}'"),Add_optional_parameters_to_0:r(95192,3,"Add_optional_parameters_to_0_95192","Add optional parameters to '{0}'"),Add_all_optional_parameters:r(95193,3,"Add_all_optional_parameters_95193","Add all optional parameters"),Wrap_in_parentheses:r(95194,3,"Wrap_in_parentheses_95194","Wrap in parentheses"),Wrap_all_invalid_decorator_expressions_in_parentheses:r(95195,3,"Wrap_all_invalid_decorator_expressions_in_parentheses_95195","Wrap all invalid decorator expressions in parentheses"),Add_resolution_mode_import_attribute:r(95196,3,"Add_resolution_mode_import_attribute_95196","Add 'resolution-mode' import attribute"),Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it:r(95197,3,"Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it_95197","Add 'resolution-mode' import attribute to all type-only imports that need it"),No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer:r(18004,1,"No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004","No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),Classes_may_not_have_a_field_named_constructor:r(18006,1,"Classes_may_not_have_a_field_named_constructor_18006","Classes may not have a field named 'constructor'."),JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array:r(18007,1,"JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007","JSX expressions may not use the comma operator. Did you mean to write an array?"),Private_identifiers_cannot_be_used_as_parameters:r(18009,1,"Private_identifiers_cannot_be_used_as_parameters_18009","Private identifiers cannot be used as parameters."),An_accessibility_modifier_cannot_be_used_with_a_private_identifier:r(18010,1,"An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010","An accessibility modifier cannot be used with a private identifier."),The_operand_of_a_delete_operator_cannot_be_a_private_identifier:r(18011,1,"The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011","The operand of a 'delete' operator cannot be a private identifier."),constructor_is_a_reserved_word:r(18012,1,"constructor_is_a_reserved_word_18012","'#constructor' is a reserved word."),Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier:r(18013,1,"Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013","Property '{0}' is not accessible outside class '{1}' because it has a private identifier."),The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling:r(18014,1,"The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014","The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling."),Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2:r(18015,1,"Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015","Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'."),Private_identifiers_are_not_allowed_outside_class_bodies:r(18016,1,"Private_identifiers_are_not_allowed_outside_class_bodies_18016","Private identifiers are not allowed outside class bodies."),The_shadowing_declaration_of_0_is_defined_here:r(18017,1,"The_shadowing_declaration_of_0_is_defined_here_18017","The shadowing declaration of '{0}' is defined here"),The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here:r(18018,1,"The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018","The declaration of '{0}' that you probably intended to use is defined here"),_0_modifier_cannot_be_used_with_a_private_identifier:r(18019,1,"_0_modifier_cannot_be_used_with_a_private_identifier_18019","'{0}' modifier cannot be used with a private identifier."),An_enum_member_cannot_be_named_with_a_private_identifier:r(18024,1,"An_enum_member_cannot_be_named_with_a_private_identifier_18024","An enum member cannot be named with a private identifier."),can_only_be_used_at_the_start_of_a_file:r(18026,1,"can_only_be_used_at_the_start_of_a_file_18026","'#!' can only be used at the start of a file."),Compiler_reserves_name_0_when_emitting_private_identifier_downlevel:r(18027,1,"Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027","Compiler reserves name '{0}' when emitting private identifier downlevel."),Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher:r(18028,1,"Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028","Private identifiers are only available when targeting ECMAScript 2015 and higher."),Private_identifiers_are_not_allowed_in_variable_declarations:r(18029,1,"Private_identifiers_are_not_allowed_in_variable_declarations_18029","Private identifiers are not allowed in variable declarations."),An_optional_chain_cannot_contain_private_identifiers:r(18030,1,"An_optional_chain_cannot_contain_private_identifiers_18030","An optional chain cannot contain private identifiers."),The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents:r(18031,1,"The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031","The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents."),The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some:r(18032,1,"The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032","The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some."),Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values:r(18033,1,"Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values_18033","Type '{0}' is not assignable to type '{1}' as required for computed enum member values."),Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment:r(18034,3,"Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034","Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."),Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name:r(18035,1,"Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035","Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name."),Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator:r(18036,1,"Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036","Class decorators can't be used with static private identifier. Consider removing the experimental decorator."),await_expression_cannot_be_used_inside_a_class_static_block:r(18037,1,"await_expression_cannot_be_used_inside_a_class_static_block_18037","'await' expression cannot be used inside a class static block."),for_await_loops_cannot_be_used_inside_a_class_static_block:r(18038,1,"for_await_loops_cannot_be_used_inside_a_class_static_block_18038","'for await' loops cannot be used inside a class static block."),Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block:r(18039,1,"Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039","Invalid use of '{0}'. It cannot be used inside a class static block."),A_return_statement_cannot_be_used_inside_a_class_static_block:r(18041,1,"A_return_statement_cannot_be_used_inside_a_class_static_block_18041","A 'return' statement cannot be used inside a class static block."),_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation:r(18042,1,"_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042","'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."),Types_cannot_appear_in_export_declarations_in_JavaScript_files:r(18043,1,"Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043","Types cannot appear in export declarations in JavaScript files."),_0_is_automatically_exported_here:r(18044,3,"_0_is_automatically_exported_here_18044","'{0}' is automatically exported here."),Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher:r(18045,1,"Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045","Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."),_0_is_of_type_unknown:r(18046,1,"_0_is_of_type_unknown_18046","'{0}' is of type 'unknown'."),_0_is_possibly_null:r(18047,1,"_0_is_possibly_null_18047","'{0}' is possibly 'null'."),_0_is_possibly_undefined:r(18048,1,"_0_is_possibly_undefined_18048","'{0}' is possibly 'undefined'."),_0_is_possibly_null_or_undefined:r(18049,1,"_0_is_possibly_null_or_undefined_18049","'{0}' is possibly 'null' or 'undefined'."),The_value_0_cannot_be_used_here:r(18050,1,"The_value_0_cannot_be_used_here_18050","The value '{0}' cannot be used here."),Compiler_option_0_cannot_be_given_an_empty_string:r(18051,1,"Compiler_option_0_cannot_be_given_an_empty_string_18051","Compiler option '{0}' cannot be given an empty string."),Its_type_0_is_not_a_valid_JSX_element_type:r(18053,1,"Its_type_0_is_not_a_valid_JSX_element_type_18053","Its type '{0}' is not a valid JSX element type."),await_using_statements_cannot_be_used_inside_a_class_static_block:r(18054,1,"await_using_statements_cannot_be_used_inside_a_class_static_block_18054","'await using' statements cannot be used inside a class static block."),_0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is_enabled:r(18055,1,"_0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is__18055","'{0}' has a string type, but must have syntactically recognizable string syntax when 'isolatedModules' is enabled."),Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is_enabled:r(18056,1,"Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is__18056","Enum member following a non-literal numeric member must have an initializer when 'isolatedModules' is enabled."),String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es2020:r(18057,1,"String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es_18057","String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'.")};function wt(e){return e>=80}function Yy(e){return e===32||wt(e)}var rf={abstract:128,accessor:129,any:133,as:130,asserts:131,assert:132,bigint:163,boolean:136,break:83,case:84,catch:85,class:86,continue:88,const:87,constructor:137,debugger:89,declare:138,default:90,delete:91,do:92,else:93,enum:94,export:95,extends:96,false:97,finally:98,for:99,from:161,function:100,get:139,if:101,implements:119,import:102,in:103,infer:140,instanceof:104,interface:120,intrinsic:141,is:142,keyof:143,let:121,module:144,namespace:145,never:146,new:105,null:106,number:150,object:151,package:122,private:123,protected:124,public:125,override:164,out:147,readonly:148,require:149,global:162,return:107,satisfies:152,set:153,static:126,string:154,super:108,switch:109,symbol:155,this:110,throw:111,true:112,try:113,type:156,typeof:114,undefined:157,unique:158,unknown:159,using:160,var:115,void:116,while:117,with:118,yield:127,async:134,await:135,of:165},Xy=new Map(Object.entries(rf)),Um=new Map(Object.entries({...rf,"{":19,"}":20,"(":21,")":22,"[":23,"]":24,".":25,"...":26,";":27,",":28,"<":30,">":32,"<=":33,">=":34,"==":35,"!=":36,"===":37,"!==":38,"=>":39,"+":40,"-":41,"**":43,"*":42,"/":44,"%":45,"++":46,"--":47,"<<":48,">":49,">>>":50,"&":51,"|":52,"^":53,"!":54,"~":55,"&&":56,"||":57,"?":58,"??":61,"?.":29,":":59,"=":64,"+=":65,"-=":66,"*=":67,"**=":68,"/=":69,"%=":70,"<<=":71,">>=":72,">>>=":73,"&=":74,"|=":75,"^=":79,"||=":76,"&&=":77,"??=":78,"@":60,"#":63,"`":62})),Bm=new Map([[100,1],[103,2],[105,4],[109,8],[115,16],[117,32],[118,64],[121,128]]),Hy=new Map([[1,Q_.RegularExpressionFlagsHasIndices],[16,Q_.RegularExpressionFlagsDotAll],[32,Q_.RegularExpressionFlagsUnicode],[64,Q_.RegularExpressionFlagsUnicodeSets],[128,Q_.RegularExpressionFlagsSticky]]),$y=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1319,1329,1366,1369,1369,1377,1415,1488,1514,1520,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2208,2208,2210,2220,2308,2361,2365,2365,2384,2384,2392,2401,2417,2423,2425,2431,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3133,3160,3161,3168,3169,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3294,3294,3296,3297,3313,3314,3333,3340,3342,3344,3346,3386,3389,3389,3406,3406,3424,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5905,5920,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6263,6272,6312,6314,6314,6320,6389,6400,6428,6480,6509,6512,6516,6528,6571,6593,6599,6656,6678,6688,6740,6823,6823,6917,6963,6981,6987,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7401,7404,7406,7409,7413,7414,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11823,11823,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42647,42656,42735,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43648,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],Qy=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1319,1329,1366,1369,1369,1377,1415,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1520,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2048,2093,2112,2139,2208,2208,2210,2220,2276,2302,2304,2403,2406,2415,2417,2423,2425,2431,2433,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2902,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3140,3142,3144,3146,3149,3157,3158,3160,3161,3168,3171,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3299,3302,3311,3313,3314,3330,3331,3333,3340,3342,3344,3346,3386,3389,3396,3398,3400,3402,3406,3415,3415,3424,3427,3430,3439,3450,3455,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3769,3771,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5908,5920,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6160,6169,6176,6263,6272,6314,6320,6389,6400,6428,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6617,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6912,6987,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7376,7378,7380,7414,7424,7654,7676,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8204,8205,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,11823,11823,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12442,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42647,42655,42737,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43047,43072,43123,43136,43204,43216,43225,43232,43255,43259,43259,43264,43309,43312,43347,43360,43388,43392,43456,43471,43481,43520,43574,43584,43597,43600,43609,43616,43638,43642,43643,43648,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65062,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],Ky=[65,90,97,122,170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,895,895,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1327,1329,1366,1369,1369,1376,1416,1488,1514,1519,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2144,2154,2160,2183,2185,2190,2208,2249,2308,2361,2365,2365,2384,2384,2392,2401,2417,2432,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2556,2556,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2809,2809,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3129,3133,3133,3160,3162,3165,3165,3168,3169,3200,3200,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3293,3294,3296,3297,3313,3314,3332,3340,3342,3344,3346,3386,3389,3389,3406,3406,3412,3414,3423,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5109,5112,5117,5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888,5905,5919,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6264,6272,6312,6314,6314,6320,6389,6400,6430,6480,6509,6512,6516,6528,6571,6576,6601,6656,6678,6688,6740,6823,6823,6917,6963,6981,6988,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7296,7304,7312,7354,7357,7359,7401,7404,7406,7411,7413,7414,7418,7418,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12443,12447,12449,12538,12540,12543,12549,12591,12593,12686,12704,12735,12784,12799,13312,19903,19968,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42653,42656,42735,42775,42783,42786,42888,42891,42954,42960,42961,42963,42963,42965,42969,42994,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43261,43262,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43488,43492,43494,43503,43514,43518,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43646,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43824,43866,43868,43881,43888,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,65856,65908,66176,66204,66208,66256,66304,66335,66349,66378,66384,66421,66432,66461,66464,66499,66504,66511,66513,66517,66560,66717,66736,66771,66776,66811,66816,66855,66864,66915,66928,66938,66940,66954,66956,66962,66964,66965,66967,66977,66979,66993,66995,67001,67003,67004,67072,67382,67392,67413,67424,67431,67456,67461,67463,67504,67506,67514,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096,68096,68112,68115,68117,68119,68121,68149,68192,68220,68224,68252,68288,68295,68297,68324,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680,68736,68786,68800,68850,68864,68899,69248,69289,69296,69297,69376,69404,69415,69415,69424,69445,69488,69505,69552,69572,69600,69622,69635,69687,69745,69746,69749,69749,69763,69807,69840,69864,69891,69926,69956,69956,69959,69959,69968,70002,70006,70006,70019,70066,70081,70084,70106,70106,70108,70108,70144,70161,70163,70187,70207,70208,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312,70320,70366,70405,70412,70415,70416,70419,70440,70442,70448,70450,70451,70453,70457,70461,70461,70480,70480,70493,70497,70656,70708,70727,70730,70751,70753,70784,70831,70852,70853,70855,70855,71040,71086,71128,71131,71168,71215,71236,71236,71296,71338,71352,71352,71424,71450,71488,71494,71680,71723,71840,71903,71935,71942,71945,71945,71948,71955,71957,71958,71960,71983,71999,71999,72001,72001,72096,72103,72106,72144,72161,72161,72163,72163,72192,72192,72203,72242,72250,72250,72272,72272,72284,72329,72349,72349,72368,72440,72704,72712,72714,72750,72768,72768,72818,72847,72960,72966,72968,72969,72971,73008,73030,73030,73056,73061,73063,73064,73066,73097,73112,73112,73440,73458,73474,73474,73476,73488,73490,73523,73648,73648,73728,74649,74752,74862,74880,75075,77712,77808,77824,78895,78913,78918,82944,83526,92160,92728,92736,92766,92784,92862,92880,92909,92928,92975,92992,92995,93027,93047,93053,93071,93760,93823,93952,94026,94032,94032,94099,94111,94176,94177,94179,94179,94208,100343,100352,101589,101632,101640,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,113664,113770,113776,113788,113792,113800,113808,113817,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770,120772,120779,122624,122654,122661,122666,122928,122989,123136,123180,123191,123197,123214,123214,123536,123565,123584,123627,124112,124139,124896,124902,124904,124907,124909,124910,124912,124926,124928,125124,125184,125251,125259,125259,126464,126467,126469,126495,126497,126498,126500,126500,126503,126503,126505,126514,126516,126519,126521,126521,126523,126523,126530,126530,126535,126535,126537,126537,126539,126539,126541,126543,126545,126546,126548,126548,126551,126551,126553,126553,126555,126555,126557,126557,126559,126559,126561,126562,126564,126564,126567,126570,126572,126578,126580,126583,126585,126588,126590,126590,126592,126601,126603,126619,126625,126627,126629,126633,126635,126651,131072,173791,173824,177977,177984,178205,178208,183969,183984,191456,191472,192093,194560,195101,196608,201546,201552,205743],Zy=[48,57,65,90,95,95,97,122,170,170,181,181,183,183,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,895,895,902,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1327,1329,1366,1369,1369,1376,1416,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1519,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2045,2045,2048,2093,2112,2139,2144,2154,2160,2183,2185,2190,2200,2273,2275,2403,2406,2415,2417,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2556,2556,2558,2558,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2809,2815,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2901,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3072,3084,3086,3088,3090,3112,3114,3129,3132,3140,3142,3144,3146,3149,3157,3158,3160,3162,3165,3165,3168,3171,3174,3183,3200,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3293,3294,3296,3299,3302,3311,3313,3315,3328,3340,3342,3344,3346,3396,3398,3400,3402,3406,3412,3415,3423,3427,3430,3439,3450,3455,3457,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3558,3567,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3773,3776,3780,3782,3782,3784,3790,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4969,4977,4992,5007,5024,5109,5112,5117,5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888,5909,5919,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6159,6169,6176,6264,6272,6314,6320,6389,6400,6430,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6618,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6832,6845,6847,6862,6912,6988,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7296,7304,7312,7354,7357,7359,7376,7378,7380,7418,7424,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8204,8205,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12447,12449,12543,12549,12591,12593,12686,12704,12735,12784,12799,13312,19903,19968,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42737,42775,42783,42786,42888,42891,42954,42960,42961,42963,42963,42965,42969,42994,43047,43052,43052,43072,43123,43136,43205,43216,43225,43232,43255,43259,43259,43261,43309,43312,43347,43360,43388,43392,43456,43471,43481,43488,43518,43520,43574,43584,43597,43600,43609,43616,43638,43642,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43824,43866,43868,43881,43888,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65071,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65381,65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,65856,65908,66045,66045,66176,66204,66208,66256,66272,66272,66304,66335,66349,66378,66384,66426,66432,66461,66464,66499,66504,66511,66513,66517,66560,66717,66720,66729,66736,66771,66776,66811,66816,66855,66864,66915,66928,66938,66940,66954,66956,66962,66964,66965,66967,66977,66979,66993,66995,67001,67003,67004,67072,67382,67392,67413,67424,67431,67456,67461,67463,67504,67506,67514,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096,68099,68101,68102,68108,68115,68117,68119,68121,68149,68152,68154,68159,68159,68192,68220,68224,68252,68288,68295,68297,68326,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680,68736,68786,68800,68850,68864,68903,68912,68921,69248,69289,69291,69292,69296,69297,69373,69404,69415,69415,69424,69456,69488,69509,69552,69572,69600,69622,69632,69702,69734,69749,69759,69818,69826,69826,69840,69864,69872,69881,69888,69940,69942,69951,69956,69959,69968,70003,70006,70006,70016,70084,70089,70092,70094,70106,70108,70108,70144,70161,70163,70199,70206,70209,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312,70320,70378,70384,70393,70400,70403,70405,70412,70415,70416,70419,70440,70442,70448,70450,70451,70453,70457,70459,70468,70471,70472,70475,70477,70480,70480,70487,70487,70493,70499,70502,70508,70512,70516,70656,70730,70736,70745,70750,70753,70784,70853,70855,70855,70864,70873,71040,71093,71096,71104,71128,71133,71168,71232,71236,71236,71248,71257,71296,71352,71360,71369,71424,71450,71453,71467,71472,71481,71488,71494,71680,71738,71840,71913,71935,71942,71945,71945,71948,71955,71957,71958,71960,71989,71991,71992,71995,72003,72016,72025,72096,72103,72106,72151,72154,72161,72163,72164,72192,72254,72263,72263,72272,72345,72349,72349,72368,72440,72704,72712,72714,72758,72760,72768,72784,72793,72818,72847,72850,72871,72873,72886,72960,72966,72968,72969,72971,73014,73018,73018,73020,73021,73023,73031,73040,73049,73056,73061,73063,73064,73066,73102,73104,73105,73107,73112,73120,73129,73440,73462,73472,73488,73490,73530,73534,73538,73552,73561,73648,73648,73728,74649,74752,74862,74880,75075,77712,77808,77824,78895,78912,78933,82944,83526,92160,92728,92736,92766,92768,92777,92784,92862,92864,92873,92880,92909,92912,92916,92928,92982,92992,92995,93008,93017,93027,93047,93053,93071,93760,93823,93952,94026,94031,94087,94095,94111,94176,94177,94179,94180,94192,94193,94208,100343,100352,101589,101632,101640,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,113664,113770,113776,113788,113792,113800,113808,113817,113821,113822,118528,118573,118576,118598,119141,119145,119149,119154,119163,119170,119173,119179,119210,119213,119362,119364,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770,120772,120779,120782,120831,121344,121398,121403,121452,121461,121461,121476,121476,121499,121503,121505,121519,122624,122654,122661,122666,122880,122886,122888,122904,122907,122913,122915,122916,122918,122922,122928,122989,123023,123023,123136,123180,123184,123197,123200,123209,123214,123214,123536,123566,123584,123641,124112,124153,124896,124902,124904,124907,124909,124910,124912,124926,124928,125124,125136,125142,125184,125259,125264,125273,126464,126467,126469,126495,126497,126498,126500,126500,126503,126503,126505,126514,126516,126519,126521,126521,126523,126523,126530,126530,126535,126535,126537,126537,126539,126539,126541,126543,126545,126546,126548,126548,126551,126551,126553,126553,126555,126555,126557,126557,126559,126559,126561,126562,126564,126564,126567,126570,126572,126578,126580,126583,126585,126588,126590,126590,126592,126601,126603,126619,126625,126627,126629,126633,126635,126651,130032,130041,131072,173791,173824,177977,177984,178205,178208,183969,183984,191456,191472,192093,194560,195101,196608,201546,201552,205743,917760,917999],eg=/^\/\/\/?\s*@(ts-expect-error|ts-ignore)/,tg=/^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/,ng=/@(?:see|link)/i;function ml(e,t){if(e=2?ml(e,Ky):ml(e,$y)}function ig(e,t){return t>=2?ml(e,Zy):ml(e,Qy)}function qm(e){let t=[];return e.forEach((a,o)=>{t[a]=o}),t}var ag=qm(Um);function it(e){return ag[e]}function zm(e){return Um.get(e)}var Y4=qm(Bm);function Dd(e){return Bm.get(e)}function Fm(e){let t=[],a=0,o=0;for(;a127&&Cn(m)&&(t.push(o),o=a);break}}return t.push(o),t}function _g(e,t,a,o,m){(t<0||t>=e.length)&&(m?t=t<0?0:t>=e.length?e.length-1:t:B.fail(`Bad line number. Line: ${t}, lineStarts.length: ${e.length} , line map is correct? ${o!==void 0?ly(e,Fm(o)):"unknown"}`));let v=e[t]+a;return m?v>e[t+1]?e[t+1]:typeof o=="string"&&v>o.length?o.length:v:(t=8192&&e<=8203||e===8239||e===8287||e===12288||e===65279}function Cn(e){return e===10||e===13||e===8232||e===8233}function fi(e){return e>=48&&e<=57}function Tp(e){return fi(e)||e>=65&&e<=70||e>=97&&e<=102}function af(e){return e>=65&&e<=90||e>=97&&e<=122}function Wm(e){return af(e)||fi(e)||e===95}function xp(e){return e>=48&&e<=55}function Ar(e,t,a,o,m){if(fs(t))return t;let v=!1;for(;;){let A=e.charCodeAt(t);switch(A){case 13:e.charCodeAt(t+1)===10&&t++;case 10:if(t++,a)return t;v=!!m;continue;case 9:case 11:case 12:case 32:t++;continue;case 47:if(o)break;if(e.charCodeAt(t+1)===47){for(t+=2;t127&&Ba(A)){t++;continue}break}return t}}var ol=7;function Wi(e,t){if(B.assert(t>=0),t===0||Cn(e.charCodeAt(t-1))){let a=e.charCodeAt(t);if(t+ol=0&&a127&&Ba(I)){y&&Cn(I)&&(h=!0),a++;continue}break e}}return y&&(x=m(P,l,Q,h,v,x)),x}function Xm(e,t,a,o){return Sl(!1,e,t,!1,a,o)}function Hm(e,t,a,o){return Sl(!1,e,t,!0,a,o)}function cg(e,t,a,o,m){return Sl(!0,e,t,!1,a,o,m)}function lg(e,t,a,o,m){return Sl(!0,e,t,!0,a,o,m)}function $m(e,t,a,o,m,v=[]){return v.push({kind:a,pos:e,end:t,hasTrailingNewLine:o}),v}function Lp(e,t){return cg(e,t,$m,void 0,void 0)}function ug(e,t){return lg(e,t,$m,void 0,void 0)}function sf(e){let t=_f.exec(e);if(t)return t[0]}function Zn(e,t){return af(e)||e===36||e===95||e>127&&rg(e,t)}function Er(e,t,a){return Wm(e)||e===36||(a===1?e===45||e===58:!1)||e>127&&ig(e,t)}function pg(e,t,a){let o=Gi(e,0);if(!Zn(o,t))return!1;for(let m=Ft(o);mh,getStartPos:()=>h,getTokenEnd:()=>l,getTextPos:()=>l,getToken:()=>g,getTokenStart:()=>y,getTokenPos:()=>y,getTokenText:()=>P.substring(y,l),getTokenValue:()=>x,hasUnicodeEscape:()=>(I&1024)!==0,hasExtendedUnicodeEscape:()=>(I&8)!==0,hasPrecedingLineBreak:()=>(I&1)!==0,hasPrecedingJSDocComment:()=>(I&2)!==0,hasPrecedingJSDocLeadingAsterisks:()=>(I&32768)!==0,isIdentifier:()=>g===80||g>118,isReservedWord:()=>g>=83&&g<=118,isUnterminated:()=>(I&4)!==0,getCommentDirectives:()=>re,getNumericLiteralFlags:()=>I&25584,getTokenFlags:()=>I,reScanGreaterToken:lt,reScanAsteriskEqualsToken:ar,reScanSlashToken:mt,reScanTemplateToken:Bt,reScanTemplateHeadOrNoSubstitutionTemplate:rn,scanJsxIdentifier:Nr,scanJsxAttributeValue:Vn,reScanJsxAttributeValue:Ce,reScanJsxToken:_r,reScanLessThanToken:fr,reScanHashToken:dr,reScanQuestionToken:zn,reScanInvalidIdentifier:Ut,scanJsxToken:Fn,scanJsDocToken:L,scanJSDocCommentTextToken:mr,scan:ct,getText:Ke,clearCommentDirectives:st,setText:Dt,setScriptTarget:ut,setLanguageVariant:Ir,setScriptKind:hr,setJSDocParsingMode:Mn,setOnError:Tt,resetTokenState:Wn,setTextPos:Wn,setSkipJsDocLeadingAsterisks:Si,tryScan:He,lookAhead:Te,scanRange:fe};return B.isDebugging&&Object.defineProperty(M,"__debugShowCurrentPositionInText",{get:()=>{let R=M.getText();return R.slice(0,M.getTokenFullStart())+"\u2551"+R.slice(M.getTokenFullStart())}}),M;function ae(R){return Gi(P,R)}function Oe(R){return R>=0&&R=0&&R=65&&be<=70)be+=32;else if(!(be>=48&&be<=57||be>=97&&be<=102))break;xe.push(be),l++,we=!1}return xe.length=Q){K+=P.substring(xe,l),I|=4,W(E.Unterminated_string_literal);break}let Se=V(l);if(Se===$){K+=P.substring(xe,l),l++;break}if(Se===92&&!R){K+=P.substring(xe,l),K+=Ot(3),xe=l;continue}if((Se===10||Se===13)&&!R){K+=P.substring(xe,l),I|=4,W(E.Unterminated_string_literal);break}l++}return K}function Pr(R){let $=V(l)===96;l++;let K=l,xe="",Se;for(;;){if(l>=Q){xe+=P.substring(K,l),I|=4,W(E.Unterminated_template_literal),Se=$?15:18;break}let we=V(l);if(we===96){xe+=P.substring(K,l),l++,Se=$?15:18;break}if(we===36&&l+1=Q)return W(E.Unexpected_end_of_text),"";let K=V(l);switch(l++,K){case 48:if(l>=Q||!fi(V(l)))return"\0";case 49:case 50:case 51:l=55296&&xe<=56319&&l+6=56320&&We<=57343)return l=be,Se+String.fromCharCode(We)}return Se;case 120:for(;l<$+4;l++)if(!(l1114111&&(R&&W(E.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive,K,l-K),we=!0),l>=Q?(R&&W(E.Unexpected_end_of_text),we=!0):V(l)===125?l++:(R&&W(E.Unterminated_Unicode_escape_sequence),we=!0),we?(I|=2048,P.substring($,l)):(I|=8,Pd(Se))}function On(){if(l+5=0&&Er(K,e)){R+=Bn(!0),$=l;continue}if(K=On(),!(K>=0&&Er(K,e)))break;I|=1024,R+=P.substring($,l),R+=Pd(K),l+=6,$=l}else break}return R+=P.substring($,l),R}function Qe(){let R=x.length;if(R>=2&&R<=12){let $=x.charCodeAt(0);if($>=97&&$<=122){let K=Xy.get(x);if(K!==void 0)return g=K}}return g=80}function qn(R){let $="",K=!1,xe=!1;for(;;){let Se=V(l);if(Se===95){I|=512,K?(K=!1,xe=!0):W(xe?E.Multiple_consecutive_numeric_separators_are_not_permitted:E.Numeric_separators_are_not_allowed_here,l,1),l++;continue}if(K=!0,!fi(Se)||Se-48>=R)break;$+=P[l],l++,xe=!1}return V(l-1)===95&&W(E.Numeric_separators_are_not_allowed_here,l-1,1),$}function $t(){return V(l)===110?(x+="n",I&384&&(x=Sb(x)+"n"),l++,10):(x=""+(I&128?parseInt(x.slice(2),2):I&256?parseInt(x.slice(2),8):+x),9)}function ct(){for(h=l,I=0;;){if(y=l,l>=Q)return g=1;let R=ae(l);if(l===0&&R===35&&Gm(P,l)){if(l=Ym(P,l),t)continue;return g=6}switch(R){case 10:case 13:if(I|=1,t){l++;continue}else return R===13&&l+1=0&&Zn($,e))return x=Bn(!0)+vt(),g=Qe();let K=On();return K>=0&&Zn(K,e)?(l+=6,I|=1024,x=String.fromCharCode(K)+vt(),g=Qe()):(W(E.Invalid_character),l++,g=0);case 35:if(l!==0&&P[l+1]==="!")return W(E.can_only_be_used_at_the_start_of_a_file,l,2),l++,g=0;let xe=ae(l+1);if(xe===92){l++;let be=Mt();if(be>=0&&Zn(be,e))return x="#"+Bn(!0)+vt(),g=81;let We=On();if(We>=0&&Zn(We,e))return l+=6,I|=1024,x="#"+String.fromCharCode(We)+vt(),g=81;l--}return Zn(xe,e)?(l++,Jt(xe,e)):(x="#",W(E.Invalid_character,l++,Ft(R))),g=81;case 65533:return W(E.File_appears_to_be_binary,0,0),l=Q,g=8;default:let Se=Jt(R,e);if(Se)return g=Se;if(rs(R)){l+=Ft(R);continue}else if(Cn(R)){I|=1,l+=Ft(R);continue}let we=Ft(R);return W(E.Invalid_character,l,we),l+=we,g=0}}}function _t(){switch(de){case 0:return!0;case 1:return!1}return ye!==3&&ye!==4?!0:de===3?!1:ng.test(P.slice(h,l))}function Ut(){B.assert(g===0,"'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'."),l=y=h,I=0;let R=ae(l),$=Jt(R,99);return $?g=$:(l+=Ft(R),g)}function Jt(R,$){let K=R;if(Zn(K,$)){for(l+=Ft(K);l=Q)return g=1;let $=V(l);if($===60)return V(l+1)===47?(l+=2,g=31):(l++,g=30);if($===123)return l++,g=19;let K=0;for(;l0)break;Ba($)||(K=l)}l++}return x=P.substring(h,l),K===-1?13:12}function Nr(){if(wt(g)){for(;l=Q)return g=1;for(let $=V(l);l=0&&rs(V(l-1))&&!(l+1=Q)return g=1;let R=ae(l);switch(l+=Ft(R),R){case 9:case 11:case 12:case 32:for(;l=0&&Zn($,e))return x=Bn(!0)+vt(),g=Qe();let K=On();return K>=0&&Zn(K,e)?(l+=6,I|=1024,x=String.fromCharCode(K)+vt(),g=Qe()):(l++,g=0)}if(Zn(R,e)){let $=R;for(;l=0),l=R,h=R,y=R,g=0,x=void 0,I=0}function Si(R){he+=R?1:-1}}function Gi(e,t){return e.codePointAt(t)}function Ft(e){return e>=65536?2:e===-1?0:1}function fg(e){if(B.assert(0<=e&&e<=1114111),e<=65535)return String.fromCharCode(e);let t=Math.floor((e-65536)/1024)+55296,a=(e-65536)%1024+56320;return String.fromCharCode(t,a)}var dg=String.fromCodePoint?e=>String.fromCodePoint(e):fg;function Pd(e){return dg(e)}var Nd=new Map(Object.entries({General_Category:"General_Category",gc:"General_Category",Script:"Script",sc:"Script",Script_Extensions:"Script_Extensions",scx:"Script_Extensions"})),Id=new Set(["ASCII","ASCII_Hex_Digit","AHex","Alphabetic","Alpha","Any","Assigned","Bidi_Control","Bidi_C","Bidi_Mirrored","Bidi_M","Case_Ignorable","CI","Cased","Changes_When_Casefolded","CWCF","Changes_When_Casemapped","CWCM","Changes_When_Lowercased","CWL","Changes_When_NFKC_Casefolded","CWKCF","Changes_When_Titlecased","CWT","Changes_When_Uppercased","CWU","Dash","Default_Ignorable_Code_Point","DI","Deprecated","Dep","Diacritic","Dia","Emoji","Emoji_Component","EComp","Emoji_Modifier","EMod","Emoji_Modifier_Base","EBase","Emoji_Presentation","EPres","Extended_Pictographic","ExtPict","Extender","Ext","Grapheme_Base","Gr_Base","Grapheme_Extend","Gr_Ext","Hex_Digit","Hex","IDS_Binary_Operator","IDSB","IDS_Trinary_Operator","IDST","ID_Continue","IDC","ID_Start","IDS","Ideographic","Ideo","Join_Control","Join_C","Logical_Order_Exception","LOE","Lowercase","Lower","Math","Noncharacter_Code_Point","NChar","Pattern_Syntax","Pat_Syn","Pattern_White_Space","Pat_WS","Quotation_Mark","QMark","Radical","Regional_Indicator","RI","Sentence_Terminal","STerm","Soft_Dotted","SD","Terminal_Punctuation","Term","Unified_Ideograph","UIdeo","Uppercase","Upper","Variation_Selector","VS","White_Space","space","XID_Continue","XIDC","XID_Start","XIDS"]),Od=new Set(["Basic_Emoji","Emoji_Keycap_Sequence","RGI_Emoji_Modifier_Sequence","RGI_Emoji_Flag_Sequence","RGI_Emoji_Tag_Sequence","RGI_Emoji_ZWJ_Sequence","RGI_Emoji"]),Ra={General_Category:new Set(["C","Other","Cc","Control","cntrl","Cf","Format","Cn","Unassigned","Co","Private_Use","Cs","Surrogate","L","Letter","LC","Cased_Letter","Ll","Lowercase_Letter","Lm","Modifier_Letter","Lo","Other_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter","M","Mark","Combining_Mark","Mc","Spacing_Mark","Me","Enclosing_Mark","Mn","Nonspacing_Mark","N","Number","Nd","Decimal_Number","digit","Nl","Letter_Number","No","Other_Number","P","Punctuation","punct","Pc","Connector_Punctuation","Pd","Dash_Punctuation","Pe","Close_Punctuation","Pf","Final_Punctuation","Pi","Initial_Punctuation","Po","Other_Punctuation","Ps","Open_Punctuation","S","Symbol","Sc","Currency_Symbol","Sk","Modifier_Symbol","Sm","Math_Symbol","So","Other_Symbol","Z","Separator","Zl","Line_Separator","Zp","Paragraph_Separator","Zs","Space_Separator"]),Script:new Set(["Adlm","Adlam","Aghb","Caucasian_Albanian","Ahom","Arab","Arabic","Armi","Imperial_Aramaic","Armn","Armenian","Avst","Avestan","Bali","Balinese","Bamu","Bamum","Bass","Bassa_Vah","Batk","Batak","Beng","Bengali","Bhks","Bhaiksuki","Bopo","Bopomofo","Brah","Brahmi","Brai","Braille","Bugi","Buginese","Buhd","Buhid","Cakm","Chakma","Cans","Canadian_Aboriginal","Cari","Carian","Cham","Cher","Cherokee","Chrs","Chorasmian","Copt","Coptic","Qaac","Cpmn","Cypro_Minoan","Cprt","Cypriot","Cyrl","Cyrillic","Deva","Devanagari","Diak","Dives_Akuru","Dogr","Dogra","Dsrt","Deseret","Dupl","Duployan","Egyp","Egyptian_Hieroglyphs","Elba","Elbasan","Elym","Elymaic","Ethi","Ethiopic","Geor","Georgian","Glag","Glagolitic","Gong","Gunjala_Gondi","Gonm","Masaram_Gondi","Goth","Gothic","Gran","Grantha","Grek","Greek","Gujr","Gujarati","Guru","Gurmukhi","Hang","Hangul","Hani","Han","Hano","Hanunoo","Hatr","Hatran","Hebr","Hebrew","Hira","Hiragana","Hluw","Anatolian_Hieroglyphs","Hmng","Pahawh_Hmong","Hmnp","Nyiakeng_Puachue_Hmong","Hrkt","Katakana_Or_Hiragana","Hung","Old_Hungarian","Ital","Old_Italic","Java","Javanese","Kali","Kayah_Li","Kana","Katakana","Kawi","Khar","Kharoshthi","Khmr","Khmer","Khoj","Khojki","Kits","Khitan_Small_Script","Knda","Kannada","Kthi","Kaithi","Lana","Tai_Tham","Laoo","Lao","Latn","Latin","Lepc","Lepcha","Limb","Limbu","Lina","Linear_A","Linb","Linear_B","Lisu","Lyci","Lycian","Lydi","Lydian","Mahj","Mahajani","Maka","Makasar","Mand","Mandaic","Mani","Manichaean","Marc","Marchen","Medf","Medefaidrin","Mend","Mende_Kikakui","Merc","Meroitic_Cursive","Mero","Meroitic_Hieroglyphs","Mlym","Malayalam","Modi","Mong","Mongolian","Mroo","Mro","Mtei","Meetei_Mayek","Mult","Multani","Mymr","Myanmar","Nagm","Nag_Mundari","Nand","Nandinagari","Narb","Old_North_Arabian","Nbat","Nabataean","Newa","Nkoo","Nko","Nshu","Nushu","Ogam","Ogham","Olck","Ol_Chiki","Orkh","Old_Turkic","Orya","Oriya","Osge","Osage","Osma","Osmanya","Ougr","Old_Uyghur","Palm","Palmyrene","Pauc","Pau_Cin_Hau","Perm","Old_Permic","Phag","Phags_Pa","Phli","Inscriptional_Pahlavi","Phlp","Psalter_Pahlavi","Phnx","Phoenician","Plrd","Miao","Prti","Inscriptional_Parthian","Rjng","Rejang","Rohg","Hanifi_Rohingya","Runr","Runic","Samr","Samaritan","Sarb","Old_South_Arabian","Saur","Saurashtra","Sgnw","SignWriting","Shaw","Shavian","Shrd","Sharada","Sidd","Siddham","Sind","Khudawadi","Sinh","Sinhala","Sogd","Sogdian","Sogo","Old_Sogdian","Sora","Sora_Sompeng","Soyo","Soyombo","Sund","Sundanese","Sylo","Syloti_Nagri","Syrc","Syriac","Tagb","Tagbanwa","Takr","Takri","Tale","Tai_Le","Talu","New_Tai_Lue","Taml","Tamil","Tang","Tangut","Tavt","Tai_Viet","Telu","Telugu","Tfng","Tifinagh","Tglg","Tagalog","Thaa","Thaana","Thai","Tibt","Tibetan","Tirh","Tirhuta","Tnsa","Tangsa","Toto","Ugar","Ugaritic","Vaii","Vai","Vith","Vithkuqi","Wara","Warang_Citi","Wcho","Wancho","Xpeo","Old_Persian","Xsux","Cuneiform","Yezi","Yezidi","Yiii","Yi","Zanb","Zanabazar_Square","Zinh","Inherited","Qaai","Zyyy","Common","Zzzz","Unknown"]),Script_Extensions:void 0};Ra.Script_Extensions=Ra.Script;function wr(e){return e.start+e.length}function mg(e){return e.length===0}function cf(e,t){if(e<0)throw new Error("start < 0");if(t<0)throw new Error("length < 0");return{start:e,length:t}}function hg(e,t){return cf(e,t-e)}function K_(e){return cf(e.span.start,e.newLength)}function yg(e){return mg(e.span)&&e.newLength===0}function Qm(e,t){if(t<0)throw new Error("newLength < 0");return{span:e,newLength:t}}var X4=Qm(cf(0,0),0);function lf(e,t){for(;e;){let a=t(e);if(a==="quit")return;if(a)return e;e=e.parent}}function hl(e){return(e.flags&16)===0}function gg(e,t){if(e===void 0||hl(e))return e;for(e=e.original;e;){if(hl(e))return!t||t(e)?e:void 0;e=e.original}}function Ja(e){return e.length>=2&&e.charCodeAt(0)===95&&e.charCodeAt(1)===95?"_"+e:e}function cs(e){let t=e;return t.length>=3&&t.charCodeAt(0)===95&&t.charCodeAt(1)===95&&t.charCodeAt(2)===95?t.substr(1):t}function Pn(e){return cs(e.escapedText)}function wl(e){let t=zm(e.escapedText);return t?Sy(t,di):void 0}function jp(e){return e.valueDeclaration&&Bg(e.valueDeclaration)?Pn(e.valueDeclaration.name):cs(e.escapedName)}function Km(e){let t=e.parent.parent;if(t){if(Ld(t))return el(t);switch(t.kind){case 243:if(t.declarationList&&t.declarationList.declarations[0])return el(t.declarationList.declarations[0]);break;case 244:let a=t.expression;switch(a.kind===226&&a.operatorToken.kind===64&&(a=a.left),a.kind){case 211:return a.name;case 212:let o=a.argumentExpression;if(tt(o))return o}break;case 217:return el(t.expression);case 256:{if(Ld(t.statement)||l1(t.statement))return el(t.statement);break}}}}function el(e){let t=Zm(e);return t&&tt(t)?t:void 0}function bg(e){return e.name||Km(e)}function vg(e){return!!e.name}function uf(e){switch(e.kind){case 80:return e;case 348:case 341:{let{name:a}=e;if(a.kind===166)return a.right;break}case 213:case 226:{let a=e;switch(gf(a)){case 1:case 4:case 5:case 3:return bf(a.left);case 7:case 8:case 9:return a.arguments[1];default:return}}case 346:return bg(e);case 340:return Km(e);case 277:{let{expression:a}=e;return tt(a)?a:void 0}case 212:let t=e;if(y1(t))return t.argumentExpression}return e.name}function Zm(e){if(e!==void 0)return uf(e)||(Jf(e)||Lf(e)||vl(e)?Tg(e):void 0)}function Tg(e){if(e.parent){if(th(e.parent)||F1(e.parent))return e.parent.name;if(Zi(e.parent)&&e===e.parent.right){if(tt(e.parent.left))return e.parent.left;if(S1(e.parent.left))return bf(e.parent.left)}else if(jf(e.parent)&&tt(e.parent.name))return e.parent.name}else return}function pf(e){if(W2(e))return Gr(e.modifiers,Al)}function e1(e){if(bs(e,98303))return Gr(e.modifiers,Fg)}function t1(e,t){if(e.name)if(tt(e.name)){let a=e.name.escapedText;return ls(e.parent,t).filter(o=>Vp(o)&&tt(o.name)&&o.name.escapedText===a)}else{let a=e.parent.parameters.indexOf(e);B.assert(a>-1,"Parameters should always be in their parents' parameter list");let o=ls(e.parent,t).filter(Vp);if(ash(o)&&o.typeParameters.some(m=>m.name.escapedText===a))}function wg(e){return n1(e,!1)}function kg(e){return n1(e,!0)}function Eg(e){return bi(e,o6)}function Ag(e){return Jg(e,y6)}function Cg(e){return bi(e,c6,!0)}function Dg(e){return bi(e,l6,!0)}function Pg(e){return bi(e,u6,!0)}function Ng(e){return bi(e,p6,!0)}function Ig(e){return bi(e,f6,!0)}function Og(e){return bi(e,m6,!0)}function Mg(e){let t=bi(e,Vf);if(t&&t.typeExpression&&t.typeExpression.type)return t}function ls(e,t){var a;if(!vf(e))return bt;let o=(a=e.jsDoc)==null?void 0:a.jsDocCache;if(o===void 0||t){let m=D2(e,t);B.assert(m.length<2||m[0]!==m[1]),o=Em(m,v=>_h(v)?v.tags:v),t||(e.jsDoc??(e.jsDoc=[]),e.jsDoc.jsDocCache=o)}return o}function r1(e){return ls(e,!1)}function bi(e,t,a){return wm(ls(e,a),t)}function Jg(e,t){return r1(e).filter(t)}function Rp(e){return e.kind===80||e.kind===81}function Lg(e){return Xr(e)&&!!(e.flags&64)}function jg(e){return Xa(e)&&!!(e.flags&64)}function Md(e){return Mf(e)&&!!(e.flags&64)}function ff(e){return Wf(e,8)}function Rg(e){return ll(e)&&!!(e.flags&64)}function df(e){return e>=166}function mf(e){return e>=0&&e<=165}function i1(e){return mf(e.kind)}function mi(e){return Cr(e,"pos")&&Cr(e,"end")}function Ug(e){return 9<=e&&e<=15}function Jd(e){return 15<=e&&e<=18}function Ua(e){var t;return tt(e)&&((t=e.emitNode)==null?void 0:t.autoGenerate)!==void 0}function a1(e){var t;return gi(e)&&((t=e.emitNode)==null?void 0:t.autoGenerate)!==void 0}function Bg(e){return(Va(e)||Gg(e))&&gi(e.name)}function Wr(e){switch(e){case 128:case 129:case 134:case 87:case 138:case 90:case 95:case 103:case 125:case 123:case 124:case 148:case 126:case 147:case 164:return!0}return!1}function qg(e){return!!(T1(e)&31)}function zg(e){return qg(e)||e===126||e===164||e===129}function Fg(e){return Wr(e.kind)}function _1(e){let t=e.kind;return t===80||t===81||t===11||t===9||t===167}function hf(e){return!!e&&Wg(e.kind)}function Vg(e){switch(e){case 262:case 174:case 176:case 177:case 178:case 218:case 219:return!0;default:return!1}}function Wg(e){switch(e){case 173:case 179:case 323:case 180:case 181:case 184:case 317:case 185:return!0;default:return Vg(e)}}function vi(e){return e&&(e.kind===263||e.kind===231)}function Gg(e){switch(e.kind){case 174:case 177:case 178:return!0;default:return!1}}function Yg(e){let t=e.kind;return t===303||t===304||t===305||t===174||t===177||t===178}function s1(e){return nb(e.kind)}function Xg(e){if(e){let t=e.kind;return t===207||t===206}return!1}function Hg(e){let t=e.kind;return t===209||t===210}function $g(e){switch(e.kind){case 260:case 169:case 208:return!0}return!1}function qa(e){return o1(ff(e).kind)}function o1(e){switch(e){case 211:case 212:case 214:case 213:case 284:case 285:case 288:case 215:case 209:case 217:case 210:case 231:case 218:case 80:case 81:case 14:case 9:case 10:case 11:case 15:case 228:case 97:case 106:case 110:case 112:case 108:case 235:case 233:case 236:case 102:case 282:return!0;default:return!1}}function Qg(e){return c1(ff(e).kind)}function c1(e){switch(e){case 224:case 225:case 220:case 221:case 222:case 223:case 216:return!0;default:return o1(e)}}function l1(e){return Kg(ff(e).kind)}function Kg(e){switch(e){case 227:case 229:case 219:case 226:case 230:case 234:case 232:case 356:case 355:case 238:return!0;default:return c1(e)}}function Zg(e){return e===219||e===208||e===263||e===231||e===175||e===176||e===266||e===306||e===281||e===262||e===218||e===177||e===273||e===271||e===276||e===264||e===291||e===174||e===173||e===267||e===270||e===274||e===280||e===169||e===303||e===172||e===171||e===178||e===304||e===265||e===168||e===260||e===346||e===338||e===348||e===202}function u1(e){return e===262||e===282||e===263||e===264||e===265||e===266||e===267||e===272||e===271||e===278||e===277||e===270}function p1(e){return e===252||e===251||e===259||e===246||e===244||e===242||e===249||e===250||e===248||e===245||e===256||e===253||e===255||e===257||e===258||e===243||e===247||e===254||e===353}function Ld(e){return e.kind===168?e.parent&&e.parent.kind!==345||ea(e):Zg(e.kind)}function e2(e){let t=e.kind;return p1(t)||u1(t)||t2(e)}function t2(e){return e.kind!==241||e.parent!==void 0&&(e.parent.kind===258||e.parent.kind===299)?!1:!h2(e)}function n2(e){let t=e.kind;return p1(t)||u1(t)||t===241}function f1(e){return e.kind>=309&&e.kind<=351}function r2(e){return e.kind===320||e.kind===319||e.kind===321||_2(e)||i2(e)||s6(e)||Nl(e)}function i2(e){return e.kind>=327&&e.kind<=351}function tl(e){return e.kind===178}function nl(e){return e.kind===177}function Xi(e){if(!vf(e))return!1;let{jsDoc:t}=e;return!!t&&t.length>0}function a2(e){return!!e.initializer}function kl(e){return e.kind===11||e.kind===15}function _2(e){return e.kind===324||e.kind===325||e.kind===326}function jd(e){return(e.flags&33554432)!==0}var H4=s2();function s2(){var e="";let t=a=>e+=a;return{getText:()=>e,write:t,rawWrite:t,writeKeyword:t,writeOperator:t,writePunctuation:t,writeSpace:t,writeStringLiteral:t,writeLiteral:t,writeParameter:t,writeProperty:t,writeSymbol:(a,o)=>t(a),writeTrailingSemicolon:t,writeComment:t,getTextPos:()=>e.length,getLine:()=>0,getColumn:()=>0,getIndent:()=>0,isAtStartOfLine:()=>!1,hasTrailingComment:()=>!1,hasTrailingWhitespace:()=>!!e.length&&Ba(e.charCodeAt(e.length-1)),writeLine:()=>e+=" ",increaseIndent:Fa,decreaseIndent:Fa,clear:()=>e=""}}function o2(e,t){let a=e.entries();for(let[o,m]of a){let v=t(m,o);if(v)return v}}function c2(e){return e.end-e.pos}function d1(e){return l2(e),(e.flags&1048576)!==0}function l2(e){e.flags&2097152||(((e.flags&262144)!==0||Ht(e,d1))&&(e.flags|=1048576),e.flags|=2097152)}function hi(e){for(;e&&e.kind!==307;)e=e.parent;return e}function Hi(e){return e===void 0?!0:e.pos===e.end&&e.pos>=0&&e.kind!==1}function Up(e){return!Hi(e)}function yl(e,t,a){if(Hi(e))return e.pos;if(f1(e)||e.kind===12)return Ar((t??hi(e)).text,e.pos,!1,!0);if(a&&Xi(e))return yl(e.jsDoc[0],t);if(e.kind===352){t??(t=hi(e));let o=Hp(oh(e,t));if(o)return yl(o,t,a)}return Ar((t??hi(e)).text,e.pos,!1,!1,y2(e))}function Rd(e,t,a=!1){return is(e.text,t,a)}function u2(e){return!!lf(e,rh)}function is(e,t,a=!1){if(Hi(t))return"";let o=e.substring(a?t.pos:Ar(e,t.pos),t.end);return u2(t)&&(o=o.split(/\r\n|\n|\r/).map(m=>m.replace(/^\s*\*/,"").trimStart()).join(` +`)),o}function za(e){let t=e.emitNode;return t&&t.flags||0}function p2(e,t,a){B.assertGreaterThanOrEqual(t,0),B.assertGreaterThanOrEqual(a,0),B.assertLessThanOrEqual(t,e.length),B.assertLessThanOrEqual(t+a,e.length)}function cl(e){return e.kind===244&&e.expression.kind===11}function yf(e){return!!(za(e)&2097152)}function Ud(e){return yf(e)&&Rf(e)}function f2(e){return tt(e.name)&&!e.initializer}function Bd(e){return yf(e)&&Ha(e)&&Yp(e.declarationList.declarations,f2)}function d2(e,t){let a=e.kind===169||e.kind===168||e.kind===218||e.kind===219||e.kind===217||e.kind===260||e.kind===281?Xp(ug(t,e.pos),Lp(t,e.pos)):Lp(t,e.pos);return Gr(a,o=>o.end<=e.end&&t.charCodeAt(o.pos+1)===42&&t.charCodeAt(o.pos+2)===42&&t.charCodeAt(o.pos+3)!==47)}function m2(e){if(e)switch(e.kind){case 208:case 306:case 169:case 303:case 172:case 171:case 304:case 260:return!0}return!1}function h2(e){return e&&e.kind===241&&hf(e.parent)}function qd(e){let t=e.kind;return(t===211||t===212)&&e.expression.kind===108}function ea(e){return!!e&&!!(e.flags&524288)}function y2(e){return!!e&&!!(e.flags&16777216)}function g2(e){for(;gl(e,!0);)e=e.right;return e}function b2(e){return tt(e)&&e.escapedText==="exports"}function v2(e){return tt(e)&&e.escapedText==="module"}function m1(e){return(Xr(e)||h1(e))&&v2(e.expression)&&ps(e)==="exports"}function gf(e){let t=x2(e);return t===5||ea(e)?t:0}function T2(e){return ts(e.arguments)===3&&Xr(e.expression)&&tt(e.expression.expression)&&Pn(e.expression.expression)==="Object"&&Pn(e.expression.name)==="defineProperty"&&El(e.arguments[1])&&us(e.arguments[0],!0)}function h1(e){return Xa(e)&&El(e.argumentExpression)}function gs(e,t){return Xr(e)&&(!t&&e.expression.kind===110||tt(e.name)&&us(e.expression,!0))||y1(e,t)}function y1(e,t){return h1(e)&&(!t&&e.expression.kind===110||Sf(e.expression)||gs(e.expression,!0))}function us(e,t){return Sf(e)||gs(e,t)}function x2(e){if(Mf(e)){if(!T2(e))return 0;let t=e.arguments[0];return b2(t)||m1(t)?8:gs(t)&&ps(t)==="prototype"?9:7}return e.operatorToken.kind!==64||!S1(e.left)||S2(g2(e))?0:us(e.left.expression,!0)&&ps(e.left)==="prototype"&&Of(k2(e))?6:w2(e.left)}function S2(e){return t6(e)&&ta(e.expression)&&e.expression.text==="0"}function bf(e){if(Xr(e))return e.name;let t=Tf(e.argumentExpression);return ta(t)||kl(t)?t:e}function ps(e){let t=bf(e);if(t){if(tt(t))return t.escapedText;if(kl(t)||ta(t))return Ja(t.text)}}function w2(e){if(e.expression.kind===110)return 4;if(m1(e))return 2;if(us(e.expression,!0)){if(eb(e.expression))return 3;let t=e;for(;!tt(t.expression);)t=t.expression;let a=t.expression;if((a.escapedText==="exports"||a.escapedText==="module"&&ps(t)==="exports")&&gs(e))return 1;if(us(e,!0)||Xa(e)&&U2(e))return 5}return 0}function k2(e){for(;Zi(e.right);)e=e.right;return e.right}function E2(e){return Dl(e)&&Zi(e.expression)&&gf(e.expression)!==0&&Zi(e.expression.right)&&(e.expression.right.operatorToken.kind===57||e.expression.right.operatorToken.kind===61)?e.expression.right.right:void 0}function A2(e){switch(e.kind){case 243:let t=Bp(e);return t&&t.initializer;case 172:return e.initializer;case 303:return e.initializer}}function Bp(e){return Ha(e)?Hp(e.declarationList.declarations):void 0}function C2(e){return Ti(e)&&e.body&&e.body.kind===267?e.body:void 0}function vf(e){switch(e.kind){case 219:case 226:case 241:case 252:case 179:case 296:case 263:case 231:case 175:case 176:case 185:case 180:case 251:case 259:case 246:case 212:case 242:case 1:case 266:case 306:case 277:case 278:case 281:case 244:case 249:case 250:case 248:case 262:case 218:case 184:case 177:case 80:case 245:case 272:case 271:case 181:case 264:case 317:case 323:case 256:case 174:case 173:case 267:case 202:case 270:case 210:case 169:case 217:case 211:case 303:case 172:case 171:case 253:case 240:case 178:case 304:case 305:case 255:case 257:case 258:case 265:case 168:case 260:case 243:case 247:case 254:return!0;default:return!1}}function D2(e,t){let a;m2(e)&&a2(e)&&Xi(e.initializer)&&(a=Dn(a,zd(e,e.initializer.jsDoc)));let o=e;for(;o&&o.parent;){if(Xi(o)&&(a=Dn(a,zd(e,o.jsDoc))),o.kind===169){a=Dn(a,(t?Sg:xg)(o));break}if(o.kind===168){a=Dn(a,(t?kg:wg)(o));break}o=N2(o)}return a||bt}function zd(e,t){let a=dy(t);return Em(t,o=>{if(o===a){let m=Gr(o.tags,v=>P2(e,v));return o.tags===m?[o]:m}else return Gr(o.tags,d6)})}function P2(e,t){return!(Vf(t)||g6(t))||!t.parent||!_h(t.parent)||!Cl(t.parent.parent)||t.parent.parent===e}function N2(e){let t=e.parent;if(t.kind===303||t.kind===277||t.kind===172||t.kind===244&&e.kind===211||t.kind===253||C2(t)||gl(e))return t;if(t.parent&&(Bp(t.parent)===e||gl(t)))return t.parent;if(t.parent&&t.parent.parent&&(Bp(t.parent.parent)||A2(t.parent.parent)===e||E2(t.parent.parent)))return t.parent.parent}function Tf(e,t){return Wf(e,t?-2147483647:1)}function I2(e){let t=O2(e);if(t&&ea(e)){let a=Eg(e);if(a)return a.class}return t}function O2(e){let t=xf(e.heritageClauses,96);return t&&t.types.length>0?t.types[0]:void 0}function M2(e){if(ea(e))return Ag(e).map(t=>t.class);{let t=xf(e.heritageClauses,119);return t==null?void 0:t.types}}function J2(e){return vs(e)?L2(e)||bt:vi(e)&&Xp(Op(I2(e)),M2(e))||bt}function L2(e){let t=xf(e.heritageClauses,96);return t?t.types:void 0}function xf(e,t){if(e){for(let a of e)if(a.token===t)return a}}function di(e){return 83<=e&&e<=165}function j2(e){return 19<=e&&e<=79}function Sp(e){return di(e)||j2(e)}function El(e){return kl(e)||ta(e)}function R2(e){return G1(e)&&(e.operator===40||e.operator===41)&&ta(e.operand)}function U2(e){if(!(e.kind===167||e.kind===212))return!1;let t=Xa(e)?Tf(e.argumentExpression):e.expression;return!El(t)&&!R2(t)}function B2(e){return Rp(e)?Pn(e):eh(e)?Db(e):e.text}function La(e){return fs(e.pos)||fs(e.end)}function wp(e){switch(e){case 61:return 4;case 57:return 5;case 56:return 6;case 52:return 7;case 53:return 8;case 51:return 9;case 35:case 36:case 37:case 38:return 10;case 30:case 32:case 33:case 34:case 104:case 103:case 130:case 152:return 11;case 48:case 49:case 50:return 12;case 40:case 41:return 13;case 42:case 44:case 45:return 14;case 43:return 15}return-1}function kp(e){return!!((e.templateFlags||0)&2048)}function q2(e){return e&&!!(D1(e)?kp(e):kp(e.head)||Xt(e.templateSpans,t=>kp(t.literal)))}var $4=new Map(Object.entries({" ":"\\t","\v":"\\v","\f":"\\f","\b":"\\b","\r":"\\r","\n":"\\n","\\":"\\\\",'"':'\\"',"'":"\\'","`":"\\`","\u2028":"\\u2028","\u2029":"\\u2029","\x85":"\\u0085","\r\n":"\\r\\n"}));var Q4=new Map(Object.entries({'"':""","'":"'"}));function z2(e){return!!e&&e.kind===80&&F2(e)}function F2(e){return e.escapedText==="this"}function bs(e,t){return!!G2(e,t)}function V2(e){return bs(e,256)}function W2(e){return bs(e,32768)}function G2(e,t){return X2(e)&t}function Y2(e,t,a){return e.kind>=0&&e.kind<=165?0:(e.modifierFlagsCache&536870912||(e.modifierFlagsCache=v1(e)|536870912),a||t&&ea(e)?(!(e.modifierFlagsCache&268435456)&&e.parent&&(e.modifierFlagsCache|=g1(e)|268435456),b1(e.modifierFlagsCache)):H2(e.modifierFlagsCache))}function X2(e){return Y2(e,!1)}function g1(e){let t=0;return e.parent&&!ds(e)&&(ea(e)&&(Cg(e)&&(t|=8388608),Dg(e)&&(t|=16777216),Pg(e)&&(t|=33554432),Ng(e)&&(t|=67108864),Ig(e)&&(t|=134217728)),Og(e)&&(t|=65536)),t}function H2(e){return e&65535}function b1(e){return e&131071|(e&260046848)>>>23}function $2(e){return b1(g1(e))}function Q2(e){return v1(e)|$2(e)}function v1(e){let t=Il(e)?Rn(e.modifiers):0;return(e.flags&8||e.kind===80&&e.flags&4096)&&(t|=32),t}function Rn(e){let t=0;if(e)for(let a of e)t|=T1(a.kind);return t}function T1(e){switch(e){case 126:return 256;case 125:return 1;case 124:return 4;case 123:return 2;case 128:return 64;case 129:return 512;case 95:return 32;case 138:return 128;case 87:return 4096;case 90:return 2048;case 134:return 1024;case 148:return 8;case 164:return 16;case 103:return 8192;case 147:return 16384;case 170:return 32768}return 0}function K2(e){return e===76||e===77||e===78}function x1(e){return e>=64&&e<=79}function gl(e,t){return Zi(e)&&(t?e.operatorToken.kind===64:x1(e.operatorToken.kind))&&qa(e.left)}function Sf(e){return e.kind===80||Z2(e)}function Z2(e){return Xr(e)&&tt(e.name)&&Sf(e.expression)}function eb(e){return gs(e)&&ps(e)==="prototype"}function Ep(e){return e.flags&3899393?e.objectFlags:0}function tb(e){let t;return Ht(e,a=>{Up(a)&&(t=a)},a=>{for(let o=a.length-1;o>=0;o--)if(Up(a[o])){t=a[o];break}}),t}function nb(e){return e>=182&&e<=205||e===133||e===159||e===150||e===163||e===151||e===136||e===154||e===155||e===116||e===157||e===146||e===141||e===233||e===312||e===313||e===314||e===315||e===316||e===317||e===318}function S1(e){return e.kind===211||e.kind===212}function rb(e,t){this.flags=e,this.escapedName=t,this.declarations=void 0,this.valueDeclaration=void 0,this.id=0,this.mergeId=0,this.parent=void 0,this.members=void 0,this.exports=void 0,this.exportSymbol=void 0,this.constEnumOnlyModule=void 0,this.isReferenced=void 0,this.lastAssignmentPos=void 0,this.links=void 0}function ib(e,t){this.flags=t,(B.isDebugging||sl)&&(this.checker=e)}function ab(e,t){this.flags=t,B.isDebugging&&(this.checker=e)}function Ap(e,t,a){this.pos=t,this.end=a,this.kind=e,this.id=0,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}function _b(e,t,a){this.pos=t,this.end=a,this.kind=e,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0,this.emitNode=void 0}function sb(e,t,a){this.pos=t,this.end=a,this.kind=e,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}function ob(e,t,a){this.fileName=e,this.text=t,this.skipTrivia=a||(o=>o)}var At={getNodeConstructor:()=>Ap,getTokenConstructor:()=>_b,getIdentifierConstructor:()=>sb,getPrivateIdentifierConstructor:()=>Ap,getSourceFileConstructor:()=>Ap,getSymbolConstructor:()=>rb,getTypeConstructor:()=>ib,getSignatureConstructor:()=>ab,getSourceMapSourceConstructor:()=>ob},cb=[];function lb(e){Object.assign(At,e),Un(cb,t=>t(At))}function ub(e,t){return e.replace(/\{(\d+)\}/g,(a,o)=>""+B.checkDefined(t[+o]))}var Fd;function pb(e){return Fd&&Fd[e.key]||e.message}function Oa(e,t,a,o,m,...v){a+o>t.length&&(o=t.length-a),p2(t,a,o);let A=pb(m);return Xt(v)&&(A=ub(A,v)),{file:void 0,start:a,length:o,messageText:A,category:m.category,code:m.code,reportsUnnecessary:m.reportsUnnecessary,fileName:e}}function fb(e){return e.file===void 0&&e.start!==void 0&&e.length!==void 0&&typeof e.fileName=="string"}function w1(e,t){let a=t.fileName||"",o=t.text.length;B.assertEqual(e.fileName,a),B.assertLessThanOrEqual(e.start,o),B.assertLessThanOrEqual(e.start+e.length,o);let m={file:t,start:e.start,length:e.length,messageText:e.messageText,category:e.category,code:e.code,reportsUnnecessary:e.reportsUnnecessary};if(e.relatedInformation){m.relatedInformation=[];for(let v of e.relatedInformation)fb(v)&&v.fileName===a?(B.assertLessThanOrEqual(v.start,o),B.assertLessThanOrEqual(v.start+v.length,o),m.relatedInformation.push(w1(v,t))):m.relatedInformation.push(v)}return m}function zi(e,t){let a=[];for(let o of e)a.push(w1(o,t));return a}function Vd(e){return e===4||e===2||e===1||e===6?1:0}var at={allowImportingTsExtensions:{dependencies:["rewriteRelativeImportExtensions"],computeValue:e=>!!(e.allowImportingTsExtensions||e.rewriteRelativeImportExtensions)},target:{dependencies:["module"],computeValue:e=>(e.target===0?void 0:e.target)??(e.module===100&&9||e.module===199&&99||1)},module:{dependencies:["target"],computeValue:e=>typeof e.module=="number"?e.module:at.target.computeValue(e)>=2?5:1},moduleResolution:{dependencies:["module","target"],computeValue:e=>{let t=e.moduleResolution;if(t===void 0)switch(at.module.computeValue(e)){case 1:t=2;break;case 100:t=3;break;case 199:t=99;break;case 200:t=100;break;default:t=1;break}return t}},moduleDetection:{dependencies:["module","target"],computeValue:e=>e.moduleDetection||(at.module.computeValue(e)===100||at.module.computeValue(e)===199?3:2)},isolatedModules:{dependencies:["verbatimModuleSyntax"],computeValue:e=>!!(e.isolatedModules||e.verbatimModuleSyntax)},esModuleInterop:{dependencies:["module","target"],computeValue:e=>{if(e.esModuleInterop!==void 0)return e.esModuleInterop;switch(at.module.computeValue(e)){case 100:case 199:case 200:return!0}return!1}},allowSyntheticDefaultImports:{dependencies:["module","target","moduleResolution"],computeValue:e=>e.allowSyntheticDefaultImports!==void 0?e.allowSyntheticDefaultImports:at.esModuleInterop.computeValue(e)||at.module.computeValue(e)===4||at.moduleResolution.computeValue(e)===100},resolvePackageJsonExports:{dependencies:["moduleResolution"],computeValue:e=>{let t=at.moduleResolution.computeValue(e);if(!Wd(t))return!1;if(e.resolvePackageJsonExports!==void 0)return e.resolvePackageJsonExports;switch(t){case 3:case 99:case 100:return!0}return!1}},resolvePackageJsonImports:{dependencies:["moduleResolution","resolvePackageJsonExports"],computeValue:e=>{let t=at.moduleResolution.computeValue(e);if(!Wd(t))return!1;if(e.resolvePackageJsonExports!==void 0)return e.resolvePackageJsonExports;switch(t){case 3:case 99:case 100:return!0}return!1}},resolveJsonModule:{dependencies:["moduleResolution","module","target"],computeValue:e=>e.resolveJsonModule!==void 0?e.resolveJsonModule:at.moduleResolution.computeValue(e)===100},declaration:{dependencies:["composite"],computeValue:e=>!!(e.declaration||e.composite)},preserveConstEnums:{dependencies:["isolatedModules","verbatimModuleSyntax"],computeValue:e=>!!(e.preserveConstEnums||at.isolatedModules.computeValue(e))},incremental:{dependencies:["composite"],computeValue:e=>!!(e.incremental||e.composite)},declarationMap:{dependencies:["declaration","composite"],computeValue:e=>!!(e.declarationMap&&at.declaration.computeValue(e))},allowJs:{dependencies:["checkJs"],computeValue:e=>e.allowJs===void 0?!!e.checkJs:e.allowJs},useDefineForClassFields:{dependencies:["target","module"],computeValue:e=>e.useDefineForClassFields===void 0?at.target.computeValue(e)>=9:e.useDefineForClassFields},noImplicitAny:{dependencies:["strict"],computeValue:e=>Vr(e,"noImplicitAny")},noImplicitThis:{dependencies:["strict"],computeValue:e=>Vr(e,"noImplicitThis")},strictNullChecks:{dependencies:["strict"],computeValue:e=>Vr(e,"strictNullChecks")},strictFunctionTypes:{dependencies:["strict"],computeValue:e=>Vr(e,"strictFunctionTypes")},strictBindCallApply:{dependencies:["strict"],computeValue:e=>Vr(e,"strictBindCallApply")},strictPropertyInitialization:{dependencies:["strict"],computeValue:e=>Vr(e,"strictPropertyInitialization")},strictBuiltinIteratorReturn:{dependencies:["strict"],computeValue:e=>Vr(e,"strictBuiltinIteratorReturn")},alwaysStrict:{dependencies:["strict"],computeValue:e=>Vr(e,"alwaysStrict")},useUnknownInCatchVariables:{dependencies:["strict"],computeValue:e=>Vr(e,"useUnknownInCatchVariables")}};var K4=at.allowImportingTsExtensions.computeValue,Z4=at.target.computeValue,e3=at.module.computeValue,t3=at.moduleResolution.computeValue,n3=at.moduleDetection.computeValue,r3=at.isolatedModules.computeValue,i3=at.esModuleInterop.computeValue,a3=at.allowSyntheticDefaultImports.computeValue,_3=at.resolvePackageJsonExports.computeValue,s3=at.resolvePackageJsonImports.computeValue,o3=at.resolveJsonModule.computeValue,c3=at.declaration.computeValue,l3=at.preserveConstEnums.computeValue,u3=at.incremental.computeValue,p3=at.declarationMap.computeValue,f3=at.allowJs.computeValue,d3=at.useDefineForClassFields.computeValue;function Wd(e){return e>=3&&e<=99||e===100}function Vr(e,t){return e[t]===void 0?!!e.strict:!!e[t]}function db(e){return o2(targetOptionDeclaration.type,(t,a)=>t===e?a:void 0)}var mb=["node_modules","bower_components","jspm_packages"],k1=`(?!(${mb.join("|")})(/|$))`,hb={singleAsteriskRegexFragment:"([^./]|(\\.(?!min\\.js$))?)*",doubleAsteriskRegexFragment:`(/${k1}[^/.][^/]*)*?`,replaceWildcardCharacter:e=>E1(e,hb.singleAsteriskRegexFragment)},yb={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:`(/${k1}[^/.][^/]*)*?`,replaceWildcardCharacter:e=>E1(e,yb.singleAsteriskRegexFragment)};function E1(e,t){return e==="*"?t:e==="?"?"[^/]":"\\"+e}function gb(e,t){return t||bb(e)||3}function bb(e){switch(e.substr(e.lastIndexOf(".")).toLowerCase()){case".js":case".cjs":case".mjs":return 1;case".jsx":return 2;case".ts":case".cts":case".mts":return 3;case".tsx":return 4;case".json":return 6;default:return 0}}var A1=[[".ts",".tsx",".d.ts"],[".cts",".d.cts"],[".mts",".d.mts"]],m3=km(A1),h3=[...A1,[".json"]];var vb=[[".js",".jsx"],[".mjs"],[".cjs"]],y3=km(vb),Tb=[[".ts",".tsx",".d.ts",".js",".jsx"],[".cts",".d.cts",".cjs"],[".mts",".d.mts",".mjs"]],g3=[...Tb,[".json"]],xb=[".d.ts",".d.cts",".d.mts"];function fs(e){return!(e>=0)}function rl(e,...t){return t.length&&(e.relatedInformation||(e.relatedInformation=[]),B.assert(e.relatedInformation!==bt,"Diagnostic had empty array singleton for related info, but is still being constructed!"),e.relatedInformation.push(...t)),e}function Sb(e){let t;switch(e.charCodeAt(1)){case 98:case 66:t=1;break;case 111:case 79:t=3;break;case 120:case 88:t=4;break;default:let Q=e.length-1,h=0;for(;e.charCodeAt(h)===48;)h++;return e.slice(h,Q)||"0"}let a=2,o=e.length-1,m=(o-a)*t,v=new Uint16Array((m>>>4)+(m&15?1:0));for(let Q=o-1,h=0;Q>=a;Q--,h+=t){let y=h>>>4,g=e.charCodeAt(Q),I=(g<=57?g-48:10+g-(g<=70?65:97))<<(h&15);v[y]|=I;let re=I>>>16;re&&(v[y+1]|=re)}let A="",P=v.length-1,l=!0;for(;l;){let Q=0;l=!1;for(let h=P;h>=0;h--){let y=Q<<16|v[h],g=y/10|0;v[h]=g,Q=y-g*10,g&&!l&&(P=h,l=!0)}A=Q+A}return A}function wb({negative:e,base10Value:t}){return(e&&t!=="0"?"-":"")+t}function qp(e,t){return e.pos=t,e}function kb(e,t){return e.end=t,e}function yi(e,t,a){return kb(qp(e,t),a)}function Gd(e,t,a){return yi(e,t,t+a)}function wf(e,t){return e&&t&&(e.parent=t),e}function Eb(e,t){if(!e)return e;return bm(e,f1(e)?a:m),e;function a(v,A){if(t&&v.parent===A)return"skip";wf(v,A)}function o(v){if(Xi(v))for(let A of v.jsDoc)a(A,v),bm(A,a)}function m(v,A){return a(v,A)||o(v)}}function Ab(e){return!!(e.flags&262144&&e.isThisType)}function Cb(e){var t;return((t=getSnippetElement(e))==null?void 0:t.kind)===0}function Db(e){return`${Pn(e.namespace)}:${Pn(e.name)}`}var b3=String.prototype.replace;var zp=["assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","inspector/promises","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","readline/promises","repl","stream","stream/consumers","stream/promises","stream/web","string_decoder","sys","test/mock_loader","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib"],v3=new Set(zp),Pb=new Set(["node:sea","node:sqlite","node:test","node:test/reporters"]),T3=new Set([...zp,...zp.map(e=>`node:${e}`),...Pb]);function Nb(){let e,t,a,o,m;return{createBaseSourceFileNode:v,createBaseIdentifierNode:A,createBasePrivateIdentifierNode:P,createBaseTokenNode:l,createBaseNode:Q};function v(h){return new(m||(m=At.getSourceFileConstructor()))(h,-1,-1)}function A(h){return new(a||(a=At.getIdentifierConstructor()))(h,-1,-1)}function P(h){return new(o||(o=At.getPrivateIdentifierConstructor()))(h,-1,-1)}function l(h){return new(t||(t=At.getTokenConstructor()))(h,-1,-1)}function Q(h){return new(e||(e=At.getNodeConstructor()))(h,-1,-1)}}var Ib={getParenthesizeLeftSideOfBinaryForOperator:e=>gt,getParenthesizeRightSideOfBinaryForOperator:e=>gt,parenthesizeLeftSideOfBinary:(e,t)=>t,parenthesizeRightSideOfBinary:(e,t,a)=>a,parenthesizeExpressionOfComputedPropertyName:gt,parenthesizeConditionOfConditionalExpression:gt,parenthesizeBranchOfConditionalExpression:gt,parenthesizeExpressionOfExportDefault:gt,parenthesizeExpressionOfNew:e=>kr(e,qa),parenthesizeLeftSideOfAccess:e=>kr(e,qa),parenthesizeOperandOfPostfixUnary:e=>kr(e,qa),parenthesizeOperandOfPrefixUnary:e=>kr(e,Qg),parenthesizeExpressionsOfCommaDelimitedList:e=>kr(e,mi),parenthesizeExpressionForDisallowedComma:gt,parenthesizeExpressionOfExpressionStatement:gt,parenthesizeConciseBodyOfArrowFunction:gt,parenthesizeCheckTypeOfConditionalType:gt,parenthesizeExtendsTypeOfConditionalType:gt,parenthesizeConstituentTypesOfUnionType:e=>kr(e,mi),parenthesizeConstituentTypeOfUnionType:gt,parenthesizeConstituentTypesOfIntersectionType:e=>kr(e,mi),parenthesizeConstituentTypeOfIntersectionType:gt,parenthesizeOperandOfTypeOperator:gt,parenthesizeOperandOfReadonlyTypeOperator:gt,parenthesizeNonArrayTypeOfPostfixType:gt,parenthesizeElementTypesOfTupleType:e=>kr(e,mi),parenthesizeElementTypeOfTupleType:gt,parenthesizeTypeOfOptionalType:gt,parenthesizeTypeArguments:e=>e&&kr(e,mi),parenthesizeLeadingTypeArgument:gt},il=0;var Ob=[];function kf(e,t){let a=e&8?gt:Rb,o=Sd(()=>e&1?Ib:createParenthesizerRules(ye)),m=Sd(()=>e&2?nullNodeConverters:createNodeConverters(ye)),v=Kn(n=>(i,_)=>ua(i,n,_)),A=Kn(n=>i=>jr(n,i)),P=Kn(n=>i=>ni(i,n)),l=Kn(n=>()=>Ho(n)),Q=Kn(n=>i=>C_(n,i)),h=Kn(n=>(i,_)=>Su(n,i,_)),y=Kn(n=>(i,_)=>$o(n,i,_)),g=Kn(n=>(i,_)=>xu(n,i,_)),x=Kn(n=>(i,_)=>dc(n,i,_)),I=Kn(n=>(i,_,c)=>Mu(n,i,_,c)),re=Kn(n=>(i,_,c)=>mc(n,i,_,c)),he=Kn(n=>(i,_,c,f)=>Ju(n,i,_,c,f)),ye={get parenthesizer(){return o()},get converters(){return m()},baseFactory:t,flags:e,createNodeArray:de,createNumericLiteral:V,createBigIntLiteral:oe,createStringLiteral:dt,createStringLiteralFromNode:nr,createRegularExpressionLiteral:gn,createLiteralLikeNode:rr,createIdentifier:Ge,createTempVariable:ir,createLoopVariable:Pr,createUniqueName:Ot,getGeneratedNameForNode:Bn,createPrivateIdentifier:Mt,createUniquePrivateName:Qe,getGeneratedPrivateNameForNode:qn,createToken:ct,createSuper:_t,createThis:Ut,createNull:Jt,createTrue:lt,createFalse:ar,createModifier:mt,createModifiersFromModifierFlags:vn,createQualifiedName:yt,updateQualifiedName:cn,createComputedPropertyName:nt,updateComputedPropertyName:Bt,createTypeParameterDeclaration:rn,updateTypeParameterDeclaration:_r,createParameterDeclaration:fr,updateParameterDeclaration:dr,createDecorator:zn,updateDecorator:Fn,createPropertySignature:Nr,updatePropertySignature:Vn,createPropertyDeclaration:mr,updatePropertyDeclaration:L,createMethodSignature:se,updateMethodSignature:fe,createMethodDeclaration:Te,updateMethodDeclaration:He,createConstructorDeclaration:ut,updateConstructorDeclaration:Ir,createGetAccessorDeclaration:Mn,updateGetAccessorDeclaration:Wn,createSetAccessorDeclaration:R,updateSetAccessorDeclaration:$,createCallSignature:xe,updateCallSignature:Se,createConstructSignature:we,updateConstructSignature:be,createIndexSignature:We,updateIndexSignature:Ze,createClassStaticBlockDeclaration:st,updateClassStaticBlockDeclaration:Dt,createTemplateLiteralTypeSpan:Ye,updateTemplateLiteralTypeSpan:Ee,createKeywordTypeNode:Tn,createTypePredicateNode:rt,updateTypePredicateNode:ln,createTypeReferenceNode:Zr,updateTypeReferenceNode:J,createFunctionTypeNode:qe,updateFunctionTypeNode:u,createConstructorTypeNode:Me,updateConstructorTypeNode:an,createTypeQueryNode:Pt,updateTypeQueryNode:kt,createTypeLiteralNode:Nt,updateTypeLiteralNode:qt,createArrayTypeNode:Gn,updateArrayTypeNode:wi,createTupleTypeNode:un,updateTupleTypeNode:G,createNamedTupleMember:le,updateNamedTupleMember:Fe,createOptionalTypeNode:ve,updateOptionalTypeNode:j,createRestTypeNode:ht,updateRestTypeNode:xt,createUnionTypeNode:Bl,updateUnionTypeNode:Es,createIntersectionTypeNode:Or,updateIntersectionTypeNode:Je,createConditionalTypeNode:ft,updateConditionalTypeNode:ql,createInferTypeNode:Yn,updateInferTypeNode:zl,createImportTypeNode:sr,updateImportTypeNode:aa,createParenthesizedType:Qt,updateParenthesizedType:Ct,createThisTypeNode:D,createTypeOperatorNode:Gt,updateTypeOperatorNode:Mr,createIndexedAccessTypeNode:or,updateIndexedAccessTypeNode:Ka,createMappedTypeNode:St,updateMappedTypeNode:jt,createLiteralTypeNode:ei,updateLiteralTypeNode:yr,createTemplateLiteralType:Wt,updateTemplateLiteralType:Fl,createObjectBindingPattern:As,updateObjectBindingPattern:Vl,createArrayBindingPattern:Jr,updateArrayBindingPattern:Wl,createBindingElement:_a,updateBindingElement:ti,createArrayLiteralExpression:Za,updateArrayLiteralExpression:Cs,createObjectLiteralExpression:ki,updateObjectLiteralExpression:Gl,createPropertyAccessExpression:e&4?(n,i)=>setEmitFlags(cr(n,i),262144):cr,updatePropertyAccessExpression:Yl,createPropertyAccessChain:e&4?(n,i,_)=>setEmitFlags(Ei(n,i,_),262144):Ei,updatePropertyAccessChain:sa,createElementAccessExpression:Ai,updateElementAccessExpression:Xl,createElementAccessChain:Ns,updateElementAccessChain:e_,createCallExpression:Ci,updateCallExpression:oa,createCallChain:t_,updateCallChain:Os,createNewExpression:xn,updateNewExpression:n_,createTaggedTemplateExpression:ca,updateTaggedTemplateExpression:Ms,createTypeAssertion:Js,updateTypeAssertion:Ls,createParenthesizedExpression:r_,updateParenthesizedExpression:js,createFunctionExpression:i_,updateFunctionExpression:Rs,createArrowFunction:a_,updateArrowFunction:Us,createDeleteExpression:Bs,updateDeleteExpression:qs,createTypeOfExpression:la,updateTypeOfExpression:fn,createVoidExpression:__,updateVoidExpression:lr,createAwaitExpression:zs,updateAwaitExpression:Lr,createPrefixUnaryExpression:jr,updatePrefixUnaryExpression:Hl,createPostfixUnaryExpression:ni,updatePostfixUnaryExpression:$l,createBinaryExpression:ua,updateBinaryExpression:Ql,createConditionalExpression:Vs,updateConditionalExpression:Ws,createTemplateExpression:Gs,updateTemplateExpression:Xn,createTemplateHead:Xs,createTemplateMiddle:pa,createTemplateTail:s_,createNoSubstitutionTemplateLiteral:Zl,createTemplateLiteralLikeNode:ii,createYieldExpression:o_,updateYieldExpression:eu,createSpreadElement:Hs,updateSpreadElement:tu,createClassExpression:$s,updateClassExpression:c_,createOmittedExpression:l_,createExpressionWithTypeArguments:Qs,updateExpressionWithTypeArguments:Ks,createAsExpression:dn,updateAsExpression:fa,createNonNullExpression:Zs,updateNonNullExpression:eo,createSatisfiesExpression:u_,updateSatisfiesExpression:to,createNonNullChain:p_,updateNonNullChain:Jn,createMetaProperty:no,updateMetaProperty:f_,createTemplateSpan:Hn,updateTemplateSpan:da,createSemicolonClassElement:ro,createBlock:Rr,updateBlock:nu,createVariableStatement:d_,updateVariableStatement:io,createEmptyStatement:ao,createExpressionStatement:Pi,updateExpressionStatement:_o,createIfStatement:so,updateIfStatement:oo,createDoStatement:co,updateDoStatement:lo,createWhileStatement:uo,updateWhileStatement:ru,createForStatement:po,updateForStatement:fo,createForInStatement:m_,updateForInStatement:iu,createForOfStatement:mo,updateForOfStatement:au,createContinueStatement:ho,updateContinueStatement:_u,createBreakStatement:h_,updateBreakStatement:yo,createReturnStatement:y_,updateReturnStatement:su,createWithStatement:g_,updateWithStatement:go,createSwitchStatement:b_,updateSwitchStatement:ai,createLabeledStatement:bo,updateLabeledStatement:vo,createThrowStatement:To,updateThrowStatement:ou,createTryStatement:xo,updateTryStatement:cu,createDebuggerStatement:So,createVariableDeclaration:ma,updateVariableDeclaration:wo,createVariableDeclarationList:v_,updateVariableDeclarationList:lu,createFunctionDeclaration:ko,updateFunctionDeclaration:T_,createClassDeclaration:Eo,updateClassDeclaration:ha,createInterfaceDeclaration:Ao,updateInterfaceDeclaration:Co,createTypeAliasDeclaration:ot,updateTypeAliasDeclaration:gr,createEnumDeclaration:x_,updateEnumDeclaration:br,createModuleDeclaration:Do,updateModuleDeclaration:Et,createModuleBlock:vr,updateModuleBlock:zt,createCaseBlock:Po,updateCaseBlock:pu,createNamespaceExportDeclaration:No,updateNamespaceExportDeclaration:Io,createImportEqualsDeclaration:Oo,updateImportEqualsDeclaration:Mo,createImportDeclaration:Jo,updateImportDeclaration:Lo,createImportClause:jo,updateImportClause:Ro,createAssertClause:S_,updateAssertClause:du,createAssertEntry:Ni,updateAssertEntry:Uo,createImportTypeAssertionContainer:w_,updateImportTypeAssertionContainer:Bo,createImportAttributes:qo,updateImportAttributes:k_,createImportAttribute:zo,updateImportAttribute:Fo,createNamespaceImport:Vo,updateNamespaceImport:mu,createNamespaceExport:Wo,updateNamespaceExport:hu,createNamedImports:Go,updateNamedImports:Yo,createImportSpecifier:Tr,updateImportSpecifier:yu,createExportAssignment:ya,updateExportAssignment:Ii,createExportDeclaration:ga,updateExportDeclaration:Xo,createNamedExports:E_,updateNamedExports:gu,createExportSpecifier:ba,updateExportSpecifier:bu,createMissingDeclaration:vu,createExternalModuleReference:A_,updateExternalModuleReference:Tu,get createJSDocAllType(){return l(312)},get createJSDocUnknownType(){return l(313)},get createJSDocNonNullableType(){return y(315)},get updateJSDocNonNullableType(){return g(315)},get createJSDocNullableType(){return y(314)},get updateJSDocNullableType(){return g(314)},get createJSDocOptionalType(){return Q(316)},get updateJSDocOptionalType(){return h(316)},get createJSDocVariadicType(){return Q(318)},get updateJSDocVariadicType(){return h(318)},get createJSDocNamepathType(){return Q(319)},get updateJSDocNamepathType(){return h(319)},createJSDocFunctionType:Qo,updateJSDocFunctionType:wu,createJSDocTypeLiteral:Ko,updateJSDocTypeLiteral:ku,createJSDocTypeExpression:Zo,updateJSDocTypeExpression:D_,createJSDocSignature:ec,updateJSDocSignature:Eu,createJSDocTemplateTag:P_,updateJSDocTemplateTag:tc,createJSDocTypedefTag:va,updateJSDocTypedefTag:Au,createJSDocParameterTag:N_,updateJSDocParameterTag:Cu,createJSDocPropertyTag:nc,updateJSDocPropertyTag:rc,createJSDocCallbackTag:ic,updateJSDocCallbackTag:ac,createJSDocOverloadTag:_c,updateJSDocOverloadTag:I_,createJSDocAugmentsTag:O_,updateJSDocAugmentsTag:Mi,createJSDocImplementsTag:sc,updateJSDocImplementsTag:Ou,createJSDocSeeTag:Br,updateJSDocSeeTag:Ta,createJSDocImportTag:gc,updateJSDocImportTag:bc,createJSDocNameReference:oc,updateJSDocNameReference:Du,createJSDocMemberName:cc,updateJSDocMemberName:Pu,createJSDocLink:lc,updateJSDocLink:uc,createJSDocLinkCode:pc,updateJSDocLinkCode:Nu,createJSDocLinkPlain:fc,updateJSDocLinkPlain:Iu,get createJSDocTypeTag(){return re(344)},get updateJSDocTypeTag(){return he(344)},get createJSDocReturnTag(){return re(342)},get updateJSDocReturnTag(){return he(342)},get createJSDocThisTag(){return re(343)},get updateJSDocThisTag(){return he(343)},get createJSDocAuthorTag(){return x(330)},get updateJSDocAuthorTag(){return I(330)},get createJSDocClassTag(){return x(332)},get updateJSDocClassTag(){return I(332)},get createJSDocPublicTag(){return x(333)},get updateJSDocPublicTag(){return I(333)},get createJSDocPrivateTag(){return x(334)},get updateJSDocPrivateTag(){return I(334)},get createJSDocProtectedTag(){return x(335)},get updateJSDocProtectedTag(){return I(335)},get createJSDocReadonlyTag(){return x(336)},get updateJSDocReadonlyTag(){return I(336)},get createJSDocOverrideTag(){return x(337)},get updateJSDocOverrideTag(){return I(337)},get createJSDocDeprecatedTag(){return x(331)},get updateJSDocDeprecatedTag(){return I(331)},get createJSDocThrowsTag(){return re(349)},get updateJSDocThrowsTag(){return he(349)},get createJSDocSatisfiesTag(){return re(350)},get updateJSDocSatisfiesTag(){return he(350)},createJSDocEnumTag:yc,updateJSDocEnumTag:M_,createJSDocUnknownTag:hc,updateJSDocUnknownTag:Lu,createJSDocText:J_,updateJSDocText:ju,createJSDocComment:Ji,updateJSDocComment:vc,createJsxElement:Tc,updateJsxElement:Ru,createJsxSelfClosingElement:xc,updateJsxSelfClosingElement:L_,createJsxOpeningElement:j_,updateJsxOpeningElement:Sc,createJsxClosingElement:xa,updateJsxClosingElement:Kt,createJsxFragment:R_,createJsxText:Sa,updateJsxText:kc,createJsxOpeningFragment:Uu,createJsxJsxClosingFragment:Bu,updateJsxFragment:wc,createJsxAttribute:Ec,updateJsxAttribute:wa,createJsxAttributes:Ac,updateJsxAttributes:qu,createJsxSpreadAttribute:Cc,updateJsxSpreadAttribute:zu,createJsxExpression:ka,updateJsxExpression:Li,createJsxNamespacedName:Dc,updateJsxNamespacedName:U_,createCaseClause:B_,updateCaseClause:Fu,createDefaultClause:_i,updateDefaultClause:Pc,createHeritageClause:Nc,updateHeritageClause:Vu,createCatchClause:q_,updateCatchClause:Ic,createPropertyAssignment:Ea,updatePropertyAssignment:qr,createShorthandPropertyAssignment:Oc,updateShorthandPropertyAssignment:Gu,createSpreadAssignment:z_,updateSpreadAssignment:Mc,createEnumMember:wn,updateEnumMember:Jc,createSourceFile:Xu,updateSourceFile:Qu,createRedirectedSourceFile:Lc,createBundle:F_,updateBundle:Ku,createSyntheticExpression:Zu,createSyntaxList:Ca,createNotEmittedStatement:Rc,createNotEmittedTypeElement:ep,createPartiallyEmittedExpression:Uc,updatePartiallyEmittedExpression:Bc,createCommaListExpression:V_,updateCommaListExpression:qc,createSyntheticReferenceExpression:W_,updateSyntheticReferenceExpression:zc,cloneNode:G_,get createComma(){return v(28)},get createAssignment(){return v(64)},get createLogicalOr(){return v(57)},get createLogicalAnd(){return v(56)},get createBitwiseOr(){return v(52)},get createBitwiseXor(){return v(53)},get createBitwiseAnd(){return v(51)},get createStrictEquality(){return v(37)},get createStrictInequality(){return v(38)},get createEquality(){return v(35)},get createInequality(){return v(36)},get createLessThan(){return v(30)},get createLessThanEquals(){return v(33)},get createGreaterThan(){return v(32)},get createGreaterThanEquals(){return v(34)},get createLeftShift(){return v(48)},get createRightShift(){return v(49)},get createUnsignedRightShift(){return v(50)},get createAdd(){return v(40)},get createSubtract(){return v(41)},get createMultiply(){return v(42)},get createDivide(){return v(44)},get createModulo(){return v(45)},get createExponent(){return v(43)},get createPrefixPlus(){return A(40)},get createPrefixMinus(){return A(41)},get createPrefixIncrement(){return A(46)},get createPrefixDecrement(){return A(47)},get createBitwiseNot(){return A(55)},get createLogicalNot(){return A(54)},get createPostfixIncrement(){return P(46)},get createPostfixDecrement(){return P(47)},createImmediatelyInvokedFunctionExpression:ip,createImmediatelyInvokedArrowFunction:ap,createVoidZero:si,createExportDefault:Wc,createExternalModuleExport:_p,createTypeCheck:Y_,createIsNotTypeCheck:sp,createMethodCall:zr,createGlobalMethodCall:ji,createFunctionBindCall:op,createFunctionCallCall:cp,createFunctionApplyCall:lp,createArraySliceCall:Ri,createArrayConcatCall:up,createObjectDefinePropertyCall:X_,createObjectGetOwnPropertyDescriptorCall:oi,createReflectGetCall:Gc,createReflectSetCall:pp,createPropertyDescriptor:Yc,createCallBinding:Hc,createAssignmentTargetWrapper:s,inlineExpressions:p,getInternalName:b,getLocalName:S,getExportName:N,getDeclarationName:H,getNamespaceMemberName:_e,getExternalModuleOrNamespaceExportName:Z,restoreOuterExpressions:Xc,restoreEnclosingLabel:H_,createUseStrictPrologue:Le,copyPrologue:ee,copyStandardPrologue:je,copyCustomPrologue:Ae,ensureUseStrict:Yt,liftToBlock:mn,mergeLexicalEnvironment:ur,replaceModifiers:Ln,replaceDecoratorsAndModifiers:Fr,replacePropertyName:mp};return Un(Ob,n=>n(ye)),ye;function de(n,i){if(n===void 0||n===bt)n=[];else if(mi(n)){if(i===void 0||n.hasTrailingComma===i)return n.transformFlags===void 0&&Xd(n),B.attachNodeArrayDebugInfo(n),n;let f=n.slice();return f.pos=n.pos,f.end=n.end,f.hasTrailingComma=i,f.transformFlags=n.transformFlags,B.attachNodeArrayDebugInfo(f),f}let _=n.length,c=_>=1&&_<=4?n.slice():n;return c.pos=-1,c.end=-1,c.hasTrailingComma=!!i,c.transformFlags=0,Xd(c),B.attachNodeArrayDebugInfo(c),c}function M(n){return t.createBaseNode(n)}function ae(n){let i=M(n);return i.symbol=void 0,i.localSymbol=void 0,i}function Oe(n,i){return n!==i&&(n.typeArguments=i.typeArguments),q(n,i)}function V(n,i=0){let _=typeof n=="number"?n+"":n;B.assert(_.charCodeAt(0)!==45,"Negative numbers should be created in combination with createPrefixUnaryExpression");let c=ae(9);return c.text=_,c.numericLiteralFlags=i,i&384&&(c.transformFlags|=1024),c}function oe(n){let i=$t(10);return i.text=typeof n=="string"?n:wb(n)+"n",i.transformFlags|=32,i}function W(n,i){let _=ae(11);return _.text=n,_.singleQuote=i,_}function dt(n,i,_){let c=W(n,i);return c.hasExtendedUnicodeEscape=_,_&&(c.transformFlags|=1024),c}function nr(n){let i=W(B2(n),void 0);return i.textSourceNode=n,i}function gn(n){let i=$t(14);return i.text=n,i}function rr(n,i){switch(n){case 9:return V(i,0);case 10:return oe(i);case 11:return dt(i,void 0);case 12:return Sa(i,!1);case 13:return Sa(i,!0);case 14:return gn(i);case 15:return ii(n,i,void 0,0)}}function bn(n){let i=t.createBaseIdentifierNode(80);return i.escapedText=n,i.jsDoc=void 0,i.flowNode=void 0,i.symbol=void 0,i}function In(n,i,_,c){let f=bn(Ja(n));return setIdentifierAutoGenerate(f,{flags:i,id:il,prefix:_,suffix:c}),il++,f}function Ge(n,i,_){i===void 0&&n&&(i=zm(n)),i===80&&(i=void 0);let c=bn(Ja(n));return _&&(c.flags|=256),c.escapedText==="await"&&(c.transformFlags|=67108864),c.flags&256&&(c.transformFlags|=1024),c}function ir(n,i,_,c){let f=1;i&&(f|=8);let w=In("",f,_,c);return n&&n(w),w}function Pr(n){let i=2;return n&&(i|=8),In("",i,void 0,void 0)}function Ot(n,i=0,_,c){return B.assert(!(i&7),"Argument out of range: flags"),B.assert((i&48)!==32,"GeneratedIdentifierFlags.FileLevel cannot be set without also setting GeneratedIdentifierFlags.Optimistic"),In(n,3|i,_,c)}function Bn(n,i=0,_,c){B.assert(!(i&7),"Argument out of range: flags");let f=n?Rp(n)?Wp(!1,_,n,c,Pn):`generated@${getNodeId(n)}`:"";(_||c)&&(i|=16);let w=In(f,4|i,_,c);return w.original=n,w}function On(n){let i=t.createBasePrivateIdentifierNode(81);return i.escapedText=n,i.transformFlags|=16777216,i}function Mt(n){return pl(n,"#")||B.fail("First character of private identifier must be #: "+n),On(Ja(n))}function vt(n,i,_,c){let f=On(Ja(n));return setIdentifierAutoGenerate(f,{flags:i,id:il,prefix:_,suffix:c}),il++,f}function Qe(n,i,_){n&&!pl(n,"#")&&B.fail("First character of private identifier must be #: "+n);let c=8|(n?3:1);return vt(n??"",c,i,_)}function qn(n,i,_){let c=Rp(n)?Wp(!0,i,n,_,Pn):`#generated@${getNodeId(n)}`,w=vt(c,4|(i||_?16:0),i,_);return w.original=n,w}function $t(n){return t.createBaseTokenNode(n)}function ct(n){B.assert(n>=0&&n<=165,"Invalid token"),B.assert(n<=15||n>=18,"Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."),B.assert(n<=9||n>=15,"Invalid token. Use 'createLiteralLikeNode' to create literals."),B.assert(n!==80,"Invalid token. Use 'createIdentifier' to create identifiers");let i=$t(n),_=0;switch(n){case 134:_=384;break;case 160:_=4;break;case 125:case 123:case 124:case 148:case 128:case 138:case 87:case 133:case 150:case 163:case 146:case 151:case 103:case 147:case 164:case 154:case 136:case 155:case 116:case 159:case 157:_=1;break;case 108:_=134218752,i.flowNode=void 0;break;case 126:_=1024;break;case 129:_=16777216;break;case 110:_=16384,i.flowNode=void 0;break}return _&&(i.transformFlags|=_),i}function _t(){return ct(108)}function Ut(){return ct(110)}function Jt(){return ct(106)}function lt(){return ct(112)}function ar(){return ct(97)}function mt(n){return ct(n)}function vn(n){let i=[];return n&32&&i.push(mt(95)),n&128&&i.push(mt(138)),n&2048&&i.push(mt(90)),n&4096&&i.push(mt(87)),n&1&&i.push(mt(125)),n&2&&i.push(mt(123)),n&4&&i.push(mt(124)),n&64&&i.push(mt(128)),n&256&&i.push(mt(126)),n&16&&i.push(mt(164)),n&8&&i.push(mt(148)),n&512&&i.push(mt(129)),n&1024&&i.push(mt(134)),n&8192&&i.push(mt(103)),n&16384&&i.push(mt(147)),i.length?i:void 0}function yt(n,i){let _=M(166);return _.left=n,_.right=et(i),_.transformFlags|=z(_.left)|ja(_.right),_.flowNode=void 0,_}function cn(n,i,_){return n.left!==i||n.right!==_?q(yt(i,_),n):n}function nt(n){let i=M(167);return i.expression=o().parenthesizeExpressionOfComputedPropertyName(n),i.transformFlags|=z(i.expression)|1024|131072,i}function Bt(n,i){return n.expression!==i?q(nt(i),n):n}function rn(n,i,_,c){let f=ae(168);return f.modifiers=De(n),f.name=et(i),f.constraint=_,f.default=c,f.transformFlags=1,f.expression=void 0,f.jsDoc=void 0,f}function _r(n,i,_,c,f){return n.modifiers!==i||n.name!==_||n.constraint!==c||n.default!==f?q(rn(i,_,c,f),n):n}function fr(n,i,_,c,f,w){let F=ae(169);return F.modifiers=De(n),F.dotDotDotToken=i,F.name=et(_),F.questionToken=c,F.type=f,F.initializer=Da(w),z2(F.name)?F.transformFlags=1:F.transformFlags=ke(F.modifiers)|z(F.dotDotDotToken)|jn(F.name)|z(F.questionToken)|z(F.initializer)|(F.questionToken??F.type?1:0)|(F.dotDotDotToken??F.initializer?1024:0)|(Rn(F.modifiers)&31?8192:0),F.jsDoc=void 0,F}function dr(n,i,_,c,f,w,F){return n.modifiers!==i||n.dotDotDotToken!==_||n.name!==c||n.questionToken!==f||n.type!==w||n.initializer!==F?q(fr(i,_,c,f,w,F),n):n}function zn(n){let i=M(170);return i.expression=o().parenthesizeLeftSideOfAccess(n,!1),i.transformFlags|=z(i.expression)|1|8192|33554432,i}function Fn(n,i){return n.expression!==i?q(zn(i),n):n}function Nr(n,i,_,c){let f=ae(171);return f.modifiers=De(n),f.name=et(i),f.type=c,f.questionToken=_,f.transformFlags=1,f.initializer=void 0,f.jsDoc=void 0,f}function Vn(n,i,_,c,f){return n.modifiers!==i||n.name!==_||n.questionToken!==c||n.type!==f?Ce(Nr(i,_,c,f),n):n}function Ce(n,i){return n!==i&&(n.initializer=i.initializer),q(n,i)}function mr(n,i,_,c,f){let w=ae(172);w.modifiers=De(n),w.name=et(i),w.questionToken=_&&$d(_)?_:void 0,w.exclamationToken=_&&Hd(_)?_:void 0,w.type=c,w.initializer=Da(f);let F=w.flags&33554432||Rn(w.modifiers)&128;return w.transformFlags=ke(w.modifiers)|jn(w.name)|z(w.initializer)|(F||w.questionToken||w.exclamationToken||w.type?1:0)|(Ef(w.name)||Rn(w.modifiers)&256&&w.initializer?8192:0)|16777216,w.jsDoc=void 0,w}function L(n,i,_,c,f,w){return n.modifiers!==i||n.name!==_||n.questionToken!==(c!==void 0&&$d(c)?c:void 0)||n.exclamationToken!==(c!==void 0&&Hd(c)?c:void 0)||n.type!==f||n.initializer!==w?q(mr(i,_,c,f,w),n):n}function se(n,i,_,c,f,w){let F=ae(173);return F.modifiers=De(n),F.name=et(i),F.questionToken=_,F.typeParameters=De(c),F.parameters=De(f),F.type=w,F.transformFlags=1,F.jsDoc=void 0,F.locals=void 0,F.nextContainer=void 0,F.typeArguments=void 0,F}function fe(n,i,_,c,f,w,F){return n.modifiers!==i||n.name!==_||n.questionToken!==c||n.typeParameters!==f||n.parameters!==w||n.type!==F?Oe(se(i,_,c,f,w,F),n):n}function Te(n,i,_,c,f,w,F,pe){let Re=ae(174);if(Re.modifiers=De(n),Re.asteriskToken=i,Re.name=et(_),Re.questionToken=c,Re.exclamationToken=void 0,Re.typeParameters=De(f),Re.parameters=de(w),Re.type=F,Re.body=pe,!Re.body)Re.transformFlags=1;else{let en=Rn(Re.modifiers)&1024,kn=!!Re.asteriskToken,$n=en&&kn;Re.transformFlags=ke(Re.modifiers)|z(Re.asteriskToken)|jn(Re.name)|z(Re.questionToken)|ke(Re.typeParameters)|ke(Re.parameters)|z(Re.type)|z(Re.body)&-67108865|($n?128:en?256:kn?2048:0)|(Re.questionToken||Re.typeParameters||Re.type?1:0)|1024}return Re.typeArguments=void 0,Re.jsDoc=void 0,Re.locals=void 0,Re.nextContainer=void 0,Re.flowNode=void 0,Re.endFlowNode=void 0,Re.returnFlowNode=void 0,Re}function He(n,i,_,c,f,w,F,pe,Re){return n.modifiers!==i||n.asteriskToken!==_||n.name!==c||n.questionToken!==f||n.typeParameters!==w||n.parameters!==F||n.type!==pe||n.body!==Re?Ke(Te(i,_,c,f,w,F,pe,Re),n):n}function Ke(n,i){return n!==i&&(n.exclamationToken=i.exclamationToken),q(n,i)}function st(n){let i=ae(175);return i.body=n,i.transformFlags=z(n)|16777216,i.modifiers=void 0,i.jsDoc=void 0,i.locals=void 0,i.nextContainer=void 0,i.endFlowNode=void 0,i.returnFlowNode=void 0,i}function Dt(n,i){return n.body!==i?Tt(st(i),n):n}function Tt(n,i){return n!==i&&(n.modifiers=i.modifiers),q(n,i)}function ut(n,i,_){let c=ae(176);return c.modifiers=De(n),c.parameters=de(i),c.body=_,c.body?c.transformFlags=ke(c.modifiers)|ke(c.parameters)|z(c.body)&-67108865|1024:c.transformFlags=1,c.typeParameters=void 0,c.type=void 0,c.typeArguments=void 0,c.jsDoc=void 0,c.locals=void 0,c.nextContainer=void 0,c.endFlowNode=void 0,c.returnFlowNode=void 0,c}function Ir(n,i,_,c){return n.modifiers!==i||n.parameters!==_||n.body!==c?hr(ut(i,_,c),n):n}function hr(n,i){return n!==i&&(n.typeParameters=i.typeParameters,n.type=i.type),Oe(n,i)}function Mn(n,i,_,c,f){let w=ae(177);return w.modifiers=De(n),w.name=et(i),w.parameters=de(_),w.type=c,w.body=f,w.body?w.transformFlags=ke(w.modifiers)|jn(w.name)|ke(w.parameters)|z(w.type)|z(w.body)&-67108865|(w.type?1:0):w.transformFlags=1,w.typeArguments=void 0,w.typeParameters=void 0,w.jsDoc=void 0,w.locals=void 0,w.nextContainer=void 0,w.flowNode=void 0,w.endFlowNode=void 0,w.returnFlowNode=void 0,w}function Wn(n,i,_,c,f,w){return n.modifiers!==i||n.name!==_||n.parameters!==c||n.type!==f||n.body!==w?Si(Mn(i,_,c,f,w),n):n}function Si(n,i){return n!==i&&(n.typeParameters=i.typeParameters),Oe(n,i)}function R(n,i,_,c){let f=ae(178);return f.modifiers=De(n),f.name=et(i),f.parameters=de(_),f.body=c,f.body?f.transformFlags=ke(f.modifiers)|jn(f.name)|ke(f.parameters)|z(f.body)&-67108865|(f.type?1:0):f.transformFlags=1,f.typeArguments=void 0,f.typeParameters=void 0,f.type=void 0,f.jsDoc=void 0,f.locals=void 0,f.nextContainer=void 0,f.flowNode=void 0,f.endFlowNode=void 0,f.returnFlowNode=void 0,f}function $(n,i,_,c,f){return n.modifiers!==i||n.name!==_||n.parameters!==c||n.body!==f?K(R(i,_,c,f),n):n}function K(n,i){return n!==i&&(n.typeParameters=i.typeParameters,n.type=i.type),Oe(n,i)}function xe(n,i,_){let c=ae(179);return c.typeParameters=De(n),c.parameters=De(i),c.type=_,c.transformFlags=1,c.jsDoc=void 0,c.locals=void 0,c.nextContainer=void 0,c.typeArguments=void 0,c}function Se(n,i,_,c){return n.typeParameters!==i||n.parameters!==_||n.type!==c?Oe(xe(i,_,c),n):n}function we(n,i,_){let c=ae(180);return c.typeParameters=De(n),c.parameters=De(i),c.type=_,c.transformFlags=1,c.jsDoc=void 0,c.locals=void 0,c.nextContainer=void 0,c.typeArguments=void 0,c}function be(n,i,_,c){return n.typeParameters!==i||n.parameters!==_||n.type!==c?Oe(we(i,_,c),n):n}function We(n,i,_){let c=ae(181);return c.modifiers=De(n),c.parameters=De(i),c.type=_,c.transformFlags=1,c.jsDoc=void 0,c.locals=void 0,c.nextContainer=void 0,c.typeArguments=void 0,c}function Ze(n,i,_,c){return n.parameters!==_||n.type!==c||n.modifiers!==i?Oe(We(i,_,c),n):n}function Ye(n,i){let _=M(204);return _.type=n,_.literal=i,_.transformFlags=1,_}function Ee(n,i,_){return n.type!==i||n.literal!==_?q(Ye(i,_),n):n}function Tn(n){return ct(n)}function rt(n,i,_){let c=M(182);return c.assertsModifier=n,c.parameterName=et(i),c.type=_,c.transformFlags=1,c}function ln(n,i,_,c){return n.assertsModifier!==i||n.parameterName!==_||n.type!==c?q(rt(i,_,c),n):n}function Zr(n,i){let _=M(183);return _.typeName=et(n),_.typeArguments=i&&o().parenthesizeTypeArguments(de(i)),_.transformFlags=1,_}function J(n,i,_){return n.typeName!==i||n.typeArguments!==_?q(Zr(i,_),n):n}function qe(n,i,_){let c=ae(184);return c.typeParameters=De(n),c.parameters=De(i),c.type=_,c.transformFlags=1,c.modifiers=void 0,c.jsDoc=void 0,c.locals=void 0,c.nextContainer=void 0,c.typeArguments=void 0,c}function u(n,i,_,c){return n.typeParameters!==i||n.parameters!==_||n.type!==c?Ne(qe(i,_,c),n):n}function Ne(n,i){return n!==i&&(n.modifiers=i.modifiers),Oe(n,i)}function Me(...n){return n.length===4?U(...n):n.length===3?ze(...n):B.fail("Incorrect number of arguments specified.")}function U(n,i,_,c){let f=ae(185);return f.modifiers=De(n),f.typeParameters=De(i),f.parameters=De(_),f.type=c,f.transformFlags=1,f.jsDoc=void 0,f.locals=void 0,f.nextContainer=void 0,f.typeArguments=void 0,f}function ze(n,i,_){return U(void 0,n,i,_)}function an(...n){return n.length===5?Ve(...n):n.length===4?$e(...n):B.fail("Incorrect number of arguments specified.")}function Ve(n,i,_,c,f){return n.modifiers!==i||n.typeParameters!==_||n.parameters!==c||n.type!==f?Oe(Me(i,_,c,f),n):n}function $e(n,i,_,c){return Ve(n,n.modifiers,i,_,c)}function Pt(n,i){let _=M(186);return _.exprName=n,_.typeArguments=i&&o().parenthesizeTypeArguments(i),_.transformFlags=1,_}function kt(n,i,_){return n.exprName!==i||n.typeArguments!==_?q(Pt(i,_),n):n}function Nt(n){let i=ae(187);return i.members=de(n),i.transformFlags=1,i}function qt(n,i){return n.members!==i?q(Nt(i),n):n}function Gn(n){let i=M(188);return i.elementType=o().parenthesizeNonArrayTypeOfPostfixType(n),i.transformFlags=1,i}function wi(n,i){return n.elementType!==i?q(Gn(i),n):n}function un(n){let i=M(189);return i.elements=de(o().parenthesizeElementTypesOfTupleType(n)),i.transformFlags=1,i}function G(n,i){return n.elements!==i?q(un(i),n):n}function le(n,i,_,c){let f=ae(202);return f.dotDotDotToken=n,f.name=i,f.questionToken=_,f.type=c,f.transformFlags=1,f.jsDoc=void 0,f}function Fe(n,i,_,c,f){return n.dotDotDotToken!==i||n.name!==_||n.questionToken!==c||n.type!==f?q(le(i,_,c,f),n):n}function ve(n){let i=M(190);return i.type=o().parenthesizeTypeOfOptionalType(n),i.transformFlags=1,i}function j(n,i){return n.type!==i?q(ve(i),n):n}function ht(n){let i=M(191);return i.type=n,i.transformFlags=1,i}function xt(n,i){return n.type!==i?q(ht(i),n):n}function Lt(n,i,_){let c=M(n);return c.types=ye.createNodeArray(_(i)),c.transformFlags=1,c}function pn(n,i,_){return n.types!==i?q(Lt(n.kind,i,_),n):n}function Bl(n){return Lt(192,n,o().parenthesizeConstituentTypesOfUnionType)}function Es(n,i){return pn(n,i,o().parenthesizeConstituentTypesOfUnionType)}function Or(n){return Lt(193,n,o().parenthesizeConstituentTypesOfIntersectionType)}function Je(n,i){return pn(n,i,o().parenthesizeConstituentTypesOfIntersectionType)}function ft(n,i,_,c){let f=M(194);return f.checkType=o().parenthesizeCheckTypeOfConditionalType(n),f.extendsType=o().parenthesizeExtendsTypeOfConditionalType(i),f.trueType=_,f.falseType=c,f.transformFlags=1,f.locals=void 0,f.nextContainer=void 0,f}function ql(n,i,_,c,f){return n.checkType!==i||n.extendsType!==_||n.trueType!==c||n.falseType!==f?q(ft(i,_,c,f),n):n}function Yn(n){let i=M(195);return i.typeParameter=n,i.transformFlags=1,i}function zl(n,i){return n.typeParameter!==i?q(Yn(i),n):n}function Wt(n,i){let _=M(203);return _.head=n,_.templateSpans=de(i),_.transformFlags=1,_}function Fl(n,i,_){return n.head!==i||n.templateSpans!==_?q(Wt(i,_),n):n}function sr(n,i,_,c,f=!1){let w=M(205);return w.argument=n,w.attributes=i,w.assertions&&w.assertions.assertClause&&w.attributes&&(w.assertions.assertClause=w.attributes),w.qualifier=_,w.typeArguments=c&&o().parenthesizeTypeArguments(c),w.isTypeOf=f,w.transformFlags=1,w}function aa(n,i,_,c,f,w=n.isTypeOf){return n.argument!==i||n.attributes!==_||n.qualifier!==c||n.typeArguments!==f||n.isTypeOf!==w?q(sr(i,_,c,f,w),n):n}function Qt(n){let i=M(196);return i.type=n,i.transformFlags=1,i}function Ct(n,i){return n.type!==i?q(Qt(i),n):n}function D(){let n=M(197);return n.transformFlags=1,n}function Gt(n,i){let _=M(198);return _.operator=n,_.type=n===148?o().parenthesizeOperandOfReadonlyTypeOperator(i):o().parenthesizeOperandOfTypeOperator(i),_.transformFlags=1,_}function Mr(n,i){return n.type!==i?q(Gt(n.operator,i),n):n}function or(n,i){let _=M(199);return _.objectType=o().parenthesizeNonArrayTypeOfPostfixType(n),_.indexType=i,_.transformFlags=1,_}function Ka(n,i,_){return n.objectType!==i||n.indexType!==_?q(or(i,_),n):n}function St(n,i,_,c,f,w){let F=ae(200);return F.readonlyToken=n,F.typeParameter=i,F.nameType=_,F.questionToken=c,F.type=f,F.members=w&&de(w),F.transformFlags=1,F.locals=void 0,F.nextContainer=void 0,F}function jt(n,i,_,c,f,w,F){return n.readonlyToken!==i||n.typeParameter!==_||n.nameType!==c||n.questionToken!==f||n.type!==w||n.members!==F?q(St(i,_,c,f,w,F),n):n}function ei(n){let i=M(201);return i.literal=n,i.transformFlags=1,i}function yr(n,i){return n.literal!==i?q(ei(i),n):n}function As(n){let i=M(206);return i.elements=de(n),i.transformFlags|=ke(i.elements)|1024|524288,i.transformFlags&32768&&(i.transformFlags|=65664),i}function Vl(n,i){return n.elements!==i?q(As(i),n):n}function Jr(n){let i=M(207);return i.elements=de(n),i.transformFlags|=ke(i.elements)|1024|524288,i}function Wl(n,i){return n.elements!==i?q(Jr(i),n):n}function _a(n,i,_,c){let f=ae(208);return f.dotDotDotToken=n,f.propertyName=et(i),f.name=et(_),f.initializer=Da(c),f.transformFlags|=z(f.dotDotDotToken)|jn(f.propertyName)|jn(f.name)|z(f.initializer)|(f.dotDotDotToken?32768:0)|1024,f.flowNode=void 0,f}function ti(n,i,_,c,f){return n.propertyName!==_||n.dotDotDotToken!==i||n.name!==c||n.initializer!==f?q(_a(i,_,c,f),n):n}function Za(n,i){let _=M(209),c=n&&Yi(n),f=de(n,c&&X1(c)?!0:void 0);return _.elements=o().parenthesizeExpressionsOfCommaDelimitedList(f),_.multiLine=i,_.transformFlags|=ke(_.elements),_}function Cs(n,i){return n.elements!==i?q(Za(i,n.multiLine),n):n}function ki(n,i){let _=ae(210);return _.properties=de(n),_.multiLine=i,_.transformFlags|=ke(_.properties),_.jsDoc=void 0,_}function Gl(n,i){return n.properties!==i?q(ki(i,n.multiLine),n):n}function Ds(n,i,_){let c=ae(211);return c.expression=n,c.questionDotToken=i,c.name=_,c.transformFlags=z(c.expression)|z(c.questionDotToken)|(tt(c.name)?ja(c.name):z(c.name)|536870912),c.jsDoc=void 0,c.flowNode=void 0,c}function cr(n,i){let _=Ds(o().parenthesizeLeftSideOfAccess(n,!1),void 0,et(i));return Cp(n)&&(_.transformFlags|=384),_}function Yl(n,i,_){return Lg(n)?sa(n,i,n.questionDotToken,kr(_,tt)):n.expression!==i||n.name!==_?q(cr(i,_),n):n}function Ei(n,i,_){let c=Ds(o().parenthesizeLeftSideOfAccess(n,!0),i,et(_));return c.flags|=64,c.transformFlags|=32,c}function sa(n,i,_,c){return B.assert(!!(n.flags&64),"Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."),n.expression!==i||n.questionDotToken!==_||n.name!==c?q(Ei(i,_,c),n):n}function Ps(n,i,_){let c=ae(212);return c.expression=n,c.questionDotToken=i,c.argumentExpression=_,c.transformFlags|=z(c.expression)|z(c.questionDotToken)|z(c.argumentExpression),c.jsDoc=void 0,c.flowNode=void 0,c}function Ai(n,i){let _=Ps(o().parenthesizeLeftSideOfAccess(n,!1),void 0,pr(i));return Cp(n)&&(_.transformFlags|=384),_}function Xl(n,i,_){return jg(n)?e_(n,i,n.questionDotToken,_):n.expression!==i||n.argumentExpression!==_?q(Ai(i,_),n):n}function Ns(n,i,_){let c=Ps(o().parenthesizeLeftSideOfAccess(n,!0),i,pr(_));return c.flags|=64,c.transformFlags|=32,c}function e_(n,i,_,c){return B.assert(!!(n.flags&64),"Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."),n.expression!==i||n.questionDotToken!==_||n.argumentExpression!==c?q(Ns(i,_,c),n):n}function Is(n,i,_,c){let f=ae(213);return f.expression=n,f.questionDotToken=i,f.typeArguments=_,f.arguments=c,f.transformFlags|=z(f.expression)|z(f.questionDotToken)|ke(f.typeArguments)|ke(f.arguments),f.typeArguments&&(f.transformFlags|=1),qd(f.expression)&&(f.transformFlags|=16384),f}function Ci(n,i,_){let c=Is(o().parenthesizeLeftSideOfAccess(n,!1),void 0,De(i),o().parenthesizeExpressionsOfCommaDelimitedList(de(_)));return Fb(c.expression)&&(c.transformFlags|=8388608),c}function oa(n,i,_,c){return Md(n)?Os(n,i,n.questionDotToken,_,c):n.expression!==i||n.typeArguments!==_||n.arguments!==c?q(Ci(i,_,c),n):n}function t_(n,i,_,c){let f=Is(o().parenthesizeLeftSideOfAccess(n,!0),i,De(_),o().parenthesizeExpressionsOfCommaDelimitedList(de(c)));return f.flags|=64,f.transformFlags|=32,f}function Os(n,i,_,c,f){return B.assert(!!(n.flags&64),"Cannot update a CallExpression using updateCallChain. Use updateCall instead."),n.expression!==i||n.questionDotToken!==_||n.typeArguments!==c||n.arguments!==f?q(t_(i,_,c,f),n):n}function xn(n,i,_){let c=ae(214);return c.expression=o().parenthesizeExpressionOfNew(n),c.typeArguments=De(i),c.arguments=_?o().parenthesizeExpressionsOfCommaDelimitedList(_):void 0,c.transformFlags|=z(c.expression)|ke(c.typeArguments)|ke(c.arguments)|32,c.typeArguments&&(c.transformFlags|=1),c}function n_(n,i,_,c){return n.expression!==i||n.typeArguments!==_||n.arguments!==c?q(xn(i,_,c),n):n}function ca(n,i,_){let c=M(215);return c.tag=o().parenthesizeLeftSideOfAccess(n,!1),c.typeArguments=De(i),c.template=_,c.transformFlags|=z(c.tag)|ke(c.typeArguments)|z(c.template)|1024,c.typeArguments&&(c.transformFlags|=1),q2(c.template)&&(c.transformFlags|=128),c}function Ms(n,i,_,c){return n.tag!==i||n.typeArguments!==_||n.template!==c?q(ca(i,_,c),n):n}function Js(n,i){let _=M(216);return _.expression=o().parenthesizeOperandOfPrefixUnary(i),_.type=n,_.transformFlags|=z(_.expression)|z(_.type)|1,_}function Ls(n,i,_){return n.type!==i||n.expression!==_?q(Js(i,_),n):n}function r_(n){let i=M(217);return i.expression=n,i.transformFlags=z(i.expression),i.jsDoc=void 0,i}function js(n,i){return n.expression!==i?q(r_(i),n):n}function i_(n,i,_,c,f,w,F){let pe=ae(218);pe.modifiers=De(n),pe.asteriskToken=i,pe.name=et(_),pe.typeParameters=De(c),pe.parameters=de(f),pe.type=w,pe.body=F;let Re=Rn(pe.modifiers)&1024,en=!!pe.asteriskToken,kn=Re&&en;return pe.transformFlags=ke(pe.modifiers)|z(pe.asteriskToken)|jn(pe.name)|ke(pe.typeParameters)|ke(pe.parameters)|z(pe.type)|z(pe.body)&-67108865|(kn?128:Re?256:en?2048:0)|(pe.typeParameters||pe.type?1:0)|4194304,pe.typeArguments=void 0,pe.jsDoc=void 0,pe.locals=void 0,pe.nextContainer=void 0,pe.flowNode=void 0,pe.endFlowNode=void 0,pe.returnFlowNode=void 0,pe}function Rs(n,i,_,c,f,w,F,pe){return n.name!==c||n.modifiers!==i||n.asteriskToken!==_||n.typeParameters!==f||n.parameters!==w||n.type!==F||n.body!==pe?Oe(i_(i,_,c,f,w,F,pe),n):n}function a_(n,i,_,c,f,w){let F=ae(219);F.modifiers=De(n),F.typeParameters=De(i),F.parameters=de(_),F.type=c,F.equalsGreaterThanToken=f??ct(39),F.body=o().parenthesizeConciseBodyOfArrowFunction(w);let pe=Rn(F.modifiers)&1024;return F.transformFlags=ke(F.modifiers)|ke(F.typeParameters)|ke(F.parameters)|z(F.type)|z(F.equalsGreaterThanToken)|z(F.body)&-67108865|(F.typeParameters||F.type?1:0)|(pe?16640:0)|1024,F.typeArguments=void 0,F.jsDoc=void 0,F.locals=void 0,F.nextContainer=void 0,F.flowNode=void 0,F.endFlowNode=void 0,F.returnFlowNode=void 0,F}function Us(n,i,_,c,f,w,F){return n.modifiers!==i||n.typeParameters!==_||n.parameters!==c||n.type!==f||n.equalsGreaterThanToken!==w||n.body!==F?Oe(a_(i,_,c,f,w,F),n):n}function Bs(n){let i=M(220);return i.expression=o().parenthesizeOperandOfPrefixUnary(n),i.transformFlags|=z(i.expression),i}function qs(n,i){return n.expression!==i?q(Bs(i),n):n}function la(n){let i=M(221);return i.expression=o().parenthesizeOperandOfPrefixUnary(n),i.transformFlags|=z(i.expression),i}function fn(n,i){return n.expression!==i?q(la(i),n):n}function __(n){let i=M(222);return i.expression=o().parenthesizeOperandOfPrefixUnary(n),i.transformFlags|=z(i.expression),i}function lr(n,i){return n.expression!==i?q(__(i),n):n}function zs(n){let i=M(223);return i.expression=o().parenthesizeOperandOfPrefixUnary(n),i.transformFlags|=z(i.expression)|256|128|2097152,i}function Lr(n,i){return n.expression!==i?q(zs(i),n):n}function jr(n,i){let _=M(224);return _.operator=n,_.operand=o().parenthesizeOperandOfPrefixUnary(i),_.transformFlags|=z(_.operand),(n===46||n===47)&&tt(_.operand)&&!Ua(_.operand)&&!Kd(_.operand)&&(_.transformFlags|=268435456),_}function Hl(n,i){return n.operand!==i?q(jr(n.operator,i),n):n}function ni(n,i){let _=M(225);return _.operator=i,_.operand=o().parenthesizeOperandOfPostfixUnary(n),_.transformFlags|=z(_.operand),tt(_.operand)&&!Ua(_.operand)&&!Kd(_.operand)&&(_.transformFlags|=268435456),_}function $l(n,i){return n.operand!==i?q(ni(i,n.operator),n):n}function ua(n,i,_){let c=ae(226),f=$c(i),w=f.kind;return c.left=o().parenthesizeLeftSideOfBinary(w,n),c.operatorToken=f,c.right=o().parenthesizeRightSideOfBinary(w,c.left,_),c.transformFlags|=z(c.left)|z(c.operatorToken)|z(c.right),w===61?c.transformFlags|=32:w===64?Of(c.left)?c.transformFlags|=5248|Fs(c.left):V1(c.left)&&(c.transformFlags|=5120|Fs(c.left)):w===43||w===68?c.transformFlags|=512:K2(w)&&(c.transformFlags|=16),w===103&&gi(c.left)&&(c.transformFlags|=536870912),c.jsDoc=void 0,c}function Fs(n){return lh(n)?65536:0}function Ql(n,i,_,c){return n.left!==i||n.operatorToken!==_||n.right!==c?q(ua(i,_,c),n):n}function Vs(n,i,_,c,f){let w=M(227);return w.condition=o().parenthesizeConditionOfConditionalExpression(n),w.questionToken=i??ct(58),w.whenTrue=o().parenthesizeBranchOfConditionalExpression(_),w.colonToken=c??ct(59),w.whenFalse=o().parenthesizeBranchOfConditionalExpression(f),w.transformFlags|=z(w.condition)|z(w.questionToken)|z(w.whenTrue)|z(w.colonToken)|z(w.whenFalse),w}function Ws(n,i,_,c,f,w){return n.condition!==i||n.questionToken!==_||n.whenTrue!==c||n.colonToken!==f||n.whenFalse!==w?q(Vs(i,_,c,f,w),n):n}function Gs(n,i){let _=M(228);return _.head=n,_.templateSpans=de(i),_.transformFlags|=z(_.head)|ke(_.templateSpans)|1024,_}function Xn(n,i,_){return n.head!==i||n.templateSpans!==_?q(Gs(i,_),n):n}function Di(n,i,_,c=0){B.assert(!(c&-7177),"Unsupported template flags.");let f;if(_!==void 0&&_!==i&&(f=Mb(n,_),typeof f=="object"))return B.fail("Invalid raw text");if(i===void 0){if(f===void 0)return B.fail("Arguments 'text' and 'rawText' may not both be undefined.");i=f}else f!==void 0&&B.assert(i===f,"Expected argument 'text' to be the normalized (i.e. 'cooked') version of argument 'rawText'.");return i}function Ys(n){let i=1024;return n&&(i|=128),i}function Kl(n,i,_,c){let f=$t(n);return f.text=i,f.rawText=_,f.templateFlags=c&7176,f.transformFlags=Ys(f.templateFlags),f}function ri(n,i,_,c){let f=ae(n);return f.text=i,f.rawText=_,f.templateFlags=c&7176,f.transformFlags=Ys(f.templateFlags),f}function ii(n,i,_,c){return n===15?ri(n,i,_,c):Kl(n,i,_,c)}function Xs(n,i,_){return n=Di(16,n,i,_),ii(16,n,i,_)}function pa(n,i,_){return n=Di(16,n,i,_),ii(17,n,i,_)}function s_(n,i,_){return n=Di(16,n,i,_),ii(18,n,i,_)}function Zl(n,i,_){return n=Di(16,n,i,_),ri(15,n,i,_)}function o_(n,i){B.assert(!n||!!i,"A `YieldExpression` with an asteriskToken must have an expression.");let _=M(229);return _.expression=i&&o().parenthesizeExpressionForDisallowedComma(i),_.asteriskToken=n,_.transformFlags|=z(_.expression)|z(_.asteriskToken)|1024|128|1048576,_}function eu(n,i,_){return n.expression!==_||n.asteriskToken!==i?q(o_(i,_),n):n}function Hs(n){let i=M(230);return i.expression=o().parenthesizeExpressionForDisallowedComma(n),i.transformFlags|=z(i.expression)|1024|32768,i}function tu(n,i){return n.expression!==i?q(Hs(i),n):n}function $s(n,i,_,c,f){let w=ae(231);return w.modifiers=De(n),w.name=et(i),w.typeParameters=De(_),w.heritageClauses=De(c),w.members=de(f),w.transformFlags|=ke(w.modifiers)|jn(w.name)|ke(w.typeParameters)|ke(w.heritageClauses)|ke(w.members)|(w.typeParameters?1:0)|1024,w.jsDoc=void 0,w}function c_(n,i,_,c,f,w){return n.modifiers!==i||n.name!==_||n.typeParameters!==c||n.heritageClauses!==f||n.members!==w?q($s(i,_,c,f,w),n):n}function l_(){return M(232)}function Qs(n,i){let _=M(233);return _.expression=o().parenthesizeLeftSideOfAccess(n,!1),_.typeArguments=i&&o().parenthesizeTypeArguments(i),_.transformFlags|=z(_.expression)|ke(_.typeArguments)|1024,_}function Ks(n,i,_){return n.expression!==i||n.typeArguments!==_?q(Qs(i,_),n):n}function dn(n,i){let _=M(234);return _.expression=n,_.type=i,_.transformFlags|=z(_.expression)|z(_.type)|1,_}function fa(n,i,_){return n.expression!==i||n.type!==_?q(dn(i,_),n):n}function Zs(n){let i=M(235);return i.expression=o().parenthesizeLeftSideOfAccess(n,!1),i.transformFlags|=z(i.expression)|1,i}function eo(n,i){return Rg(n)?Jn(n,i):n.expression!==i?q(Zs(i),n):n}function u_(n,i){let _=M(238);return _.expression=n,_.type=i,_.transformFlags|=z(_.expression)|z(_.type)|1,_}function to(n,i,_){return n.expression!==i||n.type!==_?q(u_(i,_),n):n}function p_(n){let i=M(235);return i.flags|=64,i.expression=o().parenthesizeLeftSideOfAccess(n,!0),i.transformFlags|=z(i.expression)|1,i}function Jn(n,i){return B.assert(!!(n.flags&64),"Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."),n.expression!==i?q(p_(i),n):n}function no(n,i){let _=M(236);switch(_.keywordToken=n,_.name=i,_.transformFlags|=z(_.name),n){case 105:_.transformFlags|=1024;break;case 102:_.transformFlags|=32;break;default:return B.assertNever(n)}return _.flowNode=void 0,_}function f_(n,i){return n.name!==i?q(no(n.keywordToken,i),n):n}function Hn(n,i){let _=M(239);return _.expression=n,_.literal=i,_.transformFlags|=z(_.expression)|z(_.literal)|1024,_}function da(n,i,_){return n.expression!==i||n.literal!==_?q(Hn(i,_),n):n}function ro(){let n=M(240);return n.transformFlags|=1024,n}function Rr(n,i){let _=M(241);return _.statements=de(n),_.multiLine=i,_.transformFlags|=ke(_.statements),_.jsDoc=void 0,_.locals=void 0,_.nextContainer=void 0,_}function nu(n,i){return n.statements!==i?q(Rr(i,n.multiLine),n):n}function d_(n,i){let _=M(243);return _.modifiers=De(n),_.declarationList=Yr(i)?v_(i):i,_.transformFlags|=ke(_.modifiers)|z(_.declarationList),Rn(_.modifiers)&128&&(_.transformFlags=1),_.jsDoc=void 0,_.flowNode=void 0,_}function io(n,i,_){return n.modifiers!==i||n.declarationList!==_?q(d_(i,_),n):n}function ao(){let n=M(242);return n.jsDoc=void 0,n}function Pi(n){let i=M(244);return i.expression=o().parenthesizeExpressionOfExpressionStatement(n),i.transformFlags|=z(i.expression),i.jsDoc=void 0,i.flowNode=void 0,i}function _o(n,i){return n.expression!==i?q(Pi(i),n):n}function so(n,i,_){let c=M(245);return c.expression=n,c.thenStatement=It(i),c.elseStatement=It(_),c.transformFlags|=z(c.expression)|z(c.thenStatement)|z(c.elseStatement),c.jsDoc=void 0,c.flowNode=void 0,c}function oo(n,i,_,c){return n.expression!==i||n.thenStatement!==_||n.elseStatement!==c?q(so(i,_,c),n):n}function co(n,i){let _=M(246);return _.statement=It(n),_.expression=i,_.transformFlags|=z(_.statement)|z(_.expression),_.jsDoc=void 0,_.flowNode=void 0,_}function lo(n,i,_){return n.statement!==i||n.expression!==_?q(co(i,_),n):n}function uo(n,i){let _=M(247);return _.expression=n,_.statement=It(i),_.transformFlags|=z(_.expression)|z(_.statement),_.jsDoc=void 0,_.flowNode=void 0,_}function ru(n,i,_){return n.expression!==i||n.statement!==_?q(uo(i,_),n):n}function po(n,i,_,c){let f=M(248);return f.initializer=n,f.condition=i,f.incrementor=_,f.statement=It(c),f.transformFlags|=z(f.initializer)|z(f.condition)|z(f.incrementor)|z(f.statement),f.jsDoc=void 0,f.locals=void 0,f.nextContainer=void 0,f.flowNode=void 0,f}function fo(n,i,_,c,f){return n.initializer!==i||n.condition!==_||n.incrementor!==c||n.statement!==f?q(po(i,_,c,f),n):n}function m_(n,i,_){let c=M(249);return c.initializer=n,c.expression=i,c.statement=It(_),c.transformFlags|=z(c.initializer)|z(c.expression)|z(c.statement),c.jsDoc=void 0,c.locals=void 0,c.nextContainer=void 0,c.flowNode=void 0,c}function iu(n,i,_,c){return n.initializer!==i||n.expression!==_||n.statement!==c?q(m_(i,_,c),n):n}function mo(n,i,_,c){let f=M(250);return f.awaitModifier=n,f.initializer=i,f.expression=o().parenthesizeExpressionForDisallowedComma(_),f.statement=It(c),f.transformFlags|=z(f.awaitModifier)|z(f.initializer)|z(f.expression)|z(f.statement)|1024,n&&(f.transformFlags|=128),f.jsDoc=void 0,f.locals=void 0,f.nextContainer=void 0,f.flowNode=void 0,f}function au(n,i,_,c,f){return n.awaitModifier!==i||n.initializer!==_||n.expression!==c||n.statement!==f?q(mo(i,_,c,f),n):n}function ho(n){let i=M(251);return i.label=et(n),i.transformFlags|=z(i.label)|4194304,i.jsDoc=void 0,i.flowNode=void 0,i}function _u(n,i){return n.label!==i?q(ho(i),n):n}function h_(n){let i=M(252);return i.label=et(n),i.transformFlags|=z(i.label)|4194304,i.jsDoc=void 0,i.flowNode=void 0,i}function yo(n,i){return n.label!==i?q(h_(i),n):n}function y_(n){let i=M(253);return i.expression=n,i.transformFlags|=z(i.expression)|128|4194304,i.jsDoc=void 0,i.flowNode=void 0,i}function su(n,i){return n.expression!==i?q(y_(i),n):n}function g_(n,i){let _=M(254);return _.expression=n,_.statement=It(i),_.transformFlags|=z(_.expression)|z(_.statement),_.jsDoc=void 0,_.flowNode=void 0,_}function go(n,i,_){return n.expression!==i||n.statement!==_?q(g_(i,_),n):n}function b_(n,i){let _=M(255);return _.expression=o().parenthesizeExpressionForDisallowedComma(n),_.caseBlock=i,_.transformFlags|=z(_.expression)|z(_.caseBlock),_.jsDoc=void 0,_.flowNode=void 0,_.possiblyExhaustive=!1,_}function ai(n,i,_){return n.expression!==i||n.caseBlock!==_?q(b_(i,_),n):n}function bo(n,i){let _=M(256);return _.label=et(n),_.statement=It(i),_.transformFlags|=z(_.label)|z(_.statement),_.jsDoc=void 0,_.flowNode=void 0,_}function vo(n,i,_){return n.label!==i||n.statement!==_?q(bo(i,_),n):n}function To(n){let i=M(257);return i.expression=n,i.transformFlags|=z(i.expression),i.jsDoc=void 0,i.flowNode=void 0,i}function ou(n,i){return n.expression!==i?q(To(i),n):n}function xo(n,i,_){let c=M(258);return c.tryBlock=n,c.catchClause=i,c.finallyBlock=_,c.transformFlags|=z(c.tryBlock)|z(c.catchClause)|z(c.finallyBlock),c.jsDoc=void 0,c.flowNode=void 0,c}function cu(n,i,_,c){return n.tryBlock!==i||n.catchClause!==_||n.finallyBlock!==c?q(xo(i,_,c),n):n}function So(){let n=M(259);return n.jsDoc=void 0,n.flowNode=void 0,n}function ma(n,i,_,c){let f=ae(260);return f.name=et(n),f.exclamationToken=i,f.type=_,f.initializer=Da(c),f.transformFlags|=jn(f.name)|z(f.initializer)|(f.exclamationToken??f.type?1:0),f.jsDoc=void 0,f}function wo(n,i,_,c,f){return n.name!==i||n.type!==c||n.exclamationToken!==_||n.initializer!==f?q(ma(i,_,c,f),n):n}function v_(n,i=0){let _=M(261);return _.flags|=i&7,_.declarations=de(n),_.transformFlags|=ke(_.declarations)|4194304,i&7&&(_.transformFlags|=263168),i&4&&(_.transformFlags|=4),_}function lu(n,i){return n.declarations!==i?q(v_(i,n.flags),n):n}function ko(n,i,_,c,f,w,F){let pe=ae(262);if(pe.modifiers=De(n),pe.asteriskToken=i,pe.name=et(_),pe.typeParameters=De(c),pe.parameters=de(f),pe.type=w,pe.body=F,!pe.body||Rn(pe.modifiers)&128)pe.transformFlags=1;else{let Re=Rn(pe.modifiers)&1024,en=!!pe.asteriskToken,kn=Re&&en;pe.transformFlags=ke(pe.modifiers)|z(pe.asteriskToken)|jn(pe.name)|ke(pe.typeParameters)|ke(pe.parameters)|z(pe.type)|z(pe.body)&-67108865|(kn?128:Re?256:en?2048:0)|(pe.typeParameters||pe.type?1:0)|4194304}return pe.typeArguments=void 0,pe.jsDoc=void 0,pe.locals=void 0,pe.nextContainer=void 0,pe.endFlowNode=void 0,pe.returnFlowNode=void 0,pe}function T_(n,i,_,c,f,w,F,pe){return n.modifiers!==i||n.asteriskToken!==_||n.name!==c||n.typeParameters!==f||n.parameters!==w||n.type!==F||n.body!==pe?uu(ko(i,_,c,f,w,F,pe),n):n}function uu(n,i){return n!==i&&n.modifiers===i.modifiers&&(n.modifiers=i.modifiers),Oe(n,i)}function Eo(n,i,_,c,f){let w=ae(263);return w.modifiers=De(n),w.name=et(i),w.typeParameters=De(_),w.heritageClauses=De(c),w.members=de(f),Rn(w.modifiers)&128?w.transformFlags=1:(w.transformFlags|=ke(w.modifiers)|jn(w.name)|ke(w.typeParameters)|ke(w.heritageClauses)|ke(w.members)|(w.typeParameters?1:0)|1024,w.transformFlags&8192&&(w.transformFlags|=1)),w.jsDoc=void 0,w}function ha(n,i,_,c,f,w){return n.modifiers!==i||n.name!==_||n.typeParameters!==c||n.heritageClauses!==f||n.members!==w?q(Eo(i,_,c,f,w),n):n}function Ao(n,i,_,c,f){let w=ae(264);return w.modifiers=De(n),w.name=et(i),w.typeParameters=De(_),w.heritageClauses=De(c),w.members=de(f),w.transformFlags=1,w.jsDoc=void 0,w}function Co(n,i,_,c,f,w){return n.modifiers!==i||n.name!==_||n.typeParameters!==c||n.heritageClauses!==f||n.members!==w?q(Ao(i,_,c,f,w),n):n}function ot(n,i,_,c){let f=ae(265);return f.modifiers=De(n),f.name=et(i),f.typeParameters=De(_),f.type=c,f.transformFlags=1,f.jsDoc=void 0,f.locals=void 0,f.nextContainer=void 0,f}function gr(n,i,_,c,f){return n.modifiers!==i||n.name!==_||n.typeParameters!==c||n.type!==f?q(ot(i,_,c,f),n):n}function x_(n,i,_){let c=ae(266);return c.modifiers=De(n),c.name=et(i),c.members=de(_),c.transformFlags|=ke(c.modifiers)|z(c.name)|ke(c.members)|1,c.transformFlags&=-67108865,c.jsDoc=void 0,c}function br(n,i,_,c){return n.modifiers!==i||n.name!==_||n.members!==c?q(x_(i,_,c),n):n}function Do(n,i,_,c=0){let f=ae(267);return f.modifiers=De(n),f.flags|=c&2088,f.name=i,f.body=_,Rn(f.modifiers)&128?f.transformFlags=1:f.transformFlags|=ke(f.modifiers)|z(f.name)|z(f.body)|1,f.transformFlags&=-67108865,f.jsDoc=void 0,f.locals=void 0,f.nextContainer=void 0,f}function Et(n,i,_,c){return n.modifiers!==i||n.name!==_||n.body!==c?q(Do(i,_,c,n.flags),n):n}function vr(n){let i=M(268);return i.statements=de(n),i.transformFlags|=ke(i.statements),i.jsDoc=void 0,i}function zt(n,i){return n.statements!==i?q(vr(i),n):n}function Po(n){let i=M(269);return i.clauses=de(n),i.transformFlags|=ke(i.clauses),i.locals=void 0,i.nextContainer=void 0,i}function pu(n,i){return n.clauses!==i?q(Po(i),n):n}function No(n){let i=ae(270);return i.name=et(n),i.transformFlags|=ja(i.name)|1,i.modifiers=void 0,i.jsDoc=void 0,i}function Io(n,i){return n.name!==i?fu(No(i),n):n}function fu(n,i){return n!==i&&(n.modifiers=i.modifiers),q(n,i)}function Oo(n,i,_,c){let f=ae(271);return f.modifiers=De(n),f.name=et(_),f.isTypeOnly=i,f.moduleReference=c,f.transformFlags|=ke(f.modifiers)|ja(f.name)|z(f.moduleReference),Ff(f.moduleReference)||(f.transformFlags|=1),f.transformFlags&=-67108865,f.jsDoc=void 0,f}function Mo(n,i,_,c,f){return n.modifiers!==i||n.isTypeOnly!==_||n.name!==c||n.moduleReference!==f?q(Oo(i,_,c,f),n):n}function Jo(n,i,_,c){let f=M(272);return f.modifiers=De(n),f.importClause=i,f.moduleSpecifier=_,f.attributes=f.assertClause=c,f.transformFlags|=z(f.importClause)|z(f.moduleSpecifier),f.transformFlags&=-67108865,f.jsDoc=void 0,f}function Lo(n,i,_,c,f){return n.modifiers!==i||n.importClause!==_||n.moduleSpecifier!==c||n.attributes!==f?q(Jo(i,_,c,f),n):n}function jo(n,i,_){let c=ae(273);return c.isTypeOnly=n,c.name=i,c.namedBindings=_,c.transformFlags|=z(c.name)|z(c.namedBindings),n&&(c.transformFlags|=1),c.transformFlags&=-67108865,c}function Ro(n,i,_,c){return n.isTypeOnly!==i||n.name!==_||n.namedBindings!==c?q(jo(i,_,c),n):n}function S_(n,i){let _=M(300);return _.elements=de(n),_.multiLine=i,_.token=132,_.transformFlags|=4,_}function du(n,i,_){return n.elements!==i||n.multiLine!==_?q(S_(i,_),n):n}function Ni(n,i){let _=M(301);return _.name=n,_.value=i,_.transformFlags|=4,_}function Uo(n,i,_){return n.name!==i||n.value!==_?q(Ni(i,_),n):n}function w_(n,i){let _=M(302);return _.assertClause=n,_.multiLine=i,_}function Bo(n,i,_){return n.assertClause!==i||n.multiLine!==_?q(w_(i,_),n):n}function qo(n,i,_){let c=M(300);return c.token=_??118,c.elements=de(n),c.multiLine=i,c.transformFlags|=4,c}function k_(n,i,_){return n.elements!==i||n.multiLine!==_?q(qo(i,_,n.token),n):n}function zo(n,i){let _=M(301);return _.name=n,_.value=i,_.transformFlags|=4,_}function Fo(n,i,_){return n.name!==i||n.value!==_?q(zo(i,_),n):n}function Vo(n){let i=ae(274);return i.name=n,i.transformFlags|=z(i.name),i.transformFlags&=-67108865,i}function mu(n,i){return n.name!==i?q(Vo(i),n):n}function Wo(n){let i=ae(280);return i.name=n,i.transformFlags|=z(i.name)|32,i.transformFlags&=-67108865,i}function hu(n,i){return n.name!==i?q(Wo(i),n):n}function Go(n){let i=M(275);return i.elements=de(n),i.transformFlags|=ke(i.elements),i.transformFlags&=-67108865,i}function Yo(n,i){return n.elements!==i?q(Go(i),n):n}function Tr(n,i,_){let c=ae(276);return c.isTypeOnly=n,c.propertyName=i,c.name=_,c.transformFlags|=z(c.propertyName)|z(c.name),c.transformFlags&=-67108865,c}function yu(n,i,_,c){return n.isTypeOnly!==i||n.propertyName!==_||n.name!==c?q(Tr(i,_,c),n):n}function ya(n,i,_){let c=ae(277);return c.modifiers=De(n),c.isExportEquals=i,c.expression=i?o().parenthesizeRightSideOfBinary(64,void 0,_):o().parenthesizeExpressionOfExportDefault(_),c.transformFlags|=ke(c.modifiers)|z(c.expression),c.transformFlags&=-67108865,c.jsDoc=void 0,c}function Ii(n,i,_){return n.modifiers!==i||n.expression!==_?q(ya(i,n.isExportEquals,_),n):n}function ga(n,i,_,c,f){let w=ae(278);return w.modifiers=De(n),w.isTypeOnly=i,w.exportClause=_,w.moduleSpecifier=c,w.attributes=w.assertClause=f,w.transformFlags|=ke(w.modifiers)|z(w.exportClause)|z(w.moduleSpecifier),w.transformFlags&=-67108865,w.jsDoc=void 0,w}function Xo(n,i,_,c,f,w){return n.modifiers!==i||n.isTypeOnly!==_||n.exportClause!==c||n.moduleSpecifier!==f||n.attributes!==w?Oi(ga(i,_,c,f,w),n):n}function Oi(n,i){return n!==i&&n.modifiers===i.modifiers&&(n.modifiers=i.modifiers),q(n,i)}function E_(n){let i=M(279);return i.elements=de(n),i.transformFlags|=ke(i.elements),i.transformFlags&=-67108865,i}function gu(n,i){return n.elements!==i?q(E_(i),n):n}function ba(n,i,_){let c=M(281);return c.isTypeOnly=n,c.propertyName=et(i),c.name=et(_),c.transformFlags|=z(c.propertyName)|z(c.name),c.transformFlags&=-67108865,c.jsDoc=void 0,c}function bu(n,i,_,c){return n.isTypeOnly!==i||n.propertyName!==_||n.name!==c?q(ba(i,_,c),n):n}function vu(){let n=ae(282);return n.jsDoc=void 0,n}function A_(n){let i=M(283);return i.expression=n,i.transformFlags|=z(i.expression),i.transformFlags&=-67108865,i}function Tu(n,i){return n.expression!==i?q(A_(i),n):n}function Ho(n){return M(n)}function $o(n,i,_=!1){let c=C_(n,_?i&&o().parenthesizeNonArrayTypeOfPostfixType(i):i);return c.postfix=_,c}function C_(n,i){let _=M(n);return _.type=i,_}function xu(n,i,_){return i.type!==_?q($o(n,_,i.postfix),i):i}function Su(n,i,_){return i.type!==_?q(C_(n,_),i):i}function Qo(n,i){let _=ae(317);return _.parameters=De(n),_.type=i,_.transformFlags=ke(_.parameters)|(_.type?1:0),_.jsDoc=void 0,_.locals=void 0,_.nextContainer=void 0,_.typeArguments=void 0,_}function wu(n,i,_){return n.parameters!==i||n.type!==_?q(Qo(i,_),n):n}function Ko(n,i=!1){let _=ae(322);return _.jsDocPropertyTags=De(n),_.isArrayType=i,_}function ku(n,i,_){return n.jsDocPropertyTags!==i||n.isArrayType!==_?q(Ko(i,_),n):n}function Zo(n){let i=M(309);return i.type=n,i}function D_(n,i){return n.type!==i?q(Zo(i),n):n}function ec(n,i,_){let c=ae(323);return c.typeParameters=De(n),c.parameters=de(i),c.type=_,c.jsDoc=void 0,c.locals=void 0,c.nextContainer=void 0,c}function Eu(n,i,_,c){return n.typeParameters!==i||n.parameters!==_||n.type!==c?q(ec(i,_,c),n):n}function _n(n){let i=al(n.kind);return n.tagName.escapedText===Ja(i)?n.tagName:Ge(i)}function Sn(n,i,_){let c=M(n);return c.tagName=i,c.comment=_,c}function Ur(n,i,_){let c=ae(n);return c.tagName=i,c.comment=_,c}function P_(n,i,_,c){let f=Sn(345,n??Ge("template"),c);return f.constraint=i,f.typeParameters=de(_),f}function tc(n,i=_n(n),_,c,f){return n.tagName!==i||n.constraint!==_||n.typeParameters!==c||n.comment!==f?q(P_(i,_,c,f),n):n}function va(n,i,_,c){let f=Ur(346,n??Ge("typedef"),c);return f.typeExpression=i,f.fullName=_,f.name=Zd(_),f.locals=void 0,f.nextContainer=void 0,f}function Au(n,i=_n(n),_,c,f){return n.tagName!==i||n.typeExpression!==_||n.fullName!==c||n.comment!==f?q(va(i,_,c,f),n):n}function N_(n,i,_,c,f,w){let F=Ur(341,n??Ge("param"),w);return F.typeExpression=c,F.name=i,F.isNameFirst=!!f,F.isBracketed=_,F}function Cu(n,i=_n(n),_,c,f,w,F){return n.tagName!==i||n.name!==_||n.isBracketed!==c||n.typeExpression!==f||n.isNameFirst!==w||n.comment!==F?q(N_(i,_,c,f,w,F),n):n}function nc(n,i,_,c,f,w){let F=Ur(348,n??Ge("prop"),w);return F.typeExpression=c,F.name=i,F.isNameFirst=!!f,F.isBracketed=_,F}function rc(n,i=_n(n),_,c,f,w,F){return n.tagName!==i||n.name!==_||n.isBracketed!==c||n.typeExpression!==f||n.isNameFirst!==w||n.comment!==F?q(nc(i,_,c,f,w,F),n):n}function ic(n,i,_,c){let f=Ur(338,n??Ge("callback"),c);return f.typeExpression=i,f.fullName=_,f.name=Zd(_),f.locals=void 0,f.nextContainer=void 0,f}function ac(n,i=_n(n),_,c,f){return n.tagName!==i||n.typeExpression!==_||n.fullName!==c||n.comment!==f?q(ic(i,_,c,f),n):n}function _c(n,i,_){let c=Sn(339,n??Ge("overload"),_);return c.typeExpression=i,c}function I_(n,i=_n(n),_,c){return n.tagName!==i||n.typeExpression!==_||n.comment!==c?q(_c(i,_,c),n):n}function O_(n,i,_){let c=Sn(328,n??Ge("augments"),_);return c.class=i,c}function Mi(n,i=_n(n),_,c){return n.tagName!==i||n.class!==_||n.comment!==c?q(O_(i,_,c),n):n}function sc(n,i,_){let c=Sn(329,n??Ge("implements"),_);return c.class=i,c}function Br(n,i,_){let c=Sn(347,n??Ge("see"),_);return c.name=i,c}function Ta(n,i,_,c){return n.tagName!==i||n.name!==_||n.comment!==c?q(Br(i,_,c),n):n}function oc(n){let i=M(310);return i.name=n,i}function Du(n,i){return n.name!==i?q(oc(i),n):n}function cc(n,i){let _=M(311);return _.left=n,_.right=i,_.transformFlags|=z(_.left)|z(_.right),_}function Pu(n,i,_){return n.left!==i||n.right!==_?q(cc(i,_),n):n}function lc(n,i){let _=M(324);return _.name=n,_.text=i,_}function uc(n,i,_){return n.name!==i?q(lc(i,_),n):n}function pc(n,i){let _=M(325);return _.name=n,_.text=i,_}function Nu(n,i,_){return n.name!==i?q(pc(i,_),n):n}function fc(n,i){let _=M(326);return _.name=n,_.text=i,_}function Iu(n,i,_){return n.name!==i?q(fc(i,_),n):n}function Ou(n,i=_n(n),_,c){return n.tagName!==i||n.class!==_||n.comment!==c?q(sc(i,_,c),n):n}function dc(n,i,_){return Sn(n,i??Ge(al(n)),_)}function Mu(n,i,_=_n(i),c){return i.tagName!==_||i.comment!==c?q(dc(n,_,c),i):i}function mc(n,i,_,c){let f=Sn(n,i??Ge(al(n)),c);return f.typeExpression=_,f}function Ju(n,i,_=_n(i),c,f){return i.tagName!==_||i.typeExpression!==c||i.comment!==f?q(mc(n,_,c,f),i):i}function hc(n,i){return Sn(327,n,i)}function Lu(n,i,_){return n.tagName!==i||n.comment!==_?q(hc(i,_),n):n}function yc(n,i,_){let c=Ur(340,n??Ge(al(340)),_);return c.typeExpression=i,c.locals=void 0,c.nextContainer=void 0,c}function M_(n,i=_n(n),_,c){return n.tagName!==i||n.typeExpression!==_||n.comment!==c?q(yc(i,_,c),n):n}function gc(n,i,_,c,f){let w=Sn(351,n??Ge("import"),f);return w.importClause=i,w.moduleSpecifier=_,w.attributes=c,w.comment=f,w}function bc(n,i,_,c,f,w){return n.tagName!==i||n.comment!==w||n.importClause!==_||n.moduleSpecifier!==c||n.attributes!==f?q(gc(i,_,c,f,w),n):n}function J_(n){let i=M(321);return i.text=n,i}function ju(n,i){return n.text!==i?q(J_(i),n):n}function Ji(n,i){let _=M(320);return _.comment=n,_.tags=De(i),_}function vc(n,i,_){return n.comment!==i||n.tags!==_?q(Ji(i,_),n):n}function Tc(n,i,_){let c=M(284);return c.openingElement=n,c.children=de(i),c.closingElement=_,c.transformFlags|=z(c.openingElement)|ke(c.children)|z(c.closingElement)|2,c}function Ru(n,i,_,c){return n.openingElement!==i||n.children!==_||n.closingElement!==c?q(Tc(i,_,c),n):n}function xc(n,i,_){let c=M(285);return c.tagName=n,c.typeArguments=De(i),c.attributes=_,c.transformFlags|=z(c.tagName)|ke(c.typeArguments)|z(c.attributes)|2,c.typeArguments&&(c.transformFlags|=1),c}function L_(n,i,_,c){return n.tagName!==i||n.typeArguments!==_||n.attributes!==c?q(xc(i,_,c),n):n}function j_(n,i,_){let c=M(286);return c.tagName=n,c.typeArguments=De(i),c.attributes=_,c.transformFlags|=z(c.tagName)|ke(c.typeArguments)|z(c.attributes)|2,i&&(c.transformFlags|=1),c}function Sc(n,i,_,c){return n.tagName!==i||n.typeArguments!==_||n.attributes!==c?q(j_(i,_,c),n):n}function xa(n){let i=M(287);return i.tagName=n,i.transformFlags|=z(i.tagName)|2,i}function Kt(n,i){return n.tagName!==i?q(xa(i),n):n}function R_(n,i,_){let c=M(288);return c.openingFragment=n,c.children=de(i),c.closingFragment=_,c.transformFlags|=z(c.openingFragment)|ke(c.children)|z(c.closingFragment)|2,c}function wc(n,i,_,c){return n.openingFragment!==i||n.children!==_||n.closingFragment!==c?q(R_(i,_,c),n):n}function Sa(n,i){let _=M(12);return _.text=n,_.containsOnlyTriviaWhiteSpaces=!!i,_.transformFlags|=2,_}function kc(n,i,_){return n.text!==i||n.containsOnlyTriviaWhiteSpaces!==_?q(Sa(i,_),n):n}function Uu(){let n=M(289);return n.transformFlags|=2,n}function Bu(){let n=M(290);return n.transformFlags|=2,n}function Ec(n,i){let _=ae(291);return _.name=n,_.initializer=i,_.transformFlags|=z(_.name)|z(_.initializer)|2,_}function wa(n,i,_){return n.name!==i||n.initializer!==_?q(Ec(i,_),n):n}function Ac(n){let i=ae(292);return i.properties=de(n),i.transformFlags|=ke(i.properties)|2,i}function qu(n,i){return n.properties!==i?q(Ac(i),n):n}function Cc(n){let i=M(293);return i.expression=n,i.transformFlags|=z(i.expression)|2,i}function zu(n,i){return n.expression!==i?q(Cc(i),n):n}function ka(n,i){let _=M(294);return _.dotDotDotToken=n,_.expression=i,_.transformFlags|=z(_.dotDotDotToken)|z(_.expression)|2,_}function Li(n,i){return n.expression!==i?q(ka(n.dotDotDotToken,i),n):n}function Dc(n,i){let _=M(295);return _.namespace=n,_.name=i,_.transformFlags|=z(_.namespace)|z(_.name)|2,_}function U_(n,i,_){return n.namespace!==i||n.name!==_?q(Dc(i,_),n):n}function B_(n,i){let _=M(296);return _.expression=o().parenthesizeExpressionForDisallowedComma(n),_.statements=de(i),_.transformFlags|=z(_.expression)|ke(_.statements),_.jsDoc=void 0,_}function Fu(n,i,_){return n.expression!==i||n.statements!==_?q(B_(i,_),n):n}function _i(n){let i=M(297);return i.statements=de(n),i.transformFlags=ke(i.statements),i}function Pc(n,i){return n.statements!==i?q(_i(i),n):n}function Nc(n,i){let _=M(298);switch(_.token=n,_.types=de(i),_.transformFlags|=ke(_.types),n){case 96:_.transformFlags|=1024;break;case 119:_.transformFlags|=1;break;default:return B.assertNever(n)}return _}function Vu(n,i){return n.types!==i?q(Nc(n.token,i),n):n}function q_(n,i){let _=M(299);return _.variableDeclaration=xr(n),_.block=i,_.transformFlags|=z(_.variableDeclaration)|z(_.block)|(n?0:64),_.locals=void 0,_.nextContainer=void 0,_}function Ic(n,i,_){return n.variableDeclaration!==i||n.block!==_?q(q_(i,_),n):n}function Ea(n,i){let _=ae(303);return _.name=et(n),_.initializer=o().parenthesizeExpressionForDisallowedComma(i),_.transformFlags|=jn(_.name)|z(_.initializer),_.modifiers=void 0,_.questionToken=void 0,_.exclamationToken=void 0,_.jsDoc=void 0,_}function qr(n,i,_){return n.name!==i||n.initializer!==_?Wu(Ea(i,_),n):n}function Wu(n,i){return n!==i&&(n.modifiers=i.modifiers,n.questionToken=i.questionToken,n.exclamationToken=i.exclamationToken),q(n,i)}function Oc(n,i){let _=ae(304);return _.name=et(n),_.objectAssignmentInitializer=i&&o().parenthesizeExpressionForDisallowedComma(i),_.transformFlags|=ja(_.name)|z(_.objectAssignmentInitializer)|1024,_.equalsToken=void 0,_.modifiers=void 0,_.questionToken=void 0,_.exclamationToken=void 0,_.jsDoc=void 0,_}function Gu(n,i,_){return n.name!==i||n.objectAssignmentInitializer!==_?Yu(Oc(i,_),n):n}function Yu(n,i){return n!==i&&(n.modifiers=i.modifiers,n.questionToken=i.questionToken,n.exclamationToken=i.exclamationToken,n.equalsToken=i.equalsToken),q(n,i)}function z_(n){let i=ae(305);return i.expression=o().parenthesizeExpressionForDisallowedComma(n),i.transformFlags|=z(i.expression)|128|65536,i.jsDoc=void 0,i}function Mc(n,i){return n.expression!==i?q(z_(i),n):n}function wn(n,i){let _=ae(306);return _.name=et(n),_.initializer=i&&o().parenthesizeExpressionForDisallowedComma(i),_.transformFlags|=z(_.name)|z(_.initializer)|1,_.jsDoc=void 0,_}function Jc(n,i,_){return n.name!==i||n.initializer!==_?q(wn(i,_),n):n}function Xu(n,i,_){let c=t.createBaseSourceFileNode(307);return c.statements=de(n),c.endOfFileToken=i,c.flags|=_,c.text="",c.fileName="",c.path="",c.resolvedPath="",c.originalFileName="",c.languageVersion=1,c.languageVariant=0,c.scriptKind=0,c.isDeclarationFile=!1,c.hasNoDefaultLib=!1,c.transformFlags|=ke(c.statements)|z(c.endOfFileToken),c.locals=void 0,c.nextContainer=void 0,c.endFlowNode=void 0,c.nodeCount=0,c.identifierCount=0,c.symbolCount=0,c.parseDiagnostics=void 0,c.bindDiagnostics=void 0,c.bindSuggestionDiagnostics=void 0,c.lineMap=void 0,c.externalModuleIndicator=void 0,c.setExternalModuleIndicator=void 0,c.pragmas=void 0,c.checkJsDirective=void 0,c.referencedFiles=void 0,c.typeReferenceDirectives=void 0,c.libReferenceDirectives=void 0,c.amdDependencies=void 0,c.commentDirectives=void 0,c.identifiers=void 0,c.packageJsonLocations=void 0,c.packageJsonScope=void 0,c.imports=void 0,c.moduleAugmentations=void 0,c.ambientModuleNames=void 0,c.classifiableNames=void 0,c.impliedNodeFormat=void 0,c}function Lc(n){let i=Object.create(n.redirectTarget);return Object.defineProperties(i,{id:{get(){return this.redirectInfo.redirectTarget.id},set(_){this.redirectInfo.redirectTarget.id=_}},symbol:{get(){return this.redirectInfo.redirectTarget.symbol},set(_){this.redirectInfo.redirectTarget.symbol=_}}}),i.redirectInfo=n,i}function Hu(n){let i=Lc(n.redirectInfo);return i.flags|=n.flags&-17,i.fileName=n.fileName,i.path=n.path,i.resolvedPath=n.resolvedPath,i.originalFileName=n.originalFileName,i.packageJsonLocations=n.packageJsonLocations,i.packageJsonScope=n.packageJsonScope,i.emitNode=void 0,i}function jc(n){let i=t.createBaseSourceFileNode(307);i.flags|=n.flags&-17;for(let _ in n)if(!(Cr(i,_)||!Cr(n,_))){if(_==="emitNode"){i.emitNode=void 0;continue}i[_]=n[_]}return i}function Aa(n){let i=n.redirectInfo?Hu(n):jc(n);return a(i,n),i}function $u(n,i,_,c,f,w,F){let pe=Aa(n);return pe.statements=de(i),pe.isDeclarationFile=_,pe.referencedFiles=c,pe.typeReferenceDirectives=f,pe.hasNoDefaultLib=w,pe.libReferenceDirectives=F,pe.transformFlags=ke(pe.statements)|z(pe.endOfFileToken),pe}function Qu(n,i,_=n.isDeclarationFile,c=n.referencedFiles,f=n.typeReferenceDirectives,w=n.hasNoDefaultLib,F=n.libReferenceDirectives){return n.statements!==i||n.isDeclarationFile!==_||n.referencedFiles!==c||n.typeReferenceDirectives!==f||n.hasNoDefaultLib!==w||n.libReferenceDirectives!==F?q($u(n,i,_,c,f,w,F),n):n}function F_(n){let i=M(308);return i.sourceFiles=n,i.syntheticFileReferences=void 0,i.syntheticTypeReferences=void 0,i.syntheticLibReferences=void 0,i.hasNoDefaultLib=void 0,i}function Ku(n,i){return n.sourceFiles!==i?q(F_(i),n):n}function Zu(n,i=!1,_){let c=M(237);return c.type=n,c.isSpread=i,c.tupleNameSource=_,c}function Ca(n){let i=M(352);return i._children=n,i}function Rc(n){let i=M(353);return i.original=n,yn(i,n),i}function Uc(n,i){let _=M(355);return _.expression=n,_.original=i,_.transformFlags|=z(_.expression)|1,yn(_,i),_}function Bc(n,i){return n.expression!==i?q(Uc(i,n.original),n):n}function ep(){return M(354)}function tp(n){if(La(n)&&!hl(n)&&!n.original&&!n.emitNode&&!n.id){if(r6(n))return n.elements;if(Zi(n)&&qb(n.operatorToken))return[n.left,n.right]}return n}function V_(n){let i=M(356);return i.elements=de(oy(n,tp)),i.transformFlags|=ke(i.elements),i}function qc(n,i){return n.elements!==i?q(V_(i),n):n}function W_(n,i){let _=M(357);return _.expression=n,_.thisArg=i,_.transformFlags|=z(_.expression)|z(_.thisArg),_}function zc(n,i,_){return n.expression!==i||n.thisArg!==_?q(W_(i,_),n):n}function np(n){let i=bn(n.escapedText);return i.flags|=n.flags&-17,i.transformFlags=n.transformFlags,a(i,n),setIdentifierAutoGenerate(i,{...n.emitNode.autoGenerate}),i}function rp(n){let i=bn(n.escapedText);i.flags|=n.flags&-17,i.jsDoc=n.jsDoc,i.flowNode=n.flowNode,i.symbol=n.symbol,i.transformFlags=n.transformFlags,a(i,n);let _=getIdentifierTypeArguments(n);return _&&setIdentifierTypeArguments(i,_),i}function Fc(n){let i=On(n.escapedText);return i.flags|=n.flags&-17,i.transformFlags=n.transformFlags,a(i,n),setIdentifierAutoGenerate(i,{...n.emitNode.autoGenerate}),i}function Vc(n){let i=On(n.escapedText);return i.flags|=n.flags&-17,i.transformFlags=n.transformFlags,a(i,n),i}function G_(n){if(n===void 0)return n;if(nh(n))return Aa(n);if(Ua(n))return np(n);if(tt(n))return rp(n);if(a1(n))return Fc(n);if(gi(n))return Vc(n);let i=df(n.kind)?t.createBaseNode(n.kind):t.createBaseTokenNode(n.kind);i.flags|=n.flags&-17,i.transformFlags=n.transformFlags,a(i,n);for(let _ in n)Cr(i,_)||!Cr(n,_)||(i[_]=n[_]);return i}function ip(n,i,_){return Ci(i_(void 0,void 0,void 0,void 0,i?[i]:[],void 0,Rr(n,!0)),void 0,_?[_]:[])}function ap(n,i,_){return Ci(a_(void 0,void 0,i?[i]:[],void 0,void 0,Rr(n,!0)),void 0,_?[_]:[])}function si(){return __(V("0"))}function Wc(n){return ya(void 0,!1,n)}function _p(n){return ga(void 0,!1,E_([ba(!1,void 0,n)]))}function Y_(n,i){return i==="null"?ye.createStrictEquality(n,Jt()):i==="undefined"?ye.createStrictEquality(n,si()):ye.createStrictEquality(la(n),dt(i))}function sp(n,i){return i==="null"?ye.createStrictInequality(n,Jt()):i==="undefined"?ye.createStrictInequality(n,si()):ye.createStrictInequality(la(n),dt(i))}function zr(n,i,_){return Md(n)?t_(Ei(n,void 0,i),void 0,void 0,_):Ci(cr(n,i),void 0,_)}function op(n,i,_){return zr(n,"bind",[i,..._])}function cp(n,i,_){return zr(n,"call",[i,..._])}function lp(n,i,_){return zr(n,"apply",[i,_])}function ji(n,i,_){return zr(Ge(n),i,_)}function Ri(n,i){return zr(n,"slice",i===void 0?[]:[pr(i)])}function up(n,i){return zr(n,"concat",i)}function X_(n,i,_){return ji("Object","defineProperty",[n,pr(i),_])}function oi(n,i){return ji("Object","getOwnPropertyDescriptor",[n,pr(i)])}function Gc(n,i,_){return ji("Reflect","get",_?[n,i,_]:[n,i])}function pp(n,i,_,c){return ji("Reflect","set",c?[n,i,_,c]:[n,i,_])}function ci(n,i,_){return _?(n.push(Ea(i,_)),!0):!1}function Yc(n,i){let _=[];ci(_,"enumerable",pr(n.enumerable)),ci(_,"configurable",pr(n.configurable));let c=ci(_,"writable",pr(n.writable));c=ci(_,"value",n.value)||c;let f=ci(_,"get",n.get);return f=ci(_,"set",n.set)||f,B.assert(!(c&&f),"A PropertyDescriptor may not be both an accessor descriptor and a data descriptor."),ki(_,!i)}function fp(n,i){switch(n.kind){case 217:return js(n,i);case 216:return Ls(n,n.type,i);case 234:return fa(n,i,n.type);case 238:return to(n,i,n.type);case 235:return eo(n,i);case 233:return Ks(n,i,n.typeArguments);case 355:return Bc(n,i)}}function dp(n){return Cl(n)&&La(n)&&La(getSourceMapRange(n))&&La(getCommentRange(n))&&!Xt(getSyntheticLeadingComments(n))&&!Xt(getSyntheticTrailingComments(n))}function Xc(n,i,_=31){return n&&ch(n,_)&&!dp(n)?fp(n,Xc(n.expression,i)):i}function H_(n,i,_){if(!i)return n;let c=vo(i,i.label,$1(i.statement)?H_(n,i.statement):n);return _&&_(i),c}function $_(n,i){let _=Tf(n);switch(_.kind){case 80:return i;case 110:case 9:case 10:case 11:return!1;case 209:return _.elements.length!==0;case 210:return _.properties.length>0;default:return!0}}function Hc(n,i,_,c=!1){let f=Wf(n,31),w,F;return qd(f)?(w=Ut(),F=f):Cp(f)?(w=Ut(),F=_!==void 0&&_<2?yn(Ge("_super"),f):f):za(f)&8192?(w=si(),F=o().parenthesizeLeftSideOfAccess(f,!1)):Xr(f)?$_(f.expression,c)?(w=ir(i),F=cr(yn(ye.createAssignment(w,f.expression),f.expression),f.name),yn(F,f)):(w=f.expression,F=f):Xa(f)?$_(f.expression,c)?(w=ir(i),F=Ai(yn(ye.createAssignment(w,f.expression),f.expression),f.argumentExpression),yn(F,f)):(w=f.expression,F=f):(w=si(),F=o().parenthesizeLeftSideOfAccess(n,!1)),{target:F,thisArg:w}}function s(n,i){return cr(r_(ki([R(void 0,"value",[fr(void 0,void 0,n,void 0,void 0,void 0)],Rr([Pi(i)]))])),"value")}function p(n){return n.length>10?V_(n):gy(n,ye.createComma)}function d(n,i,_,c=0,f){let w=f?n&&uf(n):Zm(n);if(w&&tt(w)&&!Ua(w)){let F=wf(yn(G_(w),w),w.parent);return c|=za(w),_||(c|=96),i||(c|=3072),c&&setEmitFlags(F,c),F}return Bn(n)}function b(n,i,_){return d(n,i,_,98304)}function S(n,i,_,c){return d(n,i,_,32768,c)}function N(n,i,_){return d(n,i,_,16384)}function H(n,i,_){return d(n,i,_)}function _e(n,i,_,c){let f=cr(n,La(i)?i:G_(i));yn(f,i);let w=0;return c||(w|=96),_||(w|=3072),w&&setEmitFlags(f,w),f}function Z(n,i,_,c){return n&&bs(i,32)?_e(n,d(i),_,c):N(i,_,c)}function ee(n,i,_,c){let f=je(n,i,0,_);return Ae(n,i,f,c)}function ce(n){return Ya(n.expression)&&n.expression.text==="use strict"}function Le(){return w6(Pi(dt("use strict")))}function je(n,i,_=0,c){B.assert(i.length===0,"Prologue directives should be at the first statement in the target statements array");let f=!1,w=n.length;for(;_pe&&en.splice(f,0,...i.slice(pe,Re)),pe>F&&en.splice(c,0,...i.slice(F,pe)),F>w&&en.splice(_,0,...i.slice(w,F)),w>0)if(_===0)en.splice(0,0,...i.slice(0,w));else{let kn=new Map;for(let $n=0;$n<_;$n++){let Pa=n[$n];kn.set(Pa.expression.text,!0)}for(let $n=w-1;$n>=0;$n--){let Pa=i[$n];kn.has(Pa.expression.text)||en.unshift(Pa)}}return mi(n)?yn(de(en,n.hasTrailingComma),n):n}function Ln(n,i){let _;return typeof i=="number"?_=vn(i):_=i,Af(n)?_r(n,_,n.name,n.constraint,n.default):ds(n)?dr(n,_,n.dotDotDotToken,n.name,n.questionToken,n.type,n.initializer):If(n)?Ve(n,_,n.typeParameters,n.parameters,n.type):N1(n)?Vn(n,_,n.name,n.questionToken,n.type):Va(n)?L(n,_,n.name,n.questionToken??n.exclamationToken,n.type,n.initializer):I1(n)?fe(n,_,n.name,n.questionToken,n.typeParameters,n.parameters,n.type):ms(n)?He(n,_,n.asteriskToken,n.name,n.questionToken,n.typeParameters,n.parameters,n.type,n.body):Cf(n)?Ir(n,_,n.parameters,n.body):bl(n)?Wn(n,_,n.name,n.parameters,n.type,n.body):hs(n)?$(n,_,n.name,n.parameters,n.body):Df(n)?Ze(n,_,n.parameters,n.type):Jf(n)?Rs(n,_,n.asteriskToken,n.name,n.typeParameters,n.parameters,n.type,n.body):Lf(n)?Us(n,_,n.typeParameters,n.parameters,n.type,n.equalsGreaterThanToken,n.body):vl(n)?c_(n,_,n.name,n.typeParameters,n.heritageClauses,n.members):Ha(n)?io(n,_,n.declarationList):Rf(n)?T_(n,_,n.asteriskToken,n.name,n.typeParameters,n.parameters,n.type,n.body):Wa(n)?ha(n,_,n.name,n.typeParameters,n.heritageClauses,n.members):vs(n)?Co(n,_,n.name,n.typeParameters,n.heritageClauses,n.members):Pl(n)?gr(n,_,n.name,n.typeParameters,n.type):K1(n)?br(n,_,n.name,n.members):Ti(n)?Et(n,_,n.name,n.body):Uf(n)?Mo(n,_,n.isTypeOnly,n.name,n.moduleReference):Bf(n)?Lo(n,_,n.importClause,n.moduleSpecifier,n.attributes):qf(n)?Ii(n,_,n.expression):zf(n)?Xo(n,_,n.isTypeOnly,n.exportClause,n.moduleSpecifier,n.attributes):B.assertNever(n)}function Fr(n,i){return ds(n)?dr(n,i,n.dotDotDotToken,n.name,n.questionToken,n.type,n.initializer):Va(n)?L(n,i,n.name,n.questionToken??n.exclamationToken,n.type,n.initializer):ms(n)?He(n,i,n.asteriskToken,n.name,n.questionToken,n.typeParameters,n.parameters,n.type,n.body):bl(n)?Wn(n,i,n.name,n.parameters,n.type,n.body):hs(n)?$(n,i,n.name,n.parameters,n.body):vl(n)?c_(n,i,n.name,n.typeParameters,n.heritageClauses,n.members):Wa(n)?ha(n,i,n.name,n.typeParameters,n.heritageClauses,n.members):B.assertNever(n)}function mp(n,i){switch(n.kind){case 177:return Wn(n,n.modifiers,i,n.parameters,n.type,n.body);case 178:return $(n,n.modifiers,i,n.parameters,n.body);case 174:return He(n,n.modifiers,n.asteriskToken,i,n.questionToken,n.typeParameters,n.parameters,n.type,n.body);case 173:return fe(n,n.modifiers,i,n.questionToken,n.typeParameters,n.parameters,n.type);case 172:return L(n,n.modifiers,i,n.questionToken??n.exclamationToken,n.type,n.initializer);case 171:return Vn(n,n.modifiers,i,n.questionToken,n.type);case 303:return qr(n,i,n.initializer)}}function De(n){return n?de(n):void 0}function et(n){return typeof n=="string"?Ge(n):n}function pr(n){return typeof n=="string"?dt(n):typeof n=="number"?V(n):typeof n=="boolean"?n?lt():ar():n}function Da(n){return n&&o().parenthesizeExpressionForDisallowedComma(n)}function $c(n){return typeof n=="number"?ct(n):n}function It(n){return n&&i6(n)?yn(a(ao(),n),n):n}function xr(n){return typeof n=="string"||n&&!jf(n)?ma(n,void 0,void 0,void 0):n}function q(n,i){return n!==i&&(a(n,i),yn(n,i)),n}}function al(e){switch(e){case 344:return"type";case 342:return"returns";case 343:return"this";case 340:return"enum";case 330:return"author";case 332:return"class";case 333:return"public";case 334:return"private";case 335:return"protected";case 336:return"readonly";case 337:return"override";case 345:return"template";case 346:return"typedef";case 341:return"param";case 348:return"prop";case 338:return"callback";case 339:return"overload";case 328:return"augments";case 329:return"implements";case 351:return"import";default:return B.fail(`Unsupported kind: ${B.formatSyntaxKind(e)}`)}}var En,Yd={};function Mb(e,t){switch(En||(En=of(99,!1,0)),e){case 15:En.setText("`"+t+"`");break;case 16:En.setText("`"+t+"${");break;case 17:En.setText("}"+t+"${");break;case 18:En.setText("}"+t+"`");break}let a=En.scan();if(a===20&&(a=En.reScanTemplateToken(!1)),En.isUnterminated())return En.setText(void 0),Yd;let o;switch(a){case 15:case 16:case 17:case 18:o=En.getTokenValue();break}return o===void 0||En.scan()!==1?(En.setText(void 0),Yd):(En.setText(void 0),o)}function jn(e){return e&&tt(e)?ja(e):z(e)}function ja(e){return z(e)&-67108865}function Jb(e,t){return t|e.transformFlags&134234112}function z(e){if(!e)return 0;let t=e.transformFlags&~Lb(e.kind);return vg(e)&&_1(e.name)?Jb(e.name,t):t}function ke(e){return e?e.transformFlags:0}function Xd(e){let t=0;for(let a of e)t|=z(a);e.transformFlags=t}function Lb(e){if(e>=182&&e<=205)return-2;switch(e){case 213:case 214:case 209:return-2147450880;case 267:return-1941676032;case 169:return-2147483648;case 219:return-2072174592;case 218:case 262:return-1937940480;case 261:return-2146893824;case 263:case 231:return-2147344384;case 176:return-1937948672;case 172:return-2013249536;case 174:case 177:case 178:return-2005057536;case 133:case 150:case 163:case 146:case 154:case 151:case 136:case 155:case 116:case 168:case 171:case 173:case 179:case 180:case 181:case 264:case 265:return-2;case 210:return-2147278848;case 299:return-2147418112;case 206:case 207:return-2147450880;case 216:case 238:case 234:case 355:case 217:case 108:return-2147483648;case 211:case 212:return-2147483648;default:return-2147483648}}var Z_=Nb();function es(e){return e.flags|=16,e}var jb={createBaseSourceFileNode:e=>es(Z_.createBaseSourceFileNode(e)),createBaseIdentifierNode:e=>es(Z_.createBaseIdentifierNode(e)),createBasePrivateIdentifierNode:e=>es(Z_.createBasePrivateIdentifierNode(e)),createBaseTokenNode:e=>es(Z_.createBaseTokenNode(e)),createBaseNode:e=>es(Z_.createBaseNode(e))},x3=kf(4,jb);function Rb(e,t){if(e.original!==t&&(e.original=t,t)){let a=t.emitNode;a&&(e.emitNode=Ub(a,e.emitNode))}return e}function Ub(e,t){let{flags:a,internalFlags:o,leadingComments:m,trailingComments:v,commentRange:A,sourceMapRange:P,tokenSourceMapRanges:l,constantValue:Q,helpers:h,startsOnNewLine:y,snippetElement:g,classThis:x,assignedName:I}=e;if(t||(t={}),a&&(t.flags=a),o&&(t.internalFlags=o&-9),m&&(t.leadingComments=Dn(m.slice(),t.leadingComments)),v&&(t.trailingComments=Dn(v.slice(),t.trailingComments)),A&&(t.commentRange=A),P&&(t.sourceMapRange=P),l&&(t.tokenSourceMapRanges=Bb(l,t.tokenSourceMapRanges)),Q!==void 0&&(t.constantValue=Q),h)for(let re of h)t.helpers=py(t.helpers,re);return y!==void 0&&(t.startsOnNewLine=y),g!==void 0&&(t.snippetElement=g),x&&(t.classThis=x),I&&(t.assignedName=I),t}function Bb(e,t){t||(t=[]);for(let a in e)t[a]=e[a];return t}function ta(e){return e.kind===9}function C1(e){return e.kind===10}function Ya(e){return e.kind===11}function D1(e){return e.kind===15}function qb(e){return e.kind===28}function Hd(e){return e.kind===54}function $d(e){return e.kind===58}function tt(e){return e.kind===80}function gi(e){return e.kind===81}function zb(e){return e.kind===95}function _l(e){return e.kind===134}function Cp(e){return e.kind===108}function Fb(e){return e.kind===102}function P1(e){return e.kind===166}function Ef(e){return e.kind===167}function Af(e){return e.kind===168}function ds(e){return e.kind===169}function Al(e){return e.kind===170}function N1(e){return e.kind===171}function Va(e){return e.kind===172}function I1(e){return e.kind===173}function ms(e){return e.kind===174}function Cf(e){return e.kind===176}function bl(e){return e.kind===177}function hs(e){return e.kind===178}function O1(e){return e.kind===179}function M1(e){return e.kind===180}function Df(e){return e.kind===181}function J1(e){return e.kind===182}function Pf(e){return e.kind===183}function Nf(e){return e.kind===184}function If(e){return e.kind===185}function Vb(e){return e.kind===186}function L1(e){return e.kind===187}function Wb(e){return e.kind===188}function Gb(e){return e.kind===189}function j1(e){return e.kind===202}function Yb(e){return e.kind===190}function Xb(e){return e.kind===191}function R1(e){return e.kind===192}function U1(e){return e.kind===193}function Hb(e){return e.kind===194}function $b(e){return e.kind===195}function B1(e){return e.kind===196}function Qb(e){return e.kind===197}function q1(e){return e.kind===198}function Kb(e){return e.kind===199}function z1(e){return e.kind===200}function Zb(e){return e.kind===201}function e6(e){return e.kind===205}function F1(e){return e.kind===208}function V1(e){return e.kind===209}function Of(e){return e.kind===210}function Xr(e){return e.kind===211}function Xa(e){return e.kind===212}function Mf(e){return e.kind===213}function W1(e){return e.kind===215}function Cl(e){return e.kind===217}function Jf(e){return e.kind===218}function Lf(e){return e.kind===219}function t6(e){return e.kind===222}function G1(e){return e.kind===224}function Zi(e){return e.kind===226}function Y1(e){return e.kind===230}function vl(e){return e.kind===231}function X1(e){return e.kind===232}function H1(e){return e.kind===233}function ll(e){return e.kind===235}function n6(e){return e.kind===236}function r6(e){return e.kind===356}function Ha(e){return e.kind===243}function Dl(e){return e.kind===244}function $1(e){return e.kind===256}function jf(e){return e.kind===260}function Q1(e){return e.kind===261}function Rf(e){return e.kind===262}function Wa(e){return e.kind===263}function vs(e){return e.kind===264}function Pl(e){return e.kind===265}function K1(e){return e.kind===266}function Ti(e){return e.kind===267}function Uf(e){return e.kind===271}function Bf(e){return e.kind===272}function qf(e){return e.kind===277}function zf(e){return e.kind===278}function Z1(e){return e.kind===279}function i6(e){return e.kind===353}function Ff(e){return e.kind===283}function Fp(e){return e.kind===286}function a6(e){return e.kind===289}function eh(e){return e.kind===295}function _6(e){return e.kind===297}function th(e){return e.kind===303}function nh(e){return e.kind===307}function rh(e){return e.kind===309}function ih(e){return e.kind===314}function ah(e){return e.kind===317}function _h(e){return e.kind===320}function s6(e){return e.kind===322}function Nl(e){return e.kind===323}function o6(e){return e.kind===328}function c6(e){return e.kind===333}function l6(e){return e.kind===334}function u6(e){return e.kind===335}function p6(e){return e.kind===336}function f6(e){return e.kind===337}function d6(e){return e.kind===339}function m6(e){return e.kind===331}function Vp(e){return e.kind===341}function h6(e){return e.kind===342}function Vf(e){return e.kind===344}function sh(e){return e.kind===345}function y6(e){return e.kind===329}function g6(e){return e.kind===350}var $i=new WeakMap;function oh(e,t){var a;let o=e.kind;return df(o)?o===352?e._children:(a=$i.get(t))==null?void 0:a.get(e):bt}function b6(e,t,a){e.kind===352&&B.fail("Should not need to re-set the children of a SyntaxList.");let o=$i.get(t);return o===void 0&&(o=new WeakMap,$i.set(t,o)),o.set(e,a),a}function Qd(e,t){var a;e.kind===352&&B.fail("Did not expect to unset the children of a SyntaxList."),(a=$i.get(t))==null||a.delete(e)}function v6(e,t){let a=$i.get(e);a!==void 0&&($i.delete(e),$i.set(t,a))}function Kd(e){return(za(e)&32768)!==0}function T6(e){return Ya(e.expression)&&e.expression.text==="use strict"}function x6(e){for(let t of e)if(cl(t)){if(T6(t))return t}else break}function S6(e){return Cl(e)&&ea(e)&&!!Mg(e)}function ch(e,t=31){switch(e.kind){case 217:return t&-2147483648&&S6(e)?!1:(t&1)!==0;case 216:case 234:case 238:return(t&2)!==0;case 233:return(t&16)!==0;case 235:return(t&4)!==0;case 355:return(t&8)!==0}return!1}function Wf(e,t=31){for(;ch(e,t);)e=e.expression;return e}function w6(e){return setStartsOnNewLine(e,!0)}function as(e){if($g(e))return e.name;if(Yg(e)){switch(e.kind){case 303:return as(e.initializer);case 304:return e.name;case 305:return as(e.expression)}return}return gl(e,!0)?as(e.left):Y1(e)?as(e.expression):e}function k6(e){switch(e.kind){case 206:case 207:case 209:return e.elements;case 210:return e.properties}}function Zd(e){if(e){let t=e;for(;;){if(tt(t)||!t.body)return tt(t)?t:t.name;t=t.body}}}var em;(e=>{function t(h,y,g,x,I,re,he){let ye=y>0?I[y-1]:void 0;return B.assertEqual(g[y],t),I[y]=h.onEnter(x[y],ye,he),g[y]=P(h,t),y}e.enter=t;function a(h,y,g,x,I,re,he){B.assertEqual(g[y],a),B.assertIsDefined(h.onLeft),g[y]=P(h,a);let ye=h.onLeft(x[y].left,I[y],x[y]);return ye?(Q(y,x,ye),l(y,g,x,I,ye)):y}e.left=a;function o(h,y,g,x,I,re,he){return B.assertEqual(g[y],o),B.assertIsDefined(h.onOperator),g[y]=P(h,o),h.onOperator(x[y].operatorToken,I[y],x[y]),y}e.operator=o;function m(h,y,g,x,I,re,he){B.assertEqual(g[y],m),B.assertIsDefined(h.onRight),g[y]=P(h,m);let ye=h.onRight(x[y].right,I[y],x[y]);return ye?(Q(y,x,ye),l(y,g,x,I,ye)):y}e.right=m;function v(h,y,g,x,I,re,he){B.assertEqual(g[y],v),g[y]=P(h,v);let ye=h.onExit(x[y],I[y]);if(y>0){if(y--,h.foldState){let de=g[y]===v?"right":"left";I[y]=h.foldState(I[y],ye,de)}}else re.value=ye;return y}e.exit=v;function A(h,y,g,x,I,re,he){return B.assertEqual(g[y],A),y}e.done=A;function P(h,y){switch(y){case t:if(h.onLeft)return a;case a:if(h.onOperator)return o;case o:if(h.onRight)return m;case m:return v;case v:return A;case A:return A;default:B.fail("Invalid state")}}e.nextState=P;function l(h,y,g,x,I){return h++,y[h]=t,g[h]=I,x[h]=void 0,h}function Q(h,y,g){if(B.shouldAssert(2))for(;h>=0;)B.assert(y[h]!==g,"Circular traversal detected."),h--}})(em||(em={}));function tm(e,t){return typeof e=="object"?Wp(!1,e.prefix,e.node,e.suffix,t):typeof e=="string"?e.length>0&&e.charCodeAt(0)===35?e.slice(1):e:""}function E6(e,t){return typeof e=="string"?e:A6(e,B.checkDefined(t))}function A6(e,t){return a1(e)?t(e).slice(1):Ua(e)?t(e):gi(e)?e.escapedText.slice(1):Pn(e)}function Wp(e,t,a,o,m){return t=tm(t,m),o=tm(o,m),a=E6(a,m),`${e?"#":""}${t}${a}${o}`}function lh(e){if(e.transformFlags&65536)return!0;if(e.transformFlags&128)for(let t of k6(e)){let a=as(t);if(a&&Hg(a)&&(a.transformFlags&65536||a.transformFlags&128&&lh(a)))return!0}return!1}function yn(e,t){return t?yi(e,t.pos,t.end):e}function Il(e){let t=e.kind;return t===168||t===169||t===171||t===172||t===173||t===174||t===176||t===177||t===178||t===181||t===185||t===218||t===219||t===231||t===243||t===262||t===263||t===264||t===265||t===266||t===267||t===271||t===272||t===277||t===278}function Gf(e){let t=e.kind;return t===169||t===172||t===174||t===177||t===178||t===231||t===263}var nm,rm,im,am,_m,C6={createBaseSourceFileNode:e=>new(_m||(_m=At.getSourceFileConstructor()))(e,-1,-1),createBaseIdentifierNode:e=>new(im||(im=At.getIdentifierConstructor()))(e,-1,-1),createBasePrivateIdentifierNode:e=>new(am||(am=At.getPrivateIdentifierConstructor()))(e,-1,-1),createBaseTokenNode:e=>new(rm||(rm=At.getTokenConstructor()))(e,-1,-1),createBaseNode:e=>new(nm||(nm=At.getNodeConstructor()))(e,-1,-1)},S3=kf(1,C6);function k(e,t){return t&&e(t)}function ie(e,t,a){if(a){if(t)return t(a);for(let o of a){let m=e(o);if(m)return m}}}function D6(e,t){return e.charCodeAt(t+1)===42&&e.charCodeAt(t+2)===42&&e.charCodeAt(t+3)!==47}function P6(e){return Un(e.statements,N6)||I6(e)}function N6(e){return Il(e)&&O6(e,95)||Uf(e)&&Ff(e.moduleReference)||Bf(e)||qf(e)||zf(e)?e:void 0}function I6(e){return e.flags&8388608?uh(e):void 0}function uh(e){return M6(e)?e:Ht(e,uh)}function O6(e,t){return Xt(e.modifiers,a=>a.kind===t)}function M6(e){return n6(e)&&e.keywordToken===102&&e.name.escapedText==="meta"}var J6={166:function(t,a,o){return k(a,t.left)||k(a,t.right)},168:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||k(a,t.constraint)||k(a,t.default)||k(a,t.expression)},304:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||k(a,t.questionToken)||k(a,t.exclamationToken)||k(a,t.equalsToken)||k(a,t.objectAssignmentInitializer)},305:function(t,a,o){return k(a,t.expression)},169:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.dotDotDotToken)||k(a,t.name)||k(a,t.questionToken)||k(a,t.type)||k(a,t.initializer)},172:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||k(a,t.questionToken)||k(a,t.exclamationToken)||k(a,t.type)||k(a,t.initializer)},171:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||k(a,t.questionToken)||k(a,t.type)||k(a,t.initializer)},303:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||k(a,t.questionToken)||k(a,t.exclamationToken)||k(a,t.initializer)},260:function(t,a,o){return k(a,t.name)||k(a,t.exclamationToken)||k(a,t.type)||k(a,t.initializer)},208:function(t,a,o){return k(a,t.dotDotDotToken)||k(a,t.propertyName)||k(a,t.name)||k(a,t.initializer)},181:function(t,a,o){return ie(a,o,t.modifiers)||ie(a,o,t.typeParameters)||ie(a,o,t.parameters)||k(a,t.type)},185:function(t,a,o){return ie(a,o,t.modifiers)||ie(a,o,t.typeParameters)||ie(a,o,t.parameters)||k(a,t.type)},184:function(t,a,o){return ie(a,o,t.modifiers)||ie(a,o,t.typeParameters)||ie(a,o,t.parameters)||k(a,t.type)},179:sm,180:sm,174:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.asteriskToken)||k(a,t.name)||k(a,t.questionToken)||k(a,t.exclamationToken)||ie(a,o,t.typeParameters)||ie(a,o,t.parameters)||k(a,t.type)||k(a,t.body)},173:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||k(a,t.questionToken)||ie(a,o,t.typeParameters)||ie(a,o,t.parameters)||k(a,t.type)},176:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||ie(a,o,t.typeParameters)||ie(a,o,t.parameters)||k(a,t.type)||k(a,t.body)},177:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||ie(a,o,t.typeParameters)||ie(a,o,t.parameters)||k(a,t.type)||k(a,t.body)},178:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||ie(a,o,t.typeParameters)||ie(a,o,t.parameters)||k(a,t.type)||k(a,t.body)},262:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.asteriskToken)||k(a,t.name)||ie(a,o,t.typeParameters)||ie(a,o,t.parameters)||k(a,t.type)||k(a,t.body)},218:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.asteriskToken)||k(a,t.name)||ie(a,o,t.typeParameters)||ie(a,o,t.parameters)||k(a,t.type)||k(a,t.body)},219:function(t,a,o){return ie(a,o,t.modifiers)||ie(a,o,t.typeParameters)||ie(a,o,t.parameters)||k(a,t.type)||k(a,t.equalsGreaterThanToken)||k(a,t.body)},175:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.body)},183:function(t,a,o){return k(a,t.typeName)||ie(a,o,t.typeArguments)},182:function(t,a,o){return k(a,t.assertsModifier)||k(a,t.parameterName)||k(a,t.type)},186:function(t,a,o){return k(a,t.exprName)||ie(a,o,t.typeArguments)},187:function(t,a,o){return ie(a,o,t.members)},188:function(t,a,o){return k(a,t.elementType)},189:function(t,a,o){return ie(a,o,t.elements)},192:om,193:om,194:function(t,a,o){return k(a,t.checkType)||k(a,t.extendsType)||k(a,t.trueType)||k(a,t.falseType)},195:function(t,a,o){return k(a,t.typeParameter)},205:function(t,a,o){return k(a,t.argument)||k(a,t.attributes)||k(a,t.qualifier)||ie(a,o,t.typeArguments)},302:function(t,a,o){return k(a,t.assertClause)},196:cm,198:cm,199:function(t,a,o){return k(a,t.objectType)||k(a,t.indexType)},200:function(t,a,o){return k(a,t.readonlyToken)||k(a,t.typeParameter)||k(a,t.nameType)||k(a,t.questionToken)||k(a,t.type)||ie(a,o,t.members)},201:function(t,a,o){return k(a,t.literal)},202:function(t,a,o){return k(a,t.dotDotDotToken)||k(a,t.name)||k(a,t.questionToken)||k(a,t.type)},206:lm,207:lm,209:function(t,a,o){return ie(a,o,t.elements)},210:function(t,a,o){return ie(a,o,t.properties)},211:function(t,a,o){return k(a,t.expression)||k(a,t.questionDotToken)||k(a,t.name)},212:function(t,a,o){return k(a,t.expression)||k(a,t.questionDotToken)||k(a,t.argumentExpression)},213:um,214:um,215:function(t,a,o){return k(a,t.tag)||k(a,t.questionDotToken)||ie(a,o,t.typeArguments)||k(a,t.template)},216:function(t,a,o){return k(a,t.type)||k(a,t.expression)},217:function(t,a,o){return k(a,t.expression)},220:function(t,a,o){return k(a,t.expression)},221:function(t,a,o){return k(a,t.expression)},222:function(t,a,o){return k(a,t.expression)},224:function(t,a,o){return k(a,t.operand)},229:function(t,a,o){return k(a,t.asteriskToken)||k(a,t.expression)},223:function(t,a,o){return k(a,t.expression)},225:function(t,a,o){return k(a,t.operand)},226:function(t,a,o){return k(a,t.left)||k(a,t.operatorToken)||k(a,t.right)},234:function(t,a,o){return k(a,t.expression)||k(a,t.type)},235:function(t,a,o){return k(a,t.expression)},238:function(t,a,o){return k(a,t.expression)||k(a,t.type)},236:function(t,a,o){return k(a,t.name)},227:function(t,a,o){return k(a,t.condition)||k(a,t.questionToken)||k(a,t.whenTrue)||k(a,t.colonToken)||k(a,t.whenFalse)},230:function(t,a,o){return k(a,t.expression)},241:pm,268:pm,307:function(t,a,o){return ie(a,o,t.statements)||k(a,t.endOfFileToken)},243:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.declarationList)},261:function(t,a,o){return ie(a,o,t.declarations)},244:function(t,a,o){return k(a,t.expression)},245:function(t,a,o){return k(a,t.expression)||k(a,t.thenStatement)||k(a,t.elseStatement)},246:function(t,a,o){return k(a,t.statement)||k(a,t.expression)},247:function(t,a,o){return k(a,t.expression)||k(a,t.statement)},248:function(t,a,o){return k(a,t.initializer)||k(a,t.condition)||k(a,t.incrementor)||k(a,t.statement)},249:function(t,a,o){return k(a,t.initializer)||k(a,t.expression)||k(a,t.statement)},250:function(t,a,o){return k(a,t.awaitModifier)||k(a,t.initializer)||k(a,t.expression)||k(a,t.statement)},251:fm,252:fm,253:function(t,a,o){return k(a,t.expression)},254:function(t,a,o){return k(a,t.expression)||k(a,t.statement)},255:function(t,a,o){return k(a,t.expression)||k(a,t.caseBlock)},269:function(t,a,o){return ie(a,o,t.clauses)},296:function(t,a,o){return k(a,t.expression)||ie(a,o,t.statements)},297:function(t,a,o){return ie(a,o,t.statements)},256:function(t,a,o){return k(a,t.label)||k(a,t.statement)},257:function(t,a,o){return k(a,t.expression)},258:function(t,a,o){return k(a,t.tryBlock)||k(a,t.catchClause)||k(a,t.finallyBlock)},299:function(t,a,o){return k(a,t.variableDeclaration)||k(a,t.block)},170:function(t,a,o){return k(a,t.expression)},263:dm,231:dm,264:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||ie(a,o,t.typeParameters)||ie(a,o,t.heritageClauses)||ie(a,o,t.members)},265:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||ie(a,o,t.typeParameters)||k(a,t.type)},266:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||ie(a,o,t.members)},306:function(t,a,o){return k(a,t.name)||k(a,t.initializer)},267:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||k(a,t.body)},271:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||k(a,t.moduleReference)},272:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.importClause)||k(a,t.moduleSpecifier)||k(a,t.attributes)},273:function(t,a,o){return k(a,t.name)||k(a,t.namedBindings)},300:function(t,a,o){return ie(a,o,t.elements)},301:function(t,a,o){return k(a,t.name)||k(a,t.value)},270:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)},274:function(t,a,o){return k(a,t.name)},280:function(t,a,o){return k(a,t.name)},275:mm,279:mm,278:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.exportClause)||k(a,t.moduleSpecifier)||k(a,t.attributes)},276:hm,281:hm,277:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.expression)},228:function(t,a,o){return k(a,t.head)||ie(a,o,t.templateSpans)},239:function(t,a,o){return k(a,t.expression)||k(a,t.literal)},203:function(t,a,o){return k(a,t.head)||ie(a,o,t.templateSpans)},204:function(t,a,o){return k(a,t.type)||k(a,t.literal)},167:function(t,a,o){return k(a,t.expression)},298:function(t,a,o){return ie(a,o,t.types)},233:function(t,a,o){return k(a,t.expression)||ie(a,o,t.typeArguments)},283:function(t,a,o){return k(a,t.expression)},282:function(t,a,o){return ie(a,o,t.modifiers)},356:function(t,a,o){return ie(a,o,t.elements)},284:function(t,a,o){return k(a,t.openingElement)||ie(a,o,t.children)||k(a,t.closingElement)},288:function(t,a,o){return k(a,t.openingFragment)||ie(a,o,t.children)||k(a,t.closingFragment)},285:ym,286:ym,292:function(t,a,o){return ie(a,o,t.properties)},291:function(t,a,o){return k(a,t.name)||k(a,t.initializer)},293:function(t,a,o){return k(a,t.expression)},294:function(t,a,o){return k(a,t.dotDotDotToken)||k(a,t.expression)},287:function(t,a,o){return k(a,t.tagName)},295:function(t,a,o){return k(a,t.namespace)||k(a,t.name)},190:Fi,191:Fi,309:Fi,315:Fi,314:Fi,316:Fi,318:Fi,317:function(t,a,o){return ie(a,o,t.parameters)||k(a,t.type)},320:function(t,a,o){return(typeof t.comment=="string"?void 0:ie(a,o,t.comment))||ie(a,o,t.tags)},347:function(t,a,o){return k(a,t.tagName)||k(a,t.name)||(typeof t.comment=="string"?void 0:ie(a,o,t.comment))},310:function(t,a,o){return k(a,t.name)},311:function(t,a,o){return k(a,t.left)||k(a,t.right)},341:gm,348:gm,330:function(t,a,o){return k(a,t.tagName)||(typeof t.comment=="string"?void 0:ie(a,o,t.comment))},329:function(t,a,o){return k(a,t.tagName)||k(a,t.class)||(typeof t.comment=="string"?void 0:ie(a,o,t.comment))},328:function(t,a,o){return k(a,t.tagName)||k(a,t.class)||(typeof t.comment=="string"?void 0:ie(a,o,t.comment))},345:function(t,a,o){return k(a,t.tagName)||k(a,t.constraint)||ie(a,o,t.typeParameters)||(typeof t.comment=="string"?void 0:ie(a,o,t.comment))},346:function(t,a,o){return k(a,t.tagName)||(t.typeExpression&&t.typeExpression.kind===309?k(a,t.typeExpression)||k(a,t.fullName)||(typeof t.comment=="string"?void 0:ie(a,o,t.comment)):k(a,t.fullName)||k(a,t.typeExpression)||(typeof t.comment=="string"?void 0:ie(a,o,t.comment)))},338:function(t,a,o){return k(a,t.tagName)||k(a,t.fullName)||k(a,t.typeExpression)||(typeof t.comment=="string"?void 0:ie(a,o,t.comment))},342:Vi,344:Vi,343:Vi,340:Vi,350:Vi,349:Vi,339:Vi,323:function(t,a,o){return Un(t.typeParameters,a)||Un(t.parameters,a)||k(a,t.type)},324:Dp,325:Dp,326:Dp,322:function(t,a,o){return Un(t.jsDocPropertyTags,a)},327:ui,332:ui,333:ui,334:ui,335:ui,336:ui,331:ui,337:ui,351:L6,355:j6};function sm(e,t,a){return ie(t,a,e.typeParameters)||ie(t,a,e.parameters)||k(t,e.type)}function om(e,t,a){return ie(t,a,e.types)}function cm(e,t,a){return k(t,e.type)}function lm(e,t,a){return ie(t,a,e.elements)}function um(e,t,a){return k(t,e.expression)||k(t,e.questionDotToken)||ie(t,a,e.typeArguments)||ie(t,a,e.arguments)}function pm(e,t,a){return ie(t,a,e.statements)}function fm(e,t,a){return k(t,e.label)}function dm(e,t,a){return ie(t,a,e.modifiers)||k(t,e.name)||ie(t,a,e.typeParameters)||ie(t,a,e.heritageClauses)||ie(t,a,e.members)}function mm(e,t,a){return ie(t,a,e.elements)}function hm(e,t,a){return k(t,e.propertyName)||k(t,e.name)}function ym(e,t,a){return k(t,e.tagName)||ie(t,a,e.typeArguments)||k(t,e.attributes)}function Fi(e,t,a){return k(t,e.type)}function gm(e,t,a){return k(t,e.tagName)||(e.isNameFirst?k(t,e.name)||k(t,e.typeExpression):k(t,e.typeExpression)||k(t,e.name))||(typeof e.comment=="string"?void 0:ie(t,a,e.comment))}function Vi(e,t,a){return k(t,e.tagName)||k(t,e.typeExpression)||(typeof e.comment=="string"?void 0:ie(t,a,e.comment))}function Dp(e,t,a){return k(t,e.name)}function ui(e,t,a){return k(t,e.tagName)||(typeof e.comment=="string"?void 0:ie(t,a,e.comment))}function L6(e,t,a){return k(t,e.tagName)||k(t,e.importClause)||k(t,e.moduleSpecifier)||k(t,e.attributes)||(typeof e.comment=="string"?void 0:ie(t,a,e.comment))}function j6(e,t,a){return k(t,e.expression)}function Ht(e,t,a){if(e===void 0||e.kind<=165)return;let o=J6[e.kind];return o===void 0?void 0:o(e,t,a)}function bm(e,t,a){let o=vm(e),m=[];for(;m.length=0;--P)o.push(v[P]),m.push(A)}else{let P=t(v,A);if(P){if(P==="skip")continue;return P}if(v.kind>=166)for(let l of vm(v))o.push(l),m.push(v)}}}function vm(e){let t=[];return Ht(e,a,a),t;function a(o){t.unshift(o)}}function ph(e){e.externalModuleIndicator=P6(e)}function fh(e,t,a,o=!1,m){var v,A;(v=sl)==null||v.push(sl.Phase.Parse,"createSourceFile",{path:e},!0),wd("beforeParse");let P,{languageVersion:l,setExternalModuleIndicator:Q,impliedNodeFormat:h,jsDocParsingMode:y}=typeof a=="object"?a:{languageVersion:a};if(l===100)P=Qi.parseSourceFile(e,t,l,void 0,o,6,Fa,y);else{let g=h===void 0?Q:x=>(x.impliedNodeFormat=h,(Q||ph)(x));P=Qi.parseSourceFile(e,t,l,void 0,o,m,g,y)}return wd("afterParse"),Oy("Parse","beforeParse","afterParse"),(A=sl)==null||A.pop(),P}function dh(e){return e.externalModuleIndicator!==void 0}function R6(e,t,a,o=!1){let m=Tl.updateSourceFile(e,t,a,o);return m.flags|=e.flags&12582912,m}var Qi;(e=>{var t=of(99,!0),a=40960,o,m,v,A,P;function l(s){return ar++,s}var Q={createBaseSourceFileNode:s=>l(new P(s,0,0)),createBaseIdentifierNode:s=>l(new v(s,0,0)),createBasePrivateIdentifierNode:s=>l(new A(s,0,0)),createBaseTokenNode:s=>l(new m(s,0,0)),createBaseNode:s=>l(new o(s,0,0))},h=kf(11,Q),{createNodeArray:y,createNumericLiteral:g,createStringLiteral:x,createLiteralLikeNode:I,createIdentifier:re,createPrivateIdentifier:he,createToken:ye,createArrayLiteralExpression:de,createObjectLiteralExpression:M,createPropertyAccessExpression:ae,createPropertyAccessChain:Oe,createElementAccessExpression:V,createElementAccessChain:oe,createCallExpression:W,createCallChain:dt,createNewExpression:nr,createParenthesizedExpression:gn,createBlock:rr,createVariableStatement:bn,createExpressionStatement:In,createIfStatement:Ge,createWhileStatement:ir,createForStatement:Pr,createForOfStatement:Ot,createVariableDeclaration:Bn,createVariableDeclarationList:On}=h,Mt,vt,Qe,qn,$t,ct,_t,Ut,Jt,lt,ar,mt,vn,yt,cn,nt,Bt=!0,rn=!1;function _r(s,p,d,b,S=!1,N,H,_e=0){var Z;if(N=gb(s,N),N===6){let ce=dr(s,p,d,b,S);return convertToJson(ce,(Z=ce.statements[0])==null?void 0:Z.expression,ce.parseDiagnostics,!1,void 0),ce.referencedFiles=bt,ce.typeReferenceDirectives=bt,ce.libReferenceDirectives=bt,ce.amdDependencies=bt,ce.hasNoDefaultLib=!1,ce.pragmas=ay,ce}zn(s,p,d,b,N,_e);let ee=Nr(d,S,N,H||ph,_e);return Fn(),ee}e.parseSourceFile=_r;function fr(s,p){zn("",s,p,void 0,1,0),U();let d=jr(!0),b=u()===1&&!_t.length;return Fn(),b?d:void 0}e.parseIsolatedEntityName=fr;function dr(s,p,d=2,b,S=!1){zn(s,p,d,b,6,0),vt=nt,U();let N=J(),H,_e;if(u()===1)H=Ct([],N,N),_e=Wt();else{let ce;for(;u()!==1;){let Ae;switch(u()){case 23:Ae=ac();break;case 112:case 97:case 106:Ae=Wt();break;case 41:G(()=>U()===9&&U()!==59)?Ae=Fo():Ae=I_();break;case 9:case 11:if(G(()=>U()!==59)){Ae=Xn();break}default:Ae=I_();break}ce&&Yr(ce)?ce.push(Ae):ce?ce=[ce,Ae]:(ce=Ae,u()!==1&&Ee(E.Unexpected_token))}let Le=Yr(ce)?D(de(ce),N):B.checkDefined(ce),je=In(Le);D(je,N),H=Ct([je],N),_e=Yn(1,E.Unexpected_token)}let Z=se(s,2,6,!1,H,_e,vt,Fa);S&&L(Z),Z.nodeCount=ar,Z.identifierCount=vn,Z.identifiers=mt,Z.parseDiagnostics=zi(_t,Z),Ut&&(Z.jsDocDiagnostics=zi(Ut,Z));let ee=Z;return Fn(),ee}e.parseJsonText=dr;function zn(s,p,d,b,S,N){switch(o=At.getNodeConstructor(),m=At.getTokenConstructor(),v=At.getIdentifierConstructor(),A=At.getPrivateIdentifierConstructor(),P=At.getSourceFileConstructor(),Mt=Gy(s),Qe=p,qn=d,Jt=b,$t=S,ct=Vd(S),_t=[],yt=0,mt=new Map,vn=0,ar=0,vt=0,Bt=!0,$t){case 1:case 2:nt=524288;break;case 6:nt=134742016;break;default:nt=0;break}rn=!1,t.setText(Qe),t.setOnError(Zr),t.setScriptTarget(qn),t.setLanguageVariant(ct),t.setScriptKind($t),t.setJSDocParsingMode(N)}function Fn(){t.clearCommentDirectives(),t.setText(""),t.setOnError(void 0),t.setScriptKind(0),t.setJSDocParsingMode(0),Qe=void 0,qn=void 0,Jt=void 0,$t=void 0,ct=void 0,vt=0,_t=void 0,Ut=void 0,yt=0,mt=void 0,cn=void 0,Bt=!0}function Nr(s,p,d,b,S){let N=q6(Mt);N&&(nt|=33554432),vt=nt,U();let H=xn(0,Kt);B.assert(u()===1);let _e=qe(),Z=Ce(Wt(),_e),ee=se(Mt,s,d,N,H,Z,vt,b);return V6(ee,Qe),W6(ee,ce),ee.commentDirectives=t.getCommentDirectives(),ee.nodeCount=ar,ee.identifierCount=vn,ee.identifiers=mt,ee.parseDiagnostics=zi(_t,ee),ee.jsDocParsingMode=S,Ut&&(ee.jsDocDiagnostics=zi(Ut,ee)),p&&L(ee),ee;function ce(Le,je,Ae){_t.push(Oa(Mt,Qe,Le,je,Ae))}}let Vn=!1;function Ce(s,p){if(!p)return s;B.assert(!s.jsDoc);let d=cy(d2(s,Qe),b=>Hc.parseJSDocComment(s,b.pos,b.end-b.pos));return d.length&&(s.jsDoc=d),Vn&&(Vn=!1,s.flags|=536870912),s}function mr(s){let p=Jt,d=Tl.createSyntaxCursor(s);Jt={currentNode:ce};let b=[],S=_t;_t=[];let N=0,H=Z(s.statements,0);for(;H!==-1;){let Le=s.statements[N],je=s.statements[H];Dn(b,s.statements,N,H),N=ee(s.statements,H);let Ae=bp(S,mn=>mn.start>=Le.pos),Yt=Ae>=0?bp(S,mn=>mn.start>=je.pos,Ae):-1;Ae>=0&&Dn(_t,S,Ae,Yt>=0?Yt:void 0),un(()=>{let mn=nt;for(nt|=65536,t.resetTokenState(je.pos),U();u()!==1;){let Zt=t.getTokenFullStart(),ur=n_(0,Kt);if(b.push(ur),Zt===t.getTokenFullStart()&&U(),N>=0){let Ln=s.statements[N];if(ur.end===Ln.pos)break;ur.end>Ln.pos&&(N=ee(s.statements,N+1))}}nt=mn},2),H=N>=0?Z(s.statements,N):-1}if(N>=0){let Le=s.statements[N];Dn(b,s.statements,N);let je=bp(S,Ae=>Ae.start>=Le.pos);je>=0&&Dn(_t,S,je)}return Jt=p,h.updateSourceFile(s,yn(y(b),s.statements));function _e(Le){return!(Le.flags&65536)&&!!(Le.transformFlags&67108864)}function Z(Le,je){for(let Ae=je;Ae118}function ve(){return u()===80?!0:u()===127&&we()||u()===135&&Ye()?!1:u()>118}function j(s,p,d=!0){return u()===s?(d&&U(),!0):(p?Ee(p):Ee(E._0_expected,it(s)),!1)}let ht=Object.keys(rf).filter(s=>s.length>2);function xt(s){if(W1(s)){rt(Ar(Qe,s.template.pos),s.template.end,E.Module_declaration_names_may_only_use_or_quoted_strings);return}let p=tt(s)?Pn(s):void 0;if(!p||!pg(p,qn)){Ee(E._0_expected,it(27));return}let d=Ar(Qe,s.pos);switch(p){case"const":case"let":case"var":rt(d,s.end,E.Variable_declaration_not_allowed_at_this_location);return;case"declare":return;case"interface":Lt(E.Interface_name_cannot_be_0,E.Interface_must_be_given_a_name,19);return;case"is":rt(d,t.getTokenStart(),E.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);return;case"module":case"namespace":Lt(E.Namespace_name_cannot_be_0,E.Namespace_must_be_given_a_name,19);return;case"type":Lt(E.Type_alias_name_cannot_be_0,E.Type_alias_must_be_given_a_name,64);return}let b=ns(p,ht,gt)??pn(p);if(b){rt(d,s.end,E.Unknown_keyword_or_identifier_Did_you_mean_0,b);return}u()!==0&&rt(d,s.end,E.Unexpected_keyword_or_identifier)}function Lt(s,p,d){u()===d?Ee(p):Ee(s,t.getTokenValue())}function pn(s){for(let p of ht)if(s.length>p.length+2&&pl(s,p))return`${p} ${s.slice(p.length)}`}function Bl(s,p,d){if(u()===60&&!t.hasPrecedingLineBreak()){Ee(E.Decorators_must_precede_the_name_and_all_keywords_of_property_declarations);return}if(u()===21){Ee(E.Cannot_start_a_function_call_in_a_type_annotation),U();return}if(p&&!sr()){d?Ee(E._0_expected,it(27)):Ee(E.Expected_for_property_initializer);return}if(!aa()){if(d){Ee(E._0_expected,it(27));return}xt(s)}}function Es(s){return u()===s?(ze(),!0):(B.assert(Sp(s)),Ee(E._0_expected,it(s)),!1)}function Or(s,p,d,b){if(u()===p){U();return}let S=Ee(E._0_expected,it(p));d&&S&&rl(S,Oa(Mt,Qe,b,1,E.The_parser_expected_to_find_a_1_to_match_the_0_token_here,it(s),it(p)))}function Je(s){return u()===s?(U(),!0):!1}function ft(s){if(u()===s)return Wt()}function ql(s){if(u()===s)return Fl()}function Yn(s,p,d){return ft(s)||Gt(s,!1,p||E._0_expected,d||it(s))}function zl(s){let p=ql(s);return p||(B.assert(Sp(s)),Gt(s,!1,E._0_expected,it(s)))}function Wt(){let s=J(),p=u();return U(),D(ye(p),s)}function Fl(){let s=J(),p=u();return ze(),D(ye(p),s)}function sr(){return u()===27?!0:u()===20||u()===1||t.hasPrecedingLineBreak()}function aa(){return sr()?(u()===27&&U(),!0):!1}function Qt(){return aa()||j(27)}function Ct(s,p,d,b){let S=y(s,b);return yi(S,p,d??t.getTokenFullStart()),S}function D(s,p,d){return yi(s,p,d??t.getTokenFullStart()),nt&&(s.flags|=nt),rn&&(rn=!1,s.flags|=262144),s}function Gt(s,p,d,...b){p?Tn(t.getTokenFullStart(),0,d,...b):d&&Ee(d,...b);let S=J(),N=s===80?re("",void 0):Jd(s)?h.createTemplateLiteralLikeNode(s,"","",void 0):s===9?g("",void 0):s===11?x("",void 0):s===282?h.createMissingDeclaration():ye(s);return D(N,S)}function Mr(s){let p=mt.get(s);return p===void 0&&mt.set(s,p=s),p}function or(s,p,d){if(s){vn++;let _e=t.hasPrecedingJSDocLeadingAsterisks()?t.getTokenStart():J(),Z=u(),ee=Mr(t.getTokenValue()),ce=t.hasExtendedUnicodeEscape();return Ne(),D(re(ee,Z,ce),_e)}if(u()===81)return Ee(d||E.Private_identifiers_are_not_allowed_outside_class_bodies),or(!0);if(u()===0&&t.tryScan(()=>t.reScanInvalidIdentifier()===80))return or(!0);vn++;let b=u()===1,S=t.isReservedWord(),N=t.getTokenText(),H=S?E.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:E.Identifier_expected;return Gt(80,b,p||H,N)}function Ka(s){return or(Fe(),void 0,s)}function St(s,p){return or(ve(),s,p)}function jt(s){return or(wt(u()),s)}function ei(){return(t.hasUnicodeEscape()||t.hasExtendedUnicodeEscape())&&Ee(E.Unicode_escape_sequence_cannot_appear_here),or(wt(u()))}function yr(){return wt(u())||u()===11||u()===9||u()===10}function As(){return wt(u())||u()===11}function Vl(s){if(u()===11||u()===9||u()===10){let p=Xn();return p.text=Mr(p.text),p}return s&&u()===23?Wl():u()===81?_a():jt()}function Jr(){return Vl(!0)}function Wl(){let s=J();j(23);let p=ut(Et);return j(24),D(h.createComputedPropertyName(p),s)}function _a(){let s=J(),p=he(Mr(t.getTokenValue()));return U(),D(p,s)}function ti(s){return u()===s&&le(Cs)}function Za(){return U(),t.hasPrecedingLineBreak()?!1:cr()}function Cs(){switch(u()){case 87:return U()===94;case 95:return U(),u()===90?G(Ei):u()===156?G(Gl):ki();case 90:return Ei();case 126:return U(),cr();case 139:case 153:return U(),Yl();default:return Za()}}function ki(){return u()===60||u()!==42&&u()!==130&&u()!==19&&cr()}function Gl(){return U(),ki()}function Ds(){return Wr(u())&&le(Cs)}function cr(){return u()===23||u()===19||u()===42||u()===26||yr()}function Yl(){return u()===23||yr()}function Ei(){return U(),u()===86||u()===100||u()===120||u()===60||u()===128&&G(gc)||u()===134&&G(bc)}function sa(s,p){if(ca(s))return!0;switch(s){case 0:case 1:case 3:return!(u()===27&&p)&&vc();case 2:return u()===84||u()===90;case 4:return G(ao);case 5:return G(Wu)||u()===27&&!p;case 6:return u()===23||yr();case 12:switch(u()){case 23:case 42:case 26:case 25:return!0;default:return yr()}case 18:return yr();case 9:return u()===23||u()===26||yr();case 24:return As();case 7:return u()===19?G(Ps):p?ve()&&!e_():x_()&&!e_();case 8:return ka();case 10:return u()===28||u()===26||ka();case 19:return u()===103||u()===87||ve();case 15:switch(u()){case 28:case 25:return!0}case 11:return u()===26||br();case 16:return fa(!1);case 17:return fa(!0);case 20:case 21:return u()===28||ai();case 22:return Rc();case 23:return u()===161&&G(Uu)?!1:u()===11?!0:wt(u());case 13:return wt(u())||u()===19;case 14:return!0;case 25:return!0;case 26:return B.fail("ParsingContext.Count used as a context");default:B.assertNever(s,"Non-exhaustive case in 'isListElement'.")}}function Ps(){if(B.assert(u()===19),U()===20){let s=U();return s===28||s===19||s===96||s===119}return!0}function Ai(){return U(),ve()}function Xl(){return U(),wt(u())}function Ns(){return U(),Yy(u())}function e_(){return u()===119||u()===96?G(Is):!1}function Is(){return U(),br()}function Ci(){return U(),ai()}function oa(s){if(u()===1)return!0;switch(s){case 1:case 2:case 4:case 5:case 6:case 12:case 9:case 23:case 24:return u()===20;case 3:return u()===20||u()===84||u()===90;case 7:return u()===19||u()===96||u()===119;case 8:return t_();case 19:return u()===32||u()===21||u()===19||u()===96||u()===119;case 11:return u()===22||u()===27;case 15:case 21:case 10:return u()===24;case 17:case 16:case 18:return u()===22||u()===24;case 20:return u()!==28;case 22:return u()===19||u()===20;case 13:return u()===32||u()===44;case 14:return u()===30&&G(G_);default:return!1}}function t_(){return!!(sr()||Uo(u())||u()===39)}function Os(){B.assert(yt,"Missing parsing context");for(let s=0;s<26;s++)if(yt&1<=0)}function __(s){return s===6?E.An_enum_member_name_must_be_followed_by_a_or:void 0}function lr(){let s=Ct([],J());return s.isMissingList=!0,s}function zs(s){return!!s.isMissingList}function Lr(s,p,d,b){if(j(d)){let S=fn(s,p);return j(b),S}return lr()}function jr(s,p){let d=J(),b=s?jt(p):St(p);for(;Je(25)&&u()!==30;)b=D(h.createQualifiedName(b,ni(s,!1,!0)),d);return b}function Hl(s,p){return D(h.createQualifiedName(s,p),s.pos)}function ni(s,p,d){if(t.hasPrecedingLineBreak()&&wt(u())&&G(M_))return Gt(80,!0,E.Identifier_expected);if(u()===81){let b=_a();return p?b:Gt(80,!0,E.Identifier_expected)}return s?d?jt():ei():St()}function $l(s){let p=J(),d=[],b;do b=Gs(s),d.push(b);while(b.literal.kind===17);return Ct(d,p)}function ua(s){let p=J();return D(h.createTemplateExpression(Di(s),$l(s)),p)}function Fs(){let s=J();return D(h.createTemplateLiteralType(Di(!1),Ql()),s)}function Ql(){let s=J(),p=[],d;do d=Vs(),p.push(d);while(d.literal.kind===17);return Ct(p,s)}function Vs(){let s=J();return D(h.createTemplateLiteralTypeSpan(ot(),Ws(!1)),s)}function Ws(s){return u()===20?(Pt(s),Ys()):Yn(18,E._0_expected,it(20))}function Gs(s){let p=J();return D(h.createTemplateSpan(ut(Et),Ws(s)),p)}function Xn(){return ri(u())}function Di(s){!s&&t.getTokenFlags()&26656&&Pt(!1);let p=ri(u());return B.assert(p.kind===16,"Template head has wrong token kind"),p}function Ys(){let s=ri(u());return B.assert(s.kind===17||s.kind===18,"Template fragment has wrong token kind"),s}function Kl(s){let p=s===15||s===18,d=t.getTokenText();return d.substring(1,d.length-(t.isUnterminated()?0:p?1:2))}function ri(s){let p=J(),d=Jd(s)?h.createTemplateLiteralLikeNode(s,t.getTokenValue(),Kl(s),t.getTokenFlags()&7176):s===9?g(t.getTokenValue(),t.getNumericLiteralFlags()):s===11?x(t.getTokenValue(),void 0,t.hasExtendedUnicodeEscape()):Ug(s)?I(s,t.getTokenValue()):B.fail();return t.hasExtendedUnicodeEscape()&&(d.hasExtendedUnicodeEscape=!0),t.isUnterminated()&&(d.isUnterminated=!0),U(),D(d,p)}function ii(){return jr(!0,E.Type_expected)}function Xs(){if(!t.hasPrecedingLineBreak()&&kt()===30)return Lr(20,ot,30,32)}function pa(){let s=J();return D(h.createTypeReferenceNode(ii(),Xs()),s)}function s_(s){switch(s.kind){case 183:return Hi(s.typeName);case 184:case 185:{let{parameters:p,type:d}=s;return zs(p)||s_(d)}case 196:return s_(s.type);default:return!1}}function Zl(s){return U(),D(h.createTypePredicateNode(void 0,s,ot()),s.pos)}function o_(){let s=J();return U(),D(h.createThisTypeNode(),s)}function eu(){let s=J();return U(),D(h.createJSDocAllType(),s)}function Hs(){let s=J();return U(),D(h.createJSDocNonNullableType(b_(),!1),s)}function tu(){let s=J();return U(),u()===28||u()===20||u()===22||u()===32||u()===64||u()===52?D(h.createJSDocUnknownType(),s):D(h.createJSDocNullableType(ot(),!1),s)}function $s(){let s=J(),p=qe();if(le(Fc)){let d=Hn(36),b=Jn(59,!1);return Ce(D(h.createJSDocFunctionType(d,b),s),p)}return D(h.createTypeReferenceNode(jt(),void 0),s)}function c_(){let s=J(),p;return(u()===110||u()===105)&&(p=jt(),j(59)),D(h.createParameterDeclaration(void 0,void 0,p,void 0,l_(),void 0),s)}function l_(){t.setSkipJsDocLeadingAsterisks(!0);let s=J();if(Je(144)){let b=h.createJSDocNamepathType(void 0);e:for(;;)switch(u()){case 20:case 1:case 28:case 5:break e;default:ze()}return t.setSkipJsDocLeadingAsterisks(!1),D(b,s)}let p=Je(26),d=ha();return t.setSkipJsDocLeadingAsterisks(!1),p&&(d=D(h.createJSDocVariadicType(d),s)),u()===64?(U(),D(h.createJSDocOptionalType(d),s)):d}function Qs(){let s=J();j(114);let p=jr(!0),d=t.hasPrecedingLineBreak()?void 0:Ca();return D(h.createTypeQueryNode(p,d),s)}function Ks(){let s=J(),p=wn(!1,!0),d=St(),b,S;Je(96)&&(ai()||!br()?b=ot():S=Yo());let N=Je(64)?ot():void 0,H=h.createTypeParameterDeclaration(p,d,b,N);return H.expression=S,D(H,s)}function dn(){if(u()===30)return Lr(19,Ks,30,32)}function fa(s){return u()===26||ka()||Wr(u())||u()===60||ai(!s)}function Zs(s){let p=Li(E.Private_identifiers_cannot_be_used_as_parameters);return c2(p)===0&&!Xt(s)&&Wr(u())&&U(),p}function eo(){return Fe()||u()===23||u()===19}function u_(s){return p_(s)}function to(s){return p_(s,!1)}function p_(s,p=!0){let d=J(),b=qe(),S=s?R(()=>wn(!0)):$(()=>wn(!0));if(u()===110){let Z=h.createParameterDeclaration(S,void 0,or(!0),void 0,gr(),void 0),ee=Hp(S);return ee&&ln(ee,E.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters),Ce(D(Z,d),b)}let N=Bt;Bt=!1;let H=ft(26);if(!p&&!eo())return;let _e=Ce(D(h.createParameterDeclaration(S,H,Zs(S),ft(58),gr(),vr()),d),b);return Bt=N,_e}function Jn(s,p){if(no(s,p))return hr(ha)}function no(s,p){return s===39?(j(s),!0):Je(59)?!0:p&&u()===39?(Ee(E._0_expected,it(59)),U(),!0):!1}function f_(s,p){let d=we(),b=Ye();He(!!(s&1)),st(!!(s&2));let S=s&32?fn(17,c_):fn(16,()=>p?u_(b):to(b));return He(d),st(b),S}function Hn(s){if(!j(21))return lr();let p=f_(s,!0);return j(22),p}function da(){Je(28)||Qt()}function ro(s){let p=J(),d=qe();s===180&&j(105);let b=dn(),S=Hn(4),N=Jn(59,!0);da();let H=s===179?h.createCallSignature(b,S,N):h.createConstructSignature(b,S,N);return Ce(D(H,p),d)}function Rr(){return u()===23&&G(nu)}function nu(){if(U(),u()===26||u()===24)return!0;if(Wr(u())){if(U(),ve())return!0}else if(ve())U();else return!1;return u()===59||u()===28?!0:u()!==58?!1:(U(),u()===59||u()===28||u()===24)}function d_(s,p,d){let b=Lr(16,()=>u_(!1),23,24),S=gr();da();let N=h.createIndexSignature(d,b,S);return Ce(D(N,s),p)}function io(s,p,d){let b=Jr(),S=ft(58),N;if(u()===21||u()===30){let H=dn(),_e=Hn(4),Z=Jn(59,!0);N=h.createMethodSignature(d,b,S,H,_e,Z)}else{let H=gr();N=h.createPropertySignature(d,b,S,H),u()===64&&(N.initializer=vr())}return da(),Ce(D(N,s),p)}function ao(){if(u()===21||u()===30||u()===139||u()===153)return!0;let s=!1;for(;Wr(u());)s=!0,U();return u()===23?!0:(yr()&&(s=!0,U()),s?u()===21||u()===30||u()===58||u()===59||u()===28||sr():!1)}function Pi(){if(u()===21||u()===30)return ro(179);if(u()===105&&G(_o))return ro(180);let s=J(),p=qe(),d=wn(!1);return ti(139)?qr(s,p,d,177,4):ti(153)?qr(s,p,d,178,4):Rr()?d_(s,p,d):io(s,p,d)}function _o(){return U(),u()===21||u()===30}function so(){return U()===25}function oo(){switch(U()){case 21:case 30:case 25:return!0}return!1}function co(){let s=J();return D(h.createTypeLiteralNode(lo()),s)}function lo(){let s;return j(19)?(s=xn(4,Pi),j(20)):s=lr(),s}function uo(){return U(),u()===40||u()===41?U()===148:(u()===148&&U(),u()===23&&Ai()&&U()===103)}function ru(){let s=J(),p=jt();j(103);let d=ot();return D(h.createTypeParameterDeclaration(void 0,p,d,void 0),s)}function po(){let s=J();j(19);let p;(u()===148||u()===40||u()===41)&&(p=Wt(),p.kind!==148&&j(148)),j(23);let d=ru(),b=Je(130)?ot():void 0;j(24);let S;(u()===58||u()===40||u()===41)&&(S=Wt(),S.kind!==58&&j(58));let N=gr();Qt();let H=xn(4,Pi);return j(20),D(h.createMappedTypeNode(p,d,b,S,N,H),s)}function fo(){let s=J();if(Je(26))return D(h.createRestTypeNode(ot()),s);let p=ot();if(ih(p)&&p.pos===p.type.pos){let d=h.createOptionalTypeNode(p.type);return yn(d,p),d.flags=p.flags,d}return p}function m_(){return U()===59||u()===58&&U()===59}function iu(){return u()===26?wt(U())&&m_():wt(u())&&m_()}function mo(){if(G(iu)){let s=J(),p=qe(),d=ft(26),b=jt(),S=ft(58);j(59);let N=fo(),H=h.createNamedTupleMember(d,b,S,N);return Ce(D(H,s),p)}return fo()}function au(){let s=J();return D(h.createTupleTypeNode(Lr(21,mo,23,24)),s)}function ho(){let s=J();j(21);let p=ot();return j(22),D(h.createParenthesizedType(p),s)}function _u(){let s;if(u()===128){let p=J();U();let d=D(ye(128),p);s=Ct([d],p)}return s}function h_(){let s=J(),p=qe(),d=_u(),b=Je(105);B.assert(!d||b,"Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers.");let S=dn(),N=Hn(4),H=Jn(39,!1),_e=b?h.createConstructorTypeNode(d,S,N,H):h.createFunctionTypeNode(S,N,H);return Ce(D(_e,s),p)}function yo(){let s=Wt();return u()===25?void 0:s}function y_(s){let p=J();s&&U();let d=u()===112||u()===97||u()===106?Wt():ri(u());return s&&(d=D(h.createPrefixUnaryExpression(41,d),p)),D(h.createLiteralTypeNode(d),p)}function su(){return U(),u()===102}function g_(){vt|=4194304;let s=J(),p=Je(114);j(102),j(21);let d=ot(),b;if(Je(28)){let H=t.getTokenStart();j(19);let _e=u();if(_e===118||_e===132?U():Ee(E._0_expected,it(118)),j(59),b=Y_(_e,!0),!j(20)){let Z=Yi(_t);Z&&Z.code===E._0_expected.code&&rl(Z,Oa(Mt,Qe,H,1,E.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}}j(22);let S=Je(25)?ii():void 0,N=Xs();return D(h.createImportTypeNode(d,b,S,N,p),s)}function go(){return U(),u()===9||u()===10}function b_(){switch(u()){case 133:case 159:case 154:case 150:case 163:case 155:case 136:case 157:case 146:case 151:return le(yo)||pa();case 67:t.reScanAsteriskEqualsToken();case 42:return eu();case 61:t.reScanQuestionToken();case 58:return tu();case 100:return $s();case 54:return Hs();case 15:case 11:case 9:case 10:case 112:case 97:case 106:return y_();case 41:return G(go)?y_(!0):pa();case 116:return Wt();case 110:{let s=o_();return u()===142&&!t.hasPrecedingLineBreak()?Zl(s):s}case 114:return G(su)?g_():Qs();case 19:return G(uo)?po():co();case 23:return au();case 21:return ho();case 102:return g_();case 131:return G(M_)?Co():pa();case 16:return Fs();default:return pa()}}function ai(s){switch(u()){case 133:case 159:case 154:case 150:case 163:case 136:case 148:case 155:case 158:case 116:case 157:case 106:case 110:case 114:case 146:case 19:case 23:case 30:case 52:case 51:case 105:case 11:case 9:case 10:case 112:case 97:case 151:case 42:case 58:case 54:case 26:case 140:case 102:case 131:case 15:case 16:return!0;case 100:return!s;case 41:return!s&&G(go);case 21:return!s&&G(bo);default:return ve()}}function bo(){return U(),u()===22||fa(!1)||ai()}function vo(){let s=J(),p=b_();for(;!t.hasPrecedingLineBreak();)switch(u()){case 54:U(),p=D(h.createJSDocNonNullableType(p,!0),s);break;case 58:if(G(Ci))return p;U(),p=D(h.createJSDocNullableType(p,!0),s);break;case 23:if(j(23),ai()){let d=ot();j(24),p=D(h.createIndexedAccessTypeNode(p,d),s)}else j(24),p=D(h.createArrayTypeNode(p),s);break;default:return p}return p}function To(s){let p=J();return j(s),D(h.createTypeOperatorNode(s,So()),p)}function ou(){if(Je(96)){let s=Mn(ot);if(We()||u()!==58)return s}}function xo(){let s=J(),p=St(),d=le(ou),b=h.createTypeParameterDeclaration(void 0,p,d);return D(b,s)}function cu(){let s=J();return j(140),D(h.createInferTypeNode(xo()),s)}function So(){let s=u();switch(s){case 143:case 158:case 148:return To(s);case 140:return cu()}return hr(vo)}function ma(s){if(T_()){let p=h_(),d;return Nf(p)?d=s?E.Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:E.Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:d=s?E.Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type:E.Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type,ln(p,d),p}}function wo(s,p,d){let b=J(),S=s===52,N=Je(s),H=N&&ma(S)||p();if(u()===s||N){let _e=[H];for(;Je(s);)_e.push(ma(S)||p());H=D(d(Ct(_e,b)),b)}return H}function v_(){return wo(51,So,h.createIntersectionTypeNode)}function lu(){return wo(52,v_,h.createUnionTypeNode)}function ko(){return U(),u()===105}function T_(){return u()===30||u()===21&&G(Eo)?!0:u()===105||u()===128&&G(ko)}function uu(){if(Wr(u())&&wn(!1),ve()||u()===110)return U(),!0;if(u()===23||u()===19){let s=_t.length;return Li(),s===_t.length}return!1}function Eo(){return U(),!!(u()===22||u()===26||uu()&&(u()===59||u()===28||u()===58||u()===64||u()===22&&(U(),u()===39)))}function ha(){let s=J(),p=ve()&&le(Ao),d=ot();return p?D(h.createTypePredicateNode(void 0,p,d),s):d}function Ao(){let s=St();if(u()===142&&!t.hasPrecedingLineBreak())return U(),s}function Co(){let s=J(),p=Yn(131),d=u()===110?o_():St(),b=Je(142)?ot():void 0;return D(h.createTypePredicateNode(p,d,b),s)}function ot(){if(nt&81920)return Dt(81920,ot);if(T_())return h_();let s=J(),p=lu();if(!We()&&!t.hasPrecedingLineBreak()&&Je(96)){let d=Mn(ot);j(58);let b=hr(ot);j(59);let S=hr(ot);return D(h.createConditionalTypeNode(p,d,b,S),s)}return p}function gr(){return Je(59)?ot():void 0}function x_(){switch(u()){case 110:case 108:case 106:case 112:case 97:case 9:case 10:case 11:case 15:case 16:case 21:case 23:case 19:case 100:case 86:case 105:case 44:case 69:case 80:return!0;case 102:return G(oo);default:return ve()}}function br(){if(x_())return!0;switch(u()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 46:case 47:case 30:case 135:case 127:case 81:case 60:return!0;default:return Bo()?!0:ve()}}function Do(){return u()!==19&&u()!==100&&u()!==86&&u()!==60&&br()}function Et(){let s=Ze();s&&Ke(!1);let p=J(),d=zt(!0),b;for(;b=ft(28);)d=k_(d,b,zt(!0),p);return s&&Ke(!0),d}function vr(){return Je(64)?zt(!0):void 0}function zt(s){if(Po())return No();let p=fu(s)||Lo(s);if(p)return p;let d=J(),b=qe(),S=Ni(0);return S.kind===80&&u()===39?Io(d,S,s,b,void 0):qa(S)&&x1(Ve())?k_(S,Wt(),zt(s),d):du(S,d,s)}function Po(){return u()===127?we()?!0:G(J_):!1}function pu(){return U(),!t.hasPrecedingLineBreak()&&ve()}function No(){let s=J();return U(),!t.hasPrecedingLineBreak()&&(u()===42||br())?D(h.createYieldExpression(ft(42),zt(!0)),s):D(h.createYieldExpression(void 0,void 0),s)}function Io(s,p,d,b,S){B.assert(u()===39,"parseSimpleArrowFunctionExpression should only have been called if we had a =>");let N=h.createParameterDeclaration(void 0,void 0,p,void 0,void 0,void 0);D(N,p.pos);let H=Ct([N],N.pos,N.end),_e=Yn(39),Z=S_(!!S,d),ee=h.createArrowFunction(S,void 0,H,void 0,_e,Z);return Ce(D(ee,s),b)}function fu(s){let p=Oo();if(p!==0)return p===1?Ro(!0,!0):le(()=>Jo(s))}function Oo(){return u()===21||u()===30||u()===134?G(Mo):u()===39?1:0}function Mo(){if(u()===134&&(U(),t.hasPrecedingLineBreak()||u()!==21&&u()!==30))return 0;let s=u(),p=U();if(s===21){if(p===22)switch(U()){case 39:case 59:case 19:return 1;default:return 0}if(p===23||p===19)return 2;if(p===26)return 1;if(Wr(p)&&p!==134&&G(Ai))return U()===130?0:1;if(!ve()&&p!==110)return 0;switch(U()){case 59:return 1;case 58:return U(),u()===59||u()===28||u()===64||u()===22?1:0;case 28:case 64:case 22:return 2}return 0}else return B.assert(s===30),!ve()&&u()!==87?0:ct===1?G(()=>{Je(87);let b=U();if(b===96)switch(U()){case 64:case 32:case 44:return!1;default:return!0}else if(b===28||b===64)return!0;return!1})?1:0:2}function Jo(s){let p=t.getTokenStart();if(cn!=null&&cn.has(p))return;let d=Ro(!1,s);return d||(cn||(cn=new Set)).add(p),d}function Lo(s){if(u()===134&&G(jo)===1){let p=J(),d=qe(),b=Jc(),S=Ni(0);return Io(p,S,s,d,b)}}function jo(){if(u()===134){if(U(),t.hasPrecedingLineBreak()||u()===39)return 0;let s=Ni(0);if(!t.hasPrecedingLineBreak()&&s.kind===80&&u()===39)return 1}return 0}function Ro(s,p){let d=J(),b=qe(),S=Jc(),N=Xt(S,_l)?2:0,H=dn(),_e;if(j(21)){if(s)_e=f_(N,s);else{let Zt=f_(N,s);if(!Zt)return;_e=Zt}if(!j(22)&&!s)return}else{if(!s)return;_e=lr()}let Z=u()===59,ee=Jn(59,!1);if(ee&&!s&&s_(ee))return;let ce=ee;for(;(ce==null?void 0:ce.kind)===196;)ce=ce.type;let Le=ce&&ah(ce);if(!s&&u()!==39&&(Le||u()!==19))return;let je=u(),Ae=Yn(39),Yt=je===39||je===19?S_(Xt(S,_l),p):St();if(!p&&Z&&u()!==59)return;let mn=h.createArrowFunction(S,H,_e,ee,Ae,Yt);return Ce(D(mn,d),b)}function S_(s,p){if(u()===19)return Ta(s?2:0);if(u()!==27&&u()!==100&&u()!==86&&vc()&&!Do())return Ta(16|(s?2:0));let d=Bt;Bt=!1;let b=s?R(()=>zt(p)):$(()=>zt(p));return Bt=d,b}function du(s,p,d){let b=ft(58);if(!b)return s;let S;return D(h.createConditionalExpression(s,b,Dt(a,()=>zt(!1)),S=Yn(59),Up(S)?zt(d):Gt(80,!1,E._0_expected,it(59))),p)}function Ni(s){let p=J(),d=Yo();return w_(s,d,p)}function Uo(s){return s===103||s===165}function w_(s,p,d){for(;;){Ve();let b=wp(u());if(!(u()===43?b>=s:b>s)||u()===103&&be())break;if(u()===130||u()===152){if(t.hasPrecedingLineBreak())break;{let N=u();U(),p=N===152?qo(p,ot()):zo(p,ot())}}else p=k_(p,Wt(),Ni(b),d)}return p}function Bo(){return be()&&u()===103?!1:wp(u())>0}function qo(s,p){return D(h.createSatisfiesExpression(s,p),s.pos)}function k_(s,p,d,b){return D(h.createBinaryExpression(s,p,d),b)}function zo(s,p){return D(h.createAsExpression(s,p),s.pos)}function Fo(){let s=J();return D(h.createPrefixUnaryExpression(u(),Me(Tr)),s)}function Vo(){let s=J();return D(h.createDeleteExpression(Me(Tr)),s)}function mu(){let s=J();return D(h.createTypeOfExpression(Me(Tr)),s)}function Wo(){let s=J();return D(h.createVoidExpression(Me(Tr)),s)}function hu(){return u()===135?Ye()?!0:G(J_):!1}function Go(){let s=J();return D(h.createAwaitExpression(Me(Tr)),s)}function Yo(){if(yu()){let d=J(),b=ya();return u()===43?w_(wp(u()),b,d):b}let s=u(),p=Tr();if(u()===43){let d=Ar(Qe,p.pos),{end:b}=p;p.kind===216?rt(d,b,E.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses):(B.assert(Sp(s)),rt(d,b,E.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses,it(s)))}return p}function Tr(){switch(u()){case 40:case 41:case 55:case 54:return Fo();case 91:return Vo();case 114:return mu();case 116:return Wo();case 30:return ct===1?Oi(!0,void 0,void 0,!0):Ko();case 135:if(hu())return Go();default:return ya()}}function yu(){switch(u()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 135:return!1;case 30:if(ct!==1)return!1;default:return!0}}function ya(){if(u()===46||u()===47){let p=J();return D(h.createPrefixUnaryExpression(u(),Me(Ii)),p)}else if(ct===1&&u()===30&&G(Ns))return Oi(!0);let s=Ii();if(B.assert(qa(s)),(u()===46||u()===47)&&!t.hasPrecedingLineBreak()){let p=u();return U(),D(h.createPostfixUnaryExpression(s,p),s.pos)}return s}function Ii(){let s=J(),p;return u()===102?G(_o)?(vt|=4194304,p=Wt()):G(so)?(U(),U(),p=D(h.createMetaProperty(102,jt()),s),vt|=8388608):p=ga():p=u()===108?Xo():ga(),P_(s,p)}function ga(){let s=J(),p=N_();return _n(s,p,!0)}function Xo(){let s=J(),p=Wt();if(u()===30){let d=J(),b=le(va);b!==void 0&&(rt(d,J(),E.super_may_not_use_type_arguments),Sn()||(p=h.createExpressionWithTypeArguments(p,b)))}return u()===21||u()===25||u()===23?p:(Yn(25,E.super_must_be_followed_by_an_argument_list_or_member_access),D(ae(p,ni(!0,!0,!0)),s))}function Oi(s,p,d,b=!1){let S=J(),N=vu(s),H;if(N.kind===286){let _e=ba(N),Z,ee=_e[_e.length-1];if((ee==null?void 0:ee.kind)===284&&!pi(ee.openingElement.tagName,ee.closingElement.tagName)&&pi(N.tagName,ee.closingElement.tagName)){let ce=ee.children.end,Le=D(h.createJsxElement(ee.openingElement,ee.children,D(h.createJsxClosingElement(D(re(""),ce,ce)),ce,ce)),ee.openingElement.pos,ce);_e=Ct([..._e.slice(0,_e.length-1),Le],_e.pos,ce),Z=ee.closingElement}else Z=Qo(N,s),pi(N.tagName,Z.tagName)||(d&&Fp(d)&&pi(Z.tagName,d.tagName)?ln(N.tagName,E.JSX_element_0_has_no_corresponding_closing_tag,is(Qe,N.tagName)):ln(Z.tagName,E.Expected_corresponding_JSX_closing_tag_for_0,is(Qe,N.tagName)));H=D(h.createJsxElement(N,_e,Z),S)}else N.kind===289?H=D(h.createJsxFragment(N,ba(N),wu(s)),S):(B.assert(N.kind===285),H=N);if(!b&&s&&u()===30){let _e=typeof p>"u"?H.pos:p,Z=le(()=>Oi(!0,_e));if(Z){let ee=Gt(28,!1);return Gd(ee,Z.pos,0),rt(Ar(Qe,_e),Z.end,E.JSX_expressions_must_have_one_parent_element),D(h.createBinaryExpression(H,ee,Z),S)}}return H}function E_(){let s=J(),p=h.createJsxText(t.getTokenValue(),lt===13);return lt=t.scanJsxToken(),D(p,s)}function gu(s,p){switch(p){case 1:if(a6(s))ln(s,E.JSX_fragment_has_no_corresponding_closing_tag);else{let d=s.tagName,b=Math.min(Ar(Qe,d.pos),d.end);rt(b,d.end,E.JSX_element_0_has_no_corresponding_closing_tag,is(Qe,s.tagName))}return;case 31:case 7:return;case 12:case 13:return E_();case 19:return Ho(!1);case 30:return Oi(!1,void 0,s);default:return B.assertNever(p)}}function ba(s){let p=[],d=J(),b=yt;for(yt|=16384;;){let S=gu(s,lt=t.reScanJsxToken());if(!S||(p.push(S),Fp(s)&&(S==null?void 0:S.kind)===284&&!pi(S.openingElement.tagName,S.closingElement.tagName)&&pi(s.tagName,S.closingElement.tagName)))break}return yt=b,Ct(p,d)}function bu(){let s=J();return D(h.createJsxAttributes(xn(13,$o)),s)}function vu(s){let p=J();if(j(30),u()===32)return Gn(),D(h.createJsxOpeningFragment(),p);let d=A_(),b=(nt&524288)===0?Ca():void 0,S=bu(),N;return u()===32?(Gn(),N=h.createJsxOpeningElement(d,b,S)):(j(44),j(32,void 0,!1)&&(s?U():Gn()),N=h.createJsxSelfClosingElement(d,b,S)),D(N,p)}function A_(){let s=J(),p=Tu();if(eh(p))return p;let d=p;for(;Je(25);)d=D(ae(d,ni(!0,!1,!1)),s);return d}function Tu(){let s=J();qt();let p=u()===110,d=ei();return Je(59)?(qt(),D(h.createJsxNamespacedName(d,ei()),s)):p?D(h.createToken(110),s):d}function Ho(s){let p=J();if(!j(19))return;let d,b;return u()!==20&&(s||(d=ft(26)),b=Et()),s?j(20):j(20,void 0,!1)&&Gn(),D(h.createJsxExpression(d,b),p)}function $o(){if(u()===19)return Su();let s=J();return D(h.createJsxAttribute(xu(),C_()),s)}function C_(){if(u()===64){if(wi()===11)return Xn();if(u()===19)return Ho(!0);if(u()===30)return Oi(!0);Ee(E.or_JSX_element_expected)}}function xu(){let s=J();qt();let p=ei();return Je(59)?(qt(),D(h.createJsxNamespacedName(p,ei()),s)):p}function Su(){let s=J();j(19),j(26);let p=Et();return j(20),D(h.createJsxSpreadAttribute(p),s)}function Qo(s,p){let d=J();j(31);let b=A_();return j(32,void 0,!1)&&(p||!pi(s.tagName,b)?U():Gn()),D(h.createJsxClosingElement(b),d)}function wu(s){let p=J();return j(31),j(32,E.Expected_corresponding_closing_tag_for_JSX_fragment,!1)&&(s?U():Gn()),D(h.createJsxJsxClosingFragment(),p)}function Ko(){B.assert(ct!==1,"Type assertions should never be parsed in JSX; they should be parsed as comparisons or JSX elements/fragments.");let s=J();j(30);let p=ot();j(32);let d=Tr();return D(h.createTypeAssertion(p,d),s)}function ku(){return U(),wt(u())||u()===23||Sn()}function Zo(){return u()===29&&G(ku)}function D_(s){if(s.flags&64)return!0;if(ll(s)){let p=s.expression;for(;ll(p)&&!(p.flags&64);)p=p.expression;if(p.flags&64){for(;ll(s);)s.flags|=64,s=s.expression;return!0}}return!1}function ec(s,p,d){let b=ni(!0,!0,!0),S=d||D_(p),N=S?Oe(p,d,b):ae(p,b);if(S&&gi(N.name)&&ln(N.name,E.An_optional_chain_cannot_contain_private_identifiers),H1(p)&&p.typeArguments){let H=p.typeArguments.pos-1,_e=Ar(Qe,p.typeArguments.end)+1;rt(H,_e,E.An_instantiation_expression_cannot_be_followed_by_a_property_access)}return D(N,s)}function Eu(s,p,d){let b;if(u()===24)b=Gt(80,!0,E.An_element_access_expression_should_take_an_argument);else{let N=ut(Et);El(N)&&(N.text=Mr(N.text)),b=N}j(24);let S=d||D_(p)?oe(p,d,b):V(p,b);return D(S,s)}function _n(s,p,d){for(;;){let b,S=!1;if(d&&Zo()?(b=Yn(29),S=wt(u())):S=Je(25),S){p=ec(s,p,b);continue}if((b||!Ze())&&Je(23)){p=Eu(s,p,b);continue}if(Sn()){p=!b&&p.kind===233?Ur(s,p.expression,b,p.typeArguments):Ur(s,p,b,void 0);continue}if(!b){if(u()===54&&!t.hasPrecedingLineBreak()){U(),p=D(h.createNonNullExpression(p),s);continue}let N=le(va);if(N){p=D(h.createExpressionWithTypeArguments(p,N),s);continue}}return p}}function Sn(){return u()===15||u()===16}function Ur(s,p,d,b){let S=h.createTaggedTemplateExpression(p,b,u()===15?(Pt(!0),Xn()):ua(!0));return(d||p.flags&64)&&(S.flags|=64),S.questionDotToken=d,D(S,s)}function P_(s,p){for(;;){p=_n(s,p,!0);let d,b=ft(29);if(b&&(d=le(va),Sn())){p=Ur(s,p,b,d);continue}if(d||u()===21){!b&&p.kind===233&&(d=p.typeArguments,p=p.expression);let S=tc(),N=b||D_(p)?dt(p,b,d,S):W(p,d,S);p=D(N,s);continue}if(b){let S=Gt(80,!1,E.Identifier_expected);p=D(Oe(p,b,S),s)}break}return p}function tc(){j(21);let s=fn(11,ic);return j(22),s}function va(){if((nt&524288)!==0||kt()!==30)return;U();let s=fn(20,ot);if(Ve()===32)return U(),s&&Au()?s:void 0}function Au(){switch(u()){case 21:case 15:case 16:return!0;case 30:case 32:case 40:case 41:return!1}return t.hasPrecedingLineBreak()||Bo()||!br()}function N_(){switch(u()){case 15:t.getTokenFlags()&26656&&Pt(!1);case 9:case 10:case 11:return Xn();case 110:case 108:case 106:case 112:case 97:return Wt();case 21:return Cu();case 23:return ac();case 19:return I_();case 134:if(!G(bc))break;return O_();case 60:return Lc();case 86:return Hu();case 100:return O_();case 105:return sc();case 44:case 69:if($e()===14)return Xn();break;case 16:return ua(!1);case 81:return _a()}return St(E.Expression_expected)}function Cu(){let s=J(),p=qe();j(21);let d=ut(Et);return j(22),Ce(D(gn(d),s),p)}function nc(){let s=J();j(26);let p=zt(!0);return D(h.createSpreadElement(p),s)}function rc(){return u()===26?nc():u()===28?D(h.createOmittedExpression(),J()):zt(!0)}function ic(){return Dt(a,rc)}function ac(){let s=J(),p=t.getTokenStart(),d=j(23),b=t.hasPrecedingLineBreak(),S=fn(15,rc);return Or(23,24,d,p),D(de(S,b),s)}function _c(){let s=J(),p=qe();if(ft(26)){let ce=zt(!0);return Ce(D(h.createSpreadAssignment(ce),s),p)}let d=wn(!0);if(ti(139))return qr(s,p,d,177,0);if(ti(153))return qr(s,p,d,178,0);let b=ft(42),S=ve(),N=Jr(),H=ft(58),_e=ft(54);if(b||u()===21||u()===30)return q_(s,p,d,b,N,H,_e);let Z;if(S&&u()!==59){let ce=ft(64),Le=ce?ut(()=>zt(!0)):void 0;Z=h.createShorthandPropertyAssignment(N,Le),Z.equalsToken=ce}else{j(59);let ce=ut(()=>zt(!0));Z=h.createPropertyAssignment(N,ce)}return Z.modifiers=d,Z.questionToken=H,Z.exclamationToken=_e,Ce(D(Z,s),p)}function I_(){let s=J(),p=t.getTokenStart(),d=j(19),b=t.hasPrecedingLineBreak(),S=fn(12,_c,!0);return Or(19,20,d,p),D(M(S,b),s)}function O_(){let s=Ze();Ke(!1);let p=J(),d=qe(),b=wn(!1);j(100);let S=ft(42),N=S?1:0,H=Xt(b,_l)?2:0,_e=N&&H?K(Mi):N?Wn(Mi):H?R(Mi):Mi(),Z=dn(),ee=Hn(N|H),ce=Jn(59,!1),Le=Ta(N|H);Ke(s);let je=h.createFunctionExpression(b,S,_e,Z,ee,ce,Le);return Ce(D(je,p),d)}function Mi(){return Fe()?Ka():void 0}function sc(){let s=J();if(j(105),Je(25)){let N=jt();return D(h.createMetaProperty(105,N),s)}let p=J(),d=_n(p,N_(),!1),b;d.kind===233&&(b=d.typeArguments,d=d.expression),u()===29&&Ee(E.Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0,is(Qe,d));let S=u()===21?tc():void 0;return D(nr(d,b,S),s)}function Br(s,p){let d=J(),b=qe(),S=t.getTokenStart(),N=j(19,p);if(N||s){let H=t.hasPrecedingLineBreak(),_e=xn(1,Kt);Or(19,20,N,S);let Z=Ce(D(rr(_e,H),d),b);return u()===64&&(Ee(E.Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses),U()),Z}else{let H=lr();return Ce(D(rr(H,void 0),d),b)}}function Ta(s,p){let d=we();He(!!(s&1));let b=Ye();st(!!(s&2));let S=Bt;Bt=!1;let N=Ze();N&&Ke(!1);let H=Br(!!(s&16),p);return N&&Ke(!0),Bt=S,He(d),st(b),H}function oc(){let s=J(),p=qe();return j(27),Ce(D(h.createEmptyStatement(),s),p)}function Du(){let s=J(),p=qe();j(101);let d=t.getTokenStart(),b=j(21),S=ut(Et);Or(21,22,b,d);let N=Kt(),H=Je(93)?Kt():void 0;return Ce(D(Ge(S,N,H),s),p)}function cc(){let s=J(),p=qe();j(92);let d=Kt();j(117);let b=t.getTokenStart(),S=j(21),N=ut(Et);return Or(21,22,S,b),Je(27),Ce(D(h.createDoStatement(d,N),s),p)}function Pu(){let s=J(),p=qe();j(117);let d=t.getTokenStart(),b=j(21),S=ut(Et);Or(21,22,b,d);let N=Kt();return Ce(D(ir(S,N),s),p)}function lc(){let s=J(),p=qe();j(99);let d=ft(135);j(21);let b;u()!==27&&(u()===115||u()===121||u()===87||u()===160&&G(xc)||u()===135&&G(Sc)?b=B_(!0):b=Ir(Et));let S;if(d?j(165):Je(165)){let N=ut(()=>zt(!0));j(22),S=Ot(d,b,N,Kt())}else if(Je(103)){let N=ut(Et);j(22),S=h.createForInStatement(b,N,Kt())}else{j(27);let N=u()!==27&&u()!==22?ut(Et):void 0;j(27);let H=u()!==22?ut(Et):void 0;j(22),S=Pr(b,N,H,Kt())}return Ce(D(S,s),p)}function uc(s){let p=J(),d=qe();j(s===252?83:88);let b=sr()?void 0:St();Qt();let S=s===252?h.createBreakStatement(b):h.createContinueStatement(b);return Ce(D(S,p),d)}function pc(){let s=J(),p=qe();j(107);let d=sr()?void 0:ut(Et);return Qt(),Ce(D(h.createReturnStatement(d),s),p)}function Nu(){let s=J(),p=qe();j(118);let d=t.getTokenStart(),b=j(21),S=ut(Et);Or(21,22,b,d);let N=Tt(67108864,Kt);return Ce(D(h.createWithStatement(S,N),s),p)}function fc(){let s=J(),p=qe();j(84);let d=ut(Et);j(59);let b=xn(3,Kt);return Ce(D(h.createCaseClause(d,b),s),p)}function Iu(){let s=J();j(90),j(59);let p=xn(3,Kt);return D(h.createDefaultClause(p),s)}function Ou(){return u()===84?fc():Iu()}function dc(){let s=J();j(19);let p=xn(2,Ou);return j(20),D(h.createCaseBlock(p),s)}function Mu(){let s=J(),p=qe();j(109),j(21);let d=ut(Et);j(22);let b=dc();return Ce(D(h.createSwitchStatement(d,b),s),p)}function mc(){let s=J(),p=qe();j(111);let d=t.hasPrecedingLineBreak()?void 0:ut(Et);return d===void 0&&(vn++,d=D(re(""),J())),aa()||xt(d),Ce(D(h.createThrowStatement(d),s),p)}function Ju(){let s=J(),p=qe();j(113);let d=Br(!1),b=u()===85?hc():void 0,S;return(!b||u()===98)&&(j(98,E.catch_or_finally_expected),S=Br(!1)),Ce(D(h.createTryStatement(d,b,S),s),p)}function hc(){let s=J();j(85);let p;Je(21)?(p=U_(),j(22)):p=void 0;let d=Br(!1);return D(h.createCatchClause(p,d),s)}function Lu(){let s=J(),p=qe();return j(89),Qt(),Ce(D(h.createDebuggerStatement(),s),p)}function yc(){let s=J(),p=qe(),d,b=u()===21,S=ut(Et);return tt(S)&&Je(59)?d=h.createLabeledStatement(S,Kt()):(aa()||xt(S),d=In(S),b&&(p=!1)),Ce(D(d,s),p)}function M_(){return U(),wt(u())&&!t.hasPrecedingLineBreak()}function gc(){return U(),u()===86&&!t.hasPrecedingLineBreak()}function bc(){return U(),u()===100&&!t.hasPrecedingLineBreak()}function J_(){return U(),(wt(u())||u()===9||u()===10||u()===11)&&!t.hasPrecedingLineBreak()}function ju(){for(;;)switch(u()){case 115:case 121:case 87:case 100:case 86:case 94:return!0;case 160:return j_();case 135:return xa();case 120:case 156:return pu();case 144:case 145:return Ec();case 128:case 129:case 134:case 138:case 123:case 124:case 125:case 148:let s=u();if(U(),t.hasPrecedingLineBreak())return!1;if(s===138&&u()===156)return!0;continue;case 162:return U(),u()===19||u()===80||u()===95;case 102:return U(),u()===11||u()===42||u()===19||wt(u());case 95:let p=U();if(p===156&&(p=G(U)),p===64||p===42||p===19||p===90||p===130||p===60)return!0;continue;case 126:U();continue;default:return!1}}function Ji(){return G(ju)}function vc(){switch(u()){case 60:case 27:case 19:case 115:case 121:case 160:case 100:case 86:case 94:case 101:case 92:case 117:case 99:case 88:case 83:case 107:case 118:case 109:case 111:case 113:case 89:case 85:case 98:return!0;case 102:return Ji()||G(oo);case 87:case 95:return Ji();case 134:case 138:case 120:case 144:case 145:case 156:case 162:return!0;case 129:case 125:case 123:case 124:case 126:case 148:return Ji()||!G(M_);default:return br()}}function Tc(){return U(),Fe()||u()===19||u()===23}function Ru(){return G(Tc)}function xc(){return L_(!0)}function L_(s){return U(),s&&u()===165?!1:(Fe()||u()===19)&&!t.hasPrecedingLineBreak()}function j_(){return G(L_)}function Sc(s){return U()===160?L_(s):!1}function xa(){return G(Sc)}function Kt(){switch(u()){case 27:return oc();case 19:return Br(!1);case 115:return _i(J(),qe(),void 0);case 121:if(Ru())return _i(J(),qe(),void 0);break;case 135:if(xa())return _i(J(),qe(),void 0);break;case 160:if(j_())return _i(J(),qe(),void 0);break;case 100:return Pc(J(),qe(),void 0);case 86:return jc(J(),qe(),void 0);case 101:return Du();case 92:return cc();case 117:return Pu();case 99:return lc();case 88:return uc(251);case 83:return uc(252);case 107:return pc();case 118:return Nu();case 109:return Mu();case 111:return mc();case 113:case 85:case 98:return Ju();case 89:return Lu();case 60:return wc();case 134:case 120:case 156:case 144:case 145:case 138:case 87:case 94:case 95:case 102:case 123:case 124:case 125:case 128:case 129:case 126:case 148:case 162:if(Ji())return wc();break}return yc()}function R_(s){return s.kind===138}function wc(){let s=J(),p=qe(),d=wn(!0);if(Xt(d,R_)){let S=Sa(s);if(S)return S;for(let N of d)N.flags|=33554432;return Tt(33554432,()=>kc(s,p,d))}else return kc(s,p,d)}function Sa(s){return Tt(33554432,()=>{let p=ca(yt,s);if(p)return Ms(p)})}function kc(s,p,d){switch(u()){case 115:case 121:case 87:case 160:case 135:return _i(s,p,d);case 100:return Pc(s,p,d);case 86:return jc(s,p,d);case 120:return Bc(s,p,d);case 156:return ep(s,p,d);case 94:return V_(s,p,d);case 162:case 144:case 145:return np(s,p,d);case 102:return ap(s,p,d);case 95:switch(U(),u()){case 90:case 64:return Xc(s,p,d);case 130:return ip(s,p,d);default:return dp(s,p,d)}default:if(d){let b=Gt(282,!0,E.Declaration_expected);return qp(b,s),b.modifiers=d,b}return}}function Uu(){return U()===11}function Bu(){return U(),u()===161||u()===64}function Ec(){return U(),!t.hasPrecedingLineBreak()&&(ve()||u()===11)}function wa(s,p){if(u()!==19){if(s&4){da();return}if(sr()){Qt();return}}return Ta(s,p)}function Ac(){let s=J();if(u()===28)return D(h.createOmittedExpression(),s);let p=ft(26),d=Li(),b=vr();return D(h.createBindingElement(p,void 0,d,b),s)}function qu(){let s=J(),p=ft(26),d=Fe(),b=Jr(),S;d&&u()!==59?(S=b,b=void 0):(j(59),S=Li());let N=vr();return D(h.createBindingElement(p,b,S,N),s)}function Cc(){let s=J();j(19);let p=ut(()=>fn(9,qu));return j(20),D(h.createObjectBindingPattern(p),s)}function zu(){let s=J();j(23);let p=ut(()=>fn(10,Ac));return j(24),D(h.createArrayBindingPattern(p),s)}function ka(){return u()===19||u()===23||u()===81||Fe()}function Li(s){return u()===23?zu():u()===19?Cc():Ka(s)}function Dc(){return U_(!0)}function U_(s){let p=J(),d=qe(),b=Li(E.Private_identifiers_are_not_allowed_in_variable_declarations),S;s&&b.kind===80&&u()===54&&!t.hasPrecedingLineBreak()&&(S=Wt());let N=gr(),H=Uo(u())?void 0:vr(),_e=Bn(b,S,N,H);return Ce(D(_e,p),d)}function B_(s){let p=J(),d=0;switch(u()){case 115:break;case 121:d|=1;break;case 87:d|=2;break;case 160:d|=4;break;case 135:B.assert(xa()),d|=6,U();break;default:B.fail()}U();let b;if(u()===165&&G(Fu))b=lr();else{let S=be();Te(s),b=fn(8,s?U_:Dc),Te(S)}return D(On(b,d),p)}function Fu(){return Ai()&&U()===22}function _i(s,p,d){let b=B_(!1);Qt();let S=bn(d,b);return Ce(D(S,s),p)}function Pc(s,p,d){let b=Ye(),S=Rn(d);j(100);let N=ft(42),H=S&2048?Mi():Ka(),_e=N?1:0,Z=S&1024?2:0,ee=dn();S&32&&st(!0);let ce=Hn(_e|Z),Le=Jn(59,!1),je=wa(_e|Z,E.or_expected);st(b);let Ae=h.createFunctionDeclaration(d,N,H,ee,ce,Le,je);return Ce(D(Ae,s),p)}function Nc(){if(u()===137)return j(137);if(u()===11&&G(U)===21)return le(()=>{let s=Xn();return s.text==="constructor"?s:void 0})}function Vu(s,p,d){return le(()=>{if(Nc()){let b=dn(),S=Hn(0),N=Jn(59,!1),H=wa(0,E.or_expected),_e=h.createConstructorDeclaration(d,S,H);return _e.typeParameters=b,_e.type=N,Ce(D(_e,s),p)}})}function q_(s,p,d,b,S,N,H,_e){let Z=b?1:0,ee=Xt(d,_l)?2:0,ce=dn(),Le=Hn(Z|ee),je=Jn(59,!1),Ae=wa(Z|ee,_e),Yt=h.createMethodDeclaration(d,b,S,N,ce,Le,je,Ae);return Yt.exclamationToken=H,Ce(D(Yt,s),p)}function Ic(s,p,d,b,S){let N=!S&&!t.hasPrecedingLineBreak()?ft(54):void 0,H=gr(),_e=Dt(90112,vr);Bl(b,H,_e);let Z=h.createPropertyDeclaration(d,b,S||N,H,_e);return Ce(D(Z,s),p)}function Ea(s,p,d){let b=ft(42),S=Jr(),N=ft(58);return b||u()===21||u()===30?q_(s,p,d,b,S,N,void 0,E.or_expected):Ic(s,p,d,S,N)}function qr(s,p,d,b,S){let N=Jr(),H=dn(),_e=Hn(0),Z=Jn(59,!1),ee=wa(S),ce=b===177?h.createGetAccessorDeclaration(d,N,_e,Z,ee):h.createSetAccessorDeclaration(d,N,_e,ee);return ce.typeParameters=H,hs(ce)&&(ce.type=Z),Ce(D(ce,s),p)}function Wu(){let s;if(u()===60)return!0;for(;Wr(u());){if(s=u(),zg(s))return!0;U()}if(u()===42||(yr()&&(s=u(),U()),u()===23))return!0;if(s!==void 0){if(!di(s)||s===153||s===139)return!0;switch(u()){case 21:case 30:case 54:case 59:case 64:case 58:return!0;default:return sr()}}return!1}function Oc(s,p,d){Yn(126);let b=Gu(),S=Ce(D(h.createClassStaticBlockDeclaration(b),s),p);return S.modifiers=d,S}function Gu(){let s=we(),p=Ye();He(!1),st(!0);let d=Br(!1);return He(s),st(p),d}function Yu(){if(Ye()&&u()===135){let s=J(),p=St(E.Expression_expected);U();let d=_n(s,p,!0);return P_(s,d)}return Ii()}function z_(){let s=J();if(!Je(60))return;let p=Si(Yu);return D(h.createDecorator(p),s)}function Mc(s,p,d){let b=J(),S=u();if(u()===87&&p){if(!le(Za))return}else{if(d&&u()===126&&G(Vc))return;if(s&&u()===126)return;if(!Ds())return}return D(ye(S),b)}function wn(s,p,d){let b=J(),S,N,H,_e=!1,Z=!1,ee=!1;if(s&&u()===60)for(;N=z_();)S=An(S,N);for(;H=Mc(_e,p,d);)H.kind===126&&(_e=!0),S=An(S,H),Z=!0;if(Z&&s&&u()===60)for(;N=z_();)S=An(S,N),ee=!0;if(ee)for(;H=Mc(_e,p,d);)H.kind===126&&(_e=!0),S=An(S,H);return S&&Ct(S,b)}function Jc(){let s;if(u()===134){let p=J();U();let d=D(ye(134),p);s=Ct([d],p)}return s}function Xu(){let s=J(),p=qe();if(u()===27)return U(),Ce(D(h.createSemicolonClassElement(),s),p);let d=wn(!0,!0,!0);if(u()===126&&G(Vc))return Oc(s,p,d);if(ti(139))return qr(s,p,d,177,0);if(ti(153))return qr(s,p,d,178,0);if(u()===137||u()===11){let b=Vu(s,p,d);if(b)return b}if(Rr())return d_(s,p,d);if(wt(u())||u()===11||u()===9||u()===10||u()===42||u()===23)if(Xt(d,R_)){for(let S of d)S.flags|=33554432;return Tt(33554432,()=>Ea(s,p,d))}else return Ea(s,p,d);if(d){let b=Gt(80,!0,E.Declaration_expected);return Ic(s,p,d,b,void 0)}return B.fail("Should not have attempted to parse class member declaration.")}function Lc(){let s=J(),p=qe(),d=wn(!0);if(u()===86)return Aa(s,p,d,231);let b=Gt(282,!0,E.Expression_expected);return qp(b,s),b.modifiers=d,b}function Hu(){return Aa(J(),qe(),void 0,231)}function jc(s,p,d){return Aa(s,p,d,263)}function Aa(s,p,d,b){let S=Ye();j(86);let N=$u(),H=dn();Xt(d,zb)&&st(!0);let _e=F_(),Z;j(19)?(Z=Uc(),j(20)):Z=lr(),st(S);let ee=b===263?h.createClassDeclaration(d,N,H,_e,Z):h.createClassExpression(d,N,H,_e,Z);return Ce(D(ee,s),p)}function $u(){return Fe()&&!Qu()?or(Fe()):void 0}function Qu(){return u()===119&&G(Xl)}function F_(){if(Rc())return xn(22,Ku)}function Ku(){let s=J(),p=u();B.assert(p===96||p===119),U();let d=fn(7,Zu);return D(h.createHeritageClause(p,d),s)}function Zu(){let s=J(),p=Ii();if(p.kind===233)return p;let d=Ca();return D(h.createExpressionWithTypeArguments(p,d),s)}function Ca(){return u()===30?Lr(20,ot,30,32):void 0}function Rc(){return u()===96||u()===119}function Uc(){return xn(5,Xu)}function Bc(s,p,d){j(120);let b=St(),S=dn(),N=F_(),H=lo(),_e=h.createInterfaceDeclaration(d,b,S,N,H);return Ce(D(_e,s),p)}function ep(s,p,d){j(156),t.hasPrecedingLineBreak()&&Ee(E.Line_break_not_permitted_here);let b=St(),S=dn();j(64);let N=u()===141&&le(yo)||ot();Qt();let H=h.createTypeAliasDeclaration(d,b,S,N);return Ce(D(H,s),p)}function tp(){let s=J(),p=qe(),d=Jr(),b=ut(vr);return Ce(D(h.createEnumMember(d,b),s),p)}function V_(s,p,d){j(94);let b=St(),S;j(19)?(S=xe(()=>fn(6,tp)),j(20)):S=lr();let N=h.createEnumDeclaration(d,b,S);return Ce(D(N,s),p)}function qc(){let s=J(),p;return j(19)?(p=xn(1,Kt),j(20)):p=lr(),D(h.createModuleBlock(p),s)}function W_(s,p,d,b){let S=b&32,N=b&8?jt():St(),H=Je(25)?W_(J(),!1,void 0,8|S):qc(),_e=h.createModuleDeclaration(d,N,H,b);return Ce(D(_e,s),p)}function zc(s,p,d){let b=0,S;u()===162?(S=St(),b|=2048):(S=Xn(),S.text=Mr(S.text));let N;u()===19?N=qc():Qt();let H=h.createModuleDeclaration(d,S,N,b);return Ce(D(H,s),p)}function np(s,p,d){let b=0;if(u()===162)return zc(s,p,d);if(Je(145))b|=32;else if(j(144),u()===11)return zc(s,p,d);return W_(s,p,d,b)}function rp(){return u()===149&&G(Fc)}function Fc(){return U()===21}function Vc(){return U()===19}function G_(){return U()===44}function ip(s,p,d){j(130),j(145);let b=St();Qt();let S=h.createNamespaceExportDeclaration(b);return S.modifiers=d,Ce(D(S,s),p)}function ap(s,p,d){j(102);let b=t.getTokenFullStart(),S;ve()&&(S=St());let N=!1;if((S==null?void 0:S.escapedText)==="type"&&(u()!==161||ve()&&G(Bu))&&(ve()||sp())&&(N=!0,S=ve()?St():void 0),S&&!zr())return op(s,p,d,S,N);let H=si(S,b,N),_e=Ri(),Z=Wc();Qt();let ee=h.createImportDeclaration(d,H,_e,Z);return Ce(D(ee,s),p)}function si(s,p,d,b=!1){let S;return(s||u()===42||u()===19)&&(S=cp(s,p,d,b),j(161)),S}function Wc(){let s=u();if((s===118||s===132)&&!t.hasPrecedingLineBreak())return Y_(s)}function _p(){let s=J(),p=wt(u())?jt():ri(11);j(59);let d=zt(!0);return D(h.createImportAttribute(p,d),s)}function Y_(s,p){let d=J();p||j(s);let b=t.getTokenStart();if(j(19)){let S=t.hasPrecedingLineBreak(),N=fn(24,_p,!0);if(!j(20)){let H=Yi(_t);H&&H.code===E._0_expected.code&&rl(H,Oa(Mt,Qe,b,1,E.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}return D(h.createImportAttributes(N,S,s),d)}else{let S=Ct([],J(),void 0,!1);return D(h.createImportAttributes(S,!1,s),d)}}function sp(){return u()===42||u()===19}function zr(){return u()===28||u()===161}function op(s,p,d,b,S){j(64);let N=lp();Qt();let H=h.createImportEqualsDeclaration(d,S,b,N);return Ce(D(H,s),p)}function cp(s,p,d,b){let S;return(!s||Je(28))&&(b&&t.setSkipJsDocLeadingAsterisks(!0),S=u()===42?up():Gc(275),b&&t.setSkipJsDocLeadingAsterisks(!1)),D(h.createImportClause(d,s,S),p)}function lp(){return rp()?ji():jr(!1)}function ji(){let s=J();j(149),j(21);let p=Ri();return j(22),D(h.createExternalModuleReference(p),s)}function Ri(){if(u()===11){let s=Xn();return s.text=Mr(s.text),s}else return Et()}function up(){let s=J();j(42),j(130);let p=St();return D(h.createNamespaceImport(p),s)}function X_(){return wt(u())||u()===11}function oi(s){return u()===11?Xn():s()}function Gc(s){let p=J(),d=s===275?h.createNamedImports(Lr(23,ci,19,20)):h.createNamedExports(Lr(23,pp,19,20));return D(d,p)}function pp(){let s=qe();return Ce(Yc(281),s)}function ci(){return Yc(276)}function Yc(s){let p=J(),d=di(u())&&!ve(),b=t.getTokenStart(),S=t.getTokenEnd(),N=!1,H,_e=!0,Z=oi(jt);if(Z.kind===80&&Z.escapedText==="type")if(u()===130){let Le=jt();if(u()===130){let je=jt();X_()?(N=!0,H=Le,Z=oi(ce),_e=!1):(H=Z,Z=je,_e=!1)}else X_()?(H=Z,_e=!1,Z=oi(ce)):(N=!0,Z=Le)}else X_()&&(N=!0,Z=oi(ce));_e&&u()===130&&(H=Z,j(130),Z=oi(ce)),s===276&&(Z.kind!==80?(rt(Ar(Qe,Z.pos),Z.end,E.Identifier_expected),Z=yi(Gt(80,!1),Z.pos,Z.pos)):d&&rt(b,S,E.Identifier_expected));let ee=s===276?h.createImportSpecifier(N,H,Z):h.createExportSpecifier(N,H,Z);return D(ee,p);function ce(){return d=di(u())&&!ve(),b=t.getTokenStart(),S=t.getTokenEnd(),jt()}}function fp(s){return D(h.createNamespaceExport(oi(jt)),s)}function dp(s,p,d){let b=Ye();st(!0);let S,N,H,_e=Je(156),Z=J();Je(42)?(Je(130)&&(S=fp(Z)),j(161),N=Ri()):(S=Gc(279),(u()===161||u()===11&&!t.hasPrecedingLineBreak())&&(j(161),N=Ri()));let ee=u();N&&(ee===118||ee===132)&&!t.hasPrecedingLineBreak()&&(H=Y_(ee)),Qt(),st(b);let ce=h.createExportDeclaration(d,_e,S,N,H);return Ce(D(ce,s),p)}function Xc(s,p,d){let b=Ye();st(!0);let S;Je(64)?S=!0:j(90);let N=zt(!0);Qt(),st(b);let H=h.createExportAssignment(d,S,N);return Ce(D(H,s),p)}let H_;(s=>{s[s.SourceElements=0]="SourceElements",s[s.BlockStatements=1]="BlockStatements",s[s.SwitchClauses=2]="SwitchClauses",s[s.SwitchClauseStatements=3]="SwitchClauseStatements",s[s.TypeMembers=4]="TypeMembers",s[s.ClassMembers=5]="ClassMembers",s[s.EnumMembers=6]="EnumMembers",s[s.HeritageClauseElement=7]="HeritageClauseElement",s[s.VariableDeclarations=8]="VariableDeclarations",s[s.ObjectBindingElements=9]="ObjectBindingElements",s[s.ArrayBindingElements=10]="ArrayBindingElements",s[s.ArgumentExpressions=11]="ArgumentExpressions",s[s.ObjectLiteralMembers=12]="ObjectLiteralMembers",s[s.JsxAttributes=13]="JsxAttributes",s[s.JsxChildren=14]="JsxChildren",s[s.ArrayLiteralMembers=15]="ArrayLiteralMembers",s[s.Parameters=16]="Parameters",s[s.JSDocParameters=17]="JSDocParameters",s[s.RestProperties=18]="RestProperties",s[s.TypeParameters=19]="TypeParameters",s[s.TypeArguments=20]="TypeArguments",s[s.TupleElementTypes=21]="TupleElementTypes",s[s.HeritageClauses=22]="HeritageClauses",s[s.ImportOrExportSpecifiers=23]="ImportOrExportSpecifiers",s[s.ImportAttributes=24]="ImportAttributes",s[s.JSDocComment=25]="JSDocComment",s[s.Count=26]="Count"})(H_||(H_={}));let $_;(s=>{s[s.False=0]="False",s[s.True=1]="True",s[s.Unknown=2]="Unknown"})($_||($_={}));let Hc;(s=>{function p(ee,ce,Le){zn("file.js",ee,99,void 0,1,0),t.setText(ee,ce,Le),lt=t.scan();let je=d(),Ae=se("file.js",99,1,!1,[],ye(1),0,Fa),Yt=zi(_t,Ae);return Ut&&(Ae.jsDocDiagnostics=zi(Ut,Ae)),Fn(),je?{jsDocTypeExpression:je,diagnostics:Yt}:void 0}s.parseJSDocTypeExpressionForTests=p;function d(ee){let ce=J(),Le=(ee?Je:j)(19),je=Tt(16777216,l_);(!ee||Le)&&Es(20);let Ae=h.createJSDocTypeExpression(je);return L(Ae),D(Ae,ce)}s.parseJSDocTypeExpression=d;function b(){let ee=J(),ce=Je(19),Le=J(),je=jr(!1);for(;u()===81;)Nt(),ze(),je=D(h.createJSDocMemberName(je,St()),Le);ce&&Es(20);let Ae=h.createJSDocNameReference(je);return L(Ae),D(Ae,ee)}s.parseJSDocNameReference=b;function S(ee,ce,Le){zn("",ee,99,void 0,1,0);let je=Tt(16777216,()=>Z(ce,Le)),Yt=zi(_t,{languageVariant:0,text:ee});return Fn(),je?{jsDoc:je,diagnostics:Yt}:void 0}s.parseIsolatedJSDocComment=S;function N(ee,ce,Le){let je=lt,Ae=_t.length,Yt=rn,mn=Tt(16777216,()=>Z(ce,Le));return wf(mn,ee),nt&524288&&(Ut||(Ut=[]),Dn(Ut,_t,Ae)),lt=je,_t.length=Ae,rn=Yt,mn}s.parseJSDocComment=N;let H;(ee=>{ee[ee.BeginningOfLine=0]="BeginningOfLine",ee[ee.SawAsterisk=1]="SawAsterisk",ee[ee.SavingComments=2]="SavingComments",ee[ee.SavingBackticks=3]="SavingBackticks"})(H||(H={}));let _e;(ee=>{ee[ee.Property=1]="Property",ee[ee.Parameter=2]="Parameter",ee[ee.CallbackParameter=4]="CallbackParameter"})(_e||(_e={}));function Z(ee=0,ce){let Le=Qe,je=ce===void 0?Le.length:ee+ce;if(ce=je-ee,B.assert(ee>=0),B.assert(ee<=je),B.assert(je<=Le.length),!D6(Le,ee))return;let Ae,Yt,mn,Zt,ur,Ln=[],Fr=[],mp=yt;yt|=1<<25;let De=t.scanRange(ee+3,ce-5,et);return yt=mp,De;function et(){let O=1,Y,X=ee-(Le.lastIndexOf(` +`,ee)+1)+4;function te(Ue){Y||(Y=X),Ln.push(Ue),X+=Ue.length}for(ze();Bi(5););Bi(4)&&(O=0,X=0);e:for(;;){switch(u()){case 60:Da(Ln),ur||(ur=J()),pe(q(X)),O=0,Y=void 0;break;case 4:Ln.push(t.getTokenText()),O=0,X=0;break;case 42:let Ue=t.getTokenText();O===1?(O=2,te(Ue)):(B.assert(O===0),O=1,X+=Ue.length);break;case 5:B.assert(O!==2,"whitespace shouldn't come from the scanner while saving top-level comment text");let pt=t.getTokenText();Y!==void 0&&X+pt.length>Y&&Ln.push(pt.slice(Y-X)),X+=pt.length;break;case 1:break e;case 82:O=2,te(t.getTokenValue());break;case 19:O=2;let hn=t.getTokenFullStart(),sn=t.getTokenEnd()-1,tn=_(sn);if(tn){Zt||pr(Ln),Fr.push(D(h.createJSDocText(Ln.join("")),Zt??ee,hn)),Fr.push(tn),Ln=[],Zt=t.getTokenEnd();break}default:O=2,te(t.getTokenText());break}O===2?an(!1):ze()}let ne=Ln.join("").trimEnd();Fr.length&&ne.length&&Fr.push(D(h.createJSDocText(ne),Zt??ee,ur)),Fr.length&&Ae&&B.assertIsDefined(ur,"having parsed tags implies that the end of the comment span should be set");let Pe=Ae&&Ct(Ae,Yt,mn);return D(h.createJSDocComment(Fr.length?Ct(Fr,ee,ur):ne.length?ne:void 0,Pe),ee,je)}function pr(O){for(;O.length&&(O[0]===` +`||O[0]==="\r");)O.shift()}function Da(O){for(;O.length;){let Y=O[O.length-1].trimEnd();if(Y==="")O.pop();else if(Y.lengthpt&&(te.push(Qn.slice(pt-O)),Ue=2),O+=Qn.length;break;case 19:Ue=2;let Qc=t.getTokenFullStart(),Na=t.getTokenEnd()-1,Kc=_(Na);Kc?(ne.push(D(h.createJSDocText(te.join("")),Pe??X,Qc)),ne.push(Kc),te=[],Pe=t.getTokenEnd()):hn(t.getTokenText());break;case 62:Ue===3?Ue=2:Ue=3,hn(t.getTokenText());break;case 82:Ue!==3&&(Ue=2),hn(t.getTokenValue());break;case 42:if(Ue===0){Ue=1,O+=1;break}default:Ue!==3&&(Ue=2),hn(t.getTokenText());break}Ue===2||Ue===3?sn=an(Ue===3):sn=ze()}pr(te);let tn=te.join("").trimEnd();if(ne.length)return tn.length&&ne.push(D(h.createJSDocText(tn),Pe??X)),Ct(ne,X,t.getTokenEnd());if(tn.length)return tn}function _(O){let Y=le(f);if(!Y)return;ze(),It();let X=c(),te=[];for(;u()!==20&&u()!==4&&u()!==1;)te.push(t.getTokenText()),ze();let ne=Y==="link"?h.createJSDocLink:Y==="linkcode"?h.createJSDocLinkCode:h.createJSDocLinkPlain;return D(ne(X,te.join("")),O,t.getTokenEnd())}function c(){if(wt(u())){let O=J(),Y=jt();for(;Je(25);)Y=D(h.createQualifiedName(Y,u()===81?Gt(80,!1):jt()),O);for(;u()===81;)Nt(),ze(),Y=D(h.createJSDocMemberName(Y,St()),O);return Y}}function f(){if(xr(),u()===19&&ze()===60&&wt(ze())){let O=t.getTokenValue();if(w(O))return O}}function w(O){return O==="link"||O==="linkcode"||O==="linkplain"}function F(O,Y,X,te){return D(h.createJSDocUnknownTag(Y,n(O,J(),X,te)),O)}function pe(O){O&&(Ae?Ae.push(O):(Ae=[O],Yt=O.pos),mn=O.end)}function Re(){return xr(),u()===19?d():void 0}function en(){let O=Bi(23);O&&It();let Y=Bi(62),X=H0();return Y&&zl(62),O&&(It(),ft(64)&&Et(),j(24)),{name:X,isBracketed:O}}function kn(O){switch(O.kind){case 151:return!0;case 188:return kn(O.elementType);default:return Pf(O)&&tt(O.typeName)&&O.typeName.escapedText==="Object"&&!O.typeArguments}}function $n(O,Y,X,te){let ne=Re(),Pe=!ne;xr();let{name:Ue,isBracketed:pt}=en(),hn=xr();Pe&&!G(f)&&(ne=Re());let sn=n(O,J(),te,hn),tn=Pa(ne,Ue,X,te);tn&&(ne=tn,Pe=!0);let Qn=X===1?h.createJSDocPropertyTag(Y,Ue,pt,ne,Pe,sn):h.createJSDocParameterTag(Y,Ue,pt,ne,Pe,sn);return D(Qn,O)}function Pa(O,Y,X,te){if(O&&kn(O.type)){let ne=J(),Pe,Ue;for(;Pe=le(()=>yp(X,te,Y));)Pe.kind===341||Pe.kind===348?Ue=An(Ue,Pe):Pe.kind===345&&ln(Pe.tagName,E.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);if(Ue){let pt=D(h.createJSDocTypeLiteral(Ue,O.type.kind===188),ne);return D(h.createJSDocTypeExpression(pt),ne)}}}function D0(O,Y,X,te){Xt(Ae,h6)&&rt(Y.pos,t.getTokenStart(),E._0_tag_already_specified,cs(Y.escapedText));let ne=Re();return D(h.createJSDocReturnTag(Y,ne,n(O,J(),X,te)),O)}function md(O,Y,X,te){Xt(Ae,Vf)&&rt(Y.pos,t.getTokenStart(),E._0_tag_already_specified,cs(Y.escapedText));let ne=d(!0),Pe=X!==void 0&&te!==void 0?n(O,J(),X,te):void 0;return D(h.createJSDocTypeTag(Y,ne,Pe),O)}function P0(O,Y,X,te){let Pe=u()===23||G(()=>ze()===60&&wt(ze())&&w(t.getTokenValue()))?void 0:b(),Ue=X!==void 0&&te!==void 0?n(O,J(),X,te):void 0;return D(h.createJSDocSeeTag(Y,Pe,Ue),O)}function N0(O,Y,X,te){let ne=Re(),Pe=n(O,J(),X,te);return D(h.createJSDocThrowsTag(Y,ne,Pe),O)}function I0(O,Y,X,te){let ne=J(),Pe=O0(),Ue=t.getTokenFullStart(),pt=n(O,Ue,X,te);pt||(Ue=t.getTokenFullStart());let hn=typeof pt!="string"?Ct(Xp([D(Pe,ne,Ue)],pt),ne):Pe.text+pt;return D(h.createJSDocAuthorTag(Y,hn),O)}function O0(){let O=[],Y=!1,X=t.getToken();for(;X!==1&&X!==4;){if(X===30)Y=!0;else{if(X===60&&!Y)break;if(X===32&&Y){O.push(t.getTokenText()),t.resetTokenState(t.getTokenEnd());break}}O.push(t.getTokenText()),X=ze()}return h.createJSDocText(O.join(""))}function M0(O,Y,X,te){let ne=hd();return D(h.createJSDocImplementsTag(Y,ne,n(O,J(),X,te)),O)}function J0(O,Y,X,te){let ne=hd();return D(h.createJSDocAugmentsTag(Y,ne,n(O,J(),X,te)),O)}function L0(O,Y,X,te){let ne=d(!1),Pe=X!==void 0&&te!==void 0?n(O,J(),X,te):void 0;return D(h.createJSDocSatisfiesTag(Y,ne,Pe),O)}function j0(O,Y,X,te){let ne=t.getTokenFullStart(),Pe;ve()&&(Pe=St());let Ue=si(Pe,ne,!0,!0),pt=Ri(),hn=Wc(),sn=X!==void 0&&te!==void 0?n(O,J(),X,te):void 0;return D(h.createJSDocImportTag(Y,Ue,pt,hn,sn),O)}function hd(){let O=Je(19),Y=J(),X=R0();t.setSkipJsDocLeadingAsterisks(!0);let te=Ca();t.setSkipJsDocLeadingAsterisks(!1);let ne=h.createExpressionWithTypeArguments(X,te),Pe=D(ne,Y);return O&&j(20),Pe}function R0(){let O=J(),Y=li();for(;Je(25);){let X=li();Y=D(ae(Y,X),O)}return Y}function Ui(O,Y,X,te,ne){return D(Y(X,n(O,J(),te,ne)),O)}function yd(O,Y,X,te){let ne=d(!0);return It(),D(h.createJSDocThisTag(Y,ne,n(O,J(),X,te)),O)}function U0(O,Y,X,te){let ne=d(!0);return It(),D(h.createJSDocEnumTag(Y,ne,n(O,J(),X,te)),O)}function B0(O,Y,X,te){let ne=Re();xr();let Pe=hp();It();let Ue=i(X),pt;if(!ne||kn(ne.type)){let sn,tn,Qn,Qc=!1;for(;(sn=le(()=>W0(X)))&&sn.kind!==345;)if(Qc=!0,sn.kind===344)if(tn){let Na=Ee(E.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);Na&&rl(Na,Oa(Mt,Qe,0,0,E.The_tag_was_first_specified_here));break}else tn=sn;else Qn=An(Qn,sn);if(Qc){let Na=ne&&ne.type.kind===188,Kc=h.createJSDocTypeLiteral(Qn,Na);ne=tn&&tn.typeExpression&&!kn(tn.typeExpression.type)?tn.typeExpression:D(Kc,O),pt=ne.end}}pt=pt||Ue!==void 0?J():(Pe??ne??Y).end,Ue||(Ue=n(O,pt,X,te));let hn=h.createJSDocTypedefTag(Y,ne,Pe,Ue);return D(hn,O,pt)}function hp(O){let Y=t.getTokenStart();if(!wt(u()))return;let X=li();if(Je(25)){let te=hp(!0),ne=h.createModuleDeclaration(void 0,X,te,O?8:void 0);return D(ne,Y)}return O&&(X.flags|=4096),X}function q0(O){let Y=J(),X,te;for(;X=le(()=>yp(4,O));){if(X.kind===345){ln(X.tagName,E.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);break}te=An(te,X)}return Ct(te||[],Y)}function gd(O,Y){let X=q0(Y),te=le(()=>{if(Bi(60)){let ne=q(Y);if(ne&&ne.kind===342)return ne}});return D(h.createJSDocSignature(void 0,X,te),O)}function z0(O,Y,X,te){let ne=hp();It();let Pe=i(X),Ue=gd(O,X);Pe||(Pe=n(O,J(),X,te));let pt=Pe!==void 0?J():Ue.end;return D(h.createJSDocCallbackTag(Y,Ue,ne,Pe),O,pt)}function F0(O,Y,X,te){It();let ne=i(X),Pe=gd(O,X);ne||(ne=n(O,J(),X,te));let Ue=ne!==void 0?J():Pe.end;return D(h.createJSDocOverloadTag(Y,Pe,ne),O,Ue)}function V0(O,Y){for(;!tt(O)||!tt(Y);)if(!tt(O)&&!tt(Y)&&O.right.escapedText===Y.right.escapedText)O=O.left,Y=Y.left;else return!1;return O.escapedText===Y.escapedText}function W0(O){return yp(1,O)}function yp(O,Y,X){let te=!0,ne=!1;for(;;)switch(ze()){case 60:if(te){let Pe=G0(O,Y);return Pe&&(Pe.kind===341||Pe.kind===348)&&X&&(tt(Pe.name)||!V0(X,Pe.name.left))?!1:Pe}ne=!1;break;case 4:te=!0,ne=!1;break;case 42:ne&&(te=!1),ne=!0;break;case 80:te=!1;break;case 1:return!1}}function G0(O,Y){B.assert(u()===60);let X=t.getTokenFullStart();ze();let te=li(),ne=xr(),Pe;switch(te.escapedText){case"type":return O===1&&md(X,te);case"prop":case"property":Pe=1;break;case"arg":case"argument":case"param":Pe=6;break;case"template":return bd(X,te,Y,ne);case"this":return yd(X,te,Y,ne);default:return!1}return O&Pe?$n(X,te,O,Y):!1}function Y0(){let O=J(),Y=Bi(23);Y&&It();let X=wn(!1,!0),te=li(E.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces),ne;if(Y&&(It(),j(64),ne=Tt(16777216,l_),j(24)),!Hi(te))return D(h.createTypeParameterDeclaration(X,te,void 0,ne),O)}function X0(){let O=J(),Y=[];do{It();let X=Y0();X!==void 0&&Y.push(X),xr()}while(Bi(28));return Ct(Y,O)}function bd(O,Y,X,te){let ne=u()===19?d():void 0,Pe=X0();return D(h.createJSDocTemplateTag(Y,ne,Pe,n(O,J(),X,te)),O)}function Bi(O){return u()===O?(ze(),!0):!1}function H0(){let O=li();for(Je(23)&&j(24);Je(25);){let Y=li();Je(23)&&j(24),O=Hl(O,Y)}return O}function li(O){if(!wt(u()))return Gt(80,!O,O||E.Identifier_expected);vn++;let Y=t.getTokenStart(),X=t.getTokenEnd(),te=u(),ne=Mr(t.getTokenValue()),Pe=D(re(ne,te),Y,X);return ze(),Pe}}})(Hc=e.JSDocParser||(e.JSDocParser={}))})(Qi||(Qi={}));var Tm=new WeakSet;function U6(e){Tm.has(e)&&B.fail("Source file has already been incrementally parsed"),Tm.add(e)}var mh=new WeakSet;function B6(e){return mh.has(e)}function Gp(e){mh.add(e)}var Tl;(e=>{function t(x,I,re,he){if(he=he||B.shouldAssert(2),h(x,I,re,he),yg(re))return x;if(x.statements.length===0)return Qi.parseSourceFile(x.fileName,I,x.languageVersion,void 0,!0,x.scriptKind,x.setExternalModuleIndicator,x.jsDocParsingMode);U6(x),Qi.fixupParentReferences(x);let ye=x.text,de=y(x),M=l(x,re);h(x,I,M,he),B.assert(M.span.start<=re.span.start),B.assert(wr(M.span)===wr(re.span)),B.assert(wr(K_(M))===wr(K_(re)));let ae=K_(M).length-M.span.length;P(x,M.span.start,wr(M.span),wr(K_(M)),ae,ye,I,he);let Oe=Qi.parseSourceFile(x.fileName,I,x.languageVersion,de,!0,x.scriptKind,x.setExternalModuleIndicator,x.jsDocParsingMode);return Oe.commentDirectives=a(x.commentDirectives,Oe.commentDirectives,M.span.start,wr(M.span),ae,ye,I,he),Oe.impliedNodeFormat=x.impliedNodeFormat,v6(x,Oe),Oe}e.updateSourceFile=t;function a(x,I,re,he,ye,de,M,ae){if(!x)return I;let Oe,V=!1;for(let W of x){let{range:dt,type:nr}=W;if(dt.endhe){oe();let gn={range:{pos:dt.pos+ye,end:dt.end+ye},type:nr};Oe=An(Oe,gn),ae&&B.assert(de.substring(dt.pos,dt.end)===M.substring(gn.range.pos,gn.range.end))}}return oe(),Oe;function oe(){V||(V=!0,Oe?I&&Oe.push(...I):Oe=I)}}function o(x,I,re,he,ye,de,M){re?Oe(x):ae(x);return;function ae(V){let oe="";if(M&&m(V)&&(oe=ye.substring(V.pos,V.end)),Qd(V,I),yi(V,V.pos+he,V.end+he),M&&m(V)&&B.assert(oe===de.substring(V.pos,V.end)),Ht(V,ae,Oe),Xi(V))for(let W of V.jsDoc)ae(W);A(V,M)}function Oe(V){yi(V,V.pos+he,V.end+he);for(let oe of V)ae(oe)}}function m(x){switch(x.kind){case 11:case 9:case 80:return!0}return!1}function v(x,I,re,he,ye){B.assert(x.end>=I,"Adjusting an element that was entirely before the change range"),B.assert(x.pos<=re,"Adjusting an element that was entirely after the change range"),B.assert(x.pos<=x.end);let de=Math.min(x.pos,he),M=x.end>=re?x.end+ye:Math.min(x.end,he);if(B.assert(de<=M),x.parent){let ae=x.parent;B.assertGreaterThanOrEqual(de,ae.pos),B.assertLessThanOrEqual(M,ae.end)}yi(x,de,M)}function A(x,I){if(I){let re=x.pos,he=ye=>{B.assert(ye.pos>=re),re=ye.end};if(Xi(x))for(let ye of x.jsDoc)he(ye);Ht(x,he),B.assert(re<=x.end)}}function P(x,I,re,he,ye,de,M,ae){Oe(x);return;function Oe(oe){if(B.assert(oe.pos<=oe.end),oe.pos>re){o(oe,x,!1,ye,de,M,ae);return}let W=oe.end;if(W>=I){if(Gp(oe),Qd(oe,x),v(oe,I,re,he,ye),Ht(oe,Oe,V),Xi(oe))for(let dt of oe.jsDoc)Oe(dt);A(oe,ae);return}B.assert(Wre){o(oe,x,!0,ye,de,M,ae);return}let W=oe.end;if(W>=I){Gp(oe),v(oe,I,re,he,ye);for(let dt of oe)Oe(dt);return}B.assert(W0&&M<=1;M++){let ae=Q(x,he);B.assert(ae.pos<=he);let Oe=ae.pos;he=Math.max(0,Oe-1)}let ye=hg(he,wr(I.span)),de=I.newLength+(I.span.start-he);return Qm(ye,de)}function Q(x,I){let re=x,he;if(Ht(x,de),he){let M=ye(he);M.pos>re.pos&&(re=M)}return re;function ye(M){for(;;){let ae=tb(M);if(ae)M=ae;else return M}}function de(M){if(!Hi(M))if(M.pos<=I){if(M.pos>=re.pos&&(re=M),II),!0}}function h(x,I,re,he){let ye=x.text;if(re&&(B.assert(ye.length-re.span.length+re.newLength===I.length),he||B.shouldAssert(3))){let de=ye.substr(0,re.span.start),M=I.substr(0,re.span.start);B.assert(de===M);let ae=ye.substring(wr(re.span),ye.length),Oe=I.substring(wr(K_(re)),I.length);B.assert(ae===Oe)}}function y(x){let I=x.statements,re=0;B.assert(re=V.pos&&M=V.pos&&M{x[x.Value=-1]="Value"})(g||(g={}))})(Tl||(Tl={}));function q6(e){return z6(e)!==void 0}function z6(e){let t=jm(e,xb,!1);if(t)return t;if(jy(e,".ts")){let a=Lm(e),o=a.lastIndexOf(".d.");if(o>=0)return a.substring(o)}}function F6(e,t,a,o){if(e){if(e==="import")return 99;if(e==="require")return 1;o(t,a-t,E.resolution_mode_should_be_either_require_or_import)}}function V6(e,t){let a=[];for(let o of Lp(t,0)||bt){let m=t.substring(o.pos,o.end);H6(a,o,m)}e.pragmas=new Map;for(let o of a){if(e.pragmas.has(o.name)){let m=e.pragmas.get(o.name);m instanceof Array?m.push(o.args):e.pragmas.set(o.name,[m,o.args]);continue}e.pragmas.set(o.name,o.args)}}function W6(e,t){e.checkJsDirective=void 0,e.referencedFiles=[],e.typeReferenceDirectives=[],e.libReferenceDirectives=[],e.amdDependencies=[],e.hasNoDefaultLib=!1,e.pragmas.forEach((a,o)=>{switch(o){case"reference":{let m=e.referencedFiles,v=e.typeReferenceDirectives,A=e.libReferenceDirectives;Un(vp(a),P=>{let{types:l,lib:Q,path:h,["resolution-mode"]:y,preserve:g}=P.arguments,x=g==="true"?!0:void 0;if(P.arguments["no-default-lib"]==="true")e.hasNoDefaultLib=!0;else if(l){let I=F6(y,l.pos,l.end,t);v.push({pos:l.pos,end:l.end,fileName:l.value,...I?{resolutionMode:I}:{},...x?{preserve:x}:{}})}else Q?A.push({pos:Q.pos,end:Q.end,fileName:Q.value,...x?{preserve:x}:{}}):h?m.push({pos:h.pos,end:h.end,fileName:h.value,...x?{preserve:x}:{}}):t(P.range.pos,P.range.end-P.range.pos,E.Invalid_reference_directive_syntax)});break}case"amd-dependency":{e.amdDependencies=Np(vp(a),m=>({name:m.arguments.name,path:m.arguments.path}));break}case"amd-module":{if(a instanceof Array)for(let m of a)e.moduleName&&t(m.range.pos,m.range.end-m.range.pos,E.An_AMD_module_cannot_have_multiple_name_assignments),e.moduleName=m.arguments.name;else e.moduleName=a.arguments.name;break}case"ts-nocheck":case"ts-check":{Un(vp(a),m=>{(!e.checkJsDirective||m.range.pos>e.checkJsDirective.pos)&&(e.checkJsDirective={enabled:o==="ts-check",end:m.range.end,pos:m.range.pos})});break}case"jsx":case"jsxfrag":case"jsximportsource":case"jsxruntime":return;default:B.fail("Unhandled pragma kind")}})}var Pp=new Map;function G6(e){if(Pp.has(e))return Pp.get(e);let t=new RegExp(`(\\s${e}\\s*=\\s*)(?:(?:'([^']*)')|(?:"([^"]*)"))`,"im");return Pp.set(e,t),t}var Y6=/^\/\/\/\s*<(\S+)\s.*?\/>/m,X6=/^\/\/\/?\s*@([^\s:]+)((?:[^\S\r\n]|:).*)?$/m;function H6(e,t,a){let o=t.kind===2&&Y6.exec(a);if(o){let v=o[1].toLowerCase(),A=Jm[v];if(!A||!(A.kind&1))return;if(A.args){let P={};for(let l of A.args){let h=G6(l.name).exec(a);if(!h&&!l.optional)return;if(h){let y=h[2]||h[3];if(l.captureSpan){let g=t.pos+h.index+h[1].length+1;P[l.name]={value:y,pos:g,end:g+y.length}}else P[l.name]=y}}e.push({name:v,args:{arguments:P,range:t}})}else e.push({name:v,args:{arguments:{},range:t}});return}let m=t.kind===2&&X6.exec(a);if(m)return xm(e,t,2,m);if(t.kind===3){let v=/@(\S+)(\s+(?:\S.*)?)?$/gm,A;for(;A=v.exec(a);)xm(e,t,4,A)}}function xm(e,t,a,o){if(!o)return;let m=o[1].toLowerCase(),v=Jm[m];if(!v||!(v.kind&a))return;let A=o[2],P=$6(v,A);P!=="fail"&&e.push({name:m,args:{arguments:P,range:t}})}function $6(e,t){if(!t)return{};if(!e.args)return{};let a=t.trim().split(/\s+/),o={};for(let m=0;mo.kind<309||o.kind>351);return a.kind<166?a:a.getFirstToken(e)}getLastToken(e){this.assertHasRealPosition();let t=this.getChildren(e),a=Yi(t);if(a)return a.kind<166?a:a.getLastToken(e)}forEachChild(e,t){return Ht(this,e,t)}};function Q6(e,t){let a=[];if(r2(e))return e.forEachChild(A=>{a.push(A)}),a;ss.setText((t||e.getSourceFile()).text);let o=e.pos,m=A=>{os(a,o,A.pos,e),a.push(A),o=A.end},v=A=>{os(a,o,A.pos,e),a.push(K6(A,e)),o=A.end};return Un(e.jsDoc,m),o=e.pos,e.forEachChild(m,v),os(a,o,e.end,e),ss.setText(void 0),a}function os(e,t,a,o){for(ss.resetTokenState(t);tt.tagName.text==="inheritDoc"||t.tagName.text==="inheritdoc")}function ul(e,t){if(!e)return bt;let a=ts_JsDoc_exports.getJsDocTagsFromDeclarations(e,t);if(t&&(a.length===0||e.some(vh))){let o=new Set;for(let m of e){let v=Th(t,m,A=>{var P;if(!o.has(A))return o.add(A),m.kind===177||m.kind===178?A.getContextualJsDocTags(m,t):((P=A.declarations)==null?void 0:P.length)===1?A.getJsDocTags(t):void 0});v&&(a=[...v,...a])}}return a}function _s(e,t){if(!e)return bt;let a=ts_JsDoc_exports.getJsDocCommentsFromDeclarations(e,t);if(t&&(a.length===0||e.some(vh))){let o=new Set;for(let m of e){let v=Th(t,m,A=>{if(!o.has(A))return o.add(A),m.kind===177||m.kind===178?A.getContextualDocumentationComment(m,t):A.getDocumentationComment(t)});v&&(a=a.length===0?v.slice():v.concat(lineBreakPart(),a))}}return a}function Th(e,t,a){var o;let m=((o=t.parent)==null?void 0:o.kind)===176?t.parent.parent:t.parent;if(!m)return;let v=V2(t);return _y(J2(m),A=>{let P=e.getTypeAtLocation(A),l=v&&P.symbol?e.getTypeOfSymbol(P.symbol):P,Q=e.getPropertyOfType(l,t.symbol.name);return Q?a(Q):void 0})}var nv=class extends Yf{constructor(e,t,a){super(e,t,a)}update(e,t){return R6(this,e,t)}getLineAndCharacterOfPosition(e){return Vm(this,e)}getLineStarts(){return Jp(this)}getPositionOfLineAndCharacter(e,t,a){return _g(Jp(this),e,t,this.text,a)}getLineEndOfPosition(e){let{line:t}=this.getLineAndCharacterOfPosition(e),a=this.getLineStarts(),o;t+1>=a.length&&(o=this.getEnd()),o||(o=a[t+1]-1);let m=this.getFullText();return m[o]===` +`&&m[o-1]==="\r"?o-1:o}getNamedDeclarations(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations}computeNamedDeclarations(){let e=vy();return this.forEachChild(m),e;function t(v){let A=o(v);A&&e.add(A,v)}function a(v){let A=e.get(v);return A||e.set(v,A=[]),A}function o(v){let A=uf(v);return A&&(Ef(A)&&Xr(A.expression)?A.expression.name.text:_1(A)?getNameFromPropertyName(A):void 0)}function m(v){switch(v.kind){case 262:case 218:case 174:case 173:let A=v,P=o(A);if(P){let h=a(P),y=Yi(h);y&&A.parent===y.parent&&A.symbol===y.symbol?A.body&&!y.body&&(h[h.length-1]=A):h.push(A)}Ht(v,m);break;case 263:case 231:case 264:case 265:case 266:case 267:case 271:case 281:case 276:case 273:case 274:case 177:case 178:case 187:t(v),Ht(v,m);break;case 169:if(!bs(v,31))break;case 260:case 208:{let h=v;if(Xg(h.name)){Ht(h.name,m);break}h.initializer&&m(h.initializer)}case 306:case 172:case 171:t(v);break;case 278:let l=v;l.exportClause&&(Z1(l.exportClause)?Un(l.exportClause.elements,m):m(l.exportClause.name));break;case 272:let Q=v.importClause;Q&&(Q.name&&t(Q.name),Q.namedBindings&&(Q.namedBindings.kind===274?t(Q.namedBindings):Un(Q.namedBindings.elements,m)));break;case 226:gf(v)!==0&&t(v);default:Ht(v,m)}}}},rv=class{constructor(e,t,a){this.fileName=e,this.text=t,this.skipTrivia=a||(o=>o)}getLineAndCharacterOfPosition(e){return Vm(this,e)}};function iv(){return{getNodeConstructor:()=>Yf,getTokenConstructor:()=>yh,getIdentifierConstructor:()=>gh,getPrivateIdentifierConstructor:()=>bh,getSourceFileConstructor:()=>nv,getSymbolConstructor:()=>Z6,getTypeConstructor:()=>ev,getSignatureConstructor:()=>tv,getSourceMapSourceConstructor:()=>rv}}var av=["getSemanticDiagnostics","getSuggestionDiagnostics","getCompilerOptionsDiagnostics","getSemanticClassifications","getEncodedSemanticClassifications","getCodeFixesAtPosition","getCombinedCodeFix","applyCodeActionCommand","organizeImports","getEditsForFileRename","getEmitOutput","getApplicableRefactors","getEditsForRefactor","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","provideInlayHints","getSupportedCodeFixes","getPasteEdits"],w3=[...av,"getCompletionsAtPosition","getCompletionEntryDetails","getCompletionEntrySymbol","getSignatureHelpItems","getQuickInfoAtPosition","getDefinitionAtPosition","getDefinitionAndBoundSpan","getImplementationAtPosition","getTypeDefinitionAtPosition","getReferencesAtPosition","findReferences","getDocumentHighlights","getNavigateToItems","getRenameInfo","findRenameLocations","getApplicableRefactors","preparePasteEditsForFile"];lb(iv());var Ol=new Proxy({},{get:()=>!0});var Sh=Ol["4.8"];function er(e,t=!1){var a;if(e!=null){if(Sh){if(t||Il(e)){let o=e1(e);return o?[...o]:void 0}return}return(a=e.modifiers)==null?void 0:a.filter(o=>!Al(o))}}function na(e,t=!1){var a;if(e!=null){if(Sh){if(t||Gf(e)){let o=pf(e);return o?[...o]:void 0}return}return(a=e.decorators)==null?void 0:a.filter(Al)}}var kh={};var Ml=new Proxy({},{get:(e,t)=>t});var Eh=Ml,Ah=Ml;var C=Eh,Rt=Ah;var Ch=Ol["5.0"],ue=Ie,ov=new Set([ue.AmpersandAmpersandToken,ue.BarBarToken,ue.QuestionQuestionToken]),cv=new Set([Ie.AmpersandAmpersandEqualsToken,Ie.AmpersandEqualsToken,Ie.AsteriskAsteriskEqualsToken,Ie.AsteriskEqualsToken,Ie.BarBarEqualsToken,Ie.BarEqualsToken,Ie.CaretEqualsToken,Ie.EqualsToken,Ie.GreaterThanGreaterThanEqualsToken,Ie.GreaterThanGreaterThanGreaterThanEqualsToken,Ie.LessThanLessThanEqualsToken,Ie.MinusEqualsToken,Ie.PercentEqualsToken,Ie.PlusEqualsToken,Ie.QuestionQuestionEqualsToken,Ie.SlashEqualsToken]),lv=new Set([ue.AmpersandAmpersandToken,ue.AmpersandToken,ue.AsteriskAsteriskToken,ue.AsteriskToken,ue.BarBarToken,ue.BarToken,ue.CaretToken,ue.EqualsEqualsEqualsToken,ue.EqualsEqualsToken,ue.ExclamationEqualsEqualsToken,ue.ExclamationEqualsToken,ue.GreaterThanEqualsToken,ue.GreaterThanGreaterThanGreaterThanToken,ue.GreaterThanGreaterThanToken,ue.GreaterThanToken,ue.InKeyword,ue.InstanceOfKeyword,ue.LessThanEqualsToken,ue.LessThanLessThanToken,ue.LessThanToken,ue.MinusToken,ue.PercentToken,ue.PlusToken,ue.SlashToken]);function uv(e){return cv.has(e.kind)}function pv(e){return ov.has(e.kind)}function fv(e){return lv.has(e.kind)}function $r(e){return it(e)}function Dh(e){return e.kind!==ue.SemicolonClassElement}function Xe(e,t){let a=er(t);return(a==null?void 0:a.some(o=>o.kind===e))===!0}function Ph(e){let t=er(e);return t==null?null:t[t.length-1]??null}function Nh(e){return e.kind===ue.CommaToken}function dv(e){return e.kind===ue.SingleLineCommentTrivia||e.kind===ue.MultiLineCommentTrivia}function mv(e){return e.kind===ue.JSDocComment}function Ih(e){if(uv(e))return{type:C.AssignmentExpression,operator:$r(e.kind)};if(pv(e))return{type:C.LogicalExpression,operator:$r(e.kind)};if(fv(e))return{type:C.BinaryExpression,operator:$r(e.kind)};throw new Error(`Unexpected binary operator ${it(e.kind)}`)}function Ts(e,t){let a=t.getLineAndCharacterOfPosition(e);return{column:a.character,line:a.line+1}}function Qr(e,t){let[a,o]=e.map(m=>Ts(m,t));return{end:o,start:a}}function Oh(e){if(e.kind===Ie.Block)switch(e.parent.kind){case Ie.Constructor:case Ie.GetAccessor:case Ie.SetAccessor:case Ie.ArrowFunction:case Ie.FunctionExpression:case Ie.FunctionDeclaration:case Ie.MethodDeclaration:return!0;default:return!1}return!0}function $a(e,t){return[e.getStart(t),e.getEnd()]}function hv(e){return e.kind>=ue.FirstToken&&e.kind<=ue.LastToken}function Mh(e){return e.kind>=ue.JsxElement&&e.kind<=ue.JsxAttribute}function Jl(e){return e.flags&on.Let?"let":(e.flags&on.AwaitUsing)===on.AwaitUsing?"await using":e.flags&on.Const?"const":e.flags&on.Using?"using":"var"}function xi(e){let t=er(e);if(t!=null)for(let a of t)switch(a.kind){case ue.PublicKeyword:return"public";case ue.ProtectedKeyword:return"protected";case ue.PrivateKeyword:return"private";default:break}}function ra(e,t,a){return o(t);function o(m){return i1(m)&&m.pos===e.end?m:xv(m.getChildren(a),v=>(v.pos<=e.pos&&v.end>e.end||v.pos===e.end)&&Tv(v,a)?o(v):void 0)}}function yv(e,t){let a=e;for(;a;){if(t(a))return a;a=a.parent}}function gv(e){return!!yv(e,Mh)}function Kf(e){return Sr(!1,e,/&(?:#\d+|#x[\da-fA-F]+|[0-9a-zA-Z]+);/g,t=>{let a=t.slice(1,-1);if(a[0]==="#"){let o=a[1]==="x"?parseInt(a.slice(2),16):parseInt(a.slice(1),10);return o>1114111?t:String.fromCodePoint(o)}return kh[a]||t})}function ia(e){return e.kind===ue.ComputedPropertyName}function Zf(e){return!!e.questionToken}function ed(e){return e.type===C.ChainExpression}function Jh(e,t){return ed(t)&&e.expression.kind!==Ie.ParenthesizedExpression}function bv(e){let t;if(Ch&&e.kind===ue.Identifier?t=wl(e):"originalKeywordKind"in e&&(t=e.originalKeywordKind),t)return t===ue.NullKeyword?Rt.Null:t>=ue.FirstFutureReservedWord&&t<=ue.LastKeyword?Rt.Identifier:Rt.Keyword;if(e.kind>=ue.FirstKeyword&&e.kind<=ue.LastFutureReservedWord)return e.kind===ue.FalseKeyword||e.kind===ue.TrueKeyword?Rt.Boolean:Rt.Keyword;if(e.kind>=ue.FirstPunctuation&&e.kind<=ue.LastPunctuation)return Rt.Punctuator;if(e.kind>=ue.NoSubstitutionTemplateLiteral&&e.kind<=ue.TemplateTail)return Rt.Template;switch(e.kind){case ue.NumericLiteral:return Rt.Numeric;case ue.JsxText:return Rt.JSXText;case ue.StringLiteral:return e.parent.kind===ue.JsxAttribute||e.parent.kind===ue.JsxElement?Rt.JSXText:Rt.String;case ue.RegularExpressionLiteral:return Rt.RegularExpression;case ue.Identifier:case ue.ConstructorKeyword:case ue.GetKeyword:case ue.SetKeyword:default:}if(e.kind===ue.Identifier){if(Mh(e.parent))return Rt.JSXIdentifier;if(e.parent.kind===ue.PropertyAccessExpression&&gv(e))return Rt.JSXIdentifier}return Rt.Identifier}function vv(e,t){let a=e.kind===ue.JsxText?e.getFullStart():e.getStart(t),o=e.getEnd(),m=t.text.slice(a,o),v=bv(e),A=[a,o],P=Qr(A,t);return v===Rt.RegularExpression?{type:v,loc:P,range:A,regex:{flags:m.slice(m.lastIndexOf("/")+1),pattern:m.slice(1,m.lastIndexOf("/"))},value:m}:{type:v,loc:P,range:A,value:m}}function Lh(e){let t=[];function a(o){dv(o)||mv(o)||(hv(o)&&o.kind!==ue.EndOfFileToken?t.push(vv(o,e)):o.getChildren(e).forEach(a))}return a(e),t}var Qf=class extends Error{fileName;location;constructor(t,a,o){super(t),this.fileName=a,this.location=o,Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:new.target.name})}get index(){return this.location.start.offset}get lineNumber(){return this.location.start.line}get column(){return this.location.start.column}};function td(e,t,a,o=a){let[m,v]=[a,o].map(A=>{let{character:P,line:l}=t.getLineAndCharacterOfPosition(A);return{column:P,line:l+1,offset:A}});return new Qf(e,t.fileName,{end:v,start:m})}function jh(e){var t;return!!("illegalDecorators"in e&&((t=e.illegalDecorators)!=null&&t.length))}function Tv(e,t){return e.kind===ue.EndOfFileToken?!!e.jsDoc:e.getWidth(t)!==0}function xv(e,t){if(e!==void 0)for(let a=0;a=0&&e.kind!==ue.EndOfFileToken}function nd(e){return!wv(e)}function Bh(e){return lf(e.parent,hf)}function kv(e){return Xe(ue.AbstractKeyword,e)}function Ev(e){if(e.parameters.length&&!Nl(e)){let t=e.parameters[0];if(Av(t))return t}return null}function Av(e){return Rh(e.name)}function qh(e){switch(e.kind){case ue.ClassDeclaration:return!0;case ue.ClassExpression:return!0;case ue.PropertyDeclaration:{let{parent:t}=e;return!!(Wa(t)||vi(t)&&!kv(e))}case ue.GetAccessor:case ue.SetAccessor:case ue.MethodDeclaration:{let{parent:t}=e;return!!e.body&&(Wa(t)||vi(t))}case ue.Parameter:{let{parent:t}=e,a=t.parent;return!!t&&"body"in t&&!!t.body&&(t.kind===ue.Constructor||t.kind===ue.MethodDeclaration||t.kind===ue.SetAccessor)&&Ev(t)!==e&&!!a&&a.kind===ue.ClassDeclaration}}return!1}function Ll(e){switch(e.kind){case ue.Identifier:return!0;case ue.PropertyAccessExpression:case ue.ElementAccessExpression:return!(e.flags&on.OptionalChain);case ue.ParenthesizedExpression:case ue.TypeAssertionExpression:case ue.AsExpression:case ue.SatisfiesExpression:case ue.ExpressionWithTypeArguments:case ue.NonNullExpression:return Ll(e.expression);default:return!1}}function zh(e){let t=er(e),a=e;for(;(!t||t.length===0)&&Ti(a.parent);){let o=er(a.parent);o!=null&&o.length&&(t=o),a=a.parent}return t}var T=Ie;function _d(e){return td("message"in e&&e.message||e.messageText,e.file,e.start)}var me,id,Fh,Be,Vt,Qa,ad,jl=class{constructor(t,a){gp(this,me);qi(this,"allowPattern",!1);qi(this,"ast");qi(this,"esTreeNodeToTSNodeMap",new WeakMap);qi(this,"options");qi(this,"tsNodeToESTreeNodeMap",new WeakMap);this.ast=t,this.options={...a}}assertModuleSpecifier(t,a){var o;!a&&t.moduleSpecifier==null&&ge(this,me,Vt).call(this,t,"Module specifier must be a string literal."),t.moduleSpecifier&&((o=t.moduleSpecifier)==null?void 0:o.kind)!==T.StringLiteral&&ge(this,me,Vt).call(this,t.moduleSpecifier,"Module specifier must be a string literal.")}convertBindingNameWithTypeAnnotation(t,a,o){let m=this.convertPattern(t);return a&&(m.typeAnnotation=this.convertTypeAnnotation(a,o),this.fixParentLocation(m,m.typeAnnotation.range)),m}convertBodyExpressions(t,a){let o=Oh(a);return t.map(m=>{let v=this.convertChild(m);if(o){if(v!=null&&v.expression&&Dl(m)&&Ya(m.expression)){let A=v.expression.raw;return v.directive=A.slice(1,-1),v}o=!1}return v}).filter(m=>m)}convertChainExpression(t,a){let{child:o,isOptional:m}=t.type===C.MemberExpression?{child:t.object,isOptional:t.optional}:t.type===C.CallExpression?{child:t.callee,isOptional:t.optional}:{child:t.expression,isOptional:!1},v=Jh(a,o);if(!v&&!m)return t;if(v&&ed(o)){let A=o.expression;t.type===C.MemberExpression?t.object=A:t.type===C.CallExpression?t.callee=A:t.expression=A}return this.createNode(a,{type:C.ChainExpression,expression:t})}convertChild(t,a){return this.converter(t,a,!1)}convertPattern(t,a){return this.converter(t,a,!0)}convertTypeAnnotation(t,a){let o=(a==null?void 0:a.kind)===T.FunctionType||(a==null?void 0:a.kind)===T.ConstructorType?2:1,v=[t.getFullStart()-o,t.end],A=Qr(v,this.ast);return{type:C.TSTypeAnnotation,loc:A,range:v,typeAnnotation:this.convertChild(t)}}convertTypeArgumentsToTypeParameterInstantiation(t,a){let o=ra(t,this.ast,this.ast);return this.createNode(a,{type:C.TSTypeParameterInstantiation,range:[t.pos-1,o.end],params:t.map(m=>this.convertChild(m))})}convertTSTypeParametersToTypeParametersDeclaration(t){let a=ra(t,this.ast,this.ast),o=[t.pos-1,a.end];return{type:C.TSTypeParameterDeclaration,loc:Qr(o,this.ast),range:o,params:t.map(m=>this.convertChild(m))}}convertParameters(t){return t!=null&&t.length?t.map(a=>{var m;let o=this.convertChild(a);return o.decorators=((m=na(a))==null?void 0:m.map(v=>this.convertChild(v)))??[],o}):[]}converter(t,a,o){if(!t)return null;ge(this,me,Fh).call(this,t);let m=this.allowPattern;o!=null&&(this.allowPattern=o);let v=this.convertNode(t,a??t.parent);return this.registerTSNodeInNodeMap(t,v),this.allowPattern=m,v}convertImportAttributes(t){return t==null?[]:t.elements.map(a=>this.convertChild(a))}convertJSXIdentifier(t){let a=this.createNode(t,{type:C.JSXIdentifier,name:t.getText()});return this.registerTSNodeInNodeMap(t,a),a}convertJSXNamespaceOrIdentifier(t){if(t.kind===Ie.JsxNamespacedName){let m=this.createNode(t,{type:C.JSXNamespacedName,name:this.createNode(t.name,{type:C.JSXIdentifier,name:t.name.text}),namespace:this.createNode(t.namespace,{type:C.JSXIdentifier,name:t.namespace.text})});return this.registerTSNodeInNodeMap(t,m),m}let a=t.getText(),o=a.indexOf(":");if(o>0){let m=$a(t,this.ast),v=this.createNode(t,{type:C.JSXNamespacedName,range:m,name:this.createNode(t,{type:C.JSXIdentifier,range:[m[0]+o+1,m[1]],name:a.slice(o+1)}),namespace:this.createNode(t,{type:C.JSXIdentifier,range:[m[0],m[0]+o],name:a.slice(0,o)})});return this.registerTSNodeInNodeMap(t,v),v}return this.convertJSXIdentifier(t)}convertJSXTagName(t,a){let o;switch(t.kind){case T.PropertyAccessExpression:t.name.kind===T.PrivateIdentifier&&ge(this,me,Be).call(this,t.name,"Non-private identifier expected."),o=this.createNode(t,{type:C.JSXMemberExpression,object:this.convertJSXTagName(t.expression,a),property:this.convertJSXIdentifier(t.name)});break;case T.ThisKeyword:case T.Identifier:default:return this.convertJSXNamespaceOrIdentifier(t)}return this.registerTSNodeInNodeMap(t,o),o}convertMethodSignature(t){return this.createNode(t,{type:C.TSMethodSignature,accessibility:xi(t),computed:ia(t.name),key:this.convertChild(t.name),kind:(()=>{switch(t.kind){case T.GetAccessor:return"get";case T.SetAccessor:return"set";case T.MethodSignature:return"method"}})(),optional:Zf(t),params:this.convertParameters(t.parameters),readonly:Xe(T.ReadonlyKeyword,t),returnType:t.type&&this.convertTypeAnnotation(t.type,t),static:Xe(T.StaticKeyword,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)})}fixParentLocation(t,a){a[0]t.range[1]&&(t.range[1]=a[1],t.loc.end=Ts(t.range[1],this.ast))}convertNode(t,a){var o,m,v,A,P,l,Q,h;switch(t.kind){case T.SourceFile:return this.createNode(t,{type:C.Program,range:[t.getStart(this.ast),t.endOfFileToken.end],body:this.convertBodyExpressions(t.statements,t),comments:void 0,sourceType:t.externalModuleIndicator?"module":"script",tokens:void 0});case T.Block:return this.createNode(t,{type:C.BlockStatement,body:this.convertBodyExpressions(t.statements,t)});case T.Identifier:return Uh(t)?this.createNode(t,{type:C.ThisExpression}):this.createNode(t,{type:C.Identifier,decorators:[],name:t.text,optional:!1,typeAnnotation:void 0});case T.PrivateIdentifier:return this.createNode(t,{type:C.PrivateIdentifier,name:t.text.slice(1)});case T.WithStatement:return this.createNode(t,{type:C.WithStatement,body:this.convertChild(t.statement),object:this.convertChild(t.expression)});case T.ReturnStatement:return this.createNode(t,{type:C.ReturnStatement,argument:this.convertChild(t.expression)});case T.LabeledStatement:return this.createNode(t,{type:C.LabeledStatement,body:this.convertChild(t.statement),label:this.convertChild(t.label)});case T.ContinueStatement:return this.createNode(t,{type:C.ContinueStatement,label:this.convertChild(t.label)});case T.BreakStatement:return this.createNode(t,{type:C.BreakStatement,label:this.convertChild(t.label)});case T.IfStatement:return this.createNode(t,{type:C.IfStatement,alternate:this.convertChild(t.elseStatement),consequent:this.convertChild(t.thenStatement),test:this.convertChild(t.expression)});case T.SwitchStatement:return t.caseBlock.clauses.filter(y=>y.kind===T.DefaultClause).length>1&&ge(this,me,Be).call(this,t,"A 'default' clause cannot appear more than once in a 'switch' statement."),this.createNode(t,{type:C.SwitchStatement,cases:t.caseBlock.clauses.map(y=>this.convertChild(y)),discriminant:this.convertChild(t.expression)});case T.CaseClause:case T.DefaultClause:return this.createNode(t,{type:C.SwitchCase,consequent:t.statements.map(y=>this.convertChild(y)),test:t.kind===T.CaseClause?this.convertChild(t.expression):null});case T.ThrowStatement:return t.expression.end===t.expression.pos&&ge(this,me,Vt).call(this,t,"A throw statement must throw an expression."),this.createNode(t,{type:C.ThrowStatement,argument:this.convertChild(t.expression)});case T.TryStatement:return this.createNode(t,{type:C.TryStatement,block:this.convertChild(t.tryBlock),finalizer:this.convertChild(t.finallyBlock),handler:this.convertChild(t.catchClause)});case T.CatchClause:return(o=t.variableDeclaration)!=null&&o.initializer&&ge(this,me,Be).call(this,t.variableDeclaration.initializer,"Catch clause variable cannot have an initializer."),this.createNode(t,{type:C.CatchClause,body:this.convertChild(t.block),param:t.variableDeclaration?this.convertBindingNameWithTypeAnnotation(t.variableDeclaration.name,t.variableDeclaration.type):null});case T.WhileStatement:return this.createNode(t,{type:C.WhileStatement,body:this.convertChild(t.statement),test:this.convertChild(t.expression)});case T.DoStatement:return this.createNode(t,{type:C.DoWhileStatement,body:this.convertChild(t.statement),test:this.convertChild(t.expression)});case T.ForStatement:return this.createNode(t,{type:C.ForStatement,body:this.convertChild(t.statement),init:this.convertChild(t.initializer),test:this.convertChild(t.condition),update:this.convertChild(t.incrementor)});case T.ForInStatement:return ge(this,me,id).call(this,t.initializer,t.kind),this.createNode(t,{type:C.ForInStatement,body:this.convertChild(t.statement),left:this.convertPattern(t.initializer),right:this.convertChild(t.expression)});case T.ForOfStatement:return ge(this,me,id).call(this,t.initializer,t.kind),this.createNode(t,{type:C.ForOfStatement,await:!!(t.awaitModifier&&t.awaitModifier.kind===T.AwaitKeyword),body:this.convertChild(t.statement),left:this.convertPattern(t.initializer),right:this.convertChild(t.expression)});case T.FunctionDeclaration:{let y=Xe(T.DeclareKeyword,t),g=Xe(T.AsyncKeyword,t),x=!!t.asteriskToken;y?t.body?ge(this,me,Be).call(this,t,"An implementation cannot be declared in ambient contexts."):g?ge(this,me,Be).call(this,t,"'async' modifier cannot be used in an ambient context."):x&&ge(this,me,Be).call(this,t,"Generators are not allowed in an ambient context."):!t.body&&x&&ge(this,me,Be).call(this,t,"A function signature cannot be declared as a generator.");let I=this.createNode(t,{type:t.body?C.FunctionDeclaration:C.TSDeclareFunction,async:g,body:this.convertChild(t.body)||void 0,declare:y,expression:!1,generator:x,id:this.convertChild(t.name),params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});return this.fixExports(t,I)}case T.VariableDeclaration:{let y=!!t.exclamationToken,g=this.convertChild(t.initializer),x=this.convertBindingNameWithTypeAnnotation(t.name,t.type,t);return y&&(g?ge(this,me,Be).call(this,t,"Declarations with initializers cannot also have definite assignment assertions."):(x.type!==C.Identifier||!x.typeAnnotation)&&ge(this,me,Be).call(this,t,"Declarations with definite assignment assertions must also have type annotations.")),this.createNode(t,{type:C.VariableDeclarator,definite:y,id:x,init:g})}case T.VariableStatement:{let y=this.createNode(t,{type:C.VariableDeclaration,declarations:t.declarationList.declarations.map(g=>this.convertChild(g)),declare:Xe(T.DeclareKeyword,t),kind:Jl(t.declarationList)});return y.declarations.length||ge(this,me,Vt).call(this,t,"A variable declaration list must have at least one variable declarator."),(y.kind==="using"||y.kind==="await using")&&t.declarationList.declarations.forEach((g,x)=>{y.declarations[x].init==null&&ge(this,me,Be).call(this,g,`'${y.kind}' declarations must be initialized.`),y.declarations[x].id.type!==C.Identifier&&ge(this,me,Be).call(this,g.name,`'${y.kind}' declarations may not have binding patterns.`)}),(y.declare||["await using","const","using"].includes(y.kind))&&t.declarationList.declarations.forEach((g,x)=>{y.declarations[x].definite&&ge(this,me,Be).call(this,g,"A definite assignment assertion '!' is not permitted in this context.")}),y.declare&&t.declarationList.declarations.forEach((g,x)=>{y.declarations[x].init&&(["let","var"].includes(y.kind)||y.declarations[x].id.typeAnnotation)&&ge(this,me,Be).call(this,g,"Initializers are not permitted in ambient contexts.")}),this.fixExports(t,y)}case T.VariableDeclarationList:{let y=this.createNode(t,{type:C.VariableDeclaration,declarations:t.declarations.map(g=>this.convertChild(g)),declare:!1,kind:Jl(t)});return(y.kind==="using"||y.kind==="await using")&&t.declarations.forEach((g,x)=>{y.declarations[x].init!=null&&ge(this,me,Be).call(this,g,`'${y.kind}' declarations may not be initialized in for statement.`),y.declarations[x].id.type!==C.Identifier&&ge(this,me,Be).call(this,g.name,`'${y.kind}' declarations may not have binding patterns.`)}),y}case T.ExpressionStatement:return this.createNode(t,{type:C.ExpressionStatement,directive:void 0,expression:this.convertChild(t.expression)});case T.ThisKeyword:return this.createNode(t,{type:C.ThisExpression});case T.ArrayLiteralExpression:return this.allowPattern?this.createNode(t,{type:C.ArrayPattern,decorators:[],elements:t.elements.map(y=>this.convertPattern(y)),optional:!1,typeAnnotation:void 0}):this.createNode(t,{type:C.ArrayExpression,elements:t.elements.map(y=>this.convertChild(y))});case T.ObjectLiteralExpression:{if(this.allowPattern)return this.createNode(t,{type:C.ObjectPattern,decorators:[],optional:!1,properties:t.properties.map(g=>this.convertPattern(g)),typeAnnotation:void 0});let y=[];for(let g of t.properties)(g.kind===T.GetAccessor||g.kind===T.SetAccessor||g.kind===T.MethodDeclaration)&&!g.body&&ge(this,me,Vt).call(this,g.end-1,"'{' expected."),y.push(this.convertChild(g));return this.createNode(t,{type:C.ObjectExpression,properties:y})}case T.PropertyAssignment:{let{exclamationToken:y,questionToken:g}=t;return g&&ge(this,me,Be).call(this,g,"A property assignment cannot have a question token."),y&&ge(this,me,Be).call(this,y,"A property assignment cannot have an exclamation token."),this.createNode(t,{type:C.Property,computed:ia(t.name),key:this.convertChild(t.name),kind:"init",method:!1,optional:!1,shorthand:!1,value:this.converter(t.initializer,t,this.allowPattern)})}case T.ShorthandPropertyAssignment:{let{exclamationToken:y,modifiers:g,questionToken:x}=t;return g&&ge(this,me,Be).call(this,g[0],"A shorthand property assignment cannot have modifiers."),x&&ge(this,me,Be).call(this,x,"A shorthand property assignment cannot have a question token."),y&&ge(this,me,Be).call(this,y,"A shorthand property assignment cannot have an exclamation token."),t.objectAssignmentInitializer?this.createNode(t,{type:C.Property,computed:!1,key:this.convertChild(t.name),kind:"init",method:!1,optional:!1,shorthand:!0,value:this.createNode(t,{type:C.AssignmentPattern,decorators:[],left:this.convertPattern(t.name),optional:!1,right:this.convertChild(t.objectAssignmentInitializer),typeAnnotation:void 0})}):this.createNode(t,{type:C.Property,computed:!1,key:this.convertChild(t.name),kind:"init",method:!1,optional:!1,shorthand:!0,value:this.convertChild(t.name)})}case T.ComputedPropertyName:return this.convertChild(t.expression);case T.PropertyDeclaration:{let y=Xe(T.AbstractKeyword,t);y&&t.initializer&&ge(this,me,Be).call(this,t.initializer,"Abstract property cannot have an initializer.");let g=Xe(T.AccessorKeyword,t),x=g?y?C.TSAbstractAccessorProperty:C.AccessorProperty:y?C.TSAbstractPropertyDefinition:C.PropertyDefinition,I=this.convertChild(t.name);return this.createNode(t,{type:x,accessibility:xi(t),computed:ia(t.name),declare:Xe(T.DeclareKeyword,t),decorators:((m=na(t))==null?void 0:m.map(re=>this.convertChild(re)))??[],definite:!!t.exclamationToken,key:I,optional:(I.type===C.Literal||t.name.kind===T.Identifier||t.name.kind===T.ComputedPropertyName||t.name.kind===T.PrivateIdentifier)&&!!t.questionToken,override:Xe(T.OverrideKeyword,t),readonly:Xe(T.ReadonlyKeyword,t),static:Xe(T.StaticKeyword,t),typeAnnotation:t.type&&this.convertTypeAnnotation(t.type,t),value:y?null:this.convertChild(t.initializer)})}case T.GetAccessor:case T.SetAccessor:if(t.parent.kind===T.InterfaceDeclaration||t.parent.kind===T.TypeLiteral)return this.convertMethodSignature(t);case T.MethodDeclaration:{let y=this.createNode(t,{type:t.body?C.FunctionExpression:C.TSEmptyBodyFunctionExpression,range:[t.parameters.pos-1,t.end],async:Xe(T.AsyncKeyword,t),body:this.convertChild(t.body),declare:!1,expression:!1,generator:!!t.asteriskToken,id:null,params:[],returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});y.typeParameters&&this.fixParentLocation(y,y.typeParameters.range);let g;if(a.kind===T.ObjectLiteralExpression)y.params=t.parameters.map(x=>this.convertChild(x)),g=this.createNode(t,{type:C.Property,computed:ia(t.name),key:this.convertChild(t.name),kind:"init",method:t.kind===T.MethodDeclaration,optional:!!t.questionToken,shorthand:!1,value:y});else{y.params=this.convertParameters(t.parameters);let x=Xe(T.AbstractKeyword,t)?C.TSAbstractMethodDefinition:C.MethodDefinition;g=this.createNode(t,{type:x,accessibility:xi(t),computed:ia(t.name),decorators:((v=na(t))==null?void 0:v.map(I=>this.convertChild(I)))??[],key:this.convertChild(t.name),kind:"method",optional:!!t.questionToken,override:Xe(T.OverrideKeyword,t),static:Xe(T.StaticKeyword,t),value:y})}return t.kind===T.GetAccessor?g.kind="get":t.kind===T.SetAccessor?g.kind="set":!g.static&&t.name.kind===T.StringLiteral&&t.name.text==="constructor"&&g.type!==C.Property&&(g.kind="constructor"),g}case T.Constructor:{let y=Ph(t),g=(y&&ra(y,t,this.ast))??t.getFirstToken(),x=this.createNode(t,{type:t.body?C.FunctionExpression:C.TSEmptyBodyFunctionExpression,range:[t.parameters.pos-1,t.end],async:!1,body:this.convertChild(t.body),declare:!1,expression:!1,generator:!1,id:null,params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});x.typeParameters&&this.fixParentLocation(x,x.typeParameters.range);let I=this.createNode(t,{type:C.Identifier,range:[g.getStart(this.ast),g.end],decorators:[],name:"constructor",optional:!1,typeAnnotation:void 0}),re=Xe(T.StaticKeyword,t);return this.createNode(t,{type:Xe(T.AbstractKeyword,t)?C.TSAbstractMethodDefinition:C.MethodDefinition,accessibility:xi(t),computed:!1,decorators:[],key:I,kind:re?"method":"constructor",optional:!1,override:!1,static:re,value:x})}case T.FunctionExpression:return this.createNode(t,{type:C.FunctionExpression,async:Xe(T.AsyncKeyword,t),body:this.convertChild(t.body),declare:!1,expression:!1,generator:!!t.asteriskToken,id:this.convertChild(t.name),params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});case T.SuperKeyword:return this.createNode(t,{type:C.Super});case T.ArrayBindingPattern:return this.createNode(t,{type:C.ArrayPattern,decorators:[],elements:t.elements.map(y=>this.convertPattern(y)),optional:!1,typeAnnotation:void 0});case T.OmittedExpression:return null;case T.ObjectBindingPattern:return this.createNode(t,{type:C.ObjectPattern,decorators:[],optional:!1,properties:t.elements.map(y=>this.convertPattern(y)),typeAnnotation:void 0});case T.BindingElement:{if(a.kind===T.ArrayBindingPattern){let g=this.convertChild(t.name,a);return t.initializer?this.createNode(t,{type:C.AssignmentPattern,decorators:[],left:g,optional:!1,right:this.convertChild(t.initializer),typeAnnotation:void 0}):t.dotDotDotToken?this.createNode(t,{type:C.RestElement,argument:g,decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):g}let y;return t.dotDotDotToken?y=this.createNode(t,{type:C.RestElement,argument:this.convertChild(t.propertyName??t.name),decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):y=this.createNode(t,{type:C.Property,computed:!!(t.propertyName&&t.propertyName.kind===T.ComputedPropertyName),key:this.convertChild(t.propertyName??t.name),kind:"init",method:!1,optional:!1,shorthand:!t.propertyName,value:this.convertChild(t.name)}),t.initializer&&(y.value=this.createNode(t,{type:C.AssignmentPattern,range:[t.name.getStart(this.ast),t.initializer.end],decorators:[],left:this.convertChild(t.name),optional:!1,right:this.convertChild(t.initializer),typeAnnotation:void 0})),y}case T.ArrowFunction:return this.createNode(t,{type:C.ArrowFunctionExpression,async:Xe(T.AsyncKeyword,t),body:this.convertChild(t.body),expression:t.body.kind!==T.Block,generator:!1,id:null,params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});case T.YieldExpression:return this.createNode(t,{type:C.YieldExpression,argument:this.convertChild(t.expression),delegate:!!t.asteriskToken});case T.AwaitExpression:return this.createNode(t,{type:C.AwaitExpression,argument:this.convertChild(t.expression)});case T.NoSubstitutionTemplateLiteral:return this.createNode(t,{type:C.TemplateLiteral,expressions:[],quasis:[this.createNode(t,{type:C.TemplateElement,tail:!0,value:{cooked:t.text,raw:this.ast.text.slice(t.getStart(this.ast)+1,t.end-1)}})]});case T.TemplateExpression:{let y=this.createNode(t,{type:C.TemplateLiteral,expressions:[],quasis:[this.convertChild(t.head)]});return t.templateSpans.forEach(g=>{y.expressions.push(this.convertChild(g.expression)),y.quasis.push(this.convertChild(g.literal))}),y}case T.TaggedTemplateExpression:return this.createNode(t,{type:C.TaggedTemplateExpression,quasi:this.convertChild(t.template),tag:this.convertChild(t.tag),typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t)});case T.TemplateHead:case T.TemplateMiddle:case T.TemplateTail:{let y=t.kind===T.TemplateTail;return this.createNode(t,{type:C.TemplateElement,tail:y,value:{cooked:t.text,raw:this.ast.text.slice(t.getStart(this.ast)+1,t.end-(y?1:2))}})}case T.SpreadAssignment:case T.SpreadElement:return this.allowPattern?this.createNode(t,{type:C.RestElement,argument:this.convertPattern(t.expression),decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):this.createNode(t,{type:C.SpreadElement,argument:this.convertChild(t.expression)});case T.Parameter:{let y,g;return t.dotDotDotToken?y=g=this.createNode(t,{type:C.RestElement,argument:this.convertChild(t.name),decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):t.initializer?(y=this.convertChild(t.name),g=this.createNode(t,{type:C.AssignmentPattern,decorators:[],left:y,optional:!1,right:this.convertChild(t.initializer),typeAnnotation:void 0}),er(t)&&(g.range[0]=y.range[0],g.loc=Qr(g.range,this.ast))):y=g=this.convertChild(t.name,a),t.type&&(y.typeAnnotation=this.convertTypeAnnotation(t.type,t),this.fixParentLocation(y,y.typeAnnotation.range)),t.questionToken&&(t.questionToken.end>y.range[1]&&(y.range[1]=t.questionToken.end,y.loc.end=Ts(y.range[1],this.ast)),y.optional=!0),er(t)?this.createNode(t,{type:C.TSParameterProperty,accessibility:xi(t),decorators:[],override:Xe(T.OverrideKeyword,t),parameter:g,readonly:Xe(T.ReadonlyKeyword,t),static:Xe(T.StaticKeyword,t)}):g}case T.ClassDeclaration:!t.name&&(!Xe(Ie.ExportKeyword,t)||!Xe(Ie.DefaultKeyword,t))&&ge(this,me,Vt).call(this,t,"A class declaration without the 'default' modifier must have a name.");case T.ClassExpression:{let y=t.heritageClauses??[],g=t.kind===T.ClassDeclaration?C.ClassDeclaration:C.ClassExpression,x,I;for(let he of y){let{token:ye,types:de}=he;de.length===0&&ge(this,me,Vt).call(this,he,`'${it(ye)}' list cannot be empty.`),ye===T.ExtendsKeyword?(x&&ge(this,me,Vt).call(this,he,"'extends' clause already seen."),I&&ge(this,me,Vt).call(this,he,"'extends' clause must precede 'implements' clause."),de.length>1&&ge(this,me,Vt).call(this,de[1],"Classes can only extend a single class."),x??(x=he)):ye===T.ImplementsKeyword&&(I&&ge(this,me,Vt).call(this,he,"'implements' clause already seen."),I??(I=he))}let re=this.createNode(t,{type:g,abstract:Xe(T.AbstractKeyword,t),body:this.createNode(t,{type:C.ClassBody,range:[t.members.pos-1,t.end],body:t.members.filter(Dh).map(he=>this.convertChild(he))}),declare:Xe(T.DeclareKeyword,t),decorators:((A=na(t))==null?void 0:A.map(he=>this.convertChild(he)))??[],id:this.convertChild(t.name),implements:(I==null?void 0:I.types.map(he=>this.convertChild(he)))??[],superClass:x!=null&&x.types[0]?this.convertChild(x.types[0].expression):null,superTypeArguments:void 0,typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});return(P=x==null?void 0:x.types[0])!=null&&P.typeArguments&&(re.superTypeArguments=this.convertTypeArgumentsToTypeParameterInstantiation(x.types[0].typeArguments,x.types[0])),this.fixExports(t,re)}case T.ModuleBlock:return this.createNode(t,{type:C.TSModuleBlock,body:this.convertBodyExpressions(t.statements,t)});case T.ImportDeclaration:{this.assertModuleSpecifier(t,!1);let y=this.createNode(t,ge(this,me,Qa).call(this,{type:C.ImportDeclaration,attributes:this.convertImportAttributes(t.attributes??t.assertClause),importKind:"value",source:this.convertChild(t.moduleSpecifier),specifiers:[]},"assertions","attributes",!0));if(t.importClause&&(t.importClause.isTypeOnly&&(y.importKind="type"),t.importClause.name&&y.specifiers.push(this.convertChild(t.importClause)),t.importClause.namedBindings))switch(t.importClause.namedBindings.kind){case T.NamespaceImport:y.specifiers.push(this.convertChild(t.importClause.namedBindings));break;case T.NamedImports:y.specifiers.push(...t.importClause.namedBindings.elements.map(g=>this.convertChild(g)));break}return y}case T.NamespaceImport:return this.createNode(t,{type:C.ImportNamespaceSpecifier,local:this.convertChild(t.name)});case T.ImportSpecifier:return this.createNode(t,{type:C.ImportSpecifier,imported:this.convertChild(t.propertyName??t.name),importKind:t.isTypeOnly?"type":"value",local:this.convertChild(t.name)});case T.ImportClause:{let y=this.convertChild(t.name);return this.createNode(t,{type:C.ImportDefaultSpecifier,range:y.range,local:y})}case T.ExportDeclaration:return((l=t.exportClause)==null?void 0:l.kind)===T.NamedExports?(this.assertModuleSpecifier(t,!0),this.createNode(t,ge(this,me,Qa).call(this,{type:C.ExportNamedDeclaration,attributes:this.convertImportAttributes(t.attributes??t.assertClause),declaration:null,exportKind:t.isTypeOnly?"type":"value",source:this.convertChild(t.moduleSpecifier),specifiers:t.exportClause.elements.map(y=>this.convertChild(y,t))},"assertions","attributes",!0))):(this.assertModuleSpecifier(t,!1),this.createNode(t,ge(this,me,Qa).call(this,{type:C.ExportAllDeclaration,attributes:this.convertImportAttributes(t.attributes??t.assertClause),exported:((Q=t.exportClause)==null?void 0:Q.kind)===T.NamespaceExport?this.convertChild(t.exportClause.name):null,exportKind:t.isTypeOnly?"type":"value",source:this.convertChild(t.moduleSpecifier)},"assertions","attributes",!0)));case T.ExportSpecifier:{let y=t.propertyName??t.name;return y.kind===T.StringLiteral&&a.kind===T.ExportDeclaration&&((h=a.moduleSpecifier)==null?void 0:h.kind)!==T.StringLiteral&&ge(this,me,Be).call(this,y,"A string literal cannot be used as a local exported binding without `from`."),this.createNode(t,{type:C.ExportSpecifier,exported:this.convertChild(t.name),exportKind:t.isTypeOnly?"type":"value",local:this.convertChild(y)})}case T.ExportAssignment:return t.isExportEquals?this.createNode(t,{type:C.TSExportAssignment,expression:this.convertChild(t.expression)}):this.createNode(t,{type:C.ExportDefaultDeclaration,declaration:this.convertChild(t.expression),exportKind:"value"});case T.PrefixUnaryExpression:case T.PostfixUnaryExpression:{let y=$r(t.operator);return y==="++"||y==="--"?(Ll(t.operand)||ge(this,me,Vt).call(this,t.operand,"Invalid left-hand side expression in unary operation"),this.createNode(t,{type:C.UpdateExpression,argument:this.convertChild(t.operand),operator:y,prefix:t.kind===T.PrefixUnaryExpression})):this.createNode(t,{type:C.UnaryExpression,argument:this.convertChild(t.operand),operator:y,prefix:t.kind===T.PrefixUnaryExpression})}case T.DeleteExpression:return this.createNode(t,{type:C.UnaryExpression,argument:this.convertChild(t.expression),operator:"delete",prefix:!0});case T.VoidExpression:return this.createNode(t,{type:C.UnaryExpression,argument:this.convertChild(t.expression),operator:"void",prefix:!0});case T.TypeOfExpression:return this.createNode(t,{type:C.UnaryExpression,argument:this.convertChild(t.expression),operator:"typeof",prefix:!0});case T.TypeOperator:return this.createNode(t,{type:C.TSTypeOperator,operator:$r(t.operator),typeAnnotation:this.convertChild(t.type)});case T.BinaryExpression:{if(Nh(t.operatorToken)){let g=this.createNode(t,{type:C.SequenceExpression,expressions:[]}),x=this.convertChild(t.left);return x.type===C.SequenceExpression&&t.left.kind!==T.ParenthesizedExpression?g.expressions.push(...x.expressions):g.expressions.push(x),g.expressions.push(this.convertChild(t.right)),g}let y=Ih(t.operatorToken);return this.allowPattern&&y.type===C.AssignmentExpression?this.createNode(t,{type:C.AssignmentPattern,decorators:[],left:this.convertPattern(t.left,t),optional:!1,right:this.convertChild(t.right),typeAnnotation:void 0}):this.createNode(t,{...y,left:this.converter(t.left,t,y.type===C.AssignmentExpression),right:this.convertChild(t.right)})}case T.PropertyAccessExpression:{let y=this.convertChild(t.expression),g=this.convertChild(t.name),I=this.createNode(t,{type:C.MemberExpression,computed:!1,object:y,optional:t.questionDotToken!=null,property:g});return this.convertChainExpression(I,t)}case T.ElementAccessExpression:{let y=this.convertChild(t.expression),g=this.convertChild(t.argumentExpression),I=this.createNode(t,{type:C.MemberExpression,computed:!0,object:y,optional:t.questionDotToken!=null,property:g});return this.convertChainExpression(I,t)}case T.CallExpression:{if(t.expression.kind===T.ImportKeyword)return t.arguments.length!==1&&t.arguments.length!==2&&ge(this,me,Vt).call(this,t.arguments[2]??t,"Dynamic import requires exactly one or two arguments."),this.createNode(t,ge(this,me,Qa).call(this,{type:C.ImportExpression,options:t.arguments[1]?this.convertChild(t.arguments[1]):null,source:this.convertChild(t.arguments[0])},"attributes","options",!0));let y=this.convertChild(t.expression),g=t.arguments.map(re=>this.convertChild(re)),x=t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t),I=this.createNode(t,{type:C.CallExpression,arguments:g,callee:y,optional:t.questionDotToken!=null,typeArguments:x});return this.convertChainExpression(I,t)}case T.NewExpression:{let y=t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t);return this.createNode(t,{type:C.NewExpression,arguments:t.arguments?t.arguments.map(g=>this.convertChild(g)):[],callee:this.convertChild(t.expression),typeArguments:y})}case T.ConditionalExpression:return this.createNode(t,{type:C.ConditionalExpression,alternate:this.convertChild(t.whenFalse),consequent:this.convertChild(t.whenTrue),test:this.convertChild(t.condition)});case T.MetaProperty:return this.createNode(t,{type:C.MetaProperty,meta:this.createNode(t.getFirstToken(),{type:C.Identifier,decorators:[],name:$r(t.keywordToken),optional:!1,typeAnnotation:void 0}),property:this.convertChild(t.name)});case T.Decorator:return this.createNode(t,{type:C.Decorator,expression:this.convertChild(t.expression)});case T.StringLiteral:return this.createNode(t,{type:C.Literal,raw:t.getText(),value:a.kind===T.JsxAttribute?Kf(t.text):t.text});case T.NumericLiteral:return this.createNode(t,{type:C.Literal,raw:t.getText(),value:Number(t.text)});case T.BigIntLiteral:{let y=$a(t,this.ast),g=this.ast.text.slice(y[0],y[1]),x=Sr(!1,g.slice(0,-1),"_",""),I=typeof BigInt<"u"?BigInt(x):null;return this.createNode(t,{type:C.Literal,range:y,bigint:I==null?x:String(I),raw:g,value:I})}case T.RegularExpressionLiteral:{let y=t.text.slice(1,t.text.lastIndexOf("/")),g=t.text.slice(t.text.lastIndexOf("/")+1),x=null;try{x=new RegExp(y,g)}catch{}return this.createNode(t,{type:C.Literal,raw:t.text,regex:{flags:g,pattern:y},value:x})}case T.TrueKeyword:return this.createNode(t,{type:C.Literal,raw:"true",value:!0});case T.FalseKeyword:return this.createNode(t,{type:C.Literal,raw:"false",value:!1});case T.NullKeyword:return this.createNode(t,{type:C.Literal,raw:"null",value:null});case T.EmptyStatement:return this.createNode(t,{type:C.EmptyStatement});case T.DebuggerStatement:return this.createNode(t,{type:C.DebuggerStatement});case T.JsxElement:return this.createNode(t,{type:C.JSXElement,children:t.children.map(y=>this.convertChild(y)),closingElement:this.convertChild(t.closingElement),openingElement:this.convertChild(t.openingElement)});case T.JsxFragment:return this.createNode(t,{type:C.JSXFragment,children:t.children.map(y=>this.convertChild(y)),closingFragment:this.convertChild(t.closingFragment),openingFragment:this.convertChild(t.openingFragment)});case T.JsxSelfClosingElement:return this.createNode(t,{type:C.JSXElement,children:[],closingElement:null,openingElement:this.createNode(t,{type:C.JSXOpeningElement,range:$a(t,this.ast),attributes:t.attributes.properties.map(y=>this.convertChild(y)),name:this.convertJSXTagName(t.tagName,t),selfClosing:!0,typeArguments:t.typeArguments?this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t):void 0})});case T.JsxOpeningElement:return this.createNode(t,{type:C.JSXOpeningElement,attributes:t.attributes.properties.map(y=>this.convertChild(y)),name:this.convertJSXTagName(t.tagName,t),selfClosing:!1,typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t)});case T.JsxClosingElement:return this.createNode(t,{type:C.JSXClosingElement,name:this.convertJSXTagName(t.tagName,t)});case T.JsxOpeningFragment:return this.createNode(t,{type:C.JSXOpeningFragment});case T.JsxClosingFragment:return this.createNode(t,{type:C.JSXClosingFragment});case T.JsxExpression:{let y=t.expression?this.convertChild(t.expression):this.createNode(t,{type:C.JSXEmptyExpression,range:[t.getStart(this.ast)+1,t.getEnd()-1]});return t.dotDotDotToken?this.createNode(t,{type:C.JSXSpreadChild,expression:y}):this.createNode(t,{type:C.JSXExpressionContainer,expression:y})}case T.JsxAttribute:return this.createNode(t,{type:C.JSXAttribute,name:this.convertJSXNamespaceOrIdentifier(t.name),value:this.convertChild(t.initializer)});case T.JsxText:{let y=t.getFullStart(),g=t.getEnd(),x=this.ast.text.slice(y,g);return this.createNode(t,{type:C.JSXText,range:[y,g],raw:x,value:Kf(x)})}case T.JsxSpreadAttribute:return this.createNode(t,{type:C.JSXSpreadAttribute,argument:this.convertChild(t.expression)});case T.QualifiedName:return this.createNode(t,{type:C.TSQualifiedName,left:this.convertChild(t.left),right:this.convertChild(t.right)});case T.TypeReference:return this.createNode(t,{type:C.TSTypeReference,typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t),typeName:this.convertChild(t.typeName)});case T.TypeParameter:return this.createNode(t,{type:C.TSTypeParameter,const:Xe(T.ConstKeyword,t),constraint:t.constraint&&this.convertChild(t.constraint),default:t.default?this.convertChild(t.default):void 0,in:Xe(T.InKeyword,t),name:this.convertChild(t.name),out:Xe(T.OutKeyword,t)});case T.ThisType:return this.createNode(t,{type:C.TSThisType});case T.AnyKeyword:case T.BigIntKeyword:case T.BooleanKeyword:case T.NeverKeyword:case T.NumberKeyword:case T.ObjectKeyword:case T.StringKeyword:case T.SymbolKeyword:case T.UnknownKeyword:case T.VoidKeyword:case T.UndefinedKeyword:case T.IntrinsicKeyword:return this.createNode(t,{type:C[`TS${T[t.kind]}`]});case T.NonNullExpression:{let y=this.createNode(t,{type:C.TSNonNullExpression,expression:this.convertChild(t.expression)});return this.convertChainExpression(y,t)}case T.TypeLiteral:return this.createNode(t,{type:C.TSTypeLiteral,members:t.members.map(y=>this.convertChild(y))});case T.ArrayType:return this.createNode(t,{type:C.TSArrayType,elementType:this.convertChild(t.elementType)});case T.IndexedAccessType:return this.createNode(t,{type:C.TSIndexedAccessType,indexType:this.convertChild(t.indexType),objectType:this.convertChild(t.objectType)});case T.ConditionalType:return this.createNode(t,{type:C.TSConditionalType,checkType:this.convertChild(t.checkType),extendsType:this.convertChild(t.extendsType),falseType:this.convertChild(t.falseType),trueType:this.convertChild(t.trueType)});case T.TypeQuery:return this.createNode(t,{type:C.TSTypeQuery,exprName:this.convertChild(t.exprName),typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t)});case T.MappedType:return t.members&&t.members.length>0&&ge(this,me,Vt).call(this,t.members[0],"A mapped type may not declare properties or methods."),this.createNode(t,ge(this,me,ad).call(this,{type:C.TSMappedType,constraint:this.convertChild(t.typeParameter.constraint),key:this.convertChild(t.typeParameter.name),nameType:this.convertChild(t.nameType)??null,optional:t.questionToken&&(t.questionToken.kind===T.QuestionToken||$r(t.questionToken.kind)),readonly:t.readonlyToken&&(t.readonlyToken.kind===T.ReadonlyKeyword||$r(t.readonlyToken.kind)),typeAnnotation:t.type&&this.convertChild(t.type)},"typeParameter","'constraint' and 'key'",this.convertChild(t.typeParameter)));case T.ParenthesizedExpression:return this.convertChild(t.expression,a);case T.TypeAliasDeclaration:{let y=this.createNode(t,{type:C.TSTypeAliasDeclaration,declare:Xe(T.DeclareKeyword,t),id:this.convertChild(t.name),typeAnnotation:this.convertChild(t.type),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});return this.fixExports(t,y)}case T.MethodSignature:return this.convertMethodSignature(t);case T.PropertySignature:{let{initializer:y}=t;return y&&ge(this,me,Be).call(this,y,"A property signature cannot have an initializer."),this.createNode(t,{type:C.TSPropertySignature,accessibility:xi(t),computed:ia(t.name),key:this.convertChild(t.name),optional:Zf(t),readonly:Xe(T.ReadonlyKeyword,t),static:Xe(T.StaticKeyword,t),typeAnnotation:t.type&&this.convertTypeAnnotation(t.type,t)})}case T.IndexSignature:return this.createNode(t,{type:C.TSIndexSignature,accessibility:xi(t),parameters:t.parameters.map(y=>this.convertChild(y)),readonly:Xe(T.ReadonlyKeyword,t),static:Xe(T.StaticKeyword,t),typeAnnotation:t.type&&this.convertTypeAnnotation(t.type,t)});case T.ConstructorType:return this.createNode(t,{type:C.TSConstructorType,abstract:Xe(T.AbstractKeyword,t),params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});case T.FunctionType:{let{modifiers:y}=t;y&&ge(this,me,Be).call(this,y[0],"A function type cannot have modifiers.")}case T.ConstructSignature:case T.CallSignature:{let y=t.kind===T.ConstructSignature?C.TSConstructSignatureDeclaration:t.kind===T.CallSignature?C.TSCallSignatureDeclaration:C.TSFunctionType;return this.createNode(t,{type:y,params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)})}case T.ExpressionWithTypeArguments:{let y=a.kind,g=y===T.InterfaceDeclaration?C.TSInterfaceHeritage:y===T.HeritageClause?C.TSClassImplements:C.TSInstantiationExpression;return this.createNode(t,{type:g,expression:this.convertChild(t.expression),typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t)})}case T.InterfaceDeclaration:{let y=t.heritageClauses??[],g=[];for(let I of y){I.token!==T.ExtendsKeyword&&ge(this,me,Be).call(this,I,I.token===T.ImplementsKeyword?"Interface declaration cannot have 'implements' clause.":"Unexpected token.");for(let re of I.types)g.push(this.convertChild(re,t))}let x=this.createNode(t,{type:C.TSInterfaceDeclaration,body:this.createNode(t,{type:C.TSInterfaceBody,range:[t.members.pos-1,t.end],body:t.members.map(I=>this.convertChild(I))}),declare:Xe(T.DeclareKeyword,t),extends:g,id:this.convertChild(t.name),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});return this.fixExports(t,x)}case T.TypePredicate:{let y=this.createNode(t,{type:C.TSTypePredicate,asserts:t.assertsModifier!=null,parameterName:this.convertChild(t.parameterName),typeAnnotation:null});return t.type&&(y.typeAnnotation=this.convertTypeAnnotation(t.type,t),y.typeAnnotation.loc=y.typeAnnotation.typeAnnotation.loc,y.typeAnnotation.range=y.typeAnnotation.typeAnnotation.range),y}case T.ImportType:{let y=$a(t,this.ast);if(t.isTypeOf){let x=ra(t.getFirstToken(),t,this.ast);y[0]=x.getStart(this.ast)}let g=this.createNode(t,{type:C.TSImportType,range:y,argument:this.convertChild(t.argument),attributes:this.convertImportAttributes(t.attributes),qualifier:this.convertChild(t.qualifier),typeArguments:t.typeArguments?this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t):null});return t.isTypeOf?this.createNode(t,{type:C.TSTypeQuery,exprName:g,typeArguments:void 0}):g}case T.EnumDeclaration:{let y=t.members.map(x=>this.convertChild(x)),g=this.createNode(t,ge(this,me,ad).call(this,{type:C.TSEnumDeclaration,body:this.createNode(t,{type:C.TSEnumBody,range:[t.members.pos-1,t.end],members:y}),const:Xe(T.ConstKeyword,t),declare:Xe(T.DeclareKeyword,t),id:this.convertChild(t.name)},"members","'body.members'",t.members.map(x=>this.convertChild(x))));return this.fixExports(t,g)}case T.EnumMember:return this.createNode(t,{type:C.TSEnumMember,computed:t.name.kind===Ie.ComputedPropertyName,id:this.convertChild(t.name),initializer:t.initializer&&this.convertChild(t.initializer)});case T.ModuleDeclaration:{let y=Xe(T.DeclareKeyword,t),g=this.createNode(t,{type:C.TSModuleDeclaration,...(()=>{if(t.flags&on.GlobalAugmentation){let I=this.convertChild(t.name),re=this.convertChild(t.body);return(re==null||re.type===C.TSModuleDeclaration)&&ge(this,me,Vt).call(this,t.body??t,"Expected a valid module body"),I.type!==C.Identifier&&ge(this,me,Vt).call(this,t.name,"global module augmentation must have an Identifier id"),{body:re,declare:!1,global:!1,id:I,kind:"global"}}if(!(t.flags&on.Namespace)){let I=this.convertChild(t.body);return{kind:"module",...I!=null?{body:I}:{},declare:!1,global:!1,id:this.convertChild(t.name)}}t.body==null&&ge(this,me,Vt).call(this,t,"Expected a module body"),t.name.kind!==Ie.Identifier&&ge(this,me,Vt).call(this,t.name,"`namespace`s must have an Identifier id");let x=this.createNode(t.name,{type:C.Identifier,range:[t.name.getStart(this.ast),t.name.getEnd()],decorators:[],name:t.name.text,optional:!1,typeAnnotation:void 0});for(;t.body&&Ti(t.body)&&t.body.name;){t=t.body,y||(y=Xe(T.DeclareKeyword,t));let I=t.name,re=this.createNode(I,{type:C.Identifier,range:[I.getStart(this.ast),I.getEnd()],decorators:[],name:I.text,optional:!1,typeAnnotation:void 0});x=this.createNode(I,{type:C.TSQualifiedName,range:[x.range[0],re.range[1]],left:x,right:re})}return{body:this.convertChild(t.body),declare:!1,global:!1,id:x,kind:"namespace"}})()});return g.declare=y,t.flags&on.GlobalAugmentation&&(g.global=!0),this.fixExports(t,g)}case T.ParenthesizedType:return this.convertChild(t.type);case T.UnionType:return this.createNode(t,{type:C.TSUnionType,types:t.types.map(y=>this.convertChild(y))});case T.IntersectionType:return this.createNode(t,{type:C.TSIntersectionType,types:t.types.map(y=>this.convertChild(y))});case T.AsExpression:return this.createNode(t,{type:C.TSAsExpression,expression:this.convertChild(t.expression),typeAnnotation:this.convertChild(t.type)});case T.InferType:return this.createNode(t,{type:C.TSInferType,typeParameter:this.convertChild(t.typeParameter)});case T.LiteralType:return t.literal.kind===T.NullKeyword?this.createNode(t.literal,{type:C.TSNullKeyword}):this.createNode(t,{type:C.TSLiteralType,literal:this.convertChild(t.literal)});case T.TypeAssertionExpression:return this.createNode(t,{type:C.TSTypeAssertion,expression:this.convertChild(t.expression),typeAnnotation:this.convertChild(t.type)});case T.ImportEqualsDeclaration:return this.fixExports(t,this.createNode(t,{type:C.TSImportEqualsDeclaration,id:this.convertChild(t.name),importKind:t.isTypeOnly?"type":"value",moduleReference:this.convertChild(t.moduleReference)}));case T.ExternalModuleReference:return t.expression.kind!==T.StringLiteral&&ge(this,me,Be).call(this,t.expression,"String literal expected."),this.createNode(t,{type:C.TSExternalModuleReference,expression:this.convertChild(t.expression)});case T.NamespaceExportDeclaration:return this.createNode(t,{type:C.TSNamespaceExportDeclaration,id:this.convertChild(t.name)});case T.AbstractKeyword:return this.createNode(t,{type:C.TSAbstractKeyword});case T.TupleType:{let y=t.elements.map(g=>this.convertChild(g));return this.createNode(t,{type:C.TSTupleType,elementTypes:y})}case T.NamedTupleMember:{let y=this.createNode(t,{type:C.TSNamedTupleMember,elementType:this.convertChild(t.type,t),label:this.convertChild(t.name,t),optional:t.questionToken!=null});return t.dotDotDotToken?(y.range[0]=y.label.range[0],y.loc.start=y.label.loc.start,this.createNode(t,{type:C.TSRestType,typeAnnotation:y})):y}case T.OptionalType:return this.createNode(t,{type:C.TSOptionalType,typeAnnotation:this.convertChild(t.type)});case T.RestType:return this.createNode(t,{type:C.TSRestType,typeAnnotation:this.convertChild(t.type)});case T.TemplateLiteralType:{let y=this.createNode(t,{type:C.TSTemplateLiteralType,quasis:[this.convertChild(t.head)],types:[]});return t.templateSpans.forEach(g=>{y.types.push(this.convertChild(g.type)),y.quasis.push(this.convertChild(g.literal))}),y}case T.ClassStaticBlockDeclaration:return this.createNode(t,{type:C.StaticBlock,body:this.convertBodyExpressions(t.body.statements,t)});case T.AssertEntry:case T.ImportAttribute:return this.createNode(t,{type:C.ImportAttribute,key:this.convertChild(t.name),value:this.convertChild(t.value)});case T.SatisfiesExpression:return this.createNode(t,{type:C.TSSatisfiesExpression,expression:this.convertChild(t.expression),typeAnnotation:this.convertChild(t.type)});default:return this.deeplyCopy(t)}}createNode(t,a){let o=a;return o.range??(o.range=$a(t,this.ast)),o.loc??(o.loc=Qr(o.range,this.ast)),o&&this.options.shouldPreserveNodeMaps&&this.esTreeNodeToTSNodeMap.set(o,t),o}convertProgram(){return this.converter(this.ast)}deeplyCopy(t){t.kind===Ie.JSDocFunctionType&&ge(this,me,Be).call(this,t,"JSDoc types can only be used inside documentation comments.");let a=`TS${T[t.kind]}`;if(this.options.errorOnUnknownASTType&&!C[a])throw new Error(`Unknown AST_NODE_TYPE: "${a}"`);let o=this.createNode(t,{type:a});"type"in t&&(o.typeAnnotation=t.type&&"kind"in t.type&&s1(t.type)?this.convertTypeAnnotation(t.type,t):null),"typeArguments"in t&&(o.typeArguments=t.typeArguments&&"pos"in t.typeArguments?this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t):null),"typeParameters"in t&&(o.typeParameters=t.typeParameters&&"pos"in t.typeParameters?this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters):null);let m=na(t);m!=null&&m.length&&(o.decorators=m.map(A=>this.convertChild(A)));let v=new Set(["_children","decorators","end","flags","heritageClauses","illegalDecorators","jsDoc","kind","locals","localSymbol","modifierFlagsCache","modifiers","nextContainer","parent","pos","symbol","transformFlags","type","typeArguments","typeParameters"]);return Object.entries(t).filter(([A])=>!v.has(A)).forEach(([A,P])=>{Array.isArray(P)?o[A]=P.map(l=>this.convertChild(l)):P&&typeof P=="object"&&P.kind?o[A]=this.convertChild(P):o[A]=P}),o}fixExports(t,a){let m=Ti(t)&&!!(t.flags&on.Namespace)?zh(t):er(t);if((m==null?void 0:m[0].kind)===T.ExportKeyword){this.registerTSNodeInNodeMap(t,a);let v=m[0],A=m[1],P=(A==null?void 0:A.kind)===T.DefaultKeyword,l=P?ra(A,this.ast,this.ast):ra(v,this.ast,this.ast);if(a.range[0]=l.getStart(this.ast),a.loc=Qr(a.range,this.ast),P)return this.createNode(t,{type:C.ExportDefaultDeclaration,range:[v.getStart(this.ast),a.range[1]],declaration:a,exportKind:"value"});let Q=a.type===C.TSInterfaceDeclaration||a.type===C.TSTypeAliasDeclaration,h="declare"in a&&a.declare;return this.createNode(t,ge(this,me,Qa).call(this,{type:C.ExportNamedDeclaration,range:[v.getStart(this.ast),a.range[1]],attributes:[],declaration:a,exportKind:Q||h?"type":"value",source:null,specifiers:[]},"assertions","attributes",!0))}return a}getASTMaps(){return{esTreeNodeToTSNodeMap:this.esTreeNodeToTSNodeMap,tsNodeToESTreeNodeMap:this.tsNodeToESTreeNodeMap}}registerTSNodeInNodeMap(t,a){a&&this.options.shouldPreserveNodeMaps&&!this.tsNodeToESTreeNodeMap.has(t)&&this.tsNodeToESTreeNodeMap.set(t,a)}};me=new WeakSet,id=function(t,a){let o=a===Ie.ForInStatement?"for...in":"for...of";if(Q1(t)){t.declarations.length!==1&&ge(this,me,Be).call(this,t,`Only a single variable declaration is allowed in a '${o}' statement.`);let m=t.declarations[0];m.initializer?ge(this,me,Be).call(this,m,`The variable declaration of a '${o}' statement cannot have an initializer.`):m.type&&ge(this,me,Be).call(this,m,`The variable declaration of a '${o}' statement cannot have a type annotation.`),a===Ie.ForInStatement&&t.flags&on.Using&&ge(this,me,Be).call(this,t,"The left-hand side of a 'for...in' statement cannot be a 'using' declaration.")}else!Ll(t)&&t.kind!==Ie.ObjectLiteralExpression&&t.kind!==Ie.ArrayLiteralExpression&&ge(this,me,Be).call(this,t,`The left-hand side of a '${o}' statement must be a variable or a property access.`)},Fh=function(t){if(!this.options.allowInvalidAST){jh(t)&&ge(this,me,Be).call(this,t.illegalDecorators[0],"Decorators are not valid here.");for(let a of na(t,!0)??[])qh(t)||(ms(t)&&!nd(t.body)?ge(this,me,Be).call(this,a,"A decorator can only decorate a method implementation, not an overload."):ge(this,me,Be).call(this,a,"Decorators are not valid here."));for(let a of er(t,!0)??[]){if(a.kind!==T.ReadonlyKeyword&&((t.kind===T.PropertySignature||t.kind===T.MethodSignature)&&ge(this,me,Be).call(this,a,`'${it(a.kind)}' modifier cannot appear on a type member`),t.kind===T.IndexSignature&&(a.kind!==T.StaticKeyword||!vi(t.parent))&&ge(this,me,Be).call(this,a,`'${it(a.kind)}' modifier cannot appear on an index signature`)),a.kind!==T.InKeyword&&a.kind!==T.OutKeyword&&a.kind!==T.ConstKeyword&&t.kind===T.TypeParameter&&ge(this,me,Be).call(this,a,`'${it(a.kind)}' modifier cannot appear on a type parameter`),(a.kind===T.InKeyword||a.kind===T.OutKeyword)&&(t.kind!==T.TypeParameter||!(vs(t.parent)||vi(t.parent)||Pl(t.parent)))&&ge(this,me,Be).call(this,a,`'${it(a.kind)}' modifier can only appear on a type parameter of a class, interface or type alias`),a.kind===T.ReadonlyKeyword&&t.kind!==T.PropertyDeclaration&&t.kind!==T.PropertySignature&&t.kind!==T.IndexSignature&&t.kind!==T.Parameter&&ge(this,me,Be).call(this,a,"'readonly' modifier can only appear on a property declaration or index signature."),a.kind===T.DeclareKeyword&&vi(t.parent)&&!Va(t)&&ge(this,me,Be).call(this,a,`'${it(a.kind)}' modifier cannot appear on class elements of this kind.`),a.kind===T.DeclareKeyword&&Ha(t)){let o=Jl(t.declarationList);(o==="using"||o==="await using")&&ge(this,me,Be).call(this,a,`'declare' modifier cannot appear on a '${o}' declaration.`)}if(a.kind===T.AbstractKeyword&&t.kind!==T.ClassDeclaration&&t.kind!==T.ConstructorType&&t.kind!==T.MethodDeclaration&&t.kind!==T.PropertyDeclaration&&t.kind!==T.GetAccessor&&t.kind!==T.SetAccessor&&ge(this,me,Be).call(this,a,`'${it(a.kind)}' modifier can only appear on a class, method, or property declaration.`),(a.kind===T.StaticKeyword||a.kind===T.PublicKeyword||a.kind===T.ProtectedKeyword||a.kind===T.PrivateKeyword)&&(t.parent.kind===T.ModuleBlock||t.parent.kind===T.SourceFile)&&ge(this,me,Be).call(this,a,`'${it(a.kind)}' modifier cannot appear on a module or namespace element.`),a.kind===T.AccessorKeyword&&t.kind!==T.PropertyDeclaration&&ge(this,me,Be).call(this,a,"'accessor' modifier can only appear on a property declaration."),a.kind===T.AsyncKeyword&&t.kind!==T.MethodDeclaration&&t.kind!==T.FunctionDeclaration&&t.kind!==T.FunctionExpression&&t.kind!==T.ArrowFunction&&ge(this,me,Be).call(this,a,"'async' modifier cannot be used here."),t.kind===T.Parameter&&(a.kind===T.StaticKeyword||a.kind===T.ExportKeyword||a.kind===T.DeclareKeyword||a.kind===T.AsyncKeyword)&&ge(this,me,Be).call(this,a,`'${it(a.kind)}' modifier cannot appear on a parameter.`),a.kind===T.PublicKeyword||a.kind===T.ProtectedKeyword||a.kind===T.PrivateKeyword)for(let o of er(t)??[])o!==a&&(o.kind===T.PublicKeyword||o.kind===T.ProtectedKeyword||o.kind===T.PrivateKeyword)&&ge(this,me,Be).call(this,o,"Accessibility modifier already seen.");if(t.kind===T.Parameter&&(a.kind===T.PublicKeyword||a.kind===T.PrivateKeyword||a.kind===T.ProtectedKeyword||a.kind===T.ReadonlyKeyword||a.kind===T.OverrideKeyword)){let o=Bh(t);o.kind===T.Constructor&&nd(o.body)||ge(this,me,Be).call(this,a,"A parameter property is only allowed in a constructor implementation.")}}}},Be=function(t,a){let o,m;throw typeof t=="number"?o=m=t:(o=t.getStart(this.ast),m=t.getEnd()),td(a,this.ast,o,m)},Vt=function(t,a){this.options.allowInvalidAST||ge(this,me,Be).call(this,t,a)},Qa=function(t,a,o,m=!1){let v=m;return Object.defineProperty(t,a,{configurable:!0,get:this.options.suppressDeprecatedPropertyWarnings?()=>t[o]:()=>(v||((void 0)(`The '${a}' property is deprecated on ${t.type} nodes. Use '${o}' instead. See https://typescript-eslint.io/troubleshooting/faqs/general#the-key-property-is-deprecated-on-type-nodes-use-key-instead-warnings.`,"DeprecationWarning"),v=!0),t[o]),set(A){Object.defineProperty(t,a,{enumerable:!0,value:A,writable:!0})}}),t},ad=function(t,a,o,m){let v=!1;return Object.defineProperty(t,a,{configurable:!0,get:this.options.suppressDeprecatedPropertyWarnings?()=>m:()=>(v||((void 0)(`The '${a}' property is deprecated on ${t.type} nodes. Use ${o} instead. See https://typescript-eslint.io/troubleshooting/faqs/general#the-key-property-is-deprecated-on-type-nodes-use-key-instead-warnings.`,"DeprecationWarning"),v=!0),m),set(A){Object.defineProperty(t,a,{enumerable:!0,value:A,writable:!0})}}),t};function Cv(e,t,a=e.getSourceFile()){let o=[];for(;;){if(mf(e.kind))t(e);else{let m=e.getChildren(a);if(m.length===1){e=m[0];continue}for(let v=m.length-1;v>=0;--v)o.push(m[v])}if(o.length===0)break;e=o.pop()}}function Wh(e,t,a=e.getSourceFile()){let o=a.text,m=a.languageVariant!==xl.JSX;return Cv(e,A=>{if(A.pos!==A.end&&(A.kind!==Ie.JsxText&&Xm(o,A.pos===0?(sf(o)??"").length:A.pos,v),m||Dv(A)))return Hm(o,A.end,v)},a);function v(A,P,l){t(o,{end:P,kind:l,pos:A})}}function Dv(e){switch(e.kind){case Ie.CloseBraceToken:return e.parent.kind!==Ie.JsxExpression||!sd(e.parent.parent);case Ie.GreaterThanToken:switch(e.parent.kind){case Ie.JsxClosingElement:case Ie.JsxClosingFragment:return!sd(e.parent.parent.parent);case Ie.JsxOpeningElement:return e.end!==e.parent.end;case Ie.JsxOpeningFragment:return!1;case Ie.JsxSelfClosingElement:return e.end!==e.parent.end||!sd(e.parent.parent)}}return!0}function sd(e){return e.kind===Ie.JsxElement||e.kind===Ie.JsxFragment}var[KT,ZT]=Sm.split(".").map(e=>Number.parseInt(e,10));var ex=nn.Intrinsic??nn.Any|nn.Unknown|nn.String|nn.Number|nn.BigInt|nn.Boolean|nn.BooleanLiteral|nn.ESSymbol|nn.Void|nn.Undefined|nn.Null|nn.Never|nn.NonPrimitive;function Gh(e,t){let a=[];return Wh(e,(o,m)=>{let v=m.kind===Ie.SingleLineCommentTrivia?Rt.Line:Rt.Block,A=[m.pos,m.end],P=Qr(A,e),l=A[0]+2,Q=m.kind===Ie.SingleLineCommentTrivia?A[1]-l:A[1]-l-2;a.push({type:v,loc:P,range:A,value:t.slice(l,l+Q)})},e),a}var Yh=()=>{};function Xh(e,t,a){let{parseDiagnostics:o}=e;if(o.length)throw _d(o[0]);let m=new jl(e,{allowInvalidAST:t.allowInvalidAST,errorOnUnknownASTType:t.errorOnUnknownASTType,shouldPreserveNodeMaps:a,suppressDeprecatedPropertyWarnings:t.suppressDeprecatedPropertyWarnings}),v=m.convertProgram();return(!t.range||!t.loc)&&Yh(v,{enter:P=>{t.range||delete P.range,t.loc||delete P.loc}}),t.tokens&&(v.tokens=Lh(e)),t.comment&&(v.comments=Gh(e,t.codeFullText)),{astMaps:m.getASTMaps(),estree:v}}function Rl(e){if(typeof e!="object"||e==null)return!1;let t=e;return t.kind===Ie.SourceFile&&typeof t.getFullText=="function"}var Lv=function(e){return e&&e.__esModule?e:{default:e}};var jv=Lv({extname:e=>"."+e.split(".").pop()});function $h(e,t){switch(jv.default.extname(e).toLowerCase()){case Nn.Cjs:case Nn.Js:case Nn.Mjs:return Dr.JS;case Nn.Cts:case Nn.Mts:case Nn.Ts:return Dr.TS;case Nn.Json:return Dr.JSON;case Nn.Jsx:return Dr.JSX;case Nn.Tsx:return Dr.TSX;default:return t?Dr.TSX:Dr.TS}}var Uv={default:Ia},Bv=(0,Uv.default)("typescript-eslint:typescript-estree:create-program:createSourceFile");function Qh(e){return Bv("Getting AST without type information in %s mode for: %s",e.jsx?"TSX":"TS",e.filePath),Rl(e.code)?e.code:fh(e.filePath,e.codeFullText,{jsDocParsingMode:e.jsDocParsingMode,languageVersion:ys.Latest,setExternalModuleIndicator:e.setExternalModuleIndicator},!0,$h(e.filePath,e.jsx))}var Kh=()=>{};var Zh=e=>e;var e0=class{};var n0=()=>!1;var r0=()=>{};var Kv=function(e){return e&&e.__esModule?e:{default:e}};var od={default:Ia},Zv=Kv({extname:e=>"."+e.split(".").pop()}),e4=(0,od.default)("typescript-eslint:typescript-estree:parseSettings:createParseSettings"),t4,n4=null,i0,a0,_0,s0,xs={ParseAll:(i0=Ga)==null?void 0:i0.ParseAll,ParseForTypeErrors:(a0=Ga)==null?void 0:a0.ParseForTypeErrors,ParseForTypeInfo:(_0=Ga)==null?void 0:_0.ParseForTypeInfo,ParseNone:(s0=Ga)==null?void 0:s0.ParseNone};function o0(e,t={}){var h;let a=r4(e),o=n0(t),m=typeof t.tsconfigRootDir=="string"?t.tsconfigRootDir:"/prettier-security-dirname-placeholder",v=typeof t.loggerFn=="function",A=Zh(typeof t.filePath=="string"&&t.filePath!==""?t.filePath:i4(t.jsx),m),P=Zv.default.extname(A).toLowerCase(),l=(()=>{switch(t.jsDocParsingMode){case"all":return xs.ParseAll;case"none":return xs.ParseNone;case"type-info":return xs.ParseForTypeInfo;default:return xs.ParseAll}})(),Q={loc:t.loc===!0,range:t.range===!0,allowInvalidAST:t.allowInvalidAST===!0,code:e,codeFullText:a,comment:t.comment===!0,comments:[],debugLevel:t.debugLevel===!0?new Set(["typescript-eslint"]):Array.isArray(t.debugLevel)?new Set(t.debugLevel):new Set,errorOnTypeScriptSyntacticAndSemanticIssues:!1,errorOnUnknownASTType:t.errorOnUnknownASTType===!0,extraFileExtensions:Array.isArray(t.extraFileExtensions)&&t.extraFileExtensions.every(y=>typeof y=="string")?t.extraFileExtensions:[],filePath:A,jsDocParsingMode:l,jsx:t.jsx===!0,log:typeof t.loggerFn=="function"?t.loggerFn:t.loggerFn===!1?()=>{}:console.log,preserveNodeMaps:t.preserveNodeMaps!==!1,programs:Array.isArray(t.programs)?t.programs:null,projects:new Map,projectService:t.projectService||t.project&&t.projectService!==!1&&(void 0).env.TYPESCRIPT_ESLINT_PROJECT_SERVICE==="true"?n4??(n4=Kh(t.projectService,l,m)):void 0,setExternalModuleIndicator:t.sourceType==="module"||t.sourceType==null&&P===Nn.Mjs||t.sourceType==null&&P===Nn.Mts?y=>{y.externalModuleIndicator=!0}:void 0,singleRun:o,suppressDeprecatedPropertyWarnings:t.suppressDeprecatedPropertyWarnings??!0,tokens:t.tokens===!0?[]:null,tsconfigMatchCache:t4??(t4=new e0(o?"Infinity":((h=t.cacheLifetime)==null?void 0:h.glob)??void 0)),tsconfigRootDir:m};if(Q.debugLevel.size>0){let y=[];Q.debugLevel.has("typescript-eslint")&&y.push("typescript-eslint:*"),(Q.debugLevel.has("eslint")||od.default.enabled("eslint:*,-eslint:code-path"))&&y.push("eslint:*,-eslint:code-path"),od.default.enable(y.join(","))}if(Array.isArray(t.programs)){if(!t.programs.length)throw new Error("You have set parserOptions.programs to an empty array. This will cause all files to not be found in existing programs. Either provide one or more existing TypeScript Program instances in the array, or remove the parserOptions.programs setting.");e4("parserOptions.programs was provided, so parserOptions.project will be ignored.")}return!Q.programs&&!Q.projectService&&(Q.projects=new Map),t.jsDocParsingMode==null&&Q.projects.size===0&&Q.programs==null&&Q.projectService==null&&(Q.jsDocParsingMode=xs.ParseNone),r0(Q,v),Q}function r4(e){return Rl(e)?e.getFullText(e):typeof e=="string"?e:String(e)}function i4(e){return e?"estree.tsx":"estree.ts"}var o4={default:Ia},hx=(0,o4.default)("typescript-eslint:typescript-estree:parser");function c0(e,t){let{ast:a}=c4(e,t,!1);return a}function c4(e,t,a){let o=o0(e,t);if(t!=null&&t.errorOnTypeScriptSyntacticAndSemanticIssues)throw new Error('"errorOnTypeScriptSyntacticAndSemanticIssues" is only supported for parseAndGenerateServices()');let m=Qh(o),{astMaps:v,estree:A}=Xh(m,o,a);return{ast:A,esTreeNodeToTSNodeMap:v.esTreeNodeToTSNodeMap,tsNodeToESTreeNodeMap:v.tsNodeToESTreeNodeMap}}function l4(e,t){let a=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(a,t)}var l0=l4;function u4(e){let t=[];for(let a of e)try{return a()}catch(o){t.push(o)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var u0=u4;var p4=(e,t,a)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[a<0?t.length+a:a]:t.at(a)},cd=p4;function f4(e){return Array.isArray(e)&&e.length>0}var p0=f4;function tr(e){var o,m,v;let t=((o=e.range)==null?void 0:o[0])??e.start,a=(v=((m=e.declaration)==null?void 0:m.decorators)??e.decorators)==null?void 0:v[0];return a?Math.min(tr(a),t):t}function Kr(e){var t;return((t=e.range)==null?void 0:t[1])??e.end}function d4(e){let t=new Set(e);return a=>t.has(a==null?void 0:a.type)}var f0=d4;var m4=f0(["Block","CommentBlock","MultiLine"]),Ss=m4;function h4(e){let t=`*${e.value}*`.split(` +`);return t.length>1&&t.every(a=>a.trimStart()[0]==="*")}var ld=h4;function y4(e){return Ss(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(e.value)}var d0=y4;var ws=null;function ks(e){if(ws!==null&&typeof ws.property){let t=ws;return ws=ks.prototype=null,t}return ws=ks.prototype=e??Object.create(null),new ks}var g4=10;for(let e=0;e<=g4;e++)ks();function ud(e){return ks(e)}function b4(e,t="type"){ud(e);function a(o){let m=o[t],v=e[m];if(!Array.isArray(v))throw Object.assign(new Error(`Missing visitor keys for '${m}'.`),{node:o});return v}return a}var m0=b4;var h0={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","typeParameters","params","predicate","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:["body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],ImportExpression:["source","options"],MetaProperty:["meta","property"],ClassMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","typeParameters","quasi","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["decorators","variance","key","typeAnnotation","value"],ClassAccessorProperty:["decorators","key","typeAnnotation","value"],ClassPrivateProperty:["decorators","variance","key","typeAnnotation","value"],ClassPrivateMethod:["decorators","key","typeParameters","params","returnType","body"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source","attributes"],DeclareExportAllDeclaration:["source","attributes"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","this","params","rest","returnType"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["variance","id","key","value"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["qualification","id"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","typeParameters","typeArguments","attributes"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","nameType","typeAnnotation"],TSTemplateLiteralType:["quasis","types"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumBody:["members"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","options","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],AsConstExpression:["expression"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:["name","typeAnnotation"],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclareEnum:["id","body"],DeclareHook:["id"],DeclareNamespace:["id","body"],EnumBigIntBody:["members"],EnumBigIntMember:["id","init"],HookDeclaration:["id","params","body","typeParameters","returnType"],HookTypeAnnotation:["params","returnType","rest","typeParameters"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],SatisfiesExpression:["expression","typeAnnotation"]};var v4=m0(h0),y0=v4;function pd(e,t){if(!(e!==null&&typeof e=="object"))return e;if(Array.isArray(e)){for(let o=0;o{var A;(A=v.leadingComments)!=null&&A.some(d0)&&m.add(tr(v))}),e=Ul(e,v=>{if(v.type==="ParenthesizedExpression"){let{expression:A}=v;if(A.type==="TypeCastExpression")return A.range=[...v.range],A;let P=tr(v);if(!m.has(P))return A.extra={...A.extra,parenthesized:!0},A}})}if(e=Ul(e,m=>{switch(m.type){case"LogicalExpression":if(g0(m))return fd(m);break;case"VariableDeclaration":{let v=cd(!1,m.declarations,-1);v!=null&&v.init&&o[Kr(v)]!==";"&&(m.range=[tr(m),Kr(v)]);break}case"TSParenthesizedType":return m.typeAnnotation;case"TSTypeParameter":if(typeof m.name=="string"){let v=tr(m);m.name={type:"Identifier",name:m.name,range:[v,v+m.name.length]}}break;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"TSUnionType":case"TSIntersectionType":if(m.types.length===1)return m.types[0];break}}),p0(e.comments)){let m=cd(!1,e.comments,-1);for(let v=e.comments.length-2;v>=0;v--){let A=e.comments[v];Kr(A)===tr(m)&&Ss(A)&&Ss(m)&&ld(A)&&ld(m)&&(e.comments.splice(v+1,1),A.value+="*//*"+m.value,A.range=[tr(A),Kr(m)]),m=A}}return e.type==="Program"&&(e.range=[0,o.length]),e}function g0(e){return e.type==="LogicalExpression"&&e.right.type==="LogicalExpression"&&e.operator===e.right.operator}function fd(e){return g0(e)?fd({type:"LogicalExpression",operator:e.operator,left:fd({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[tr(e.left),Kr(e.right.left)]}),right:e.right.right,range:[tr(e),Kr(e)]}):e}var b0=T4;var x4=/\*\/$/,S4=/^\/\*\*?/,w4=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,k4=/(^|\s+)\/\/([^\n\r]*)/g,v0=/^(\r?\n)+/,E4=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,T0=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,A4=/(\r?\n|^) *\* ?/g,C4=[];function x0(e){let t=e.match(w4);return t?t[0].trimStart():""}function S0(e){let t=` +`;e=Sr(!1,e.replace(S4,"").replace(x4,""),A4,"$1");let a="";for(;a!==e;)a=e,e=Sr(!1,e,E4,`${t}$1 $2${t}`);e=e.replace(v0,"").trimEnd();let o=Object.create(null),m=Sr(!1,e,T0,"").replace(v0,"").trimEnd(),v;for(;v=T0.exec(e);){let A=Sr(!1,v[2],k4,"");if(typeof o[v[1]]=="string"||Array.isArray(o[v[1]])){let P=o[v[1]];o[v[1]]=[...C4,...Array.isArray(P)?P:[P],A]}else o[v[1]]=A}return{comments:m,pragmas:o}}function D4(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(` +`);return t===-1?e:e.slice(0,t)}var w0=D4;function P4(e){let t=w0(e);t&&(e=e.slice(t.length+1));let a=x0(e),{pragmas:o,comments:m}=S0(a);return{shebang:t,text:e,pragmas:o,comments:m}}function k0(e){let{pragmas:t}=P4(e);return Object.prototype.hasOwnProperty.call(t,"prettier")||Object.prototype.hasOwnProperty.call(t,"format")}function N4(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:k0,locStart:tr,locEnd:Kr,...e}}var E0=N4;function I4(e){let{filepath:t}=e;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs")||t.endsWith(".cts"))return"script";if(t.endsWith(".mjs")||t.endsWith(".mts"))return"module"}}var A0=I4;function O4(e){return e.charAt(0)==="#"&&e.charAt(1)==="!"?"//"+e.slice(2):e}var C0=O4;var M4={loc:!0,range:!0,comment:!0,tokens:!0,loggerFn:!1,project:!1,jsDocParsingMode:"none",suppressDeprecatedPropertyWarnings:!0};function J4(e){if(!(e!=null&&e.location))return e;let{message:t,location:{start:a,end:o}}=e;return l0(t,{loc:{start:{line:a.line,column:a.column+1},end:{line:o.line,column:o.column+1}},cause:e})}var L4=e=>/\.(?:js|mjs|cjs|jsx|ts|mts|cts|tsx)$/iu.test(e);function j4(e,t){let a=t==null?void 0:t.filepath,o=[{...M4,filePath:a}],m=A0(t);if(m?o=o.map(A=>({...A,sourceType:m})):o=["module","script"].flatMap(P=>o.map(l=>({...l,sourceType:P}))),a&&L4(a))return o;let v=U4(e);return[v,!v].flatMap(A=>o.map(P=>({...P,jsx:A})))}function R4(e,t={}){let a=C0(e),o=j4(e,t),m;try{m=u0(o.map(v=>()=>c0(a,v)))}catch({errors:[v]}){throw J4(v)}return b0(m,{text:e})}function U4(e){return new RegExp(["(?:^[^\"'`]*)"].join(""),"mu").test(e)}var B4=E0(R4);return ty(q4);}); \ No newline at end of file diff --git a/node_modules/prettier/plugins/typescript.mjs b/node_modules/prettier/plugins/typescript.mjs new file mode 100644 index 0000000..bbc8b6c --- /dev/null +++ b/node_modules/prettier/plugins/typescript.mjs @@ -0,0 +1,20 @@ +var vd=Object.defineProperty;var Td=e=>{throw TypeError(e)};var Q0=(e,t,a)=>t in e?vd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var xd=(e,t)=>{for(var a in t)vd(e,a,{get:t[a],enumerable:!0})};var qi=(e,t,a)=>Q0(e,typeof t!="symbol"?t+"":t,a),K0=(e,t,a)=>t.has(e)||Td("Cannot "+a);var yp=(e,t,a)=>t.has(e)?Td("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,a);var ge=(e,t,a)=>(K0(e,t,"access private method"),a);var dd={};xd(dd,{parsers:()=>fd});var fd={};xd(fd,{typescript:()=>L4});var Z0=()=>()=>{},Ia=Z0;var ey=(e,t,a,o)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(a,o):a.global?t.replace(a,o):t.split(a).join(o)},Sr=ey;var wm="5.7";var bt=[],ty=new Map;function ts(e){return e!==void 0?e.length:0}function Un(e,t){if(e!==void 0)for(let a=0;a0;return!1}function Yp(e,t){return t===void 0||t.length===0?e:e===void 0||e.length===0?t:[...e,...t]}function _y(e,t,a=Hp){if(e===void 0||t===void 0)return e===t;if(e.length!==t.length)return!1;for(let o=0;oe==null?void 0:e.at(t):(e,t)=>{if(e!==void 0&&(t=Np(e,t),t>1),l=a(e[P],P);switch(o(l,t)){case-1:v=P+1;break;case 0:return P;case 1:A=P-1;break}}return~v}function dy(e,t,a,o,m){if(e&&e.length>0){let v=e.length;if(v>0){let A=o===void 0||o<0?0:o,P=m===void 0||A+m>v-1?v-1:A+m,l;for(arguments.length<=2?(l=e[A],A++):l=a;A<=P;)l=t(l,e[A],A),A++;return l}}return a}var Cm=Object.prototype.hasOwnProperty;function Cr(e,t){return Cm.call(e,t)}function my(e){let t=[];for(let a in e)Cm.call(e,a)&&t.push(a);return t}function hy(){let e=new Map;return e.add=yy,e.remove=gy,e}function yy(e,t){let a=this.get(e);return a!==void 0?a.push(t):this.set(e,a=[t]),a}function gy(e,t){let a=this.get(e);a!==void 0&&(Ay(a,t),a.length||this.delete(e))}function Yr(e){return Array.isArray(e)}function bp(e){return Yr(e)?e:[e]}function by(e,t){return e!==void 0&&t(e)?e:void 0}function kr(e,t){return e!==void 0&&t(e)?e:B.fail(`Invalid cast. The supplied value ${e} did not pass the test '${B.getFunctionName(t)}'.`)}function Fa(e){}function vy(){return!0}function gt(e){return e}function wd(e){let t;return()=>(e&&(t=e(),e=void 0),t)}function Kn(e){let t=new Map;return a=>{let o=`${typeof a}:${a}`,m=t.get(o);return m===void 0&&!t.has(o)&&(m=e(a),t.set(o,m)),m}}function Hp(e,t){return e===t}function $p(e,t){return e===t||e!==void 0&&t!==void 0&&e.toUpperCase()===t.toUpperCase()}function Ty(e,t){return Hp(e,t)}function xy(e,t){return e===t?0:e===void 0?-1:t===void 0?1:ea?P-a:1),h=Math.floor(t.length>a+P?a+P:t.length);m[0]=P;let y=P;for(let x=1;xa)return;let g=o;o=m,m=g}let A=o[t.length];return A>a?void 0:A}function ky(e,t,a){let o=e.length-t.length;return o>=0&&(a?$p(e.slice(o),t):e.indexOf(t,o)===o)}function Ey(e,t){e[t]=e[e.length-1],e.pop()}function Ay(e,t){return Cy(e,a=>a===t)}function Cy(e,t){for(let a=0;a{let t=0;e.currentLogLevel=2,e.isDebugging=!1;function a(L){return e.currentLogLevel<=L}e.shouldLog=a;function o(L,se){e.loggingHost&&a(L)&&e.loggingHost.log(L,se)}function m(L){o(3,L)}e.log=m,(L=>{function se(Ke){o(1,Ke)}L.error=se;function fe(Ke){o(2,Ke)}L.warn=fe;function Te(Ke){o(3,Ke)}L.log=Te;function He(Ke){o(4,Ke)}L.trace=He})(m=e.log||(e.log={}));let v={};function A(){return t}e.getAssertionLevel=A;function P(L){let se=t;if(t=L,L>se)for(let fe of my(v)){let Te=v[fe];Te!==void 0&&e[fe]!==Te.assertion&&L>=Te.level&&(e[fe]=Te,v[fe]=void 0)}}e.setAssertionLevel=P;function l(L){return t>=L}e.shouldAssert=l;function Q(L,se){return l(L)?!0:(v[se]={level:L,assertion:e[se]},e[se]=Fa,!1)}function h(L,se){debugger;let fe=new Error(L?`Debug Failure. ${L}`:"Debug Failure.");throw Error.captureStackTrace&&Error.captureStackTrace(fe,se||h),fe}e.fail=h;function y(L,se,fe){return h(`${se||"Unexpected node."}\r +Node ${Ot(L.kind)} was unexpected.`,fe||y)}e.failBadSyntaxKind=y;function g(L,se,fe,Te){L||(se=se?`False expression: ${se}`:"False expression.",fe&&(se+=`\r +Verbose Debug Information: `+(typeof fe=="string"?fe:fe())),h(se,Te||g))}e.assert=g;function x(L,se,fe,Te,He){if(L!==se){let Ke=fe?Te?`${fe} ${Te}`:fe:"";h(`Expected ${L} === ${se}. ${Ke}`,He||x)}}e.assertEqual=x;function I(L,se,fe,Te){L>=se&&h(`Expected ${L} < ${se}. ${fe||""}`,Te||I)}e.assertLessThan=I;function re(L,se,fe){L>se&&h(`Expected ${L} <= ${se}`,fe||re)}e.assertLessThanOrEqual=re;function he(L,se,fe){L= ${se}`,fe||he)}e.assertGreaterThanOrEqual=he;function ye(L,se,fe){L==null&&h(se,fe||ye)}e.assertIsDefined=ye;function de(L,se,fe){return ye(L,se,fe||de),L}e.checkDefined=de;function M(L,se,fe){for(let Te of L)ye(Te,se,fe||M)}e.assertEachIsDefined=M;function ae(L,se,fe){return M(L,se,fe||ae),L}e.checkEachDefined=ae;function Oe(L,se="Illegal value:",fe){let Te=typeof L=="object"&&Cr(L,"kind")&&Cr(L,"pos")?"SyntaxKind: "+Ot(L.kind):JSON.stringify(L);return h(`${se} ${Te}`,fe||Oe)}e.assertNever=Oe;function V(L,se,fe,Te){Q(1,"assertEachNode")&&g(se===void 0||Gp(L,se),fe||"Unexpected node.",()=>`Node array did not pass test '${bn(se)}'.`,Te||V)}e.assertEachNode=V;function oe(L,se,fe,Te){Q(1,"assertNode")&&g(L!==void 0&&(se===void 0||se(L)),fe||"Unexpected node.",()=>`Node ${Ot(L==null?void 0:L.kind)} did not pass test '${bn(se)}'.`,Te||oe)}e.assertNode=oe;function W(L,se,fe,Te){Q(1,"assertNotNode")&&g(L===void 0||se===void 0||!se(L),fe||"Unexpected node.",()=>`Node ${Ot(L.kind)} should not have passed test '${bn(se)}'.`,Te||W)}e.assertNotNode=W;function dt(L,se,fe,Te){Q(1,"assertOptionalNode")&&g(se===void 0||L===void 0||se(L),fe||"Unexpected node.",()=>`Node ${Ot(L==null?void 0:L.kind)} did not pass test '${bn(se)}'.`,Te||dt)}e.assertOptionalNode=dt;function nr(L,se,fe,Te){Q(1,"assertOptionalToken")&&g(se===void 0||L===void 0||L.kind===se,fe||"Unexpected node.",()=>`Node ${Ot(L==null?void 0:L.kind)} was not a '${Ot(se)}' token.`,Te||nr)}e.assertOptionalToken=nr;function gn(L,se,fe){Q(1,"assertMissingNode")&&g(L===void 0,se||"Unexpected node.",()=>`Node ${Ot(L.kind)} was unexpected'.`,fe||gn)}e.assertMissingNode=gn;function rr(L){}e.type=rr;function bn(L){if(typeof L!="function")return"";if(Cr(L,"name"))return L.name;{let se=Function.prototype.toString.call(L),fe=/^function\s+([\w$]+)\s*\(/.exec(se);return fe?fe[1]:""}}e.getFunctionName=bn;function In(L){return`{ name: ${cs(L.escapedName)}; flags: ${ct(L.flags)}; declarations: ${Pp(L.declarations,se=>Ot(se.kind))} }`}e.formatSymbol=In;function Ge(L=0,se,fe){let Te=Pr(se);if(L===0)return Te.length>0&&Te[0][0]===0?Te[0][1]:"0";if(fe){let He=[],Ke=L;for(let[st,Dt]of Te){if(st>L)break;st!==0&&st&L&&(He.push(Dt),Ke&=~st)}if(Ke===0)return He.join("|")}else for(let[He,Ke]of Te)if(He===L)return Ke;return L.toString()}e.formatEnum=Ge;let ir=new Map;function Pr(L){let se=ir.get(L);if(se)return se;let fe=[];for(let He in L){let Ke=L[He];typeof Ke=="number"&&fe.push([Ke,He])}let Te=cy(fe,(He,Ke)=>Dm(He[0],Ke[0]));return ir.set(L,Te),Te}function Ot(L){return Ge(L,Ie,!1)}e.formatSyntaxKind=Ot;function Bn(L){return Ge(L,Mm,!1)}e.formatSnippetKind=Bn;function On(L){return Ge(L,Dr,!1)}e.formatScriptKind=On;function Mt(L){return Ge(L,on,!0)}e.formatNodeFlags=Mt;function vt(L){return Ge(L,Nm,!0)}e.formatNodeCheckFlags=vt;function Qe(L){return Ge(L,Qp,!0)}e.formatModifierFlags=Qe;function qn(L){return Ge(L,Om,!0)}e.formatTransformFlags=qn;function $t(L){return Ge(L,Jm,!0)}e.formatEmitFlags=$t;function ct(L){return Ge(L,Kp,!0)}e.formatSymbolFlags=ct;function _t(L){return Ge(L,nn,!0)}e.formatTypeFlags=_t;function Ut(L){return Ge(L,Im,!0)}e.formatSignatureFlags=Ut;function Jt(L){return Ge(L,Zp,!0)}e.formatObjectFlags=Jt;function lt(L){return Ge(L,Op,!0)}e.formatFlowFlags=lt;function ar(L){return Ge(L,Pm,!0)}e.formatRelationComparisonResult=ar;function mt(L){return Ge(L,CheckMode,!0)}e.formatCheckMode=mt;function vn(L){return Ge(L,SignatureCheckMode,!0)}e.formatSignatureCheckMode=vn;function yt(L){return Ge(L,TypeFacts,!0)}e.formatTypeFacts=yt;let cn=!1,nt;function Bt(L){"__debugFlowFlags"in L||Object.defineProperties(L,{__tsDebuggerDisplay:{value(){let se=this.flags&2?"FlowStart":this.flags&4?"FlowBranchLabel":this.flags&8?"FlowLoopLabel":this.flags&16?"FlowAssignment":this.flags&32?"FlowTrueCondition":this.flags&64?"FlowFalseCondition":this.flags&128?"FlowSwitchClause":this.flags&256?"FlowArrayMutation":this.flags&512?"FlowCall":this.flags&1024?"FlowReduceLabel":this.flags&1?"FlowUnreachable":"UnknownFlow",fe=this.flags&-2048;return`${se}${fe?` (${lt(fe)})`:""}`}},__debugFlowFlags:{get(){return Ge(this.flags,Op,!0)}},__debugToString:{value(){return mr(this)}}})}function rn(L){return cn&&(typeof Object.setPrototypeOf=="function"?(nt||(nt=Object.create(Object.prototype),Bt(nt)),Object.setPrototypeOf(L,nt)):Bt(L)),L}e.attachFlowNodeDebugInfo=rn;let _r;function fr(L){"__tsDebuggerDisplay"in L||Object.defineProperties(L,{__tsDebuggerDisplay:{value(se){return se=String(se).replace(/(?:,[\s\w]+:[^,]+)+\]$/,"]"),`NodeArray ${se}`}}})}function dr(L){cn&&(typeof Object.setPrototypeOf=="function"?(_r||(_r=Object.create(Array.prototype),fr(_r)),Object.setPrototypeOf(L,_r)):fr(L))}e.attachNodeArrayDebugInfo=dr;function zn(){if(cn)return;let L=new WeakMap,se=new WeakMap;Object.defineProperties(At.getSymbolConstructor().prototype,{__tsDebuggerDisplay:{value(){let Te=this.flags&33554432?"TransientSymbol":"Symbol",He=this.flags&-33554433;return`${Te} '${Lp(this)}'${He?` (${ct(He)})`:""}`}},__debugFlags:{get(){return ct(this.flags)}}}),Object.defineProperties(At.getTypeConstructor().prototype,{__tsDebuggerDisplay:{value(){let Te=this.flags&67359327?`IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName?` (${this.debugIntrinsicName})`:""}`:this.flags&98304?"NullableType":this.flags&384?`LiteralType ${JSON.stringify(this.value)}`:this.flags&2048?`LiteralType ${this.value.negative?"-":""}${this.value.base10Value}n`:this.flags&8192?"UniqueESSymbolType":this.flags&32?"EnumType":this.flags&1048576?"UnionType":this.flags&2097152?"IntersectionType":this.flags&4194304?"IndexType":this.flags&8388608?"IndexedAccessType":this.flags&16777216?"ConditionalType":this.flags&33554432?"SubstitutionType":this.flags&262144?"TypeParameter":this.flags&524288?this.objectFlags&3?"InterfaceType":this.objectFlags&4?"TypeReference":this.objectFlags&8?"TupleType":this.objectFlags&16?"AnonymousType":this.objectFlags&32?"MappedType":this.objectFlags&1024?"ReverseMappedType":this.objectFlags&256?"EvolvingArrayType":"ObjectType":"Type",He=this.flags&524288?this.objectFlags&-1344:0;return`${Te}${this.symbol?` '${Lp(this.symbol)}'`:""}${He?` (${Jt(He)})`:""}`}},__debugFlags:{get(){return _t(this.flags)}},__debugObjectFlags:{get(){return this.flags&524288?Jt(this.objectFlags):""}},__debugTypeToString:{value(){let Te=L.get(this);return Te===void 0&&(Te=this.checker.typeToString(this),L.set(this,Te)),Te}}}),Object.defineProperties(At.getSignatureConstructor().prototype,{__debugFlags:{get(){return Ut(this.flags)}},__debugSignatureToString:{value(){var Te;return(Te=this.checker)==null?void 0:Te.signatureToString(this)}}});let fe=[At.getNodeConstructor(),At.getIdentifierConstructor(),At.getTokenConstructor(),At.getSourceFileConstructor()];for(let Te of fe)Cr(Te.prototype,"__debugKind")||Object.defineProperties(Te.prototype,{__tsDebuggerDisplay:{value(){return`${Ua(this)?"GeneratedIdentifier":tt(this)?`Identifier '${Pn(this)}'`:gi(this)?`PrivateIdentifier '${Pn(this)}'`:Ya(this)?`StringLiteral ${JSON.stringify(this.text.length<10?this.text:this.text.slice(10)+"...")}`:ta(this)?`NumericLiteral ${this.text}`:D1(this)?`BigIntLiteral ${this.text}n`:Ef(this)?"TypeParameterDeclaration":ds(this)?"ParameterDeclaration":Af(this)?"ConstructorDeclaration":gl(this)?"GetAccessorDeclaration":hs(this)?"SetAccessorDeclaration":M1(this)?"CallSignatureDeclaration":J1(this)?"ConstructSignatureDeclaration":Cf(this)?"IndexSignatureDeclaration":L1(this)?"TypePredicateNode":Df(this)?"TypeReferenceNode":Pf(this)?"FunctionTypeNode":Nf(this)?"ConstructorTypeNode":Bb(this)?"TypeQueryNode":j1(this)?"TypeLiteralNode":qb(this)?"ArrayTypeNode":zb(this)?"TupleTypeNode":Fb(this)?"OptionalTypeNode":Vb(this)?"RestTypeNode":U1(this)?"UnionTypeNode":B1(this)?"IntersectionTypeNode":Wb(this)?"ConditionalTypeNode":Gb(this)?"InferTypeNode":q1(this)?"ParenthesizedTypeNode":Yb(this)?"ThisTypeNode":z1(this)?"TypeOperatorNode":Xb(this)?"IndexedAccessTypeNode":F1(this)?"MappedTypeNode":Hb(this)?"LiteralTypeNode":R1(this)?"NamedTupleMember":$b(this)?"ImportTypeNode":Ot(this.kind)}${this.flags?` (${Mt(this.flags)})`:""}`}},__debugKind:{get(){return Ot(this.kind)}},__debugNodeFlags:{get(){return Mt(this.flags)}},__debugModifierFlags:{get(){return Qe(Y2(this))}},__debugTransformFlags:{get(){return qn(this.transformFlags)}},__debugIsParseTreeNode:{get(){return ml(this)}},__debugEmitFlags:{get(){return $t(za(this))}},__debugGetText:{value(He){if(La(this))return"";let Ke=se.get(this);if(Ke===void 0){let st=dg(this),Dt=st&&hi(st);Ke=Dt?Ud(Dt,st,He):"",se.set(this,Ke)}return Ke}}});cn=!0}e.enableDebugInfo=zn;function Fn(L){let se=L&7,fe=se===0?"in out":se===3?"[bivariant]":se===2?"in":se===1?"out":se===4?"[independent]":"";return L&8?fe+=" (unmeasurable)":L&16&&(fe+=" (unreliable)"),fe}e.formatVariance=Fn;class Nr{__debugToString(){var se;switch(this.kind){case 3:return((se=this.debugInfo)==null?void 0:se.call(this))||"(function mapper)";case 0:return`${this.source.__debugTypeToString()} -> ${this.target.__debugTypeToString()}`;case 1:return Sd(this.sources,this.targets||Pp(this.sources,()=>"any"),(fe,Te)=>`${fe.__debugTypeToString()} -> ${typeof Te=="string"?Te:Te.__debugTypeToString()}`).join(", ");case 2:return Sd(this.sources,this.targets,(fe,Te)=>`${fe.__debugTypeToString()} -> ${Te().__debugTypeToString()}`).join(", ");case 5:case 4:return`m1: ${this.mapper1.__debugToString().split(` +`).join(` + `)} +m2: ${this.mapper2.__debugToString().split(` +`).join(` + `)}`;default:return Oe(this)}}}e.DebugTypeMapper=Nr;function Vn(L){return e.isDebugging?Object.setPrototypeOf(L,Nr.prototype):L}e.attachDebugPrototypeIfDebug=Vn;function Ce(L){return console.log(mr(L))}e.printControlFlowGraph=Ce;function mr(L){let se=-1;function fe(u){return u.id||(u.id=se,se--),u.id}let Te;(u=>{u.lr="\u2500",u.ud="\u2502",u.dr="\u256D",u.dl="\u256E",u.ul="\u256F",u.ur="\u2570",u.udr="\u251C",u.udl="\u2524",u.dlr="\u252C",u.ulr="\u2534",u.udlr="\u256B"})(Te||(Te={}));let He;(u=>{u[u.None=0]="None",u[u.Up=1]="Up",u[u.Down=2]="Down",u[u.Left=4]="Left",u[u.Right=8]="Right",u[u.UpDown=3]="UpDown",u[u.LeftRight=12]="LeftRight",u[u.UpLeft=5]="UpLeft",u[u.UpRight=9]="UpRight",u[u.DownLeft=6]="DownLeft",u[u.DownRight=10]="DownRight",u[u.UpDownLeft=7]="UpDownLeft",u[u.UpDownRight=11]="UpDownRight",u[u.UpLeftRight=13]="UpLeftRight",u[u.DownLeftRight=14]="DownLeftRight",u[u.UpDownLeftRight=15]="UpDownLeftRight",u[u.NoChildren=16]="NoChildren"})(He||(He={}));let Ke=2032,st=882,Dt=Object.create(null),Tt=[],ut=[],Ir=Se(L,new Set);for(let u of Tt)u.text=rt(u.flowNode,u.circular),be(u);let hr=We(Ir),Mn=Ze(hr);return Ye(Ir,0),ln();function Wn(u){return!!(u.flags&128)}function Si(u){return!!(u.flags&12)&&!!u.antecedent}function R(u){return!!(u.flags&Ke)}function $(u){return!!(u.flags&st)}function K(u){let Ne=[];for(let Me of u.edges)Me.source===u&&Ne.push(Me.target);return Ne}function xe(u){let Ne=[];for(let Me of u.edges)Me.target===u&&Ne.push(Me.source);return Ne}function Se(u,Ne){let Me=fe(u),U=Dt[Me];if(U&&Ne.has(u))return U.circular=!0,U={id:-1,flowNode:u,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:"circularity"},Tt.push(U),U;if(Ne.add(u),!U)if(Dt[Me]=U={id:Me,flowNode:u,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:!1},Tt.push(U),Si(u))for(let ze of u.antecedent)we(U,ze,Ne);else R(u)&&we(U,u.antecedent,Ne);return Ne.delete(u),U}function we(u,Ne,Me){let U=Se(Ne,Me),ze={source:u,target:U};ut.push(ze),u.edges.push(ze),U.edges.push(ze)}function be(u){if(u.level!==-1)return u.level;let Ne=0;for(let Me of xe(u))Ne=Math.max(Ne,be(Me)+1);return u.level=Ne}function We(u){let Ne=0;for(let Me of K(u))Ne=Math.max(Ne,We(Me));return Ne+1}function Ze(u){let Ne=J(Array(u),0);for(let Me of Tt)Ne[Me.level]=Math.max(Ne[Me.level],Me.text.length);return Ne}function Ye(u,Ne){if(u.lane===-1){u.lane=Ne,u.endLane=Ne;let Me=K(u);for(let U=0;U0&&Ne++;let ze=Me[U];Ye(ze,Ne),ze.endLane>u.endLane&&(Ne=ze.endLane)}u.endLane=Ne}}function Ee(u){if(u&2)return"Start";if(u&4)return"Branch";if(u&8)return"Loop";if(u&16)return"Assignment";if(u&32)return"True";if(u&64)return"False";if(u&128)return"SwitchClause";if(u&256)return"ArrayMutation";if(u&512)return"Call";if(u&1024)return"ReduceLabel";if(u&1)return"Unreachable";throw new Error}function Tn(u){let Ne=hi(u);return Ud(Ne,u,!1)}function rt(u,Ne){let Me=Ee(u.flags);if(Ne&&(Me=`${Me}#${fe(u)}`),Wn(u)){let U=[],{switchStatement:ze,clauseStart:an,clauseEnd:Ve}=u.node;for(let $e=an;$eVe.lane)+1,Me=J(Array(Ne),""),U=Mn.map(()=>Array(Ne)),ze=Mn.map(()=>J(Array(Ne),0));for(let Ve of Tt){U[Ve.level][Ve.lane]=Ve;let $e=K(Ve);for(let kt=0;kt<$e.length;kt++){let Nt=$e[kt],qt=8;Nt.lane===Ve.lane&&(qt|=4),kt>0&&(qt|=1),kt<$e.length-1&&(qt|=2),ze[Ve.level][Nt.lane]|=qt}$e.length===0&&(ze[Ve.level][Ve.lane]|=16);let Pt=xe(Ve);for(let kt=0;kt0&&(qt|=1),kt0?ze[Ve-1][$e]:0,kt=$e>0?ze[Ve][$e-1]:0,Nt=ze[Ve][$e];Nt||(Pt&8&&(Nt|=12),kt&2&&(Nt|=3),ze[Ve][$e]=Nt)}for(let Ve=0;Ve0?u.repeat(Ne):"";let Me="";for(;Me.length{},Dy=()=>{},_l,Ie=(e=>(e[e.Unknown=0]="Unknown",e[e.EndOfFileToken=1]="EndOfFileToken",e[e.SingleLineCommentTrivia=2]="SingleLineCommentTrivia",e[e.MultiLineCommentTrivia=3]="MultiLineCommentTrivia",e[e.NewLineTrivia=4]="NewLineTrivia",e[e.WhitespaceTrivia=5]="WhitespaceTrivia",e[e.ShebangTrivia=6]="ShebangTrivia",e[e.ConflictMarkerTrivia=7]="ConflictMarkerTrivia",e[e.NonTextFileMarkerTrivia=8]="NonTextFileMarkerTrivia",e[e.NumericLiteral=9]="NumericLiteral",e[e.BigIntLiteral=10]="BigIntLiteral",e[e.StringLiteral=11]="StringLiteral",e[e.JsxText=12]="JsxText",e[e.JsxTextAllWhiteSpaces=13]="JsxTextAllWhiteSpaces",e[e.RegularExpressionLiteral=14]="RegularExpressionLiteral",e[e.NoSubstitutionTemplateLiteral=15]="NoSubstitutionTemplateLiteral",e[e.TemplateHead=16]="TemplateHead",e[e.TemplateMiddle=17]="TemplateMiddle",e[e.TemplateTail=18]="TemplateTail",e[e.OpenBraceToken=19]="OpenBraceToken",e[e.CloseBraceToken=20]="CloseBraceToken",e[e.OpenParenToken=21]="OpenParenToken",e[e.CloseParenToken=22]="CloseParenToken",e[e.OpenBracketToken=23]="OpenBracketToken",e[e.CloseBracketToken=24]="CloseBracketToken",e[e.DotToken=25]="DotToken",e[e.DotDotDotToken=26]="DotDotDotToken",e[e.SemicolonToken=27]="SemicolonToken",e[e.CommaToken=28]="CommaToken",e[e.QuestionDotToken=29]="QuestionDotToken",e[e.LessThanToken=30]="LessThanToken",e[e.LessThanSlashToken=31]="LessThanSlashToken",e[e.GreaterThanToken=32]="GreaterThanToken",e[e.LessThanEqualsToken=33]="LessThanEqualsToken",e[e.GreaterThanEqualsToken=34]="GreaterThanEqualsToken",e[e.EqualsEqualsToken=35]="EqualsEqualsToken",e[e.ExclamationEqualsToken=36]="ExclamationEqualsToken",e[e.EqualsEqualsEqualsToken=37]="EqualsEqualsEqualsToken",e[e.ExclamationEqualsEqualsToken=38]="ExclamationEqualsEqualsToken",e[e.EqualsGreaterThanToken=39]="EqualsGreaterThanToken",e[e.PlusToken=40]="PlusToken",e[e.MinusToken=41]="MinusToken",e[e.AsteriskToken=42]="AsteriskToken",e[e.AsteriskAsteriskToken=43]="AsteriskAsteriskToken",e[e.SlashToken=44]="SlashToken",e[e.PercentToken=45]="PercentToken",e[e.PlusPlusToken=46]="PlusPlusToken",e[e.MinusMinusToken=47]="MinusMinusToken",e[e.LessThanLessThanToken=48]="LessThanLessThanToken",e[e.GreaterThanGreaterThanToken=49]="GreaterThanGreaterThanToken",e[e.GreaterThanGreaterThanGreaterThanToken=50]="GreaterThanGreaterThanGreaterThanToken",e[e.AmpersandToken=51]="AmpersandToken",e[e.BarToken=52]="BarToken",e[e.CaretToken=53]="CaretToken",e[e.ExclamationToken=54]="ExclamationToken",e[e.TildeToken=55]="TildeToken",e[e.AmpersandAmpersandToken=56]="AmpersandAmpersandToken",e[e.BarBarToken=57]="BarBarToken",e[e.QuestionToken=58]="QuestionToken",e[e.ColonToken=59]="ColonToken",e[e.AtToken=60]="AtToken",e[e.QuestionQuestionToken=61]="QuestionQuestionToken",e[e.BacktickToken=62]="BacktickToken",e[e.HashToken=63]="HashToken",e[e.EqualsToken=64]="EqualsToken",e[e.PlusEqualsToken=65]="PlusEqualsToken",e[e.MinusEqualsToken=66]="MinusEqualsToken",e[e.AsteriskEqualsToken=67]="AsteriskEqualsToken",e[e.AsteriskAsteriskEqualsToken=68]="AsteriskAsteriskEqualsToken",e[e.SlashEqualsToken=69]="SlashEqualsToken",e[e.PercentEqualsToken=70]="PercentEqualsToken",e[e.LessThanLessThanEqualsToken=71]="LessThanLessThanEqualsToken",e[e.GreaterThanGreaterThanEqualsToken=72]="GreaterThanGreaterThanEqualsToken",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=73]="GreaterThanGreaterThanGreaterThanEqualsToken",e[e.AmpersandEqualsToken=74]="AmpersandEqualsToken",e[e.BarEqualsToken=75]="BarEqualsToken",e[e.BarBarEqualsToken=76]="BarBarEqualsToken",e[e.AmpersandAmpersandEqualsToken=77]="AmpersandAmpersandEqualsToken",e[e.QuestionQuestionEqualsToken=78]="QuestionQuestionEqualsToken",e[e.CaretEqualsToken=79]="CaretEqualsToken",e[e.Identifier=80]="Identifier",e[e.PrivateIdentifier=81]="PrivateIdentifier",e[e.JSDocCommentTextToken=82]="JSDocCommentTextToken",e[e.BreakKeyword=83]="BreakKeyword",e[e.CaseKeyword=84]="CaseKeyword",e[e.CatchKeyword=85]="CatchKeyword",e[e.ClassKeyword=86]="ClassKeyword",e[e.ConstKeyword=87]="ConstKeyword",e[e.ContinueKeyword=88]="ContinueKeyword",e[e.DebuggerKeyword=89]="DebuggerKeyword",e[e.DefaultKeyword=90]="DefaultKeyword",e[e.DeleteKeyword=91]="DeleteKeyword",e[e.DoKeyword=92]="DoKeyword",e[e.ElseKeyword=93]="ElseKeyword",e[e.EnumKeyword=94]="EnumKeyword",e[e.ExportKeyword=95]="ExportKeyword",e[e.ExtendsKeyword=96]="ExtendsKeyword",e[e.FalseKeyword=97]="FalseKeyword",e[e.FinallyKeyword=98]="FinallyKeyword",e[e.ForKeyword=99]="ForKeyword",e[e.FunctionKeyword=100]="FunctionKeyword",e[e.IfKeyword=101]="IfKeyword",e[e.ImportKeyword=102]="ImportKeyword",e[e.InKeyword=103]="InKeyword",e[e.InstanceOfKeyword=104]="InstanceOfKeyword",e[e.NewKeyword=105]="NewKeyword",e[e.NullKeyword=106]="NullKeyword",e[e.ReturnKeyword=107]="ReturnKeyword",e[e.SuperKeyword=108]="SuperKeyword",e[e.SwitchKeyword=109]="SwitchKeyword",e[e.ThisKeyword=110]="ThisKeyword",e[e.ThrowKeyword=111]="ThrowKeyword",e[e.TrueKeyword=112]="TrueKeyword",e[e.TryKeyword=113]="TryKeyword",e[e.TypeOfKeyword=114]="TypeOfKeyword",e[e.VarKeyword=115]="VarKeyword",e[e.VoidKeyword=116]="VoidKeyword",e[e.WhileKeyword=117]="WhileKeyword",e[e.WithKeyword=118]="WithKeyword",e[e.ImplementsKeyword=119]="ImplementsKeyword",e[e.InterfaceKeyword=120]="InterfaceKeyword",e[e.LetKeyword=121]="LetKeyword",e[e.PackageKeyword=122]="PackageKeyword",e[e.PrivateKeyword=123]="PrivateKeyword",e[e.ProtectedKeyword=124]="ProtectedKeyword",e[e.PublicKeyword=125]="PublicKeyword",e[e.StaticKeyword=126]="StaticKeyword",e[e.YieldKeyword=127]="YieldKeyword",e[e.AbstractKeyword=128]="AbstractKeyword",e[e.AccessorKeyword=129]="AccessorKeyword",e[e.AsKeyword=130]="AsKeyword",e[e.AssertsKeyword=131]="AssertsKeyword",e[e.AssertKeyword=132]="AssertKeyword",e[e.AnyKeyword=133]="AnyKeyword",e[e.AsyncKeyword=134]="AsyncKeyword",e[e.AwaitKeyword=135]="AwaitKeyword",e[e.BooleanKeyword=136]="BooleanKeyword",e[e.ConstructorKeyword=137]="ConstructorKeyword",e[e.DeclareKeyword=138]="DeclareKeyword",e[e.GetKeyword=139]="GetKeyword",e[e.InferKeyword=140]="InferKeyword",e[e.IntrinsicKeyword=141]="IntrinsicKeyword",e[e.IsKeyword=142]="IsKeyword",e[e.KeyOfKeyword=143]="KeyOfKeyword",e[e.ModuleKeyword=144]="ModuleKeyword",e[e.NamespaceKeyword=145]="NamespaceKeyword",e[e.NeverKeyword=146]="NeverKeyword",e[e.OutKeyword=147]="OutKeyword",e[e.ReadonlyKeyword=148]="ReadonlyKeyword",e[e.RequireKeyword=149]="RequireKeyword",e[e.NumberKeyword=150]="NumberKeyword",e[e.ObjectKeyword=151]="ObjectKeyword",e[e.SatisfiesKeyword=152]="SatisfiesKeyword",e[e.SetKeyword=153]="SetKeyword",e[e.StringKeyword=154]="StringKeyword",e[e.SymbolKeyword=155]="SymbolKeyword",e[e.TypeKeyword=156]="TypeKeyword",e[e.UndefinedKeyword=157]="UndefinedKeyword",e[e.UniqueKeyword=158]="UniqueKeyword",e[e.UnknownKeyword=159]="UnknownKeyword",e[e.UsingKeyword=160]="UsingKeyword",e[e.FromKeyword=161]="FromKeyword",e[e.GlobalKeyword=162]="GlobalKeyword",e[e.BigIntKeyword=163]="BigIntKeyword",e[e.OverrideKeyword=164]="OverrideKeyword",e[e.OfKeyword=165]="OfKeyword",e[e.QualifiedName=166]="QualifiedName",e[e.ComputedPropertyName=167]="ComputedPropertyName",e[e.TypeParameter=168]="TypeParameter",e[e.Parameter=169]="Parameter",e[e.Decorator=170]="Decorator",e[e.PropertySignature=171]="PropertySignature",e[e.PropertyDeclaration=172]="PropertyDeclaration",e[e.MethodSignature=173]="MethodSignature",e[e.MethodDeclaration=174]="MethodDeclaration",e[e.ClassStaticBlockDeclaration=175]="ClassStaticBlockDeclaration",e[e.Constructor=176]="Constructor",e[e.GetAccessor=177]="GetAccessor",e[e.SetAccessor=178]="SetAccessor",e[e.CallSignature=179]="CallSignature",e[e.ConstructSignature=180]="ConstructSignature",e[e.IndexSignature=181]="IndexSignature",e[e.TypePredicate=182]="TypePredicate",e[e.TypeReference=183]="TypeReference",e[e.FunctionType=184]="FunctionType",e[e.ConstructorType=185]="ConstructorType",e[e.TypeQuery=186]="TypeQuery",e[e.TypeLiteral=187]="TypeLiteral",e[e.ArrayType=188]="ArrayType",e[e.TupleType=189]="TupleType",e[e.OptionalType=190]="OptionalType",e[e.RestType=191]="RestType",e[e.UnionType=192]="UnionType",e[e.IntersectionType=193]="IntersectionType",e[e.ConditionalType=194]="ConditionalType",e[e.InferType=195]="InferType",e[e.ParenthesizedType=196]="ParenthesizedType",e[e.ThisType=197]="ThisType",e[e.TypeOperator=198]="TypeOperator",e[e.IndexedAccessType=199]="IndexedAccessType",e[e.MappedType=200]="MappedType",e[e.LiteralType=201]="LiteralType",e[e.NamedTupleMember=202]="NamedTupleMember",e[e.TemplateLiteralType=203]="TemplateLiteralType",e[e.TemplateLiteralTypeSpan=204]="TemplateLiteralTypeSpan",e[e.ImportType=205]="ImportType",e[e.ObjectBindingPattern=206]="ObjectBindingPattern",e[e.ArrayBindingPattern=207]="ArrayBindingPattern",e[e.BindingElement=208]="BindingElement",e[e.ArrayLiteralExpression=209]="ArrayLiteralExpression",e[e.ObjectLiteralExpression=210]="ObjectLiteralExpression",e[e.PropertyAccessExpression=211]="PropertyAccessExpression",e[e.ElementAccessExpression=212]="ElementAccessExpression",e[e.CallExpression=213]="CallExpression",e[e.NewExpression=214]="NewExpression",e[e.TaggedTemplateExpression=215]="TaggedTemplateExpression",e[e.TypeAssertionExpression=216]="TypeAssertionExpression",e[e.ParenthesizedExpression=217]="ParenthesizedExpression",e[e.FunctionExpression=218]="FunctionExpression",e[e.ArrowFunction=219]="ArrowFunction",e[e.DeleteExpression=220]="DeleteExpression",e[e.TypeOfExpression=221]="TypeOfExpression",e[e.VoidExpression=222]="VoidExpression",e[e.AwaitExpression=223]="AwaitExpression",e[e.PrefixUnaryExpression=224]="PrefixUnaryExpression",e[e.PostfixUnaryExpression=225]="PostfixUnaryExpression",e[e.BinaryExpression=226]="BinaryExpression",e[e.ConditionalExpression=227]="ConditionalExpression",e[e.TemplateExpression=228]="TemplateExpression",e[e.YieldExpression=229]="YieldExpression",e[e.SpreadElement=230]="SpreadElement",e[e.ClassExpression=231]="ClassExpression",e[e.OmittedExpression=232]="OmittedExpression",e[e.ExpressionWithTypeArguments=233]="ExpressionWithTypeArguments",e[e.AsExpression=234]="AsExpression",e[e.NonNullExpression=235]="NonNullExpression",e[e.MetaProperty=236]="MetaProperty",e[e.SyntheticExpression=237]="SyntheticExpression",e[e.SatisfiesExpression=238]="SatisfiesExpression",e[e.TemplateSpan=239]="TemplateSpan",e[e.SemicolonClassElement=240]="SemicolonClassElement",e[e.Block=241]="Block",e[e.EmptyStatement=242]="EmptyStatement",e[e.VariableStatement=243]="VariableStatement",e[e.ExpressionStatement=244]="ExpressionStatement",e[e.IfStatement=245]="IfStatement",e[e.DoStatement=246]="DoStatement",e[e.WhileStatement=247]="WhileStatement",e[e.ForStatement=248]="ForStatement",e[e.ForInStatement=249]="ForInStatement",e[e.ForOfStatement=250]="ForOfStatement",e[e.ContinueStatement=251]="ContinueStatement",e[e.BreakStatement=252]="BreakStatement",e[e.ReturnStatement=253]="ReturnStatement",e[e.WithStatement=254]="WithStatement",e[e.SwitchStatement=255]="SwitchStatement",e[e.LabeledStatement=256]="LabeledStatement",e[e.ThrowStatement=257]="ThrowStatement",e[e.TryStatement=258]="TryStatement",e[e.DebuggerStatement=259]="DebuggerStatement",e[e.VariableDeclaration=260]="VariableDeclaration",e[e.VariableDeclarationList=261]="VariableDeclarationList",e[e.FunctionDeclaration=262]="FunctionDeclaration",e[e.ClassDeclaration=263]="ClassDeclaration",e[e.InterfaceDeclaration=264]="InterfaceDeclaration",e[e.TypeAliasDeclaration=265]="TypeAliasDeclaration",e[e.EnumDeclaration=266]="EnumDeclaration",e[e.ModuleDeclaration=267]="ModuleDeclaration",e[e.ModuleBlock=268]="ModuleBlock",e[e.CaseBlock=269]="CaseBlock",e[e.NamespaceExportDeclaration=270]="NamespaceExportDeclaration",e[e.ImportEqualsDeclaration=271]="ImportEqualsDeclaration",e[e.ImportDeclaration=272]="ImportDeclaration",e[e.ImportClause=273]="ImportClause",e[e.NamespaceImport=274]="NamespaceImport",e[e.NamedImports=275]="NamedImports",e[e.ImportSpecifier=276]="ImportSpecifier",e[e.ExportAssignment=277]="ExportAssignment",e[e.ExportDeclaration=278]="ExportDeclaration",e[e.NamedExports=279]="NamedExports",e[e.NamespaceExport=280]="NamespaceExport",e[e.ExportSpecifier=281]="ExportSpecifier",e[e.MissingDeclaration=282]="MissingDeclaration",e[e.ExternalModuleReference=283]="ExternalModuleReference",e[e.JsxElement=284]="JsxElement",e[e.JsxSelfClosingElement=285]="JsxSelfClosingElement",e[e.JsxOpeningElement=286]="JsxOpeningElement",e[e.JsxClosingElement=287]="JsxClosingElement",e[e.JsxFragment=288]="JsxFragment",e[e.JsxOpeningFragment=289]="JsxOpeningFragment",e[e.JsxClosingFragment=290]="JsxClosingFragment",e[e.JsxAttribute=291]="JsxAttribute",e[e.JsxAttributes=292]="JsxAttributes",e[e.JsxSpreadAttribute=293]="JsxSpreadAttribute",e[e.JsxExpression=294]="JsxExpression",e[e.JsxNamespacedName=295]="JsxNamespacedName",e[e.CaseClause=296]="CaseClause",e[e.DefaultClause=297]="DefaultClause",e[e.HeritageClause=298]="HeritageClause",e[e.CatchClause=299]="CatchClause",e[e.ImportAttributes=300]="ImportAttributes",e[e.ImportAttribute=301]="ImportAttribute",e[e.AssertClause=300]="AssertClause",e[e.AssertEntry=301]="AssertEntry",e[e.ImportTypeAssertionContainer=302]="ImportTypeAssertionContainer",e[e.PropertyAssignment=303]="PropertyAssignment",e[e.ShorthandPropertyAssignment=304]="ShorthandPropertyAssignment",e[e.SpreadAssignment=305]="SpreadAssignment",e[e.EnumMember=306]="EnumMember",e[e.SourceFile=307]="SourceFile",e[e.Bundle=308]="Bundle",e[e.JSDocTypeExpression=309]="JSDocTypeExpression",e[e.JSDocNameReference=310]="JSDocNameReference",e[e.JSDocMemberName=311]="JSDocMemberName",e[e.JSDocAllType=312]="JSDocAllType",e[e.JSDocUnknownType=313]="JSDocUnknownType",e[e.JSDocNullableType=314]="JSDocNullableType",e[e.JSDocNonNullableType=315]="JSDocNonNullableType",e[e.JSDocOptionalType=316]="JSDocOptionalType",e[e.JSDocFunctionType=317]="JSDocFunctionType",e[e.JSDocVariadicType=318]="JSDocVariadicType",e[e.JSDocNamepathType=319]="JSDocNamepathType",e[e.JSDoc=320]="JSDoc",e[e.JSDocComment=320]="JSDocComment",e[e.JSDocText=321]="JSDocText",e[e.JSDocTypeLiteral=322]="JSDocTypeLiteral",e[e.JSDocSignature=323]="JSDocSignature",e[e.JSDocLink=324]="JSDocLink",e[e.JSDocLinkCode=325]="JSDocLinkCode",e[e.JSDocLinkPlain=326]="JSDocLinkPlain",e[e.JSDocTag=327]="JSDocTag",e[e.JSDocAugmentsTag=328]="JSDocAugmentsTag",e[e.JSDocImplementsTag=329]="JSDocImplementsTag",e[e.JSDocAuthorTag=330]="JSDocAuthorTag",e[e.JSDocDeprecatedTag=331]="JSDocDeprecatedTag",e[e.JSDocClassTag=332]="JSDocClassTag",e[e.JSDocPublicTag=333]="JSDocPublicTag",e[e.JSDocPrivateTag=334]="JSDocPrivateTag",e[e.JSDocProtectedTag=335]="JSDocProtectedTag",e[e.JSDocReadonlyTag=336]="JSDocReadonlyTag",e[e.JSDocOverrideTag=337]="JSDocOverrideTag",e[e.JSDocCallbackTag=338]="JSDocCallbackTag",e[e.JSDocOverloadTag=339]="JSDocOverloadTag",e[e.JSDocEnumTag=340]="JSDocEnumTag",e[e.JSDocParameterTag=341]="JSDocParameterTag",e[e.JSDocReturnTag=342]="JSDocReturnTag",e[e.JSDocThisTag=343]="JSDocThisTag",e[e.JSDocTypeTag=344]="JSDocTypeTag",e[e.JSDocTemplateTag=345]="JSDocTemplateTag",e[e.JSDocTypedefTag=346]="JSDocTypedefTag",e[e.JSDocSeeTag=347]="JSDocSeeTag",e[e.JSDocPropertyTag=348]="JSDocPropertyTag",e[e.JSDocThrowsTag=349]="JSDocThrowsTag",e[e.JSDocSatisfiesTag=350]="JSDocSatisfiesTag",e[e.JSDocImportTag=351]="JSDocImportTag",e[e.SyntaxList=352]="SyntaxList",e[e.NotEmittedStatement=353]="NotEmittedStatement",e[e.NotEmittedTypeElement=354]="NotEmittedTypeElement",e[e.PartiallyEmittedExpression=355]="PartiallyEmittedExpression",e[e.CommaListExpression=356]="CommaListExpression",e[e.SyntheticReferenceExpression=357]="SyntheticReferenceExpression",e[e.Count=358]="Count",e[e.FirstAssignment=64]="FirstAssignment",e[e.LastAssignment=79]="LastAssignment",e[e.FirstCompoundAssignment=65]="FirstCompoundAssignment",e[e.LastCompoundAssignment=79]="LastCompoundAssignment",e[e.FirstReservedWord=83]="FirstReservedWord",e[e.LastReservedWord=118]="LastReservedWord",e[e.FirstKeyword=83]="FirstKeyword",e[e.LastKeyword=165]="LastKeyword",e[e.FirstFutureReservedWord=119]="FirstFutureReservedWord",e[e.LastFutureReservedWord=127]="LastFutureReservedWord",e[e.FirstTypeNode=182]="FirstTypeNode",e[e.LastTypeNode=205]="LastTypeNode",e[e.FirstPunctuation=19]="FirstPunctuation",e[e.LastPunctuation=79]="LastPunctuation",e[e.FirstToken=0]="FirstToken",e[e.LastToken=165]="LastToken",e[e.FirstTriviaToken=2]="FirstTriviaToken",e[e.LastTriviaToken=7]="LastTriviaToken",e[e.FirstLiteralToken=9]="FirstLiteralToken",e[e.LastLiteralToken=15]="LastLiteralToken",e[e.FirstTemplateToken=15]="FirstTemplateToken",e[e.LastTemplateToken=18]="LastTemplateToken",e[e.FirstBinaryOperator=30]="FirstBinaryOperator",e[e.LastBinaryOperator=79]="LastBinaryOperator",e[e.FirstStatement=243]="FirstStatement",e[e.LastStatement=259]="LastStatement",e[e.FirstNode=166]="FirstNode",e[e.FirstJSDocNode=309]="FirstJSDocNode",e[e.LastJSDocNode=351]="LastJSDocNode",e[e.FirstJSDocTagNode=327]="FirstJSDocTagNode",e[e.LastJSDocTagNode=351]="LastJSDocTagNode",e[e.FirstContextualKeyword=128]="FirstContextualKeyword",e[e.LastContextualKeyword=165]="LastContextualKeyword",e))(Ie||{}),on=(e=>(e[e.None=0]="None",e[e.Let=1]="Let",e[e.Const=2]="Const",e[e.Using=4]="Using",e[e.AwaitUsing=6]="AwaitUsing",e[e.NestedNamespace=8]="NestedNamespace",e[e.Synthesized=16]="Synthesized",e[e.Namespace=32]="Namespace",e[e.OptionalChain=64]="OptionalChain",e[e.ExportContext=128]="ExportContext",e[e.ContainsThis=256]="ContainsThis",e[e.HasImplicitReturn=512]="HasImplicitReturn",e[e.HasExplicitReturn=1024]="HasExplicitReturn",e[e.GlobalAugmentation=2048]="GlobalAugmentation",e[e.HasAsyncFunctions=4096]="HasAsyncFunctions",e[e.DisallowInContext=8192]="DisallowInContext",e[e.YieldContext=16384]="YieldContext",e[e.DecoratorContext=32768]="DecoratorContext",e[e.AwaitContext=65536]="AwaitContext",e[e.DisallowConditionalTypesContext=131072]="DisallowConditionalTypesContext",e[e.ThisNodeHasError=262144]="ThisNodeHasError",e[e.JavaScriptFile=524288]="JavaScriptFile",e[e.ThisNodeOrAnySubNodesHasError=1048576]="ThisNodeOrAnySubNodesHasError",e[e.HasAggregatedChildData=2097152]="HasAggregatedChildData",e[e.PossiblyContainsDynamicImport=4194304]="PossiblyContainsDynamicImport",e[e.PossiblyContainsImportMeta=8388608]="PossiblyContainsImportMeta",e[e.JSDoc=16777216]="JSDoc",e[e.Ambient=33554432]="Ambient",e[e.InWithStatement=67108864]="InWithStatement",e[e.JsonFile=134217728]="JsonFile",e[e.TypeCached=268435456]="TypeCached",e[e.Deprecated=536870912]="Deprecated",e[e.BlockScoped=7]="BlockScoped",e[e.Constant=6]="Constant",e[e.ReachabilityCheckFlags=1536]="ReachabilityCheckFlags",e[e.ReachabilityAndEmitFlags=5632]="ReachabilityAndEmitFlags",e[e.ContextFlags=101441536]="ContextFlags",e[e.TypeExcludesFlags=81920]="TypeExcludesFlags",e[e.PermanentlySetIncrementalFlags=12582912]="PermanentlySetIncrementalFlags",e[e.IdentifierHasExtendedUnicodeEscape=256]="IdentifierHasExtendedUnicodeEscape",e[e.IdentifierIsInJSDocNamespace=4096]="IdentifierIsInJSDocNamespace",e))(on||{}),Qp=(e=>(e[e.None=0]="None",e[e.Public=1]="Public",e[e.Private=2]="Private",e[e.Protected=4]="Protected",e[e.Readonly=8]="Readonly",e[e.Override=16]="Override",e[e.Export=32]="Export",e[e.Abstract=64]="Abstract",e[e.Ambient=128]="Ambient",e[e.Static=256]="Static",e[e.Accessor=512]="Accessor",e[e.Async=1024]="Async",e[e.Default=2048]="Default",e[e.Const=4096]="Const",e[e.In=8192]="In",e[e.Out=16384]="Out",e[e.Decorator=32768]="Decorator",e[e.Deprecated=65536]="Deprecated",e[e.JSDocPublic=8388608]="JSDocPublic",e[e.JSDocPrivate=16777216]="JSDocPrivate",e[e.JSDocProtected=33554432]="JSDocProtected",e[e.JSDocReadonly=67108864]="JSDocReadonly",e[e.JSDocOverride=134217728]="JSDocOverride",e[e.SyntacticOrJSDocModifiers=31]="SyntacticOrJSDocModifiers",e[e.SyntacticOnlyModifiers=65504]="SyntacticOnlyModifiers",e[e.SyntacticModifiers=65535]="SyntacticModifiers",e[e.JSDocCacheOnlyModifiers=260046848]="JSDocCacheOnlyModifiers",e[e.JSDocOnlyModifiers=65536]="JSDocOnlyModifiers",e[e.NonCacheOnlyModifiers=131071]="NonCacheOnlyModifiers",e[e.HasComputedJSDocModifiers=268435456]="HasComputedJSDocModifiers",e[e.HasComputedFlags=536870912]="HasComputedFlags",e[e.AccessibilityModifier=7]="AccessibilityModifier",e[e.ParameterPropertyModifier=31]="ParameterPropertyModifier",e[e.NonPublicAccessibilityModifier=6]="NonPublicAccessibilityModifier",e[e.TypeScriptModifier=28895]="TypeScriptModifier",e[e.ExportDefault=2080]="ExportDefault",e[e.All=131071]="All",e[e.Modifier=98303]="Modifier",e))(Qp||{});var Pm=(e=>(e[e.None=0]="None",e[e.Succeeded=1]="Succeeded",e[e.Failed=2]="Failed",e[e.ReportsUnmeasurable=8]="ReportsUnmeasurable",e[e.ReportsUnreliable=16]="ReportsUnreliable",e[e.ReportsMask=24]="ReportsMask",e[e.ComplexityOverflow=32]="ComplexityOverflow",e[e.StackDepthOverflow=64]="StackDepthOverflow",e[e.Overflow=96]="Overflow",e))(Pm||{});var Op=(e=>(e[e.Unreachable=1]="Unreachable",e[e.Start=2]="Start",e[e.BranchLabel=4]="BranchLabel",e[e.LoopLabel=8]="LoopLabel",e[e.Assignment=16]="Assignment",e[e.TrueCondition=32]="TrueCondition",e[e.FalseCondition=64]="FalseCondition",e[e.SwitchClause=128]="SwitchClause",e[e.ArrayMutation=256]="ArrayMutation",e[e.Call=512]="Call",e[e.ReduceLabel=1024]="ReduceLabel",e[e.Referenced=2048]="Referenced",e[e.Shared=4096]="Shared",e[e.Label=12]="Label",e[e.Condition=96]="Condition",e))(Op||{});var Kp=(e=>(e[e.None=0]="None",e[e.FunctionScopedVariable=1]="FunctionScopedVariable",e[e.BlockScopedVariable=2]="BlockScopedVariable",e[e.Property=4]="Property",e[e.EnumMember=8]="EnumMember",e[e.Function=16]="Function",e[e.Class=32]="Class",e[e.Interface=64]="Interface",e[e.ConstEnum=128]="ConstEnum",e[e.RegularEnum=256]="RegularEnum",e[e.ValueModule=512]="ValueModule",e[e.NamespaceModule=1024]="NamespaceModule",e[e.TypeLiteral=2048]="TypeLiteral",e[e.ObjectLiteral=4096]="ObjectLiteral",e[e.Method=8192]="Method",e[e.Constructor=16384]="Constructor",e[e.GetAccessor=32768]="GetAccessor",e[e.SetAccessor=65536]="SetAccessor",e[e.Signature=131072]="Signature",e[e.TypeParameter=262144]="TypeParameter",e[e.TypeAlias=524288]="TypeAlias",e[e.ExportValue=1048576]="ExportValue",e[e.Alias=2097152]="Alias",e[e.Prototype=4194304]="Prototype",e[e.ExportStar=8388608]="ExportStar",e[e.Optional=16777216]="Optional",e[e.Transient=33554432]="Transient",e[e.Assignment=67108864]="Assignment",e[e.ModuleExports=134217728]="ModuleExports",e[e.All=-1]="All",e[e.Enum=384]="Enum",e[e.Variable=3]="Variable",e[e.Value=111551]="Value",e[e.Type=788968]="Type",e[e.Namespace=1920]="Namespace",e[e.Module=1536]="Module",e[e.Accessor=98304]="Accessor",e[e.FunctionScopedVariableExcludes=111550]="FunctionScopedVariableExcludes",e[e.BlockScopedVariableExcludes=111551]="BlockScopedVariableExcludes",e[e.ParameterExcludes=111551]="ParameterExcludes",e[e.PropertyExcludes=0]="PropertyExcludes",e[e.EnumMemberExcludes=900095]="EnumMemberExcludes",e[e.FunctionExcludes=110991]="FunctionExcludes",e[e.ClassExcludes=899503]="ClassExcludes",e[e.InterfaceExcludes=788872]="InterfaceExcludes",e[e.RegularEnumExcludes=899327]="RegularEnumExcludes",e[e.ConstEnumExcludes=899967]="ConstEnumExcludes",e[e.ValueModuleExcludes=110735]="ValueModuleExcludes",e[e.NamespaceModuleExcludes=0]="NamespaceModuleExcludes",e[e.MethodExcludes=103359]="MethodExcludes",e[e.GetAccessorExcludes=46015]="GetAccessorExcludes",e[e.SetAccessorExcludes=78783]="SetAccessorExcludes",e[e.AccessorExcludes=13247]="AccessorExcludes",e[e.TypeParameterExcludes=526824]="TypeParameterExcludes",e[e.TypeAliasExcludes=788968]="TypeAliasExcludes",e[e.AliasExcludes=2097152]="AliasExcludes",e[e.ModuleMember=2623475]="ModuleMember",e[e.ExportHasLocal=944]="ExportHasLocal",e[e.BlockScoped=418]="BlockScoped",e[e.PropertyOrAccessor=98308]="PropertyOrAccessor",e[e.ClassMember=106500]="ClassMember",e[e.ExportSupportsDefaultModifier=112]="ExportSupportsDefaultModifier",e[e.ExportDoesNotSupportDefaultModifier=-113]="ExportDoesNotSupportDefaultModifier",e[e.Classifiable=2885600]="Classifiable",e[e.LateBindingContainer=6256]="LateBindingContainer",e))(Kp||{});var Nm=(e=>(e[e.None=0]="None",e[e.TypeChecked=1]="TypeChecked",e[e.LexicalThis=2]="LexicalThis",e[e.CaptureThis=4]="CaptureThis",e[e.CaptureNewTarget=8]="CaptureNewTarget",e[e.SuperInstance=16]="SuperInstance",e[e.SuperStatic=32]="SuperStatic",e[e.ContextChecked=64]="ContextChecked",e[e.MethodWithSuperPropertyAccessInAsync=128]="MethodWithSuperPropertyAccessInAsync",e[e.MethodWithSuperPropertyAssignmentInAsync=256]="MethodWithSuperPropertyAssignmentInAsync",e[e.CaptureArguments=512]="CaptureArguments",e[e.EnumValuesComputed=1024]="EnumValuesComputed",e[e.LexicalModuleMergesWithClass=2048]="LexicalModuleMergesWithClass",e[e.LoopWithCapturedBlockScopedBinding=4096]="LoopWithCapturedBlockScopedBinding",e[e.ContainsCapturedBlockScopeBinding=8192]="ContainsCapturedBlockScopeBinding",e[e.CapturedBlockScopedBinding=16384]="CapturedBlockScopedBinding",e[e.BlockScopedBindingInLoop=32768]="BlockScopedBindingInLoop",e[e.NeedsLoopOutParameter=65536]="NeedsLoopOutParameter",e[e.AssignmentsMarked=131072]="AssignmentsMarked",e[e.ContainsConstructorReference=262144]="ContainsConstructorReference",e[e.ConstructorReference=536870912]="ConstructorReference",e[e.ContainsClassWithPrivateIdentifiers=1048576]="ContainsClassWithPrivateIdentifiers",e[e.ContainsSuperPropertyInStaticInitializer=2097152]="ContainsSuperPropertyInStaticInitializer",e[e.InCheckIdentifier=4194304]="InCheckIdentifier",e[e.PartiallyTypeChecked=8388608]="PartiallyTypeChecked",e[e.LazyFlags=539358128]="LazyFlags",e))(Nm||{}),nn=(e=>(e[e.Any=1]="Any",e[e.Unknown=2]="Unknown",e[e.String=4]="String",e[e.Number=8]="Number",e[e.Boolean=16]="Boolean",e[e.Enum=32]="Enum",e[e.BigInt=64]="BigInt",e[e.StringLiteral=128]="StringLiteral",e[e.NumberLiteral=256]="NumberLiteral",e[e.BooleanLiteral=512]="BooleanLiteral",e[e.EnumLiteral=1024]="EnumLiteral",e[e.BigIntLiteral=2048]="BigIntLiteral",e[e.ESSymbol=4096]="ESSymbol",e[e.UniqueESSymbol=8192]="UniqueESSymbol",e[e.Void=16384]="Void",e[e.Undefined=32768]="Undefined",e[e.Null=65536]="Null",e[e.Never=131072]="Never",e[e.TypeParameter=262144]="TypeParameter",e[e.Object=524288]="Object",e[e.Union=1048576]="Union",e[e.Intersection=2097152]="Intersection",e[e.Index=4194304]="Index",e[e.IndexedAccess=8388608]="IndexedAccess",e[e.Conditional=16777216]="Conditional",e[e.Substitution=33554432]="Substitution",e[e.NonPrimitive=67108864]="NonPrimitive",e[e.TemplateLiteral=134217728]="TemplateLiteral",e[e.StringMapping=268435456]="StringMapping",e[e.Reserved1=536870912]="Reserved1",e[e.Reserved2=1073741824]="Reserved2",e[e.AnyOrUnknown=3]="AnyOrUnknown",e[e.Nullable=98304]="Nullable",e[e.Literal=2944]="Literal",e[e.Unit=109472]="Unit",e[e.Freshable=2976]="Freshable",e[e.StringOrNumberLiteral=384]="StringOrNumberLiteral",e[e.StringOrNumberLiteralOrUnique=8576]="StringOrNumberLiteralOrUnique",e[e.DefinitelyFalsy=117632]="DefinitelyFalsy",e[e.PossiblyFalsy=117724]="PossiblyFalsy",e[e.Intrinsic=67359327]="Intrinsic",e[e.StringLike=402653316]="StringLike",e[e.NumberLike=296]="NumberLike",e[e.BigIntLike=2112]="BigIntLike",e[e.BooleanLike=528]="BooleanLike",e[e.EnumLike=1056]="EnumLike",e[e.ESSymbolLike=12288]="ESSymbolLike",e[e.VoidLike=49152]="VoidLike",e[e.Primitive=402784252]="Primitive",e[e.DefinitelyNonNullable=470302716]="DefinitelyNonNullable",e[e.DisjointDomains=469892092]="DisjointDomains",e[e.UnionOrIntersection=3145728]="UnionOrIntersection",e[e.StructuredType=3670016]="StructuredType",e[e.TypeVariable=8650752]="TypeVariable",e[e.InstantiableNonPrimitive=58982400]="InstantiableNonPrimitive",e[e.InstantiablePrimitive=406847488]="InstantiablePrimitive",e[e.Instantiable=465829888]="Instantiable",e[e.StructuredOrInstantiable=469499904]="StructuredOrInstantiable",e[e.ObjectFlagsType=3899393]="ObjectFlagsType",e[e.Simplifiable=25165824]="Simplifiable",e[e.Singleton=67358815]="Singleton",e[e.Narrowable=536624127]="Narrowable",e[e.IncludesMask=473694207]="IncludesMask",e[e.IncludesMissingType=262144]="IncludesMissingType",e[e.IncludesNonWideningType=4194304]="IncludesNonWideningType",e[e.IncludesWildcard=8388608]="IncludesWildcard",e[e.IncludesEmptyObject=16777216]="IncludesEmptyObject",e[e.IncludesInstantiable=33554432]="IncludesInstantiable",e[e.IncludesConstrainedTypeVariable=536870912]="IncludesConstrainedTypeVariable",e[e.IncludesError=1073741824]="IncludesError",e[e.NotPrimitiveUnion=36323331]="NotPrimitiveUnion",e))(nn||{}),Zp=(e=>(e[e.None=0]="None",e[e.Class=1]="Class",e[e.Interface=2]="Interface",e[e.Reference=4]="Reference",e[e.Tuple=8]="Tuple",e[e.Anonymous=16]="Anonymous",e[e.Mapped=32]="Mapped",e[e.Instantiated=64]="Instantiated",e[e.ObjectLiteral=128]="ObjectLiteral",e[e.EvolvingArray=256]="EvolvingArray",e[e.ObjectLiteralPatternWithComputedProperties=512]="ObjectLiteralPatternWithComputedProperties",e[e.ReverseMapped=1024]="ReverseMapped",e[e.JsxAttributes=2048]="JsxAttributes",e[e.JSLiteral=4096]="JSLiteral",e[e.FreshLiteral=8192]="FreshLiteral",e[e.ArrayLiteral=16384]="ArrayLiteral",e[e.PrimitiveUnion=32768]="PrimitiveUnion",e[e.ContainsWideningType=65536]="ContainsWideningType",e[e.ContainsObjectOrArrayLiteral=131072]="ContainsObjectOrArrayLiteral",e[e.NonInferrableType=262144]="NonInferrableType",e[e.CouldContainTypeVariablesComputed=524288]="CouldContainTypeVariablesComputed",e[e.CouldContainTypeVariables=1048576]="CouldContainTypeVariables",e[e.ClassOrInterface=3]="ClassOrInterface",e[e.RequiresWidening=196608]="RequiresWidening",e[e.PropagatingFlags=458752]="PropagatingFlags",e[e.InstantiatedMapped=96]="InstantiatedMapped",e[e.ObjectTypeKindMask=1343]="ObjectTypeKindMask",e[e.ContainsSpread=2097152]="ContainsSpread",e[e.ObjectRestType=4194304]="ObjectRestType",e[e.InstantiationExpressionType=8388608]="InstantiationExpressionType",e[e.SingleSignatureType=134217728]="SingleSignatureType",e[e.IsClassInstanceClone=16777216]="IsClassInstanceClone",e[e.IdenticalBaseTypeCalculated=33554432]="IdenticalBaseTypeCalculated",e[e.IdenticalBaseTypeExists=67108864]="IdenticalBaseTypeExists",e[e.IsGenericTypeComputed=2097152]="IsGenericTypeComputed",e[e.IsGenericObjectType=4194304]="IsGenericObjectType",e[e.IsGenericIndexType=8388608]="IsGenericIndexType",e[e.IsGenericType=12582912]="IsGenericType",e[e.ContainsIntersections=16777216]="ContainsIntersections",e[e.IsUnknownLikeUnionComputed=33554432]="IsUnknownLikeUnionComputed",e[e.IsUnknownLikeUnion=67108864]="IsUnknownLikeUnion",e[e.IsNeverIntersectionComputed=16777216]="IsNeverIntersectionComputed",e[e.IsNeverIntersection=33554432]="IsNeverIntersection",e[e.IsConstrainedTypeVariable=67108864]="IsConstrainedTypeVariable",e))(Zp||{});var Im=(e=>(e[e.None=0]="None",e[e.HasRestParameter=1]="HasRestParameter",e[e.HasLiteralTypes=2]="HasLiteralTypes",e[e.Abstract=4]="Abstract",e[e.IsInnerCallChain=8]="IsInnerCallChain",e[e.IsOuterCallChain=16]="IsOuterCallChain",e[e.IsUntypedSignatureInJSFile=32]="IsUntypedSignatureInJSFile",e[e.IsNonInferrable=64]="IsNonInferrable",e[e.IsSignatureCandidateForOverloadFailure=128]="IsSignatureCandidateForOverloadFailure",e[e.PropagatingFlags=167]="PropagatingFlags",e[e.CallChainFlags=24]="CallChainFlags",e))(Im||{});var Dr=(e=>(e[e.Unknown=0]="Unknown",e[e.JS=1]="JS",e[e.JSX=2]="JSX",e[e.TS=3]="TS",e[e.TSX=4]="TSX",e[e.External=5]="External",e[e.JSON=6]="JSON",e[e.Deferred=7]="Deferred",e))(Dr||{}),ys=(e=>(e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ES2020=7]="ES2020",e[e.ES2021=8]="ES2021",e[e.ES2022=9]="ES2022",e[e.ES2023=10]="ES2023",e[e.ES2024=11]="ES2024",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest",e))(ys||{}),Tl=(e=>(e[e.Standard=0]="Standard",e[e.JSX=1]="JSX",e))(Tl||{});var Nn=(e=>(e.Ts=".ts",e.Tsx=".tsx",e.Dts=".d.ts",e.Js=".js",e.Jsx=".jsx",e.Json=".json",e.TsBuildInfo=".tsbuildinfo",e.Mjs=".mjs",e.Mts=".mts",e.Dmts=".d.mts",e.Cjs=".cjs",e.Cts=".cts",e.Dcts=".d.cts",e))(Nn||{}),Om=(e=>(e[e.None=0]="None",e[e.ContainsTypeScript=1]="ContainsTypeScript",e[e.ContainsJsx=2]="ContainsJsx",e[e.ContainsESNext=4]="ContainsESNext",e[e.ContainsES2022=8]="ContainsES2022",e[e.ContainsES2021=16]="ContainsES2021",e[e.ContainsES2020=32]="ContainsES2020",e[e.ContainsES2019=64]="ContainsES2019",e[e.ContainsES2018=128]="ContainsES2018",e[e.ContainsES2017=256]="ContainsES2017",e[e.ContainsES2016=512]="ContainsES2016",e[e.ContainsES2015=1024]="ContainsES2015",e[e.ContainsGenerator=2048]="ContainsGenerator",e[e.ContainsDestructuringAssignment=4096]="ContainsDestructuringAssignment",e[e.ContainsTypeScriptClassSyntax=8192]="ContainsTypeScriptClassSyntax",e[e.ContainsLexicalThis=16384]="ContainsLexicalThis",e[e.ContainsRestOrSpread=32768]="ContainsRestOrSpread",e[e.ContainsObjectRestOrSpread=65536]="ContainsObjectRestOrSpread",e[e.ContainsComputedPropertyName=131072]="ContainsComputedPropertyName",e[e.ContainsBlockScopedBinding=262144]="ContainsBlockScopedBinding",e[e.ContainsBindingPattern=524288]="ContainsBindingPattern",e[e.ContainsYield=1048576]="ContainsYield",e[e.ContainsAwait=2097152]="ContainsAwait",e[e.ContainsHoistedDeclarationOrCompletion=4194304]="ContainsHoistedDeclarationOrCompletion",e[e.ContainsDynamicImport=8388608]="ContainsDynamicImport",e[e.ContainsClassFields=16777216]="ContainsClassFields",e[e.ContainsDecorators=33554432]="ContainsDecorators",e[e.ContainsPossibleTopLevelAwait=67108864]="ContainsPossibleTopLevelAwait",e[e.ContainsLexicalSuper=134217728]="ContainsLexicalSuper",e[e.ContainsUpdateExpressionForIdentifier=268435456]="ContainsUpdateExpressionForIdentifier",e[e.ContainsPrivateIdentifierInExpression=536870912]="ContainsPrivateIdentifierInExpression",e[e.HasComputedFlags=-2147483648]="HasComputedFlags",e[e.AssertTypeScript=1]="AssertTypeScript",e[e.AssertJsx=2]="AssertJsx",e[e.AssertESNext=4]="AssertESNext",e[e.AssertES2022=8]="AssertES2022",e[e.AssertES2021=16]="AssertES2021",e[e.AssertES2020=32]="AssertES2020",e[e.AssertES2019=64]="AssertES2019",e[e.AssertES2018=128]="AssertES2018",e[e.AssertES2017=256]="AssertES2017",e[e.AssertES2016=512]="AssertES2016",e[e.AssertES2015=1024]="AssertES2015",e[e.AssertGenerator=2048]="AssertGenerator",e[e.AssertDestructuringAssignment=4096]="AssertDestructuringAssignment",e[e.OuterExpressionExcludes=-2147483648]="OuterExpressionExcludes",e[e.PropertyAccessExcludes=-2147483648]="PropertyAccessExcludes",e[e.NodeExcludes=-2147483648]="NodeExcludes",e[e.ArrowFunctionExcludes=-2072174592]="ArrowFunctionExcludes",e[e.FunctionExcludes=-1937940480]="FunctionExcludes",e[e.ConstructorExcludes=-1937948672]="ConstructorExcludes",e[e.MethodOrAccessorExcludes=-2005057536]="MethodOrAccessorExcludes",e[e.PropertyExcludes=-2013249536]="PropertyExcludes",e[e.ClassExcludes=-2147344384]="ClassExcludes",e[e.ModuleExcludes=-1941676032]="ModuleExcludes",e[e.TypeExcludes=-2]="TypeExcludes",e[e.ObjectLiteralExcludes=-2147278848]="ObjectLiteralExcludes",e[e.ArrayLiteralOrCallOrNewExcludes=-2147450880]="ArrayLiteralOrCallOrNewExcludes",e[e.VariableDeclarationListExcludes=-2146893824]="VariableDeclarationListExcludes",e[e.ParameterExcludes=-2147483648]="ParameterExcludes",e[e.CatchClauseExcludes=-2147418112]="CatchClauseExcludes",e[e.BindingPatternExcludes=-2147450880]="BindingPatternExcludes",e[e.ContainsLexicalThisOrSuper=134234112]="ContainsLexicalThisOrSuper",e[e.PropertyNamePropagatingFlags=134234112]="PropertyNamePropagatingFlags",e))(Om||{}),Mm=(e=>(e[e.TabStop=0]="TabStop",e[e.Placeholder=1]="Placeholder",e[e.Choice=2]="Choice",e[e.Variable=3]="Variable",e))(Mm||{}),Jm=(e=>(e[e.None=0]="None",e[e.SingleLine=1]="SingleLine",e[e.MultiLine=2]="MultiLine",e[e.AdviseOnEmitNode=4]="AdviseOnEmitNode",e[e.NoSubstitution=8]="NoSubstitution",e[e.CapturesThis=16]="CapturesThis",e[e.NoLeadingSourceMap=32]="NoLeadingSourceMap",e[e.NoTrailingSourceMap=64]="NoTrailingSourceMap",e[e.NoSourceMap=96]="NoSourceMap",e[e.NoNestedSourceMaps=128]="NoNestedSourceMaps",e[e.NoTokenLeadingSourceMaps=256]="NoTokenLeadingSourceMaps",e[e.NoTokenTrailingSourceMaps=512]="NoTokenTrailingSourceMaps",e[e.NoTokenSourceMaps=768]="NoTokenSourceMaps",e[e.NoLeadingComments=1024]="NoLeadingComments",e[e.NoTrailingComments=2048]="NoTrailingComments",e[e.NoComments=3072]="NoComments",e[e.NoNestedComments=4096]="NoNestedComments",e[e.HelperName=8192]="HelperName",e[e.ExportName=16384]="ExportName",e[e.LocalName=32768]="LocalName",e[e.InternalName=65536]="InternalName",e[e.Indented=131072]="Indented",e[e.NoIndentation=262144]="NoIndentation",e[e.AsyncFunctionBody=524288]="AsyncFunctionBody",e[e.ReuseTempVariableScope=1048576]="ReuseTempVariableScope",e[e.CustomPrologue=2097152]="CustomPrologue",e[e.NoHoisting=4194304]="NoHoisting",e[e.Iterator=8388608]="Iterator",e[e.NoAsciiEscaping=16777216]="NoAsciiEscaping",e))(Jm||{});var Q_={Classes:2,ForOf:2,Generators:2,Iteration:2,SpreadElements:2,RestElements:2,TaggedTemplates:2,DestructuringAssignment:2,BindingPatterns:2,ArrowFunctions:2,BlockScopedVariables:2,ObjectAssign:2,RegularExpressionFlagsUnicode:2,RegularExpressionFlagsSticky:2,Exponentiation:3,AsyncFunctions:4,ForAwaitOf:5,AsyncGenerators:5,AsyncIteration:5,ObjectSpreadRest:5,RegularExpressionFlagsDotAll:5,BindinglessCatch:6,BigInt:7,NullishCoalesce:7,OptionalChaining:7,LogicalAssignment:8,TopLevelAwait:9,ClassFields:9,PrivateNamesAndClassStaticBlocks:9,RegularExpressionFlagsHasIndices:9,ShebangComments:10,RegularExpressionFlagsUnicodeSets:11,UsingAndAwaitUsing:99,ClassAndClassElementDecorators:99};var Lm={reference:{args:[{name:"types",optional:!0,captureSpan:!0},{name:"lib",optional:!0,captureSpan:!0},{name:"path",optional:!0,captureSpan:!0},{name:"no-default-lib",optional:!0},{name:"resolution-mode",optional:!0},{name:"preserve",optional:!0}],kind:1},"amd-dependency":{args:[{name:"path"},{name:"name",optional:!0}],kind:1},"amd-module":{args:[{name:"name"}],kind:1},"ts-check":{kind:2},"ts-nocheck":{kind:2},jsx:{args:[{name:"factory"}],kind:4},jsxfrag:{args:[{name:"factory"}],kind:4},jsximportsource:{args:[{name:"factory"}],kind:4},jsxruntime:{args:[{name:"factory"}],kind:4}},Ga=(e=>(e[e.ParseAll=0]="ParseAll",e[e.ParseNone=1]="ParseNone",e[e.ParseForTypeErrors=2]="ParseForTypeErrors",e[e.ParseForTypeInfo=3]="ParseForTypeInfo",e))(Ga||{});var Ki="/",Py="\\",Ed="://",Ny=/\\/g;function Iy(e){return e===47||e===92}function Oy(e,t){return e.length>t.length&&ky(e,t)}function ef(e){return e.length>0&&Iy(e.charCodeAt(e.length-1))}function Ad(e){return e>=97&&e<=122||e>=65&&e<=90}function My(e,t){let a=e.charCodeAt(t);if(a===58)return t+1;if(a===37&&e.charCodeAt(t+1)===51){let o=e.charCodeAt(t+2);if(o===97||o===65)return t+3}return-1}function Jy(e){if(!e)return 0;let t=e.charCodeAt(0);if(t===47||t===92){if(e.charCodeAt(1)!==t)return 1;let o=e.indexOf(t===47?Ki:Py,2);return o<0?e.length:o+1}if(Ad(t)&&e.charCodeAt(1)===58){let o=e.charCodeAt(2);if(o===47||o===92)return 3;if(e.length===2)return 2}let a=e.indexOf(Ed);if(a!==-1){let o=a+Ed.length,m=e.indexOf(Ki,o);if(m!==-1){let v=e.slice(0,a),A=e.slice(o,m);if(v==="file"&&(A===""||A==="localhost")&&Ad(e.charCodeAt(m+1))){let P=My(e,m+2);if(P!==-1){if(e.charCodeAt(P)===47)return~(P+1);if(P===e.length)return~P}}return~(m+1)}return~e.length}return 0}function pl(e){let t=Jy(e);return t<0?~t:t}function jm(e,t,a){if(e=fl(e),pl(e)===e.length)return"";e=Um(e);let m=e.slice(Math.max(pl(e),e.lastIndexOf(Ki)+1)),v=t!==void 0&&a!==void 0?Rm(m,t,a):void 0;return v?m.slice(0,m.length-v.length):m}function Cd(e,t,a){if(ul(t,".")||(t="."+t),e.length>=t.length&&e.charCodeAt(e.length-t.length)===46){let o=e.slice(e.length-t.length);if(a(o,t))return o}}function Ly(e,t,a){if(typeof t=="string")return Cd(e,t,a)||"";for(let o of t){let m=Cd(e,o,a);if(m)return m}return""}function Rm(e,t,a){if(t)return Ly(Um(e),t,a?$p:Ty);let o=jm(e),m=o.lastIndexOf(".");return m>=0?o.substring(m):""}function jy(e,t){let a=e.substring(0,t),o=e.substring(t).split(Ki);return o.length&&!Yi(o)&&o.pop(),[a,...o]}function Ry(e,t=""){return e=qy(t,e),jy(e,pl(e))}function Uy(e,t){return e.length===0?"":(e[0]&&tf(e[0]))+e.slice(1,t).join(Ki)}function fl(e){return e.includes("\\")?e.replace(Ny,Ki):e}function By(e){if(!Xt(e))return[];let t=[e[0]];for(let a=1;a1){if(t[t.length-1]!==".."){t.pop();continue}}else if(t[0])continue}t.push(o)}}return t}function qy(e,...t){e&&(e=fl(e));for(let a of t)a&&(a=fl(a),!e||pl(a)!==0?e=a:e=tf(e)+a);return e}function zy(e){if(e=fl(e),!Dd.test(e))return e;let t=e.replace(/\/\.\//g,"/").replace(/^\.\//,"");if(t!==e&&(e=t,!Dd.test(e)))return e;let a=Uy(By(Ry(e)));return a&&ef(e)?tf(a):a}function Um(e){return ef(e)?e.substr(0,e.length-1):e}function tf(e){return ef(e)?e:e+Ki}var Dd=/\/\/|(?:^|\/)\.\.?(?:$|\/)/;function r(e,t,a,o,m,v,A){return{code:e,category:t,key:a,message:o,reportsUnnecessary:m,elidedInCompatabilityPyramid:v,reportsDeprecated:A}}var E={Unterminated_string_literal:r(1002,1,"Unterminated_string_literal_1002","Unterminated string literal."),Identifier_expected:r(1003,1,"Identifier_expected_1003","Identifier expected."),_0_expected:r(1005,1,"_0_expected_1005","'{0}' expected."),A_file_cannot_have_a_reference_to_itself:r(1006,1,"A_file_cannot_have_a_reference_to_itself_1006","A file cannot have a reference to itself."),The_parser_expected_to_find_a_1_to_match_the_0_token_here:r(1007,1,"The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007","The parser expected to find a '{1}' to match the '{0}' token here."),Trailing_comma_not_allowed:r(1009,1,"Trailing_comma_not_allowed_1009","Trailing comma not allowed."),Asterisk_Slash_expected:r(1010,1,"Asterisk_Slash_expected_1010","'*/' expected."),An_element_access_expression_should_take_an_argument:r(1011,1,"An_element_access_expression_should_take_an_argument_1011","An element access expression should take an argument."),Unexpected_token:r(1012,1,"Unexpected_token_1012","Unexpected token."),A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma:r(1013,1,"A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013","A rest parameter or binding pattern may not have a trailing comma."),A_rest_parameter_must_be_last_in_a_parameter_list:r(1014,1,"A_rest_parameter_must_be_last_in_a_parameter_list_1014","A rest parameter must be last in a parameter list."),Parameter_cannot_have_question_mark_and_initializer:r(1015,1,"Parameter_cannot_have_question_mark_and_initializer_1015","Parameter cannot have question mark and initializer."),A_required_parameter_cannot_follow_an_optional_parameter:r(1016,1,"A_required_parameter_cannot_follow_an_optional_parameter_1016","A required parameter cannot follow an optional parameter."),An_index_signature_cannot_have_a_rest_parameter:r(1017,1,"An_index_signature_cannot_have_a_rest_parameter_1017","An index signature cannot have a rest parameter."),An_index_signature_parameter_cannot_have_an_accessibility_modifier:r(1018,1,"An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018","An index signature parameter cannot have an accessibility modifier."),An_index_signature_parameter_cannot_have_a_question_mark:r(1019,1,"An_index_signature_parameter_cannot_have_a_question_mark_1019","An index signature parameter cannot have a question mark."),An_index_signature_parameter_cannot_have_an_initializer:r(1020,1,"An_index_signature_parameter_cannot_have_an_initializer_1020","An index signature parameter cannot have an initializer."),An_index_signature_must_have_a_type_annotation:r(1021,1,"An_index_signature_must_have_a_type_annotation_1021","An index signature must have a type annotation."),An_index_signature_parameter_must_have_a_type_annotation:r(1022,1,"An_index_signature_parameter_must_have_a_type_annotation_1022","An index signature parameter must have a type annotation."),readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature:r(1024,1,"readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024","'readonly' modifier can only appear on a property declaration or index signature."),An_index_signature_cannot_have_a_trailing_comma:r(1025,1,"An_index_signature_cannot_have_a_trailing_comma_1025","An index signature cannot have a trailing comma."),Accessibility_modifier_already_seen:r(1028,1,"Accessibility_modifier_already_seen_1028","Accessibility modifier already seen."),_0_modifier_must_precede_1_modifier:r(1029,1,"_0_modifier_must_precede_1_modifier_1029","'{0}' modifier must precede '{1}' modifier."),_0_modifier_already_seen:r(1030,1,"_0_modifier_already_seen_1030","'{0}' modifier already seen."),_0_modifier_cannot_appear_on_class_elements_of_this_kind:r(1031,1,"_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031","'{0}' modifier cannot appear on class elements of this kind."),super_must_be_followed_by_an_argument_list_or_member_access:r(1034,1,"super_must_be_followed_by_an_argument_list_or_member_access_1034","'super' must be followed by an argument list or member access."),Only_ambient_modules_can_use_quoted_names:r(1035,1,"Only_ambient_modules_can_use_quoted_names_1035","Only ambient modules can use quoted names."),Statements_are_not_allowed_in_ambient_contexts:r(1036,1,"Statements_are_not_allowed_in_ambient_contexts_1036","Statements are not allowed in ambient contexts."),A_declare_modifier_cannot_be_used_in_an_already_ambient_context:r(1038,1,"A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038","A 'declare' modifier cannot be used in an already ambient context."),Initializers_are_not_allowed_in_ambient_contexts:r(1039,1,"Initializers_are_not_allowed_in_ambient_contexts_1039","Initializers are not allowed in ambient contexts."),_0_modifier_cannot_be_used_in_an_ambient_context:r(1040,1,"_0_modifier_cannot_be_used_in_an_ambient_context_1040","'{0}' modifier cannot be used in an ambient context."),_0_modifier_cannot_be_used_here:r(1042,1,"_0_modifier_cannot_be_used_here_1042","'{0}' modifier cannot be used here."),_0_modifier_cannot_appear_on_a_module_or_namespace_element:r(1044,1,"_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044","'{0}' modifier cannot appear on a module or namespace element."),Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier:r(1046,1,"Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046","Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."),A_rest_parameter_cannot_be_optional:r(1047,1,"A_rest_parameter_cannot_be_optional_1047","A rest parameter cannot be optional."),A_rest_parameter_cannot_have_an_initializer:r(1048,1,"A_rest_parameter_cannot_have_an_initializer_1048","A rest parameter cannot have an initializer."),A_set_accessor_must_have_exactly_one_parameter:r(1049,1,"A_set_accessor_must_have_exactly_one_parameter_1049","A 'set' accessor must have exactly one parameter."),A_set_accessor_cannot_have_an_optional_parameter:r(1051,1,"A_set_accessor_cannot_have_an_optional_parameter_1051","A 'set' accessor cannot have an optional parameter."),A_set_accessor_parameter_cannot_have_an_initializer:r(1052,1,"A_set_accessor_parameter_cannot_have_an_initializer_1052","A 'set' accessor parameter cannot have an initializer."),A_set_accessor_cannot_have_rest_parameter:r(1053,1,"A_set_accessor_cannot_have_rest_parameter_1053","A 'set' accessor cannot have rest parameter."),A_get_accessor_cannot_have_parameters:r(1054,1,"A_get_accessor_cannot_have_parameters_1054","A 'get' accessor cannot have parameters."),Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value:r(1055,1,"Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compa_1055","Type '{0}' is not a valid async function return type in ES5 because it does not refer to a Promise-compatible constructor value."),Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher:r(1056,1,"Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056","Accessors are only available when targeting ECMAScript 5 and higher."),The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:r(1058,1,"The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058","The return type of an async function must either be a valid promise or must not contain a callable 'then' member."),A_promise_must_have_a_then_method:r(1059,1,"A_promise_must_have_a_then_method_1059","A promise must have a 'then' method."),The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback:r(1060,1,"The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060","The first parameter of the 'then' method of a promise must be a callback."),Enum_member_must_have_initializer:r(1061,1,"Enum_member_must_have_initializer_1061","Enum member must have initializer."),Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method:r(1062,1,"Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062","Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."),An_export_assignment_cannot_be_used_in_a_namespace:r(1063,1,"An_export_assignment_cannot_be_used_in_a_namespace_1063","An export assignment cannot be used in a namespace."),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0:r(1064,1,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064","The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type:r(1065,1,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1065","The return type of an async function or method must be the global Promise type."),In_ambient_enum_declarations_member_initializer_must_be_constant_expression:r(1066,1,"In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066","In ambient enum declarations member initializer must be constant expression."),Unexpected_token_A_constructor_method_accessor_or_property_was_expected:r(1068,1,"Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068","Unexpected token. A constructor, method, accessor, or property was expected."),Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces:r(1069,1,"Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069","Unexpected token. A type parameter name was expected without curly braces."),_0_modifier_cannot_appear_on_a_type_member:r(1070,1,"_0_modifier_cannot_appear_on_a_type_member_1070","'{0}' modifier cannot appear on a type member."),_0_modifier_cannot_appear_on_an_index_signature:r(1071,1,"_0_modifier_cannot_appear_on_an_index_signature_1071","'{0}' modifier cannot appear on an index signature."),A_0_modifier_cannot_be_used_with_an_import_declaration:r(1079,1,"A_0_modifier_cannot_be_used_with_an_import_declaration_1079","A '{0}' modifier cannot be used with an import declaration."),Invalid_reference_directive_syntax:r(1084,1,"Invalid_reference_directive_syntax_1084","Invalid 'reference' directive syntax."),_0_modifier_cannot_appear_on_a_constructor_declaration:r(1089,1,"_0_modifier_cannot_appear_on_a_constructor_declaration_1089","'{0}' modifier cannot appear on a constructor declaration."),_0_modifier_cannot_appear_on_a_parameter:r(1090,1,"_0_modifier_cannot_appear_on_a_parameter_1090","'{0}' modifier cannot appear on a parameter."),Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:r(1091,1,"Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091","Only a single variable declaration is allowed in a 'for...in' statement."),Type_parameters_cannot_appear_on_a_constructor_declaration:r(1092,1,"Type_parameters_cannot_appear_on_a_constructor_declaration_1092","Type parameters cannot appear on a constructor declaration."),Type_annotation_cannot_appear_on_a_constructor_declaration:r(1093,1,"Type_annotation_cannot_appear_on_a_constructor_declaration_1093","Type annotation cannot appear on a constructor declaration."),An_accessor_cannot_have_type_parameters:r(1094,1,"An_accessor_cannot_have_type_parameters_1094","An accessor cannot have type parameters."),A_set_accessor_cannot_have_a_return_type_annotation:r(1095,1,"A_set_accessor_cannot_have_a_return_type_annotation_1095","A 'set' accessor cannot have a return type annotation."),An_index_signature_must_have_exactly_one_parameter:r(1096,1,"An_index_signature_must_have_exactly_one_parameter_1096","An index signature must have exactly one parameter."),_0_list_cannot_be_empty:r(1097,1,"_0_list_cannot_be_empty_1097","'{0}' list cannot be empty."),Type_parameter_list_cannot_be_empty:r(1098,1,"Type_parameter_list_cannot_be_empty_1098","Type parameter list cannot be empty."),Type_argument_list_cannot_be_empty:r(1099,1,"Type_argument_list_cannot_be_empty_1099","Type argument list cannot be empty."),Invalid_use_of_0_in_strict_mode:r(1100,1,"Invalid_use_of_0_in_strict_mode_1100","Invalid use of '{0}' in strict mode."),with_statements_are_not_allowed_in_strict_mode:r(1101,1,"with_statements_are_not_allowed_in_strict_mode_1101","'with' statements are not allowed in strict mode."),delete_cannot_be_called_on_an_identifier_in_strict_mode:r(1102,1,"delete_cannot_be_called_on_an_identifier_in_strict_mode_1102","'delete' cannot be called on an identifier in strict mode."),for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:r(1103,1,"for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103","'for await' loops are only allowed within async functions and at the top levels of modules."),A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement:r(1104,1,"A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104","A 'continue' statement can only be used within an enclosing iteration statement."),A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:r(1105,1,"A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105","A 'break' statement can only be used within an enclosing iteration or switch statement."),The_left_hand_side_of_a_for_of_statement_may_not_be_async:r(1106,1,"The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106","The left-hand side of a 'for...of' statement may not be 'async'."),Jump_target_cannot_cross_function_boundary:r(1107,1,"Jump_target_cannot_cross_function_boundary_1107","Jump target cannot cross function boundary."),A_return_statement_can_only_be_used_within_a_function_body:r(1108,1,"A_return_statement_can_only_be_used_within_a_function_body_1108","A 'return' statement can only be used within a function body."),Expression_expected:r(1109,1,"Expression_expected_1109","Expression expected."),Type_expected:r(1110,1,"Type_expected_1110","Type expected."),Private_field_0_must_be_declared_in_an_enclosing_class:r(1111,1,"Private_field_0_must_be_declared_in_an_enclosing_class_1111","Private field '{0}' must be declared in an enclosing class."),A_default_clause_cannot_appear_more_than_once_in_a_switch_statement:r(1113,1,"A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113","A 'default' clause cannot appear more than once in a 'switch' statement."),Duplicate_label_0:r(1114,1,"Duplicate_label_0_1114","Duplicate label '{0}'."),A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement:r(1115,1,"A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115","A 'continue' statement can only jump to a label of an enclosing iteration statement."),A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:r(1116,1,"A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116","A 'break' statement can only jump to a label of an enclosing statement."),An_object_literal_cannot_have_multiple_properties_with_the_same_name:r(1117,1,"An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117","An object literal cannot have multiple properties with the same name."),An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name:r(1118,1,"An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118","An object literal cannot have multiple get/set accessors with the same name."),An_object_literal_cannot_have_property_and_accessor_with_the_same_name:r(1119,1,"An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119","An object literal cannot have property and accessor with the same name."),An_export_assignment_cannot_have_modifiers:r(1120,1,"An_export_assignment_cannot_have_modifiers_1120","An export assignment cannot have modifiers."),Octal_literals_are_not_allowed_Use_the_syntax_0:r(1121,1,"Octal_literals_are_not_allowed_Use_the_syntax_0_1121","Octal literals are not allowed. Use the syntax '{0}'."),Variable_declaration_list_cannot_be_empty:r(1123,1,"Variable_declaration_list_cannot_be_empty_1123","Variable declaration list cannot be empty."),Digit_expected:r(1124,1,"Digit_expected_1124","Digit expected."),Hexadecimal_digit_expected:r(1125,1,"Hexadecimal_digit_expected_1125","Hexadecimal digit expected."),Unexpected_end_of_text:r(1126,1,"Unexpected_end_of_text_1126","Unexpected end of text."),Invalid_character:r(1127,1,"Invalid_character_1127","Invalid character."),Declaration_or_statement_expected:r(1128,1,"Declaration_or_statement_expected_1128","Declaration or statement expected."),Statement_expected:r(1129,1,"Statement_expected_1129","Statement expected."),case_or_default_expected:r(1130,1,"case_or_default_expected_1130","'case' or 'default' expected."),Property_or_signature_expected:r(1131,1,"Property_or_signature_expected_1131","Property or signature expected."),Enum_member_expected:r(1132,1,"Enum_member_expected_1132","Enum member expected."),Variable_declaration_expected:r(1134,1,"Variable_declaration_expected_1134","Variable declaration expected."),Argument_expression_expected:r(1135,1,"Argument_expression_expected_1135","Argument expression expected."),Property_assignment_expected:r(1136,1,"Property_assignment_expected_1136","Property assignment expected."),Expression_or_comma_expected:r(1137,1,"Expression_or_comma_expected_1137","Expression or comma expected."),Parameter_declaration_expected:r(1138,1,"Parameter_declaration_expected_1138","Parameter declaration expected."),Type_parameter_declaration_expected:r(1139,1,"Type_parameter_declaration_expected_1139","Type parameter declaration expected."),Type_argument_expected:r(1140,1,"Type_argument_expected_1140","Type argument expected."),String_literal_expected:r(1141,1,"String_literal_expected_1141","String literal expected."),Line_break_not_permitted_here:r(1142,1,"Line_break_not_permitted_here_1142","Line break not permitted here."),or_expected:r(1144,1,"or_expected_1144","'{' or ';' expected."),or_JSX_element_expected:r(1145,1,"or_JSX_element_expected_1145","'{' or JSX element expected."),Declaration_expected:r(1146,1,"Declaration_expected_1146","Declaration expected."),Import_declarations_in_a_namespace_cannot_reference_a_module:r(1147,1,"Import_declarations_in_a_namespace_cannot_reference_a_module_1147","Import declarations in a namespace cannot reference a module."),Cannot_use_imports_exports_or_module_augmentations_when_module_is_none:r(1148,1,"Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148","Cannot use imports, exports, or module augmentations when '--module' is 'none'."),File_name_0_differs_from_already_included_file_name_1_only_in_casing:r(1149,1,"File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149","File name '{0}' differs from already included file name '{1}' only in casing."),_0_declarations_must_be_initialized:r(1155,1,"_0_declarations_must_be_initialized_1155","'{0}' declarations must be initialized."),_0_declarations_can_only_be_declared_inside_a_block:r(1156,1,"_0_declarations_can_only_be_declared_inside_a_block_1156","'{0}' declarations can only be declared inside a block."),Unterminated_template_literal:r(1160,1,"Unterminated_template_literal_1160","Unterminated template literal."),Unterminated_regular_expression_literal:r(1161,1,"Unterminated_regular_expression_literal_1161","Unterminated regular expression literal."),An_object_member_cannot_be_declared_optional:r(1162,1,"An_object_member_cannot_be_declared_optional_1162","An object member cannot be declared optional."),A_yield_expression_is_only_allowed_in_a_generator_body:r(1163,1,"A_yield_expression_is_only_allowed_in_a_generator_body_1163","A 'yield' expression is only allowed in a generator body."),Computed_property_names_are_not_allowed_in_enums:r(1164,1,"Computed_property_names_are_not_allowed_in_enums_1164","Computed property names are not allowed in enums."),A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:r(1165,1,"A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165","A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type:r(1166,1,"A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166","A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type."),A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:r(1168,1,"A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168","A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:r(1169,1,"A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169","A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:r(1170,1,"A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170","A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_comma_expression_is_not_allowed_in_a_computed_property_name:r(1171,1,"A_comma_expression_is_not_allowed_in_a_computed_property_name_1171","A comma expression is not allowed in a computed property name."),extends_clause_already_seen:r(1172,1,"extends_clause_already_seen_1172","'extends' clause already seen."),extends_clause_must_precede_implements_clause:r(1173,1,"extends_clause_must_precede_implements_clause_1173","'extends' clause must precede 'implements' clause."),Classes_can_only_extend_a_single_class:r(1174,1,"Classes_can_only_extend_a_single_class_1174","Classes can only extend a single class."),implements_clause_already_seen:r(1175,1,"implements_clause_already_seen_1175","'implements' clause already seen."),Interface_declaration_cannot_have_implements_clause:r(1176,1,"Interface_declaration_cannot_have_implements_clause_1176","Interface declaration cannot have 'implements' clause."),Binary_digit_expected:r(1177,1,"Binary_digit_expected_1177","Binary digit expected."),Octal_digit_expected:r(1178,1,"Octal_digit_expected_1178","Octal digit expected."),Unexpected_token_expected:r(1179,1,"Unexpected_token_expected_1179","Unexpected token. '{' expected."),Property_destructuring_pattern_expected:r(1180,1,"Property_destructuring_pattern_expected_1180","Property destructuring pattern expected."),Array_element_destructuring_pattern_expected:r(1181,1,"Array_element_destructuring_pattern_expected_1181","Array element destructuring pattern expected."),A_destructuring_declaration_must_have_an_initializer:r(1182,1,"A_destructuring_declaration_must_have_an_initializer_1182","A destructuring declaration must have an initializer."),An_implementation_cannot_be_declared_in_ambient_contexts:r(1183,1,"An_implementation_cannot_be_declared_in_ambient_contexts_1183","An implementation cannot be declared in ambient contexts."),Modifiers_cannot_appear_here:r(1184,1,"Modifiers_cannot_appear_here_1184","Modifiers cannot appear here."),Merge_conflict_marker_encountered:r(1185,1,"Merge_conflict_marker_encountered_1185","Merge conflict marker encountered."),A_rest_element_cannot_have_an_initializer:r(1186,1,"A_rest_element_cannot_have_an_initializer_1186","A rest element cannot have an initializer."),A_parameter_property_may_not_be_declared_using_a_binding_pattern:r(1187,1,"A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187","A parameter property may not be declared using a binding pattern."),Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement:r(1188,1,"Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188","Only a single variable declaration is allowed in a 'for...of' statement."),The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:r(1189,1,"The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189","The variable declaration of a 'for...in' statement cannot have an initializer."),The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer:r(1190,1,"The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190","The variable declaration of a 'for...of' statement cannot have an initializer."),An_import_declaration_cannot_have_modifiers:r(1191,1,"An_import_declaration_cannot_have_modifiers_1191","An import declaration cannot have modifiers."),Module_0_has_no_default_export:r(1192,1,"Module_0_has_no_default_export_1192","Module '{0}' has no default export."),An_export_declaration_cannot_have_modifiers:r(1193,1,"An_export_declaration_cannot_have_modifiers_1193","An export declaration cannot have modifiers."),Export_declarations_are_not_permitted_in_a_namespace:r(1194,1,"Export_declarations_are_not_permitted_in_a_namespace_1194","Export declarations are not permitted in a namespace."),export_Asterisk_does_not_re_export_a_default:r(1195,1,"export_Asterisk_does_not_re_export_a_default_1195","'export *' does not re-export a default."),Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified:r(1196,1,"Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified_1196","Catch clause variable type annotation must be 'any' or 'unknown' if specified."),Catch_clause_variable_cannot_have_an_initializer:r(1197,1,"Catch_clause_variable_cannot_have_an_initializer_1197","Catch clause variable cannot have an initializer."),An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive:r(1198,1,"An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198","An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."),Unterminated_Unicode_escape_sequence:r(1199,1,"Unterminated_Unicode_escape_sequence_1199","Unterminated Unicode escape sequence."),Line_terminator_not_permitted_before_arrow:r(1200,1,"Line_terminator_not_permitted_before_arrow_1200","Line terminator not permitted before arrow."),Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead:r(1202,1,"Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202",`Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.`),Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead:r(1203,1,"Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203","Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."),Re_exporting_a_type_when_0_is_enabled_requires_using_export_type:r(1205,1,"Re_exporting_a_type_when_0_is_enabled_requires_using_export_type_1205","Re-exporting a type when '{0}' is enabled requires using 'export type'."),Decorators_are_not_valid_here:r(1206,1,"Decorators_are_not_valid_here_1206","Decorators are not valid here."),Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name:r(1207,1,"Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207","Decorators cannot be applied to multiple get/set accessors of the same name."),Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0:r(1209,1,"Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209","Invalid optional chain from new expression. Did you mean to call '{0}()'?"),Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode:r(1210,1,"Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210","Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."),A_class_declaration_without_the_default_modifier_must_have_a_name:r(1211,1,"A_class_declaration_without_the_default_modifier_must_have_a_name_1211","A class declaration without the 'default' modifier must have a name."),Identifier_expected_0_is_a_reserved_word_in_strict_mode:r(1212,1,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212","Identifier expected. '{0}' is a reserved word in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode:r(1213,1,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213","Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode:r(1214,1,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214","Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode."),Invalid_use_of_0_Modules_are_automatically_in_strict_mode:r(1215,1,"Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215","Invalid use of '{0}'. Modules are automatically in strict mode."),Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules:r(1216,1,"Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216","Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."),Export_assignment_is_not_supported_when_module_flag_is_system:r(1218,1,"Export_assignment_is_not_supported_when_module_flag_is_system_1218","Export assignment is not supported when '--module' flag is 'system'."),Generators_are_not_allowed_in_an_ambient_context:r(1221,1,"Generators_are_not_allowed_in_an_ambient_context_1221","Generators are not allowed in an ambient context."),An_overload_signature_cannot_be_declared_as_a_generator:r(1222,1,"An_overload_signature_cannot_be_declared_as_a_generator_1222","An overload signature cannot be declared as a generator."),_0_tag_already_specified:r(1223,1,"_0_tag_already_specified_1223","'{0}' tag already specified."),Signature_0_must_be_a_type_predicate:r(1224,1,"Signature_0_must_be_a_type_predicate_1224","Signature '{0}' must be a type predicate."),Cannot_find_parameter_0:r(1225,1,"Cannot_find_parameter_0_1225","Cannot find parameter '{0}'."),Type_predicate_0_is_not_assignable_to_1:r(1226,1,"Type_predicate_0_is_not_assignable_to_1_1226","Type predicate '{0}' is not assignable to '{1}'."),Parameter_0_is_not_in_the_same_position_as_parameter_1:r(1227,1,"Parameter_0_is_not_in_the_same_position_as_parameter_1_1227","Parameter '{0}' is not in the same position as parameter '{1}'."),A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods:r(1228,1,"A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228","A type predicate is only allowed in return type position for functions and methods."),A_type_predicate_cannot_reference_a_rest_parameter:r(1229,1,"A_type_predicate_cannot_reference_a_rest_parameter_1229","A type predicate cannot reference a rest parameter."),A_type_predicate_cannot_reference_element_0_in_a_binding_pattern:r(1230,1,"A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230","A type predicate cannot reference element '{0}' in a binding pattern."),An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration:r(1231,1,"An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231","An export assignment must be at the top level of a file or module declaration."),An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module:r(1232,1,"An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1232","An import declaration can only be used at the top level of a namespace or module."),An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module:r(1233,1,"An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1233","An export declaration can only be used at the top level of a namespace or module."),An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:r(1234,1,"An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234","An ambient module declaration is only allowed at the top level in a file."),A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module:r(1235,1,"A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235","A namespace declaration is only allowed at the top level of a namespace or module."),The_return_type_of_a_property_decorator_function_must_be_either_void_or_any:r(1236,1,"The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236","The return type of a property decorator function must be either 'void' or 'any'."),The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any:r(1237,1,"The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237","The return type of a parameter decorator function must be either 'void' or 'any'."),Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression:r(1238,1,"Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238","Unable to resolve signature of class decorator when called as an expression."),Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression:r(1239,1,"Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239","Unable to resolve signature of parameter decorator when called as an expression."),Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression:r(1240,1,"Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240","Unable to resolve signature of property decorator when called as an expression."),Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression:r(1241,1,"Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241","Unable to resolve signature of method decorator when called as an expression."),abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration:r(1242,1,"abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242","'abstract' modifier can only appear on a class, method, or property declaration."),_0_modifier_cannot_be_used_with_1_modifier:r(1243,1,"_0_modifier_cannot_be_used_with_1_modifier_1243","'{0}' modifier cannot be used with '{1}' modifier."),Abstract_methods_can_only_appear_within_an_abstract_class:r(1244,1,"Abstract_methods_can_only_appear_within_an_abstract_class_1244","Abstract methods can only appear within an abstract class."),Method_0_cannot_have_an_implementation_because_it_is_marked_abstract:r(1245,1,"Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245","Method '{0}' cannot have an implementation because it is marked abstract."),An_interface_property_cannot_have_an_initializer:r(1246,1,"An_interface_property_cannot_have_an_initializer_1246","An interface property cannot have an initializer."),A_type_literal_property_cannot_have_an_initializer:r(1247,1,"A_type_literal_property_cannot_have_an_initializer_1247","A type literal property cannot have an initializer."),A_class_member_cannot_have_the_0_keyword:r(1248,1,"A_class_member_cannot_have_the_0_keyword_1248","A class member cannot have the '{0}' keyword."),A_decorator_can_only_decorate_a_method_implementation_not_an_overload:r(1249,1,"A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249","A decorator can only decorate a method implementation, not an overload."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5:r(1250,1,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_1250","Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definitions_are_automatically_in_strict_mode:r(1251,1,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definiti_1251","Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Class definitions are automatically in strict mode."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_automatically_in_strict_mode:r(1252,1,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_au_1252","Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Modules are automatically in strict mode."),Abstract_properties_can_only_appear_within_an_abstract_class:r(1253,1,"Abstract_properties_can_only_appear_within_an_abstract_class_1253","Abstract properties can only appear within an abstract class."),A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference:r(1254,1,"A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254","A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."),A_definite_assignment_assertion_is_not_permitted_in_this_context:r(1255,1,"A_definite_assignment_assertion_is_not_permitted_in_this_context_1255","A definite assignment assertion '!' is not permitted in this context."),A_required_element_cannot_follow_an_optional_element:r(1257,1,"A_required_element_cannot_follow_an_optional_element_1257","A required element cannot follow an optional element."),A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration:r(1258,1,"A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258","A default export must be at the top level of a file or module declaration."),Module_0_can_only_be_default_imported_using_the_1_flag:r(1259,1,"Module_0_can_only_be_default_imported_using_the_1_flag_1259","Module '{0}' can only be default-imported using the '{1}' flag"),Keywords_cannot_contain_escape_characters:r(1260,1,"Keywords_cannot_contain_escape_characters_1260","Keywords cannot contain escape characters."),Already_included_file_name_0_differs_from_file_name_1_only_in_casing:r(1261,1,"Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261","Already included file name '{0}' differs from file name '{1}' only in casing."),Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module:r(1262,1,"Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module_1262","Identifier expected. '{0}' is a reserved word at the top-level of a module."),Declarations_with_initializers_cannot_also_have_definite_assignment_assertions:r(1263,1,"Declarations_with_initializers_cannot_also_have_definite_assignment_assertions_1263","Declarations with initializers cannot also have definite assignment assertions."),Declarations_with_definite_assignment_assertions_must_also_have_type_annotations:r(1264,1,"Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264","Declarations with definite assignment assertions must also have type annotations."),A_rest_element_cannot_follow_another_rest_element:r(1265,1,"A_rest_element_cannot_follow_another_rest_element_1265","A rest element cannot follow another rest element."),An_optional_element_cannot_follow_a_rest_element:r(1266,1,"An_optional_element_cannot_follow_a_rest_element_1266","An optional element cannot follow a rest element."),Property_0_cannot_have_an_initializer_because_it_is_marked_abstract:r(1267,1,"Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267","Property '{0}' cannot have an initializer because it is marked abstract."),An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type:r(1268,1,"An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268","An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."),Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled:r(1269,1,"Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled_1269","Cannot use 'export import' on a type or type-only namespace when '{0}' is enabled."),Decorator_function_return_type_0_is_not_assignable_to_type_1:r(1270,1,"Decorator_function_return_type_0_is_not_assignable_to_type_1_1270","Decorator function return type '{0}' is not assignable to type '{1}'."),Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any:r(1271,1,"Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any_1271","Decorator function return type is '{0}' but is expected to be 'void' or 'any'."),A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled:r(1272,1,"A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272","A type referenced in a decorated signature must be imported with 'import type' or a namespace import when 'isolatedModules' and 'emitDecoratorMetadata' are enabled."),_0_modifier_cannot_appear_on_a_type_parameter:r(1273,1,"_0_modifier_cannot_appear_on_a_type_parameter_1273","'{0}' modifier cannot appear on a type parameter"),_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias:r(1274,1,"_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274","'{0}' modifier can only appear on a type parameter of a class, interface or type alias"),accessor_modifier_can_only_appear_on_a_property_declaration:r(1275,1,"accessor_modifier_can_only_appear_on_a_property_declaration_1275","'accessor' modifier can only appear on a property declaration."),An_accessor_property_cannot_be_declared_optional:r(1276,1,"An_accessor_property_cannot_be_declared_optional_1276","An 'accessor' property cannot be declared optional."),_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class:r(1277,1,"_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class_1277","'{0}' modifier can only appear on a type parameter of a function, method or class"),The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0:r(1278,1,"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0_1278","The runtime will invoke the decorator with {1} arguments, but the decorator expects {0}."),The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0:r(1279,1,"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0_1279","The runtime will invoke the decorator with {1} arguments, but the decorator expects at least {0}."),Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement:r(1280,1,"Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to__1280","Namespaces are not allowed in global script files when '{0}' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement."),Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead:r(1281,1,"Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead_1281","Cannot access '{0}' from another file without qualification when '{1}' is enabled. Use '{2}' instead."),An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:r(1282,1,"An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers__1282","An 'export =' declaration must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:r(1283,1,"An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolve_1283","An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:r(1284,1,"An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_1284","An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:r(1285,1,"An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_1285","An 'export default' must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled:r(1286,1,"ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286","ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled."),A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled:r(1287,1,"A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287","A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."),An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled:r(1288,1,"An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288","An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:r(1289,1,"_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1289","'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default:r(1290,1,"_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1290","'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:r(1291,1,"_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1291","'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default:r(1292,1,"_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1292","'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve:r(1293,1,"ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve_1293","ESM syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'."),with_statements_are_not_allowed_in_an_async_function_block:r(1300,1,"with_statements_are_not_allowed_in_an_async_function_block_1300","'with' statements are not allowed in an async function block."),await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:r(1308,1,"await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308","'await' expressions are only allowed within async functions and at the top levels of modules."),The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level:r(1309,1,"The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309","The current file is a CommonJS module and cannot use 'await' at the top level."),Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern:r(1312,1,"Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312","Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."),The_body_of_an_if_statement_cannot_be_the_empty_statement:r(1313,1,"The_body_of_an_if_statement_cannot_be_the_empty_statement_1313","The body of an 'if' statement cannot be the empty statement."),Global_module_exports_may_only_appear_in_module_files:r(1314,1,"Global_module_exports_may_only_appear_in_module_files_1314","Global module exports may only appear in module files."),Global_module_exports_may_only_appear_in_declaration_files:r(1315,1,"Global_module_exports_may_only_appear_in_declaration_files_1315","Global module exports may only appear in declaration files."),Global_module_exports_may_only_appear_at_top_level:r(1316,1,"Global_module_exports_may_only_appear_at_top_level_1316","Global module exports may only appear at top level."),A_parameter_property_cannot_be_declared_using_a_rest_parameter:r(1317,1,"A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317","A parameter property cannot be declared using a rest parameter."),An_abstract_accessor_cannot_have_an_implementation:r(1318,1,"An_abstract_accessor_cannot_have_an_implementation_1318","An abstract accessor cannot have an implementation."),A_default_export_can_only_be_used_in_an_ECMAScript_style_module:r(1319,1,"A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319","A default export can only be used in an ECMAScript-style module."),Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:r(1320,1,"Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320","Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."),Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:r(1321,1,"Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321","Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."),Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:r(1322,1,"Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322","Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."),Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext:r(1323,1,"Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323","Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'."),Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_nodenext_or_preserve:r(1324,1,"Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_nodene_1324","Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'nodenext', or 'preserve'."),Argument_of_dynamic_import_cannot_be_spread_element:r(1325,1,"Argument_of_dynamic_import_cannot_be_spread_element_1325","Argument of dynamic import cannot be spread element."),This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments:r(1326,1,"This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326","This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."),String_literal_with_double_quotes_expected:r(1327,1,"String_literal_with_double_quotes_expected_1327","String literal with double quotes expected."),Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal:r(1328,1,"Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328","Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."),_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0:r(1329,1,"_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329","'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"),A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly:r(1330,1,"A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330","A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'."),A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly:r(1331,1,"A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331","A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'."),A_variable_whose_type_is_a_unique_symbol_type_must_be_const:r(1332,1,"A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332","A variable whose type is a 'unique symbol' type must be 'const'."),unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name:r(1333,1,"unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333","'unique symbol' types may not be used on a variable declaration with a binding name."),unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement:r(1334,1,"unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334","'unique symbol' types are only allowed on variables in a variable statement."),unique_symbol_types_are_not_allowed_here:r(1335,1,"unique_symbol_types_are_not_allowed_here_1335","'unique symbol' types are not allowed here."),An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead:r(1337,1,"An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337","An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."),infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type:r(1338,1,"infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338","'infer' declarations are only permitted in the 'extends' clause of a conditional type."),Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here:r(1339,1,"Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339","Module '{0}' does not refer to a value, but is used as a value here."),Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0:r(1340,1,"Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340","Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"),Class_constructor_may_not_be_an_accessor:r(1341,1,"Class_constructor_may_not_be_an_accessor_1341","Class constructor may not be an accessor."),The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext:r(1343,1,"The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343","The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."),A_label_is_not_allowed_here:r(1344,1,"A_label_is_not_allowed_here_1344","'A label is not allowed here."),An_expression_of_type_void_cannot_be_tested_for_truthiness:r(1345,1,"An_expression_of_type_void_cannot_be_tested_for_truthiness_1345","An expression of type 'void' cannot be tested for truthiness."),This_parameter_is_not_allowed_with_use_strict_directive:r(1346,1,"This_parameter_is_not_allowed_with_use_strict_directive_1346","This parameter is not allowed with 'use strict' directive."),use_strict_directive_cannot_be_used_with_non_simple_parameter_list:r(1347,1,"use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347","'use strict' directive cannot be used with non-simple parameter list."),Non_simple_parameter_declared_here:r(1348,1,"Non_simple_parameter_declared_here_1348","Non-simple parameter declared here."),use_strict_directive_used_here:r(1349,1,"use_strict_directive_used_here_1349","'use strict' directive used here."),Print_the_final_configuration_instead_of_building:r(1350,3,"Print_the_final_configuration_instead_of_building_1350","Print the final configuration instead of building."),An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal:r(1351,1,"An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351","An identifier or keyword cannot immediately follow a numeric literal."),A_bigint_literal_cannot_use_exponential_notation:r(1352,1,"A_bigint_literal_cannot_use_exponential_notation_1352","A bigint literal cannot use exponential notation."),A_bigint_literal_must_be_an_integer:r(1353,1,"A_bigint_literal_must_be_an_integer_1353","A bigint literal must be an integer."),readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types:r(1354,1,"readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354","'readonly' type modifier is only permitted on array and tuple literal types."),A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals:r(1355,1,"A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355","A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals."),Did_you_mean_to_mark_this_function_as_async:r(1356,1,"Did_you_mean_to_mark_this_function_as_async_1356","Did you mean to mark this function as 'async'?"),An_enum_member_name_must_be_followed_by_a_or:r(1357,1,"An_enum_member_name_must_be_followed_by_a_or_1357","An enum member name must be followed by a ',', '=', or '}'."),Tagged_template_expressions_are_not_permitted_in_an_optional_chain:r(1358,1,"Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358","Tagged template expressions are not permitted in an optional chain."),Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:r(1359,1,"Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359","Identifier expected. '{0}' is a reserved word that cannot be used here."),Type_0_does_not_satisfy_the_expected_type_1:r(1360,1,"Type_0_does_not_satisfy_the_expected_type_1_1360","Type '{0}' does not satisfy the expected type '{1}'."),_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type:r(1361,1,"_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361","'{0}' cannot be used as a value because it was imported using 'import type'."),_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type:r(1362,1,"_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362","'{0}' cannot be used as a value because it was exported using 'export type'."),A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both:r(1363,1,"A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363","A type-only import can specify a default import or named bindings, but not both."),Convert_to_type_only_export:r(1364,3,"Convert_to_type_only_export_1364","Convert to type-only export"),Convert_all_re_exported_types_to_type_only_exports:r(1365,3,"Convert_all_re_exported_types_to_type_only_exports_1365","Convert all re-exported types to type-only exports"),Split_into_two_separate_import_declarations:r(1366,3,"Split_into_two_separate_import_declarations_1366","Split into two separate import declarations"),Split_all_invalid_type_only_imports:r(1367,3,"Split_all_invalid_type_only_imports_1367","Split all invalid type-only imports"),Class_constructor_may_not_be_a_generator:r(1368,1,"Class_constructor_may_not_be_a_generator_1368","Class constructor may not be a generator."),Did_you_mean_0:r(1369,3,"Did_you_mean_0_1369","Did you mean '{0}'?"),await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:r(1375,1,"await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375","'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),_0_was_imported_here:r(1376,3,"_0_was_imported_here_1376","'{0}' was imported here."),_0_was_exported_here:r(1377,3,"_0_was_exported_here_1377","'{0}' was exported here."),Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:r(1378,1,"Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378","Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type:r(1379,1,"An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379","An import alias cannot reference a declaration that was exported using 'export type'."),An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type:r(1380,1,"An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380","An import alias cannot reference a declaration that was imported using 'import type'."),Unexpected_token_Did_you_mean_or_rbrace:r(1381,1,"Unexpected_token_Did_you_mean_or_rbrace_1381","Unexpected token. Did you mean `{'}'}` or `}`?"),Unexpected_token_Did_you_mean_or_gt:r(1382,1,"Unexpected_token_Did_you_mean_or_gt_1382","Unexpected token. Did you mean `{'>'}` or `>`?"),Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:r(1385,1,"Function_type_notation_must_be_parenthesized_when_used_in_a_union_type_1385","Function type notation must be parenthesized when used in a union type."),Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type:r(1386,1,"Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type_1386","Constructor type notation must be parenthesized when used in a union type."),Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:r(1387,1,"Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387","Function type notation must be parenthesized when used in an intersection type."),Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:r(1388,1,"Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1388","Constructor type notation must be parenthesized when used in an intersection type."),_0_is_not_allowed_as_a_variable_declaration_name:r(1389,1,"_0_is_not_allowed_as_a_variable_declaration_name_1389","'{0}' is not allowed as a variable declaration name."),_0_is_not_allowed_as_a_parameter_name:r(1390,1,"_0_is_not_allowed_as_a_parameter_name_1390","'{0}' is not allowed as a parameter name."),An_import_alias_cannot_use_import_type:r(1392,1,"An_import_alias_cannot_use_import_type_1392","An import alias cannot use 'import type'"),Imported_via_0_from_file_1:r(1393,3,"Imported_via_0_from_file_1_1393","Imported via {0} from file '{1}'"),Imported_via_0_from_file_1_with_packageId_2:r(1394,3,"Imported_via_0_from_file_1_with_packageId_2_1394","Imported via {0} from file '{1}' with packageId '{2}'"),Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions:r(1395,3,"Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions_1395","Imported via {0} from file '{1}' to import 'importHelpers' as specified in compilerOptions"),Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions:r(1396,3,"Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396","Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"),Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions:r(1397,3,"Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397","Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"),Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions:r(1398,3,"Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398","Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"),File_is_included_via_import_here:r(1399,3,"File_is_included_via_import_here_1399","File is included via import here."),Referenced_via_0_from_file_1:r(1400,3,"Referenced_via_0_from_file_1_1400","Referenced via '{0}' from file '{1}'"),File_is_included_via_reference_here:r(1401,3,"File_is_included_via_reference_here_1401","File is included via reference here."),Type_library_referenced_via_0_from_file_1:r(1402,3,"Type_library_referenced_via_0_from_file_1_1402","Type library referenced via '{0}' from file '{1}'"),Type_library_referenced_via_0_from_file_1_with_packageId_2:r(1403,3,"Type_library_referenced_via_0_from_file_1_with_packageId_2_1403","Type library referenced via '{0}' from file '{1}' with packageId '{2}'"),File_is_included_via_type_library_reference_here:r(1404,3,"File_is_included_via_type_library_reference_here_1404","File is included via type library reference here."),Library_referenced_via_0_from_file_1:r(1405,3,"Library_referenced_via_0_from_file_1_1405","Library referenced via '{0}' from file '{1}'"),File_is_included_via_library_reference_here:r(1406,3,"File_is_included_via_library_reference_here_1406","File is included via library reference here."),Matched_by_include_pattern_0_in_1:r(1407,3,"Matched_by_include_pattern_0_in_1_1407","Matched by include pattern '{0}' in '{1}'"),File_is_matched_by_include_pattern_specified_here:r(1408,3,"File_is_matched_by_include_pattern_specified_here_1408","File is matched by include pattern specified here."),Part_of_files_list_in_tsconfig_json:r(1409,3,"Part_of_files_list_in_tsconfig_json_1409","Part of 'files' list in tsconfig.json"),File_is_matched_by_files_list_specified_here:r(1410,3,"File_is_matched_by_files_list_specified_here_1410","File is matched by 'files' list specified here."),Output_from_referenced_project_0_included_because_1_specified:r(1411,3,"Output_from_referenced_project_0_included_because_1_specified_1411","Output from referenced project '{0}' included because '{1}' specified"),Output_from_referenced_project_0_included_because_module_is_specified_as_none:r(1412,3,"Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412","Output from referenced project '{0}' included because '--module' is specified as 'none'"),File_is_output_from_referenced_project_specified_here:r(1413,3,"File_is_output_from_referenced_project_specified_here_1413","File is output from referenced project specified here."),Source_from_referenced_project_0_included_because_1_specified:r(1414,3,"Source_from_referenced_project_0_included_because_1_specified_1414","Source from referenced project '{0}' included because '{1}' specified"),Source_from_referenced_project_0_included_because_module_is_specified_as_none:r(1415,3,"Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415","Source from referenced project '{0}' included because '--module' is specified as 'none'"),File_is_source_from_referenced_project_specified_here:r(1416,3,"File_is_source_from_referenced_project_specified_here_1416","File is source from referenced project specified here."),Entry_point_of_type_library_0_specified_in_compilerOptions:r(1417,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_1417","Entry point of type library '{0}' specified in compilerOptions"),Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1:r(1418,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418","Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"),File_is_entry_point_of_type_library_specified_here:r(1419,3,"File_is_entry_point_of_type_library_specified_here_1419","File is entry point of type library specified here."),Entry_point_for_implicit_type_library_0:r(1420,3,"Entry_point_for_implicit_type_library_0_1420","Entry point for implicit type library '{0}'"),Entry_point_for_implicit_type_library_0_with_packageId_1:r(1421,3,"Entry_point_for_implicit_type_library_0_with_packageId_1_1421","Entry point for implicit type library '{0}' with packageId '{1}'"),Library_0_specified_in_compilerOptions:r(1422,3,"Library_0_specified_in_compilerOptions_1422","Library '{0}' specified in compilerOptions"),File_is_library_specified_here:r(1423,3,"File_is_library_specified_here_1423","File is library specified here."),Default_library:r(1424,3,"Default_library_1424","Default library"),Default_library_for_target_0:r(1425,3,"Default_library_for_target_0_1425","Default library for target '{0}'"),File_is_default_library_for_target_specified_here:r(1426,3,"File_is_default_library_for_target_specified_here_1426","File is default library for target specified here."),Root_file_specified_for_compilation:r(1427,3,"Root_file_specified_for_compilation_1427","Root file specified for compilation"),File_is_output_of_project_reference_source_0:r(1428,3,"File_is_output_of_project_reference_source_0_1428","File is output of project reference source '{0}'"),File_redirects_to_file_0:r(1429,3,"File_redirects_to_file_0_1429","File redirects to file '{0}'"),The_file_is_in_the_program_because_Colon:r(1430,3,"The_file_is_in_the_program_because_Colon_1430","The file is in the program because:"),for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:r(1431,1,"for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431","'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:r(1432,1,"Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432","Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters:r(1433,1,"Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters_1433","Neither decorators nor modifiers may be applied to 'this' parameters."),Unexpected_keyword_or_identifier:r(1434,1,"Unexpected_keyword_or_identifier_1434","Unexpected keyword or identifier."),Unknown_keyword_or_identifier_Did_you_mean_0:r(1435,1,"Unknown_keyword_or_identifier_Did_you_mean_0_1435","Unknown keyword or identifier. Did you mean '{0}'?"),Decorators_must_precede_the_name_and_all_keywords_of_property_declarations:r(1436,1,"Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436","Decorators must precede the name and all keywords of property declarations."),Namespace_must_be_given_a_name:r(1437,1,"Namespace_must_be_given_a_name_1437","Namespace must be given a name."),Interface_must_be_given_a_name:r(1438,1,"Interface_must_be_given_a_name_1438","Interface must be given a name."),Type_alias_must_be_given_a_name:r(1439,1,"Type_alias_must_be_given_a_name_1439","Type alias must be given a name."),Variable_declaration_not_allowed_at_this_location:r(1440,1,"Variable_declaration_not_allowed_at_this_location_1440","Variable declaration not allowed at this location."),Cannot_start_a_function_call_in_a_type_annotation:r(1441,1,"Cannot_start_a_function_call_in_a_type_annotation_1441","Cannot start a function call in a type annotation."),Expected_for_property_initializer:r(1442,1,"Expected_for_property_initializer_1442","Expected '=' for property initializer."),Module_declaration_names_may_only_use_or_quoted_strings:r(1443,1,"Module_declaration_names_may_only_use_or_quoted_strings_1443",`Module declaration names may only use ' or " quoted strings.`),_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled:r(1448,1,"_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_1448","'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled."),Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed:r(1449,3,"Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449","Preserve unused imported values in the JavaScript output that would otherwise be removed."),Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments:r(1450,3,"Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments_1450","Dynamic imports can only accept a module specifier and an optional set of attributes as arguments"),Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression:r(1451,1,"Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451","Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"),resolution_mode_should_be_either_require_or_import:r(1453,1,"resolution_mode_should_be_either_require_or_import_1453","`resolution-mode` should be either `require` or `import`."),resolution_mode_can_only_be_set_for_type_only_imports:r(1454,1,"resolution_mode_can_only_be_set_for_type_only_imports_1454","`resolution-mode` can only be set for type-only imports."),resolution_mode_is_the_only_valid_key_for_type_import_assertions:r(1455,1,"resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455","`resolution-mode` is the only valid key for type import assertions."),Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require:r(1456,1,"Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456","Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."),Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk:r(1457,3,"Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457","Matched by default include pattern '**/*'"),File_is_ECMAScript_module_because_0_has_field_type_with_value_module:r(1458,3,"File_is_ECMAScript_module_because_0_has_field_type_with_value_module_1458",`File is ECMAScript module because '{0}' has field "type" with value "module"`),File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module:r(1459,3,"File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459",`File is CommonJS module because '{0}' has field "type" whose value is not "module"`),File_is_CommonJS_module_because_0_does_not_have_field_type:r(1460,3,"File_is_CommonJS_module_because_0_does_not_have_field_type_1460",`File is CommonJS module because '{0}' does not have field "type"`),File_is_CommonJS_module_because_package_json_was_not_found:r(1461,3,"File_is_CommonJS_module_because_package_json_was_not_found_1461","File is CommonJS module because 'package.json' was not found"),resolution_mode_is_the_only_valid_key_for_type_import_attributes:r(1463,1,"resolution_mode_is_the_only_valid_key_for_type_import_attributes_1463","'resolution-mode' is the only valid key for type import attributes."),Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require:r(1464,1,"Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1464","Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'."),The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output:r(1470,1,"The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470","The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."),Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead:r(1471,1,"Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471","Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."),catch_or_finally_expected:r(1472,1,"catch_or_finally_expected_1472","'catch' or 'finally' expected."),An_import_declaration_can_only_be_used_at_the_top_level_of_a_module:r(1473,1,"An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473","An import declaration can only be used at the top level of a module."),An_export_declaration_can_only_be_used_at_the_top_level_of_a_module:r(1474,1,"An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474","An export declaration can only be used at the top level of a module."),Control_what_method_is_used_to_detect_module_format_JS_files:r(1475,3,"Control_what_method_is_used_to_detect_module_format_JS_files_1475","Control what method is used to detect module-format JS files."),auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules:r(1476,3,"auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476",'"auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.'),An_instantiation_expression_cannot_be_followed_by_a_property_access:r(1477,1,"An_instantiation_expression_cannot_be_followed_by_a_property_access_1477","An instantiation expression cannot be followed by a property access."),Identifier_or_string_literal_expected:r(1478,1,"Identifier_or_string_literal_expected_1478","Identifier or string literal expected."),The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead:r(1479,1,"The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479",`The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("{0}")' call instead.`),To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module:r(1480,3,"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480",'To convert this file to an ECMAScript module, change its file extension to \'{0}\' or create a local package.json file with `{ "type": "module" }`.'),To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1:r(1481,3,"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481",`To convert this file to an ECMAScript module, change its file extension to '{0}', or add the field \`"type": "module"\` to '{1}'.`),To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0:r(1482,3,"To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482",'To convert this file to an ECMAScript module, add the field `"type": "module"` to \'{0}\'.'),To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module:r(1483,3,"To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483",'To convert this file to an ECMAScript module, create a local package.json file with `{ "type": "module" }`.'),_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:r(1484,1,"_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled_1484","'{0}' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:r(1485,1,"_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimMo_1485","'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),Decorator_used_before_export_here:r(1486,1,"Decorator_used_before_export_here_1486","Decorator used before 'export' here."),Octal_escape_sequences_are_not_allowed_Use_the_syntax_0:r(1487,1,"Octal_escape_sequences_are_not_allowed_Use_the_syntax_0_1487","Octal escape sequences are not allowed. Use the syntax '{0}'."),Escape_sequence_0_is_not_allowed:r(1488,1,"Escape_sequence_0_is_not_allowed_1488","Escape sequence '{0}' is not allowed."),Decimals_with_leading_zeros_are_not_allowed:r(1489,1,"Decimals_with_leading_zeros_are_not_allowed_1489","Decimals with leading zeros are not allowed."),File_appears_to_be_binary:r(1490,1,"File_appears_to_be_binary_1490","File appears to be binary."),_0_modifier_cannot_appear_on_a_using_declaration:r(1491,1,"_0_modifier_cannot_appear_on_a_using_declaration_1491","'{0}' modifier cannot appear on a 'using' declaration."),_0_declarations_may_not_have_binding_patterns:r(1492,1,"_0_declarations_may_not_have_binding_patterns_1492","'{0}' declarations may not have binding patterns."),The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration:r(1493,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493","The left-hand side of a 'for...in' statement cannot be a 'using' declaration."),The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration:r(1494,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494","The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),_0_modifier_cannot_appear_on_an_await_using_declaration:r(1495,1,"_0_modifier_cannot_appear_on_an_await_using_declaration_1495","'{0}' modifier cannot appear on an 'await using' declaration."),Identifier_string_literal_or_number_literal_expected:r(1496,1,"Identifier_string_literal_or_number_literal_expected_1496","Identifier, string literal, or number literal expected."),Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator:r(1497,1,"Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator_1497","Expression must be enclosed in parentheses to be used as a decorator."),Invalid_syntax_in_decorator:r(1498,1,"Invalid_syntax_in_decorator_1498","Invalid syntax in decorator."),Unknown_regular_expression_flag:r(1499,1,"Unknown_regular_expression_flag_1499","Unknown regular expression flag."),Duplicate_regular_expression_flag:r(1500,1,"Duplicate_regular_expression_flag_1500","Duplicate regular expression flag."),This_regular_expression_flag_is_only_available_when_targeting_0_or_later:r(1501,1,"This_regular_expression_flag_is_only_available_when_targeting_0_or_later_1501","This regular expression flag is only available when targeting '{0}' or later."),The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously:r(1502,1,"The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously_1502","The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously."),Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later:r(1503,1,"Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later_1503","Named capturing groups are only available when targeting 'ES2018' or later."),Subpattern_flags_must_be_present_when_there_is_a_minus_sign:r(1504,1,"Subpattern_flags_must_be_present_when_there_is_a_minus_sign_1504","Subpattern flags must be present when there is a minus sign."),Incomplete_quantifier_Digit_expected:r(1505,1,"Incomplete_quantifier_Digit_expected_1505","Incomplete quantifier. Digit expected."),Numbers_out_of_order_in_quantifier:r(1506,1,"Numbers_out_of_order_in_quantifier_1506","Numbers out of order in quantifier."),There_is_nothing_available_for_repetition:r(1507,1,"There_is_nothing_available_for_repetition_1507","There is nothing available for repetition."),Unexpected_0_Did_you_mean_to_escape_it_with_backslash:r(1508,1,"Unexpected_0_Did_you_mean_to_escape_it_with_backslash_1508","Unexpected '{0}'. Did you mean to escape it with backslash?"),This_regular_expression_flag_cannot_be_toggled_within_a_subpattern:r(1509,1,"This_regular_expression_flag_cannot_be_toggled_within_a_subpattern_1509","This regular expression flag cannot be toggled within a subpattern."),k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets:r(1510,1,"k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets_1510","'\\k' must be followed by a capturing group name enclosed in angle brackets."),q_is_only_available_inside_character_class:r(1511,1,"q_is_only_available_inside_character_class_1511","'\\q' is only available inside character class."),c_must_be_followed_by_an_ASCII_letter:r(1512,1,"c_must_be_followed_by_an_ASCII_letter_1512","'\\c' must be followed by an ASCII letter."),Undetermined_character_escape:r(1513,1,"Undetermined_character_escape_1513","Undetermined character escape."),Expected_a_capturing_group_name:r(1514,1,"Expected_a_capturing_group_name_1514","Expected a capturing group name."),Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other:r(1515,1,"Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other_1515","Named capturing groups with the same name must be mutually exclusive to each other."),A_character_class_range_must_not_be_bounded_by_another_character_class:r(1516,1,"A_character_class_range_must_not_be_bounded_by_another_character_class_1516","A character class range must not be bounded by another character class."),Range_out_of_order_in_character_class:r(1517,1,"Range_out_of_order_in_character_class_1517","Range out of order in character class."),Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class:r(1518,1,"Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_characte_1518","Anything that would possibly match more than a single character is invalid inside a negated character class."),Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead:r(1519,1,"Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead_1519","Operators must not be mixed within a character class. Wrap it in a nested class instead."),Expected_a_class_set_operand:r(1520,1,"Expected_a_class_set_operand_1520","Expected a class set operand."),q_must_be_followed_by_string_alternatives_enclosed_in_braces:r(1521,1,"q_must_be_followed_by_string_alternatives_enclosed_in_braces_1521","'\\q' must be followed by string alternatives enclosed in braces."),A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash:r(1522,1,"A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backs_1522","A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash?"),Expected_a_Unicode_property_name:r(1523,1,"Expected_a_Unicode_property_name_1523","Expected a Unicode property name."),Unknown_Unicode_property_name:r(1524,1,"Unknown_Unicode_property_name_1524","Unknown Unicode property name."),Expected_a_Unicode_property_value:r(1525,1,"Expected_a_Unicode_property_value_1525","Expected a Unicode property value."),Unknown_Unicode_property_value:r(1526,1,"Unknown_Unicode_property_value_1526","Unknown Unicode property value."),Expected_a_Unicode_property_name_or_value:r(1527,1,"Expected_a_Unicode_property_name_or_value_1527","Expected a Unicode property name or value."),Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_the_Unicode_Sets_v_flag_is_set:r(1528,1,"Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_t_1528","Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set."),Unknown_Unicode_property_name_or_value:r(1529,1,"Unknown_Unicode_property_name_or_value_1529","Unknown Unicode property name or value."),Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set:r(1530,1,"Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v__1530","Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."),_0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces:r(1531,1,"_0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces_1531","'\\{0}' must be followed by a Unicode property value expression enclosed in braces."),There_is_no_capturing_group_named_0_in_this_regular_expression:r(1532,1,"There_is_no_capturing_group_named_0_in_this_regular_expression_1532","There is no capturing group named '{0}' in this regular expression."),This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_regular_expression:r(1533,1,"This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_r_1533","This backreference refers to a group that does not exist. There are only {0} capturing groups in this regular expression."),This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regular_expression:r(1534,1,"This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regul_1534","This backreference refers to a group that does not exist. There are no capturing groups in this regular expression."),This_character_cannot_be_escaped_in_a_regular_expression:r(1535,1,"This_character_cannot_be_escaped_in_a_regular_expression_1535","This character cannot be escaped in a regular expression."),Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead:r(1536,1,"Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended__1536","Octal escape sequences and backreferences are not allowed in a character class. If this was intended as an escape sequence, use the syntax '{0}' instead."),Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class:r(1537,1,"Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_1537","Decimal escape sequences and backreferences are not allowed in a character class."),Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set:r(1538,1,"Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_se_1538","Unicode escape sequences are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."),A_bigint_literal_cannot_be_used_as_a_property_name:r(1539,1,"A_bigint_literal_cannot_be_used_as_a_property_name_1539","A 'bigint' literal cannot be used as a property name."),A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead:r(1540,2,"A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540","A 'namespace' declaration should not be declared using the 'module' keyword. Please use the 'namespace' keyword instead.",void 0,void 0,!0),Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute:r(1541,1,"Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribut_1541","Type-only import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute."),Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute:r(1542,1,"Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute_1542","Type import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute."),Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_module_is_set_to_0:r(1543,1,"Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543",`Importing a JSON file into an ECMAScript module requires a 'type: "json"' import attribute when 'module' is set to '{0}'.`),Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0:r(1544,1,"Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0_1544","Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to '{0}'."),The_types_of_0_are_incompatible_between_these_types:r(2200,1,"The_types_of_0_are_incompatible_between_these_types_2200","The types of '{0}' are incompatible between these types."),The_types_returned_by_0_are_incompatible_between_these_types:r(2201,1,"The_types_returned_by_0_are_incompatible_between_these_types_2201","The types returned by '{0}' are incompatible between these types."),Call_signature_return_types_0_and_1_are_incompatible:r(2202,1,"Call_signature_return_types_0_and_1_are_incompatible_2202","Call signature return types '{0}' and '{1}' are incompatible.",void 0,!0),Construct_signature_return_types_0_and_1_are_incompatible:r(2203,1,"Construct_signature_return_types_0_and_1_are_incompatible_2203","Construct signature return types '{0}' and '{1}' are incompatible.",void 0,!0),Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1:r(2204,1,"Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204","Call signatures with no arguments have incompatible return types '{0}' and '{1}'.",void 0,!0),Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1:r(2205,1,"Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205","Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.",void 0,!0),The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement:r(2206,1,"The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206","The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."),The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement:r(2207,1,"The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207","The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."),This_type_parameter_might_need_an_extends_0_constraint:r(2208,1,"This_type_parameter_might_need_an_extends_0_constraint_2208","This type parameter might need an `extends {0}` constraint."),The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:r(2209,1,"The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209","The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:r(2210,1,"The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210","The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),Add_extends_constraint:r(2211,3,"Add_extends_constraint_2211","Add `extends` constraint."),Add_extends_constraint_to_all_type_parameters:r(2212,3,"Add_extends_constraint_to_all_type_parameters_2212","Add `extends` constraint to all type parameters"),Duplicate_identifier_0:r(2300,1,"Duplicate_identifier_0_2300","Duplicate identifier '{0}'."),Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:r(2301,1,"Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301","Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),Static_members_cannot_reference_class_type_parameters:r(2302,1,"Static_members_cannot_reference_class_type_parameters_2302","Static members cannot reference class type parameters."),Circular_definition_of_import_alias_0:r(2303,1,"Circular_definition_of_import_alias_0_2303","Circular definition of import alias '{0}'."),Cannot_find_name_0:r(2304,1,"Cannot_find_name_0_2304","Cannot find name '{0}'."),Module_0_has_no_exported_member_1:r(2305,1,"Module_0_has_no_exported_member_1_2305","Module '{0}' has no exported member '{1}'."),File_0_is_not_a_module:r(2306,1,"File_0_is_not_a_module_2306","File '{0}' is not a module."),Cannot_find_module_0_or_its_corresponding_type_declarations:r(2307,1,"Cannot_find_module_0_or_its_corresponding_type_declarations_2307","Cannot find module '{0}' or its corresponding type declarations."),Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity:r(2308,1,"Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308","Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."),An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements:r(2309,1,"An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309","An export assignment cannot be used in a module with other exported elements."),Type_0_recursively_references_itself_as_a_base_type:r(2310,1,"Type_0_recursively_references_itself_as_a_base_type_2310","Type '{0}' recursively references itself as a base type."),Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function:r(2311,1,"Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311","Cannot find name '{0}'. Did you mean to write this in an async function?"),An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members:r(2312,1,"An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312","An interface can only extend an object type or intersection of object types with statically known members."),Type_parameter_0_has_a_circular_constraint:r(2313,1,"Type_parameter_0_has_a_circular_constraint_2313","Type parameter '{0}' has a circular constraint."),Generic_type_0_requires_1_type_argument_s:r(2314,1,"Generic_type_0_requires_1_type_argument_s_2314","Generic type '{0}' requires {1} type argument(s)."),Type_0_is_not_generic:r(2315,1,"Type_0_is_not_generic_2315","Type '{0}' is not generic."),Global_type_0_must_be_a_class_or_interface_type:r(2316,1,"Global_type_0_must_be_a_class_or_interface_type_2316","Global type '{0}' must be a class or interface type."),Global_type_0_must_have_1_type_parameter_s:r(2317,1,"Global_type_0_must_have_1_type_parameter_s_2317","Global type '{0}' must have {1} type parameter(s)."),Cannot_find_global_type_0:r(2318,1,"Cannot_find_global_type_0_2318","Cannot find global type '{0}'."),Named_property_0_of_types_1_and_2_are_not_identical:r(2319,1,"Named_property_0_of_types_1_and_2_are_not_identical_2319","Named property '{0}' of types '{1}' and '{2}' are not identical."),Interface_0_cannot_simultaneously_extend_types_1_and_2:r(2320,1,"Interface_0_cannot_simultaneously_extend_types_1_and_2_2320","Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."),Excessive_stack_depth_comparing_types_0_and_1:r(2321,1,"Excessive_stack_depth_comparing_types_0_and_1_2321","Excessive stack depth comparing types '{0}' and '{1}'."),Type_0_is_not_assignable_to_type_1:r(2322,1,"Type_0_is_not_assignable_to_type_1_2322","Type '{0}' is not assignable to type '{1}'."),Cannot_redeclare_exported_variable_0:r(2323,1,"Cannot_redeclare_exported_variable_0_2323","Cannot redeclare exported variable '{0}'."),Property_0_is_missing_in_type_1:r(2324,1,"Property_0_is_missing_in_type_1_2324","Property '{0}' is missing in type '{1}'."),Property_0_is_private_in_type_1_but_not_in_type_2:r(2325,1,"Property_0_is_private_in_type_1_but_not_in_type_2_2325","Property '{0}' is private in type '{1}' but not in type '{2}'."),Types_of_property_0_are_incompatible:r(2326,1,"Types_of_property_0_are_incompatible_2326","Types of property '{0}' are incompatible."),Property_0_is_optional_in_type_1_but_required_in_type_2:r(2327,1,"Property_0_is_optional_in_type_1_but_required_in_type_2_2327","Property '{0}' is optional in type '{1}' but required in type '{2}'."),Types_of_parameters_0_and_1_are_incompatible:r(2328,1,"Types_of_parameters_0_and_1_are_incompatible_2328","Types of parameters '{0}' and '{1}' are incompatible."),Index_signature_for_type_0_is_missing_in_type_1:r(2329,1,"Index_signature_for_type_0_is_missing_in_type_1_2329","Index signature for type '{0}' is missing in type '{1}'."),_0_and_1_index_signatures_are_incompatible:r(2330,1,"_0_and_1_index_signatures_are_incompatible_2330","'{0}' and '{1}' index signatures are incompatible."),this_cannot_be_referenced_in_a_module_or_namespace_body:r(2331,1,"this_cannot_be_referenced_in_a_module_or_namespace_body_2331","'this' cannot be referenced in a module or namespace body."),this_cannot_be_referenced_in_current_location:r(2332,1,"this_cannot_be_referenced_in_current_location_2332","'this' cannot be referenced in current location."),this_cannot_be_referenced_in_a_static_property_initializer:r(2334,1,"this_cannot_be_referenced_in_a_static_property_initializer_2334","'this' cannot be referenced in a static property initializer."),super_can_only_be_referenced_in_a_derived_class:r(2335,1,"super_can_only_be_referenced_in_a_derived_class_2335","'super' can only be referenced in a derived class."),super_cannot_be_referenced_in_constructor_arguments:r(2336,1,"super_cannot_be_referenced_in_constructor_arguments_2336","'super' cannot be referenced in constructor arguments."),Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors:r(2337,1,"Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337","Super calls are not permitted outside constructors or in nested functions inside constructors."),super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class:r(2338,1,"super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338","'super' property access is permitted only in a constructor, member function, or member accessor of a derived class."),Property_0_does_not_exist_on_type_1:r(2339,1,"Property_0_does_not_exist_on_type_1_2339","Property '{0}' does not exist on type '{1}'."),Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword:r(2340,1,"Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340","Only public and protected methods of the base class are accessible via the 'super' keyword."),Property_0_is_private_and_only_accessible_within_class_1:r(2341,1,"Property_0_is_private_and_only_accessible_within_class_1_2341","Property '{0}' is private and only accessible within class '{1}'."),This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0:r(2343,1,"This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343","This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'."),Type_0_does_not_satisfy_the_constraint_1:r(2344,1,"Type_0_does_not_satisfy_the_constraint_1_2344","Type '{0}' does not satisfy the constraint '{1}'."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1:r(2345,1,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345","Argument of type '{0}' is not assignable to parameter of type '{1}'."),Untyped_function_calls_may_not_accept_type_arguments:r(2347,1,"Untyped_function_calls_may_not_accept_type_arguments_2347","Untyped function calls may not accept type arguments."),Value_of_type_0_is_not_callable_Did_you_mean_to_include_new:r(2348,1,"Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348","Value of type '{0}' is not callable. Did you mean to include 'new'?"),This_expression_is_not_callable:r(2349,1,"This_expression_is_not_callable_2349","This expression is not callable."),Only_a_void_function_can_be_called_with_the_new_keyword:r(2350,1,"Only_a_void_function_can_be_called_with_the_new_keyword_2350","Only a void function can be called with the 'new' keyword."),This_expression_is_not_constructable:r(2351,1,"This_expression_is_not_constructable_2351","This expression is not constructable."),Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first:r(2352,1,"Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352","Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first."),Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1:r(2353,1,"Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353","Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."),This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found:r(2354,1,"This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354","This syntax requires an imported helper but module '{0}' cannot be found."),A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value:r(2355,1,"A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value_2355","A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value."),An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type:r(2356,1,"An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356","An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."),The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access:r(2357,1,"The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357","The operand of an increment or decrement operator must be a variable or a property access."),The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter:r(2358,1,"The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358","The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."),The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method:r(2359,1,"The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_2359","The right-hand side of an 'instanceof' expression must be either of type 'any', a class, function, or other type assignable to the 'Function' interface type, or an object type with a 'Symbol.hasInstance' method."),The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:r(2362,1,"The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362","The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:r(2363,1,"The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363","The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access:r(2364,1,"The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364","The left-hand side of an assignment expression must be a variable or a property access."),Operator_0_cannot_be_applied_to_types_1_and_2:r(2365,1,"Operator_0_cannot_be_applied_to_types_1_and_2_2365","Operator '{0}' cannot be applied to types '{1}' and '{2}'."),Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined:r(2366,1,"Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366","Function lacks ending return statement and return type does not include 'undefined'."),This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap:r(2367,1,"This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367","This comparison appears to be unintentional because the types '{0}' and '{1}' have no overlap."),Type_parameter_name_cannot_be_0:r(2368,1,"Type_parameter_name_cannot_be_0_2368","Type parameter name cannot be '{0}'."),A_parameter_property_is_only_allowed_in_a_constructor_implementation:r(2369,1,"A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369","A parameter property is only allowed in a constructor implementation."),A_rest_parameter_must_be_of_an_array_type:r(2370,1,"A_rest_parameter_must_be_of_an_array_type_2370","A rest parameter must be of an array type."),A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation:r(2371,1,"A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371","A parameter initializer is only allowed in a function or constructor implementation."),Parameter_0_cannot_reference_itself:r(2372,1,"Parameter_0_cannot_reference_itself_2372","Parameter '{0}' cannot reference itself."),Parameter_0_cannot_reference_identifier_1_declared_after_it:r(2373,1,"Parameter_0_cannot_reference_identifier_1_declared_after_it_2373","Parameter '{0}' cannot reference identifier '{1}' declared after it."),Duplicate_index_signature_for_type_0:r(2374,1,"Duplicate_index_signature_for_type_0_2374","Duplicate index signature for type '{0}'."),Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties:r(2375,1,"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375","Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers:r(2376,1,"A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376","A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers."),Constructors_for_derived_classes_must_contain_a_super_call:r(2377,1,"Constructors_for_derived_classes_must_contain_a_super_call_2377","Constructors for derived classes must contain a 'super' call."),A_get_accessor_must_return_a_value:r(2378,1,"A_get_accessor_must_return_a_value_2378","A 'get' accessor must return a value."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties:r(2379,1,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379","Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),Overload_signatures_must_all_be_exported_or_non_exported:r(2383,1,"Overload_signatures_must_all_be_exported_or_non_exported_2383","Overload signatures must all be exported or non-exported."),Overload_signatures_must_all_be_ambient_or_non_ambient:r(2384,1,"Overload_signatures_must_all_be_ambient_or_non_ambient_2384","Overload signatures must all be ambient or non-ambient."),Overload_signatures_must_all_be_public_private_or_protected:r(2385,1,"Overload_signatures_must_all_be_public_private_or_protected_2385","Overload signatures must all be public, private or protected."),Overload_signatures_must_all_be_optional_or_required:r(2386,1,"Overload_signatures_must_all_be_optional_or_required_2386","Overload signatures must all be optional or required."),Function_overload_must_be_static:r(2387,1,"Function_overload_must_be_static_2387","Function overload must be static."),Function_overload_must_not_be_static:r(2388,1,"Function_overload_must_not_be_static_2388","Function overload must not be static."),Function_implementation_name_must_be_0:r(2389,1,"Function_implementation_name_must_be_0_2389","Function implementation name must be '{0}'."),Constructor_implementation_is_missing:r(2390,1,"Constructor_implementation_is_missing_2390","Constructor implementation is missing."),Function_implementation_is_missing_or_not_immediately_following_the_declaration:r(2391,1,"Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391","Function implementation is missing or not immediately following the declaration."),Multiple_constructor_implementations_are_not_allowed:r(2392,1,"Multiple_constructor_implementations_are_not_allowed_2392","Multiple constructor implementations are not allowed."),Duplicate_function_implementation:r(2393,1,"Duplicate_function_implementation_2393","Duplicate function implementation."),This_overload_signature_is_not_compatible_with_its_implementation_signature:r(2394,1,"This_overload_signature_is_not_compatible_with_its_implementation_signature_2394","This overload signature is not compatible with its implementation signature."),Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local:r(2395,1,"Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395","Individual declarations in merged declaration '{0}' must be all exported or all local."),Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters:r(2396,1,"Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396","Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."),Declaration_name_conflicts_with_built_in_global_identifier_0:r(2397,1,"Declaration_name_conflicts_with_built_in_global_identifier_0_2397","Declaration name conflicts with built-in global identifier '{0}'."),constructor_cannot_be_used_as_a_parameter_property_name:r(2398,1,"constructor_cannot_be_used_as_a_parameter_property_name_2398","'constructor' cannot be used as a parameter property name."),Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference:r(2399,1,"Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399","Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."),Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference:r(2400,1,"Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400","Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."),A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers:r(2401,1,"A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401","A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers."),Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference:r(2402,1,"Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402","Expression resolves to '_super' that compiler uses to capture base class reference."),Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2:r(2403,1,"Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403","Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."),The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:r(2404,1,"The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404","The left-hand side of a 'for...in' statement cannot use a type annotation."),The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any:r(2405,1,"The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405","The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."),The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access:r(2406,1,"The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406","The left-hand side of a 'for...in' statement must be a variable or a property access."),The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0:r(2407,1,"The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407","The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."),Setters_cannot_return_a_value:r(2408,1,"Setters_cannot_return_a_value_2408","Setters cannot return a value."),Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class:r(2409,1,"Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409","Return type of constructor signature must be assignable to the instance type of the class."),The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any:r(2410,1,"The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410","The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."),Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target:r(2412,1,"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412","Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."),Property_0_of_type_1_is_not_assignable_to_2_index_type_3:r(2411,1,"Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411","Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."),_0_index_type_1_is_not_assignable_to_2_index_type_3:r(2413,1,"_0_index_type_1_is_not_assignable_to_2_index_type_3_2413","'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."),Class_name_cannot_be_0:r(2414,1,"Class_name_cannot_be_0_2414","Class name cannot be '{0}'."),Class_0_incorrectly_extends_base_class_1:r(2415,1,"Class_0_incorrectly_extends_base_class_1_2415","Class '{0}' incorrectly extends base class '{1}'."),Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2:r(2416,1,"Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416","Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."),Class_static_side_0_incorrectly_extends_base_class_static_side_1:r(2417,1,"Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417","Class static side '{0}' incorrectly extends base class static side '{1}'."),Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1:r(2418,1,"Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418","Type of computed property's value is '{0}', which is not assignable to type '{1}'."),Types_of_construct_signatures_are_incompatible:r(2419,1,"Types_of_construct_signatures_are_incompatible_2419","Types of construct signatures are incompatible."),Class_0_incorrectly_implements_interface_1:r(2420,1,"Class_0_incorrectly_implements_interface_1_2420","Class '{0}' incorrectly implements interface '{1}'."),A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members:r(2422,1,"A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422","A class can only implement an object type or intersection of object types with statically known members."),Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor:r(2423,1,"Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423","Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."),Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function:r(2425,1,"Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425","Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."),Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function:r(2426,1,"Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426","Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."),Interface_name_cannot_be_0:r(2427,1,"Interface_name_cannot_be_0_2427","Interface name cannot be '{0}'."),All_declarations_of_0_must_have_identical_type_parameters:r(2428,1,"All_declarations_of_0_must_have_identical_type_parameters_2428","All declarations of '{0}' must have identical type parameters."),Interface_0_incorrectly_extends_interface_1:r(2430,1,"Interface_0_incorrectly_extends_interface_1_2430","Interface '{0}' incorrectly extends interface '{1}'."),Enum_name_cannot_be_0:r(2431,1,"Enum_name_cannot_be_0_2431","Enum name cannot be '{0}'."),In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element:r(2432,1,"In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432","In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."),A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged:r(2433,1,"A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433","A namespace declaration cannot be in a different file from a class or function with which it is merged."),A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged:r(2434,1,"A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434","A namespace declaration cannot be located prior to a class or function with which it is merged."),Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces:r(2435,1,"Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435","Ambient modules cannot be nested in other modules or namespaces."),Ambient_module_declaration_cannot_specify_relative_module_name:r(2436,1,"Ambient_module_declaration_cannot_specify_relative_module_name_2436","Ambient module declaration cannot specify relative module name."),Module_0_is_hidden_by_a_local_declaration_with_the_same_name:r(2437,1,"Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437","Module '{0}' is hidden by a local declaration with the same name."),Import_name_cannot_be_0:r(2438,1,"Import_name_cannot_be_0_2438","Import name cannot be '{0}'."),Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name:r(2439,1,"Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439","Import or export declaration in an ambient module declaration cannot reference module through relative module name."),Import_declaration_conflicts_with_local_declaration_of_0:r(2440,1,"Import_declaration_conflicts_with_local_declaration_of_0_2440","Import declaration conflicts with local declaration of '{0}'."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module:r(2441,1,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module."),Types_have_separate_declarations_of_a_private_property_0:r(2442,1,"Types_have_separate_declarations_of_a_private_property_0_2442","Types have separate declarations of a private property '{0}'."),Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2:r(2443,1,"Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443","Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."),Property_0_is_protected_in_type_1_but_public_in_type_2:r(2444,1,"Property_0_is_protected_in_type_1_but_public_in_type_2_2444","Property '{0}' is protected in type '{1}' but public in type '{2}'."),Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses:r(2445,1,"Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445","Property '{0}' is protected and only accessible within class '{1}' and its subclasses."),Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2:r(2446,1,"Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446","Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'."),The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead:r(2447,1,"The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447","The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."),Block_scoped_variable_0_used_before_its_declaration:r(2448,1,"Block_scoped_variable_0_used_before_its_declaration_2448","Block-scoped variable '{0}' used before its declaration."),Class_0_used_before_its_declaration:r(2449,1,"Class_0_used_before_its_declaration_2449","Class '{0}' used before its declaration."),Enum_0_used_before_its_declaration:r(2450,1,"Enum_0_used_before_its_declaration_2450","Enum '{0}' used before its declaration."),Cannot_redeclare_block_scoped_variable_0:r(2451,1,"Cannot_redeclare_block_scoped_variable_0_2451","Cannot redeclare block-scoped variable '{0}'."),An_enum_member_cannot_have_a_numeric_name:r(2452,1,"An_enum_member_cannot_have_a_numeric_name_2452","An enum member cannot have a numeric name."),Variable_0_is_used_before_being_assigned:r(2454,1,"Variable_0_is_used_before_being_assigned_2454","Variable '{0}' is used before being assigned."),Type_alias_0_circularly_references_itself:r(2456,1,"Type_alias_0_circularly_references_itself_2456","Type alias '{0}' circularly references itself."),Type_alias_name_cannot_be_0:r(2457,1,"Type_alias_name_cannot_be_0_2457","Type alias name cannot be '{0}'."),An_AMD_module_cannot_have_multiple_name_assignments:r(2458,1,"An_AMD_module_cannot_have_multiple_name_assignments_2458","An AMD module cannot have multiple name assignments."),Module_0_declares_1_locally_but_it_is_not_exported:r(2459,1,"Module_0_declares_1_locally_but_it_is_not_exported_2459","Module '{0}' declares '{1}' locally, but it is not exported."),Module_0_declares_1_locally_but_it_is_exported_as_2:r(2460,1,"Module_0_declares_1_locally_but_it_is_exported_as_2_2460","Module '{0}' declares '{1}' locally, but it is exported as '{2}'."),Type_0_is_not_an_array_type:r(2461,1,"Type_0_is_not_an_array_type_2461","Type '{0}' is not an array type."),A_rest_element_must_be_last_in_a_destructuring_pattern:r(2462,1,"A_rest_element_must_be_last_in_a_destructuring_pattern_2462","A rest element must be last in a destructuring pattern."),A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature:r(2463,1,"A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463","A binding pattern parameter cannot be optional in an implementation signature."),A_computed_property_name_must_be_of_type_string_number_symbol_or_any:r(2464,1,"A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464","A computed property name must be of type 'string', 'number', 'symbol', or 'any'."),this_cannot_be_referenced_in_a_computed_property_name:r(2465,1,"this_cannot_be_referenced_in_a_computed_property_name_2465","'this' cannot be referenced in a computed property name."),super_cannot_be_referenced_in_a_computed_property_name:r(2466,1,"super_cannot_be_referenced_in_a_computed_property_name_2466","'super' cannot be referenced in a computed property name."),A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type:r(2467,1,"A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467","A computed property name cannot reference a type parameter from its containing type."),Cannot_find_global_value_0:r(2468,1,"Cannot_find_global_value_0_2468","Cannot find global value '{0}'."),The_0_operator_cannot_be_applied_to_type_symbol:r(2469,1,"The_0_operator_cannot_be_applied_to_type_symbol_2469","The '{0}' operator cannot be applied to type 'symbol'."),Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher:r(2472,1,"Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472","Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."),Enum_declarations_must_all_be_const_or_non_const:r(2473,1,"Enum_declarations_must_all_be_const_or_non_const_2473","Enum declarations must all be const or non-const."),const_enum_member_initializers_must_be_constant_expressions:r(2474,1,"const_enum_member_initializers_must_be_constant_expressions_2474","const enum member initializers must be constant expressions."),const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query:r(2475,1,"const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475","'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query."),A_const_enum_member_can_only_be_accessed_using_a_string_literal:r(2476,1,"A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476","A const enum member can only be accessed using a string literal."),const_enum_member_initializer_was_evaluated_to_a_non_finite_value:r(2477,1,"const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477","'const' enum member initializer was evaluated to a non-finite value."),const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN:r(2478,1,"const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478","'const' enum member initializer was evaluated to disallowed value 'NaN'."),let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations:r(2480,1,"let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480","'let' is not allowed to be used as a name in 'let' or 'const' declarations."),Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1:r(2481,1,"Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481","Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."),The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation:r(2483,1,"The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483","The left-hand side of a 'for...of' statement cannot use a type annotation."),Export_declaration_conflicts_with_exported_declaration_of_0:r(2484,1,"Export_declaration_conflicts_with_exported_declaration_of_0_2484","Export declaration conflicts with exported declaration of '{0}'."),The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access:r(2487,1,"The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487","The left-hand side of a 'for...of' statement must be a variable or a property access."),Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator:r(2488,1,"Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488","Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."),An_iterator_must_have_a_next_method:r(2489,1,"An_iterator_must_have_a_next_method_2489","An iterator must have a 'next()' method."),The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property:r(2490,1,"The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490","The type returned by the '{0}()' method of an iterator must have a 'value' property."),The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern:r(2491,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491","The left-hand side of a 'for...in' statement cannot be a destructuring pattern."),Cannot_redeclare_identifier_0_in_catch_clause:r(2492,1,"Cannot_redeclare_identifier_0_in_catch_clause_2492","Cannot redeclare identifier '{0}' in catch clause."),Tuple_type_0_of_length_1_has_no_element_at_index_2:r(2493,1,"Tuple_type_0_of_length_1_has_no_element_at_index_2_2493","Tuple type '{0}' of length '{1}' has no element at index '{2}'."),Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher:r(2494,1,"Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494","Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher."),Type_0_is_not_an_array_type_or_a_string_type:r(2495,1,"Type_0_is_not_an_array_type_or_a_string_type_2495","Type '{0}' is not an array type or a string type."),The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_function_expression:r(2496,1,"The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_func_2496","The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression."),This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export:r(2497,1,"This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497","This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export."),Module_0_uses_export_and_cannot_be_used_with_export_Asterisk:r(2498,1,"Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498","Module '{0}' uses 'export =' and cannot be used with 'export *'."),An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments:r(2499,1,"An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499","An interface can only extend an identifier/qualified-name with optional type arguments."),A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments:r(2500,1,"A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500","A class can only implement an identifier/qualified-name with optional type arguments."),A_rest_element_cannot_contain_a_binding_pattern:r(2501,1,"A_rest_element_cannot_contain_a_binding_pattern_2501","A rest element cannot contain a binding pattern."),_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation:r(2502,1,"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502","'{0}' is referenced directly or indirectly in its own type annotation."),Cannot_find_namespace_0:r(2503,1,"Cannot_find_namespace_0_2503","Cannot find namespace '{0}'."),Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:r(2504,1,"Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504","Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator."),A_generator_cannot_have_a_void_type_annotation:r(2505,1,"A_generator_cannot_have_a_void_type_annotation_2505","A generator cannot have a 'void' type annotation."),_0_is_referenced_directly_or_indirectly_in_its_own_base_expression:r(2506,1,"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506","'{0}' is referenced directly or indirectly in its own base expression."),Type_0_is_not_a_constructor_function_type:r(2507,1,"Type_0_is_not_a_constructor_function_type_2507","Type '{0}' is not a constructor function type."),No_base_constructor_has_the_specified_number_of_type_arguments:r(2508,1,"No_base_constructor_has_the_specified_number_of_type_arguments_2508","No base constructor has the specified number of type arguments."),Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members:r(2509,1,"Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509","Base constructor return type '{0}' is not an object type or intersection of object types with statically known members."),Base_constructors_must_all_have_the_same_return_type:r(2510,1,"Base_constructors_must_all_have_the_same_return_type_2510","Base constructors must all have the same return type."),Cannot_create_an_instance_of_an_abstract_class:r(2511,1,"Cannot_create_an_instance_of_an_abstract_class_2511","Cannot create an instance of an abstract class."),Overload_signatures_must_all_be_abstract_or_non_abstract:r(2512,1,"Overload_signatures_must_all_be_abstract_or_non_abstract_2512","Overload signatures must all be abstract or non-abstract."),Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression:r(2513,1,"Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513","Abstract method '{0}' in class '{1}' cannot be accessed via super expression."),A_tuple_type_cannot_be_indexed_with_a_negative_value:r(2514,1,"A_tuple_type_cannot_be_indexed_with_a_negative_value_2514","A tuple type cannot be indexed with a negative value."),Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2:r(2515,1,"Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515","Non-abstract class '{0}' does not implement inherited abstract member {1} from class '{2}'."),All_declarations_of_an_abstract_method_must_be_consecutive:r(2516,1,"All_declarations_of_an_abstract_method_must_be_consecutive_2516","All declarations of an abstract method must be consecutive."),Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type:r(2517,1,"Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517","Cannot assign an abstract constructor type to a non-abstract constructor type."),A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard:r(2518,1,"A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518","A 'this'-based type guard is not compatible with a parameter-based type guard."),An_async_iterator_must_have_a_next_method:r(2519,1,"An_async_iterator_must_have_a_next_method_2519","An async iterator must have a 'next()' method."),Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions:r(2520,1,"Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520","Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."),The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_standard_function_or_method:r(2522,1,"The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_sta_2522","The 'arguments' object cannot be referenced in an async function or method in ES5. Consider using a standard function or method."),yield_expressions_cannot_be_used_in_a_parameter_initializer:r(2523,1,"yield_expressions_cannot_be_used_in_a_parameter_initializer_2523","'yield' expressions cannot be used in a parameter initializer."),await_expressions_cannot_be_used_in_a_parameter_initializer:r(2524,1,"await_expressions_cannot_be_used_in_a_parameter_initializer_2524","'await' expressions cannot be used in a parameter initializer."),A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface:r(2526,1,"A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526","A 'this' type is available only in a non-static member of a class or interface."),The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary:r(2527,1,"The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527","The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."),A_module_cannot_have_multiple_default_exports:r(2528,1,"A_module_cannot_have_multiple_default_exports_2528","A module cannot have multiple default exports."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions:r(2529,1,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions."),Property_0_is_incompatible_with_index_signature:r(2530,1,"Property_0_is_incompatible_with_index_signature_2530","Property '{0}' is incompatible with index signature."),Object_is_possibly_null:r(2531,1,"Object_is_possibly_null_2531","Object is possibly 'null'."),Object_is_possibly_undefined:r(2532,1,"Object_is_possibly_undefined_2532","Object is possibly 'undefined'."),Object_is_possibly_null_or_undefined:r(2533,1,"Object_is_possibly_null_or_undefined_2533","Object is possibly 'null' or 'undefined'."),A_function_returning_never_cannot_have_a_reachable_end_point:r(2534,1,"A_function_returning_never_cannot_have_a_reachable_end_point_2534","A function returning 'never' cannot have a reachable end point."),Type_0_cannot_be_used_to_index_type_1:r(2536,1,"Type_0_cannot_be_used_to_index_type_1_2536","Type '{0}' cannot be used to index type '{1}'."),Type_0_has_no_matching_index_signature_for_type_1:r(2537,1,"Type_0_has_no_matching_index_signature_for_type_1_2537","Type '{0}' has no matching index signature for type '{1}'."),Type_0_cannot_be_used_as_an_index_type:r(2538,1,"Type_0_cannot_be_used_as_an_index_type_2538","Type '{0}' cannot be used as an index type."),Cannot_assign_to_0_because_it_is_not_a_variable:r(2539,1,"Cannot_assign_to_0_because_it_is_not_a_variable_2539","Cannot assign to '{0}' because it is not a variable."),Cannot_assign_to_0_because_it_is_a_read_only_property:r(2540,1,"Cannot_assign_to_0_because_it_is_a_read_only_property_2540","Cannot assign to '{0}' because it is a read-only property."),Index_signature_in_type_0_only_permits_reading:r(2542,1,"Index_signature_in_type_0_only_permits_reading_2542","Index signature in type '{0}' only permits reading."),Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference:r(2543,1,"Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543","Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."),Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference:r(2544,1,"Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544","Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."),A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any:r(2545,1,"A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545","A mixin class must have a constructor with a single rest parameter of type 'any[]'."),The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property:r(2547,1,"The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547","The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property."),Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:r(2548,1,"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548","Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:r(2549,1,"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549","Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later:r(2550,1,"Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_c_2550","Property '{0}' does not exist on type '{1}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{2}' or later."),Property_0_does_not_exist_on_type_1_Did_you_mean_2:r(2551,1,"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"),Cannot_find_name_0_Did_you_mean_1:r(2552,1,"Cannot_find_name_0_Did_you_mean_1_2552","Cannot find name '{0}'. Did you mean '{1}'?"),Computed_values_are_not_permitted_in_an_enum_with_string_valued_members:r(2553,1,"Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553","Computed values are not permitted in an enum with string valued members."),Expected_0_arguments_but_got_1:r(2554,1,"Expected_0_arguments_but_got_1_2554","Expected {0} arguments, but got {1}."),Expected_at_least_0_arguments_but_got_1:r(2555,1,"Expected_at_least_0_arguments_but_got_1_2555","Expected at least {0} arguments, but got {1}."),A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter:r(2556,1,"A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556","A spread argument must either have a tuple type or be passed to a rest parameter."),Expected_0_type_arguments_but_got_1:r(2558,1,"Expected_0_type_arguments_but_got_1_2558","Expected {0} type arguments, but got {1}."),Type_0_has_no_properties_in_common_with_type_1:r(2559,1,"Type_0_has_no_properties_in_common_with_type_1_2559","Type '{0}' has no properties in common with type '{1}'."),Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it:r(2560,1,"Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560","Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"),Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2:r(2561,1,"Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561","Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"),Base_class_expressions_cannot_reference_class_type_parameters:r(2562,1,"Base_class_expressions_cannot_reference_class_type_parameters_2562","Base class expressions cannot reference class type parameters."),The_containing_function_or_module_body_is_too_large_for_control_flow_analysis:r(2563,1,"The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563","The containing function or module body is too large for control flow analysis."),Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor:r(2564,1,"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564","Property '{0}' has no initializer and is not definitely assigned in the constructor."),Property_0_is_used_before_being_assigned:r(2565,1,"Property_0_is_used_before_being_assigned_2565","Property '{0}' is used before being assigned."),A_rest_element_cannot_have_a_property_name:r(2566,1,"A_rest_element_cannot_have_a_property_name_2566","A rest element cannot have a property name."),Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations:r(2567,1,"Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567","Enum declarations can only merge with namespace or other enum declarations."),Property_0_may_not_exist_on_type_1_Did_you_mean_2:r(2568,1,"Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568","Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"),Could_not_find_name_0_Did_you_mean_1:r(2570,1,"Could_not_find_name_0_Did_you_mean_1_2570","Could not find name '{0}'. Did you mean '{1}'?"),Object_is_of_type_unknown:r(2571,1,"Object_is_of_type_unknown_2571","Object is of type 'unknown'."),A_rest_element_type_must_be_an_array_type:r(2574,1,"A_rest_element_type_must_be_an_array_type_2574","A rest element type must be an array type."),No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments:r(2575,1,"No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575","No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."),Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead:r(2576,1,"Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576","Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?"),Return_type_annotation_circularly_references_itself:r(2577,1,"Return_type_annotation_circularly_references_itself_2577","Return type annotation circularly references itself."),Unused_ts_expect_error_directive:r(2578,1,"Unused_ts_expect_error_directive_2578","Unused '@ts-expect-error' directive."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode:r(2580,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2580","Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery:r(2581,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2581","Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha:r(2582,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2582","Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`."),Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later:r(2583,1,"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583","Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later."),Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom:r(2584,1,"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584","Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later:r(2585,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585","'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later."),Cannot_assign_to_0_because_it_is_a_constant:r(2588,1,"Cannot_assign_to_0_because_it_is_a_constant_2588","Cannot assign to '{0}' because it is a constant."),Type_instantiation_is_excessively_deep_and_possibly_infinite:r(2589,1,"Type_instantiation_is_excessively_deep_and_possibly_infinite_2589","Type instantiation is excessively deep and possibly infinite."),Expression_produces_a_union_type_that_is_too_complex_to_represent:r(2590,1,"Expression_produces_a_union_type_that_is_too_complex_to_represent_2590","Expression produces a union type that is too complex to represent."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig:r(2591,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2591","Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig:r(2592,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2592","Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig:r(2593,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2593","Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig."),This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag:r(2594,1,"This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag_2594","This module is declared with 'export =', and can only be used with a default import when using the '{0}' flag."),_0_can_only_be_imported_by_using_a_default_import:r(2595,1,"_0_can_only_be_imported_by_using_a_default_import_2595","'{0}' can only be imported by using a default import."),_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:r(2596,1,"_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import_2596","'{0}' can only be imported by turning on the 'esModuleInterop' flag and using a default import."),_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import:r(2597,1,"_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import_2597","'{0}' can only be imported by using a 'require' call or by using a default import."),_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:r(2598,1,"_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using__2598","'{0}' can only be imported by using a 'require' call or by turning on the 'esModuleInterop' flag and using a default import."),JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist:r(2602,1,"JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602","JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."),Property_0_in_type_1_is_not_assignable_to_type_2:r(2603,1,"Property_0_in_type_1_is_not_assignable_to_type_2_2603","Property '{0}' in type '{1}' is not assignable to type '{2}'."),JSX_element_type_0_does_not_have_any_construct_or_call_signatures:r(2604,1,"JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604","JSX element type '{0}' does not have any construct or call signatures."),Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property:r(2606,1,"Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606","Property '{0}' of JSX spread attribute is not assignable to target property."),JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property:r(2607,1,"JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607","JSX element class does not support attributes because it does not have a '{0}' property."),The_global_type_JSX_0_may_not_have_more_than_one_property:r(2608,1,"The_global_type_JSX_0_may_not_have_more_than_one_property_2608","The global type 'JSX.{0}' may not have more than one property."),JSX_spread_child_must_be_an_array_type:r(2609,1,"JSX_spread_child_must_be_an_array_type_2609","JSX spread child must be an array type."),_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property:r(2610,1,"_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610","'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."),_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor:r(2611,1,"_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611","'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."),Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration:r(2612,1,"Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612","Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."),Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead:r(2613,1,"Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613","Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"),Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead:r(2614,1,"Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614","Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"),Type_of_property_0_circularly_references_itself_in_mapped_type_1:r(2615,1,"Type_of_property_0_circularly_references_itself_in_mapped_type_1_2615","Type of property '{0}' circularly references itself in mapped type '{1}'."),_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import:r(2616,1,"_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import_2616","'{0}' can only be imported by using 'import {1} = require({2})' or a default import."),_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:r(2617,1,"_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_us_2617","'{0}' can only be imported by using 'import {1} = require({2})' or by turning on the 'esModuleInterop' flag and using a default import."),Source_has_0_element_s_but_target_requires_1:r(2618,1,"Source_has_0_element_s_but_target_requires_1_2618","Source has {0} element(s) but target requires {1}."),Source_has_0_element_s_but_target_allows_only_1:r(2619,1,"Source_has_0_element_s_but_target_allows_only_1_2619","Source has {0} element(s) but target allows only {1}."),Target_requires_0_element_s_but_source_may_have_fewer:r(2620,1,"Target_requires_0_element_s_but_source_may_have_fewer_2620","Target requires {0} element(s) but source may have fewer."),Target_allows_only_0_element_s_but_source_may_have_more:r(2621,1,"Target_allows_only_0_element_s_but_source_may_have_more_2621","Target allows only {0} element(s) but source may have more."),Source_provides_no_match_for_required_element_at_position_0_in_target:r(2623,1,"Source_provides_no_match_for_required_element_at_position_0_in_target_2623","Source provides no match for required element at position {0} in target."),Source_provides_no_match_for_variadic_element_at_position_0_in_target:r(2624,1,"Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624","Source provides no match for variadic element at position {0} in target."),Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target:r(2625,1,"Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625","Variadic element at position {0} in source does not match element at position {1} in target."),Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target:r(2626,1,"Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626","Type at position {0} in source is not compatible with type at position {1} in target."),Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target:r(2627,1,"Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627","Type at positions {0} through {1} in source is not compatible with type at position {2} in target."),Cannot_assign_to_0_because_it_is_an_enum:r(2628,1,"Cannot_assign_to_0_because_it_is_an_enum_2628","Cannot assign to '{0}' because it is an enum."),Cannot_assign_to_0_because_it_is_a_class:r(2629,1,"Cannot_assign_to_0_because_it_is_a_class_2629","Cannot assign to '{0}' because it is a class."),Cannot_assign_to_0_because_it_is_a_function:r(2630,1,"Cannot_assign_to_0_because_it_is_a_function_2630","Cannot assign to '{0}' because it is a function."),Cannot_assign_to_0_because_it_is_a_namespace:r(2631,1,"Cannot_assign_to_0_because_it_is_a_namespace_2631","Cannot assign to '{0}' because it is a namespace."),Cannot_assign_to_0_because_it_is_an_import:r(2632,1,"Cannot_assign_to_0_because_it_is_an_import_2632","Cannot assign to '{0}' because it is an import."),JSX_property_access_expressions_cannot_include_JSX_namespace_names:r(2633,1,"JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633","JSX property access expressions cannot include JSX namespace names"),_0_index_signatures_are_incompatible:r(2634,1,"_0_index_signatures_are_incompatible_2634","'{0}' index signatures are incompatible."),Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable:r(2635,1,"Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635","Type '{0}' has no signatures for which the type argument list is applicable."),Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation:r(2636,1,"Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation_2636","Type '{0}' is not assignable to type '{1}' as implied by variance annotation."),Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types:r(2637,1,"Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637","Variance annotations are only supported in type aliases for object, function, constructor, and mapped types."),Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator:r(2638,1,"Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638","Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."),React_components_cannot_include_JSX_namespace_names:r(2639,1,"React_components_cannot_include_JSX_namespace_names_2639","React components cannot include JSX namespace names"),Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity:r(2649,1,"Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649","Cannot augment module '{0}' with value exports because it resolves to a non-module entity."),Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more:r(2650,1,"Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and__2650","Non-abstract class expression is missing implementations for the following members of '{0}': {1} and {2} more."),A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums:r(2651,1,"A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651","A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."),Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead:r(2652,1,"Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652","Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."),Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1:r(2653,1,"Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653","Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."),Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2:r(2654,1,"Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_2654","Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2}."),Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more:r(2655,1,"Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more_2655","Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2} and {3} more."),Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1:r(2656,1,"Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_2656","Non-abstract class expression is missing implementations for the following members of '{0}': {1}."),JSX_expressions_must_have_one_parent_element:r(2657,1,"JSX_expressions_must_have_one_parent_element_2657","JSX expressions must have one parent element."),Type_0_provides_no_match_for_the_signature_1:r(2658,1,"Type_0_provides_no_match_for_the_signature_1_2658","Type '{0}' provides no match for the signature '{1}'."),super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher:r(2659,1,"super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659","'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."),super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions:r(2660,1,"super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660","'super' can only be referenced in members of derived classes or object literal expressions."),Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module:r(2661,1,"Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661","Cannot export '{0}'. Only local declarations can be exported from a module."),Cannot_find_name_0_Did_you_mean_the_static_member_1_0:r(2662,1,"Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662","Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"),Cannot_find_name_0_Did_you_mean_the_instance_member_this_0:r(2663,1,"Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663","Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?"),Invalid_module_name_in_augmentation_module_0_cannot_be_found:r(2664,1,"Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664","Invalid module name in augmentation, module '{0}' cannot be found."),Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented:r(2665,1,"Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665","Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented."),Exports_and_export_assignments_are_not_permitted_in_module_augmentations:r(2666,1,"Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666","Exports and export assignments are not permitted in module augmentations."),Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module:r(2667,1,"Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667","Imports are not permitted in module augmentations. Consider moving them to the enclosing external module."),export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible:r(2668,1,"export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668","'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible."),Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations:r(2669,1,"Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669","Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."),Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context:r(2670,1,"Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670","Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context."),Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity:r(2671,1,"Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671","Cannot augment module '{0}' because it resolves to a non-module entity."),Cannot_assign_a_0_constructor_type_to_a_1_constructor_type:r(2672,1,"Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672","Cannot assign a '{0}' constructor type to a '{1}' constructor type."),Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration:r(2673,1,"Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673","Constructor of class '{0}' is private and only accessible within the class declaration."),Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration:r(2674,1,"Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674","Constructor of class '{0}' is protected and only accessible within the class declaration."),Cannot_extend_a_class_0_Class_constructor_is_marked_as_private:r(2675,1,"Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675","Cannot extend a class '{0}'. Class constructor is marked as private."),Accessors_must_both_be_abstract_or_non_abstract:r(2676,1,"Accessors_must_both_be_abstract_or_non_abstract_2676","Accessors must both be abstract or non-abstract."),A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type:r(2677,1,"A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677","A type predicate's type must be assignable to its parameter's type."),Type_0_is_not_comparable_to_type_1:r(2678,1,"Type_0_is_not_comparable_to_type_1_2678","Type '{0}' is not comparable to type '{1}'."),A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void:r(2679,1,"A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679","A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."),A_0_parameter_must_be_the_first_parameter:r(2680,1,"A_0_parameter_must_be_the_first_parameter_2680","A '{0}' parameter must be the first parameter."),A_constructor_cannot_have_a_this_parameter:r(2681,1,"A_constructor_cannot_have_a_this_parameter_2681","A constructor cannot have a 'this' parameter."),this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation:r(2683,1,"this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683","'this' implicitly has type 'any' because it does not have a type annotation."),The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1:r(2684,1,"The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684","The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."),The_this_types_of_each_signature_are_incompatible:r(2685,1,"The_this_types_of_each_signature_are_incompatible_2685","The 'this' types of each signature are incompatible."),_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead:r(2686,1,"_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686","'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."),All_declarations_of_0_must_have_identical_modifiers:r(2687,1,"All_declarations_of_0_must_have_identical_modifiers_2687","All declarations of '{0}' must have identical modifiers."),Cannot_find_type_definition_file_for_0:r(2688,1,"Cannot_find_type_definition_file_for_0_2688","Cannot find type definition file for '{0}'."),Cannot_extend_an_interface_0_Did_you_mean_implements:r(2689,1,"Cannot_extend_an_interface_0_Did_you_mean_implements_2689","Cannot extend an interface '{0}'. Did you mean 'implements'?"),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0:r(2690,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0_2690","'{0}' only refers to a type, but is being used as a value here. Did you mean to use '{1} in {0}'?"),_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible:r(2692,1,"_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692","'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here:r(2693,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693","'{0}' only refers to a type, but is being used as a value here."),Namespace_0_has_no_exported_member_1:r(2694,1,"Namespace_0_has_no_exported_member_1_2694","Namespace '{0}' has no exported member '{1}'."),Left_side_of_comma_operator_is_unused_and_has_no_side_effects:r(2695,1,"Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695","Left side of comma operator is unused and has no side effects.",!0),The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead:r(2696,1,"The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696","The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"),An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:r(2697,1,"An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697","An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."),Spread_types_may_only_be_created_from_object_types:r(2698,1,"Spread_types_may_only_be_created_from_object_types_2698","Spread types may only be created from object types."),Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1:r(2699,1,"Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699","Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."),Rest_types_may_only_be_created_from_object_types:r(2700,1,"Rest_types_may_only_be_created_from_object_types_2700","Rest types may only be created from object types."),The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access:r(2701,1,"The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701","The target of an object rest assignment must be a variable or a property access."),_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here:r(2702,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702","'{0}' only refers to a type, but is being used as a namespace here."),The_operand_of_a_delete_operator_must_be_a_property_reference:r(2703,1,"The_operand_of_a_delete_operator_must_be_a_property_reference_2703","The operand of a 'delete' operator must be a property reference."),The_operand_of_a_delete_operator_cannot_be_a_read_only_property:r(2704,1,"The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704","The operand of a 'delete' operator cannot be a read-only property."),An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:r(2705,1,"An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_2705","An async function or method in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."),Required_type_parameters_may_not_follow_optional_type_parameters:r(2706,1,"Required_type_parameters_may_not_follow_optional_type_parameters_2706","Required type parameters may not follow optional type parameters."),Generic_type_0_requires_between_1_and_2_type_arguments:r(2707,1,"Generic_type_0_requires_between_1_and_2_type_arguments_2707","Generic type '{0}' requires between {1} and {2} type arguments."),Cannot_use_namespace_0_as_a_value:r(2708,1,"Cannot_use_namespace_0_as_a_value_2708","Cannot use namespace '{0}' as a value."),Cannot_use_namespace_0_as_a_type:r(2709,1,"Cannot_use_namespace_0_as_a_type_2709","Cannot use namespace '{0}' as a type."),_0_are_specified_twice_The_attribute_named_0_will_be_overwritten:r(2710,1,"_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710","'{0}' are specified twice. The attribute named '{0}' will be overwritten."),A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:r(2711,1,"A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711","A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."),A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:r(2712,1,"A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_t_2712","A dynamic import call in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."),Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1:r(2713,1,"Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713",`Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}["{1}"]'?`),The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context:r(2714,1,"The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714","The expression of an export assignment must be an identifier or qualified name in an ambient context."),Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor:r(2715,1,"Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715","Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."),Type_parameter_0_has_a_circular_default:r(2716,1,"Type_parameter_0_has_a_circular_default_2716","Type parameter '{0}' has a circular default."),Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:r(2717,1,"Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717","Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."),Duplicate_property_0:r(2718,1,"Duplicate_property_0_2718","Duplicate property '{0}'."),Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated:r(2719,1,"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719","Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."),Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass:r(2720,1,"Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720","Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"),Cannot_invoke_an_object_which_is_possibly_null:r(2721,1,"Cannot_invoke_an_object_which_is_possibly_null_2721","Cannot invoke an object which is possibly 'null'."),Cannot_invoke_an_object_which_is_possibly_undefined:r(2722,1,"Cannot_invoke_an_object_which_is_possibly_undefined_2722","Cannot invoke an object which is possibly 'undefined'."),Cannot_invoke_an_object_which_is_possibly_null_or_undefined:r(2723,1,"Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723","Cannot invoke an object which is possibly 'null' or 'undefined'."),_0_has_no_exported_member_named_1_Did_you_mean_2:r(2724,1,"_0_has_no_exported_member_named_1_Did_you_mean_2_2724","'{0}' has no exported member named '{1}'. Did you mean '{2}'?"),Class_name_cannot_be_Object_when_targeting_ES5_with_module_0:r(2725,1,"Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725","Class name cannot be 'Object' when targeting ES5 with module {0}."),Cannot_find_lib_definition_for_0:r(2726,1,"Cannot_find_lib_definition_for_0_2726","Cannot find lib definition for '{0}'."),Cannot_find_lib_definition_for_0_Did_you_mean_1:r(2727,1,"Cannot_find_lib_definition_for_0_Did_you_mean_1_2727","Cannot find lib definition for '{0}'. Did you mean '{1}'?"),_0_is_declared_here:r(2728,3,"_0_is_declared_here_2728","'{0}' is declared here."),Property_0_is_used_before_its_initialization:r(2729,1,"Property_0_is_used_before_its_initialization_2729","Property '{0}' is used before its initialization."),An_arrow_function_cannot_have_a_this_parameter:r(2730,1,"An_arrow_function_cannot_have_a_this_parameter_2730","An arrow function cannot have a 'this' parameter."),Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String:r(2731,1,"Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731","Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."),Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension:r(2732,1,"Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732","Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension."),Property_0_was_also_declared_here:r(2733,1,"Property_0_was_also_declared_here_2733","Property '{0}' was also declared here."),Are_you_missing_a_semicolon:r(2734,1,"Are_you_missing_a_semicolon_2734","Are you missing a semicolon?"),Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1:r(2735,1,"Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735","Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"),Operator_0_cannot_be_applied_to_type_1:r(2736,1,"Operator_0_cannot_be_applied_to_type_1_2736","Operator '{0}' cannot be applied to type '{1}'."),BigInt_literals_are_not_available_when_targeting_lower_than_ES2020:r(2737,1,"BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737","BigInt literals are not available when targeting lower than ES2020."),An_outer_value_of_this_is_shadowed_by_this_container:r(2738,3,"An_outer_value_of_this_is_shadowed_by_this_container_2738","An outer value of 'this' is shadowed by this container."),Type_0_is_missing_the_following_properties_from_type_1_Colon_2:r(2739,1,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739","Type '{0}' is missing the following properties from type '{1}': {2}"),Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more:r(2740,1,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740","Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more."),Property_0_is_missing_in_type_1_but_required_in_type_2:r(2741,1,"Property_0_is_missing_in_type_1_but_required_in_type_2_2741","Property '{0}' is missing in type '{1}' but required in type '{2}'."),The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary:r(2742,1,"The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742","The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary."),No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments:r(2743,1,"No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743","No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments."),Type_parameter_defaults_can_only_reference_previously_declared_type_parameters:r(2744,1,"Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744","Type parameter defaults can only reference previously declared type parameters."),This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided:r(2745,1,"This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745","This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided."),This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided:r(2746,1,"This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746","This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided."),_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2:r(2747,1,"_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747","'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."),Cannot_access_ambient_const_enums_when_0_is_enabled:r(2748,1,"Cannot_access_ambient_const_enums_when_0_is_enabled_2748","Cannot access ambient const enums when '{0}' is enabled."),_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0:r(2749,1,"_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0_2749","'{0}' refers to a value, but is being used as a type here. Did you mean 'typeof {0}'?"),The_implementation_signature_is_declared_here:r(2750,1,"The_implementation_signature_is_declared_here_2750","The implementation signature is declared here."),Circularity_originates_in_type_at_this_location:r(2751,1,"Circularity_originates_in_type_at_this_location_2751","Circularity originates in type at this location."),The_first_export_default_is_here:r(2752,1,"The_first_export_default_is_here_2752","The first export default is here."),Another_export_default_is_here:r(2753,1,"Another_export_default_is_here_2753","Another export default is here."),super_may_not_use_type_arguments:r(2754,1,"super_may_not_use_type_arguments_2754","'super' may not use type arguments."),No_constituent_of_type_0_is_callable:r(2755,1,"No_constituent_of_type_0_is_callable_2755","No constituent of type '{0}' is callable."),Not_all_constituents_of_type_0_are_callable:r(2756,1,"Not_all_constituents_of_type_0_are_callable_2756","Not all constituents of type '{0}' are callable."),Type_0_has_no_call_signatures:r(2757,1,"Type_0_has_no_call_signatures_2757","Type '{0}' has no call signatures."),Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other:r(2758,1,"Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758","Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other."),No_constituent_of_type_0_is_constructable:r(2759,1,"No_constituent_of_type_0_is_constructable_2759","No constituent of type '{0}' is constructable."),Not_all_constituents_of_type_0_are_constructable:r(2760,1,"Not_all_constituents_of_type_0_are_constructable_2760","Not all constituents of type '{0}' are constructable."),Type_0_has_no_construct_signatures:r(2761,1,"Type_0_has_no_construct_signatures_2761","Type '{0}' has no construct signatures."),Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other:r(2762,1,"Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762","Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0:r(2763,1,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0:r(2764,1,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0:r(2765,1,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'."),Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0:r(2766,1,"Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766","Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'."),The_0_property_of_an_iterator_must_be_a_method:r(2767,1,"The_0_property_of_an_iterator_must_be_a_method_2767","The '{0}' property of an iterator must be a method."),The_0_property_of_an_async_iterator_must_be_a_method:r(2768,1,"The_0_property_of_an_async_iterator_must_be_a_method_2768","The '{0}' property of an async iterator must be a method."),No_overload_matches_this_call:r(2769,1,"No_overload_matches_this_call_2769","No overload matches this call."),The_last_overload_gave_the_following_error:r(2770,1,"The_last_overload_gave_the_following_error_2770","The last overload gave the following error."),The_last_overload_is_declared_here:r(2771,1,"The_last_overload_is_declared_here_2771","The last overload is declared here."),Overload_0_of_1_2_gave_the_following_error:r(2772,1,"Overload_0_of_1_2_gave_the_following_error_2772","Overload {0} of {1}, '{2}', gave the following error."),Did_you_forget_to_use_await:r(2773,1,"Did_you_forget_to_use_await_2773","Did you forget to use 'await'?"),This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead:r(2774,1,"This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774","This condition will always return true since this function is always defined. Did you mean to call it instead?"),Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation:r(2775,1,"Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775","Assertions require every name in the call target to be declared with an explicit type annotation."),Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name:r(2776,1,"Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776","Assertions require the call target to be an identifier or qualified name."),The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access:r(2777,1,"The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777","The operand of an increment or decrement operator may not be an optional property access."),The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access:r(2778,1,"The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778","The target of an object rest assignment may not be an optional property access."),The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access:r(2779,1,"The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779","The left-hand side of an assignment expression may not be an optional property access."),The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access:r(2780,1,"The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780","The left-hand side of a 'for...in' statement may not be an optional property access."),The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access:r(2781,1,"The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781","The left-hand side of a 'for...of' statement may not be an optional property access."),_0_needs_an_explicit_type_annotation:r(2782,3,"_0_needs_an_explicit_type_annotation_2782","'{0}' needs an explicit type annotation."),_0_is_specified_more_than_once_so_this_usage_will_be_overwritten:r(2783,1,"_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783","'{0}' is specified more than once, so this usage will be overwritten."),get_and_set_accessors_cannot_declare_this_parameters:r(2784,1,"get_and_set_accessors_cannot_declare_this_parameters_2784","'get' and 'set' accessors cannot declare 'this' parameters."),This_spread_always_overwrites_this_property:r(2785,1,"This_spread_always_overwrites_this_property_2785","This spread always overwrites this property."),_0_cannot_be_used_as_a_JSX_component:r(2786,1,"_0_cannot_be_used_as_a_JSX_component_2786","'{0}' cannot be used as a JSX component."),Its_return_type_0_is_not_a_valid_JSX_element:r(2787,1,"Its_return_type_0_is_not_a_valid_JSX_element_2787","Its return type '{0}' is not a valid JSX element."),Its_instance_type_0_is_not_a_valid_JSX_element:r(2788,1,"Its_instance_type_0_is_not_a_valid_JSX_element_2788","Its instance type '{0}' is not a valid JSX element."),Its_element_type_0_is_not_a_valid_JSX_element:r(2789,1,"Its_element_type_0_is_not_a_valid_JSX_element_2789","Its element type '{0}' is not a valid JSX element."),The_operand_of_a_delete_operator_must_be_optional:r(2790,1,"The_operand_of_a_delete_operator_must_be_optional_2790","The operand of a 'delete' operator must be optional."),Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later:r(2791,1,"Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_lat_2791","Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later."),Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option:r(2792,1,"Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792","Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?"),The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible:r(2793,1,"The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_2793","The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible."),Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise:r(2794,1,"Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise_2794","Expected {0} arguments, but got {1}. Did you forget to include 'void' in your type argument to 'Promise'?"),The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types:r(2795,1,"The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types_2795","The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types."),It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked:r(2796,1,"It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tag_2796","It is likely that you are missing a comma to separate these two template expressions. They form a tagged template expression which cannot be invoked."),A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract:r(2797,1,"A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797","A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."),The_declaration_was_marked_as_deprecated_here:r(2798,1,"The_declaration_was_marked_as_deprecated_here_2798","The declaration was marked as deprecated here."),Type_produces_a_tuple_type_that_is_too_large_to_represent:r(2799,1,"Type_produces_a_tuple_type_that_is_too_large_to_represent_2799","Type produces a tuple type that is too large to represent."),Expression_produces_a_tuple_type_that_is_too_large_to_represent:r(2800,1,"Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800","Expression produces a tuple type that is too large to represent."),This_condition_will_always_return_true_since_this_0_is_always_defined:r(2801,1,"This_condition_will_always_return_true_since_this_0_is_always_defined_2801","This condition will always return true since this '{0}' is always defined."),Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher:r(2802,1,"Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802","Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher."),Cannot_assign_to_private_method_0_Private_methods_are_not_writable:r(2803,1,"Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803","Cannot assign to private method '{0}'. Private methods are not writable."),Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name:r(2804,1,"Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804","Duplicate identifier '{0}'. Static and instance elements cannot share the same private name."),Private_accessor_was_defined_without_a_getter:r(2806,1,"Private_accessor_was_defined_without_a_getter_2806","Private accessor was defined without a getter."),This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0:r(2807,1,"This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807","This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."),A_get_accessor_must_be_at_least_as_accessible_as_the_setter:r(2808,1,"A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808","A get accessor must be at least as accessible as the setter"),Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses:r(2809,1,"Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809","Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses."),Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments:r(2810,1,"Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810","Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."),Initializer_for_property_0:r(2811,1,"Initializer_for_property_0_2811","Initializer for property '{0}'"),Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom:r(2812,1,"Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812","Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."),Class_declaration_cannot_implement_overload_list_for_0:r(2813,1,"Class_declaration_cannot_implement_overload_list_for_0_2813","Class declaration cannot implement overload list for '{0}'."),Function_with_bodies_can_only_merge_with_classes_that_are_ambient:r(2814,1,"Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814","Function with bodies can only merge with classes that are ambient."),arguments_cannot_be_referenced_in_property_initializers:r(2815,1,"arguments_cannot_be_referenced_in_property_initializers_2815","'arguments' cannot be referenced in property initializers."),Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class:r(2816,1,"Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816","Cannot use 'this' in a static property initializer of a decorated class."),Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block:r(2817,1,"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817","Property '{0}' has no initializer and is not definitely assigned in a class static block."),Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers:r(2818,1,"Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818","Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."),Namespace_name_cannot_be_0:r(2819,1,"Namespace_name_cannot_be_0_2819","Namespace name cannot be '{0}'."),Type_0_is_not_assignable_to_type_1_Did_you_mean_2:r(2820,1,"Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820","Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve:r(2821,1,"Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve_2821","Import assertions are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'."),Import_assertions_cannot_be_used_with_type_only_imports_or_exports:r(2822,1,"Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822","Import assertions cannot be used with type-only imports or exports."),Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve:r(2823,1,"Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve_2823","Import attributes are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'."),Cannot_find_namespace_0_Did_you_mean_1:r(2833,1,"Cannot_find_namespace_0_Did_you_mean_1_2833","Cannot find namespace '{0}'. Did you mean '{1}'?"),Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path:r(2834,1,"Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834","Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."),Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0:r(2835,1,"Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835","Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"),Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:r(2836,1,"Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2836","Import assertions are not allowed on statements that compile to CommonJS 'require' calls."),Import_assertion_values_must_be_string_literal_expressions:r(2837,1,"Import_assertion_values_must_be_string_literal_expressions_2837","Import assertion values must be string literal expressions."),All_declarations_of_0_must_have_identical_constraints:r(2838,1,"All_declarations_of_0_must_have_identical_constraints_2838","All declarations of '{0}' must have identical constraints."),This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value:r(2839,1,"This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839","This condition will always return '{0}' since JavaScript compares objects by reference, not value."),An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types:r(2840,1,"An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types_2840","An interface cannot extend a primitive type like '{0}'. It can only extend other named object types."),_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation:r(2842,1,"_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842","'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"),We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here:r(2843,1,"We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843","We can only write a type for '{0}' by adding a type for the entire parameter here."),Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:r(2844,1,"Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844","Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),This_condition_will_always_return_0:r(2845,1,"This_condition_will_always_return_0_2845","This condition will always return '{0}'."),A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead:r(2846,1,"A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_f_2846","A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?"),The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression:r(2848,1,"The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression_2848","The right-hand side of an 'instanceof' expression must not be an instantiation expression."),Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1:r(2849,1,"Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1_2849","Target signature provides too few arguments. Expected {0} or more, but got {1}."),The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined:r(2850,1,"The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_n_2850","The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined:r(2851,1,"The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851","The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:r(2852,1,"await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852","'await using' statements are only allowed within async functions and at the top levels of modules."),await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:r(2853,1,"await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853","'await using' statements are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:r(2854,1,"Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854","Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super:r(2855,1,"Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855","Class field '{0}' defined by the parent class is not accessible in the child class via super."),Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:r(2856,1,"Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2856","Import attributes are not allowed on statements that compile to CommonJS 'require' calls."),Import_attributes_cannot_be_used_with_type_only_imports_or_exports:r(2857,1,"Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857","Import attributes cannot be used with type-only imports or exports."),Import_attribute_values_must_be_string_literal_expressions:r(2858,1,"Import_attribute_values_must_be_string_literal_expressions_2858","Import attribute values must be string literal expressions."),Excessive_complexity_comparing_types_0_and_1:r(2859,1,"Excessive_complexity_comparing_types_0_and_1_2859","Excessive complexity comparing types '{0}' and '{1}'."),The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method:r(2860,1,"The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860","The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."),An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression:r(2861,1,"An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861","An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."),Type_0_is_generic_and_can_only_be_indexed_for_reading:r(2862,1,"Type_0_is_generic_and_can_only_be_indexed_for_reading_2862","Type '{0}' is generic and can only be indexed for reading."),A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values:r(2863,1,"A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863","A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values."),A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types:r(2864,1,"A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864","A class cannot implement a primitive type like '{0}'. It can only implement other named object types."),Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled:r(2865,1,"Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_2865","Import '{0}' conflicts with local value, so must be declared with a type-only import when 'isolatedModules' is enabled."),Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled:r(2866,1,"Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_w_2866","Import '{0}' conflicts with global value used in this file, so must be declared with a type-only import when 'isolatedModules' is enabled."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun:r(2867,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2867","Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig:r(2868,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2868","Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun` and then add 'bun' to the types field in your tsconfig."),Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish:r(2869,1,"Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish_2869","Right operand of ?? is unreachable because the left operand is never nullish."),This_binary_expression_is_never_nullish_Are_you_missing_parentheses:r(2870,1,"This_binary_expression_is_never_nullish_Are_you_missing_parentheses_2870","This binary expression is never nullish. Are you missing parentheses?"),This_expression_is_always_nullish:r(2871,1,"This_expression_is_always_nullish_2871","This expression is always nullish."),This_kind_of_expression_is_always_truthy:r(2872,1,"This_kind_of_expression_is_always_truthy_2872","This kind of expression is always truthy."),This_kind_of_expression_is_always_falsy:r(2873,1,"This_kind_of_expression_is_always_falsy_2873","This kind of expression is always falsy."),This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found:r(2874,1,"This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found_2874","This JSX tag requires '{0}' to be in scope, but it could not be found."),This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_for_the_appropriate_package_installed:r(2875,1,"This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_fo_2875","This JSX tag requires the module path '{0}' to exist, but none could be found. Make sure you have types for the appropriate package installed."),This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolves_to_0:r(2876,1,"This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolv_2876",'This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "{0}".'),This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_during_emit_because_it_is_not_a_relative_path:r(2877,1,"This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877","This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path."),This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_between_the_projects_output_files_is_not_the_same_as_the_relative_path_between_its_input_files:r(2878,1,"This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878","This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files."),Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found:r(2879,1,"Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879","Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found."),Import_declaration_0_is_using_private_name_1:r(4e3,1,"Import_declaration_0_is_using_private_name_1_4000","Import declaration '{0}' is using private name '{1}'."),Type_parameter_0_of_exported_class_has_or_is_using_private_name_1:r(4002,1,"Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002","Type parameter '{0}' of exported class has or is using private name '{1}'."),Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1:r(4004,1,"Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004","Type parameter '{0}' of exported interface has or is using private name '{1}'."),Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:r(4006,1,"Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006","Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:r(4008,1,"Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008","Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:r(4010,1,"Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010","Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:r(4012,1,"Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012","Type parameter '{0}' of public method from exported class has or is using private name '{1}'."),Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:r(4014,1,"Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014","Type parameter '{0}' of method from exported interface has or is using private name '{1}'."),Type_parameter_0_of_exported_function_has_or_is_using_private_name_1:r(4016,1,"Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016","Type parameter '{0}' of exported function has or is using private name '{1}'."),Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:r(4019,1,"Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019","Implements clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_class_0_has_or_is_using_private_name_1:r(4020,1,"extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020","'extends' clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_class_has_or_is_using_private_name_0:r(4021,1,"extends_clause_of_exported_class_has_or_is_using_private_name_0_4021","'extends' clause of exported class has or is using private name '{0}'."),extends_clause_of_exported_interface_0_has_or_is_using_private_name_1:r(4022,1,"extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022","'extends' clause of exported interface '{0}' has or is using private name '{1}'."),Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4023,1,"Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023","Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."),Exported_variable_0_has_or_is_using_name_1_from_private_module_2:r(4024,1,"Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024","Exported variable '{0}' has or is using name '{1}' from private module '{2}'."),Exported_variable_0_has_or_is_using_private_name_1:r(4025,1,"Exported_variable_0_has_or_is_using_private_name_1_4025","Exported variable '{0}' has or is using private name '{1}'."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4026,1,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026","Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:r(4027,1,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027","Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:r(4028,1,"Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028","Public static property '{0}' of exported class has or is using private name '{1}'."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4029,1,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029","Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:r(4030,1,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030","Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_property_0_of_exported_class_has_or_is_using_private_name_1:r(4031,1,"Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031","Public property '{0}' of exported class has or is using private name '{1}'."),Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:r(4032,1,"Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032","Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Property_0_of_exported_interface_has_or_is_using_private_name_1:r(4033,1,"Property_0_of_exported_interface_has_or_is_using_private_name_1_4033","Property '{0}' of exported interface has or is using private name '{1}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:r(4034,1,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034","Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1:r(4035,1,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035","Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:r(4036,1,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036","Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1:r(4037,1,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037","Parameter type of public setter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4038,1,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038","Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:r(4039,1,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039","Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1:r(4040,1,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040","Return type of public static getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4041,1,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041","Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:r(4042,1,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042","Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1:r(4043,1,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043","Return type of public getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:r(4044,1,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044","Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0:r(4045,1,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045","Return type of constructor signature from exported interface has or is using private name '{0}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:r(4046,1,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046","Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0:r(4047,1,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047","Return type of call signature from exported interface has or is using private name '{0}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:r(4048,1,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048","Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0:r(4049,1,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049","Return type of index signature from exported interface has or is using private name '{0}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:r(4050,1,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050","Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:r(4051,1,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051","Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:r(4052,1,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052","Return type of public static method from exported class has or is using private name '{0}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:r(4053,1,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053","Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:r(4054,1,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054","Return type of public method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:r(4055,1,"Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055","Return type of public method from exported class has or is using private name '{0}'."),Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:r(4056,1,"Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056","Return type of method from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0:r(4057,1,"Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057","Return type of method from exported interface has or is using private name '{0}'."),Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:r(4058,1,"Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058","Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:r(4059,1,"Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059","Return type of exported function has or is using name '{0}' from private module '{1}'."),Return_type_of_exported_function_has_or_is_using_private_name_0:r(4060,1,"Return_type_of_exported_function_has_or_is_using_private_name_0_4060","Return type of exported function has or is using private name '{0}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4061,1,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061","Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:r(4062,1,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062","Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1:r(4063,1,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063","Parameter '{0}' of constructor from exported class has or is using private name '{1}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:r(4064,1,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064","Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:r(4065,1,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065","Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:r(4066,1,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066","Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:r(4067,1,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067","Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4068,1,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068","Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:r(4069,1,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069","Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:r(4070,1,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070","Parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4071,1,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071","Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:r(4072,1,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072","Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:r(4073,1,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073","Parameter '{0}' of public method from exported class has or is using private name '{1}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:r(4074,1,"Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074","Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:r(4075,1,"Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075","Parameter '{0}' of method from exported interface has or is using private name '{1}'."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4076,1,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076","Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:r(4077,1,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077","Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."),Parameter_0_of_exported_function_has_or_is_using_private_name_1:r(4078,1,"Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078","Parameter '{0}' of exported function has or is using private name '{1}'."),Exported_type_alias_0_has_or_is_using_private_name_1:r(4081,1,"Exported_type_alias_0_has_or_is_using_private_name_1_4081","Exported type alias '{0}' has or is using private name '{1}'."),Default_export_of_the_module_has_or_is_using_private_name_0:r(4082,1,"Default_export_of_the_module_has_or_is_using_private_name_0_4082","Default export of the module has or is using private name '{0}'."),Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1:r(4083,1,"Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083","Type parameter '{0}' of exported type alias has or is using private name '{1}'."),Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2:r(4084,1,"Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084","Exported type alias '{0}' has or is using private name '{1}' from module {2}."),Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1:r(4085,1,"Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1_4085","Extends clause for inferred type '{0}' has or is using private name '{1}'."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:r(4091,1,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091","Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1:r(4092,1,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092","Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."),Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected:r(4094,1,"Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected_4094","Property '{0}' of exported anonymous class type may not be private or protected."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4095,1,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095","Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:r(4096,1,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096","Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_method_0_of_exported_class_has_or_is_using_private_name_1:r(4097,1,"Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097","Public static method '{0}' of exported class has or is using private name '{1}'."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4098,1,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098","Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:r(4099,1,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099","Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_method_0_of_exported_class_has_or_is_using_private_name_1:r(4100,1,"Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100","Public method '{0}' of exported class has or is using private name '{1}'."),Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:r(4101,1,"Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101","Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Method_0_of_exported_interface_has_or_is_using_private_name_1:r(4102,1,"Method_0_of_exported_interface_has_or_is_using_private_name_1_4102","Method '{0}' of exported interface has or is using private name '{1}'."),Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1:r(4103,1,"Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103","Type parameter '{0}' of exported mapped object type is using private name '{1}'."),The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1:r(4104,1,"The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104","The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'."),Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter:r(4105,1,"Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105","Private or protected member '{0}' cannot be accessed on a type parameter."),Parameter_0_of_accessor_has_or_is_using_private_name_1:r(4106,1,"Parameter_0_of_accessor_has_or_is_using_private_name_1_4106","Parameter '{0}' of accessor has or is using private name '{1}'."),Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2:r(4107,1,"Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107","Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."),Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:r(4108,1,"Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108","Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."),Type_arguments_for_0_circularly_reference_themselves:r(4109,1,"Type_arguments_for_0_circularly_reference_themselves_4109","Type arguments for '{0}' circularly reference themselves."),Tuple_type_arguments_circularly_reference_themselves:r(4110,1,"Tuple_type_arguments_circularly_reference_themselves_4110","Tuple type arguments circularly reference themselves."),Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0:r(4111,1,"Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111","Property '{0}' comes from an index signature, so it must be accessed with ['{0}']."),This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class:r(4112,1,"This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112","This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class."),This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0:r(4113,1,"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113","This member cannot have an 'override' modifier because it is not declared in the base class '{0}'."),This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0:r(4114,1,"This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114","This member must have an 'override' modifier because it overrides a member in the base class '{0}'."),This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0:r(4115,1,"This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115","This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'."),This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0:r(4116,1,"This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116","This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."),This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:r(4117,1,"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117","This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"),The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized:r(4118,1,"The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118","The type of this node cannot be serialized because its property '{0}' cannot be serialized."),This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:r(4119,1,"This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119","This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:r(4120,1,"This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120","This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class:r(4121,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121","This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0:r(4122,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122","This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:r(4123,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123","This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next:r(4124,1,"Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124","Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given:r(4125,1,"Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125","Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given."),One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value:r(4126,1,"One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126","One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value."),The_current_host_does_not_support_the_0_option:r(5001,1,"The_current_host_does_not_support_the_0_option_5001","The current host does not support the '{0}' option."),Cannot_find_the_common_subdirectory_path_for_the_input_files:r(5009,1,"Cannot_find_the_common_subdirectory_path_for_the_input_files_5009","Cannot find the common subdirectory path for the input files."),File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:r(5010,1,"File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010","File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),Cannot_read_file_0_Colon_1:r(5012,1,"Cannot_read_file_0_Colon_1_5012","Cannot read file '{0}': {1}."),Unknown_compiler_option_0:r(5023,1,"Unknown_compiler_option_0_5023","Unknown compiler option '{0}'."),Compiler_option_0_requires_a_value_of_type_1:r(5024,1,"Compiler_option_0_requires_a_value_of_type_1_5024","Compiler option '{0}' requires a value of type {1}."),Unknown_compiler_option_0_Did_you_mean_1:r(5025,1,"Unknown_compiler_option_0_Did_you_mean_1_5025","Unknown compiler option '{0}'. Did you mean '{1}'?"),Could_not_write_file_0_Colon_1:r(5033,1,"Could_not_write_file_0_Colon_1_5033","Could not write file '{0}': {1}."),Option_project_cannot_be_mixed_with_source_files_on_a_command_line:r(5042,1,"Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042","Option 'project' cannot be mixed with source files on a command line."),Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher:r(5047,1,"Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047","Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."),Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided:r(5051,1,"Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051","Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided."),Option_0_cannot_be_specified_without_specifying_option_1:r(5052,1,"Option_0_cannot_be_specified_without_specifying_option_1_5052","Option '{0}' cannot be specified without specifying option '{1}'."),Option_0_cannot_be_specified_with_option_1:r(5053,1,"Option_0_cannot_be_specified_with_option_1_5053","Option '{0}' cannot be specified with option '{1}'."),A_tsconfig_json_file_is_already_defined_at_Colon_0:r(5054,1,"A_tsconfig_json_file_is_already_defined_at_Colon_0_5054","A 'tsconfig.json' file is already defined at: '{0}'."),Cannot_write_file_0_because_it_would_overwrite_input_file:r(5055,1,"Cannot_write_file_0_because_it_would_overwrite_input_file_5055","Cannot write file '{0}' because it would overwrite input file."),Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files:r(5056,1,"Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056","Cannot write file '{0}' because it would be overwritten by multiple input files."),Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0:r(5057,1,"Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057","Cannot find a tsconfig.json file at the specified directory: '{0}'."),The_specified_path_does_not_exist_Colon_0:r(5058,1,"The_specified_path_does_not_exist_Colon_0_5058","The specified path does not exist: '{0}'."),Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier:r(5059,1,"Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059","Invalid value for '--reactNamespace'. '{0}' is not a valid identifier."),Pattern_0_can_have_at_most_one_Asterisk_character:r(5061,1,"Pattern_0_can_have_at_most_one_Asterisk_character_5061","Pattern '{0}' can have at most one '*' character."),Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character:r(5062,1,"Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062","Substitution '{0}' in pattern '{1}' can have at most one '*' character."),Substitutions_for_pattern_0_should_be_an_array:r(5063,1,"Substitutions_for_pattern_0_should_be_an_array_5063","Substitutions for pattern '{0}' should be an array."),Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2:r(5064,1,"Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064","Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'."),File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:r(5065,1,"File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065","File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."),Substitutions_for_pattern_0_shouldn_t_be_an_empty_array:r(5066,1,"Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066","Substitutions for pattern '{0}' shouldn't be an empty array."),Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name:r(5067,1,"Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067","Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."),Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig:r(5068,1,"Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068","Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."),Option_0_cannot_be_specified_without_specifying_option_1_or_option_2:r(5069,1,"Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069","Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."),Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic:r(5070,1,"Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic_5070","Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'."),Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd:r(5071,1,"Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd_5071","Option '--resolveJsonModule' cannot be specified when 'module' is set to 'none', 'system', or 'umd'."),Unknown_build_option_0:r(5072,1,"Unknown_build_option_0_5072","Unknown build option '{0}'."),Build_option_0_requires_a_value_of_type_1:r(5073,1,"Build_option_0_requires_a_value_of_type_1_5073","Build option '{0}' requires a value of type {1}."),Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified:r(5074,1,"Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074","Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified."),_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2:r(5075,1,"_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075","'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."),_0_and_1_operations_cannot_be_mixed_without_parentheses:r(5076,1,"_0_and_1_operations_cannot_be_mixed_without_parentheses_5076","'{0}' and '{1}' operations cannot be mixed without parentheses."),Unknown_build_option_0_Did_you_mean_1:r(5077,1,"Unknown_build_option_0_Did_you_mean_1_5077","Unknown build option '{0}'. Did you mean '{1}'?"),Unknown_watch_option_0:r(5078,1,"Unknown_watch_option_0_5078","Unknown watch option '{0}'."),Unknown_watch_option_0_Did_you_mean_1:r(5079,1,"Unknown_watch_option_0_Did_you_mean_1_5079","Unknown watch option '{0}'. Did you mean '{1}'?"),Watch_option_0_requires_a_value_of_type_1:r(5080,1,"Watch_option_0_requires_a_value_of_type_1_5080","Watch option '{0}' requires a value of type {1}."),Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0:r(5081,1,"Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081","Cannot find a tsconfig.json file at the current directory: {0}."),_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1:r(5082,1,"_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082","'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."),Cannot_read_file_0:r(5083,1,"Cannot_read_file_0_5083","Cannot read file '{0}'."),A_tuple_member_cannot_be_both_optional_and_rest:r(5085,1,"A_tuple_member_cannot_be_both_optional_and_rest_5085","A tuple member cannot be both optional and rest."),A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type:r(5086,1,"A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086","A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."),A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type:r(5087,1,"A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087","A labeled tuple element is declared as rest with a '...' before the name, rather than before the type."),The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary:r(5088,1,"The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088","The inferred type of '{0}' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary."),Option_0_cannot_be_specified_when_option_jsx_is_1:r(5089,1,"Option_0_cannot_be_specified_when_option_jsx_is_1_5089","Option '{0}' cannot be specified when option 'jsx' is '{1}'."),Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash:r(5090,1,"Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash_5090","Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?"),Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled:r(5091,1,"Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled_5091","Option 'preserveConstEnums' cannot be disabled when '{0}' is enabled."),The_root_value_of_a_0_file_must_be_an_object:r(5092,1,"The_root_value_of_a_0_file_must_be_an_object_5092","The root value of a '{0}' file must be an object."),Compiler_option_0_may_only_be_used_with_build:r(5093,1,"Compiler_option_0_may_only_be_used_with_build_5093","Compiler option '--{0}' may only be used with '--build'."),Compiler_option_0_may_not_be_used_with_build:r(5094,1,"Compiler_option_0_may_not_be_used_with_build_5094","Compiler option '--{0}' may not be used with '--build'."),Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later:r(5095,1,"Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later_5095","Option '{0}' can only be used when 'module' is set to 'preserve' or to 'es2015' or later."),Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set:r(5096,1,"Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096","Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."),An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled:r(5097,1,"An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097","An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."),Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler:r(5098,1,"Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098","Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."),Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error:r(5101,1,"Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101",`Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`),Option_0_has_been_removed_Please_remove_it_from_your_configuration:r(5102,1,"Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102","Option '{0}' has been removed. Please remove it from your configuration."),Invalid_value_for_ignoreDeprecations:r(5103,1,"Invalid_value_for_ignoreDeprecations_5103","Invalid value for '--ignoreDeprecations'."),Option_0_is_redundant_and_cannot_be_specified_with_option_1:r(5104,1,"Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104","Option '{0}' is redundant and cannot be specified with option '{1}'."),Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System:r(5105,1,"Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105","Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."),Use_0_instead:r(5106,3,"Use_0_instead_5106","Use '{0}' instead."),Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error:r(5107,1,"Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107",`Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`),Option_0_1_has_been_removed_Please_remove_it_from_your_configuration:r(5108,1,"Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108","Option '{0}={1}' has been removed. Please remove it from your configuration."),Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1:r(5109,1,"Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109","Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."),Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1:r(5110,1,"Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110","Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."),Generates_a_sourcemap_for_each_corresponding_d_ts_file:r(6e3,3,"Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000","Generates a sourcemap for each corresponding '.d.ts' file."),Concatenate_and_emit_output_to_single_file:r(6001,3,"Concatenate_and_emit_output_to_single_file_6001","Concatenate and emit output to single file."),Generates_corresponding_d_ts_file:r(6002,3,"Generates_corresponding_d_ts_file_6002","Generates corresponding '.d.ts' file."),Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations:r(6004,3,"Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004","Specify the location where debugger should locate TypeScript files instead of source locations."),Watch_input_files:r(6005,3,"Watch_input_files_6005","Watch input files."),Redirect_output_structure_to_the_directory:r(6006,3,"Redirect_output_structure_to_the_directory_6006","Redirect output structure to the directory."),Do_not_erase_const_enum_declarations_in_generated_code:r(6007,3,"Do_not_erase_const_enum_declarations_in_generated_code_6007","Do not erase const enum declarations in generated code."),Do_not_emit_outputs_if_any_errors_were_reported:r(6008,3,"Do_not_emit_outputs_if_any_errors_were_reported_6008","Do not emit outputs if any errors were reported."),Do_not_emit_comments_to_output:r(6009,3,"Do_not_emit_comments_to_output_6009","Do not emit comments to output."),Do_not_emit_outputs:r(6010,3,"Do_not_emit_outputs_6010","Do not emit outputs."),Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking:r(6011,3,"Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011","Allow default imports from modules with no default export. This does not affect code emit, just typechecking."),Skip_type_checking_of_declaration_files:r(6012,3,"Skip_type_checking_of_declaration_files_6012","Skip type checking of declaration files."),Do_not_resolve_the_real_path_of_symlinks:r(6013,3,"Do_not_resolve_the_real_path_of_symlinks_6013","Do not resolve the real path of symlinks."),Only_emit_d_ts_declaration_files:r(6014,3,"Only_emit_d_ts_declaration_files_6014","Only emit '.d.ts' declaration files."),Specify_ECMAScript_target_version:r(6015,3,"Specify_ECMAScript_target_version_6015","Specify ECMAScript target version."),Specify_module_code_generation:r(6016,3,"Specify_module_code_generation_6016","Specify module code generation."),Print_this_message:r(6017,3,"Print_this_message_6017","Print this message."),Print_the_compiler_s_version:r(6019,3,"Print_the_compiler_s_version_6019","Print the compiler's version."),Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json:r(6020,3,"Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020","Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."),Syntax_Colon_0:r(6023,3,"Syntax_Colon_0_6023","Syntax: {0}"),options:r(6024,3,"options_6024","options"),file:r(6025,3,"file_6025","file"),Examples_Colon_0:r(6026,3,"Examples_Colon_0_6026","Examples: {0}"),Options_Colon:r(6027,3,"Options_Colon_6027","Options:"),Version_0:r(6029,3,"Version_0_6029","Version {0}"),Insert_command_line_options_and_files_from_a_file:r(6030,3,"Insert_command_line_options_and_files_from_a_file_6030","Insert command line options and files from a file."),Starting_compilation_in_watch_mode:r(6031,3,"Starting_compilation_in_watch_mode_6031","Starting compilation in watch mode..."),File_change_detected_Starting_incremental_compilation:r(6032,3,"File_change_detected_Starting_incremental_compilation_6032","File change detected. Starting incremental compilation..."),KIND:r(6034,3,"KIND_6034","KIND"),FILE:r(6035,3,"FILE_6035","FILE"),VERSION:r(6036,3,"VERSION_6036","VERSION"),LOCATION:r(6037,3,"LOCATION_6037","LOCATION"),DIRECTORY:r(6038,3,"DIRECTORY_6038","DIRECTORY"),STRATEGY:r(6039,3,"STRATEGY_6039","STRATEGY"),FILE_OR_DIRECTORY:r(6040,3,"FILE_OR_DIRECTORY_6040","FILE OR DIRECTORY"),Errors_Files:r(6041,3,"Errors_Files_6041","Errors Files"),Generates_corresponding_map_file:r(6043,3,"Generates_corresponding_map_file_6043","Generates corresponding '.map' file."),Compiler_option_0_expects_an_argument:r(6044,1,"Compiler_option_0_expects_an_argument_6044","Compiler option '{0}' expects an argument."),Unterminated_quoted_string_in_response_file_0:r(6045,1,"Unterminated_quoted_string_in_response_file_0_6045","Unterminated quoted string in response file '{0}'."),Argument_for_0_option_must_be_Colon_1:r(6046,1,"Argument_for_0_option_must_be_Colon_1_6046","Argument for '{0}' option must be: {1}."),Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1:r(6048,1,"Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048","Locale must be of the form or -. For example '{0}' or '{1}'."),Unable_to_open_file_0:r(6050,1,"Unable_to_open_file_0_6050","Unable to open file '{0}'."),Corrupted_locale_file_0:r(6051,1,"Corrupted_locale_file_0_6051","Corrupted locale file {0}."),Raise_error_on_expressions_and_declarations_with_an_implied_any_type:r(6052,3,"Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052","Raise error on expressions and declarations with an implied 'any' type."),File_0_not_found:r(6053,1,"File_0_not_found_6053","File '{0}' not found."),File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1:r(6054,1,"File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054","File '{0}' has an unsupported extension. The only supported extensions are {1}."),Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures:r(6055,3,"Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055","Suppress noImplicitAny errors for indexing objects lacking index signatures."),Do_not_emit_declarations_for_code_that_has_an_internal_annotation:r(6056,3,"Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056","Do not emit declarations for code that has an '@internal' annotation."),Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir:r(6058,3,"Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058","Specify the root directory of input files. Use to control the output directory structure with --outDir."),File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files:r(6059,1,"File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059","File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."),Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix:r(6060,3,"Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060","Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."),NEWLINE:r(6061,3,"NEWLINE_6061","NEWLINE"),Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line:r(6064,1,"Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064","Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."),Enables_experimental_support_for_ES7_decorators:r(6065,3,"Enables_experimental_support_for_ES7_decorators_6065","Enables experimental support for ES7 decorators."),Enables_experimental_support_for_emitting_type_metadata_for_decorators:r(6066,3,"Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066","Enables experimental support for emitting type metadata for decorators."),Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file:r(6070,3,"Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070","Initializes a TypeScript project and creates a tsconfig.json file."),Successfully_created_a_tsconfig_json_file:r(6071,3,"Successfully_created_a_tsconfig_json_file_6071","Successfully created a tsconfig.json file."),Suppress_excess_property_checks_for_object_literals:r(6072,3,"Suppress_excess_property_checks_for_object_literals_6072","Suppress excess property checks for object literals."),Stylize_errors_and_messages_using_color_and_context_experimental:r(6073,3,"Stylize_errors_and_messages_using_color_and_context_experimental_6073","Stylize errors and messages using color and context (experimental)."),Do_not_report_errors_on_unused_labels:r(6074,3,"Do_not_report_errors_on_unused_labels_6074","Do not report errors on unused labels."),Report_error_when_not_all_code_paths_in_function_return_a_value:r(6075,3,"Report_error_when_not_all_code_paths_in_function_return_a_value_6075","Report error when not all code paths in function return a value."),Report_errors_for_fallthrough_cases_in_switch_statement:r(6076,3,"Report_errors_for_fallthrough_cases_in_switch_statement_6076","Report errors for fallthrough cases in switch statement."),Do_not_report_errors_on_unreachable_code:r(6077,3,"Do_not_report_errors_on_unreachable_code_6077","Do not report errors on unreachable code."),Disallow_inconsistently_cased_references_to_the_same_file:r(6078,3,"Disallow_inconsistently_cased_references_to_the_same_file_6078","Disallow inconsistently-cased references to the same file."),Specify_library_files_to_be_included_in_the_compilation:r(6079,3,"Specify_library_files_to_be_included_in_the_compilation_6079","Specify library files to be included in the compilation."),Specify_JSX_code_generation:r(6080,3,"Specify_JSX_code_generation_6080","Specify JSX code generation."),Only_amd_and_system_modules_are_supported_alongside_0:r(6082,1,"Only_amd_and_system_modules_are_supported_alongside_0_6082","Only 'amd' and 'system' modules are supported alongside --{0}."),Base_directory_to_resolve_non_absolute_module_names:r(6083,3,"Base_directory_to_resolve_non_absolute_module_names_6083","Base directory to resolve non-absolute module names."),Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit:r(6084,3,"Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084","[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"),Enable_tracing_of_the_name_resolution_process:r(6085,3,"Enable_tracing_of_the_name_resolution_process_6085","Enable tracing of the name resolution process."),Resolving_module_0_from_1:r(6086,3,"Resolving_module_0_from_1_6086","======== Resolving module '{0}' from '{1}'. ========"),Explicitly_specified_module_resolution_kind_Colon_0:r(6087,3,"Explicitly_specified_module_resolution_kind_Colon_0_6087","Explicitly specified module resolution kind: '{0}'."),Module_resolution_kind_is_not_specified_using_0:r(6088,3,"Module_resolution_kind_is_not_specified_using_0_6088","Module resolution kind is not specified, using '{0}'."),Module_name_0_was_successfully_resolved_to_1:r(6089,3,"Module_name_0_was_successfully_resolved_to_1_6089","======== Module name '{0}' was successfully resolved to '{1}'. ========"),Module_name_0_was_not_resolved:r(6090,3,"Module_name_0_was_not_resolved_6090","======== Module name '{0}' was not resolved. ========"),paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0:r(6091,3,"paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091","'paths' option is specified, looking for a pattern to match module name '{0}'."),Module_name_0_matched_pattern_1:r(6092,3,"Module_name_0_matched_pattern_1_6092","Module name '{0}', matched pattern '{1}'."),Trying_substitution_0_candidate_module_location_Colon_1:r(6093,3,"Trying_substitution_0_candidate_module_location_Colon_1_6093","Trying substitution '{0}', candidate module location: '{1}'."),Resolving_module_name_0_relative_to_base_url_1_2:r(6094,3,"Resolving_module_name_0_relative_to_base_url_1_2_6094","Resolving module name '{0}' relative to base url '{1}' - '{2}'."),Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1:r(6095,3,"Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1_6095","Loading module as file / folder, candidate module location '{0}', target file types: {1}."),File_0_does_not_exist:r(6096,3,"File_0_does_not_exist_6096","File '{0}' does not exist."),File_0_exists_use_it_as_a_name_resolution_result:r(6097,3,"File_0_exists_use_it_as_a_name_resolution_result_6097","File '{0}' exists - use it as a name resolution result."),Loading_module_0_from_node_modules_folder_target_file_types_Colon_1:r(6098,3,"Loading_module_0_from_node_modules_folder_target_file_types_Colon_1_6098","Loading module '{0}' from 'node_modules' folder, target file types: {1}."),Found_package_json_at_0:r(6099,3,"Found_package_json_at_0_6099","Found 'package.json' at '{0}'."),package_json_does_not_have_a_0_field:r(6100,3,"package_json_does_not_have_a_0_field_6100","'package.json' does not have a '{0}' field."),package_json_has_0_field_1_that_references_2:r(6101,3,"package_json_has_0_field_1_that_references_2_6101","'package.json' has '{0}' field '{1}' that references '{2}'."),Allow_javascript_files_to_be_compiled:r(6102,3,"Allow_javascript_files_to_be_compiled_6102","Allow javascript files to be compiled."),Checking_if_0_is_the_longest_matching_prefix_for_1_2:r(6104,3,"Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104","Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."),Expected_type_of_0_field_in_package_json_to_be_1_got_2:r(6105,3,"Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105","Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'."),baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1:r(6106,3,"baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106","'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."),rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0:r(6107,3,"rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107","'rootDirs' option is set, using it to resolve relative module name '{0}'."),Longest_matching_prefix_for_0_is_1:r(6108,3,"Longest_matching_prefix_for_0_is_1_6108","Longest matching prefix for '{0}' is '{1}'."),Loading_0_from_the_root_dir_1_candidate_location_2:r(6109,3,"Loading_0_from_the_root_dir_1_candidate_location_2_6109","Loading '{0}' from the root dir '{1}', candidate location '{2}'."),Trying_other_entries_in_rootDirs:r(6110,3,"Trying_other_entries_in_rootDirs_6110","Trying other entries in 'rootDirs'."),Module_resolution_using_rootDirs_has_failed:r(6111,3,"Module_resolution_using_rootDirs_has_failed_6111","Module resolution using 'rootDirs' has failed."),Do_not_emit_use_strict_directives_in_module_output:r(6112,3,"Do_not_emit_use_strict_directives_in_module_output_6112","Do not emit 'use strict' directives in module output."),Enable_strict_null_checks:r(6113,3,"Enable_strict_null_checks_6113","Enable strict null checks."),Unknown_option_excludes_Did_you_mean_exclude:r(6114,1,"Unknown_option_excludes_Did_you_mean_exclude_6114","Unknown option 'excludes'. Did you mean 'exclude'?"),Raise_error_on_this_expressions_with_an_implied_any_type:r(6115,3,"Raise_error_on_this_expressions_with_an_implied_any_type_6115","Raise error on 'this' expressions with an implied 'any' type."),Resolving_type_reference_directive_0_containing_file_1_root_directory_2:r(6116,3,"Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116","======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"),Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2:r(6119,3,"Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119","======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"),Type_reference_directive_0_was_not_resolved:r(6120,3,"Type_reference_directive_0_was_not_resolved_6120","======== Type reference directive '{0}' was not resolved. ========"),Resolving_with_primary_search_path_0:r(6121,3,"Resolving_with_primary_search_path_0_6121","Resolving with primary search path '{0}'."),Root_directory_cannot_be_determined_skipping_primary_search_paths:r(6122,3,"Root_directory_cannot_be_determined_skipping_primary_search_paths_6122","Root directory cannot be determined, skipping primary search paths."),Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set:r(6123,3,"Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123","======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========"),Type_declaration_files_to_be_included_in_compilation:r(6124,3,"Type_declaration_files_to_be_included_in_compilation_6124","Type declaration files to be included in compilation."),Looking_up_in_node_modules_folder_initial_location_0:r(6125,3,"Looking_up_in_node_modules_folder_initial_location_0_6125","Looking up in 'node_modules' folder, initial location '{0}'."),Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder:r(6126,3,"Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126","Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder."),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1:r(6127,3,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127","======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========"),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set:r(6128,3,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128","======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========"),Resolving_real_path_for_0_result_1:r(6130,3,"Resolving_real_path_for_0_result_1_6130","Resolving real path for '{0}', result '{1}'."),Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system:r(6131,1,"Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131","Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'."),File_name_0_has_a_1_extension_stripping_it:r(6132,3,"File_name_0_has_a_1_extension_stripping_it_6132","File name '{0}' has a '{1}' extension - stripping it."),_0_is_declared_but_its_value_is_never_read:r(6133,1,"_0_is_declared_but_its_value_is_never_read_6133","'{0}' is declared but its value is never read.",!0),Report_errors_on_unused_locals:r(6134,3,"Report_errors_on_unused_locals_6134","Report errors on unused locals."),Report_errors_on_unused_parameters:r(6135,3,"Report_errors_on_unused_parameters_6135","Report errors on unused parameters."),The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files:r(6136,3,"The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136","The maximum dependency depth to search under node_modules and load JavaScript files."),Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1:r(6137,1,"Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137","Cannot import type declaration files. Consider importing '{0}' instead of '{1}'."),Property_0_is_declared_but_its_value_is_never_read:r(6138,1,"Property_0_is_declared_but_its_value_is_never_read_6138","Property '{0}' is declared but its value is never read.",!0),Import_emit_helpers_from_tslib:r(6139,3,"Import_emit_helpers_from_tslib_6139","Import emit helpers from 'tslib'."),Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2:r(6140,1,"Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140","Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."),Parse_in_strict_mode_and_emit_use_strict_for_each_source_file:r(6141,3,"Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141",'Parse in strict mode and emit "use strict" for each source file.'),Module_0_was_resolved_to_1_but_jsx_is_not_set:r(6142,1,"Module_0_was_resolved_to_1_but_jsx_is_not_set_6142","Module '{0}' was resolved to '{1}', but '--jsx' is not set."),Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1:r(6144,3,"Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144","Module '{0}' was resolved as locally declared ambient module in file '{1}'."),Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h:r(6146,3,"Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146","Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."),Resolution_for_module_0_was_found_in_cache_from_location_1:r(6147,3,"Resolution_for_module_0_was_found_in_cache_from_location_1_6147","Resolution for module '{0}' was found in cache from location '{1}'."),Directory_0_does_not_exist_skipping_all_lookups_in_it:r(6148,3,"Directory_0_does_not_exist_skipping_all_lookups_in_it_6148","Directory '{0}' does not exist, skipping all lookups in it."),Show_diagnostic_information:r(6149,3,"Show_diagnostic_information_6149","Show diagnostic information."),Show_verbose_diagnostic_information:r(6150,3,"Show_verbose_diagnostic_information_6150","Show verbose diagnostic information."),Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file:r(6151,3,"Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151","Emit a single file with source maps instead of having a separate file."),Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set:r(6152,3,"Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152","Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set."),Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule:r(6153,3,"Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153","Transpile each file as a separate module (similar to 'ts.transpileModule')."),Print_names_of_generated_files_part_of_the_compilation:r(6154,3,"Print_names_of_generated_files_part_of_the_compilation_6154","Print names of generated files part of the compilation."),Print_names_of_files_part_of_the_compilation:r(6155,3,"Print_names_of_files_part_of_the_compilation_6155","Print names of files part of the compilation."),The_locale_used_when_displaying_messages_to_the_user_e_g_en_us:r(6156,3,"The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156","The locale used when displaying messages to the user (e.g. 'en-us')"),Do_not_generate_custom_helper_functions_like_extends_in_compiled_output:r(6157,3,"Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157","Do not generate custom helper functions like '__extends' in compiled output."),Do_not_include_the_default_library_file_lib_d_ts:r(6158,3,"Do_not_include_the_default_library_file_lib_d_ts_6158","Do not include the default library file (lib.d.ts)."),Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files:r(6159,3,"Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159","Do not add triple-slash references or imported modules to the list of compiled files."),Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files:r(6160,3,"Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160","[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files."),List_of_folders_to_include_type_definitions_from:r(6161,3,"List_of_folders_to_include_type_definitions_from_6161","List of folders to include type definitions from."),Disable_size_limitations_on_JavaScript_projects:r(6162,3,"Disable_size_limitations_on_JavaScript_projects_6162","Disable size limitations on JavaScript projects."),The_character_set_of_the_input_files:r(6163,3,"The_character_set_of_the_input_files_6163","The character set of the input files."),Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1:r(6164,3,"Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1_6164","Skipping module '{0}' that looks like an absolute URI, target file types: {1}."),Do_not_truncate_error_messages:r(6165,3,"Do_not_truncate_error_messages_6165","Do not truncate error messages."),Output_directory_for_generated_declaration_files:r(6166,3,"Output_directory_for_generated_declaration_files_6166","Output directory for generated declaration files."),A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl:r(6167,3,"A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167","A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."),List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime:r(6168,3,"List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168","List of root folders whose combined content represents the structure of the project at runtime."),Show_all_compiler_options:r(6169,3,"Show_all_compiler_options_6169","Show all compiler options."),Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file:r(6170,3,"Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170","[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"),Command_line_Options:r(6171,3,"Command_line_Options_6171","Command-line Options"),Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5:r(6179,3,"Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_6179","Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5'."),Enable_all_strict_type_checking_options:r(6180,3,"Enable_all_strict_type_checking_options_6180","Enable all strict type-checking options."),Scoped_package_detected_looking_in_0:r(6182,3,"Scoped_package_detected_looking_in_0_6182","Scoped package detected, looking in '{0}'"),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:r(6183,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:r(6184,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Enable_strict_checking_of_function_types:r(6186,3,"Enable_strict_checking_of_function_types_6186","Enable strict checking of function types."),Enable_strict_checking_of_property_initialization_in_classes:r(6187,3,"Enable_strict_checking_of_property_initialization_in_classes_6187","Enable strict checking of property initialization in classes."),Numeric_separators_are_not_allowed_here:r(6188,1,"Numeric_separators_are_not_allowed_here_6188","Numeric separators are not allowed here."),Multiple_consecutive_numeric_separators_are_not_permitted:r(6189,1,"Multiple_consecutive_numeric_separators_are_not_permitted_6189","Multiple consecutive numeric separators are not permitted."),Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen:r(6191,3,"Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191","Whether to keep outdated console output in watch mode instead of clearing the screen."),All_imports_in_import_declaration_are_unused:r(6192,1,"All_imports_in_import_declaration_are_unused_6192","All imports in import declaration are unused.",!0),Found_1_error_Watching_for_file_changes:r(6193,3,"Found_1_error_Watching_for_file_changes_6193","Found 1 error. Watching for file changes."),Found_0_errors_Watching_for_file_changes:r(6194,3,"Found_0_errors_Watching_for_file_changes_6194","Found {0} errors. Watching for file changes."),Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols:r(6195,3,"Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195","Resolve 'keyof' to string valued property names only (no numbers or symbols)."),_0_is_declared_but_never_used:r(6196,1,"_0_is_declared_but_never_used_6196","'{0}' is declared but never used.",!0),Include_modules_imported_with_json_extension:r(6197,3,"Include_modules_imported_with_json_extension_6197","Include modules imported with '.json' extension"),All_destructured_elements_are_unused:r(6198,1,"All_destructured_elements_are_unused_6198","All destructured elements are unused.",!0),All_variables_are_unused:r(6199,1,"All_variables_are_unused_6199","All variables are unused.",!0),Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0:r(6200,1,"Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200","Definitions of the following identifiers conflict with those in another file: {0}"),Conflicts_are_in_this_file:r(6201,3,"Conflicts_are_in_this_file_6201","Conflicts are in this file."),Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0:r(6202,1,"Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202","Project references may not form a circular graph. Cycle detected: {0}"),_0_was_also_declared_here:r(6203,3,"_0_was_also_declared_here_6203","'{0}' was also declared here."),and_here:r(6204,3,"and_here_6204","and here."),All_type_parameters_are_unused:r(6205,1,"All_type_parameters_are_unused_6205","All type parameters are unused."),package_json_has_a_typesVersions_field_with_version_specific_path_mappings:r(6206,3,"package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206","'package.json' has a 'typesVersions' field with version-specific path mappings."),package_json_does_not_have_a_typesVersions_entry_that_matches_version_0:r(6207,3,"package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207","'package.json' does not have a 'typesVersions' entry that matches version '{0}'."),package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2:r(6208,3,"package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208","'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'."),package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range:r(6209,3,"package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209","'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range."),An_argument_for_0_was_not_provided:r(6210,3,"An_argument_for_0_was_not_provided_6210","An argument for '{0}' was not provided."),An_argument_matching_this_binding_pattern_was_not_provided:r(6211,3,"An_argument_matching_this_binding_pattern_was_not_provided_6211","An argument matching this binding pattern was not provided."),Did_you_mean_to_call_this_expression:r(6212,3,"Did_you_mean_to_call_this_expression_6212","Did you mean to call this expression?"),Did_you_mean_to_use_new_with_this_expression:r(6213,3,"Did_you_mean_to_use_new_with_this_expression_6213","Did you mean to use 'new' with this expression?"),Enable_strict_bind_call_and_apply_methods_on_functions:r(6214,3,"Enable_strict_bind_call_and_apply_methods_on_functions_6214","Enable strict 'bind', 'call', and 'apply' methods on functions."),Using_compiler_options_of_project_reference_redirect_0:r(6215,3,"Using_compiler_options_of_project_reference_redirect_0_6215","Using compiler options of project reference redirect '{0}'."),Found_1_error:r(6216,3,"Found_1_error_6216","Found 1 error."),Found_0_errors:r(6217,3,"Found_0_errors_6217","Found {0} errors."),Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2:r(6218,3,"Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218","======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========"),Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3:r(6219,3,"Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219","======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========"),package_json_had_a_falsy_0_field:r(6220,3,"package_json_had_a_falsy_0_field_6220","'package.json' had a falsy '{0}' field."),Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects:r(6221,3,"Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221","Disable use of source files instead of declaration files from referenced projects."),Emit_class_fields_with_Define_instead_of_Set:r(6222,3,"Emit_class_fields_with_Define_instead_of_Set_6222","Emit class fields with Define instead of Set."),Generates_a_CPU_profile:r(6223,3,"Generates_a_CPU_profile_6223","Generates a CPU profile."),Disable_solution_searching_for_this_project:r(6224,3,"Disable_solution_searching_for_this_project_6224","Disable solution searching for this project."),Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory:r(6225,3,"Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225","Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."),Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling:r(6226,3,"Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226","Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling'."),Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize:r(6227,3,"Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227","Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority', 'FixedChunkSize'."),Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3:r(6229,1,"Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229","Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."),Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line:r(6230,1,"Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230","Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."),Could_not_resolve_the_path_0_with_the_extensions_Colon_1:r(6231,1,"Could_not_resolve_the_path_0_with_the_extensions_Colon_1_6231","Could not resolve the path '{0}' with the extensions: {1}."),Declaration_augments_declaration_in_another_file_This_cannot_be_serialized:r(6232,1,"Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232","Declaration augments declaration in another file. This cannot be serialized."),This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file:r(6233,1,"This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233","This is the declaration being augmented. Consider moving the augmenting declaration into the same file."),This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without:r(6234,1,"This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without_6234","This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?"),Disable_loading_referenced_projects:r(6235,3,"Disable_loading_referenced_projects_6235","Disable loading referenced projects."),Arguments_for_the_rest_parameter_0_were_not_provided:r(6236,1,"Arguments_for_the_rest_parameter_0_were_not_provided_6236","Arguments for the rest parameter '{0}' were not provided."),Generates_an_event_trace_and_a_list_of_types:r(6237,3,"Generates_an_event_trace_and_a_list_of_types_6237","Generates an event trace and a list of types."),Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react:r(6238,1,"Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react_6238","Specify the module specifier to be used to import the 'jsx' and 'jsxs' factory functions from. eg, react"),File_0_exists_according_to_earlier_cached_lookups:r(6239,3,"File_0_exists_according_to_earlier_cached_lookups_6239","File '{0}' exists according to earlier cached lookups."),File_0_does_not_exist_according_to_earlier_cached_lookups:r(6240,3,"File_0_does_not_exist_according_to_earlier_cached_lookups_6240","File '{0}' does not exist according to earlier cached lookups."),Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1:r(6241,3,"Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241","Resolution for type reference directive '{0}' was found in cache from location '{1}'."),Resolving_type_reference_directive_0_containing_file_1:r(6242,3,"Resolving_type_reference_directive_0_containing_file_1_6242","======== Resolving type reference directive '{0}', containing file '{1}'. ========"),Interpret_optional_property_types_as_written_rather_than_adding_undefined:r(6243,3,"Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243","Interpret optional property types as written, rather than adding 'undefined'."),Modules:r(6244,3,"Modules_6244","Modules"),File_Management:r(6245,3,"File_Management_6245","File Management"),Emit:r(6246,3,"Emit_6246","Emit"),JavaScript_Support:r(6247,3,"JavaScript_Support_6247","JavaScript Support"),Type_Checking:r(6248,3,"Type_Checking_6248","Type Checking"),Editor_Support:r(6249,3,"Editor_Support_6249","Editor Support"),Watch_and_Build_Modes:r(6250,3,"Watch_and_Build_Modes_6250","Watch and Build Modes"),Compiler_Diagnostics:r(6251,3,"Compiler_Diagnostics_6251","Compiler Diagnostics"),Interop_Constraints:r(6252,3,"Interop_Constraints_6252","Interop Constraints"),Backwards_Compatibility:r(6253,3,"Backwards_Compatibility_6253","Backwards Compatibility"),Language_and_Environment:r(6254,3,"Language_and_Environment_6254","Language and Environment"),Projects:r(6255,3,"Projects_6255","Projects"),Output_Formatting:r(6256,3,"Output_Formatting_6256","Output Formatting"),Completeness:r(6257,3,"Completeness_6257","Completeness"),_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file:r(6258,1,"_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258","'{0}' should be set inside the 'compilerOptions' object of the config json file"),Found_1_error_in_0:r(6259,3,"Found_1_error_in_0_6259","Found 1 error in {0}"),Found_0_errors_in_the_same_file_starting_at_Colon_1:r(6260,3,"Found_0_errors_in_the_same_file_starting_at_Colon_1_6260","Found {0} errors in the same file, starting at: {1}"),Found_0_errors_in_1_files:r(6261,3,"Found_0_errors_in_1_files_6261","Found {0} errors in {1} files."),File_name_0_has_a_1_extension_looking_up_2_instead:r(6262,3,"File_name_0_has_a_1_extension_looking_up_2_instead_6262","File name '{0}' has a '{1}' extension - looking up '{2}' instead."),Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set:r(6263,1,"Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set_6263","Module '{0}' was resolved to '{1}', but '--allowArbitraryExtensions' is not set."),Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present:r(6264,3,"Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present_6264","Enable importing files with any extension, provided a declaration file is present."),Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder:r(6265,3,"Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_no_6265","Resolving type reference directive for program that specifies custom typeRoots, skipping lookup in 'node_modules' folder."),Option_0_can_only_be_specified_on_command_line:r(6266,1,"Option_0_can_only_be_specified_on_command_line_6266","Option '{0}' can only be specified on command line."),Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve:r(6270,3,"Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270","Directory '{0}' has no containing package.json scope. Imports will not resolve."),Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1:r(6271,3,"Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271","Import specifier '{0}' does not exist in package.json scope at path '{1}'."),Invalid_import_specifier_0_has_no_possible_resolutions:r(6272,3,"Invalid_import_specifier_0_has_no_possible_resolutions_6272","Invalid import specifier '{0}' has no possible resolutions."),package_json_scope_0_has_no_imports_defined:r(6273,3,"package_json_scope_0_has_no_imports_defined_6273","package.json scope '{0}' has no imports defined."),package_json_scope_0_explicitly_maps_specifier_1_to_null:r(6274,3,"package_json_scope_0_explicitly_maps_specifier_1_to_null_6274","package.json scope '{0}' explicitly maps specifier '{1}' to null."),package_json_scope_0_has_invalid_type_for_target_of_specifier_1:r(6275,3,"package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275","package.json scope '{0}' has invalid type for target of specifier '{1}'"),Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1:r(6276,3,"Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276","Export specifier '{0}' does not exist in package.json scope at path '{1}'."),Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update:r(6277,3,"Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_i_6277","Resolution of non-relative name failed; trying with modern Node resolution features disabled to see if npm library needs configuration update."),There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings:r(6278,3,"There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The__6278",`There are types at '{0}', but this result could not be resolved when respecting package.json "exports". The '{1}' library may need to update its package.json or typings.`),Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update:r(6279,3,"Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_ne_6279","Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update."),There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler:r(6280,3,"There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setti_6280","There are types at '{0}', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'."),package_json_has_a_peerDependencies_field:r(6281,3,"package_json_has_a_peerDependencies_field_6281","'package.json' has a 'peerDependencies' field."),Found_peerDependency_0_with_1_version:r(6282,3,"Found_peerDependency_0_with_1_version_6282","Found peerDependency '{0}' with '{1}' version."),Failed_to_find_peerDependency_0:r(6283,3,"Failed_to_find_peerDependency_0_6283","Failed to find peerDependency '{0}'."),Enable_project_compilation:r(6302,3,"Enable_project_compilation_6302","Enable project compilation"),Composite_projects_may_not_disable_declaration_emit:r(6304,1,"Composite_projects_may_not_disable_declaration_emit_6304","Composite projects may not disable declaration emit."),Output_file_0_has_not_been_built_from_source_file_1:r(6305,1,"Output_file_0_has_not_been_built_from_source_file_1_6305","Output file '{0}' has not been built from source file '{1}'."),Referenced_project_0_must_have_setting_composite_Colon_true:r(6306,1,"Referenced_project_0_must_have_setting_composite_Colon_true_6306",`Referenced project '{0}' must have setting "composite": true.`),File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern:r(6307,1,"File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307","File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern."),Referenced_project_0_may_not_disable_emit:r(6310,1,"Referenced_project_0_may_not_disable_emit_6310","Referenced project '{0}' may not disable emit."),Project_0_is_out_of_date_because_output_1_is_older_than_input_2:r(6350,3,"Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350","Project '{0}' is out of date because output '{1}' is older than input '{2}'"),Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2:r(6351,3,"Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351","Project '{0}' is up to date because newest input '{1}' is older than output '{2}'"),Project_0_is_out_of_date_because_output_file_1_does_not_exist:r(6352,3,"Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352","Project '{0}' is out of date because output file '{1}' does not exist"),Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date:r(6353,3,"Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353","Project '{0}' is out of date because its dependency '{1}' is out of date"),Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies:r(6354,3,"Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354","Project '{0}' is up to date with .d.ts files from its dependencies"),Projects_in_this_build_Colon_0:r(6355,3,"Projects_in_this_build_Colon_0_6355","Projects in this build: {0}"),A_non_dry_build_would_delete_the_following_files_Colon_0:r(6356,3,"A_non_dry_build_would_delete_the_following_files_Colon_0_6356","A non-dry build would delete the following files: {0}"),A_non_dry_build_would_build_project_0:r(6357,3,"A_non_dry_build_would_build_project_0_6357","A non-dry build would build project '{0}'"),Building_project_0:r(6358,3,"Building_project_0_6358","Building project '{0}'..."),Updating_output_timestamps_of_project_0:r(6359,3,"Updating_output_timestamps_of_project_0_6359","Updating output timestamps of project '{0}'..."),Project_0_is_up_to_date:r(6361,3,"Project_0_is_up_to_date_6361","Project '{0}' is up to date"),Skipping_build_of_project_0_because_its_dependency_1_has_errors:r(6362,3,"Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362","Skipping build of project '{0}' because its dependency '{1}' has errors"),Project_0_can_t_be_built_because_its_dependency_1_has_errors:r(6363,3,"Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363","Project '{0}' can't be built because its dependency '{1}' has errors"),Build_one_or_more_projects_and_their_dependencies_if_out_of_date:r(6364,3,"Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364","Build one or more projects and their dependencies, if out of date"),Delete_the_outputs_of_all_projects:r(6365,3,"Delete_the_outputs_of_all_projects_6365","Delete the outputs of all projects."),Show_what_would_be_built_or_deleted_if_specified_with_clean:r(6367,3,"Show_what_would_be_built_or_deleted_if_specified_with_clean_6367","Show what would be built (or deleted, if specified with '--clean')"),Option_build_must_be_the_first_command_line_argument:r(6369,1,"Option_build_must_be_the_first_command_line_argument_6369","Option '--build' must be the first command line argument."),Options_0_and_1_cannot_be_combined:r(6370,1,"Options_0_and_1_cannot_be_combined_6370","Options '{0}' and '{1}' cannot be combined."),Updating_unchanged_output_timestamps_of_project_0:r(6371,3,"Updating_unchanged_output_timestamps_of_project_0_6371","Updating unchanged output timestamps of project '{0}'..."),A_non_dry_build_would_update_timestamps_for_output_of_project_0:r(6374,3,"A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374","A non-dry build would update timestamps for output of project '{0}'"),Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1:r(6377,1,"Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377","Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'"),Composite_projects_may_not_disable_incremental_compilation:r(6379,1,"Composite_projects_may_not_disable_incremental_compilation_6379","Composite projects may not disable incremental compilation."),Specify_file_to_store_incremental_compilation_information:r(6380,3,"Specify_file_to_store_incremental_compilation_information_6380","Specify file to store incremental compilation information"),Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2:r(6381,3,"Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381","Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"),Skipping_build_of_project_0_because_its_dependency_1_was_not_built:r(6382,3,"Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382","Skipping build of project '{0}' because its dependency '{1}' was not built"),Project_0_can_t_be_built_because_its_dependency_1_was_not_built:r(6383,3,"Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383","Project '{0}' can't be built because its dependency '{1}' was not built"),Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it:r(6384,3,"Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384","Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it."),_0_is_deprecated:r(6385,2,"_0_is_deprecated_6385","'{0}' is deprecated.",void 0,void 0,!0),Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found:r(6386,3,"Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_nativ_6386","Performance timings for '--diagnostics' or '--extendedDiagnostics' are not available in this session. A native implementation of the Web Performance API could not be found."),The_signature_0_of_1_is_deprecated:r(6387,2,"The_signature_0_of_1_is_deprecated_6387","The signature '{0}' of '{1}' is deprecated.",void 0,void 0,!0),Project_0_is_being_forcibly_rebuilt:r(6388,3,"Project_0_is_being_forcibly_rebuilt_6388","Project '{0}' is being forcibly rebuilt"),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved:r(6389,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389","Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2:r(6390,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:r(6391,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved:r(6392,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3:r(6393,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4:r(6394,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved:r(6395,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3:r(6396,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4:r(6397,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved:r(6398,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted:r(6399,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399","Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes were not emitted"),Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files:r(6400,3,"Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400","Project '{0}' is up to date but needs to update timestamps of output files that are older than input files"),Project_0_is_out_of_date_because_there_was_error_reading_file_1:r(6401,3,"Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401","Project '{0}' is out of date because there was error reading file '{1}'"),Resolving_in_0_mode_with_conditions_1:r(6402,3,"Resolving_in_0_mode_with_conditions_1_6402","Resolving in {0} mode with conditions {1}."),Matched_0_condition_1:r(6403,3,"Matched_0_condition_1_6403","Matched '{0}' condition '{1}'."),Using_0_subpath_1_with_target_2:r(6404,3,"Using_0_subpath_1_with_target_2_6404","Using '{0}' subpath '{1}' with target '{2}'."),Saw_non_matching_condition_0:r(6405,3,"Saw_non_matching_condition_0_6405","Saw non-matching condition '{0}'."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions:r(6406,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions_6406","Project '{0}' is out of date because buildinfo file '{1}' indicates there is change in compilerOptions"),Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set:r(6407,3,"Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noE_6407","Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set."),Use_the_package_json_exports_field_when_resolving_package_imports:r(6408,3,"Use_the_package_json_exports_field_when_resolving_package_imports_6408","Use the package.json 'exports' field when resolving package imports."),Use_the_package_json_imports_field_when_resolving_imports:r(6409,3,"Use_the_package_json_imports_field_when_resolving_imports_6409","Use the package.json 'imports' field when resolving imports."),Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports:r(6410,3,"Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports_6410","Conditions to set in addition to the resolver-specific defaults when resolving imports."),true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false:r(6411,3,"true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false_6411","`true` when 'moduleResolution' is 'node16', 'nodenext', or 'bundler'; otherwise `false`."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more:r(6412,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_6412","Project '{0}' is out of date because buildinfo file '{1}' indicates that file '{2}' was root file of compilation but not any more."),Entering_conditional_exports:r(6413,3,"Entering_conditional_exports_6413","Entering conditional exports."),Resolved_under_condition_0:r(6414,3,"Resolved_under_condition_0_6414","Resolved under condition '{0}'."),Failed_to_resolve_under_condition_0:r(6415,3,"Failed_to_resolve_under_condition_0_6415","Failed to resolve under condition '{0}'."),Exiting_conditional_exports:r(6416,3,"Exiting_conditional_exports_6416","Exiting conditional exports."),Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0:r(6417,3,"Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417","Searching all ancestor node_modules directories for preferred extensions: {0}."),Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0:r(6418,3,"Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418","Searching all ancestor node_modules directories for fallback extensions: {0}."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors:r(6419,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors_6419","Project '{0}' is out of date because buildinfo file '{1}' indicates that program needs to report errors."),Project_0_is_out_of_date_because_1:r(6420,3,"Project_0_is_out_of_date_because_1_6420","Project '{0}' is out of date because {1}."),Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_in_output_files:r(6421,3,"Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_i_6421","Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files."),The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1:r(6500,3,"The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500","The expected type comes from property '{0}' which is declared here on type '{1}'"),The_expected_type_comes_from_this_index_signature:r(6501,3,"The_expected_type_comes_from_this_index_signature_6501","The expected type comes from this index signature."),The_expected_type_comes_from_the_return_type_of_this_signature:r(6502,3,"The_expected_type_comes_from_the_return_type_of_this_signature_6502","The expected type comes from the return type of this signature."),Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing:r(6503,3,"Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503","Print names of files that are part of the compilation and then stop processing."),File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option:r(6504,1,"File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504","File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"),Print_names_of_files_and_the_reason_they_are_part_of_the_compilation:r(6505,3,"Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505","Print names of files and the reason they are part of the compilation."),Consider_adding_a_declare_modifier_to_this_class:r(6506,3,"Consider_adding_a_declare_modifier_to_this_class_6506","Consider adding a 'declare' modifier to this class."),Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files:r(6600,3,"Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600","Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files."),Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export:r(6601,3,"Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601","Allow 'import x from y' when a module doesn't have a default export."),Allow_accessing_UMD_globals_from_modules:r(6602,3,"Allow_accessing_UMD_globals_from_modules_6602","Allow accessing UMD globals from modules."),Disable_error_reporting_for_unreachable_code:r(6603,3,"Disable_error_reporting_for_unreachable_code_6603","Disable error reporting for unreachable code."),Disable_error_reporting_for_unused_labels:r(6604,3,"Disable_error_reporting_for_unused_labels_6604","Disable error reporting for unused labels."),Ensure_use_strict_is_always_emitted:r(6605,3,"Ensure_use_strict_is_always_emitted_6605","Ensure 'use strict' is always emitted."),Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it:r(6606,3,"Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606","Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it."),Specify_the_base_directory_to_resolve_non_relative_module_names:r(6607,3,"Specify_the_base_directory_to_resolve_non_relative_module_names_6607","Specify the base directory to resolve non-relative module names."),No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files:r(6608,3,"No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608","No longer supported. In early versions, manually set the text encoding for reading files."),Enable_error_reporting_in_type_checked_JavaScript_files:r(6609,3,"Enable_error_reporting_in_type_checked_JavaScript_files_6609","Enable error reporting in type-checked JavaScript files."),Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references:r(6611,3,"Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611","Enable constraints that allow a TypeScript project to be used with project references."),Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project:r(6612,3,"Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612","Generate .d.ts files from TypeScript and JavaScript files in your project."),Specify_the_output_directory_for_generated_declaration_files:r(6613,3,"Specify_the_output_directory_for_generated_declaration_files_6613","Specify the output directory for generated declaration files."),Create_sourcemaps_for_d_ts_files:r(6614,3,"Create_sourcemaps_for_d_ts_files_6614","Create sourcemaps for d.ts files."),Output_compiler_performance_information_after_building:r(6615,3,"Output_compiler_performance_information_after_building_6615","Output compiler performance information after building."),Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project:r(6616,3,"Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616","Disables inference for type acquisition by looking at filenames in a project."),Reduce_the_number_of_projects_loaded_automatically_by_TypeScript:r(6617,3,"Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617","Reduce the number of projects loaded automatically by TypeScript."),Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server:r(6618,3,"Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618","Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."),Opt_a_project_out_of_multi_project_reference_checking_when_editing:r(6619,3,"Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619","Opt a project out of multi-project reference checking when editing."),Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects:r(6620,3,"Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620","Disable preferring source files instead of declaration files when referencing composite projects."),Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration:r(6621,3,"Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621","Emit more compliant, but verbose and less performant JavaScript for iteration."),Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files:r(6622,3,"Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622","Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."),Only_output_d_ts_files_and_not_JavaScript_files:r(6623,3,"Only_output_d_ts_files_and_not_JavaScript_files_6623","Only output d.ts files and not JavaScript files."),Emit_design_type_metadata_for_decorated_declarations_in_source_files:r(6624,3,"Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624","Emit design-type metadata for decorated declarations in source files."),Disable_the_type_acquisition_for_JavaScript_projects:r(6625,3,"Disable_the_type_acquisition_for_JavaScript_projects_6625","Disable the type acquisition for JavaScript projects"),Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility:r(6626,3,"Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626","Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility."),Filters_results_from_the_include_option:r(6627,3,"Filters_results_from_the_include_option_6627","Filters results from the `include` option."),Remove_a_list_of_directories_from_the_watch_process:r(6628,3,"Remove_a_list_of_directories_from_the_watch_process_6628","Remove a list of directories from the watch process."),Remove_a_list_of_files_from_the_watch_mode_s_processing:r(6629,3,"Remove_a_list_of_files_from_the_watch_mode_s_processing_6629","Remove a list of files from the watch mode's processing."),Enable_experimental_support_for_legacy_experimental_decorators:r(6630,3,"Enable_experimental_support_for_legacy_experimental_decorators_6630","Enable experimental support for legacy experimental decorators."),Print_files_read_during_the_compilation_including_why_it_was_included:r(6631,3,"Print_files_read_during_the_compilation_including_why_it_was_included_6631","Print files read during the compilation including why it was included."),Output_more_detailed_compiler_performance_information_after_building:r(6632,3,"Output_more_detailed_compiler_performance_information_after_building_6632","Output more detailed compiler performance information after building."),Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited:r(6633,3,"Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633","Specify one or more path or node module references to base configuration files from which settings are inherited."),Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers:r(6634,3,"Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634","Specify what approach the watcher should use if the system runs out of native file watchers."),Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include:r(6635,3,"Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635","Include a list of files. This does not support glob patterns, as opposed to `include`."),Build_all_projects_including_those_that_appear_to_be_up_to_date:r(6636,3,"Build_all_projects_including_those_that_appear_to_be_up_to_date_6636","Build all projects, including those that appear to be up to date."),Ensure_that_casing_is_correct_in_imports:r(6637,3,"Ensure_that_casing_is_correct_in_imports_6637","Ensure that casing is correct in imports."),Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging:r(6638,3,"Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638","Emit a v8 CPU profile of the compiler run for debugging."),Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file:r(6639,3,"Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639","Allow importing helper functions from tslib once per project, instead of including them per-file."),Skip_building_downstream_projects_on_error_in_upstream_project:r(6640,3,"Skip_building_downstream_projects_on_error_in_upstream_project_6640","Skip building downstream projects on error in upstream project."),Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation:r(6641,3,"Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641","Specify a list of glob patterns that match files to be included in compilation."),Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects:r(6642,3,"Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642","Save .tsbuildinfo files to allow for incremental compilation of projects."),Include_sourcemap_files_inside_the_emitted_JavaScript:r(6643,3,"Include_sourcemap_files_inside_the_emitted_JavaScript_6643","Include sourcemap files inside the emitted JavaScript."),Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript:r(6644,3,"Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644","Include source code in the sourcemaps inside the emitted JavaScript."),Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports:r(6645,3,"Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645","Ensure that each file can be safely transpiled without relying on other imports."),Specify_what_JSX_code_is_generated:r(6646,3,"Specify_what_JSX_code_is_generated_6646","Specify what JSX code is generated."),Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h:r(6647,3,"Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647","Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'."),Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment:r(6648,3,"Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648","Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."),Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk:r(6649,3,"Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649","Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'."),Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option:r(6650,3,"Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650","Make keyof only return strings instead of string, numbers or symbols. Legacy option."),Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment:r(6651,3,"Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651","Specify a set of bundled library declaration files that describe the target runtime environment."),Print_the_names_of_emitted_files_after_a_compilation:r(6652,3,"Print_the_names_of_emitted_files_after_a_compilation_6652","Print the names of emitted files after a compilation."),Print_all_of_the_files_read_during_the_compilation:r(6653,3,"Print_all_of_the_files_read_during_the_compilation_6653","Print all of the files read during the compilation."),Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit:r(6654,3,"Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654","Set the language of the messaging from TypeScript. This does not affect emit."),Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations:r(6655,3,"Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655","Specify the location where debugger should locate map files instead of generated locations."),Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs:r(6656,3,"Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656","Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'."),Specify_what_module_code_is_generated:r(6657,3,"Specify_what_module_code_is_generated_6657","Specify what module code is generated."),Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier:r(6658,3,"Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658","Specify how TypeScript looks up a file from a given module specifier."),Set_the_newline_character_for_emitting_files:r(6659,3,"Set_the_newline_character_for_emitting_files_6659","Set the newline character for emitting files."),Disable_emitting_files_from_a_compilation:r(6660,3,"Disable_emitting_files_from_a_compilation_6660","Disable emitting files from a compilation."),Disable_generating_custom_helper_functions_like_extends_in_compiled_output:r(6661,3,"Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661","Disable generating custom helper functions like '__extends' in compiled output."),Disable_emitting_files_if_any_type_checking_errors_are_reported:r(6662,3,"Disable_emitting_files_if_any_type_checking_errors_are_reported_6662","Disable emitting files if any type checking errors are reported."),Disable_truncating_types_in_error_messages:r(6663,3,"Disable_truncating_types_in_error_messages_6663","Disable truncating types in error messages."),Enable_error_reporting_for_fallthrough_cases_in_switch_statements:r(6664,3,"Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664","Enable error reporting for fallthrough cases in switch statements."),Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type:r(6665,3,"Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665","Enable error reporting for expressions and declarations with an implied 'any' type."),Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier:r(6666,3,"Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666","Ensure overriding members in derived classes are marked with an override modifier."),Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function:r(6667,3,"Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667","Enable error reporting for codepaths that do not explicitly return in a function."),Enable_error_reporting_when_this_is_given_the_type_any:r(6668,3,"Enable_error_reporting_when_this_is_given_the_type_any_6668","Enable error reporting when 'this' is given the type 'any'."),Disable_adding_use_strict_directives_in_emitted_JavaScript_files:r(6669,3,"Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669","Disable adding 'use strict' directives in emitted JavaScript files."),Disable_including_any_library_files_including_the_default_lib_d_ts:r(6670,3,"Disable_including_any_library_files_including_the_default_lib_d_ts_6670","Disable including any library files, including the default lib.d.ts."),Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type:r(6671,3,"Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671","Enforces using indexed accessors for keys declared using an indexed type."),Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project:r(6672,3,"Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672","Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project."),Disable_strict_checking_of_generic_signatures_in_function_types:r(6673,3,"Disable_strict_checking_of_generic_signatures_in_function_types_6673","Disable strict checking of generic signatures in function types."),Add_undefined_to_a_type_when_accessed_using_an_index:r(6674,3,"Add_undefined_to_a_type_when_accessed_using_an_index_6674","Add 'undefined' to a type when accessed using an index."),Enable_error_reporting_when_local_variables_aren_t_read:r(6675,3,"Enable_error_reporting_when_local_variables_aren_t_read_6675","Enable error reporting when local variables aren't read."),Raise_an_error_when_a_function_parameter_isn_t_read:r(6676,3,"Raise_an_error_when_a_function_parameter_isn_t_read_6676","Raise an error when a function parameter isn't read."),Deprecated_setting_Use_outFile_instead:r(6677,3,"Deprecated_setting_Use_outFile_instead_6677","Deprecated setting. Use 'outFile' instead."),Specify_an_output_folder_for_all_emitted_files:r(6678,3,"Specify_an_output_folder_for_all_emitted_files_6678","Specify an output folder for all emitted files."),Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output:r(6679,3,"Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679","Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output."),Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations:r(6680,3,"Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680","Specify a set of entries that re-map imports to additional lookup locations."),Specify_a_list_of_language_service_plugins_to_include:r(6681,3,"Specify_a_list_of_language_service_plugins_to_include_6681","Specify a list of language service plugins to include."),Disable_erasing_const_enum_declarations_in_generated_code:r(6682,3,"Disable_erasing_const_enum_declarations_in_generated_code_6682","Disable erasing 'const enum' declarations in generated code."),Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node:r(6683,3,"Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683","Disable resolving symlinks to their realpath. This correlates to the same flag in node."),Disable_wiping_the_console_in_watch_mode:r(6684,3,"Disable_wiping_the_console_in_watch_mode_6684","Disable wiping the console in watch mode."),Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read:r(6685,3,"Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685","Enable color and formatting in TypeScript's output to make compiler errors easier to read."),Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit:r(6686,3,"Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686","Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit."),Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references:r(6687,3,"Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687","Specify an array of objects that specify paths for projects. Used in project references."),Disable_emitting_comments:r(6688,3,"Disable_emitting_comments_6688","Disable emitting comments."),Enable_importing_json_files:r(6689,3,"Enable_importing_json_files_6689","Enable importing .json files."),Specify_the_root_folder_within_your_source_files:r(6690,3,"Specify_the_root_folder_within_your_source_files_6690","Specify the root folder within your source files."),Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules:r(6691,3,"Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691","Allow multiple folders to be treated as one when resolving modules."),Skip_type_checking_d_ts_files_that_are_included_with_TypeScript:r(6692,3,"Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692","Skip type checking .d.ts files that are included with TypeScript."),Skip_type_checking_all_d_ts_files:r(6693,3,"Skip_type_checking_all_d_ts_files_6693","Skip type checking all .d.ts files."),Create_source_map_files_for_emitted_JavaScript_files:r(6694,3,"Create_source_map_files_for_emitted_JavaScript_files_6694","Create source map files for emitted JavaScript files."),Specify_the_root_path_for_debuggers_to_find_the_reference_source_code:r(6695,3,"Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695","Specify the root path for debuggers to find the reference source code."),Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function:r(6697,3,"Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697","Check that the arguments for 'bind', 'call', and 'apply' methods match the original function."),When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible:r(6698,3,"When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698","When assigning functions, check to ensure parameters and the return values are subtype-compatible."),When_type_checking_take_into_account_null_and_undefined:r(6699,3,"When_type_checking_take_into_account_null_and_undefined_6699","When type checking, take into account 'null' and 'undefined'."),Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor:r(6700,3,"Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700","Check for class properties that are declared but not set in the constructor."),Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments:r(6701,3,"Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701","Disable emitting declarations that have '@internal' in their JSDoc comments."),Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals:r(6702,3,"Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702","Disable reporting of excess property errors during the creation of object literals."),Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures:r(6703,3,"Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703","Suppress 'noImplicitAny' errors when indexing objects that lack index signatures."),Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively:r(6704,3,"Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704","Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."),Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations:r(6705,3,"Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705","Set the JavaScript language version for emitted JavaScript and include compatible library declarations."),Log_paths_used_during_the_moduleResolution_process:r(6706,3,"Log_paths_used_during_the_moduleResolution_process_6706","Log paths used during the 'moduleResolution' process."),Specify_the_path_to_tsbuildinfo_incremental_compilation_file:r(6707,3,"Specify_the_path_to_tsbuildinfo_incremental_compilation_file_6707","Specify the path to .tsbuildinfo incremental compilation file."),Specify_options_for_automatic_acquisition_of_declaration_files:r(6709,3,"Specify_options_for_automatic_acquisition_of_declaration_files_6709","Specify options for automatic acquisition of declaration files."),Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types:r(6710,3,"Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710","Specify multiple folders that act like './node_modules/@types'."),Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file:r(6711,3,"Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711","Specify type package names to be included without being referenced in a source file."),Emit_ECMAScript_standard_compliant_class_fields:r(6712,3,"Emit_ECMAScript_standard_compliant_class_fields_6712","Emit ECMAScript-standard-compliant class fields."),Enable_verbose_logging:r(6713,3,"Enable_verbose_logging_6713","Enable verbose logging."),Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality:r(6714,3,"Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714","Specify how directories are watched on systems that lack recursive file-watching functionality."),Specify_how_the_TypeScript_watch_mode_works:r(6715,3,"Specify_how_the_TypeScript_watch_mode_works_6715","Specify how the TypeScript watch mode works."),Require_undeclared_properties_from_index_signatures_to_use_element_accesses:r(6717,3,"Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717","Require undeclared properties from index signatures to use element accesses."),Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types:r(6718,3,"Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718","Specify emit/checking behavior for imports that are only used for types."),Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files:r(6719,3,"Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files_6719","Require sufficient annotation on exports so other tools can trivially generate declaration files."),Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any:r(6720,3,"Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any_6720","Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'."),Default_catch_clause_variables_as_unknown_instead_of_any:r(6803,3,"Default_catch_clause_variables_as_unknown_instead_of_any_6803","Default catch clause variables as 'unknown' instead of 'any'."),Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting:r(6804,3,"Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804","Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."),Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported:r(6805,3,"Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported_6805","Disable full type checking (only critical parse and emit errors will be reported)."),Check_side_effect_imports:r(6806,3,"Check_side_effect_imports_6806","Check side effect imports."),This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2:r(6807,1,"This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2_6807","This operation can be simplified. This shift is identical to `{0} {1} {2}`."),one_of_Colon:r(6900,3,"one_of_Colon_6900","one of:"),one_or_more_Colon:r(6901,3,"one_or_more_Colon_6901","one or more:"),type_Colon:r(6902,3,"type_Colon_6902","type:"),default_Colon:r(6903,3,"default_Colon_6903","default:"),module_system_or_esModuleInterop:r(6904,3,"module_system_or_esModuleInterop_6904",'module === "system" or esModuleInterop'),false_unless_strict_is_set:r(6905,3,"false_unless_strict_is_set_6905","`false`, unless `strict` is set"),false_unless_composite_is_set:r(6906,3,"false_unless_composite_is_set_6906","`false`, unless `composite` is set"),node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified:r(6907,3,"node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907",'`["node_modules", "bower_components", "jspm_packages"]`, plus the value of `outDir` if one is specified.'),if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk:r(6908,3,"if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908",'`[]` if `files` is specified, otherwise `["**/*"]`'),true_if_composite_false_otherwise:r(6909,3,"true_if_composite_false_otherwise_6909","`true` if `composite`, `false` otherwise"),module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node:r(69010,3,"module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010","module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`"),Computed_from_the_list_of_input_files:r(6911,3,"Computed_from_the_list_of_input_files_6911","Computed from the list of input files"),Platform_specific:r(6912,3,"Platform_specific_6912","Platform specific"),You_can_learn_about_all_of_the_compiler_options_at_0:r(6913,3,"You_can_learn_about_all_of_the_compiler_options_at_0_6913","You can learn about all of the compiler options at {0}"),Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon:r(6914,3,"Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914","Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:"),Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0:r(6915,3,"Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915","Using --build, -b will make tsc behave more like a build orchestrator than a compiler. This is used to trigger building composite projects which you can learn more about at {0}"),COMMON_COMMANDS:r(6916,3,"COMMON_COMMANDS_6916","COMMON COMMANDS"),ALL_COMPILER_OPTIONS:r(6917,3,"ALL_COMPILER_OPTIONS_6917","ALL COMPILER OPTIONS"),WATCH_OPTIONS:r(6918,3,"WATCH_OPTIONS_6918","WATCH OPTIONS"),BUILD_OPTIONS:r(6919,3,"BUILD_OPTIONS_6919","BUILD OPTIONS"),COMMON_COMPILER_OPTIONS:r(6920,3,"COMMON_COMPILER_OPTIONS_6920","COMMON COMPILER OPTIONS"),COMMAND_LINE_FLAGS:r(6921,3,"COMMAND_LINE_FLAGS_6921","COMMAND LINE FLAGS"),tsc_Colon_The_TypeScript_Compiler:r(6922,3,"tsc_Colon_The_TypeScript_Compiler_6922","tsc: The TypeScript Compiler"),Compiles_the_current_project_tsconfig_json_in_the_working_directory:r(6923,3,"Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923","Compiles the current project (tsconfig.json in the working directory.)"),Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options:r(6924,3,"Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924","Ignoring tsconfig.json, compiles the specified files with default compiler options."),Build_a_composite_project_in_the_working_directory:r(6925,3,"Build_a_composite_project_in_the_working_directory_6925","Build a composite project in the working directory."),Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory:r(6926,3,"Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926","Creates a tsconfig.json with the recommended settings in the working directory."),Compiles_the_TypeScript_project_located_at_the_specified_path:r(6927,3,"Compiles_the_TypeScript_project_located_at_the_specified_path_6927","Compiles the TypeScript project located at the specified path."),An_expanded_version_of_this_information_showing_all_possible_compiler_options:r(6928,3,"An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928","An expanded version of this information, showing all possible compiler options"),Compiles_the_current_project_with_additional_settings:r(6929,3,"Compiles_the_current_project_with_additional_settings_6929","Compiles the current project, with additional settings."),true_for_ES2022_and_above_including_ESNext:r(6930,3,"true_for_ES2022_and_above_including_ESNext_6930","`true` for ES2022 and above, including ESNext."),List_of_file_name_suffixes_to_search_when_resolving_a_module:r(6931,1,"List_of_file_name_suffixes_to_search_when_resolving_a_module_6931","List of file name suffixes to search when resolving a module."),Variable_0_implicitly_has_an_1_type:r(7005,1,"Variable_0_implicitly_has_an_1_type_7005","Variable '{0}' implicitly has an '{1}' type."),Parameter_0_implicitly_has_an_1_type:r(7006,1,"Parameter_0_implicitly_has_an_1_type_7006","Parameter '{0}' implicitly has an '{1}' type."),Member_0_implicitly_has_an_1_type:r(7008,1,"Member_0_implicitly_has_an_1_type_7008","Member '{0}' implicitly has an '{1}' type."),new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type:r(7009,1,"new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009","'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."),_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:r(7010,1,"_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010","'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."),Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:r(7011,1,"Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011","Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."),This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation:r(7012,1,"This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation_7012","This overload implicitly returns the type '{0}' because it lacks a return type annotation."),Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:r(7013,1,"Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013","Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."),Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:r(7014,1,"Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014","Function type, which lacks return-type annotation, implicitly has an '{0}' return type."),Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number:r(7015,1,"Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015","Element implicitly has an 'any' type because index expression is not of type 'number'."),Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type:r(7016,1,"Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016","Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type."),Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature:r(7017,1,"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017","Element implicitly has an 'any' type because type '{0}' has no index signature."),Object_literal_s_property_0_implicitly_has_an_1_type:r(7018,1,"Object_literal_s_property_0_implicitly_has_an_1_type_7018","Object literal's property '{0}' implicitly has an '{1}' type."),Rest_parameter_0_implicitly_has_an_any_type:r(7019,1,"Rest_parameter_0_implicitly_has_an_any_type_7019","Rest parameter '{0}' implicitly has an 'any[]' type."),Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:r(7020,1,"Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020","Call signature, which lacks return-type annotation, implicitly has an 'any' return type."),_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer:r(7022,1,"_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022","'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."),_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:r(7023,1,"_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023","'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:r(7024,1,"Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024","Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation:r(7025,1,"Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation_7025","Generator implicitly has yield type '{0}'. Consider supplying a return type annotation."),JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists:r(7026,1,"JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026","JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."),Unreachable_code_detected:r(7027,1,"Unreachable_code_detected_7027","Unreachable code detected.",!0),Unused_label:r(7028,1,"Unused_label_7028","Unused label.",!0),Fallthrough_case_in_switch:r(7029,1,"Fallthrough_case_in_switch_7029","Fallthrough case in switch."),Not_all_code_paths_return_a_value:r(7030,1,"Not_all_code_paths_return_a_value_7030","Not all code paths return a value."),Binding_element_0_implicitly_has_an_1_type:r(7031,1,"Binding_element_0_implicitly_has_an_1_type_7031","Binding element '{0}' implicitly has an '{1}' type."),Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation:r(7032,1,"Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032","Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation."),Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation:r(7033,1,"Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033","Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation."),Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined:r(7034,1,"Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034","Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined."),Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0:r(7035,1,"Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare__7035","Try `npm i --save-dev @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`"),Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0:r(7036,1,"Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036","Dynamic import's specifier must be of type 'string', but here has type '{0}'."),Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports:r(7037,3,"Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037","Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."),Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead:r(7038,3,"Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038","Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead."),Mapped_object_type_implicitly_has_an_any_template_type:r(7039,1,"Mapped_object_type_implicitly_has_an_any_template_type_7039","Mapped object type implicitly has an 'any' template type."),If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1:r(7040,1,"If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040","If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}'"),The_containing_arrow_function_captures_the_global_value_of_this:r(7041,1,"The_containing_arrow_function_captures_the_global_value_of_this_7041","The containing arrow function captures the global value of 'this'."),Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used:r(7042,1,"Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042","Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used."),Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:r(7043,2,"Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043","Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:r(7044,2,"Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044","Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:r(7045,2,"Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045","Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage:r(7046,2,"Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046","Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage."),Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage:r(7047,2,"Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047","Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage."),Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage:r(7048,2,"Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048","Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage."),Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage:r(7049,2,"Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049","Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage."),_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage:r(7050,2,"_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050","'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage."),Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1:r(7051,1,"Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051","Parameter has a name but no type. Did you mean '{0}: {1}'?"),Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1:r(7052,1,"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052","Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?"),Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1:r(7053,1,"Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053","Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'."),No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1:r(7054,1,"No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054","No index signature with a parameter of type '{0}' was found on type '{1}'."),_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type:r(7055,1,"_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055","'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type."),The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed:r(7056,1,"The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_ty_7056","The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed."),yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation:r(7057,1,"yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057","'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."),If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1:r(7058,1,"If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058","If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"),This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead:r(7059,1,"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059","This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."),This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint:r(7060,1,"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060","This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."),A_mapped_type_may_not_declare_properties_or_methods:r(7061,1,"A_mapped_type_may_not_declare_properties_or_methods_7061","A mapped type may not declare properties or methods."),You_cannot_rename_this_element:r(8e3,1,"You_cannot_rename_this_element_8000","You cannot rename this element."),You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library:r(8001,1,"You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001","You cannot rename elements that are defined in the standard TypeScript library."),import_can_only_be_used_in_TypeScript_files:r(8002,1,"import_can_only_be_used_in_TypeScript_files_8002","'import ... =' can only be used in TypeScript files."),export_can_only_be_used_in_TypeScript_files:r(8003,1,"export_can_only_be_used_in_TypeScript_files_8003","'export =' can only be used in TypeScript files."),Type_parameter_declarations_can_only_be_used_in_TypeScript_files:r(8004,1,"Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004","Type parameter declarations can only be used in TypeScript files."),implements_clauses_can_only_be_used_in_TypeScript_files:r(8005,1,"implements_clauses_can_only_be_used_in_TypeScript_files_8005","'implements' clauses can only be used in TypeScript files."),_0_declarations_can_only_be_used_in_TypeScript_files:r(8006,1,"_0_declarations_can_only_be_used_in_TypeScript_files_8006","'{0}' declarations can only be used in TypeScript files."),Type_aliases_can_only_be_used_in_TypeScript_files:r(8008,1,"Type_aliases_can_only_be_used_in_TypeScript_files_8008","Type aliases can only be used in TypeScript files."),The_0_modifier_can_only_be_used_in_TypeScript_files:r(8009,1,"The_0_modifier_can_only_be_used_in_TypeScript_files_8009","The '{0}' modifier can only be used in TypeScript files."),Type_annotations_can_only_be_used_in_TypeScript_files:r(8010,1,"Type_annotations_can_only_be_used_in_TypeScript_files_8010","Type annotations can only be used in TypeScript files."),Type_arguments_can_only_be_used_in_TypeScript_files:r(8011,1,"Type_arguments_can_only_be_used_in_TypeScript_files_8011","Type arguments can only be used in TypeScript files."),Parameter_modifiers_can_only_be_used_in_TypeScript_files:r(8012,1,"Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012","Parameter modifiers can only be used in TypeScript files."),Non_null_assertions_can_only_be_used_in_TypeScript_files:r(8013,1,"Non_null_assertions_can_only_be_used_in_TypeScript_files_8013","Non-null assertions can only be used in TypeScript files."),Type_assertion_expressions_can_only_be_used_in_TypeScript_files:r(8016,1,"Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016","Type assertion expressions can only be used in TypeScript files."),Signature_declarations_can_only_be_used_in_TypeScript_files:r(8017,1,"Signature_declarations_can_only_be_used_in_TypeScript_files_8017","Signature declarations can only be used in TypeScript files."),Report_errors_in_js_files:r(8019,3,"Report_errors_in_js_files_8019","Report errors in .js files."),JSDoc_types_can_only_be_used_inside_documentation_comments:r(8020,1,"JSDoc_types_can_only_be_used_inside_documentation_comments_8020","JSDoc types can only be used inside documentation comments."),JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags:r(8021,1,"JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021","JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."),JSDoc_0_is_not_attached_to_a_class:r(8022,1,"JSDoc_0_is_not_attached_to_a_class_8022","JSDoc '@{0}' is not attached to a class."),JSDoc_0_1_does_not_match_the_extends_2_clause:r(8023,1,"JSDoc_0_1_does_not_match_the_extends_2_clause_8023","JSDoc '@{0} {1}' does not match the 'extends {2}' clause."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name:r(8024,1,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024","JSDoc '@param' tag has name '{0}', but there is no parameter with that name."),Class_declarations_cannot_have_more_than_one_augments_or_extends_tag:r(8025,1,"Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025","Class declarations cannot have more than one '@augments' or '@extends' tag."),Expected_0_type_arguments_provide_these_with_an_extends_tag:r(8026,1,"Expected_0_type_arguments_provide_these_with_an_extends_tag_8026","Expected {0} type arguments; provide these with an '@extends' tag."),Expected_0_1_type_arguments_provide_these_with_an_extends_tag:r(8027,1,"Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027","Expected {0}-{1} type arguments; provide these with an '@extends' tag."),JSDoc_may_only_appear_in_the_last_parameter_of_a_signature:r(8028,1,"JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028","JSDoc '...' may only appear in the last parameter of a signature."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type:r(8029,1,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029","JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."),The_type_of_a_function_declaration_must_match_the_function_s_signature:r(8030,1,"The_type_of_a_function_declaration_must_match_the_function_s_signature_8030","The type of a function declaration must match the function's signature."),You_cannot_rename_a_module_via_a_global_import:r(8031,1,"You_cannot_rename_a_module_via_a_global_import_8031","You cannot rename a module via a global import."),Qualified_name_0_is_not_allowed_without_a_leading_param_object_1:r(8032,1,"Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032","Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."),A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags:r(8033,1,"A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033","A JSDoc '@typedef' comment may not contain multiple '@type' tags."),The_tag_was_first_specified_here:r(8034,1,"The_tag_was_first_specified_here_8034","The tag was first specified here."),You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder:r(8035,1,"You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035","You cannot rename elements that are defined in a 'node_modules' folder."),You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder:r(8036,1,"You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036","You cannot rename elements that are defined in another 'node_modules' folder."),Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files:r(8037,1,"Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037","Type satisfaction expressions can only be used in TypeScript files."),Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export:r(8038,1,"Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export_8038","Decorators may not appear after 'export' or 'export default' if they also appear before 'export'."),A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag:r(8039,1,"A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag_8039","A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag"),Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit:r(9005,1,"Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005","Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."),Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit:r(9006,1,"Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006","Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."),Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations:r(9007,1,"Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9007","Function must have an explicit return type annotation with --isolatedDeclarations."),Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations:r(9008,1,"Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9008","Method must have an explicit return type annotation with --isolatedDeclarations."),At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations:r(9009,1,"At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9009","At least one accessor must have an explicit type annotation with --isolatedDeclarations."),Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations:r(9010,1,"Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9010","Variable must have an explicit type annotation with --isolatedDeclarations."),Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations:r(9011,1,"Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9011","Parameter must have an explicit type annotation with --isolatedDeclarations."),Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations:r(9012,1,"Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9012","Property must have an explicit type annotation with --isolatedDeclarations."),Expression_type_can_t_be_inferred_with_isolatedDeclarations:r(9013,1,"Expression_type_can_t_be_inferred_with_isolatedDeclarations_9013","Expression type can't be inferred with --isolatedDeclarations."),Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations:r(9014,1,"Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedD_9014","Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations."),Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations:r(9015,1,"Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations_9015","Objects that contain spread assignments can't be inferred with --isolatedDeclarations."),Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations:r(9016,1,"Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations_9016","Objects that contain shorthand properties can't be inferred with --isolatedDeclarations."),Only_const_arrays_can_be_inferred_with_isolatedDeclarations:r(9017,1,"Only_const_arrays_can_be_inferred_with_isolatedDeclarations_9017","Only const arrays can be inferred with --isolatedDeclarations."),Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations:r(9018,1,"Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations_9018","Arrays with spread elements can't inferred with --isolatedDeclarations."),Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations:r(9019,1,"Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations_9019","Binding elements can't be exported directly with --isolatedDeclarations."),Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations:r(9020,1,"Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDecl_9020","Enum member initializers must be computable without references to external symbols with --isolatedDeclarations."),Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations:r(9021,1,"Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations_9021","Extends clause can't contain an expression with --isolatedDeclarations."),Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations:r(9022,1,"Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations_9022","Inference from class expressions is not supported with --isolatedDeclarations."),Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function:r(9023,1,"Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations__9023","Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function."),Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_supported_with_isolatedDeclarations:r(9025,1,"Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_sup_9025","Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations."),Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations:r(9026,1,"Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_support_9026","Declaration emit for this file requires preserving this import for augmentations. This is not supported with --isolatedDeclarations."),Add_a_type_annotation_to_the_variable_0:r(9027,1,"Add_a_type_annotation_to_the_variable_0_9027","Add a type annotation to the variable {0}."),Add_a_type_annotation_to_the_parameter_0:r(9028,1,"Add_a_type_annotation_to_the_parameter_0_9028","Add a type annotation to the parameter {0}."),Add_a_type_annotation_to_the_property_0:r(9029,1,"Add_a_type_annotation_to_the_property_0_9029","Add a type annotation to the property {0}."),Add_a_return_type_to_the_function_expression:r(9030,1,"Add_a_return_type_to_the_function_expression_9030","Add a return type to the function expression."),Add_a_return_type_to_the_function_declaration:r(9031,1,"Add_a_return_type_to_the_function_declaration_9031","Add a return type to the function declaration."),Add_a_return_type_to_the_get_accessor_declaration:r(9032,1,"Add_a_return_type_to_the_get_accessor_declaration_9032","Add a return type to the get accessor declaration."),Add_a_type_to_parameter_of_the_set_accessor_declaration:r(9033,1,"Add_a_type_to_parameter_of_the_set_accessor_declaration_9033","Add a type to parameter of the set accessor declaration."),Add_a_return_type_to_the_method:r(9034,1,"Add_a_return_type_to_the_method_9034","Add a return type to the method"),Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit:r(9035,1,"Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit_9035","Add satisfies and a type assertion to this expression (satisfies T as T) to make the type explicit."),Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it:r(9036,1,"Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it_9036","Move the expression in default export to a variable and add a type annotation to it."),Default_exports_can_t_be_inferred_with_isolatedDeclarations:r(9037,1,"Default_exports_can_t_be_inferred_with_isolatedDeclarations_9037","Default exports can't be inferred with --isolatedDeclarations."),Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations:r(9038,1,"Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations_9038","Computed property names on class or object literals cannot be inferred with --isolatedDeclarations."),Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations:r(9039,1,"Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations_9039","Type containing private name '{0}' can't be used with --isolatedDeclarations."),JSX_attributes_must_only_be_assigned_a_non_empty_expression:r(17e3,1,"JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000","JSX attributes must only be assigned a non-empty 'expression'."),JSX_elements_cannot_have_multiple_attributes_with_the_same_name:r(17001,1,"JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001","JSX elements cannot have multiple attributes with the same name."),Expected_corresponding_JSX_closing_tag_for_0:r(17002,1,"Expected_corresponding_JSX_closing_tag_for_0_17002","Expected corresponding JSX closing tag for '{0}'."),Cannot_use_JSX_unless_the_jsx_flag_is_provided:r(17004,1,"Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004","Cannot use JSX unless the '--jsx' flag is provided."),A_constructor_cannot_contain_a_super_call_when_its_class_extends_null:r(17005,1,"A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005","A constructor cannot contain a 'super' call when its class extends 'null'."),An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:r(17006,1,"An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006","An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:r(17007,1,"A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007","A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),JSX_element_0_has_no_corresponding_closing_tag:r(17008,1,"JSX_element_0_has_no_corresponding_closing_tag_17008","JSX element '{0}' has no corresponding closing tag."),super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class:r(17009,1,"super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009","'super' must be called before accessing 'this' in the constructor of a derived class."),Unknown_type_acquisition_option_0:r(17010,1,"Unknown_type_acquisition_option_0_17010","Unknown type acquisition option '{0}'."),super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class:r(17011,1,"super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011","'super' must be called before accessing a property of 'super' in the constructor of a derived class."),_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2:r(17012,1,"_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012","'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?"),Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor:r(17013,1,"Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013","Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor."),JSX_fragment_has_no_corresponding_closing_tag:r(17014,1,"JSX_fragment_has_no_corresponding_closing_tag_17014","JSX fragment has no corresponding closing tag."),Expected_corresponding_closing_tag_for_JSX_fragment:r(17015,1,"Expected_corresponding_closing_tag_for_JSX_fragment_17015","Expected corresponding closing tag for JSX fragment."),The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option:r(17016,1,"The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_com_17016","The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option."),An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments:r(17017,1,"An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments_17017","An @jsxFrag pragma is required when using an @jsx pragma with JSX fragments."),Unknown_type_acquisition_option_0_Did_you_mean_1:r(17018,1,"Unknown_type_acquisition_option_0_Did_you_mean_1_17018","Unknown type acquisition option '{0}'. Did you mean '{1}'?"),_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:r(17019,1,"_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17019","'{0}' at the end of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"),_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:r(17020,1,"_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17020","'{0}' at the start of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"),Unicode_escape_sequence_cannot_appear_here:r(17021,1,"Unicode_escape_sequence_cannot_appear_here_17021","Unicode escape sequence cannot appear here."),Circularity_detected_while_resolving_configuration_Colon_0:r(18e3,1,"Circularity_detected_while_resolving_configuration_Colon_0_18000","Circularity detected while resolving configuration: {0}"),The_files_list_in_config_file_0_is_empty:r(18002,1,"The_files_list_in_config_file_0_is_empty_18002","The 'files' list in config file '{0}' is empty."),No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2:r(18003,1,"No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003","No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."),File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module:r(80001,2,"File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001","File is a CommonJS module; it may be converted to an ES module."),This_constructor_function_may_be_converted_to_a_class_declaration:r(80002,2,"This_constructor_function_may_be_converted_to_a_class_declaration_80002","This constructor function may be converted to a class declaration."),Import_may_be_converted_to_a_default_import:r(80003,2,"Import_may_be_converted_to_a_default_import_80003","Import may be converted to a default import."),JSDoc_types_may_be_moved_to_TypeScript_types:r(80004,2,"JSDoc_types_may_be_moved_to_TypeScript_types_80004","JSDoc types may be moved to TypeScript types."),require_call_may_be_converted_to_an_import:r(80005,2,"require_call_may_be_converted_to_an_import_80005","'require' call may be converted to an import."),This_may_be_converted_to_an_async_function:r(80006,2,"This_may_be_converted_to_an_async_function_80006","This may be converted to an async function."),await_has_no_effect_on_the_type_of_this_expression:r(80007,2,"await_has_no_effect_on_the_type_of_this_expression_80007","'await' has no effect on the type of this expression."),Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers:r(80008,2,"Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008","Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers."),JSDoc_typedef_may_be_converted_to_TypeScript_type:r(80009,2,"JSDoc_typedef_may_be_converted_to_TypeScript_type_80009","JSDoc typedef may be converted to TypeScript type."),JSDoc_typedefs_may_be_converted_to_TypeScript_types:r(80010,2,"JSDoc_typedefs_may_be_converted_to_TypeScript_types_80010","JSDoc typedefs may be converted to TypeScript types."),Add_missing_super_call:r(90001,3,"Add_missing_super_call_90001","Add missing 'super()' call"),Make_super_call_the_first_statement_in_the_constructor:r(90002,3,"Make_super_call_the_first_statement_in_the_constructor_90002","Make 'super()' call the first statement in the constructor"),Change_extends_to_implements:r(90003,3,"Change_extends_to_implements_90003","Change 'extends' to 'implements'"),Remove_unused_declaration_for_Colon_0:r(90004,3,"Remove_unused_declaration_for_Colon_0_90004","Remove unused declaration for: '{0}'"),Remove_import_from_0:r(90005,3,"Remove_import_from_0_90005","Remove import from '{0}'"),Implement_interface_0:r(90006,3,"Implement_interface_0_90006","Implement interface '{0}'"),Implement_inherited_abstract_class:r(90007,3,"Implement_inherited_abstract_class_90007","Implement inherited abstract class"),Add_0_to_unresolved_variable:r(90008,3,"Add_0_to_unresolved_variable_90008","Add '{0}.' to unresolved variable"),Remove_variable_statement:r(90010,3,"Remove_variable_statement_90010","Remove variable statement"),Remove_template_tag:r(90011,3,"Remove_template_tag_90011","Remove template tag"),Remove_type_parameters:r(90012,3,"Remove_type_parameters_90012","Remove type parameters"),Import_0_from_1:r(90013,3,"Import_0_from_1_90013",`Import '{0}' from "{1}"`),Change_0_to_1:r(90014,3,"Change_0_to_1_90014","Change '{0}' to '{1}'"),Declare_property_0:r(90016,3,"Declare_property_0_90016","Declare property '{0}'"),Add_index_signature_for_property_0:r(90017,3,"Add_index_signature_for_property_0_90017","Add index signature for property '{0}'"),Disable_checking_for_this_file:r(90018,3,"Disable_checking_for_this_file_90018","Disable checking for this file"),Ignore_this_error_message:r(90019,3,"Ignore_this_error_message_90019","Ignore this error message"),Initialize_property_0_in_the_constructor:r(90020,3,"Initialize_property_0_in_the_constructor_90020","Initialize property '{0}' in the constructor"),Initialize_static_property_0:r(90021,3,"Initialize_static_property_0_90021","Initialize static property '{0}'"),Change_spelling_to_0:r(90022,3,"Change_spelling_to_0_90022","Change spelling to '{0}'"),Declare_method_0:r(90023,3,"Declare_method_0_90023","Declare method '{0}'"),Declare_static_method_0:r(90024,3,"Declare_static_method_0_90024","Declare static method '{0}'"),Prefix_0_with_an_underscore:r(90025,3,"Prefix_0_with_an_underscore_90025","Prefix '{0}' with an underscore"),Rewrite_as_the_indexed_access_type_0:r(90026,3,"Rewrite_as_the_indexed_access_type_0_90026","Rewrite as the indexed access type '{0}'"),Declare_static_property_0:r(90027,3,"Declare_static_property_0_90027","Declare static property '{0}'"),Call_decorator_expression:r(90028,3,"Call_decorator_expression_90028","Call decorator expression"),Add_async_modifier_to_containing_function:r(90029,3,"Add_async_modifier_to_containing_function_90029","Add async modifier to containing function"),Replace_infer_0_with_unknown:r(90030,3,"Replace_infer_0_with_unknown_90030","Replace 'infer {0}' with 'unknown'"),Replace_all_unused_infer_with_unknown:r(90031,3,"Replace_all_unused_infer_with_unknown_90031","Replace all unused 'infer' with 'unknown'"),Add_parameter_name:r(90034,3,"Add_parameter_name_90034","Add parameter name"),Declare_private_property_0:r(90035,3,"Declare_private_property_0_90035","Declare private property '{0}'"),Replace_0_with_Promise_1:r(90036,3,"Replace_0_with_Promise_1_90036","Replace '{0}' with 'Promise<{1}>'"),Fix_all_incorrect_return_type_of_an_async_functions:r(90037,3,"Fix_all_incorrect_return_type_of_an_async_functions_90037","Fix all incorrect return type of an async functions"),Declare_private_method_0:r(90038,3,"Declare_private_method_0_90038","Declare private method '{0}'"),Remove_unused_destructuring_declaration:r(90039,3,"Remove_unused_destructuring_declaration_90039","Remove unused destructuring declaration"),Remove_unused_declarations_for_Colon_0:r(90041,3,"Remove_unused_declarations_for_Colon_0_90041","Remove unused declarations for: '{0}'"),Declare_a_private_field_named_0:r(90053,3,"Declare_a_private_field_named_0_90053","Declare a private field named '{0}'."),Includes_imports_of_types_referenced_by_0:r(90054,3,"Includes_imports_of_types_referenced_by_0_90054","Includes imports of types referenced by '{0}'"),Remove_type_from_import_declaration_from_0:r(90055,3,"Remove_type_from_import_declaration_from_0_90055",`Remove 'type' from import declaration from "{0}"`),Remove_type_from_import_of_0_from_1:r(90056,3,"Remove_type_from_import_of_0_from_1_90056",`Remove 'type' from import of '{0}' from "{1}"`),Add_import_from_0:r(90057,3,"Add_import_from_0_90057",'Add import from "{0}"'),Update_import_from_0:r(90058,3,"Update_import_from_0_90058",'Update import from "{0}"'),Export_0_from_module_1:r(90059,3,"Export_0_from_module_1_90059","Export '{0}' from module '{1}'"),Export_all_referenced_locals:r(90060,3,"Export_all_referenced_locals_90060","Export all referenced locals"),Update_modifiers_of_0:r(90061,3,"Update_modifiers_of_0_90061","Update modifiers of '{0}'"),Add_annotation_of_type_0:r(90062,3,"Add_annotation_of_type_0_90062","Add annotation of type '{0}'"),Add_return_type_0:r(90063,3,"Add_return_type_0_90063","Add return type '{0}'"),Extract_base_class_to_variable:r(90064,3,"Extract_base_class_to_variable_90064","Extract base class to variable"),Extract_default_export_to_variable:r(90065,3,"Extract_default_export_to_variable_90065","Extract default export to variable"),Extract_binding_expressions_to_variable:r(90066,3,"Extract_binding_expressions_to_variable_90066","Extract binding expressions to variable"),Add_all_missing_type_annotations:r(90067,3,"Add_all_missing_type_annotations_90067","Add all missing type annotations"),Add_satisfies_and_an_inline_type_assertion_with_0:r(90068,3,"Add_satisfies_and_an_inline_type_assertion_with_0_90068","Add satisfies and an inline type assertion with '{0}'"),Extract_to_variable_and_replace_with_0_as_typeof_0:r(90069,3,"Extract_to_variable_and_replace_with_0_as_typeof_0_90069","Extract to variable and replace with '{0} as typeof {0}'"),Mark_array_literal_as_const:r(90070,3,"Mark_array_literal_as_const_90070","Mark array literal as const"),Annotate_types_of_properties_expando_function_in_a_namespace:r(90071,3,"Annotate_types_of_properties_expando_function_in_a_namespace_90071","Annotate types of properties expando function in a namespace"),Convert_function_to_an_ES2015_class:r(95001,3,"Convert_function_to_an_ES2015_class_95001","Convert function to an ES2015 class"),Convert_0_to_1_in_0:r(95003,3,"Convert_0_to_1_in_0_95003","Convert '{0}' to '{1} in {0}'"),Extract_to_0_in_1:r(95004,3,"Extract_to_0_in_1_95004","Extract to {0} in {1}"),Extract_function:r(95005,3,"Extract_function_95005","Extract function"),Extract_constant:r(95006,3,"Extract_constant_95006","Extract constant"),Extract_to_0_in_enclosing_scope:r(95007,3,"Extract_to_0_in_enclosing_scope_95007","Extract to {0} in enclosing scope"),Extract_to_0_in_1_scope:r(95008,3,"Extract_to_0_in_1_scope_95008","Extract to {0} in {1} scope"),Annotate_with_type_from_JSDoc:r(95009,3,"Annotate_with_type_from_JSDoc_95009","Annotate with type from JSDoc"),Infer_type_of_0_from_usage:r(95011,3,"Infer_type_of_0_from_usage_95011","Infer type of '{0}' from usage"),Infer_parameter_types_from_usage:r(95012,3,"Infer_parameter_types_from_usage_95012","Infer parameter types from usage"),Convert_to_default_import:r(95013,3,"Convert_to_default_import_95013","Convert to default import"),Install_0:r(95014,3,"Install_0_95014","Install '{0}'"),Replace_import_with_0:r(95015,3,"Replace_import_with_0_95015","Replace import with '{0}'."),Use_synthetic_default_member:r(95016,3,"Use_synthetic_default_member_95016","Use synthetic 'default' member."),Convert_to_ES_module:r(95017,3,"Convert_to_ES_module_95017","Convert to ES module"),Add_undefined_type_to_property_0:r(95018,3,"Add_undefined_type_to_property_0_95018","Add 'undefined' type to property '{0}'"),Add_initializer_to_property_0:r(95019,3,"Add_initializer_to_property_0_95019","Add initializer to property '{0}'"),Add_definite_assignment_assertion_to_property_0:r(95020,3,"Add_definite_assignment_assertion_to_property_0_95020","Add definite assignment assertion to property '{0}'"),Convert_all_type_literals_to_mapped_type:r(95021,3,"Convert_all_type_literals_to_mapped_type_95021","Convert all type literals to mapped type"),Add_all_missing_members:r(95022,3,"Add_all_missing_members_95022","Add all missing members"),Infer_all_types_from_usage:r(95023,3,"Infer_all_types_from_usage_95023","Infer all types from usage"),Delete_all_unused_declarations:r(95024,3,"Delete_all_unused_declarations_95024","Delete all unused declarations"),Prefix_all_unused_declarations_with_where_possible:r(95025,3,"Prefix_all_unused_declarations_with_where_possible_95025","Prefix all unused declarations with '_' where possible"),Fix_all_detected_spelling_errors:r(95026,3,"Fix_all_detected_spelling_errors_95026","Fix all detected spelling errors"),Add_initializers_to_all_uninitialized_properties:r(95027,3,"Add_initializers_to_all_uninitialized_properties_95027","Add initializers to all uninitialized properties"),Add_definite_assignment_assertions_to_all_uninitialized_properties:r(95028,3,"Add_definite_assignment_assertions_to_all_uninitialized_properties_95028","Add definite assignment assertions to all uninitialized properties"),Add_undefined_type_to_all_uninitialized_properties:r(95029,3,"Add_undefined_type_to_all_uninitialized_properties_95029","Add undefined type to all uninitialized properties"),Change_all_jsdoc_style_types_to_TypeScript:r(95030,3,"Change_all_jsdoc_style_types_to_TypeScript_95030","Change all jsdoc-style types to TypeScript"),Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types:r(95031,3,"Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031","Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)"),Implement_all_unimplemented_interfaces:r(95032,3,"Implement_all_unimplemented_interfaces_95032","Implement all unimplemented interfaces"),Install_all_missing_types_packages:r(95033,3,"Install_all_missing_types_packages_95033","Install all missing types packages"),Rewrite_all_as_indexed_access_types:r(95034,3,"Rewrite_all_as_indexed_access_types_95034","Rewrite all as indexed access types"),Convert_all_to_default_imports:r(95035,3,"Convert_all_to_default_imports_95035","Convert all to default imports"),Make_all_super_calls_the_first_statement_in_their_constructor:r(95036,3,"Make_all_super_calls_the_first_statement_in_their_constructor_95036","Make all 'super()' calls the first statement in their constructor"),Add_qualifier_to_all_unresolved_variables_matching_a_member_name:r(95037,3,"Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037","Add qualifier to all unresolved variables matching a member name"),Change_all_extended_interfaces_to_implements:r(95038,3,"Change_all_extended_interfaces_to_implements_95038","Change all extended interfaces to 'implements'"),Add_all_missing_super_calls:r(95039,3,"Add_all_missing_super_calls_95039","Add all missing super calls"),Implement_all_inherited_abstract_classes:r(95040,3,"Implement_all_inherited_abstract_classes_95040","Implement all inherited abstract classes"),Add_all_missing_async_modifiers:r(95041,3,"Add_all_missing_async_modifiers_95041","Add all missing 'async' modifiers"),Add_ts_ignore_to_all_error_messages:r(95042,3,"Add_ts_ignore_to_all_error_messages_95042","Add '@ts-ignore' to all error messages"),Annotate_everything_with_types_from_JSDoc:r(95043,3,"Annotate_everything_with_types_from_JSDoc_95043","Annotate everything with types from JSDoc"),Add_to_all_uncalled_decorators:r(95044,3,"Add_to_all_uncalled_decorators_95044","Add '()' to all uncalled decorators"),Convert_all_constructor_functions_to_classes:r(95045,3,"Convert_all_constructor_functions_to_classes_95045","Convert all constructor functions to classes"),Generate_get_and_set_accessors:r(95046,3,"Generate_get_and_set_accessors_95046","Generate 'get' and 'set' accessors"),Convert_require_to_import:r(95047,3,"Convert_require_to_import_95047","Convert 'require' to 'import'"),Convert_all_require_to_import:r(95048,3,"Convert_all_require_to_import_95048","Convert all 'require' to 'import'"),Move_to_a_new_file:r(95049,3,"Move_to_a_new_file_95049","Move to a new file"),Remove_unreachable_code:r(95050,3,"Remove_unreachable_code_95050","Remove unreachable code"),Remove_all_unreachable_code:r(95051,3,"Remove_all_unreachable_code_95051","Remove all unreachable code"),Add_missing_typeof:r(95052,3,"Add_missing_typeof_95052","Add missing 'typeof'"),Remove_unused_label:r(95053,3,"Remove_unused_label_95053","Remove unused label"),Remove_all_unused_labels:r(95054,3,"Remove_all_unused_labels_95054","Remove all unused labels"),Convert_0_to_mapped_object_type:r(95055,3,"Convert_0_to_mapped_object_type_95055","Convert '{0}' to mapped object type"),Convert_namespace_import_to_named_imports:r(95056,3,"Convert_namespace_import_to_named_imports_95056","Convert namespace import to named imports"),Convert_named_imports_to_namespace_import:r(95057,3,"Convert_named_imports_to_namespace_import_95057","Convert named imports to namespace import"),Add_or_remove_braces_in_an_arrow_function:r(95058,3,"Add_or_remove_braces_in_an_arrow_function_95058","Add or remove braces in an arrow function"),Add_braces_to_arrow_function:r(95059,3,"Add_braces_to_arrow_function_95059","Add braces to arrow function"),Remove_braces_from_arrow_function:r(95060,3,"Remove_braces_from_arrow_function_95060","Remove braces from arrow function"),Convert_default_export_to_named_export:r(95061,3,"Convert_default_export_to_named_export_95061","Convert default export to named export"),Convert_named_export_to_default_export:r(95062,3,"Convert_named_export_to_default_export_95062","Convert named export to default export"),Add_missing_enum_member_0:r(95063,3,"Add_missing_enum_member_0_95063","Add missing enum member '{0}'"),Add_all_missing_imports:r(95064,3,"Add_all_missing_imports_95064","Add all missing imports"),Convert_to_async_function:r(95065,3,"Convert_to_async_function_95065","Convert to async function"),Convert_all_to_async_functions:r(95066,3,"Convert_all_to_async_functions_95066","Convert all to async functions"),Add_missing_call_parentheses:r(95067,3,"Add_missing_call_parentheses_95067","Add missing call parentheses"),Add_all_missing_call_parentheses:r(95068,3,"Add_all_missing_call_parentheses_95068","Add all missing call parentheses"),Add_unknown_conversion_for_non_overlapping_types:r(95069,3,"Add_unknown_conversion_for_non_overlapping_types_95069","Add 'unknown' conversion for non-overlapping types"),Add_unknown_to_all_conversions_of_non_overlapping_types:r(95070,3,"Add_unknown_to_all_conversions_of_non_overlapping_types_95070","Add 'unknown' to all conversions of non-overlapping types"),Add_missing_new_operator_to_call:r(95071,3,"Add_missing_new_operator_to_call_95071","Add missing 'new' operator to call"),Add_missing_new_operator_to_all_calls:r(95072,3,"Add_missing_new_operator_to_all_calls_95072","Add missing 'new' operator to all calls"),Add_names_to_all_parameters_without_names:r(95073,3,"Add_names_to_all_parameters_without_names_95073","Add names to all parameters without names"),Enable_the_experimentalDecorators_option_in_your_configuration_file:r(95074,3,"Enable_the_experimentalDecorators_option_in_your_configuration_file_95074","Enable the 'experimentalDecorators' option in your configuration file"),Convert_parameters_to_destructured_object:r(95075,3,"Convert_parameters_to_destructured_object_95075","Convert parameters to destructured object"),Extract_type:r(95077,3,"Extract_type_95077","Extract type"),Extract_to_type_alias:r(95078,3,"Extract_to_type_alias_95078","Extract to type alias"),Extract_to_typedef:r(95079,3,"Extract_to_typedef_95079","Extract to typedef"),Infer_this_type_of_0_from_usage:r(95080,3,"Infer_this_type_of_0_from_usage_95080","Infer 'this' type of '{0}' from usage"),Add_const_to_unresolved_variable:r(95081,3,"Add_const_to_unresolved_variable_95081","Add 'const' to unresolved variable"),Add_const_to_all_unresolved_variables:r(95082,3,"Add_const_to_all_unresolved_variables_95082","Add 'const' to all unresolved variables"),Add_await:r(95083,3,"Add_await_95083","Add 'await'"),Add_await_to_initializer_for_0:r(95084,3,"Add_await_to_initializer_for_0_95084","Add 'await' to initializer for '{0}'"),Fix_all_expressions_possibly_missing_await:r(95085,3,"Fix_all_expressions_possibly_missing_await_95085","Fix all expressions possibly missing 'await'"),Remove_unnecessary_await:r(95086,3,"Remove_unnecessary_await_95086","Remove unnecessary 'await'"),Remove_all_unnecessary_uses_of_await:r(95087,3,"Remove_all_unnecessary_uses_of_await_95087","Remove all unnecessary uses of 'await'"),Enable_the_jsx_flag_in_your_configuration_file:r(95088,3,"Enable_the_jsx_flag_in_your_configuration_file_95088","Enable the '--jsx' flag in your configuration file"),Add_await_to_initializers:r(95089,3,"Add_await_to_initializers_95089","Add 'await' to initializers"),Extract_to_interface:r(95090,3,"Extract_to_interface_95090","Extract to interface"),Convert_to_a_bigint_numeric_literal:r(95091,3,"Convert_to_a_bigint_numeric_literal_95091","Convert to a bigint numeric literal"),Convert_all_to_bigint_numeric_literals:r(95092,3,"Convert_all_to_bigint_numeric_literals_95092","Convert all to bigint numeric literals"),Convert_const_to_let:r(95093,3,"Convert_const_to_let_95093","Convert 'const' to 'let'"),Prefix_with_declare:r(95094,3,"Prefix_with_declare_95094","Prefix with 'declare'"),Prefix_all_incorrect_property_declarations_with_declare:r(95095,3,"Prefix_all_incorrect_property_declarations_with_declare_95095","Prefix all incorrect property declarations with 'declare'"),Convert_to_template_string:r(95096,3,"Convert_to_template_string_95096","Convert to template string"),Add_export_to_make_this_file_into_a_module:r(95097,3,"Add_export_to_make_this_file_into_a_module_95097","Add 'export {}' to make this file into a module"),Set_the_target_option_in_your_configuration_file_to_0:r(95098,3,"Set_the_target_option_in_your_configuration_file_to_0_95098","Set the 'target' option in your configuration file to '{0}'"),Set_the_module_option_in_your_configuration_file_to_0:r(95099,3,"Set_the_module_option_in_your_configuration_file_to_0_95099","Set the 'module' option in your configuration file to '{0}'"),Convert_invalid_character_to_its_html_entity_code:r(95100,3,"Convert_invalid_character_to_its_html_entity_code_95100","Convert invalid character to its html entity code"),Convert_all_invalid_characters_to_HTML_entity_code:r(95101,3,"Convert_all_invalid_characters_to_HTML_entity_code_95101","Convert all invalid characters to HTML entity code"),Convert_all_const_to_let:r(95102,3,"Convert_all_const_to_let_95102","Convert all 'const' to 'let'"),Convert_function_expression_0_to_arrow_function:r(95105,3,"Convert_function_expression_0_to_arrow_function_95105","Convert function expression '{0}' to arrow function"),Convert_function_declaration_0_to_arrow_function:r(95106,3,"Convert_function_declaration_0_to_arrow_function_95106","Convert function declaration '{0}' to arrow function"),Fix_all_implicit_this_errors:r(95107,3,"Fix_all_implicit_this_errors_95107","Fix all implicit-'this' errors"),Wrap_invalid_character_in_an_expression_container:r(95108,3,"Wrap_invalid_character_in_an_expression_container_95108","Wrap invalid character in an expression container"),Wrap_all_invalid_characters_in_an_expression_container:r(95109,3,"Wrap_all_invalid_characters_in_an_expression_container_95109","Wrap all invalid characters in an expression container"),Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file:r(95110,3,"Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110","Visit https://aka.ms/tsconfig to read more about this file"),Add_a_return_statement:r(95111,3,"Add_a_return_statement_95111","Add a return statement"),Remove_braces_from_arrow_function_body:r(95112,3,"Remove_braces_from_arrow_function_body_95112","Remove braces from arrow function body"),Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal:r(95113,3,"Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113","Wrap the following body with parentheses which should be an object literal"),Add_all_missing_return_statement:r(95114,3,"Add_all_missing_return_statement_95114","Add all missing return statement"),Remove_braces_from_all_arrow_function_bodies_with_relevant_issues:r(95115,3,"Remove_braces_from_all_arrow_function_bodies_with_relevant_issues_95115","Remove braces from all arrow function bodies with relevant issues"),Wrap_all_object_literal_with_parentheses:r(95116,3,"Wrap_all_object_literal_with_parentheses_95116","Wrap all object literal with parentheses"),Move_labeled_tuple_element_modifiers_to_labels:r(95117,3,"Move_labeled_tuple_element_modifiers_to_labels_95117","Move labeled tuple element modifiers to labels"),Convert_overload_list_to_single_signature:r(95118,3,"Convert_overload_list_to_single_signature_95118","Convert overload list to single signature"),Generate_get_and_set_accessors_for_all_overriding_properties:r(95119,3,"Generate_get_and_set_accessors_for_all_overriding_properties_95119","Generate 'get' and 'set' accessors for all overriding properties"),Wrap_in_JSX_fragment:r(95120,3,"Wrap_in_JSX_fragment_95120","Wrap in JSX fragment"),Wrap_all_unparented_JSX_in_JSX_fragment:r(95121,3,"Wrap_all_unparented_JSX_in_JSX_fragment_95121","Wrap all unparented JSX in JSX fragment"),Convert_arrow_function_or_function_expression:r(95122,3,"Convert_arrow_function_or_function_expression_95122","Convert arrow function or function expression"),Convert_to_anonymous_function:r(95123,3,"Convert_to_anonymous_function_95123","Convert to anonymous function"),Convert_to_named_function:r(95124,3,"Convert_to_named_function_95124","Convert to named function"),Convert_to_arrow_function:r(95125,3,"Convert_to_arrow_function_95125","Convert to arrow function"),Remove_parentheses:r(95126,3,"Remove_parentheses_95126","Remove parentheses"),Could_not_find_a_containing_arrow_function:r(95127,3,"Could_not_find_a_containing_arrow_function_95127","Could not find a containing arrow function"),Containing_function_is_not_an_arrow_function:r(95128,3,"Containing_function_is_not_an_arrow_function_95128","Containing function is not an arrow function"),Could_not_find_export_statement:r(95129,3,"Could_not_find_export_statement_95129","Could not find export statement"),This_file_already_has_a_default_export:r(95130,3,"This_file_already_has_a_default_export_95130","This file already has a default export"),Could_not_find_import_clause:r(95131,3,"Could_not_find_import_clause_95131","Could not find import clause"),Could_not_find_namespace_import_or_named_imports:r(95132,3,"Could_not_find_namespace_import_or_named_imports_95132","Could not find namespace import or named imports"),Selection_is_not_a_valid_type_node:r(95133,3,"Selection_is_not_a_valid_type_node_95133","Selection is not a valid type node"),No_type_could_be_extracted_from_this_type_node:r(95134,3,"No_type_could_be_extracted_from_this_type_node_95134","No type could be extracted from this type node"),Could_not_find_property_for_which_to_generate_accessor:r(95135,3,"Could_not_find_property_for_which_to_generate_accessor_95135","Could not find property for which to generate accessor"),Name_is_not_valid:r(95136,3,"Name_is_not_valid_95136","Name is not valid"),Can_only_convert_property_with_modifier:r(95137,3,"Can_only_convert_property_with_modifier_95137","Can only convert property with modifier"),Switch_each_misused_0_to_1:r(95138,3,"Switch_each_misused_0_to_1_95138","Switch each misused '{0}' to '{1}'"),Convert_to_optional_chain_expression:r(95139,3,"Convert_to_optional_chain_expression_95139","Convert to optional chain expression"),Could_not_find_convertible_access_expression:r(95140,3,"Could_not_find_convertible_access_expression_95140","Could not find convertible access expression"),Could_not_find_matching_access_expressions:r(95141,3,"Could_not_find_matching_access_expressions_95141","Could not find matching access expressions"),Can_only_convert_logical_AND_access_chains:r(95142,3,"Can_only_convert_logical_AND_access_chains_95142","Can only convert logical AND access chains"),Add_void_to_Promise_resolved_without_a_value:r(95143,3,"Add_void_to_Promise_resolved_without_a_value_95143","Add 'void' to Promise resolved without a value"),Add_void_to_all_Promises_resolved_without_a_value:r(95144,3,"Add_void_to_all_Promises_resolved_without_a_value_95144","Add 'void' to all Promises resolved without a value"),Use_element_access_for_0:r(95145,3,"Use_element_access_for_0_95145","Use element access for '{0}'"),Use_element_access_for_all_undeclared_properties:r(95146,3,"Use_element_access_for_all_undeclared_properties_95146","Use element access for all undeclared properties."),Delete_all_unused_imports:r(95147,3,"Delete_all_unused_imports_95147","Delete all unused imports"),Infer_function_return_type:r(95148,3,"Infer_function_return_type_95148","Infer function return type"),Return_type_must_be_inferred_from_a_function:r(95149,3,"Return_type_must_be_inferred_from_a_function_95149","Return type must be inferred from a function"),Could_not_determine_function_return_type:r(95150,3,"Could_not_determine_function_return_type_95150","Could not determine function return type"),Could_not_convert_to_arrow_function:r(95151,3,"Could_not_convert_to_arrow_function_95151","Could not convert to arrow function"),Could_not_convert_to_named_function:r(95152,3,"Could_not_convert_to_named_function_95152","Could not convert to named function"),Could_not_convert_to_anonymous_function:r(95153,3,"Could_not_convert_to_anonymous_function_95153","Could not convert to anonymous function"),Can_only_convert_string_concatenations_and_string_literals:r(95154,3,"Can_only_convert_string_concatenations_and_string_literals_95154","Can only convert string concatenations and string literals"),Selection_is_not_a_valid_statement_or_statements:r(95155,3,"Selection_is_not_a_valid_statement_or_statements_95155","Selection is not a valid statement or statements"),Add_missing_function_declaration_0:r(95156,3,"Add_missing_function_declaration_0_95156","Add missing function declaration '{0}'"),Add_all_missing_function_declarations:r(95157,3,"Add_all_missing_function_declarations_95157","Add all missing function declarations"),Method_not_implemented:r(95158,3,"Method_not_implemented_95158","Method not implemented."),Function_not_implemented:r(95159,3,"Function_not_implemented_95159","Function not implemented."),Add_override_modifier:r(95160,3,"Add_override_modifier_95160","Add 'override' modifier"),Remove_override_modifier:r(95161,3,"Remove_override_modifier_95161","Remove 'override' modifier"),Add_all_missing_override_modifiers:r(95162,3,"Add_all_missing_override_modifiers_95162","Add all missing 'override' modifiers"),Remove_all_unnecessary_override_modifiers:r(95163,3,"Remove_all_unnecessary_override_modifiers_95163","Remove all unnecessary 'override' modifiers"),Can_only_convert_named_export:r(95164,3,"Can_only_convert_named_export_95164","Can only convert named export"),Add_missing_properties:r(95165,3,"Add_missing_properties_95165","Add missing properties"),Add_all_missing_properties:r(95166,3,"Add_all_missing_properties_95166","Add all missing properties"),Add_missing_attributes:r(95167,3,"Add_missing_attributes_95167","Add missing attributes"),Add_all_missing_attributes:r(95168,3,"Add_all_missing_attributes_95168","Add all missing attributes"),Add_undefined_to_optional_property_type:r(95169,3,"Add_undefined_to_optional_property_type_95169","Add 'undefined' to optional property type"),Convert_named_imports_to_default_import:r(95170,3,"Convert_named_imports_to_default_import_95170","Convert named imports to default import"),Delete_unused_param_tag_0:r(95171,3,"Delete_unused_param_tag_0_95171","Delete unused '@param' tag '{0}'"),Delete_all_unused_param_tags:r(95172,3,"Delete_all_unused_param_tags_95172","Delete all unused '@param' tags"),Rename_param_tag_name_0_to_1:r(95173,3,"Rename_param_tag_name_0_to_1_95173","Rename '@param' tag name '{0}' to '{1}'"),Use_0:r(95174,3,"Use_0_95174","Use `{0}`."),Use_Number_isNaN_in_all_conditions:r(95175,3,"Use_Number_isNaN_in_all_conditions_95175","Use `Number.isNaN` in all conditions."),Convert_typedef_to_TypeScript_type:r(95176,3,"Convert_typedef_to_TypeScript_type_95176","Convert typedef to TypeScript type."),Convert_all_typedef_to_TypeScript_types:r(95177,3,"Convert_all_typedef_to_TypeScript_types_95177","Convert all typedef to TypeScript types."),Move_to_file:r(95178,3,"Move_to_file_95178","Move to file"),Cannot_move_to_file_selected_file_is_invalid:r(95179,3,"Cannot_move_to_file_selected_file_is_invalid_95179","Cannot move to file, selected file is invalid"),Use_import_type:r(95180,3,"Use_import_type_95180","Use 'import type'"),Use_type_0:r(95181,3,"Use_type_0_95181","Use 'type {0}'"),Fix_all_with_type_only_imports:r(95182,3,"Fix_all_with_type_only_imports_95182","Fix all with type-only imports"),Cannot_move_statements_to_the_selected_file:r(95183,3,"Cannot_move_statements_to_the_selected_file_95183","Cannot move statements to the selected file"),Inline_variable:r(95184,3,"Inline_variable_95184","Inline variable"),Could_not_find_variable_to_inline:r(95185,3,"Could_not_find_variable_to_inline_95185","Could not find variable to inline."),Variables_with_multiple_declarations_cannot_be_inlined:r(95186,3,"Variables_with_multiple_declarations_cannot_be_inlined_95186","Variables with multiple declarations cannot be inlined."),Add_missing_comma_for_object_member_completion_0:r(95187,3,"Add_missing_comma_for_object_member_completion_0_95187","Add missing comma for object member completion '{0}'."),Add_missing_parameter_to_0:r(95188,3,"Add_missing_parameter_to_0_95188","Add missing parameter to '{0}'"),Add_missing_parameters_to_0:r(95189,3,"Add_missing_parameters_to_0_95189","Add missing parameters to '{0}'"),Add_all_missing_parameters:r(95190,3,"Add_all_missing_parameters_95190","Add all missing parameters"),Add_optional_parameter_to_0:r(95191,3,"Add_optional_parameter_to_0_95191","Add optional parameter to '{0}'"),Add_optional_parameters_to_0:r(95192,3,"Add_optional_parameters_to_0_95192","Add optional parameters to '{0}'"),Add_all_optional_parameters:r(95193,3,"Add_all_optional_parameters_95193","Add all optional parameters"),Wrap_in_parentheses:r(95194,3,"Wrap_in_parentheses_95194","Wrap in parentheses"),Wrap_all_invalid_decorator_expressions_in_parentheses:r(95195,3,"Wrap_all_invalid_decorator_expressions_in_parentheses_95195","Wrap all invalid decorator expressions in parentheses"),Add_resolution_mode_import_attribute:r(95196,3,"Add_resolution_mode_import_attribute_95196","Add 'resolution-mode' import attribute"),Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it:r(95197,3,"Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it_95197","Add 'resolution-mode' import attribute to all type-only imports that need it"),No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer:r(18004,1,"No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004","No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),Classes_may_not_have_a_field_named_constructor:r(18006,1,"Classes_may_not_have_a_field_named_constructor_18006","Classes may not have a field named 'constructor'."),JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array:r(18007,1,"JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007","JSX expressions may not use the comma operator. Did you mean to write an array?"),Private_identifiers_cannot_be_used_as_parameters:r(18009,1,"Private_identifiers_cannot_be_used_as_parameters_18009","Private identifiers cannot be used as parameters."),An_accessibility_modifier_cannot_be_used_with_a_private_identifier:r(18010,1,"An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010","An accessibility modifier cannot be used with a private identifier."),The_operand_of_a_delete_operator_cannot_be_a_private_identifier:r(18011,1,"The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011","The operand of a 'delete' operator cannot be a private identifier."),constructor_is_a_reserved_word:r(18012,1,"constructor_is_a_reserved_word_18012","'#constructor' is a reserved word."),Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier:r(18013,1,"Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013","Property '{0}' is not accessible outside class '{1}' because it has a private identifier."),The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling:r(18014,1,"The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014","The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling."),Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2:r(18015,1,"Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015","Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'."),Private_identifiers_are_not_allowed_outside_class_bodies:r(18016,1,"Private_identifiers_are_not_allowed_outside_class_bodies_18016","Private identifiers are not allowed outside class bodies."),The_shadowing_declaration_of_0_is_defined_here:r(18017,1,"The_shadowing_declaration_of_0_is_defined_here_18017","The shadowing declaration of '{0}' is defined here"),The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here:r(18018,1,"The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018","The declaration of '{0}' that you probably intended to use is defined here"),_0_modifier_cannot_be_used_with_a_private_identifier:r(18019,1,"_0_modifier_cannot_be_used_with_a_private_identifier_18019","'{0}' modifier cannot be used with a private identifier."),An_enum_member_cannot_be_named_with_a_private_identifier:r(18024,1,"An_enum_member_cannot_be_named_with_a_private_identifier_18024","An enum member cannot be named with a private identifier."),can_only_be_used_at_the_start_of_a_file:r(18026,1,"can_only_be_used_at_the_start_of_a_file_18026","'#!' can only be used at the start of a file."),Compiler_reserves_name_0_when_emitting_private_identifier_downlevel:r(18027,1,"Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027","Compiler reserves name '{0}' when emitting private identifier downlevel."),Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher:r(18028,1,"Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028","Private identifiers are only available when targeting ECMAScript 2015 and higher."),Private_identifiers_are_not_allowed_in_variable_declarations:r(18029,1,"Private_identifiers_are_not_allowed_in_variable_declarations_18029","Private identifiers are not allowed in variable declarations."),An_optional_chain_cannot_contain_private_identifiers:r(18030,1,"An_optional_chain_cannot_contain_private_identifiers_18030","An optional chain cannot contain private identifiers."),The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents:r(18031,1,"The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031","The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents."),The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some:r(18032,1,"The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032","The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some."),Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values:r(18033,1,"Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values_18033","Type '{0}' is not assignable to type '{1}' as required for computed enum member values."),Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment:r(18034,3,"Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034","Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."),Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name:r(18035,1,"Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035","Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name."),Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator:r(18036,1,"Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036","Class decorators can't be used with static private identifier. Consider removing the experimental decorator."),await_expression_cannot_be_used_inside_a_class_static_block:r(18037,1,"await_expression_cannot_be_used_inside_a_class_static_block_18037","'await' expression cannot be used inside a class static block."),for_await_loops_cannot_be_used_inside_a_class_static_block:r(18038,1,"for_await_loops_cannot_be_used_inside_a_class_static_block_18038","'for await' loops cannot be used inside a class static block."),Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block:r(18039,1,"Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039","Invalid use of '{0}'. It cannot be used inside a class static block."),A_return_statement_cannot_be_used_inside_a_class_static_block:r(18041,1,"A_return_statement_cannot_be_used_inside_a_class_static_block_18041","A 'return' statement cannot be used inside a class static block."),_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation:r(18042,1,"_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042","'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."),Types_cannot_appear_in_export_declarations_in_JavaScript_files:r(18043,1,"Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043","Types cannot appear in export declarations in JavaScript files."),_0_is_automatically_exported_here:r(18044,3,"_0_is_automatically_exported_here_18044","'{0}' is automatically exported here."),Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher:r(18045,1,"Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045","Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."),_0_is_of_type_unknown:r(18046,1,"_0_is_of_type_unknown_18046","'{0}' is of type 'unknown'."),_0_is_possibly_null:r(18047,1,"_0_is_possibly_null_18047","'{0}' is possibly 'null'."),_0_is_possibly_undefined:r(18048,1,"_0_is_possibly_undefined_18048","'{0}' is possibly 'undefined'."),_0_is_possibly_null_or_undefined:r(18049,1,"_0_is_possibly_null_or_undefined_18049","'{0}' is possibly 'null' or 'undefined'."),The_value_0_cannot_be_used_here:r(18050,1,"The_value_0_cannot_be_used_here_18050","The value '{0}' cannot be used here."),Compiler_option_0_cannot_be_given_an_empty_string:r(18051,1,"Compiler_option_0_cannot_be_given_an_empty_string_18051","Compiler option '{0}' cannot be given an empty string."),Its_type_0_is_not_a_valid_JSX_element_type:r(18053,1,"Its_type_0_is_not_a_valid_JSX_element_type_18053","Its type '{0}' is not a valid JSX element type."),await_using_statements_cannot_be_used_inside_a_class_static_block:r(18054,1,"await_using_statements_cannot_be_used_inside_a_class_static_block_18054","'await using' statements cannot be used inside a class static block."),_0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is_enabled:r(18055,1,"_0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is__18055","'{0}' has a string type, but must have syntactically recognizable string syntax when 'isolatedModules' is enabled."),Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is_enabled:r(18056,1,"Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is__18056","Enum member following a non-literal numeric member must have an initializer when 'isolatedModules' is enabled."),String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es2020:r(18057,1,"String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es_18057","String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'.")};function wt(e){return e>=80}function Fy(e){return e===32||wt(e)}var nf={abstract:128,accessor:129,any:133,as:130,asserts:131,assert:132,bigint:163,boolean:136,break:83,case:84,catch:85,class:86,continue:88,const:87,constructor:137,debugger:89,declare:138,default:90,delete:91,do:92,else:93,enum:94,export:95,extends:96,false:97,finally:98,for:99,from:161,function:100,get:139,if:101,implements:119,import:102,in:103,infer:140,instanceof:104,interface:120,intrinsic:141,is:142,keyof:143,let:121,module:144,namespace:145,never:146,new:105,null:106,number:150,object:151,package:122,private:123,protected:124,public:125,override:164,out:147,readonly:148,require:149,global:162,return:107,satisfies:152,set:153,static:126,string:154,super:108,switch:109,symbol:155,this:110,throw:111,true:112,try:113,type:156,typeof:114,undefined:157,unique:158,unknown:159,using:160,var:115,void:116,while:117,with:118,yield:127,async:134,await:135,of:165},Vy=new Map(Object.entries(nf)),Bm=new Map(Object.entries({...nf,"{":19,"}":20,"(":21,")":22,"[":23,"]":24,".":25,"...":26,";":27,",":28,"<":30,">":32,"<=":33,">=":34,"==":35,"!=":36,"===":37,"!==":38,"=>":39,"+":40,"-":41,"**":43,"*":42,"/":44,"%":45,"++":46,"--":47,"<<":48,">":49,">>>":50,"&":51,"|":52,"^":53,"!":54,"~":55,"&&":56,"||":57,"?":58,"??":61,"?.":29,":":59,"=":64,"+=":65,"-=":66,"*=":67,"**=":68,"/=":69,"%=":70,"<<=":71,">>=":72,">>>=":73,"&=":74,"|=":75,"^=":79,"||=":76,"&&=":77,"??=":78,"@":60,"#":63,"`":62})),qm=new Map([[100,1],[103,2],[105,4],[109,8],[115,16],[117,32],[118,64],[121,128]]),Wy=new Map([[1,Q_.RegularExpressionFlagsHasIndices],[16,Q_.RegularExpressionFlagsDotAll],[32,Q_.RegularExpressionFlagsUnicode],[64,Q_.RegularExpressionFlagsUnicodeSets],[128,Q_.RegularExpressionFlagsSticky]]),Gy=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1319,1329,1366,1369,1369,1377,1415,1488,1514,1520,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2208,2208,2210,2220,2308,2361,2365,2365,2384,2384,2392,2401,2417,2423,2425,2431,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3133,3160,3161,3168,3169,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3294,3294,3296,3297,3313,3314,3333,3340,3342,3344,3346,3386,3389,3389,3406,3406,3424,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5905,5920,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6263,6272,6312,6314,6314,6320,6389,6400,6428,6480,6509,6512,6516,6528,6571,6593,6599,6656,6678,6688,6740,6823,6823,6917,6963,6981,6987,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7401,7404,7406,7409,7413,7414,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11823,11823,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42647,42656,42735,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43648,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],Yy=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1319,1329,1366,1369,1369,1377,1415,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1520,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2048,2093,2112,2139,2208,2208,2210,2220,2276,2302,2304,2403,2406,2415,2417,2423,2425,2431,2433,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2902,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3140,3142,3144,3146,3149,3157,3158,3160,3161,3168,3171,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3299,3302,3311,3313,3314,3330,3331,3333,3340,3342,3344,3346,3386,3389,3396,3398,3400,3402,3406,3415,3415,3424,3427,3430,3439,3450,3455,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3769,3771,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5908,5920,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6160,6169,6176,6263,6272,6314,6320,6389,6400,6428,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6617,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6912,6987,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7376,7378,7380,7414,7424,7654,7676,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8204,8205,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,11823,11823,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12442,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42647,42655,42737,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43047,43072,43123,43136,43204,43216,43225,43232,43255,43259,43259,43264,43309,43312,43347,43360,43388,43392,43456,43471,43481,43520,43574,43584,43597,43600,43609,43616,43638,43642,43643,43648,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65062,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],Xy=[65,90,97,122,170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,895,895,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1327,1329,1366,1369,1369,1376,1416,1488,1514,1519,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2144,2154,2160,2183,2185,2190,2208,2249,2308,2361,2365,2365,2384,2384,2392,2401,2417,2432,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2556,2556,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2809,2809,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3129,3133,3133,3160,3162,3165,3165,3168,3169,3200,3200,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3293,3294,3296,3297,3313,3314,3332,3340,3342,3344,3346,3386,3389,3389,3406,3406,3412,3414,3423,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5109,5112,5117,5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888,5905,5919,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6264,6272,6312,6314,6314,6320,6389,6400,6430,6480,6509,6512,6516,6528,6571,6576,6601,6656,6678,6688,6740,6823,6823,6917,6963,6981,6988,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7296,7304,7312,7354,7357,7359,7401,7404,7406,7411,7413,7414,7418,7418,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12443,12447,12449,12538,12540,12543,12549,12591,12593,12686,12704,12735,12784,12799,13312,19903,19968,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42653,42656,42735,42775,42783,42786,42888,42891,42954,42960,42961,42963,42963,42965,42969,42994,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43261,43262,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43488,43492,43494,43503,43514,43518,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43646,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43824,43866,43868,43881,43888,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,65856,65908,66176,66204,66208,66256,66304,66335,66349,66378,66384,66421,66432,66461,66464,66499,66504,66511,66513,66517,66560,66717,66736,66771,66776,66811,66816,66855,66864,66915,66928,66938,66940,66954,66956,66962,66964,66965,66967,66977,66979,66993,66995,67001,67003,67004,67072,67382,67392,67413,67424,67431,67456,67461,67463,67504,67506,67514,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096,68096,68112,68115,68117,68119,68121,68149,68192,68220,68224,68252,68288,68295,68297,68324,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680,68736,68786,68800,68850,68864,68899,69248,69289,69296,69297,69376,69404,69415,69415,69424,69445,69488,69505,69552,69572,69600,69622,69635,69687,69745,69746,69749,69749,69763,69807,69840,69864,69891,69926,69956,69956,69959,69959,69968,70002,70006,70006,70019,70066,70081,70084,70106,70106,70108,70108,70144,70161,70163,70187,70207,70208,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312,70320,70366,70405,70412,70415,70416,70419,70440,70442,70448,70450,70451,70453,70457,70461,70461,70480,70480,70493,70497,70656,70708,70727,70730,70751,70753,70784,70831,70852,70853,70855,70855,71040,71086,71128,71131,71168,71215,71236,71236,71296,71338,71352,71352,71424,71450,71488,71494,71680,71723,71840,71903,71935,71942,71945,71945,71948,71955,71957,71958,71960,71983,71999,71999,72001,72001,72096,72103,72106,72144,72161,72161,72163,72163,72192,72192,72203,72242,72250,72250,72272,72272,72284,72329,72349,72349,72368,72440,72704,72712,72714,72750,72768,72768,72818,72847,72960,72966,72968,72969,72971,73008,73030,73030,73056,73061,73063,73064,73066,73097,73112,73112,73440,73458,73474,73474,73476,73488,73490,73523,73648,73648,73728,74649,74752,74862,74880,75075,77712,77808,77824,78895,78913,78918,82944,83526,92160,92728,92736,92766,92784,92862,92880,92909,92928,92975,92992,92995,93027,93047,93053,93071,93760,93823,93952,94026,94032,94032,94099,94111,94176,94177,94179,94179,94208,100343,100352,101589,101632,101640,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,113664,113770,113776,113788,113792,113800,113808,113817,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770,120772,120779,122624,122654,122661,122666,122928,122989,123136,123180,123191,123197,123214,123214,123536,123565,123584,123627,124112,124139,124896,124902,124904,124907,124909,124910,124912,124926,124928,125124,125184,125251,125259,125259,126464,126467,126469,126495,126497,126498,126500,126500,126503,126503,126505,126514,126516,126519,126521,126521,126523,126523,126530,126530,126535,126535,126537,126537,126539,126539,126541,126543,126545,126546,126548,126548,126551,126551,126553,126553,126555,126555,126557,126557,126559,126559,126561,126562,126564,126564,126567,126570,126572,126578,126580,126583,126585,126588,126590,126590,126592,126601,126603,126619,126625,126627,126629,126633,126635,126651,131072,173791,173824,177977,177984,178205,178208,183969,183984,191456,191472,192093,194560,195101,196608,201546,201552,205743],Hy=[48,57,65,90,95,95,97,122,170,170,181,181,183,183,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,895,895,902,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1327,1329,1366,1369,1369,1376,1416,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1519,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2045,2045,2048,2093,2112,2139,2144,2154,2160,2183,2185,2190,2200,2273,2275,2403,2406,2415,2417,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2556,2556,2558,2558,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2809,2815,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2901,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3072,3084,3086,3088,3090,3112,3114,3129,3132,3140,3142,3144,3146,3149,3157,3158,3160,3162,3165,3165,3168,3171,3174,3183,3200,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3293,3294,3296,3299,3302,3311,3313,3315,3328,3340,3342,3344,3346,3396,3398,3400,3402,3406,3412,3415,3423,3427,3430,3439,3450,3455,3457,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3558,3567,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3773,3776,3780,3782,3782,3784,3790,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4969,4977,4992,5007,5024,5109,5112,5117,5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888,5909,5919,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6159,6169,6176,6264,6272,6314,6320,6389,6400,6430,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6618,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6832,6845,6847,6862,6912,6988,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7296,7304,7312,7354,7357,7359,7376,7378,7380,7418,7424,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8204,8205,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12447,12449,12543,12549,12591,12593,12686,12704,12735,12784,12799,13312,19903,19968,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42737,42775,42783,42786,42888,42891,42954,42960,42961,42963,42963,42965,42969,42994,43047,43052,43052,43072,43123,43136,43205,43216,43225,43232,43255,43259,43259,43261,43309,43312,43347,43360,43388,43392,43456,43471,43481,43488,43518,43520,43574,43584,43597,43600,43609,43616,43638,43642,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43824,43866,43868,43881,43888,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65071,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65381,65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,65856,65908,66045,66045,66176,66204,66208,66256,66272,66272,66304,66335,66349,66378,66384,66426,66432,66461,66464,66499,66504,66511,66513,66517,66560,66717,66720,66729,66736,66771,66776,66811,66816,66855,66864,66915,66928,66938,66940,66954,66956,66962,66964,66965,66967,66977,66979,66993,66995,67001,67003,67004,67072,67382,67392,67413,67424,67431,67456,67461,67463,67504,67506,67514,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096,68099,68101,68102,68108,68115,68117,68119,68121,68149,68152,68154,68159,68159,68192,68220,68224,68252,68288,68295,68297,68326,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680,68736,68786,68800,68850,68864,68903,68912,68921,69248,69289,69291,69292,69296,69297,69373,69404,69415,69415,69424,69456,69488,69509,69552,69572,69600,69622,69632,69702,69734,69749,69759,69818,69826,69826,69840,69864,69872,69881,69888,69940,69942,69951,69956,69959,69968,70003,70006,70006,70016,70084,70089,70092,70094,70106,70108,70108,70144,70161,70163,70199,70206,70209,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312,70320,70378,70384,70393,70400,70403,70405,70412,70415,70416,70419,70440,70442,70448,70450,70451,70453,70457,70459,70468,70471,70472,70475,70477,70480,70480,70487,70487,70493,70499,70502,70508,70512,70516,70656,70730,70736,70745,70750,70753,70784,70853,70855,70855,70864,70873,71040,71093,71096,71104,71128,71133,71168,71232,71236,71236,71248,71257,71296,71352,71360,71369,71424,71450,71453,71467,71472,71481,71488,71494,71680,71738,71840,71913,71935,71942,71945,71945,71948,71955,71957,71958,71960,71989,71991,71992,71995,72003,72016,72025,72096,72103,72106,72151,72154,72161,72163,72164,72192,72254,72263,72263,72272,72345,72349,72349,72368,72440,72704,72712,72714,72758,72760,72768,72784,72793,72818,72847,72850,72871,72873,72886,72960,72966,72968,72969,72971,73014,73018,73018,73020,73021,73023,73031,73040,73049,73056,73061,73063,73064,73066,73102,73104,73105,73107,73112,73120,73129,73440,73462,73472,73488,73490,73530,73534,73538,73552,73561,73648,73648,73728,74649,74752,74862,74880,75075,77712,77808,77824,78895,78912,78933,82944,83526,92160,92728,92736,92766,92768,92777,92784,92862,92864,92873,92880,92909,92912,92916,92928,92982,92992,92995,93008,93017,93027,93047,93053,93071,93760,93823,93952,94026,94031,94087,94095,94111,94176,94177,94179,94180,94192,94193,94208,100343,100352,101589,101632,101640,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,113664,113770,113776,113788,113792,113800,113808,113817,113821,113822,118528,118573,118576,118598,119141,119145,119149,119154,119163,119170,119173,119179,119210,119213,119362,119364,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770,120772,120779,120782,120831,121344,121398,121403,121452,121461,121461,121476,121476,121499,121503,121505,121519,122624,122654,122661,122666,122880,122886,122888,122904,122907,122913,122915,122916,122918,122922,122928,122989,123023,123023,123136,123180,123184,123197,123200,123209,123214,123214,123536,123566,123584,123641,124112,124153,124896,124902,124904,124907,124909,124910,124912,124926,124928,125124,125136,125142,125184,125259,125264,125273,126464,126467,126469,126495,126497,126498,126500,126500,126503,126503,126505,126514,126516,126519,126521,126521,126523,126523,126530,126530,126535,126535,126537,126537,126539,126539,126541,126543,126545,126546,126548,126548,126551,126551,126553,126553,126555,126555,126557,126557,126559,126559,126561,126562,126564,126564,126567,126570,126572,126578,126580,126583,126585,126588,126590,126590,126592,126601,126603,126619,126625,126627,126629,126633,126635,126651,130032,130041,131072,173791,173824,177977,177984,178205,178208,183969,183984,191456,191472,192093,194560,195101,196608,201546,201552,205743,917760,917999],$y=/^\/\/\/?\s*@(ts-expect-error|ts-ignore)/,Qy=/^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/,Ky=/@(?:see|link)/i;function dl(e,t){if(e=2?dl(e,Xy):dl(e,Gy)}function eg(e,t){return t>=2?dl(e,Hy):dl(e,Yy)}function zm(e){let t=[];return e.forEach((a,o)=>{t[a]=o}),t}var tg=zm(Bm);function it(e){return tg[e]}function Fm(e){return Bm.get(e)}var z4=zm(qm);function Pd(e){return qm.get(e)}function Vm(e){let t=[],a=0,o=0;for(;a127&&Cn(m)&&(t.push(o),o=a);break}}return t.push(o),t}function ng(e,t,a,o,m){(t<0||t>=e.length)&&(m?t=t<0?0:t>=e.length?e.length-1:t:B.fail(`Bad line number. Line: ${t}, lineStarts.length: ${e.length} , line map is correct? ${o!==void 0?_y(e,Vm(o)):"unknown"}`));let v=e[t]+a;return m?v>e[t+1]?e[t+1]:typeof o=="string"&&v>o.length?o.length:v:(t=8192&&e<=8203||e===8239||e===8287||e===12288||e===65279}function Cn(e){return e===10||e===13||e===8232||e===8233}function fi(e){return e>=48&&e<=57}function vp(e){return fi(e)||e>=65&&e<=70||e>=97&&e<=102}function rf(e){return e>=65&&e<=90||e>=97&&e<=122}function Gm(e){return rf(e)||fi(e)||e===95}function Tp(e){return e>=48&&e<=55}function Ar(e,t,a,o,m){if(fs(t))return t;let v=!1;for(;;){let A=e.charCodeAt(t);switch(A){case 13:e.charCodeAt(t+1)===10&&t++;case 10:if(t++,a)return t;v=!!m;continue;case 9:case 11:case 12:case 32:t++;continue;case 47:if(o)break;if(e.charCodeAt(t+1)===47){for(t+=2;t127&&Ba(A)){t++;continue}break}return t}}var sl=7;function Wi(e,t){if(B.assert(t>=0),t===0||Cn(e.charCodeAt(t-1))){let a=e.charCodeAt(t);if(t+sl=0&&a127&&Ba(I)){y&&Cn(I)&&(h=!0),a++;continue}break e}}return y&&(x=m(P,l,Q,h,v,x)),x}function Hm(e,t,a,o){return xl(!1,e,t,!1,a,o)}function $m(e,t,a,o){return xl(!1,e,t,!0,a,o)}function ag(e,t,a,o,m){return xl(!0,e,t,!1,a,o,m)}function _g(e,t,a,o,m){return xl(!0,e,t,!0,a,o,m)}function Qm(e,t,a,o,m,v=[]){return v.push({kind:a,pos:e,end:t,hasTrailingNewLine:o}),v}function Jp(e,t){return ag(e,t,Qm,void 0,void 0)}function sg(e,t){return _g(e,t,Qm,void 0,void 0)}function _f(e){let t=af.exec(e);if(t)return t[0]}function Zn(e,t){return rf(e)||e===36||e===95||e>127&&Zy(e,t)}function Er(e,t,a){return Gm(e)||e===36||(a===1?e===45||e===58:!1)||e>127&&eg(e,t)}function og(e,t,a){let o=Gi(e,0);if(!Zn(o,t))return!1;for(let m=Ft(o);mh,getStartPos:()=>h,getTokenEnd:()=>l,getTextPos:()=>l,getToken:()=>g,getTokenStart:()=>y,getTokenPos:()=>y,getTokenText:()=>P.substring(y,l),getTokenValue:()=>x,hasUnicodeEscape:()=>(I&1024)!==0,hasExtendedUnicodeEscape:()=>(I&8)!==0,hasPrecedingLineBreak:()=>(I&1)!==0,hasPrecedingJSDocComment:()=>(I&2)!==0,hasPrecedingJSDocLeadingAsterisks:()=>(I&32768)!==0,isIdentifier:()=>g===80||g>118,isReservedWord:()=>g>=83&&g<=118,isUnterminated:()=>(I&4)!==0,getCommentDirectives:()=>re,getNumericLiteralFlags:()=>I&25584,getTokenFlags:()=>I,reScanGreaterToken:lt,reScanAsteriskEqualsToken:ar,reScanSlashToken:mt,reScanTemplateToken:Bt,reScanTemplateHeadOrNoSubstitutionTemplate:rn,scanJsxIdentifier:Nr,scanJsxAttributeValue:Vn,reScanJsxAttributeValue:Ce,reScanJsxToken:_r,reScanLessThanToken:fr,reScanHashToken:dr,reScanQuestionToken:zn,reScanInvalidIdentifier:Ut,scanJsxToken:Fn,scanJsDocToken:L,scanJSDocCommentTextToken:mr,scan:ct,getText:Ke,clearCommentDirectives:st,setText:Dt,setScriptTarget:ut,setLanguageVariant:Ir,setScriptKind:hr,setJSDocParsingMode:Mn,setOnError:Tt,resetTokenState:Wn,setTextPos:Wn,setSkipJsDocLeadingAsterisks:Si,tryScan:He,lookAhead:Te,scanRange:fe};return B.isDebugging&&Object.defineProperty(M,"__debugShowCurrentPositionInText",{get:()=>{let R=M.getText();return R.slice(0,M.getTokenFullStart())+"\u2551"+R.slice(M.getTokenFullStart())}}),M;function ae(R){return Gi(P,R)}function Oe(R){return R>=0&&R=0&&R=65&&be<=70)be+=32;else if(!(be>=48&&be<=57||be>=97&&be<=102))break;xe.push(be),l++,we=!1}return xe.length=Q){K+=P.substring(xe,l),I|=4,W(E.Unterminated_string_literal);break}let Se=V(l);if(Se===$){K+=P.substring(xe,l),l++;break}if(Se===92&&!R){K+=P.substring(xe,l),K+=Ot(3),xe=l;continue}if((Se===10||Se===13)&&!R){K+=P.substring(xe,l),I|=4,W(E.Unterminated_string_literal);break}l++}return K}function Pr(R){let $=V(l)===96;l++;let K=l,xe="",Se;for(;;){if(l>=Q){xe+=P.substring(K,l),I|=4,W(E.Unterminated_template_literal),Se=$?15:18;break}let we=V(l);if(we===96){xe+=P.substring(K,l),l++,Se=$?15:18;break}if(we===36&&l+1=Q)return W(E.Unexpected_end_of_text),"";let K=V(l);switch(l++,K){case 48:if(l>=Q||!fi(V(l)))return"\0";case 49:case 50:case 51:l=55296&&xe<=56319&&l+6=56320&&We<=57343)return l=be,Se+String.fromCharCode(We)}return Se;case 120:for(;l<$+4;l++)if(!(l1114111&&(R&&W(E.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive,K,l-K),we=!0),l>=Q?(R&&W(E.Unexpected_end_of_text),we=!0):V(l)===125?l++:(R&&W(E.Unterminated_Unicode_escape_sequence),we=!0),we?(I|=2048,P.substring($,l)):(I|=8,Nd(Se))}function On(){if(l+5=0&&Er(K,e)){R+=Bn(!0),$=l;continue}if(K=On(),!(K>=0&&Er(K,e)))break;I|=1024,R+=P.substring($,l),R+=Nd(K),l+=6,$=l}else break}return R+=P.substring($,l),R}function Qe(){let R=x.length;if(R>=2&&R<=12){let $=x.charCodeAt(0);if($>=97&&$<=122){let K=Vy.get(x);if(K!==void 0)return g=K}}return g=80}function qn(R){let $="",K=!1,xe=!1;for(;;){let Se=V(l);if(Se===95){I|=512,K?(K=!1,xe=!0):W(xe?E.Multiple_consecutive_numeric_separators_are_not_permitted:E.Numeric_separators_are_not_allowed_here,l,1),l++;continue}if(K=!0,!fi(Se)||Se-48>=R)break;$+=P[l],l++,xe=!1}return V(l-1)===95&&W(E.Numeric_separators_are_not_allowed_here,l-1,1),$}function $t(){return V(l)===110?(x+="n",I&384&&(x=bb(x)+"n"),l++,10):(x=""+(I&128?parseInt(x.slice(2),2):I&256?parseInt(x.slice(2),8):+x),9)}function ct(){for(h=l,I=0;;){if(y=l,l>=Q)return g=1;let R=ae(l);if(l===0&&R===35&&Ym(P,l)){if(l=Xm(P,l),t)continue;return g=6}switch(R){case 10:case 13:if(I|=1,t){l++;continue}else return R===13&&l+1=0&&Zn($,e))return x=Bn(!0)+vt(),g=Qe();let K=On();return K>=0&&Zn(K,e)?(l+=6,I|=1024,x=String.fromCharCode(K)+vt(),g=Qe()):(W(E.Invalid_character),l++,g=0);case 35:if(l!==0&&P[l+1]==="!")return W(E.can_only_be_used_at_the_start_of_a_file,l,2),l++,g=0;let xe=ae(l+1);if(xe===92){l++;let be=Mt();if(be>=0&&Zn(be,e))return x="#"+Bn(!0)+vt(),g=81;let We=On();if(We>=0&&Zn(We,e))return l+=6,I|=1024,x="#"+String.fromCharCode(We)+vt(),g=81;l--}return Zn(xe,e)?(l++,Jt(xe,e)):(x="#",W(E.Invalid_character,l++,Ft(R))),g=81;case 65533:return W(E.File_appears_to_be_binary,0,0),l=Q,g=8;default:let Se=Jt(R,e);if(Se)return g=Se;if(rs(R)){l+=Ft(R);continue}else if(Cn(R)){I|=1,l+=Ft(R);continue}let we=Ft(R);return W(E.Invalid_character,l,we),l+=we,g=0}}}function _t(){switch(de){case 0:return!0;case 1:return!1}return ye!==3&&ye!==4?!0:de===3?!1:Ky.test(P.slice(h,l))}function Ut(){B.assert(g===0,"'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'."),l=y=h,I=0;let R=ae(l),$=Jt(R,99);return $?g=$:(l+=Ft(R),g)}function Jt(R,$){let K=R;if(Zn(K,$)){for(l+=Ft(K);l=Q)return g=1;let $=V(l);if($===60)return V(l+1)===47?(l+=2,g=31):(l++,g=30);if($===123)return l++,g=19;let K=0;for(;l0)break;Ba($)||(K=l)}l++}return x=P.substring(h,l),K===-1?13:12}function Nr(){if(wt(g)){for(;l=Q)return g=1;for(let $=V(l);l=0&&rs(V(l-1))&&!(l+1=Q)return g=1;let R=ae(l);switch(l+=Ft(R),R){case 9:case 11:case 12:case 32:for(;l=0&&Zn($,e))return x=Bn(!0)+vt(),g=Qe();let K=On();return K>=0&&Zn(K,e)?(l+=6,I|=1024,x=String.fromCharCode(K)+vt(),g=Qe()):(l++,g=0)}if(Zn(R,e)){let $=R;for(;l=0),l=R,h=R,y=R,g=0,x=void 0,I=0}function Si(R){he+=R?1:-1}}function Gi(e,t){return e.codePointAt(t)}function Ft(e){return e>=65536?2:e===-1?0:1}function cg(e){if(B.assert(0<=e&&e<=1114111),e<=65535)return String.fromCharCode(e);let t=Math.floor((e-65536)/1024)+55296,a=(e-65536)%1024+56320;return String.fromCharCode(t,a)}var lg=String.fromCodePoint?e=>String.fromCodePoint(e):cg;function Nd(e){return lg(e)}var Id=new Map(Object.entries({General_Category:"General_Category",gc:"General_Category",Script:"Script",sc:"Script",Script_Extensions:"Script_Extensions",scx:"Script_Extensions"})),Od=new Set(["ASCII","ASCII_Hex_Digit","AHex","Alphabetic","Alpha","Any","Assigned","Bidi_Control","Bidi_C","Bidi_Mirrored","Bidi_M","Case_Ignorable","CI","Cased","Changes_When_Casefolded","CWCF","Changes_When_Casemapped","CWCM","Changes_When_Lowercased","CWL","Changes_When_NFKC_Casefolded","CWKCF","Changes_When_Titlecased","CWT","Changes_When_Uppercased","CWU","Dash","Default_Ignorable_Code_Point","DI","Deprecated","Dep","Diacritic","Dia","Emoji","Emoji_Component","EComp","Emoji_Modifier","EMod","Emoji_Modifier_Base","EBase","Emoji_Presentation","EPres","Extended_Pictographic","ExtPict","Extender","Ext","Grapheme_Base","Gr_Base","Grapheme_Extend","Gr_Ext","Hex_Digit","Hex","IDS_Binary_Operator","IDSB","IDS_Trinary_Operator","IDST","ID_Continue","IDC","ID_Start","IDS","Ideographic","Ideo","Join_Control","Join_C","Logical_Order_Exception","LOE","Lowercase","Lower","Math","Noncharacter_Code_Point","NChar","Pattern_Syntax","Pat_Syn","Pattern_White_Space","Pat_WS","Quotation_Mark","QMark","Radical","Regional_Indicator","RI","Sentence_Terminal","STerm","Soft_Dotted","SD","Terminal_Punctuation","Term","Unified_Ideograph","UIdeo","Uppercase","Upper","Variation_Selector","VS","White_Space","space","XID_Continue","XIDC","XID_Start","XIDS"]),Md=new Set(["Basic_Emoji","Emoji_Keycap_Sequence","RGI_Emoji_Modifier_Sequence","RGI_Emoji_Flag_Sequence","RGI_Emoji_Tag_Sequence","RGI_Emoji_ZWJ_Sequence","RGI_Emoji"]),Ra={General_Category:new Set(["C","Other","Cc","Control","cntrl","Cf","Format","Cn","Unassigned","Co","Private_Use","Cs","Surrogate","L","Letter","LC","Cased_Letter","Ll","Lowercase_Letter","Lm","Modifier_Letter","Lo","Other_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter","M","Mark","Combining_Mark","Mc","Spacing_Mark","Me","Enclosing_Mark","Mn","Nonspacing_Mark","N","Number","Nd","Decimal_Number","digit","Nl","Letter_Number","No","Other_Number","P","Punctuation","punct","Pc","Connector_Punctuation","Pd","Dash_Punctuation","Pe","Close_Punctuation","Pf","Final_Punctuation","Pi","Initial_Punctuation","Po","Other_Punctuation","Ps","Open_Punctuation","S","Symbol","Sc","Currency_Symbol","Sk","Modifier_Symbol","Sm","Math_Symbol","So","Other_Symbol","Z","Separator","Zl","Line_Separator","Zp","Paragraph_Separator","Zs","Space_Separator"]),Script:new Set(["Adlm","Adlam","Aghb","Caucasian_Albanian","Ahom","Arab","Arabic","Armi","Imperial_Aramaic","Armn","Armenian","Avst","Avestan","Bali","Balinese","Bamu","Bamum","Bass","Bassa_Vah","Batk","Batak","Beng","Bengali","Bhks","Bhaiksuki","Bopo","Bopomofo","Brah","Brahmi","Brai","Braille","Bugi","Buginese","Buhd","Buhid","Cakm","Chakma","Cans","Canadian_Aboriginal","Cari","Carian","Cham","Cher","Cherokee","Chrs","Chorasmian","Copt","Coptic","Qaac","Cpmn","Cypro_Minoan","Cprt","Cypriot","Cyrl","Cyrillic","Deva","Devanagari","Diak","Dives_Akuru","Dogr","Dogra","Dsrt","Deseret","Dupl","Duployan","Egyp","Egyptian_Hieroglyphs","Elba","Elbasan","Elym","Elymaic","Ethi","Ethiopic","Geor","Georgian","Glag","Glagolitic","Gong","Gunjala_Gondi","Gonm","Masaram_Gondi","Goth","Gothic","Gran","Grantha","Grek","Greek","Gujr","Gujarati","Guru","Gurmukhi","Hang","Hangul","Hani","Han","Hano","Hanunoo","Hatr","Hatran","Hebr","Hebrew","Hira","Hiragana","Hluw","Anatolian_Hieroglyphs","Hmng","Pahawh_Hmong","Hmnp","Nyiakeng_Puachue_Hmong","Hrkt","Katakana_Or_Hiragana","Hung","Old_Hungarian","Ital","Old_Italic","Java","Javanese","Kali","Kayah_Li","Kana","Katakana","Kawi","Khar","Kharoshthi","Khmr","Khmer","Khoj","Khojki","Kits","Khitan_Small_Script","Knda","Kannada","Kthi","Kaithi","Lana","Tai_Tham","Laoo","Lao","Latn","Latin","Lepc","Lepcha","Limb","Limbu","Lina","Linear_A","Linb","Linear_B","Lisu","Lyci","Lycian","Lydi","Lydian","Mahj","Mahajani","Maka","Makasar","Mand","Mandaic","Mani","Manichaean","Marc","Marchen","Medf","Medefaidrin","Mend","Mende_Kikakui","Merc","Meroitic_Cursive","Mero","Meroitic_Hieroglyphs","Mlym","Malayalam","Modi","Mong","Mongolian","Mroo","Mro","Mtei","Meetei_Mayek","Mult","Multani","Mymr","Myanmar","Nagm","Nag_Mundari","Nand","Nandinagari","Narb","Old_North_Arabian","Nbat","Nabataean","Newa","Nkoo","Nko","Nshu","Nushu","Ogam","Ogham","Olck","Ol_Chiki","Orkh","Old_Turkic","Orya","Oriya","Osge","Osage","Osma","Osmanya","Ougr","Old_Uyghur","Palm","Palmyrene","Pauc","Pau_Cin_Hau","Perm","Old_Permic","Phag","Phags_Pa","Phli","Inscriptional_Pahlavi","Phlp","Psalter_Pahlavi","Phnx","Phoenician","Plrd","Miao","Prti","Inscriptional_Parthian","Rjng","Rejang","Rohg","Hanifi_Rohingya","Runr","Runic","Samr","Samaritan","Sarb","Old_South_Arabian","Saur","Saurashtra","Sgnw","SignWriting","Shaw","Shavian","Shrd","Sharada","Sidd","Siddham","Sind","Khudawadi","Sinh","Sinhala","Sogd","Sogdian","Sogo","Old_Sogdian","Sora","Sora_Sompeng","Soyo","Soyombo","Sund","Sundanese","Sylo","Syloti_Nagri","Syrc","Syriac","Tagb","Tagbanwa","Takr","Takri","Tale","Tai_Le","Talu","New_Tai_Lue","Taml","Tamil","Tang","Tangut","Tavt","Tai_Viet","Telu","Telugu","Tfng","Tifinagh","Tglg","Tagalog","Thaa","Thaana","Thai","Tibt","Tibetan","Tirh","Tirhuta","Tnsa","Tangsa","Toto","Ugar","Ugaritic","Vaii","Vai","Vith","Vithkuqi","Wara","Warang_Citi","Wcho","Wancho","Xpeo","Old_Persian","Xsux","Cuneiform","Yezi","Yezidi","Yiii","Yi","Zanb","Zanabazar_Square","Zinh","Inherited","Qaai","Zyyy","Common","Zzzz","Unknown"]),Script_Extensions:void 0};Ra.Script_Extensions=Ra.Script;function wr(e){return e.start+e.length}function ug(e){return e.length===0}function of(e,t){if(e<0)throw new Error("start < 0");if(t<0)throw new Error("length < 0");return{start:e,length:t}}function pg(e,t){return of(e,t-e)}function K_(e){return of(e.span.start,e.newLength)}function fg(e){return ug(e.span)&&e.newLength===0}function Km(e,t){if(t<0)throw new Error("newLength < 0");return{span:e,newLength:t}}var F4=Km(of(0,0),0);function cf(e,t){for(;e;){let a=t(e);if(a==="quit")return;if(a)return e;e=e.parent}}function ml(e){return(e.flags&16)===0}function dg(e,t){if(e===void 0||ml(e))return e;for(e=e.original;e;){if(ml(e))return!t||t(e)?e:void 0;e=e.original}}function Ja(e){return e.length>=2&&e.charCodeAt(0)===95&&e.charCodeAt(1)===95?"_"+e:e}function cs(e){let t=e;return t.length>=3&&t.charCodeAt(0)===95&&t.charCodeAt(1)===95&&t.charCodeAt(2)===95?t.substr(1):t}function Pn(e){return cs(e.escapedText)}function Sl(e){let t=Fm(e.escapedText);return t?by(t,di):void 0}function Lp(e){return e.valueDeclaration&&Lg(e.valueDeclaration)?Pn(e.valueDeclaration.name):cs(e.escapedName)}function Zm(e){let t=e.parent.parent;if(t){if(jd(t))return Zc(t);switch(t.kind){case 243:if(t.declarationList&&t.declarationList.declarations[0])return Zc(t.declarationList.declarations[0]);break;case 244:let a=t.expression;switch(a.kind===226&&a.operatorToken.kind===64&&(a=a.left),a.kind){case 211:return a.name;case 212:let o=a.argumentExpression;if(tt(o))return o}break;case 217:return Zc(t.expression);case 256:{if(jd(t.statement)||u1(t.statement))return Zc(t.statement);break}}}}function Zc(e){let t=e1(e);return t&&tt(t)?t:void 0}function mg(e){return e.name||Zm(e)}function hg(e){return!!e.name}function lf(e){switch(e.kind){case 80:return e;case 348:case 341:{let{name:a}=e;if(a.kind===166)return a.right;break}case 213:case 226:{let a=e;switch(yf(a)){case 1:case 4:case 5:case 3:return gf(a.left);case 7:case 8:case 9:return a.arguments[1];default:return}}case 346:return mg(e);case 340:return Zm(e);case 277:{let{expression:a}=e;return tt(a)?a:void 0}case 212:let t=e;if(g1(t))return t.argumentExpression}return e.name}function e1(e){if(e!==void 0)return lf(e)||(Mf(e)||Jf(e)||bl(e)?yg(e):void 0)}function yg(e){if(e.parent){if(nh(e.parent)||V1(e.parent))return e.parent.name;if(Zi(e.parent)&&e===e.parent.right){if(tt(e.parent.left))return e.parent.left;if(w1(e.parent.left))return gf(e.parent.left)}else if(Lf(e.parent)&&tt(e.parent.name))return e.parent.name}else return}function uf(e){if(q2(e))return Gr(e.modifiers,El)}function t1(e){if(bs(e,98303))return Gr(e.modifiers,Ug)}function n1(e,t){if(e.name)if(tt(e.name)){let a=e.name.escapedText;return ls(e.parent,t).filter(o=>Fp(o)&&tt(o.name)&&o.name.escapedText===a)}else{let a=e.parent.parameters.indexOf(e);B.assert(a>-1,"Parameters should always be in their parents' parameter list");let o=ls(e.parent,t).filter(Fp);if(aoh(o)&&o.typeParameters.some(m=>m.name.escapedText===a))}function vg(e){return r1(e,!1)}function Tg(e){return r1(e,!0)}function xg(e){return bi(e,i6)}function Sg(e){return Ng(e,f6)}function wg(e){return bi(e,a6,!0)}function kg(e){return bi(e,_6,!0)}function Eg(e){return bi(e,s6,!0)}function Ag(e){return bi(e,o6,!0)}function Cg(e){return bi(e,c6,!0)}function Dg(e){return bi(e,u6,!0)}function Pg(e){let t=bi(e,Ff);if(t&&t.typeExpression&&t.typeExpression.type)return t}function ls(e,t){var a;if(!bf(e))return bt;let o=(a=e.jsDoc)==null?void 0:a.jsDocCache;if(o===void 0||t){let m=k2(e,t);B.assert(m.length<2||m[0]!==m[1]),o=Am(m,v=>sh(v)?v.tags:v),t||(e.jsDoc??(e.jsDoc=[]),e.jsDoc.jsDocCache=o)}return o}function i1(e){return ls(e,!1)}function bi(e,t,a){return km(ls(e,a),t)}function Ng(e,t){return i1(e).filter(t)}function jp(e){return e.kind===80||e.kind===81}function Ig(e){return Xr(e)&&!!(e.flags&64)}function Og(e){return Xa(e)&&!!(e.flags&64)}function Jd(e){return Of(e)&&!!(e.flags&64)}function pf(e){return Vf(e,8)}function Mg(e){return cl(e)&&!!(e.flags&64)}function ff(e){return e>=166}function df(e){return e>=0&&e<=165}function a1(e){return df(e.kind)}function mi(e){return Cr(e,"pos")&&Cr(e,"end")}function Jg(e){return 9<=e&&e<=15}function Ld(e){return 15<=e&&e<=18}function Ua(e){var t;return tt(e)&&((t=e.emitNode)==null?void 0:t.autoGenerate)!==void 0}function _1(e){var t;return gi(e)&&((t=e.emitNode)==null?void 0:t.autoGenerate)!==void 0}function Lg(e){return(Va(e)||zg(e))&&gi(e.name)}function Wr(e){switch(e){case 128:case 129:case 134:case 87:case 138:case 90:case 95:case 103:case 125:case 123:case 124:case 148:case 126:case 147:case 164:return!0}return!1}function jg(e){return!!(x1(e)&31)}function Rg(e){return jg(e)||e===126||e===164||e===129}function Ug(e){return Wr(e.kind)}function s1(e){let t=e.kind;return t===80||t===81||t===11||t===9||t===167}function mf(e){return!!e&&qg(e.kind)}function Bg(e){switch(e){case 262:case 174:case 176:case 177:case 178:case 218:case 219:return!0;default:return!1}}function qg(e){switch(e){case 173:case 179:case 323:case 180:case 181:case 184:case 317:case 185:return!0;default:return Bg(e)}}function vi(e){return e&&(e.kind===263||e.kind===231)}function zg(e){switch(e.kind){case 174:case 177:case 178:return!0;default:return!1}}function Fg(e){let t=e.kind;return t===303||t===304||t===305||t===174||t===177||t===178}function o1(e){return K2(e.kind)}function Vg(e){if(e){let t=e.kind;return t===207||t===206}return!1}function Wg(e){let t=e.kind;return t===209||t===210}function Gg(e){switch(e.kind){case 260:case 169:case 208:return!0}return!1}function qa(e){return c1(pf(e).kind)}function c1(e){switch(e){case 211:case 212:case 214:case 213:case 284:case 285:case 288:case 215:case 209:case 217:case 210:case 231:case 218:case 80:case 81:case 14:case 9:case 10:case 11:case 15:case 228:case 97:case 106:case 110:case 112:case 108:case 235:case 233:case 236:case 102:case 282:return!0;default:return!1}}function Yg(e){return l1(pf(e).kind)}function l1(e){switch(e){case 224:case 225:case 220:case 221:case 222:case 223:case 216:return!0;default:return c1(e)}}function u1(e){return Xg(pf(e).kind)}function Xg(e){switch(e){case 227:case 229:case 219:case 226:case 230:case 234:case 232:case 356:case 355:case 238:return!0;default:return l1(e)}}function Hg(e){return e===219||e===208||e===263||e===231||e===175||e===176||e===266||e===306||e===281||e===262||e===218||e===177||e===273||e===271||e===276||e===264||e===291||e===174||e===173||e===267||e===270||e===274||e===280||e===169||e===303||e===172||e===171||e===178||e===304||e===265||e===168||e===260||e===346||e===338||e===348||e===202}function p1(e){return e===262||e===282||e===263||e===264||e===265||e===266||e===267||e===272||e===271||e===278||e===277||e===270}function f1(e){return e===252||e===251||e===259||e===246||e===244||e===242||e===249||e===250||e===248||e===245||e===256||e===253||e===255||e===257||e===258||e===243||e===247||e===254||e===353}function jd(e){return e.kind===168?e.parent&&e.parent.kind!==345||ea(e):Hg(e.kind)}function $g(e){let t=e.kind;return f1(t)||p1(t)||Qg(e)}function Qg(e){return e.kind!==241||e.parent!==void 0&&(e.parent.kind===258||e.parent.kind===299)?!1:!p2(e)}function Kg(e){let t=e.kind;return f1(t)||p1(t)||t===241}function d1(e){return e.kind>=309&&e.kind<=351}function Zg(e){return e.kind===320||e.kind===319||e.kind===321||n2(e)||e2(e)||r6(e)||Pl(e)}function e2(e){return e.kind>=327&&e.kind<=351}function el(e){return e.kind===178}function tl(e){return e.kind===177}function Xi(e){if(!bf(e))return!1;let{jsDoc:t}=e;return!!t&&t.length>0}function t2(e){return!!e.initializer}function wl(e){return e.kind===11||e.kind===15}function n2(e){return e.kind===324||e.kind===325||e.kind===326}function Rd(e){return(e.flags&33554432)!==0}var V4=r2();function r2(){var e="";let t=a=>e+=a;return{getText:()=>e,write:t,rawWrite:t,writeKeyword:t,writeOperator:t,writePunctuation:t,writeSpace:t,writeStringLiteral:t,writeLiteral:t,writeParameter:t,writeProperty:t,writeSymbol:(a,o)=>t(a),writeTrailingSemicolon:t,writeComment:t,getTextPos:()=>e.length,getLine:()=>0,getColumn:()=>0,getIndent:()=>0,isAtStartOfLine:()=>!1,hasTrailingComment:()=>!1,hasTrailingWhitespace:()=>!!e.length&&Ba(e.charCodeAt(e.length-1)),writeLine:()=>e+=" ",increaseIndent:Fa,decreaseIndent:Fa,clear:()=>e=""}}function i2(e,t){let a=e.entries();for(let[o,m]of a){let v=t(m,o);if(v)return v}}function a2(e){return e.end-e.pos}function m1(e){return _2(e),(e.flags&1048576)!==0}function _2(e){e.flags&2097152||(((e.flags&262144)!==0||Ht(e,m1))&&(e.flags|=1048576),e.flags|=2097152)}function hi(e){for(;e&&e.kind!==307;)e=e.parent;return e}function Hi(e){return e===void 0?!0:e.pos===e.end&&e.pos>=0&&e.kind!==1}function Rp(e){return!Hi(e)}function hl(e,t,a){if(Hi(e))return e.pos;if(d1(e)||e.kind===12)return Ar((t??hi(e)).text,e.pos,!1,!0);if(a&&Xi(e))return hl(e.jsDoc[0],t);if(e.kind===352){t??(t=hi(e));let o=Xp(ch(e,t));if(o)return hl(o,t,a)}return Ar((t??hi(e)).text,e.pos,!1,!1,f2(e))}function Ud(e,t,a=!1){return is(e.text,t,a)}function s2(e){return!!cf(e,ih)}function is(e,t,a=!1){if(Hi(t))return"";let o=e.substring(a?t.pos:Ar(e,t.pos),t.end);return s2(t)&&(o=o.split(/\r\n|\n|\r/).map(m=>m.replace(/^\s*\*/,"").trimStart()).join(` +`)),o}function za(e){let t=e.emitNode;return t&&t.flags||0}function o2(e,t,a){B.assertGreaterThanOrEqual(t,0),B.assertGreaterThanOrEqual(a,0),B.assertLessThanOrEqual(t,e.length),B.assertLessThanOrEqual(t+a,e.length)}function ol(e){return e.kind===244&&e.expression.kind===11}function hf(e){return!!(za(e)&2097152)}function Bd(e){return hf(e)&&jf(e)}function c2(e){return tt(e.name)&&!e.initializer}function qd(e){return hf(e)&&Ha(e)&&Gp(e.declarationList.declarations,c2)}function l2(e,t){let a=e.kind===169||e.kind===168||e.kind===218||e.kind===219||e.kind===217||e.kind===260||e.kind===281?Yp(sg(t,e.pos),Jp(t,e.pos)):Jp(t,e.pos);return Gr(a,o=>o.end<=e.end&&t.charCodeAt(o.pos+1)===42&&t.charCodeAt(o.pos+2)===42&&t.charCodeAt(o.pos+3)!==47)}function u2(e){if(e)switch(e.kind){case 208:case 306:case 169:case 303:case 172:case 171:case 304:case 260:return!0}return!1}function p2(e){return e&&e.kind===241&&mf(e.parent)}function zd(e){let t=e.kind;return(t===211||t===212)&&e.expression.kind===108}function ea(e){return!!e&&!!(e.flags&524288)}function f2(e){return!!e&&!!(e.flags&16777216)}function d2(e){for(;yl(e,!0);)e=e.right;return e}function m2(e){return tt(e)&&e.escapedText==="exports"}function h2(e){return tt(e)&&e.escapedText==="module"}function h1(e){return(Xr(e)||y1(e))&&h2(e.expression)&&ps(e)==="exports"}function yf(e){let t=g2(e);return t===5||ea(e)?t:0}function y2(e){return ts(e.arguments)===3&&Xr(e.expression)&&tt(e.expression.expression)&&Pn(e.expression.expression)==="Object"&&Pn(e.expression.name)==="defineProperty"&&kl(e.arguments[1])&&us(e.arguments[0],!0)}function y1(e){return Xa(e)&&kl(e.argumentExpression)}function gs(e,t){return Xr(e)&&(!t&&e.expression.kind===110||tt(e.name)&&us(e.expression,!0))||g1(e,t)}function g1(e,t){return y1(e)&&(!t&&e.expression.kind===110||xf(e.expression)||gs(e.expression,!0))}function us(e,t){return xf(e)||gs(e,t)}function g2(e){if(Of(e)){if(!y2(e))return 0;let t=e.arguments[0];return m2(t)||h1(t)?8:gs(t)&&ps(t)==="prototype"?9:7}return e.operatorToken.kind!==64||!w1(e.left)||b2(d2(e))?0:us(e.left.expression,!0)&&ps(e.left)==="prototype"&&If(T2(e))?6:v2(e.left)}function b2(e){return Qb(e)&&ta(e.expression)&&e.expression.text==="0"}function gf(e){if(Xr(e))return e.name;let t=vf(e.argumentExpression);return ta(t)||wl(t)?t:e}function ps(e){let t=gf(e);if(t){if(tt(t))return t.escapedText;if(wl(t)||ta(t))return Ja(t.text)}}function v2(e){if(e.expression.kind===110)return 4;if(h1(e))return 2;if(us(e.expression,!0)){if($2(e.expression))return 3;let t=e;for(;!tt(t.expression);)t=t.expression;let a=t.expression;if((a.escapedText==="exports"||a.escapedText==="module"&&ps(t)==="exports")&&gs(e))return 1;if(us(e,!0)||Xa(e)&&J2(e))return 5}return 0}function T2(e){for(;Zi(e.right);)e=e.right;return e.right}function x2(e){return Cl(e)&&Zi(e.expression)&&yf(e.expression)!==0&&Zi(e.expression.right)&&(e.expression.right.operatorToken.kind===57||e.expression.right.operatorToken.kind===61)?e.expression.right.right:void 0}function S2(e){switch(e.kind){case 243:let t=Up(e);return t&&t.initializer;case 172:return e.initializer;case 303:return e.initializer}}function Up(e){return Ha(e)?Xp(e.declarationList.declarations):void 0}function w2(e){return Ti(e)&&e.body&&e.body.kind===267?e.body:void 0}function bf(e){switch(e.kind){case 219:case 226:case 241:case 252:case 179:case 296:case 263:case 231:case 175:case 176:case 185:case 180:case 251:case 259:case 246:case 212:case 242:case 1:case 266:case 306:case 277:case 278:case 281:case 244:case 249:case 250:case 248:case 262:case 218:case 184:case 177:case 80:case 245:case 272:case 271:case 181:case 264:case 317:case 323:case 256:case 174:case 173:case 267:case 202:case 270:case 210:case 169:case 217:case 211:case 303:case 172:case 171:case 253:case 240:case 178:case 304:case 305:case 255:case 257:case 258:case 265:case 168:case 260:case 243:case 247:case 254:return!0;default:return!1}}function k2(e,t){let a;u2(e)&&t2(e)&&Xi(e.initializer)&&(a=Dn(a,Fd(e,e.initializer.jsDoc)));let o=e;for(;o&&o.parent;){if(Xi(o)&&(a=Dn(a,Fd(e,o.jsDoc))),o.kind===169){a=Dn(a,(t?bg:gg)(o));break}if(o.kind===168){a=Dn(a,(t?Tg:vg)(o));break}o=A2(o)}return a||bt}function Fd(e,t){let a=ly(t);return Am(t,o=>{if(o===a){let m=Gr(o.tags,v=>E2(e,v));return o.tags===m?[o]:m}else return Gr(o.tags,l6)})}function E2(e,t){return!(Ff(t)||d6(t))||!t.parent||!sh(t.parent)||!Al(t.parent.parent)||t.parent.parent===e}function A2(e){let t=e.parent;if(t.kind===303||t.kind===277||t.kind===172||t.kind===244&&e.kind===211||t.kind===253||w2(t)||yl(e))return t;if(t.parent&&(Up(t.parent)===e||yl(t)))return t.parent;if(t.parent&&t.parent.parent&&(Up(t.parent.parent)||S2(t.parent.parent)===e||x2(t.parent.parent)))return t.parent.parent}function vf(e,t){return Vf(e,t?-2147483647:1)}function C2(e){let t=D2(e);if(t&&ea(e)){let a=xg(e);if(a)return a.class}return t}function D2(e){let t=Tf(e.heritageClauses,96);return t&&t.types.length>0?t.types[0]:void 0}function P2(e){if(ea(e))return Sg(e).map(t=>t.class);{let t=Tf(e.heritageClauses,119);return t==null?void 0:t.types}}function N2(e){return vs(e)?I2(e)||bt:vi(e)&&Yp(Ip(C2(e)),P2(e))||bt}function I2(e){let t=Tf(e.heritageClauses,96);return t?t.types:void 0}function Tf(e,t){if(e){for(let a of e)if(a.token===t)return a}}function di(e){return 83<=e&&e<=165}function O2(e){return 19<=e&&e<=79}function xp(e){return di(e)||O2(e)}function kl(e){return wl(e)||ta(e)}function M2(e){return Y1(e)&&(e.operator===40||e.operator===41)&&ta(e.operand)}function J2(e){if(!(e.kind===167||e.kind===212))return!1;let t=Xa(e)?vf(e.argumentExpression):e.expression;return!kl(t)&&!M2(t)}function L2(e){return jp(e)?Pn(e):th(e)?kb(e):e.text}function La(e){return fs(e.pos)||fs(e.end)}function Sp(e){switch(e){case 61:return 4;case 57:return 5;case 56:return 6;case 52:return 7;case 53:return 8;case 51:return 9;case 35:case 36:case 37:case 38:return 10;case 30:case 32:case 33:case 34:case 104:case 103:case 130:case 152:return 11;case 48:case 49:case 50:return 12;case 40:case 41:return 13;case 42:case 44:case 45:return 14;case 43:return 15}return-1}function wp(e){return!!((e.templateFlags||0)&2048)}function j2(e){return e&&!!(P1(e)?wp(e):wp(e.head)||Xt(e.templateSpans,t=>wp(t.literal)))}var W4=new Map(Object.entries({" ":"\\t","\v":"\\v","\f":"\\f","\b":"\\b","\r":"\\r","\n":"\\n","\\":"\\\\",'"':'\\"',"'":"\\'","`":"\\`","\u2028":"\\u2028","\u2029":"\\u2029","\x85":"\\u0085","\r\n":"\\r\\n"}));var G4=new Map(Object.entries({'"':""","'":"'"}));function R2(e){return!!e&&e.kind===80&&U2(e)}function U2(e){return e.escapedText==="this"}function bs(e,t){return!!z2(e,t)}function B2(e){return bs(e,256)}function q2(e){return bs(e,32768)}function z2(e,t){return V2(e)&t}function F2(e,t,a){return e.kind>=0&&e.kind<=165?0:(e.modifierFlagsCache&536870912||(e.modifierFlagsCache=T1(e)|536870912),a||t&&ea(e)?(!(e.modifierFlagsCache&268435456)&&e.parent&&(e.modifierFlagsCache|=b1(e)|268435456),v1(e.modifierFlagsCache)):W2(e.modifierFlagsCache))}function V2(e){return F2(e,!1)}function b1(e){let t=0;return e.parent&&!ds(e)&&(ea(e)&&(wg(e)&&(t|=8388608),kg(e)&&(t|=16777216),Eg(e)&&(t|=33554432),Ag(e)&&(t|=67108864),Cg(e)&&(t|=134217728)),Dg(e)&&(t|=65536)),t}function W2(e){return e&65535}function v1(e){return e&131071|(e&260046848)>>>23}function G2(e){return v1(b1(e))}function Y2(e){return T1(e)|G2(e)}function T1(e){let t=Nl(e)?Rn(e.modifiers):0;return(e.flags&8||e.kind===80&&e.flags&4096)&&(t|=32),t}function Rn(e){let t=0;if(e)for(let a of e)t|=x1(a.kind);return t}function x1(e){switch(e){case 126:return 256;case 125:return 1;case 124:return 4;case 123:return 2;case 128:return 64;case 129:return 512;case 95:return 32;case 138:return 128;case 87:return 4096;case 90:return 2048;case 134:return 1024;case 148:return 8;case 164:return 16;case 103:return 8192;case 147:return 16384;case 170:return 32768}return 0}function X2(e){return e===76||e===77||e===78}function S1(e){return e>=64&&e<=79}function yl(e,t){return Zi(e)&&(t?e.operatorToken.kind===64:S1(e.operatorToken.kind))&&qa(e.left)}function xf(e){return e.kind===80||H2(e)}function H2(e){return Xr(e)&&tt(e.name)&&xf(e.expression)}function $2(e){return gs(e)&&ps(e)==="prototype"}function kp(e){return e.flags&3899393?e.objectFlags:0}function Q2(e){let t;return Ht(e,a=>{Rp(a)&&(t=a)},a=>{for(let o=a.length-1;o>=0;o--)if(Rp(a[o])){t=a[o];break}}),t}function K2(e){return e>=182&&e<=205||e===133||e===159||e===150||e===163||e===151||e===136||e===154||e===155||e===116||e===157||e===146||e===141||e===233||e===312||e===313||e===314||e===315||e===316||e===317||e===318}function w1(e){return e.kind===211||e.kind===212}function Z2(e,t){this.flags=e,this.escapedName=t,this.declarations=void 0,this.valueDeclaration=void 0,this.id=0,this.mergeId=0,this.parent=void 0,this.members=void 0,this.exports=void 0,this.exportSymbol=void 0,this.constEnumOnlyModule=void 0,this.isReferenced=void 0,this.lastAssignmentPos=void 0,this.links=void 0}function eb(e,t){this.flags=t,(B.isDebugging||_l)&&(this.checker=e)}function tb(e,t){this.flags=t,B.isDebugging&&(this.checker=e)}function Ep(e,t,a){this.pos=t,this.end=a,this.kind=e,this.id=0,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}function nb(e,t,a){this.pos=t,this.end=a,this.kind=e,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0,this.emitNode=void 0}function rb(e,t,a){this.pos=t,this.end=a,this.kind=e,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}function ib(e,t,a){this.fileName=e,this.text=t,this.skipTrivia=a||(o=>o)}var At={getNodeConstructor:()=>Ep,getTokenConstructor:()=>nb,getIdentifierConstructor:()=>rb,getPrivateIdentifierConstructor:()=>Ep,getSourceFileConstructor:()=>Ep,getSymbolConstructor:()=>Z2,getTypeConstructor:()=>eb,getSignatureConstructor:()=>tb,getSourceMapSourceConstructor:()=>ib},ab=[];function _b(e){Object.assign(At,e),Un(ab,t=>t(At))}function sb(e,t){return e.replace(/\{(\d+)\}/g,(a,o)=>""+B.checkDefined(t[+o]))}var Vd;function ob(e){return Vd&&Vd[e.key]||e.message}function Oa(e,t,a,o,m,...v){a+o>t.length&&(o=t.length-a),o2(t,a,o);let A=ob(m);return Xt(v)&&(A=sb(A,v)),{file:void 0,start:a,length:o,messageText:A,category:m.category,code:m.code,reportsUnnecessary:m.reportsUnnecessary,fileName:e}}function cb(e){return e.file===void 0&&e.start!==void 0&&e.length!==void 0&&typeof e.fileName=="string"}function k1(e,t){let a=t.fileName||"",o=t.text.length;B.assertEqual(e.fileName,a),B.assertLessThanOrEqual(e.start,o),B.assertLessThanOrEqual(e.start+e.length,o);let m={file:t,start:e.start,length:e.length,messageText:e.messageText,category:e.category,code:e.code,reportsUnnecessary:e.reportsUnnecessary};if(e.relatedInformation){m.relatedInformation=[];for(let v of e.relatedInformation)cb(v)&&v.fileName===a?(B.assertLessThanOrEqual(v.start,o),B.assertLessThanOrEqual(v.start+v.length,o),m.relatedInformation.push(k1(v,t))):m.relatedInformation.push(v)}return m}function zi(e,t){let a=[];for(let o of e)a.push(k1(o,t));return a}function Wd(e){return e===4||e===2||e===1||e===6?1:0}var at={allowImportingTsExtensions:{dependencies:["rewriteRelativeImportExtensions"],computeValue:e=>!!(e.allowImportingTsExtensions||e.rewriteRelativeImportExtensions)},target:{dependencies:["module"],computeValue:e=>(e.target===0?void 0:e.target)??(e.module===100&&9||e.module===199&&99||1)},module:{dependencies:["target"],computeValue:e=>typeof e.module=="number"?e.module:at.target.computeValue(e)>=2?5:1},moduleResolution:{dependencies:["module","target"],computeValue:e=>{let t=e.moduleResolution;if(t===void 0)switch(at.module.computeValue(e)){case 1:t=2;break;case 100:t=3;break;case 199:t=99;break;case 200:t=100;break;default:t=1;break}return t}},moduleDetection:{dependencies:["module","target"],computeValue:e=>e.moduleDetection||(at.module.computeValue(e)===100||at.module.computeValue(e)===199?3:2)},isolatedModules:{dependencies:["verbatimModuleSyntax"],computeValue:e=>!!(e.isolatedModules||e.verbatimModuleSyntax)},esModuleInterop:{dependencies:["module","target"],computeValue:e=>{if(e.esModuleInterop!==void 0)return e.esModuleInterop;switch(at.module.computeValue(e)){case 100:case 199:case 200:return!0}return!1}},allowSyntheticDefaultImports:{dependencies:["module","target","moduleResolution"],computeValue:e=>e.allowSyntheticDefaultImports!==void 0?e.allowSyntheticDefaultImports:at.esModuleInterop.computeValue(e)||at.module.computeValue(e)===4||at.moduleResolution.computeValue(e)===100},resolvePackageJsonExports:{dependencies:["moduleResolution"],computeValue:e=>{let t=at.moduleResolution.computeValue(e);if(!Gd(t))return!1;if(e.resolvePackageJsonExports!==void 0)return e.resolvePackageJsonExports;switch(t){case 3:case 99:case 100:return!0}return!1}},resolvePackageJsonImports:{dependencies:["moduleResolution","resolvePackageJsonExports"],computeValue:e=>{let t=at.moduleResolution.computeValue(e);if(!Gd(t))return!1;if(e.resolvePackageJsonExports!==void 0)return e.resolvePackageJsonExports;switch(t){case 3:case 99:case 100:return!0}return!1}},resolveJsonModule:{dependencies:["moduleResolution","module","target"],computeValue:e=>e.resolveJsonModule!==void 0?e.resolveJsonModule:at.moduleResolution.computeValue(e)===100},declaration:{dependencies:["composite"],computeValue:e=>!!(e.declaration||e.composite)},preserveConstEnums:{dependencies:["isolatedModules","verbatimModuleSyntax"],computeValue:e=>!!(e.preserveConstEnums||at.isolatedModules.computeValue(e))},incremental:{dependencies:["composite"],computeValue:e=>!!(e.incremental||e.composite)},declarationMap:{dependencies:["declaration","composite"],computeValue:e=>!!(e.declarationMap&&at.declaration.computeValue(e))},allowJs:{dependencies:["checkJs"],computeValue:e=>e.allowJs===void 0?!!e.checkJs:e.allowJs},useDefineForClassFields:{dependencies:["target","module"],computeValue:e=>e.useDefineForClassFields===void 0?at.target.computeValue(e)>=9:e.useDefineForClassFields},noImplicitAny:{dependencies:["strict"],computeValue:e=>Vr(e,"noImplicitAny")},noImplicitThis:{dependencies:["strict"],computeValue:e=>Vr(e,"noImplicitThis")},strictNullChecks:{dependencies:["strict"],computeValue:e=>Vr(e,"strictNullChecks")},strictFunctionTypes:{dependencies:["strict"],computeValue:e=>Vr(e,"strictFunctionTypes")},strictBindCallApply:{dependencies:["strict"],computeValue:e=>Vr(e,"strictBindCallApply")},strictPropertyInitialization:{dependencies:["strict"],computeValue:e=>Vr(e,"strictPropertyInitialization")},strictBuiltinIteratorReturn:{dependencies:["strict"],computeValue:e=>Vr(e,"strictBuiltinIteratorReturn")},alwaysStrict:{dependencies:["strict"],computeValue:e=>Vr(e,"alwaysStrict")},useUnknownInCatchVariables:{dependencies:["strict"],computeValue:e=>Vr(e,"useUnknownInCatchVariables")}};var Y4=at.allowImportingTsExtensions.computeValue,X4=at.target.computeValue,H4=at.module.computeValue,$4=at.moduleResolution.computeValue,Q4=at.moduleDetection.computeValue,K4=at.isolatedModules.computeValue,Z4=at.esModuleInterop.computeValue,e3=at.allowSyntheticDefaultImports.computeValue,t3=at.resolvePackageJsonExports.computeValue,n3=at.resolvePackageJsonImports.computeValue,r3=at.resolveJsonModule.computeValue,i3=at.declaration.computeValue,a3=at.preserveConstEnums.computeValue,_3=at.incremental.computeValue,s3=at.declarationMap.computeValue,o3=at.allowJs.computeValue,c3=at.useDefineForClassFields.computeValue;function Gd(e){return e>=3&&e<=99||e===100}function Vr(e,t){return e[t]===void 0?!!e.strict:!!e[t]}function lb(e){return i2(targetOptionDeclaration.type,(t,a)=>t===e?a:void 0)}var ub=["node_modules","bower_components","jspm_packages"],E1=`(?!(${ub.join("|")})(/|$))`,pb={singleAsteriskRegexFragment:"([^./]|(\\.(?!min\\.js$))?)*",doubleAsteriskRegexFragment:`(/${E1}[^/.][^/]*)*?`,replaceWildcardCharacter:e=>A1(e,pb.singleAsteriskRegexFragment)},fb={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:`(/${E1}[^/.][^/]*)*?`,replaceWildcardCharacter:e=>A1(e,fb.singleAsteriskRegexFragment)};function A1(e,t){return e==="*"?t:e==="?"?"[^/]":"\\"+e}function db(e,t){return t||mb(e)||3}function mb(e){switch(e.substr(e.lastIndexOf(".")).toLowerCase()){case".js":case".cjs":case".mjs":return 1;case".jsx":return 2;case".ts":case".cts":case".mts":return 3;case".tsx":return 4;case".json":return 6;default:return 0}}var C1=[[".ts",".tsx",".d.ts"],[".cts",".d.cts"],[".mts",".d.mts"]],l3=Em(C1),u3=[...C1,[".json"]];var hb=[[".js",".jsx"],[".mjs"],[".cjs"]],p3=Em(hb),yb=[[".ts",".tsx",".d.ts",".js",".jsx"],[".cts",".d.cts",".cjs"],[".mts",".d.mts",".mjs"]],f3=[...yb,[".json"]],gb=[".d.ts",".d.cts",".d.mts"];function fs(e){return!(e>=0)}function nl(e,...t){return t.length&&(e.relatedInformation||(e.relatedInformation=[]),B.assert(e.relatedInformation!==bt,"Diagnostic had empty array singleton for related info, but is still being constructed!"),e.relatedInformation.push(...t)),e}function bb(e){let t;switch(e.charCodeAt(1)){case 98:case 66:t=1;break;case 111:case 79:t=3;break;case 120:case 88:t=4;break;default:let Q=e.length-1,h=0;for(;e.charCodeAt(h)===48;)h++;return e.slice(h,Q)||"0"}let a=2,o=e.length-1,m=(o-a)*t,v=new Uint16Array((m>>>4)+(m&15?1:0));for(let Q=o-1,h=0;Q>=a;Q--,h+=t){let y=h>>>4,g=e.charCodeAt(Q),I=(g<=57?g-48:10+g-(g<=70?65:97))<<(h&15);v[y]|=I;let re=I>>>16;re&&(v[y+1]|=re)}let A="",P=v.length-1,l=!0;for(;l;){let Q=0;l=!1;for(let h=P;h>=0;h--){let y=Q<<16|v[h],g=y/10|0;v[h]=g,Q=y-g*10,g&&!l&&(P=h,l=!0)}A=Q+A}return A}function vb({negative:e,base10Value:t}){return(e&&t!=="0"?"-":"")+t}function Bp(e,t){return e.pos=t,e}function Tb(e,t){return e.end=t,e}function yi(e,t,a){return Tb(Bp(e,t),a)}function Yd(e,t,a){return yi(e,t,t+a)}function Sf(e,t){return e&&t&&(e.parent=t),e}function xb(e,t){if(!e)return e;return vm(e,d1(e)?a:m),e;function a(v,A){if(t&&v.parent===A)return"skip";Sf(v,A)}function o(v){if(Xi(v))for(let A of v.jsDoc)a(A,v),vm(A,a)}function m(v,A){return a(v,A)||o(v)}}function Sb(e){return!!(e.flags&262144&&e.isThisType)}function wb(e){var t;return((t=getSnippetElement(e))==null?void 0:t.kind)===0}function kb(e){return`${Pn(e.namespace)}:${Pn(e.name)}`}var d3=String.prototype.replace;var qp=["assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","inspector/promises","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","readline/promises","repl","stream","stream/consumers","stream/promises","stream/web","string_decoder","sys","test/mock_loader","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib"],m3=new Set(qp),Eb=new Set(["node:sea","node:sqlite","node:test","node:test/reporters"]),h3=new Set([...qp,...qp.map(e=>`node:${e}`),...Eb]);function Ab(){let e,t,a,o,m;return{createBaseSourceFileNode:v,createBaseIdentifierNode:A,createBasePrivateIdentifierNode:P,createBaseTokenNode:l,createBaseNode:Q};function v(h){return new(m||(m=At.getSourceFileConstructor()))(h,-1,-1)}function A(h){return new(a||(a=At.getIdentifierConstructor()))(h,-1,-1)}function P(h){return new(o||(o=At.getPrivateIdentifierConstructor()))(h,-1,-1)}function l(h){return new(t||(t=At.getTokenConstructor()))(h,-1,-1)}function Q(h){return new(e||(e=At.getNodeConstructor()))(h,-1,-1)}}var Cb={getParenthesizeLeftSideOfBinaryForOperator:e=>gt,getParenthesizeRightSideOfBinaryForOperator:e=>gt,parenthesizeLeftSideOfBinary:(e,t)=>t,parenthesizeRightSideOfBinary:(e,t,a)=>a,parenthesizeExpressionOfComputedPropertyName:gt,parenthesizeConditionOfConditionalExpression:gt,parenthesizeBranchOfConditionalExpression:gt,parenthesizeExpressionOfExportDefault:gt,parenthesizeExpressionOfNew:e=>kr(e,qa),parenthesizeLeftSideOfAccess:e=>kr(e,qa),parenthesizeOperandOfPostfixUnary:e=>kr(e,qa),parenthesizeOperandOfPrefixUnary:e=>kr(e,Yg),parenthesizeExpressionsOfCommaDelimitedList:e=>kr(e,mi),parenthesizeExpressionForDisallowedComma:gt,parenthesizeExpressionOfExpressionStatement:gt,parenthesizeConciseBodyOfArrowFunction:gt,parenthesizeCheckTypeOfConditionalType:gt,parenthesizeExtendsTypeOfConditionalType:gt,parenthesizeConstituentTypesOfUnionType:e=>kr(e,mi),parenthesizeConstituentTypeOfUnionType:gt,parenthesizeConstituentTypesOfIntersectionType:e=>kr(e,mi),parenthesizeConstituentTypeOfIntersectionType:gt,parenthesizeOperandOfTypeOperator:gt,parenthesizeOperandOfReadonlyTypeOperator:gt,parenthesizeNonArrayTypeOfPostfixType:gt,parenthesizeElementTypesOfTupleType:e=>kr(e,mi),parenthesizeElementTypeOfTupleType:gt,parenthesizeTypeOfOptionalType:gt,parenthesizeTypeArguments:e=>e&&kr(e,mi),parenthesizeLeadingTypeArgument:gt},rl=0;var Db=[];function wf(e,t){let a=e&8?gt:Mb,o=wd(()=>e&1?Cb:createParenthesizerRules(ye)),m=wd(()=>e&2?nullNodeConverters:createNodeConverters(ye)),v=Kn(n=>(i,_)=>ua(i,n,_)),A=Kn(n=>i=>jr(n,i)),P=Kn(n=>i=>ni(i,n)),l=Kn(n=>()=>Ho(n)),Q=Kn(n=>i=>C_(n,i)),h=Kn(n=>(i,_)=>xu(n,i,_)),y=Kn(n=>(i,_)=>$o(n,i,_)),g=Kn(n=>(i,_)=>Tu(n,i,_)),x=Kn(n=>(i,_)=>dc(n,i,_)),I=Kn(n=>(i,_,c)=>Ou(n,i,_,c)),re=Kn(n=>(i,_,c)=>mc(n,i,_,c)),he=Kn(n=>(i,_,c,f)=>Mu(n,i,_,c,f)),ye={get parenthesizer(){return o()},get converters(){return m()},baseFactory:t,flags:e,createNodeArray:de,createNumericLiteral:V,createBigIntLiteral:oe,createStringLiteral:dt,createStringLiteralFromNode:nr,createRegularExpressionLiteral:gn,createLiteralLikeNode:rr,createIdentifier:Ge,createTempVariable:ir,createLoopVariable:Pr,createUniqueName:Ot,getGeneratedNameForNode:Bn,createPrivateIdentifier:Mt,createUniquePrivateName:Qe,getGeneratedPrivateNameForNode:qn,createToken:ct,createSuper:_t,createThis:Ut,createNull:Jt,createTrue:lt,createFalse:ar,createModifier:mt,createModifiersFromModifierFlags:vn,createQualifiedName:yt,updateQualifiedName:cn,createComputedPropertyName:nt,updateComputedPropertyName:Bt,createTypeParameterDeclaration:rn,updateTypeParameterDeclaration:_r,createParameterDeclaration:fr,updateParameterDeclaration:dr,createDecorator:zn,updateDecorator:Fn,createPropertySignature:Nr,updatePropertySignature:Vn,createPropertyDeclaration:mr,updatePropertyDeclaration:L,createMethodSignature:se,updateMethodSignature:fe,createMethodDeclaration:Te,updateMethodDeclaration:He,createConstructorDeclaration:ut,updateConstructorDeclaration:Ir,createGetAccessorDeclaration:Mn,updateGetAccessorDeclaration:Wn,createSetAccessorDeclaration:R,updateSetAccessorDeclaration:$,createCallSignature:xe,updateCallSignature:Se,createConstructSignature:we,updateConstructSignature:be,createIndexSignature:We,updateIndexSignature:Ze,createClassStaticBlockDeclaration:st,updateClassStaticBlockDeclaration:Dt,createTemplateLiteralTypeSpan:Ye,updateTemplateLiteralTypeSpan:Ee,createKeywordTypeNode:Tn,createTypePredicateNode:rt,updateTypePredicateNode:ln,createTypeReferenceNode:Zr,updateTypeReferenceNode:J,createFunctionTypeNode:qe,updateFunctionTypeNode:u,createConstructorTypeNode:Me,updateConstructorTypeNode:an,createTypeQueryNode:Pt,updateTypeQueryNode:kt,createTypeLiteralNode:Nt,updateTypeLiteralNode:qt,createArrayTypeNode:Gn,updateArrayTypeNode:wi,createTupleTypeNode:un,updateTupleTypeNode:G,createNamedTupleMember:le,updateNamedTupleMember:Fe,createOptionalTypeNode:ve,updateOptionalTypeNode:j,createRestTypeNode:ht,updateRestTypeNode:xt,createUnionTypeNode:Ul,updateUnionTypeNode:Es,createIntersectionTypeNode:Or,updateIntersectionTypeNode:Je,createConditionalTypeNode:ft,updateConditionalTypeNode:Bl,createInferTypeNode:Yn,updateInferTypeNode:ql,createImportTypeNode:sr,updateImportTypeNode:aa,createParenthesizedType:Qt,updateParenthesizedType:Ct,createThisTypeNode:D,createTypeOperatorNode:Gt,updateTypeOperatorNode:Mr,createIndexedAccessTypeNode:or,updateIndexedAccessTypeNode:Ka,createMappedTypeNode:St,updateMappedTypeNode:jt,createLiteralTypeNode:ei,updateLiteralTypeNode:yr,createTemplateLiteralType:Wt,updateTemplateLiteralType:zl,createObjectBindingPattern:As,updateObjectBindingPattern:Fl,createArrayBindingPattern:Jr,updateArrayBindingPattern:Vl,createBindingElement:_a,updateBindingElement:ti,createArrayLiteralExpression:Za,updateArrayLiteralExpression:Cs,createObjectLiteralExpression:ki,updateObjectLiteralExpression:Wl,createPropertyAccessExpression:e&4?(n,i)=>setEmitFlags(cr(n,i),262144):cr,updatePropertyAccessExpression:Gl,createPropertyAccessChain:e&4?(n,i,_)=>setEmitFlags(Ei(n,i,_),262144):Ei,updatePropertyAccessChain:sa,createElementAccessExpression:Ai,updateElementAccessExpression:Yl,createElementAccessChain:Ns,updateElementAccessChain:e_,createCallExpression:Ci,updateCallExpression:oa,createCallChain:t_,updateCallChain:Os,createNewExpression:xn,updateNewExpression:n_,createTaggedTemplateExpression:ca,updateTaggedTemplateExpression:Ms,createTypeAssertion:Js,updateTypeAssertion:Ls,createParenthesizedExpression:r_,updateParenthesizedExpression:js,createFunctionExpression:i_,updateFunctionExpression:Rs,createArrowFunction:a_,updateArrowFunction:Us,createDeleteExpression:Bs,updateDeleteExpression:qs,createTypeOfExpression:la,updateTypeOfExpression:fn,createVoidExpression:__,updateVoidExpression:lr,createAwaitExpression:zs,updateAwaitExpression:Lr,createPrefixUnaryExpression:jr,updatePrefixUnaryExpression:Xl,createPostfixUnaryExpression:ni,updatePostfixUnaryExpression:Hl,createBinaryExpression:ua,updateBinaryExpression:$l,createConditionalExpression:Vs,updateConditionalExpression:Ws,createTemplateExpression:Gs,updateTemplateExpression:Xn,createTemplateHead:Xs,createTemplateMiddle:pa,createTemplateTail:s_,createNoSubstitutionTemplateLiteral:Kl,createTemplateLiteralLikeNode:ii,createYieldExpression:o_,updateYieldExpression:Zl,createSpreadElement:Hs,updateSpreadElement:eu,createClassExpression:$s,updateClassExpression:c_,createOmittedExpression:l_,createExpressionWithTypeArguments:Qs,updateExpressionWithTypeArguments:Ks,createAsExpression:dn,updateAsExpression:fa,createNonNullExpression:Zs,updateNonNullExpression:eo,createSatisfiesExpression:u_,updateSatisfiesExpression:to,createNonNullChain:p_,updateNonNullChain:Jn,createMetaProperty:no,updateMetaProperty:f_,createTemplateSpan:Hn,updateTemplateSpan:da,createSemicolonClassElement:ro,createBlock:Rr,updateBlock:tu,createVariableStatement:d_,updateVariableStatement:io,createEmptyStatement:ao,createExpressionStatement:Pi,updateExpressionStatement:_o,createIfStatement:so,updateIfStatement:oo,createDoStatement:co,updateDoStatement:lo,createWhileStatement:uo,updateWhileStatement:nu,createForStatement:po,updateForStatement:fo,createForInStatement:m_,updateForInStatement:ru,createForOfStatement:mo,updateForOfStatement:iu,createContinueStatement:ho,updateContinueStatement:au,createBreakStatement:h_,updateBreakStatement:yo,createReturnStatement:y_,updateReturnStatement:_u,createWithStatement:g_,updateWithStatement:go,createSwitchStatement:b_,updateSwitchStatement:ai,createLabeledStatement:bo,updateLabeledStatement:vo,createThrowStatement:To,updateThrowStatement:su,createTryStatement:xo,updateTryStatement:ou,createDebuggerStatement:So,createVariableDeclaration:ma,updateVariableDeclaration:wo,createVariableDeclarationList:v_,updateVariableDeclarationList:cu,createFunctionDeclaration:ko,updateFunctionDeclaration:T_,createClassDeclaration:Eo,updateClassDeclaration:ha,createInterfaceDeclaration:Ao,updateInterfaceDeclaration:Co,createTypeAliasDeclaration:ot,updateTypeAliasDeclaration:gr,createEnumDeclaration:x_,updateEnumDeclaration:br,createModuleDeclaration:Do,updateModuleDeclaration:Et,createModuleBlock:vr,updateModuleBlock:zt,createCaseBlock:Po,updateCaseBlock:uu,createNamespaceExportDeclaration:No,updateNamespaceExportDeclaration:Io,createImportEqualsDeclaration:Oo,updateImportEqualsDeclaration:Mo,createImportDeclaration:Jo,updateImportDeclaration:Lo,createImportClause:jo,updateImportClause:Ro,createAssertClause:S_,updateAssertClause:fu,createAssertEntry:Ni,updateAssertEntry:Uo,createImportTypeAssertionContainer:w_,updateImportTypeAssertionContainer:Bo,createImportAttributes:qo,updateImportAttributes:k_,createImportAttribute:zo,updateImportAttribute:Fo,createNamespaceImport:Vo,updateNamespaceImport:du,createNamespaceExport:Wo,updateNamespaceExport:mu,createNamedImports:Go,updateNamedImports:Yo,createImportSpecifier:Tr,updateImportSpecifier:hu,createExportAssignment:ya,updateExportAssignment:Ii,createExportDeclaration:ga,updateExportDeclaration:Xo,createNamedExports:E_,updateNamedExports:yu,createExportSpecifier:ba,updateExportSpecifier:gu,createMissingDeclaration:bu,createExternalModuleReference:A_,updateExternalModuleReference:vu,get createJSDocAllType(){return l(312)},get createJSDocUnknownType(){return l(313)},get createJSDocNonNullableType(){return y(315)},get updateJSDocNonNullableType(){return g(315)},get createJSDocNullableType(){return y(314)},get updateJSDocNullableType(){return g(314)},get createJSDocOptionalType(){return Q(316)},get updateJSDocOptionalType(){return h(316)},get createJSDocVariadicType(){return Q(318)},get updateJSDocVariadicType(){return h(318)},get createJSDocNamepathType(){return Q(319)},get updateJSDocNamepathType(){return h(319)},createJSDocFunctionType:Qo,updateJSDocFunctionType:Su,createJSDocTypeLiteral:Ko,updateJSDocTypeLiteral:wu,createJSDocTypeExpression:Zo,updateJSDocTypeExpression:D_,createJSDocSignature:ec,updateJSDocSignature:ku,createJSDocTemplateTag:P_,updateJSDocTemplateTag:tc,createJSDocTypedefTag:va,updateJSDocTypedefTag:Eu,createJSDocParameterTag:N_,updateJSDocParameterTag:Au,createJSDocPropertyTag:nc,updateJSDocPropertyTag:rc,createJSDocCallbackTag:ic,updateJSDocCallbackTag:ac,createJSDocOverloadTag:_c,updateJSDocOverloadTag:I_,createJSDocAugmentsTag:O_,updateJSDocAugmentsTag:Mi,createJSDocImplementsTag:sc,updateJSDocImplementsTag:Iu,createJSDocSeeTag:Br,updateJSDocSeeTag:Ta,createJSDocImportTag:gc,updateJSDocImportTag:bc,createJSDocNameReference:oc,updateJSDocNameReference:Cu,createJSDocMemberName:cc,updateJSDocMemberName:Du,createJSDocLink:lc,updateJSDocLink:uc,createJSDocLinkCode:pc,updateJSDocLinkCode:Pu,createJSDocLinkPlain:fc,updateJSDocLinkPlain:Nu,get createJSDocTypeTag(){return re(344)},get updateJSDocTypeTag(){return he(344)},get createJSDocReturnTag(){return re(342)},get updateJSDocReturnTag(){return he(342)},get createJSDocThisTag(){return re(343)},get updateJSDocThisTag(){return he(343)},get createJSDocAuthorTag(){return x(330)},get updateJSDocAuthorTag(){return I(330)},get createJSDocClassTag(){return x(332)},get updateJSDocClassTag(){return I(332)},get createJSDocPublicTag(){return x(333)},get updateJSDocPublicTag(){return I(333)},get createJSDocPrivateTag(){return x(334)},get updateJSDocPrivateTag(){return I(334)},get createJSDocProtectedTag(){return x(335)},get updateJSDocProtectedTag(){return I(335)},get createJSDocReadonlyTag(){return x(336)},get updateJSDocReadonlyTag(){return I(336)},get createJSDocOverrideTag(){return x(337)},get updateJSDocOverrideTag(){return I(337)},get createJSDocDeprecatedTag(){return x(331)},get updateJSDocDeprecatedTag(){return I(331)},get createJSDocThrowsTag(){return re(349)},get updateJSDocThrowsTag(){return he(349)},get createJSDocSatisfiesTag(){return re(350)},get updateJSDocSatisfiesTag(){return he(350)},createJSDocEnumTag:yc,updateJSDocEnumTag:M_,createJSDocUnknownTag:hc,updateJSDocUnknownTag:Ju,createJSDocText:J_,updateJSDocText:Lu,createJSDocComment:Ji,updateJSDocComment:vc,createJsxElement:Tc,updateJsxElement:ju,createJsxSelfClosingElement:xc,updateJsxSelfClosingElement:L_,createJsxOpeningElement:j_,updateJsxOpeningElement:Sc,createJsxClosingElement:xa,updateJsxClosingElement:Kt,createJsxFragment:R_,createJsxText:Sa,updateJsxText:kc,createJsxOpeningFragment:Ru,createJsxJsxClosingFragment:Uu,updateJsxFragment:wc,createJsxAttribute:Ec,updateJsxAttribute:wa,createJsxAttributes:Ac,updateJsxAttributes:Bu,createJsxSpreadAttribute:Cc,updateJsxSpreadAttribute:qu,createJsxExpression:ka,updateJsxExpression:Li,createJsxNamespacedName:Dc,updateJsxNamespacedName:U_,createCaseClause:B_,updateCaseClause:zu,createDefaultClause:_i,updateDefaultClause:Pc,createHeritageClause:Nc,updateHeritageClause:Fu,createCatchClause:q_,updateCatchClause:Ic,createPropertyAssignment:Ea,updatePropertyAssignment:qr,createShorthandPropertyAssignment:Oc,updateShorthandPropertyAssignment:Wu,createSpreadAssignment:z_,updateSpreadAssignment:Mc,createEnumMember:wn,updateEnumMember:Jc,createSourceFile:Yu,updateSourceFile:$u,createRedirectedSourceFile:Lc,createBundle:F_,updateBundle:Qu,createSyntheticExpression:Ku,createSyntaxList:Ca,createNotEmittedStatement:Rc,createNotEmittedTypeElement:Zu,createPartiallyEmittedExpression:Uc,updatePartiallyEmittedExpression:Bc,createCommaListExpression:V_,updateCommaListExpression:qc,createSyntheticReferenceExpression:W_,updateSyntheticReferenceExpression:zc,cloneNode:G_,get createComma(){return v(28)},get createAssignment(){return v(64)},get createLogicalOr(){return v(57)},get createLogicalAnd(){return v(56)},get createBitwiseOr(){return v(52)},get createBitwiseXor(){return v(53)},get createBitwiseAnd(){return v(51)},get createStrictEquality(){return v(37)},get createStrictInequality(){return v(38)},get createEquality(){return v(35)},get createInequality(){return v(36)},get createLessThan(){return v(30)},get createLessThanEquals(){return v(33)},get createGreaterThan(){return v(32)},get createGreaterThanEquals(){return v(34)},get createLeftShift(){return v(48)},get createRightShift(){return v(49)},get createUnsignedRightShift(){return v(50)},get createAdd(){return v(40)},get createSubtract(){return v(41)},get createMultiply(){return v(42)},get createDivide(){return v(44)},get createModulo(){return v(45)},get createExponent(){return v(43)},get createPrefixPlus(){return A(40)},get createPrefixMinus(){return A(41)},get createPrefixIncrement(){return A(46)},get createPrefixDecrement(){return A(47)},get createBitwiseNot(){return A(55)},get createLogicalNot(){return A(54)},get createPostfixIncrement(){return P(46)},get createPostfixDecrement(){return P(47)},createImmediatelyInvokedFunctionExpression:rp,createImmediatelyInvokedArrowFunction:ip,createVoidZero:si,createExportDefault:Wc,createExternalModuleExport:ap,createTypeCheck:Y_,createIsNotTypeCheck:_p,createMethodCall:zr,createGlobalMethodCall:ji,createFunctionBindCall:sp,createFunctionCallCall:op,createFunctionApplyCall:cp,createArraySliceCall:Ri,createArrayConcatCall:lp,createObjectDefinePropertyCall:X_,createObjectGetOwnPropertyDescriptorCall:oi,createReflectGetCall:Gc,createReflectSetCall:up,createPropertyDescriptor:Yc,createCallBinding:Hc,createAssignmentTargetWrapper:s,inlineExpressions:p,getInternalName:b,getLocalName:S,getExportName:N,getDeclarationName:H,getNamespaceMemberName:_e,getExternalModuleOrNamespaceExportName:Z,restoreOuterExpressions:Xc,restoreEnclosingLabel:H_,createUseStrictPrologue:Le,copyPrologue:ee,copyStandardPrologue:je,copyCustomPrologue:Ae,ensureUseStrict:Yt,liftToBlock:mn,mergeLexicalEnvironment:ur,replaceModifiers:Ln,replaceDecoratorsAndModifiers:Fr,replacePropertyName:dp};return Un(Db,n=>n(ye)),ye;function de(n,i){if(n===void 0||n===bt)n=[];else if(mi(n)){if(i===void 0||n.hasTrailingComma===i)return n.transformFlags===void 0&&Hd(n),B.attachNodeArrayDebugInfo(n),n;let f=n.slice();return f.pos=n.pos,f.end=n.end,f.hasTrailingComma=i,f.transformFlags=n.transformFlags,B.attachNodeArrayDebugInfo(f),f}let _=n.length,c=_>=1&&_<=4?n.slice():n;return c.pos=-1,c.end=-1,c.hasTrailingComma=!!i,c.transformFlags=0,Hd(c),B.attachNodeArrayDebugInfo(c),c}function M(n){return t.createBaseNode(n)}function ae(n){let i=M(n);return i.symbol=void 0,i.localSymbol=void 0,i}function Oe(n,i){return n!==i&&(n.typeArguments=i.typeArguments),q(n,i)}function V(n,i=0){let _=typeof n=="number"?n+"":n;B.assert(_.charCodeAt(0)!==45,"Negative numbers should be created in combination with createPrefixUnaryExpression");let c=ae(9);return c.text=_,c.numericLiteralFlags=i,i&384&&(c.transformFlags|=1024),c}function oe(n){let i=$t(10);return i.text=typeof n=="string"?n:vb(n)+"n",i.transformFlags|=32,i}function W(n,i){let _=ae(11);return _.text=n,_.singleQuote=i,_}function dt(n,i,_){let c=W(n,i);return c.hasExtendedUnicodeEscape=_,_&&(c.transformFlags|=1024),c}function nr(n){let i=W(L2(n),void 0);return i.textSourceNode=n,i}function gn(n){let i=$t(14);return i.text=n,i}function rr(n,i){switch(n){case 9:return V(i,0);case 10:return oe(i);case 11:return dt(i,void 0);case 12:return Sa(i,!1);case 13:return Sa(i,!0);case 14:return gn(i);case 15:return ii(n,i,void 0,0)}}function bn(n){let i=t.createBaseIdentifierNode(80);return i.escapedText=n,i.jsDoc=void 0,i.flowNode=void 0,i.symbol=void 0,i}function In(n,i,_,c){let f=bn(Ja(n));return setIdentifierAutoGenerate(f,{flags:i,id:rl,prefix:_,suffix:c}),rl++,f}function Ge(n,i,_){i===void 0&&n&&(i=Fm(n)),i===80&&(i=void 0);let c=bn(Ja(n));return _&&(c.flags|=256),c.escapedText==="await"&&(c.transformFlags|=67108864),c.flags&256&&(c.transformFlags|=1024),c}function ir(n,i,_,c){let f=1;i&&(f|=8);let w=In("",f,_,c);return n&&n(w),w}function Pr(n){let i=2;return n&&(i|=8),In("",i,void 0,void 0)}function Ot(n,i=0,_,c){return B.assert(!(i&7),"Argument out of range: flags"),B.assert((i&48)!==32,"GeneratedIdentifierFlags.FileLevel cannot be set without also setting GeneratedIdentifierFlags.Optimistic"),In(n,3|i,_,c)}function Bn(n,i=0,_,c){B.assert(!(i&7),"Argument out of range: flags");let f=n?jp(n)?Vp(!1,_,n,c,Pn):`generated@${getNodeId(n)}`:"";(_||c)&&(i|=16);let w=In(f,4|i,_,c);return w.original=n,w}function On(n){let i=t.createBasePrivateIdentifierNode(81);return i.escapedText=n,i.transformFlags|=16777216,i}function Mt(n){return ul(n,"#")||B.fail("First character of private identifier must be #: "+n),On(Ja(n))}function vt(n,i,_,c){let f=On(Ja(n));return setIdentifierAutoGenerate(f,{flags:i,id:rl,prefix:_,suffix:c}),rl++,f}function Qe(n,i,_){n&&!ul(n,"#")&&B.fail("First character of private identifier must be #: "+n);let c=8|(n?3:1);return vt(n??"",c,i,_)}function qn(n,i,_){let c=jp(n)?Vp(!0,i,n,_,Pn):`#generated@${getNodeId(n)}`,w=vt(c,4|(i||_?16:0),i,_);return w.original=n,w}function $t(n){return t.createBaseTokenNode(n)}function ct(n){B.assert(n>=0&&n<=165,"Invalid token"),B.assert(n<=15||n>=18,"Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."),B.assert(n<=9||n>=15,"Invalid token. Use 'createLiteralLikeNode' to create literals."),B.assert(n!==80,"Invalid token. Use 'createIdentifier' to create identifiers");let i=$t(n),_=0;switch(n){case 134:_=384;break;case 160:_=4;break;case 125:case 123:case 124:case 148:case 128:case 138:case 87:case 133:case 150:case 163:case 146:case 151:case 103:case 147:case 164:case 154:case 136:case 155:case 116:case 159:case 157:_=1;break;case 108:_=134218752,i.flowNode=void 0;break;case 126:_=1024;break;case 129:_=16777216;break;case 110:_=16384,i.flowNode=void 0;break}return _&&(i.transformFlags|=_),i}function _t(){return ct(108)}function Ut(){return ct(110)}function Jt(){return ct(106)}function lt(){return ct(112)}function ar(){return ct(97)}function mt(n){return ct(n)}function vn(n){let i=[];return n&32&&i.push(mt(95)),n&128&&i.push(mt(138)),n&2048&&i.push(mt(90)),n&4096&&i.push(mt(87)),n&1&&i.push(mt(125)),n&2&&i.push(mt(123)),n&4&&i.push(mt(124)),n&64&&i.push(mt(128)),n&256&&i.push(mt(126)),n&16&&i.push(mt(164)),n&8&&i.push(mt(148)),n&512&&i.push(mt(129)),n&1024&&i.push(mt(134)),n&8192&&i.push(mt(103)),n&16384&&i.push(mt(147)),i.length?i:void 0}function yt(n,i){let _=M(166);return _.left=n,_.right=et(i),_.transformFlags|=z(_.left)|ja(_.right),_.flowNode=void 0,_}function cn(n,i,_){return n.left!==i||n.right!==_?q(yt(i,_),n):n}function nt(n){let i=M(167);return i.expression=o().parenthesizeExpressionOfComputedPropertyName(n),i.transformFlags|=z(i.expression)|1024|131072,i}function Bt(n,i){return n.expression!==i?q(nt(i),n):n}function rn(n,i,_,c){let f=ae(168);return f.modifiers=De(n),f.name=et(i),f.constraint=_,f.default=c,f.transformFlags=1,f.expression=void 0,f.jsDoc=void 0,f}function _r(n,i,_,c,f){return n.modifiers!==i||n.name!==_||n.constraint!==c||n.default!==f?q(rn(i,_,c,f),n):n}function fr(n,i,_,c,f,w){let F=ae(169);return F.modifiers=De(n),F.dotDotDotToken=i,F.name=et(_),F.questionToken=c,F.type=f,F.initializer=Da(w),R2(F.name)?F.transformFlags=1:F.transformFlags=ke(F.modifiers)|z(F.dotDotDotToken)|jn(F.name)|z(F.questionToken)|z(F.initializer)|(F.questionToken??F.type?1:0)|(F.dotDotDotToken??F.initializer?1024:0)|(Rn(F.modifiers)&31?8192:0),F.jsDoc=void 0,F}function dr(n,i,_,c,f,w,F){return n.modifiers!==i||n.dotDotDotToken!==_||n.name!==c||n.questionToken!==f||n.type!==w||n.initializer!==F?q(fr(i,_,c,f,w,F),n):n}function zn(n){let i=M(170);return i.expression=o().parenthesizeLeftSideOfAccess(n,!1),i.transformFlags|=z(i.expression)|1|8192|33554432,i}function Fn(n,i){return n.expression!==i?q(zn(i),n):n}function Nr(n,i,_,c){let f=ae(171);return f.modifiers=De(n),f.name=et(i),f.type=c,f.questionToken=_,f.transformFlags=1,f.initializer=void 0,f.jsDoc=void 0,f}function Vn(n,i,_,c,f){return n.modifiers!==i||n.name!==_||n.questionToken!==c||n.type!==f?Ce(Nr(i,_,c,f),n):n}function Ce(n,i){return n!==i&&(n.initializer=i.initializer),q(n,i)}function mr(n,i,_,c,f){let w=ae(172);w.modifiers=De(n),w.name=et(i),w.questionToken=_&&Qd(_)?_:void 0,w.exclamationToken=_&&$d(_)?_:void 0,w.type=c,w.initializer=Da(f);let F=w.flags&33554432||Rn(w.modifiers)&128;return w.transformFlags=ke(w.modifiers)|jn(w.name)|z(w.initializer)|(F||w.questionToken||w.exclamationToken||w.type?1:0)|(kf(w.name)||Rn(w.modifiers)&256&&w.initializer?8192:0)|16777216,w.jsDoc=void 0,w}function L(n,i,_,c,f,w){return n.modifiers!==i||n.name!==_||n.questionToken!==(c!==void 0&&Qd(c)?c:void 0)||n.exclamationToken!==(c!==void 0&&$d(c)?c:void 0)||n.type!==f||n.initializer!==w?q(mr(i,_,c,f,w),n):n}function se(n,i,_,c,f,w){let F=ae(173);return F.modifiers=De(n),F.name=et(i),F.questionToken=_,F.typeParameters=De(c),F.parameters=De(f),F.type=w,F.transformFlags=1,F.jsDoc=void 0,F.locals=void 0,F.nextContainer=void 0,F.typeArguments=void 0,F}function fe(n,i,_,c,f,w,F){return n.modifiers!==i||n.name!==_||n.questionToken!==c||n.typeParameters!==f||n.parameters!==w||n.type!==F?Oe(se(i,_,c,f,w,F),n):n}function Te(n,i,_,c,f,w,F,pe){let Re=ae(174);if(Re.modifiers=De(n),Re.asteriskToken=i,Re.name=et(_),Re.questionToken=c,Re.exclamationToken=void 0,Re.typeParameters=De(f),Re.parameters=de(w),Re.type=F,Re.body=pe,!Re.body)Re.transformFlags=1;else{let en=Rn(Re.modifiers)&1024,kn=!!Re.asteriskToken,$n=en&&kn;Re.transformFlags=ke(Re.modifiers)|z(Re.asteriskToken)|jn(Re.name)|z(Re.questionToken)|ke(Re.typeParameters)|ke(Re.parameters)|z(Re.type)|z(Re.body)&-67108865|($n?128:en?256:kn?2048:0)|(Re.questionToken||Re.typeParameters||Re.type?1:0)|1024}return Re.typeArguments=void 0,Re.jsDoc=void 0,Re.locals=void 0,Re.nextContainer=void 0,Re.flowNode=void 0,Re.endFlowNode=void 0,Re.returnFlowNode=void 0,Re}function He(n,i,_,c,f,w,F,pe,Re){return n.modifiers!==i||n.asteriskToken!==_||n.name!==c||n.questionToken!==f||n.typeParameters!==w||n.parameters!==F||n.type!==pe||n.body!==Re?Ke(Te(i,_,c,f,w,F,pe,Re),n):n}function Ke(n,i){return n!==i&&(n.exclamationToken=i.exclamationToken),q(n,i)}function st(n){let i=ae(175);return i.body=n,i.transformFlags=z(n)|16777216,i.modifiers=void 0,i.jsDoc=void 0,i.locals=void 0,i.nextContainer=void 0,i.endFlowNode=void 0,i.returnFlowNode=void 0,i}function Dt(n,i){return n.body!==i?Tt(st(i),n):n}function Tt(n,i){return n!==i&&(n.modifiers=i.modifiers),q(n,i)}function ut(n,i,_){let c=ae(176);return c.modifiers=De(n),c.parameters=de(i),c.body=_,c.body?c.transformFlags=ke(c.modifiers)|ke(c.parameters)|z(c.body)&-67108865|1024:c.transformFlags=1,c.typeParameters=void 0,c.type=void 0,c.typeArguments=void 0,c.jsDoc=void 0,c.locals=void 0,c.nextContainer=void 0,c.endFlowNode=void 0,c.returnFlowNode=void 0,c}function Ir(n,i,_,c){return n.modifiers!==i||n.parameters!==_||n.body!==c?hr(ut(i,_,c),n):n}function hr(n,i){return n!==i&&(n.typeParameters=i.typeParameters,n.type=i.type),Oe(n,i)}function Mn(n,i,_,c,f){let w=ae(177);return w.modifiers=De(n),w.name=et(i),w.parameters=de(_),w.type=c,w.body=f,w.body?w.transformFlags=ke(w.modifiers)|jn(w.name)|ke(w.parameters)|z(w.type)|z(w.body)&-67108865|(w.type?1:0):w.transformFlags=1,w.typeArguments=void 0,w.typeParameters=void 0,w.jsDoc=void 0,w.locals=void 0,w.nextContainer=void 0,w.flowNode=void 0,w.endFlowNode=void 0,w.returnFlowNode=void 0,w}function Wn(n,i,_,c,f,w){return n.modifiers!==i||n.name!==_||n.parameters!==c||n.type!==f||n.body!==w?Si(Mn(i,_,c,f,w),n):n}function Si(n,i){return n!==i&&(n.typeParameters=i.typeParameters),Oe(n,i)}function R(n,i,_,c){let f=ae(178);return f.modifiers=De(n),f.name=et(i),f.parameters=de(_),f.body=c,f.body?f.transformFlags=ke(f.modifiers)|jn(f.name)|ke(f.parameters)|z(f.body)&-67108865|(f.type?1:0):f.transformFlags=1,f.typeArguments=void 0,f.typeParameters=void 0,f.type=void 0,f.jsDoc=void 0,f.locals=void 0,f.nextContainer=void 0,f.flowNode=void 0,f.endFlowNode=void 0,f.returnFlowNode=void 0,f}function $(n,i,_,c,f){return n.modifiers!==i||n.name!==_||n.parameters!==c||n.body!==f?K(R(i,_,c,f),n):n}function K(n,i){return n!==i&&(n.typeParameters=i.typeParameters,n.type=i.type),Oe(n,i)}function xe(n,i,_){let c=ae(179);return c.typeParameters=De(n),c.parameters=De(i),c.type=_,c.transformFlags=1,c.jsDoc=void 0,c.locals=void 0,c.nextContainer=void 0,c.typeArguments=void 0,c}function Se(n,i,_,c){return n.typeParameters!==i||n.parameters!==_||n.type!==c?Oe(xe(i,_,c),n):n}function we(n,i,_){let c=ae(180);return c.typeParameters=De(n),c.parameters=De(i),c.type=_,c.transformFlags=1,c.jsDoc=void 0,c.locals=void 0,c.nextContainer=void 0,c.typeArguments=void 0,c}function be(n,i,_,c){return n.typeParameters!==i||n.parameters!==_||n.type!==c?Oe(we(i,_,c),n):n}function We(n,i,_){let c=ae(181);return c.modifiers=De(n),c.parameters=De(i),c.type=_,c.transformFlags=1,c.jsDoc=void 0,c.locals=void 0,c.nextContainer=void 0,c.typeArguments=void 0,c}function Ze(n,i,_,c){return n.parameters!==_||n.type!==c||n.modifiers!==i?Oe(We(i,_,c),n):n}function Ye(n,i){let _=M(204);return _.type=n,_.literal=i,_.transformFlags=1,_}function Ee(n,i,_){return n.type!==i||n.literal!==_?q(Ye(i,_),n):n}function Tn(n){return ct(n)}function rt(n,i,_){let c=M(182);return c.assertsModifier=n,c.parameterName=et(i),c.type=_,c.transformFlags=1,c}function ln(n,i,_,c){return n.assertsModifier!==i||n.parameterName!==_||n.type!==c?q(rt(i,_,c),n):n}function Zr(n,i){let _=M(183);return _.typeName=et(n),_.typeArguments=i&&o().parenthesizeTypeArguments(de(i)),_.transformFlags=1,_}function J(n,i,_){return n.typeName!==i||n.typeArguments!==_?q(Zr(i,_),n):n}function qe(n,i,_){let c=ae(184);return c.typeParameters=De(n),c.parameters=De(i),c.type=_,c.transformFlags=1,c.modifiers=void 0,c.jsDoc=void 0,c.locals=void 0,c.nextContainer=void 0,c.typeArguments=void 0,c}function u(n,i,_,c){return n.typeParameters!==i||n.parameters!==_||n.type!==c?Ne(qe(i,_,c),n):n}function Ne(n,i){return n!==i&&(n.modifiers=i.modifiers),Oe(n,i)}function Me(...n){return n.length===4?U(...n):n.length===3?ze(...n):B.fail("Incorrect number of arguments specified.")}function U(n,i,_,c){let f=ae(185);return f.modifiers=De(n),f.typeParameters=De(i),f.parameters=De(_),f.type=c,f.transformFlags=1,f.jsDoc=void 0,f.locals=void 0,f.nextContainer=void 0,f.typeArguments=void 0,f}function ze(n,i,_){return U(void 0,n,i,_)}function an(...n){return n.length===5?Ve(...n):n.length===4?$e(...n):B.fail("Incorrect number of arguments specified.")}function Ve(n,i,_,c,f){return n.modifiers!==i||n.typeParameters!==_||n.parameters!==c||n.type!==f?Oe(Me(i,_,c,f),n):n}function $e(n,i,_,c){return Ve(n,n.modifiers,i,_,c)}function Pt(n,i){let _=M(186);return _.exprName=n,_.typeArguments=i&&o().parenthesizeTypeArguments(i),_.transformFlags=1,_}function kt(n,i,_){return n.exprName!==i||n.typeArguments!==_?q(Pt(i,_),n):n}function Nt(n){let i=ae(187);return i.members=de(n),i.transformFlags=1,i}function qt(n,i){return n.members!==i?q(Nt(i),n):n}function Gn(n){let i=M(188);return i.elementType=o().parenthesizeNonArrayTypeOfPostfixType(n),i.transformFlags=1,i}function wi(n,i){return n.elementType!==i?q(Gn(i),n):n}function un(n){let i=M(189);return i.elements=de(o().parenthesizeElementTypesOfTupleType(n)),i.transformFlags=1,i}function G(n,i){return n.elements!==i?q(un(i),n):n}function le(n,i,_,c){let f=ae(202);return f.dotDotDotToken=n,f.name=i,f.questionToken=_,f.type=c,f.transformFlags=1,f.jsDoc=void 0,f}function Fe(n,i,_,c,f){return n.dotDotDotToken!==i||n.name!==_||n.questionToken!==c||n.type!==f?q(le(i,_,c,f),n):n}function ve(n){let i=M(190);return i.type=o().parenthesizeTypeOfOptionalType(n),i.transformFlags=1,i}function j(n,i){return n.type!==i?q(ve(i),n):n}function ht(n){let i=M(191);return i.type=n,i.transformFlags=1,i}function xt(n,i){return n.type!==i?q(ht(i),n):n}function Lt(n,i,_){let c=M(n);return c.types=ye.createNodeArray(_(i)),c.transformFlags=1,c}function pn(n,i,_){return n.types!==i?q(Lt(n.kind,i,_),n):n}function Ul(n){return Lt(192,n,o().parenthesizeConstituentTypesOfUnionType)}function Es(n,i){return pn(n,i,o().parenthesizeConstituentTypesOfUnionType)}function Or(n){return Lt(193,n,o().parenthesizeConstituentTypesOfIntersectionType)}function Je(n,i){return pn(n,i,o().parenthesizeConstituentTypesOfIntersectionType)}function ft(n,i,_,c){let f=M(194);return f.checkType=o().parenthesizeCheckTypeOfConditionalType(n),f.extendsType=o().parenthesizeExtendsTypeOfConditionalType(i),f.trueType=_,f.falseType=c,f.transformFlags=1,f.locals=void 0,f.nextContainer=void 0,f}function Bl(n,i,_,c,f){return n.checkType!==i||n.extendsType!==_||n.trueType!==c||n.falseType!==f?q(ft(i,_,c,f),n):n}function Yn(n){let i=M(195);return i.typeParameter=n,i.transformFlags=1,i}function ql(n,i){return n.typeParameter!==i?q(Yn(i),n):n}function Wt(n,i){let _=M(203);return _.head=n,_.templateSpans=de(i),_.transformFlags=1,_}function zl(n,i,_){return n.head!==i||n.templateSpans!==_?q(Wt(i,_),n):n}function sr(n,i,_,c,f=!1){let w=M(205);return w.argument=n,w.attributes=i,w.assertions&&w.assertions.assertClause&&w.attributes&&(w.assertions.assertClause=w.attributes),w.qualifier=_,w.typeArguments=c&&o().parenthesizeTypeArguments(c),w.isTypeOf=f,w.transformFlags=1,w}function aa(n,i,_,c,f,w=n.isTypeOf){return n.argument!==i||n.attributes!==_||n.qualifier!==c||n.typeArguments!==f||n.isTypeOf!==w?q(sr(i,_,c,f,w),n):n}function Qt(n){let i=M(196);return i.type=n,i.transformFlags=1,i}function Ct(n,i){return n.type!==i?q(Qt(i),n):n}function D(){let n=M(197);return n.transformFlags=1,n}function Gt(n,i){let _=M(198);return _.operator=n,_.type=n===148?o().parenthesizeOperandOfReadonlyTypeOperator(i):o().parenthesizeOperandOfTypeOperator(i),_.transformFlags=1,_}function Mr(n,i){return n.type!==i?q(Gt(n.operator,i),n):n}function or(n,i){let _=M(199);return _.objectType=o().parenthesizeNonArrayTypeOfPostfixType(n),_.indexType=i,_.transformFlags=1,_}function Ka(n,i,_){return n.objectType!==i||n.indexType!==_?q(or(i,_),n):n}function St(n,i,_,c,f,w){let F=ae(200);return F.readonlyToken=n,F.typeParameter=i,F.nameType=_,F.questionToken=c,F.type=f,F.members=w&&de(w),F.transformFlags=1,F.locals=void 0,F.nextContainer=void 0,F}function jt(n,i,_,c,f,w,F){return n.readonlyToken!==i||n.typeParameter!==_||n.nameType!==c||n.questionToken!==f||n.type!==w||n.members!==F?q(St(i,_,c,f,w,F),n):n}function ei(n){let i=M(201);return i.literal=n,i.transformFlags=1,i}function yr(n,i){return n.literal!==i?q(ei(i),n):n}function As(n){let i=M(206);return i.elements=de(n),i.transformFlags|=ke(i.elements)|1024|524288,i.transformFlags&32768&&(i.transformFlags|=65664),i}function Fl(n,i){return n.elements!==i?q(As(i),n):n}function Jr(n){let i=M(207);return i.elements=de(n),i.transformFlags|=ke(i.elements)|1024|524288,i}function Vl(n,i){return n.elements!==i?q(Jr(i),n):n}function _a(n,i,_,c){let f=ae(208);return f.dotDotDotToken=n,f.propertyName=et(i),f.name=et(_),f.initializer=Da(c),f.transformFlags|=z(f.dotDotDotToken)|jn(f.propertyName)|jn(f.name)|z(f.initializer)|(f.dotDotDotToken?32768:0)|1024,f.flowNode=void 0,f}function ti(n,i,_,c,f){return n.propertyName!==_||n.dotDotDotToken!==i||n.name!==c||n.initializer!==f?q(_a(i,_,c,f),n):n}function Za(n,i){let _=M(209),c=n&&Yi(n),f=de(n,c&&H1(c)?!0:void 0);return _.elements=o().parenthesizeExpressionsOfCommaDelimitedList(f),_.multiLine=i,_.transformFlags|=ke(_.elements),_}function Cs(n,i){return n.elements!==i?q(Za(i,n.multiLine),n):n}function ki(n,i){let _=ae(210);return _.properties=de(n),_.multiLine=i,_.transformFlags|=ke(_.properties),_.jsDoc=void 0,_}function Wl(n,i){return n.properties!==i?q(ki(i,n.multiLine),n):n}function Ds(n,i,_){let c=ae(211);return c.expression=n,c.questionDotToken=i,c.name=_,c.transformFlags=z(c.expression)|z(c.questionDotToken)|(tt(c.name)?ja(c.name):z(c.name)|536870912),c.jsDoc=void 0,c.flowNode=void 0,c}function cr(n,i){let _=Ds(o().parenthesizeLeftSideOfAccess(n,!1),void 0,et(i));return Ap(n)&&(_.transformFlags|=384),_}function Gl(n,i,_){return Ig(n)?sa(n,i,n.questionDotToken,kr(_,tt)):n.expression!==i||n.name!==_?q(cr(i,_),n):n}function Ei(n,i,_){let c=Ds(o().parenthesizeLeftSideOfAccess(n,!0),i,et(_));return c.flags|=64,c.transformFlags|=32,c}function sa(n,i,_,c){return B.assert(!!(n.flags&64),"Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."),n.expression!==i||n.questionDotToken!==_||n.name!==c?q(Ei(i,_,c),n):n}function Ps(n,i,_){let c=ae(212);return c.expression=n,c.questionDotToken=i,c.argumentExpression=_,c.transformFlags|=z(c.expression)|z(c.questionDotToken)|z(c.argumentExpression),c.jsDoc=void 0,c.flowNode=void 0,c}function Ai(n,i){let _=Ps(o().parenthesizeLeftSideOfAccess(n,!1),void 0,pr(i));return Ap(n)&&(_.transformFlags|=384),_}function Yl(n,i,_){return Og(n)?e_(n,i,n.questionDotToken,_):n.expression!==i||n.argumentExpression!==_?q(Ai(i,_),n):n}function Ns(n,i,_){let c=Ps(o().parenthesizeLeftSideOfAccess(n,!0),i,pr(_));return c.flags|=64,c.transformFlags|=32,c}function e_(n,i,_,c){return B.assert(!!(n.flags&64),"Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."),n.expression!==i||n.questionDotToken!==_||n.argumentExpression!==c?q(Ns(i,_,c),n):n}function Is(n,i,_,c){let f=ae(213);return f.expression=n,f.questionDotToken=i,f.typeArguments=_,f.arguments=c,f.transformFlags|=z(f.expression)|z(f.questionDotToken)|ke(f.typeArguments)|ke(f.arguments),f.typeArguments&&(f.transformFlags|=1),zd(f.expression)&&(f.transformFlags|=16384),f}function Ci(n,i,_){let c=Is(o().parenthesizeLeftSideOfAccess(n,!1),void 0,De(i),o().parenthesizeExpressionsOfCommaDelimitedList(de(_)));return Ub(c.expression)&&(c.transformFlags|=8388608),c}function oa(n,i,_,c){return Jd(n)?Os(n,i,n.questionDotToken,_,c):n.expression!==i||n.typeArguments!==_||n.arguments!==c?q(Ci(i,_,c),n):n}function t_(n,i,_,c){let f=Is(o().parenthesizeLeftSideOfAccess(n,!0),i,De(_),o().parenthesizeExpressionsOfCommaDelimitedList(de(c)));return f.flags|=64,f.transformFlags|=32,f}function Os(n,i,_,c,f){return B.assert(!!(n.flags&64),"Cannot update a CallExpression using updateCallChain. Use updateCall instead."),n.expression!==i||n.questionDotToken!==_||n.typeArguments!==c||n.arguments!==f?q(t_(i,_,c,f),n):n}function xn(n,i,_){let c=ae(214);return c.expression=o().parenthesizeExpressionOfNew(n),c.typeArguments=De(i),c.arguments=_?o().parenthesizeExpressionsOfCommaDelimitedList(_):void 0,c.transformFlags|=z(c.expression)|ke(c.typeArguments)|ke(c.arguments)|32,c.typeArguments&&(c.transformFlags|=1),c}function n_(n,i,_,c){return n.expression!==i||n.typeArguments!==_||n.arguments!==c?q(xn(i,_,c),n):n}function ca(n,i,_){let c=M(215);return c.tag=o().parenthesizeLeftSideOfAccess(n,!1),c.typeArguments=De(i),c.template=_,c.transformFlags|=z(c.tag)|ke(c.typeArguments)|z(c.template)|1024,c.typeArguments&&(c.transformFlags|=1),j2(c.template)&&(c.transformFlags|=128),c}function Ms(n,i,_,c){return n.tag!==i||n.typeArguments!==_||n.template!==c?q(ca(i,_,c),n):n}function Js(n,i){let _=M(216);return _.expression=o().parenthesizeOperandOfPrefixUnary(i),_.type=n,_.transformFlags|=z(_.expression)|z(_.type)|1,_}function Ls(n,i,_){return n.type!==i||n.expression!==_?q(Js(i,_),n):n}function r_(n){let i=M(217);return i.expression=n,i.transformFlags=z(i.expression),i.jsDoc=void 0,i}function js(n,i){return n.expression!==i?q(r_(i),n):n}function i_(n,i,_,c,f,w,F){let pe=ae(218);pe.modifiers=De(n),pe.asteriskToken=i,pe.name=et(_),pe.typeParameters=De(c),pe.parameters=de(f),pe.type=w,pe.body=F;let Re=Rn(pe.modifiers)&1024,en=!!pe.asteriskToken,kn=Re&&en;return pe.transformFlags=ke(pe.modifiers)|z(pe.asteriskToken)|jn(pe.name)|ke(pe.typeParameters)|ke(pe.parameters)|z(pe.type)|z(pe.body)&-67108865|(kn?128:Re?256:en?2048:0)|(pe.typeParameters||pe.type?1:0)|4194304,pe.typeArguments=void 0,pe.jsDoc=void 0,pe.locals=void 0,pe.nextContainer=void 0,pe.flowNode=void 0,pe.endFlowNode=void 0,pe.returnFlowNode=void 0,pe}function Rs(n,i,_,c,f,w,F,pe){return n.name!==c||n.modifiers!==i||n.asteriskToken!==_||n.typeParameters!==f||n.parameters!==w||n.type!==F||n.body!==pe?Oe(i_(i,_,c,f,w,F,pe),n):n}function a_(n,i,_,c,f,w){let F=ae(219);F.modifiers=De(n),F.typeParameters=De(i),F.parameters=de(_),F.type=c,F.equalsGreaterThanToken=f??ct(39),F.body=o().parenthesizeConciseBodyOfArrowFunction(w);let pe=Rn(F.modifiers)&1024;return F.transformFlags=ke(F.modifiers)|ke(F.typeParameters)|ke(F.parameters)|z(F.type)|z(F.equalsGreaterThanToken)|z(F.body)&-67108865|(F.typeParameters||F.type?1:0)|(pe?16640:0)|1024,F.typeArguments=void 0,F.jsDoc=void 0,F.locals=void 0,F.nextContainer=void 0,F.flowNode=void 0,F.endFlowNode=void 0,F.returnFlowNode=void 0,F}function Us(n,i,_,c,f,w,F){return n.modifiers!==i||n.typeParameters!==_||n.parameters!==c||n.type!==f||n.equalsGreaterThanToken!==w||n.body!==F?Oe(a_(i,_,c,f,w,F),n):n}function Bs(n){let i=M(220);return i.expression=o().parenthesizeOperandOfPrefixUnary(n),i.transformFlags|=z(i.expression),i}function qs(n,i){return n.expression!==i?q(Bs(i),n):n}function la(n){let i=M(221);return i.expression=o().parenthesizeOperandOfPrefixUnary(n),i.transformFlags|=z(i.expression),i}function fn(n,i){return n.expression!==i?q(la(i),n):n}function __(n){let i=M(222);return i.expression=o().parenthesizeOperandOfPrefixUnary(n),i.transformFlags|=z(i.expression),i}function lr(n,i){return n.expression!==i?q(__(i),n):n}function zs(n){let i=M(223);return i.expression=o().parenthesizeOperandOfPrefixUnary(n),i.transformFlags|=z(i.expression)|256|128|2097152,i}function Lr(n,i){return n.expression!==i?q(zs(i),n):n}function jr(n,i){let _=M(224);return _.operator=n,_.operand=o().parenthesizeOperandOfPrefixUnary(i),_.transformFlags|=z(_.operand),(n===46||n===47)&&tt(_.operand)&&!Ua(_.operand)&&!Zd(_.operand)&&(_.transformFlags|=268435456),_}function Xl(n,i){return n.operand!==i?q(jr(n.operator,i),n):n}function ni(n,i){let _=M(225);return _.operator=i,_.operand=o().parenthesizeOperandOfPostfixUnary(n),_.transformFlags|=z(_.operand),tt(_.operand)&&!Ua(_.operand)&&!Zd(_.operand)&&(_.transformFlags|=268435456),_}function Hl(n,i){return n.operand!==i?q(ni(i,n.operator),n):n}function ua(n,i,_){let c=ae(226),f=$c(i),w=f.kind;return c.left=o().parenthesizeLeftSideOfBinary(w,n),c.operatorToken=f,c.right=o().parenthesizeRightSideOfBinary(w,c.left,_),c.transformFlags|=z(c.left)|z(c.operatorToken)|z(c.right),w===61?c.transformFlags|=32:w===64?If(c.left)?c.transformFlags|=5248|Fs(c.left):W1(c.left)&&(c.transformFlags|=5120|Fs(c.left)):w===43||w===68?c.transformFlags|=512:X2(w)&&(c.transformFlags|=16),w===103&&gi(c.left)&&(c.transformFlags|=536870912),c.jsDoc=void 0,c}function Fs(n){return uh(n)?65536:0}function $l(n,i,_,c){return n.left!==i||n.operatorToken!==_||n.right!==c?q(ua(i,_,c),n):n}function Vs(n,i,_,c,f){let w=M(227);return w.condition=o().parenthesizeConditionOfConditionalExpression(n),w.questionToken=i??ct(58),w.whenTrue=o().parenthesizeBranchOfConditionalExpression(_),w.colonToken=c??ct(59),w.whenFalse=o().parenthesizeBranchOfConditionalExpression(f),w.transformFlags|=z(w.condition)|z(w.questionToken)|z(w.whenTrue)|z(w.colonToken)|z(w.whenFalse),w}function Ws(n,i,_,c,f,w){return n.condition!==i||n.questionToken!==_||n.whenTrue!==c||n.colonToken!==f||n.whenFalse!==w?q(Vs(i,_,c,f,w),n):n}function Gs(n,i){let _=M(228);return _.head=n,_.templateSpans=de(i),_.transformFlags|=z(_.head)|ke(_.templateSpans)|1024,_}function Xn(n,i,_){return n.head!==i||n.templateSpans!==_?q(Gs(i,_),n):n}function Di(n,i,_,c=0){B.assert(!(c&-7177),"Unsupported template flags.");let f;if(_!==void 0&&_!==i&&(f=Pb(n,_),typeof f=="object"))return B.fail("Invalid raw text");if(i===void 0){if(f===void 0)return B.fail("Arguments 'text' and 'rawText' may not both be undefined.");i=f}else f!==void 0&&B.assert(i===f,"Expected argument 'text' to be the normalized (i.e. 'cooked') version of argument 'rawText'.");return i}function Ys(n){let i=1024;return n&&(i|=128),i}function Ql(n,i,_,c){let f=$t(n);return f.text=i,f.rawText=_,f.templateFlags=c&7176,f.transformFlags=Ys(f.templateFlags),f}function ri(n,i,_,c){let f=ae(n);return f.text=i,f.rawText=_,f.templateFlags=c&7176,f.transformFlags=Ys(f.templateFlags),f}function ii(n,i,_,c){return n===15?ri(n,i,_,c):Ql(n,i,_,c)}function Xs(n,i,_){return n=Di(16,n,i,_),ii(16,n,i,_)}function pa(n,i,_){return n=Di(16,n,i,_),ii(17,n,i,_)}function s_(n,i,_){return n=Di(16,n,i,_),ii(18,n,i,_)}function Kl(n,i,_){return n=Di(16,n,i,_),ri(15,n,i,_)}function o_(n,i){B.assert(!n||!!i,"A `YieldExpression` with an asteriskToken must have an expression.");let _=M(229);return _.expression=i&&o().parenthesizeExpressionForDisallowedComma(i),_.asteriskToken=n,_.transformFlags|=z(_.expression)|z(_.asteriskToken)|1024|128|1048576,_}function Zl(n,i,_){return n.expression!==_||n.asteriskToken!==i?q(o_(i,_),n):n}function Hs(n){let i=M(230);return i.expression=o().parenthesizeExpressionForDisallowedComma(n),i.transformFlags|=z(i.expression)|1024|32768,i}function eu(n,i){return n.expression!==i?q(Hs(i),n):n}function $s(n,i,_,c,f){let w=ae(231);return w.modifiers=De(n),w.name=et(i),w.typeParameters=De(_),w.heritageClauses=De(c),w.members=de(f),w.transformFlags|=ke(w.modifiers)|jn(w.name)|ke(w.typeParameters)|ke(w.heritageClauses)|ke(w.members)|(w.typeParameters?1:0)|1024,w.jsDoc=void 0,w}function c_(n,i,_,c,f,w){return n.modifiers!==i||n.name!==_||n.typeParameters!==c||n.heritageClauses!==f||n.members!==w?q($s(i,_,c,f,w),n):n}function l_(){return M(232)}function Qs(n,i){let _=M(233);return _.expression=o().parenthesizeLeftSideOfAccess(n,!1),_.typeArguments=i&&o().parenthesizeTypeArguments(i),_.transformFlags|=z(_.expression)|ke(_.typeArguments)|1024,_}function Ks(n,i,_){return n.expression!==i||n.typeArguments!==_?q(Qs(i,_),n):n}function dn(n,i){let _=M(234);return _.expression=n,_.type=i,_.transformFlags|=z(_.expression)|z(_.type)|1,_}function fa(n,i,_){return n.expression!==i||n.type!==_?q(dn(i,_),n):n}function Zs(n){let i=M(235);return i.expression=o().parenthesizeLeftSideOfAccess(n,!1),i.transformFlags|=z(i.expression)|1,i}function eo(n,i){return Mg(n)?Jn(n,i):n.expression!==i?q(Zs(i),n):n}function u_(n,i){let _=M(238);return _.expression=n,_.type=i,_.transformFlags|=z(_.expression)|z(_.type)|1,_}function to(n,i,_){return n.expression!==i||n.type!==_?q(u_(i,_),n):n}function p_(n){let i=M(235);return i.flags|=64,i.expression=o().parenthesizeLeftSideOfAccess(n,!0),i.transformFlags|=z(i.expression)|1,i}function Jn(n,i){return B.assert(!!(n.flags&64),"Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."),n.expression!==i?q(p_(i),n):n}function no(n,i){let _=M(236);switch(_.keywordToken=n,_.name=i,_.transformFlags|=z(_.name),n){case 105:_.transformFlags|=1024;break;case 102:_.transformFlags|=32;break;default:return B.assertNever(n)}return _.flowNode=void 0,_}function f_(n,i){return n.name!==i?q(no(n.keywordToken,i),n):n}function Hn(n,i){let _=M(239);return _.expression=n,_.literal=i,_.transformFlags|=z(_.expression)|z(_.literal)|1024,_}function da(n,i,_){return n.expression!==i||n.literal!==_?q(Hn(i,_),n):n}function ro(){let n=M(240);return n.transformFlags|=1024,n}function Rr(n,i){let _=M(241);return _.statements=de(n),_.multiLine=i,_.transformFlags|=ke(_.statements),_.jsDoc=void 0,_.locals=void 0,_.nextContainer=void 0,_}function tu(n,i){return n.statements!==i?q(Rr(i,n.multiLine),n):n}function d_(n,i){let _=M(243);return _.modifiers=De(n),_.declarationList=Yr(i)?v_(i):i,_.transformFlags|=ke(_.modifiers)|z(_.declarationList),Rn(_.modifiers)&128&&(_.transformFlags=1),_.jsDoc=void 0,_.flowNode=void 0,_}function io(n,i,_){return n.modifiers!==i||n.declarationList!==_?q(d_(i,_),n):n}function ao(){let n=M(242);return n.jsDoc=void 0,n}function Pi(n){let i=M(244);return i.expression=o().parenthesizeExpressionOfExpressionStatement(n),i.transformFlags|=z(i.expression),i.jsDoc=void 0,i.flowNode=void 0,i}function _o(n,i){return n.expression!==i?q(Pi(i),n):n}function so(n,i,_){let c=M(245);return c.expression=n,c.thenStatement=It(i),c.elseStatement=It(_),c.transformFlags|=z(c.expression)|z(c.thenStatement)|z(c.elseStatement),c.jsDoc=void 0,c.flowNode=void 0,c}function oo(n,i,_,c){return n.expression!==i||n.thenStatement!==_||n.elseStatement!==c?q(so(i,_,c),n):n}function co(n,i){let _=M(246);return _.statement=It(n),_.expression=i,_.transformFlags|=z(_.statement)|z(_.expression),_.jsDoc=void 0,_.flowNode=void 0,_}function lo(n,i,_){return n.statement!==i||n.expression!==_?q(co(i,_),n):n}function uo(n,i){let _=M(247);return _.expression=n,_.statement=It(i),_.transformFlags|=z(_.expression)|z(_.statement),_.jsDoc=void 0,_.flowNode=void 0,_}function nu(n,i,_){return n.expression!==i||n.statement!==_?q(uo(i,_),n):n}function po(n,i,_,c){let f=M(248);return f.initializer=n,f.condition=i,f.incrementor=_,f.statement=It(c),f.transformFlags|=z(f.initializer)|z(f.condition)|z(f.incrementor)|z(f.statement),f.jsDoc=void 0,f.locals=void 0,f.nextContainer=void 0,f.flowNode=void 0,f}function fo(n,i,_,c,f){return n.initializer!==i||n.condition!==_||n.incrementor!==c||n.statement!==f?q(po(i,_,c,f),n):n}function m_(n,i,_){let c=M(249);return c.initializer=n,c.expression=i,c.statement=It(_),c.transformFlags|=z(c.initializer)|z(c.expression)|z(c.statement),c.jsDoc=void 0,c.locals=void 0,c.nextContainer=void 0,c.flowNode=void 0,c}function ru(n,i,_,c){return n.initializer!==i||n.expression!==_||n.statement!==c?q(m_(i,_,c),n):n}function mo(n,i,_,c){let f=M(250);return f.awaitModifier=n,f.initializer=i,f.expression=o().parenthesizeExpressionForDisallowedComma(_),f.statement=It(c),f.transformFlags|=z(f.awaitModifier)|z(f.initializer)|z(f.expression)|z(f.statement)|1024,n&&(f.transformFlags|=128),f.jsDoc=void 0,f.locals=void 0,f.nextContainer=void 0,f.flowNode=void 0,f}function iu(n,i,_,c,f){return n.awaitModifier!==i||n.initializer!==_||n.expression!==c||n.statement!==f?q(mo(i,_,c,f),n):n}function ho(n){let i=M(251);return i.label=et(n),i.transformFlags|=z(i.label)|4194304,i.jsDoc=void 0,i.flowNode=void 0,i}function au(n,i){return n.label!==i?q(ho(i),n):n}function h_(n){let i=M(252);return i.label=et(n),i.transformFlags|=z(i.label)|4194304,i.jsDoc=void 0,i.flowNode=void 0,i}function yo(n,i){return n.label!==i?q(h_(i),n):n}function y_(n){let i=M(253);return i.expression=n,i.transformFlags|=z(i.expression)|128|4194304,i.jsDoc=void 0,i.flowNode=void 0,i}function _u(n,i){return n.expression!==i?q(y_(i),n):n}function g_(n,i){let _=M(254);return _.expression=n,_.statement=It(i),_.transformFlags|=z(_.expression)|z(_.statement),_.jsDoc=void 0,_.flowNode=void 0,_}function go(n,i,_){return n.expression!==i||n.statement!==_?q(g_(i,_),n):n}function b_(n,i){let _=M(255);return _.expression=o().parenthesizeExpressionForDisallowedComma(n),_.caseBlock=i,_.transformFlags|=z(_.expression)|z(_.caseBlock),_.jsDoc=void 0,_.flowNode=void 0,_.possiblyExhaustive=!1,_}function ai(n,i,_){return n.expression!==i||n.caseBlock!==_?q(b_(i,_),n):n}function bo(n,i){let _=M(256);return _.label=et(n),_.statement=It(i),_.transformFlags|=z(_.label)|z(_.statement),_.jsDoc=void 0,_.flowNode=void 0,_}function vo(n,i,_){return n.label!==i||n.statement!==_?q(bo(i,_),n):n}function To(n){let i=M(257);return i.expression=n,i.transformFlags|=z(i.expression),i.jsDoc=void 0,i.flowNode=void 0,i}function su(n,i){return n.expression!==i?q(To(i),n):n}function xo(n,i,_){let c=M(258);return c.tryBlock=n,c.catchClause=i,c.finallyBlock=_,c.transformFlags|=z(c.tryBlock)|z(c.catchClause)|z(c.finallyBlock),c.jsDoc=void 0,c.flowNode=void 0,c}function ou(n,i,_,c){return n.tryBlock!==i||n.catchClause!==_||n.finallyBlock!==c?q(xo(i,_,c),n):n}function So(){let n=M(259);return n.jsDoc=void 0,n.flowNode=void 0,n}function ma(n,i,_,c){let f=ae(260);return f.name=et(n),f.exclamationToken=i,f.type=_,f.initializer=Da(c),f.transformFlags|=jn(f.name)|z(f.initializer)|(f.exclamationToken??f.type?1:0),f.jsDoc=void 0,f}function wo(n,i,_,c,f){return n.name!==i||n.type!==c||n.exclamationToken!==_||n.initializer!==f?q(ma(i,_,c,f),n):n}function v_(n,i=0){let _=M(261);return _.flags|=i&7,_.declarations=de(n),_.transformFlags|=ke(_.declarations)|4194304,i&7&&(_.transformFlags|=263168),i&4&&(_.transformFlags|=4),_}function cu(n,i){return n.declarations!==i?q(v_(i,n.flags),n):n}function ko(n,i,_,c,f,w,F){let pe=ae(262);if(pe.modifiers=De(n),pe.asteriskToken=i,pe.name=et(_),pe.typeParameters=De(c),pe.parameters=de(f),pe.type=w,pe.body=F,!pe.body||Rn(pe.modifiers)&128)pe.transformFlags=1;else{let Re=Rn(pe.modifiers)&1024,en=!!pe.asteriskToken,kn=Re&&en;pe.transformFlags=ke(pe.modifiers)|z(pe.asteriskToken)|jn(pe.name)|ke(pe.typeParameters)|ke(pe.parameters)|z(pe.type)|z(pe.body)&-67108865|(kn?128:Re?256:en?2048:0)|(pe.typeParameters||pe.type?1:0)|4194304}return pe.typeArguments=void 0,pe.jsDoc=void 0,pe.locals=void 0,pe.nextContainer=void 0,pe.endFlowNode=void 0,pe.returnFlowNode=void 0,pe}function T_(n,i,_,c,f,w,F,pe){return n.modifiers!==i||n.asteriskToken!==_||n.name!==c||n.typeParameters!==f||n.parameters!==w||n.type!==F||n.body!==pe?lu(ko(i,_,c,f,w,F,pe),n):n}function lu(n,i){return n!==i&&n.modifiers===i.modifiers&&(n.modifiers=i.modifiers),Oe(n,i)}function Eo(n,i,_,c,f){let w=ae(263);return w.modifiers=De(n),w.name=et(i),w.typeParameters=De(_),w.heritageClauses=De(c),w.members=de(f),Rn(w.modifiers)&128?w.transformFlags=1:(w.transformFlags|=ke(w.modifiers)|jn(w.name)|ke(w.typeParameters)|ke(w.heritageClauses)|ke(w.members)|(w.typeParameters?1:0)|1024,w.transformFlags&8192&&(w.transformFlags|=1)),w.jsDoc=void 0,w}function ha(n,i,_,c,f,w){return n.modifiers!==i||n.name!==_||n.typeParameters!==c||n.heritageClauses!==f||n.members!==w?q(Eo(i,_,c,f,w),n):n}function Ao(n,i,_,c,f){let w=ae(264);return w.modifiers=De(n),w.name=et(i),w.typeParameters=De(_),w.heritageClauses=De(c),w.members=de(f),w.transformFlags=1,w.jsDoc=void 0,w}function Co(n,i,_,c,f,w){return n.modifiers!==i||n.name!==_||n.typeParameters!==c||n.heritageClauses!==f||n.members!==w?q(Ao(i,_,c,f,w),n):n}function ot(n,i,_,c){let f=ae(265);return f.modifiers=De(n),f.name=et(i),f.typeParameters=De(_),f.type=c,f.transformFlags=1,f.jsDoc=void 0,f.locals=void 0,f.nextContainer=void 0,f}function gr(n,i,_,c,f){return n.modifiers!==i||n.name!==_||n.typeParameters!==c||n.type!==f?q(ot(i,_,c,f),n):n}function x_(n,i,_){let c=ae(266);return c.modifiers=De(n),c.name=et(i),c.members=de(_),c.transformFlags|=ke(c.modifiers)|z(c.name)|ke(c.members)|1,c.transformFlags&=-67108865,c.jsDoc=void 0,c}function br(n,i,_,c){return n.modifiers!==i||n.name!==_||n.members!==c?q(x_(i,_,c),n):n}function Do(n,i,_,c=0){let f=ae(267);return f.modifiers=De(n),f.flags|=c&2088,f.name=i,f.body=_,Rn(f.modifiers)&128?f.transformFlags=1:f.transformFlags|=ke(f.modifiers)|z(f.name)|z(f.body)|1,f.transformFlags&=-67108865,f.jsDoc=void 0,f.locals=void 0,f.nextContainer=void 0,f}function Et(n,i,_,c){return n.modifiers!==i||n.name!==_||n.body!==c?q(Do(i,_,c,n.flags),n):n}function vr(n){let i=M(268);return i.statements=de(n),i.transformFlags|=ke(i.statements),i.jsDoc=void 0,i}function zt(n,i){return n.statements!==i?q(vr(i),n):n}function Po(n){let i=M(269);return i.clauses=de(n),i.transformFlags|=ke(i.clauses),i.locals=void 0,i.nextContainer=void 0,i}function uu(n,i){return n.clauses!==i?q(Po(i),n):n}function No(n){let i=ae(270);return i.name=et(n),i.transformFlags|=ja(i.name)|1,i.modifiers=void 0,i.jsDoc=void 0,i}function Io(n,i){return n.name!==i?pu(No(i),n):n}function pu(n,i){return n!==i&&(n.modifiers=i.modifiers),q(n,i)}function Oo(n,i,_,c){let f=ae(271);return f.modifiers=De(n),f.name=et(_),f.isTypeOnly=i,f.moduleReference=c,f.transformFlags|=ke(f.modifiers)|ja(f.name)|z(f.moduleReference),zf(f.moduleReference)||(f.transformFlags|=1),f.transformFlags&=-67108865,f.jsDoc=void 0,f}function Mo(n,i,_,c,f){return n.modifiers!==i||n.isTypeOnly!==_||n.name!==c||n.moduleReference!==f?q(Oo(i,_,c,f),n):n}function Jo(n,i,_,c){let f=M(272);return f.modifiers=De(n),f.importClause=i,f.moduleSpecifier=_,f.attributes=f.assertClause=c,f.transformFlags|=z(f.importClause)|z(f.moduleSpecifier),f.transformFlags&=-67108865,f.jsDoc=void 0,f}function Lo(n,i,_,c,f){return n.modifiers!==i||n.importClause!==_||n.moduleSpecifier!==c||n.attributes!==f?q(Jo(i,_,c,f),n):n}function jo(n,i,_){let c=ae(273);return c.isTypeOnly=n,c.name=i,c.namedBindings=_,c.transformFlags|=z(c.name)|z(c.namedBindings),n&&(c.transformFlags|=1),c.transformFlags&=-67108865,c}function Ro(n,i,_,c){return n.isTypeOnly!==i||n.name!==_||n.namedBindings!==c?q(jo(i,_,c),n):n}function S_(n,i){let _=M(300);return _.elements=de(n),_.multiLine=i,_.token=132,_.transformFlags|=4,_}function fu(n,i,_){return n.elements!==i||n.multiLine!==_?q(S_(i,_),n):n}function Ni(n,i){let _=M(301);return _.name=n,_.value=i,_.transformFlags|=4,_}function Uo(n,i,_){return n.name!==i||n.value!==_?q(Ni(i,_),n):n}function w_(n,i){let _=M(302);return _.assertClause=n,_.multiLine=i,_}function Bo(n,i,_){return n.assertClause!==i||n.multiLine!==_?q(w_(i,_),n):n}function qo(n,i,_){let c=M(300);return c.token=_??118,c.elements=de(n),c.multiLine=i,c.transformFlags|=4,c}function k_(n,i,_){return n.elements!==i||n.multiLine!==_?q(qo(i,_,n.token),n):n}function zo(n,i){let _=M(301);return _.name=n,_.value=i,_.transformFlags|=4,_}function Fo(n,i,_){return n.name!==i||n.value!==_?q(zo(i,_),n):n}function Vo(n){let i=ae(274);return i.name=n,i.transformFlags|=z(i.name),i.transformFlags&=-67108865,i}function du(n,i){return n.name!==i?q(Vo(i),n):n}function Wo(n){let i=ae(280);return i.name=n,i.transformFlags|=z(i.name)|32,i.transformFlags&=-67108865,i}function mu(n,i){return n.name!==i?q(Wo(i),n):n}function Go(n){let i=M(275);return i.elements=de(n),i.transformFlags|=ke(i.elements),i.transformFlags&=-67108865,i}function Yo(n,i){return n.elements!==i?q(Go(i),n):n}function Tr(n,i,_){let c=ae(276);return c.isTypeOnly=n,c.propertyName=i,c.name=_,c.transformFlags|=z(c.propertyName)|z(c.name),c.transformFlags&=-67108865,c}function hu(n,i,_,c){return n.isTypeOnly!==i||n.propertyName!==_||n.name!==c?q(Tr(i,_,c),n):n}function ya(n,i,_){let c=ae(277);return c.modifiers=De(n),c.isExportEquals=i,c.expression=i?o().parenthesizeRightSideOfBinary(64,void 0,_):o().parenthesizeExpressionOfExportDefault(_),c.transformFlags|=ke(c.modifiers)|z(c.expression),c.transformFlags&=-67108865,c.jsDoc=void 0,c}function Ii(n,i,_){return n.modifiers!==i||n.expression!==_?q(ya(i,n.isExportEquals,_),n):n}function ga(n,i,_,c,f){let w=ae(278);return w.modifiers=De(n),w.isTypeOnly=i,w.exportClause=_,w.moduleSpecifier=c,w.attributes=w.assertClause=f,w.transformFlags|=ke(w.modifiers)|z(w.exportClause)|z(w.moduleSpecifier),w.transformFlags&=-67108865,w.jsDoc=void 0,w}function Xo(n,i,_,c,f,w){return n.modifiers!==i||n.isTypeOnly!==_||n.exportClause!==c||n.moduleSpecifier!==f||n.attributes!==w?Oi(ga(i,_,c,f,w),n):n}function Oi(n,i){return n!==i&&n.modifiers===i.modifiers&&(n.modifiers=i.modifiers),q(n,i)}function E_(n){let i=M(279);return i.elements=de(n),i.transformFlags|=ke(i.elements),i.transformFlags&=-67108865,i}function yu(n,i){return n.elements!==i?q(E_(i),n):n}function ba(n,i,_){let c=M(281);return c.isTypeOnly=n,c.propertyName=et(i),c.name=et(_),c.transformFlags|=z(c.propertyName)|z(c.name),c.transformFlags&=-67108865,c.jsDoc=void 0,c}function gu(n,i,_,c){return n.isTypeOnly!==i||n.propertyName!==_||n.name!==c?q(ba(i,_,c),n):n}function bu(){let n=ae(282);return n.jsDoc=void 0,n}function A_(n){let i=M(283);return i.expression=n,i.transformFlags|=z(i.expression),i.transformFlags&=-67108865,i}function vu(n,i){return n.expression!==i?q(A_(i),n):n}function Ho(n){return M(n)}function $o(n,i,_=!1){let c=C_(n,_?i&&o().parenthesizeNonArrayTypeOfPostfixType(i):i);return c.postfix=_,c}function C_(n,i){let _=M(n);return _.type=i,_}function Tu(n,i,_){return i.type!==_?q($o(n,_,i.postfix),i):i}function xu(n,i,_){return i.type!==_?q(C_(n,_),i):i}function Qo(n,i){let _=ae(317);return _.parameters=De(n),_.type=i,_.transformFlags=ke(_.parameters)|(_.type?1:0),_.jsDoc=void 0,_.locals=void 0,_.nextContainer=void 0,_.typeArguments=void 0,_}function Su(n,i,_){return n.parameters!==i||n.type!==_?q(Qo(i,_),n):n}function Ko(n,i=!1){let _=ae(322);return _.jsDocPropertyTags=De(n),_.isArrayType=i,_}function wu(n,i,_){return n.jsDocPropertyTags!==i||n.isArrayType!==_?q(Ko(i,_),n):n}function Zo(n){let i=M(309);return i.type=n,i}function D_(n,i){return n.type!==i?q(Zo(i),n):n}function ec(n,i,_){let c=ae(323);return c.typeParameters=De(n),c.parameters=de(i),c.type=_,c.jsDoc=void 0,c.locals=void 0,c.nextContainer=void 0,c}function ku(n,i,_,c){return n.typeParameters!==i||n.parameters!==_||n.type!==c?q(ec(i,_,c),n):n}function _n(n){let i=il(n.kind);return n.tagName.escapedText===Ja(i)?n.tagName:Ge(i)}function Sn(n,i,_){let c=M(n);return c.tagName=i,c.comment=_,c}function Ur(n,i,_){let c=ae(n);return c.tagName=i,c.comment=_,c}function P_(n,i,_,c){let f=Sn(345,n??Ge("template"),c);return f.constraint=i,f.typeParameters=de(_),f}function tc(n,i=_n(n),_,c,f){return n.tagName!==i||n.constraint!==_||n.typeParameters!==c||n.comment!==f?q(P_(i,_,c,f),n):n}function va(n,i,_,c){let f=Ur(346,n??Ge("typedef"),c);return f.typeExpression=i,f.fullName=_,f.name=em(_),f.locals=void 0,f.nextContainer=void 0,f}function Eu(n,i=_n(n),_,c,f){return n.tagName!==i||n.typeExpression!==_||n.fullName!==c||n.comment!==f?q(va(i,_,c,f),n):n}function N_(n,i,_,c,f,w){let F=Ur(341,n??Ge("param"),w);return F.typeExpression=c,F.name=i,F.isNameFirst=!!f,F.isBracketed=_,F}function Au(n,i=_n(n),_,c,f,w,F){return n.tagName!==i||n.name!==_||n.isBracketed!==c||n.typeExpression!==f||n.isNameFirst!==w||n.comment!==F?q(N_(i,_,c,f,w,F),n):n}function nc(n,i,_,c,f,w){let F=Ur(348,n??Ge("prop"),w);return F.typeExpression=c,F.name=i,F.isNameFirst=!!f,F.isBracketed=_,F}function rc(n,i=_n(n),_,c,f,w,F){return n.tagName!==i||n.name!==_||n.isBracketed!==c||n.typeExpression!==f||n.isNameFirst!==w||n.comment!==F?q(nc(i,_,c,f,w,F),n):n}function ic(n,i,_,c){let f=Ur(338,n??Ge("callback"),c);return f.typeExpression=i,f.fullName=_,f.name=em(_),f.locals=void 0,f.nextContainer=void 0,f}function ac(n,i=_n(n),_,c,f){return n.tagName!==i||n.typeExpression!==_||n.fullName!==c||n.comment!==f?q(ic(i,_,c,f),n):n}function _c(n,i,_){let c=Sn(339,n??Ge("overload"),_);return c.typeExpression=i,c}function I_(n,i=_n(n),_,c){return n.tagName!==i||n.typeExpression!==_||n.comment!==c?q(_c(i,_,c),n):n}function O_(n,i,_){let c=Sn(328,n??Ge("augments"),_);return c.class=i,c}function Mi(n,i=_n(n),_,c){return n.tagName!==i||n.class!==_||n.comment!==c?q(O_(i,_,c),n):n}function sc(n,i,_){let c=Sn(329,n??Ge("implements"),_);return c.class=i,c}function Br(n,i,_){let c=Sn(347,n??Ge("see"),_);return c.name=i,c}function Ta(n,i,_,c){return n.tagName!==i||n.name!==_||n.comment!==c?q(Br(i,_,c),n):n}function oc(n){let i=M(310);return i.name=n,i}function Cu(n,i){return n.name!==i?q(oc(i),n):n}function cc(n,i){let _=M(311);return _.left=n,_.right=i,_.transformFlags|=z(_.left)|z(_.right),_}function Du(n,i,_){return n.left!==i||n.right!==_?q(cc(i,_),n):n}function lc(n,i){let _=M(324);return _.name=n,_.text=i,_}function uc(n,i,_){return n.name!==i?q(lc(i,_),n):n}function pc(n,i){let _=M(325);return _.name=n,_.text=i,_}function Pu(n,i,_){return n.name!==i?q(pc(i,_),n):n}function fc(n,i){let _=M(326);return _.name=n,_.text=i,_}function Nu(n,i,_){return n.name!==i?q(fc(i,_),n):n}function Iu(n,i=_n(n),_,c){return n.tagName!==i||n.class!==_||n.comment!==c?q(sc(i,_,c),n):n}function dc(n,i,_){return Sn(n,i??Ge(il(n)),_)}function Ou(n,i,_=_n(i),c){return i.tagName!==_||i.comment!==c?q(dc(n,_,c),i):i}function mc(n,i,_,c){let f=Sn(n,i??Ge(il(n)),c);return f.typeExpression=_,f}function Mu(n,i,_=_n(i),c,f){return i.tagName!==_||i.typeExpression!==c||i.comment!==f?q(mc(n,_,c,f),i):i}function hc(n,i){return Sn(327,n,i)}function Ju(n,i,_){return n.tagName!==i||n.comment!==_?q(hc(i,_),n):n}function yc(n,i,_){let c=Ur(340,n??Ge(il(340)),_);return c.typeExpression=i,c.locals=void 0,c.nextContainer=void 0,c}function M_(n,i=_n(n),_,c){return n.tagName!==i||n.typeExpression!==_||n.comment!==c?q(yc(i,_,c),n):n}function gc(n,i,_,c,f){let w=Sn(351,n??Ge("import"),f);return w.importClause=i,w.moduleSpecifier=_,w.attributes=c,w.comment=f,w}function bc(n,i,_,c,f,w){return n.tagName!==i||n.comment!==w||n.importClause!==_||n.moduleSpecifier!==c||n.attributes!==f?q(gc(i,_,c,f,w),n):n}function J_(n){let i=M(321);return i.text=n,i}function Lu(n,i){return n.text!==i?q(J_(i),n):n}function Ji(n,i){let _=M(320);return _.comment=n,_.tags=De(i),_}function vc(n,i,_){return n.comment!==i||n.tags!==_?q(Ji(i,_),n):n}function Tc(n,i,_){let c=M(284);return c.openingElement=n,c.children=de(i),c.closingElement=_,c.transformFlags|=z(c.openingElement)|ke(c.children)|z(c.closingElement)|2,c}function ju(n,i,_,c){return n.openingElement!==i||n.children!==_||n.closingElement!==c?q(Tc(i,_,c),n):n}function xc(n,i,_){let c=M(285);return c.tagName=n,c.typeArguments=De(i),c.attributes=_,c.transformFlags|=z(c.tagName)|ke(c.typeArguments)|z(c.attributes)|2,c.typeArguments&&(c.transformFlags|=1),c}function L_(n,i,_,c){return n.tagName!==i||n.typeArguments!==_||n.attributes!==c?q(xc(i,_,c),n):n}function j_(n,i,_){let c=M(286);return c.tagName=n,c.typeArguments=De(i),c.attributes=_,c.transformFlags|=z(c.tagName)|ke(c.typeArguments)|z(c.attributes)|2,i&&(c.transformFlags|=1),c}function Sc(n,i,_,c){return n.tagName!==i||n.typeArguments!==_||n.attributes!==c?q(j_(i,_,c),n):n}function xa(n){let i=M(287);return i.tagName=n,i.transformFlags|=z(i.tagName)|2,i}function Kt(n,i){return n.tagName!==i?q(xa(i),n):n}function R_(n,i,_){let c=M(288);return c.openingFragment=n,c.children=de(i),c.closingFragment=_,c.transformFlags|=z(c.openingFragment)|ke(c.children)|z(c.closingFragment)|2,c}function wc(n,i,_,c){return n.openingFragment!==i||n.children!==_||n.closingFragment!==c?q(R_(i,_,c),n):n}function Sa(n,i){let _=M(12);return _.text=n,_.containsOnlyTriviaWhiteSpaces=!!i,_.transformFlags|=2,_}function kc(n,i,_){return n.text!==i||n.containsOnlyTriviaWhiteSpaces!==_?q(Sa(i,_),n):n}function Ru(){let n=M(289);return n.transformFlags|=2,n}function Uu(){let n=M(290);return n.transformFlags|=2,n}function Ec(n,i){let _=ae(291);return _.name=n,_.initializer=i,_.transformFlags|=z(_.name)|z(_.initializer)|2,_}function wa(n,i,_){return n.name!==i||n.initializer!==_?q(Ec(i,_),n):n}function Ac(n){let i=ae(292);return i.properties=de(n),i.transformFlags|=ke(i.properties)|2,i}function Bu(n,i){return n.properties!==i?q(Ac(i),n):n}function Cc(n){let i=M(293);return i.expression=n,i.transformFlags|=z(i.expression)|2,i}function qu(n,i){return n.expression!==i?q(Cc(i),n):n}function ka(n,i){let _=M(294);return _.dotDotDotToken=n,_.expression=i,_.transformFlags|=z(_.dotDotDotToken)|z(_.expression)|2,_}function Li(n,i){return n.expression!==i?q(ka(n.dotDotDotToken,i),n):n}function Dc(n,i){let _=M(295);return _.namespace=n,_.name=i,_.transformFlags|=z(_.namespace)|z(_.name)|2,_}function U_(n,i,_){return n.namespace!==i||n.name!==_?q(Dc(i,_),n):n}function B_(n,i){let _=M(296);return _.expression=o().parenthesizeExpressionForDisallowedComma(n),_.statements=de(i),_.transformFlags|=z(_.expression)|ke(_.statements),_.jsDoc=void 0,_}function zu(n,i,_){return n.expression!==i||n.statements!==_?q(B_(i,_),n):n}function _i(n){let i=M(297);return i.statements=de(n),i.transformFlags=ke(i.statements),i}function Pc(n,i){return n.statements!==i?q(_i(i),n):n}function Nc(n,i){let _=M(298);switch(_.token=n,_.types=de(i),_.transformFlags|=ke(_.types),n){case 96:_.transformFlags|=1024;break;case 119:_.transformFlags|=1;break;default:return B.assertNever(n)}return _}function Fu(n,i){return n.types!==i?q(Nc(n.token,i),n):n}function q_(n,i){let _=M(299);return _.variableDeclaration=xr(n),_.block=i,_.transformFlags|=z(_.variableDeclaration)|z(_.block)|(n?0:64),_.locals=void 0,_.nextContainer=void 0,_}function Ic(n,i,_){return n.variableDeclaration!==i||n.block!==_?q(q_(i,_),n):n}function Ea(n,i){let _=ae(303);return _.name=et(n),_.initializer=o().parenthesizeExpressionForDisallowedComma(i),_.transformFlags|=jn(_.name)|z(_.initializer),_.modifiers=void 0,_.questionToken=void 0,_.exclamationToken=void 0,_.jsDoc=void 0,_}function qr(n,i,_){return n.name!==i||n.initializer!==_?Vu(Ea(i,_),n):n}function Vu(n,i){return n!==i&&(n.modifiers=i.modifiers,n.questionToken=i.questionToken,n.exclamationToken=i.exclamationToken),q(n,i)}function Oc(n,i){let _=ae(304);return _.name=et(n),_.objectAssignmentInitializer=i&&o().parenthesizeExpressionForDisallowedComma(i),_.transformFlags|=ja(_.name)|z(_.objectAssignmentInitializer)|1024,_.equalsToken=void 0,_.modifiers=void 0,_.questionToken=void 0,_.exclamationToken=void 0,_.jsDoc=void 0,_}function Wu(n,i,_){return n.name!==i||n.objectAssignmentInitializer!==_?Gu(Oc(i,_),n):n}function Gu(n,i){return n!==i&&(n.modifiers=i.modifiers,n.questionToken=i.questionToken,n.exclamationToken=i.exclamationToken,n.equalsToken=i.equalsToken),q(n,i)}function z_(n){let i=ae(305);return i.expression=o().parenthesizeExpressionForDisallowedComma(n),i.transformFlags|=z(i.expression)|128|65536,i.jsDoc=void 0,i}function Mc(n,i){return n.expression!==i?q(z_(i),n):n}function wn(n,i){let _=ae(306);return _.name=et(n),_.initializer=i&&o().parenthesizeExpressionForDisallowedComma(i),_.transformFlags|=z(_.name)|z(_.initializer)|1,_.jsDoc=void 0,_}function Jc(n,i,_){return n.name!==i||n.initializer!==_?q(wn(i,_),n):n}function Yu(n,i,_){let c=t.createBaseSourceFileNode(307);return c.statements=de(n),c.endOfFileToken=i,c.flags|=_,c.text="",c.fileName="",c.path="",c.resolvedPath="",c.originalFileName="",c.languageVersion=1,c.languageVariant=0,c.scriptKind=0,c.isDeclarationFile=!1,c.hasNoDefaultLib=!1,c.transformFlags|=ke(c.statements)|z(c.endOfFileToken),c.locals=void 0,c.nextContainer=void 0,c.endFlowNode=void 0,c.nodeCount=0,c.identifierCount=0,c.symbolCount=0,c.parseDiagnostics=void 0,c.bindDiagnostics=void 0,c.bindSuggestionDiagnostics=void 0,c.lineMap=void 0,c.externalModuleIndicator=void 0,c.setExternalModuleIndicator=void 0,c.pragmas=void 0,c.checkJsDirective=void 0,c.referencedFiles=void 0,c.typeReferenceDirectives=void 0,c.libReferenceDirectives=void 0,c.amdDependencies=void 0,c.commentDirectives=void 0,c.identifiers=void 0,c.packageJsonLocations=void 0,c.packageJsonScope=void 0,c.imports=void 0,c.moduleAugmentations=void 0,c.ambientModuleNames=void 0,c.classifiableNames=void 0,c.impliedNodeFormat=void 0,c}function Lc(n){let i=Object.create(n.redirectTarget);return Object.defineProperties(i,{id:{get(){return this.redirectInfo.redirectTarget.id},set(_){this.redirectInfo.redirectTarget.id=_}},symbol:{get(){return this.redirectInfo.redirectTarget.symbol},set(_){this.redirectInfo.redirectTarget.symbol=_}}}),i.redirectInfo=n,i}function Xu(n){let i=Lc(n.redirectInfo);return i.flags|=n.flags&-17,i.fileName=n.fileName,i.path=n.path,i.resolvedPath=n.resolvedPath,i.originalFileName=n.originalFileName,i.packageJsonLocations=n.packageJsonLocations,i.packageJsonScope=n.packageJsonScope,i.emitNode=void 0,i}function jc(n){let i=t.createBaseSourceFileNode(307);i.flags|=n.flags&-17;for(let _ in n)if(!(Cr(i,_)||!Cr(n,_))){if(_==="emitNode"){i.emitNode=void 0;continue}i[_]=n[_]}return i}function Aa(n){let i=n.redirectInfo?Xu(n):jc(n);return a(i,n),i}function Hu(n,i,_,c,f,w,F){let pe=Aa(n);return pe.statements=de(i),pe.isDeclarationFile=_,pe.referencedFiles=c,pe.typeReferenceDirectives=f,pe.hasNoDefaultLib=w,pe.libReferenceDirectives=F,pe.transformFlags=ke(pe.statements)|z(pe.endOfFileToken),pe}function $u(n,i,_=n.isDeclarationFile,c=n.referencedFiles,f=n.typeReferenceDirectives,w=n.hasNoDefaultLib,F=n.libReferenceDirectives){return n.statements!==i||n.isDeclarationFile!==_||n.referencedFiles!==c||n.typeReferenceDirectives!==f||n.hasNoDefaultLib!==w||n.libReferenceDirectives!==F?q(Hu(n,i,_,c,f,w,F),n):n}function F_(n){let i=M(308);return i.sourceFiles=n,i.syntheticFileReferences=void 0,i.syntheticTypeReferences=void 0,i.syntheticLibReferences=void 0,i.hasNoDefaultLib=void 0,i}function Qu(n,i){return n.sourceFiles!==i?q(F_(i),n):n}function Ku(n,i=!1,_){let c=M(237);return c.type=n,c.isSpread=i,c.tupleNameSource=_,c}function Ca(n){let i=M(352);return i._children=n,i}function Rc(n){let i=M(353);return i.original=n,yn(i,n),i}function Uc(n,i){let _=M(355);return _.expression=n,_.original=i,_.transformFlags|=z(_.expression)|1,yn(_,i),_}function Bc(n,i){return n.expression!==i?q(Uc(i,n.original),n):n}function Zu(){return M(354)}function ep(n){if(La(n)&&!ml(n)&&!n.original&&!n.emitNode&&!n.id){if(Zb(n))return n.elements;if(Zi(n)&&jb(n.operatorToken))return[n.left,n.right]}return n}function V_(n){let i=M(356);return i.elements=de(iy(n,ep)),i.transformFlags|=ke(i.elements),i}function qc(n,i){return n.elements!==i?q(V_(i),n):n}function W_(n,i){let _=M(357);return _.expression=n,_.thisArg=i,_.transformFlags|=z(_.expression)|z(_.thisArg),_}function zc(n,i,_){return n.expression!==i||n.thisArg!==_?q(W_(i,_),n):n}function tp(n){let i=bn(n.escapedText);return i.flags|=n.flags&-17,i.transformFlags=n.transformFlags,a(i,n),setIdentifierAutoGenerate(i,{...n.emitNode.autoGenerate}),i}function np(n){let i=bn(n.escapedText);i.flags|=n.flags&-17,i.jsDoc=n.jsDoc,i.flowNode=n.flowNode,i.symbol=n.symbol,i.transformFlags=n.transformFlags,a(i,n);let _=getIdentifierTypeArguments(n);return _&&setIdentifierTypeArguments(i,_),i}function Fc(n){let i=On(n.escapedText);return i.flags|=n.flags&-17,i.transformFlags=n.transformFlags,a(i,n),setIdentifierAutoGenerate(i,{...n.emitNode.autoGenerate}),i}function Vc(n){let i=On(n.escapedText);return i.flags|=n.flags&-17,i.transformFlags=n.transformFlags,a(i,n),i}function G_(n){if(n===void 0)return n;if(rh(n))return Aa(n);if(Ua(n))return tp(n);if(tt(n))return np(n);if(_1(n))return Fc(n);if(gi(n))return Vc(n);let i=ff(n.kind)?t.createBaseNode(n.kind):t.createBaseTokenNode(n.kind);i.flags|=n.flags&-17,i.transformFlags=n.transformFlags,a(i,n);for(let _ in n)Cr(i,_)||!Cr(n,_)||(i[_]=n[_]);return i}function rp(n,i,_){return Ci(i_(void 0,void 0,void 0,void 0,i?[i]:[],void 0,Rr(n,!0)),void 0,_?[_]:[])}function ip(n,i,_){return Ci(a_(void 0,void 0,i?[i]:[],void 0,void 0,Rr(n,!0)),void 0,_?[_]:[])}function si(){return __(V("0"))}function Wc(n){return ya(void 0,!1,n)}function ap(n){return ga(void 0,!1,E_([ba(!1,void 0,n)]))}function Y_(n,i){return i==="null"?ye.createStrictEquality(n,Jt()):i==="undefined"?ye.createStrictEquality(n,si()):ye.createStrictEquality(la(n),dt(i))}function _p(n,i){return i==="null"?ye.createStrictInequality(n,Jt()):i==="undefined"?ye.createStrictInequality(n,si()):ye.createStrictInequality(la(n),dt(i))}function zr(n,i,_){return Jd(n)?t_(Ei(n,void 0,i),void 0,void 0,_):Ci(cr(n,i),void 0,_)}function sp(n,i,_){return zr(n,"bind",[i,..._])}function op(n,i,_){return zr(n,"call",[i,..._])}function cp(n,i,_){return zr(n,"apply",[i,_])}function ji(n,i,_){return zr(Ge(n),i,_)}function Ri(n,i){return zr(n,"slice",i===void 0?[]:[pr(i)])}function lp(n,i){return zr(n,"concat",i)}function X_(n,i,_){return ji("Object","defineProperty",[n,pr(i),_])}function oi(n,i){return ji("Object","getOwnPropertyDescriptor",[n,pr(i)])}function Gc(n,i,_){return ji("Reflect","get",_?[n,i,_]:[n,i])}function up(n,i,_,c){return ji("Reflect","set",c?[n,i,_,c]:[n,i,_])}function ci(n,i,_){return _?(n.push(Ea(i,_)),!0):!1}function Yc(n,i){let _=[];ci(_,"enumerable",pr(n.enumerable)),ci(_,"configurable",pr(n.configurable));let c=ci(_,"writable",pr(n.writable));c=ci(_,"value",n.value)||c;let f=ci(_,"get",n.get);return f=ci(_,"set",n.set)||f,B.assert(!(c&&f),"A PropertyDescriptor may not be both an accessor descriptor and a data descriptor."),ki(_,!i)}function pp(n,i){switch(n.kind){case 217:return js(n,i);case 216:return Ls(n,n.type,i);case 234:return fa(n,i,n.type);case 238:return to(n,i,n.type);case 235:return eo(n,i);case 233:return Ks(n,i,n.typeArguments);case 355:return Bc(n,i)}}function fp(n){return Al(n)&&La(n)&&La(getSourceMapRange(n))&&La(getCommentRange(n))&&!Xt(getSyntheticLeadingComments(n))&&!Xt(getSyntheticTrailingComments(n))}function Xc(n,i,_=31){return n&&lh(n,_)&&!fp(n)?pp(n,Xc(n.expression,i)):i}function H_(n,i,_){if(!i)return n;let c=vo(i,i.label,Q1(i.statement)?H_(n,i.statement):n);return _&&_(i),c}function $_(n,i){let _=vf(n);switch(_.kind){case 80:return i;case 110:case 9:case 10:case 11:return!1;case 209:return _.elements.length!==0;case 210:return _.properties.length>0;default:return!0}}function Hc(n,i,_,c=!1){let f=Vf(n,31),w,F;return zd(f)?(w=Ut(),F=f):Ap(f)?(w=Ut(),F=_!==void 0&&_<2?yn(Ge("_super"),f):f):za(f)&8192?(w=si(),F=o().parenthesizeLeftSideOfAccess(f,!1)):Xr(f)?$_(f.expression,c)?(w=ir(i),F=cr(yn(ye.createAssignment(w,f.expression),f.expression),f.name),yn(F,f)):(w=f.expression,F=f):Xa(f)?$_(f.expression,c)?(w=ir(i),F=Ai(yn(ye.createAssignment(w,f.expression),f.expression),f.argumentExpression),yn(F,f)):(w=f.expression,F=f):(w=si(),F=o().parenthesizeLeftSideOfAccess(n,!1)),{target:F,thisArg:w}}function s(n,i){return cr(r_(ki([R(void 0,"value",[fr(void 0,void 0,n,void 0,void 0,void 0)],Rr([Pi(i)]))])),"value")}function p(n){return n.length>10?V_(n):dy(n,ye.createComma)}function d(n,i,_,c=0,f){let w=f?n&&lf(n):e1(n);if(w&&tt(w)&&!Ua(w)){let F=Sf(yn(G_(w),w),w.parent);return c|=za(w),_||(c|=96),i||(c|=3072),c&&setEmitFlags(F,c),F}return Bn(n)}function b(n,i,_){return d(n,i,_,98304)}function S(n,i,_,c){return d(n,i,_,32768,c)}function N(n,i,_){return d(n,i,_,16384)}function H(n,i,_){return d(n,i,_)}function _e(n,i,_,c){let f=cr(n,La(i)?i:G_(i));yn(f,i);let w=0;return c||(w|=96),_||(w|=3072),w&&setEmitFlags(f,w),f}function Z(n,i,_,c){return n&&bs(i,32)?_e(n,d(i),_,c):N(i,_,c)}function ee(n,i,_,c){let f=je(n,i,0,_);return Ae(n,i,f,c)}function ce(n){return Ya(n.expression)&&n.expression.text==="use strict"}function Le(){return v6(Pi(dt("use strict")))}function je(n,i,_=0,c){B.assert(i.length===0,"Prologue directives should be at the first statement in the target statements array");let f=!1,w=n.length;for(;_pe&&en.splice(f,0,...i.slice(pe,Re)),pe>F&&en.splice(c,0,...i.slice(F,pe)),F>w&&en.splice(_,0,...i.slice(w,F)),w>0)if(_===0)en.splice(0,0,...i.slice(0,w));else{let kn=new Map;for(let $n=0;$n<_;$n++){let Pa=n[$n];kn.set(Pa.expression.text,!0)}for(let $n=w-1;$n>=0;$n--){let Pa=i[$n];kn.has(Pa.expression.text)||en.unshift(Pa)}}return mi(n)?yn(de(en,n.hasTrailingComma),n):n}function Ln(n,i){let _;return typeof i=="number"?_=vn(i):_=i,Ef(n)?_r(n,_,n.name,n.constraint,n.default):ds(n)?dr(n,_,n.dotDotDotToken,n.name,n.questionToken,n.type,n.initializer):Nf(n)?Ve(n,_,n.typeParameters,n.parameters,n.type):I1(n)?Vn(n,_,n.name,n.questionToken,n.type):Va(n)?L(n,_,n.name,n.questionToken??n.exclamationToken,n.type,n.initializer):O1(n)?fe(n,_,n.name,n.questionToken,n.typeParameters,n.parameters,n.type):ms(n)?He(n,_,n.asteriskToken,n.name,n.questionToken,n.typeParameters,n.parameters,n.type,n.body):Af(n)?Ir(n,_,n.parameters,n.body):gl(n)?Wn(n,_,n.name,n.parameters,n.type,n.body):hs(n)?$(n,_,n.name,n.parameters,n.body):Cf(n)?Ze(n,_,n.parameters,n.type):Mf(n)?Rs(n,_,n.asteriskToken,n.name,n.typeParameters,n.parameters,n.type,n.body):Jf(n)?Us(n,_,n.typeParameters,n.parameters,n.type,n.equalsGreaterThanToken,n.body):bl(n)?c_(n,_,n.name,n.typeParameters,n.heritageClauses,n.members):Ha(n)?io(n,_,n.declarationList):jf(n)?T_(n,_,n.asteriskToken,n.name,n.typeParameters,n.parameters,n.type,n.body):Wa(n)?ha(n,_,n.name,n.typeParameters,n.heritageClauses,n.members):vs(n)?Co(n,_,n.name,n.typeParameters,n.heritageClauses,n.members):Dl(n)?gr(n,_,n.name,n.typeParameters,n.type):Z1(n)?br(n,_,n.name,n.members):Ti(n)?Et(n,_,n.name,n.body):Rf(n)?Mo(n,_,n.isTypeOnly,n.name,n.moduleReference):Uf(n)?Lo(n,_,n.importClause,n.moduleSpecifier,n.attributes):Bf(n)?Ii(n,_,n.expression):qf(n)?Xo(n,_,n.isTypeOnly,n.exportClause,n.moduleSpecifier,n.attributes):B.assertNever(n)}function Fr(n,i){return ds(n)?dr(n,i,n.dotDotDotToken,n.name,n.questionToken,n.type,n.initializer):Va(n)?L(n,i,n.name,n.questionToken??n.exclamationToken,n.type,n.initializer):ms(n)?He(n,i,n.asteriskToken,n.name,n.questionToken,n.typeParameters,n.parameters,n.type,n.body):gl(n)?Wn(n,i,n.name,n.parameters,n.type,n.body):hs(n)?$(n,i,n.name,n.parameters,n.body):bl(n)?c_(n,i,n.name,n.typeParameters,n.heritageClauses,n.members):Wa(n)?ha(n,i,n.name,n.typeParameters,n.heritageClauses,n.members):B.assertNever(n)}function dp(n,i){switch(n.kind){case 177:return Wn(n,n.modifiers,i,n.parameters,n.type,n.body);case 178:return $(n,n.modifiers,i,n.parameters,n.body);case 174:return He(n,n.modifiers,n.asteriskToken,i,n.questionToken,n.typeParameters,n.parameters,n.type,n.body);case 173:return fe(n,n.modifiers,i,n.questionToken,n.typeParameters,n.parameters,n.type);case 172:return L(n,n.modifiers,i,n.questionToken??n.exclamationToken,n.type,n.initializer);case 171:return Vn(n,n.modifiers,i,n.questionToken,n.type);case 303:return qr(n,i,n.initializer)}}function De(n){return n?de(n):void 0}function et(n){return typeof n=="string"?Ge(n):n}function pr(n){return typeof n=="string"?dt(n):typeof n=="number"?V(n):typeof n=="boolean"?n?lt():ar():n}function Da(n){return n&&o().parenthesizeExpressionForDisallowedComma(n)}function $c(n){return typeof n=="number"?ct(n):n}function It(n){return n&&e6(n)?yn(a(ao(),n),n):n}function xr(n){return typeof n=="string"||n&&!Lf(n)?ma(n,void 0,void 0,void 0):n}function q(n,i){return n!==i&&(a(n,i),yn(n,i)),n}}function il(e){switch(e){case 344:return"type";case 342:return"returns";case 343:return"this";case 340:return"enum";case 330:return"author";case 332:return"class";case 333:return"public";case 334:return"private";case 335:return"protected";case 336:return"readonly";case 337:return"override";case 345:return"template";case 346:return"typedef";case 341:return"param";case 348:return"prop";case 338:return"callback";case 339:return"overload";case 328:return"augments";case 329:return"implements";case 351:return"import";default:return B.fail(`Unsupported kind: ${B.formatSyntaxKind(e)}`)}}var En,Xd={};function Pb(e,t){switch(En||(En=sf(99,!1,0)),e){case 15:En.setText("`"+t+"`");break;case 16:En.setText("`"+t+"${");break;case 17:En.setText("}"+t+"${");break;case 18:En.setText("}"+t+"`");break}let a=En.scan();if(a===20&&(a=En.reScanTemplateToken(!1)),En.isUnterminated())return En.setText(void 0),Xd;let o;switch(a){case 15:case 16:case 17:case 18:o=En.getTokenValue();break}return o===void 0||En.scan()!==1?(En.setText(void 0),Xd):(En.setText(void 0),o)}function jn(e){return e&&tt(e)?ja(e):z(e)}function ja(e){return z(e)&-67108865}function Nb(e,t){return t|e.transformFlags&134234112}function z(e){if(!e)return 0;let t=e.transformFlags&~Ib(e.kind);return hg(e)&&s1(e.name)?Nb(e.name,t):t}function ke(e){return e?e.transformFlags:0}function Hd(e){let t=0;for(let a of e)t|=z(a);e.transformFlags=t}function Ib(e){if(e>=182&&e<=205)return-2;switch(e){case 213:case 214:case 209:return-2147450880;case 267:return-1941676032;case 169:return-2147483648;case 219:return-2072174592;case 218:case 262:return-1937940480;case 261:return-2146893824;case 263:case 231:return-2147344384;case 176:return-1937948672;case 172:return-2013249536;case 174:case 177:case 178:return-2005057536;case 133:case 150:case 163:case 146:case 154:case 151:case 136:case 155:case 116:case 168:case 171:case 173:case 179:case 180:case 181:case 264:case 265:return-2;case 210:return-2147278848;case 299:return-2147418112;case 206:case 207:return-2147450880;case 216:case 238:case 234:case 355:case 217:case 108:return-2147483648;case 211:case 212:return-2147483648;default:return-2147483648}}var Z_=Ab();function es(e){return e.flags|=16,e}var Ob={createBaseSourceFileNode:e=>es(Z_.createBaseSourceFileNode(e)),createBaseIdentifierNode:e=>es(Z_.createBaseIdentifierNode(e)),createBasePrivateIdentifierNode:e=>es(Z_.createBasePrivateIdentifierNode(e)),createBaseTokenNode:e=>es(Z_.createBaseTokenNode(e)),createBaseNode:e=>es(Z_.createBaseNode(e))},y3=wf(4,Ob);function Mb(e,t){if(e.original!==t&&(e.original=t,t)){let a=t.emitNode;a&&(e.emitNode=Jb(a,e.emitNode))}return e}function Jb(e,t){let{flags:a,internalFlags:o,leadingComments:m,trailingComments:v,commentRange:A,sourceMapRange:P,tokenSourceMapRanges:l,constantValue:Q,helpers:h,startsOnNewLine:y,snippetElement:g,classThis:x,assignedName:I}=e;if(t||(t={}),a&&(t.flags=a),o&&(t.internalFlags=o&-9),m&&(t.leadingComments=Dn(m.slice(),t.leadingComments)),v&&(t.trailingComments=Dn(v.slice(),t.trailingComments)),A&&(t.commentRange=A),P&&(t.sourceMapRange=P),l&&(t.tokenSourceMapRanges=Lb(l,t.tokenSourceMapRanges)),Q!==void 0&&(t.constantValue=Q),h)for(let re of h)t.helpers=oy(t.helpers,re);return y!==void 0&&(t.startsOnNewLine=y),g!==void 0&&(t.snippetElement=g),x&&(t.classThis=x),I&&(t.assignedName=I),t}function Lb(e,t){t||(t=[]);for(let a in e)t[a]=e[a];return t}function ta(e){return e.kind===9}function D1(e){return e.kind===10}function Ya(e){return e.kind===11}function P1(e){return e.kind===15}function jb(e){return e.kind===28}function $d(e){return e.kind===54}function Qd(e){return e.kind===58}function tt(e){return e.kind===80}function gi(e){return e.kind===81}function Rb(e){return e.kind===95}function al(e){return e.kind===134}function Ap(e){return e.kind===108}function Ub(e){return e.kind===102}function N1(e){return e.kind===166}function kf(e){return e.kind===167}function Ef(e){return e.kind===168}function ds(e){return e.kind===169}function El(e){return e.kind===170}function I1(e){return e.kind===171}function Va(e){return e.kind===172}function O1(e){return e.kind===173}function ms(e){return e.kind===174}function Af(e){return e.kind===176}function gl(e){return e.kind===177}function hs(e){return e.kind===178}function M1(e){return e.kind===179}function J1(e){return e.kind===180}function Cf(e){return e.kind===181}function L1(e){return e.kind===182}function Df(e){return e.kind===183}function Pf(e){return e.kind===184}function Nf(e){return e.kind===185}function Bb(e){return e.kind===186}function j1(e){return e.kind===187}function qb(e){return e.kind===188}function zb(e){return e.kind===189}function R1(e){return e.kind===202}function Fb(e){return e.kind===190}function Vb(e){return e.kind===191}function U1(e){return e.kind===192}function B1(e){return e.kind===193}function Wb(e){return e.kind===194}function Gb(e){return e.kind===195}function q1(e){return e.kind===196}function Yb(e){return e.kind===197}function z1(e){return e.kind===198}function Xb(e){return e.kind===199}function F1(e){return e.kind===200}function Hb(e){return e.kind===201}function $b(e){return e.kind===205}function V1(e){return e.kind===208}function W1(e){return e.kind===209}function If(e){return e.kind===210}function Xr(e){return e.kind===211}function Xa(e){return e.kind===212}function Of(e){return e.kind===213}function G1(e){return e.kind===215}function Al(e){return e.kind===217}function Mf(e){return e.kind===218}function Jf(e){return e.kind===219}function Qb(e){return e.kind===222}function Y1(e){return e.kind===224}function Zi(e){return e.kind===226}function X1(e){return e.kind===230}function bl(e){return e.kind===231}function H1(e){return e.kind===232}function $1(e){return e.kind===233}function cl(e){return e.kind===235}function Kb(e){return e.kind===236}function Zb(e){return e.kind===356}function Ha(e){return e.kind===243}function Cl(e){return e.kind===244}function Q1(e){return e.kind===256}function Lf(e){return e.kind===260}function K1(e){return e.kind===261}function jf(e){return e.kind===262}function Wa(e){return e.kind===263}function vs(e){return e.kind===264}function Dl(e){return e.kind===265}function Z1(e){return e.kind===266}function Ti(e){return e.kind===267}function Rf(e){return e.kind===271}function Uf(e){return e.kind===272}function Bf(e){return e.kind===277}function qf(e){return e.kind===278}function eh(e){return e.kind===279}function e6(e){return e.kind===353}function zf(e){return e.kind===283}function zp(e){return e.kind===286}function t6(e){return e.kind===289}function th(e){return e.kind===295}function n6(e){return e.kind===297}function nh(e){return e.kind===303}function rh(e){return e.kind===307}function ih(e){return e.kind===309}function ah(e){return e.kind===314}function _h(e){return e.kind===317}function sh(e){return e.kind===320}function r6(e){return e.kind===322}function Pl(e){return e.kind===323}function i6(e){return e.kind===328}function a6(e){return e.kind===333}function _6(e){return e.kind===334}function s6(e){return e.kind===335}function o6(e){return e.kind===336}function c6(e){return e.kind===337}function l6(e){return e.kind===339}function u6(e){return e.kind===331}function Fp(e){return e.kind===341}function p6(e){return e.kind===342}function Ff(e){return e.kind===344}function oh(e){return e.kind===345}function f6(e){return e.kind===329}function d6(e){return e.kind===350}var $i=new WeakMap;function ch(e,t){var a;let o=e.kind;return ff(o)?o===352?e._children:(a=$i.get(t))==null?void 0:a.get(e):bt}function m6(e,t,a){e.kind===352&&B.fail("Should not need to re-set the children of a SyntaxList.");let o=$i.get(t);return o===void 0&&(o=new WeakMap,$i.set(t,o)),o.set(e,a),a}function Kd(e,t){var a;e.kind===352&&B.fail("Did not expect to unset the children of a SyntaxList."),(a=$i.get(t))==null||a.delete(e)}function h6(e,t){let a=$i.get(e);a!==void 0&&($i.delete(e),$i.set(t,a))}function Zd(e){return(za(e)&32768)!==0}function y6(e){return Ya(e.expression)&&e.expression.text==="use strict"}function g6(e){for(let t of e)if(ol(t)){if(y6(t))return t}else break}function b6(e){return Al(e)&&ea(e)&&!!Pg(e)}function lh(e,t=31){switch(e.kind){case 217:return t&-2147483648&&b6(e)?!1:(t&1)!==0;case 216:case 234:case 238:return(t&2)!==0;case 233:return(t&16)!==0;case 235:return(t&4)!==0;case 355:return(t&8)!==0}return!1}function Vf(e,t=31){for(;lh(e,t);)e=e.expression;return e}function v6(e){return setStartsOnNewLine(e,!0)}function as(e){if(Gg(e))return e.name;if(Fg(e)){switch(e.kind){case 303:return as(e.initializer);case 304:return e.name;case 305:return as(e.expression)}return}return yl(e,!0)?as(e.left):X1(e)?as(e.expression):e}function T6(e){switch(e.kind){case 206:case 207:case 209:return e.elements;case 210:return e.properties}}function em(e){if(e){let t=e;for(;;){if(tt(t)||!t.body)return tt(t)?t:t.name;t=t.body}}}var tm;(e=>{function t(h,y,g,x,I,re,he){let ye=y>0?I[y-1]:void 0;return B.assertEqual(g[y],t),I[y]=h.onEnter(x[y],ye,he),g[y]=P(h,t),y}e.enter=t;function a(h,y,g,x,I,re,he){B.assertEqual(g[y],a),B.assertIsDefined(h.onLeft),g[y]=P(h,a);let ye=h.onLeft(x[y].left,I[y],x[y]);return ye?(Q(y,x,ye),l(y,g,x,I,ye)):y}e.left=a;function o(h,y,g,x,I,re,he){return B.assertEqual(g[y],o),B.assertIsDefined(h.onOperator),g[y]=P(h,o),h.onOperator(x[y].operatorToken,I[y],x[y]),y}e.operator=o;function m(h,y,g,x,I,re,he){B.assertEqual(g[y],m),B.assertIsDefined(h.onRight),g[y]=P(h,m);let ye=h.onRight(x[y].right,I[y],x[y]);return ye?(Q(y,x,ye),l(y,g,x,I,ye)):y}e.right=m;function v(h,y,g,x,I,re,he){B.assertEqual(g[y],v),g[y]=P(h,v);let ye=h.onExit(x[y],I[y]);if(y>0){if(y--,h.foldState){let de=g[y]===v?"right":"left";I[y]=h.foldState(I[y],ye,de)}}else re.value=ye;return y}e.exit=v;function A(h,y,g,x,I,re,he){return B.assertEqual(g[y],A),y}e.done=A;function P(h,y){switch(y){case t:if(h.onLeft)return a;case a:if(h.onOperator)return o;case o:if(h.onRight)return m;case m:return v;case v:return A;case A:return A;default:B.fail("Invalid state")}}e.nextState=P;function l(h,y,g,x,I){return h++,y[h]=t,g[h]=I,x[h]=void 0,h}function Q(h,y,g){if(B.shouldAssert(2))for(;h>=0;)B.assert(y[h]!==g,"Circular traversal detected."),h--}})(tm||(tm={}));function nm(e,t){return typeof e=="object"?Vp(!1,e.prefix,e.node,e.suffix,t):typeof e=="string"?e.length>0&&e.charCodeAt(0)===35?e.slice(1):e:""}function x6(e,t){return typeof e=="string"?e:S6(e,B.checkDefined(t))}function S6(e,t){return _1(e)?t(e).slice(1):Ua(e)?t(e):gi(e)?e.escapedText.slice(1):Pn(e)}function Vp(e,t,a,o,m){return t=nm(t,m),o=nm(o,m),a=x6(a,m),`${e?"#":""}${t}${a}${o}`}function uh(e){if(e.transformFlags&65536)return!0;if(e.transformFlags&128)for(let t of T6(e)){let a=as(t);if(a&&Wg(a)&&(a.transformFlags&65536||a.transformFlags&128&&uh(a)))return!0}return!1}function yn(e,t){return t?yi(e,t.pos,t.end):e}function Nl(e){let t=e.kind;return t===168||t===169||t===171||t===172||t===173||t===174||t===176||t===177||t===178||t===181||t===185||t===218||t===219||t===231||t===243||t===262||t===263||t===264||t===265||t===266||t===267||t===271||t===272||t===277||t===278}function Wf(e){let t=e.kind;return t===169||t===172||t===174||t===177||t===178||t===231||t===263}var rm,im,am,_m,sm,w6={createBaseSourceFileNode:e=>new(sm||(sm=At.getSourceFileConstructor()))(e,-1,-1),createBaseIdentifierNode:e=>new(am||(am=At.getIdentifierConstructor()))(e,-1,-1),createBasePrivateIdentifierNode:e=>new(_m||(_m=At.getPrivateIdentifierConstructor()))(e,-1,-1),createBaseTokenNode:e=>new(im||(im=At.getTokenConstructor()))(e,-1,-1),createBaseNode:e=>new(rm||(rm=At.getNodeConstructor()))(e,-1,-1)},g3=wf(1,w6);function k(e,t){return t&&e(t)}function ie(e,t,a){if(a){if(t)return t(a);for(let o of a){let m=e(o);if(m)return m}}}function k6(e,t){return e.charCodeAt(t+1)===42&&e.charCodeAt(t+2)===42&&e.charCodeAt(t+3)!==47}function E6(e){return Un(e.statements,A6)||C6(e)}function A6(e){return Nl(e)&&D6(e,95)||Rf(e)&&zf(e.moduleReference)||Uf(e)||Bf(e)||qf(e)?e:void 0}function C6(e){return e.flags&8388608?ph(e):void 0}function ph(e){return P6(e)?e:Ht(e,ph)}function D6(e,t){return Xt(e.modifiers,a=>a.kind===t)}function P6(e){return Kb(e)&&e.keywordToken===102&&e.name.escapedText==="meta"}var N6={166:function(t,a,o){return k(a,t.left)||k(a,t.right)},168:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||k(a,t.constraint)||k(a,t.default)||k(a,t.expression)},304:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||k(a,t.questionToken)||k(a,t.exclamationToken)||k(a,t.equalsToken)||k(a,t.objectAssignmentInitializer)},305:function(t,a,o){return k(a,t.expression)},169:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.dotDotDotToken)||k(a,t.name)||k(a,t.questionToken)||k(a,t.type)||k(a,t.initializer)},172:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||k(a,t.questionToken)||k(a,t.exclamationToken)||k(a,t.type)||k(a,t.initializer)},171:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||k(a,t.questionToken)||k(a,t.type)||k(a,t.initializer)},303:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||k(a,t.questionToken)||k(a,t.exclamationToken)||k(a,t.initializer)},260:function(t,a,o){return k(a,t.name)||k(a,t.exclamationToken)||k(a,t.type)||k(a,t.initializer)},208:function(t,a,o){return k(a,t.dotDotDotToken)||k(a,t.propertyName)||k(a,t.name)||k(a,t.initializer)},181:function(t,a,o){return ie(a,o,t.modifiers)||ie(a,o,t.typeParameters)||ie(a,o,t.parameters)||k(a,t.type)},185:function(t,a,o){return ie(a,o,t.modifiers)||ie(a,o,t.typeParameters)||ie(a,o,t.parameters)||k(a,t.type)},184:function(t,a,o){return ie(a,o,t.modifiers)||ie(a,o,t.typeParameters)||ie(a,o,t.parameters)||k(a,t.type)},179:om,180:om,174:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.asteriskToken)||k(a,t.name)||k(a,t.questionToken)||k(a,t.exclamationToken)||ie(a,o,t.typeParameters)||ie(a,o,t.parameters)||k(a,t.type)||k(a,t.body)},173:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||k(a,t.questionToken)||ie(a,o,t.typeParameters)||ie(a,o,t.parameters)||k(a,t.type)},176:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||ie(a,o,t.typeParameters)||ie(a,o,t.parameters)||k(a,t.type)||k(a,t.body)},177:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||ie(a,o,t.typeParameters)||ie(a,o,t.parameters)||k(a,t.type)||k(a,t.body)},178:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||ie(a,o,t.typeParameters)||ie(a,o,t.parameters)||k(a,t.type)||k(a,t.body)},262:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.asteriskToken)||k(a,t.name)||ie(a,o,t.typeParameters)||ie(a,o,t.parameters)||k(a,t.type)||k(a,t.body)},218:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.asteriskToken)||k(a,t.name)||ie(a,o,t.typeParameters)||ie(a,o,t.parameters)||k(a,t.type)||k(a,t.body)},219:function(t,a,o){return ie(a,o,t.modifiers)||ie(a,o,t.typeParameters)||ie(a,o,t.parameters)||k(a,t.type)||k(a,t.equalsGreaterThanToken)||k(a,t.body)},175:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.body)},183:function(t,a,o){return k(a,t.typeName)||ie(a,o,t.typeArguments)},182:function(t,a,o){return k(a,t.assertsModifier)||k(a,t.parameterName)||k(a,t.type)},186:function(t,a,o){return k(a,t.exprName)||ie(a,o,t.typeArguments)},187:function(t,a,o){return ie(a,o,t.members)},188:function(t,a,o){return k(a,t.elementType)},189:function(t,a,o){return ie(a,o,t.elements)},192:cm,193:cm,194:function(t,a,o){return k(a,t.checkType)||k(a,t.extendsType)||k(a,t.trueType)||k(a,t.falseType)},195:function(t,a,o){return k(a,t.typeParameter)},205:function(t,a,o){return k(a,t.argument)||k(a,t.attributes)||k(a,t.qualifier)||ie(a,o,t.typeArguments)},302:function(t,a,o){return k(a,t.assertClause)},196:lm,198:lm,199:function(t,a,o){return k(a,t.objectType)||k(a,t.indexType)},200:function(t,a,o){return k(a,t.readonlyToken)||k(a,t.typeParameter)||k(a,t.nameType)||k(a,t.questionToken)||k(a,t.type)||ie(a,o,t.members)},201:function(t,a,o){return k(a,t.literal)},202:function(t,a,o){return k(a,t.dotDotDotToken)||k(a,t.name)||k(a,t.questionToken)||k(a,t.type)},206:um,207:um,209:function(t,a,o){return ie(a,o,t.elements)},210:function(t,a,o){return ie(a,o,t.properties)},211:function(t,a,o){return k(a,t.expression)||k(a,t.questionDotToken)||k(a,t.name)},212:function(t,a,o){return k(a,t.expression)||k(a,t.questionDotToken)||k(a,t.argumentExpression)},213:pm,214:pm,215:function(t,a,o){return k(a,t.tag)||k(a,t.questionDotToken)||ie(a,o,t.typeArguments)||k(a,t.template)},216:function(t,a,o){return k(a,t.type)||k(a,t.expression)},217:function(t,a,o){return k(a,t.expression)},220:function(t,a,o){return k(a,t.expression)},221:function(t,a,o){return k(a,t.expression)},222:function(t,a,o){return k(a,t.expression)},224:function(t,a,o){return k(a,t.operand)},229:function(t,a,o){return k(a,t.asteriskToken)||k(a,t.expression)},223:function(t,a,o){return k(a,t.expression)},225:function(t,a,o){return k(a,t.operand)},226:function(t,a,o){return k(a,t.left)||k(a,t.operatorToken)||k(a,t.right)},234:function(t,a,o){return k(a,t.expression)||k(a,t.type)},235:function(t,a,o){return k(a,t.expression)},238:function(t,a,o){return k(a,t.expression)||k(a,t.type)},236:function(t,a,o){return k(a,t.name)},227:function(t,a,o){return k(a,t.condition)||k(a,t.questionToken)||k(a,t.whenTrue)||k(a,t.colonToken)||k(a,t.whenFalse)},230:function(t,a,o){return k(a,t.expression)},241:fm,268:fm,307:function(t,a,o){return ie(a,o,t.statements)||k(a,t.endOfFileToken)},243:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.declarationList)},261:function(t,a,o){return ie(a,o,t.declarations)},244:function(t,a,o){return k(a,t.expression)},245:function(t,a,o){return k(a,t.expression)||k(a,t.thenStatement)||k(a,t.elseStatement)},246:function(t,a,o){return k(a,t.statement)||k(a,t.expression)},247:function(t,a,o){return k(a,t.expression)||k(a,t.statement)},248:function(t,a,o){return k(a,t.initializer)||k(a,t.condition)||k(a,t.incrementor)||k(a,t.statement)},249:function(t,a,o){return k(a,t.initializer)||k(a,t.expression)||k(a,t.statement)},250:function(t,a,o){return k(a,t.awaitModifier)||k(a,t.initializer)||k(a,t.expression)||k(a,t.statement)},251:dm,252:dm,253:function(t,a,o){return k(a,t.expression)},254:function(t,a,o){return k(a,t.expression)||k(a,t.statement)},255:function(t,a,o){return k(a,t.expression)||k(a,t.caseBlock)},269:function(t,a,o){return ie(a,o,t.clauses)},296:function(t,a,o){return k(a,t.expression)||ie(a,o,t.statements)},297:function(t,a,o){return ie(a,o,t.statements)},256:function(t,a,o){return k(a,t.label)||k(a,t.statement)},257:function(t,a,o){return k(a,t.expression)},258:function(t,a,o){return k(a,t.tryBlock)||k(a,t.catchClause)||k(a,t.finallyBlock)},299:function(t,a,o){return k(a,t.variableDeclaration)||k(a,t.block)},170:function(t,a,o){return k(a,t.expression)},263:mm,231:mm,264:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||ie(a,o,t.typeParameters)||ie(a,o,t.heritageClauses)||ie(a,o,t.members)},265:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||ie(a,o,t.typeParameters)||k(a,t.type)},266:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||ie(a,o,t.members)},306:function(t,a,o){return k(a,t.name)||k(a,t.initializer)},267:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||k(a,t.body)},271:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)||k(a,t.moduleReference)},272:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.importClause)||k(a,t.moduleSpecifier)||k(a,t.attributes)},273:function(t,a,o){return k(a,t.name)||k(a,t.namedBindings)},300:function(t,a,o){return ie(a,o,t.elements)},301:function(t,a,o){return k(a,t.name)||k(a,t.value)},270:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.name)},274:function(t,a,o){return k(a,t.name)},280:function(t,a,o){return k(a,t.name)},275:hm,279:hm,278:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.exportClause)||k(a,t.moduleSpecifier)||k(a,t.attributes)},276:ym,281:ym,277:function(t,a,o){return ie(a,o,t.modifiers)||k(a,t.expression)},228:function(t,a,o){return k(a,t.head)||ie(a,o,t.templateSpans)},239:function(t,a,o){return k(a,t.expression)||k(a,t.literal)},203:function(t,a,o){return k(a,t.head)||ie(a,o,t.templateSpans)},204:function(t,a,o){return k(a,t.type)||k(a,t.literal)},167:function(t,a,o){return k(a,t.expression)},298:function(t,a,o){return ie(a,o,t.types)},233:function(t,a,o){return k(a,t.expression)||ie(a,o,t.typeArguments)},283:function(t,a,o){return k(a,t.expression)},282:function(t,a,o){return ie(a,o,t.modifiers)},356:function(t,a,o){return ie(a,o,t.elements)},284:function(t,a,o){return k(a,t.openingElement)||ie(a,o,t.children)||k(a,t.closingElement)},288:function(t,a,o){return k(a,t.openingFragment)||ie(a,o,t.children)||k(a,t.closingFragment)},285:gm,286:gm,292:function(t,a,o){return ie(a,o,t.properties)},291:function(t,a,o){return k(a,t.name)||k(a,t.initializer)},293:function(t,a,o){return k(a,t.expression)},294:function(t,a,o){return k(a,t.dotDotDotToken)||k(a,t.expression)},287:function(t,a,o){return k(a,t.tagName)},295:function(t,a,o){return k(a,t.namespace)||k(a,t.name)},190:Fi,191:Fi,309:Fi,315:Fi,314:Fi,316:Fi,318:Fi,317:function(t,a,o){return ie(a,o,t.parameters)||k(a,t.type)},320:function(t,a,o){return(typeof t.comment=="string"?void 0:ie(a,o,t.comment))||ie(a,o,t.tags)},347:function(t,a,o){return k(a,t.tagName)||k(a,t.name)||(typeof t.comment=="string"?void 0:ie(a,o,t.comment))},310:function(t,a,o){return k(a,t.name)},311:function(t,a,o){return k(a,t.left)||k(a,t.right)},341:bm,348:bm,330:function(t,a,o){return k(a,t.tagName)||(typeof t.comment=="string"?void 0:ie(a,o,t.comment))},329:function(t,a,o){return k(a,t.tagName)||k(a,t.class)||(typeof t.comment=="string"?void 0:ie(a,o,t.comment))},328:function(t,a,o){return k(a,t.tagName)||k(a,t.class)||(typeof t.comment=="string"?void 0:ie(a,o,t.comment))},345:function(t,a,o){return k(a,t.tagName)||k(a,t.constraint)||ie(a,o,t.typeParameters)||(typeof t.comment=="string"?void 0:ie(a,o,t.comment))},346:function(t,a,o){return k(a,t.tagName)||(t.typeExpression&&t.typeExpression.kind===309?k(a,t.typeExpression)||k(a,t.fullName)||(typeof t.comment=="string"?void 0:ie(a,o,t.comment)):k(a,t.fullName)||k(a,t.typeExpression)||(typeof t.comment=="string"?void 0:ie(a,o,t.comment)))},338:function(t,a,o){return k(a,t.tagName)||k(a,t.fullName)||k(a,t.typeExpression)||(typeof t.comment=="string"?void 0:ie(a,o,t.comment))},342:Vi,344:Vi,343:Vi,340:Vi,350:Vi,349:Vi,339:Vi,323:function(t,a,o){return Un(t.typeParameters,a)||Un(t.parameters,a)||k(a,t.type)},324:Cp,325:Cp,326:Cp,322:function(t,a,o){return Un(t.jsDocPropertyTags,a)},327:ui,332:ui,333:ui,334:ui,335:ui,336:ui,331:ui,337:ui,351:I6,355:O6};function om(e,t,a){return ie(t,a,e.typeParameters)||ie(t,a,e.parameters)||k(t,e.type)}function cm(e,t,a){return ie(t,a,e.types)}function lm(e,t,a){return k(t,e.type)}function um(e,t,a){return ie(t,a,e.elements)}function pm(e,t,a){return k(t,e.expression)||k(t,e.questionDotToken)||ie(t,a,e.typeArguments)||ie(t,a,e.arguments)}function fm(e,t,a){return ie(t,a,e.statements)}function dm(e,t,a){return k(t,e.label)}function mm(e,t,a){return ie(t,a,e.modifiers)||k(t,e.name)||ie(t,a,e.typeParameters)||ie(t,a,e.heritageClauses)||ie(t,a,e.members)}function hm(e,t,a){return ie(t,a,e.elements)}function ym(e,t,a){return k(t,e.propertyName)||k(t,e.name)}function gm(e,t,a){return k(t,e.tagName)||ie(t,a,e.typeArguments)||k(t,e.attributes)}function Fi(e,t,a){return k(t,e.type)}function bm(e,t,a){return k(t,e.tagName)||(e.isNameFirst?k(t,e.name)||k(t,e.typeExpression):k(t,e.typeExpression)||k(t,e.name))||(typeof e.comment=="string"?void 0:ie(t,a,e.comment))}function Vi(e,t,a){return k(t,e.tagName)||k(t,e.typeExpression)||(typeof e.comment=="string"?void 0:ie(t,a,e.comment))}function Cp(e,t,a){return k(t,e.name)}function ui(e,t,a){return k(t,e.tagName)||(typeof e.comment=="string"?void 0:ie(t,a,e.comment))}function I6(e,t,a){return k(t,e.tagName)||k(t,e.importClause)||k(t,e.moduleSpecifier)||k(t,e.attributes)||(typeof e.comment=="string"?void 0:ie(t,a,e.comment))}function O6(e,t,a){return k(t,e.expression)}function Ht(e,t,a){if(e===void 0||e.kind<=165)return;let o=N6[e.kind];return o===void 0?void 0:o(e,t,a)}function vm(e,t,a){let o=Tm(e),m=[];for(;m.length=0;--P)o.push(v[P]),m.push(A)}else{let P=t(v,A);if(P){if(P==="skip")continue;return P}if(v.kind>=166)for(let l of Tm(v))o.push(l),m.push(v)}}}function Tm(e){let t=[];return Ht(e,a,a),t;function a(o){t.unshift(o)}}function fh(e){e.externalModuleIndicator=E6(e)}function dh(e,t,a,o=!1,m){var v,A;(v=_l)==null||v.push(_l.Phase.Parse,"createSourceFile",{path:e},!0),kd("beforeParse");let P,{languageVersion:l,setExternalModuleIndicator:Q,impliedNodeFormat:h,jsDocParsingMode:y}=typeof a=="object"?a:{languageVersion:a};if(l===100)P=Qi.parseSourceFile(e,t,l,void 0,o,6,Fa,y);else{let g=h===void 0?Q:x=>(x.impliedNodeFormat=h,(Q||fh)(x));P=Qi.parseSourceFile(e,t,l,void 0,o,m,g,y)}return kd("afterParse"),Dy("Parse","beforeParse","afterParse"),(A=_l)==null||A.pop(),P}function mh(e){return e.externalModuleIndicator!==void 0}function M6(e,t,a,o=!1){let m=vl.updateSourceFile(e,t,a,o);return m.flags|=e.flags&12582912,m}var Qi;(e=>{var t=sf(99,!0),a=40960,o,m,v,A,P;function l(s){return ar++,s}var Q={createBaseSourceFileNode:s=>l(new P(s,0,0)),createBaseIdentifierNode:s=>l(new v(s,0,0)),createBasePrivateIdentifierNode:s=>l(new A(s,0,0)),createBaseTokenNode:s=>l(new m(s,0,0)),createBaseNode:s=>l(new o(s,0,0))},h=wf(11,Q),{createNodeArray:y,createNumericLiteral:g,createStringLiteral:x,createLiteralLikeNode:I,createIdentifier:re,createPrivateIdentifier:he,createToken:ye,createArrayLiteralExpression:de,createObjectLiteralExpression:M,createPropertyAccessExpression:ae,createPropertyAccessChain:Oe,createElementAccessExpression:V,createElementAccessChain:oe,createCallExpression:W,createCallChain:dt,createNewExpression:nr,createParenthesizedExpression:gn,createBlock:rr,createVariableStatement:bn,createExpressionStatement:In,createIfStatement:Ge,createWhileStatement:ir,createForStatement:Pr,createForOfStatement:Ot,createVariableDeclaration:Bn,createVariableDeclarationList:On}=h,Mt,vt,Qe,qn,$t,ct,_t,Ut,Jt,lt,ar,mt,vn,yt,cn,nt,Bt=!0,rn=!1;function _r(s,p,d,b,S=!1,N,H,_e=0){var Z;if(N=db(s,N),N===6){let ce=dr(s,p,d,b,S);return convertToJson(ce,(Z=ce.statements[0])==null?void 0:Z.expression,ce.parseDiagnostics,!1,void 0),ce.referencedFiles=bt,ce.typeReferenceDirectives=bt,ce.libReferenceDirectives=bt,ce.amdDependencies=bt,ce.hasNoDefaultLib=!1,ce.pragmas=ty,ce}zn(s,p,d,b,N,_e);let ee=Nr(d,S,N,H||fh,_e);return Fn(),ee}e.parseSourceFile=_r;function fr(s,p){zn("",s,p,void 0,1,0),U();let d=jr(!0),b=u()===1&&!_t.length;return Fn(),b?d:void 0}e.parseIsolatedEntityName=fr;function dr(s,p,d=2,b,S=!1){zn(s,p,d,b,6,0),vt=nt,U();let N=J(),H,_e;if(u()===1)H=Ct([],N,N),_e=Wt();else{let ce;for(;u()!==1;){let Ae;switch(u()){case 23:Ae=ac();break;case 112:case 97:case 106:Ae=Wt();break;case 41:G(()=>U()===9&&U()!==59)?Ae=Fo():Ae=I_();break;case 9:case 11:if(G(()=>U()!==59)){Ae=Xn();break}default:Ae=I_();break}ce&&Yr(ce)?ce.push(Ae):ce?ce=[ce,Ae]:(ce=Ae,u()!==1&&Ee(E.Unexpected_token))}let Le=Yr(ce)?D(de(ce),N):B.checkDefined(ce),je=In(Le);D(je,N),H=Ct([je],N),_e=Yn(1,E.Unexpected_token)}let Z=se(s,2,6,!1,H,_e,vt,Fa);S&&L(Z),Z.nodeCount=ar,Z.identifierCount=vn,Z.identifiers=mt,Z.parseDiagnostics=zi(_t,Z),Ut&&(Z.jsDocDiagnostics=zi(Ut,Z));let ee=Z;return Fn(),ee}e.parseJsonText=dr;function zn(s,p,d,b,S,N){switch(o=At.getNodeConstructor(),m=At.getTokenConstructor(),v=At.getIdentifierConstructor(),A=At.getPrivateIdentifierConstructor(),P=At.getSourceFileConstructor(),Mt=zy(s),Qe=p,qn=d,Jt=b,$t=S,ct=Wd(S),_t=[],yt=0,mt=new Map,vn=0,ar=0,vt=0,Bt=!0,$t){case 1:case 2:nt=524288;break;case 6:nt=134742016;break;default:nt=0;break}rn=!1,t.setText(Qe),t.setOnError(Zr),t.setScriptTarget(qn),t.setLanguageVariant(ct),t.setScriptKind($t),t.setJSDocParsingMode(N)}function Fn(){t.clearCommentDirectives(),t.setText(""),t.setOnError(void 0),t.setScriptKind(0),t.setJSDocParsingMode(0),Qe=void 0,qn=void 0,Jt=void 0,$t=void 0,ct=void 0,vt=0,_t=void 0,Ut=void 0,yt=0,mt=void 0,cn=void 0,Bt=!0}function Nr(s,p,d,b,S){let N=j6(Mt);N&&(nt|=33554432),vt=nt,U();let H=xn(0,Kt);B.assert(u()===1);let _e=qe(),Z=Ce(Wt(),_e),ee=se(Mt,s,d,N,H,Z,vt,b);return B6(ee,Qe),q6(ee,ce),ee.commentDirectives=t.getCommentDirectives(),ee.nodeCount=ar,ee.identifierCount=vn,ee.identifiers=mt,ee.parseDiagnostics=zi(_t,ee),ee.jsDocParsingMode=S,Ut&&(ee.jsDocDiagnostics=zi(Ut,ee)),p&&L(ee),ee;function ce(Le,je,Ae){_t.push(Oa(Mt,Qe,Le,je,Ae))}}let Vn=!1;function Ce(s,p){if(!p)return s;B.assert(!s.jsDoc);let d=ay(l2(s,Qe),b=>Hc.parseJSDocComment(s,b.pos,b.end-b.pos));return d.length&&(s.jsDoc=d),Vn&&(Vn=!1,s.flags|=536870912),s}function mr(s){let p=Jt,d=vl.createSyntaxCursor(s);Jt={currentNode:ce};let b=[],S=_t;_t=[];let N=0,H=Z(s.statements,0);for(;H!==-1;){let Le=s.statements[N],je=s.statements[H];Dn(b,s.statements,N,H),N=ee(s.statements,H);let Ae=gp(S,mn=>mn.start>=Le.pos),Yt=Ae>=0?gp(S,mn=>mn.start>=je.pos,Ae):-1;Ae>=0&&Dn(_t,S,Ae,Yt>=0?Yt:void 0),un(()=>{let mn=nt;for(nt|=65536,t.resetTokenState(je.pos),U();u()!==1;){let Zt=t.getTokenFullStart(),ur=n_(0,Kt);if(b.push(ur),Zt===t.getTokenFullStart()&&U(),N>=0){let Ln=s.statements[N];if(ur.end===Ln.pos)break;ur.end>Ln.pos&&(N=ee(s.statements,N+1))}}nt=mn},2),H=N>=0?Z(s.statements,N):-1}if(N>=0){let Le=s.statements[N];Dn(b,s.statements,N);let je=gp(S,Ae=>Ae.start>=Le.pos);je>=0&&Dn(_t,S,je)}return Jt=p,h.updateSourceFile(s,yn(y(b),s.statements));function _e(Le){return!(Le.flags&65536)&&!!(Le.transformFlags&67108864)}function Z(Le,je){for(let Ae=je;Ae118}function ve(){return u()===80?!0:u()===127&&we()||u()===135&&Ye()?!1:u()>118}function j(s,p,d=!0){return u()===s?(d&&U(),!0):(p?Ee(p):Ee(E._0_expected,it(s)),!1)}let ht=Object.keys(nf).filter(s=>s.length>2);function xt(s){if(G1(s)){rt(Ar(Qe,s.template.pos),s.template.end,E.Module_declaration_names_may_only_use_or_quoted_strings);return}let p=tt(s)?Pn(s):void 0;if(!p||!og(p,qn)){Ee(E._0_expected,it(27));return}let d=Ar(Qe,s.pos);switch(p){case"const":case"let":case"var":rt(d,s.end,E.Variable_declaration_not_allowed_at_this_location);return;case"declare":return;case"interface":Lt(E.Interface_name_cannot_be_0,E.Interface_must_be_given_a_name,19);return;case"is":rt(d,t.getTokenStart(),E.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);return;case"module":case"namespace":Lt(E.Namespace_name_cannot_be_0,E.Namespace_must_be_given_a_name,19);return;case"type":Lt(E.Type_alias_name_cannot_be_0,E.Type_alias_must_be_given_a_name,64);return}let b=ns(p,ht,gt)??pn(p);if(b){rt(d,s.end,E.Unknown_keyword_or_identifier_Did_you_mean_0,b);return}u()!==0&&rt(d,s.end,E.Unexpected_keyword_or_identifier)}function Lt(s,p,d){u()===d?Ee(p):Ee(s,t.getTokenValue())}function pn(s){for(let p of ht)if(s.length>p.length+2&&ul(s,p))return`${p} ${s.slice(p.length)}`}function Ul(s,p,d){if(u()===60&&!t.hasPrecedingLineBreak()){Ee(E.Decorators_must_precede_the_name_and_all_keywords_of_property_declarations);return}if(u()===21){Ee(E.Cannot_start_a_function_call_in_a_type_annotation),U();return}if(p&&!sr()){d?Ee(E._0_expected,it(27)):Ee(E.Expected_for_property_initializer);return}if(!aa()){if(d){Ee(E._0_expected,it(27));return}xt(s)}}function Es(s){return u()===s?(ze(),!0):(B.assert(xp(s)),Ee(E._0_expected,it(s)),!1)}function Or(s,p,d,b){if(u()===p){U();return}let S=Ee(E._0_expected,it(p));d&&S&&nl(S,Oa(Mt,Qe,b,1,E.The_parser_expected_to_find_a_1_to_match_the_0_token_here,it(s),it(p)))}function Je(s){return u()===s?(U(),!0):!1}function ft(s){if(u()===s)return Wt()}function Bl(s){if(u()===s)return zl()}function Yn(s,p,d){return ft(s)||Gt(s,!1,p||E._0_expected,d||it(s))}function ql(s){let p=Bl(s);return p||(B.assert(xp(s)),Gt(s,!1,E._0_expected,it(s)))}function Wt(){let s=J(),p=u();return U(),D(ye(p),s)}function zl(){let s=J(),p=u();return ze(),D(ye(p),s)}function sr(){return u()===27?!0:u()===20||u()===1||t.hasPrecedingLineBreak()}function aa(){return sr()?(u()===27&&U(),!0):!1}function Qt(){return aa()||j(27)}function Ct(s,p,d,b){let S=y(s,b);return yi(S,p,d??t.getTokenFullStart()),S}function D(s,p,d){return yi(s,p,d??t.getTokenFullStart()),nt&&(s.flags|=nt),rn&&(rn=!1,s.flags|=262144),s}function Gt(s,p,d,...b){p?Tn(t.getTokenFullStart(),0,d,...b):d&&Ee(d,...b);let S=J(),N=s===80?re("",void 0):Ld(s)?h.createTemplateLiteralLikeNode(s,"","",void 0):s===9?g("",void 0):s===11?x("",void 0):s===282?h.createMissingDeclaration():ye(s);return D(N,S)}function Mr(s){let p=mt.get(s);return p===void 0&&mt.set(s,p=s),p}function or(s,p,d){if(s){vn++;let _e=t.hasPrecedingJSDocLeadingAsterisks()?t.getTokenStart():J(),Z=u(),ee=Mr(t.getTokenValue()),ce=t.hasExtendedUnicodeEscape();return Ne(),D(re(ee,Z,ce),_e)}if(u()===81)return Ee(d||E.Private_identifiers_are_not_allowed_outside_class_bodies),or(!0);if(u()===0&&t.tryScan(()=>t.reScanInvalidIdentifier()===80))return or(!0);vn++;let b=u()===1,S=t.isReservedWord(),N=t.getTokenText(),H=S?E.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:E.Identifier_expected;return Gt(80,b,p||H,N)}function Ka(s){return or(Fe(),void 0,s)}function St(s,p){return or(ve(),s,p)}function jt(s){return or(wt(u()),s)}function ei(){return(t.hasUnicodeEscape()||t.hasExtendedUnicodeEscape())&&Ee(E.Unicode_escape_sequence_cannot_appear_here),or(wt(u()))}function yr(){return wt(u())||u()===11||u()===9||u()===10}function As(){return wt(u())||u()===11}function Fl(s){if(u()===11||u()===9||u()===10){let p=Xn();return p.text=Mr(p.text),p}return s&&u()===23?Vl():u()===81?_a():jt()}function Jr(){return Fl(!0)}function Vl(){let s=J();j(23);let p=ut(Et);return j(24),D(h.createComputedPropertyName(p),s)}function _a(){let s=J(),p=he(Mr(t.getTokenValue()));return U(),D(p,s)}function ti(s){return u()===s&&le(Cs)}function Za(){return U(),t.hasPrecedingLineBreak()?!1:cr()}function Cs(){switch(u()){case 87:return U()===94;case 95:return U(),u()===90?G(Ei):u()===156?G(Wl):ki();case 90:return Ei();case 126:return U(),cr();case 139:case 153:return U(),Gl();default:return Za()}}function ki(){return u()===60||u()!==42&&u()!==130&&u()!==19&&cr()}function Wl(){return U(),ki()}function Ds(){return Wr(u())&&le(Cs)}function cr(){return u()===23||u()===19||u()===42||u()===26||yr()}function Gl(){return u()===23||yr()}function Ei(){return U(),u()===86||u()===100||u()===120||u()===60||u()===128&&G(gc)||u()===134&&G(bc)}function sa(s,p){if(ca(s))return!0;switch(s){case 0:case 1:case 3:return!(u()===27&&p)&&vc();case 2:return u()===84||u()===90;case 4:return G(ao);case 5:return G(Vu)||u()===27&&!p;case 6:return u()===23||yr();case 12:switch(u()){case 23:case 42:case 26:case 25:return!0;default:return yr()}case 18:return yr();case 9:return u()===23||u()===26||yr();case 24:return As();case 7:return u()===19?G(Ps):p?ve()&&!e_():x_()&&!e_();case 8:return ka();case 10:return u()===28||u()===26||ka();case 19:return u()===103||u()===87||ve();case 15:switch(u()){case 28:case 25:return!0}case 11:return u()===26||br();case 16:return fa(!1);case 17:return fa(!0);case 20:case 21:return u()===28||ai();case 22:return Rc();case 23:return u()===161&&G(Ru)?!1:u()===11?!0:wt(u());case 13:return wt(u())||u()===19;case 14:return!0;case 25:return!0;case 26:return B.fail("ParsingContext.Count used as a context");default:B.assertNever(s,"Non-exhaustive case in 'isListElement'.")}}function Ps(){if(B.assert(u()===19),U()===20){let s=U();return s===28||s===19||s===96||s===119}return!0}function Ai(){return U(),ve()}function Yl(){return U(),wt(u())}function Ns(){return U(),Fy(u())}function e_(){return u()===119||u()===96?G(Is):!1}function Is(){return U(),br()}function Ci(){return U(),ai()}function oa(s){if(u()===1)return!0;switch(s){case 1:case 2:case 4:case 5:case 6:case 12:case 9:case 23:case 24:return u()===20;case 3:return u()===20||u()===84||u()===90;case 7:return u()===19||u()===96||u()===119;case 8:return t_();case 19:return u()===32||u()===21||u()===19||u()===96||u()===119;case 11:return u()===22||u()===27;case 15:case 21:case 10:return u()===24;case 17:case 16:case 18:return u()===22||u()===24;case 20:return u()!==28;case 22:return u()===19||u()===20;case 13:return u()===32||u()===44;case 14:return u()===30&&G(G_);default:return!1}}function t_(){return!!(sr()||Uo(u())||u()===39)}function Os(){B.assert(yt,"Missing parsing context");for(let s=0;s<26;s++)if(yt&1<=0)}function __(s){return s===6?E.An_enum_member_name_must_be_followed_by_a_or:void 0}function lr(){let s=Ct([],J());return s.isMissingList=!0,s}function zs(s){return!!s.isMissingList}function Lr(s,p,d,b){if(j(d)){let S=fn(s,p);return j(b),S}return lr()}function jr(s,p){let d=J(),b=s?jt(p):St(p);for(;Je(25)&&u()!==30;)b=D(h.createQualifiedName(b,ni(s,!1,!0)),d);return b}function Xl(s,p){return D(h.createQualifiedName(s,p),s.pos)}function ni(s,p,d){if(t.hasPrecedingLineBreak()&&wt(u())&&G(M_))return Gt(80,!0,E.Identifier_expected);if(u()===81){let b=_a();return p?b:Gt(80,!0,E.Identifier_expected)}return s?d?jt():ei():St()}function Hl(s){let p=J(),d=[],b;do b=Gs(s),d.push(b);while(b.literal.kind===17);return Ct(d,p)}function ua(s){let p=J();return D(h.createTemplateExpression(Di(s),Hl(s)),p)}function Fs(){let s=J();return D(h.createTemplateLiteralType(Di(!1),$l()),s)}function $l(){let s=J(),p=[],d;do d=Vs(),p.push(d);while(d.literal.kind===17);return Ct(p,s)}function Vs(){let s=J();return D(h.createTemplateLiteralTypeSpan(ot(),Ws(!1)),s)}function Ws(s){return u()===20?(Pt(s),Ys()):Yn(18,E._0_expected,it(20))}function Gs(s){let p=J();return D(h.createTemplateSpan(ut(Et),Ws(s)),p)}function Xn(){return ri(u())}function Di(s){!s&&t.getTokenFlags()&26656&&Pt(!1);let p=ri(u());return B.assert(p.kind===16,"Template head has wrong token kind"),p}function Ys(){let s=ri(u());return B.assert(s.kind===17||s.kind===18,"Template fragment has wrong token kind"),s}function Ql(s){let p=s===15||s===18,d=t.getTokenText();return d.substring(1,d.length-(t.isUnterminated()?0:p?1:2))}function ri(s){let p=J(),d=Ld(s)?h.createTemplateLiteralLikeNode(s,t.getTokenValue(),Ql(s),t.getTokenFlags()&7176):s===9?g(t.getTokenValue(),t.getNumericLiteralFlags()):s===11?x(t.getTokenValue(),void 0,t.hasExtendedUnicodeEscape()):Jg(s)?I(s,t.getTokenValue()):B.fail();return t.hasExtendedUnicodeEscape()&&(d.hasExtendedUnicodeEscape=!0),t.isUnterminated()&&(d.isUnterminated=!0),U(),D(d,p)}function ii(){return jr(!0,E.Type_expected)}function Xs(){if(!t.hasPrecedingLineBreak()&&kt()===30)return Lr(20,ot,30,32)}function pa(){let s=J();return D(h.createTypeReferenceNode(ii(),Xs()),s)}function s_(s){switch(s.kind){case 183:return Hi(s.typeName);case 184:case 185:{let{parameters:p,type:d}=s;return zs(p)||s_(d)}case 196:return s_(s.type);default:return!1}}function Kl(s){return U(),D(h.createTypePredicateNode(void 0,s,ot()),s.pos)}function o_(){let s=J();return U(),D(h.createThisTypeNode(),s)}function Zl(){let s=J();return U(),D(h.createJSDocAllType(),s)}function Hs(){let s=J();return U(),D(h.createJSDocNonNullableType(b_(),!1),s)}function eu(){let s=J();return U(),u()===28||u()===20||u()===22||u()===32||u()===64||u()===52?D(h.createJSDocUnknownType(),s):D(h.createJSDocNullableType(ot(),!1),s)}function $s(){let s=J(),p=qe();if(le(Fc)){let d=Hn(36),b=Jn(59,!1);return Ce(D(h.createJSDocFunctionType(d,b),s),p)}return D(h.createTypeReferenceNode(jt(),void 0),s)}function c_(){let s=J(),p;return(u()===110||u()===105)&&(p=jt(),j(59)),D(h.createParameterDeclaration(void 0,void 0,p,void 0,l_(),void 0),s)}function l_(){t.setSkipJsDocLeadingAsterisks(!0);let s=J();if(Je(144)){let b=h.createJSDocNamepathType(void 0);e:for(;;)switch(u()){case 20:case 1:case 28:case 5:break e;default:ze()}return t.setSkipJsDocLeadingAsterisks(!1),D(b,s)}let p=Je(26),d=ha();return t.setSkipJsDocLeadingAsterisks(!1),p&&(d=D(h.createJSDocVariadicType(d),s)),u()===64?(U(),D(h.createJSDocOptionalType(d),s)):d}function Qs(){let s=J();j(114);let p=jr(!0),d=t.hasPrecedingLineBreak()?void 0:Ca();return D(h.createTypeQueryNode(p,d),s)}function Ks(){let s=J(),p=wn(!1,!0),d=St(),b,S;Je(96)&&(ai()||!br()?b=ot():S=Yo());let N=Je(64)?ot():void 0,H=h.createTypeParameterDeclaration(p,d,b,N);return H.expression=S,D(H,s)}function dn(){if(u()===30)return Lr(19,Ks,30,32)}function fa(s){return u()===26||ka()||Wr(u())||u()===60||ai(!s)}function Zs(s){let p=Li(E.Private_identifiers_cannot_be_used_as_parameters);return a2(p)===0&&!Xt(s)&&Wr(u())&&U(),p}function eo(){return Fe()||u()===23||u()===19}function u_(s){return p_(s)}function to(s){return p_(s,!1)}function p_(s,p=!0){let d=J(),b=qe(),S=s?R(()=>wn(!0)):$(()=>wn(!0));if(u()===110){let Z=h.createParameterDeclaration(S,void 0,or(!0),void 0,gr(),void 0),ee=Xp(S);return ee&&ln(ee,E.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters),Ce(D(Z,d),b)}let N=Bt;Bt=!1;let H=ft(26);if(!p&&!eo())return;let _e=Ce(D(h.createParameterDeclaration(S,H,Zs(S),ft(58),gr(),vr()),d),b);return Bt=N,_e}function Jn(s,p){if(no(s,p))return hr(ha)}function no(s,p){return s===39?(j(s),!0):Je(59)?!0:p&&u()===39?(Ee(E._0_expected,it(59)),U(),!0):!1}function f_(s,p){let d=we(),b=Ye();He(!!(s&1)),st(!!(s&2));let S=s&32?fn(17,c_):fn(16,()=>p?u_(b):to(b));return He(d),st(b),S}function Hn(s){if(!j(21))return lr();let p=f_(s,!0);return j(22),p}function da(){Je(28)||Qt()}function ro(s){let p=J(),d=qe();s===180&&j(105);let b=dn(),S=Hn(4),N=Jn(59,!0);da();let H=s===179?h.createCallSignature(b,S,N):h.createConstructSignature(b,S,N);return Ce(D(H,p),d)}function Rr(){return u()===23&&G(tu)}function tu(){if(U(),u()===26||u()===24)return!0;if(Wr(u())){if(U(),ve())return!0}else if(ve())U();else return!1;return u()===59||u()===28?!0:u()!==58?!1:(U(),u()===59||u()===28||u()===24)}function d_(s,p,d){let b=Lr(16,()=>u_(!1),23,24),S=gr();da();let N=h.createIndexSignature(d,b,S);return Ce(D(N,s),p)}function io(s,p,d){let b=Jr(),S=ft(58),N;if(u()===21||u()===30){let H=dn(),_e=Hn(4),Z=Jn(59,!0);N=h.createMethodSignature(d,b,S,H,_e,Z)}else{let H=gr();N=h.createPropertySignature(d,b,S,H),u()===64&&(N.initializer=vr())}return da(),Ce(D(N,s),p)}function ao(){if(u()===21||u()===30||u()===139||u()===153)return!0;let s=!1;for(;Wr(u());)s=!0,U();return u()===23?!0:(yr()&&(s=!0,U()),s?u()===21||u()===30||u()===58||u()===59||u()===28||sr():!1)}function Pi(){if(u()===21||u()===30)return ro(179);if(u()===105&&G(_o))return ro(180);let s=J(),p=qe(),d=wn(!1);return ti(139)?qr(s,p,d,177,4):ti(153)?qr(s,p,d,178,4):Rr()?d_(s,p,d):io(s,p,d)}function _o(){return U(),u()===21||u()===30}function so(){return U()===25}function oo(){switch(U()){case 21:case 30:case 25:return!0}return!1}function co(){let s=J();return D(h.createTypeLiteralNode(lo()),s)}function lo(){let s;return j(19)?(s=xn(4,Pi),j(20)):s=lr(),s}function uo(){return U(),u()===40||u()===41?U()===148:(u()===148&&U(),u()===23&&Ai()&&U()===103)}function nu(){let s=J(),p=jt();j(103);let d=ot();return D(h.createTypeParameterDeclaration(void 0,p,d,void 0),s)}function po(){let s=J();j(19);let p;(u()===148||u()===40||u()===41)&&(p=Wt(),p.kind!==148&&j(148)),j(23);let d=nu(),b=Je(130)?ot():void 0;j(24);let S;(u()===58||u()===40||u()===41)&&(S=Wt(),S.kind!==58&&j(58));let N=gr();Qt();let H=xn(4,Pi);return j(20),D(h.createMappedTypeNode(p,d,b,S,N,H),s)}function fo(){let s=J();if(Je(26))return D(h.createRestTypeNode(ot()),s);let p=ot();if(ah(p)&&p.pos===p.type.pos){let d=h.createOptionalTypeNode(p.type);return yn(d,p),d.flags=p.flags,d}return p}function m_(){return U()===59||u()===58&&U()===59}function ru(){return u()===26?wt(U())&&m_():wt(u())&&m_()}function mo(){if(G(ru)){let s=J(),p=qe(),d=ft(26),b=jt(),S=ft(58);j(59);let N=fo(),H=h.createNamedTupleMember(d,b,S,N);return Ce(D(H,s),p)}return fo()}function iu(){let s=J();return D(h.createTupleTypeNode(Lr(21,mo,23,24)),s)}function ho(){let s=J();j(21);let p=ot();return j(22),D(h.createParenthesizedType(p),s)}function au(){let s;if(u()===128){let p=J();U();let d=D(ye(128),p);s=Ct([d],p)}return s}function h_(){let s=J(),p=qe(),d=au(),b=Je(105);B.assert(!d||b,"Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers.");let S=dn(),N=Hn(4),H=Jn(39,!1),_e=b?h.createConstructorTypeNode(d,S,N,H):h.createFunctionTypeNode(S,N,H);return Ce(D(_e,s),p)}function yo(){let s=Wt();return u()===25?void 0:s}function y_(s){let p=J();s&&U();let d=u()===112||u()===97||u()===106?Wt():ri(u());return s&&(d=D(h.createPrefixUnaryExpression(41,d),p)),D(h.createLiteralTypeNode(d),p)}function _u(){return U(),u()===102}function g_(){vt|=4194304;let s=J(),p=Je(114);j(102),j(21);let d=ot(),b;if(Je(28)){let H=t.getTokenStart();j(19);let _e=u();if(_e===118||_e===132?U():Ee(E._0_expected,it(118)),j(59),b=Y_(_e,!0),!j(20)){let Z=Yi(_t);Z&&Z.code===E._0_expected.code&&nl(Z,Oa(Mt,Qe,H,1,E.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}}j(22);let S=Je(25)?ii():void 0,N=Xs();return D(h.createImportTypeNode(d,b,S,N,p),s)}function go(){return U(),u()===9||u()===10}function b_(){switch(u()){case 133:case 159:case 154:case 150:case 163:case 155:case 136:case 157:case 146:case 151:return le(yo)||pa();case 67:t.reScanAsteriskEqualsToken();case 42:return Zl();case 61:t.reScanQuestionToken();case 58:return eu();case 100:return $s();case 54:return Hs();case 15:case 11:case 9:case 10:case 112:case 97:case 106:return y_();case 41:return G(go)?y_(!0):pa();case 116:return Wt();case 110:{let s=o_();return u()===142&&!t.hasPrecedingLineBreak()?Kl(s):s}case 114:return G(_u)?g_():Qs();case 19:return G(uo)?po():co();case 23:return iu();case 21:return ho();case 102:return g_();case 131:return G(M_)?Co():pa();case 16:return Fs();default:return pa()}}function ai(s){switch(u()){case 133:case 159:case 154:case 150:case 163:case 136:case 148:case 155:case 158:case 116:case 157:case 106:case 110:case 114:case 146:case 19:case 23:case 30:case 52:case 51:case 105:case 11:case 9:case 10:case 112:case 97:case 151:case 42:case 58:case 54:case 26:case 140:case 102:case 131:case 15:case 16:return!0;case 100:return!s;case 41:return!s&&G(go);case 21:return!s&&G(bo);default:return ve()}}function bo(){return U(),u()===22||fa(!1)||ai()}function vo(){let s=J(),p=b_();for(;!t.hasPrecedingLineBreak();)switch(u()){case 54:U(),p=D(h.createJSDocNonNullableType(p,!0),s);break;case 58:if(G(Ci))return p;U(),p=D(h.createJSDocNullableType(p,!0),s);break;case 23:if(j(23),ai()){let d=ot();j(24),p=D(h.createIndexedAccessTypeNode(p,d),s)}else j(24),p=D(h.createArrayTypeNode(p),s);break;default:return p}return p}function To(s){let p=J();return j(s),D(h.createTypeOperatorNode(s,So()),p)}function su(){if(Je(96)){let s=Mn(ot);if(We()||u()!==58)return s}}function xo(){let s=J(),p=St(),d=le(su),b=h.createTypeParameterDeclaration(void 0,p,d);return D(b,s)}function ou(){let s=J();return j(140),D(h.createInferTypeNode(xo()),s)}function So(){let s=u();switch(s){case 143:case 158:case 148:return To(s);case 140:return ou()}return hr(vo)}function ma(s){if(T_()){let p=h_(),d;return Pf(p)?d=s?E.Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:E.Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:d=s?E.Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type:E.Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type,ln(p,d),p}}function wo(s,p,d){let b=J(),S=s===52,N=Je(s),H=N&&ma(S)||p();if(u()===s||N){let _e=[H];for(;Je(s);)_e.push(ma(S)||p());H=D(d(Ct(_e,b)),b)}return H}function v_(){return wo(51,So,h.createIntersectionTypeNode)}function cu(){return wo(52,v_,h.createUnionTypeNode)}function ko(){return U(),u()===105}function T_(){return u()===30||u()===21&&G(Eo)?!0:u()===105||u()===128&&G(ko)}function lu(){if(Wr(u())&&wn(!1),ve()||u()===110)return U(),!0;if(u()===23||u()===19){let s=_t.length;return Li(),s===_t.length}return!1}function Eo(){return U(),!!(u()===22||u()===26||lu()&&(u()===59||u()===28||u()===58||u()===64||u()===22&&(U(),u()===39)))}function ha(){let s=J(),p=ve()&&le(Ao),d=ot();return p?D(h.createTypePredicateNode(void 0,p,d),s):d}function Ao(){let s=St();if(u()===142&&!t.hasPrecedingLineBreak())return U(),s}function Co(){let s=J(),p=Yn(131),d=u()===110?o_():St(),b=Je(142)?ot():void 0;return D(h.createTypePredicateNode(p,d,b),s)}function ot(){if(nt&81920)return Dt(81920,ot);if(T_())return h_();let s=J(),p=cu();if(!We()&&!t.hasPrecedingLineBreak()&&Je(96)){let d=Mn(ot);j(58);let b=hr(ot);j(59);let S=hr(ot);return D(h.createConditionalTypeNode(p,d,b,S),s)}return p}function gr(){return Je(59)?ot():void 0}function x_(){switch(u()){case 110:case 108:case 106:case 112:case 97:case 9:case 10:case 11:case 15:case 16:case 21:case 23:case 19:case 100:case 86:case 105:case 44:case 69:case 80:return!0;case 102:return G(oo);default:return ve()}}function br(){if(x_())return!0;switch(u()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 46:case 47:case 30:case 135:case 127:case 81:case 60:return!0;default:return Bo()?!0:ve()}}function Do(){return u()!==19&&u()!==100&&u()!==86&&u()!==60&&br()}function Et(){let s=Ze();s&&Ke(!1);let p=J(),d=zt(!0),b;for(;b=ft(28);)d=k_(d,b,zt(!0),p);return s&&Ke(!0),d}function vr(){return Je(64)?zt(!0):void 0}function zt(s){if(Po())return No();let p=pu(s)||Lo(s);if(p)return p;let d=J(),b=qe(),S=Ni(0);return S.kind===80&&u()===39?Io(d,S,s,b,void 0):qa(S)&&S1(Ve())?k_(S,Wt(),zt(s),d):fu(S,d,s)}function Po(){return u()===127?we()?!0:G(J_):!1}function uu(){return U(),!t.hasPrecedingLineBreak()&&ve()}function No(){let s=J();return U(),!t.hasPrecedingLineBreak()&&(u()===42||br())?D(h.createYieldExpression(ft(42),zt(!0)),s):D(h.createYieldExpression(void 0,void 0),s)}function Io(s,p,d,b,S){B.assert(u()===39,"parseSimpleArrowFunctionExpression should only have been called if we had a =>");let N=h.createParameterDeclaration(void 0,void 0,p,void 0,void 0,void 0);D(N,p.pos);let H=Ct([N],N.pos,N.end),_e=Yn(39),Z=S_(!!S,d),ee=h.createArrowFunction(S,void 0,H,void 0,_e,Z);return Ce(D(ee,s),b)}function pu(s){let p=Oo();if(p!==0)return p===1?Ro(!0,!0):le(()=>Jo(s))}function Oo(){return u()===21||u()===30||u()===134?G(Mo):u()===39?1:0}function Mo(){if(u()===134&&(U(),t.hasPrecedingLineBreak()||u()!==21&&u()!==30))return 0;let s=u(),p=U();if(s===21){if(p===22)switch(U()){case 39:case 59:case 19:return 1;default:return 0}if(p===23||p===19)return 2;if(p===26)return 1;if(Wr(p)&&p!==134&&G(Ai))return U()===130?0:1;if(!ve()&&p!==110)return 0;switch(U()){case 59:return 1;case 58:return U(),u()===59||u()===28||u()===64||u()===22?1:0;case 28:case 64:case 22:return 2}return 0}else return B.assert(s===30),!ve()&&u()!==87?0:ct===1?G(()=>{Je(87);let b=U();if(b===96)switch(U()){case 64:case 32:case 44:return!1;default:return!0}else if(b===28||b===64)return!0;return!1})?1:0:2}function Jo(s){let p=t.getTokenStart();if(cn!=null&&cn.has(p))return;let d=Ro(!1,s);return d||(cn||(cn=new Set)).add(p),d}function Lo(s){if(u()===134&&G(jo)===1){let p=J(),d=qe(),b=Jc(),S=Ni(0);return Io(p,S,s,d,b)}}function jo(){if(u()===134){if(U(),t.hasPrecedingLineBreak()||u()===39)return 0;let s=Ni(0);if(!t.hasPrecedingLineBreak()&&s.kind===80&&u()===39)return 1}return 0}function Ro(s,p){let d=J(),b=qe(),S=Jc(),N=Xt(S,al)?2:0,H=dn(),_e;if(j(21)){if(s)_e=f_(N,s);else{let Zt=f_(N,s);if(!Zt)return;_e=Zt}if(!j(22)&&!s)return}else{if(!s)return;_e=lr()}let Z=u()===59,ee=Jn(59,!1);if(ee&&!s&&s_(ee))return;let ce=ee;for(;(ce==null?void 0:ce.kind)===196;)ce=ce.type;let Le=ce&&_h(ce);if(!s&&u()!==39&&(Le||u()!==19))return;let je=u(),Ae=Yn(39),Yt=je===39||je===19?S_(Xt(S,al),p):St();if(!p&&Z&&u()!==59)return;let mn=h.createArrowFunction(S,H,_e,ee,Ae,Yt);return Ce(D(mn,d),b)}function S_(s,p){if(u()===19)return Ta(s?2:0);if(u()!==27&&u()!==100&&u()!==86&&vc()&&!Do())return Ta(16|(s?2:0));let d=Bt;Bt=!1;let b=s?R(()=>zt(p)):$(()=>zt(p));return Bt=d,b}function fu(s,p,d){let b=ft(58);if(!b)return s;let S;return D(h.createConditionalExpression(s,b,Dt(a,()=>zt(!1)),S=Yn(59),Rp(S)?zt(d):Gt(80,!1,E._0_expected,it(59))),p)}function Ni(s){let p=J(),d=Yo();return w_(s,d,p)}function Uo(s){return s===103||s===165}function w_(s,p,d){for(;;){Ve();let b=Sp(u());if(!(u()===43?b>=s:b>s)||u()===103&&be())break;if(u()===130||u()===152){if(t.hasPrecedingLineBreak())break;{let N=u();U(),p=N===152?qo(p,ot()):zo(p,ot())}}else p=k_(p,Wt(),Ni(b),d)}return p}function Bo(){return be()&&u()===103?!1:Sp(u())>0}function qo(s,p){return D(h.createSatisfiesExpression(s,p),s.pos)}function k_(s,p,d,b){return D(h.createBinaryExpression(s,p,d),b)}function zo(s,p){return D(h.createAsExpression(s,p),s.pos)}function Fo(){let s=J();return D(h.createPrefixUnaryExpression(u(),Me(Tr)),s)}function Vo(){let s=J();return D(h.createDeleteExpression(Me(Tr)),s)}function du(){let s=J();return D(h.createTypeOfExpression(Me(Tr)),s)}function Wo(){let s=J();return D(h.createVoidExpression(Me(Tr)),s)}function mu(){return u()===135?Ye()?!0:G(J_):!1}function Go(){let s=J();return D(h.createAwaitExpression(Me(Tr)),s)}function Yo(){if(hu()){let d=J(),b=ya();return u()===43?w_(Sp(u()),b,d):b}let s=u(),p=Tr();if(u()===43){let d=Ar(Qe,p.pos),{end:b}=p;p.kind===216?rt(d,b,E.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses):(B.assert(xp(s)),rt(d,b,E.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses,it(s)))}return p}function Tr(){switch(u()){case 40:case 41:case 55:case 54:return Fo();case 91:return Vo();case 114:return du();case 116:return Wo();case 30:return ct===1?Oi(!0,void 0,void 0,!0):Ko();case 135:if(mu())return Go();default:return ya()}}function hu(){switch(u()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 135:return!1;case 30:if(ct!==1)return!1;default:return!0}}function ya(){if(u()===46||u()===47){let p=J();return D(h.createPrefixUnaryExpression(u(),Me(Ii)),p)}else if(ct===1&&u()===30&&G(Ns))return Oi(!0);let s=Ii();if(B.assert(qa(s)),(u()===46||u()===47)&&!t.hasPrecedingLineBreak()){let p=u();return U(),D(h.createPostfixUnaryExpression(s,p),s.pos)}return s}function Ii(){let s=J(),p;return u()===102?G(_o)?(vt|=4194304,p=Wt()):G(so)?(U(),U(),p=D(h.createMetaProperty(102,jt()),s),vt|=8388608):p=ga():p=u()===108?Xo():ga(),P_(s,p)}function ga(){let s=J(),p=N_();return _n(s,p,!0)}function Xo(){let s=J(),p=Wt();if(u()===30){let d=J(),b=le(va);b!==void 0&&(rt(d,J(),E.super_may_not_use_type_arguments),Sn()||(p=h.createExpressionWithTypeArguments(p,b)))}return u()===21||u()===25||u()===23?p:(Yn(25,E.super_must_be_followed_by_an_argument_list_or_member_access),D(ae(p,ni(!0,!0,!0)),s))}function Oi(s,p,d,b=!1){let S=J(),N=bu(s),H;if(N.kind===286){let _e=ba(N),Z,ee=_e[_e.length-1];if((ee==null?void 0:ee.kind)===284&&!pi(ee.openingElement.tagName,ee.closingElement.tagName)&&pi(N.tagName,ee.closingElement.tagName)){let ce=ee.children.end,Le=D(h.createJsxElement(ee.openingElement,ee.children,D(h.createJsxClosingElement(D(re(""),ce,ce)),ce,ce)),ee.openingElement.pos,ce);_e=Ct([..._e.slice(0,_e.length-1),Le],_e.pos,ce),Z=ee.closingElement}else Z=Qo(N,s),pi(N.tagName,Z.tagName)||(d&&zp(d)&&pi(Z.tagName,d.tagName)?ln(N.tagName,E.JSX_element_0_has_no_corresponding_closing_tag,is(Qe,N.tagName)):ln(Z.tagName,E.Expected_corresponding_JSX_closing_tag_for_0,is(Qe,N.tagName)));H=D(h.createJsxElement(N,_e,Z),S)}else N.kind===289?H=D(h.createJsxFragment(N,ba(N),Su(s)),S):(B.assert(N.kind===285),H=N);if(!b&&s&&u()===30){let _e=typeof p>"u"?H.pos:p,Z=le(()=>Oi(!0,_e));if(Z){let ee=Gt(28,!1);return Yd(ee,Z.pos,0),rt(Ar(Qe,_e),Z.end,E.JSX_expressions_must_have_one_parent_element),D(h.createBinaryExpression(H,ee,Z),S)}}return H}function E_(){let s=J(),p=h.createJsxText(t.getTokenValue(),lt===13);return lt=t.scanJsxToken(),D(p,s)}function yu(s,p){switch(p){case 1:if(t6(s))ln(s,E.JSX_fragment_has_no_corresponding_closing_tag);else{let d=s.tagName,b=Math.min(Ar(Qe,d.pos),d.end);rt(b,d.end,E.JSX_element_0_has_no_corresponding_closing_tag,is(Qe,s.tagName))}return;case 31:case 7:return;case 12:case 13:return E_();case 19:return Ho(!1);case 30:return Oi(!1,void 0,s);default:return B.assertNever(p)}}function ba(s){let p=[],d=J(),b=yt;for(yt|=16384;;){let S=yu(s,lt=t.reScanJsxToken());if(!S||(p.push(S),zp(s)&&(S==null?void 0:S.kind)===284&&!pi(S.openingElement.tagName,S.closingElement.tagName)&&pi(s.tagName,S.closingElement.tagName)))break}return yt=b,Ct(p,d)}function gu(){let s=J();return D(h.createJsxAttributes(xn(13,$o)),s)}function bu(s){let p=J();if(j(30),u()===32)return Gn(),D(h.createJsxOpeningFragment(),p);let d=A_(),b=(nt&524288)===0?Ca():void 0,S=gu(),N;return u()===32?(Gn(),N=h.createJsxOpeningElement(d,b,S)):(j(44),j(32,void 0,!1)&&(s?U():Gn()),N=h.createJsxSelfClosingElement(d,b,S)),D(N,p)}function A_(){let s=J(),p=vu();if(th(p))return p;let d=p;for(;Je(25);)d=D(ae(d,ni(!0,!1,!1)),s);return d}function vu(){let s=J();qt();let p=u()===110,d=ei();return Je(59)?(qt(),D(h.createJsxNamespacedName(d,ei()),s)):p?D(h.createToken(110),s):d}function Ho(s){let p=J();if(!j(19))return;let d,b;return u()!==20&&(s||(d=ft(26)),b=Et()),s?j(20):j(20,void 0,!1)&&Gn(),D(h.createJsxExpression(d,b),p)}function $o(){if(u()===19)return xu();let s=J();return D(h.createJsxAttribute(Tu(),C_()),s)}function C_(){if(u()===64){if(wi()===11)return Xn();if(u()===19)return Ho(!0);if(u()===30)return Oi(!0);Ee(E.or_JSX_element_expected)}}function Tu(){let s=J();qt();let p=ei();return Je(59)?(qt(),D(h.createJsxNamespacedName(p,ei()),s)):p}function xu(){let s=J();j(19),j(26);let p=Et();return j(20),D(h.createJsxSpreadAttribute(p),s)}function Qo(s,p){let d=J();j(31);let b=A_();return j(32,void 0,!1)&&(p||!pi(s.tagName,b)?U():Gn()),D(h.createJsxClosingElement(b),d)}function Su(s){let p=J();return j(31),j(32,E.Expected_corresponding_closing_tag_for_JSX_fragment,!1)&&(s?U():Gn()),D(h.createJsxJsxClosingFragment(),p)}function Ko(){B.assert(ct!==1,"Type assertions should never be parsed in JSX; they should be parsed as comparisons or JSX elements/fragments.");let s=J();j(30);let p=ot();j(32);let d=Tr();return D(h.createTypeAssertion(p,d),s)}function wu(){return U(),wt(u())||u()===23||Sn()}function Zo(){return u()===29&&G(wu)}function D_(s){if(s.flags&64)return!0;if(cl(s)){let p=s.expression;for(;cl(p)&&!(p.flags&64);)p=p.expression;if(p.flags&64){for(;cl(s);)s.flags|=64,s=s.expression;return!0}}return!1}function ec(s,p,d){let b=ni(!0,!0,!0),S=d||D_(p),N=S?Oe(p,d,b):ae(p,b);if(S&&gi(N.name)&&ln(N.name,E.An_optional_chain_cannot_contain_private_identifiers),$1(p)&&p.typeArguments){let H=p.typeArguments.pos-1,_e=Ar(Qe,p.typeArguments.end)+1;rt(H,_e,E.An_instantiation_expression_cannot_be_followed_by_a_property_access)}return D(N,s)}function ku(s,p,d){let b;if(u()===24)b=Gt(80,!0,E.An_element_access_expression_should_take_an_argument);else{let N=ut(Et);kl(N)&&(N.text=Mr(N.text)),b=N}j(24);let S=d||D_(p)?oe(p,d,b):V(p,b);return D(S,s)}function _n(s,p,d){for(;;){let b,S=!1;if(d&&Zo()?(b=Yn(29),S=wt(u())):S=Je(25),S){p=ec(s,p,b);continue}if((b||!Ze())&&Je(23)){p=ku(s,p,b);continue}if(Sn()){p=!b&&p.kind===233?Ur(s,p.expression,b,p.typeArguments):Ur(s,p,b,void 0);continue}if(!b){if(u()===54&&!t.hasPrecedingLineBreak()){U(),p=D(h.createNonNullExpression(p),s);continue}let N=le(va);if(N){p=D(h.createExpressionWithTypeArguments(p,N),s);continue}}return p}}function Sn(){return u()===15||u()===16}function Ur(s,p,d,b){let S=h.createTaggedTemplateExpression(p,b,u()===15?(Pt(!0),Xn()):ua(!0));return(d||p.flags&64)&&(S.flags|=64),S.questionDotToken=d,D(S,s)}function P_(s,p){for(;;){p=_n(s,p,!0);let d,b=ft(29);if(b&&(d=le(va),Sn())){p=Ur(s,p,b,d);continue}if(d||u()===21){!b&&p.kind===233&&(d=p.typeArguments,p=p.expression);let S=tc(),N=b||D_(p)?dt(p,b,d,S):W(p,d,S);p=D(N,s);continue}if(b){let S=Gt(80,!1,E.Identifier_expected);p=D(Oe(p,b,S),s)}break}return p}function tc(){j(21);let s=fn(11,ic);return j(22),s}function va(){if((nt&524288)!==0||kt()!==30)return;U();let s=fn(20,ot);if(Ve()===32)return U(),s&&Eu()?s:void 0}function Eu(){switch(u()){case 21:case 15:case 16:return!0;case 30:case 32:case 40:case 41:return!1}return t.hasPrecedingLineBreak()||Bo()||!br()}function N_(){switch(u()){case 15:t.getTokenFlags()&26656&&Pt(!1);case 9:case 10:case 11:return Xn();case 110:case 108:case 106:case 112:case 97:return Wt();case 21:return Au();case 23:return ac();case 19:return I_();case 134:if(!G(bc))break;return O_();case 60:return Lc();case 86:return Xu();case 100:return O_();case 105:return sc();case 44:case 69:if($e()===14)return Xn();break;case 16:return ua(!1);case 81:return _a()}return St(E.Expression_expected)}function Au(){let s=J(),p=qe();j(21);let d=ut(Et);return j(22),Ce(D(gn(d),s),p)}function nc(){let s=J();j(26);let p=zt(!0);return D(h.createSpreadElement(p),s)}function rc(){return u()===26?nc():u()===28?D(h.createOmittedExpression(),J()):zt(!0)}function ic(){return Dt(a,rc)}function ac(){let s=J(),p=t.getTokenStart(),d=j(23),b=t.hasPrecedingLineBreak(),S=fn(15,rc);return Or(23,24,d,p),D(de(S,b),s)}function _c(){let s=J(),p=qe();if(ft(26)){let ce=zt(!0);return Ce(D(h.createSpreadAssignment(ce),s),p)}let d=wn(!0);if(ti(139))return qr(s,p,d,177,0);if(ti(153))return qr(s,p,d,178,0);let b=ft(42),S=ve(),N=Jr(),H=ft(58),_e=ft(54);if(b||u()===21||u()===30)return q_(s,p,d,b,N,H,_e);let Z;if(S&&u()!==59){let ce=ft(64),Le=ce?ut(()=>zt(!0)):void 0;Z=h.createShorthandPropertyAssignment(N,Le),Z.equalsToken=ce}else{j(59);let ce=ut(()=>zt(!0));Z=h.createPropertyAssignment(N,ce)}return Z.modifiers=d,Z.questionToken=H,Z.exclamationToken=_e,Ce(D(Z,s),p)}function I_(){let s=J(),p=t.getTokenStart(),d=j(19),b=t.hasPrecedingLineBreak(),S=fn(12,_c,!0);return Or(19,20,d,p),D(M(S,b),s)}function O_(){let s=Ze();Ke(!1);let p=J(),d=qe(),b=wn(!1);j(100);let S=ft(42),N=S?1:0,H=Xt(b,al)?2:0,_e=N&&H?K(Mi):N?Wn(Mi):H?R(Mi):Mi(),Z=dn(),ee=Hn(N|H),ce=Jn(59,!1),Le=Ta(N|H);Ke(s);let je=h.createFunctionExpression(b,S,_e,Z,ee,ce,Le);return Ce(D(je,p),d)}function Mi(){return Fe()?Ka():void 0}function sc(){let s=J();if(j(105),Je(25)){let N=jt();return D(h.createMetaProperty(105,N),s)}let p=J(),d=_n(p,N_(),!1),b;d.kind===233&&(b=d.typeArguments,d=d.expression),u()===29&&Ee(E.Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0,is(Qe,d));let S=u()===21?tc():void 0;return D(nr(d,b,S),s)}function Br(s,p){let d=J(),b=qe(),S=t.getTokenStart(),N=j(19,p);if(N||s){let H=t.hasPrecedingLineBreak(),_e=xn(1,Kt);Or(19,20,N,S);let Z=Ce(D(rr(_e,H),d),b);return u()===64&&(Ee(E.Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses),U()),Z}else{let H=lr();return Ce(D(rr(H,void 0),d),b)}}function Ta(s,p){let d=we();He(!!(s&1));let b=Ye();st(!!(s&2));let S=Bt;Bt=!1;let N=Ze();N&&Ke(!1);let H=Br(!!(s&16),p);return N&&Ke(!0),Bt=S,He(d),st(b),H}function oc(){let s=J(),p=qe();return j(27),Ce(D(h.createEmptyStatement(),s),p)}function Cu(){let s=J(),p=qe();j(101);let d=t.getTokenStart(),b=j(21),S=ut(Et);Or(21,22,b,d);let N=Kt(),H=Je(93)?Kt():void 0;return Ce(D(Ge(S,N,H),s),p)}function cc(){let s=J(),p=qe();j(92);let d=Kt();j(117);let b=t.getTokenStart(),S=j(21),N=ut(Et);return Or(21,22,S,b),Je(27),Ce(D(h.createDoStatement(d,N),s),p)}function Du(){let s=J(),p=qe();j(117);let d=t.getTokenStart(),b=j(21),S=ut(Et);Or(21,22,b,d);let N=Kt();return Ce(D(ir(S,N),s),p)}function lc(){let s=J(),p=qe();j(99);let d=ft(135);j(21);let b;u()!==27&&(u()===115||u()===121||u()===87||u()===160&&G(xc)||u()===135&&G(Sc)?b=B_(!0):b=Ir(Et));let S;if(d?j(165):Je(165)){let N=ut(()=>zt(!0));j(22),S=Ot(d,b,N,Kt())}else if(Je(103)){let N=ut(Et);j(22),S=h.createForInStatement(b,N,Kt())}else{j(27);let N=u()!==27&&u()!==22?ut(Et):void 0;j(27);let H=u()!==22?ut(Et):void 0;j(22),S=Pr(b,N,H,Kt())}return Ce(D(S,s),p)}function uc(s){let p=J(),d=qe();j(s===252?83:88);let b=sr()?void 0:St();Qt();let S=s===252?h.createBreakStatement(b):h.createContinueStatement(b);return Ce(D(S,p),d)}function pc(){let s=J(),p=qe();j(107);let d=sr()?void 0:ut(Et);return Qt(),Ce(D(h.createReturnStatement(d),s),p)}function Pu(){let s=J(),p=qe();j(118);let d=t.getTokenStart(),b=j(21),S=ut(Et);Or(21,22,b,d);let N=Tt(67108864,Kt);return Ce(D(h.createWithStatement(S,N),s),p)}function fc(){let s=J(),p=qe();j(84);let d=ut(Et);j(59);let b=xn(3,Kt);return Ce(D(h.createCaseClause(d,b),s),p)}function Nu(){let s=J();j(90),j(59);let p=xn(3,Kt);return D(h.createDefaultClause(p),s)}function Iu(){return u()===84?fc():Nu()}function dc(){let s=J();j(19);let p=xn(2,Iu);return j(20),D(h.createCaseBlock(p),s)}function Ou(){let s=J(),p=qe();j(109),j(21);let d=ut(Et);j(22);let b=dc();return Ce(D(h.createSwitchStatement(d,b),s),p)}function mc(){let s=J(),p=qe();j(111);let d=t.hasPrecedingLineBreak()?void 0:ut(Et);return d===void 0&&(vn++,d=D(re(""),J())),aa()||xt(d),Ce(D(h.createThrowStatement(d),s),p)}function Mu(){let s=J(),p=qe();j(113);let d=Br(!1),b=u()===85?hc():void 0,S;return(!b||u()===98)&&(j(98,E.catch_or_finally_expected),S=Br(!1)),Ce(D(h.createTryStatement(d,b,S),s),p)}function hc(){let s=J();j(85);let p;Je(21)?(p=U_(),j(22)):p=void 0;let d=Br(!1);return D(h.createCatchClause(p,d),s)}function Ju(){let s=J(),p=qe();return j(89),Qt(),Ce(D(h.createDebuggerStatement(),s),p)}function yc(){let s=J(),p=qe(),d,b=u()===21,S=ut(Et);return tt(S)&&Je(59)?d=h.createLabeledStatement(S,Kt()):(aa()||xt(S),d=In(S),b&&(p=!1)),Ce(D(d,s),p)}function M_(){return U(),wt(u())&&!t.hasPrecedingLineBreak()}function gc(){return U(),u()===86&&!t.hasPrecedingLineBreak()}function bc(){return U(),u()===100&&!t.hasPrecedingLineBreak()}function J_(){return U(),(wt(u())||u()===9||u()===10||u()===11)&&!t.hasPrecedingLineBreak()}function Lu(){for(;;)switch(u()){case 115:case 121:case 87:case 100:case 86:case 94:return!0;case 160:return j_();case 135:return xa();case 120:case 156:return uu();case 144:case 145:return Ec();case 128:case 129:case 134:case 138:case 123:case 124:case 125:case 148:let s=u();if(U(),t.hasPrecedingLineBreak())return!1;if(s===138&&u()===156)return!0;continue;case 162:return U(),u()===19||u()===80||u()===95;case 102:return U(),u()===11||u()===42||u()===19||wt(u());case 95:let p=U();if(p===156&&(p=G(U)),p===64||p===42||p===19||p===90||p===130||p===60)return!0;continue;case 126:U();continue;default:return!1}}function Ji(){return G(Lu)}function vc(){switch(u()){case 60:case 27:case 19:case 115:case 121:case 160:case 100:case 86:case 94:case 101:case 92:case 117:case 99:case 88:case 83:case 107:case 118:case 109:case 111:case 113:case 89:case 85:case 98:return!0;case 102:return Ji()||G(oo);case 87:case 95:return Ji();case 134:case 138:case 120:case 144:case 145:case 156:case 162:return!0;case 129:case 125:case 123:case 124:case 126:case 148:return Ji()||!G(M_);default:return br()}}function Tc(){return U(),Fe()||u()===19||u()===23}function ju(){return G(Tc)}function xc(){return L_(!0)}function L_(s){return U(),s&&u()===165?!1:(Fe()||u()===19)&&!t.hasPrecedingLineBreak()}function j_(){return G(L_)}function Sc(s){return U()===160?L_(s):!1}function xa(){return G(Sc)}function Kt(){switch(u()){case 27:return oc();case 19:return Br(!1);case 115:return _i(J(),qe(),void 0);case 121:if(ju())return _i(J(),qe(),void 0);break;case 135:if(xa())return _i(J(),qe(),void 0);break;case 160:if(j_())return _i(J(),qe(),void 0);break;case 100:return Pc(J(),qe(),void 0);case 86:return jc(J(),qe(),void 0);case 101:return Cu();case 92:return cc();case 117:return Du();case 99:return lc();case 88:return uc(251);case 83:return uc(252);case 107:return pc();case 118:return Pu();case 109:return Ou();case 111:return mc();case 113:case 85:case 98:return Mu();case 89:return Ju();case 60:return wc();case 134:case 120:case 156:case 144:case 145:case 138:case 87:case 94:case 95:case 102:case 123:case 124:case 125:case 128:case 129:case 126:case 148:case 162:if(Ji())return wc();break}return yc()}function R_(s){return s.kind===138}function wc(){let s=J(),p=qe(),d=wn(!0);if(Xt(d,R_)){let S=Sa(s);if(S)return S;for(let N of d)N.flags|=33554432;return Tt(33554432,()=>kc(s,p,d))}else return kc(s,p,d)}function Sa(s){return Tt(33554432,()=>{let p=ca(yt,s);if(p)return Ms(p)})}function kc(s,p,d){switch(u()){case 115:case 121:case 87:case 160:case 135:return _i(s,p,d);case 100:return Pc(s,p,d);case 86:return jc(s,p,d);case 120:return Bc(s,p,d);case 156:return Zu(s,p,d);case 94:return V_(s,p,d);case 162:case 144:case 145:return tp(s,p,d);case 102:return ip(s,p,d);case 95:switch(U(),u()){case 90:case 64:return Xc(s,p,d);case 130:return rp(s,p,d);default:return fp(s,p,d)}default:if(d){let b=Gt(282,!0,E.Declaration_expected);return Bp(b,s),b.modifiers=d,b}return}}function Ru(){return U()===11}function Uu(){return U(),u()===161||u()===64}function Ec(){return U(),!t.hasPrecedingLineBreak()&&(ve()||u()===11)}function wa(s,p){if(u()!==19){if(s&4){da();return}if(sr()){Qt();return}}return Ta(s,p)}function Ac(){let s=J();if(u()===28)return D(h.createOmittedExpression(),s);let p=ft(26),d=Li(),b=vr();return D(h.createBindingElement(p,void 0,d,b),s)}function Bu(){let s=J(),p=ft(26),d=Fe(),b=Jr(),S;d&&u()!==59?(S=b,b=void 0):(j(59),S=Li());let N=vr();return D(h.createBindingElement(p,b,S,N),s)}function Cc(){let s=J();j(19);let p=ut(()=>fn(9,Bu));return j(20),D(h.createObjectBindingPattern(p),s)}function qu(){let s=J();j(23);let p=ut(()=>fn(10,Ac));return j(24),D(h.createArrayBindingPattern(p),s)}function ka(){return u()===19||u()===23||u()===81||Fe()}function Li(s){return u()===23?qu():u()===19?Cc():Ka(s)}function Dc(){return U_(!0)}function U_(s){let p=J(),d=qe(),b=Li(E.Private_identifiers_are_not_allowed_in_variable_declarations),S;s&&b.kind===80&&u()===54&&!t.hasPrecedingLineBreak()&&(S=Wt());let N=gr(),H=Uo(u())?void 0:vr(),_e=Bn(b,S,N,H);return Ce(D(_e,p),d)}function B_(s){let p=J(),d=0;switch(u()){case 115:break;case 121:d|=1;break;case 87:d|=2;break;case 160:d|=4;break;case 135:B.assert(xa()),d|=6,U();break;default:B.fail()}U();let b;if(u()===165&&G(zu))b=lr();else{let S=be();Te(s),b=fn(8,s?U_:Dc),Te(S)}return D(On(b,d),p)}function zu(){return Ai()&&U()===22}function _i(s,p,d){let b=B_(!1);Qt();let S=bn(d,b);return Ce(D(S,s),p)}function Pc(s,p,d){let b=Ye(),S=Rn(d);j(100);let N=ft(42),H=S&2048?Mi():Ka(),_e=N?1:0,Z=S&1024?2:0,ee=dn();S&32&&st(!0);let ce=Hn(_e|Z),Le=Jn(59,!1),je=wa(_e|Z,E.or_expected);st(b);let Ae=h.createFunctionDeclaration(d,N,H,ee,ce,Le,je);return Ce(D(Ae,s),p)}function Nc(){if(u()===137)return j(137);if(u()===11&&G(U)===21)return le(()=>{let s=Xn();return s.text==="constructor"?s:void 0})}function Fu(s,p,d){return le(()=>{if(Nc()){let b=dn(),S=Hn(0),N=Jn(59,!1),H=wa(0,E.or_expected),_e=h.createConstructorDeclaration(d,S,H);return _e.typeParameters=b,_e.type=N,Ce(D(_e,s),p)}})}function q_(s,p,d,b,S,N,H,_e){let Z=b?1:0,ee=Xt(d,al)?2:0,ce=dn(),Le=Hn(Z|ee),je=Jn(59,!1),Ae=wa(Z|ee,_e),Yt=h.createMethodDeclaration(d,b,S,N,ce,Le,je,Ae);return Yt.exclamationToken=H,Ce(D(Yt,s),p)}function Ic(s,p,d,b,S){let N=!S&&!t.hasPrecedingLineBreak()?ft(54):void 0,H=gr(),_e=Dt(90112,vr);Ul(b,H,_e);let Z=h.createPropertyDeclaration(d,b,S||N,H,_e);return Ce(D(Z,s),p)}function Ea(s,p,d){let b=ft(42),S=Jr(),N=ft(58);return b||u()===21||u()===30?q_(s,p,d,b,S,N,void 0,E.or_expected):Ic(s,p,d,S,N)}function qr(s,p,d,b,S){let N=Jr(),H=dn(),_e=Hn(0),Z=Jn(59,!1),ee=wa(S),ce=b===177?h.createGetAccessorDeclaration(d,N,_e,Z,ee):h.createSetAccessorDeclaration(d,N,_e,ee);return ce.typeParameters=H,hs(ce)&&(ce.type=Z),Ce(D(ce,s),p)}function Vu(){let s;if(u()===60)return!0;for(;Wr(u());){if(s=u(),Rg(s))return!0;U()}if(u()===42||(yr()&&(s=u(),U()),u()===23))return!0;if(s!==void 0){if(!di(s)||s===153||s===139)return!0;switch(u()){case 21:case 30:case 54:case 59:case 64:case 58:return!0;default:return sr()}}return!1}function Oc(s,p,d){Yn(126);let b=Wu(),S=Ce(D(h.createClassStaticBlockDeclaration(b),s),p);return S.modifiers=d,S}function Wu(){let s=we(),p=Ye();He(!1),st(!0);let d=Br(!1);return He(s),st(p),d}function Gu(){if(Ye()&&u()===135){let s=J(),p=St(E.Expression_expected);U();let d=_n(s,p,!0);return P_(s,d)}return Ii()}function z_(){let s=J();if(!Je(60))return;let p=Si(Gu);return D(h.createDecorator(p),s)}function Mc(s,p,d){let b=J(),S=u();if(u()===87&&p){if(!le(Za))return}else{if(d&&u()===126&&G(Vc))return;if(s&&u()===126)return;if(!Ds())return}return D(ye(S),b)}function wn(s,p,d){let b=J(),S,N,H,_e=!1,Z=!1,ee=!1;if(s&&u()===60)for(;N=z_();)S=An(S,N);for(;H=Mc(_e,p,d);)H.kind===126&&(_e=!0),S=An(S,H),Z=!0;if(Z&&s&&u()===60)for(;N=z_();)S=An(S,N),ee=!0;if(ee)for(;H=Mc(_e,p,d);)H.kind===126&&(_e=!0),S=An(S,H);return S&&Ct(S,b)}function Jc(){let s;if(u()===134){let p=J();U();let d=D(ye(134),p);s=Ct([d],p)}return s}function Yu(){let s=J(),p=qe();if(u()===27)return U(),Ce(D(h.createSemicolonClassElement(),s),p);let d=wn(!0,!0,!0);if(u()===126&&G(Vc))return Oc(s,p,d);if(ti(139))return qr(s,p,d,177,0);if(ti(153))return qr(s,p,d,178,0);if(u()===137||u()===11){let b=Fu(s,p,d);if(b)return b}if(Rr())return d_(s,p,d);if(wt(u())||u()===11||u()===9||u()===10||u()===42||u()===23)if(Xt(d,R_)){for(let S of d)S.flags|=33554432;return Tt(33554432,()=>Ea(s,p,d))}else return Ea(s,p,d);if(d){let b=Gt(80,!0,E.Declaration_expected);return Ic(s,p,d,b,void 0)}return B.fail("Should not have attempted to parse class member declaration.")}function Lc(){let s=J(),p=qe(),d=wn(!0);if(u()===86)return Aa(s,p,d,231);let b=Gt(282,!0,E.Expression_expected);return Bp(b,s),b.modifiers=d,b}function Xu(){return Aa(J(),qe(),void 0,231)}function jc(s,p,d){return Aa(s,p,d,263)}function Aa(s,p,d,b){let S=Ye();j(86);let N=Hu(),H=dn();Xt(d,Rb)&&st(!0);let _e=F_(),Z;j(19)?(Z=Uc(),j(20)):Z=lr(),st(S);let ee=b===263?h.createClassDeclaration(d,N,H,_e,Z):h.createClassExpression(d,N,H,_e,Z);return Ce(D(ee,s),p)}function Hu(){return Fe()&&!$u()?or(Fe()):void 0}function $u(){return u()===119&&G(Yl)}function F_(){if(Rc())return xn(22,Qu)}function Qu(){let s=J(),p=u();B.assert(p===96||p===119),U();let d=fn(7,Ku);return D(h.createHeritageClause(p,d),s)}function Ku(){let s=J(),p=Ii();if(p.kind===233)return p;let d=Ca();return D(h.createExpressionWithTypeArguments(p,d),s)}function Ca(){return u()===30?Lr(20,ot,30,32):void 0}function Rc(){return u()===96||u()===119}function Uc(){return xn(5,Yu)}function Bc(s,p,d){j(120);let b=St(),S=dn(),N=F_(),H=lo(),_e=h.createInterfaceDeclaration(d,b,S,N,H);return Ce(D(_e,s),p)}function Zu(s,p,d){j(156),t.hasPrecedingLineBreak()&&Ee(E.Line_break_not_permitted_here);let b=St(),S=dn();j(64);let N=u()===141&&le(yo)||ot();Qt();let H=h.createTypeAliasDeclaration(d,b,S,N);return Ce(D(H,s),p)}function ep(){let s=J(),p=qe(),d=Jr(),b=ut(vr);return Ce(D(h.createEnumMember(d,b),s),p)}function V_(s,p,d){j(94);let b=St(),S;j(19)?(S=xe(()=>fn(6,ep)),j(20)):S=lr();let N=h.createEnumDeclaration(d,b,S);return Ce(D(N,s),p)}function qc(){let s=J(),p;return j(19)?(p=xn(1,Kt),j(20)):p=lr(),D(h.createModuleBlock(p),s)}function W_(s,p,d,b){let S=b&32,N=b&8?jt():St(),H=Je(25)?W_(J(),!1,void 0,8|S):qc(),_e=h.createModuleDeclaration(d,N,H,b);return Ce(D(_e,s),p)}function zc(s,p,d){let b=0,S;u()===162?(S=St(),b|=2048):(S=Xn(),S.text=Mr(S.text));let N;u()===19?N=qc():Qt();let H=h.createModuleDeclaration(d,S,N,b);return Ce(D(H,s),p)}function tp(s,p,d){let b=0;if(u()===162)return zc(s,p,d);if(Je(145))b|=32;else if(j(144),u()===11)return zc(s,p,d);return W_(s,p,d,b)}function np(){return u()===149&&G(Fc)}function Fc(){return U()===21}function Vc(){return U()===19}function G_(){return U()===44}function rp(s,p,d){j(130),j(145);let b=St();Qt();let S=h.createNamespaceExportDeclaration(b);return S.modifiers=d,Ce(D(S,s),p)}function ip(s,p,d){j(102);let b=t.getTokenFullStart(),S;ve()&&(S=St());let N=!1;if((S==null?void 0:S.escapedText)==="type"&&(u()!==161||ve()&&G(Uu))&&(ve()||_p())&&(N=!0,S=ve()?St():void 0),S&&!zr())return sp(s,p,d,S,N);let H=si(S,b,N),_e=Ri(),Z=Wc();Qt();let ee=h.createImportDeclaration(d,H,_e,Z);return Ce(D(ee,s),p)}function si(s,p,d,b=!1){let S;return(s||u()===42||u()===19)&&(S=op(s,p,d,b),j(161)),S}function Wc(){let s=u();if((s===118||s===132)&&!t.hasPrecedingLineBreak())return Y_(s)}function ap(){let s=J(),p=wt(u())?jt():ri(11);j(59);let d=zt(!0);return D(h.createImportAttribute(p,d),s)}function Y_(s,p){let d=J();p||j(s);let b=t.getTokenStart();if(j(19)){let S=t.hasPrecedingLineBreak(),N=fn(24,ap,!0);if(!j(20)){let H=Yi(_t);H&&H.code===E._0_expected.code&&nl(H,Oa(Mt,Qe,b,1,E.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}return D(h.createImportAttributes(N,S,s),d)}else{let S=Ct([],J(),void 0,!1);return D(h.createImportAttributes(S,!1,s),d)}}function _p(){return u()===42||u()===19}function zr(){return u()===28||u()===161}function sp(s,p,d,b,S){j(64);let N=cp();Qt();let H=h.createImportEqualsDeclaration(d,S,b,N);return Ce(D(H,s),p)}function op(s,p,d,b){let S;return(!s||Je(28))&&(b&&t.setSkipJsDocLeadingAsterisks(!0),S=u()===42?lp():Gc(275),b&&t.setSkipJsDocLeadingAsterisks(!1)),D(h.createImportClause(d,s,S),p)}function cp(){return np()?ji():jr(!1)}function ji(){let s=J();j(149),j(21);let p=Ri();return j(22),D(h.createExternalModuleReference(p),s)}function Ri(){if(u()===11){let s=Xn();return s.text=Mr(s.text),s}else return Et()}function lp(){let s=J();j(42),j(130);let p=St();return D(h.createNamespaceImport(p),s)}function X_(){return wt(u())||u()===11}function oi(s){return u()===11?Xn():s()}function Gc(s){let p=J(),d=s===275?h.createNamedImports(Lr(23,ci,19,20)):h.createNamedExports(Lr(23,up,19,20));return D(d,p)}function up(){let s=qe();return Ce(Yc(281),s)}function ci(){return Yc(276)}function Yc(s){let p=J(),d=di(u())&&!ve(),b=t.getTokenStart(),S=t.getTokenEnd(),N=!1,H,_e=!0,Z=oi(jt);if(Z.kind===80&&Z.escapedText==="type")if(u()===130){let Le=jt();if(u()===130){let je=jt();X_()?(N=!0,H=Le,Z=oi(ce),_e=!1):(H=Z,Z=je,_e=!1)}else X_()?(H=Z,_e=!1,Z=oi(ce)):(N=!0,Z=Le)}else X_()&&(N=!0,Z=oi(ce));_e&&u()===130&&(H=Z,j(130),Z=oi(ce)),s===276&&(Z.kind!==80?(rt(Ar(Qe,Z.pos),Z.end,E.Identifier_expected),Z=yi(Gt(80,!1),Z.pos,Z.pos)):d&&rt(b,S,E.Identifier_expected));let ee=s===276?h.createImportSpecifier(N,H,Z):h.createExportSpecifier(N,H,Z);return D(ee,p);function ce(){return d=di(u())&&!ve(),b=t.getTokenStart(),S=t.getTokenEnd(),jt()}}function pp(s){return D(h.createNamespaceExport(oi(jt)),s)}function fp(s,p,d){let b=Ye();st(!0);let S,N,H,_e=Je(156),Z=J();Je(42)?(Je(130)&&(S=pp(Z)),j(161),N=Ri()):(S=Gc(279),(u()===161||u()===11&&!t.hasPrecedingLineBreak())&&(j(161),N=Ri()));let ee=u();N&&(ee===118||ee===132)&&!t.hasPrecedingLineBreak()&&(H=Y_(ee)),Qt(),st(b);let ce=h.createExportDeclaration(d,_e,S,N,H);return Ce(D(ce,s),p)}function Xc(s,p,d){let b=Ye();st(!0);let S;Je(64)?S=!0:j(90);let N=zt(!0);Qt(),st(b);let H=h.createExportAssignment(d,S,N);return Ce(D(H,s),p)}let H_;(s=>{s[s.SourceElements=0]="SourceElements",s[s.BlockStatements=1]="BlockStatements",s[s.SwitchClauses=2]="SwitchClauses",s[s.SwitchClauseStatements=3]="SwitchClauseStatements",s[s.TypeMembers=4]="TypeMembers",s[s.ClassMembers=5]="ClassMembers",s[s.EnumMembers=6]="EnumMembers",s[s.HeritageClauseElement=7]="HeritageClauseElement",s[s.VariableDeclarations=8]="VariableDeclarations",s[s.ObjectBindingElements=9]="ObjectBindingElements",s[s.ArrayBindingElements=10]="ArrayBindingElements",s[s.ArgumentExpressions=11]="ArgumentExpressions",s[s.ObjectLiteralMembers=12]="ObjectLiteralMembers",s[s.JsxAttributes=13]="JsxAttributes",s[s.JsxChildren=14]="JsxChildren",s[s.ArrayLiteralMembers=15]="ArrayLiteralMembers",s[s.Parameters=16]="Parameters",s[s.JSDocParameters=17]="JSDocParameters",s[s.RestProperties=18]="RestProperties",s[s.TypeParameters=19]="TypeParameters",s[s.TypeArguments=20]="TypeArguments",s[s.TupleElementTypes=21]="TupleElementTypes",s[s.HeritageClauses=22]="HeritageClauses",s[s.ImportOrExportSpecifiers=23]="ImportOrExportSpecifiers",s[s.ImportAttributes=24]="ImportAttributes",s[s.JSDocComment=25]="JSDocComment",s[s.Count=26]="Count"})(H_||(H_={}));let $_;(s=>{s[s.False=0]="False",s[s.True=1]="True",s[s.Unknown=2]="Unknown"})($_||($_={}));let Hc;(s=>{function p(ee,ce,Le){zn("file.js",ee,99,void 0,1,0),t.setText(ee,ce,Le),lt=t.scan();let je=d(),Ae=se("file.js",99,1,!1,[],ye(1),0,Fa),Yt=zi(_t,Ae);return Ut&&(Ae.jsDocDiagnostics=zi(Ut,Ae)),Fn(),je?{jsDocTypeExpression:je,diagnostics:Yt}:void 0}s.parseJSDocTypeExpressionForTests=p;function d(ee){let ce=J(),Le=(ee?Je:j)(19),je=Tt(16777216,l_);(!ee||Le)&&Es(20);let Ae=h.createJSDocTypeExpression(je);return L(Ae),D(Ae,ce)}s.parseJSDocTypeExpression=d;function b(){let ee=J(),ce=Je(19),Le=J(),je=jr(!1);for(;u()===81;)Nt(),ze(),je=D(h.createJSDocMemberName(je,St()),Le);ce&&Es(20);let Ae=h.createJSDocNameReference(je);return L(Ae),D(Ae,ee)}s.parseJSDocNameReference=b;function S(ee,ce,Le){zn("",ee,99,void 0,1,0);let je=Tt(16777216,()=>Z(ce,Le)),Yt=zi(_t,{languageVariant:0,text:ee});return Fn(),je?{jsDoc:je,diagnostics:Yt}:void 0}s.parseIsolatedJSDocComment=S;function N(ee,ce,Le){let je=lt,Ae=_t.length,Yt=rn,mn=Tt(16777216,()=>Z(ce,Le));return Sf(mn,ee),nt&524288&&(Ut||(Ut=[]),Dn(Ut,_t,Ae)),lt=je,_t.length=Ae,rn=Yt,mn}s.parseJSDocComment=N;let H;(ee=>{ee[ee.BeginningOfLine=0]="BeginningOfLine",ee[ee.SawAsterisk=1]="SawAsterisk",ee[ee.SavingComments=2]="SavingComments",ee[ee.SavingBackticks=3]="SavingBackticks"})(H||(H={}));let _e;(ee=>{ee[ee.Property=1]="Property",ee[ee.Parameter=2]="Parameter",ee[ee.CallbackParameter=4]="CallbackParameter"})(_e||(_e={}));function Z(ee=0,ce){let Le=Qe,je=ce===void 0?Le.length:ee+ce;if(ce=je-ee,B.assert(ee>=0),B.assert(ee<=je),B.assert(je<=Le.length),!k6(Le,ee))return;let Ae,Yt,mn,Zt,ur,Ln=[],Fr=[],dp=yt;yt|=1<<25;let De=t.scanRange(ee+3,ce-5,et);return yt=dp,De;function et(){let O=1,Y,X=ee-(Le.lastIndexOf(` +`,ee)+1)+4;function te(Ue){Y||(Y=X),Ln.push(Ue),X+=Ue.length}for(ze();Bi(5););Bi(4)&&(O=0,X=0);e:for(;;){switch(u()){case 60:Da(Ln),ur||(ur=J()),pe(q(X)),O=0,Y=void 0;break;case 4:Ln.push(t.getTokenText()),O=0,X=0;break;case 42:let Ue=t.getTokenText();O===1?(O=2,te(Ue)):(B.assert(O===0),O=1,X+=Ue.length);break;case 5:B.assert(O!==2,"whitespace shouldn't come from the scanner while saving top-level comment text");let pt=t.getTokenText();Y!==void 0&&X+pt.length>Y&&Ln.push(pt.slice(Y-X)),X+=pt.length;break;case 1:break e;case 82:O=2,te(t.getTokenValue());break;case 19:O=2;let hn=t.getTokenFullStart(),sn=t.getTokenEnd()-1,tn=_(sn);if(tn){Zt||pr(Ln),Fr.push(D(h.createJSDocText(Ln.join("")),Zt??ee,hn)),Fr.push(tn),Ln=[],Zt=t.getTokenEnd();break}default:O=2,te(t.getTokenText());break}O===2?an(!1):ze()}let ne=Ln.join("").trimEnd();Fr.length&&ne.length&&Fr.push(D(h.createJSDocText(ne),Zt??ee,ur)),Fr.length&&Ae&&B.assertIsDefined(ur,"having parsed tags implies that the end of the comment span should be set");let Pe=Ae&&Ct(Ae,Yt,mn);return D(h.createJSDocComment(Fr.length?Ct(Fr,ee,ur):ne.length?ne:void 0,Pe),ee,je)}function pr(O){for(;O.length&&(O[0]===` +`||O[0]==="\r");)O.shift()}function Da(O){for(;O.length;){let Y=O[O.length-1].trimEnd();if(Y==="")O.pop();else if(Y.lengthpt&&(te.push(Qn.slice(pt-O)),Ue=2),O+=Qn.length;break;case 19:Ue=2;let Qc=t.getTokenFullStart(),Na=t.getTokenEnd()-1,Kc=_(Na);Kc?(ne.push(D(h.createJSDocText(te.join("")),Pe??X,Qc)),ne.push(Kc),te=[],Pe=t.getTokenEnd()):hn(t.getTokenText());break;case 62:Ue===3?Ue=2:Ue=3,hn(t.getTokenText());break;case 82:Ue!==3&&(Ue=2),hn(t.getTokenValue());break;case 42:if(Ue===0){Ue=1,O+=1;break}default:Ue!==3&&(Ue=2),hn(t.getTokenText());break}Ue===2||Ue===3?sn=an(Ue===3):sn=ze()}pr(te);let tn=te.join("").trimEnd();if(ne.length)return tn.length&&ne.push(D(h.createJSDocText(tn),Pe??X)),Ct(ne,X,t.getTokenEnd());if(tn.length)return tn}function _(O){let Y=le(f);if(!Y)return;ze(),It();let X=c(),te=[];for(;u()!==20&&u()!==4&&u()!==1;)te.push(t.getTokenText()),ze();let ne=Y==="link"?h.createJSDocLink:Y==="linkcode"?h.createJSDocLinkCode:h.createJSDocLinkPlain;return D(ne(X,te.join("")),O,t.getTokenEnd())}function c(){if(wt(u())){let O=J(),Y=jt();for(;Je(25);)Y=D(h.createQualifiedName(Y,u()===81?Gt(80,!1):jt()),O);for(;u()===81;)Nt(),ze(),Y=D(h.createJSDocMemberName(Y,St()),O);return Y}}function f(){if(xr(),u()===19&&ze()===60&&wt(ze())){let O=t.getTokenValue();if(w(O))return O}}function w(O){return O==="link"||O==="linkcode"||O==="linkplain"}function F(O,Y,X,te){return D(h.createJSDocUnknownTag(Y,n(O,J(),X,te)),O)}function pe(O){O&&(Ae?Ae.push(O):(Ae=[O],Yt=O.pos),mn=O.end)}function Re(){return xr(),u()===19?d():void 0}function en(){let O=Bi(23);O&&It();let Y=Bi(62),X=$0();return Y&&ql(62),O&&(It(),ft(64)&&Et(),j(24)),{name:X,isBracketed:O}}function kn(O){switch(O.kind){case 151:return!0;case 188:return kn(O.elementType);default:return Df(O)&&tt(O.typeName)&&O.typeName.escapedText==="Object"&&!O.typeArguments}}function $n(O,Y,X,te){let ne=Re(),Pe=!ne;xr();let{name:Ue,isBracketed:pt}=en(),hn=xr();Pe&&!G(f)&&(ne=Re());let sn=n(O,J(),te,hn),tn=Pa(ne,Ue,X,te);tn&&(ne=tn,Pe=!0);let Qn=X===1?h.createJSDocPropertyTag(Y,Ue,pt,ne,Pe,sn):h.createJSDocParameterTag(Y,Ue,pt,ne,Pe,sn);return D(Qn,O)}function Pa(O,Y,X,te){if(O&&kn(O.type)){let ne=J(),Pe,Ue;for(;Pe=le(()=>hp(X,te,Y));)Pe.kind===341||Pe.kind===348?Ue=An(Ue,Pe):Pe.kind===345&&ln(Pe.tagName,E.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);if(Ue){let pt=D(h.createJSDocTypeLiteral(Ue,O.type.kind===188),ne);return D(h.createJSDocTypeExpression(pt),ne)}}}function P0(O,Y,X,te){Xt(Ae,p6)&&rt(Y.pos,t.getTokenStart(),E._0_tag_already_specified,cs(Y.escapedText));let ne=Re();return D(h.createJSDocReturnTag(Y,ne,n(O,J(),X,te)),O)}function md(O,Y,X,te){Xt(Ae,Ff)&&rt(Y.pos,t.getTokenStart(),E._0_tag_already_specified,cs(Y.escapedText));let ne=d(!0),Pe=X!==void 0&&te!==void 0?n(O,J(),X,te):void 0;return D(h.createJSDocTypeTag(Y,ne,Pe),O)}function N0(O,Y,X,te){let Pe=u()===23||G(()=>ze()===60&&wt(ze())&&w(t.getTokenValue()))?void 0:b(),Ue=X!==void 0&&te!==void 0?n(O,J(),X,te):void 0;return D(h.createJSDocSeeTag(Y,Pe,Ue),O)}function I0(O,Y,X,te){let ne=Re(),Pe=n(O,J(),X,te);return D(h.createJSDocThrowsTag(Y,ne,Pe),O)}function O0(O,Y,X,te){let ne=J(),Pe=M0(),Ue=t.getTokenFullStart(),pt=n(O,Ue,X,te);pt||(Ue=t.getTokenFullStart());let hn=typeof pt!="string"?Ct(Yp([D(Pe,ne,Ue)],pt),ne):Pe.text+pt;return D(h.createJSDocAuthorTag(Y,hn),O)}function M0(){let O=[],Y=!1,X=t.getToken();for(;X!==1&&X!==4;){if(X===30)Y=!0;else{if(X===60&&!Y)break;if(X===32&&Y){O.push(t.getTokenText()),t.resetTokenState(t.getTokenEnd());break}}O.push(t.getTokenText()),X=ze()}return h.createJSDocText(O.join(""))}function J0(O,Y,X,te){let ne=hd();return D(h.createJSDocImplementsTag(Y,ne,n(O,J(),X,te)),O)}function L0(O,Y,X,te){let ne=hd();return D(h.createJSDocAugmentsTag(Y,ne,n(O,J(),X,te)),O)}function j0(O,Y,X,te){let ne=d(!1),Pe=X!==void 0&&te!==void 0?n(O,J(),X,te):void 0;return D(h.createJSDocSatisfiesTag(Y,ne,Pe),O)}function R0(O,Y,X,te){let ne=t.getTokenFullStart(),Pe;ve()&&(Pe=St());let Ue=si(Pe,ne,!0,!0),pt=Ri(),hn=Wc(),sn=X!==void 0&&te!==void 0?n(O,J(),X,te):void 0;return D(h.createJSDocImportTag(Y,Ue,pt,hn,sn),O)}function hd(){let O=Je(19),Y=J(),X=U0();t.setSkipJsDocLeadingAsterisks(!0);let te=Ca();t.setSkipJsDocLeadingAsterisks(!1);let ne=h.createExpressionWithTypeArguments(X,te),Pe=D(ne,Y);return O&&j(20),Pe}function U0(){let O=J(),Y=li();for(;Je(25);){let X=li();Y=D(ae(Y,X),O)}return Y}function Ui(O,Y,X,te,ne){return D(Y(X,n(O,J(),te,ne)),O)}function yd(O,Y,X,te){let ne=d(!0);return It(),D(h.createJSDocThisTag(Y,ne,n(O,J(),X,te)),O)}function B0(O,Y,X,te){let ne=d(!0);return It(),D(h.createJSDocEnumTag(Y,ne,n(O,J(),X,te)),O)}function q0(O,Y,X,te){let ne=Re();xr();let Pe=mp();It();let Ue=i(X),pt;if(!ne||kn(ne.type)){let sn,tn,Qn,Qc=!1;for(;(sn=le(()=>G0(X)))&&sn.kind!==345;)if(Qc=!0,sn.kind===344)if(tn){let Na=Ee(E.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);Na&&nl(Na,Oa(Mt,Qe,0,0,E.The_tag_was_first_specified_here));break}else tn=sn;else Qn=An(Qn,sn);if(Qc){let Na=ne&&ne.type.kind===188,Kc=h.createJSDocTypeLiteral(Qn,Na);ne=tn&&tn.typeExpression&&!kn(tn.typeExpression.type)?tn.typeExpression:D(Kc,O),pt=ne.end}}pt=pt||Ue!==void 0?J():(Pe??ne??Y).end,Ue||(Ue=n(O,pt,X,te));let hn=h.createJSDocTypedefTag(Y,ne,Pe,Ue);return D(hn,O,pt)}function mp(O){let Y=t.getTokenStart();if(!wt(u()))return;let X=li();if(Je(25)){let te=mp(!0),ne=h.createModuleDeclaration(void 0,X,te,O?8:void 0);return D(ne,Y)}return O&&(X.flags|=4096),X}function z0(O){let Y=J(),X,te;for(;X=le(()=>hp(4,O));){if(X.kind===345){ln(X.tagName,E.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);break}te=An(te,X)}return Ct(te||[],Y)}function gd(O,Y){let X=z0(Y),te=le(()=>{if(Bi(60)){let ne=q(Y);if(ne&&ne.kind===342)return ne}});return D(h.createJSDocSignature(void 0,X,te),O)}function F0(O,Y,X,te){let ne=mp();It();let Pe=i(X),Ue=gd(O,X);Pe||(Pe=n(O,J(),X,te));let pt=Pe!==void 0?J():Ue.end;return D(h.createJSDocCallbackTag(Y,Ue,ne,Pe),O,pt)}function V0(O,Y,X,te){It();let ne=i(X),Pe=gd(O,X);ne||(ne=n(O,J(),X,te));let Ue=ne!==void 0?J():Pe.end;return D(h.createJSDocOverloadTag(Y,Pe,ne),O,Ue)}function W0(O,Y){for(;!tt(O)||!tt(Y);)if(!tt(O)&&!tt(Y)&&O.right.escapedText===Y.right.escapedText)O=O.left,Y=Y.left;else return!1;return O.escapedText===Y.escapedText}function G0(O){return hp(1,O)}function hp(O,Y,X){let te=!0,ne=!1;for(;;)switch(ze()){case 60:if(te){let Pe=Y0(O,Y);return Pe&&(Pe.kind===341||Pe.kind===348)&&X&&(tt(Pe.name)||!W0(X,Pe.name.left))?!1:Pe}ne=!1;break;case 4:te=!0,ne=!1;break;case 42:ne&&(te=!1),ne=!0;break;case 80:te=!1;break;case 1:return!1}}function Y0(O,Y){B.assert(u()===60);let X=t.getTokenFullStart();ze();let te=li(),ne=xr(),Pe;switch(te.escapedText){case"type":return O===1&&md(X,te);case"prop":case"property":Pe=1;break;case"arg":case"argument":case"param":Pe=6;break;case"template":return bd(X,te,Y,ne);case"this":return yd(X,te,Y,ne);default:return!1}return O&Pe?$n(X,te,O,Y):!1}function X0(){let O=J(),Y=Bi(23);Y&&It();let X=wn(!1,!0),te=li(E.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces),ne;if(Y&&(It(),j(64),ne=Tt(16777216,l_),j(24)),!Hi(te))return D(h.createTypeParameterDeclaration(X,te,void 0,ne),O)}function H0(){let O=J(),Y=[];do{It();let X=X0();X!==void 0&&Y.push(X),xr()}while(Bi(28));return Ct(Y,O)}function bd(O,Y,X,te){let ne=u()===19?d():void 0,Pe=H0();return D(h.createJSDocTemplateTag(Y,ne,Pe,n(O,J(),X,te)),O)}function Bi(O){return u()===O?(ze(),!0):!1}function $0(){let O=li();for(Je(23)&&j(24);Je(25);){let Y=li();Je(23)&&j(24),O=Xl(O,Y)}return O}function li(O){if(!wt(u()))return Gt(80,!O,O||E.Identifier_expected);vn++;let Y=t.getTokenStart(),X=t.getTokenEnd(),te=u(),ne=Mr(t.getTokenValue()),Pe=D(re(ne,te),Y,X);return ze(),Pe}}})(Hc=e.JSDocParser||(e.JSDocParser={}))})(Qi||(Qi={}));var xm=new WeakSet;function J6(e){xm.has(e)&&B.fail("Source file has already been incrementally parsed"),xm.add(e)}var hh=new WeakSet;function L6(e){return hh.has(e)}function Wp(e){hh.add(e)}var vl;(e=>{function t(x,I,re,he){if(he=he||B.shouldAssert(2),h(x,I,re,he),fg(re))return x;if(x.statements.length===0)return Qi.parseSourceFile(x.fileName,I,x.languageVersion,void 0,!0,x.scriptKind,x.setExternalModuleIndicator,x.jsDocParsingMode);J6(x),Qi.fixupParentReferences(x);let ye=x.text,de=y(x),M=l(x,re);h(x,I,M,he),B.assert(M.span.start<=re.span.start),B.assert(wr(M.span)===wr(re.span)),B.assert(wr(K_(M))===wr(K_(re)));let ae=K_(M).length-M.span.length;P(x,M.span.start,wr(M.span),wr(K_(M)),ae,ye,I,he);let Oe=Qi.parseSourceFile(x.fileName,I,x.languageVersion,de,!0,x.scriptKind,x.setExternalModuleIndicator,x.jsDocParsingMode);return Oe.commentDirectives=a(x.commentDirectives,Oe.commentDirectives,M.span.start,wr(M.span),ae,ye,I,he),Oe.impliedNodeFormat=x.impliedNodeFormat,h6(x,Oe),Oe}e.updateSourceFile=t;function a(x,I,re,he,ye,de,M,ae){if(!x)return I;let Oe,V=!1;for(let W of x){let{range:dt,type:nr}=W;if(dt.endhe){oe();let gn={range:{pos:dt.pos+ye,end:dt.end+ye},type:nr};Oe=An(Oe,gn),ae&&B.assert(de.substring(dt.pos,dt.end)===M.substring(gn.range.pos,gn.range.end))}}return oe(),Oe;function oe(){V||(V=!0,Oe?I&&Oe.push(...I):Oe=I)}}function o(x,I,re,he,ye,de,M){re?Oe(x):ae(x);return;function ae(V){let oe="";if(M&&m(V)&&(oe=ye.substring(V.pos,V.end)),Kd(V,I),yi(V,V.pos+he,V.end+he),M&&m(V)&&B.assert(oe===de.substring(V.pos,V.end)),Ht(V,ae,Oe),Xi(V))for(let W of V.jsDoc)ae(W);A(V,M)}function Oe(V){yi(V,V.pos+he,V.end+he);for(let oe of V)ae(oe)}}function m(x){switch(x.kind){case 11:case 9:case 80:return!0}return!1}function v(x,I,re,he,ye){B.assert(x.end>=I,"Adjusting an element that was entirely before the change range"),B.assert(x.pos<=re,"Adjusting an element that was entirely after the change range"),B.assert(x.pos<=x.end);let de=Math.min(x.pos,he),M=x.end>=re?x.end+ye:Math.min(x.end,he);if(B.assert(de<=M),x.parent){let ae=x.parent;B.assertGreaterThanOrEqual(de,ae.pos),B.assertLessThanOrEqual(M,ae.end)}yi(x,de,M)}function A(x,I){if(I){let re=x.pos,he=ye=>{B.assert(ye.pos>=re),re=ye.end};if(Xi(x))for(let ye of x.jsDoc)he(ye);Ht(x,he),B.assert(re<=x.end)}}function P(x,I,re,he,ye,de,M,ae){Oe(x);return;function Oe(oe){if(B.assert(oe.pos<=oe.end),oe.pos>re){o(oe,x,!1,ye,de,M,ae);return}let W=oe.end;if(W>=I){if(Wp(oe),Kd(oe,x),v(oe,I,re,he,ye),Ht(oe,Oe,V),Xi(oe))for(let dt of oe.jsDoc)Oe(dt);A(oe,ae);return}B.assert(Wre){o(oe,x,!0,ye,de,M,ae);return}let W=oe.end;if(W>=I){Wp(oe),v(oe,I,re,he,ye);for(let dt of oe)Oe(dt);return}B.assert(W0&&M<=1;M++){let ae=Q(x,he);B.assert(ae.pos<=he);let Oe=ae.pos;he=Math.max(0,Oe-1)}let ye=pg(he,wr(I.span)),de=I.newLength+(I.span.start-he);return Km(ye,de)}function Q(x,I){let re=x,he;if(Ht(x,de),he){let M=ye(he);M.pos>re.pos&&(re=M)}return re;function ye(M){for(;;){let ae=Q2(M);if(ae)M=ae;else return M}}function de(M){if(!Hi(M))if(M.pos<=I){if(M.pos>=re.pos&&(re=M),II),!0}}function h(x,I,re,he){let ye=x.text;if(re&&(B.assert(ye.length-re.span.length+re.newLength===I.length),he||B.shouldAssert(3))){let de=ye.substr(0,re.span.start),M=I.substr(0,re.span.start);B.assert(de===M);let ae=ye.substring(wr(re.span),ye.length),Oe=I.substring(wr(K_(re)),I.length);B.assert(ae===Oe)}}function y(x){let I=x.statements,re=0;B.assert(re=V.pos&&M=V.pos&&M{x[x.Value=-1]="Value"})(g||(g={}))})(vl||(vl={}));function j6(e){return R6(e)!==void 0}function R6(e){let t=Rm(e,gb,!1);if(t)return t;if(Oy(e,".ts")){let a=jm(e),o=a.lastIndexOf(".d.");if(o>=0)return a.substring(o)}}function U6(e,t,a,o){if(e){if(e==="import")return 99;if(e==="require")return 1;o(t,a-t,E.resolution_mode_should_be_either_require_or_import)}}function B6(e,t){let a=[];for(let o of Jp(t,0)||bt){let m=t.substring(o.pos,o.end);W6(a,o,m)}e.pragmas=new Map;for(let o of a){if(e.pragmas.has(o.name)){let m=e.pragmas.get(o.name);m instanceof Array?m.push(o.args):e.pragmas.set(o.name,[m,o.args]);continue}e.pragmas.set(o.name,o.args)}}function q6(e,t){e.checkJsDirective=void 0,e.referencedFiles=[],e.typeReferenceDirectives=[],e.libReferenceDirectives=[],e.amdDependencies=[],e.hasNoDefaultLib=!1,e.pragmas.forEach((a,o)=>{switch(o){case"reference":{let m=e.referencedFiles,v=e.typeReferenceDirectives,A=e.libReferenceDirectives;Un(bp(a),P=>{let{types:l,lib:Q,path:h,["resolution-mode"]:y,preserve:g}=P.arguments,x=g==="true"?!0:void 0;if(P.arguments["no-default-lib"]==="true")e.hasNoDefaultLib=!0;else if(l){let I=U6(y,l.pos,l.end,t);v.push({pos:l.pos,end:l.end,fileName:l.value,...I?{resolutionMode:I}:{},...x?{preserve:x}:{}})}else Q?A.push({pos:Q.pos,end:Q.end,fileName:Q.value,...x?{preserve:x}:{}}):h?m.push({pos:h.pos,end:h.end,fileName:h.value,...x?{preserve:x}:{}}):t(P.range.pos,P.range.end-P.range.pos,E.Invalid_reference_directive_syntax)});break}case"amd-dependency":{e.amdDependencies=Pp(bp(a),m=>({name:m.arguments.name,path:m.arguments.path}));break}case"amd-module":{if(a instanceof Array)for(let m of a)e.moduleName&&t(m.range.pos,m.range.end-m.range.pos,E.An_AMD_module_cannot_have_multiple_name_assignments),e.moduleName=m.arguments.name;else e.moduleName=a.arguments.name;break}case"ts-nocheck":case"ts-check":{Un(bp(a),m=>{(!e.checkJsDirective||m.range.pos>e.checkJsDirective.pos)&&(e.checkJsDirective={enabled:o==="ts-check",end:m.range.end,pos:m.range.pos})});break}case"jsx":case"jsxfrag":case"jsximportsource":case"jsxruntime":return;default:B.fail("Unhandled pragma kind")}})}var Dp=new Map;function z6(e){if(Dp.has(e))return Dp.get(e);let t=new RegExp(`(\\s${e}\\s*=\\s*)(?:(?:'([^']*)')|(?:"([^"]*)"))`,"im");return Dp.set(e,t),t}var F6=/^\/\/\/\s*<(\S+)\s.*?\/>/m,V6=/^\/\/\/?\s*@([^\s:]+)((?:[^\S\r\n]|:).*)?$/m;function W6(e,t,a){let o=t.kind===2&&F6.exec(a);if(o){let v=o[1].toLowerCase(),A=Lm[v];if(!A||!(A.kind&1))return;if(A.args){let P={};for(let l of A.args){let h=z6(l.name).exec(a);if(!h&&!l.optional)return;if(h){let y=h[2]||h[3];if(l.captureSpan){let g=t.pos+h.index+h[1].length+1;P[l.name]={value:y,pos:g,end:g+y.length}}else P[l.name]=y}}e.push({name:v,args:{arguments:P,range:t}})}else e.push({name:v,args:{arguments:{},range:t}});return}let m=t.kind===2&&V6.exec(a);if(m)return Sm(e,t,2,m);if(t.kind===3){let v=/@(\S+)(\s+(?:\S.*)?)?$/gm,A;for(;A=v.exec(a);)Sm(e,t,4,A)}}function Sm(e,t,a,o){if(!o)return;let m=o[1].toLowerCase(),v=Lm[m];if(!v||!(v.kind&a))return;let A=o[2],P=G6(v,A);P!=="fail"&&e.push({name:m,args:{arguments:P,range:t}})}function G6(e,t){if(!t)return{};if(!e.args)return{};let a=t.trim().split(/\s+/),o={};for(let m=0;mo.kind<309||o.kind>351);return a.kind<166?a:a.getFirstToken(e)}getLastToken(e){this.assertHasRealPosition();let t=this.getChildren(e),a=Yi(t);if(a)return a.kind<166?a:a.getLastToken(e)}forEachChild(e,t){return Ht(this,e,t)}};function Y6(e,t){let a=[];if(Zg(e))return e.forEachChild(A=>{a.push(A)}),a;ss.setText((t||e.getSourceFile()).text);let o=e.pos,m=A=>{os(a,o,A.pos,e),a.push(A),o=A.end},v=A=>{os(a,o,A.pos,e),a.push(X6(A,e)),o=A.end};return Un(e.jsDoc,m),o=e.pos,e.forEachChild(m,v),os(a,o,e.end,e),ss.setText(void 0),a}function os(e,t,a,o){for(ss.resetTokenState(t);tt.tagName.text==="inheritDoc"||t.tagName.text==="inheritdoc")}function ll(e,t){if(!e)return bt;let a=ts_JsDoc_exports.getJsDocTagsFromDeclarations(e,t);if(t&&(a.length===0||e.some(Th))){let o=new Set;for(let m of e){let v=xh(t,m,A=>{var P;if(!o.has(A))return o.add(A),m.kind===177||m.kind===178?A.getContextualJsDocTags(m,t):((P=A.declarations)==null?void 0:P.length)===1?A.getJsDocTags(t):void 0});v&&(a=[...v,...a])}}return a}function _s(e,t){if(!e)return bt;let a=ts_JsDoc_exports.getJsDocCommentsFromDeclarations(e,t);if(t&&(a.length===0||e.some(Th))){let o=new Set;for(let m of e){let v=xh(t,m,A=>{if(!o.has(A))return o.add(A),m.kind===177||m.kind===178?A.getContextualDocumentationComment(m,t):A.getDocumentationComment(t)});v&&(a=a.length===0?v.slice():v.concat(lineBreakPart(),a))}}return a}function xh(e,t,a){var o;let m=((o=t.parent)==null?void 0:o.kind)===176?t.parent.parent:t.parent;if(!m)return;let v=B2(t);return ny(N2(m),A=>{let P=e.getTypeAtLocation(A),l=v&&P.symbol?e.getTypeOfSymbol(P.symbol):P,Q=e.getPropertyOfType(l,t.symbol.name);return Q?a(Q):void 0})}var K6=class extends Gf{constructor(e,t,a){super(e,t,a)}update(e,t){return M6(this,e,t)}getLineAndCharacterOfPosition(e){return Wm(this,e)}getLineStarts(){return Mp(this)}getPositionOfLineAndCharacter(e,t,a){return ng(Mp(this),e,t,this.text,a)}getLineEndOfPosition(e){let{line:t}=this.getLineAndCharacterOfPosition(e),a=this.getLineStarts(),o;t+1>=a.length&&(o=this.getEnd()),o||(o=a[t+1]-1);let m=this.getFullText();return m[o]===` +`&&m[o-1]==="\r"?o-1:o}getNamedDeclarations(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations}computeNamedDeclarations(){let e=hy();return this.forEachChild(m),e;function t(v){let A=o(v);A&&e.add(A,v)}function a(v){let A=e.get(v);return A||e.set(v,A=[]),A}function o(v){let A=lf(v);return A&&(kf(A)&&Xr(A.expression)?A.expression.name.text:s1(A)?getNameFromPropertyName(A):void 0)}function m(v){switch(v.kind){case 262:case 218:case 174:case 173:let A=v,P=o(A);if(P){let h=a(P),y=Yi(h);y&&A.parent===y.parent&&A.symbol===y.symbol?A.body&&!y.body&&(h[h.length-1]=A):h.push(A)}Ht(v,m);break;case 263:case 231:case 264:case 265:case 266:case 267:case 271:case 281:case 276:case 273:case 274:case 177:case 178:case 187:t(v),Ht(v,m);break;case 169:if(!bs(v,31))break;case 260:case 208:{let h=v;if(Vg(h.name)){Ht(h.name,m);break}h.initializer&&m(h.initializer)}case 306:case 172:case 171:t(v);break;case 278:let l=v;l.exportClause&&(eh(l.exportClause)?Un(l.exportClause.elements,m):m(l.exportClause.name));break;case 272:let Q=v.importClause;Q&&(Q.name&&t(Q.name),Q.namedBindings&&(Q.namedBindings.kind===274?t(Q.namedBindings):Un(Q.namedBindings.elements,m)));break;case 226:yf(v)!==0&&t(v);default:Ht(v,m)}}}},Z6=class{constructor(e,t,a){this.fileName=e,this.text=t,this.skipTrivia=a||(o=>o)}getLineAndCharacterOfPosition(e){return Wm(this,e)}};function ev(){return{getNodeConstructor:()=>Gf,getTokenConstructor:()=>gh,getIdentifierConstructor:()=>bh,getPrivateIdentifierConstructor:()=>vh,getSourceFileConstructor:()=>K6,getSymbolConstructor:()=>H6,getTypeConstructor:()=>$6,getSignatureConstructor:()=>Q6,getSourceMapSourceConstructor:()=>Z6}}var tv=["getSemanticDiagnostics","getSuggestionDiagnostics","getCompilerOptionsDiagnostics","getSemanticClassifications","getEncodedSemanticClassifications","getCodeFixesAtPosition","getCombinedCodeFix","applyCodeActionCommand","organizeImports","getEditsForFileRename","getEmitOutput","getApplicableRefactors","getEditsForRefactor","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","provideInlayHints","getSupportedCodeFixes","getPasteEdits"],b3=[...tv,"getCompletionsAtPosition","getCompletionEntryDetails","getCompletionEntrySymbol","getSignatureHelpItems","getQuickInfoAtPosition","getDefinitionAtPosition","getDefinitionAndBoundSpan","getImplementationAtPosition","getTypeDefinitionAtPosition","getReferencesAtPosition","findReferences","getDocumentHighlights","getNavigateToItems","getRenameInfo","findRenameLocations","getApplicableRefactors","preparePasteEditsForFile"];_b(ev());var Il=new Proxy({},{get:()=>!0});var wh=Il["4.8"];function er(e,t=!1){var a;if(e!=null){if(wh){if(t||Nl(e)){let o=t1(e);return o?[...o]:void 0}return}return(a=e.modifiers)==null?void 0:a.filter(o=>!El(o))}}function na(e,t=!1){var a;if(e!=null){if(wh){if(t||Wf(e)){let o=uf(e);return o?[...o]:void 0}return}return(a=e.decorators)==null?void 0:a.filter(El)}}var Eh={};var Ol=new Proxy({},{get:(e,t)=>t});var Ah=Ol,Ch=Ol;var C=Ah,Rt=Ch;var Dh=Il["5.0"],ue=Ie,iv=new Set([ue.AmpersandAmpersandToken,ue.BarBarToken,ue.QuestionQuestionToken]),av=new Set([Ie.AmpersandAmpersandEqualsToken,Ie.AmpersandEqualsToken,Ie.AsteriskAsteriskEqualsToken,Ie.AsteriskEqualsToken,Ie.BarBarEqualsToken,Ie.BarEqualsToken,Ie.CaretEqualsToken,Ie.EqualsToken,Ie.GreaterThanGreaterThanEqualsToken,Ie.GreaterThanGreaterThanGreaterThanEqualsToken,Ie.LessThanLessThanEqualsToken,Ie.MinusEqualsToken,Ie.PercentEqualsToken,Ie.PlusEqualsToken,Ie.QuestionQuestionEqualsToken,Ie.SlashEqualsToken]),_v=new Set([ue.AmpersandAmpersandToken,ue.AmpersandToken,ue.AsteriskAsteriskToken,ue.AsteriskToken,ue.BarBarToken,ue.BarToken,ue.CaretToken,ue.EqualsEqualsEqualsToken,ue.EqualsEqualsToken,ue.ExclamationEqualsEqualsToken,ue.ExclamationEqualsToken,ue.GreaterThanEqualsToken,ue.GreaterThanGreaterThanGreaterThanToken,ue.GreaterThanGreaterThanToken,ue.GreaterThanToken,ue.InKeyword,ue.InstanceOfKeyword,ue.LessThanEqualsToken,ue.LessThanLessThanToken,ue.LessThanToken,ue.MinusToken,ue.PercentToken,ue.PlusToken,ue.SlashToken]);function sv(e){return av.has(e.kind)}function ov(e){return iv.has(e.kind)}function cv(e){return _v.has(e.kind)}function $r(e){return it(e)}function Ph(e){return e.kind!==ue.SemicolonClassElement}function Xe(e,t){let a=er(t);return(a==null?void 0:a.some(o=>o.kind===e))===!0}function Nh(e){let t=er(e);return t==null?null:t[t.length-1]??null}function Ih(e){return e.kind===ue.CommaToken}function lv(e){return e.kind===ue.SingleLineCommentTrivia||e.kind===ue.MultiLineCommentTrivia}function uv(e){return e.kind===ue.JSDocComment}function Oh(e){if(sv(e))return{type:C.AssignmentExpression,operator:$r(e.kind)};if(ov(e))return{type:C.LogicalExpression,operator:$r(e.kind)};if(cv(e))return{type:C.BinaryExpression,operator:$r(e.kind)};throw new Error(`Unexpected binary operator ${it(e.kind)}`)}function Ts(e,t){let a=t.getLineAndCharacterOfPosition(e);return{column:a.character,line:a.line+1}}function Qr(e,t){let[a,o]=e.map(m=>Ts(m,t));return{end:o,start:a}}function Mh(e){if(e.kind===Ie.Block)switch(e.parent.kind){case Ie.Constructor:case Ie.GetAccessor:case Ie.SetAccessor:case Ie.ArrowFunction:case Ie.FunctionExpression:case Ie.FunctionDeclaration:case Ie.MethodDeclaration:return!0;default:return!1}return!0}function $a(e,t){return[e.getStart(t),e.getEnd()]}function pv(e){return e.kind>=ue.FirstToken&&e.kind<=ue.LastToken}function Jh(e){return e.kind>=ue.JsxElement&&e.kind<=ue.JsxAttribute}function Ml(e){return e.flags&on.Let?"let":(e.flags&on.AwaitUsing)===on.AwaitUsing?"await using":e.flags&on.Const?"const":e.flags&on.Using?"using":"var"}function xi(e){let t=er(e);if(t!=null)for(let a of t)switch(a.kind){case ue.PublicKeyword:return"public";case ue.ProtectedKeyword:return"protected";case ue.PrivateKeyword:return"private";default:break}}function ra(e,t,a){return o(t);function o(m){return a1(m)&&m.pos===e.end?m:gv(m.getChildren(a),v=>(v.pos<=e.pos&&v.end>e.end||v.pos===e.end)&&yv(v,a)?o(v):void 0)}}function fv(e,t){let a=e;for(;a;){if(t(a))return a;a=a.parent}}function dv(e){return!!fv(e,Jh)}function Qf(e){return Sr(!1,e,/&(?:#\d+|#x[\da-fA-F]+|[0-9a-zA-Z]+);/g,t=>{let a=t.slice(1,-1);if(a[0]==="#"){let o=a[1]==="x"?parseInt(a.slice(2),16):parseInt(a.slice(1),10);return o>1114111?t:String.fromCodePoint(o)}return Eh[a]||t})}function ia(e){return e.kind===ue.ComputedPropertyName}function Kf(e){return!!e.questionToken}function Zf(e){return e.type===C.ChainExpression}function Lh(e,t){return Zf(t)&&e.expression.kind!==Ie.ParenthesizedExpression}function mv(e){let t;if(Dh&&e.kind===ue.Identifier?t=Sl(e):"originalKeywordKind"in e&&(t=e.originalKeywordKind),t)return t===ue.NullKeyword?Rt.Null:t>=ue.FirstFutureReservedWord&&t<=ue.LastKeyword?Rt.Identifier:Rt.Keyword;if(e.kind>=ue.FirstKeyword&&e.kind<=ue.LastFutureReservedWord)return e.kind===ue.FalseKeyword||e.kind===ue.TrueKeyword?Rt.Boolean:Rt.Keyword;if(e.kind>=ue.FirstPunctuation&&e.kind<=ue.LastPunctuation)return Rt.Punctuator;if(e.kind>=ue.NoSubstitutionTemplateLiteral&&e.kind<=ue.TemplateTail)return Rt.Template;switch(e.kind){case ue.NumericLiteral:return Rt.Numeric;case ue.JsxText:return Rt.JSXText;case ue.StringLiteral:return e.parent.kind===ue.JsxAttribute||e.parent.kind===ue.JsxElement?Rt.JSXText:Rt.String;case ue.RegularExpressionLiteral:return Rt.RegularExpression;case ue.Identifier:case ue.ConstructorKeyword:case ue.GetKeyword:case ue.SetKeyword:default:}if(e.kind===ue.Identifier){if(Jh(e.parent))return Rt.JSXIdentifier;if(e.parent.kind===ue.PropertyAccessExpression&&dv(e))return Rt.JSXIdentifier}return Rt.Identifier}function hv(e,t){let a=e.kind===ue.JsxText?e.getFullStart():e.getStart(t),o=e.getEnd(),m=t.text.slice(a,o),v=mv(e),A=[a,o],P=Qr(A,t);return v===Rt.RegularExpression?{type:v,loc:P,range:A,regex:{flags:m.slice(m.lastIndexOf("/")+1),pattern:m.slice(1,m.lastIndexOf("/"))},value:m}:{type:v,loc:P,range:A,value:m}}function jh(e){let t=[];function a(o){lv(o)||uv(o)||(pv(o)&&o.kind!==ue.EndOfFileToken?t.push(hv(o,e)):o.getChildren(e).forEach(a))}return a(e),t}var $f=class extends Error{fileName;location;constructor(t,a,o){super(t),this.fileName=a,this.location=o,Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:new.target.name})}get index(){return this.location.start.offset}get lineNumber(){return this.location.start.line}get column(){return this.location.start.column}};function ed(e,t,a,o=a){let[m,v]=[a,o].map(A=>{let{character:P,line:l}=t.getLineAndCharacterOfPosition(A);return{column:P,line:l+1,offset:A}});return new $f(e,t.fileName,{end:v,start:m})}function Rh(e){var t;return!!("illegalDecorators"in e&&((t=e.illegalDecorators)!=null&&t.length))}function yv(e,t){return e.kind===ue.EndOfFileToken?!!e.jsDoc:e.getWidth(t)!==0}function gv(e,t){if(e!==void 0)for(let a=0;a=0&&e.kind!==ue.EndOfFileToken}function td(e){return!vv(e)}function qh(e){return cf(e.parent,mf)}function Tv(e){return Xe(ue.AbstractKeyword,e)}function xv(e){if(e.parameters.length&&!Pl(e)){let t=e.parameters[0];if(Sv(t))return t}return null}function Sv(e){return Uh(e.name)}function zh(e){switch(e.kind){case ue.ClassDeclaration:return!0;case ue.ClassExpression:return!0;case ue.PropertyDeclaration:{let{parent:t}=e;return!!(Wa(t)||vi(t)&&!Tv(e))}case ue.GetAccessor:case ue.SetAccessor:case ue.MethodDeclaration:{let{parent:t}=e;return!!e.body&&(Wa(t)||vi(t))}case ue.Parameter:{let{parent:t}=e,a=t.parent;return!!t&&"body"in t&&!!t.body&&(t.kind===ue.Constructor||t.kind===ue.MethodDeclaration||t.kind===ue.SetAccessor)&&xv(t)!==e&&!!a&&a.kind===ue.ClassDeclaration}}return!1}function Jl(e){switch(e.kind){case ue.Identifier:return!0;case ue.PropertyAccessExpression:case ue.ElementAccessExpression:return!(e.flags&on.OptionalChain);case ue.ParenthesizedExpression:case ue.TypeAssertionExpression:case ue.AsExpression:case ue.SatisfiesExpression:case ue.ExpressionWithTypeArguments:case ue.NonNullExpression:return Jl(e.expression);default:return!1}}function Fh(e){let t=er(e),a=e;for(;(!t||t.length===0)&&Ti(a.parent);){let o=er(a.parent);o!=null&&o.length&&(t=o),a=a.parent}return t}var T=Ie;function ad(e){return ed("message"in e&&e.message||e.messageText,e.file,e.start)}var me,rd,Vh,Be,Vt,Qa,id,Ll=class{constructor(t,a){yp(this,me);qi(this,"allowPattern",!1);qi(this,"ast");qi(this,"esTreeNodeToTSNodeMap",new WeakMap);qi(this,"options");qi(this,"tsNodeToESTreeNodeMap",new WeakMap);this.ast=t,this.options={...a}}assertModuleSpecifier(t,a){var o;!a&&t.moduleSpecifier==null&&ge(this,me,Vt).call(this,t,"Module specifier must be a string literal."),t.moduleSpecifier&&((o=t.moduleSpecifier)==null?void 0:o.kind)!==T.StringLiteral&&ge(this,me,Vt).call(this,t.moduleSpecifier,"Module specifier must be a string literal.")}convertBindingNameWithTypeAnnotation(t,a,o){let m=this.convertPattern(t);return a&&(m.typeAnnotation=this.convertTypeAnnotation(a,o),this.fixParentLocation(m,m.typeAnnotation.range)),m}convertBodyExpressions(t,a){let o=Mh(a);return t.map(m=>{let v=this.convertChild(m);if(o){if(v!=null&&v.expression&&Cl(m)&&Ya(m.expression)){let A=v.expression.raw;return v.directive=A.slice(1,-1),v}o=!1}return v}).filter(m=>m)}convertChainExpression(t,a){let{child:o,isOptional:m}=t.type===C.MemberExpression?{child:t.object,isOptional:t.optional}:t.type===C.CallExpression?{child:t.callee,isOptional:t.optional}:{child:t.expression,isOptional:!1},v=Lh(a,o);if(!v&&!m)return t;if(v&&Zf(o)){let A=o.expression;t.type===C.MemberExpression?t.object=A:t.type===C.CallExpression?t.callee=A:t.expression=A}return this.createNode(a,{type:C.ChainExpression,expression:t})}convertChild(t,a){return this.converter(t,a,!1)}convertPattern(t,a){return this.converter(t,a,!0)}convertTypeAnnotation(t,a){let o=(a==null?void 0:a.kind)===T.FunctionType||(a==null?void 0:a.kind)===T.ConstructorType?2:1,v=[t.getFullStart()-o,t.end],A=Qr(v,this.ast);return{type:C.TSTypeAnnotation,loc:A,range:v,typeAnnotation:this.convertChild(t)}}convertTypeArgumentsToTypeParameterInstantiation(t,a){let o=ra(t,this.ast,this.ast);return this.createNode(a,{type:C.TSTypeParameterInstantiation,range:[t.pos-1,o.end],params:t.map(m=>this.convertChild(m))})}convertTSTypeParametersToTypeParametersDeclaration(t){let a=ra(t,this.ast,this.ast),o=[t.pos-1,a.end];return{type:C.TSTypeParameterDeclaration,loc:Qr(o,this.ast),range:o,params:t.map(m=>this.convertChild(m))}}convertParameters(t){return t!=null&&t.length?t.map(a=>{var m;let o=this.convertChild(a);return o.decorators=((m=na(a))==null?void 0:m.map(v=>this.convertChild(v)))??[],o}):[]}converter(t,a,o){if(!t)return null;ge(this,me,Vh).call(this,t);let m=this.allowPattern;o!=null&&(this.allowPattern=o);let v=this.convertNode(t,a??t.parent);return this.registerTSNodeInNodeMap(t,v),this.allowPattern=m,v}convertImportAttributes(t){return t==null?[]:t.elements.map(a=>this.convertChild(a))}convertJSXIdentifier(t){let a=this.createNode(t,{type:C.JSXIdentifier,name:t.getText()});return this.registerTSNodeInNodeMap(t,a),a}convertJSXNamespaceOrIdentifier(t){if(t.kind===Ie.JsxNamespacedName){let m=this.createNode(t,{type:C.JSXNamespacedName,name:this.createNode(t.name,{type:C.JSXIdentifier,name:t.name.text}),namespace:this.createNode(t.namespace,{type:C.JSXIdentifier,name:t.namespace.text})});return this.registerTSNodeInNodeMap(t,m),m}let a=t.getText(),o=a.indexOf(":");if(o>0){let m=$a(t,this.ast),v=this.createNode(t,{type:C.JSXNamespacedName,range:m,name:this.createNode(t,{type:C.JSXIdentifier,range:[m[0]+o+1,m[1]],name:a.slice(o+1)}),namespace:this.createNode(t,{type:C.JSXIdentifier,range:[m[0],m[0]+o],name:a.slice(0,o)})});return this.registerTSNodeInNodeMap(t,v),v}return this.convertJSXIdentifier(t)}convertJSXTagName(t,a){let o;switch(t.kind){case T.PropertyAccessExpression:t.name.kind===T.PrivateIdentifier&&ge(this,me,Be).call(this,t.name,"Non-private identifier expected."),o=this.createNode(t,{type:C.JSXMemberExpression,object:this.convertJSXTagName(t.expression,a),property:this.convertJSXIdentifier(t.name)});break;case T.ThisKeyword:case T.Identifier:default:return this.convertJSXNamespaceOrIdentifier(t)}return this.registerTSNodeInNodeMap(t,o),o}convertMethodSignature(t){return this.createNode(t,{type:C.TSMethodSignature,accessibility:xi(t),computed:ia(t.name),key:this.convertChild(t.name),kind:(()=>{switch(t.kind){case T.GetAccessor:return"get";case T.SetAccessor:return"set";case T.MethodSignature:return"method"}})(),optional:Kf(t),params:this.convertParameters(t.parameters),readonly:Xe(T.ReadonlyKeyword,t),returnType:t.type&&this.convertTypeAnnotation(t.type,t),static:Xe(T.StaticKeyword,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)})}fixParentLocation(t,a){a[0]t.range[1]&&(t.range[1]=a[1],t.loc.end=Ts(t.range[1],this.ast))}convertNode(t,a){var o,m,v,A,P,l,Q,h;switch(t.kind){case T.SourceFile:return this.createNode(t,{type:C.Program,range:[t.getStart(this.ast),t.endOfFileToken.end],body:this.convertBodyExpressions(t.statements,t),comments:void 0,sourceType:t.externalModuleIndicator?"module":"script",tokens:void 0});case T.Block:return this.createNode(t,{type:C.BlockStatement,body:this.convertBodyExpressions(t.statements,t)});case T.Identifier:return Bh(t)?this.createNode(t,{type:C.ThisExpression}):this.createNode(t,{type:C.Identifier,decorators:[],name:t.text,optional:!1,typeAnnotation:void 0});case T.PrivateIdentifier:return this.createNode(t,{type:C.PrivateIdentifier,name:t.text.slice(1)});case T.WithStatement:return this.createNode(t,{type:C.WithStatement,body:this.convertChild(t.statement),object:this.convertChild(t.expression)});case T.ReturnStatement:return this.createNode(t,{type:C.ReturnStatement,argument:this.convertChild(t.expression)});case T.LabeledStatement:return this.createNode(t,{type:C.LabeledStatement,body:this.convertChild(t.statement),label:this.convertChild(t.label)});case T.ContinueStatement:return this.createNode(t,{type:C.ContinueStatement,label:this.convertChild(t.label)});case T.BreakStatement:return this.createNode(t,{type:C.BreakStatement,label:this.convertChild(t.label)});case T.IfStatement:return this.createNode(t,{type:C.IfStatement,alternate:this.convertChild(t.elseStatement),consequent:this.convertChild(t.thenStatement),test:this.convertChild(t.expression)});case T.SwitchStatement:return t.caseBlock.clauses.filter(y=>y.kind===T.DefaultClause).length>1&&ge(this,me,Be).call(this,t,"A 'default' clause cannot appear more than once in a 'switch' statement."),this.createNode(t,{type:C.SwitchStatement,cases:t.caseBlock.clauses.map(y=>this.convertChild(y)),discriminant:this.convertChild(t.expression)});case T.CaseClause:case T.DefaultClause:return this.createNode(t,{type:C.SwitchCase,consequent:t.statements.map(y=>this.convertChild(y)),test:t.kind===T.CaseClause?this.convertChild(t.expression):null});case T.ThrowStatement:return t.expression.end===t.expression.pos&&ge(this,me,Vt).call(this,t,"A throw statement must throw an expression."),this.createNode(t,{type:C.ThrowStatement,argument:this.convertChild(t.expression)});case T.TryStatement:return this.createNode(t,{type:C.TryStatement,block:this.convertChild(t.tryBlock),finalizer:this.convertChild(t.finallyBlock),handler:this.convertChild(t.catchClause)});case T.CatchClause:return(o=t.variableDeclaration)!=null&&o.initializer&&ge(this,me,Be).call(this,t.variableDeclaration.initializer,"Catch clause variable cannot have an initializer."),this.createNode(t,{type:C.CatchClause,body:this.convertChild(t.block),param:t.variableDeclaration?this.convertBindingNameWithTypeAnnotation(t.variableDeclaration.name,t.variableDeclaration.type):null});case T.WhileStatement:return this.createNode(t,{type:C.WhileStatement,body:this.convertChild(t.statement),test:this.convertChild(t.expression)});case T.DoStatement:return this.createNode(t,{type:C.DoWhileStatement,body:this.convertChild(t.statement),test:this.convertChild(t.expression)});case T.ForStatement:return this.createNode(t,{type:C.ForStatement,body:this.convertChild(t.statement),init:this.convertChild(t.initializer),test:this.convertChild(t.condition),update:this.convertChild(t.incrementor)});case T.ForInStatement:return ge(this,me,rd).call(this,t.initializer,t.kind),this.createNode(t,{type:C.ForInStatement,body:this.convertChild(t.statement),left:this.convertPattern(t.initializer),right:this.convertChild(t.expression)});case T.ForOfStatement:return ge(this,me,rd).call(this,t.initializer,t.kind),this.createNode(t,{type:C.ForOfStatement,await:!!(t.awaitModifier&&t.awaitModifier.kind===T.AwaitKeyword),body:this.convertChild(t.statement),left:this.convertPattern(t.initializer),right:this.convertChild(t.expression)});case T.FunctionDeclaration:{let y=Xe(T.DeclareKeyword,t),g=Xe(T.AsyncKeyword,t),x=!!t.asteriskToken;y?t.body?ge(this,me,Be).call(this,t,"An implementation cannot be declared in ambient contexts."):g?ge(this,me,Be).call(this,t,"'async' modifier cannot be used in an ambient context."):x&&ge(this,me,Be).call(this,t,"Generators are not allowed in an ambient context."):!t.body&&x&&ge(this,me,Be).call(this,t,"A function signature cannot be declared as a generator.");let I=this.createNode(t,{type:t.body?C.FunctionDeclaration:C.TSDeclareFunction,async:g,body:this.convertChild(t.body)||void 0,declare:y,expression:!1,generator:x,id:this.convertChild(t.name),params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});return this.fixExports(t,I)}case T.VariableDeclaration:{let y=!!t.exclamationToken,g=this.convertChild(t.initializer),x=this.convertBindingNameWithTypeAnnotation(t.name,t.type,t);return y&&(g?ge(this,me,Be).call(this,t,"Declarations with initializers cannot also have definite assignment assertions."):(x.type!==C.Identifier||!x.typeAnnotation)&&ge(this,me,Be).call(this,t,"Declarations with definite assignment assertions must also have type annotations.")),this.createNode(t,{type:C.VariableDeclarator,definite:y,id:x,init:g})}case T.VariableStatement:{let y=this.createNode(t,{type:C.VariableDeclaration,declarations:t.declarationList.declarations.map(g=>this.convertChild(g)),declare:Xe(T.DeclareKeyword,t),kind:Ml(t.declarationList)});return y.declarations.length||ge(this,me,Vt).call(this,t,"A variable declaration list must have at least one variable declarator."),(y.kind==="using"||y.kind==="await using")&&t.declarationList.declarations.forEach((g,x)=>{y.declarations[x].init==null&&ge(this,me,Be).call(this,g,`'${y.kind}' declarations must be initialized.`),y.declarations[x].id.type!==C.Identifier&&ge(this,me,Be).call(this,g.name,`'${y.kind}' declarations may not have binding patterns.`)}),(y.declare||["await using","const","using"].includes(y.kind))&&t.declarationList.declarations.forEach((g,x)=>{y.declarations[x].definite&&ge(this,me,Be).call(this,g,"A definite assignment assertion '!' is not permitted in this context.")}),y.declare&&t.declarationList.declarations.forEach((g,x)=>{y.declarations[x].init&&(["let","var"].includes(y.kind)||y.declarations[x].id.typeAnnotation)&&ge(this,me,Be).call(this,g,"Initializers are not permitted in ambient contexts.")}),this.fixExports(t,y)}case T.VariableDeclarationList:{let y=this.createNode(t,{type:C.VariableDeclaration,declarations:t.declarations.map(g=>this.convertChild(g)),declare:!1,kind:Ml(t)});return(y.kind==="using"||y.kind==="await using")&&t.declarations.forEach((g,x)=>{y.declarations[x].init!=null&&ge(this,me,Be).call(this,g,`'${y.kind}' declarations may not be initialized in for statement.`),y.declarations[x].id.type!==C.Identifier&&ge(this,me,Be).call(this,g.name,`'${y.kind}' declarations may not have binding patterns.`)}),y}case T.ExpressionStatement:return this.createNode(t,{type:C.ExpressionStatement,directive:void 0,expression:this.convertChild(t.expression)});case T.ThisKeyword:return this.createNode(t,{type:C.ThisExpression});case T.ArrayLiteralExpression:return this.allowPattern?this.createNode(t,{type:C.ArrayPattern,decorators:[],elements:t.elements.map(y=>this.convertPattern(y)),optional:!1,typeAnnotation:void 0}):this.createNode(t,{type:C.ArrayExpression,elements:t.elements.map(y=>this.convertChild(y))});case T.ObjectLiteralExpression:{if(this.allowPattern)return this.createNode(t,{type:C.ObjectPattern,decorators:[],optional:!1,properties:t.properties.map(g=>this.convertPattern(g)),typeAnnotation:void 0});let y=[];for(let g of t.properties)(g.kind===T.GetAccessor||g.kind===T.SetAccessor||g.kind===T.MethodDeclaration)&&!g.body&&ge(this,me,Vt).call(this,g.end-1,"'{' expected."),y.push(this.convertChild(g));return this.createNode(t,{type:C.ObjectExpression,properties:y})}case T.PropertyAssignment:{let{exclamationToken:y,questionToken:g}=t;return g&&ge(this,me,Be).call(this,g,"A property assignment cannot have a question token."),y&&ge(this,me,Be).call(this,y,"A property assignment cannot have an exclamation token."),this.createNode(t,{type:C.Property,computed:ia(t.name),key:this.convertChild(t.name),kind:"init",method:!1,optional:!1,shorthand:!1,value:this.converter(t.initializer,t,this.allowPattern)})}case T.ShorthandPropertyAssignment:{let{exclamationToken:y,modifiers:g,questionToken:x}=t;return g&&ge(this,me,Be).call(this,g[0],"A shorthand property assignment cannot have modifiers."),x&&ge(this,me,Be).call(this,x,"A shorthand property assignment cannot have a question token."),y&&ge(this,me,Be).call(this,y,"A shorthand property assignment cannot have an exclamation token."),t.objectAssignmentInitializer?this.createNode(t,{type:C.Property,computed:!1,key:this.convertChild(t.name),kind:"init",method:!1,optional:!1,shorthand:!0,value:this.createNode(t,{type:C.AssignmentPattern,decorators:[],left:this.convertPattern(t.name),optional:!1,right:this.convertChild(t.objectAssignmentInitializer),typeAnnotation:void 0})}):this.createNode(t,{type:C.Property,computed:!1,key:this.convertChild(t.name),kind:"init",method:!1,optional:!1,shorthand:!0,value:this.convertChild(t.name)})}case T.ComputedPropertyName:return this.convertChild(t.expression);case T.PropertyDeclaration:{let y=Xe(T.AbstractKeyword,t);y&&t.initializer&&ge(this,me,Be).call(this,t.initializer,"Abstract property cannot have an initializer.");let g=Xe(T.AccessorKeyword,t),x=g?y?C.TSAbstractAccessorProperty:C.AccessorProperty:y?C.TSAbstractPropertyDefinition:C.PropertyDefinition,I=this.convertChild(t.name);return this.createNode(t,{type:x,accessibility:xi(t),computed:ia(t.name),declare:Xe(T.DeclareKeyword,t),decorators:((m=na(t))==null?void 0:m.map(re=>this.convertChild(re)))??[],definite:!!t.exclamationToken,key:I,optional:(I.type===C.Literal||t.name.kind===T.Identifier||t.name.kind===T.ComputedPropertyName||t.name.kind===T.PrivateIdentifier)&&!!t.questionToken,override:Xe(T.OverrideKeyword,t),readonly:Xe(T.ReadonlyKeyword,t),static:Xe(T.StaticKeyword,t),typeAnnotation:t.type&&this.convertTypeAnnotation(t.type,t),value:y?null:this.convertChild(t.initializer)})}case T.GetAccessor:case T.SetAccessor:if(t.parent.kind===T.InterfaceDeclaration||t.parent.kind===T.TypeLiteral)return this.convertMethodSignature(t);case T.MethodDeclaration:{let y=this.createNode(t,{type:t.body?C.FunctionExpression:C.TSEmptyBodyFunctionExpression,range:[t.parameters.pos-1,t.end],async:Xe(T.AsyncKeyword,t),body:this.convertChild(t.body),declare:!1,expression:!1,generator:!!t.asteriskToken,id:null,params:[],returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});y.typeParameters&&this.fixParentLocation(y,y.typeParameters.range);let g;if(a.kind===T.ObjectLiteralExpression)y.params=t.parameters.map(x=>this.convertChild(x)),g=this.createNode(t,{type:C.Property,computed:ia(t.name),key:this.convertChild(t.name),kind:"init",method:t.kind===T.MethodDeclaration,optional:!!t.questionToken,shorthand:!1,value:y});else{y.params=this.convertParameters(t.parameters);let x=Xe(T.AbstractKeyword,t)?C.TSAbstractMethodDefinition:C.MethodDefinition;g=this.createNode(t,{type:x,accessibility:xi(t),computed:ia(t.name),decorators:((v=na(t))==null?void 0:v.map(I=>this.convertChild(I)))??[],key:this.convertChild(t.name),kind:"method",optional:!!t.questionToken,override:Xe(T.OverrideKeyword,t),static:Xe(T.StaticKeyword,t),value:y})}return t.kind===T.GetAccessor?g.kind="get":t.kind===T.SetAccessor?g.kind="set":!g.static&&t.name.kind===T.StringLiteral&&t.name.text==="constructor"&&g.type!==C.Property&&(g.kind="constructor"),g}case T.Constructor:{let y=Nh(t),g=(y&&ra(y,t,this.ast))??t.getFirstToken(),x=this.createNode(t,{type:t.body?C.FunctionExpression:C.TSEmptyBodyFunctionExpression,range:[t.parameters.pos-1,t.end],async:!1,body:this.convertChild(t.body),declare:!1,expression:!1,generator:!1,id:null,params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});x.typeParameters&&this.fixParentLocation(x,x.typeParameters.range);let I=this.createNode(t,{type:C.Identifier,range:[g.getStart(this.ast),g.end],decorators:[],name:"constructor",optional:!1,typeAnnotation:void 0}),re=Xe(T.StaticKeyword,t);return this.createNode(t,{type:Xe(T.AbstractKeyword,t)?C.TSAbstractMethodDefinition:C.MethodDefinition,accessibility:xi(t),computed:!1,decorators:[],key:I,kind:re?"method":"constructor",optional:!1,override:!1,static:re,value:x})}case T.FunctionExpression:return this.createNode(t,{type:C.FunctionExpression,async:Xe(T.AsyncKeyword,t),body:this.convertChild(t.body),declare:!1,expression:!1,generator:!!t.asteriskToken,id:this.convertChild(t.name),params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});case T.SuperKeyword:return this.createNode(t,{type:C.Super});case T.ArrayBindingPattern:return this.createNode(t,{type:C.ArrayPattern,decorators:[],elements:t.elements.map(y=>this.convertPattern(y)),optional:!1,typeAnnotation:void 0});case T.OmittedExpression:return null;case T.ObjectBindingPattern:return this.createNode(t,{type:C.ObjectPattern,decorators:[],optional:!1,properties:t.elements.map(y=>this.convertPattern(y)),typeAnnotation:void 0});case T.BindingElement:{if(a.kind===T.ArrayBindingPattern){let g=this.convertChild(t.name,a);return t.initializer?this.createNode(t,{type:C.AssignmentPattern,decorators:[],left:g,optional:!1,right:this.convertChild(t.initializer),typeAnnotation:void 0}):t.dotDotDotToken?this.createNode(t,{type:C.RestElement,argument:g,decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):g}let y;return t.dotDotDotToken?y=this.createNode(t,{type:C.RestElement,argument:this.convertChild(t.propertyName??t.name),decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):y=this.createNode(t,{type:C.Property,computed:!!(t.propertyName&&t.propertyName.kind===T.ComputedPropertyName),key:this.convertChild(t.propertyName??t.name),kind:"init",method:!1,optional:!1,shorthand:!t.propertyName,value:this.convertChild(t.name)}),t.initializer&&(y.value=this.createNode(t,{type:C.AssignmentPattern,range:[t.name.getStart(this.ast),t.initializer.end],decorators:[],left:this.convertChild(t.name),optional:!1,right:this.convertChild(t.initializer),typeAnnotation:void 0})),y}case T.ArrowFunction:return this.createNode(t,{type:C.ArrowFunctionExpression,async:Xe(T.AsyncKeyword,t),body:this.convertChild(t.body),expression:t.body.kind!==T.Block,generator:!1,id:null,params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});case T.YieldExpression:return this.createNode(t,{type:C.YieldExpression,argument:this.convertChild(t.expression),delegate:!!t.asteriskToken});case T.AwaitExpression:return this.createNode(t,{type:C.AwaitExpression,argument:this.convertChild(t.expression)});case T.NoSubstitutionTemplateLiteral:return this.createNode(t,{type:C.TemplateLiteral,expressions:[],quasis:[this.createNode(t,{type:C.TemplateElement,tail:!0,value:{cooked:t.text,raw:this.ast.text.slice(t.getStart(this.ast)+1,t.end-1)}})]});case T.TemplateExpression:{let y=this.createNode(t,{type:C.TemplateLiteral,expressions:[],quasis:[this.convertChild(t.head)]});return t.templateSpans.forEach(g=>{y.expressions.push(this.convertChild(g.expression)),y.quasis.push(this.convertChild(g.literal))}),y}case T.TaggedTemplateExpression:return this.createNode(t,{type:C.TaggedTemplateExpression,quasi:this.convertChild(t.template),tag:this.convertChild(t.tag),typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t)});case T.TemplateHead:case T.TemplateMiddle:case T.TemplateTail:{let y=t.kind===T.TemplateTail;return this.createNode(t,{type:C.TemplateElement,tail:y,value:{cooked:t.text,raw:this.ast.text.slice(t.getStart(this.ast)+1,t.end-(y?1:2))}})}case T.SpreadAssignment:case T.SpreadElement:return this.allowPattern?this.createNode(t,{type:C.RestElement,argument:this.convertPattern(t.expression),decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):this.createNode(t,{type:C.SpreadElement,argument:this.convertChild(t.expression)});case T.Parameter:{let y,g;return t.dotDotDotToken?y=g=this.createNode(t,{type:C.RestElement,argument:this.convertChild(t.name),decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):t.initializer?(y=this.convertChild(t.name),g=this.createNode(t,{type:C.AssignmentPattern,decorators:[],left:y,optional:!1,right:this.convertChild(t.initializer),typeAnnotation:void 0}),er(t)&&(g.range[0]=y.range[0],g.loc=Qr(g.range,this.ast))):y=g=this.convertChild(t.name,a),t.type&&(y.typeAnnotation=this.convertTypeAnnotation(t.type,t),this.fixParentLocation(y,y.typeAnnotation.range)),t.questionToken&&(t.questionToken.end>y.range[1]&&(y.range[1]=t.questionToken.end,y.loc.end=Ts(y.range[1],this.ast)),y.optional=!0),er(t)?this.createNode(t,{type:C.TSParameterProperty,accessibility:xi(t),decorators:[],override:Xe(T.OverrideKeyword,t),parameter:g,readonly:Xe(T.ReadonlyKeyword,t),static:Xe(T.StaticKeyword,t)}):g}case T.ClassDeclaration:!t.name&&(!Xe(Ie.ExportKeyword,t)||!Xe(Ie.DefaultKeyword,t))&&ge(this,me,Vt).call(this,t,"A class declaration without the 'default' modifier must have a name.");case T.ClassExpression:{let y=t.heritageClauses??[],g=t.kind===T.ClassDeclaration?C.ClassDeclaration:C.ClassExpression,x,I;for(let he of y){let{token:ye,types:de}=he;de.length===0&&ge(this,me,Vt).call(this,he,`'${it(ye)}' list cannot be empty.`),ye===T.ExtendsKeyword?(x&&ge(this,me,Vt).call(this,he,"'extends' clause already seen."),I&&ge(this,me,Vt).call(this,he,"'extends' clause must precede 'implements' clause."),de.length>1&&ge(this,me,Vt).call(this,de[1],"Classes can only extend a single class."),x??(x=he)):ye===T.ImplementsKeyword&&(I&&ge(this,me,Vt).call(this,he,"'implements' clause already seen."),I??(I=he))}let re=this.createNode(t,{type:g,abstract:Xe(T.AbstractKeyword,t),body:this.createNode(t,{type:C.ClassBody,range:[t.members.pos-1,t.end],body:t.members.filter(Ph).map(he=>this.convertChild(he))}),declare:Xe(T.DeclareKeyword,t),decorators:((A=na(t))==null?void 0:A.map(he=>this.convertChild(he)))??[],id:this.convertChild(t.name),implements:(I==null?void 0:I.types.map(he=>this.convertChild(he)))??[],superClass:x!=null&&x.types[0]?this.convertChild(x.types[0].expression):null,superTypeArguments:void 0,typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});return(P=x==null?void 0:x.types[0])!=null&&P.typeArguments&&(re.superTypeArguments=this.convertTypeArgumentsToTypeParameterInstantiation(x.types[0].typeArguments,x.types[0])),this.fixExports(t,re)}case T.ModuleBlock:return this.createNode(t,{type:C.TSModuleBlock,body:this.convertBodyExpressions(t.statements,t)});case T.ImportDeclaration:{this.assertModuleSpecifier(t,!1);let y=this.createNode(t,ge(this,me,Qa).call(this,{type:C.ImportDeclaration,attributes:this.convertImportAttributes(t.attributes??t.assertClause),importKind:"value",source:this.convertChild(t.moduleSpecifier),specifiers:[]},"assertions","attributes",!0));if(t.importClause&&(t.importClause.isTypeOnly&&(y.importKind="type"),t.importClause.name&&y.specifiers.push(this.convertChild(t.importClause)),t.importClause.namedBindings))switch(t.importClause.namedBindings.kind){case T.NamespaceImport:y.specifiers.push(this.convertChild(t.importClause.namedBindings));break;case T.NamedImports:y.specifiers.push(...t.importClause.namedBindings.elements.map(g=>this.convertChild(g)));break}return y}case T.NamespaceImport:return this.createNode(t,{type:C.ImportNamespaceSpecifier,local:this.convertChild(t.name)});case T.ImportSpecifier:return this.createNode(t,{type:C.ImportSpecifier,imported:this.convertChild(t.propertyName??t.name),importKind:t.isTypeOnly?"type":"value",local:this.convertChild(t.name)});case T.ImportClause:{let y=this.convertChild(t.name);return this.createNode(t,{type:C.ImportDefaultSpecifier,range:y.range,local:y})}case T.ExportDeclaration:return((l=t.exportClause)==null?void 0:l.kind)===T.NamedExports?(this.assertModuleSpecifier(t,!0),this.createNode(t,ge(this,me,Qa).call(this,{type:C.ExportNamedDeclaration,attributes:this.convertImportAttributes(t.attributes??t.assertClause),declaration:null,exportKind:t.isTypeOnly?"type":"value",source:this.convertChild(t.moduleSpecifier),specifiers:t.exportClause.elements.map(y=>this.convertChild(y,t))},"assertions","attributes",!0))):(this.assertModuleSpecifier(t,!1),this.createNode(t,ge(this,me,Qa).call(this,{type:C.ExportAllDeclaration,attributes:this.convertImportAttributes(t.attributes??t.assertClause),exported:((Q=t.exportClause)==null?void 0:Q.kind)===T.NamespaceExport?this.convertChild(t.exportClause.name):null,exportKind:t.isTypeOnly?"type":"value",source:this.convertChild(t.moduleSpecifier)},"assertions","attributes",!0)));case T.ExportSpecifier:{let y=t.propertyName??t.name;return y.kind===T.StringLiteral&&a.kind===T.ExportDeclaration&&((h=a.moduleSpecifier)==null?void 0:h.kind)!==T.StringLiteral&&ge(this,me,Be).call(this,y,"A string literal cannot be used as a local exported binding without `from`."),this.createNode(t,{type:C.ExportSpecifier,exported:this.convertChild(t.name),exportKind:t.isTypeOnly?"type":"value",local:this.convertChild(y)})}case T.ExportAssignment:return t.isExportEquals?this.createNode(t,{type:C.TSExportAssignment,expression:this.convertChild(t.expression)}):this.createNode(t,{type:C.ExportDefaultDeclaration,declaration:this.convertChild(t.expression),exportKind:"value"});case T.PrefixUnaryExpression:case T.PostfixUnaryExpression:{let y=$r(t.operator);return y==="++"||y==="--"?(Jl(t.operand)||ge(this,me,Vt).call(this,t.operand,"Invalid left-hand side expression in unary operation"),this.createNode(t,{type:C.UpdateExpression,argument:this.convertChild(t.operand),operator:y,prefix:t.kind===T.PrefixUnaryExpression})):this.createNode(t,{type:C.UnaryExpression,argument:this.convertChild(t.operand),operator:y,prefix:t.kind===T.PrefixUnaryExpression})}case T.DeleteExpression:return this.createNode(t,{type:C.UnaryExpression,argument:this.convertChild(t.expression),operator:"delete",prefix:!0});case T.VoidExpression:return this.createNode(t,{type:C.UnaryExpression,argument:this.convertChild(t.expression),operator:"void",prefix:!0});case T.TypeOfExpression:return this.createNode(t,{type:C.UnaryExpression,argument:this.convertChild(t.expression),operator:"typeof",prefix:!0});case T.TypeOperator:return this.createNode(t,{type:C.TSTypeOperator,operator:$r(t.operator),typeAnnotation:this.convertChild(t.type)});case T.BinaryExpression:{if(Ih(t.operatorToken)){let g=this.createNode(t,{type:C.SequenceExpression,expressions:[]}),x=this.convertChild(t.left);return x.type===C.SequenceExpression&&t.left.kind!==T.ParenthesizedExpression?g.expressions.push(...x.expressions):g.expressions.push(x),g.expressions.push(this.convertChild(t.right)),g}let y=Oh(t.operatorToken);return this.allowPattern&&y.type===C.AssignmentExpression?this.createNode(t,{type:C.AssignmentPattern,decorators:[],left:this.convertPattern(t.left,t),optional:!1,right:this.convertChild(t.right),typeAnnotation:void 0}):this.createNode(t,{...y,left:this.converter(t.left,t,y.type===C.AssignmentExpression),right:this.convertChild(t.right)})}case T.PropertyAccessExpression:{let y=this.convertChild(t.expression),g=this.convertChild(t.name),I=this.createNode(t,{type:C.MemberExpression,computed:!1,object:y,optional:t.questionDotToken!=null,property:g});return this.convertChainExpression(I,t)}case T.ElementAccessExpression:{let y=this.convertChild(t.expression),g=this.convertChild(t.argumentExpression),I=this.createNode(t,{type:C.MemberExpression,computed:!0,object:y,optional:t.questionDotToken!=null,property:g});return this.convertChainExpression(I,t)}case T.CallExpression:{if(t.expression.kind===T.ImportKeyword)return t.arguments.length!==1&&t.arguments.length!==2&&ge(this,me,Vt).call(this,t.arguments[2]??t,"Dynamic import requires exactly one or two arguments."),this.createNode(t,ge(this,me,Qa).call(this,{type:C.ImportExpression,options:t.arguments[1]?this.convertChild(t.arguments[1]):null,source:this.convertChild(t.arguments[0])},"attributes","options",!0));let y=this.convertChild(t.expression),g=t.arguments.map(re=>this.convertChild(re)),x=t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t),I=this.createNode(t,{type:C.CallExpression,arguments:g,callee:y,optional:t.questionDotToken!=null,typeArguments:x});return this.convertChainExpression(I,t)}case T.NewExpression:{let y=t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t);return this.createNode(t,{type:C.NewExpression,arguments:t.arguments?t.arguments.map(g=>this.convertChild(g)):[],callee:this.convertChild(t.expression),typeArguments:y})}case T.ConditionalExpression:return this.createNode(t,{type:C.ConditionalExpression,alternate:this.convertChild(t.whenFalse),consequent:this.convertChild(t.whenTrue),test:this.convertChild(t.condition)});case T.MetaProperty:return this.createNode(t,{type:C.MetaProperty,meta:this.createNode(t.getFirstToken(),{type:C.Identifier,decorators:[],name:$r(t.keywordToken),optional:!1,typeAnnotation:void 0}),property:this.convertChild(t.name)});case T.Decorator:return this.createNode(t,{type:C.Decorator,expression:this.convertChild(t.expression)});case T.StringLiteral:return this.createNode(t,{type:C.Literal,raw:t.getText(),value:a.kind===T.JsxAttribute?Qf(t.text):t.text});case T.NumericLiteral:return this.createNode(t,{type:C.Literal,raw:t.getText(),value:Number(t.text)});case T.BigIntLiteral:{let y=$a(t,this.ast),g=this.ast.text.slice(y[0],y[1]),x=Sr(!1,g.slice(0,-1),"_",""),I=typeof BigInt<"u"?BigInt(x):null;return this.createNode(t,{type:C.Literal,range:y,bigint:I==null?x:String(I),raw:g,value:I})}case T.RegularExpressionLiteral:{let y=t.text.slice(1,t.text.lastIndexOf("/")),g=t.text.slice(t.text.lastIndexOf("/")+1),x=null;try{x=new RegExp(y,g)}catch{}return this.createNode(t,{type:C.Literal,raw:t.text,regex:{flags:g,pattern:y},value:x})}case T.TrueKeyword:return this.createNode(t,{type:C.Literal,raw:"true",value:!0});case T.FalseKeyword:return this.createNode(t,{type:C.Literal,raw:"false",value:!1});case T.NullKeyword:return this.createNode(t,{type:C.Literal,raw:"null",value:null});case T.EmptyStatement:return this.createNode(t,{type:C.EmptyStatement});case T.DebuggerStatement:return this.createNode(t,{type:C.DebuggerStatement});case T.JsxElement:return this.createNode(t,{type:C.JSXElement,children:t.children.map(y=>this.convertChild(y)),closingElement:this.convertChild(t.closingElement),openingElement:this.convertChild(t.openingElement)});case T.JsxFragment:return this.createNode(t,{type:C.JSXFragment,children:t.children.map(y=>this.convertChild(y)),closingFragment:this.convertChild(t.closingFragment),openingFragment:this.convertChild(t.openingFragment)});case T.JsxSelfClosingElement:return this.createNode(t,{type:C.JSXElement,children:[],closingElement:null,openingElement:this.createNode(t,{type:C.JSXOpeningElement,range:$a(t,this.ast),attributes:t.attributes.properties.map(y=>this.convertChild(y)),name:this.convertJSXTagName(t.tagName,t),selfClosing:!0,typeArguments:t.typeArguments?this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t):void 0})});case T.JsxOpeningElement:return this.createNode(t,{type:C.JSXOpeningElement,attributes:t.attributes.properties.map(y=>this.convertChild(y)),name:this.convertJSXTagName(t.tagName,t),selfClosing:!1,typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t)});case T.JsxClosingElement:return this.createNode(t,{type:C.JSXClosingElement,name:this.convertJSXTagName(t.tagName,t)});case T.JsxOpeningFragment:return this.createNode(t,{type:C.JSXOpeningFragment});case T.JsxClosingFragment:return this.createNode(t,{type:C.JSXClosingFragment});case T.JsxExpression:{let y=t.expression?this.convertChild(t.expression):this.createNode(t,{type:C.JSXEmptyExpression,range:[t.getStart(this.ast)+1,t.getEnd()-1]});return t.dotDotDotToken?this.createNode(t,{type:C.JSXSpreadChild,expression:y}):this.createNode(t,{type:C.JSXExpressionContainer,expression:y})}case T.JsxAttribute:return this.createNode(t,{type:C.JSXAttribute,name:this.convertJSXNamespaceOrIdentifier(t.name),value:this.convertChild(t.initializer)});case T.JsxText:{let y=t.getFullStart(),g=t.getEnd(),x=this.ast.text.slice(y,g);return this.createNode(t,{type:C.JSXText,range:[y,g],raw:x,value:Qf(x)})}case T.JsxSpreadAttribute:return this.createNode(t,{type:C.JSXSpreadAttribute,argument:this.convertChild(t.expression)});case T.QualifiedName:return this.createNode(t,{type:C.TSQualifiedName,left:this.convertChild(t.left),right:this.convertChild(t.right)});case T.TypeReference:return this.createNode(t,{type:C.TSTypeReference,typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t),typeName:this.convertChild(t.typeName)});case T.TypeParameter:return this.createNode(t,{type:C.TSTypeParameter,const:Xe(T.ConstKeyword,t),constraint:t.constraint&&this.convertChild(t.constraint),default:t.default?this.convertChild(t.default):void 0,in:Xe(T.InKeyword,t),name:this.convertChild(t.name),out:Xe(T.OutKeyword,t)});case T.ThisType:return this.createNode(t,{type:C.TSThisType});case T.AnyKeyword:case T.BigIntKeyword:case T.BooleanKeyword:case T.NeverKeyword:case T.NumberKeyword:case T.ObjectKeyword:case T.StringKeyword:case T.SymbolKeyword:case T.UnknownKeyword:case T.VoidKeyword:case T.UndefinedKeyword:case T.IntrinsicKeyword:return this.createNode(t,{type:C[`TS${T[t.kind]}`]});case T.NonNullExpression:{let y=this.createNode(t,{type:C.TSNonNullExpression,expression:this.convertChild(t.expression)});return this.convertChainExpression(y,t)}case T.TypeLiteral:return this.createNode(t,{type:C.TSTypeLiteral,members:t.members.map(y=>this.convertChild(y))});case T.ArrayType:return this.createNode(t,{type:C.TSArrayType,elementType:this.convertChild(t.elementType)});case T.IndexedAccessType:return this.createNode(t,{type:C.TSIndexedAccessType,indexType:this.convertChild(t.indexType),objectType:this.convertChild(t.objectType)});case T.ConditionalType:return this.createNode(t,{type:C.TSConditionalType,checkType:this.convertChild(t.checkType),extendsType:this.convertChild(t.extendsType),falseType:this.convertChild(t.falseType),trueType:this.convertChild(t.trueType)});case T.TypeQuery:return this.createNode(t,{type:C.TSTypeQuery,exprName:this.convertChild(t.exprName),typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t)});case T.MappedType:return t.members&&t.members.length>0&&ge(this,me,Vt).call(this,t.members[0],"A mapped type may not declare properties or methods."),this.createNode(t,ge(this,me,id).call(this,{type:C.TSMappedType,constraint:this.convertChild(t.typeParameter.constraint),key:this.convertChild(t.typeParameter.name),nameType:this.convertChild(t.nameType)??null,optional:t.questionToken&&(t.questionToken.kind===T.QuestionToken||$r(t.questionToken.kind)),readonly:t.readonlyToken&&(t.readonlyToken.kind===T.ReadonlyKeyword||$r(t.readonlyToken.kind)),typeAnnotation:t.type&&this.convertChild(t.type)},"typeParameter","'constraint' and 'key'",this.convertChild(t.typeParameter)));case T.ParenthesizedExpression:return this.convertChild(t.expression,a);case T.TypeAliasDeclaration:{let y=this.createNode(t,{type:C.TSTypeAliasDeclaration,declare:Xe(T.DeclareKeyword,t),id:this.convertChild(t.name),typeAnnotation:this.convertChild(t.type),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});return this.fixExports(t,y)}case T.MethodSignature:return this.convertMethodSignature(t);case T.PropertySignature:{let{initializer:y}=t;return y&&ge(this,me,Be).call(this,y,"A property signature cannot have an initializer."),this.createNode(t,{type:C.TSPropertySignature,accessibility:xi(t),computed:ia(t.name),key:this.convertChild(t.name),optional:Kf(t),readonly:Xe(T.ReadonlyKeyword,t),static:Xe(T.StaticKeyword,t),typeAnnotation:t.type&&this.convertTypeAnnotation(t.type,t)})}case T.IndexSignature:return this.createNode(t,{type:C.TSIndexSignature,accessibility:xi(t),parameters:t.parameters.map(y=>this.convertChild(y)),readonly:Xe(T.ReadonlyKeyword,t),static:Xe(T.StaticKeyword,t),typeAnnotation:t.type&&this.convertTypeAnnotation(t.type,t)});case T.ConstructorType:return this.createNode(t,{type:C.TSConstructorType,abstract:Xe(T.AbstractKeyword,t),params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});case T.FunctionType:{let{modifiers:y}=t;y&&ge(this,me,Be).call(this,y[0],"A function type cannot have modifiers.")}case T.ConstructSignature:case T.CallSignature:{let y=t.kind===T.ConstructSignature?C.TSConstructSignatureDeclaration:t.kind===T.CallSignature?C.TSCallSignatureDeclaration:C.TSFunctionType;return this.createNode(t,{type:y,params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)})}case T.ExpressionWithTypeArguments:{let y=a.kind,g=y===T.InterfaceDeclaration?C.TSInterfaceHeritage:y===T.HeritageClause?C.TSClassImplements:C.TSInstantiationExpression;return this.createNode(t,{type:g,expression:this.convertChild(t.expression),typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t)})}case T.InterfaceDeclaration:{let y=t.heritageClauses??[],g=[];for(let I of y){I.token!==T.ExtendsKeyword&&ge(this,me,Be).call(this,I,I.token===T.ImplementsKeyword?"Interface declaration cannot have 'implements' clause.":"Unexpected token.");for(let re of I.types)g.push(this.convertChild(re,t))}let x=this.createNode(t,{type:C.TSInterfaceDeclaration,body:this.createNode(t,{type:C.TSInterfaceBody,range:[t.members.pos-1,t.end],body:t.members.map(I=>this.convertChild(I))}),declare:Xe(T.DeclareKeyword,t),extends:g,id:this.convertChild(t.name),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});return this.fixExports(t,x)}case T.TypePredicate:{let y=this.createNode(t,{type:C.TSTypePredicate,asserts:t.assertsModifier!=null,parameterName:this.convertChild(t.parameterName),typeAnnotation:null});return t.type&&(y.typeAnnotation=this.convertTypeAnnotation(t.type,t),y.typeAnnotation.loc=y.typeAnnotation.typeAnnotation.loc,y.typeAnnotation.range=y.typeAnnotation.typeAnnotation.range),y}case T.ImportType:{let y=$a(t,this.ast);if(t.isTypeOf){let x=ra(t.getFirstToken(),t,this.ast);y[0]=x.getStart(this.ast)}let g=this.createNode(t,{type:C.TSImportType,range:y,argument:this.convertChild(t.argument),attributes:this.convertImportAttributes(t.attributes),qualifier:this.convertChild(t.qualifier),typeArguments:t.typeArguments?this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t):null});return t.isTypeOf?this.createNode(t,{type:C.TSTypeQuery,exprName:g,typeArguments:void 0}):g}case T.EnumDeclaration:{let y=t.members.map(x=>this.convertChild(x)),g=this.createNode(t,ge(this,me,id).call(this,{type:C.TSEnumDeclaration,body:this.createNode(t,{type:C.TSEnumBody,range:[t.members.pos-1,t.end],members:y}),const:Xe(T.ConstKeyword,t),declare:Xe(T.DeclareKeyword,t),id:this.convertChild(t.name)},"members","'body.members'",t.members.map(x=>this.convertChild(x))));return this.fixExports(t,g)}case T.EnumMember:return this.createNode(t,{type:C.TSEnumMember,computed:t.name.kind===Ie.ComputedPropertyName,id:this.convertChild(t.name),initializer:t.initializer&&this.convertChild(t.initializer)});case T.ModuleDeclaration:{let y=Xe(T.DeclareKeyword,t),g=this.createNode(t,{type:C.TSModuleDeclaration,...(()=>{if(t.flags&on.GlobalAugmentation){let I=this.convertChild(t.name),re=this.convertChild(t.body);return(re==null||re.type===C.TSModuleDeclaration)&&ge(this,me,Vt).call(this,t.body??t,"Expected a valid module body"),I.type!==C.Identifier&&ge(this,me,Vt).call(this,t.name,"global module augmentation must have an Identifier id"),{body:re,declare:!1,global:!1,id:I,kind:"global"}}if(!(t.flags&on.Namespace)){let I=this.convertChild(t.body);return{kind:"module",...I!=null?{body:I}:{},declare:!1,global:!1,id:this.convertChild(t.name)}}t.body==null&&ge(this,me,Vt).call(this,t,"Expected a module body"),t.name.kind!==Ie.Identifier&&ge(this,me,Vt).call(this,t.name,"`namespace`s must have an Identifier id");let x=this.createNode(t.name,{type:C.Identifier,range:[t.name.getStart(this.ast),t.name.getEnd()],decorators:[],name:t.name.text,optional:!1,typeAnnotation:void 0});for(;t.body&&Ti(t.body)&&t.body.name;){t=t.body,y||(y=Xe(T.DeclareKeyword,t));let I=t.name,re=this.createNode(I,{type:C.Identifier,range:[I.getStart(this.ast),I.getEnd()],decorators:[],name:I.text,optional:!1,typeAnnotation:void 0});x=this.createNode(I,{type:C.TSQualifiedName,range:[x.range[0],re.range[1]],left:x,right:re})}return{body:this.convertChild(t.body),declare:!1,global:!1,id:x,kind:"namespace"}})()});return g.declare=y,t.flags&on.GlobalAugmentation&&(g.global=!0),this.fixExports(t,g)}case T.ParenthesizedType:return this.convertChild(t.type);case T.UnionType:return this.createNode(t,{type:C.TSUnionType,types:t.types.map(y=>this.convertChild(y))});case T.IntersectionType:return this.createNode(t,{type:C.TSIntersectionType,types:t.types.map(y=>this.convertChild(y))});case T.AsExpression:return this.createNode(t,{type:C.TSAsExpression,expression:this.convertChild(t.expression),typeAnnotation:this.convertChild(t.type)});case T.InferType:return this.createNode(t,{type:C.TSInferType,typeParameter:this.convertChild(t.typeParameter)});case T.LiteralType:return t.literal.kind===T.NullKeyword?this.createNode(t.literal,{type:C.TSNullKeyword}):this.createNode(t,{type:C.TSLiteralType,literal:this.convertChild(t.literal)});case T.TypeAssertionExpression:return this.createNode(t,{type:C.TSTypeAssertion,expression:this.convertChild(t.expression),typeAnnotation:this.convertChild(t.type)});case T.ImportEqualsDeclaration:return this.fixExports(t,this.createNode(t,{type:C.TSImportEqualsDeclaration,id:this.convertChild(t.name),importKind:t.isTypeOnly?"type":"value",moduleReference:this.convertChild(t.moduleReference)}));case T.ExternalModuleReference:return t.expression.kind!==T.StringLiteral&&ge(this,me,Be).call(this,t.expression,"String literal expected."),this.createNode(t,{type:C.TSExternalModuleReference,expression:this.convertChild(t.expression)});case T.NamespaceExportDeclaration:return this.createNode(t,{type:C.TSNamespaceExportDeclaration,id:this.convertChild(t.name)});case T.AbstractKeyword:return this.createNode(t,{type:C.TSAbstractKeyword});case T.TupleType:{let y=t.elements.map(g=>this.convertChild(g));return this.createNode(t,{type:C.TSTupleType,elementTypes:y})}case T.NamedTupleMember:{let y=this.createNode(t,{type:C.TSNamedTupleMember,elementType:this.convertChild(t.type,t),label:this.convertChild(t.name,t),optional:t.questionToken!=null});return t.dotDotDotToken?(y.range[0]=y.label.range[0],y.loc.start=y.label.loc.start,this.createNode(t,{type:C.TSRestType,typeAnnotation:y})):y}case T.OptionalType:return this.createNode(t,{type:C.TSOptionalType,typeAnnotation:this.convertChild(t.type)});case T.RestType:return this.createNode(t,{type:C.TSRestType,typeAnnotation:this.convertChild(t.type)});case T.TemplateLiteralType:{let y=this.createNode(t,{type:C.TSTemplateLiteralType,quasis:[this.convertChild(t.head)],types:[]});return t.templateSpans.forEach(g=>{y.types.push(this.convertChild(g.type)),y.quasis.push(this.convertChild(g.literal))}),y}case T.ClassStaticBlockDeclaration:return this.createNode(t,{type:C.StaticBlock,body:this.convertBodyExpressions(t.body.statements,t)});case T.AssertEntry:case T.ImportAttribute:return this.createNode(t,{type:C.ImportAttribute,key:this.convertChild(t.name),value:this.convertChild(t.value)});case T.SatisfiesExpression:return this.createNode(t,{type:C.TSSatisfiesExpression,expression:this.convertChild(t.expression),typeAnnotation:this.convertChild(t.type)});default:return this.deeplyCopy(t)}}createNode(t,a){let o=a;return o.range??(o.range=$a(t,this.ast)),o.loc??(o.loc=Qr(o.range,this.ast)),o&&this.options.shouldPreserveNodeMaps&&this.esTreeNodeToTSNodeMap.set(o,t),o}convertProgram(){return this.converter(this.ast)}deeplyCopy(t){t.kind===Ie.JSDocFunctionType&&ge(this,me,Be).call(this,t,"JSDoc types can only be used inside documentation comments.");let a=`TS${T[t.kind]}`;if(this.options.errorOnUnknownASTType&&!C[a])throw new Error(`Unknown AST_NODE_TYPE: "${a}"`);let o=this.createNode(t,{type:a});"type"in t&&(o.typeAnnotation=t.type&&"kind"in t.type&&o1(t.type)?this.convertTypeAnnotation(t.type,t):null),"typeArguments"in t&&(o.typeArguments=t.typeArguments&&"pos"in t.typeArguments?this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t):null),"typeParameters"in t&&(o.typeParameters=t.typeParameters&&"pos"in t.typeParameters?this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters):null);let m=na(t);m!=null&&m.length&&(o.decorators=m.map(A=>this.convertChild(A)));let v=new Set(["_children","decorators","end","flags","heritageClauses","illegalDecorators","jsDoc","kind","locals","localSymbol","modifierFlagsCache","modifiers","nextContainer","parent","pos","symbol","transformFlags","type","typeArguments","typeParameters"]);return Object.entries(t).filter(([A])=>!v.has(A)).forEach(([A,P])=>{Array.isArray(P)?o[A]=P.map(l=>this.convertChild(l)):P&&typeof P=="object"&&P.kind?o[A]=this.convertChild(P):o[A]=P}),o}fixExports(t,a){let m=Ti(t)&&!!(t.flags&on.Namespace)?Fh(t):er(t);if((m==null?void 0:m[0].kind)===T.ExportKeyword){this.registerTSNodeInNodeMap(t,a);let v=m[0],A=m[1],P=(A==null?void 0:A.kind)===T.DefaultKeyword,l=P?ra(A,this.ast,this.ast):ra(v,this.ast,this.ast);if(a.range[0]=l.getStart(this.ast),a.loc=Qr(a.range,this.ast),P)return this.createNode(t,{type:C.ExportDefaultDeclaration,range:[v.getStart(this.ast),a.range[1]],declaration:a,exportKind:"value"});let Q=a.type===C.TSInterfaceDeclaration||a.type===C.TSTypeAliasDeclaration,h="declare"in a&&a.declare;return this.createNode(t,ge(this,me,Qa).call(this,{type:C.ExportNamedDeclaration,range:[v.getStart(this.ast),a.range[1]],attributes:[],declaration:a,exportKind:Q||h?"type":"value",source:null,specifiers:[]},"assertions","attributes",!0))}return a}getASTMaps(){return{esTreeNodeToTSNodeMap:this.esTreeNodeToTSNodeMap,tsNodeToESTreeNodeMap:this.tsNodeToESTreeNodeMap}}registerTSNodeInNodeMap(t,a){a&&this.options.shouldPreserveNodeMaps&&!this.tsNodeToESTreeNodeMap.has(t)&&this.tsNodeToESTreeNodeMap.set(t,a)}};me=new WeakSet,rd=function(t,a){let o=a===Ie.ForInStatement?"for...in":"for...of";if(K1(t)){t.declarations.length!==1&&ge(this,me,Be).call(this,t,`Only a single variable declaration is allowed in a '${o}' statement.`);let m=t.declarations[0];m.initializer?ge(this,me,Be).call(this,m,`The variable declaration of a '${o}' statement cannot have an initializer.`):m.type&&ge(this,me,Be).call(this,m,`The variable declaration of a '${o}' statement cannot have a type annotation.`),a===Ie.ForInStatement&&t.flags&on.Using&&ge(this,me,Be).call(this,t,"The left-hand side of a 'for...in' statement cannot be a 'using' declaration.")}else!Jl(t)&&t.kind!==Ie.ObjectLiteralExpression&&t.kind!==Ie.ArrayLiteralExpression&&ge(this,me,Be).call(this,t,`The left-hand side of a '${o}' statement must be a variable or a property access.`)},Vh=function(t){if(!this.options.allowInvalidAST){Rh(t)&&ge(this,me,Be).call(this,t.illegalDecorators[0],"Decorators are not valid here.");for(let a of na(t,!0)??[])zh(t)||(ms(t)&&!td(t.body)?ge(this,me,Be).call(this,a,"A decorator can only decorate a method implementation, not an overload."):ge(this,me,Be).call(this,a,"Decorators are not valid here."));for(let a of er(t,!0)??[]){if(a.kind!==T.ReadonlyKeyword&&((t.kind===T.PropertySignature||t.kind===T.MethodSignature)&&ge(this,me,Be).call(this,a,`'${it(a.kind)}' modifier cannot appear on a type member`),t.kind===T.IndexSignature&&(a.kind!==T.StaticKeyword||!vi(t.parent))&&ge(this,me,Be).call(this,a,`'${it(a.kind)}' modifier cannot appear on an index signature`)),a.kind!==T.InKeyword&&a.kind!==T.OutKeyword&&a.kind!==T.ConstKeyword&&t.kind===T.TypeParameter&&ge(this,me,Be).call(this,a,`'${it(a.kind)}' modifier cannot appear on a type parameter`),(a.kind===T.InKeyword||a.kind===T.OutKeyword)&&(t.kind!==T.TypeParameter||!(vs(t.parent)||vi(t.parent)||Dl(t.parent)))&&ge(this,me,Be).call(this,a,`'${it(a.kind)}' modifier can only appear on a type parameter of a class, interface or type alias`),a.kind===T.ReadonlyKeyword&&t.kind!==T.PropertyDeclaration&&t.kind!==T.PropertySignature&&t.kind!==T.IndexSignature&&t.kind!==T.Parameter&&ge(this,me,Be).call(this,a,"'readonly' modifier can only appear on a property declaration or index signature."),a.kind===T.DeclareKeyword&&vi(t.parent)&&!Va(t)&&ge(this,me,Be).call(this,a,`'${it(a.kind)}' modifier cannot appear on class elements of this kind.`),a.kind===T.DeclareKeyword&&Ha(t)){let o=Ml(t.declarationList);(o==="using"||o==="await using")&&ge(this,me,Be).call(this,a,`'declare' modifier cannot appear on a '${o}' declaration.`)}if(a.kind===T.AbstractKeyword&&t.kind!==T.ClassDeclaration&&t.kind!==T.ConstructorType&&t.kind!==T.MethodDeclaration&&t.kind!==T.PropertyDeclaration&&t.kind!==T.GetAccessor&&t.kind!==T.SetAccessor&&ge(this,me,Be).call(this,a,`'${it(a.kind)}' modifier can only appear on a class, method, or property declaration.`),(a.kind===T.StaticKeyword||a.kind===T.PublicKeyword||a.kind===T.ProtectedKeyword||a.kind===T.PrivateKeyword)&&(t.parent.kind===T.ModuleBlock||t.parent.kind===T.SourceFile)&&ge(this,me,Be).call(this,a,`'${it(a.kind)}' modifier cannot appear on a module or namespace element.`),a.kind===T.AccessorKeyword&&t.kind!==T.PropertyDeclaration&&ge(this,me,Be).call(this,a,"'accessor' modifier can only appear on a property declaration."),a.kind===T.AsyncKeyword&&t.kind!==T.MethodDeclaration&&t.kind!==T.FunctionDeclaration&&t.kind!==T.FunctionExpression&&t.kind!==T.ArrowFunction&&ge(this,me,Be).call(this,a,"'async' modifier cannot be used here."),t.kind===T.Parameter&&(a.kind===T.StaticKeyword||a.kind===T.ExportKeyword||a.kind===T.DeclareKeyword||a.kind===T.AsyncKeyword)&&ge(this,me,Be).call(this,a,`'${it(a.kind)}' modifier cannot appear on a parameter.`),a.kind===T.PublicKeyword||a.kind===T.ProtectedKeyword||a.kind===T.PrivateKeyword)for(let o of er(t)??[])o!==a&&(o.kind===T.PublicKeyword||o.kind===T.ProtectedKeyword||o.kind===T.PrivateKeyword)&&ge(this,me,Be).call(this,o,"Accessibility modifier already seen.");if(t.kind===T.Parameter&&(a.kind===T.PublicKeyword||a.kind===T.PrivateKeyword||a.kind===T.ProtectedKeyword||a.kind===T.ReadonlyKeyword||a.kind===T.OverrideKeyword)){let o=qh(t);o.kind===T.Constructor&&td(o.body)||ge(this,me,Be).call(this,a,"A parameter property is only allowed in a constructor implementation.")}}}},Be=function(t,a){let o,m;throw typeof t=="number"?o=m=t:(o=t.getStart(this.ast),m=t.getEnd()),ed(a,this.ast,o,m)},Vt=function(t,a){this.options.allowInvalidAST||ge(this,me,Be).call(this,t,a)},Qa=function(t,a,o,m=!1){let v=m;return Object.defineProperty(t,a,{configurable:!0,get:this.options.suppressDeprecatedPropertyWarnings?()=>t[o]:()=>(v||((void 0)(`The '${a}' property is deprecated on ${t.type} nodes. Use '${o}' instead. See https://typescript-eslint.io/troubleshooting/faqs/general#the-key-property-is-deprecated-on-type-nodes-use-key-instead-warnings.`,"DeprecationWarning"),v=!0),t[o]),set(A){Object.defineProperty(t,a,{enumerable:!0,value:A,writable:!0})}}),t},id=function(t,a,o,m){let v=!1;return Object.defineProperty(t,a,{configurable:!0,get:this.options.suppressDeprecatedPropertyWarnings?()=>m:()=>(v||((void 0)(`The '${a}' property is deprecated on ${t.type} nodes. Use ${o} instead. See https://typescript-eslint.io/troubleshooting/faqs/general#the-key-property-is-deprecated-on-type-nodes-use-key-instead-warnings.`,"DeprecationWarning"),v=!0),m),set(A){Object.defineProperty(t,a,{enumerable:!0,value:A,writable:!0})}}),t};function wv(e,t,a=e.getSourceFile()){let o=[];for(;;){if(df(e.kind))t(e);else{let m=e.getChildren(a);if(m.length===1){e=m[0];continue}for(let v=m.length-1;v>=0;--v)o.push(m[v])}if(o.length===0)break;e=o.pop()}}function Gh(e,t,a=e.getSourceFile()){let o=a.text,m=a.languageVariant!==Tl.JSX;return wv(e,A=>{if(A.pos!==A.end&&(A.kind!==Ie.JsxText&&Hm(o,A.pos===0?(_f(o)??"").length:A.pos,v),m||kv(A)))return $m(o,A.end,v)},a);function v(A,P,l){t(o,{end:P,kind:l,pos:A})}}function kv(e){switch(e.kind){case Ie.CloseBraceToken:return e.parent.kind!==Ie.JsxExpression||!_d(e.parent.parent);case Ie.GreaterThanToken:switch(e.parent.kind){case Ie.JsxClosingElement:case Ie.JsxClosingFragment:return!_d(e.parent.parent.parent);case Ie.JsxOpeningElement:return e.end!==e.parent.end;case Ie.JsxOpeningFragment:return!1;case Ie.JsxSelfClosingElement:return e.end!==e.parent.end||!_d(e.parent.parent)}}return!0}function _d(e){return e.kind===Ie.JsxElement||e.kind===Ie.JsxFragment}var[YT,XT]=wm.split(".").map(e=>Number.parseInt(e,10));var HT=nn.Intrinsic??nn.Any|nn.Unknown|nn.String|nn.Number|nn.BigInt|nn.Boolean|nn.BooleanLiteral|nn.ESSymbol|nn.Void|nn.Undefined|nn.Null|nn.Never|nn.NonPrimitive;function Yh(e,t){let a=[];return Gh(e,(o,m)=>{let v=m.kind===Ie.SingleLineCommentTrivia?Rt.Line:Rt.Block,A=[m.pos,m.end],P=Qr(A,e),l=A[0]+2,Q=m.kind===Ie.SingleLineCommentTrivia?A[1]-l:A[1]-l-2;a.push({type:v,loc:P,range:A,value:t.slice(l,l+Q)})},e),a}var Xh=()=>{};function Hh(e,t,a){let{parseDiagnostics:o}=e;if(o.length)throw ad(o[0]);let m=new Ll(e,{allowInvalidAST:t.allowInvalidAST,errorOnUnknownASTType:t.errorOnUnknownASTType,shouldPreserveNodeMaps:a,suppressDeprecatedPropertyWarnings:t.suppressDeprecatedPropertyWarnings}),v=m.convertProgram();return(!t.range||!t.loc)&&Xh(v,{enter:P=>{t.range||delete P.range,t.loc||delete P.loc}}),t.tokens&&(v.tokens=jh(e)),t.comment&&(v.comments=Yh(e,t.codeFullText)),{astMaps:m.getASTMaps(),estree:v}}function jl(e){if(typeof e!="object"||e==null)return!1;let t=e;return t.kind===Ie.SourceFile&&typeof t.getFullText=="function"}var Iv=function(e){return e&&e.__esModule?e:{default:e}};var Ov=Iv({extname:e=>"."+e.split(".").pop()});function Qh(e,t){switch(Ov.default.extname(e).toLowerCase()){case Nn.Cjs:case Nn.Js:case Nn.Mjs:return Dr.JS;case Nn.Cts:case Nn.Mts:case Nn.Ts:return Dr.TS;case Nn.Json:return Dr.JSON;case Nn.Jsx:return Dr.JSX;case Nn.Tsx:return Dr.TSX;default:return t?Dr.TSX:Dr.TS}}var Jv={default:Ia},Lv=(0,Jv.default)("typescript-eslint:typescript-estree:create-program:createSourceFile");function Kh(e){return Lv("Getting AST without type information in %s mode for: %s",e.jsx?"TSX":"TS",e.filePath),jl(e.code)?e.code:dh(e.filePath,e.codeFullText,{jsDocParsingMode:e.jsDocParsingMode,languageVersion:ys.Latest,setExternalModuleIndicator:e.setExternalModuleIndicator},!0,Qh(e.filePath,e.jsx))}var Zh=()=>{};var e0=e=>e;var t0=class{};var r0=()=>!1;var i0=()=>{};var Xv=function(e){return e&&e.__esModule?e:{default:e}};var sd={default:Ia},Hv=Xv({extname:e=>"."+e.split(".").pop()}),$v=(0,sd.default)("typescript-eslint:typescript-estree:parseSettings:createParseSettings"),Qv,Kv=null,a0,_0,s0,o0,xs={ParseAll:(a0=Ga)==null?void 0:a0.ParseAll,ParseForTypeErrors:(_0=Ga)==null?void 0:_0.ParseForTypeErrors,ParseForTypeInfo:(s0=Ga)==null?void 0:s0.ParseForTypeInfo,ParseNone:(o0=Ga)==null?void 0:o0.ParseNone};function c0(e,t={}){var h;let a=Zv(e),o=r0(t),m=typeof t.tsconfigRootDir=="string"?t.tsconfigRootDir:"/prettier-security-dirname-placeholder",v=typeof t.loggerFn=="function",A=e0(typeof t.filePath=="string"&&t.filePath!==""?t.filePath:e4(t.jsx),m),P=Hv.default.extname(A).toLowerCase(),l=(()=>{switch(t.jsDocParsingMode){case"all":return xs.ParseAll;case"none":return xs.ParseNone;case"type-info":return xs.ParseForTypeInfo;default:return xs.ParseAll}})(),Q={loc:t.loc===!0,range:t.range===!0,allowInvalidAST:t.allowInvalidAST===!0,code:e,codeFullText:a,comment:t.comment===!0,comments:[],debugLevel:t.debugLevel===!0?new Set(["typescript-eslint"]):Array.isArray(t.debugLevel)?new Set(t.debugLevel):new Set,errorOnTypeScriptSyntacticAndSemanticIssues:!1,errorOnUnknownASTType:t.errorOnUnknownASTType===!0,extraFileExtensions:Array.isArray(t.extraFileExtensions)&&t.extraFileExtensions.every(y=>typeof y=="string")?t.extraFileExtensions:[],filePath:A,jsDocParsingMode:l,jsx:t.jsx===!0,log:typeof t.loggerFn=="function"?t.loggerFn:t.loggerFn===!1?()=>{}:console.log,preserveNodeMaps:t.preserveNodeMaps!==!1,programs:Array.isArray(t.programs)?t.programs:null,projects:new Map,projectService:t.projectService||t.project&&t.projectService!==!1&&(void 0).env.TYPESCRIPT_ESLINT_PROJECT_SERVICE==="true"?Kv??(Kv=Zh(t.projectService,l,m)):void 0,setExternalModuleIndicator:t.sourceType==="module"||t.sourceType==null&&P===Nn.Mjs||t.sourceType==null&&P===Nn.Mts?y=>{y.externalModuleIndicator=!0}:void 0,singleRun:o,suppressDeprecatedPropertyWarnings:t.suppressDeprecatedPropertyWarnings??!0,tokens:t.tokens===!0?[]:null,tsconfigMatchCache:Qv??(Qv=new t0(o?"Infinity":((h=t.cacheLifetime)==null?void 0:h.glob)??void 0)),tsconfigRootDir:m};if(Q.debugLevel.size>0){let y=[];Q.debugLevel.has("typescript-eslint")&&y.push("typescript-eslint:*"),(Q.debugLevel.has("eslint")||sd.default.enabled("eslint:*,-eslint:code-path"))&&y.push("eslint:*,-eslint:code-path"),sd.default.enable(y.join(","))}if(Array.isArray(t.programs)){if(!t.programs.length)throw new Error("You have set parserOptions.programs to an empty array. This will cause all files to not be found in existing programs. Either provide one or more existing TypeScript Program instances in the array, or remove the parserOptions.programs setting.");$v("parserOptions.programs was provided, so parserOptions.project will be ignored.")}return!Q.programs&&!Q.projectService&&(Q.projects=new Map),t.jsDocParsingMode==null&&Q.projects.size===0&&Q.programs==null&&Q.projectService==null&&(Q.jsDocParsingMode=xs.ParseNone),i0(Q,v),Q}function Zv(e){return jl(e)?e.getFullText(e):typeof e=="string"?e:String(e)}function e4(e){return e?"estree.tsx":"estree.ts"}var i4={default:Ia},ux=(0,i4.default)("typescript-eslint:typescript-estree:parser");function l0(e,t){let{ast:a}=a4(e,t,!1);return a}function a4(e,t,a){let o=c0(e,t);if(t!=null&&t.errorOnTypeScriptSyntacticAndSemanticIssues)throw new Error('"errorOnTypeScriptSyntacticAndSemanticIssues" is only supported for parseAndGenerateServices()');let m=Kh(o),{astMaps:v,estree:A}=Hh(m,o,a);return{ast:A,esTreeNodeToTSNodeMap:v.esTreeNodeToTSNodeMap,tsNodeToESTreeNodeMap:v.tsNodeToESTreeNodeMap}}function _4(e,t){let a=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(a,t)}var u0=_4;function s4(e){let t=[];for(let a of e)try{return a()}catch(o){t.push(o)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var p0=s4;var o4=(e,t,a)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[a<0?t.length+a:a]:t.at(a)},od=o4;function c4(e){return Array.isArray(e)&&e.length>0}var f0=c4;function tr(e){var o,m,v;let t=((o=e.range)==null?void 0:o[0])??e.start,a=(v=((m=e.declaration)==null?void 0:m.decorators)??e.decorators)==null?void 0:v[0];return a?Math.min(tr(a),t):t}function Kr(e){var t;return((t=e.range)==null?void 0:t[1])??e.end}function l4(e){let t=new Set(e);return a=>t.has(a==null?void 0:a.type)}var d0=l4;var u4=d0(["Block","CommentBlock","MultiLine"]),Ss=u4;function p4(e){let t=`*${e.value}*`.split(` +`);return t.length>1&&t.every(a=>a.trimStart()[0]==="*")}var cd=p4;function f4(e){return Ss(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(e.value)}var m0=f4;var ws=null;function ks(e){if(ws!==null&&typeof ws.property){let t=ws;return ws=ks.prototype=null,t}return ws=ks.prototype=e??Object.create(null),new ks}var d4=10;for(let e=0;e<=d4;e++)ks();function ld(e){return ks(e)}function m4(e,t="type"){ld(e);function a(o){let m=o[t],v=e[m];if(!Array.isArray(v))throw Object.assign(new Error(`Missing visitor keys for '${m}'.`),{node:o});return v}return a}var h0=m4;var y0={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","typeParameters","params","predicate","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:["body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],ImportExpression:["source","options"],MetaProperty:["meta","property"],ClassMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","typeParameters","quasi","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["decorators","variance","key","typeAnnotation","value"],ClassAccessorProperty:["decorators","key","typeAnnotation","value"],ClassPrivateProperty:["decorators","variance","key","typeAnnotation","value"],ClassPrivateMethod:["decorators","key","typeParameters","params","returnType","body"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source","attributes"],DeclareExportAllDeclaration:["source","attributes"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","this","params","rest","returnType"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["variance","id","key","value"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["qualification","id"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","typeParameters","typeArguments","attributes"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","nameType","typeAnnotation"],TSTemplateLiteralType:["quasis","types"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumBody:["members"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","options","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],AsConstExpression:["expression"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:["name","typeAnnotation"],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclareEnum:["id","body"],DeclareHook:["id"],DeclareNamespace:["id","body"],EnumBigIntBody:["members"],EnumBigIntMember:["id","init"],HookDeclaration:["id","params","body","typeParameters","returnType"],HookTypeAnnotation:["params","returnType","rest","typeParameters"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],SatisfiesExpression:["expression","typeAnnotation"]};var h4=h0(y0),g0=h4;function ud(e,t){if(!(e!==null&&typeof e=="object"))return e;if(Array.isArray(e)){for(let o=0;o{var A;(A=v.leadingComments)!=null&&A.some(m0)&&m.add(tr(v))}),e=Rl(e,v=>{if(v.type==="ParenthesizedExpression"){let{expression:A}=v;if(A.type==="TypeCastExpression")return A.range=[...v.range],A;let P=tr(v);if(!m.has(P))return A.extra={...A.extra,parenthesized:!0},A}})}if(e=Rl(e,m=>{switch(m.type){case"LogicalExpression":if(b0(m))return pd(m);break;case"VariableDeclaration":{let v=od(!1,m.declarations,-1);v!=null&&v.init&&o[Kr(v)]!==";"&&(m.range=[tr(m),Kr(v)]);break}case"TSParenthesizedType":return m.typeAnnotation;case"TSTypeParameter":if(typeof m.name=="string"){let v=tr(m);m.name={type:"Identifier",name:m.name,range:[v,v+m.name.length]}}break;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"TSUnionType":case"TSIntersectionType":if(m.types.length===1)return m.types[0];break}}),f0(e.comments)){let m=od(!1,e.comments,-1);for(let v=e.comments.length-2;v>=0;v--){let A=e.comments[v];Kr(A)===tr(m)&&Ss(A)&&Ss(m)&&cd(A)&&cd(m)&&(e.comments.splice(v+1,1),A.value+="*//*"+m.value,A.range=[tr(A),Kr(m)]),m=A}}return e.type==="Program"&&(e.range=[0,o.length]),e}function b0(e){return e.type==="LogicalExpression"&&e.right.type==="LogicalExpression"&&e.operator===e.right.operator}function pd(e){return b0(e)?pd({type:"LogicalExpression",operator:e.operator,left:pd({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[tr(e.left),Kr(e.right.left)]}),right:e.right.right,range:[tr(e),Kr(e)]}):e}var v0=y4;var g4=/\*\/$/,b4=/^\/\*\*?/,v4=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,T4=/(^|\s+)\/\/([^\n\r]*)/g,T0=/^(\r?\n)+/,x4=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,x0=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,S4=/(\r?\n|^) *\* ?/g,w4=[];function S0(e){let t=e.match(v4);return t?t[0].trimStart():""}function w0(e){let t=` +`;e=Sr(!1,e.replace(b4,"").replace(g4,""),S4,"$1");let a="";for(;a!==e;)a=e,e=Sr(!1,e,x4,`${t}$1 $2${t}`);e=e.replace(T0,"").trimEnd();let o=Object.create(null),m=Sr(!1,e,x0,"").replace(T0,"").trimEnd(),v;for(;v=x0.exec(e);){let A=Sr(!1,v[2],T4,"");if(typeof o[v[1]]=="string"||Array.isArray(o[v[1]])){let P=o[v[1]];o[v[1]]=[...w4,...Array.isArray(P)?P:[P],A]}else o[v[1]]=A}return{comments:m,pragmas:o}}function k4(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(` +`);return t===-1?e:e.slice(0,t)}var k0=k4;function E4(e){let t=k0(e);t&&(e=e.slice(t.length+1));let a=S0(e),{pragmas:o,comments:m}=w0(a);return{shebang:t,text:e,pragmas:o,comments:m}}function E0(e){let{pragmas:t}=E4(e);return Object.prototype.hasOwnProperty.call(t,"prettier")||Object.prototype.hasOwnProperty.call(t,"format")}function A4(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:E0,locStart:tr,locEnd:Kr,...e}}var A0=A4;function C4(e){let{filepath:t}=e;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs")||t.endsWith(".cts"))return"script";if(t.endsWith(".mjs")||t.endsWith(".mts"))return"module"}}var C0=C4;function D4(e){return e.charAt(0)==="#"&&e.charAt(1)==="!"?"//"+e.slice(2):e}var D0=D4;var P4={loc:!0,range:!0,comment:!0,tokens:!0,loggerFn:!1,project:!1,jsDocParsingMode:"none",suppressDeprecatedPropertyWarnings:!0};function N4(e){if(!(e!=null&&e.location))return e;let{message:t,location:{start:a,end:o}}=e;return u0(t,{loc:{start:{line:a.line,column:a.column+1},end:{line:o.line,column:o.column+1}},cause:e})}var I4=e=>/\.(?:js|mjs|cjs|jsx|ts|mts|cts|tsx)$/iu.test(e);function O4(e,t){let a=t==null?void 0:t.filepath,o=[{...P4,filePath:a}],m=C0(t);if(m?o=o.map(A=>({...A,sourceType:m})):o=["module","script"].flatMap(P=>o.map(l=>({...l,sourceType:P}))),a&&I4(a))return o;let v=J4(e);return[v,!v].flatMap(A=>o.map(P=>({...P,jsx:A})))}function M4(e,t={}){let a=D0(e),o=O4(e,t),m;try{m=p0(o.map(v=>()=>l0(a,v)))}catch({errors:[v]}){throw N4(v)}return v0(m,{text:e})}function J4(e){return new RegExp(["(?:^[^\"'`]*)"].join(""),"mu").test(e)}var L4=A0(M4);var uS=dd;export{uS as default,fd as parsers}; diff --git a/node_modules/prettier/plugins/yaml.d.ts b/node_modules/prettier/plugins/yaml.d.ts new file mode 100644 index 0000000..a0110d4 --- /dev/null +++ b/node_modules/prettier/plugins/yaml.d.ts @@ -0,0 +1,5 @@ +import { Parser } from "../index.js"; + +export declare const parsers: { + yaml: Parser; +}; diff --git a/node_modules/prettier/plugins/yaml.js b/node_modules/prettier/plugins/yaml.js new file mode 100644 index 0000000..8625774 --- /dev/null +++ b/node_modules/prettier/plugins/yaml.js @@ -0,0 +1,161 @@ +(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.yaml=e()}})(function(){"use strict";var Ti=Object.create;var yt=Object.defineProperty;var Ci=Object.getOwnPropertyDescriptor;var Mi=Object.getOwnPropertyNames;var ki=Object.getPrototypeOf,vi=Object.prototype.hasOwnProperty;var te=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),nr=(t,e)=>{for(var n in e)yt(t,n,{get:e[n],enumerable:!0})},rr=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Mi(e))!vi.call(t,s)&&s!==n&&yt(t,s,{get:()=>e[s],enumerable:!(r=Ci(e,s))||r.enumerable});return t};var sr=(t,e,n)=>(n=t!=null?Ti(ki(t)):{},rr(e||!t||!t.__esModule?yt(n,"default",{value:t,enumerable:!0}):n,t)),Ii=t=>rr(yt({},"__esModule",{value:!0}),t);var le=te(U=>{"use strict";var re={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},lt={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},Ao="tag:yaml.org,2002:",To={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function Ps(t){let e=[0],n=t.indexOf(` +`);for(;n!==-1;)n+=1,e.push(n),n=t.indexOf(` +`,n);return e}function _s(t){let e,n;return typeof t=="string"?(e=Ps(t),n=t):(Array.isArray(t)&&(t=t[0]),t&&t.context&&(t.lineStarts||(t.lineStarts=Ps(t.context.src)),e=t.lineStarts,n=t.context.src)),{lineStarts:e,src:n}}function Tn(t,e){if(typeof t!="number"||t<0)return null;let{lineStarts:n,src:r}=_s(e);if(!n||!r||t>r.length)return null;for(let i=0;i=1)||t>n.length)return null;let s=n[t-1],i=n[t];for(;i&&i>s&&r[i-1]===` +`;)--i;return r.slice(s,i)}function Mo({start:t,end:e},n,r=80){let s=Co(t.line,n);if(!s)return null;let{col:i}=t;if(s.length>r)if(i<=r-10)s=s.substr(0,r-1)+"\u2026";else{let f=Math.round(r/2);s.length>i+f&&(s=s.substr(0,i+f-1)+"\u2026"),i-=s.length-r,s="\u2026"+s.substr(1-r)}let o=1,a="";e&&(e.line===t.line&&i+(e.col-t.col)<=r+1?o=e.col-t.col:(o=Math.min(s.length+1,r)-i,a="\u2026"));let c=i>1?" ".repeat(i-1):"",l="^".repeat(o);return`${s} +${c}${l}${a}`}var Be=class t{static copy(e){return new t(e.start,e.end)}constructor(e,n){this.start=e,this.end=n||e}isEmpty(){return typeof this.start!="number"||!this.end||this.end<=this.start}setOrigRange(e,n){let{start:r,end:s}=this;if(e.length===0||s<=e[0])return this.origStart=r,this.origEnd=s,n;let i=n;for(;ir);)++i;this.origStart=r+i;let o=i;for(;i=s);)++i;return this.origEnd=s+i,o}},se=class t{static addStringTerminator(e,n,r){if(r[r.length-1]===` +`)return r;let s=t.endOfWhiteSpace(e,n);return s>=e.length||e[s]===` +`?r+` +`:r}static atDocumentBoundary(e,n,r){let s=e[n];if(!s)return!0;let i=e[n-1];if(i&&i!==` +`)return!1;if(r){if(s!==r)return!1}else if(s!==re.DIRECTIVES_END&&s!==re.DOCUMENT_END)return!1;let o=e[n+1],a=e[n+2];if(o!==s||a!==s)return!1;let c=e[n+3];return!c||c===` +`||c===" "||c===" "}static endOfIdentifier(e,n){let r=e[n],s=r==="<",i=s?[` +`," "," ",">"]:[` +`," "," ","[","]","{","}",","];for(;r&&i.indexOf(r)===-1;)r=e[n+=1];return s&&r===">"&&(n+=1),n}static endOfIndent(e,n){let r=e[n];for(;r===" ";)r=e[n+=1];return n}static endOfLine(e,n){let r=e[n];for(;r&&r!==` +`;)r=e[n+=1];return n}static endOfWhiteSpace(e,n){let r=e[n];for(;r===" "||r===" ";)r=e[n+=1];return n}static startOfLine(e,n){let r=e[n-1];if(r===` +`)return n;for(;r&&r!==` +`;)r=e[n-=1];return n+1}static endOfBlockIndent(e,n,r){let s=t.endOfIndent(e,r);if(s>r+n)return s;{let i=t.endOfWhiteSpace(e,s),o=e[i];if(!o||o===` +`)return i}return null}static atBlank(e,n,r){let s=e[n];return s===` +`||s===" "||s===" "||r&&!s}static nextNodeIsIndented(e,n,r){return!e||n<0?!1:n>0?!0:r&&e==="-"}static normalizeOffset(e,n){let r=e[n];return r?r!==` +`&&e[n-1]===` +`?n-1:t.endOfWhiteSpace(e,n):n}static foldNewline(e,n,r){let s=0,i=!1,o="",a=e[n+1];for(;a===" "||a===" "||a===` +`;){switch(a){case` +`:s=0,n+=1,o+=` +`;break;case" ":s<=r&&(i=!0),n=t.endOfWhiteSpace(e,n+2)-1;break;case" ":s+=1,n+=1;break}a=e[n+1]}return o||(o=" "),a&&s<=r&&(i=!0),{fold:o,offset:n,error:i}}constructor(e,n,r){Object.defineProperty(this,"context",{value:r||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=n||[],this.type=e,this.value=null}getPropValue(e,n,r){if(!this.context)return null;let{src:s}=this.context,i=this.props[e];return i&&s[i.start]===n?s.slice(i.start+(r?1:0),i.end):null}get anchor(){for(let e=0;e0?e.join(` +`):null}commentHasRequiredWhitespace(e){let{src:n}=this.context;if(this.header&&e===this.header.end||!this.valueRange)return!1;let{end:r}=this.valueRange;return e!==r||t.atBlank(n,r-1)}get hasComment(){if(this.context){let{src:e}=this.context;for(let n=0;nr.setOrigRange(e,n)),n}toString(){let{context:{src:e},range:n,value:r}=this;if(r!=null)return r;let s=e.slice(n.start,n.end);return t.addStringTerminator(e,n.end,s)}},ye=class extends Error{constructor(e,n,r){if(!r||!(n instanceof se))throw new Error(`Invalid arguments for new ${e}`);super(),this.name=e,this.message=r,this.source=n}makePretty(){if(!this.source)return;this.nodeType=this.source.type;let e=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new Be(this.offset,this.offset+1);let n=e&&Tn(this.offset,e);if(n){let r={line:n.line,col:n.col+1};this.linePos={start:n,end:r}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){let{line:n,col:r}=this.linePos.start;this.message+=` at line ${n}, column ${r}`;let s=e&&Mo(this.linePos,e);s&&(this.message+=`: + +${s} +`)}delete this.source}},Cn=class extends ye{constructor(e,n){super("YAMLReferenceError",e,n)}},ft=class extends ye{constructor(e,n){super("YAMLSemanticError",e,n)}},Mn=class extends ye{constructor(e,n){super("YAMLSyntaxError",e,n)}},kn=class extends ye{constructor(e,n){super("YAMLWarning",e,n)}};function ko(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var vn=class t extends se{static endOfLine(e,n,r){let s=e[n],i=n;for(;s&&s!==` +`&&!(r&&(s==="["||s==="]"||s==="{"||s==="}"||s===","));){let o=e[i+1];if(s===":"&&(!o||o===` +`||o===" "||o===" "||r&&o===",")||(s===" "||s===" ")&&o==="#")break;i+=1,s=o}return i}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:n}=this.valueRange,{src:r}=this.context,s=r[n-1];for(;el?r.slice(l,a+1):c)}else i+=c}let o=r[e];switch(o){case" ":{let a="Plain value cannot start with a tab character";return{errors:[new ft(this,a)],str:i}}case"@":case"`":{let a=`Plain value cannot start with reserved character ${o}`;return{errors:[new ft(this,a)],str:i}}default:return i}}parseBlockValue(e){let{indent:n,inFlow:r,src:s}=this.context,i=e,o=e;for(let a=s[i];a===` +`&&!se.atDocumentBoundary(s,i+1);a=s[i]){let c=se.endOfBlockIndent(s,n,i+1);if(c===null||s[c]==="#")break;s[c]===` +`?i=c:(o=t.endOfLine(s,c,r),i=o)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=o,o}parse(e,n){this.context=e;let{inFlow:r,src:s}=e,i=n,o=s[i];return o&&o!=="#"&&o!==` +`&&(i=t.endOfLine(s,n,r)),this.valueRange=new Be(n,i),i=se.endOfWhiteSpace(s,i),i=this.parseComment(i),(!this.hasComment||this.valueRange.isEmpty())&&(i=this.parseBlockValue(i)),i}};U.Char=re;U.Node=se;U.PlainValue=vn;U.Range=Be;U.Type=lt;U.YAMLError=ye;U.YAMLReferenceError=Cn;U.YAMLSemanticError=ft;U.YAMLSyntaxError=Mn;U.YAMLWarning=kn;U._defineProperty=ko;U.defaultTagPrefix=Ao;U.defaultTags=To});var Rs=te(xs=>{"use strict";var u=le(),Se=class extends u.Node{constructor(){super(u.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(e,n){return this.context=e,this.range=new u.Range(n,n+1),n+1}},ut=class extends u.Node{constructor(e,n){super(e,n),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,{atLineStart:i,lineStart:o}=e;!i&&this.type===u.Type.SEQ_ITEM&&(this.error=new u.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));let a=i?n-o:e.indent,c=u.Node.endOfWhiteSpace(s,n+1),l=s[c],f=l==="#",m=[],d=null;for(;l===` +`||l==="#";){if(l==="#"){let h=u.Node.endOfLine(s,c+1);m.push(new u.Range(c,h)),c=h}else{i=!0,o=c+1;let h=u.Node.endOfWhiteSpace(s,o);s[h]===` +`&&m.length===0&&(d=new Se,o=d.parse({src:s},o)),c=u.Node.endOfIndent(s,o)}l=s[c]}if(u.Node.nextNodeIsIndented(l,c-(o+a),this.type!==u.Type.SEQ_ITEM)?this.node=r({atLineStart:i,inCollection:!1,indent:a,lineStart:o,parent:this},c):l&&o>n+1&&(c=o-1),this.node){if(d){let h=e.parent.items||e.parent.contents;h&&h.push(d)}m.length&&Array.prototype.push.apply(this.props,m),c=this.node.range.end}else if(f){let h=m[0];this.props.push(h),c=h.end}else c=u.Node.endOfLine(s,n+1);let y=this.node?this.node.valueRange.end:c;return this.valueRange=new u.Range(n,y),c}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.node?this.node.setOrigRanges(e,n):n}toString(){let{context:{src:e},node:n,range:r,value:s}=this;if(s!=null)return s;let i=n?e.slice(r.start,n.range.start)+String(n):e.slice(r.start,r.end);return u.Node.addStringTerminator(e,r.end,i)}},Ee=class extends u.Node{constructor(){super(u.Type.COMMENT)}parse(e,n){this.context=e;let r=this.parseComment(n);return this.range=new u.Range(n,r),r}};function In(t){let e=t;for(;e instanceof ut;)e=e.node;if(!(e instanceof Bt))return null;let n=e.items.length,r=-1;for(let o=n-1;o>=0;--o){let a=e.items[o];if(a.type===u.Type.COMMENT){let{indent:c,lineStart:l}=a.context;if(c>0&&a.range.start>=l+c)break;r=o}else if(a.type===u.Type.BLANK_LINE)r=o;else break}if(r===-1)return null;let s=e.items.splice(r,n-r),i=s[0].range.start;for(;e.range.end=i,e.valueRange&&e.valueRange.end>i&&(e.valueRange.end=i),e!==t;)e=e.context.parent;return s}var Bt=class t extends u.Node{static nextContentHasIndent(e,n,r){let s=u.Node.endOfLine(e,n)+1;n=u.Node.endOfWhiteSpace(e,s);let i=e[n];return i?n>=s+r?!0:i!=="#"&&i!==` +`?!1:t.nextContentHasIndent(e,n,r):!1}constructor(e){super(e.type===u.Type.SEQ_ITEM?u.Type.SEQ:u.Type.MAP);for(let r=e.props.length-1;r>=0;--r)if(e.props[r].start0}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,i=u.Node.startOfLine(s,n),o=this.items[0];o.context.parent=this,this.valueRange=u.Range.copy(o.valueRange);let a=o.range.start-o.context.lineStart,c=n;c=u.Node.normalizeOffset(s,c);let l=s[c],f=u.Node.endOfWhiteSpace(s,i)===c,m=!1;for(;l;){for(;l===` +`||l==="#";){if(f&&l===` +`&&!m){let h=new Se;if(c=h.parse({src:s},c),this.valueRange.end=c,c>=s.length){l=null;break}this.items.push(h),c-=1}else if(l==="#"){if(c=s.length){l=null;break}}if(i=c+1,c=u.Node.endOfIndent(s,i),u.Node.atBlank(s,c)){let h=u.Node.endOfWhiteSpace(s,c),g=s[h];(!g||g===` +`||g==="#")&&(c=h)}l=s[c],f=!0}if(!l)break;if(c!==i+a&&(f||l!==":")){if(cn&&(c=i);break}else if(!this.error){let h="All collection items must start at the same column";this.error=new u.YAMLSyntaxError(this,h)}}if(o.type===u.Type.SEQ_ITEM){if(l!=="-"){i>n&&(c=i);break}}else if(l==="-"&&!this.error){let h=s[c+1];if(!h||h===` +`||h===" "||h===" "){let g="A collection cannot be both a mapping and a sequence";this.error=new u.YAMLSyntaxError(this,g)}}let d=r({atLineStart:f,inCollection:!0,indent:a,lineStart:i,parent:this},c);if(!d)return c;if(this.items.push(d),this.valueRange.end=d.valueRange.end,c=u.Node.normalizeOffset(s,d.range.end),l=s[c],f=!1,m=d.includesTrailingLines,l){let h=c-1,g=s[h];for(;g===" "||g===" ";)g=s[--h];g===` +`&&(i=h+1,f=!0)}let y=In(d);y&&Array.prototype.push.apply(this.items,y)}return c}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.items.forEach(r=>{n=r.setOrigRanges(e,n)}),n}toString(){let{context:{src:e},items:n,range:r,value:s}=this;if(s!=null)return s;let i=e.slice(r.start,n[0].range.start)+String(n[0]);for(let o=1;o0&&(this.contents=this.directives,this.directives=[]),i}return n[i]?(this.directivesEndMarker=new u.Range(i,i+3),i+3):(s?this.error=new u.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),i)}parseContents(e){let{parseNode:n,src:r}=this.context;this.contents||(this.contents=[]);let s=e;for(;r[s-1]==="-";)s-=1;let i=u.Node.endOfWhiteSpace(r,e),o=s===e;for(this.valueRange=new u.Range(i);!u.Node.atDocumentBoundary(r,i,u.Char.DOCUMENT_END);){switch(r[i]){case` +`:if(o){let a=new Se;i=a.parse({src:r},i),i{n=r.setOrigRanges(e,n)}),this.directivesEndMarker&&(n=this.directivesEndMarker.setOrigRange(e,n)),this.contents.forEach(r=>{n=r.setOrigRanges(e,n)}),this.documentEndMarker&&(n=this.documentEndMarker.setOrigRange(e,n)),n}toString(){let{contents:e,directives:n,value:r}=this;if(r!=null)return r;let s=n.join("");return e.length>0&&((n.length>0||e[0].type===u.Type.COMMENT)&&(s+=`--- +`),s+=e.join("")),s[s.length-1]!==` +`&&(s+=` +`),s}},xn=class extends u.Node{parse(e,n){this.context=e;let{src:r}=e,s=u.Node.endOfIdentifier(r,n+1);return this.valueRange=new u.Range(n+1,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}},fe={CLIP:"CLIP",KEEP:"KEEP",STRIP:"STRIP"},Rn=class extends u.Node{constructor(e,n){super(e,n),this.blockIndent=null,this.chomping=fe.CLIP,this.header=null}get includesTrailingLines(){return this.chomping===fe.KEEP}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:n}=this.valueRange,{indent:r,src:s}=this.context;if(this.valueRange.isEmpty())return"";let i=null,o=s[n-1];for(;o===` +`||o===" "||o===" ";){if(n-=1,n<=e){if(this.chomping===fe.KEEP)break;return""}o===` +`&&(i=n),o=s[n-1]}let a=n+1;i&&(this.chomping===fe.KEEP?(a=i,n=this.valueRange.end):n=i);let c=r+this.blockIndent,l=this.type===u.Type.BLOCK_FOLDED,f=!0,m="",d="",y=!1;for(let h=e;ha&&(a=m);r[l]===` +`?i=l:i=o=u.Node.endOfLine(r,l)}return this.chomping!==fe.KEEP&&(i=r[o]?o+1:o),this.valueRange=new u.Range(e+1,i),i}parse(e,n){this.context=e;let{src:r}=e,s=this.parseBlockHeader(n);return s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s=this.parseBlockValue(s),s}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.header?this.header.setOrigRange(e,n):n}},Dn=class extends u.Node{constructor(e,n){super(e,n),this.items=null}prevNodeIsJsonLike(e=this.items.length){let n=this.items[e-1];return!!n&&(n.jsonLike||n.type===u.Type.COMMENT&&this.prevNodeIsJsonLike(e-1))}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,{indent:i,lineStart:o}=e,a=s[n];this.items=[{char:a,offset:n}];let c=u.Node.endOfWhiteSpace(s,n+1);for(a=s[c];a&&a!=="]"&&a!=="}";){switch(a){case` +`:{o=c+1;let l=u.Node.endOfWhiteSpace(s,o);if(s[l]===` +`){let f=new Se;o=f.parse({src:s},o),this.items.push(f)}if(c=u.Node.endOfIndent(s,o),c<=o+i&&(a=s[c],c{if(r instanceof u.Node)n=r.setOrigRanges(e,n);else if(e.length===0)r.origOffset=r.offset;else{let s=n;for(;sr.offset);)++s;r.origOffset=r.offset+s,n=s}}),n}toString(){let{context:{src:e},items:n,range:r,value:s}=this;if(s!=null)return s;let i=n.filter(c=>c instanceof u.Node),o="",a=r.start;return i.forEach(c=>{let l=e.slice(a,c.range.start);a=c.range.end,o+=l+String(c),o[o.length-1]===` +`&&e[a-1]!==` +`&&e[a]===` +`&&(a+=1)}),o+=e.slice(a,r.end),u.Node.addStringTerminator(e,r.end,o)}},Yn=class t extends u.Node{static endOfQuote(e,n){let r=e[n];for(;r&&r!=='"';)n+=r==="\\"?2:1,r=e[n];return n+1}get strValue(){if(!this.valueRange||!this.context)return null;let e=[],{start:n,end:r}=this.valueRange,{indent:s,src:i}=this.context;i[r-1]!=='"'&&e.push(new u.YAMLSyntaxError(this,'Missing closing "quote'));let o="";for(let a=n+1;al?i.slice(l,a+1):c)}else o+=c}return e.length>0?{errors:e,str:o}:o}parseCharCode(e,n,r){let{src:s}=this.context,i=s.substr(e,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;return isNaN(a)?(r.push(new u.YAMLSyntaxError(this,`Invalid escape sequence ${s.substr(e-2,n+2)}`)),s.substr(e-2,n+2)):String.fromCodePoint(a)}parse(e,n){this.context=e;let{src:r}=e,s=t.endOfQuote(r,n+1);return this.valueRange=new u.Range(n,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}},$n=class t extends u.Node{static endOfQuote(e,n){let r=e[n];for(;r;)if(r==="'"){if(e[n+1]!=="'")break;r=e[n+=2]}else r=e[n+=1];return n+1}get strValue(){if(!this.valueRange||!this.context)return null;let e=[],{start:n,end:r}=this.valueRange,{indent:s,src:i}=this.context;i[r-1]!=="'"&&e.push(new u.YAMLSyntaxError(this,"Missing closing 'quote"));let o="";for(let a=n+1;al?i.slice(l,a+1):c)}else o+=c}return e.length>0?{errors:e,str:o}:o}parse(e,n){this.context=e;let{src:r}=e,s=t.endOfQuote(r,n+1);return this.valueRange=new u.Range(n,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}};function vo(t,e){switch(t){case u.Type.ALIAS:return new xn(t,e);case u.Type.BLOCK_FOLDED:case u.Type.BLOCK_LITERAL:return new Rn(t,e);case u.Type.FLOW_MAP:case u.Type.FLOW_SEQ:return new Dn(t,e);case u.Type.MAP_KEY:case u.Type.MAP_VALUE:case u.Type.SEQ_ITEM:return new ut(t,e);case u.Type.COMMENT:case u.Type.PLAIN:return new u.PlainValue(t,e);case u.Type.QUOTE_DOUBLE:return new Yn(t,e);case u.Type.QUOTE_SINGLE:return new $n(t,e);default:return null}}var Bn=class t{static parseType(e,n,r){switch(e[n]){case"*":return u.Type.ALIAS;case">":return u.Type.BLOCK_FOLDED;case"|":return u.Type.BLOCK_LITERAL;case"{":return u.Type.FLOW_MAP;case"[":return u.Type.FLOW_SEQ;case"?":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.MAP_KEY:u.Type.PLAIN;case":":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.MAP_VALUE:u.Type.PLAIN;case"-":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.SEQ_ITEM:u.Type.PLAIN;case'"':return u.Type.QUOTE_DOUBLE;case"'":return u.Type.QUOTE_SINGLE;default:return u.Type.PLAIN}}constructor(e={},{atLineStart:n,inCollection:r,inFlow:s,indent:i,lineStart:o,parent:a}={}){u._defineProperty(this,"parseNode",(c,l)=>{if(u.Node.atDocumentBoundary(this.src,l))return null;let f=new t(this,c),{props:m,type:d,valueStart:y}=f.parseProps(l),h=vo(d,m),g=h.parse(f,y);if(h.range=new u.Range(l,g),g<=l&&(h.error=new Error("Node#parse consumed no characters"),h.error.parseEnd=g,h.error.source=h,h.range.end=l+1),f.nodeStartsCollection(h)){!h.error&&!f.atLineStart&&f.parent.type===u.Type.DOCUMENT&&(h.error=new u.YAMLSyntaxError(h,"Block collection must not have preceding content here (e.g. directives-end indicator)"));let w=new Bt(h);return g=w.parse(new t(f),g),w.range=new u.Range(l,g),w}return h}),this.atLineStart=n??(e.atLineStart||!1),this.inCollection=r??(e.inCollection||!1),this.inFlow=s??(e.inFlow||!1),this.indent=i??e.indent,this.lineStart=o??e.lineStart,this.parent=a??(e.parent||{}),this.root=e.root,this.src=e.src}nodeStartsCollection(e){let{inCollection:n,inFlow:r,src:s}=this;if(n||r)return!1;if(e instanceof ut)return!0;let i=e.range.end;return s[i]===` +`||s[i-1]===` +`?!1:(i=u.Node.endOfWhiteSpace(s,i),s[i]===":")}parseProps(e){let{inFlow:n,parent:r,src:s}=this,i=[],o=!1;e=this.atLineStart?u.Node.endOfIndent(s,e):u.Node.endOfWhiteSpace(s,e);let a=s[e];for(;a===u.Char.ANCHOR||a===u.Char.COMMENT||a===u.Char.TAG||a===` +`;){if(a===` +`){let l=e,f;do f=l+1,l=u.Node.endOfIndent(s,f);while(s[l]===` +`);let m=l-(f+this.indent),d=r.type===u.Type.SEQ_ITEM&&r.context.atLineStart;if(s[l]!=="#"&&!u.Node.nextNodeIsIndented(s[l],m,!d))break;this.atLineStart=!0,this.lineStart=f,o=!1,e=l}else if(a===u.Char.COMMENT){let l=u.Node.endOfLine(s,e+1);i.push(new u.Range(e,l)),e=l}else{let l=u.Node.endOfIdentifier(s,e+1);a===u.Char.TAG&&s[l]===","&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(s.slice(e+1,l+13))&&(l=u.Node.endOfIdentifier(s,l+5)),i.push(new u.Range(e,l)),o=!0,e=u.Node.endOfWhiteSpace(s,l)}a=s[e]}o&&a===":"&&u.Node.atBlank(s,e+1,!0)&&(e-=1);let c=t.parseType(s,e,n);return{props:i,type:c,valueStart:e}}};function Io(t){let e=[];t.indexOf("\r")!==-1&&(t=t.replace(/\r\n?/g,(s,i)=>(s.length>1&&e.push(i),` +`)));let n=[],r=0;do{let s=new _n,i=new Bn({src:t});r=s.parse(i,r),n.push(s)}while(r{if(e.length===0)return!1;for(let i=1;in.join(`... +`),n}xs.parse=Io});var qe=te(k=>{"use strict";var p=le();function Po(t,e,n){return n?`#${n.replace(/[\s\S]^/gm,`$&${e}#`)} +${e}${t}`:t}function Fe(t,e,n){return n?n.indexOf(` +`)===-1?`${t} #${n}`:`${t} +`+n.replace(/^/gm,`${e||""}#`):t}var W=class{};function ue(t,e,n){if(Array.isArray(t))return t.map((r,s)=>ue(r,String(s),n));if(t&&typeof t.toJSON=="function"){let r=n&&n.anchors&&n.anchors.get(t);r&&(n.onCreate=i=>{r.res=i,delete n.onCreate});let s=t.toJSON(e,n);return r&&n.onCreate&&n.onCreate(s),s}return(!n||!n.keep)&&typeof t=="bigint"?Number(t):t}var P=class extends W{constructor(e){super(),this.value=e}toJSON(e,n){return n&&n.keep?this.value:ue(this.value,e,n)}toString(){return String(this.value)}};function Ds(t,e,n){let r=n;for(let s=e.length-1;s>=0;--s){let i=e[s];if(Number.isInteger(i)&&i>=0){let o=[];o[i]=r,r=o}else{let o={};Object.defineProperty(o,i,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=o}}return t.createNode(r,!1)}var Bs=t=>t==null||typeof t=="object"&&t[Symbol.iterator]().next().done,j=class t extends W{constructor(e){super(),p._defineProperty(this,"items",[]),this.schema=e}addIn(e,n){if(Bs(e))this.add(n);else{let[r,...s]=e,i=this.get(r,!0);if(i instanceof t)i.addIn(s,n);else if(i===void 0&&this.schema)this.set(r,Ds(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}deleteIn([e,...n]){if(n.length===0)return this.delete(e);let r=this.get(e,!0);if(r instanceof t)return r.deleteIn(n);throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`)}getIn([e,...n],r){let s=this.get(e,!0);return n.length===0?!r&&s instanceof P?s.value:s:s instanceof t?s.getIn(n,r):void 0}hasAllNullValues(){return this.items.every(e=>{if(!e||e.type!=="PAIR")return!1;let n=e.value;return n==null||n instanceof P&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn([e,...n]){if(n.length===0)return this.has(e);let r=this.get(e,!0);return r instanceof t?r.hasIn(n):!1}setIn([e,...n],r){if(n.length===0)this.set(e,r);else{let s=this.get(e,!0);if(s instanceof t)s.setIn(n,r);else if(s===void 0&&this.schema)this.set(e,Ds(this.schema,n,r));else throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`)}}toJSON(){return null}toString(e,{blockItem:n,flowChars:r,isMap:s,itemIndent:i},o,a){let{indent:c,indentStep:l,stringify:f}=e,m=this.type===p.Type.FLOW_MAP||this.type===p.Type.FLOW_SEQ||e.inFlow;m&&(i+=l);let d=s&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:d,indent:i,inFlow:m,type:null});let y=!1,h=!1,g=this.items.reduce((C,L,M)=>{let A;L&&(!y&&L.spaceBefore&&C.push({type:"comment",str:""}),L.commentBefore&&L.commentBefore.match(/^.*$/gm).forEach(Ai=>{C.push({type:"comment",str:`#${Ai}`})}),L.comment&&(A=L.comment),m&&(!y&&L.spaceBefore||L.commentBefore||L.comment||L.key&&(L.key.commentBefore||L.key.comment)||L.value&&(L.value.commentBefore||L.value.comment))&&(h=!0)),y=!1;let _=f(L,e,()=>A=null,()=>y=!0);return m&&!h&&_.includes(` +`)&&(h=!0),m&&MA.str);if(h||M.reduce((A,_)=>A+_.length+2,2)>t.maxFlowStringSingleLineLength){w=C;for(let A of M)w+=A?` +${l}${c}${A}`:` +`;w+=` +${c}${L}`}else w=`${C} ${M.join(" ")} ${L}`}else{let C=g.map(n);w=C.shift();for(let L of C)w+=L?` +${c}${L}`:` +`}return this.comment?(w+=` +`+this.comment.replace(/^/gm,`${c}#`),o&&o()):y&&a&&a(),w}};p._defineProperty(j,"maxFlowStringSingleLineLength",60);function Ft(t){let e=t instanceof P?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),Number.isInteger(e)&&e>=0?e:null}var pe=class extends j{add(e){this.items.push(e)}delete(e){let n=Ft(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){let r=Ft(e);if(typeof r!="number")return;let s=this.items[r];return!n&&s instanceof P?s.value:s}has(e){let n=Ft(e);return typeof n=="number"&&ns.type==="comment"?s.str:`- ${s.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(e.indent||"")+" "},n,r):JSON.stringify(this)}},_o=(t,e,n)=>e===null?"":typeof e!="object"?String(e):t instanceof W&&n&&n.doc?t.toString({anchors:Object.create(null),doc:n.doc,indent:"",indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(e),T=class t extends W{constructor(e,n=null){super(),this.key=e,this.value=n,this.type=t.Type.PAIR}get commentBefore(){return this.key instanceof W?this.key.commentBefore:void 0}set commentBefore(e){if(this.key==null&&(this.key=new P(null)),this.key instanceof W)this.key.commentBefore=e;else{let n="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(n)}}addToJSMap(e,n){let r=ue(this.key,"",e);if(n instanceof Map){let s=ue(this.value,r,e);n.set(r,s)}else if(n instanceof Set)n.add(r);else{let s=_o(this.key,r,e),i=ue(this.value,s,e);s in n?Object.defineProperty(n,s,{value:i,writable:!0,enumerable:!0,configurable:!0}):n[s]=i}return n}toJSON(e,n){let r=n&&n.mapAsMap?new Map:{};return this.addToJSMap(n,r)}toString(e,n,r){if(!e||!e.doc)return JSON.stringify(this);let{indent:s,indentSeq:i,simpleKeys:o}=e.doc.options,{key:a,value:c}=this,l=a instanceof W&&a.comment;if(o){if(l)throw new Error("With simple keys, key nodes cannot have comments");if(a instanceof j){let _="With simple keys, collection cannot be used as a key value";throw new Error(_)}}let f=!o&&(!a||l||(a instanceof W?a instanceof j||a.type===p.Type.BLOCK_FOLDED||a.type===p.Type.BLOCK_LITERAL:typeof a=="object")),{doc:m,indent:d,indentStep:y,stringify:h}=e;e=Object.assign({},e,{implicitKey:!f,indent:d+y});let g=!1,w=h(a,e,()=>l=null,()=>g=!0);if(w=Fe(w,e.indent,l),!f&&w.length>1024){if(o)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(e.allNullValues&&!o)return this.comment?(w=Fe(w,e.indent,this.comment),n&&n()):g&&!l&&r&&r(),e.inFlow&&!f?w:`? ${w}`;w=f?`? ${w} +${d}:`:`${w}:`,this.comment&&(w=Fe(w,e.indent,this.comment),n&&n());let C="",L=null;if(c instanceof W){if(c.spaceBefore&&(C=` +`),c.commentBefore){let _=c.commentBefore.replace(/^/gm,`${e.indent}#`);C+=` +${_}`}L=c.comment}else c&&typeof c=="object"&&(c=m.schema.createNode(c,!0));e.implicitKey=!1,!f&&!this.comment&&c instanceof P&&(e.indentAtStart=w.length+1),g=!1,!i&&s>=2&&!e.inFlow&&!f&&c instanceof pe&&c.type!==p.Type.FLOW_SEQ&&!c.tag&&!m.anchors.getName(c)&&(e.indent=e.indent.substr(2));let M=h(c,e,()=>L=null,()=>g=!0),A=" ";return C||this.comment?A=`${C} +${e.indent}`:!f&&c instanceof j?(!(M[0]==="["||M[0]==="{")||M.includes(` +`))&&(A=` +${e.indent}`):M[0]===` +`&&(A=""),g&&!L&&r&&r(),Fe(w+A+M,e.indent,L)}};p._defineProperty(T,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var qt=(t,e)=>{if(t instanceof be){let n=e.get(t.source);return n.count*n.aliasCount}else if(t instanceof j){let n=0;for(let r of t.items){let s=qt(r,e);s>n&&(n=s)}return n}else if(t instanceof T){let n=qt(t.key,e),r=qt(t.value,e);return Math.max(n,r)}return 1},be=class t extends W{static stringify({range:e,source:n},{anchors:r,doc:s,implicitKey:i,inStringifyKey:o}){let a=Object.keys(r).find(l=>r[l]===n);if(!a&&o&&(a=s.anchors.getName(n)||s.anchors.newName()),a)return`*${a}${i?" ":""}`;let c=s.anchors.getName(n)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${c} [${e}]`)}constructor(e){super(),this.source=e,this.type=p.Type.ALIAS}set tag(e){throw new Error("Alias nodes cannot have tags")}toJSON(e,n){if(!n)return ue(this.source,e,n);let{anchors:r,maxAliasCount:s}=n,i=r.get(this.source);if(!i||i.res===void 0){let o="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new p.YAMLReferenceError(this.cstNode,o):new ReferenceError(o)}if(s>=0&&(i.count+=1,i.aliasCount===0&&(i.aliasCount=qt(this.source,r)),i.count*i.aliasCount>s)){let o="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new p.YAMLReferenceError(this.cstNode,o):new ReferenceError(o)}return i.res}toString(e){return t.stringify(this,e)}};p._defineProperty(be,"default",!0);function pt(t,e){let n=e instanceof P?e.value:e;for(let r of t)if(r instanceof T&&(r.key===e||r.key===n||r.key&&r.key.value===n))return r}var mt=class extends j{add(e,n){e?e instanceof T||(e=new T(e.key||e,e.value)):e=new T(e);let r=pt(this.items,e.key),s=this.schema&&this.schema.sortMapEntries;if(r)if(n)r.value=e.value;else throw new Error(`Key ${e.key} already set`);else if(s){let i=this.items.findIndex(o=>s(e,o)<0);i===-1?this.items.push(e):this.items.splice(i,0,e)}else this.items.push(e)}delete(e){let n=pt(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){let r=pt(this.items,e),s=r&&r.value;return!n&&s instanceof P?s.value:s}has(e){return!!pt(this.items,e)}set(e,n){this.add(new T(e,n),!0)}toJSON(e,n,r){let s=r?new r:n&&n.mapAsMap?new Map:{};n&&n.onCreate&&n.onCreate(s);for(let i of this.items)i.addToJSMap(n,s);return s}toString(e,n,r){if(!e)return JSON.stringify(this);for(let s of this.items)if(!(s instanceof T))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return super.toString(e,{blockItem:s=>s.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},n,r)}},Fs="<<",Vt=class extends T{constructor(e){if(e instanceof T){let n=e.value;n instanceof pe||(n=new pe,n.items.push(e.value),n.range=e.value.range),super(e.key,n),this.range=e.range}else super(new P(Fs),new pe);this.type=T.Type.MERGE_PAIR}addToJSMap(e,n){for(let{source:r}of this.value.items){if(!(r instanceof mt))throw new Error("Merge sources must be maps");let s=r.toJSON(null,e,Map);for(let[i,o]of s)n instanceof Map?n.has(i)||n.set(i,o):n instanceof Set?n.add(i):Object.prototype.hasOwnProperty.call(n,i)||Object.defineProperty(n,i,{value:o,writable:!0,enumerable:!0,configurable:!0})}return n}toString(e,n){let r=this.value;if(r.items.length>1)return super.toString(e,n);this.value=r.items[0];let s=super.toString(e,n);return this.value=r,s}},xo={defaultType:p.Type.BLOCK_LITERAL,lineWidth:76},Ro={trueStr:"true",falseStr:"false"},Do={asBigInt:!1},Yo={nullStr:"null"},Ne={defaultType:p.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function qn(t,e,n){for(let{format:r,test:s,resolve:i}of e)if(s){let o=t.match(s);if(o){let a=i.apply(null,o);return a instanceof P||(a=new P(a)),r&&(a.format=r),a}}return n&&(t=n(t)),new P(t)}var qs="flow",Fn="block",Ut="quoted",Ys=(t,e)=>{let n=t[e+1];for(;n===" "||n===" ";){do n=t[e+=1];while(n&&n!==` +`);n=t[e+1]}return e};function Wt(t,e,n,{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}){if(!s||s<0)return t;let c=Math.max(1+i,1+s-e.length);if(t.length<=c)return t;let l=[],f={},m=s-e.length;typeof r=="number"&&(r>s-Math.max(2,i)?l.push(0):m=s-r);let d,y,h=!1,g=-1,w=-1,C=-1;n===Fn&&(g=Ys(t,g),g!==-1&&(m=g+c));for(let M;M=t[g+=1];){if(n===Ut&&M==="\\"){switch(w=g,t[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}C=g}if(M===` +`)n===Fn&&(g=Ys(t,g)),m=g+c,d=void 0;else{if(M===" "&&y&&y!==" "&&y!==` +`&&y!==" "){let A=t[g+1];A&&A!==" "&&A!==` +`&&A!==" "&&(d=g)}if(g>=m)if(d)l.push(d),m=d+c,d=void 0;else if(n===Ut){for(;y===" "||y===" ";)y=M,M=t[g+=1],h=!0;let A=g>C+1?g-2:w-1;if(f[A])return t;l.push(A),f[A]=!0,m=A+c,d=void 0}else h=!0}y=M}if(h&&a&&a(),l.length===0)return t;o&&o();let L=t.slice(0,l[0]);for(let M=0;Mt?Object.assign({indentAtStart:t},Ne.fold):Ne.fold,jt=t=>/^(%|---|\.\.\.)/m.test(t);function $o(t,e,n){if(!e||e<0)return!1;let r=e-n,s=t.length;if(s<=r)return!1;for(let i=0,o=0;ir)return!0;if(o=i+1,s-o<=r)return!1}return!0}function we(t,e){let{implicitKey:n}=e,{jsonEncoding:r,minMultiLineLength:s}=Ne.doubleQuoted,i=JSON.stringify(t);if(r)return i;let o=e.indent||(jt(t)?" ":""),a="",c=0;for(let l=0,f=i[l];f;f=i[++l])if(f===" "&&i[l+1]==="\\"&&i[l+2]==="n"&&(a+=i.slice(c,l)+"\\ ",l+=1,c=l,f="\\"),f==="\\")switch(i[l+1]){case"u":{a+=i.slice(c,l);let m=i.substr(l+2,4);switch(m){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:m.substr(0,2)==="00"?a+="\\x"+m.substr(2):a+=i.substr(l,6)}l+=5,c=l+1}break;case"n":if(n||i[l+2]==='"'||i.length";if(!n)return l+` +`;let f="",m="";if(n=n.replace(/[\n\t ]*$/,y=>{let h=y.indexOf(` +`);return h===-1?l+="-":(n===y||h!==y.length-1)&&(l+="+",i&&i()),m=y.replace(/\n$/,""),""}).replace(/^[\n ]*/,y=>{y.indexOf(" ")!==-1&&(l+=a);let h=y.match(/ +$/);return h?(f=y.slice(0,-h[0].length),h[0]):(f=y,"")}),m&&(m=m.replace(/\n+(?!\n|$)/g,`$&${o}`)),f&&(f=f.replace(/\n+/g,`$&${o}`)),t&&(l+=" #"+t.replace(/ ?[\r\n]+/g," "),s&&s()),!n)return`${l}${a} +${o}${m}`;if(c)return n=n.replace(/\n+/g,`$&${o}`),`${l} +${o}${f}${n}${m}`;n=n.replace(/\n+/g,` +$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${o}`);let d=Wt(`${f}${n}${m}`,o,Fn,Ne.fold);return`${l} +${o}${d}`}function Bo(t,e,n,r){let{comment:s,type:i,value:o}=t,{actualString:a,implicitKey:c,indent:l,inFlow:f}=e;if(c&&/[\n[\]{},]/.test(o)||f&&/[[\]{},]/.test(o))return we(o,e);if(!o||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return c||f||o.indexOf(` +`)===-1?o.indexOf('"')!==-1&&o.indexOf("'")===-1?Us(o,e):we(o,e):Kt(t,e,n,r);if(!c&&!f&&i!==p.Type.PLAIN&&o.indexOf(` +`)!==-1)return Kt(t,e,n,r);if(l===""&&jt(o))return e.forceBlockIndent=!0,Kt(t,e,n,r);let m=o.replace(/\n+/g,`$& +${l}`);if(a){let{tags:y}=e.doc.schema;if(typeof qn(m,y,y.scalarFallback).value!="string")return we(o,e)}let d=c?m:Wt(m,l,qs,Un(e));return s&&!f&&(d.indexOf(` +`)!==-1||s.indexOf(` +`)!==-1)?(n&&n(),Po(d,l,s)):d}function Fo(t,e,n,r){let{defaultType:s}=Ne,{implicitKey:i,inFlow:o}=e,{type:a,value:c}=t;typeof c!="string"&&(c=String(c),t=Object.assign({},t,{value:c}));let l=m=>{switch(m){case p.Type.BLOCK_FOLDED:case p.Type.BLOCK_LITERAL:return Kt(t,e,n,r);case p.Type.QUOTE_DOUBLE:return we(c,e);case p.Type.QUOTE_SINGLE:return Us(c,e);case p.Type.PLAIN:return Bo(t,e,n,r);default:return null}};(a!==p.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)||(i||o)&&(a===p.Type.BLOCK_FOLDED||a===p.Type.BLOCK_LITERAL))&&(a=p.Type.QUOTE_DOUBLE);let f=l(a);if(f===null&&(f=l(s),f===null))throw new Error(`Unsupported default string type ${s}`);return f}function qo({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let s=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let i=s.indexOf(".");i<0&&(i=s.length,s+=".");let o=e-(s.length-i-1);for(;o-- >0;)s+="0"}return s}function Ks(t,e){let n,r;switch(e.type){case p.Type.FLOW_MAP:n="}",r="flow map";break;case p.Type.FLOW_SEQ:n="]",r="flow sequence";break;default:t.push(new p.YAMLSemanticError(e,"Not a flow collection!?"));return}let s;for(let i=e.items.length-1;i>=0;--i){let o=e.items[i];if(!o||o.type!==p.Type.COMMENT){s=o;break}}if(s&&s.char!==n){let i=`Expected ${r} to end with ${n}`,o;typeof s.offset=="number"?(o=new p.YAMLSemanticError(e,i),o.offset=s.offset+1):(o=new p.YAMLSemanticError(s,i),s.range&&s.range.end&&(o.offset=s.range.end-s.range.start)),t.push(o)}}function Vs(t,e){let n=e.context.src[e.range.start-1];if(n!==` +`&&n!==" "&&n!==" "){let r="Comments must be separated from other tokens by white space characters";t.push(new p.YAMLSemanticError(e,r))}}function Ws(t,e){let n=String(e),r=n.substr(0,8)+"..."+n.substr(-8);return new p.YAMLSemanticError(t,`The "${r}" key is too long`)}function js(t,e){for(let{afterKey:n,before:r,comment:s}of e){let i=t.items[r];i?(n&&i.value&&(i=i.value),s===void 0?(n||!i.commentBefore)&&(i.spaceBefore=!0):i.commentBefore?i.commentBefore+=` +`+s:i.commentBefore=s):s!==void 0&&(t.comment?t.comment+=` +`+s:t.comment=s)}}function Kn(t,e){let n=e.strValue;return n?typeof n=="string"?n:(n.errors.forEach(r=>{r.source||(r.source=e),t.errors.push(r)}),n.str):""}function Uo(t,e){let{handle:n,suffix:r}=e.tag,s=t.tagPrefixes.find(i=>i.handle===n);if(!s){let i=t.getDefaults().tagPrefixes;if(i&&(s=i.find(o=>o.handle===n)),!s)throw new p.YAMLSemanticError(e,`The ${n} tag handle is non-default and was not declared.`)}if(!r)throw new p.YAMLSemanticError(e,`The ${n} tag has no suffix.`);if(n==="!"&&(t.version||t.options.version)==="1.0"){if(r[0]==="^")return t.warnings.push(new p.YAMLWarning(e,"YAML 1.0 ^ tag expansion is not supported")),r;if(/[:/]/.test(r)){let i=r.match(/^([a-z0-9-]+)\/(.*)/i);return i?`tag:${i[1]}.yaml.org,2002:${i[2]}`:`tag:${r}`}}return s.prefix+decodeURIComponent(r)}function Ko(t,e){let{tag:n,type:r}=e,s=!1;if(n){let{handle:i,suffix:o,verbatim:a}=n;if(a){if(a!=="!"&&a!=="!!")return a;let c=`Verbatim tags aren't resolved, so ${a} is invalid.`;t.errors.push(new p.YAMLSemanticError(e,c))}else if(i==="!"&&!o)s=!0;else try{return Uo(t,e)}catch(c){t.errors.push(c)}}switch(r){case p.Type.BLOCK_FOLDED:case p.Type.BLOCK_LITERAL:case p.Type.QUOTE_DOUBLE:case p.Type.QUOTE_SINGLE:return p.defaultTags.STR;case p.Type.FLOW_MAP:case p.Type.MAP:return p.defaultTags.MAP;case p.Type.FLOW_SEQ:case p.Type.SEQ:return p.defaultTags.SEQ;case p.Type.PLAIN:return s?p.defaultTags.STR:null;default:return null}}function $s(t,e,n){let{tags:r}=t.schema,s=[];for(let o of r)if(o.tag===n)if(o.test)s.push(o);else{let a=o.resolve(t,e);return a instanceof j?a:new P(a)}let i=Kn(t,e);return typeof i=="string"&&s.length>0?qn(i,s,r.scalarFallback):null}function Vo({type:t}){switch(t){case p.Type.FLOW_MAP:case p.Type.MAP:return p.defaultTags.MAP;case p.Type.FLOW_SEQ:case p.Type.SEQ:return p.defaultTags.SEQ;default:return p.defaultTags.STR}}function Wo(t,e,n){try{let r=$s(t,e,n);if(r)return n&&e.tag&&(r.tag=n),r}catch(r){return r.source||(r.source=e),t.errors.push(r),null}try{let r=Vo(e);if(!r)throw new Error(`The tag ${n} is unavailable`);let s=`The tag ${n} is unavailable, falling back to ${r}`;t.warnings.push(new p.YAMLWarning(e,s));let i=$s(t,e,r);return i.tag=n,i}catch(r){let s=new p.YAMLReferenceError(e,r.message);return s.stack=r.stack,t.errors.push(s),null}}var jo=t=>{if(!t)return!1;let{type:e}=t;return e===p.Type.MAP_KEY||e===p.Type.MAP_VALUE||e===p.Type.SEQ_ITEM};function Qo(t,e){let n={before:[],after:[]},r=!1,s=!1,i=jo(e.context.parent)?e.context.parent.props.concat(e.props):e.props;for(let{start:o,end:a}of i)switch(e.context.src[o]){case p.Char.COMMENT:{if(!e.commentHasRequiredWhitespace(o)){let m="Comments must be separated from other tokens by white space characters";t.push(new p.YAMLSemanticError(e,m))}let{header:c,valueRange:l}=e;(l&&(o>l.start||c&&o>c.start)?n.after:n.before).push(e.context.src.slice(o+1,a));break}case p.Char.ANCHOR:if(r){let c="A node can have at most one anchor";t.push(new p.YAMLSemanticError(e,c))}r=!0;break;case p.Char.TAG:if(s){let c="A node can have at most one tag";t.push(new p.YAMLSemanticError(e,c))}s=!0;break}return{comments:n,hasAnchor:r,hasTag:s}}function Jo(t,e){let{anchors:n,errors:r,schema:s}=t;if(e.type===p.Type.ALIAS){let o=e.rawValue,a=n.getNode(o);if(!a){let l=`Aliased anchor not found: ${o}`;return r.push(new p.YAMLReferenceError(e,l)),null}let c=new be(a);return n._cstAliases.push(c),c}let i=Ko(t,e);if(i)return Wo(t,e,i);if(e.type!==p.Type.PLAIN){let o=`Failed to resolve ${e.type} node here`;return r.push(new p.YAMLSyntaxError(e,o)),null}try{let o=Kn(t,e);return qn(o,s.tags,s.tags.scalarFallback)}catch(o){return o.source||(o.source=e),r.push(o),null}}function me(t,e){if(!e)return null;e.error&&t.errors.push(e.error);let{comments:n,hasAnchor:r,hasTag:s}=Qo(t.errors,e);if(r){let{anchors:o}=t,a=e.anchor,c=o.getNode(a);c&&(o.map[o.newName(a)]=c),o.map[a]=e}if(e.type===p.Type.ALIAS&&(r||s)){let o="An alias node must not specify any properties";t.errors.push(new p.YAMLSemanticError(e,o))}let i=Jo(t,e);if(i){i.range=[e.range.start,e.range.end],t.options.keepCstNodes&&(i.cstNode=e),t.options.keepNodeTypes&&(i.type=e.type);let o=n.before.join(` +`);o&&(i.commentBefore=i.commentBefore?`${i.commentBefore} +${o}`:o);let a=n.after.join(` +`);a&&(i.comment=i.comment?`${i.comment} +${a}`:a)}return e.resolved=i}function Go(t,e){if(e.type!==p.Type.MAP&&e.type!==p.Type.FLOW_MAP){let o=`A ${e.type} node cannot be resolved as a mapping`;return t.errors.push(new p.YAMLSyntaxError(e,o)),null}let{comments:n,items:r}=e.type===p.Type.FLOW_MAP?Zo(t,e):zo(t,e),s=new mt;s.items=r,js(s,n);let i=!1;for(let o=0;o{if(f instanceof be){let{type:m}=f.source;return m===p.Type.MAP||m===p.Type.FLOW_MAP?!1:l="Merge nodes aliases can only point to maps"}return l="Merge nodes can only have Alias nodes as values"}),l&&t.errors.push(new p.YAMLSemanticError(e,l))}else for(let c=o+1;c{if(r.length===0)return!1;let{start:s}=r[0];if(e&&s>e.valueRange.start||n[s]!==p.Char.COMMENT)return!1;for(let i=t;i0){c=new p.PlainValue(p.Type.PLAIN,[]),c.context={parent:a,src:a.context.src};let f=a.range.start+1;if(c.range={start:f,end:f},c.valueRange={start:f,end:f},typeof a.range.origStart=="number"){let m=a.range.origStart+1;c.range.origStart=c.range.origEnd=m,c.valueRange.origStart=c.valueRange.origEnd=m}}let l=new T(s,me(t,c));Xo(a,l),r.push(l),s&&typeof i=="number"&&a.range.start>i+1024&&t.errors.push(Ws(e,s)),s=void 0,i=null}break;default:s!==void 0&&r.push(new T(s)),s=me(t,a),i=a.range.start,a.error&&t.errors.push(a.error);e:for(let c=o+1;;++c){let l=e.items[c];switch(l&&l.type){case p.Type.BLANK_LINE:case p.Type.COMMENT:continue e;case p.Type.MAP_VALUE:break e;default:{let f="Implicit map keys need to be followed by map values";t.errors.push(new p.YAMLSemanticError(a,f));break e}}}if(a.valueRangeContainsNewline){let c="Implicit map keys need to be on a single line";t.errors.push(new p.YAMLSemanticError(a,c))}}}return s!==void 0&&r.push(new T(s)),{comments:n,items:r}}function Zo(t,e){let n=[],r=[],s,i=!1,o="{";for(let a=0;ai instanceof T&&i.key instanceof j)){let i="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";t.warnings.push(new p.YAMLWarning(e,i))}return e.resolved=s,s}function ta(t,e){let n=[],r=[];for(let s=0;so+1024&&t.errors.push(Ws(e,i));let{src:h}=c.context;for(let g=o;g{"use strict";var Q=le(),O=qe(),ra={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(t,e)=>{let n=O.resolveString(t,e);if(typeof Buffer=="function")return Buffer.from(n,"base64");if(typeof atob=="function"){let r=atob(n.replace(/[\n\r]/g,"")),s=new Uint8Array(r.length);for(let i=0;i{let o;if(typeof Buffer=="function")o=n instanceof Buffer?n.toString("base64"):Buffer.from(n.buffer).toString("base64");else if(typeof btoa=="function"){let a="";for(let c=0;c1){let o="Each pair must have its own sequence indicator";throw new Q.YAMLSemanticError(e,o)}let i=s.items[0]||new O.Pair;s.commentBefore&&(i.commentBefore=i.commentBefore?`${s.commentBefore} +${i.commentBefore}`:s.commentBefore),s.comment&&(i.comment=i.comment?`${s.comment} +${i.comment}`:s.comment),s=i}n.items[r]=s instanceof O.Pair?s:new O.Pair(s)}}return n}function Gs(t,e,n){let r=new O.YAMLSeq(t);r.tag="tag:yaml.org,2002:pairs";for(let s of e){let i,o;if(Array.isArray(s))if(s.length===2)i=s[0],o=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let c=Object.keys(s);if(c.length===1)i=c[0],o=s[i];else throw new TypeError(`Expected { key: value } tuple: ${s}`)}else i=s;let a=t.createPair(i,o,n);r.items.push(a)}return r}var sa={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Js,createNode:Gs},Ue=class t extends O.YAMLSeq{constructor(){super(),Q._defineProperty(this,"add",O.YAMLMap.prototype.add.bind(this)),Q._defineProperty(this,"delete",O.YAMLMap.prototype.delete.bind(this)),Q._defineProperty(this,"get",O.YAMLMap.prototype.get.bind(this)),Q._defineProperty(this,"has",O.YAMLMap.prototype.has.bind(this)),Q._defineProperty(this,"set",O.YAMLMap.prototype.set.bind(this)),this.tag=t.tag}toJSON(e,n){let r=new Map;n&&n.onCreate&&n.onCreate(r);for(let s of this.items){let i,o;if(s instanceof O.Pair?(i=O.toJSON(s.key,"",n),o=O.toJSON(s.value,i,n)):i=O.toJSON(s,"",n),r.has(i))throw new Error("Ordered maps must not include duplicate keys");r.set(i,o)}return r}};Q._defineProperty(Ue,"tag","tag:yaml.org,2002:omap");function ia(t,e){let n=Js(t,e),r=[];for(let{key:s}of n.items)if(s instanceof O.Scalar)if(r.includes(s.value)){let i="Ordered maps must not include duplicate keys";throw new Q.YAMLSemanticError(e,i)}else r.push(s.value);return Object.assign(new Ue,n)}function oa(t,e,n){let r=Gs(t,e,n),s=new Ue;return s.items=r.items,s}var aa={identify:t=>t instanceof Map,nodeClass:Ue,default:!1,tag:"tag:yaml.org,2002:omap",resolve:ia,createNode:oa},Ke=class t extends O.YAMLMap{constructor(){super(),this.tag=t.tag}add(e){let n=e instanceof O.Pair?e:new O.Pair(e);O.findPair(this.items,n.key)||this.items.push(n)}get(e,n){let r=O.findPair(this.items,e);return!n&&r instanceof O.Pair?r.key instanceof O.Scalar?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let r=O.findPair(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new O.Pair(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(e,n,r);throw new Error("Set items must all have null values")}};Q._defineProperty(Ke,"tag","tag:yaml.org,2002:set");function ca(t,e){let n=O.resolveMap(t,e);if(!n.hasAllNullValues())throw new Q.YAMLSemanticError(e,"Set items must all have null values");return Object.assign(new Ke,n)}function la(t,e,n){let r=new Ke;for(let s of e)r.items.push(t.createPair(s,null,n));return r}var fa={identify:t=>t instanceof Set,nodeClass:Ke,default:!1,tag:"tag:yaml.org,2002:set",resolve:ca,createNode:la},Vn=(t,e)=>{let n=e.split(":").reduce((r,s)=>r*60+Number(s),0);return t==="-"?-n:n},Hs=({value:t})=>{if(isNaN(t)||!isFinite(t))return O.stringifyNumber(t);let e="";t<0&&(e="-",t=Math.abs(t));let n=[t%60];return t<60?n.unshift(0):(t=Math.round((t-n[0])/60),n.unshift(t%60),t>=60&&(t=Math.round((t-n[0])/60),n.unshift(t))),e+n.map(r=>r<10?"0"+String(r):String(r)).join(":").replace(/000000\d*$/,"")},ua={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(t,e,n)=>Vn(e,n.replace(/_/g,"")),stringify:Hs},pa={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(t,e,n)=>Vn(e,n.replace(/_/g,"")),stringify:Hs},ma={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:(t,e,n,r,s,i,o,a,c)=>{a&&(a=(a+"00").substr(1,3));let l=Date.UTC(e,n-1,r,s||0,i||0,o||0,a||0);if(c&&c!=="Z"){let f=Vn(c[0],c.slice(1));Math.abs(f)<30&&(f*=60),l-=6e4*f}return new Date(l)},stringify:({value:t})=>t.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function Wn(t){let e={};return t?typeof YAML_SILENCE_DEPRECATION_WARNINGS<"u"?!YAML_SILENCE_DEPRECATION_WARNINGS:!e.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<"u"?!YAML_SILENCE_WARNINGS:!e.YAML_SILENCE_WARNINGS}function jn(t,e){Wn(!1)&&console.warn(e?`${e}: ${t}`:t)}function ha(t){if(Wn(!0)){let e=t.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");jn(`The endpoint 'yaml/${e}' will be removed in a future release.`,"DeprecationWarning")}}var Qs={};function ga(t,e){if(!Qs[t]&&Wn(!0)){Qs[t]=!0;let n=`The option '${t}' will be removed in a future release`;n+=e?`, use '${e}' instead.`:".",jn(n,"DeprecationWarning")}}z.binary=ra;z.floatTime=pa;z.intTime=ua;z.omap=aa;z.pairs=sa;z.set=fa;z.timestamp=ma;z.warn=jn;z.warnFileDeprecation=ha;z.warnOptionDeprecation=ga});var Xn=te(li=>{"use strict";var Gt=le(),E=qe(),D=Qn();function da(t,e,n){let r=new E.YAMLMap(t);if(e instanceof Map)for(let[s,i]of e)r.items.push(t.createPair(s,i,n));else if(e&&typeof e=="object")for(let s of Object.keys(e))r.items.push(t.createPair(s,e[s],n));return typeof t.sortMapEntries=="function"&&r.items.sort(t.sortMapEntries),r}var gt={createNode:da,default:!0,nodeClass:E.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:E.resolveMap};function ya(t,e,n){let r=new E.YAMLSeq(t);if(e&&e[Symbol.iterator])for(let s of e){let i=t.createNode(s,n.wrapScalars,null,n);r.items.push(i)}return r}var Ht={createNode:ya,default:!0,nodeClass:E.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:E.resolveSeq},Ea={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:E.resolveString,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),E.stringifyString(t,e,n,r)},options:E.strOptions},Gn=[gt,Ht,Ea],Xt=t=>typeof t=="bigint"||Number.isInteger(t),Hn=(t,e,n)=>E.intOptions.asBigInt?BigInt(t):parseInt(e,n);function Zs(t,e,n){let{value:r}=t;return Xt(r)&&r>=0?n+r.toString(e):E.stringifyNumber(t)}var ei={identify:t=>t==null,createNode:(t,e,n)=>n.wrapScalars?new E.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:E.nullOptions,stringify:()=>E.nullOptions.nullStr},ti={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>t[0]==="t"||t[0]==="T",options:E.boolOptions,stringify:({value:t})=>t?E.boolOptions.trueStr:E.boolOptions.falseStr},ni={identify:t=>Xt(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(t,e)=>Hn(t,e,8),options:E.intOptions,stringify:t=>Zs(t,8,"0o")},ri={identify:Xt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:t=>Hn(t,t,10),options:E.intOptions,stringify:E.stringifyNumber},si={identify:t=>Xt(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(t,e)=>Hn(t,e,16),options:E.intOptions,stringify:t=>Zs(t,16,"0x")},ii={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(t,e)=>e?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:E.stringifyNumber},oi={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify:({value:t})=>Number(t).toExponential()},ai={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(t,e,n){let r=e||n,s=new E.Scalar(parseFloat(t));return r&&r[r.length-1]==="0"&&(s.minFractionDigits=r.length),s},stringify:E.stringifyNumber},Sa=Gn.concat([ei,ti,ni,ri,si,ii,oi,ai]),Xs=t=>typeof t=="bigint"||Number.isInteger(t),Qt=({value:t})=>JSON.stringify(t),ci=[gt,Ht,{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:E.resolveString,stringify:Qt},{identify:t=>t==null,createNode:(t,e,n)=>n.wrapScalars?new E.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Qt},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:t=>t==="true",stringify:Qt},{identify:Xs,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:t=>E.intOptions.asBigInt?BigInt(t):parseInt(t,10),stringify:({value:t})=>Xs(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:Qt}];ci.scalarFallback=t=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(t)}`)};var zs=({value:t})=>t?E.boolOptions.trueStr:E.boolOptions.falseStr,ht=t=>typeof t=="bigint"||Number.isInteger(t);function Jt(t,e,n){let r=e.replace(/_/g,"");if(E.intOptions.asBigInt){switch(n){case 2:r=`0b${r}`;break;case 8:r=`0o${r}`;break;case 16:r=`0x${r}`;break}let i=BigInt(r);return t==="-"?BigInt(-1)*i:i}let s=parseInt(r,n);return t==="-"?-1*s:s}function Jn(t,e,n){let{value:r}=t;if(ht(r)){let s=r.toString(e);return r<0?"-"+n+s.substr(1):n+s}return E.stringifyNumber(t)}var wa=Gn.concat([{identify:t=>t==null,createNode:(t,e,n)=>n.wrapScalars?new E.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:E.nullOptions,stringify:()=>E.nullOptions.nullStr},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:E.boolOptions,stringify:zs},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:E.boolOptions,stringify:zs},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(t,e,n)=>Jt(e,n,2),stringify:t=>Jn(t,2,"0b")},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(t,e,n)=>Jt(e,n,8),stringify:t=>Jn(t,8,"0")},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(t,e,n)=>Jt(e,n,10),stringify:E.stringifyNumber},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(t,e,n)=>Jt(e,n,16),stringify:t=>Jn(t,16,"0x")},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(t,e)=>e?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:E.stringifyNumber},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify:({value:t})=>Number(t).toExponential()},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(t,e){let n=new E.Scalar(parseFloat(t.replace(/_/g,"")));if(e){let r=e.replace(/_/g,"");r[r.length-1]==="0"&&(n.minFractionDigits=r.length)}return n},stringify:E.stringifyNumber}],D.binary,D.omap,D.pairs,D.set,D.intTime,D.floatTime,D.timestamp),ba={core:Sa,failsafe:Gn,json:ci,yaml11:wa},Na={binary:D.binary,bool:ti,float:ai,floatExp:oi,floatNaN:ii,floatTime:D.floatTime,int:ri,intHex:si,intOct:ni,intTime:D.intTime,map:gt,null:ei,omap:D.omap,pairs:D.pairs,seq:Ht,set:D.set,timestamp:D.timestamp};function Oa(t,e,n){if(e){let r=n.filter(i=>i.tag===e),s=r.find(i=>!i.format)||r[0];if(!s)throw new Error(`Tag ${e} not found`);return s}return n.find(r=>(r.identify&&r.identify(t)||r.class&&t instanceof r.class)&&!r.format)}function La(t,e,n){if(t instanceof E.Node)return t;let{defaultPrefix:r,onTagObj:s,prevObjects:i,schema:o,wrapScalars:a}=n;e&&e.startsWith("!!")&&(e=r+e.slice(2));let c=Oa(t,e,o.tags);if(!c){if(typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object")return a?new E.Scalar(t):t;c=t instanceof Map?gt:t[Symbol.iterator]?Ht:gt}s&&(s(c),delete n.onTagObj);let l={value:void 0,node:void 0};if(t&&typeof t=="object"&&i){let f=i.get(t);if(f){let m=new E.Alias(f);return n.aliasNodes.push(m),m}l.value=t,i.set(t,l)}return l.node=c.createNode?c.createNode(n.schema,t,n):a?new E.Scalar(t):t,e&&l.node instanceof E.Node&&(l.node.tag=e),l.node}function Aa(t,e,n,r){let s=t[r.replace(/\W/g,"")];if(!s){let i=Object.keys(t).map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${r}"; use one of ${i}`)}if(Array.isArray(n))for(let i of n)s=s.concat(i);else typeof n=="function"&&(s=n(s.slice()));for(let i=0;iJSON.stringify(l)).join(", ");throw new Error(`Unknown custom tag "${o}"; use one of ${c}`)}s[i]=a}}return s}var Ta=(t,e)=>t.keye.key?1:0,dt=class t{constructor({customTags:e,merge:n,schema:r,sortMapEntries:s,tags:i}){this.merge=!!n,this.name=r,this.sortMapEntries=s===!0?Ta:s||null,!e&&i&&D.warnOptionDeprecation("tags","customTags"),this.tags=Aa(ba,Na,e||i,r)}createNode(e,n,r,s){let i={defaultPrefix:t.defaultPrefix,schema:this,wrapScalars:n},o=s?Object.assign(s,i):i;return La(e,r,o)}createPair(e,n,r){r||(r={wrapScalars:!0});let s=this.createNode(e,r.wrapScalars,null,r),i=this.createNode(n,r.wrapScalars,null,r);return new E.Pair(s,i)}};Gt._defineProperty(dt,"defaultPrefix",Gt.defaultTagPrefix);Gt._defineProperty(dt,"defaultTags",Gt.defaultTags);li.Schema=dt});var mi=te(tn=>{"use strict";var Y=le(),S=qe(),fi=Xn(),Ca={anchorPrefix:"a",customTags:null,indent:2,indentSeq:!0,keepCstNodes:!1,keepNodeTypes:!0,keepBlobsInJSON:!0,mapAsMap:!1,maxAliasCount:100,prettyErrors:!1,simpleKeys:!1,version:"1.2"},Ma={get binary(){return S.binaryOptions},set binary(t){Object.assign(S.binaryOptions,t)},get bool(){return S.boolOptions},set bool(t){Object.assign(S.boolOptions,t)},get int(){return S.intOptions},set int(t){Object.assign(S.intOptions,t)},get null(){return S.nullOptions},set null(t){Object.assign(S.nullOptions,t)},get str(){return S.strOptions},set str(t){Object.assign(S.strOptions,t)}},pi={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:Y.defaultTagPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:Y.defaultTagPrefix}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:Y.defaultTagPrefix}]}};function ui(t,e){if((t.version||t.options.version)==="1.0"){let s=e.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(s)return"!"+s[1];let i=e.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return i?`!${i[1]}/${i[2]}`:`!${e.replace(/^tag:/,"")}`}let n=t.tagPrefixes.find(s=>e.indexOf(s.prefix)===0);if(!n){let s=t.getDefaults().tagPrefixes;n=s&&s.find(i=>e.indexOf(i.prefix)===0)}if(!n)return e[0]==="!"?e:`!<${e}>`;let r=e.substr(n.prefix.length).replace(/[!,[\]{}]/g,s=>({"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"})[s]);return n.handle+r}function ka(t,e){if(e instanceof S.Alias)return S.Alias;if(e.tag){let s=t.filter(i=>i.tag===e.tag);if(s.length>0)return s.find(i=>i.format===e.format)||s[0]}let n,r;if(e instanceof S.Scalar){r=e.value;let s=t.filter(i=>i.identify&&i.identify(r)||i.class&&r instanceof i.class);n=s.find(i=>i.format===e.format)||s.find(i=>!i.format)}else r=e,n=t.find(s=>s.nodeClass&&r instanceof s.nodeClass);if(!n){let s=r&&r.constructor?r.constructor.name:typeof r;throw new Error(`Tag not resolved for ${s} value`)}return n}function va(t,e,{anchors:n,doc:r}){let s=[],i=r.anchors.getName(t);return i&&(n[i]=t,s.push(`&${i}`)),t.tag?s.push(ui(r,t.tag)):e.default||s.push(ui(r,e.tag)),s.join(" ")}function zt(t,e,n,r){let{anchors:s,schema:i}=e.doc,o;if(!(t instanceof S.Node)){let l={aliasNodes:[],onTagObj:f=>o=f,prevObjects:new Map};t=i.createNode(t,!0,null,l);for(let f of l.aliasNodes){f.source=f.source.node;let m=s.getName(f.source);m||(m=s.newName(),s.map[m]=f.source)}}if(t instanceof S.Pair)return t.toString(e,n,r);o||(o=ka(i.tags,t));let a=va(t,o,e);a.length>0&&(e.indentAtStart=(e.indentAtStart||0)+a.length+1);let c=typeof o.stringify=="function"?o.stringify(t,e,n,r):t instanceof S.Scalar?S.stringifyString(t,e,n,r):t.toString(e,n,r);return a?t instanceof S.Scalar||c[0]==="{"||c[0]==="["?`${a} ${c}`:`${a} +${e.indent}${c}`:c}var zn=class t{static validAnchorNode(e){return e instanceof S.Scalar||e instanceof S.YAMLSeq||e instanceof S.YAMLMap}constructor(e){Y._defineProperty(this,"map",Object.create(null)),this.prefix=e}createAlias(e,n){return this.setAnchor(e,n),new S.Alias(e)}createMergePair(...e){let n=new S.Merge;return n.value.items=e.map(r=>{if(r instanceof S.Alias){if(r.source instanceof S.YAMLMap)return r}else if(r instanceof S.YAMLMap)return this.createAlias(r);throw new Error("Merge sources must be Map nodes or their Aliases")}),n}getName(e){let{map:n}=this;return Object.keys(n).find(r=>n[r]===e)}getNames(){return Object.keys(this.map)}getNode(e){return this.map[e]}newName(e){e||(e=this.prefix);let n=Object.keys(this.map);for(let r=1;;++r){let s=`${e}${r}`;if(!n.includes(s))return s}}resolveNodes(){let{map:e,_cstAliases:n}=this;Object.keys(e).forEach(r=>{e[r]=e[r].resolved}),n.forEach(r=>{r.source=r.source.resolved}),delete this._cstAliases}setAnchor(e,n){if(e!=null&&!t.validAnchorNode(e))throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");if(n&&/[\x00-\x19\s,[\]{}]/.test(n))throw new Error("Anchor names must not contain whitespace or control characters");let{map:r}=this,s=e&&Object.keys(r).find(i=>r[i]===e);if(s)if(n)s!==n&&(delete r[s],r[n]=e);else return s;else{if(!n){if(!e)return null;n=this.newName()}r[n]=e}return n}},Zt=(t,e)=>{if(t&&typeof t=="object"){let{tag:n}=t;t instanceof S.Collection?(n&&(e[n]=!0),t.items.forEach(r=>Zt(r,e))):t instanceof S.Pair?(Zt(t.key,e),Zt(t.value,e)):t instanceof S.Scalar&&n&&(e[n]=!0)}return e},Ia=t=>Object.keys(Zt(t,{}));function Pa(t,e){let n={before:[],after:[]},r,s=!1;for(let i of e)if(i.valueRange){if(r!==void 0){let a="Document contains trailing content not separated by a ... or --- line";t.errors.push(new Y.YAMLSyntaxError(i,a));break}let o=S.resolveNode(t,i);s&&(o.spaceBefore=!0,s=!1),r=o}else i.comment!==null?(r===void 0?n.before:n.after).push(i.comment):i.type===Y.Type.BLANK_LINE&&(s=!0,r===void 0&&n.before.length>0&&!t.commentBefore&&(t.commentBefore=n.before.join(` +`),n.before=[]));if(t.contents=r||null,!r)t.comment=n.before.concat(n.after).join(` +`)||null;else{let i=n.before.join(` +`);if(i){let o=r instanceof S.Collection&&r.items[0]?r.items[0]:r;o.commentBefore=o.commentBefore?`${i} +${o.commentBefore}`:i}t.comment=n.after.join(` +`)||null}}function _a({tagPrefixes:t},e){let[n,r]=e.parameters;if(!n||!r){let s="Insufficient parameters given for %TAG directive";throw new Y.YAMLSemanticError(e,s)}if(t.some(s=>s.handle===n)){let s="The %TAG directive must only be given at most once per handle in the same document.";throw new Y.YAMLSemanticError(e,s)}return{handle:n,prefix:r}}function xa(t,e){let[n]=e.parameters;if(e.name==="YAML:1.0"&&(n="1.0"),!n){let r="Insufficient parameters given for %YAML directive";throw new Y.YAMLSemanticError(e,r)}if(!pi[n]){let s=`Document will be parsed as YAML ${t.version||t.options.version} rather than YAML ${n}`;t.warnings.push(new Y.YAMLWarning(e,s))}return n}function Ra(t,e,n){let r=[],s=!1;for(let i of e){let{comment:o,name:a}=i;switch(a){case"TAG":try{t.tagPrefixes.push(_a(t,i))}catch(c){t.errors.push(c)}s=!0;break;case"YAML":case"YAML:1.0":if(t.version){let c="The %YAML directive must only be given at most once per document.";t.errors.push(new Y.YAMLSemanticError(i,c))}try{t.version=xa(t,i)}catch(c){t.errors.push(c)}s=!0;break;default:if(a){let c=`YAML only supports %TAG and %YAML directives, and not %${a}`;t.warnings.push(new Y.YAMLWarning(i,c))}}o&&r.push(o)}if(n&&!s&&(t.version||n.version||t.options.version)==="1.1"){let i=({handle:o,prefix:a})=>({handle:o,prefix:a});t.tagPrefixes=n.tagPrefixes.map(i),t.version=n.version}t.commentBefore=r.join(` +`)||null}function Ve(t){if(t instanceof S.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}var en=class t{constructor(e){this.anchors=new zn(e.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=e,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}add(e){return Ve(this.contents),this.contents.add(e)}addIn(e,n){Ve(this.contents),this.contents.addIn(e,n)}delete(e){return Ve(this.contents),this.contents.delete(e)}deleteIn(e){return S.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):(Ve(this.contents),this.contents.deleteIn(e))}getDefaults(){return t.defaults[this.version]||t.defaults[this.options.version]||{}}get(e,n){return this.contents instanceof S.Collection?this.contents.get(e,n):void 0}getIn(e,n){return S.isEmptyPath(e)?!n&&this.contents instanceof S.Scalar?this.contents.value:this.contents:this.contents instanceof S.Collection?this.contents.getIn(e,n):void 0}has(e){return this.contents instanceof S.Collection?this.contents.has(e):!1}hasIn(e){return S.isEmptyPath(e)?this.contents!==void 0:this.contents instanceof S.Collection?this.contents.hasIn(e):!1}set(e,n){Ve(this.contents),this.contents.set(e,n)}setIn(e,n){S.isEmptyPath(e)?this.contents=n:(Ve(this.contents),this.contents.setIn(e,n))}setSchema(e,n){if(!e&&!n&&this.schema)return;typeof e=="number"&&(e=e.toFixed(1)),e==="1.0"||e==="1.1"||e==="1.2"?(this.version?this.version=e:this.options.version=e,delete this.options.schema):e&&typeof e=="string"&&(this.options.schema=e),Array.isArray(n)&&(this.options.customTags=n);let r=Object.assign({},this.getDefaults(),this.options);this.schema=new fi.Schema(r)}parse(e,n){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type="DOCUMENT");let{directives:r=[],contents:s=[],directivesEndMarker:i,error:o,valueRange:a}=e;if(o&&(o.source||(o.source=this),this.errors.push(o)),Ra(this,r,n),i&&(this.directivesEndMarker=!0),this.range=a?[a.start,a.end]:null,this.setSchema(),this.anchors._cstAliases=[],Pa(this,s),this.anchors.resolveNodes(),this.options.prettyErrors){for(let c of this.errors)c instanceof Y.YAMLError&&c.makePretty();for(let c of this.warnings)c instanceof Y.YAMLError&&c.makePretty()}return this}listNonDefaultTags(){return Ia(this.contents).filter(e=>e.indexOf(fi.Schema.defaultPrefix)!==0)}setTagPrefix(e,n){if(e[0]!=="!"||e[e.length-1]!=="!")throw new Error("Handle must start and end with !");if(n){let r=this.tagPrefixes.find(s=>s.handle===e);r?r.prefix=n:this.tagPrefixes.push({handle:e,prefix:n})}else this.tagPrefixes=this.tagPrefixes.filter(r=>r.handle!==e)}toJSON(e,n){let{keepBlobsInJSON:r,mapAsMap:s,maxAliasCount:i}=this.options,o=r&&(typeof e!="string"||!(this.contents instanceof S.Scalar)),a={doc:this,indentStep:" ",keep:o,mapAsMap:o&&!!s,maxAliasCount:i,stringify:zt},c=Object.keys(this.anchors.map);c.length>0&&(a.anchors=new Map(c.map(f=>[this.anchors.map[f],{alias:[],aliasCount:0,count:1}])));let l=S.toJSON(this.contents,e,a);if(typeof n=="function"&&a.anchors)for(let{count:f,res:m}of a.anchors.values())n(m,f);return l}toString(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");let e=this.options.indent;if(!Number.isInteger(e)||e<=0){let c=JSON.stringify(e);throw new Error(`"indent" option must be a positive integer, not ${c}`)}this.setSchema();let n=[],r=!1;if(this.version){let c="%YAML 1.2";this.schema.name==="yaml-1.1"&&(this.version==="1.0"?c="%YAML:1.0":this.version==="1.1"&&(c="%YAML 1.1")),n.push(c),r=!0}let s=this.listNonDefaultTags();this.tagPrefixes.forEach(({handle:c,prefix:l})=>{s.some(f=>f.indexOf(l)===0)&&(n.push(`%TAG ${c} ${l}`),r=!0)}),(r||this.directivesEndMarker)&&n.push("---"),this.commentBefore&&((r||!this.directivesEndMarker)&&n.unshift(""),n.unshift(this.commentBefore.replace(/^/gm,"#")));let i={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:zt},o=!1,a=null;if(this.contents){this.contents instanceof S.Node&&(this.contents.spaceBefore&&(r||this.directivesEndMarker)&&n.push(""),this.contents.commentBefore&&n.push(this.contents.commentBefore.replace(/^/gm,"#")),i.forceBlockIndent=!!this.comment,a=this.contents.comment);let c=a?null:()=>o=!0,l=zt(this.contents,i,()=>a=null,c);n.push(S.addComment(l,"",a))}else this.contents!==void 0&&n.push(zt(this.contents,i));return this.comment&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push(this.comment.replace(/^/gm,"#"))),n.join(` +`)+` +`}};Y._defineProperty(en,"defaults",pi);tn.Document=en;tn.defaultOptions=Ca;tn.scalarOptions=Ma});var di=te(gi=>{"use strict";var Zn=Rs(),Oe=mi(),Da=Xn(),Ya=le(),$a=Qn();qe();function Ba(t,e=!0,n){n===void 0&&typeof e=="string"&&(n=e,e=!0);let r=Object.assign({},Oe.Document.defaults[Oe.defaultOptions.version],Oe.defaultOptions);return new Da.Schema(r).createNode(t,e,n)}var We=class extends Oe.Document{constructor(e){super(Object.assign({},Oe.defaultOptions,e))}};function Fa(t,e){let n=[],r;for(let s of Zn.parse(t)){let i=new We(e);i.parse(s,r),n.push(i),r=i}return n}function hi(t,e){let n=Zn.parse(t),r=new We(e).parse(n[0]);if(n.length>1){let s="Source contains multiple documents; please use YAML.parseAllDocuments()";r.errors.unshift(new Ya.YAMLSemanticError(n[1],s))}return r}function qa(t,e){let n=hi(t,e);if(n.warnings.forEach(r=>$a.warn(r)),n.errors.length>0)throw n.errors[0];return n.toJSON()}function Ua(t,e){let n=new We(e);return n.contents=t,String(n)}var Ka={createNode:Ba,defaultOptions:Oe.defaultOptions,Document:We,parse:qa,parseAllDocuments:Fa,parseCST:Zn.parse,parseDocument:hi,scalarOptions:Oe.scalarOptions,stringify:Ua};gi.YAML=Ka});var Ei=te((Um,yi)=>{yi.exports=di().YAML});var Si=te(J=>{"use strict";var je=qe(),Qe=le();J.findPair=je.findPair;J.parseMap=je.resolveMap;J.parseSeq=je.resolveSeq;J.stringifyNumber=je.stringifyNumber;J.stringifyString=je.stringifyString;J.toJSON=je.toJSON;J.Type=Qe.Type;J.YAMLError=Qe.YAMLError;J.YAMLReferenceError=Qe.YAMLReferenceError;J.YAMLSemanticError=Qe.YAMLSemanticError;J.YAMLSyntaxError=Qe.YAMLSyntaxError;J.YAMLWarning=Qe.YAMLWarning});var Xa={};nr(Xa,{languages:()=>_r,options:()=>xr,parsers:()=>tr,printers:()=>Ha});var Pi=(t,e,n,r)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(n,r):n.global?e.replace(n,r):e.split(n).join(r)},Et=Pi;var Le="string",Je="array",Ge="cursor",He="indent",Ae="align",Xe="trim",Te="group",Ce="fill",he="if-break",ze="indent-if-break",Me="line-suffix",Ze="line-suffix-boundary",Z="line",et="label",ke="break-parent",St=new Set([Ge,He,Ae,Xe,Te,Ce,he,ze,Me,Ze,Z,et,ke]);var _i=(t,e,n)=>{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[n<0?e.length+n:n]:e.at(n)},x=_i;function xi(t){if(typeof t=="string")return Le;if(Array.isArray(t))return Je;if(!t)return;let{type:e}=t;if(St.has(e))return e}var ve=xi;var Ri=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function Di(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', +Expected it to be 'string' or 'object'.`;if(ve(t))throw new Error("doc is valid.");let n=Object.prototype.toString.call(t);if(n!=="[object Object]")return`Unexpected doc '${n}'.`;let r=Ri([...St].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'. +Expected it to be ${r}.`}var nn=class extends Error{name="InvalidDocError";constructor(e){super(Di(e)),this.doc=e}},rn=nn;function $i(t,e){if(typeof t=="string")return e(t);let n=new Map;return r(t);function r(i){if(n.has(i))return n.get(i);let o=s(i);return n.set(i,o),o}function s(i){switch(ve(i)){case Je:return e(i.map(r));case Ce:return e({...i,parts:i.parts.map(r)});case he:return e({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case Te:{let{expandedStates:o,contents:a}=i;return o?(o=o.map(r),a=o[0]):a=r(a),e({...i,contents:a,expandedStates:o})}case Ae:case He:case ze:case et:case Me:return e({...i,contents:r(i.contents)});case Le:case Ge:case Xe:case Ze:case Z:case ke:return e(i);default:throw new rn(i)}}}function ir(t,e=tt){return $i(t,n=>typeof n=="string"?v(e,n.split(` +`)):n)}var sn=()=>{},ge=sn,on=sn,or=sn;function nt(t,e){return ge(e),{type:Ae,contents:e,n:t}}function Ie(t,e={}){return ge(t),on(e.expandedStates,!0),{type:Te,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function an(t){return nt(Number.NEGATIVE_INFINITY,t)}function ar(t){return nt({type:"root"},t)}function cr(t){return nt(-1,t)}function cn(t,e){return Ie(t[0],{...e,expandedStates:t})}function wt(t){return or(t),{type:Ce,parts:t}}function rt(t,e="",n={}){return ge(t),e!==""&&ge(e),{type:he,breakContents:t,flatContents:e,groupId:n.groupId}}function lr(t){return ge(t),{type:Me,contents:t}}var bt={type:ke};var Bi={type:Z,hard:!0},Fi={type:Z,hard:!0,literal:!0},ne={type:Z},Nt={type:Z,soft:!0},N=[Bi,bt],tt=[Fi,bt];function v(t,e){ge(t),on(e);let n=[];for(let r=0;r{let s=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:i}=e,o=n;for(;o>=0&&o{let s=await r(e.originalText,{parser:"json"});return s?[s,N]:void 0}}pr.getVisitorKeys=()=>[];var mr=pr;var st=null;function it(t){if(st!==null&&typeof st.property){let e=st;return st=it.prototype=null,e}return st=it.prototype=t??Object.create(null),new it}var Ki=10;for(let t=0;t<=Ki;t++)it();function pn(t){return it(t)}function Vi(t,e="type"){pn(t);function n(r){let s=r[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:r});return i}return n}var hr=Vi;var Wi=Object.fromEntries(Object.entries({root:["children"],document:["head","body","children"],documentHead:["children"],documentBody:["children"],directive:[],alias:[],blockLiteral:[],blockFolded:["children"],plain:["children"],quoteSingle:[],quoteDouble:[],mapping:["children"],mappingItem:["key","value","children"],mappingKey:["content","children"],mappingValue:["content","children"],sequence:["children"],sequenceItem:["content","children"],flowMapping:["children"],flowMappingItem:["key","value","children"],flowSequence:["children"],flowSequenceItem:["content","children"],comment:[],tag:[],anchor:[]}).map(([t,e])=>[t,[...e,"anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"]])),gr=Wi;var ji=hr(gr),dr=ji;function Pe(t){return t.position.start.offset}function yr(t){return t.position.end.offset}function Er(t){return/^\s*@(?:prettier|format)\s*$/u.test(t)}function Sr(t){return/^\s*#[^\S\n]*@(?:prettier|format)\s*?(?:\n|$)/u.test(t)}function wr(t){return`# @format + +${t}`}function Qi(t){return Array.isArray(t)&&t.length>0}var _e=Qi;function H(t,e){return typeof(t==null?void 0:t.type)=="string"&&(!e||e.includes(t.type))}function mn(t,e,n){return e("children"in t?{...t,children:t.children.map(r=>mn(r,e,t))}:t,n)}function xe(t,e,n){Object.defineProperty(t,e,{get:n,enumerable:!1})}function Nr(t,e){let n=0,r=e.length;for(let s=t.position.end.offset-1;si===0&&i===o.length-1?s:i!==0&&i!==o.length-1?s.trim():i===0?s.trimEnd():s.trimStart());return n.proseWrap==="preserve"?r.map(s=>s.length===0?[]:[s]):r.map(s=>s.length===0?[]:Lr(s)).reduce((s,i,o)=>o!==0&&r[o-1].length>0&&i.length>0&&!(t==="quoteDouble"&&x(!1,x(!1,s,-1),-1).endsWith("\\"))?[...s.slice(0,-1),[...x(!1,s,-1),...i]]:[...s,i],[]).map(s=>n.proseWrap==="never"?[s.join(" ")]:s)}function Tr(t,{parentIndent:e,isLastDescendant:n,options:r}){let s=t.position.start.line===t.position.end.line?"":r.originalText.slice(t.position.start.offset,t.position.end.offset).match(/^[^\n]*\n(.*)$/su)[1],i;if(t.indent===null){let c=s.match(/^(? *)[^\n\r ]/mu);i=c?c.groups.leadingSpace.length:Number.POSITIVE_INFINITY}else i=t.indent-1+e;let o=s.split(` +`).map(c=>c.slice(i));if(r.proseWrap==="preserve"||t.type==="blockLiteral")return a(o.map(c=>c.length===0?[]:[c]));return a(o.map(c=>c.length===0?[]:Lr(c)).reduce((c,l,f)=>f!==0&&o[f-1].length>0&&l.length>0&&!/^\s/u.test(l[0])&&!/^\s|\s$/u.test(x(!1,c,-1))?[...c.slice(0,-1),[...x(!1,c,-1),...l]]:[...c,l],[]).map(c=>c.reduce((l,f)=>l.length>0&&/\s$/u.test(x(!1,l,-1))?[...l.slice(0,-1),x(!1,l,-1)+" "+f]:[...l,f],[])).map(c=>r.proseWrap==="never"?[c.join(" ")]:c));function a(c){if(t.chomping==="keep")return x(!1,c,-1).length===0?c.slice(0,-1):c;let l=0;for(let f=c.length-1;f>=0&&c[f].length===0;f--)l++;return l===0?c:l>=2&&!n?c.slice(0,-(l-1)):c.slice(0,-l)}}function ot(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":case"alias":case"flowMapping":case"flowSequence":return!0;default:return!1}}var gn=new WeakMap;function Tt(t,e){let{node:n,root:r}=t,s;return gn.has(r)?s=gn.get(r):(s=new Set,gn.set(r,s)),!s.has(n.position.end.line)&&(s.add(n.position.end.line),Nr(n,e)&&!dn(t.parent))?Nt:""}function dn(t){return R(t)&&!H(t,["documentHead","documentBody","flowMapping","flowSequence"])}function I(t,e){return nt(" ".repeat(t),e)}function Gi(t,e,n){let{node:r}=t,s=t.ancestors.filter(l=>l.type==="sequence"||l.type==="mapping").length,i=Lt(t),o=[r.type==="blockFolded"?">":"|"];r.indent!==null&&o.push(r.indent.toString()),r.chomping!=="clip"&&o.push(r.chomping==="keep"?"+":"-"),hn(r)&&o.push(" ",e("indicatorComment"));let a=Tr(r,{parentIndent:s,isLastDescendant:i,options:n}),c=[];for(let[l,f]of a.entries())l===0&&c.push(N),c.push(wt(v(ne,f))),l!==a.length-1?c.push(f.length===0?N:ar(tt)):r.chomping==="keep"&&i&&c.push(an(f.length===0?N:tt));return r.indent===null?o.push(cr(I(n.tabWidth,c))):o.push(an(I(r.indent-1+s,c))),o}var Cr=Gi;function Ct(t,e,n){let{node:r}=t,s=r.type==="flowMapping",i=s?"{":"[",o=s?"}":"]",a=Nt;s&&r.children.length>0&&n.bracketSpacing&&(a=ne);let c=x(!1,r.children,-1),l=(c==null?void 0:c.type)==="flowMappingItem"&&Re(c.key)&&Re(c.value);return[i,I(n.tabWidth,[a,Hi(t,e,n),n.trailingComma==="none"?"":rt(","),R(r)?[N,v(N,t.map(e,"endComments"))]:""]),l?"":a,o]}function Hi(t,e,n){return t.map(({isLast:r,node:s,next:i})=>[e(),r?"":[",",ne,s.position.start.line!==i.position.start.line?Tt(t,n.originalText):""]],"children")}function Xi(t,e,n){var C;let{node:r,parent:s}=t,{key:i,value:o}=r,a=Re(i),c=Re(o);if(a&&c)return": ";let l=e("key"),f=zi(r)?" ":"";if(c)return r.type==="flowMappingItem"&&s.type==="flowMapping"?l:r.type==="mappingItem"&&yn(i.content,n)&&!K(i.content)&&((C=s.tag)==null?void 0:C.value)!=="tag:yaml.org,2002:set"?[l,f,":"]:["? ",I(2,l)];let m=e("value");if(a)return[": ",I(2,m)];if(ee(o)||!ot(i.content))return["? ",I(2,l),N,...t.map(()=>[e(),N],"value","leadingComments"),": ",I(2,m)];if(Zi(i.content)&&!ee(i.content)&&!ie(i.content)&&!K(i.content)&&!R(i)&&!ee(o.content)&&!ie(o.content)&&!R(o)&&yn(o.content,n))return[l,f,": ",m];let d=Symbol("mappingKey"),y=Ie([rt("? "),Ie(I(2,l),{id:d})]),h=[N,": ",I(2,m)],g=[f,":"];ee(o.content)||R(o)&&o.content&&!H(o.content,["mapping","sequence"])||s.type==="mapping"&&K(i.content)&&ot(o.content)||H(o.content,["mapping","sequence"])&&o.content.tag===null&&o.content.anchor===null?g.push(N):o.content?g.push(ne):K(o)&&g.push(" "),g.push(m);let w=I(n.tabWidth,g);return yn(i.content,n)&&!ee(i.content)&&!ie(i.content)&&!R(i)?cn([[l,w]]):cn([[y,rt(h,w,{groupId:d})]])}function yn(t,e){if(!t)return!0;switch(t.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return!0;default:return!1}if(e.proseWrap==="preserve")return t.position.start.line===t.position.end.line;if(/\\$/mu.test(e.originalText.slice(t.position.start.offset,t.position.end.offset)))return!1;switch(e.proseWrap){case"never":return!t.value.includes(` +`);case"always":return!/[\n ]/u.test(t.value);default:return!1}}function zi(t){var e;return((e=t.key.content)==null?void 0:e.type)==="alias"}function Zi(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":return t.position.start.line===t.position.end.line;case"alias":return!0;default:return!1}}var Mr=Xi;function eo(t){return mn(t,to)}function to(t){switch(t.type){case"document":xe(t,"head",()=>t.children[0]),xe(t,"body",()=>t.children[1]);break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":xe(t,"content",()=>t.children[0]);break;case"mappingItem":case"flowMappingItem":xe(t,"key",()=>t.children[0]),xe(t,"value",()=>t.children[1]);break}return t}var kr=eo;function no(t,e,n){let{node:r}=t,s=[];r.type!=="mappingValue"&&ee(r)&&s.push([v(N,t.map(n,"leadingComments")),N]);let{tag:i,anchor:o}=r;i&&s.push(n("tag")),i&&o&&s.push(" "),o&&s.push(n("anchor"));let a="";return H(r,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!Lt(t)&&(a=Tt(t,e.originalText)),(i||o)&&(H(r,["sequence","mapping"])&&!ie(r)?s.push(N):s.push(" ")),ie(r)&&s.push([r.middleComments.length===1?"":N,v(N,t.map(n,"middleComments")),N]),Or(t)?s.push(ir(e.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd())):s.push(Ie(ro(t,e,n))),K(r)&&!H(r,["document","documentHead"])&&s.push(lr([r.type==="mappingValue"&&!r.content?"":" ",t.parent.type==="mappingKey"&&t.getParentNode(2).type==="mapping"&&ot(r)?"":bt,n("trailingComment")])),dn(r)&&s.push(I(r.type==="sequenceItem"?2:0,[N,v(N,t.map(({node:c})=>[fr(e.originalText,Pe(c))?N:"",n()],"endComments"))])),s.push(a),s}function ro(t,e,n){let{node:r}=t;switch(r.type){case"root":{let s=[];t.each(({node:o,next:a,isFirst:c})=>{c||s.push(N),s.push(n()),vr(o,a)?(s.push(N,"..."),K(o)&&s.push(" ",n("trailingComment"))):a&&!K(a.head)&&s.push(N,"---")},"children");let i=At(r);return(!H(i,["blockLiteral","blockFolded"])||i.chomping!=="keep")&&s.push(N),s}case"document":{let s=[];return io(t,e)==="head"&&((r.head.children.length>0||r.head.endComments.length>0)&&s.push(n("head")),K(r.head)?s.push(["---"," ",n(["head","trailingComment"])]):s.push("---")),so(r)&&s.push(n("body")),v(N,s)}case"documentHead":return v(N,[...t.map(n,"children"),...t.map(n,"endComments")]);case"documentBody":{let{children:s,endComments:i}=r,o="";if(s.length>0&&i.length>0){let a=At(r);H(a,["blockFolded","blockLiteral"])?a.chomping!=="keep"&&(o=[N,N]):o=N}return[v(N,t.map(n,"children")),o,v(N,t.map(n,"endComments"))]}case"directive":return["%",v(" ",[r.name,...r.parameters])];case"comment":return["#",r.value];case"alias":return["*",r.value];case"tag":return e.originalText.slice(r.position.start.offset,r.position.end.offset);case"anchor":return["&",r.value];case"plain":return at(r.type,e.originalText.slice(r.position.start.offset,r.position.end.offset),e);case"quoteDouble":case"quoteSingle":{let s="'",i='"',o=e.originalText.slice(r.position.start.offset+1,r.position.end.offset-1);if(r.type==="quoteSingle"&&o.includes("\\")||r.type==="quoteDouble"&&/\\[^"]/u.test(o)){let c=r.type==="quoteDouble"?i:s;return[c,at(r.type,o,e),c]}if(o.includes(i))return[s,at(r.type,r.type==="quoteDouble"?Et(!1,Et(!1,o,String.raw`\"`,i),"'",s.repeat(2)):o,e),s];if(o.includes(s))return[i,at(r.type,r.type==="quoteSingle"?Et(!1,o,"''",s):o,e),i];let a=e.singleQuote?s:i;return[a,at(r.type,o,e),a]}case"blockFolded":case"blockLiteral":return Cr(t,n,e);case"mapping":case"sequence":return v(N,t.map(n,"children"));case"sequenceItem":return["- ",I(2,r.content?n("content"):"")];case"mappingKey":case"mappingValue":return r.content?n("content"):"";case"mappingItem":case"flowMappingItem":return Mr(t,n,e);case"flowMapping":return Ct(t,n,e);case"flowSequence":return Ct(t,n,e);case"flowSequenceItem":return n("content");default:throw new ur(r,"YAML")}}function so(t){return t.body.children.length>0||R(t.body)}function vr(t,e){return K(t)||e&&(e.head.children.length>0||R(e.head))}function io(t,e){let n=t.node;if(t.isFirst&&/---(?:\s|$)/u.test(e.originalText.slice(Pe(n),Pe(n)+4))||n.head.children.length>0||R(n.head)||K(n.head))return"head";let r=t.next;return vr(n,r)?!1:r?"root":!1}function at(t,e,n){let r=Ar(t,e,n);return v(N,r.map(s=>wt(v(ne,s))))}function Ir(t,e){if(H(t))switch(t.type){case"comment":if(Er(t.value))return null;break;case"quoteDouble":case"quoteSingle":e.type="quote";break}}Ir.ignoredProperties=new Set(["position"]);var oo={preprocess:kr,embed:mr,print:no,massageAstNode:Ir,insertPragma:wr,getVisitorKeys:dr},Pr=oo;var _r=[{linguistLanguageId:407,name:"YAML",type:"data",color:"#cb171e",tmScope:"source.yaml",aliases:["yml"],extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".gemrc","CITATION.cff","glide.lock",".prettierrc",".stylelintrc",".lintstagedrc"],aceMode:"yaml",codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","dockercompose","github-actions-workflow","home-assistant"]}];var Mt={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var ao={bracketSpacing:Mt.bracketSpacing,singleQuote:Mt.singleQuote,proseWrap:Mt.proseWrap},xr=ao;var tr={};nr(tr,{yaml:()=>Ga});var kt=` +`,Rr="\r",Dr=function(){function t(e){this.length=e.length;for(var n=[0],r=0;rthis.length)return null;for(var n=0,r=this.offsets;r[n+1]<=e;)n++;var s=e-r[n];return{line:n,column:s}},t.prototype.indexForLocation=function(e){var n=e.line,r=e.column;return n<0||n>=this.offsets.length||r<0||r>this.lengthOfLine(n)?null:this.offsets[n]+r},t.prototype.lengthOfLine=function(e){var n=this.offsets[e],r=e===this.offsets.length-1?this.length:this.offsets[e+1];return r-n},t}();function $(t,e=null){"children"in t&&t.children.forEach(n=>$(n,t)),"anchor"in t&&t.anchor&&$(t.anchor,t),"tag"in t&&t.tag&&$(t.tag,t),"leadingComments"in t&&t.leadingComments.forEach(n=>$(n,t)),"middleComments"in t&&t.middleComments.forEach(n=>$(n,t)),"indicatorComment"in t&&t.indicatorComment&&$(t.indicatorComment,t),"trailingComment"in t&&t.trailingComment&&$(t.trailingComment,t),"endComments"in t&&t.endComments.forEach(n=>$(n,t)),Object.defineProperty(t,"_parent",{value:e,enumerable:!1})}function de(t){return`${t.line}:${t.column}`}function Yr(t){$(t);let e=co(t),n=t.children.slice();t.comments.sort((r,s)=>r.position.start.offset-s.position.end.offset).filter(r=>!r._parent).forEach(r=>{for(;n.length>1&&r.position.start.line>n[0].position.end.line;)n.shift();lo(r,e,n[0])})}function co(t){let e=Array.from(new Array(t.position.end.line),()=>({}));for(let n of t.comments)e[n.position.start.line-1].comment=n;return $r(e,t),e}function $r(t,e){if(e.position.start.offset!==e.position.end.offset){if("leadingComments"in e){let{start:n}=e.position,{leadingAttachableNode:r}=t[n.line-1];(!r||n.column1&&e.type!=="document"&&e.type!=="documentHead"){let{end:n}=e.position,{trailingAttachableNode:r}=t[n.line-1];(!r||n.column>=r.position.end.column)&&(t[n.line-1].trailingAttachableNode=e)}if(e.type!=="root"&&e.type!=="document"&&e.type!=="documentHead"&&e.type!=="documentBody"){let{start:n,end:r}=e.position,s=[r.line].concat(n.line===r.line?[]:n.line);for(let i of s){let o=t[i-1].trailingNode;(!o||r.column>=o.position.end.column)&&(t[i-1].trailingNode=e)}}"children"in e&&e.children.forEach(n=>{$r(t,n)})}}function lo(t,e,n){let r=t.position.start.line,{trailingAttachableNode:s}=e[r-1];if(s){if(s.trailingComment)throw new Error(`Unexpected multiple trailing comment at ${de(t.position.start)}`);$(t,s),s.trailingComment=t;return}for(let o=r;o>=n.position.start.line;o--){let{trailingNode:a}=e[o-1],c;if(a)c=a;else if(o!==r&&e[o-1].comment)c=e[o-1].comment._parent;else continue;if((c.type==="sequence"||c.type==="mapping")&&(c=c.children[0]),c.type==="mappingItem"){let[l,f]=c.children;c=Br(l)?l:f}for(;;){if(fo(c,t)){$(t,c),c.endComments.push(t);return}if(!c._parent)break;c=c._parent}break}for(let o=r+1;o<=n.position.end.line;o++){let{leadingAttachableNode:a}=e[o-1];if(a){$(t,a),a.leadingComments.push(t);return}}let i=n.children[1];$(t,i),i.endComments.push(t)}function fo(t,e){if(t.position.start.offsete.position.end.offset)switch(t.type){case"flowMapping":case"flowSequence":return t.children.length===0||e.position.start.line>t.children[t.children.length-1].position.end.line}if(e.position.end.offsett.position.start.column;case"mappingKey":case"mappingValue":return e.position.start.column>t._parent.position.start.column&&(t.children.length===0||t.children.length===1&&t.children[0].type!=="blockFolded"&&t.children[0].type!=="blockLiteral")&&(t.type==="mappingValue"||Br(t));default:return!1}}function Br(t){return t.position.start!==t.position.end&&(t.children.length===0||t.position.start.offset!==t.children[0].position.start.offset)}function b(t,e){return{type:t,position:e}}function Fr(t,e,n){return{...b("root",t),children:e,comments:n}}function ct(t){switch(t.type){case"DOCUMENT":for(let e=t.contents.length-1;e>=0;e--)t.contents[e].type==="BLANK_LINE"?t.contents.splice(e,1):ct(t.contents[e]);for(let e=t.directives.length-1;e>=0;e--)t.directives[e].type==="BLANK_LINE"&&t.directives.splice(e,1);break;case"FLOW_MAP":case"FLOW_SEQ":case"MAP":case"SEQ":for(let e=t.items.length-1;e>=0;e--){let n=t.items[e];"char"in n||(n.type==="BLANK_LINE"?t.items.splice(e,1):ct(n))}break;case"MAP_KEY":case"MAP_VALUE":case"SEQ_ITEM":t.node&&ct(t.node);break;case"ALIAS":case"BLANK_LINE":case"BLOCK_FOLDED":case"BLOCK_LITERAL":case"COMMENT":case"DIRECTIVE":case"PLAIN":case"QUOTE_DOUBLE":case"QUOTE_SINGLE":break;default:throw new Error(`Unexpected node type ${JSON.stringify(t.type)}`)}}function X(){return{leadingComments:[]}}function oe(t=null){return{trailingComment:t}}function B(){return{...X(),...oe()}}function qr(t,e,n){return{...b("alias",t),...B(),...e,value:n}}function Ur(t,e){let n=t.cstNode;return qr(e.transformRange({origStart:n.valueRange.origStart-1,origEnd:n.valueRange.origEnd}),e.transformContent(t),n.rawValue)}function Kr(t){return{...t,type:"blockFolded"}}function Vr(t,e,n,r,s,i){return{...b("blockValue",t),...X(),...e,chomping:n,indent:r,value:s,indicatorComment:i}}var ae;(function(t){t.Tag="!",t.Anchor="&",t.Comment="#"})(ae||(ae={}));function Wr(t,e){return{...b("anchor",t),value:e}}function De(t,e){return{...b("comment",t),value:e}}function jr(t,e,n){return{anchor:e,tag:t,middleComments:n}}function Qr(t,e){return{...b("tag",t),value:e}}function vt(t,e,n=()=>!1){let r=t.cstNode,s=[],i=null,o=null,a=null;for(let c of r.props){let l=e.text[c.origStart];switch(l){case ae.Tag:i=i||c,o=Qr(e.transformRange(c),t.tag);break;case ae.Anchor:i=i||c,a=Wr(e.transformRange(c),r.anchor);break;case ae.Comment:{let f=De(e.transformRange(c),e.text.slice(c.origStart+1,c.origEnd));e.comments.push(f),!n(f)&&i&&i.origEnd<=c.origStart&&c.origEnd<=r.valueRange.origStart&&s.push(f);break}default:throw new Error(`Unexpected leading character ${JSON.stringify(l)}`)}}return jr(o,a,s)}var En;(function(t){t.CLIP="clip",t.STRIP="strip",t.KEEP="keep"})(En||(En={}));function It(t,e){let n=t.cstNode,r=1,s=n.chomping==="CLIP"?0:1,o=n.header.origEnd-n.header.origStart-r-s!==0,a=e.transformRange({origStart:n.header.origStart,origEnd:n.valueRange.origEnd}),c=null,l=vt(t,e,f=>{if(!(a.start.offset=0;c--){let l=t.contents[c];if(l.type==="COMMENT"){let f=e.transformNode(l);n&&n.line===f.position.start.line?o.unshift(f):a?r.unshift(f):f.position.start.offset>=t.valueRange.origEnd?i.unshift(f):r.unshift(f)}else a=!0}if(i.length>1)throw new Error(`Unexpected multiple document trailing comments at ${de(i[1].position.start)}`);if(o.length>1)throw new Error(`Unexpected multiple documentHead trailing comments at ${de(o[1].position.start)}`);return{comments:r,endComments:s,documentTrailingComment:q(i)||null,documentHeadTrailingComment:q(o)||null}}function po(t,e,n){let r=Pt(n.text.slice(t.valueRange.origEnd),/^\.\.\./),s=r===-1?t.valueRange.origEnd:Math.max(0,t.valueRange.origEnd-1);n.text[s-1]==="\r"&&s--;let i=n.transformRange({origStart:e!==null?e.position.start.offset:s,origEnd:s}),o=r===-1?i.end:n.transformOffset(t.valueRange.origEnd+3);return{position:i,documentEndPoint:o}}function rs(t,e,n,r){return{...b("documentHead",t),...F(n),...oe(r),children:e}}function ss(t,e){let n=t.cstNode,{directives:r,comments:s,endComments:i}=mo(n,e),{position:o,endMarkerPoint:a}=ho(n,r,e);return e.comments.push(...s,...i),{createDocumentHeadWithTrailingComment:l=>(l&&e.comments.push(l),rs(o,r,i,l)),documentHeadEndMarkerPoint:a}}function mo(t,e){let n=[],r=[],s=[],i=!1;for(let o=t.directives.length-1;o>=0;o--){let a=e.transformNode(t.directives[o]);a.type==="comment"?i?r.unshift(a):s.unshift(a):(i=!0,n.unshift(a))}return{directives:n,comments:r,endComments:s}}function ho(t,e,n){let r=Pt(n.text.slice(0,t.valueRange.origStart),/---\s*$/);r>0&&!/[\r\n]/.test(n.text[r-1])&&(r=-1);let s=r===-1?{origStart:t.valueRange.origStart,origEnd:t.valueRange.origStart}:{origStart:r,origEnd:r+3};return e.length!==0&&(s.origStart=e[0].position.start.offset),{position:n.transformRange(s),endMarkerPoint:r===-1?null:n.transformOffset(r)}}function is(t,e){let{createDocumentHeadWithTrailingComment:n,documentHeadEndMarkerPoint:r}=ss(t,e),{documentBody:s,documentEndPoint:i,documentTrailingComment:o,documentHeadTrailingComment:a}=ns(t,e,r),c=n(a);return o&&e.comments.push(o),es(V(c.position.start,i),c,s,o)}function _t(t,e,n){return{...b("flowCollection",t),...B(),...F(),...e,children:n}}function os(t,e,n){return{..._t(t,e,n),type:"flowMapping"}}function xt(t,e,n){return{...b("flowMappingItem",t),...X(),children:[e,n]}}function ce(t,e){let n=[];for(let r of t)r&&"type"in r&&r.type==="COMMENT"?e.comments.push(e.transformNode(r)):n.push(r);return n}function Rt(t){let[e,n]=["?",":"].map(r=>{let s=t.find(i=>"char"in i&&i.char===r);return s?{origStart:s.origOffset,origEnd:s.origOffset+1}:null});return{additionalKeyRange:e,additionalValueRange:n}}function Dt(t,e){let n=e;return r=>t.slice(n,n=r)}function Yt(t){let e=[],n=Dt(t,1),r=!1;for(let s=1;s{let l=r[c],{additionalKeyRange:f,additionalValueRange:m}=Rt(l);return $e(a,e,xt,f,m)}),i=n[0],o=q(n);return os(e.transformRange({origStart:i.origOffset,origEnd:o.origOffset+1}),e.transformContent(t),s)}function cs(t,e,n){return{..._t(t,e,n),type:"flowSequence"}}function ls(t,e){return{...b("flowSequenceItem",t),children:[e]}}function fs(t,e){let n=ce(t.cstNode.items,e),r=Yt(n),s=t.items.map((a,c)=>{if(a.type!=="PAIR"){let l=e.transformNode(a);return ls(V(l.position.start,l.position.end),l)}else{let l=r[c],{additionalKeyRange:f,additionalValueRange:m}=Rt(l);return $e(a,e,xt,f,m)}}),i=n[0],o=q(n);return cs(e.transformRange({origStart:i.origOffset,origEnd:o.origOffset+1}),e.transformContent(t),s)}function us(t,e,n){return{...b("mapping",t),...X(),...e,children:n}}function ps(t,e,n){return{...b("mappingItem",t),...X(),children:[e,n]}}function ms(t,e){let n=t.cstNode;n.items.filter(o=>o.type==="MAP_KEY"||o.type==="MAP_VALUE").forEach(o=>Ye(o,e));let r=ce(n.items,e),s=go(r),i=t.items.map((o,a)=>{let c=s[a],[l,f]=c[0].type==="MAP_VALUE"?[null,c[0].range]:[c[0].range,c.length===1?null:c[1].range];return $e(o,e,ps,l,f)});return us(V(i[0].position.start,q(i).position.end),e.transformContent(t),i)}function go(t){let e=[],n=Dt(t,0),r=!1;for(let s=0;s=0;r--)if(n.test(t[r]))return r;return-1}function ds(t,e){let n=t.cstNode;return hs(e.transformRange({origStart:n.valueRange.origStart,origEnd:gs(e.text,n.valueRange.origEnd-1,/\S/)+1}),e.transformContent(t),n.strValue)}function ys(t){return{...t,type:"quoteDouble"}}function Es(t,e,n){return{...b("quoteValue",t),...e,...B(),value:n}}function $t(t,e){let n=t.cstNode;return Es(e.transformRange(n.valueRange),e.transformContent(t),n.strValue)}function Ss(t,e){return ys($t(t,e))}function ws(t){return{...t,type:"quoteSingle"}}function bs(t,e){return ws($t(t,e))}function Ns(t,e,n){return{...b("sequence",t),...X(),...F(),...e,children:n}}function Os(t,e){return{...b("sequenceItem",t),...B(),...F(),children:e?[e]:[]}}function Ls(t,e){let r=ce(t.cstNode.items,e).map((s,i)=>{Ye(s,e);let o=e.transformNode(t.items[i]);return Os(V(e.transformOffset(s.valueRange.origStart),o===null?e.transformOffset(s.valueRange.origStart+1):o.position.end),o)});return Ns(V(r[0].position.start,q(r).position.end),e.transformContent(t),r)}function As(t,e){if(t===null||t.type===void 0&&t.value===null)return null;switch(t.type){case"ALIAS":return Ur(t,e);case"BLOCK_FOLDED":return Jr(t,e);case"BLOCK_LITERAL":return Hr(t,e);case"COMMENT":return Xr(t,e);case"DIRECTIVE":return Zr(t,e);case"DOCUMENT":return is(t,e);case"FLOW_MAP":return as(t,e);case"FLOW_SEQ":return fs(t,e);case"MAP":return ms(t,e);case"PLAIN":return ds(t,e);case"QUOTE_DOUBLE":return Ss(t,e);case"QUOTE_SINGLE":return bs(t,e);case"SEQ":return Ls(t,e);default:throw new Error(`Unexpected node type ${t.type}`)}}function Ts(t,e,n){let r=new SyntaxError(t);return r.name="YAMLSyntaxError",r.source=e,r.position=n,r}function Cs(t,e){let n=t.source.range||t.source.valueRange;return Ts(t.message,e.text,e.transformRange(n))}function Ms(t,e,n){return{offset:t,line:e,column:n}}function ks(t,e){t<0?t=0:t>e.text.length&&(t=e.text.length);let n=e.locator.locationForIndex(t);return Ms(t,n.line+1,n.column+1)}function vs(t,e){return V(e.transformOffset(t.origStart),e.transformOffset(t.origEnd))}function Is(t){if(!t.setOrigRanges()){let e=n=>{if(yo(n))return n.origStart=n.start,n.origEnd=n.end,!0;if(Eo(n))return n.origOffset=n.offset,!0};t.forEach(n=>Nn(n,e))}}function Nn(t,e){if(!(!t||typeof t!="object")&&e(t)!==!0)for(let n of Object.keys(t)){if(n==="context"||n==="error")continue;let r=t[n];Array.isArray(r)?r.forEach(s=>Nn(s,e)):Nn(r,e)}}function yo(t){return typeof t.start=="number"}function Eo(t){return typeof t.offset=="number"}function On(t){if("children"in t){if(t.children.length===1){let e=t.children[0];if(e.type==="plain"&&e.tag===null&&e.anchor===null&&e.value==="")return t.children.splice(0,1),t}t.children.forEach(On)}return t}function Ln(t,e,n,r){let s=e(t);return i=>{r(s,i)&&n(t,s=i)}}function An(t){if(t===null||!("children"in t))return;let e=t.children;if(e.forEach(An),t.type==="document"){let[i,o]=t.children;i.position.start.offset===i.position.end.offset?i.position.start=i.position.end=o.position.start:o.position.start.offset===o.position.end.offset&&(o.position.start=o.position.end=i.position.end)}let n=Ln(t.position,So,wo,Oo),r=Ln(t.position,bo,No,Lo);"endComments"in t&&t.endComments.length!==0&&(n(t.endComments[0].position.start),r(q(t.endComments).position.end));let s=e.filter(i=>i!==null);if(s.length!==0){let i=s[0],o=q(s);n(i.position.start),r(o.position.end),"leadingComments"in i&&i.leadingComments.length!==0&&n(i.leadingComments[0].position.start),"tag"in i&&i.tag&&n(i.tag.position.start),"anchor"in i&&i.anchor&&n(i.anchor.position.start),"trailingComment"in o&&o.trailingComment&&r(o.trailingComment.position.end)}}function So(t){return t.start}function wo(t,e){t.start=e}function bo(t){return t.end}function No(t,e){t.end=e}function Oo(t,e){return e.offsett.offset}var wi=sr(Ei(),1);var G=sr(Si(),1),Vm=G.default.findPair,Wm=G.default.toJSON,jm=G.default.parseMap,Qm=G.default.parseSeq,Jm=G.default.stringifyNumber,Gm=G.default.stringifyString,Hm=G.default.Type,Va=G.default.YAMLError,Xm=G.default.YAMLReferenceError,er=G.default.YAMLSemanticError,Wa=G.default.YAMLSyntaxError,zm=G.default.YAMLWarning;var{Document:bi,parseCST:Ni}=wi.default;function Oi(t){let e=Ni(t);Is(e);let n=e.map(a=>new bi({merge:!1,keepCstNodes:!0}).parse(a)),r=new Dr(t),s=[],i={text:t,locator:r,comments:s,transformOffset:a=>ks(a,i),transformRange:a=>vs(a,i),transformNode:a=>As(a,i),transformContent:a=>vt(a,i)};for(let a of n)for(let c of a.errors)if(!(c instanceof er&&c.message==='Map keys must be unique; "<<" is repeated'))throw Cs(c,i);n.forEach(a=>ct(a.cstNode));let o=Fr(i.transformRange({origStart:0,origEnd:i.text.length}),n.map(i.transformNode),s);return Yr(o),An(o),On(o),o}function Qa(t,e){let n=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(n,e)}var Li=Qa;function Ja(t){try{let e=Oi(t);return delete e.comments,e}catch(e){throw e!=null&&e.position?Li(e.message,{loc:e.position,cause:e}):e}}var Ga={astFormat:"yaml",parse:Ja,hasPragma:Sr,locStart:Pe,locEnd:yr};var Ha={yaml:Pr};return Ii(Xa);}); \ No newline at end of file diff --git a/node_modules/prettier/plugins/yaml.mjs b/node_modules/prettier/plugins/yaml.mjs new file mode 100644 index 0000000..b808fd5 --- /dev/null +++ b/node_modules/prettier/plugins/yaml.mjs @@ -0,0 +1,161 @@ +var Ti=Object.create;var tn=Object.defineProperty;var Ci=Object.getOwnPropertyDescriptor;var Mi=Object.getOwnPropertyNames;var ki=Object.getPrototypeOf,vi=Object.prototype.hasOwnProperty;var te=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),rr=(t,e)=>{for(var n in e)tn(t,n,{get:e[n],enumerable:!0})},Ii=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Mi(e))!vi.call(t,s)&&s!==n&&tn(t,s,{get:()=>e[s],enumerable:!(r=Ci(e,s))||r.enumerable});return t};var sr=(t,e,n)=>(n=t!=null?Ti(ki(t)):{},Ii(e||!t||!t.__esModule?tn(n,"default",{value:t,enumerable:!0}):n,t));var le=te(U=>{"use strict";var re={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},lt={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},Ao="tag:yaml.org,2002:",To={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function Ps(t){let e=[0],n=t.indexOf(` +`);for(;n!==-1;)n+=1,e.push(n),n=t.indexOf(` +`,n);return e}function _s(t){let e,n;return typeof t=="string"?(e=Ps(t),n=t):(Array.isArray(t)&&(t=t[0]),t&&t.context&&(t.lineStarts||(t.lineStarts=Ps(t.context.src)),e=t.lineStarts,n=t.context.src)),{lineStarts:e,src:n}}function Tn(t,e){if(typeof t!="number"||t<0)return null;let{lineStarts:n,src:r}=_s(e);if(!n||!r||t>r.length)return null;for(let i=0;i=1)||t>n.length)return null;let s=n[t-1],i=n[t];for(;i&&i>s&&r[i-1]===` +`;)--i;return r.slice(s,i)}function Mo({start:t,end:e},n,r=80){let s=Co(t.line,n);if(!s)return null;let{col:i}=t;if(s.length>r)if(i<=r-10)s=s.substr(0,r-1)+"\u2026";else{let f=Math.round(r/2);s.length>i+f&&(s=s.substr(0,i+f-1)+"\u2026"),i-=s.length-r,s="\u2026"+s.substr(1-r)}let o=1,a="";e&&(e.line===t.line&&i+(e.col-t.col)<=r+1?o=e.col-t.col:(o=Math.min(s.length+1,r)-i,a="\u2026"));let c=i>1?" ".repeat(i-1):"",l="^".repeat(o);return`${s} +${c}${l}${a}`}var Be=class t{static copy(e){return new t(e.start,e.end)}constructor(e,n){this.start=e,this.end=n||e}isEmpty(){return typeof this.start!="number"||!this.end||this.end<=this.start}setOrigRange(e,n){let{start:r,end:s}=this;if(e.length===0||s<=e[0])return this.origStart=r,this.origEnd=s,n;let i=n;for(;ir);)++i;this.origStart=r+i;let o=i;for(;i=s);)++i;return this.origEnd=s+i,o}},se=class t{static addStringTerminator(e,n,r){if(r[r.length-1]===` +`)return r;let s=t.endOfWhiteSpace(e,n);return s>=e.length||e[s]===` +`?r+` +`:r}static atDocumentBoundary(e,n,r){let s=e[n];if(!s)return!0;let i=e[n-1];if(i&&i!==` +`)return!1;if(r){if(s!==r)return!1}else if(s!==re.DIRECTIVES_END&&s!==re.DOCUMENT_END)return!1;let o=e[n+1],a=e[n+2];if(o!==s||a!==s)return!1;let c=e[n+3];return!c||c===` +`||c===" "||c===" "}static endOfIdentifier(e,n){let r=e[n],s=r==="<",i=s?[` +`," "," ",">"]:[` +`," "," ","[","]","{","}",","];for(;r&&i.indexOf(r)===-1;)r=e[n+=1];return s&&r===">"&&(n+=1),n}static endOfIndent(e,n){let r=e[n];for(;r===" ";)r=e[n+=1];return n}static endOfLine(e,n){let r=e[n];for(;r&&r!==` +`;)r=e[n+=1];return n}static endOfWhiteSpace(e,n){let r=e[n];for(;r===" "||r===" ";)r=e[n+=1];return n}static startOfLine(e,n){let r=e[n-1];if(r===` +`)return n;for(;r&&r!==` +`;)r=e[n-=1];return n+1}static endOfBlockIndent(e,n,r){let s=t.endOfIndent(e,r);if(s>r+n)return s;{let i=t.endOfWhiteSpace(e,s),o=e[i];if(!o||o===` +`)return i}return null}static atBlank(e,n,r){let s=e[n];return s===` +`||s===" "||s===" "||r&&!s}static nextNodeIsIndented(e,n,r){return!e||n<0?!1:n>0?!0:r&&e==="-"}static normalizeOffset(e,n){let r=e[n];return r?r!==` +`&&e[n-1]===` +`?n-1:t.endOfWhiteSpace(e,n):n}static foldNewline(e,n,r){let s=0,i=!1,o="",a=e[n+1];for(;a===" "||a===" "||a===` +`;){switch(a){case` +`:s=0,n+=1,o+=` +`;break;case" ":s<=r&&(i=!0),n=t.endOfWhiteSpace(e,n+2)-1;break;case" ":s+=1,n+=1;break}a=e[n+1]}return o||(o=" "),a&&s<=r&&(i=!0),{fold:o,offset:n,error:i}}constructor(e,n,r){Object.defineProperty(this,"context",{value:r||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=n||[],this.type=e,this.value=null}getPropValue(e,n,r){if(!this.context)return null;let{src:s}=this.context,i=this.props[e];return i&&s[i.start]===n?s.slice(i.start+(r?1:0),i.end):null}get anchor(){for(let e=0;e0?e.join(` +`):null}commentHasRequiredWhitespace(e){let{src:n}=this.context;if(this.header&&e===this.header.end||!this.valueRange)return!1;let{end:r}=this.valueRange;return e!==r||t.atBlank(n,r-1)}get hasComment(){if(this.context){let{src:e}=this.context;for(let n=0;nr.setOrigRange(e,n)),n}toString(){let{context:{src:e},range:n,value:r}=this;if(r!=null)return r;let s=e.slice(n.start,n.end);return t.addStringTerminator(e,n.end,s)}},ye=class extends Error{constructor(e,n,r){if(!r||!(n instanceof se))throw new Error(`Invalid arguments for new ${e}`);super(),this.name=e,this.message=r,this.source=n}makePretty(){if(!this.source)return;this.nodeType=this.source.type;let e=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new Be(this.offset,this.offset+1);let n=e&&Tn(this.offset,e);if(n){let r={line:n.line,col:n.col+1};this.linePos={start:n,end:r}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){let{line:n,col:r}=this.linePos.start;this.message+=` at line ${n}, column ${r}`;let s=e&&Mo(this.linePos,e);s&&(this.message+=`: + +${s} +`)}delete this.source}},Cn=class extends ye{constructor(e,n){super("YAMLReferenceError",e,n)}},ft=class extends ye{constructor(e,n){super("YAMLSemanticError",e,n)}},Mn=class extends ye{constructor(e,n){super("YAMLSyntaxError",e,n)}},kn=class extends ye{constructor(e,n){super("YAMLWarning",e,n)}};function ko(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var vn=class t extends se{static endOfLine(e,n,r){let s=e[n],i=n;for(;s&&s!==` +`&&!(r&&(s==="["||s==="]"||s==="{"||s==="}"||s===","));){let o=e[i+1];if(s===":"&&(!o||o===` +`||o===" "||o===" "||r&&o===",")||(s===" "||s===" ")&&o==="#")break;i+=1,s=o}return i}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:n}=this.valueRange,{src:r}=this.context,s=r[n-1];for(;el?r.slice(l,a+1):c)}else i+=c}let o=r[e];switch(o){case" ":{let a="Plain value cannot start with a tab character";return{errors:[new ft(this,a)],str:i}}case"@":case"`":{let a=`Plain value cannot start with reserved character ${o}`;return{errors:[new ft(this,a)],str:i}}default:return i}}parseBlockValue(e){let{indent:n,inFlow:r,src:s}=this.context,i=e,o=e;for(let a=s[i];a===` +`&&!se.atDocumentBoundary(s,i+1);a=s[i]){let c=se.endOfBlockIndent(s,n,i+1);if(c===null||s[c]==="#")break;s[c]===` +`?i=c:(o=t.endOfLine(s,c,r),i=o)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=o,o}parse(e,n){this.context=e;let{inFlow:r,src:s}=e,i=n,o=s[i];return o&&o!=="#"&&o!==` +`&&(i=t.endOfLine(s,n,r)),this.valueRange=new Be(n,i),i=se.endOfWhiteSpace(s,i),i=this.parseComment(i),(!this.hasComment||this.valueRange.isEmpty())&&(i=this.parseBlockValue(i)),i}};U.Char=re;U.Node=se;U.PlainValue=vn;U.Range=Be;U.Type=lt;U.YAMLError=ye;U.YAMLReferenceError=Cn;U.YAMLSemanticError=ft;U.YAMLSyntaxError=Mn;U.YAMLWarning=kn;U._defineProperty=ko;U.defaultTagPrefix=Ao;U.defaultTags=To});var Rs=te(xs=>{"use strict";var u=le(),Se=class extends u.Node{constructor(){super(u.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(e,n){return this.context=e,this.range=new u.Range(n,n+1),n+1}},ut=class extends u.Node{constructor(e,n){super(e,n),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,{atLineStart:i,lineStart:o}=e;!i&&this.type===u.Type.SEQ_ITEM&&(this.error=new u.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));let a=i?n-o:e.indent,c=u.Node.endOfWhiteSpace(s,n+1),l=s[c],f=l==="#",m=[],d=null;for(;l===` +`||l==="#";){if(l==="#"){let h=u.Node.endOfLine(s,c+1);m.push(new u.Range(c,h)),c=h}else{i=!0,o=c+1;let h=u.Node.endOfWhiteSpace(s,o);s[h]===` +`&&m.length===0&&(d=new Se,o=d.parse({src:s},o)),c=u.Node.endOfIndent(s,o)}l=s[c]}if(u.Node.nextNodeIsIndented(l,c-(o+a),this.type!==u.Type.SEQ_ITEM)?this.node=r({atLineStart:i,inCollection:!1,indent:a,lineStart:o,parent:this},c):l&&o>n+1&&(c=o-1),this.node){if(d){let h=e.parent.items||e.parent.contents;h&&h.push(d)}m.length&&Array.prototype.push.apply(this.props,m),c=this.node.range.end}else if(f){let h=m[0];this.props.push(h),c=h.end}else c=u.Node.endOfLine(s,n+1);let y=this.node?this.node.valueRange.end:c;return this.valueRange=new u.Range(n,y),c}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.node?this.node.setOrigRanges(e,n):n}toString(){let{context:{src:e},node:n,range:r,value:s}=this;if(s!=null)return s;let i=n?e.slice(r.start,n.range.start)+String(n):e.slice(r.start,r.end);return u.Node.addStringTerminator(e,r.end,i)}},Ee=class extends u.Node{constructor(){super(u.Type.COMMENT)}parse(e,n){this.context=e;let r=this.parseComment(n);return this.range=new u.Range(n,r),r}};function In(t){let e=t;for(;e instanceof ut;)e=e.node;if(!(e instanceof $t))return null;let n=e.items.length,r=-1;for(let o=n-1;o>=0;--o){let a=e.items[o];if(a.type===u.Type.COMMENT){let{indent:c,lineStart:l}=a.context;if(c>0&&a.range.start>=l+c)break;r=o}else if(a.type===u.Type.BLANK_LINE)r=o;else break}if(r===-1)return null;let s=e.items.splice(r,n-r),i=s[0].range.start;for(;e.range.end=i,e.valueRange&&e.valueRange.end>i&&(e.valueRange.end=i),e!==t;)e=e.context.parent;return s}var $t=class t extends u.Node{static nextContentHasIndent(e,n,r){let s=u.Node.endOfLine(e,n)+1;n=u.Node.endOfWhiteSpace(e,s);let i=e[n];return i?n>=s+r?!0:i!=="#"&&i!==` +`?!1:t.nextContentHasIndent(e,n,r):!1}constructor(e){super(e.type===u.Type.SEQ_ITEM?u.Type.SEQ:u.Type.MAP);for(let r=e.props.length-1;r>=0;--r)if(e.props[r].start0}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,i=u.Node.startOfLine(s,n),o=this.items[0];o.context.parent=this,this.valueRange=u.Range.copy(o.valueRange);let a=o.range.start-o.context.lineStart,c=n;c=u.Node.normalizeOffset(s,c);let l=s[c],f=u.Node.endOfWhiteSpace(s,i)===c,m=!1;for(;l;){for(;l===` +`||l==="#";){if(f&&l===` +`&&!m){let h=new Se;if(c=h.parse({src:s},c),this.valueRange.end=c,c>=s.length){l=null;break}this.items.push(h),c-=1}else if(l==="#"){if(c=s.length){l=null;break}}if(i=c+1,c=u.Node.endOfIndent(s,i),u.Node.atBlank(s,c)){let h=u.Node.endOfWhiteSpace(s,c),g=s[h];(!g||g===` +`||g==="#")&&(c=h)}l=s[c],f=!0}if(!l)break;if(c!==i+a&&(f||l!==":")){if(cn&&(c=i);break}else if(!this.error){let h="All collection items must start at the same column";this.error=new u.YAMLSyntaxError(this,h)}}if(o.type===u.Type.SEQ_ITEM){if(l!=="-"){i>n&&(c=i);break}}else if(l==="-"&&!this.error){let h=s[c+1];if(!h||h===` +`||h===" "||h===" "){let g="A collection cannot be both a mapping and a sequence";this.error=new u.YAMLSyntaxError(this,g)}}let d=r({atLineStart:f,inCollection:!0,indent:a,lineStart:i,parent:this},c);if(!d)return c;if(this.items.push(d),this.valueRange.end=d.valueRange.end,c=u.Node.normalizeOffset(s,d.range.end),l=s[c],f=!1,m=d.includesTrailingLines,l){let h=c-1,g=s[h];for(;g===" "||g===" ";)g=s[--h];g===` +`&&(i=h+1,f=!0)}let y=In(d);y&&Array.prototype.push.apply(this.items,y)}return c}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.items.forEach(r=>{n=r.setOrigRanges(e,n)}),n}toString(){let{context:{src:e},items:n,range:r,value:s}=this;if(s!=null)return s;let i=e.slice(r.start,n[0].range.start)+String(n[0]);for(let o=1;o0&&(this.contents=this.directives,this.directives=[]),i}return n[i]?(this.directivesEndMarker=new u.Range(i,i+3),i+3):(s?this.error=new u.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),i)}parseContents(e){let{parseNode:n,src:r}=this.context;this.contents||(this.contents=[]);let s=e;for(;r[s-1]==="-";)s-=1;let i=u.Node.endOfWhiteSpace(r,e),o=s===e;for(this.valueRange=new u.Range(i);!u.Node.atDocumentBoundary(r,i,u.Char.DOCUMENT_END);){switch(r[i]){case` +`:if(o){let a=new Se;i=a.parse({src:r},i),i{n=r.setOrigRanges(e,n)}),this.directivesEndMarker&&(n=this.directivesEndMarker.setOrigRange(e,n)),this.contents.forEach(r=>{n=r.setOrigRanges(e,n)}),this.documentEndMarker&&(n=this.documentEndMarker.setOrigRange(e,n)),n}toString(){let{contents:e,directives:n,value:r}=this;if(r!=null)return r;let s=n.join("");return e.length>0&&((n.length>0||e[0].type===u.Type.COMMENT)&&(s+=`--- +`),s+=e.join("")),s[s.length-1]!==` +`&&(s+=` +`),s}},xn=class extends u.Node{parse(e,n){this.context=e;let{src:r}=e,s=u.Node.endOfIdentifier(r,n+1);return this.valueRange=new u.Range(n+1,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}},fe={CLIP:"CLIP",KEEP:"KEEP",STRIP:"STRIP"},Rn=class extends u.Node{constructor(e,n){super(e,n),this.blockIndent=null,this.chomping=fe.CLIP,this.header=null}get includesTrailingLines(){return this.chomping===fe.KEEP}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:n}=this.valueRange,{indent:r,src:s}=this.context;if(this.valueRange.isEmpty())return"";let i=null,o=s[n-1];for(;o===` +`||o===" "||o===" ";){if(n-=1,n<=e){if(this.chomping===fe.KEEP)break;return""}o===` +`&&(i=n),o=s[n-1]}let a=n+1;i&&(this.chomping===fe.KEEP?(a=i,n=this.valueRange.end):n=i);let c=r+this.blockIndent,l=this.type===u.Type.BLOCK_FOLDED,f=!0,m="",d="",y=!1;for(let h=e;ha&&(a=m);r[l]===` +`?i=l:i=o=u.Node.endOfLine(r,l)}return this.chomping!==fe.KEEP&&(i=r[o]?o+1:o),this.valueRange=new u.Range(e+1,i),i}parse(e,n){this.context=e;let{src:r}=e,s=this.parseBlockHeader(n);return s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s=this.parseBlockValue(s),s}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.header?this.header.setOrigRange(e,n):n}},Dn=class extends u.Node{constructor(e,n){super(e,n),this.items=null}prevNodeIsJsonLike(e=this.items.length){let n=this.items[e-1];return!!n&&(n.jsonLike||n.type===u.Type.COMMENT&&this.prevNodeIsJsonLike(e-1))}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,{indent:i,lineStart:o}=e,a=s[n];this.items=[{char:a,offset:n}];let c=u.Node.endOfWhiteSpace(s,n+1);for(a=s[c];a&&a!=="]"&&a!=="}";){switch(a){case` +`:{o=c+1;let l=u.Node.endOfWhiteSpace(s,o);if(s[l]===` +`){let f=new Se;o=f.parse({src:s},o),this.items.push(f)}if(c=u.Node.endOfIndent(s,o),c<=o+i&&(a=s[c],c{if(r instanceof u.Node)n=r.setOrigRanges(e,n);else if(e.length===0)r.origOffset=r.offset;else{let s=n;for(;sr.offset);)++s;r.origOffset=r.offset+s,n=s}}),n}toString(){let{context:{src:e},items:n,range:r,value:s}=this;if(s!=null)return s;let i=n.filter(c=>c instanceof u.Node),o="",a=r.start;return i.forEach(c=>{let l=e.slice(a,c.range.start);a=c.range.end,o+=l+String(c),o[o.length-1]===` +`&&e[a-1]!==` +`&&e[a]===` +`&&(a+=1)}),o+=e.slice(a,r.end),u.Node.addStringTerminator(e,r.end,o)}},Yn=class t extends u.Node{static endOfQuote(e,n){let r=e[n];for(;r&&r!=='"';)n+=r==="\\"?2:1,r=e[n];return n+1}get strValue(){if(!this.valueRange||!this.context)return null;let e=[],{start:n,end:r}=this.valueRange,{indent:s,src:i}=this.context;i[r-1]!=='"'&&e.push(new u.YAMLSyntaxError(this,'Missing closing "quote'));let o="";for(let a=n+1;al?i.slice(l,a+1):c)}else o+=c}return e.length>0?{errors:e,str:o}:o}parseCharCode(e,n,r){let{src:s}=this.context,i=s.substr(e,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;return isNaN(a)?(r.push(new u.YAMLSyntaxError(this,`Invalid escape sequence ${s.substr(e-2,n+2)}`)),s.substr(e-2,n+2)):String.fromCodePoint(a)}parse(e,n){this.context=e;let{src:r}=e,s=t.endOfQuote(r,n+1);return this.valueRange=new u.Range(n,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}},$n=class t extends u.Node{static endOfQuote(e,n){let r=e[n];for(;r;)if(r==="'"){if(e[n+1]!=="'")break;r=e[n+=2]}else r=e[n+=1];return n+1}get strValue(){if(!this.valueRange||!this.context)return null;let e=[],{start:n,end:r}=this.valueRange,{indent:s,src:i}=this.context;i[r-1]!=="'"&&e.push(new u.YAMLSyntaxError(this,"Missing closing 'quote"));let o="";for(let a=n+1;al?i.slice(l,a+1):c)}else o+=c}return e.length>0?{errors:e,str:o}:o}parse(e,n){this.context=e;let{src:r}=e,s=t.endOfQuote(r,n+1);return this.valueRange=new u.Range(n,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}};function vo(t,e){switch(t){case u.Type.ALIAS:return new xn(t,e);case u.Type.BLOCK_FOLDED:case u.Type.BLOCK_LITERAL:return new Rn(t,e);case u.Type.FLOW_MAP:case u.Type.FLOW_SEQ:return new Dn(t,e);case u.Type.MAP_KEY:case u.Type.MAP_VALUE:case u.Type.SEQ_ITEM:return new ut(t,e);case u.Type.COMMENT:case u.Type.PLAIN:return new u.PlainValue(t,e);case u.Type.QUOTE_DOUBLE:return new Yn(t,e);case u.Type.QUOTE_SINGLE:return new $n(t,e);default:return null}}var Bn=class t{static parseType(e,n,r){switch(e[n]){case"*":return u.Type.ALIAS;case">":return u.Type.BLOCK_FOLDED;case"|":return u.Type.BLOCK_LITERAL;case"{":return u.Type.FLOW_MAP;case"[":return u.Type.FLOW_SEQ;case"?":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.MAP_KEY:u.Type.PLAIN;case":":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.MAP_VALUE:u.Type.PLAIN;case"-":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.SEQ_ITEM:u.Type.PLAIN;case'"':return u.Type.QUOTE_DOUBLE;case"'":return u.Type.QUOTE_SINGLE;default:return u.Type.PLAIN}}constructor(e={},{atLineStart:n,inCollection:r,inFlow:s,indent:i,lineStart:o,parent:a}={}){u._defineProperty(this,"parseNode",(c,l)=>{if(u.Node.atDocumentBoundary(this.src,l))return null;let f=new t(this,c),{props:m,type:d,valueStart:y}=f.parseProps(l),h=vo(d,m),g=h.parse(f,y);if(h.range=new u.Range(l,g),g<=l&&(h.error=new Error("Node#parse consumed no characters"),h.error.parseEnd=g,h.error.source=h,h.range.end=l+1),f.nodeStartsCollection(h)){!h.error&&!f.atLineStart&&f.parent.type===u.Type.DOCUMENT&&(h.error=new u.YAMLSyntaxError(h,"Block collection must not have preceding content here (e.g. directives-end indicator)"));let w=new $t(h);return g=w.parse(new t(f),g),w.range=new u.Range(l,g),w}return h}),this.atLineStart=n??(e.atLineStart||!1),this.inCollection=r??(e.inCollection||!1),this.inFlow=s??(e.inFlow||!1),this.indent=i??e.indent,this.lineStart=o??e.lineStart,this.parent=a??(e.parent||{}),this.root=e.root,this.src=e.src}nodeStartsCollection(e){let{inCollection:n,inFlow:r,src:s}=this;if(n||r)return!1;if(e instanceof ut)return!0;let i=e.range.end;return s[i]===` +`||s[i-1]===` +`?!1:(i=u.Node.endOfWhiteSpace(s,i),s[i]===":")}parseProps(e){let{inFlow:n,parent:r,src:s}=this,i=[],o=!1;e=this.atLineStart?u.Node.endOfIndent(s,e):u.Node.endOfWhiteSpace(s,e);let a=s[e];for(;a===u.Char.ANCHOR||a===u.Char.COMMENT||a===u.Char.TAG||a===` +`;){if(a===` +`){let l=e,f;do f=l+1,l=u.Node.endOfIndent(s,f);while(s[l]===` +`);let m=l-(f+this.indent),d=r.type===u.Type.SEQ_ITEM&&r.context.atLineStart;if(s[l]!=="#"&&!u.Node.nextNodeIsIndented(s[l],m,!d))break;this.atLineStart=!0,this.lineStart=f,o=!1,e=l}else if(a===u.Char.COMMENT){let l=u.Node.endOfLine(s,e+1);i.push(new u.Range(e,l)),e=l}else{let l=u.Node.endOfIdentifier(s,e+1);a===u.Char.TAG&&s[l]===","&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(s.slice(e+1,l+13))&&(l=u.Node.endOfIdentifier(s,l+5)),i.push(new u.Range(e,l)),o=!0,e=u.Node.endOfWhiteSpace(s,l)}a=s[e]}o&&a===":"&&u.Node.atBlank(s,e+1,!0)&&(e-=1);let c=t.parseType(s,e,n);return{props:i,type:c,valueStart:e}}};function Io(t){let e=[];t.indexOf("\r")!==-1&&(t=t.replace(/\r\n?/g,(s,i)=>(s.length>1&&e.push(i),` +`)));let n=[],r=0;do{let s=new _n,i=new Bn({src:t});r=s.parse(i,r),n.push(s)}while(r{if(e.length===0)return!1;for(let i=1;in.join(`... +`),n}xs.parse=Io});var qe=te(k=>{"use strict";var p=le();function Po(t,e,n){return n?`#${n.replace(/[\s\S]^/gm,`$&${e}#`)} +${e}${t}`:t}function Fe(t,e,n){return n?n.indexOf(` +`)===-1?`${t} #${n}`:`${t} +`+n.replace(/^/gm,`${e||""}#`):t}var W=class{};function ue(t,e,n){if(Array.isArray(t))return t.map((r,s)=>ue(r,String(s),n));if(t&&typeof t.toJSON=="function"){let r=n&&n.anchors&&n.anchors.get(t);r&&(n.onCreate=i=>{r.res=i,delete n.onCreate});let s=t.toJSON(e,n);return r&&n.onCreate&&n.onCreate(s),s}return(!n||!n.keep)&&typeof t=="bigint"?Number(t):t}var P=class extends W{constructor(e){super(),this.value=e}toJSON(e,n){return n&&n.keep?this.value:ue(this.value,e,n)}toString(){return String(this.value)}};function Ds(t,e,n){let r=n;for(let s=e.length-1;s>=0;--s){let i=e[s];if(Number.isInteger(i)&&i>=0){let o=[];o[i]=r,r=o}else{let o={};Object.defineProperty(o,i,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=o}}return t.createNode(r,!1)}var Bs=t=>t==null||typeof t=="object"&&t[Symbol.iterator]().next().done,j=class t extends W{constructor(e){super(),p._defineProperty(this,"items",[]),this.schema=e}addIn(e,n){if(Bs(e))this.add(n);else{let[r,...s]=e,i=this.get(r,!0);if(i instanceof t)i.addIn(s,n);else if(i===void 0&&this.schema)this.set(r,Ds(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}deleteIn([e,...n]){if(n.length===0)return this.delete(e);let r=this.get(e,!0);if(r instanceof t)return r.deleteIn(n);throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`)}getIn([e,...n],r){let s=this.get(e,!0);return n.length===0?!r&&s instanceof P?s.value:s:s instanceof t?s.getIn(n,r):void 0}hasAllNullValues(){return this.items.every(e=>{if(!e||e.type!=="PAIR")return!1;let n=e.value;return n==null||n instanceof P&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn([e,...n]){if(n.length===0)return this.has(e);let r=this.get(e,!0);return r instanceof t?r.hasIn(n):!1}setIn([e,...n],r){if(n.length===0)this.set(e,r);else{let s=this.get(e,!0);if(s instanceof t)s.setIn(n,r);else if(s===void 0&&this.schema)this.set(e,Ds(this.schema,n,r));else throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`)}}toJSON(){return null}toString(e,{blockItem:n,flowChars:r,isMap:s,itemIndent:i},o,a){let{indent:c,indentStep:l,stringify:f}=e,m=this.type===p.Type.FLOW_MAP||this.type===p.Type.FLOW_SEQ||e.inFlow;m&&(i+=l);let d=s&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:d,indent:i,inFlow:m,type:null});let y=!1,h=!1,g=this.items.reduce((C,L,M)=>{let A;L&&(!y&&L.spaceBefore&&C.push({type:"comment",str:""}),L.commentBefore&&L.commentBefore.match(/^.*$/gm).forEach(Ai=>{C.push({type:"comment",str:`#${Ai}`})}),L.comment&&(A=L.comment),m&&(!y&&L.spaceBefore||L.commentBefore||L.comment||L.key&&(L.key.commentBefore||L.key.comment)||L.value&&(L.value.commentBefore||L.value.comment))&&(h=!0)),y=!1;let _=f(L,e,()=>A=null,()=>y=!0);return m&&!h&&_.includes(` +`)&&(h=!0),m&&MA.str);if(h||M.reduce((A,_)=>A+_.length+2,2)>t.maxFlowStringSingleLineLength){w=C;for(let A of M)w+=A?` +${l}${c}${A}`:` +`;w+=` +${c}${L}`}else w=`${C} ${M.join(" ")} ${L}`}else{let C=g.map(n);w=C.shift();for(let L of C)w+=L?` +${c}${L}`:` +`}return this.comment?(w+=` +`+this.comment.replace(/^/gm,`${c}#`),o&&o()):y&&a&&a(),w}};p._defineProperty(j,"maxFlowStringSingleLineLength",60);function Bt(t){let e=t instanceof P?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),Number.isInteger(e)&&e>=0?e:null}var pe=class extends j{add(e){this.items.push(e)}delete(e){let n=Bt(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){let r=Bt(e);if(typeof r!="number")return;let s=this.items[r];return!n&&s instanceof P?s.value:s}has(e){let n=Bt(e);return typeof n=="number"&&ns.type==="comment"?s.str:`- ${s.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(e.indent||"")+" "},n,r):JSON.stringify(this)}},_o=(t,e,n)=>e===null?"":typeof e!="object"?String(e):t instanceof W&&n&&n.doc?t.toString({anchors:Object.create(null),doc:n.doc,indent:"",indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(e),T=class t extends W{constructor(e,n=null){super(),this.key=e,this.value=n,this.type=t.Type.PAIR}get commentBefore(){return this.key instanceof W?this.key.commentBefore:void 0}set commentBefore(e){if(this.key==null&&(this.key=new P(null)),this.key instanceof W)this.key.commentBefore=e;else{let n="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(n)}}addToJSMap(e,n){let r=ue(this.key,"",e);if(n instanceof Map){let s=ue(this.value,r,e);n.set(r,s)}else if(n instanceof Set)n.add(r);else{let s=_o(this.key,r,e),i=ue(this.value,s,e);s in n?Object.defineProperty(n,s,{value:i,writable:!0,enumerable:!0,configurable:!0}):n[s]=i}return n}toJSON(e,n){let r=n&&n.mapAsMap?new Map:{};return this.addToJSMap(n,r)}toString(e,n,r){if(!e||!e.doc)return JSON.stringify(this);let{indent:s,indentSeq:i,simpleKeys:o}=e.doc.options,{key:a,value:c}=this,l=a instanceof W&&a.comment;if(o){if(l)throw new Error("With simple keys, key nodes cannot have comments");if(a instanceof j){let _="With simple keys, collection cannot be used as a key value";throw new Error(_)}}let f=!o&&(!a||l||(a instanceof W?a instanceof j||a.type===p.Type.BLOCK_FOLDED||a.type===p.Type.BLOCK_LITERAL:typeof a=="object")),{doc:m,indent:d,indentStep:y,stringify:h}=e;e=Object.assign({},e,{implicitKey:!f,indent:d+y});let g=!1,w=h(a,e,()=>l=null,()=>g=!0);if(w=Fe(w,e.indent,l),!f&&w.length>1024){if(o)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(e.allNullValues&&!o)return this.comment?(w=Fe(w,e.indent,this.comment),n&&n()):g&&!l&&r&&r(),e.inFlow&&!f?w:`? ${w}`;w=f?`? ${w} +${d}:`:`${w}:`,this.comment&&(w=Fe(w,e.indent,this.comment),n&&n());let C="",L=null;if(c instanceof W){if(c.spaceBefore&&(C=` +`),c.commentBefore){let _=c.commentBefore.replace(/^/gm,`${e.indent}#`);C+=` +${_}`}L=c.comment}else c&&typeof c=="object"&&(c=m.schema.createNode(c,!0));e.implicitKey=!1,!f&&!this.comment&&c instanceof P&&(e.indentAtStart=w.length+1),g=!1,!i&&s>=2&&!e.inFlow&&!f&&c instanceof pe&&c.type!==p.Type.FLOW_SEQ&&!c.tag&&!m.anchors.getName(c)&&(e.indent=e.indent.substr(2));let M=h(c,e,()=>L=null,()=>g=!0),A=" ";return C||this.comment?A=`${C} +${e.indent}`:!f&&c instanceof j?(!(M[0]==="["||M[0]==="{")||M.includes(` +`))&&(A=` +${e.indent}`):M[0]===` +`&&(A=""),g&&!L&&r&&r(),Fe(w+A+M,e.indent,L)}};p._defineProperty(T,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var Ft=(t,e)=>{if(t instanceof be){let n=e.get(t.source);return n.count*n.aliasCount}else if(t instanceof j){let n=0;for(let r of t.items){let s=Ft(r,e);s>n&&(n=s)}return n}else if(t instanceof T){let n=Ft(t.key,e),r=Ft(t.value,e);return Math.max(n,r)}return 1},be=class t extends W{static stringify({range:e,source:n},{anchors:r,doc:s,implicitKey:i,inStringifyKey:o}){let a=Object.keys(r).find(l=>r[l]===n);if(!a&&o&&(a=s.anchors.getName(n)||s.anchors.newName()),a)return`*${a}${i?" ":""}`;let c=s.anchors.getName(n)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${c} [${e}]`)}constructor(e){super(),this.source=e,this.type=p.Type.ALIAS}set tag(e){throw new Error("Alias nodes cannot have tags")}toJSON(e,n){if(!n)return ue(this.source,e,n);let{anchors:r,maxAliasCount:s}=n,i=r.get(this.source);if(!i||i.res===void 0){let o="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new p.YAMLReferenceError(this.cstNode,o):new ReferenceError(o)}if(s>=0&&(i.count+=1,i.aliasCount===0&&(i.aliasCount=Ft(this.source,r)),i.count*i.aliasCount>s)){let o="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new p.YAMLReferenceError(this.cstNode,o):new ReferenceError(o)}return i.res}toString(e){return t.stringify(this,e)}};p._defineProperty(be,"default",!0);function pt(t,e){let n=e instanceof P?e.value:e;for(let r of t)if(r instanceof T&&(r.key===e||r.key===n||r.key&&r.key.value===n))return r}var mt=class extends j{add(e,n){e?e instanceof T||(e=new T(e.key||e,e.value)):e=new T(e);let r=pt(this.items,e.key),s=this.schema&&this.schema.sortMapEntries;if(r)if(n)r.value=e.value;else throw new Error(`Key ${e.key} already set`);else if(s){let i=this.items.findIndex(o=>s(e,o)<0);i===-1?this.items.push(e):this.items.splice(i,0,e)}else this.items.push(e)}delete(e){let n=pt(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){let r=pt(this.items,e),s=r&&r.value;return!n&&s instanceof P?s.value:s}has(e){return!!pt(this.items,e)}set(e,n){this.add(new T(e,n),!0)}toJSON(e,n,r){let s=r?new r:n&&n.mapAsMap?new Map:{};n&&n.onCreate&&n.onCreate(s);for(let i of this.items)i.addToJSMap(n,s);return s}toString(e,n,r){if(!e)return JSON.stringify(this);for(let s of this.items)if(!(s instanceof T))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return super.toString(e,{blockItem:s=>s.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},n,r)}},Fs="<<",Kt=class extends T{constructor(e){if(e instanceof T){let n=e.value;n instanceof pe||(n=new pe,n.items.push(e.value),n.range=e.value.range),super(e.key,n),this.range=e.range}else super(new P(Fs),new pe);this.type=T.Type.MERGE_PAIR}addToJSMap(e,n){for(let{source:r}of this.value.items){if(!(r instanceof mt))throw new Error("Merge sources must be maps");let s=r.toJSON(null,e,Map);for(let[i,o]of s)n instanceof Map?n.has(i)||n.set(i,o):n instanceof Set?n.add(i):Object.prototype.hasOwnProperty.call(n,i)||Object.defineProperty(n,i,{value:o,writable:!0,enumerable:!0,configurable:!0})}return n}toString(e,n){let r=this.value;if(r.items.length>1)return super.toString(e,n);this.value=r.items[0];let s=super.toString(e,n);return this.value=r,s}},xo={defaultType:p.Type.BLOCK_LITERAL,lineWidth:76},Ro={trueStr:"true",falseStr:"false"},Do={asBigInt:!1},Yo={nullStr:"null"},Ne={defaultType:p.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function qn(t,e,n){for(let{format:r,test:s,resolve:i}of e)if(s){let o=t.match(s);if(o){let a=i.apply(null,o);return a instanceof P||(a=new P(a)),r&&(a.format=r),a}}return n&&(t=n(t)),new P(t)}var qs="flow",Fn="block",qt="quoted",Ys=(t,e)=>{let n=t[e+1];for(;n===" "||n===" ";){do n=t[e+=1];while(n&&n!==` +`);n=t[e+1]}return e};function Vt(t,e,n,{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}){if(!s||s<0)return t;let c=Math.max(1+i,1+s-e.length);if(t.length<=c)return t;let l=[],f={},m=s-e.length;typeof r=="number"&&(r>s-Math.max(2,i)?l.push(0):m=s-r);let d,y,h=!1,g=-1,w=-1,C=-1;n===Fn&&(g=Ys(t,g),g!==-1&&(m=g+c));for(let M;M=t[g+=1];){if(n===qt&&M==="\\"){switch(w=g,t[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}C=g}if(M===` +`)n===Fn&&(g=Ys(t,g)),m=g+c,d=void 0;else{if(M===" "&&y&&y!==" "&&y!==` +`&&y!==" "){let A=t[g+1];A&&A!==" "&&A!==` +`&&A!==" "&&(d=g)}if(g>=m)if(d)l.push(d),m=d+c,d=void 0;else if(n===qt){for(;y===" "||y===" ";)y=M,M=t[g+=1],h=!0;let A=g>C+1?g-2:w-1;if(f[A])return t;l.push(A),f[A]=!0,m=A+c,d=void 0}else h=!0}y=M}if(h&&a&&a(),l.length===0)return t;o&&o();let L=t.slice(0,l[0]);for(let M=0;Mt?Object.assign({indentAtStart:t},Ne.fold):Ne.fold,Wt=t=>/^(%|---|\.\.\.)/m.test(t);function $o(t,e,n){if(!e||e<0)return!1;let r=e-n,s=t.length;if(s<=r)return!1;for(let i=0,o=0;ir)return!0;if(o=i+1,s-o<=r)return!1}return!0}function we(t,e){let{implicitKey:n}=e,{jsonEncoding:r,minMultiLineLength:s}=Ne.doubleQuoted,i=JSON.stringify(t);if(r)return i;let o=e.indent||(Wt(t)?" ":""),a="",c=0;for(let l=0,f=i[l];f;f=i[++l])if(f===" "&&i[l+1]==="\\"&&i[l+2]==="n"&&(a+=i.slice(c,l)+"\\ ",l+=1,c=l,f="\\"),f==="\\")switch(i[l+1]){case"u":{a+=i.slice(c,l);let m=i.substr(l+2,4);switch(m){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:m.substr(0,2)==="00"?a+="\\x"+m.substr(2):a+=i.substr(l,6)}l+=5,c=l+1}break;case"n":if(n||i[l+2]==='"'||i.length";if(!n)return l+` +`;let f="",m="";if(n=n.replace(/[\n\t ]*$/,y=>{let h=y.indexOf(` +`);return h===-1?l+="-":(n===y||h!==y.length-1)&&(l+="+",i&&i()),m=y.replace(/\n$/,""),""}).replace(/^[\n ]*/,y=>{y.indexOf(" ")!==-1&&(l+=a);let h=y.match(/ +$/);return h?(f=y.slice(0,-h[0].length),h[0]):(f=y,"")}),m&&(m=m.replace(/\n+(?!\n|$)/g,`$&${o}`)),f&&(f=f.replace(/\n+/g,`$&${o}`)),t&&(l+=" #"+t.replace(/ ?[\r\n]+/g," "),s&&s()),!n)return`${l}${a} +${o}${m}`;if(c)return n=n.replace(/\n+/g,`$&${o}`),`${l} +${o}${f}${n}${m}`;n=n.replace(/\n+/g,` +$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${o}`);let d=Vt(`${f}${n}${m}`,o,Fn,Ne.fold);return`${l} +${o}${d}`}function Bo(t,e,n,r){let{comment:s,type:i,value:o}=t,{actualString:a,implicitKey:c,indent:l,inFlow:f}=e;if(c&&/[\n[\]{},]/.test(o)||f&&/[[\]{},]/.test(o))return we(o,e);if(!o||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return c||f||o.indexOf(` +`)===-1?o.indexOf('"')!==-1&&o.indexOf("'")===-1?Us(o,e):we(o,e):Ut(t,e,n,r);if(!c&&!f&&i!==p.Type.PLAIN&&o.indexOf(` +`)!==-1)return Ut(t,e,n,r);if(l===""&&Wt(o))return e.forceBlockIndent=!0,Ut(t,e,n,r);let m=o.replace(/\n+/g,`$& +${l}`);if(a){let{tags:y}=e.doc.schema;if(typeof qn(m,y,y.scalarFallback).value!="string")return we(o,e)}let d=c?m:Vt(m,l,qs,Un(e));return s&&!f&&(d.indexOf(` +`)!==-1||s.indexOf(` +`)!==-1)?(n&&n(),Po(d,l,s)):d}function Fo(t,e,n,r){let{defaultType:s}=Ne,{implicitKey:i,inFlow:o}=e,{type:a,value:c}=t;typeof c!="string"&&(c=String(c),t=Object.assign({},t,{value:c}));let l=m=>{switch(m){case p.Type.BLOCK_FOLDED:case p.Type.BLOCK_LITERAL:return Ut(t,e,n,r);case p.Type.QUOTE_DOUBLE:return we(c,e);case p.Type.QUOTE_SINGLE:return Us(c,e);case p.Type.PLAIN:return Bo(t,e,n,r);default:return null}};(a!==p.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)||(i||o)&&(a===p.Type.BLOCK_FOLDED||a===p.Type.BLOCK_LITERAL))&&(a=p.Type.QUOTE_DOUBLE);let f=l(a);if(f===null&&(f=l(s),f===null))throw new Error(`Unsupported default string type ${s}`);return f}function qo({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let s=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let i=s.indexOf(".");i<0&&(i=s.length,s+=".");let o=e-(s.length-i-1);for(;o-- >0;)s+="0"}return s}function Ks(t,e){let n,r;switch(e.type){case p.Type.FLOW_MAP:n="}",r="flow map";break;case p.Type.FLOW_SEQ:n="]",r="flow sequence";break;default:t.push(new p.YAMLSemanticError(e,"Not a flow collection!?"));return}let s;for(let i=e.items.length-1;i>=0;--i){let o=e.items[i];if(!o||o.type!==p.Type.COMMENT){s=o;break}}if(s&&s.char!==n){let i=`Expected ${r} to end with ${n}`,o;typeof s.offset=="number"?(o=new p.YAMLSemanticError(e,i),o.offset=s.offset+1):(o=new p.YAMLSemanticError(s,i),s.range&&s.range.end&&(o.offset=s.range.end-s.range.start)),t.push(o)}}function Vs(t,e){let n=e.context.src[e.range.start-1];if(n!==` +`&&n!==" "&&n!==" "){let r="Comments must be separated from other tokens by white space characters";t.push(new p.YAMLSemanticError(e,r))}}function Ws(t,e){let n=String(e),r=n.substr(0,8)+"..."+n.substr(-8);return new p.YAMLSemanticError(t,`The "${r}" key is too long`)}function js(t,e){for(let{afterKey:n,before:r,comment:s}of e){let i=t.items[r];i?(n&&i.value&&(i=i.value),s===void 0?(n||!i.commentBefore)&&(i.spaceBefore=!0):i.commentBefore?i.commentBefore+=` +`+s:i.commentBefore=s):s!==void 0&&(t.comment?t.comment+=` +`+s:t.comment=s)}}function Kn(t,e){let n=e.strValue;return n?typeof n=="string"?n:(n.errors.forEach(r=>{r.source||(r.source=e),t.errors.push(r)}),n.str):""}function Uo(t,e){let{handle:n,suffix:r}=e.tag,s=t.tagPrefixes.find(i=>i.handle===n);if(!s){let i=t.getDefaults().tagPrefixes;if(i&&(s=i.find(o=>o.handle===n)),!s)throw new p.YAMLSemanticError(e,`The ${n} tag handle is non-default and was not declared.`)}if(!r)throw new p.YAMLSemanticError(e,`The ${n} tag has no suffix.`);if(n==="!"&&(t.version||t.options.version)==="1.0"){if(r[0]==="^")return t.warnings.push(new p.YAMLWarning(e,"YAML 1.0 ^ tag expansion is not supported")),r;if(/[:/]/.test(r)){let i=r.match(/^([a-z0-9-]+)\/(.*)/i);return i?`tag:${i[1]}.yaml.org,2002:${i[2]}`:`tag:${r}`}}return s.prefix+decodeURIComponent(r)}function Ko(t,e){let{tag:n,type:r}=e,s=!1;if(n){let{handle:i,suffix:o,verbatim:a}=n;if(a){if(a!=="!"&&a!=="!!")return a;let c=`Verbatim tags aren't resolved, so ${a} is invalid.`;t.errors.push(new p.YAMLSemanticError(e,c))}else if(i==="!"&&!o)s=!0;else try{return Uo(t,e)}catch(c){t.errors.push(c)}}switch(r){case p.Type.BLOCK_FOLDED:case p.Type.BLOCK_LITERAL:case p.Type.QUOTE_DOUBLE:case p.Type.QUOTE_SINGLE:return p.defaultTags.STR;case p.Type.FLOW_MAP:case p.Type.MAP:return p.defaultTags.MAP;case p.Type.FLOW_SEQ:case p.Type.SEQ:return p.defaultTags.SEQ;case p.Type.PLAIN:return s?p.defaultTags.STR:null;default:return null}}function $s(t,e,n){let{tags:r}=t.schema,s=[];for(let o of r)if(o.tag===n)if(o.test)s.push(o);else{let a=o.resolve(t,e);return a instanceof j?a:new P(a)}let i=Kn(t,e);return typeof i=="string"&&s.length>0?qn(i,s,r.scalarFallback):null}function Vo({type:t}){switch(t){case p.Type.FLOW_MAP:case p.Type.MAP:return p.defaultTags.MAP;case p.Type.FLOW_SEQ:case p.Type.SEQ:return p.defaultTags.SEQ;default:return p.defaultTags.STR}}function Wo(t,e,n){try{let r=$s(t,e,n);if(r)return n&&e.tag&&(r.tag=n),r}catch(r){return r.source||(r.source=e),t.errors.push(r),null}try{let r=Vo(e);if(!r)throw new Error(`The tag ${n} is unavailable`);let s=`The tag ${n} is unavailable, falling back to ${r}`;t.warnings.push(new p.YAMLWarning(e,s));let i=$s(t,e,r);return i.tag=n,i}catch(r){let s=new p.YAMLReferenceError(e,r.message);return s.stack=r.stack,t.errors.push(s),null}}var jo=t=>{if(!t)return!1;let{type:e}=t;return e===p.Type.MAP_KEY||e===p.Type.MAP_VALUE||e===p.Type.SEQ_ITEM};function Qo(t,e){let n={before:[],after:[]},r=!1,s=!1,i=jo(e.context.parent)?e.context.parent.props.concat(e.props):e.props;for(let{start:o,end:a}of i)switch(e.context.src[o]){case p.Char.COMMENT:{if(!e.commentHasRequiredWhitespace(o)){let m="Comments must be separated from other tokens by white space characters";t.push(new p.YAMLSemanticError(e,m))}let{header:c,valueRange:l}=e;(l&&(o>l.start||c&&o>c.start)?n.after:n.before).push(e.context.src.slice(o+1,a));break}case p.Char.ANCHOR:if(r){let c="A node can have at most one anchor";t.push(new p.YAMLSemanticError(e,c))}r=!0;break;case p.Char.TAG:if(s){let c="A node can have at most one tag";t.push(new p.YAMLSemanticError(e,c))}s=!0;break}return{comments:n,hasAnchor:r,hasTag:s}}function Jo(t,e){let{anchors:n,errors:r,schema:s}=t;if(e.type===p.Type.ALIAS){let o=e.rawValue,a=n.getNode(o);if(!a){let l=`Aliased anchor not found: ${o}`;return r.push(new p.YAMLReferenceError(e,l)),null}let c=new be(a);return n._cstAliases.push(c),c}let i=Ko(t,e);if(i)return Wo(t,e,i);if(e.type!==p.Type.PLAIN){let o=`Failed to resolve ${e.type} node here`;return r.push(new p.YAMLSyntaxError(e,o)),null}try{let o=Kn(t,e);return qn(o,s.tags,s.tags.scalarFallback)}catch(o){return o.source||(o.source=e),r.push(o),null}}function me(t,e){if(!e)return null;e.error&&t.errors.push(e.error);let{comments:n,hasAnchor:r,hasTag:s}=Qo(t.errors,e);if(r){let{anchors:o}=t,a=e.anchor,c=o.getNode(a);c&&(o.map[o.newName(a)]=c),o.map[a]=e}if(e.type===p.Type.ALIAS&&(r||s)){let o="An alias node must not specify any properties";t.errors.push(new p.YAMLSemanticError(e,o))}let i=Jo(t,e);if(i){i.range=[e.range.start,e.range.end],t.options.keepCstNodes&&(i.cstNode=e),t.options.keepNodeTypes&&(i.type=e.type);let o=n.before.join(` +`);o&&(i.commentBefore=i.commentBefore?`${i.commentBefore} +${o}`:o);let a=n.after.join(` +`);a&&(i.comment=i.comment?`${i.comment} +${a}`:a)}return e.resolved=i}function Go(t,e){if(e.type!==p.Type.MAP&&e.type!==p.Type.FLOW_MAP){let o=`A ${e.type} node cannot be resolved as a mapping`;return t.errors.push(new p.YAMLSyntaxError(e,o)),null}let{comments:n,items:r}=e.type===p.Type.FLOW_MAP?Zo(t,e):zo(t,e),s=new mt;s.items=r,js(s,n);let i=!1;for(let o=0;o{if(f instanceof be){let{type:m}=f.source;return m===p.Type.MAP||m===p.Type.FLOW_MAP?!1:l="Merge nodes aliases can only point to maps"}return l="Merge nodes can only have Alias nodes as values"}),l&&t.errors.push(new p.YAMLSemanticError(e,l))}else for(let c=o+1;c{if(r.length===0)return!1;let{start:s}=r[0];if(e&&s>e.valueRange.start||n[s]!==p.Char.COMMENT)return!1;for(let i=t;i0){c=new p.PlainValue(p.Type.PLAIN,[]),c.context={parent:a,src:a.context.src};let f=a.range.start+1;if(c.range={start:f,end:f},c.valueRange={start:f,end:f},typeof a.range.origStart=="number"){let m=a.range.origStart+1;c.range.origStart=c.range.origEnd=m,c.valueRange.origStart=c.valueRange.origEnd=m}}let l=new T(s,me(t,c));Xo(a,l),r.push(l),s&&typeof i=="number"&&a.range.start>i+1024&&t.errors.push(Ws(e,s)),s=void 0,i=null}break;default:s!==void 0&&r.push(new T(s)),s=me(t,a),i=a.range.start,a.error&&t.errors.push(a.error);e:for(let c=o+1;;++c){let l=e.items[c];switch(l&&l.type){case p.Type.BLANK_LINE:case p.Type.COMMENT:continue e;case p.Type.MAP_VALUE:break e;default:{let f="Implicit map keys need to be followed by map values";t.errors.push(new p.YAMLSemanticError(a,f));break e}}}if(a.valueRangeContainsNewline){let c="Implicit map keys need to be on a single line";t.errors.push(new p.YAMLSemanticError(a,c))}}}return s!==void 0&&r.push(new T(s)),{comments:n,items:r}}function Zo(t,e){let n=[],r=[],s,i=!1,o="{";for(let a=0;ai instanceof T&&i.key instanceof j)){let i="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";t.warnings.push(new p.YAMLWarning(e,i))}return e.resolved=s,s}function ta(t,e){let n=[],r=[];for(let s=0;so+1024&&t.errors.push(Ws(e,i));let{src:h}=c.context;for(let g=o;g{"use strict";var Q=le(),O=qe(),ra={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(t,e)=>{let n=O.resolveString(t,e);if(typeof Buffer=="function")return Buffer.from(n,"base64");if(typeof atob=="function"){let r=atob(n.replace(/[\n\r]/g,"")),s=new Uint8Array(r.length);for(let i=0;i{let o;if(typeof Buffer=="function")o=n instanceof Buffer?n.toString("base64"):Buffer.from(n.buffer).toString("base64");else if(typeof btoa=="function"){let a="";for(let c=0;c1){let o="Each pair must have its own sequence indicator";throw new Q.YAMLSemanticError(e,o)}let i=s.items[0]||new O.Pair;s.commentBefore&&(i.commentBefore=i.commentBefore?`${s.commentBefore} +${i.commentBefore}`:s.commentBefore),s.comment&&(i.comment=i.comment?`${s.comment} +${i.comment}`:s.comment),s=i}n.items[r]=s instanceof O.Pair?s:new O.Pair(s)}}return n}function Gs(t,e,n){let r=new O.YAMLSeq(t);r.tag="tag:yaml.org,2002:pairs";for(let s of e){let i,o;if(Array.isArray(s))if(s.length===2)i=s[0],o=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let c=Object.keys(s);if(c.length===1)i=c[0],o=s[i];else throw new TypeError(`Expected { key: value } tuple: ${s}`)}else i=s;let a=t.createPair(i,o,n);r.items.push(a)}return r}var sa={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Js,createNode:Gs},Ue=class t extends O.YAMLSeq{constructor(){super(),Q._defineProperty(this,"add",O.YAMLMap.prototype.add.bind(this)),Q._defineProperty(this,"delete",O.YAMLMap.prototype.delete.bind(this)),Q._defineProperty(this,"get",O.YAMLMap.prototype.get.bind(this)),Q._defineProperty(this,"has",O.YAMLMap.prototype.has.bind(this)),Q._defineProperty(this,"set",O.YAMLMap.prototype.set.bind(this)),this.tag=t.tag}toJSON(e,n){let r=new Map;n&&n.onCreate&&n.onCreate(r);for(let s of this.items){let i,o;if(s instanceof O.Pair?(i=O.toJSON(s.key,"",n),o=O.toJSON(s.value,i,n)):i=O.toJSON(s,"",n),r.has(i))throw new Error("Ordered maps must not include duplicate keys");r.set(i,o)}return r}};Q._defineProperty(Ue,"tag","tag:yaml.org,2002:omap");function ia(t,e){let n=Js(t,e),r=[];for(let{key:s}of n.items)if(s instanceof O.Scalar)if(r.includes(s.value)){let i="Ordered maps must not include duplicate keys";throw new Q.YAMLSemanticError(e,i)}else r.push(s.value);return Object.assign(new Ue,n)}function oa(t,e,n){let r=Gs(t,e,n),s=new Ue;return s.items=r.items,s}var aa={identify:t=>t instanceof Map,nodeClass:Ue,default:!1,tag:"tag:yaml.org,2002:omap",resolve:ia,createNode:oa},Ke=class t extends O.YAMLMap{constructor(){super(),this.tag=t.tag}add(e){let n=e instanceof O.Pair?e:new O.Pair(e);O.findPair(this.items,n.key)||this.items.push(n)}get(e,n){let r=O.findPair(this.items,e);return!n&&r instanceof O.Pair?r.key instanceof O.Scalar?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let r=O.findPair(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new O.Pair(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(e,n,r);throw new Error("Set items must all have null values")}};Q._defineProperty(Ke,"tag","tag:yaml.org,2002:set");function ca(t,e){let n=O.resolveMap(t,e);if(!n.hasAllNullValues())throw new Q.YAMLSemanticError(e,"Set items must all have null values");return Object.assign(new Ke,n)}function la(t,e,n){let r=new Ke;for(let s of e)r.items.push(t.createPair(s,null,n));return r}var fa={identify:t=>t instanceof Set,nodeClass:Ke,default:!1,tag:"tag:yaml.org,2002:set",resolve:ca,createNode:la},Vn=(t,e)=>{let n=e.split(":").reduce((r,s)=>r*60+Number(s),0);return t==="-"?-n:n},Hs=({value:t})=>{if(isNaN(t)||!isFinite(t))return O.stringifyNumber(t);let e="";t<0&&(e="-",t=Math.abs(t));let n=[t%60];return t<60?n.unshift(0):(t=Math.round((t-n[0])/60),n.unshift(t%60),t>=60&&(t=Math.round((t-n[0])/60),n.unshift(t))),e+n.map(r=>r<10?"0"+String(r):String(r)).join(":").replace(/000000\d*$/,"")},ua={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(t,e,n)=>Vn(e,n.replace(/_/g,"")),stringify:Hs},pa={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(t,e,n)=>Vn(e,n.replace(/_/g,"")),stringify:Hs},ma={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:(t,e,n,r,s,i,o,a,c)=>{a&&(a=(a+"00").substr(1,3));let l=Date.UTC(e,n-1,r,s||0,i||0,o||0,a||0);if(c&&c!=="Z"){let f=Vn(c[0],c.slice(1));Math.abs(f)<30&&(f*=60),l-=6e4*f}return new Date(l)},stringify:({value:t})=>t.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function Wn(t){let e={};return t?typeof YAML_SILENCE_DEPRECATION_WARNINGS<"u"?!YAML_SILENCE_DEPRECATION_WARNINGS:!e.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<"u"?!YAML_SILENCE_WARNINGS:!e.YAML_SILENCE_WARNINGS}function jn(t,e){Wn(!1)&&console.warn(e?`${e}: ${t}`:t)}function ha(t){if(Wn(!0)){let e=t.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");jn(`The endpoint 'yaml/${e}' will be removed in a future release.`,"DeprecationWarning")}}var Qs={};function ga(t,e){if(!Qs[t]&&Wn(!0)){Qs[t]=!0;let n=`The option '${t}' will be removed in a future release`;n+=e?`, use '${e}' instead.`:".",jn(n,"DeprecationWarning")}}z.binary=ra;z.floatTime=pa;z.intTime=ua;z.omap=aa;z.pairs=sa;z.set=fa;z.timestamp=ma;z.warn=jn;z.warnFileDeprecation=ha;z.warnOptionDeprecation=ga});var Xn=te(li=>{"use strict";var Jt=le(),E=qe(),D=Qn();function da(t,e,n){let r=new E.YAMLMap(t);if(e instanceof Map)for(let[s,i]of e)r.items.push(t.createPair(s,i,n));else if(e&&typeof e=="object")for(let s of Object.keys(e))r.items.push(t.createPair(s,e[s],n));return typeof t.sortMapEntries=="function"&&r.items.sort(t.sortMapEntries),r}var gt={createNode:da,default:!0,nodeClass:E.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:E.resolveMap};function ya(t,e,n){let r=new E.YAMLSeq(t);if(e&&e[Symbol.iterator])for(let s of e){let i=t.createNode(s,n.wrapScalars,null,n);r.items.push(i)}return r}var Gt={createNode:ya,default:!0,nodeClass:E.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:E.resolveSeq},Ea={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:E.resolveString,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),E.stringifyString(t,e,n,r)},options:E.strOptions},Gn=[gt,Gt,Ea],Ht=t=>typeof t=="bigint"||Number.isInteger(t),Hn=(t,e,n)=>E.intOptions.asBigInt?BigInt(t):parseInt(e,n);function Zs(t,e,n){let{value:r}=t;return Ht(r)&&r>=0?n+r.toString(e):E.stringifyNumber(t)}var ei={identify:t=>t==null,createNode:(t,e,n)=>n.wrapScalars?new E.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:E.nullOptions,stringify:()=>E.nullOptions.nullStr},ti={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>t[0]==="t"||t[0]==="T",options:E.boolOptions,stringify:({value:t})=>t?E.boolOptions.trueStr:E.boolOptions.falseStr},ni={identify:t=>Ht(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(t,e)=>Hn(t,e,8),options:E.intOptions,stringify:t=>Zs(t,8,"0o")},ri={identify:Ht,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:t=>Hn(t,t,10),options:E.intOptions,stringify:E.stringifyNumber},si={identify:t=>Ht(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(t,e)=>Hn(t,e,16),options:E.intOptions,stringify:t=>Zs(t,16,"0x")},ii={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(t,e)=>e?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:E.stringifyNumber},oi={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify:({value:t})=>Number(t).toExponential()},ai={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(t,e,n){let r=e||n,s=new E.Scalar(parseFloat(t));return r&&r[r.length-1]==="0"&&(s.minFractionDigits=r.length),s},stringify:E.stringifyNumber},Sa=Gn.concat([ei,ti,ni,ri,si,ii,oi,ai]),Xs=t=>typeof t=="bigint"||Number.isInteger(t),jt=({value:t})=>JSON.stringify(t),ci=[gt,Gt,{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:E.resolveString,stringify:jt},{identify:t=>t==null,createNode:(t,e,n)=>n.wrapScalars?new E.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:jt},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:t=>t==="true",stringify:jt},{identify:Xs,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:t=>E.intOptions.asBigInt?BigInt(t):parseInt(t,10),stringify:({value:t})=>Xs(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:jt}];ci.scalarFallback=t=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(t)}`)};var zs=({value:t})=>t?E.boolOptions.trueStr:E.boolOptions.falseStr,ht=t=>typeof t=="bigint"||Number.isInteger(t);function Qt(t,e,n){let r=e.replace(/_/g,"");if(E.intOptions.asBigInt){switch(n){case 2:r=`0b${r}`;break;case 8:r=`0o${r}`;break;case 16:r=`0x${r}`;break}let i=BigInt(r);return t==="-"?BigInt(-1)*i:i}let s=parseInt(r,n);return t==="-"?-1*s:s}function Jn(t,e,n){let{value:r}=t;if(ht(r)){let s=r.toString(e);return r<0?"-"+n+s.substr(1):n+s}return E.stringifyNumber(t)}var wa=Gn.concat([{identify:t=>t==null,createNode:(t,e,n)=>n.wrapScalars?new E.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:E.nullOptions,stringify:()=>E.nullOptions.nullStr},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:E.boolOptions,stringify:zs},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:E.boolOptions,stringify:zs},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(t,e,n)=>Qt(e,n,2),stringify:t=>Jn(t,2,"0b")},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(t,e,n)=>Qt(e,n,8),stringify:t=>Jn(t,8,"0")},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(t,e,n)=>Qt(e,n,10),stringify:E.stringifyNumber},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(t,e,n)=>Qt(e,n,16),stringify:t=>Jn(t,16,"0x")},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(t,e)=>e?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:E.stringifyNumber},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify:({value:t})=>Number(t).toExponential()},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(t,e){let n=new E.Scalar(parseFloat(t.replace(/_/g,"")));if(e){let r=e.replace(/_/g,"");r[r.length-1]==="0"&&(n.minFractionDigits=r.length)}return n},stringify:E.stringifyNumber}],D.binary,D.omap,D.pairs,D.set,D.intTime,D.floatTime,D.timestamp),ba={core:Sa,failsafe:Gn,json:ci,yaml11:wa},Na={binary:D.binary,bool:ti,float:ai,floatExp:oi,floatNaN:ii,floatTime:D.floatTime,int:ri,intHex:si,intOct:ni,intTime:D.intTime,map:gt,null:ei,omap:D.omap,pairs:D.pairs,seq:Gt,set:D.set,timestamp:D.timestamp};function Oa(t,e,n){if(e){let r=n.filter(i=>i.tag===e),s=r.find(i=>!i.format)||r[0];if(!s)throw new Error(`Tag ${e} not found`);return s}return n.find(r=>(r.identify&&r.identify(t)||r.class&&t instanceof r.class)&&!r.format)}function La(t,e,n){if(t instanceof E.Node)return t;let{defaultPrefix:r,onTagObj:s,prevObjects:i,schema:o,wrapScalars:a}=n;e&&e.startsWith("!!")&&(e=r+e.slice(2));let c=Oa(t,e,o.tags);if(!c){if(typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object")return a?new E.Scalar(t):t;c=t instanceof Map?gt:t[Symbol.iterator]?Gt:gt}s&&(s(c),delete n.onTagObj);let l={value:void 0,node:void 0};if(t&&typeof t=="object"&&i){let f=i.get(t);if(f){let m=new E.Alias(f);return n.aliasNodes.push(m),m}l.value=t,i.set(t,l)}return l.node=c.createNode?c.createNode(n.schema,t,n):a?new E.Scalar(t):t,e&&l.node instanceof E.Node&&(l.node.tag=e),l.node}function Aa(t,e,n,r){let s=t[r.replace(/\W/g,"")];if(!s){let i=Object.keys(t).map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${r}"; use one of ${i}`)}if(Array.isArray(n))for(let i of n)s=s.concat(i);else typeof n=="function"&&(s=n(s.slice()));for(let i=0;iJSON.stringify(l)).join(", ");throw new Error(`Unknown custom tag "${o}"; use one of ${c}`)}s[i]=a}}return s}var Ta=(t,e)=>t.keye.key?1:0,dt=class t{constructor({customTags:e,merge:n,schema:r,sortMapEntries:s,tags:i}){this.merge=!!n,this.name=r,this.sortMapEntries=s===!0?Ta:s||null,!e&&i&&D.warnOptionDeprecation("tags","customTags"),this.tags=Aa(ba,Na,e||i,r)}createNode(e,n,r,s){let i={defaultPrefix:t.defaultPrefix,schema:this,wrapScalars:n},o=s?Object.assign(s,i):i;return La(e,r,o)}createPair(e,n,r){r||(r={wrapScalars:!0});let s=this.createNode(e,r.wrapScalars,null,r),i=this.createNode(n,r.wrapScalars,null,r);return new E.Pair(s,i)}};Jt._defineProperty(dt,"defaultPrefix",Jt.defaultTagPrefix);Jt._defineProperty(dt,"defaultTags",Jt.defaultTags);li.Schema=dt});var mi=te(en=>{"use strict";var Y=le(),S=qe(),fi=Xn(),Ca={anchorPrefix:"a",customTags:null,indent:2,indentSeq:!0,keepCstNodes:!1,keepNodeTypes:!0,keepBlobsInJSON:!0,mapAsMap:!1,maxAliasCount:100,prettyErrors:!1,simpleKeys:!1,version:"1.2"},Ma={get binary(){return S.binaryOptions},set binary(t){Object.assign(S.binaryOptions,t)},get bool(){return S.boolOptions},set bool(t){Object.assign(S.boolOptions,t)},get int(){return S.intOptions},set int(t){Object.assign(S.intOptions,t)},get null(){return S.nullOptions},set null(t){Object.assign(S.nullOptions,t)},get str(){return S.strOptions},set str(t){Object.assign(S.strOptions,t)}},pi={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:Y.defaultTagPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:Y.defaultTagPrefix}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:Y.defaultTagPrefix}]}};function ui(t,e){if((t.version||t.options.version)==="1.0"){let s=e.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(s)return"!"+s[1];let i=e.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return i?`!${i[1]}/${i[2]}`:`!${e.replace(/^tag:/,"")}`}let n=t.tagPrefixes.find(s=>e.indexOf(s.prefix)===0);if(!n){let s=t.getDefaults().tagPrefixes;n=s&&s.find(i=>e.indexOf(i.prefix)===0)}if(!n)return e[0]==="!"?e:`!<${e}>`;let r=e.substr(n.prefix.length).replace(/[!,[\]{}]/g,s=>({"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"})[s]);return n.handle+r}function ka(t,e){if(e instanceof S.Alias)return S.Alias;if(e.tag){let s=t.filter(i=>i.tag===e.tag);if(s.length>0)return s.find(i=>i.format===e.format)||s[0]}let n,r;if(e instanceof S.Scalar){r=e.value;let s=t.filter(i=>i.identify&&i.identify(r)||i.class&&r instanceof i.class);n=s.find(i=>i.format===e.format)||s.find(i=>!i.format)}else r=e,n=t.find(s=>s.nodeClass&&r instanceof s.nodeClass);if(!n){let s=r&&r.constructor?r.constructor.name:typeof r;throw new Error(`Tag not resolved for ${s} value`)}return n}function va(t,e,{anchors:n,doc:r}){let s=[],i=r.anchors.getName(t);return i&&(n[i]=t,s.push(`&${i}`)),t.tag?s.push(ui(r,t.tag)):e.default||s.push(ui(r,e.tag)),s.join(" ")}function Xt(t,e,n,r){let{anchors:s,schema:i}=e.doc,o;if(!(t instanceof S.Node)){let l={aliasNodes:[],onTagObj:f=>o=f,prevObjects:new Map};t=i.createNode(t,!0,null,l);for(let f of l.aliasNodes){f.source=f.source.node;let m=s.getName(f.source);m||(m=s.newName(),s.map[m]=f.source)}}if(t instanceof S.Pair)return t.toString(e,n,r);o||(o=ka(i.tags,t));let a=va(t,o,e);a.length>0&&(e.indentAtStart=(e.indentAtStart||0)+a.length+1);let c=typeof o.stringify=="function"?o.stringify(t,e,n,r):t instanceof S.Scalar?S.stringifyString(t,e,n,r):t.toString(e,n,r);return a?t instanceof S.Scalar||c[0]==="{"||c[0]==="["?`${a} ${c}`:`${a} +${e.indent}${c}`:c}var zn=class t{static validAnchorNode(e){return e instanceof S.Scalar||e instanceof S.YAMLSeq||e instanceof S.YAMLMap}constructor(e){Y._defineProperty(this,"map",Object.create(null)),this.prefix=e}createAlias(e,n){return this.setAnchor(e,n),new S.Alias(e)}createMergePair(...e){let n=new S.Merge;return n.value.items=e.map(r=>{if(r instanceof S.Alias){if(r.source instanceof S.YAMLMap)return r}else if(r instanceof S.YAMLMap)return this.createAlias(r);throw new Error("Merge sources must be Map nodes or their Aliases")}),n}getName(e){let{map:n}=this;return Object.keys(n).find(r=>n[r]===e)}getNames(){return Object.keys(this.map)}getNode(e){return this.map[e]}newName(e){e||(e=this.prefix);let n=Object.keys(this.map);for(let r=1;;++r){let s=`${e}${r}`;if(!n.includes(s))return s}}resolveNodes(){let{map:e,_cstAliases:n}=this;Object.keys(e).forEach(r=>{e[r]=e[r].resolved}),n.forEach(r=>{r.source=r.source.resolved}),delete this._cstAliases}setAnchor(e,n){if(e!=null&&!t.validAnchorNode(e))throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");if(n&&/[\x00-\x19\s,[\]{}]/.test(n))throw new Error("Anchor names must not contain whitespace or control characters");let{map:r}=this,s=e&&Object.keys(r).find(i=>r[i]===e);if(s)if(n)s!==n&&(delete r[s],r[n]=e);else return s;else{if(!n){if(!e)return null;n=this.newName()}r[n]=e}return n}},zt=(t,e)=>{if(t&&typeof t=="object"){let{tag:n}=t;t instanceof S.Collection?(n&&(e[n]=!0),t.items.forEach(r=>zt(r,e))):t instanceof S.Pair?(zt(t.key,e),zt(t.value,e)):t instanceof S.Scalar&&n&&(e[n]=!0)}return e},Ia=t=>Object.keys(zt(t,{}));function Pa(t,e){let n={before:[],after:[]},r,s=!1;for(let i of e)if(i.valueRange){if(r!==void 0){let a="Document contains trailing content not separated by a ... or --- line";t.errors.push(new Y.YAMLSyntaxError(i,a));break}let o=S.resolveNode(t,i);s&&(o.spaceBefore=!0,s=!1),r=o}else i.comment!==null?(r===void 0?n.before:n.after).push(i.comment):i.type===Y.Type.BLANK_LINE&&(s=!0,r===void 0&&n.before.length>0&&!t.commentBefore&&(t.commentBefore=n.before.join(` +`),n.before=[]));if(t.contents=r||null,!r)t.comment=n.before.concat(n.after).join(` +`)||null;else{let i=n.before.join(` +`);if(i){let o=r instanceof S.Collection&&r.items[0]?r.items[0]:r;o.commentBefore=o.commentBefore?`${i} +${o.commentBefore}`:i}t.comment=n.after.join(` +`)||null}}function _a({tagPrefixes:t},e){let[n,r]=e.parameters;if(!n||!r){let s="Insufficient parameters given for %TAG directive";throw new Y.YAMLSemanticError(e,s)}if(t.some(s=>s.handle===n)){let s="The %TAG directive must only be given at most once per handle in the same document.";throw new Y.YAMLSemanticError(e,s)}return{handle:n,prefix:r}}function xa(t,e){let[n]=e.parameters;if(e.name==="YAML:1.0"&&(n="1.0"),!n){let r="Insufficient parameters given for %YAML directive";throw new Y.YAMLSemanticError(e,r)}if(!pi[n]){let s=`Document will be parsed as YAML ${t.version||t.options.version} rather than YAML ${n}`;t.warnings.push(new Y.YAMLWarning(e,s))}return n}function Ra(t,e,n){let r=[],s=!1;for(let i of e){let{comment:o,name:a}=i;switch(a){case"TAG":try{t.tagPrefixes.push(_a(t,i))}catch(c){t.errors.push(c)}s=!0;break;case"YAML":case"YAML:1.0":if(t.version){let c="The %YAML directive must only be given at most once per document.";t.errors.push(new Y.YAMLSemanticError(i,c))}try{t.version=xa(t,i)}catch(c){t.errors.push(c)}s=!0;break;default:if(a){let c=`YAML only supports %TAG and %YAML directives, and not %${a}`;t.warnings.push(new Y.YAMLWarning(i,c))}}o&&r.push(o)}if(n&&!s&&(t.version||n.version||t.options.version)==="1.1"){let i=({handle:o,prefix:a})=>({handle:o,prefix:a});t.tagPrefixes=n.tagPrefixes.map(i),t.version=n.version}t.commentBefore=r.join(` +`)||null}function Ve(t){if(t instanceof S.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}var Zt=class t{constructor(e){this.anchors=new zn(e.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=e,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}add(e){return Ve(this.contents),this.contents.add(e)}addIn(e,n){Ve(this.contents),this.contents.addIn(e,n)}delete(e){return Ve(this.contents),this.contents.delete(e)}deleteIn(e){return S.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):(Ve(this.contents),this.contents.deleteIn(e))}getDefaults(){return t.defaults[this.version]||t.defaults[this.options.version]||{}}get(e,n){return this.contents instanceof S.Collection?this.contents.get(e,n):void 0}getIn(e,n){return S.isEmptyPath(e)?!n&&this.contents instanceof S.Scalar?this.contents.value:this.contents:this.contents instanceof S.Collection?this.contents.getIn(e,n):void 0}has(e){return this.contents instanceof S.Collection?this.contents.has(e):!1}hasIn(e){return S.isEmptyPath(e)?this.contents!==void 0:this.contents instanceof S.Collection?this.contents.hasIn(e):!1}set(e,n){Ve(this.contents),this.contents.set(e,n)}setIn(e,n){S.isEmptyPath(e)?this.contents=n:(Ve(this.contents),this.contents.setIn(e,n))}setSchema(e,n){if(!e&&!n&&this.schema)return;typeof e=="number"&&(e=e.toFixed(1)),e==="1.0"||e==="1.1"||e==="1.2"?(this.version?this.version=e:this.options.version=e,delete this.options.schema):e&&typeof e=="string"&&(this.options.schema=e),Array.isArray(n)&&(this.options.customTags=n);let r=Object.assign({},this.getDefaults(),this.options);this.schema=new fi.Schema(r)}parse(e,n){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type="DOCUMENT");let{directives:r=[],contents:s=[],directivesEndMarker:i,error:o,valueRange:a}=e;if(o&&(o.source||(o.source=this),this.errors.push(o)),Ra(this,r,n),i&&(this.directivesEndMarker=!0),this.range=a?[a.start,a.end]:null,this.setSchema(),this.anchors._cstAliases=[],Pa(this,s),this.anchors.resolveNodes(),this.options.prettyErrors){for(let c of this.errors)c instanceof Y.YAMLError&&c.makePretty();for(let c of this.warnings)c instanceof Y.YAMLError&&c.makePretty()}return this}listNonDefaultTags(){return Ia(this.contents).filter(e=>e.indexOf(fi.Schema.defaultPrefix)!==0)}setTagPrefix(e,n){if(e[0]!=="!"||e[e.length-1]!=="!")throw new Error("Handle must start and end with !");if(n){let r=this.tagPrefixes.find(s=>s.handle===e);r?r.prefix=n:this.tagPrefixes.push({handle:e,prefix:n})}else this.tagPrefixes=this.tagPrefixes.filter(r=>r.handle!==e)}toJSON(e,n){let{keepBlobsInJSON:r,mapAsMap:s,maxAliasCount:i}=this.options,o=r&&(typeof e!="string"||!(this.contents instanceof S.Scalar)),a={doc:this,indentStep:" ",keep:o,mapAsMap:o&&!!s,maxAliasCount:i,stringify:Xt},c=Object.keys(this.anchors.map);c.length>0&&(a.anchors=new Map(c.map(f=>[this.anchors.map[f],{alias:[],aliasCount:0,count:1}])));let l=S.toJSON(this.contents,e,a);if(typeof n=="function"&&a.anchors)for(let{count:f,res:m}of a.anchors.values())n(m,f);return l}toString(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");let e=this.options.indent;if(!Number.isInteger(e)||e<=0){let c=JSON.stringify(e);throw new Error(`"indent" option must be a positive integer, not ${c}`)}this.setSchema();let n=[],r=!1;if(this.version){let c="%YAML 1.2";this.schema.name==="yaml-1.1"&&(this.version==="1.0"?c="%YAML:1.0":this.version==="1.1"&&(c="%YAML 1.1")),n.push(c),r=!0}let s=this.listNonDefaultTags();this.tagPrefixes.forEach(({handle:c,prefix:l})=>{s.some(f=>f.indexOf(l)===0)&&(n.push(`%TAG ${c} ${l}`),r=!0)}),(r||this.directivesEndMarker)&&n.push("---"),this.commentBefore&&((r||!this.directivesEndMarker)&&n.unshift(""),n.unshift(this.commentBefore.replace(/^/gm,"#")));let i={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:Xt},o=!1,a=null;if(this.contents){this.contents instanceof S.Node&&(this.contents.spaceBefore&&(r||this.directivesEndMarker)&&n.push(""),this.contents.commentBefore&&n.push(this.contents.commentBefore.replace(/^/gm,"#")),i.forceBlockIndent=!!this.comment,a=this.contents.comment);let c=a?null:()=>o=!0,l=Xt(this.contents,i,()=>a=null,c);n.push(S.addComment(l,"",a))}else this.contents!==void 0&&n.push(Xt(this.contents,i));return this.comment&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push(this.comment.replace(/^/gm,"#"))),n.join(` +`)+` +`}};Y._defineProperty(Zt,"defaults",pi);en.Document=Zt;en.defaultOptions=Ca;en.scalarOptions=Ma});var di=te(gi=>{"use strict";var Zn=Rs(),Oe=mi(),Da=Xn(),Ya=le(),$a=Qn();qe();function Ba(t,e=!0,n){n===void 0&&typeof e=="string"&&(n=e,e=!0);let r=Object.assign({},Oe.Document.defaults[Oe.defaultOptions.version],Oe.defaultOptions);return new Da.Schema(r).createNode(t,e,n)}var We=class extends Oe.Document{constructor(e){super(Object.assign({},Oe.defaultOptions,e))}};function Fa(t,e){let n=[],r;for(let s of Zn.parse(t)){let i=new We(e);i.parse(s,r),n.push(i),r=i}return n}function hi(t,e){let n=Zn.parse(t),r=new We(e).parse(n[0]);if(n.length>1){let s="Source contains multiple documents; please use YAML.parseAllDocuments()";r.errors.unshift(new Ya.YAMLSemanticError(n[1],s))}return r}function qa(t,e){let n=hi(t,e);if(n.warnings.forEach(r=>$a.warn(r)),n.errors.length>0)throw n.errors[0];return n.toJSON()}function Ua(t,e){let n=new We(e);return n.contents=t,String(n)}var Ka={createNode:Ba,defaultOptions:Oe.defaultOptions,Document:We,parse:qa,parseAllDocuments:Fa,parseCST:Zn.parse,parseDocument:hi,scalarOptions:Oe.scalarOptions,stringify:Ua};gi.YAML=Ka});var Ei=te((qm,yi)=>{yi.exports=di().YAML});var Si=te(J=>{"use strict";var je=qe(),Qe=le();J.findPair=je.findPair;J.parseMap=je.resolveMap;J.parseSeq=je.resolveSeq;J.stringifyNumber=je.stringifyNumber;J.stringifyString=je.stringifyString;J.toJSON=je.toJSON;J.Type=Qe.Type;J.YAMLError=Qe.YAMLError;J.YAMLReferenceError=Qe.YAMLReferenceError;J.YAMLSemanticError=Qe.YAMLSemanticError;J.YAMLSyntaxError=Qe.YAMLSyntaxError;J.YAMLWarning=Qe.YAMLWarning});var nr={};rr(nr,{languages:()=>_r,options:()=>xr,parsers:()=>tr,printers:()=>Ha});var Pi=(t,e,n,r)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(n,r):n.global?e.replace(n,r):e.split(n).join(r)},yt=Pi;var Le="string",Je="array",Ge="cursor",He="indent",Ae="align",Xe="trim",Te="group",Ce="fill",he="if-break",ze="indent-if-break",Me="line-suffix",Ze="line-suffix-boundary",Z="line",et="label",ke="break-parent",Et=new Set([Ge,He,Ae,Xe,Te,Ce,he,ze,Me,Ze,Z,et,ke]);var _i=(t,e,n)=>{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[n<0?e.length+n:n]:e.at(n)},x=_i;function xi(t){if(typeof t=="string")return Le;if(Array.isArray(t))return Je;if(!t)return;let{type:e}=t;if(Et.has(e))return e}var ve=xi;var Ri=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function Di(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', +Expected it to be 'string' or 'object'.`;if(ve(t))throw new Error("doc is valid.");let n=Object.prototype.toString.call(t);if(n!=="[object Object]")return`Unexpected doc '${n}'.`;let r=Ri([...Et].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'. +Expected it to be ${r}.`}var nn=class extends Error{name="InvalidDocError";constructor(e){super(Di(e)),this.doc=e}},rn=nn;function $i(t,e){if(typeof t=="string")return e(t);let n=new Map;return r(t);function r(i){if(n.has(i))return n.get(i);let o=s(i);return n.set(i,o),o}function s(i){switch(ve(i)){case Je:return e(i.map(r));case Ce:return e({...i,parts:i.parts.map(r)});case he:return e({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case Te:{let{expandedStates:o,contents:a}=i;return o?(o=o.map(r),a=o[0]):a=r(a),e({...i,contents:a,expandedStates:o})}case Ae:case He:case ze:case et:case Me:return e({...i,contents:r(i.contents)});case Le:case Ge:case Xe:case Ze:case Z:case ke:return e(i);default:throw new rn(i)}}}function ir(t,e=tt){return $i(t,n=>typeof n=="string"?v(e,n.split(` +`)):n)}var sn=()=>{},ge=sn,on=sn,or=sn;function nt(t,e){return ge(e),{type:Ae,contents:e,n:t}}function Ie(t,e={}){return ge(t),on(e.expandedStates,!0),{type:Te,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function an(t){return nt(Number.NEGATIVE_INFINITY,t)}function ar(t){return nt({type:"root"},t)}function cr(t){return nt(-1,t)}function cn(t,e){return Ie(t[0],{...e,expandedStates:t})}function St(t){return or(t),{type:Ce,parts:t}}function rt(t,e="",n={}){return ge(t),e!==""&&ge(e),{type:he,breakContents:t,flatContents:e,groupId:n.groupId}}function lr(t){return ge(t),{type:Me,contents:t}}var wt={type:ke};var Bi={type:Z,hard:!0},Fi={type:Z,hard:!0,literal:!0},ne={type:Z},bt={type:Z,soft:!0},N=[Bi,wt],tt=[Fi,wt];function v(t,e){ge(t),on(e);let n=[];for(let r=0;r{let s=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:i}=e,o=n;for(;o>=0&&o{let s=await r(e.originalText,{parser:"json"});return s?[s,N]:void 0}}pr.getVisitorKeys=()=>[];var mr=pr;var st=null;function it(t){if(st!==null&&typeof st.property){let e=st;return st=it.prototype=null,e}return st=it.prototype=t??Object.create(null),new it}var Ki=10;for(let t=0;t<=Ki;t++)it();function pn(t){return it(t)}function Vi(t,e="type"){pn(t);function n(r){let s=r[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:r});return i}return n}var hr=Vi;var Wi=Object.fromEntries(Object.entries({root:["children"],document:["head","body","children"],documentHead:["children"],documentBody:["children"],directive:[],alias:[],blockLiteral:[],blockFolded:["children"],plain:["children"],quoteSingle:[],quoteDouble:[],mapping:["children"],mappingItem:["key","value","children"],mappingKey:["content","children"],mappingValue:["content","children"],sequence:["children"],sequenceItem:["content","children"],flowMapping:["children"],flowMappingItem:["key","value","children"],flowSequence:["children"],flowSequenceItem:["content","children"],comment:[],tag:[],anchor:[]}).map(([t,e])=>[t,[...e,"anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"]])),gr=Wi;var ji=hr(gr),dr=ji;function Pe(t){return t.position.start.offset}function yr(t){return t.position.end.offset}function Er(t){return/^\s*@(?:prettier|format)\s*$/u.test(t)}function Sr(t){return/^\s*#[^\S\n]*@(?:prettier|format)\s*?(?:\n|$)/u.test(t)}function wr(t){return`# @format + +${t}`}function Qi(t){return Array.isArray(t)&&t.length>0}var _e=Qi;function H(t,e){return typeof(t==null?void 0:t.type)=="string"&&(!e||e.includes(t.type))}function mn(t,e,n){return e("children"in t?{...t,children:t.children.map(r=>mn(r,e,t))}:t,n)}function xe(t,e,n){Object.defineProperty(t,e,{get:n,enumerable:!1})}function Nr(t,e){let n=0,r=e.length;for(let s=t.position.end.offset-1;si===0&&i===o.length-1?s:i!==0&&i!==o.length-1?s.trim():i===0?s.trimEnd():s.trimStart());return n.proseWrap==="preserve"?r.map(s=>s.length===0?[]:[s]):r.map(s=>s.length===0?[]:Lr(s)).reduce((s,i,o)=>o!==0&&r[o-1].length>0&&i.length>0&&!(t==="quoteDouble"&&x(!1,x(!1,s,-1),-1).endsWith("\\"))?[...s.slice(0,-1),[...x(!1,s,-1),...i]]:[...s,i],[]).map(s=>n.proseWrap==="never"?[s.join(" ")]:s)}function Tr(t,{parentIndent:e,isLastDescendant:n,options:r}){let s=t.position.start.line===t.position.end.line?"":r.originalText.slice(t.position.start.offset,t.position.end.offset).match(/^[^\n]*\n(.*)$/su)[1],i;if(t.indent===null){let c=s.match(/^(? *)[^\n\r ]/mu);i=c?c.groups.leadingSpace.length:Number.POSITIVE_INFINITY}else i=t.indent-1+e;let o=s.split(` +`).map(c=>c.slice(i));if(r.proseWrap==="preserve"||t.type==="blockLiteral")return a(o.map(c=>c.length===0?[]:[c]));return a(o.map(c=>c.length===0?[]:Lr(c)).reduce((c,l,f)=>f!==0&&o[f-1].length>0&&l.length>0&&!/^\s/u.test(l[0])&&!/^\s|\s$/u.test(x(!1,c,-1))?[...c.slice(0,-1),[...x(!1,c,-1),...l]]:[...c,l],[]).map(c=>c.reduce((l,f)=>l.length>0&&/\s$/u.test(x(!1,l,-1))?[...l.slice(0,-1),x(!1,l,-1)+" "+f]:[...l,f],[])).map(c=>r.proseWrap==="never"?[c.join(" ")]:c));function a(c){if(t.chomping==="keep")return x(!1,c,-1).length===0?c.slice(0,-1):c;let l=0;for(let f=c.length-1;f>=0&&c[f].length===0;f--)l++;return l===0?c:l>=2&&!n?c.slice(0,-(l-1)):c.slice(0,-l)}}function ot(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":case"alias":case"flowMapping":case"flowSequence":return!0;default:return!1}}var gn=new WeakMap;function At(t,e){let{node:n,root:r}=t,s;return gn.has(r)?s=gn.get(r):(s=new Set,gn.set(r,s)),!s.has(n.position.end.line)&&(s.add(n.position.end.line),Nr(n,e)&&!dn(t.parent))?bt:""}function dn(t){return R(t)&&!H(t,["documentHead","documentBody","flowMapping","flowSequence"])}function I(t,e){return nt(" ".repeat(t),e)}function Gi(t,e,n){let{node:r}=t,s=t.ancestors.filter(l=>l.type==="sequence"||l.type==="mapping").length,i=Ot(t),o=[r.type==="blockFolded"?">":"|"];r.indent!==null&&o.push(r.indent.toString()),r.chomping!=="clip"&&o.push(r.chomping==="keep"?"+":"-"),hn(r)&&o.push(" ",e("indicatorComment"));let a=Tr(r,{parentIndent:s,isLastDescendant:i,options:n}),c=[];for(let[l,f]of a.entries())l===0&&c.push(N),c.push(St(v(ne,f))),l!==a.length-1?c.push(f.length===0?N:ar(tt)):r.chomping==="keep"&&i&&c.push(an(f.length===0?N:tt));return r.indent===null?o.push(cr(I(n.tabWidth,c))):o.push(an(I(r.indent-1+s,c))),o}var Cr=Gi;function Tt(t,e,n){let{node:r}=t,s=r.type==="flowMapping",i=s?"{":"[",o=s?"}":"]",a=bt;s&&r.children.length>0&&n.bracketSpacing&&(a=ne);let c=x(!1,r.children,-1),l=(c==null?void 0:c.type)==="flowMappingItem"&&Re(c.key)&&Re(c.value);return[i,I(n.tabWidth,[a,Hi(t,e,n),n.trailingComma==="none"?"":rt(","),R(r)?[N,v(N,t.map(e,"endComments"))]:""]),l?"":a,o]}function Hi(t,e,n){return t.map(({isLast:r,node:s,next:i})=>[e(),r?"":[",",ne,s.position.start.line!==i.position.start.line?At(t,n.originalText):""]],"children")}function Xi(t,e,n){var C;let{node:r,parent:s}=t,{key:i,value:o}=r,a=Re(i),c=Re(o);if(a&&c)return": ";let l=e("key"),f=zi(r)?" ":"";if(c)return r.type==="flowMappingItem"&&s.type==="flowMapping"?l:r.type==="mappingItem"&&yn(i.content,n)&&!K(i.content)&&((C=s.tag)==null?void 0:C.value)!=="tag:yaml.org,2002:set"?[l,f,":"]:["? ",I(2,l)];let m=e("value");if(a)return[": ",I(2,m)];if(ee(o)||!ot(i.content))return["? ",I(2,l),N,...t.map(()=>[e(),N],"value","leadingComments"),": ",I(2,m)];if(Zi(i.content)&&!ee(i.content)&&!ie(i.content)&&!K(i.content)&&!R(i)&&!ee(o.content)&&!ie(o.content)&&!R(o)&&yn(o.content,n))return[l,f,": ",m];let d=Symbol("mappingKey"),y=Ie([rt("? "),Ie(I(2,l),{id:d})]),h=[N,": ",I(2,m)],g=[f,":"];ee(o.content)||R(o)&&o.content&&!H(o.content,["mapping","sequence"])||s.type==="mapping"&&K(i.content)&&ot(o.content)||H(o.content,["mapping","sequence"])&&o.content.tag===null&&o.content.anchor===null?g.push(N):o.content?g.push(ne):K(o)&&g.push(" "),g.push(m);let w=I(n.tabWidth,g);return yn(i.content,n)&&!ee(i.content)&&!ie(i.content)&&!R(i)?cn([[l,w]]):cn([[y,rt(h,w,{groupId:d})]])}function yn(t,e){if(!t)return!0;switch(t.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return!0;default:return!1}if(e.proseWrap==="preserve")return t.position.start.line===t.position.end.line;if(/\\$/mu.test(e.originalText.slice(t.position.start.offset,t.position.end.offset)))return!1;switch(e.proseWrap){case"never":return!t.value.includes(` +`);case"always":return!/[\n ]/u.test(t.value);default:return!1}}function zi(t){var e;return((e=t.key.content)==null?void 0:e.type)==="alias"}function Zi(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":return t.position.start.line===t.position.end.line;case"alias":return!0;default:return!1}}var Mr=Xi;function eo(t){return mn(t,to)}function to(t){switch(t.type){case"document":xe(t,"head",()=>t.children[0]),xe(t,"body",()=>t.children[1]);break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":xe(t,"content",()=>t.children[0]);break;case"mappingItem":case"flowMappingItem":xe(t,"key",()=>t.children[0]),xe(t,"value",()=>t.children[1]);break}return t}var kr=eo;function no(t,e,n){let{node:r}=t,s=[];r.type!=="mappingValue"&&ee(r)&&s.push([v(N,t.map(n,"leadingComments")),N]);let{tag:i,anchor:o}=r;i&&s.push(n("tag")),i&&o&&s.push(" "),o&&s.push(n("anchor"));let a="";return H(r,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!Ot(t)&&(a=At(t,e.originalText)),(i||o)&&(H(r,["sequence","mapping"])&&!ie(r)?s.push(N):s.push(" ")),ie(r)&&s.push([r.middleComments.length===1?"":N,v(N,t.map(n,"middleComments")),N]),Or(t)?s.push(ir(e.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd())):s.push(Ie(ro(t,e,n))),K(r)&&!H(r,["document","documentHead"])&&s.push(lr([r.type==="mappingValue"&&!r.content?"":" ",t.parent.type==="mappingKey"&&t.getParentNode(2).type==="mapping"&&ot(r)?"":wt,n("trailingComment")])),dn(r)&&s.push(I(r.type==="sequenceItem"?2:0,[N,v(N,t.map(({node:c})=>[fr(e.originalText,Pe(c))?N:"",n()],"endComments"))])),s.push(a),s}function ro(t,e,n){let{node:r}=t;switch(r.type){case"root":{let s=[];t.each(({node:o,next:a,isFirst:c})=>{c||s.push(N),s.push(n()),vr(o,a)?(s.push(N,"..."),K(o)&&s.push(" ",n("trailingComment"))):a&&!K(a.head)&&s.push(N,"---")},"children");let i=Lt(r);return(!H(i,["blockLiteral","blockFolded"])||i.chomping!=="keep")&&s.push(N),s}case"document":{let s=[];return io(t,e)==="head"&&((r.head.children.length>0||r.head.endComments.length>0)&&s.push(n("head")),K(r.head)?s.push(["---"," ",n(["head","trailingComment"])]):s.push("---")),so(r)&&s.push(n("body")),v(N,s)}case"documentHead":return v(N,[...t.map(n,"children"),...t.map(n,"endComments")]);case"documentBody":{let{children:s,endComments:i}=r,o="";if(s.length>0&&i.length>0){let a=Lt(r);H(a,["blockFolded","blockLiteral"])?a.chomping!=="keep"&&(o=[N,N]):o=N}return[v(N,t.map(n,"children")),o,v(N,t.map(n,"endComments"))]}case"directive":return["%",v(" ",[r.name,...r.parameters])];case"comment":return["#",r.value];case"alias":return["*",r.value];case"tag":return e.originalText.slice(r.position.start.offset,r.position.end.offset);case"anchor":return["&",r.value];case"plain":return at(r.type,e.originalText.slice(r.position.start.offset,r.position.end.offset),e);case"quoteDouble":case"quoteSingle":{let s="'",i='"',o=e.originalText.slice(r.position.start.offset+1,r.position.end.offset-1);if(r.type==="quoteSingle"&&o.includes("\\")||r.type==="quoteDouble"&&/\\[^"]/u.test(o)){let c=r.type==="quoteDouble"?i:s;return[c,at(r.type,o,e),c]}if(o.includes(i))return[s,at(r.type,r.type==="quoteDouble"?yt(!1,yt(!1,o,String.raw`\"`,i),"'",s.repeat(2)):o,e),s];if(o.includes(s))return[i,at(r.type,r.type==="quoteSingle"?yt(!1,o,"''",s):o,e),i];let a=e.singleQuote?s:i;return[a,at(r.type,o,e),a]}case"blockFolded":case"blockLiteral":return Cr(t,n,e);case"mapping":case"sequence":return v(N,t.map(n,"children"));case"sequenceItem":return["- ",I(2,r.content?n("content"):"")];case"mappingKey":case"mappingValue":return r.content?n("content"):"";case"mappingItem":case"flowMappingItem":return Mr(t,n,e);case"flowMapping":return Tt(t,n,e);case"flowSequence":return Tt(t,n,e);case"flowSequenceItem":return n("content");default:throw new ur(r,"YAML")}}function so(t){return t.body.children.length>0||R(t.body)}function vr(t,e){return K(t)||e&&(e.head.children.length>0||R(e.head))}function io(t,e){let n=t.node;if(t.isFirst&&/---(?:\s|$)/u.test(e.originalText.slice(Pe(n),Pe(n)+4))||n.head.children.length>0||R(n.head)||K(n.head))return"head";let r=t.next;return vr(n,r)?!1:r?"root":!1}function at(t,e,n){let r=Ar(t,e,n);return v(N,r.map(s=>St(v(ne,s))))}function Ir(t,e){if(H(t))switch(t.type){case"comment":if(Er(t.value))return null;break;case"quoteDouble":case"quoteSingle":e.type="quote";break}}Ir.ignoredProperties=new Set(["position"]);var oo={preprocess:kr,embed:mr,print:no,massageAstNode:Ir,insertPragma:wr,getVisitorKeys:dr},Pr=oo;var _r=[{linguistLanguageId:407,name:"YAML",type:"data",color:"#cb171e",tmScope:"source.yaml",aliases:["yml"],extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".gemrc","CITATION.cff","glide.lock",".prettierrc",".stylelintrc",".lintstagedrc"],aceMode:"yaml",codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","dockercompose","github-actions-workflow","home-assistant"]}];var Ct={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var ao={bracketSpacing:Ct.bracketSpacing,singleQuote:Ct.singleQuote,proseWrap:Ct.proseWrap},xr=ao;var tr={};rr(tr,{yaml:()=>Ga});var Mt=` +`,Rr="\r",Dr=function(){function t(e){this.length=e.length;for(var n=[0],r=0;rthis.length)return null;for(var n=0,r=this.offsets;r[n+1]<=e;)n++;var s=e-r[n];return{line:n,column:s}},t.prototype.indexForLocation=function(e){var n=e.line,r=e.column;return n<0||n>=this.offsets.length||r<0||r>this.lengthOfLine(n)?null:this.offsets[n]+r},t.prototype.lengthOfLine=function(e){var n=this.offsets[e],r=e===this.offsets.length-1?this.length:this.offsets[e+1];return r-n},t}();function $(t,e=null){"children"in t&&t.children.forEach(n=>$(n,t)),"anchor"in t&&t.anchor&&$(t.anchor,t),"tag"in t&&t.tag&&$(t.tag,t),"leadingComments"in t&&t.leadingComments.forEach(n=>$(n,t)),"middleComments"in t&&t.middleComments.forEach(n=>$(n,t)),"indicatorComment"in t&&t.indicatorComment&&$(t.indicatorComment,t),"trailingComment"in t&&t.trailingComment&&$(t.trailingComment,t),"endComments"in t&&t.endComments.forEach(n=>$(n,t)),Object.defineProperty(t,"_parent",{value:e,enumerable:!1})}function de(t){return`${t.line}:${t.column}`}function Yr(t){$(t);let e=co(t),n=t.children.slice();t.comments.sort((r,s)=>r.position.start.offset-s.position.end.offset).filter(r=>!r._parent).forEach(r=>{for(;n.length>1&&r.position.start.line>n[0].position.end.line;)n.shift();lo(r,e,n[0])})}function co(t){let e=Array.from(new Array(t.position.end.line),()=>({}));for(let n of t.comments)e[n.position.start.line-1].comment=n;return $r(e,t),e}function $r(t,e){if(e.position.start.offset!==e.position.end.offset){if("leadingComments"in e){let{start:n}=e.position,{leadingAttachableNode:r}=t[n.line-1];(!r||n.column1&&e.type!=="document"&&e.type!=="documentHead"){let{end:n}=e.position,{trailingAttachableNode:r}=t[n.line-1];(!r||n.column>=r.position.end.column)&&(t[n.line-1].trailingAttachableNode=e)}if(e.type!=="root"&&e.type!=="document"&&e.type!=="documentHead"&&e.type!=="documentBody"){let{start:n,end:r}=e.position,s=[r.line].concat(n.line===r.line?[]:n.line);for(let i of s){let o=t[i-1].trailingNode;(!o||r.column>=o.position.end.column)&&(t[i-1].trailingNode=e)}}"children"in e&&e.children.forEach(n=>{$r(t,n)})}}function lo(t,e,n){let r=t.position.start.line,{trailingAttachableNode:s}=e[r-1];if(s){if(s.trailingComment)throw new Error(`Unexpected multiple trailing comment at ${de(t.position.start)}`);$(t,s),s.trailingComment=t;return}for(let o=r;o>=n.position.start.line;o--){let{trailingNode:a}=e[o-1],c;if(a)c=a;else if(o!==r&&e[o-1].comment)c=e[o-1].comment._parent;else continue;if((c.type==="sequence"||c.type==="mapping")&&(c=c.children[0]),c.type==="mappingItem"){let[l,f]=c.children;c=Br(l)?l:f}for(;;){if(fo(c,t)){$(t,c),c.endComments.push(t);return}if(!c._parent)break;c=c._parent}break}for(let o=r+1;o<=n.position.end.line;o++){let{leadingAttachableNode:a}=e[o-1];if(a){$(t,a),a.leadingComments.push(t);return}}let i=n.children[1];$(t,i),i.endComments.push(t)}function fo(t,e){if(t.position.start.offsete.position.end.offset)switch(t.type){case"flowMapping":case"flowSequence":return t.children.length===0||e.position.start.line>t.children[t.children.length-1].position.end.line}if(e.position.end.offsett.position.start.column;case"mappingKey":case"mappingValue":return e.position.start.column>t._parent.position.start.column&&(t.children.length===0||t.children.length===1&&t.children[0].type!=="blockFolded"&&t.children[0].type!=="blockLiteral")&&(t.type==="mappingValue"||Br(t));default:return!1}}function Br(t){return t.position.start!==t.position.end&&(t.children.length===0||t.position.start.offset!==t.children[0].position.start.offset)}function b(t,e){return{type:t,position:e}}function Fr(t,e,n){return{...b("root",t),children:e,comments:n}}function ct(t){switch(t.type){case"DOCUMENT":for(let e=t.contents.length-1;e>=0;e--)t.contents[e].type==="BLANK_LINE"?t.contents.splice(e,1):ct(t.contents[e]);for(let e=t.directives.length-1;e>=0;e--)t.directives[e].type==="BLANK_LINE"&&t.directives.splice(e,1);break;case"FLOW_MAP":case"FLOW_SEQ":case"MAP":case"SEQ":for(let e=t.items.length-1;e>=0;e--){let n=t.items[e];"char"in n||(n.type==="BLANK_LINE"?t.items.splice(e,1):ct(n))}break;case"MAP_KEY":case"MAP_VALUE":case"SEQ_ITEM":t.node&&ct(t.node);break;case"ALIAS":case"BLANK_LINE":case"BLOCK_FOLDED":case"BLOCK_LITERAL":case"COMMENT":case"DIRECTIVE":case"PLAIN":case"QUOTE_DOUBLE":case"QUOTE_SINGLE":break;default:throw new Error(`Unexpected node type ${JSON.stringify(t.type)}`)}}function X(){return{leadingComments:[]}}function oe(t=null){return{trailingComment:t}}function B(){return{...X(),...oe()}}function qr(t,e,n){return{...b("alias",t),...B(),...e,value:n}}function Ur(t,e){let n=t.cstNode;return qr(e.transformRange({origStart:n.valueRange.origStart-1,origEnd:n.valueRange.origEnd}),e.transformContent(t),n.rawValue)}function Kr(t){return{...t,type:"blockFolded"}}function Vr(t,e,n,r,s,i){return{...b("blockValue",t),...X(),...e,chomping:n,indent:r,value:s,indicatorComment:i}}var ae;(function(t){t.Tag="!",t.Anchor="&",t.Comment="#"})(ae||(ae={}));function Wr(t,e){return{...b("anchor",t),value:e}}function De(t,e){return{...b("comment",t),value:e}}function jr(t,e,n){return{anchor:e,tag:t,middleComments:n}}function Qr(t,e){return{...b("tag",t),value:e}}function kt(t,e,n=()=>!1){let r=t.cstNode,s=[],i=null,o=null,a=null;for(let c of r.props){let l=e.text[c.origStart];switch(l){case ae.Tag:i=i||c,o=Qr(e.transformRange(c),t.tag);break;case ae.Anchor:i=i||c,a=Wr(e.transformRange(c),r.anchor);break;case ae.Comment:{let f=De(e.transformRange(c),e.text.slice(c.origStart+1,c.origEnd));e.comments.push(f),!n(f)&&i&&i.origEnd<=c.origStart&&c.origEnd<=r.valueRange.origStart&&s.push(f);break}default:throw new Error(`Unexpected leading character ${JSON.stringify(l)}`)}}return jr(o,a,s)}var En;(function(t){t.CLIP="clip",t.STRIP="strip",t.KEEP="keep"})(En||(En={}));function vt(t,e){let n=t.cstNode,r=1,s=n.chomping==="CLIP"?0:1,o=n.header.origEnd-n.header.origStart-r-s!==0,a=e.transformRange({origStart:n.header.origStart,origEnd:n.valueRange.origEnd}),c=null,l=kt(t,e,f=>{if(!(a.start.offset=0;c--){let l=t.contents[c];if(l.type==="COMMENT"){let f=e.transformNode(l);n&&n.line===f.position.start.line?o.unshift(f):a?r.unshift(f):f.position.start.offset>=t.valueRange.origEnd?i.unshift(f):r.unshift(f)}else a=!0}if(i.length>1)throw new Error(`Unexpected multiple document trailing comments at ${de(i[1].position.start)}`);if(o.length>1)throw new Error(`Unexpected multiple documentHead trailing comments at ${de(o[1].position.start)}`);return{comments:r,endComments:s,documentTrailingComment:q(i)||null,documentHeadTrailingComment:q(o)||null}}function po(t,e,n){let r=It(n.text.slice(t.valueRange.origEnd),/^\.\.\./),s=r===-1?t.valueRange.origEnd:Math.max(0,t.valueRange.origEnd-1);n.text[s-1]==="\r"&&s--;let i=n.transformRange({origStart:e!==null?e.position.start.offset:s,origEnd:s}),o=r===-1?i.end:n.transformOffset(t.valueRange.origEnd+3);return{position:i,documentEndPoint:o}}function rs(t,e,n,r){return{...b("documentHead",t),...F(n),...oe(r),children:e}}function ss(t,e){let n=t.cstNode,{directives:r,comments:s,endComments:i}=mo(n,e),{position:o,endMarkerPoint:a}=ho(n,r,e);return e.comments.push(...s,...i),{createDocumentHeadWithTrailingComment:l=>(l&&e.comments.push(l),rs(o,r,i,l)),documentHeadEndMarkerPoint:a}}function mo(t,e){let n=[],r=[],s=[],i=!1;for(let o=t.directives.length-1;o>=0;o--){let a=e.transformNode(t.directives[o]);a.type==="comment"?i?r.unshift(a):s.unshift(a):(i=!0,n.unshift(a))}return{directives:n,comments:r,endComments:s}}function ho(t,e,n){let r=It(n.text.slice(0,t.valueRange.origStart),/---\s*$/);r>0&&!/[\r\n]/.test(n.text[r-1])&&(r=-1);let s=r===-1?{origStart:t.valueRange.origStart,origEnd:t.valueRange.origStart}:{origStart:r,origEnd:r+3};return e.length!==0&&(s.origStart=e[0].position.start.offset),{position:n.transformRange(s),endMarkerPoint:r===-1?null:n.transformOffset(r)}}function is(t,e){let{createDocumentHeadWithTrailingComment:n,documentHeadEndMarkerPoint:r}=ss(t,e),{documentBody:s,documentEndPoint:i,documentTrailingComment:o,documentHeadTrailingComment:a}=ns(t,e,r),c=n(a);return o&&e.comments.push(o),es(V(c.position.start,i),c,s,o)}function Pt(t,e,n){return{...b("flowCollection",t),...B(),...F(),...e,children:n}}function os(t,e,n){return{...Pt(t,e,n),type:"flowMapping"}}function _t(t,e,n){return{...b("flowMappingItem",t),...X(),children:[e,n]}}function ce(t,e){let n=[];for(let r of t)r&&"type"in r&&r.type==="COMMENT"?e.comments.push(e.transformNode(r)):n.push(r);return n}function xt(t){let[e,n]=["?",":"].map(r=>{let s=t.find(i=>"char"in i&&i.char===r);return s?{origStart:s.origOffset,origEnd:s.origOffset+1}:null});return{additionalKeyRange:e,additionalValueRange:n}}function Rt(t,e){let n=e;return r=>t.slice(n,n=r)}function Dt(t){let e=[],n=Rt(t,1),r=!1;for(let s=1;s{let l=r[c],{additionalKeyRange:f,additionalValueRange:m}=xt(l);return $e(a,e,_t,f,m)}),i=n[0],o=q(n);return os(e.transformRange({origStart:i.origOffset,origEnd:o.origOffset+1}),e.transformContent(t),s)}function cs(t,e,n){return{...Pt(t,e,n),type:"flowSequence"}}function ls(t,e){return{...b("flowSequenceItem",t),children:[e]}}function fs(t,e){let n=ce(t.cstNode.items,e),r=Dt(n),s=t.items.map((a,c)=>{if(a.type!=="PAIR"){let l=e.transformNode(a);return ls(V(l.position.start,l.position.end),l)}else{let l=r[c],{additionalKeyRange:f,additionalValueRange:m}=xt(l);return $e(a,e,_t,f,m)}}),i=n[0],o=q(n);return cs(e.transformRange({origStart:i.origOffset,origEnd:o.origOffset+1}),e.transformContent(t),s)}function us(t,e,n){return{...b("mapping",t),...X(),...e,children:n}}function ps(t,e,n){return{...b("mappingItem",t),...X(),children:[e,n]}}function ms(t,e){let n=t.cstNode;n.items.filter(o=>o.type==="MAP_KEY"||o.type==="MAP_VALUE").forEach(o=>Ye(o,e));let r=ce(n.items,e),s=go(r),i=t.items.map((o,a)=>{let c=s[a],[l,f]=c[0].type==="MAP_VALUE"?[null,c[0].range]:[c[0].range,c.length===1?null:c[1].range];return $e(o,e,ps,l,f)});return us(V(i[0].position.start,q(i).position.end),e.transformContent(t),i)}function go(t){let e=[],n=Rt(t,0),r=!1;for(let s=0;s=0;r--)if(n.test(t[r]))return r;return-1}function ds(t,e){let n=t.cstNode;return hs(e.transformRange({origStart:n.valueRange.origStart,origEnd:gs(e.text,n.valueRange.origEnd-1,/\S/)+1}),e.transformContent(t),n.strValue)}function ys(t){return{...t,type:"quoteDouble"}}function Es(t,e,n){return{...b("quoteValue",t),...e,...B(),value:n}}function Yt(t,e){let n=t.cstNode;return Es(e.transformRange(n.valueRange),e.transformContent(t),n.strValue)}function Ss(t,e){return ys(Yt(t,e))}function ws(t){return{...t,type:"quoteSingle"}}function bs(t,e){return ws(Yt(t,e))}function Ns(t,e,n){return{...b("sequence",t),...X(),...F(),...e,children:n}}function Os(t,e){return{...b("sequenceItem",t),...B(),...F(),children:e?[e]:[]}}function Ls(t,e){let r=ce(t.cstNode.items,e).map((s,i)=>{Ye(s,e);let o=e.transformNode(t.items[i]);return Os(V(e.transformOffset(s.valueRange.origStart),o===null?e.transformOffset(s.valueRange.origStart+1):o.position.end),o)});return Ns(V(r[0].position.start,q(r).position.end),e.transformContent(t),r)}function As(t,e){if(t===null||t.type===void 0&&t.value===null)return null;switch(t.type){case"ALIAS":return Ur(t,e);case"BLOCK_FOLDED":return Jr(t,e);case"BLOCK_LITERAL":return Hr(t,e);case"COMMENT":return Xr(t,e);case"DIRECTIVE":return Zr(t,e);case"DOCUMENT":return is(t,e);case"FLOW_MAP":return as(t,e);case"FLOW_SEQ":return fs(t,e);case"MAP":return ms(t,e);case"PLAIN":return ds(t,e);case"QUOTE_DOUBLE":return Ss(t,e);case"QUOTE_SINGLE":return bs(t,e);case"SEQ":return Ls(t,e);default:throw new Error(`Unexpected node type ${t.type}`)}}function Ts(t,e,n){let r=new SyntaxError(t);return r.name="YAMLSyntaxError",r.source=e,r.position=n,r}function Cs(t,e){let n=t.source.range||t.source.valueRange;return Ts(t.message,e.text,e.transformRange(n))}function Ms(t,e,n){return{offset:t,line:e,column:n}}function ks(t,e){t<0?t=0:t>e.text.length&&(t=e.text.length);let n=e.locator.locationForIndex(t);return Ms(t,n.line+1,n.column+1)}function vs(t,e){return V(e.transformOffset(t.origStart),e.transformOffset(t.origEnd))}function Is(t){if(!t.setOrigRanges()){let e=n=>{if(yo(n))return n.origStart=n.start,n.origEnd=n.end,!0;if(Eo(n))return n.origOffset=n.offset,!0};t.forEach(n=>Nn(n,e))}}function Nn(t,e){if(!(!t||typeof t!="object")&&e(t)!==!0)for(let n of Object.keys(t)){if(n==="context"||n==="error")continue;let r=t[n];Array.isArray(r)?r.forEach(s=>Nn(s,e)):Nn(r,e)}}function yo(t){return typeof t.start=="number"}function Eo(t){return typeof t.offset=="number"}function On(t){if("children"in t){if(t.children.length===1){let e=t.children[0];if(e.type==="plain"&&e.tag===null&&e.anchor===null&&e.value==="")return t.children.splice(0,1),t}t.children.forEach(On)}return t}function Ln(t,e,n,r){let s=e(t);return i=>{r(s,i)&&n(t,s=i)}}function An(t){if(t===null||!("children"in t))return;let e=t.children;if(e.forEach(An),t.type==="document"){let[i,o]=t.children;i.position.start.offset===i.position.end.offset?i.position.start=i.position.end=o.position.start:o.position.start.offset===o.position.end.offset&&(o.position.start=o.position.end=i.position.end)}let n=Ln(t.position,So,wo,Oo),r=Ln(t.position,bo,No,Lo);"endComments"in t&&t.endComments.length!==0&&(n(t.endComments[0].position.start),r(q(t.endComments).position.end));let s=e.filter(i=>i!==null);if(s.length!==0){let i=s[0],o=q(s);n(i.position.start),r(o.position.end),"leadingComments"in i&&i.leadingComments.length!==0&&n(i.leadingComments[0].position.start),"tag"in i&&i.tag&&n(i.tag.position.start),"anchor"in i&&i.anchor&&n(i.anchor.position.start),"trailingComment"in o&&o.trailingComment&&r(o.trailingComment.position.end)}}function So(t){return t.start}function wo(t,e){t.start=e}function bo(t){return t.end}function No(t,e){t.end=e}function Oo(t,e){return e.offsett.offset}var wi=sr(Ei(),1);var G=sr(Si(),1),Km=G.default.findPair,Vm=G.default.toJSON,Wm=G.default.parseMap,jm=G.default.parseSeq,Qm=G.default.stringifyNumber,Jm=G.default.stringifyString,Gm=G.default.Type,Va=G.default.YAMLError,Hm=G.default.YAMLReferenceError,er=G.default.YAMLSemanticError,Wa=G.default.YAMLSyntaxError,Xm=G.default.YAMLWarning;var{Document:bi,parseCST:Ni}=wi.default;function Oi(t){let e=Ni(t);Is(e);let n=e.map(a=>new bi({merge:!1,keepCstNodes:!0}).parse(a)),r=new Dr(t),s=[],i={text:t,locator:r,comments:s,transformOffset:a=>ks(a,i),transformRange:a=>vs(a,i),transformNode:a=>As(a,i),transformContent:a=>kt(a,i)};for(let a of n)for(let c of a.errors)if(!(c instanceof er&&c.message==='Map keys must be unique; "<<" is repeated'))throw Cs(c,i);n.forEach(a=>ct(a.cstNode));let o=Fr(i.transformRange({origStart:0,origEnd:i.text.length}),n.map(i.transformNode),s);return Yr(o),An(o),On(o),o}function Qa(t,e){let n=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(n,e)}var Li=Qa;function Ja(t){try{let e=Oi(t);return delete e.comments,e}catch(e){throw e!=null&&e.position?Li(e.message,{loc:e.position,cause:e}):e}}var Ga={astFormat:"yaml",parse:Ja,hasPragma:Sr,locStart:Pe,locEnd:yr};var Ha={yaml:Pr};var Oh=nr;export{Oh as default,_r as languages,xr as options,tr as parsers,Ha as printers}; diff --git a/node_modules/prettier/standalone.d.ts b/node_modules/prettier/standalone.d.ts new file mode 100644 index 0000000..67945fa --- /dev/null +++ b/node_modules/prettier/standalone.d.ts @@ -0,0 +1,33 @@ +import { CursorOptions, CursorResult, Options, SupportInfo } from "./index.js"; + +/** + * formatWithCursor both formats the code, and translates a cursor position from unformatted code to formatted code. + * This is useful for editor integrations, to prevent the cursor from moving when code is formatted + * + * The cursorOffset option should be provided, to specify where the cursor is. + * + * ```js + * await prettier.formatWithCursor(" 1", { cursorOffset: 2, parser: "babel" }); + * ``` + * `-> { formatted: "1;\n", cursorOffset: 1 }` + */ +export function formatWithCursor( + source: string, + options: CursorOptions, +): Promise; + +/** + * `format` is used to format text using Prettier. [Options](https://prettier.io/docs/options) may be provided to override the defaults. + */ +export function format(source: string, options?: Options): Promise; + +/** + * `check` checks to see if the file has been formatted with Prettier given those options and returns a `Boolean`. + * This is similar to the `--list-different` parameter in the CLI and is useful for running Prettier in CI scenarios. + */ +export function check(source: string, options?: Options): Promise; + +/** + * Returns an object representing the parsers, languages and file types Prettier supports for the current version. + */ +export function getSupportInfo(): Promise; diff --git a/node_modules/prettier/standalone.js b/node_modules/prettier/standalone.js new file mode 100644 index 0000000..b45e6ae --- /dev/null +++ b/node_modules/prettier/standalone.js @@ -0,0 +1,39 @@ +(function(t){function e(){var o=t();return o.default||o}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var f=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};f.prettier=e()}})(function(){"use strict";var Au=Object.create;var Me=Object.defineProperty;var vu=Object.getOwnPropertyDescriptor;var Bu=Object.getOwnPropertyNames;var wu=Object.getPrototypeOf,_u=Object.prototype.hasOwnProperty;var fr=e=>{throw TypeError(e)};var dr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),vt=(e,t)=>{for(var r in t)Me(e,r,{get:t[r],enumerable:!0})},pr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let u of Bu(t))!_u.call(e,u)&&u!==r&&Me(e,u,{get:()=>t[u],enumerable:!(n=vu(t,u))||n.enumerable});return e};var Ve=(e,t,r)=>(r=e!=null?Au(wu(e)):{},pr(t||!e||!e.__esModule?Me(r,"default",{value:e,enumerable:!0}):r,e)),xu=e=>pr(Me({},"__esModule",{value:!0}),e);var bu=(e,t,r)=>t.has(e)||fr("Cannot "+r);var Fr=(e,t,r)=>t.has(e)?fr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r);var pe=(e,t,r)=>(bu(e,t,"access private method"),r);var st=dr((la,mn)=>{"use strict";var Fn=new Proxy(String,{get:()=>Fn});mn.exports=Fn});var $n=dr(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});function wi(){return new Proxy({},{get:()=>e=>e})}var Wn=/\r\n|[\n\r\u2028\u2029]/;function _i(e,t,r){let n=Object.assign({column:0,line:-1},e.start),u=Object.assign({},n,e.end),{linesAbove:i=2,linesBelow:o=3}=r||{},s=n.line,a=n.column,D=u.line,l=u.column,p=Math.max(s-(i+1),0),f=Math.min(t.length,D+o);s===-1&&(p=0),D===-1&&(f=t.length);let d=D-s,c={};if(d)for(let F=0;F<=d;F++){let m=F+s;if(!a)c[m]=!0;else if(F===0){let h=t[m-1].length;c[m]=[a,h-a+1]}else if(F===d)c[m]=[0,l];else{let h=t[m-F].length;c[m]=[0,h]}}else a===l?a?c[s]=[a,0]:c[s]=!0:c[s]=[a,l-a];return{start:p,end:f,markerLines:c}}function xi(e,t,r={}){let u=wi(!1),i=e.split(Wn),{start:o,end:s,markerLines:a}=_i(t,i,r),D=t.start&&typeof t.start.column=="number",l=String(s).length,f=e.split(Wn,s).slice(o,s).map((d,c)=>{let F=o+1+c,h=` ${` ${F}`.slice(-l)} |`,C=a[F],v=!a[F+1];if(C){let E="";if(Array.isArray(C)){let g=d.slice(0,Math.max(C[0]-1,0)).replace(/[^\t]/g," "),j=C[1]||1;E=[` + `,u.gutter(h.replace(/\d/g," "))," ",g,u.marker("^").repeat(j)].join(""),v&&r.message&&(E+=" "+u.message(r.message))}return[u.marker(">"),u.gutter(h),d.length>0?` ${d}`:"",E].join("")}else return` ${u.gutter(h)}${d.length>0?` ${d}`:""}`}).join(` +`);return r.message&&!D&&(f=`${" ".repeat(l+1)}${r.message} +${f}`),f}ur.codeFrameColumns=xi});var co={};vt(co,{__debug:()=>lo,check:()=>ao,doc:()=>Dr,format:()=>yu,formatWithCursor:()=>gu,getSupportInfo:()=>Do,util:()=>cr,version:()=>cu});var Nu=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},ne=Nu;function U(){}U.prototype={diff:function(t,r){var n,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=u.callback;typeof u=="function"&&(i=u,u={});var o=this;function s(E){return E=o.postProcess(E,u),i?(setTimeout(function(){i(E)},0),!0):E}t=this.castInput(t,u),r=this.castInput(r,u),t=this.removeEmpty(this.tokenize(t,u)),r=this.removeEmpty(this.tokenize(r,u));var a=r.length,D=t.length,l=1,p=a+D;u.maxEditLength!=null&&(p=Math.min(p,u.maxEditLength));var f=(n=u.timeout)!==null&&n!==void 0?n:1/0,d=Date.now()+f,c=[{oldPos:-1,lastComponent:void 0}],F=this.extractCommon(c[0],r,t,0,u);if(c[0].oldPos+1>=D&&F+1>=a)return s(mr(o,c[0].lastComponent,r,t,o.useLongestToken));var m=-1/0,h=1/0;function C(){for(var E=Math.max(m,-l);E<=Math.min(h,l);E+=2){var g=void 0,j=c[E-1],b=c[E+1];j&&(c[E-1]=void 0);var X=!1;if(b){var ae=b.oldPos-E;X=b&&0<=ae&&ae=D&&F+1>=a)return s(mr(o,g.lastComponent,r,t,o.useLongestToken));c[E]=g,g.oldPos+1>=D&&(h=Math.min(h,E-1)),F+1>=a&&(m=Math.max(m,E+1))}l++}if(i)(function E(){setTimeout(function(){if(l>p||Date.now()>d)return i();C()||E()},0)})();else for(;l<=p&&Date.now()<=d;){var v=C();if(v)return v}},addToPath:function(t,r,n,u,i){var o=t.lastComponent;return o&&!i.oneChangePerToken&&o.added===r&&o.removed===n?{oldPos:t.oldPos+u,lastComponent:{count:o.count+1,added:r,removed:n,previousComponent:o.previousComponent}}:{oldPos:t.oldPos+u,lastComponent:{count:1,added:r,removed:n,previousComponent:o}}},extractCommon:function(t,r,n,u,i){for(var o=r.length,s=n.length,a=t.oldPos,D=a-u,l=0;D+1d.length?F:d}),p.value=e.join(f)}else p.value=e.join(r.slice(D,D+p.count));D+=p.count,p.added||(l+=p.count)}}return i}var ho=new U;function hr(e,t){var r;for(r=0;rt.length&&(r=e.length-t.length);var n=t.length;e.length0&&t[o]!=t[i];)i=u[i];t[o]==t[i]&&i++}i=0;for(var s=r;s0&&e[s]!=t[i];)i=u[i];e[s]==t[i]&&i++}return i}var ze="a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",Su=new RegExp("[".concat(ze,"]+|\\s+|[^").concat(ze,"]"),"ug"),Ke=new U;Ke.equals=function(e,t,r){return r.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()};Ke.tokenize=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r;if(t.intlSegmenter){if(t.intlSegmenter.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');r=Array.from(t.intlSegmenter.segment(e),function(i){return i.segment})}else r=e.match(Su)||[];var n=[],u=null;return r.forEach(function(i){/\s/.test(i)?u==null?n.push(i):n.push(n.pop()+i):/\s/.test(u)?n[n.length-1]==u?n.push(n.pop()+i):n.push(u+i):n.push(i),u=i}),n};Ke.join=function(e){return e.map(function(t,r){return r==0?t:t.replace(/^\s+/,"")}).join("")};Ke.postProcess=function(e,t){if(!e||t.oneChangePerToken)return e;var r=null,n=null,u=null;return e.forEach(function(i){i.added?n=i:i.removed?u=i:((n||u)&&gr(r,u,n,i),r=i,n=null,u=null)}),(n||u)&&gr(r,u,n,null),e};function gr(e,t,r,n){if(t&&r){var u=t.value.match(/^\s*/)[0],i=t.value.match(/\s*$/)[0],o=r.value.match(/^\s*/)[0],s=r.value.match(/\s*$/)[0];if(e){var a=hr(u,o);e.value=wt(e.value,o,a),t.value=_e(t.value,a),r.value=_e(r.value,a)}if(n){var D=Er(i,s);n.value=Bt(n.value,s,D),t.value=Ue(t.value,D),r.value=Ue(r.value,D)}}else if(r)e&&(r.value=r.value.replace(/^\s*/,"")),n&&(n.value=n.value.replace(/^\s*/,""));else if(e&&n){var l=n.value.match(/^\s*/)[0],p=t.value.match(/^\s*/)[0],f=t.value.match(/\s*$/)[0],d=hr(l,p);t.value=_e(t.value,d);var c=Er(_e(l,d),f);t.value=Ue(t.value,c),n.value=Bt(n.value,l,c),e.value=wt(e.value,l,l.slice(0,l.length-c.length))}else if(n){var F=n.value.match(/^\s*/)[0],m=t.value.match(/\s*$/)[0],h=Cr(m,F);t.value=Ue(t.value,h)}else if(e){var C=e.value.match(/\s*$/)[0],v=t.value.match(/^\s*/)[0],E=Cr(C,v);t.value=_e(t.value,E)}}var Tu=new U;Tu.tokenize=function(e){var t=new RegExp("(\\r?\\n)|[".concat(ze,"]+|[^\\S\\n\\r]+|[^").concat(ze,"]"),"ug");return e.match(t)||[]};var bt=new U;bt.tokenize=function(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,` +`));var r=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var u=0;u"u"?r:o}:n;return typeof e=="string"?e:JSON.stringify(xt(e,null,null,u),u," ")};xe.equals=function(e,t,r){return U.prototype.equals.call(xe,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"),r)};function xt(e,t,r,n,u){t=t||[],r=r||[],n&&(e=n(u,e));var i;for(i=0;i{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},A=Pu;function Iu(e){if(typeof e=="string")return $;if(Array.isArray(e))return H;if(!e)return;let{type:t}=e;if(Je.has(t))return t}var M=Iu;var Ru=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Yu(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', +Expected it to be 'string' or 'object'.`;if(M(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=Ru([...Je].map(u=>`'${u}'`));return`Unexpected doc.type '${e.type}'. +Expected it to be ${n}.`}var Ot=class extends Error{name="InvalidDocError";constructor(t){super(Yu(t)),this.doc=t}},Q=Ot;var Br={};function ju(e,t,r,n){let u=[e];for(;u.length>0;){let i=u.pop();if(i===Br){r(u.pop());continue}r&&u.push(i,Br);let o=M(i);if(!o)throw new Q(i);if((t==null?void 0:t(i))!==!1)switch(o){case H:case N:{let s=o===H?i:i.parts;for(let a=s.length,D=a-1;D>=0;--D)u.push(s[D]);break}case w:u.push(i.flatContents,i.breakContents);break;case B:if(n&&i.expandedStates)for(let s=i.expandedStates.length,a=s-1;a>=0;--a)u.push(i.expandedStates[a]);else u.push(i.contents);break;case k:case T:case P:case O:case I:u.push(i.contents);break;case $:case z:case L:case R:case y:case _:break;default:throw new Q(i)}}}var Fe=ju;function Oe(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(i){if(r.has(i))return r.get(i);let o=u(i);return r.set(i,o),o}function u(i){switch(M(i)){case H:return t(i.map(n));case N:return t({...i,parts:i.parts.map(n)});case w:return t({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case B:{let{expandedStates:o,contents:s}=i;return o?(o=o.map(n),s=o[0]):s=n(s),t({...i,contents:s,expandedStates:o})}case k:case T:case P:case O:case I:return t({...i,contents:n(i.contents)});case $:case z:case L:case R:case y:case _:return t(i);default:throw new Q(i)}}}function qe(e,t,r){let n=r,u=!1;function i(o){if(u)return!1;let s=t(o);s!==void 0&&(u=!0,n=s)}return Fe(e,i),n}function Hu(e){if(e.type===B&&e.break||e.type===y&&e.hard||e.type===_)return!0}function xr(e){return qe(e,Hu,!1)}function wr(e){if(e.length>0){let t=A(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function br(e){let t=new Set,r=[];function n(i){if(i.type===_&&wr(r),i.type===B){if(r.push(i),t.has(i))return!1;t.add(i)}}function u(i){i.type===B&&r.pop().break&&wr(r)}Fe(e,n,u,!0)}function Wu(e){return e.type===y&&!e.hard?e.soft?"":" ":e.type===w?e.flatContents:e}function Nr(e){return Oe(e,Wu)}function _r(e){for(e=[...e];e.length>=2&&A(!1,e,-2).type===y&&A(!1,e,-1).type===_;)e.length-=2;if(e.length>0){let t=Ne(A(!1,e,-1));e[e.length-1]=t}return e}function Ne(e){switch(M(e)){case T:case P:case B:case I:case O:{let t=Ne(e.contents);return{...e,contents:t}}case w:return{...e,breakContents:Ne(e.breakContents),flatContents:Ne(e.flatContents)};case N:return{...e,parts:_r(e.parts)};case H:return _r(e);case $:return e.replace(/[\n\r]*$/u,"");case k:case z:case L:case R:case y:case _:break;default:throw new Q(e)}return e}function Xe(e){return Ne(Mu(e))}function $u(e){switch(M(e)){case N:if(e.parts.every(t=>t===""))return"";break;case B:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===B&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case k:case T:case P:case I:if(!e.contents)return"";break;case w:if(!e.flatContents&&!e.breakContents)return"";break;case H:{let t=[];for(let r of e){if(!r)continue;let[n,...u]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof A(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...u)}return t.length===0?"":t.length===1?t[0]:t}case $:case z:case L:case R:case y:case O:case _:break;default:throw new Q(e)}return e}function Mu(e){return Oe(e,t=>$u(t))}function Or(e,t=Qe){return Oe(e,r=>typeof r=="string"?Se(t,r.split(` +`)):r)}function Vu(e){if(e.type===y)return!0}function Sr(e){return qe(e,Vu,!1)}function me(e,t){return e.type===O?{...e,contents:t(e.contents)}:t(e)}var St=()=>{},G=St,Tt=St,Tr=St;function le(e){return G(e),{type:T,contents:e}}function De(e,t){return G(t),{type:k,contents:t,n:e}}function kt(e,t={}){return G(e),Tt(t.expandedStates,!0),{type:B,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function kr(e){return De(Number.NEGATIVE_INFINITY,e)}function Lr(e){return De({type:"root"},e)}function Pr(e){return De(-1,e)}function Ir(e,t){return kt(e[0],{...t,expandedStates:e})}function Rr(e){return Tr(e),{type:N,parts:e}}function Yr(e,t="",r={}){return G(e),t!==""&&G(t),{type:w,breakContents:e,flatContents:t,groupId:r.groupId}}function jr(e,t){return G(e),{type:P,contents:e,groupId:t.groupId,negate:t.negate}}function Te(e){return G(e),{type:I,contents:e}}var Hr={type:R},he={type:_},Wr={type:L},ke={type:y,hard:!0},Lt={type:y,hard:!0,literal:!0},Ze={type:y},$r={type:y,soft:!0},K=[ke,he],Qe=[Lt,he],Z={type:z};function Se(e,t){G(e),Tt(t);let r=[];for(let n=0;n0){for(let u=0;u0?`, { ${l.join(", ")} }`:"";return`indentIfBreak(${n(i.contents)}${p})`}if(i.type===B){let l=[];i.break&&i.break!=="propagated"&&l.push("shouldBreak: true"),i.id&&l.push(`id: ${u(i.id)}`);let p=l.length>0?`, { ${l.join(", ")} }`:"";return i.expandedStates?`conditionalGroup([${i.expandedStates.map(f=>n(f)).join(",")}]${p})`:`group(${n(i.contents)}${p})`}if(i.type===N)return`fill([${i.parts.map(l=>n(l)).join(", ")}])`;if(i.type===I)return"lineSuffix("+n(i.contents)+")";if(i.type===R)return"lineSuffixBoundary";if(i.type===O)return`label(${JSON.stringify(i.label)}, ${n(i.contents)})`;throw new Error("Unknown doc type "+i.type)}function u(i){if(typeof i!="symbol")return JSON.stringify(String(i));if(i in t)return t[i];let o=i.description||"symbol";for(let s=0;;s++){let a=o+(s>0?` #${s}`:"");if(!r.has(a))return r.add(a),t[i]=`Symbol.for(${JSON.stringify(a)})`}}}var Ur=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\u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0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function zr(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Gr(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var Kr=e=>!(zr(e)||Gr(e));var Uu=/[^\x20-\x7F]/u;function zu(e){if(!e)return 0;if(!Uu.test(e))return e.length;e=e.replace(Ur()," ");let t=0;for(let r of e){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(t+=Kr(n)?1:2)}return t}var Le=zu;var Y=Symbol("MODE_BREAK"),J=Symbol("MODE_FLAT"),Ee=Symbol("cursor"),Pt=Symbol("DOC_FILL_PRINTED_LENGTH");function Jr(){return{value:"",length:0,queue:[]}}function Gu(e,t){return It(e,{type:"indent"},t)}function Ku(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||Jr():t<0?It(e,{type:"dedent"},r):t?t.type==="root"?{...e,root:e}:It(e,{type:typeof t=="string"?"stringAlign":"numberAlign",n:t},r):e}function It(e,t,r){let n=t.type==="dedent"?e.queue.slice(0,-1):[...e.queue,t],u="",i=0,o=0,s=0;for(let c of n)switch(c.type){case"indent":l(),r.useTabs?a(1):D(r.tabWidth);break;case"stringAlign":l(),u+=c.n,i+=c.n.length;break;case"numberAlign":o+=1,s+=c.n;break;default:throw new Error(`Unexpected type '${c.type}'`)}return f(),{...e,value:u,length:i,queue:n};function a(c){u+=" ".repeat(c),i+=r.tabWidth*c}function D(c){u+=" ".repeat(c),i+=c}function l(){r.useTabs?p():f()}function p(){o>0&&a(o),d()}function f(){s>0&&D(s),d()}function d(){o=0,s=0}}function Rt(e){let t=0,r=0,n=e.length;e:for(;n--;){let u=e[n];if(u===Ee){r++;continue}for(let i=u.length-1;i>=0;i--){let o=u[i];if(o===" "||o===" ")t++;else{e[n]=u.slice(0,i+1);break e}}}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(Ee);return t}function tt(e,t,r,n,u,i){if(r===Number.POSITIVE_INFINITY)return!0;let o=t.length,s=[e],a=[];for(;r>=0;){if(s.length===0){if(o===0)return!0;s.push(t[--o]);continue}let{mode:D,doc:l}=s.pop(),p=M(l);switch(p){case $:a.push(l),r-=Le(l);break;case H:case N:{let f=p===H?l:l.parts,d=l[Pt]??0;for(let c=f.length-1;c>=d;c--)s.push({mode:D,doc:f[c]});break}case T:case k:case P:case O:s.push({mode:D,doc:l.contents});break;case L:r+=Rt(a);break;case B:{if(i&&l.break)return!1;let f=l.break?Y:D,d=l.expandedStates&&f===Y?A(!1,l.expandedStates,-1):l.contents;s.push({mode:f,doc:d});break}case w:{let d=(l.groupId?u[l.groupId]||J:D)===Y?l.breakContents:l.flatContents;d&&s.push({mode:D,doc:d});break}case y:if(D===Y||l.hard)return!0;l.soft||(a.push(" "),r--);break;case I:n=!0;break;case R:if(n)return!1;break}}return!1}function Ce(e,t){let r={},n=t.printWidth,u=be(t.endOfLine),i=0,o=[{ind:Jr(),mode:Y,doc:e}],s=[],a=!1,D=[],l=0;for(br(e);o.length>0;){let{ind:f,mode:d,doc:c}=o.pop();switch(M(c)){case $:{let F=u!==` +`?ne(!1,c,` +`,u):c;s.push(F),o.length>0&&(i+=Le(F));break}case H:for(let F=c.length-1;F>=0;F--)o.push({ind:f,mode:d,doc:c[F]});break;case z:if(l>=2)throw new Error("There are too many 'cursor' in doc.");s.push(Ee),l++;break;case T:o.push({ind:Gu(f,t),mode:d,doc:c.contents});break;case k:o.push({ind:Ku(f,c.n,t),mode:d,doc:c.contents});break;case L:i-=Rt(s);break;case B:switch(d){case J:if(!a){o.push({ind:f,mode:c.break?Y:J,doc:c.contents});break}case Y:{a=!1;let F={ind:f,mode:J,doc:c.contents},m=n-i,h=D.length>0;if(!c.break&&tt(F,o,m,h,r))o.push(F);else if(c.expandedStates){let C=A(!1,c.expandedStates,-1);if(c.break){o.push({ind:f,mode:Y,doc:C});break}else for(let v=1;v=c.expandedStates.length){o.push({ind:f,mode:Y,doc:C});break}else{let E=c.expandedStates[v],g={ind:f,mode:J,doc:E};if(tt(g,o,m,h,r)){o.push(g);break}}}else o.push({ind:f,mode:Y,doc:c.contents});break}}c.id&&(r[c.id]=A(!1,o,-1).mode);break;case N:{let F=n-i,m=c[Pt]??0,{parts:h}=c,C=h.length-m;if(C===0)break;let v=h[m+0],E=h[m+1],g={ind:f,mode:J,doc:v},j={ind:f,mode:Y,doc:v},b=tt(g,[],F,D.length>0,r,!0);if(C===1){b?o.push(g):o.push(j);break}let X={ind:f,mode:J,doc:E},ae={ind:f,mode:Y,doc:E};if(C===2){b?o.push(X,g):o.push(ae,j);break}let $e=h[m+2],At={ind:f,mode:d,doc:{...c,[Pt]:m+2}};tt({ind:f,mode:J,doc:[v,E,$e]},[],F,D.length>0,r,!0)?o.push(At,X,g):b?o.push(At,ae,g):o.push(At,ae,j);break}case w:case P:{let F=c.groupId?r[c.groupId]:d;if(F===Y){let m=c.type===w?c.breakContents:c.negate?c.contents:le(c.contents);m&&o.push({ind:f,mode:d,doc:m})}if(F===J){let m=c.type===w?c.flatContents:c.negate?le(c.contents):c.contents;m&&o.push({ind:f,mode:d,doc:m})}break}case I:D.push({ind:f,mode:d,doc:c.contents});break;case R:D.length>0&&o.push({ind:f,mode:d,doc:ke});break;case y:switch(d){case J:if(c.hard)a=!0;else{c.soft||(s.push(" "),i+=1);break}case Y:if(D.length>0){o.push({ind:f,mode:d,doc:c},...D.reverse()),D.length=0;break}c.literal?f.root?(s.push(u,f.root.value),i=f.root.length):(s.push(u),i=0):(i-=Rt(s),s.push(u+f.value),i=f.length);break}break;case O:o.push({ind:f,mode:d,doc:c.contents});break;case _:break;default:throw new Q(c)}o.length===0&&D.length>0&&(o.push(...D.reverse()),D.length=0)}let p=s.indexOf(Ee);if(p!==-1){let f=s.indexOf(Ee,p+1);if(f===-1)return{formatted:s.filter(m=>m!==Ee).join("")};let d=s.slice(0,p).join(""),c=s.slice(p+1,f).join(""),F=s.slice(f+1).join("");return{formatted:d+c+F,cursorNodeStart:d.length,cursorNodeText:c}}return{formatted:s.join("")}}function Ju(e,t,r=0){let n=0;for(let u=r;u1?A(!1,t,-2):null}getValue(){return A(!1,this.stack,-1)}getNode(t=0){let r=pe(this,te,jt).call(this,t);return r===-1?null:this.stack[r]}getParentNode(t=0){return this.getNode(t+1)}call(t,...r){let{stack:n}=this,{length:u}=n,i=A(!1,n,-1);for(let o of r)i=i[o],n.push(o,i);try{return t(this)}finally{n.length=u}}callParent(t,r=0){let n=pe(this,te,jt).call(this,r+1),u=this.stack.splice(n+1);try{return t(this)}finally{this.stack.push(...u)}}each(t,...r){let{stack:n}=this,{length:u}=n,i=A(!1,n,-1);for(let o of r)i=i[o],n.push(o,i);try{for(let o=0;o{n[i]=t(u,i,o)},...r),n}match(...t){let r=this.stack.length-1,n=null,u=this.stack[r--];for(let i of t){if(u===void 0)return!1;let o=null;if(typeof n=="number"&&(o=n,n=this.stack[r--],u=this.stack[r--]),i&&!i(u,n,o))return!1;n=this.stack[r--],u=this.stack[r--]}return!0}findAncestor(t){for(let r of pe(this,te,rt).call(this))if(t(r))return r}hasAncestor(t){for(let r of pe(this,te,rt).call(this))if(t(r))return!0;return!1}};te=new WeakSet,jt=function(t){let{stack:r}=this;for(let n=r.length-1;n>=0;n-=2)if(!Array.isArray(r[n])&&--t<0)return n;return-1},rt=function*(){let{stack:t}=this;for(let r=t.length-3;r>=0;r-=2){let n=t[r];Array.isArray(n)||(yield n)}};var qr=Yt;var Xr=new Proxy(()=>{},{get:()=>Xr}),Pe=Xr;function qu(e){return e!==null&&typeof e=="object"}var Qr=qu;function*ye(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,u=i=>Qr(i)&&n(i);for(let i of r(e)){let o=e[i];if(Array.isArray(o))for(let s of o)u(s)&&(yield s);else u(o)&&(yield o)}}function*Zr(e,t){let r=[e];for(let n=0;n{let u=!!(n!=null&&n.backwards);if(r===!1)return!1;let{length:i}=t,o=r;for(;o>=0&&o0}var Ht=Zu;var rn=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),ei=e=>Object.keys(e).filter(t=>!rn.has(t));function ti(e){return e?t=>e(t,rn):ei}var q=ti;function ri(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"\u2026"),t+(r?" "+r:"")}function Wt(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=ri(e)}function ue(e,t){t.leading=!0,t.trailing=!1,Wt(e,t)}function re(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),Wt(e,t)}function ie(e,t){t.leading=!1,t.trailing=!0,Wt(e,t)}var $t=new WeakMap;function it(e,t){if($t.has(e))return $t.get(e);let{printer:{getCommentChildNodes:r,canAttachComment:n,getVisitorKeys:u},locStart:i,locEnd:o}=t;if(!n)return[];let s=((r==null?void 0:r(e,t))??[...ye(e,{getVisitorKeys:q(u)})]).flatMap(a=>n(a)?[a]:it(a,t));return s.sort((a,D)=>i(a)-i(D)||o(a)-o(D)),$t.set(e,s),s}function un(e,t,r,n){let{locStart:u,locEnd:i}=r,o=u(t),s=i(t),a=it(e,r),D,l,p=0,f=a.length;for(;p>1,c=a[d],F=u(c),m=i(c);if(F<=o&&s<=m)return un(c,t,r,c);if(m<=o){D=c,p=d+1;continue}if(s<=F){l=c,f=d;continue}throw new Error("Comment location overlaps with node location")}if((n==null?void 0:n.type)==="TemplateLiteral"){let{quasis:d}=n,c=Vt(d,t,r);D&&Vt(d,D,r)!==c&&(D=null),l&&Vt(d,l,r)!==c&&(l=null)}return{enclosingNode:n,precedingNode:D,followingNode:l}}var Mt=()=>!1;function on(e,t){let{comments:r}=e;if(delete e.comments,!Ht(r)||!t.printer.canAttachComment)return;let n=[],{locStart:u,locEnd:i,printer:{experimentalFeatures:{avoidAstMutation:o=!1}={},handleComments:s={}},originalText:a}=t,{ownLine:D=Mt,endOfLine:l=Mt,remaining:p=Mt}=s,f=r.map((d,c)=>({...un(e,d,t),comment:d,text:a,options:t,ast:e,isLastComment:r.length-1===c}));for(let[d,c]of f.entries()){let{comment:F,precedingNode:m,enclosingNode:h,followingNode:C,text:v,options:E,ast:g,isLastComment:j}=c;if(E.parser==="json"||E.parser==="json5"||E.parser==="jsonc"||E.parser==="__js_expression"||E.parser==="__ts_expression"||E.parser==="__vue_expression"||E.parser==="__vue_ts_expression"){if(u(F)-u(g)<=0){ue(g,F);continue}if(i(F)-i(g)>=0){ie(g,F);continue}}let b;if(o?b=[c]:(F.enclosingNode=h,F.precedingNode=m,F.followingNode=C,b=[F,v,E,g,j]),ni(v,E,f,d))F.placement="ownLine",D(...b)||(C?ue(C,F):m?ie(m,F):h?re(h,F):re(g,F));else if(ui(v,E,f,d))F.placement="endOfLine",l(...b)||(m?ie(m,F):C?ue(C,F):h?re(h,F):re(g,F));else if(F.placement="remaining",!p(...b))if(m&&C){let X=n.length;X>0&&n[X-1].followingNode!==C&&nn(n,E),n.push(c)}else m?ie(m,F):C?ue(C,F):h?re(h,F):re(g,F)}if(nn(n,t),!o)for(let d of r)delete d.precedingNode,delete d.enclosingNode,delete d.followingNode}var sn=e=>!/[\S\n\u2028\u2029]/u.test(e);function ni(e,t,r,n){let{comment:u,precedingNode:i}=r[n],{locStart:o,locEnd:s}=t,a=o(u);if(i)for(let D=n-1;D>=0;D--){let{comment:l,precedingNode:p}=r[D];if(p!==i||!sn(e.slice(s(l),a)))break;a=o(l)}return V(e,a,{backwards:!0})}function ui(e,t,r,n){let{comment:u,followingNode:i}=r[n],{locStart:o,locEnd:s}=t,a=s(u);if(i)for(let D=n+1;D0;--o){let{comment:D,precedingNode:l,followingNode:p}=e[o-1];Pe.strictEqual(l,n),Pe.strictEqual(p,u);let f=t.originalText.slice(t.locEnd(D),i);if(((a=(s=t.printer).isGap)==null?void 0:a.call(s,f,t))??/^[\s(]*$/u.test(f))i=t.locStart(D);else break}for(let[D,{comment:l}]of e.entries())D1&&D.comments.sort((l,p)=>t.locStart(l)-t.locStart(p));e.length=0}function Vt(e,t,r){let n=r.locStart(t)-1;for(let u=1;u!n.has(a)).length===0)return{leading:"",trailing:""};let i=[],o=[],s;return e.each(()=>{let a=e.node;if(n!=null&&n.has(a))return;let{leading:D,trailing:l}=a;D?i.push(oi(e,t)):l&&(s=si(e,t,s),o.push(s.doc))},"comments"),{leading:i,trailing:o}}function Dn(e,t,r){let{leading:n,trailing:u}=ai(e,r);return!n&&!u?t:me(t,i=>[n,i,u])}function ln(e){let{[Symbol.for("comments")]:t,[Symbol.for("printedComments")]:r}=e;for(let n of t){if(!n.printed&&!r.has(n))throw new Error('Comment "'+n.value.trim()+'" was not printed. Please report this error!');delete n.printed}}function Di(e){return()=>{}}var cn=Di;var Re=class extends Error{name="ConfigError"},Ye=class extends Error{name="UndefinedParserError"};var fn={cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing +(mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:e=>typeof e=="string"||typeof e=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"jsonc",description:"JSON with Comments"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e=="string"||typeof e=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive). +The range will extend forwards to the end of the selected statement.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset. +The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:`Require either '@prettier' or '@format' to be present in the file's first docblock comment +in order for it to be formatted.`,cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function ot({plugins:e=[],showDeprecated:t=!1}={}){let r=e.flatMap(u=>u.languages??[]),n=[];for(let u of ci(Object.assign({},...e.map(({options:i})=>i),fn)))!t&&u.deprecated||(Array.isArray(u.choices)&&(t||(u.choices=u.choices.filter(i=>!i.deprecated)),u.name==="parser"&&(u.choices=[...u.choices,...li(u.choices,r,e)])),u.pluginDefaults=Object.fromEntries(e.filter(i=>{var o;return((o=i.defaultOptions)==null?void 0:o[u.name])!==void 0}).map(i=>[i.name,i.defaultOptions[u.name]])),n.push(u));return{languages:r,options:n}}function*li(e,t,r){let n=new Set(e.map(u=>u.value));for(let u of t)if(u.parsers){for(let i of u.parsers)if(!n.has(i)){n.add(i);let o=r.find(a=>a.parsers&&Object.prototype.hasOwnProperty.call(a.parsers,i)),s=u.name;o!=null&&o.name&&(s+=` (plugin: ${o.name})`),yield{value:i,description:s}}}}function ci(e){let t=[];for(let[r,n]of Object.entries(e)){let u={name:r,...n};Array.isArray(u.default)&&(u.default=A(!1,u.default,-1).value),t.push(u)}return t}var fi=e=>String(e).split(/[/\\]/u).pop();function dn(e,t){if(!t)return;let r=fi(t).toLowerCase();return e.find(({filenames:n})=>n==null?void 0:n.some(u=>u.toLowerCase()===r))??e.find(({extensions:n})=>n==null?void 0:n.some(u=>r.endsWith(u)))}function di(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r==null?void 0:r.includes(t))??e.find(({extensions:r})=>r==null?void 0:r.includes(`.${t}`))}function pi(e,t){let r=e.plugins.flatMap(u=>u.languages??[]),n=di(r,t.language)??dn(r,t.physicalFile)??dn(r,t.file)??(t.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var pn=pi;var oe={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(r=>oe.value(r)).join(", ")}]`;let t=Object.keys(e);return t.length===0?"{}":`{ ${t.map(r=>`${oe.key(r)}: ${oe.value(e[r])}`).join(", ")} }`},pair:({key:e,value:t})=>oe.value({[e]:t})};var Ut=Ve(st(),1),hn=(e,t,{descriptor:r})=>{let n=[`${Ut.default.yellow(typeof e=="string"?r.key(e):r.pair(e))} is deprecated`];return t&&n.push(`we now treat it as ${Ut.default.blue(typeof t=="string"?r.key(t):r.pair(t))}`),n.join("; ")+"."};var ce=Ve(st(),1);var at=Symbol.for("vnopts.VALUE_NOT_EXIST"),ve=Symbol.for("vnopts.VALUE_UNCHANGED");var En=" ".repeat(2),gn=(e,t,r)=>{let{text:n,list:u}=r.normalizeExpectedResult(r.schemas[e].expected(r)),i=[];return n&&i.push(Cn(e,t,n,r.descriptor)),u&&i.push([Cn(e,t,u.title,r.descriptor)].concat(u.values.map(o=>yn(o,r.loggerPrintWidth))).join(` +`)),An(i,r.loggerPrintWidth)};function Cn(e,t,r,n){return[`Invalid ${ce.default.red(n.key(e))} value.`,`Expected ${ce.default.blue(r)},`,`but received ${t===at?ce.default.gray("nothing"):ce.default.red(n.value(t))}.`].join(" ")}function yn({text:e,list:t},r){let n=[];return e&&n.push(`- ${ce.default.blue(e)}`),t&&n.push([`- ${ce.default.blue(t.title)}:`].concat(t.values.map(u=>yn(u,r-En.length).replace(/^|\n/g,`$&${En}`))).join(` +`)),An(n,r)}function An(e,t){if(e.length===1)return e[0];let[r,n]=e,[u,i]=e.map(o=>o.split(` +`,1)[0].length);return u>t&&u>i?n:r}var Kt=Ve(st(),1);var zt=[],vn=[];function Gt(e,t){if(e===t)return 0;let r=e;e.length>t.length&&(e=t,t=r);let n=e.length,u=t.length;for(;n>0&&e.charCodeAt(~-n)===t.charCodeAt(~-u);)n--,u--;let i=0;for(;is?D>s?s+1:D:D>a?a+1:D;return s}var Dt=(e,t,{descriptor:r,logger:n,schemas:u})=>{let i=[`Ignored unknown option ${Kt.default.yellow(r.pair({key:e,value:t}))}.`],o=Object.keys(u).sort().find(s=>Gt(e,s)<3);o&&i.push(`Did you mean ${Kt.default.blue(r.key(o))}?`),n.warn(i.join(" "))};var Fi=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function mi(e,t){let r=new e(t),n=Object.create(r);for(let u of Fi)u in t&&(n[u]=hi(t[u],r,x.prototype[u].length));return n}var x=class{static create(t){return mi(this,t)}constructor(t){this.name=t.name}default(t){}expected(t){return"nothing"}validate(t,r){return!1}deprecated(t,r){return!1}forward(t,r){}redirect(t,r){}overlap(t,r,n){return t}preprocess(t,r){return t}postprocess(t,r){return ve}};function hi(e,t,r){return typeof e=="function"?(...n)=>e(...n.slice(0,r-1),t,...n.slice(r-1)):()=>e}var lt=class extends x{constructor(t){super(t),this._sourceName=t.sourceName}expected(t){return t.schemas[this._sourceName].expected(t)}validate(t,r){return r.schemas[this._sourceName].validate(t,r)}redirect(t,r){return this._sourceName}};var ct=class extends x{expected(){return"anything"}validate(){return!0}};var ft=class extends x{constructor({valueSchema:t,name:r=t.name,...n}){super({...n,name:r}),this._valueSchema=t}expected(t){let{text:r,list:n}=t.normalizeExpectedResult(this._valueSchema.expected(t));return{text:r&&`an array of ${r}`,list:n&&{title:"an array of the following values",values:[{list:n}]}}}validate(t,r){if(!Array.isArray(t))return!1;let n=[];for(let u of t){let i=r.normalizeValidateResult(this._valueSchema.validate(u,r),u);i!==!0&&n.push(i.value)}return n.length===0?!0:{value:n}}deprecated(t,r){let n=[];for(let u of t){let i=r.normalizeDeprecatedResult(this._valueSchema.deprecated(u,r),u);i!==!1&&n.push(...i.map(({value:o})=>({value:[o]})))}return n}forward(t,r){let n=[];for(let u of t){let i=r.normalizeForwardResult(this._valueSchema.forward(u,r),u);n.push(...i.map(Bn))}return n}redirect(t,r){let n=[],u=[];for(let i of t){let o=r.normalizeRedirectResult(this._valueSchema.redirect(i,r),i);"remain"in o&&n.push(o.remain),u.push(...o.redirect.map(Bn))}return n.length===0?{redirect:u}:{redirect:u,remain:n}}overlap(t,r){return t.concat(r)}};function Bn({from:e,to:t}){return{from:[e],to:t}}var dt=class extends x{expected(){return"true or false"}validate(t){return typeof t=="boolean"}};function _n(e,t){let r=Object.create(null);for(let n of e){let u=n[t];if(r[u])throw new Error(`Duplicate ${t} ${JSON.stringify(u)}`);r[u]=n}return r}function xn(e,t){let r=new Map;for(let n of e){let u=n[t];if(r.has(u))throw new Error(`Duplicate ${t} ${JSON.stringify(u)}`);r.set(u,n)}return r}function bn(){let e=Object.create(null);return t=>{let r=JSON.stringify(t);return e[r]?!0:(e[r]=!0,!1)}}function Nn(e,t){let r=[],n=[];for(let u of e)t(u)?r.push(u):n.push(u);return[r,n]}function On(e){return e===Math.floor(e)}function Sn(e,t){if(e===t)return 0;let r=typeof e,n=typeof t,u=["undefined","object","boolean","number","string"];return r!==n?u.indexOf(r)-u.indexOf(n):r!=="string"?Number(e)-Number(t):e.localeCompare(t)}function Tn(e){return(...t)=>{let r=e(...t);return typeof r=="string"?new Error(r):r}}function Jt(e){return e===void 0?{}:e}function qt(e){if(typeof e=="string")return{text:e};let{text:t,list:r}=e;return Ei((t||r)!==void 0,"Unexpected `expected` result, there should be at least one field."),r?{text:t,list:{title:r.title,values:r.values.map(qt)}}:{text:t}}function Xt(e,t){return e===!0?!0:e===!1?{value:t}:e}function Qt(e,t,r=!1){return e===!1?!1:e===!0?r?!0:[{value:t}]:"value"in e?[e]:e.length===0?!1:e}function wn(e,t){return typeof e=="string"||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function pt(e,t){return e===void 0?[]:Array.isArray(e)?e.map(r=>wn(r,t)):[wn(e,t)]}function Zt(e,t){let r=pt(typeof e=="object"&&"redirect"in e?e.redirect:e,t);return r.length===0?{remain:t,redirect:r}:typeof e=="object"&&"remain"in e?{remain:e.remain,redirect:r}:{redirect:r}}function Ei(e,t){if(!e)throw new Error(t)}var Ft=class extends x{constructor(t){super(t),this._choices=xn(t.choices.map(r=>r&&typeof r=="object"?r:{value:r}),"value")}expected({descriptor:t}){let r=Array.from(this._choices.keys()).map(o=>this._choices.get(o)).filter(({hidden:o})=>!o).map(o=>o.value).sort(Sn).map(t.value),n=r.slice(0,-2),u=r.slice(-2);return{text:n.concat(u.join(" or ")).join(", "),list:{title:"one of the following values",values:r}}}validate(t){return this._choices.has(t)}deprecated(t){let r=this._choices.get(t);return r&&r.deprecated?{value:t}:!1}forward(t){let r=this._choices.get(t);return r?r.forward:void 0}redirect(t){let r=this._choices.get(t);return r?r.redirect:void 0}};var mt=class extends x{expected(){return"a number"}validate(t,r){return typeof t=="number"}};var ht=class extends mt{expected(){return"an integer"}validate(t,r){return r.normalizeValidateResult(super.validate(t,r),t)===!0&&On(t)}};var je=class extends x{expected(){return"a string"}validate(t){return typeof t=="string"}};var kn=oe,Ln=Dt,Pn=gn,In=hn;var Et=class{constructor(t,r){let{logger:n=console,loggerPrintWidth:u=80,descriptor:i=kn,unknown:o=Ln,invalid:s=Pn,deprecated:a=In,missing:D=()=>!1,required:l=()=>!1,preprocess:p=d=>d,postprocess:f=()=>ve}=r||{};this._utils={descriptor:i,logger:n||{warn:()=>{}},loggerPrintWidth:u,schemas:_n(t,"name"),normalizeDefaultResult:Jt,normalizeExpectedResult:qt,normalizeDeprecatedResult:Qt,normalizeForwardResult:pt,normalizeRedirectResult:Zt,normalizeValidateResult:Xt},this._unknownHandler=o,this._invalidHandler=Tn(s),this._deprecatedHandler=a,this._identifyMissing=(d,c)=>!(d in c)||D(d,c),this._identifyRequired=l,this._preprocess=p,this._postprocess=f,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=bn()}normalize(t){let r={},u=[this._preprocess(t,this._utils)],i=()=>{for(;u.length!==0;){let o=u.shift(),s=this._applyNormalization(o,r);u.push(...s)}};i();for(let o of Object.keys(this._utils.schemas)){let s=this._utils.schemas[o];if(!(o in r)){let a=Jt(s.default(this._utils));"value"in a&&u.push({[o]:a.value})}}i();for(let o of Object.keys(this._utils.schemas)){if(!(o in r))continue;let s=this._utils.schemas[o],a=r[o],D=s.postprocess(a,this._utils);D!==ve&&(this._applyValidation(D,o,s),r[o]=D)}return this._applyPostprocess(r),this._applyRequiredCheck(r),r}_applyNormalization(t,r){let n=[],{knownKeys:u,unknownKeys:i}=this._partitionOptionKeys(t);for(let o of u){let s=this._utils.schemas[o],a=s.preprocess(t[o],this._utils);this._applyValidation(a,o,s);let D=({from:d,to:c})=>{n.push(typeof c=="string"?{[c]:d}:{[c.key]:c.value})},l=({value:d,redirectTo:c})=>{let F=Qt(s.deprecated(d,this._utils),a,!0);if(F!==!1)if(F===!0)this._hasDeprecationWarned(o)||this._utils.logger.warn(this._deprecatedHandler(o,c,this._utils));else for(let{value:m}of F){let h={key:o,value:m};if(!this._hasDeprecationWarned(h)){let C=typeof c=="string"?{key:c,value:m}:c;this._utils.logger.warn(this._deprecatedHandler(h,C,this._utils))}}};pt(s.forward(a,this._utils),a).forEach(D);let f=Zt(s.redirect(a,this._utils),a);if(f.redirect.forEach(D),"remain"in f){let d=f.remain;r[o]=o in r?s.overlap(r[o],d,this._utils):d,l({value:d})}for(let{from:d,to:c}of f.redirect)l({value:d,redirectTo:c})}for(let o of i){let s=t[o];this._applyUnknownHandler(o,s,r,(a,D)=>{n.push({[a]:D})})}return n}_applyRequiredCheck(t){for(let r of Object.keys(this._utils.schemas))if(this._identifyMissing(r,t)&&this._identifyRequired(r))throw this._invalidHandler(r,at,this._utils)}_partitionOptionKeys(t){let[r,n]=Nn(Object.keys(t).filter(u=>!this._identifyMissing(u,t)),u=>u in this._utils.schemas);return{knownKeys:r,unknownKeys:n}}_applyValidation(t,r,n){let u=Xt(n.validate(t,this._utils),t);if(u!==!0)throw this._invalidHandler(r,u.value,this._utils)}_applyUnknownHandler(t,r,n,u){let i=this._unknownHandler(t,r,this._utils);if(i)for(let o of Object.keys(i)){if(this._identifyMissing(o,i))continue;let s=i[o];o in this._utils.schemas?u(o,s):n[o]=s}}_applyPostprocess(t){let r=this._postprocess(t,this._utils);if(r!==ve){if(r.delete)for(let n of r.delete)delete t[n];if(r.override){let{knownKeys:n,unknownKeys:u}=this._partitionOptionKeys(r.override);for(let i of n){let o=r.override[i];this._applyValidation(o,i,this._utils.schemas[i]),t[i]=o}for(let i of u){let o=r.override[i];this._applyUnknownHandler(i,o,t,(s,a)=>{let D=this._utils.schemas[s];this._applyValidation(a,s,D),t[s]=a})}}}}};var er;function gi(e,t,{logger:r=!1,isCLI:n=!1,passThrough:u=!1,FlagSchema:i,descriptor:o}={}){if(n){if(!i)throw new Error("'FlagSchema' option is required.");if(!o)throw new Error("'descriptor' option is required.")}else o=oe;let s=u?Array.isArray(u)?(f,d)=>u.includes(f)?{[f]:d}:void 0:(f,d)=>({[f]:d}):(f,d,c)=>{let{_:F,...m}=c.schemas;return Dt(f,d,{...c,schemas:m})},a=yi(t,{isCLI:n,FlagSchema:i}),D=new Et(a,{logger:r,unknown:s,descriptor:o}),l=r!==!1;l&&er&&(D._hasDeprecationWarned=er);let p=D.normalize(e);return l&&(er=D._hasDeprecationWarned),p}function yi(e,{isCLI:t,FlagSchema:r}){let n=[];t&&n.push(ct.create({name:"_"}));for(let u of e)n.push(Ai(u,{isCLI:t,optionInfos:e,FlagSchema:r})),u.alias&&t&&n.push(lt.create({name:u.alias,sourceName:u.name}));return n}function Ai(e,{isCLI:t,optionInfos:r,FlagSchema:n}){let{name:u}=e,i={name:u},o,s={};switch(e.type){case"int":o=ht,t&&(i.preprocess=Number);break;case"string":o=je;break;case"choice":o=Ft,i.choices=e.choices.map(a=>a!=null&&a.redirect?{...a,redirect:{to:{key:e.name,value:a.redirect}}}:a);break;case"boolean":o=dt;break;case"flag":o=n,i.flags=r.flatMap(a=>[a.alias,a.description&&a.name,a.oppositeDescription&&`no-${a.name}`].filter(Boolean));break;case"path":o=je;break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?i.validate=(a,D,l)=>e.exception(a)||D.validate(a,l):i.validate=(a,D,l)=>a===void 0||D.validate(a,l),e.redirect&&(s.redirect=a=>a?{to:typeof e.redirect=="string"?e.redirect:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(s.deprecated=!0),t&&!e.array){let a=i.preprocess||(D=>D);i.preprocess=(D,l,p)=>l.preprocess(a(Array.isArray(D)?A(!1,D,-1):D),p)}return e.array?ft.create({...t?{preprocess:a=>Array.isArray(a)?a:[a]}:{},...s,valueSchema:o.create(i)}):o.create({...i,...s})}var Rn=gi;var vi=(e,t,r)=>{if(!(e&&t==null)){if(t.findLast)return t.findLast(r);for(let n=t.length-1;n>=0;n--){let u=t[n];if(r(u,n,t))return u}}},tr=vi;function rr(e,t){if(!t)throw new Error("parserName is required.");let r=tr(!1,e,u=>u.parsers&&Object.prototype.hasOwnProperty.call(u.parsers,t));if(r)return r;let n=`Couldn't resolve parser "${t}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new Re(n)}function Yn(e,t){if(!t)throw new Error("astFormat is required.");let r=tr(!1,e,u=>u.printers&&Object.prototype.hasOwnProperty.call(u.printers,t));if(r)return r;let n=`Couldn't find plugin for AST format "${t}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new Re(n)}function Ct({plugins:e,parser:t}){let r=rr(e,t);return nr(r,t)}function nr(e,t){let r=e.parsers[t];return typeof r=="function"?r():r}function jn(e,t){let r=e.printers[t];return typeof r=="function"?r():r}var Hn={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};async function Bi(e,t={}){var p;let r={...e};if(!r.parser)if(r.filepath){if(r.parser=pn(r,{physicalFile:r.filepath}),!r.parser)throw new Ye(`No parser could be inferred for file "${r.filepath}".`)}else throw new Ye("No parser and no file path given, couldn't infer a parser.");let n=ot({plugins:e.plugins,showDeprecated:!0}).options,u={...Hn,...Object.fromEntries(n.filter(f=>f.default!==void 0).map(f=>[f.name,f.default]))},i=rr(r.plugins,r.parser),o=await nr(i,r.parser);r.astFormat=o.astFormat,r.locEnd=o.locEnd,r.locStart=o.locStart;let s=(p=i.printers)!=null&&p[o.astFormat]?i:Yn(r.plugins,o.astFormat),a=await jn(s,o.astFormat);r.printer=a;let D=s.defaultOptions?Object.fromEntries(Object.entries(s.defaultOptions).filter(([,f])=>f!==void 0)):{},l={...u,...D};for(let[f,d]of Object.entries(l))(r[f]===null||r[f]===void 0)&&(r[f]=d);return r.parser==="json"&&(r.trailingComma="none"),Rn(r,n,{passThrough:Object.keys(Hn),...t})}var se=Bi;var Mn=Ve($n(),1);async function bi(e,t){let r=await Ct(t),n=r.preprocess?r.preprocess(e,t):e;t.originalText=n;let u;try{u=await r.parse(n,t,t)}catch(i){Ni(i,e)}return{text:n,ast:u}}function Ni(e,t){let{loc:r}=e;if(r){let n=(0,Mn.codeFrameColumns)(t,r,{highlightCode:!0});throw e.message+=` +`+n,e.codeFrame=n,e}throw e}var fe=bi;async function Vn(e,t,r,n,u){let{embeddedLanguageFormatting:i,printer:{embed:o,hasPrettierIgnore:s=()=>!1,getVisitorKeys:a}}=r;if(!o||i!=="auto")return;if(o.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed");let D=q(o.getVisitorKeys??a),l=[];d();let p=e.stack;for(let{print:c,node:F,pathStack:m}of l)try{e.stack=m;let h=await c(f,t,e,r);h&&u.set(F,h)}catch(h){if(globalThis.PRETTIER_DEBUG)throw h}e.stack=p;function f(c,F){return Oi(c,F,r,n)}function d(){let{node:c}=e;if(c===null||typeof c!="object"||s(e))return;for(let m of D(c))Array.isArray(c[m])?e.each(d,m):e.call(d,m);let F=o(e,r);if(F){if(typeof F=="function"){l.push({print:F,node:c,pathStack:[...e.stack]});return}u.set(c,F)}}}async function Oi(e,t,r,n){let u=await se({...r,...t,parentParser:r.parser,originalText:e},{passThrough:!0}),{ast:i}=await fe(e,u),o=await n(i,u);return Xe(o)}function Si(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:u,locEnd:i,[Symbol.for("printedComments")]:o}=t,{node:s}=e,a=u(s),D=i(s);for(let l of n)u(l)>=a&&i(l)<=D&&o.add(l);return r.slice(a,D)}var Un=Si;async function He(e,t){({ast:e}=await ir(e,t));let r=new Map,n=new qr(e),u=cn(t),i=new Map;await Vn(n,s,t,He,i);let o=await zn(n,t,s,void 0,i);if(ln(t),t.nodeAfterCursor&&!t.nodeBeforeCursor)return[Z,o];if(t.nodeBeforeCursor&&!t.nodeAfterCursor)return[o,Z];return o;function s(D,l){return D===void 0||D===n?a(l):Array.isArray(D)?n.call(()=>a(l),...D):n.call(()=>a(l),D)}function a(D){u(n);let l=n.node;if(l==null)return"";let p=l&&typeof l=="object"&&D===void 0;if(p&&r.has(l))return r.get(l);let f=zn(n,t,s,D,i);return p&&r.set(l,f),f}}function zn(e,t,r,n,u){var a;let{node:i}=e,{printer:o}=t,s;switch((a=o.hasPrettierIgnore)!=null&&a.call(o,e)?s=Un(e,t):u.has(i)?s=u.get(i):s=o.print(e,t,r,n),i){case t.cursorNode:s=me(s,D=>[Z,D,Z]);break;case t.nodeBeforeCursor:s=me(s,D=>[D,Z]);break;case t.nodeAfterCursor:s=me(s,D=>[Z,D]);break}return o.printComment&&(!o.willPrintOwnComments||!o.willPrintOwnComments(e,t))&&(s=Dn(e,s,t)),s}async function ir(e,t){let r=e.comments??[];t[Symbol.for("comments")]=r,t[Symbol.for("tokens")]=e.tokens??[],t[Symbol.for("printedComments")]=new Set,on(e,t);let{printer:{preprocess:n}}=t;return e=n?await n(e,t):e,{ast:e,comments:r}}function Ti(e,t){let{cursorOffset:r,locStart:n,locEnd:u}=t,i=q(t.printer.getVisitorKeys),o=d=>n(d)<=r&&u(d)>=r,s=e,a=[e];for(let d of Zr(e,{getVisitorKeys:i,filter:o}))a.push(d),s=d;if(en(s,{getVisitorKeys:i}))return{cursorNode:s};let D,l,p=-1,f=Number.POSITIVE_INFINITY;for(;a.length>0&&(D===void 0||l===void 0);){s=a.pop();let d=D!==void 0,c=l!==void 0;for(let F of ye(s,{getVisitorKeys:i})){if(!d){let m=u(F);m<=r&&m>p&&(D=F,p=m)}if(!c){let m=n(F);m>=r&&mo(f,a)).filter(Boolean);let D={},l=new Set(u(s));for(let f in s)!Object.prototype.hasOwnProperty.call(s,f)||i.has(f)||(l.has(f)?D[f]=o(s[f],s):D[f]=s[f]);let p=r(s,D,a);if(p!==null)return p??D}}var Kn=ki;var Li=(e,t,r)=>{if(!(e&&t==null)){if(t.findLastIndex)return t.findLastIndex(r);for(let n=t.length-1;n>=0;n--){let u=t[n];if(r(u,n,t))return n}return-1}},Jn=Li;var Pi=({parser:e})=>e==="json"||e==="json5"||e==="jsonc"||e==="json-stringify";function Ii(e,t){let r=[e.node,...e.parentNodes],n=new Set([t.node,...t.parentNodes]);return r.find(u=>Qn.has(u.type)&&n.has(u))}function qn(e){let t=Jn(!1,e,r=>r.type!=="Program"&&r.type!=="File");return t===-1?e:e.slice(0,t+1)}function Ri(e,t,{locStart:r,locEnd:n}){let u=e.node,i=t.node;if(u===i)return{startNode:u,endNode:i};let o=r(e.node);for(let a of qn(t.parentNodes))if(r(a)>=o)i=a;else break;let s=n(t.node);for(let a of qn(e.parentNodes)){if(n(a)<=s)u=a;else break;if(u===i)break}return{startNode:u,endNode:i}}function or(e,t,r,n,u=[],i){let{locStart:o,locEnd:s}=r,a=o(e),D=s(e);if(!(t>D||tn);let s=e.slice(n,u).search(/\S/u),a=s===-1;if(!a)for(n+=s;u>n&&!/\S/u.test(e[u-1]);--u);let D=or(r,n,t,(d,c)=>Xn(t,d,c),[],"rangeStart"),l=a?D:or(r,u,t,d=>Xn(t,d),[],"rangeEnd");if(!D||!l)return{rangeStart:0,rangeEnd:0};let p,f;if(Pi(t)){let d=Ii(D,l);p=d,f=d}else({startNode:p,endNode:f}=Ri(D,l,t));return{rangeStart:Math.min(i(p),i(f)),rangeEnd:Math.max(o(p),o(f))}}var nu="\uFEFF",eu=Symbol("cursor");async function uu(e,t,r=0){if(!e||e.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:n,text:u}=await fe(e,t);t.cursorOffset>=0&&(t={...t,...Gn(n,t)});let i=await He(n,t,r);r>0&&(i=et([K,i],r,t.tabWidth));let o=Ce(i,t);if(r>0){let a=o.formatted.trim();o.cursorNodeStart!==void 0&&(o.cursorNodeStart-=o.formatted.indexOf(a),o.cursorNodeStart<0&&(o.cursorNodeStart=0,o.cursorNodeText=o.cursorNodeText.trimStart()),o.cursorNodeStart+o.cursorNodeText.length>a.length&&(o.cursorNodeText=o.cursorNodeText.trimEnd())),o.formatted=a+be(t.endOfLine)}let s=t[Symbol.for("comments")];if(t.cursorOffset>=0){let a,D,l,p;if((t.cursorNode||t.nodeBeforeCursor||t.nodeAfterCursor)&&o.cursorNodeText)if(l=o.cursorNodeStart,p=o.cursorNodeText,t.cursorNode)a=t.locStart(t.cursorNode),D=u.slice(a,t.locEnd(t.cursorNode));else{if(!t.nodeBeforeCursor&&!t.nodeAfterCursor)throw new Error("Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor");a=t.nodeBeforeCursor?t.locEnd(t.nodeBeforeCursor):0;let h=t.nodeAfterCursor?t.locStart(t.nodeAfterCursor):u.length;D=u.slice(a,h)}else a=0,D=u,l=0,p=o.formatted;let f=t.cursorOffset-a;if(D===p)return{formatted:o.formatted,cursorOffset:l+f,comments:s};let d=D.split("");d.splice(f,0,eu);let c=p.split(""),F=yr(d,c),m=l;for(let h of F)if(h.removed){if(h.value.includes(eu))break}else m+=h.count;return{formatted:o.formatted,cursorOffset:m,comments:s}}return{formatted:o.formatted,cursorOffset:-1,comments:s}}async function Hi(e,t){let{ast:r,text:n}=await fe(e,t),{rangeStart:u,rangeEnd:i}=Zn(n,t,r),o=n.slice(u,i),s=Math.min(u,n.lastIndexOf(` +`,u)+1),a=n.slice(s,u).match(/^\s*/u)[0],D=ge(a,t.tabWidth),l=await uu(o,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>u&&t.cursorOffset<=i?t.cursorOffset-u:-1,endOfLine:"lf"},D),p=l.formatted.trimEnd(),{cursorOffset:f}=t;f>i?f+=p.length-o.length:l.cursorOffset>=0&&(f=l.cursorOffset+u);let d=n.slice(0,u)+p+n.slice(i);if(t.endOfLine!=="lf"){let c=be(t.endOfLine);f>=0&&c===`\r +`&&(f+=Nt(d.slice(0,f),` +`)),d=ne(!1,d,` +`,c)}return{formatted:d,cursorOffset:f,comments:l.comments}}function sr(e,t,r){return typeof t!="number"||Number.isNaN(t)||t<0||t>e.length?r:t}function tu(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:u}=t;return r=sr(e,r,-1),n=sr(e,n,0),u=sr(e,u,e.length),{...t,cursorOffset:r,rangeStart:n,rangeEnd:u}}function iu(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:u,endOfLine:i}=tu(e,t),o=e.charAt(0)===nu;if(o&&(e=e.slice(1),r--,n--,u--),i==="auto"&&(i=Ar(e)),e.includes("\r")){let s=a=>Nt(e.slice(0,Math.max(a,0)),`\r +`);r-=s(r),n-=s(n),u-=s(u),e=vr(e)}return{hasBOM:o,text:e,options:tu(e,{...t,cursorOffset:r,rangeStart:n,rangeEnd:u,endOfLine:i})}}async function ru(e,t){let r=await Ct(t);return!r.hasPragma||r.hasPragma(e)}async function ar(e,t){let{hasBOM:r,text:n,options:u}=iu(e,await se(t));if(u.rangeStart>=u.rangeEnd&&n!==""||u.requirePragma&&!await ru(n,u))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let i;return u.rangeStart>0||u.rangeEnd=0&&i.cursorOffset++),i}async function ou(e,t,r){let{text:n,options:u}=iu(e,await se(t)),i=await fe(n,u);return r&&(r.preprocessForPrint&&(i.ast=await ir(i.ast,u)),r.massage&&(i.ast=Kn(i.ast,u))),i}async function su(e,t){t=await se(t);let r=await He(e,t);return Ce(r,t)}async function au(e,t){let r=Vr(e),{formatted:n}=await ar(r,{...t,parser:"__js_expression"});return n}async function Du(e,t){t=await se(t);let{ast:r}=await fe(e,t);return He(r,t)}async function lu(e,t){return Ce(e,await se(t))}var Dr={};vt(Dr,{builders:()=>$i,printer:()=>Mi,utils:()=>Vi});var $i={join:Se,line:Ze,softline:$r,hardline:K,literalline:Qe,group:kt,conditionalGroup:Ir,fill:Rr,lineSuffix:Te,lineSuffixBoundary:Hr,cursor:Z,breakParent:he,ifBreak:Yr,trim:Wr,indent:le,indentIfBreak:jr,align:De,addAlignmentToDoc:et,markAsRoot:Lr,dedentToRoot:kr,dedent:Pr,hardlineWithoutBreakParent:ke,literallineWithoutBreakParent:Lt,label:Mr,concat:e=>e},Mi={printDocToString:Ce},Vi={willBreak:xr,traverseDoc:Fe,findInDoc:qe,mapDoc:Oe,removeLines:Nr,stripTrailingHardline:Xe,replaceEndOfLine:Or,canBreak:Sr};var cu="3.5.3";var cr={};vt(cr,{addDanglingComment:()=>re,addLeadingComment:()=>ue,addTrailingComment:()=>ie,getAlignmentSize:()=>ge,getIndentSize:()=>fu,getMaxContinuousCount:()=>du,getNextNonSpaceNonCommentCharacter:()=>pu,getNextNonSpaceNonCommentCharacterIndex:()=>no,getPreferredQuote:()=>mu,getStringWidth:()=>Le,hasNewline:()=>V,hasNewlineInRange:()=>hu,hasSpaces:()=>Eu,isNextLineEmpty:()=>so,isNextLineEmptyAfterIndex:()=>gt,isPreviousLineEmpty:()=>io,makeString:()=>Cu,skip:()=>Ae,skipEverythingButNewLine:()=>ut,skipInlineComment:()=>Be,skipNewline:()=>W,skipSpaces:()=>S,skipToLineEnd:()=>nt,skipTrailingComment:()=>we,skipWhitespace:()=>tn});function Ui(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;rMath.max(n,u.length/t.length),0)}var du=qi;function Xi(e,t){let r=We(e,t);return r===!1?"":e.charAt(r)}var pu=Xi;var yt="'",Fu='"';function Qi(e,t){let r=t===!0||t===yt?yt:Fu,n=r===yt?Fu:yt,u=0,i=0;for(let o of e)o===r?u++:o===n&&i++;return u>i?n:r}var mu=Qi;function Zi(e,t,r){for(let n=t;ns===n?s:a===t?"\\"+a:a||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(s)?s:"\\"+s));return t+i+t}var Cu=to;function ro(e,t,r){return We(e,r(t))}function no(e,t){return arguments.length===2||typeof t=="number"?We(e,t):ro(...arguments)}function uo(e,t,r){return Ie(e,r(t))}function io(e,t){return arguments.length===2||typeof t=="number"?Ie(e,t):uo(...arguments)}function oo(e,t,r){return gt(e,r(t))}function so(e,t){return arguments.length===2||typeof t=="number"?gt(e,t):oo(...arguments)}function de(e,t=1){return async(...r)=>{let n=r[t]??{},u=n.plugins??[];return r[t]={...n,plugins:Array.isArray(u)?u:Object.values(u)},e(...r)}}var gu=de(ar);async function yu(e,t){let{formatted:r}=await gu(e,{...t,cursorOffset:-1});return r}async function ao(e,t){return await yu(e,t)===e}var Do=de(ot,0),lo={parse:de(ou),formatAST:de(su),formatDoc:de(au),printToDoc:de(Du),printDocToString:de(lu)};return xu(co);}); \ No newline at end of file diff --git a/node_modules/prettier/standalone.mjs b/node_modules/prettier/standalone.mjs new file mode 100644 index 0000000..9c938c5 --- /dev/null +++ b/node_modules/prettier/standalone.mjs @@ -0,0 +1,39 @@ +var Au=Object.create;var At=Object.defineProperty;var vu=Object.getOwnPropertyDescriptor;var Bu=Object.getOwnPropertyNames;var wu=Object.getPrototypeOf,_u=Object.prototype.hasOwnProperty;var dr=e=>{throw TypeError(e)};var pr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),vt=(e,t)=>{for(var r in t)At(e,r,{get:t[r],enumerable:!0})},xu=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let u of Bu(t))!_u.call(e,u)&&u!==r&&At(e,u,{get:()=>t[u],enumerable:!(n=vu(t,u))||n.enumerable});return e};var Me=(e,t,r)=>(r=e!=null?Au(wu(e)):{},xu(t||!e||!e.__esModule?At(r,"default",{value:e,enumerable:!0}):r,e));var bu=(e,t,r)=>t.has(e)||dr("Cannot "+r);var Fr=(e,t,r)=>t.has(e)?dr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r);var pe=(e,t,r)=>(bu(e,t,"access private method"),r);var ot=pr((Da,mn)=>{"use strict";var Fn=new Proxy(String,{get:()=>Fn});mn.exports=Fn});var $n=pr(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});function wi(){return new Proxy({},{get:()=>e=>e})}var Wn=/\r\n|[\n\r\u2028\u2029]/;function _i(e,t,r){let n=Object.assign({column:0,line:-1},e.start),u=Object.assign({},n,e.end),{linesAbove:i=2,linesBelow:o=3}=r||{},s=n.line,a=n.column,D=u.line,l=u.column,p=Math.max(s-(i+1),0),f=Math.min(t.length,D+o);s===-1&&(p=0),D===-1&&(f=t.length);let d=D-s,c={};if(d)for(let F=0;F<=d;F++){let m=F+s;if(!a)c[m]=!0;else if(F===0){let h=t[m-1].length;c[m]=[a,h-a+1]}else if(F===d)c[m]=[0,l];else{let h=t[m-F].length;c[m]=[0,h]}}else a===l?a?c[s]=[a,0]:c[s]=!0:c[s]=[a,l-a];return{start:p,end:f,markerLines:c}}function xi(e,t,r={}){let u=wi(!1),i=e.split(Wn),{start:o,end:s,markerLines:a}=_i(t,i,r),D=t.start&&typeof t.start.column=="number",l=String(s).length,f=e.split(Wn,s).slice(o,s).map((d,c)=>{let F=o+1+c,h=` ${` ${F}`.slice(-l)} |`,C=a[F],v=!a[F+1];if(C){let E="";if(Array.isArray(C)){let g=d.slice(0,Math.max(C[0]-1,0)).replace(/[^\t]/g," "),j=C[1]||1;E=[` + `,u.gutter(h.replace(/\d/g," "))," ",g,u.marker("^").repeat(j)].join(""),v&&r.message&&(E+=" "+u.message(r.message))}return[u.marker(">"),u.gutter(h),d.length>0?` ${d}`:"",E].join("")}else return` ${u.gutter(h)}${d.length>0?` ${d}`:""}`}).join(` +`);return r.message&&!D&&(f=`${" ".repeat(l+1)}${r.message} +${f}`),f}ur.codeFrameColumns=xi});var fr={};vt(fr,{__debug:()=>lo,check:()=>ao,doc:()=>Dr,format:()=>yu,formatWithCursor:()=>gu,getSupportInfo:()=>Do,util:()=>cr,version:()=>cu});var Nu=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},ne=Nu;function U(){}U.prototype={diff:function(t,r){var n,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=u.callback;typeof u=="function"&&(i=u,u={});var o=this;function s(E){return E=o.postProcess(E,u),i?(setTimeout(function(){i(E)},0),!0):E}t=this.castInput(t,u),r=this.castInput(r,u),t=this.removeEmpty(this.tokenize(t,u)),r=this.removeEmpty(this.tokenize(r,u));var a=r.length,D=t.length,l=1,p=a+D;u.maxEditLength!=null&&(p=Math.min(p,u.maxEditLength));var f=(n=u.timeout)!==null&&n!==void 0?n:1/0,d=Date.now()+f,c=[{oldPos:-1,lastComponent:void 0}],F=this.extractCommon(c[0],r,t,0,u);if(c[0].oldPos+1>=D&&F+1>=a)return s(mr(o,c[0].lastComponent,r,t,o.useLongestToken));var m=-1/0,h=1/0;function C(){for(var E=Math.max(m,-l);E<=Math.min(h,l);E+=2){var g=void 0,j=c[E-1],b=c[E+1];j&&(c[E-1]=void 0);var X=!1;if(b){var ae=b.oldPos-E;X=b&&0<=ae&&ae=D&&F+1>=a)return s(mr(o,g.lastComponent,r,t,o.useLongestToken));c[E]=g,g.oldPos+1>=D&&(h=Math.min(h,E-1)),F+1>=a&&(m=Math.max(m,E+1))}l++}if(i)(function E(){setTimeout(function(){if(l>p||Date.now()>d)return i();C()||E()},0)})();else for(;l<=p&&Date.now()<=d;){var v=C();if(v)return v}},addToPath:function(t,r,n,u,i){var o=t.lastComponent;return o&&!i.oneChangePerToken&&o.added===r&&o.removed===n?{oldPos:t.oldPos+u,lastComponent:{count:o.count+1,added:r,removed:n,previousComponent:o.previousComponent}}:{oldPos:t.oldPos+u,lastComponent:{count:1,added:r,removed:n,previousComponent:o}}},extractCommon:function(t,r,n,u,i){for(var o=r.length,s=n.length,a=t.oldPos,D=a-u,l=0;D+1d.length?F:d}),p.value=e.join(f)}else p.value=e.join(r.slice(D,D+p.count));D+=p.count,p.added||(l+=p.count)}}return i}var mo=new U;function hr(e,t){var r;for(r=0;rt.length&&(r=e.length-t.length);var n=t.length;e.length0&&t[o]!=t[i];)i=u[i];t[o]==t[i]&&i++}i=0;for(var s=r;s0&&e[s]!=t[i];)i=u[i];e[s]==t[i]&&i++}return i}var Ue="a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",Su=new RegExp("[".concat(Ue,"]+|\\s+|[^").concat(Ue,"]"),"ug"),Ge=new U;Ge.equals=function(e,t,r){return r.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()};Ge.tokenize=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r;if(t.intlSegmenter){if(t.intlSegmenter.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');r=Array.from(t.intlSegmenter.segment(e),function(i){return i.segment})}else r=e.match(Su)||[];var n=[],u=null;return r.forEach(function(i){/\s/.test(i)?u==null?n.push(i):n.push(n.pop()+i):/\s/.test(u)?n[n.length-1]==u?n.push(n.pop()+i):n.push(u+i):n.push(i),u=i}),n};Ge.join=function(e){return e.map(function(t,r){return r==0?t:t.replace(/^\s+/,"")}).join("")};Ge.postProcess=function(e,t){if(!e||t.oneChangePerToken)return e;var r=null,n=null,u=null;return e.forEach(function(i){i.added?n=i:i.removed?u=i:((n||u)&&gr(r,u,n,i),r=i,n=null,u=null)}),(n||u)&&gr(r,u,n,null),e};function gr(e,t,r,n){if(t&&r){var u=t.value.match(/^\s*/)[0],i=t.value.match(/\s*$/)[0],o=r.value.match(/^\s*/)[0],s=r.value.match(/\s*$/)[0];if(e){var a=hr(u,o);e.value=wt(e.value,o,a),t.value=_e(t.value,a),r.value=_e(r.value,a)}if(n){var D=Er(i,s);n.value=Bt(n.value,s,D),t.value=Ve(t.value,D),r.value=Ve(r.value,D)}}else if(r)e&&(r.value=r.value.replace(/^\s*/,"")),n&&(n.value=n.value.replace(/^\s*/,""));else if(e&&n){var l=n.value.match(/^\s*/)[0],p=t.value.match(/^\s*/)[0],f=t.value.match(/\s*$/)[0],d=hr(l,p);t.value=_e(t.value,d);var c=Er(_e(l,d),f);t.value=Ve(t.value,c),n.value=Bt(n.value,l,c),e.value=wt(e.value,l,l.slice(0,l.length-c.length))}else if(n){var F=n.value.match(/^\s*/)[0],m=t.value.match(/\s*$/)[0],h=Cr(m,F);t.value=Ve(t.value,h)}else if(e){var C=e.value.match(/\s*$/)[0],v=t.value.match(/^\s*/)[0],E=Cr(C,v);t.value=_e(t.value,E)}}var Tu=new U;Tu.tokenize=function(e){var t=new RegExp("(\\r?\\n)|[".concat(Ue,"]+|[^\\S\\n\\r]+|[^").concat(Ue,"]"),"ug");return e.match(t)||[]};var bt=new U;bt.tokenize=function(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,` +`));var r=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var u=0;u"u"?r:o}:n;return typeof e=="string"?e:JSON.stringify(xt(e,null,null,u),u," ")};xe.equals=function(e,t,r){return U.prototype.equals.call(xe,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"),r)};function xt(e,t,r,n,u){t=t||[],r=r||[],n&&(e=n(u,e));var i;for(i=0;i{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},A=Pu;function Iu(e){if(typeof e=="string")return $;if(Array.isArray(e))return H;if(!e)return;let{type:t}=e;if(Ke.has(t))return t}var M=Iu;var Ru=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Yu(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', +Expected it to be 'string' or 'object'.`;if(M(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=Ru([...Ke].map(u=>`'${u}'`));return`Unexpected doc.type '${e.type}'. +Expected it to be ${n}.`}var Ot=class extends Error{name="InvalidDocError";constructor(t){super(Yu(t)),this.doc=t}},Q=Ot;var Br={};function ju(e,t,r,n){let u=[e];for(;u.length>0;){let i=u.pop();if(i===Br){r(u.pop());continue}r&&u.push(i,Br);let o=M(i);if(!o)throw new Q(i);if((t==null?void 0:t(i))!==!1)switch(o){case H:case N:{let s=o===H?i:i.parts;for(let a=s.length,D=a-1;D>=0;--D)u.push(s[D]);break}case w:u.push(i.flatContents,i.breakContents);break;case B:if(n&&i.expandedStates)for(let s=i.expandedStates.length,a=s-1;a>=0;--a)u.push(i.expandedStates[a]);else u.push(i.contents);break;case k:case T:case P:case O:case I:u.push(i.contents);break;case $:case z:case L:case R:case y:case _:break;default:throw new Q(i)}}}var Fe=ju;function Oe(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(i){if(r.has(i))return r.get(i);let o=u(i);return r.set(i,o),o}function u(i){switch(M(i)){case H:return t(i.map(n));case N:return t({...i,parts:i.parts.map(n)});case w:return t({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case B:{let{expandedStates:o,contents:s}=i;return o?(o=o.map(n),s=o[0]):s=n(s),t({...i,contents:s,expandedStates:o})}case k:case T:case P:case O:case I:return t({...i,contents:n(i.contents)});case $:case z:case L:case R:case y:case _:return t(i);default:throw new Q(i)}}}function Je(e,t,r){let n=r,u=!1;function i(o){if(u)return!1;let s=t(o);s!==void 0&&(u=!0,n=s)}return Fe(e,i),n}function Hu(e){if(e.type===B&&e.break||e.type===y&&e.hard||e.type===_)return!0}function xr(e){return Je(e,Hu,!1)}function wr(e){if(e.length>0){let t=A(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function br(e){let t=new Set,r=[];function n(i){if(i.type===_&&wr(r),i.type===B){if(r.push(i),t.has(i))return!1;t.add(i)}}function u(i){i.type===B&&r.pop().break&&wr(r)}Fe(e,n,u,!0)}function Wu(e){return e.type===y&&!e.hard?e.soft?"":" ":e.type===w?e.flatContents:e}function Nr(e){return Oe(e,Wu)}function _r(e){for(e=[...e];e.length>=2&&A(!1,e,-2).type===y&&A(!1,e,-1).type===_;)e.length-=2;if(e.length>0){let t=Ne(A(!1,e,-1));e[e.length-1]=t}return e}function Ne(e){switch(M(e)){case T:case P:case B:case I:case O:{let t=Ne(e.contents);return{...e,contents:t}}case w:return{...e,breakContents:Ne(e.breakContents),flatContents:Ne(e.flatContents)};case N:return{...e,parts:_r(e.parts)};case H:return _r(e);case $:return e.replace(/[\n\r]*$/u,"");case k:case z:case L:case R:case y:case _:break;default:throw new Q(e)}return e}function qe(e){return Ne(Mu(e))}function $u(e){switch(M(e)){case N:if(e.parts.every(t=>t===""))return"";break;case B:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===B&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case k:case T:case P:case I:if(!e.contents)return"";break;case w:if(!e.flatContents&&!e.breakContents)return"";break;case H:{let t=[];for(let r of e){if(!r)continue;let[n,...u]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof A(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...u)}return t.length===0?"":t.length===1?t[0]:t}case $:case z:case L:case R:case y:case O:case _:break;default:throw new Q(e)}return e}function Mu(e){return Oe(e,t=>$u(t))}function Or(e,t=Xe){return Oe(e,r=>typeof r=="string"?Se(t,r.split(` +`)):r)}function Vu(e){if(e.type===y)return!0}function Sr(e){return Je(e,Vu,!1)}function me(e,t){return e.type===O?{...e,contents:t(e.contents)}:t(e)}var St=()=>{},G=St,Tt=St,Tr=St;function le(e){return G(e),{type:T,contents:e}}function De(e,t){return G(t),{type:k,contents:t,n:e}}function kt(e,t={}){return G(e),Tt(t.expandedStates,!0),{type:B,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function kr(e){return De(Number.NEGATIVE_INFINITY,e)}function Lr(e){return De({type:"root"},e)}function Pr(e){return De(-1,e)}function Ir(e,t){return kt(e[0],{...t,expandedStates:e})}function Rr(e){return Tr(e),{type:N,parts:e}}function Yr(e,t="",r={}){return G(e),t!==""&&G(t),{type:w,breakContents:e,flatContents:t,groupId:r.groupId}}function jr(e,t){return G(e),{type:P,contents:e,groupId:t.groupId,negate:t.negate}}function Te(e){return G(e),{type:I,contents:e}}var Hr={type:R},he={type:_},Wr={type:L},ke={type:y,hard:!0},Lt={type:y,hard:!0,literal:!0},Qe={type:y},$r={type:y,soft:!0},K=[ke,he],Xe=[Lt,he],Z={type:z};function Se(e,t){G(e),Tt(t);let r=[];for(let n=0;n0){for(let u=0;u0?`, { ${l.join(", ")} }`:"";return`indentIfBreak(${n(i.contents)}${p})`}if(i.type===B){let l=[];i.break&&i.break!=="propagated"&&l.push("shouldBreak: true"),i.id&&l.push(`id: ${u(i.id)}`);let p=l.length>0?`, { ${l.join(", ")} }`:"";return i.expandedStates?`conditionalGroup([${i.expandedStates.map(f=>n(f)).join(",")}]${p})`:`group(${n(i.contents)}${p})`}if(i.type===N)return`fill([${i.parts.map(l=>n(l)).join(", ")}])`;if(i.type===I)return"lineSuffix("+n(i.contents)+")";if(i.type===R)return"lineSuffixBoundary";if(i.type===O)return`label(${JSON.stringify(i.label)}, ${n(i.contents)})`;throw new Error("Unknown doc type "+i.type)}function u(i){if(typeof i!="symbol")return JSON.stringify(String(i));if(i in t)return t[i];let o=i.description||"symbol";for(let s=0;;s++){let a=o+(s>0?` #${s}`:"");if(!r.has(a))return r.add(a),t[i]=`Symbol.for(${JSON.stringify(a)})`}}}var Ur=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u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\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function zr(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Gr(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var Kr=e=>!(zr(e)||Gr(e));var Uu=/[^\x20-\x7F]/u;function zu(e){if(!e)return 0;if(!Uu.test(e))return e.length;e=e.replace(Ur()," ");let t=0;for(let r of e){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(t+=Kr(n)?1:2)}return t}var Le=zu;var Y=Symbol("MODE_BREAK"),J=Symbol("MODE_FLAT"),Ee=Symbol("cursor"),Pt=Symbol("DOC_FILL_PRINTED_LENGTH");function Jr(){return{value:"",length:0,queue:[]}}function Gu(e,t){return It(e,{type:"indent"},t)}function Ku(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||Jr():t<0?It(e,{type:"dedent"},r):t?t.type==="root"?{...e,root:e}:It(e,{type:typeof t=="string"?"stringAlign":"numberAlign",n:t},r):e}function It(e,t,r){let n=t.type==="dedent"?e.queue.slice(0,-1):[...e.queue,t],u="",i=0,o=0,s=0;for(let c of n)switch(c.type){case"indent":l(),r.useTabs?a(1):D(r.tabWidth);break;case"stringAlign":l(),u+=c.n,i+=c.n.length;break;case"numberAlign":o+=1,s+=c.n;break;default:throw new Error(`Unexpected type '${c.type}'`)}return f(),{...e,value:u,length:i,queue:n};function a(c){u+=" ".repeat(c),i+=r.tabWidth*c}function D(c){u+=" ".repeat(c),i+=c}function l(){r.useTabs?p():f()}function p(){o>0&&a(o),d()}function f(){s>0&&D(s),d()}function d(){o=0,s=0}}function Rt(e){let t=0,r=0,n=e.length;e:for(;n--;){let u=e[n];if(u===Ee){r++;continue}for(let i=u.length-1;i>=0;i--){let o=u[i];if(o===" "||o===" ")t++;else{e[n]=u.slice(0,i+1);break e}}}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(Ee);return t}function et(e,t,r,n,u,i){if(r===Number.POSITIVE_INFINITY)return!0;let o=t.length,s=[e],a=[];for(;r>=0;){if(s.length===0){if(o===0)return!0;s.push(t[--o]);continue}let{mode:D,doc:l}=s.pop(),p=M(l);switch(p){case $:a.push(l),r-=Le(l);break;case H:case N:{let f=p===H?l:l.parts,d=l[Pt]??0;for(let c=f.length-1;c>=d;c--)s.push({mode:D,doc:f[c]});break}case T:case k:case P:case O:s.push({mode:D,doc:l.contents});break;case L:r+=Rt(a);break;case B:{if(i&&l.break)return!1;let f=l.break?Y:D,d=l.expandedStates&&f===Y?A(!1,l.expandedStates,-1):l.contents;s.push({mode:f,doc:d});break}case w:{let d=(l.groupId?u[l.groupId]||J:D)===Y?l.breakContents:l.flatContents;d&&s.push({mode:D,doc:d});break}case y:if(D===Y||l.hard)return!0;l.soft||(a.push(" "),r--);break;case I:n=!0;break;case R:if(n)return!1;break}}return!1}function Ce(e,t){let r={},n=t.printWidth,u=be(t.endOfLine),i=0,o=[{ind:Jr(),mode:Y,doc:e}],s=[],a=!1,D=[],l=0;for(br(e);o.length>0;){let{ind:f,mode:d,doc:c}=o.pop();switch(M(c)){case $:{let F=u!==` +`?ne(!1,c,` +`,u):c;s.push(F),o.length>0&&(i+=Le(F));break}case H:for(let F=c.length-1;F>=0;F--)o.push({ind:f,mode:d,doc:c[F]});break;case z:if(l>=2)throw new Error("There are too many 'cursor' in doc.");s.push(Ee),l++;break;case T:o.push({ind:Gu(f,t),mode:d,doc:c.contents});break;case k:o.push({ind:Ku(f,c.n,t),mode:d,doc:c.contents});break;case L:i-=Rt(s);break;case B:switch(d){case J:if(!a){o.push({ind:f,mode:c.break?Y:J,doc:c.contents});break}case Y:{a=!1;let F={ind:f,mode:J,doc:c.contents},m=n-i,h=D.length>0;if(!c.break&&et(F,o,m,h,r))o.push(F);else if(c.expandedStates){let C=A(!1,c.expandedStates,-1);if(c.break){o.push({ind:f,mode:Y,doc:C});break}else for(let v=1;v=c.expandedStates.length){o.push({ind:f,mode:Y,doc:C});break}else{let E=c.expandedStates[v],g={ind:f,mode:J,doc:E};if(et(g,o,m,h,r)){o.push(g);break}}}else o.push({ind:f,mode:Y,doc:c.contents});break}}c.id&&(r[c.id]=A(!1,o,-1).mode);break;case N:{let F=n-i,m=c[Pt]??0,{parts:h}=c,C=h.length-m;if(C===0)break;let v=h[m+0],E=h[m+1],g={ind:f,mode:J,doc:v},j={ind:f,mode:Y,doc:v},b=et(g,[],F,D.length>0,r,!0);if(C===1){b?o.push(g):o.push(j);break}let X={ind:f,mode:J,doc:E},ae={ind:f,mode:Y,doc:E};if(C===2){b?o.push(X,g):o.push(ae,j);break}let $e=h[m+2],yt={ind:f,mode:d,doc:{...c,[Pt]:m+2}};et({ind:f,mode:J,doc:[v,E,$e]},[],F,D.length>0,r,!0)?o.push(yt,X,g):b?o.push(yt,ae,g):o.push(yt,ae,j);break}case w:case P:{let F=c.groupId?r[c.groupId]:d;if(F===Y){let m=c.type===w?c.breakContents:c.negate?c.contents:le(c.contents);m&&o.push({ind:f,mode:d,doc:m})}if(F===J){let m=c.type===w?c.flatContents:c.negate?le(c.contents):c.contents;m&&o.push({ind:f,mode:d,doc:m})}break}case I:D.push({ind:f,mode:d,doc:c.contents});break;case R:D.length>0&&o.push({ind:f,mode:d,doc:ke});break;case y:switch(d){case J:if(c.hard)a=!0;else{c.soft||(s.push(" "),i+=1);break}case Y:if(D.length>0){o.push({ind:f,mode:d,doc:c},...D.reverse()),D.length=0;break}c.literal?f.root?(s.push(u,f.root.value),i=f.root.length):(s.push(u),i=0):(i-=Rt(s),s.push(u+f.value),i=f.length);break}break;case O:o.push({ind:f,mode:d,doc:c.contents});break;case _:break;default:throw new Q(c)}o.length===0&&D.length>0&&(o.push(...D.reverse()),D.length=0)}let p=s.indexOf(Ee);if(p!==-1){let f=s.indexOf(Ee,p+1);if(f===-1)return{formatted:s.filter(m=>m!==Ee).join("")};let d=s.slice(0,p).join(""),c=s.slice(p+1,f).join(""),F=s.slice(f+1).join("");return{formatted:d+c+F,cursorNodeStart:d.length,cursorNodeText:c}}return{formatted:s.join("")}}function Ju(e,t,r=0){let n=0;for(let u=r;u1?A(!1,t,-2):null}getValue(){return A(!1,this.stack,-1)}getNode(t=0){let r=pe(this,te,jt).call(this,t);return r===-1?null:this.stack[r]}getParentNode(t=0){return this.getNode(t+1)}call(t,...r){let{stack:n}=this,{length:u}=n,i=A(!1,n,-1);for(let o of r)i=i[o],n.push(o,i);try{return t(this)}finally{n.length=u}}callParent(t,r=0){let n=pe(this,te,jt).call(this,r+1),u=this.stack.splice(n+1);try{return t(this)}finally{this.stack.push(...u)}}each(t,...r){let{stack:n}=this,{length:u}=n,i=A(!1,n,-1);for(let o of r)i=i[o],n.push(o,i);try{for(let o=0;o{n[i]=t(u,i,o)},...r),n}match(...t){let r=this.stack.length-1,n=null,u=this.stack[r--];for(let i of t){if(u===void 0)return!1;let o=null;if(typeof n=="number"&&(o=n,n=this.stack[r--],u=this.stack[r--]),i&&!i(u,n,o))return!1;n=this.stack[r--],u=this.stack[r--]}return!0}findAncestor(t){for(let r of pe(this,te,tt).call(this))if(t(r))return r}hasAncestor(t){for(let r of pe(this,te,tt).call(this))if(t(r))return!0;return!1}};te=new WeakSet,jt=function(t){let{stack:r}=this;for(let n=r.length-1;n>=0;n-=2)if(!Array.isArray(r[n])&&--t<0)return n;return-1},tt=function*(){let{stack:t}=this;for(let r=t.length-3;r>=0;r-=2){let n=t[r];Array.isArray(n)||(yield n)}};var qr=Yt;var Xr=new Proxy(()=>{},{get:()=>Xr}),Pe=Xr;function qu(e){return e!==null&&typeof e=="object"}var Qr=qu;function*ye(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,u=i=>Qr(i)&&n(i);for(let i of r(e)){let o=e[i];if(Array.isArray(o))for(let s of o)u(s)&&(yield s);else u(o)&&(yield o)}}function*Zr(e,t){let r=[e];for(let n=0;n{let u=!!(n!=null&&n.backwards);if(r===!1)return!1;let{length:i}=t,o=r;for(;o>=0&&o0}var Ht=Zu;var rn=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),ei=e=>Object.keys(e).filter(t=>!rn.has(t));function ti(e){return e?t=>e(t,rn):ei}var q=ti;function ri(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"\u2026"),t+(r?" "+r:"")}function Wt(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=ri(e)}function ue(e,t){t.leading=!0,t.trailing=!1,Wt(e,t)}function re(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),Wt(e,t)}function ie(e,t){t.leading=!1,t.trailing=!0,Wt(e,t)}var $t=new WeakMap;function ut(e,t){if($t.has(e))return $t.get(e);let{printer:{getCommentChildNodes:r,canAttachComment:n,getVisitorKeys:u},locStart:i,locEnd:o}=t;if(!n)return[];let s=((r==null?void 0:r(e,t))??[...ye(e,{getVisitorKeys:q(u)})]).flatMap(a=>n(a)?[a]:ut(a,t));return s.sort((a,D)=>i(a)-i(D)||o(a)-o(D)),$t.set(e,s),s}function un(e,t,r,n){let{locStart:u,locEnd:i}=r,o=u(t),s=i(t),a=ut(e,r),D,l,p=0,f=a.length;for(;p>1,c=a[d],F=u(c),m=i(c);if(F<=o&&s<=m)return un(c,t,r,c);if(m<=o){D=c,p=d+1;continue}if(s<=F){l=c,f=d;continue}throw new Error("Comment location overlaps with node location")}if((n==null?void 0:n.type)==="TemplateLiteral"){let{quasis:d}=n,c=Vt(d,t,r);D&&Vt(d,D,r)!==c&&(D=null),l&&Vt(d,l,r)!==c&&(l=null)}return{enclosingNode:n,precedingNode:D,followingNode:l}}var Mt=()=>!1;function on(e,t){let{comments:r}=e;if(delete e.comments,!Ht(r)||!t.printer.canAttachComment)return;let n=[],{locStart:u,locEnd:i,printer:{experimentalFeatures:{avoidAstMutation:o=!1}={},handleComments:s={}},originalText:a}=t,{ownLine:D=Mt,endOfLine:l=Mt,remaining:p=Mt}=s,f=r.map((d,c)=>({...un(e,d,t),comment:d,text:a,options:t,ast:e,isLastComment:r.length-1===c}));for(let[d,c]of f.entries()){let{comment:F,precedingNode:m,enclosingNode:h,followingNode:C,text:v,options:E,ast:g,isLastComment:j}=c;if(E.parser==="json"||E.parser==="json5"||E.parser==="jsonc"||E.parser==="__js_expression"||E.parser==="__ts_expression"||E.parser==="__vue_expression"||E.parser==="__vue_ts_expression"){if(u(F)-u(g)<=0){ue(g,F);continue}if(i(F)-i(g)>=0){ie(g,F);continue}}let b;if(o?b=[c]:(F.enclosingNode=h,F.precedingNode=m,F.followingNode=C,b=[F,v,E,g,j]),ni(v,E,f,d))F.placement="ownLine",D(...b)||(C?ue(C,F):m?ie(m,F):h?re(h,F):re(g,F));else if(ui(v,E,f,d))F.placement="endOfLine",l(...b)||(m?ie(m,F):C?ue(C,F):h?re(h,F):re(g,F));else if(F.placement="remaining",!p(...b))if(m&&C){let X=n.length;X>0&&n[X-1].followingNode!==C&&nn(n,E),n.push(c)}else m?ie(m,F):C?ue(C,F):h?re(h,F):re(g,F)}if(nn(n,t),!o)for(let d of r)delete d.precedingNode,delete d.enclosingNode,delete d.followingNode}var sn=e=>!/[\S\n\u2028\u2029]/u.test(e);function ni(e,t,r,n){let{comment:u,precedingNode:i}=r[n],{locStart:o,locEnd:s}=t,a=o(u);if(i)for(let D=n-1;D>=0;D--){let{comment:l,precedingNode:p}=r[D];if(p!==i||!sn(e.slice(s(l),a)))break;a=o(l)}return V(e,a,{backwards:!0})}function ui(e,t,r,n){let{comment:u,followingNode:i}=r[n],{locStart:o,locEnd:s}=t,a=s(u);if(i)for(let D=n+1;D0;--o){let{comment:D,precedingNode:l,followingNode:p}=e[o-1];Pe.strictEqual(l,n),Pe.strictEqual(p,u);let f=t.originalText.slice(t.locEnd(D),i);if(((a=(s=t.printer).isGap)==null?void 0:a.call(s,f,t))??/^[\s(]*$/u.test(f))i=t.locStart(D);else break}for(let[D,{comment:l}]of e.entries())D1&&D.comments.sort((l,p)=>t.locStart(l)-t.locStart(p));e.length=0}function Vt(e,t,r){let n=r.locStart(t)-1;for(let u=1;u!n.has(a)).length===0)return{leading:"",trailing:""};let i=[],o=[],s;return e.each(()=>{let a=e.node;if(n!=null&&n.has(a))return;let{leading:D,trailing:l}=a;D?i.push(oi(e,t)):l&&(s=si(e,t,s),o.push(s.doc))},"comments"),{leading:i,trailing:o}}function Dn(e,t,r){let{leading:n,trailing:u}=ai(e,r);return!n&&!u?t:me(t,i=>[n,i,u])}function ln(e){let{[Symbol.for("comments")]:t,[Symbol.for("printedComments")]:r}=e;for(let n of t){if(!n.printed&&!r.has(n))throw new Error('Comment "'+n.value.trim()+'" was not printed. Please report this error!');delete n.printed}}function Di(e){return()=>{}}var cn=Di;var Re=class extends Error{name="ConfigError"},Ye=class extends Error{name="UndefinedParserError"};var fn={cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing +(mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:e=>typeof e=="string"||typeof e=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"jsonc",description:"JSON with Comments"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e=="string"||typeof e=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive). +The range will extend forwards to the end of the selected statement.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset. +The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:`Require either '@prettier' or '@format' to be present in the file's first docblock comment +in order for it to be formatted.`,cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function it({plugins:e=[],showDeprecated:t=!1}={}){let r=e.flatMap(u=>u.languages??[]),n=[];for(let u of ci(Object.assign({},...e.map(({options:i})=>i),fn)))!t&&u.deprecated||(Array.isArray(u.choices)&&(t||(u.choices=u.choices.filter(i=>!i.deprecated)),u.name==="parser"&&(u.choices=[...u.choices,...li(u.choices,r,e)])),u.pluginDefaults=Object.fromEntries(e.filter(i=>{var o;return((o=i.defaultOptions)==null?void 0:o[u.name])!==void 0}).map(i=>[i.name,i.defaultOptions[u.name]])),n.push(u));return{languages:r,options:n}}function*li(e,t,r){let n=new Set(e.map(u=>u.value));for(let u of t)if(u.parsers){for(let i of u.parsers)if(!n.has(i)){n.add(i);let o=r.find(a=>a.parsers&&Object.prototype.hasOwnProperty.call(a.parsers,i)),s=u.name;o!=null&&o.name&&(s+=` (plugin: ${o.name})`),yield{value:i,description:s}}}}function ci(e){let t=[];for(let[r,n]of Object.entries(e)){let u={name:r,...n};Array.isArray(u.default)&&(u.default=A(!1,u.default,-1).value),t.push(u)}return t}var fi=e=>String(e).split(/[/\\]/u).pop();function dn(e,t){if(!t)return;let r=fi(t).toLowerCase();return e.find(({filenames:n})=>n==null?void 0:n.some(u=>u.toLowerCase()===r))??e.find(({extensions:n})=>n==null?void 0:n.some(u=>r.endsWith(u)))}function di(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r==null?void 0:r.includes(t))??e.find(({extensions:r})=>r==null?void 0:r.includes(`.${t}`))}function pi(e,t){let r=e.plugins.flatMap(u=>u.languages??[]),n=di(r,t.language)??dn(r,t.physicalFile)??dn(r,t.file)??(t.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var pn=pi;var oe={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(r=>oe.value(r)).join(", ")}]`;let t=Object.keys(e);return t.length===0?"{}":`{ ${t.map(r=>`${oe.key(r)}: ${oe.value(e[r])}`).join(", ")} }`},pair:({key:e,value:t})=>oe.value({[e]:t})};var Ut=Me(ot(),1),hn=(e,t,{descriptor:r})=>{let n=[`${Ut.default.yellow(typeof e=="string"?r.key(e):r.pair(e))} is deprecated`];return t&&n.push(`we now treat it as ${Ut.default.blue(typeof t=="string"?r.key(t):r.pair(t))}`),n.join("; ")+"."};var ce=Me(ot(),1);var st=Symbol.for("vnopts.VALUE_NOT_EXIST"),ve=Symbol.for("vnopts.VALUE_UNCHANGED");var En=" ".repeat(2),gn=(e,t,r)=>{let{text:n,list:u}=r.normalizeExpectedResult(r.schemas[e].expected(r)),i=[];return n&&i.push(Cn(e,t,n,r.descriptor)),u&&i.push([Cn(e,t,u.title,r.descriptor)].concat(u.values.map(o=>yn(o,r.loggerPrintWidth))).join(` +`)),An(i,r.loggerPrintWidth)};function Cn(e,t,r,n){return[`Invalid ${ce.default.red(n.key(e))} value.`,`Expected ${ce.default.blue(r)},`,`but received ${t===st?ce.default.gray("nothing"):ce.default.red(n.value(t))}.`].join(" ")}function yn({text:e,list:t},r){let n=[];return e&&n.push(`- ${ce.default.blue(e)}`),t&&n.push([`- ${ce.default.blue(t.title)}:`].concat(t.values.map(u=>yn(u,r-En.length).replace(/^|\n/g,`$&${En}`))).join(` +`)),An(n,r)}function An(e,t){if(e.length===1)return e[0];let[r,n]=e,[u,i]=e.map(o=>o.split(` +`,1)[0].length);return u>t&&u>i?n:r}var Kt=Me(ot(),1);var zt=[],vn=[];function Gt(e,t){if(e===t)return 0;let r=e;e.length>t.length&&(e=t,t=r);let n=e.length,u=t.length;for(;n>0&&e.charCodeAt(~-n)===t.charCodeAt(~-u);)n--,u--;let i=0;for(;is?D>s?s+1:D:D>a?a+1:D;return s}var at=(e,t,{descriptor:r,logger:n,schemas:u})=>{let i=[`Ignored unknown option ${Kt.default.yellow(r.pair({key:e,value:t}))}.`],o=Object.keys(u).sort().find(s=>Gt(e,s)<3);o&&i.push(`Did you mean ${Kt.default.blue(r.key(o))}?`),n.warn(i.join(" "))};var Fi=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function mi(e,t){let r=new e(t),n=Object.create(r);for(let u of Fi)u in t&&(n[u]=hi(t[u],r,x.prototype[u].length));return n}var x=class{static create(t){return mi(this,t)}constructor(t){this.name=t.name}default(t){}expected(t){return"nothing"}validate(t,r){return!1}deprecated(t,r){return!1}forward(t,r){}redirect(t,r){}overlap(t,r,n){return t}preprocess(t,r){return t}postprocess(t,r){return ve}};function hi(e,t,r){return typeof e=="function"?(...n)=>e(...n.slice(0,r-1),t,...n.slice(r-1)):()=>e}var Dt=class extends x{constructor(t){super(t),this._sourceName=t.sourceName}expected(t){return t.schemas[this._sourceName].expected(t)}validate(t,r){return r.schemas[this._sourceName].validate(t,r)}redirect(t,r){return this._sourceName}};var lt=class extends x{expected(){return"anything"}validate(){return!0}};var ct=class extends x{constructor({valueSchema:t,name:r=t.name,...n}){super({...n,name:r}),this._valueSchema=t}expected(t){let{text:r,list:n}=t.normalizeExpectedResult(this._valueSchema.expected(t));return{text:r&&`an array of ${r}`,list:n&&{title:"an array of the following values",values:[{list:n}]}}}validate(t,r){if(!Array.isArray(t))return!1;let n=[];for(let u of t){let i=r.normalizeValidateResult(this._valueSchema.validate(u,r),u);i!==!0&&n.push(i.value)}return n.length===0?!0:{value:n}}deprecated(t,r){let n=[];for(let u of t){let i=r.normalizeDeprecatedResult(this._valueSchema.deprecated(u,r),u);i!==!1&&n.push(...i.map(({value:o})=>({value:[o]})))}return n}forward(t,r){let n=[];for(let u of t){let i=r.normalizeForwardResult(this._valueSchema.forward(u,r),u);n.push(...i.map(Bn))}return n}redirect(t,r){let n=[],u=[];for(let i of t){let o=r.normalizeRedirectResult(this._valueSchema.redirect(i,r),i);"remain"in o&&n.push(o.remain),u.push(...o.redirect.map(Bn))}return n.length===0?{redirect:u}:{redirect:u,remain:n}}overlap(t,r){return t.concat(r)}};function Bn({from:e,to:t}){return{from:[e],to:t}}var ft=class extends x{expected(){return"true or false"}validate(t){return typeof t=="boolean"}};function _n(e,t){let r=Object.create(null);for(let n of e){let u=n[t];if(r[u])throw new Error(`Duplicate ${t} ${JSON.stringify(u)}`);r[u]=n}return r}function xn(e,t){let r=new Map;for(let n of e){let u=n[t];if(r.has(u))throw new Error(`Duplicate ${t} ${JSON.stringify(u)}`);r.set(u,n)}return r}function bn(){let e=Object.create(null);return t=>{let r=JSON.stringify(t);return e[r]?!0:(e[r]=!0,!1)}}function Nn(e,t){let r=[],n=[];for(let u of e)t(u)?r.push(u):n.push(u);return[r,n]}function On(e){return e===Math.floor(e)}function Sn(e,t){if(e===t)return 0;let r=typeof e,n=typeof t,u=["undefined","object","boolean","number","string"];return r!==n?u.indexOf(r)-u.indexOf(n):r!=="string"?Number(e)-Number(t):e.localeCompare(t)}function Tn(e){return(...t)=>{let r=e(...t);return typeof r=="string"?new Error(r):r}}function Jt(e){return e===void 0?{}:e}function qt(e){if(typeof e=="string")return{text:e};let{text:t,list:r}=e;return Ei((t||r)!==void 0,"Unexpected `expected` result, there should be at least one field."),r?{text:t,list:{title:r.title,values:r.values.map(qt)}}:{text:t}}function Xt(e,t){return e===!0?!0:e===!1?{value:t}:e}function Qt(e,t,r=!1){return e===!1?!1:e===!0?r?!0:[{value:t}]:"value"in e?[e]:e.length===0?!1:e}function wn(e,t){return typeof e=="string"||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function dt(e,t){return e===void 0?[]:Array.isArray(e)?e.map(r=>wn(r,t)):[wn(e,t)]}function Zt(e,t){let r=dt(typeof e=="object"&&"redirect"in e?e.redirect:e,t);return r.length===0?{remain:t,redirect:r}:typeof e=="object"&&"remain"in e?{remain:e.remain,redirect:r}:{redirect:r}}function Ei(e,t){if(!e)throw new Error(t)}var pt=class extends x{constructor(t){super(t),this._choices=xn(t.choices.map(r=>r&&typeof r=="object"?r:{value:r}),"value")}expected({descriptor:t}){let r=Array.from(this._choices.keys()).map(o=>this._choices.get(o)).filter(({hidden:o})=>!o).map(o=>o.value).sort(Sn).map(t.value),n=r.slice(0,-2),u=r.slice(-2);return{text:n.concat(u.join(" or ")).join(", "),list:{title:"one of the following values",values:r}}}validate(t){return this._choices.has(t)}deprecated(t){let r=this._choices.get(t);return r&&r.deprecated?{value:t}:!1}forward(t){let r=this._choices.get(t);return r?r.forward:void 0}redirect(t){let r=this._choices.get(t);return r?r.redirect:void 0}};var Ft=class extends x{expected(){return"a number"}validate(t,r){return typeof t=="number"}};var mt=class extends Ft{expected(){return"an integer"}validate(t,r){return r.normalizeValidateResult(super.validate(t,r),t)===!0&&On(t)}};var je=class extends x{expected(){return"a string"}validate(t){return typeof t=="string"}};var kn=oe,Ln=at,Pn=gn,In=hn;var ht=class{constructor(t,r){let{logger:n=console,loggerPrintWidth:u=80,descriptor:i=kn,unknown:o=Ln,invalid:s=Pn,deprecated:a=In,missing:D=()=>!1,required:l=()=>!1,preprocess:p=d=>d,postprocess:f=()=>ve}=r||{};this._utils={descriptor:i,logger:n||{warn:()=>{}},loggerPrintWidth:u,schemas:_n(t,"name"),normalizeDefaultResult:Jt,normalizeExpectedResult:qt,normalizeDeprecatedResult:Qt,normalizeForwardResult:dt,normalizeRedirectResult:Zt,normalizeValidateResult:Xt},this._unknownHandler=o,this._invalidHandler=Tn(s),this._deprecatedHandler=a,this._identifyMissing=(d,c)=>!(d in c)||D(d,c),this._identifyRequired=l,this._preprocess=p,this._postprocess=f,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=bn()}normalize(t){let r={},u=[this._preprocess(t,this._utils)],i=()=>{for(;u.length!==0;){let o=u.shift(),s=this._applyNormalization(o,r);u.push(...s)}};i();for(let o of Object.keys(this._utils.schemas)){let s=this._utils.schemas[o];if(!(o in r)){let a=Jt(s.default(this._utils));"value"in a&&u.push({[o]:a.value})}}i();for(let o of Object.keys(this._utils.schemas)){if(!(o in r))continue;let s=this._utils.schemas[o],a=r[o],D=s.postprocess(a,this._utils);D!==ve&&(this._applyValidation(D,o,s),r[o]=D)}return this._applyPostprocess(r),this._applyRequiredCheck(r),r}_applyNormalization(t,r){let n=[],{knownKeys:u,unknownKeys:i}=this._partitionOptionKeys(t);for(let o of u){let s=this._utils.schemas[o],a=s.preprocess(t[o],this._utils);this._applyValidation(a,o,s);let D=({from:d,to:c})=>{n.push(typeof c=="string"?{[c]:d}:{[c.key]:c.value})},l=({value:d,redirectTo:c})=>{let F=Qt(s.deprecated(d,this._utils),a,!0);if(F!==!1)if(F===!0)this._hasDeprecationWarned(o)||this._utils.logger.warn(this._deprecatedHandler(o,c,this._utils));else for(let{value:m}of F){let h={key:o,value:m};if(!this._hasDeprecationWarned(h)){let C=typeof c=="string"?{key:c,value:m}:c;this._utils.logger.warn(this._deprecatedHandler(h,C,this._utils))}}};dt(s.forward(a,this._utils),a).forEach(D);let f=Zt(s.redirect(a,this._utils),a);if(f.redirect.forEach(D),"remain"in f){let d=f.remain;r[o]=o in r?s.overlap(r[o],d,this._utils):d,l({value:d})}for(let{from:d,to:c}of f.redirect)l({value:d,redirectTo:c})}for(let o of i){let s=t[o];this._applyUnknownHandler(o,s,r,(a,D)=>{n.push({[a]:D})})}return n}_applyRequiredCheck(t){for(let r of Object.keys(this._utils.schemas))if(this._identifyMissing(r,t)&&this._identifyRequired(r))throw this._invalidHandler(r,st,this._utils)}_partitionOptionKeys(t){let[r,n]=Nn(Object.keys(t).filter(u=>!this._identifyMissing(u,t)),u=>u in this._utils.schemas);return{knownKeys:r,unknownKeys:n}}_applyValidation(t,r,n){let u=Xt(n.validate(t,this._utils),t);if(u!==!0)throw this._invalidHandler(r,u.value,this._utils)}_applyUnknownHandler(t,r,n,u){let i=this._unknownHandler(t,r,this._utils);if(i)for(let o of Object.keys(i)){if(this._identifyMissing(o,i))continue;let s=i[o];o in this._utils.schemas?u(o,s):n[o]=s}}_applyPostprocess(t){let r=this._postprocess(t,this._utils);if(r!==ve){if(r.delete)for(let n of r.delete)delete t[n];if(r.override){let{knownKeys:n,unknownKeys:u}=this._partitionOptionKeys(r.override);for(let i of n){let o=r.override[i];this._applyValidation(o,i,this._utils.schemas[i]),t[i]=o}for(let i of u){let o=r.override[i];this._applyUnknownHandler(i,o,t,(s,a)=>{let D=this._utils.schemas[s];this._applyValidation(a,s,D),t[s]=a})}}}}};var er;function gi(e,t,{logger:r=!1,isCLI:n=!1,passThrough:u=!1,FlagSchema:i,descriptor:o}={}){if(n){if(!i)throw new Error("'FlagSchema' option is required.");if(!o)throw new Error("'descriptor' option is required.")}else o=oe;let s=u?Array.isArray(u)?(f,d)=>u.includes(f)?{[f]:d}:void 0:(f,d)=>({[f]:d}):(f,d,c)=>{let{_:F,...m}=c.schemas;return at(f,d,{...c,schemas:m})},a=yi(t,{isCLI:n,FlagSchema:i}),D=new ht(a,{logger:r,unknown:s,descriptor:o}),l=r!==!1;l&&er&&(D._hasDeprecationWarned=er);let p=D.normalize(e);return l&&(er=D._hasDeprecationWarned),p}function yi(e,{isCLI:t,FlagSchema:r}){let n=[];t&&n.push(lt.create({name:"_"}));for(let u of e)n.push(Ai(u,{isCLI:t,optionInfos:e,FlagSchema:r})),u.alias&&t&&n.push(Dt.create({name:u.alias,sourceName:u.name}));return n}function Ai(e,{isCLI:t,optionInfos:r,FlagSchema:n}){let{name:u}=e,i={name:u},o,s={};switch(e.type){case"int":o=mt,t&&(i.preprocess=Number);break;case"string":o=je;break;case"choice":o=pt,i.choices=e.choices.map(a=>a!=null&&a.redirect?{...a,redirect:{to:{key:e.name,value:a.redirect}}}:a);break;case"boolean":o=ft;break;case"flag":o=n,i.flags=r.flatMap(a=>[a.alias,a.description&&a.name,a.oppositeDescription&&`no-${a.name}`].filter(Boolean));break;case"path":o=je;break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?i.validate=(a,D,l)=>e.exception(a)||D.validate(a,l):i.validate=(a,D,l)=>a===void 0||D.validate(a,l),e.redirect&&(s.redirect=a=>a?{to:typeof e.redirect=="string"?e.redirect:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(s.deprecated=!0),t&&!e.array){let a=i.preprocess||(D=>D);i.preprocess=(D,l,p)=>l.preprocess(a(Array.isArray(D)?A(!1,D,-1):D),p)}return e.array?ct.create({...t?{preprocess:a=>Array.isArray(a)?a:[a]}:{},...s,valueSchema:o.create(i)}):o.create({...i,...s})}var Rn=gi;var vi=(e,t,r)=>{if(!(e&&t==null)){if(t.findLast)return t.findLast(r);for(let n=t.length-1;n>=0;n--){let u=t[n];if(r(u,n,t))return u}}},tr=vi;function rr(e,t){if(!t)throw new Error("parserName is required.");let r=tr(!1,e,u=>u.parsers&&Object.prototype.hasOwnProperty.call(u.parsers,t));if(r)return r;let n=`Couldn't resolve parser "${t}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new Re(n)}function Yn(e,t){if(!t)throw new Error("astFormat is required.");let r=tr(!1,e,u=>u.printers&&Object.prototype.hasOwnProperty.call(u.printers,t));if(r)return r;let n=`Couldn't find plugin for AST format "${t}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new Re(n)}function Et({plugins:e,parser:t}){let r=rr(e,t);return nr(r,t)}function nr(e,t){let r=e.parsers[t];return typeof r=="function"?r():r}function jn(e,t){let r=e.printers[t];return typeof r=="function"?r():r}var Hn={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};async function Bi(e,t={}){var p;let r={...e};if(!r.parser)if(r.filepath){if(r.parser=pn(r,{physicalFile:r.filepath}),!r.parser)throw new Ye(`No parser could be inferred for file "${r.filepath}".`)}else throw new Ye("No parser and no file path given, couldn't infer a parser.");let n=it({plugins:e.plugins,showDeprecated:!0}).options,u={...Hn,...Object.fromEntries(n.filter(f=>f.default!==void 0).map(f=>[f.name,f.default]))},i=rr(r.plugins,r.parser),o=await nr(i,r.parser);r.astFormat=o.astFormat,r.locEnd=o.locEnd,r.locStart=o.locStart;let s=(p=i.printers)!=null&&p[o.astFormat]?i:Yn(r.plugins,o.astFormat),a=await jn(s,o.astFormat);r.printer=a;let D=s.defaultOptions?Object.fromEntries(Object.entries(s.defaultOptions).filter(([,f])=>f!==void 0)):{},l={...u,...D};for(let[f,d]of Object.entries(l))(r[f]===null||r[f]===void 0)&&(r[f]=d);return r.parser==="json"&&(r.trailingComma="none"),Rn(r,n,{passThrough:Object.keys(Hn),...t})}var se=Bi;var Mn=Me($n(),1);async function bi(e,t){let r=await Et(t),n=r.preprocess?r.preprocess(e,t):e;t.originalText=n;let u;try{u=await r.parse(n,t,t)}catch(i){Ni(i,e)}return{text:n,ast:u}}function Ni(e,t){let{loc:r}=e;if(r){let n=(0,Mn.codeFrameColumns)(t,r,{highlightCode:!0});throw e.message+=` +`+n,e.codeFrame=n,e}throw e}var fe=bi;async function Vn(e,t,r,n,u){let{embeddedLanguageFormatting:i,printer:{embed:o,hasPrettierIgnore:s=()=>!1,getVisitorKeys:a}}=r;if(!o||i!=="auto")return;if(o.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed");let D=q(o.getVisitorKeys??a),l=[];d();let p=e.stack;for(let{print:c,node:F,pathStack:m}of l)try{e.stack=m;let h=await c(f,t,e,r);h&&u.set(F,h)}catch(h){if(globalThis.PRETTIER_DEBUG)throw h}e.stack=p;function f(c,F){return Oi(c,F,r,n)}function d(){let{node:c}=e;if(c===null||typeof c!="object"||s(e))return;for(let m of D(c))Array.isArray(c[m])?e.each(d,m):e.call(d,m);let F=o(e,r);if(F){if(typeof F=="function"){l.push({print:F,node:c,pathStack:[...e.stack]});return}u.set(c,F)}}}async function Oi(e,t,r,n){let u=await se({...r,...t,parentParser:r.parser,originalText:e},{passThrough:!0}),{ast:i}=await fe(e,u),o=await n(i,u);return qe(o)}function Si(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:u,locEnd:i,[Symbol.for("printedComments")]:o}=t,{node:s}=e,a=u(s),D=i(s);for(let l of n)u(l)>=a&&i(l)<=D&&o.add(l);return r.slice(a,D)}var Un=Si;async function He(e,t){({ast:e}=await ir(e,t));let r=new Map,n=new qr(e),u=cn(t),i=new Map;await Vn(n,s,t,He,i);let o=await zn(n,t,s,void 0,i);if(ln(t),t.nodeAfterCursor&&!t.nodeBeforeCursor)return[Z,o];if(t.nodeBeforeCursor&&!t.nodeAfterCursor)return[o,Z];return o;function s(D,l){return D===void 0||D===n?a(l):Array.isArray(D)?n.call(()=>a(l),...D):n.call(()=>a(l),D)}function a(D){u(n);let l=n.node;if(l==null)return"";let p=l&&typeof l=="object"&&D===void 0;if(p&&r.has(l))return r.get(l);let f=zn(n,t,s,D,i);return p&&r.set(l,f),f}}function zn(e,t,r,n,u){var a;let{node:i}=e,{printer:o}=t,s;switch((a=o.hasPrettierIgnore)!=null&&a.call(o,e)?s=Un(e,t):u.has(i)?s=u.get(i):s=o.print(e,t,r,n),i){case t.cursorNode:s=me(s,D=>[Z,D,Z]);break;case t.nodeBeforeCursor:s=me(s,D=>[D,Z]);break;case t.nodeAfterCursor:s=me(s,D=>[Z,D]);break}return o.printComment&&(!o.willPrintOwnComments||!o.willPrintOwnComments(e,t))&&(s=Dn(e,s,t)),s}async function ir(e,t){let r=e.comments??[];t[Symbol.for("comments")]=r,t[Symbol.for("tokens")]=e.tokens??[],t[Symbol.for("printedComments")]=new Set,on(e,t);let{printer:{preprocess:n}}=t;return e=n?await n(e,t):e,{ast:e,comments:r}}function Ti(e,t){let{cursorOffset:r,locStart:n,locEnd:u}=t,i=q(t.printer.getVisitorKeys),o=d=>n(d)<=r&&u(d)>=r,s=e,a=[e];for(let d of Zr(e,{getVisitorKeys:i,filter:o}))a.push(d),s=d;if(en(s,{getVisitorKeys:i}))return{cursorNode:s};let D,l,p=-1,f=Number.POSITIVE_INFINITY;for(;a.length>0&&(D===void 0||l===void 0);){s=a.pop();let d=D!==void 0,c=l!==void 0;for(let F of ye(s,{getVisitorKeys:i})){if(!d){let m=u(F);m<=r&&m>p&&(D=F,p=m)}if(!c){let m=n(F);m>=r&&mo(f,a)).filter(Boolean);let D={},l=new Set(u(s));for(let f in s)!Object.prototype.hasOwnProperty.call(s,f)||i.has(f)||(l.has(f)?D[f]=o(s[f],s):D[f]=s[f]);let p=r(s,D,a);if(p!==null)return p??D}}var Kn=ki;var Li=(e,t,r)=>{if(!(e&&t==null)){if(t.findLastIndex)return t.findLastIndex(r);for(let n=t.length-1;n>=0;n--){let u=t[n];if(r(u,n,t))return n}return-1}},Jn=Li;var Pi=({parser:e})=>e==="json"||e==="json5"||e==="jsonc"||e==="json-stringify";function Ii(e,t){let r=[e.node,...e.parentNodes],n=new Set([t.node,...t.parentNodes]);return r.find(u=>Qn.has(u.type)&&n.has(u))}function qn(e){let t=Jn(!1,e,r=>r.type!=="Program"&&r.type!=="File");return t===-1?e:e.slice(0,t+1)}function Ri(e,t,{locStart:r,locEnd:n}){let u=e.node,i=t.node;if(u===i)return{startNode:u,endNode:i};let o=r(e.node);for(let a of qn(t.parentNodes))if(r(a)>=o)i=a;else break;let s=n(t.node);for(let a of qn(e.parentNodes)){if(n(a)<=s)u=a;else break;if(u===i)break}return{startNode:u,endNode:i}}function or(e,t,r,n,u=[],i){let{locStart:o,locEnd:s}=r,a=o(e),D=s(e);if(!(t>D||tn);let s=e.slice(n,u).search(/\S/u),a=s===-1;if(!a)for(n+=s;u>n&&!/\S/u.test(e[u-1]);--u);let D=or(r,n,t,(d,c)=>Xn(t,d,c),[],"rangeStart"),l=a?D:or(r,u,t,d=>Xn(t,d),[],"rangeEnd");if(!D||!l)return{rangeStart:0,rangeEnd:0};let p,f;if(Pi(t)){let d=Ii(D,l);p=d,f=d}else({startNode:p,endNode:f}=Ri(D,l,t));return{rangeStart:Math.min(i(p),i(f)),rangeEnd:Math.max(o(p),o(f))}}var nu="\uFEFF",eu=Symbol("cursor");async function uu(e,t,r=0){if(!e||e.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:n,text:u}=await fe(e,t);t.cursorOffset>=0&&(t={...t,...Gn(n,t)});let i=await He(n,t,r);r>0&&(i=Ze([K,i],r,t.tabWidth));let o=Ce(i,t);if(r>0){let a=o.formatted.trim();o.cursorNodeStart!==void 0&&(o.cursorNodeStart-=o.formatted.indexOf(a),o.cursorNodeStart<0&&(o.cursorNodeStart=0,o.cursorNodeText=o.cursorNodeText.trimStart()),o.cursorNodeStart+o.cursorNodeText.length>a.length&&(o.cursorNodeText=o.cursorNodeText.trimEnd())),o.formatted=a+be(t.endOfLine)}let s=t[Symbol.for("comments")];if(t.cursorOffset>=0){let a,D,l,p;if((t.cursorNode||t.nodeBeforeCursor||t.nodeAfterCursor)&&o.cursorNodeText)if(l=o.cursorNodeStart,p=o.cursorNodeText,t.cursorNode)a=t.locStart(t.cursorNode),D=u.slice(a,t.locEnd(t.cursorNode));else{if(!t.nodeBeforeCursor&&!t.nodeAfterCursor)throw new Error("Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor");a=t.nodeBeforeCursor?t.locEnd(t.nodeBeforeCursor):0;let h=t.nodeAfterCursor?t.locStart(t.nodeAfterCursor):u.length;D=u.slice(a,h)}else a=0,D=u,l=0,p=o.formatted;let f=t.cursorOffset-a;if(D===p)return{formatted:o.formatted,cursorOffset:l+f,comments:s};let d=D.split("");d.splice(f,0,eu);let c=p.split(""),F=yr(d,c),m=l;for(let h of F)if(h.removed){if(h.value.includes(eu))break}else m+=h.count;return{formatted:o.formatted,cursorOffset:m,comments:s}}return{formatted:o.formatted,cursorOffset:-1,comments:s}}async function Hi(e,t){let{ast:r,text:n}=await fe(e,t),{rangeStart:u,rangeEnd:i}=Zn(n,t,r),o=n.slice(u,i),s=Math.min(u,n.lastIndexOf(` +`,u)+1),a=n.slice(s,u).match(/^\s*/u)[0],D=ge(a,t.tabWidth),l=await uu(o,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>u&&t.cursorOffset<=i?t.cursorOffset-u:-1,endOfLine:"lf"},D),p=l.formatted.trimEnd(),{cursorOffset:f}=t;f>i?f+=p.length-o.length:l.cursorOffset>=0&&(f=l.cursorOffset+u);let d=n.slice(0,u)+p+n.slice(i);if(t.endOfLine!=="lf"){let c=be(t.endOfLine);f>=0&&c===`\r +`&&(f+=Nt(d.slice(0,f),` +`)),d=ne(!1,d,` +`,c)}return{formatted:d,cursorOffset:f,comments:l.comments}}function sr(e,t,r){return typeof t!="number"||Number.isNaN(t)||t<0||t>e.length?r:t}function tu(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:u}=t;return r=sr(e,r,-1),n=sr(e,n,0),u=sr(e,u,e.length),{...t,cursorOffset:r,rangeStart:n,rangeEnd:u}}function iu(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:u,endOfLine:i}=tu(e,t),o=e.charAt(0)===nu;if(o&&(e=e.slice(1),r--,n--,u--),i==="auto"&&(i=Ar(e)),e.includes("\r")){let s=a=>Nt(e.slice(0,Math.max(a,0)),`\r +`);r-=s(r),n-=s(n),u-=s(u),e=vr(e)}return{hasBOM:o,text:e,options:tu(e,{...t,cursorOffset:r,rangeStart:n,rangeEnd:u,endOfLine:i})}}async function ru(e,t){let r=await Et(t);return!r.hasPragma||r.hasPragma(e)}async function ar(e,t){let{hasBOM:r,text:n,options:u}=iu(e,await se(t));if(u.rangeStart>=u.rangeEnd&&n!==""||u.requirePragma&&!await ru(n,u))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let i;return u.rangeStart>0||u.rangeEnd=0&&i.cursorOffset++),i}async function ou(e,t,r){let{text:n,options:u}=iu(e,await se(t)),i=await fe(n,u);return r&&(r.preprocessForPrint&&(i.ast=await ir(i.ast,u)),r.massage&&(i.ast=Kn(i.ast,u))),i}async function su(e,t){t=await se(t);let r=await He(e,t);return Ce(r,t)}async function au(e,t){let r=Vr(e),{formatted:n}=await ar(r,{...t,parser:"__js_expression"});return n}async function Du(e,t){t=await se(t);let{ast:r}=await fe(e,t);return He(r,t)}async function lu(e,t){return Ce(e,await se(t))}var Dr={};vt(Dr,{builders:()=>$i,printer:()=>Mi,utils:()=>Vi});var $i={join:Se,line:Qe,softline:$r,hardline:K,literalline:Xe,group:kt,conditionalGroup:Ir,fill:Rr,lineSuffix:Te,lineSuffixBoundary:Hr,cursor:Z,breakParent:he,ifBreak:Yr,trim:Wr,indent:le,indentIfBreak:jr,align:De,addAlignmentToDoc:Ze,markAsRoot:Lr,dedentToRoot:kr,dedent:Pr,hardlineWithoutBreakParent:ke,literallineWithoutBreakParent:Lt,label:Mr,concat:e=>e},Mi={printDocToString:Ce},Vi={willBreak:xr,traverseDoc:Fe,findInDoc:Je,mapDoc:Oe,removeLines:Nr,stripTrailingHardline:qe,replaceEndOfLine:Or,canBreak:Sr};var cu="3.5.3";var cr={};vt(cr,{addDanglingComment:()=>re,addLeadingComment:()=>ue,addTrailingComment:()=>ie,getAlignmentSize:()=>ge,getIndentSize:()=>fu,getMaxContinuousCount:()=>du,getNextNonSpaceNonCommentCharacter:()=>pu,getNextNonSpaceNonCommentCharacterIndex:()=>no,getPreferredQuote:()=>mu,getStringWidth:()=>Le,hasNewline:()=>V,hasNewlineInRange:()=>hu,hasSpaces:()=>Eu,isNextLineEmpty:()=>so,isNextLineEmptyAfterIndex:()=>Ct,isPreviousLineEmpty:()=>io,makeString:()=>Cu,skip:()=>Ae,skipEverythingButNewLine:()=>nt,skipInlineComment:()=>Be,skipNewline:()=>W,skipSpaces:()=>S,skipToLineEnd:()=>rt,skipTrailingComment:()=>we,skipWhitespace:()=>tn});function Ui(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;rMath.max(n,u.length/t.length),0)}var du=qi;function Xi(e,t){let r=We(e,t);return r===!1?"":e.charAt(r)}var pu=Xi;var gt="'",Fu='"';function Qi(e,t){let r=t===!0||t===gt?gt:Fu,n=r===gt?Fu:gt,u=0,i=0;for(let o of e)o===r?u++:o===n&&i++;return u>i?n:r}var mu=Qi;function Zi(e,t,r){for(let n=t;ns===n?s:a===t?"\\"+a:a||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(s)?s:"\\"+s));return t+i+t}var Cu=to;function ro(e,t,r){return We(e,r(t))}function no(e,t){return arguments.length===2||typeof t=="number"?We(e,t):ro(...arguments)}function uo(e,t,r){return Ie(e,r(t))}function io(e,t){return arguments.length===2||typeof t=="number"?Ie(e,t):uo(...arguments)}function oo(e,t,r){return Ct(e,r(t))}function so(e,t){return arguments.length===2||typeof t=="number"?Ct(e,t):oo(...arguments)}function de(e,t=1){return async(...r)=>{let n=r[t]??{},u=n.plugins??[];return r[t]={...n,plugins:Array.isArray(u)?u:Object.values(u)},e(...r)}}var gu=de(ar);async function yu(e,t){let{formatted:r}=await gu(e,{...t,cursorOffset:-1});return r}async function ao(e,t){return await yu(e,t)===e}var Do=de(it,0),lo={parse:de(ou),formatAST:de(su),formatDoc:de(au),printToDoc:de(Du),printDocToString:de(lu)};var mc=fr;export{lo as __debug,ao as check,mc as default,Dr as doc,yu as format,gu as formatWithCursor,Do as getSupportInfo,cr as util,cu as version}; diff --git a/node_modules/resolve-from/index.d.ts b/node_modules/resolve-from/index.d.ts new file mode 100644 index 0000000..dd5f5ef --- /dev/null +++ b/node_modules/resolve-from/index.d.ts @@ -0,0 +1,31 @@ +declare const resolveFrom: { + /** + Resolve the path of a module like [`require.resolve()`](https://nodejs.org/api/globals.html#globals_require_resolve) but from a given path. + + @param fromDirectory - Directory to resolve from. + @param moduleId - What you would use in `require()`. + @returns Resolved module path. Throws when the module can't be found. + + @example + ``` + import resolveFrom = require('resolve-from'); + + // There is a file at `./foo/bar.js` + + resolveFrom('foo', './bar'); + //=> '/Users/sindresorhus/dev/test/foo/bar.js' + ``` + */ + (fromDirectory: string, moduleId: string): string; + + /** + Resolve the path of a module like [`require.resolve()`](https://nodejs.org/api/globals.html#globals_require_resolve) but from a given path. + + @param fromDirectory - Directory to resolve from. + @param moduleId - What you would use in `require()`. + @returns Resolved module path or `undefined` when the module can't be found. + */ + silent(fromDirectory: string, moduleId: string): string | undefined; +}; + +export = resolveFrom; diff --git a/node_modules/resolve-from/index.js b/node_modules/resolve-from/index.js new file mode 100644 index 0000000..44f291c --- /dev/null +++ b/node_modules/resolve-from/index.js @@ -0,0 +1,47 @@ +'use strict'; +const path = require('path'); +const Module = require('module'); +const fs = require('fs'); + +const resolveFrom = (fromDirectory, moduleId, silent) => { + if (typeof fromDirectory !== 'string') { + throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof fromDirectory}\``); + } + + if (typeof moduleId !== 'string') { + throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof moduleId}\``); + } + + try { + fromDirectory = fs.realpathSync(fromDirectory); + } catch (error) { + if (error.code === 'ENOENT') { + fromDirectory = path.resolve(fromDirectory); + } else if (silent) { + return; + } else { + throw error; + } + } + + const fromFile = path.join(fromDirectory, 'noop.js'); + + const resolveFileName = () => Module._resolveFilename(moduleId, { + id: fromFile, + filename: fromFile, + paths: Module._nodeModulePaths(fromDirectory) + }); + + if (silent) { + try { + return resolveFileName(); + } catch (error) { + return; + } + } + + return resolveFileName(); +}; + +module.exports = (fromDirectory, moduleId) => resolveFrom(fromDirectory, moduleId); +module.exports.silent = (fromDirectory, moduleId) => resolveFrom(fromDirectory, moduleId, true); diff --git a/node_modules/resolve-from/license b/node_modules/resolve-from/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/resolve-from/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/resolve-from/package.json b/node_modules/resolve-from/package.json new file mode 100644 index 0000000..733df16 --- /dev/null +++ b/node_modules/resolve-from/package.json @@ -0,0 +1,36 @@ +{ + "name": "resolve-from", + "version": "5.0.0", + "description": "Resolve the path of a module like `require.resolve()` but from a given path", + "license": "MIT", + "repository": "sindresorhus/resolve-from", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "require", + "resolve", + "path", + "module", + "from", + "like", + "import" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/node_modules/resolve-from/readme.md b/node_modules/resolve-from/readme.md new file mode 100644 index 0000000..fd4f46f --- /dev/null +++ b/node_modules/resolve-from/readme.md @@ -0,0 +1,72 @@ +# resolve-from [![Build Status](https://travis-ci.org/sindresorhus/resolve-from.svg?branch=master)](https://travis-ci.org/sindresorhus/resolve-from) + +> Resolve the path of a module like [`require.resolve()`](https://nodejs.org/api/globals.html#globals_require_resolve) but from a given path + + +## Install + +``` +$ npm install resolve-from +``` + + +## Usage + +```js +const resolveFrom = require('resolve-from'); + +// There is a file at `./foo/bar.js` + +resolveFrom('foo', './bar'); +//=> '/Users/sindresorhus/dev/test/foo/bar.js' +``` + + +## API + +### resolveFrom(fromDirectory, moduleId) + +Like `require()`, throws when the module can't be found. + +### resolveFrom.silent(fromDirectory, moduleId) + +Returns `undefined` instead of throwing when the module can't be found. + +#### fromDirectory + +Type: `string` + +Directory to resolve from. + +#### moduleId + +Type: `string` + +What you would use in `require()`. + + +## Tip + +Create a partial using a bound function if you want to resolve from the same `fromDirectory` multiple times: + +```js +const resolveFromFoo = resolveFrom.bind(null, 'foo'); + +resolveFromFoo('./bar'); +resolveFromFoo('./baz'); +``` + + +## Related + +- [resolve-cwd](https://github.com/sindresorhus/resolve-cwd) - Resolve the path of a module from the current working directory +- [import-from](https://github.com/sindresorhus/import-from) - Import a module from a given path +- [import-cwd](https://github.com/sindresorhus/import-cwd) - Import a module from the current working directory +- [resolve-pkg](https://github.com/sindresorhus/resolve-pkg) - Resolve the path of a package regardless of it having an entry point +- [import-lazy](https://github.com/sindresorhus/import-lazy) - Import a module lazily +- [resolve-global](https://github.com/sindresorhus/resolve-global) - Resolve the path of a globally installed module + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/rollup/LICENSE.md b/node_modules/rollup/LICENSE.md new file mode 100644 index 0000000..04595b6 --- /dev/null +++ b/node_modules/rollup/LICENSE.md @@ -0,0 +1,681 @@ +# Rollup core license +Rollup is released under the MIT license: + +The MIT License (MIT) + +Copyright (c) 2017 [these people](https://github.com/rollup/rollup/graphs/contributors) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +# Licenses of bundled dependencies +The published Rollup artifact additionally contains code with the following licenses: +MIT, ISC, 0BSD + +# Bundled dependencies: +## @jridgewell/sourcemap-codec +License: MIT +By: Rich Harris +Repository: git+https://github.com/jridgewell/sourcemap-codec.git + +> The MIT License +> +> Copyright (c) 2015 Rich Harris +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## @rollup/pluginutils +License: MIT +By: Rich Harris +Repository: rollup/plugins + +> The MIT License (MIT) +> +> Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## anymatch +License: ISC +By: Elan Shanker +Repository: https://github.com/micromatch/anymatch + +> The ISC License +> +> Copyright (c) 2019 Elan Shanker, Paul Miller (https://paulmillr.com) +> +> Permission to use, copy, modify, and/or distribute this software for any +> purpose with or without fee is hereby granted, provided that the above +> copyright notice and this permission notice appear in all copies. +> +> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +--------------------------------------- + +## binary-extensions +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/binary-extensions + +> MIT License +> +> Copyright (c) Sindre Sorhus (https://sindresorhus.com) +> Copyright (c) Paul Miller (https://paulmillr.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## braces +License: MIT +By: Jon Schlinkert, Brian Woodward, Elan Shanker, Eugene Sharygin, hemanth.hm +Repository: micromatch/braces + +> The MIT License (MIT) +> +> Copyright (c) 2014-present, Jon Schlinkert. +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## builtin-modules +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/builtin-modules + +> MIT License +> +> Copyright (c) Sindre Sorhus (https://sindresorhus.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## chokidar +License: MIT +By: Paul Miller, Elan Shanker +Repository: git+https://github.com/paulmillr/chokidar.git + +> The MIT License (MIT) +> +> Copyright (c) 2012-2019 Paul Miller (https://paulmillr.com), Elan Shanker +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the “Software”), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## date-time +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/date-time + +> MIT License +> +> Copyright (c) Sindre Sorhus (https://sindresorhus.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## fill-range +License: MIT +By: Jon Schlinkert, Edo Rivai, Paul Miller, Rouven Weßling +Repository: jonschlinkert/fill-range + +> The MIT License (MIT) +> +> Copyright (c) 2014-present, Jon Schlinkert. +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## flru +License: MIT +By: Luke Edwards +Repository: lukeed/flru + +> MIT License +> +> Copyright (c) Luke Edwards (lukeed.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## glob-parent +License: ISC +By: Gulp Team, Elan Shanker, Blaine Bublitz +Repository: gulpjs/glob-parent + +> The ISC License +> +> Copyright (c) 2015, 2019 Elan Shanker +> +> Permission to use, copy, modify, and/or distribute this software for any +> purpose with or without fee is hereby granted, provided that the above +> copyright notice and this permission notice appear in all copies. +> +> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +--------------------------------------- + +## is-binary-path +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/is-binary-path + +> MIT License +> +> Copyright (c) 2019 Sindre Sorhus (https://sindresorhus.com), Paul Miller (https://paulmillr.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## is-extglob +License: MIT +By: Jon Schlinkert +Repository: jonschlinkert/is-extglob + +> The MIT License (MIT) +> +> Copyright (c) 2014-2016, Jon Schlinkert +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## is-glob +License: MIT +By: Jon Schlinkert, Brian Woodward, Daniel Perez +Repository: micromatch/is-glob + +> The MIT License (MIT) +> +> Copyright (c) 2014-2017, Jon Schlinkert. +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## is-number +License: MIT +By: Jon Schlinkert, Olsten Larck, Rouven Weßling +Repository: jonschlinkert/is-number + +> The MIT License (MIT) +> +> Copyright (c) 2014-present, Jon Schlinkert. +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## is-reference +License: MIT +By: Rich Harris +Repository: git+https://github.com/Rich-Harris/is-reference.git + +--------------------------------------- + +## locate-character +License: MIT +By: Rich Harris +Repository: git+https://gitlab.com/Rich-Harris/locate-character.git + +--------------------------------------- + +## magic-string +License: MIT +By: Rich Harris +Repository: https://github.com/rich-harris/magic-string + +> Copyright 2018 Rich Harris +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## normalize-path +License: MIT +By: Jon Schlinkert, Blaine Bublitz +Repository: jonschlinkert/normalize-path + +> The MIT License (MIT) +> +> Copyright (c) 2014-2018, Jon Schlinkert. +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## parse-ms +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/parse-ms + +> MIT License +> +> Copyright (c) Sindre Sorhus (https://sindresorhus.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## picocolors +License: ISC +By: Alexey Raspopov +Repository: alexeyraspopov/picocolors + +> ISC License +> +> Copyright (c) 2021-2024 Oleksii Raspopov, Kostiantyn Denysov, Anton Verinov +> +> Permission to use, copy, modify, and/or distribute this software for any +> purpose with or without fee is hereby granted, provided that the above +> copyright notice and this permission notice appear in all copies. +> +> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +> OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +--------------------------------------- + +## picomatch +License: MIT +By: Jon Schlinkert +Repository: micromatch/picomatch + +> The MIT License (MIT) +> +> Copyright (c) 2017-present, Jon Schlinkert. +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## pretty-bytes +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/pretty-bytes + +> MIT License +> +> Copyright (c) Sindre Sorhus (https://sindresorhus.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## pretty-ms +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/pretty-ms + +> MIT License +> +> Copyright (c) Sindre Sorhus (https://sindresorhus.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## readdirp +License: MIT +By: Thorsten Lorenz, Paul Miller +Repository: git://github.com/paulmillr/readdirp.git + +> MIT License +> +> Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. + +--------------------------------------- + +## signal-exit +License: ISC +By: Ben Coe +Repository: https://github.com/tapjs/signal-exit.git + +> The ISC License +> +> Copyright (c) 2015-2023 Benjamin Coe, Isaac Z. Schlueter, and Contributors +> +> Permission to use, copy, modify, and/or distribute this software +> for any purpose with or without fee is hereby granted, provided +> that the above copyright notice and this permission notice +> appear in all copies. +> +> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +> OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +> LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +> OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +> WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +> ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +--------------------------------------- + +## time-zone +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/time-zone + +> MIT License +> +> Copyright (c) Sindre Sorhus (https://sindresorhus.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## to-regex-range +License: MIT +By: Jon Schlinkert, Rouven Weßling +Repository: micromatch/to-regex-range + +> The MIT License (MIT) +> +> Copyright (c) 2015-present, Jon Schlinkert. +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## tslib +License: 0BSD +By: Microsoft Corp. +Repository: https://github.com/Microsoft/tslib.git + +> Copyright (c) Microsoft Corporation. +> +> Permission to use, copy, modify, and/or distribute this software for any +> purpose with or without fee is hereby granted. +> +> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +> REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +> AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +> INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +> LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +> OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +> PERFORMANCE OF THIS SOFTWARE. + +--------------------------------------- + +## yargs-parser +License: ISC +By: Ben Coe +Repository: https://github.com/yargs/yargs-parser.git + +> Copyright (c) 2016, Contributors +> +> Permission to use, copy, modify, and/or distribute this software +> for any purpose with or without fee is hereby granted, provided +> that the above copyright notice and this permission notice +> appear in all copies. +> +> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +> OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +> LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +> OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +> WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +> ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/rollup/README.md b/node_modules/rollup/README.md new file mode 100644 index 0000000..a1b6b9e --- /dev/null +++ b/node_modules/rollup/README.md @@ -0,0 +1,134 @@ +

+ +

+ +

+ + npm version + + + node compatibility + + + install size + + + code coverage + + + backers + + + sponsors + + + license + + + Join the chat at https://is.gd/rollup_chat + +

+ +

Rollup

+ +## Overview + +Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library or application. It uses the standardized ES module format for code, instead of previous idiosyncratic solutions such as CommonJS and AMD. ES modules let you freely and seamlessly combine the most useful individual functions from your favorite libraries. Rollup can optimize ES modules for faster native loading in modern browsers, or output a legacy module format allowing ES module workflows today. + +## Quick Start Guide + +Install with `npm install --global rollup`. Rollup can be used either through a [command line interface](https://rollupjs.org/command-line-interface/) with an optional configuration file or else through its [JavaScript API](https://rollupjs.org/javascript-api/). Run `rollup --help` to see the available options and parameters. The starter project templates, [rollup-starter-lib](https://github.com/rollup/rollup-starter-lib) and [rollup-starter-app](https://github.com/rollup/rollup-starter-app), demonstrate common configuration options, and more detailed instructions are available throughout the [user guide](https://rollupjs.org/introduction/). + +### Commands + +These commands assume the entry point to your application is named main.js, and that you'd like all imports compiled into a single file named bundle.js. + +For browsers: + +```bash +# compile to a + +
{JSON.stringify($location)}
+``` + +# 1.7.0 + +- Added Code of Conduct. +- Optimized the codebase. +- Update the dependencies. +- PR merged [#220](https://github.com/EmilTholin/svelte-routing/pull/220). +- PR merged [#210](https://github.com/EmilTholin/svelte-routing/pull/210). +- PR merged [#206](https://github.com/EmilTholin/svelte-routing/pull/206). +- PR merged [#192](https://github.com/EmilTholin/svelte-routing/pull/193). +- PR merged [#188](https://github.com/EmilTholin/svelte-routing/pull/188). +- PR merged [#175](https://github.com/EmilTholin/svelte-routing/pull/175). +- PR merged [#173](https://github.com/EmilTholin/svelte-routing/pull/173). +- PR merged [#158](https://github.com/EmilTholin/svelte-routing/pull/158). +- PR merged [#105](https://github.com/EmilTholin/svelte-routing/pull/105). +- PR merged [#95](https://github.com/EmilTholin/svelte-routing/pull/95). +- PR merged [#85](https://github.com/EmilTholin/svelte-routing/pull/85). +- PR merged [#77](https://github.com/EmilTholin/svelte-routing/pull/77). +- PR/Issue [#200](https://github.com/EmilTholin/svelte-routing/pull/200), + Tested & it's not relevant/exists. +- Issue fixed [#122](https://github.com/EmilTholin/svelte-routing/issues/122), + [#4652](https://github.com/sveltejs/svelte/issues/4652). + +# 1.6.0 + +Added TypeScript support. + +# 1.4.0 + +Added functionality for passing the `location` to the rendered Route `component` +and slot. + +```html + + + + + + +

Blog

+

{queryParams.foo}

+ + + +

Blog

+

{location.search}

+
+``` + +# 1.3.0 + +Added functionality to pass potential `Route` path parameters back to the parent +using props, so they can be exposed to the slot template using `let:params`. + +```html + + + +``` + +# 1.2.0 + +Added functionality for passing all the extra `Route` properties to the rendered +`component`. + +```html + + + + + + +

{foo} {bar}

+``` + +# 1.1.0 + +Added the ability to give `Route` path wildcards a custom name. + +```html + + + + + + +

{wildcardName}

+``` + +# 1.0.0 + +- Moved to Svelte 3. +- It's now required for all `Route` and `Link` components to have a `Router` + ancestor. +- `NavLink` was removed in favour for a more versatile `Link` component. Check + the userland `NavLink` component in the `example` directory for an example. +- The SSR component no longer needs to be compiled at runtime with the help of + [esm](https://github.com/standard-things/esm) as there is no longer a + dependency on the `history` library. You can compile a separate CJS bundle + for the server and pass in a prop to the topmost component and use that as + the `url` property for the `Router`, which will force the URL for all + descendants. +- All component filename extensions have been changed to `.svelte`. +- Hash routing is no longer supported. +- The entire API of the library is now exported from the `src/index.js` file, + so importing from the library is now much more pleasant. + +```javascript +import { Router, Route, Link } from "svelte-routing"; +``` + +# 0.4.0 + +Moved to Svelte v2 and added the new +[link](https://github.com/EmilTholin/svelte-routing#linkjs) and +[links](https://github.com/EmilTholin/svelte-routing#linksjs) actions. + +# 0.3.0 + +Split the `createHistory` function into `createBrowserHistory`, +`createMemoryHistory`, `createHashHistory` to allow for better tree shaking of +unused history creation code. + +# 0.2.0 + +Added the ability to access the match object in a matched route: + +```html + + +

{{match && match.params.myParam}}

+
+``` + +or: + +```html + + + + +

{{match.params.myParam}}

+``` + +# 0.1.0 + +Added the ability to give a component constructor to a route with the +`component` property: + +```html + + +``` diff --git a/node_modules/svelte-routing/CODE_OF_CONDUCT.md b/node_modules/svelte-routing/CODE_OF_CONDUCT.md new file mode 100755 index 0000000..633952e --- /dev/null +++ b/node_modules/svelte-routing/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +- Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +- The use of sexualized language or imagery, and sexual attention or advances + of any kind +- Trolling, insulting or derogatory comments, and personal or political + attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, + without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at . All +complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. diff --git a/node_modules/svelte-routing/LICENSE b/node_modules/svelte-routing/LICENSE new file mode 100755 index 0000000..807f9fd --- /dev/null +++ b/node_modules/svelte-routing/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2023 Krishna Torque + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/svelte-routing/README.md b/node_modules/svelte-routing/README.md new file mode 100755 index 0000000..3fa71cd --- /dev/null +++ b/node_modules/svelte-routing/README.md @@ -0,0 +1,234 @@ +[![npm][npm]][npm-url] + +# Svelte Routing + +A declarative Svelte routing library with SSR support. + +[[CHANGELOG][changelog-url]] + +## Install + +```bash +npm i -D svelte-routing +``` + +## Usage + +```html + + + + + +
+ + + + +
+
+``` + +```javascript +// main.js +import App from "./App.svelte"; + +const app = new App({ + target: document.getElementById("app"), +}); +``` + +## API + +#### `Router` + +The `Router` component supplies the `Link` and `Route` descendant components +with routing information through context, so you need at least one `Router` at +the top of your application. It assigns a score to all its `Route` descendants +and picks the best match to render. + +`Router` components can also be nested to allow for seamless merging of many +smaller apps. + +###### Properties + +| Property | Required | Default Value | Description | +| :--------------: | :------: | :-----------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `basepath` | | `"/"` | The `basepath` property will be added to all the `to` properties of `Link` descendants and to all `path` properties of `Route` descendants. This property can be ignored in most cases, but if you host your application on e.g. `https://example.com/my-site`, the `basepath` should be set to `/my-site`. | +| `url` | | `""` | The `url` property is used in SSR to force the current URL of the application and will be used by all `Link` and `Route` descendants. A falsy value will be ignored by the `Router`, so it's enough to declare `export let url = "";` for your topmost component and only give it a value in SSR. | +| `viewtransition` | | `null` | View Transition (Experimental) | + +#### `Link` + +A component used to navigate around the application. + +###### Properties + +| Property | Required | Default Value | Description | +| :--------------: | :------: | :-----------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `to` | ✔ ️ | `"#"` | URL the component should link to. | +| `replace` | | `false` | When `true`, clicking the `Link` will replace the current entry in the history stack instead of adding a new one. | +| `state` | | `{}` | An object that will be pushed to the history stack when the `Link` is clicked. | +| `getProps` | | `() => ({})` | A function that returns an object that will be spread on the underlying anchor element's attributes. The first argument given to the function is an object with the properties `location`, `href`, `isPartiallyCurrent`, `isCurrent`. | +| `preserveScroll` | | `false` | When `true`, clicking the `Link` will not scroll the page to the top. | + +#### `Route` + +A component that will render its `component` property or children when its +ancestor `Router` component decides it is the best match. + +All properties other than `path` and `component` given to the `Route` will be +passed to the rendered `component`. + +Potential path parameters will be passed to the rendered `component` as +properties. A wildcard `*` can be given a name with `*wildcardName` to pass the +wildcard string as the `wildcardName` property instead of as the `*` property. + +Potential path parameters are passed back to the parent using props, so they can +be exposed to the slot template using `let:params`. + +```html + + + +``` + +The active status of link can be exposed to the slot template using +`let:active`. + +```html + + Browser + +``` + +###### Properties + +| Property | Required | Default Value | Description | +| :---------: | :------: | :------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `path` | | `""` | The path for when this component should be rendered. If no `path` is given the `Route` will act as the default that matches if no other `Route` in the `Router` matches. | +| `component` | | `null` | The component constructor that will be used for rendering when the `Route` matches. If `component` is not set, the children of `Route` will be rendered instead. | + +#### `navigate` + +A function that allows you to imperatively navigate around the application for +those use cases where a `Link` component is not suitable, e.g. after submitting +a form. + +The first argument is a string denoting where to navigate to, and the second +argument is an object with a `replace`, `state` and `preserveScroll` properties equivalent to those +in the `Link` component. + +```html + +``` + +#### `link` + +An action used on anchor tags to navigate around the application. You can add an +attribute `replace` to replace the current entry in the history stack instead of +adding a new one and `preserveScroll` to not scroll the page to the top when clicked. + +```html + + + + Home + Replace this URL + + +``` + +#### `links` + +An action used on a root element to make all relative anchor elements navigate +around the application. You can add an attribute `replace` on any anchor to +replace the current entry in the history stack instead of adding a new one. +You can add an attribute `preserveScroll` on any anchor to not to scroll the page to the top when clicked. You +can add an attribute `noroute` for this action to skip over the anchor and allow +it to use the native browser action. + +```html + + + + +``` + +#### `viewtransition` + +Viewtransition for navigation (Experimental). + +_`builtin transition`_ + +```html + + + + + + +``` + +_`custom transition`_ + +```html + + + + + + +``` + +# License + +This project is licensed under the [**MIT**](LICENSE). + +# Contribution + +Unless you explicitly state otherwise, any contribution intentionally submitted +for this project by you, shall be licensed as **MIT**, without any additional +terms or conditions. [**Code of Conduct**](CODE_OF_CONDUCT.md). + +[npm]: https://img.shields.io/npm/v/svelte-routing.svg +[npm-url]: https://npmjs.com/package/svelte-routing +[changelog-url]: https://github.com/EmilTholin/svelte-routing/blob/master/CHANGELOG.md diff --git a/node_modules/svelte-routing/package.json b/node_modules/svelte-routing/package.json new file mode 100755 index 0000000..5e60471 --- /dev/null +++ b/node_modules/svelte-routing/package.json @@ -0,0 +1,34 @@ +{ + "name": "svelte-routing", + "version": "2.13.0", + "author": "Emil Tholin @EmilTholin", + "license": "MIT", + "description": "A declarative Svelte routing library with SSR support", + "keywords": [ + "svelte routing", + "svelte", + "sveltejs", + "route", + "router", + "routing", + "svelte route", + "svelte router", + "typescript" + ], + "repository": "EmilTholin/svelte-routing", + "main": "./src/index.js", + "types": "./types/index.d.ts", + "svelte": "./src/index.js", + "exports": { + ".": { + "main": "./src/index.js", + "types": "./types/index.d.ts", + "svelte": "./src/index.js" + } + }, + "devDependencies": { + "svelte": "^4.2.15", + "prettier": "^3.2.5", + "prettier-plugin-svelte": "^3.2.3" + } +} diff --git a/node_modules/svelte-routing/src/Link.svelte b/node_modules/svelte-routing/src/Link.svelte new file mode 100755 index 0000000..fd072bd --- /dev/null +++ b/node_modules/svelte-routing/src/Link.svelte @@ -0,0 +1,50 @@ + + + + + diff --git a/node_modules/svelte-routing/src/Route.svelte b/node_modules/svelte-routing/src/Route.svelte new file mode 100755 index 0000000..8ce1e47 --- /dev/null +++ b/node_modules/svelte-routing/src/Route.svelte @@ -0,0 +1,54 @@ + + +{#if $activeRoute && $activeRoute.route === route} + {#if component} + {#await component then resolvedComponent} + + {/await} + {:else} + + {/if} +{/if} diff --git a/node_modules/svelte-routing/src/Router.svelte b/node_modules/svelte-routing/src/Router.svelte new file mode 100755 index 0000000..b47262b --- /dev/null +++ b/node_modules/svelte-routing/src/Router.svelte @@ -0,0 +1,145 @@ + + +{#if viewtransition} + {#key $location.pathname} +
+ +
+ {/key} +{:else} + +{/if} diff --git a/node_modules/svelte-routing/src/actions.js b/node_modules/svelte-routing/src/actions.js new file mode 100755 index 0000000..cb351bd --- /dev/null +++ b/node_modules/svelte-routing/src/actions.js @@ -0,0 +1,87 @@ +import { navigate } from "./history.js"; +import { hostMatches, shouldNavigate } from "./utils.js"; + +/** + * A link action that can be added to tags rather + * than using the component. + * + * Example: + * ```html + * {post.title} + * ``` + */ +const link = (node) => { + const onClick = (event) => { + const anchor = event.currentTarget; + + if ( + (anchor.target === "" || anchor.target === "_self") && + hostMatches(anchor) && + shouldNavigate(event) + ) { + event.preventDefault(); + navigate(anchor.pathname + anchor.search, { + replace: anchor.hasAttribute("replace"), + preserveScroll: anchor.hasAttribute("preserveScroll"), + }); + } + }; + + node.addEventListener("click", onClick); + + return { + destroy() { + node.removeEventListener("click", onClick); + }, + }; +}; +/** + * An action to be added at a root element of your application to + * capture all relative links and push them onto the history stack. + * + * Example: + * ```html + *
+ * + * + * + * {#each projects as project} + * {project.title} + * {/each} + * + *
+ * ``` + */ +const links = (node) => { + const findClosest = (tagName, el) => { + while (el && el.tagName !== tagName) el = el.parentNode; + return el; + }; + + const onClick = (event) => { + const anchor = findClosest("A", event.target); + if ( + anchor && + (anchor.target === "" || anchor.target === "_self") && + hostMatches(anchor) && + shouldNavigate(event) && + !anchor.hasAttribute("noroute") + ) { + event.preventDefault(); + navigate(anchor.pathname + anchor.search, { + replace: anchor.hasAttribute("replace"), + preserveScroll: anchor.hasAttribute("preserveScroll"), + }); + } + }; + + node.addEventListener("click", onClick); + + return { + destroy() { + node.removeEventListener("click", onClick); + }, + }; +}; + +export { link, links }; diff --git a/node_modules/svelte-routing/src/contexts.js b/node_modules/svelte-routing/src/contexts.js new file mode 100755 index 0000000..5647251 --- /dev/null +++ b/node_modules/svelte-routing/src/contexts.js @@ -0,0 +1,9 @@ +import { getContext } from "svelte"; + +export const LOCATION = {}; +export const ROUTER = {}; +export const HISTORY = {}; + +export const useLocation = () => getContext(LOCATION); +export const useRouter = () => getContext(ROUTER); +export const useHistory = () => getContext(HISTORY); diff --git a/node_modules/svelte-routing/src/history.js b/node_modules/svelte-routing/src/history.js new file mode 100755 index 0000000..83ad2ad --- /dev/null +++ b/node_modules/svelte-routing/src/history.js @@ -0,0 +1,100 @@ +/** + * Adapted from https://github.com/reach/router/blob/b60e6dd781d5d3a4bdaaf4de665649c0f6a7e78d/src/lib/history.js + * https://github.com/reach/router/blob/master/LICENSE + */ +import { canUseDOM } from "./utils"; + +const getLocation = (source) => { + return { + ...source.location, + state: source.history.state, + key: (source.history.state && source.history.state.key) || "initial", + }; +}; +const createHistory = (source) => { + const listeners = []; + let location = getLocation(source); + + return { + get location() { + return location; + }, + + listen(listener) { + listeners.push(listener); + + const popstateListener = () => { + location = getLocation(source); + listener({ location, action: "POP" }); + }; + + source.addEventListener("popstate", popstateListener); + + return () => { + source.removeEventListener("popstate", popstateListener); + const index = listeners.indexOf(listener); + listeners.splice(index, 1); + }; + }, + + navigate(to, { state, replace = false, preserveScroll = false, blurActiveElement = true } = {}) { + state = { ...state, key: Date.now() + "" }; + // try...catch iOS Safari limits to 100 pushState calls + try { + if (replace) source.history.replaceState(state, "", to); + else source.history.pushState(state, "", to); + } catch (e) { + source.location[replace ? "replace" : "assign"](to); + } + location = getLocation(source); + listeners.forEach((listener) => + listener({ location, action: "PUSH", preserveScroll }) + ); + if(blurActiveElement) document.activeElement.blur(); + }, + }; +}; +// Stores history entries in memory for testing or other platforms like Native +const createMemorySource = (initialPathname = "/") => { + let index = 0; + const stack = [{ pathname: initialPathname, search: "" }]; + const states = []; + + return { + get location() { + return stack[index]; + }, + addEventListener(name, fn) {}, + removeEventListener(name, fn) {}, + history: { + get entries() { + return stack; + }, + get index() { + return index; + }, + get state() { + return states[index]; + }, + pushState(state, _, uri) { + const [pathname, search = ""] = uri.split("?"); + index++; + stack.push({ pathname, search }); + states.push(state); + }, + replaceState(state, _, uri) { + const [pathname, search = ""] = uri.split("?"); + stack[index] = { pathname, search }; + states[index] = state; + }, + }, + }; +}; +// Global history uses window.history as the source if available, +// otherwise a memory history +const globalHistory = createHistory( + canUseDOM() ? window : createMemorySource() +); +const { navigate } = globalHistory; + +export { globalHistory, navigate, createHistory, createMemorySource }; diff --git a/node_modules/svelte-routing/src/index.js b/node_modules/svelte-routing/src/index.js new file mode 100755 index 0000000..73c7c76 --- /dev/null +++ b/node_modules/svelte-routing/src/index.js @@ -0,0 +1,6 @@ +export { default as Link } from "./Link.svelte"; +export { default as Route } from "./Route.svelte"; +export { default as Router } from "./Router.svelte"; +export { link, links } from "./actions.js"; +export * from "./contexts.js"; +export { navigate } from "./history.js"; diff --git a/node_modules/svelte-routing/src/utils.js b/node_modules/svelte-routing/src/utils.js new file mode 100755 index 0000000..cc39c6b --- /dev/null +++ b/node_modules/svelte-routing/src/utils.js @@ -0,0 +1,278 @@ +/** + * Adapted from https://github.com/reach/router/blob/b60e6dd781d5d3a4bdaaf4de665649c0f6a7e78d/src/lib/utils.js + * https://github.com/reach/router/blob/master/LICENSE + */ + +const PARAM = /^:(.+)/; +const SEGMENT_POINTS = 4; +const STATIC_POINTS = 3; +const DYNAMIC_POINTS = 2; +const SPLAT_PENALTY = 1; +const ROOT_POINTS = 1; + +/** + * Split up the URI into segments delimited by `/` + * Strip starting/ending `/` + * @param {string} uri + * @return {string[]} + */ +const segmentize = (uri) => uri.replace(/(^\/+|\/+$)/g, "").split("/"); +/** + * Strip `str` of potential start and end `/` + * @param {string} string + * @return {string} + */ +const stripSlashes = (string) => string.replace(/(^\/+|\/+$)/g, ""); +/** + * Score a route depending on how its individual segments look + * @param {object} route + * @param {number} index + * @return {object} + */ +const rankRoute = (route, index) => { + const score = route.default + ? 0 + : segmentize(route.path).reduce((score, segment) => { + score += SEGMENT_POINTS; + + if (segment === "") { + score += ROOT_POINTS; + } else if (PARAM.test(segment)) { + score += DYNAMIC_POINTS; + } else if (segment[0] === "*") { + score -= SEGMENT_POINTS + SPLAT_PENALTY; + } else { + score += STATIC_POINTS; + } + + return score; + }, 0); + + return { route, score, index }; +}; +/** + * Give a score to all routes and sort them on that + * If two routes have the exact same score, we go by index instead + * @param {object[]} routes + * @return {object[]} + */ +const rankRoutes = (routes) => + routes + .map(rankRoute) + .sort((a, b) => + a.score < b.score ? 1 : a.score > b.score ? -1 : a.index - b.index + ); +/** + * Ranks and picks the best route to match. Each segment gets the highest + * amount of points, then the type of segment gets an additional amount of + * points where + * + * static > dynamic > splat > root + * + * This way we don't have to worry about the order of our routes, let the + * computers do it. + * + * A route looks like this + * + * { path, default, value } + * + * And a returned match looks like: + * + * { route, params, uri } + * + * @param {object[]} routes + * @param {string} uri + * @return {?object} + */ +const pick = (routes, uri) => { + let match; + let default_; + + const [uriPathname] = uri.split("?"); + const uriSegments = segmentize(uriPathname); + const isRootUri = uriSegments[0] === ""; + const ranked = rankRoutes(routes); + + for (let i = 0, l = ranked.length; i < l; i++) { + const route = ranked[i].route; + let missed = false; + + if (route.default) { + default_ = { + route, + params: {}, + uri, + }; + continue; + } + + const routeSegments = segmentize(route.path); + const params = {}; + const max = Math.max(uriSegments.length, routeSegments.length); + let index = 0; + + for (; index < max; index++) { + const routeSegment = routeSegments[index]; + const uriSegment = uriSegments[index]; + + if (routeSegment && routeSegment[0] === "*") { + // Hit a splat, just grab the rest, and return a match + // uri: /files/documents/work + // route: /files/* or /files/*splatname + const splatName = + routeSegment === "*" ? "*" : routeSegment.slice(1); + + params[splatName] = uriSegments + .slice(index) + .map(decodeURIComponent) + .join("/"); + break; + } + + if (typeof uriSegment === "undefined") { + // URI is shorter than the route, no match + // uri: /users + // route: /users/:userId + missed = true; + break; + } + + const dynamicMatch = PARAM.exec(routeSegment); + + if (dynamicMatch && !isRootUri) { + const value = decodeURIComponent(uriSegment); + params[dynamicMatch[1]] = value; + } else if (routeSegment !== uriSegment) { + // Current segments don't match, not dynamic, not splat, so no match + // uri: /users/123/settings + // route: /users/:id/profile + missed = true; + break; + } + } + + if (!missed) { + match = { + route, + params, + uri: "/" + uriSegments.slice(0, index).join("/"), + }; + break; + } + } + + return match || default_ || null; +}; +/** + * Add the query to the pathname if a query is given + * @param {string} pathname + * @param {string} [query] + * @return {string} + */ +const addQuery = (pathname, query) => pathname + (query ? `?${query}` : ""); +/** + * Resolve URIs as though every path is a directory, no files. Relative URIs + * in the browser can feel awkward because not only can you be "in a directory", + * you can be "at a file", too. For example: + * + * browserSpecResolve('foo', '/bar/') => /bar/foo + * browserSpecResolve('foo', '/bar') => /foo + * + * But on the command line of a file system, it's not as complicated. You can't + * `cd` from a file, only directories. This way, links have to know less about + * their current path. To go deeper you can do this: + * + * + * // instead of + * + * + * Just like `cd`, if you want to go deeper from the command line, you do this: + * + * cd deeper + * # not + * cd $(pwd)/deeper + * + * By treating every path as a directory, linking to relative paths should + * require less contextual information and (fingers crossed) be more intuitive. + * @param {string} to + * @param {string} base + * @return {string} + */ +const resolve = (to, base) => { + // /foo/bar, /baz/qux => /foo/bar + if (to.startsWith("/")) return to; + + const [toPathname, toQuery] = to.split("?"); + const [basePathname] = base.split("?"); + const toSegments = segmentize(toPathname); + const baseSegments = segmentize(basePathname); + + // ?a=b, /users?b=c => /users?a=b + if (toSegments[0] === "") return addQuery(basePathname, toQuery); + + // profile, /users/789 => /users/789/profile + + if (!toSegments[0].startsWith(".")) { + const pathname = baseSegments.concat(toSegments).join("/"); + return addQuery((basePathname === "/" ? "" : "/") + pathname, toQuery); + } + + // ./ , /users/123 => /users/123 + // ../ , /users/123 => /users + // ../.. , /users/123 => / + // ../../one, /a/b/c/d => /a/b/one + // .././one , /a/b/c/d => /a/b/c/one + const allSegments = baseSegments.concat(toSegments); + const segments = []; + + allSegments.forEach((segment) => { + if (segment === "..") segments.pop(); + else if (segment !== ".") segments.push(segment); + }); + + return addQuery("/" + segments.join("/"), toQuery); +}; +/** + * Combines the `basepath` and the `path` into one path. + * @param {string} basepath + * @param {string} path + */ +const combinePaths = (basepath, path) => + `${stripSlashes( + path === "/" + ? basepath + : `${stripSlashes(basepath)}/${stripSlashes(path)}` + )}/`; +/** + * Decides whether a given `event` should result in a navigation or not. + * @param {object} event + */ +const shouldNavigate = (event) => + !event.defaultPrevented && + event.button === 0 && + !(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey); + +// svelte seems to kill anchor.host value in ie11, so fall back to checking href +const hostMatches = (anchor) => { + const host = location.host; + return ( + anchor.host === host || + anchor.href.indexOf(`https://${host}`) === 0 || + anchor.href.indexOf(`http://${host}`) === 0 + ); +}; + +const canUseDOM = () => + typeof window !== "undefined" && + "document" in window && + "location" in window; + +export { + stripSlashes, + pick, + resolve, + combinePaths, + shouldNavigate, + hostMatches, + canUseDOM, +}; diff --git a/node_modules/svelte-routing/types/Link.d.ts b/node_modules/svelte-routing/types/Link.d.ts new file mode 100755 index 0000000..19bce0c --- /dev/null +++ b/node_modules/svelte-routing/types/Link.d.ts @@ -0,0 +1,24 @@ +import { SvelteComponent } from "svelte"; +import { HTMLAnchorAttributes } from "svelte/elements"; +import { RouteLocation } from "./Route"; + +type LinkProps = { + to: string; + replace?: boolean; + preserveScroll?: boolean; + state?: { + [k in string | number]: unknown; + }; + getProps?: (linkParams: GetPropsParams) => Record; +}; + +type GetPropsParams = { + location: RouteLocation; + href: string; + isPartiallyCurrent: boolean; + isCurrent: boolean; +}; + +export class Link extends SvelteComponent< + Omit +> {} diff --git a/node_modules/svelte-routing/types/Route.d.ts b/node_modules/svelte-routing/types/Route.d.ts new file mode 100755 index 0000000..d464a89 --- /dev/null +++ b/node_modules/svelte-routing/types/Route.d.ts @@ -0,0 +1,37 @@ +import { SvelteComponent } from "svelte"; + +type AsyncSvelteComponent = () => Promise<{ + default: typeof SvelteComponent; +}>; + +type RouteProps = { + path?: string; + component?: typeof SvelteComponent | AsyncSvelteComponent; + [additionalProp: string]: unknown; +}; + +type RouteSlots = { + default: { + location: RouteLocation; + params: RouteParams; + }; +}; + +type RouteLocation = { + pathname: string; + search: string; + hash?: string; + state: { + [k in string | number]: unknown; + }; +}; + +type RouteParams = { + [param: string]: string; +}; + +export class Route extends SvelteComponent< + RouteProps, + Record, + RouteSlots +> {} diff --git a/node_modules/svelte-routing/types/Router.d.ts b/node_modules/svelte-routing/types/Router.d.ts new file mode 100755 index 0000000..43a144c --- /dev/null +++ b/node_modules/svelte-routing/types/Router.d.ts @@ -0,0 +1,20 @@ +import { SvelteComponent } from "svelte"; + +type Viewtransition = { + fn?: any; + delay?: number; + duration?: number; + x?: number; + y?: number; + opacity?: number; + easing?: any; + css?: (t: number) => string; +}; + +type RouterProps = { + basepath?: string; + url?: string; + viewtransition?: (direction?: string) => Viewtransition; +}; + +export class Router extends SvelteComponent {} diff --git a/node_modules/svelte-routing/types/RouterContext.d.ts b/node_modules/svelte-routing/types/RouterContext.d.ts new file mode 100644 index 0000000..25d21d5 --- /dev/null +++ b/node_modules/svelte-routing/types/RouterContext.d.ts @@ -0,0 +1,26 @@ +import { readable } from "svelte/store"; + +type RouteConfig = { + path: string; + default: boolean; +} + +type ActiveRoute = { + params: { [key: string]: string }; + preserveScroll: boolean; + route: RouteConfig; + uri: string; +} + +type RouterBase = { + path: string; + uri: string; +} + +export type RouterContext = { + activeRoute: ReturnType>; + base: ReturnType>; + routerBase: ReturnType>; + registerRoute: (route: Omit) => {}; + unregisterRouter: () => {} +} \ No newline at end of file diff --git a/node_modules/svelte-routing/types/actions.d.ts b/node_modules/svelte-routing/types/actions.d.ts new file mode 100755 index 0000000..3aa8903 --- /dev/null +++ b/node_modules/svelte-routing/types/actions.d.ts @@ -0,0 +1,2 @@ +export const link: (node: Element) => { destroy(): void }; +export const links: (node: Element) => { destroy(): void }; diff --git a/node_modules/svelte-routing/types/ambient.d.ts b/node_modules/svelte-routing/types/ambient.d.ts new file mode 100755 index 0000000..f6cca8e --- /dev/null +++ b/node_modules/svelte-routing/types/ambient.d.ts @@ -0,0 +1,38 @@ +declare module "svelte-routing/src/history" { + const getLocation: ( + source: typeof window + ) => Location & { state: any; key: string }; + + type Listener = (params: { + location: ReturnType; + action: "POP" | "PUSH"; + }) => void; + + export const createHistory: (source: typeof window) => { + readonly location: ReturnType; + listen: (listener: Listener) => () => void; + navigate: ( + to?: string | null, + options?: { replace: boolean; preserveScroll: boolean; state: any } + ) => void; + }; + + type StackItem = { pathname: string; search: string }; + + export const createMemorySource: (initialPathname?: string) => { + readonly location: StackItem; + // These functions seem to have no implimentation + // addEventListener: typeof window.addEventListener + // removeEventListener: typeof window.removeEventListener + history: { + readonly entries: StackItem[]; + readonly index: number; + readonly state: any; + pushState: (state: any, _: unknown, uri: string) => void; + replaceState: (state: any, _: unknown, uri: string) => void; + }; + }; + + export const globalHistory: ReturnType; + export const navigate: ReturnType["navigate"]; +} diff --git a/node_modules/svelte-routing/types/contexts.d.ts b/node_modules/svelte-routing/types/contexts.d.ts new file mode 100755 index 0000000..d6602ca --- /dev/null +++ b/node_modules/svelte-routing/types/contexts.d.ts @@ -0,0 +1,11 @@ +import { readable } from "svelte/store"; +import { RouteLocation } from "./Route"; +import { RouterContext } from "./RouterContext"; + +type LOCATION = RouteLocation; +type ROUTER = RouterContext; +type HISTORY = Record; + +export const useLocation: () => ReturnType>; +export const useRouter: () => ROUTER; +export const useHistory: () => ReturnType>; diff --git a/node_modules/svelte-routing/types/functions.d.ts b/node_modules/svelte-routing/types/functions.d.ts new file mode 100755 index 0000000..08f3a5e --- /dev/null +++ b/node_modules/svelte-routing/types/functions.d.ts @@ -0,0 +1,15 @@ +export const navigate: ( + to: string, + { + replace, + state, + preserveScroll, + }?: { + replace?: boolean; + state?: { + [k in string | number]: unknown; + }; + preserveScroll?: boolean; + blurActiveElement?: boolean; + } +) => void; diff --git a/node_modules/svelte-routing/types/index.d.ts b/node_modules/svelte-routing/types/index.d.ts new file mode 100755 index 0000000..3909c9d --- /dev/null +++ b/node_modules/svelte-routing/types/index.d.ts @@ -0,0 +1,8 @@ +/// + +export { Link } from "./Link"; +export { Route } from "./Route"; +export { Router } from "./Router"; +export { link, links } from "./actions"; +export * from "./contexts"; +export { navigate } from "./functions"; diff --git a/node_modules/svelte/LICENSE.md b/node_modules/svelte/LICENSE.md new file mode 100644 index 0000000..f872adf --- /dev/null +++ b/node_modules/svelte/LICENSE.md @@ -0,0 +1,7 @@ +Copyright (c) 2016-2025 [Svelte Contributors](https://github.com/sveltejs/svelte/graphs/contributors) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/svelte/README.md b/node_modules/svelte/README.md new file mode 100644 index 0000000..c37617d --- /dev/null +++ b/node_modules/svelte/README.md @@ -0,0 +1,41 @@ + + + + Svelte - web development for the rest of us + + + +[![npm version](https://img.shields.io/npm/v/svelte.svg)](https://www.npmjs.com/package/svelte) [![license](https://img.shields.io/npm/l/svelte.svg)](LICENSE.md) [![Chat](https://img.shields.io/discord/457912077277855764?label=chat&logo=discord)](https://svelte.dev/chat) + +## What is Svelte? + +Svelte is a new way to build web applications. It's a compiler that takes your declarative components and converts them into efficient JavaScript that surgically updates the DOM. + +Learn more at the [Svelte website](https://svelte.dev), or stop by the [Discord chatroom](https://svelte.dev/chat). + +## Getting started + +You can play around with Svelte in the [tutorial](https://svelte.dev/tutorial), [examples](https://svelte.dev/examples), and [REPL](https://svelte.dev/repl). + +When you're ready to build a full-fledge application, we recommend using [SvelteKit](https://svelte.dev/docs/kit): + +```bash +npx sv create my-app +cd my-app +npm install +npm run dev +``` + +See [the SvelteKit documentation](https://svelte.dev/docs/kit) to learn more. + +## Changelog + +[The Changelog for this package is available on GitHub](https://github.com/sveltejs/svelte/blob/master/packages/svelte/CHANGELOG.md). + +## Supporting Svelte + +Svelte is an MIT-licensed open source project with its ongoing development made possible entirely by fantastic volunteers. If you'd like to support their efforts, please consider: + +- [Becoming a backer on Open Collective](https://opencollective.com/svelte). + +Funds donated via Open Collective will be used for compensating expenses related to Svelte's development. diff --git a/node_modules/svelte/action.d.ts b/node_modules/svelte/action.d.ts new file mode 100644 index 0000000..a1a0ce5 --- /dev/null +++ b/node_modules/svelte/action.d.ts @@ -0,0 +1 @@ +import './types/index.js'; diff --git a/node_modules/svelte/animate.d.ts b/node_modules/svelte/animate.d.ts new file mode 100644 index 0000000..a1a0ce5 --- /dev/null +++ b/node_modules/svelte/animate.d.ts @@ -0,0 +1 @@ +import './types/index.js'; diff --git a/node_modules/svelte/compiler.d.ts b/node_modules/svelte/compiler.d.ts new file mode 100644 index 0000000..a1a0ce5 --- /dev/null +++ b/node_modules/svelte/compiler.d.ts @@ -0,0 +1 @@ +import './types/index.js'; diff --git a/node_modules/svelte/compiler/index.js b/node_modules/svelte/compiler/index.js new file mode 100644 index 0000000..31a5ae9 --- /dev/null +++ b/node_modules/svelte/compiler/index.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).svelte={})}(this,(function(e){"use strict";function t(e,t,s){const r=s._;let a=!1;function i(e,{next:t,state:n}){t(n)}return function e(t,o,l){if(a)return;if(!t.type)return;let c;const p={},u={path:o,state:l,next:(s=l)=>{o.push(t);for(const n in t){if("type"===n)continue;const r=t[n];if(r&&"object"==typeof r)if(Array.isArray(r)){const t={};r.forEach(((n,r)=>{if(n&&"object"==typeof n){const a=e(n,o,s);a&&(t[r]=a)}})),Object.keys(t).length>0&&(p[n]=r.map(((e,n)=>t[n]??e)))}else{const t=e(r,o,s);t&&(p[n]=t)}}if(o.pop(),Object.keys(p).length>0)return n(t,p)},stop:()=>{a=!0},visit:(n,s=l)=>{o.push(t);const r=e(n,o,s)??n;return o.pop(),r}};let d=s[t.type]??i;if(r){let e;c=r(t,{...u,next:(n=l)=>(l=n,e=d(t,{...u,state:n}),e)}),!c&&e&&(c=e)}else c=d(t,u);return c||Object.keys(p).length>0&&(c=n(t,p)),c||void 0}(e,[],t)??e}function n(e,t){const n={},s=Object.getOwnPropertyDescriptors(e);for(const e in s)Object.defineProperty(n,e,s[e]);for(const e in t)n[e]=t[e];return n}const s=/\s/,r=/\s+/,a=/^\r?\n/,i=/^\s/,o=/^[ \t\r\n]+/,l=/\s$/,c=/[ \t\r\n]+$/,p=/[^ \t\r\n]/,u=/[ \t\n\r\f]+/g,d=/^[ \t\n\r\f]+$/,h=/[^\n]/g,m=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/,f=/(^[^a-zA-Z_$]|[^a-zA-Z0-9_$])/g,y=/^[aeiou]/,v=/^h[1-6]$/,g=/(^[0-9-.])|[\^$@%&#?!|()[\]{}^*+~;]/,b=1,_=2,x=4,C=8,w=16,k=1,S=2,P="http://www.w3.org/2000/svg",E="http://www.w3.org/1998/Math/MathML";function T(e,t){if(0===t.length)return null;const n=new M(t).get(e);return n&&n[0][0]>.7?n[0][1]:null}function A(e,t){if(null===e&&null===t)throw"Trying to compare two null values";if(null===e||null===t)return 0;const n=function(e,t){const n=[];let s=0,r=0;for(let a=0;a<=t.length;a++)for(let i=0;i<=e.length;i++)r=a&&i?e.charAt(i-1)===t.charAt(a-1)?s:Math.min(n[i],n[i-1],s)+1:a+i,s=n[i],n[i]=r;return n.pop()}(e=String(e),t=String(t));return 1-n/Math.max(e.length,t.length)}const $=/[^\w, ]+/;function I(e,t=2){const n={},s=function(e,t=2){const n="-"+e.toLowerCase().replace($,"")+"-",s=t-n.length,r=[];if(s>0)for(let t=0;t=2;--t){const n=this.__get(e,t);if(n.length>0)return n}return null}__get(e,t){const n=e.toLowerCase(),s={},r=I(n,t),a=this.items[t];let i,o,l,c,p,u=0;for(i in r)if(o=r[i],u+=Math.pow(o,2),i in this.match_dict)for(l=0;l{const n=r+e.length+1,s={start:r,end:n,line:t};return r=n,s}));let i=0;return function(t,r){if("string"==typeof t&&(t=e.indexOf(t,r??0)),-1===t)return;let o=a[i];const l=t>=o.end?1:-1;for(;o;){if(q(o,t))return{line:n+o.line,column:s+t-o.start,character:t};i+=l,o=a[i]}}}const O=/\r/g;function N(e){let t=5381,n=(e=e.replace(O,"")).length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return(t>>>0).toString(36)}const D=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function j(e){return D.includes(e)||"!doctype"===e.toLowerCase()}const B=["arguments","await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","eval","export","extends","false","finally","for","function","if","implements","import","in","instanceof","interface","let","new","null","package","private","protected","public","return","static","super","switch","this","throw","true","try","typeof","var","void","while","with","yield"];function F(e){return B.includes(e)}function V(e){return e.endsWith("capture")&&"gotpointercapture"!==e&&"lostpointercapture"!==e}const H=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function U(e){return H.includes(e)}const z=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"];function W(e){return z.includes(e)}const G={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};const K=[...z,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];const Q=["autofocus","muted","defaultValue","defaultChecked"];function X(e){return Q.includes(e)}const Y=["touchstart","touchmove"];const J=["textContent","innerHTML","innerText"];function Z(e){return J.includes(e)}const ee=["body","embed","iframe","img","link","object","script","style","track"];function te(e){return ee.includes(e)}const ne=["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","discard","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hatch","hatchpath","hkern","image","line","linearGradient","marker","mask","mesh","meshgradient","meshpatch","meshrow","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidcolor","stop","svg","switch","symbol","text","textPath","tref","tspan","unknown","use","view","vkern"];function se(e){return ne.includes(e)}const re=["annotation","annotation-xml","maction","math","merror","mfrac","mi","mmultiscripts","mn","mo","mover","mpadded","mphantom","mprescripts","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msubsup","msup","mtable","mtd","mtext","mtr","munder","munderover","semantics"];function ae(e){return re.includes(e)}const ie=["$state","$state.raw","$state.snapshot","$props","$props.id","$bindable","$derived","$derived.by","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];function oe(e){return ie.includes(e)}let le,ce,pe,ue,de=[],he=L("",{offsetLine:1});function me(e){const t=he(e.start);return`${n=le,n?.replace(/\//g,"/​")}:${t?.line}:${t.column}`;var n}let fe=[],ye=new Map;function ve(e=(()=>!0)){ue=e}function ge(e,t){return pe&&!!ye.get(e)?.some((e=>e.has(t)))}function be(e,t){ce=e;const n=t.rootDir?.replace(/\\/g,"/");le=t.filename.replace(/\\/g,"/"),pe=!!t.dev,"string"==typeof n&&le.startsWith(n)&&(le=le.replace(n,"").replace(/^[/\\]/,"")),he=L(ce,{offsetLine:1}),de=[],fe=[],ye.clear()}const _e=/^\t+/;function xe(e){return e.replace(_e,(e=>e.split("\t").join(" ")))}class Ce{name="CompileDiagnostic";constructor(e,t,n){this.code=e,this.message=t,le&&(this.filename=le),n&&(this.position=n,this.start=he(n[0]),this.end=he(n[1]),this.start&&this.end&&(this.frame=function(e,t,n){const s=e.split("\n"),r=Math.max(0,t-2),a=Math.min(t+3,s.length),i=String(a+1).length;return s.slice(r,a).map(((e,s)=>{const a=r+s===t,o=String(s+r+1).padStart(i," ");if(a){const t=" ".repeat(i+2+xe(e.slice(0,n)).length)+"^";return`${o}: ${xe(e)}\n${t}`}return`${o}: ${xe(e)}`})).join("\n")}(ce,this.start.line-1,this.end.column)))}toString(){let e=`${this.code}: ${this.message}`;return this.filename&&(e+=`\n${this.filename}`,this.start&&(e+=`:${this.start.line}:${this.start.column}`)),this.frame&&(e+=`\n${this.frame}`),e}toJSON(){return{code:this.code,message:this.message,filename:this.filename,start:this.start,end:this.end,position:this.position,frame:this.frame}}}class we extends Ce{name="CompileWarning";constructor(e,t,n){super(e,t,n)}}function ke(e,t,n){let s=fe;if(e&&(s=ye.get(e)??fe),s&&s.at(-1)?.has(t))return;const r=new we(t,n,e&&void 0!==e.start?[e.start,e.end??e.start]:void 0);ue(r)&&de.push(r)}function Se(e){ke(e,"a11y_accesskey","Avoid using accesskey\nhttps://svelte.dev/e/a11y_accesskey")}function Pe(e){ke(e,"a11y_aria_activedescendant_has_tabindex","An element with an aria-activedescendant attribute should have a tabindex value\nhttps://svelte.dev/e/a11y_aria_activedescendant_has_tabindex")}function Ee(e,t){ke(e,"a11y_aria_attributes",`\`<${t}>\` should not have aria-* attributes\nhttps://svelte.dev/e/a11y_aria_attributes`)}function Te(e){ke(e,"a11y_autofocus","Avoid using autofocus\nhttps://svelte.dev/e/a11y_autofocus")}function Ae(e,t){ke(e,"a11y_hidden",`\`<${t}>\` element should not be hidden\nhttps://svelte.dev/e/a11y_hidden`)}function $e(e,t,n){ke(e,"a11y_incorrect_aria_attribute_type",`The value of '${t}' must be a ${n}\nhttps://svelte.dev/e/a11y_incorrect_aria_attribute_type`)}function Ie(e,t){ke(e,"a11y_interactive_supports_focus",`Elements with the '${t}' interactive role must have a tabindex value\nhttps://svelte.dev/e/a11y_interactive_supports_focus`)}function Re(e,t){ke(e,"a11y_misplaced_role",`\`<${t}>\` should not have role attribute\nhttps://svelte.dev/e/a11y_misplaced_role`)}function Me(e){ke(e,"a11y_misplaced_scope","The scope attribute should only be used with `` elements\nhttps://svelte.dev/e/a11y_misplaced_scope")}function qe(e,t,n){ke(e,"a11y_mouse_events_have_key_events",`'${t}' event must be accompanied by '${n}' event\nhttps://svelte.dev/e/a11y_mouse_events_have_key_events`)}function Le(e,t){ke(e,"a11y_no_abstract_role",`Abstract role '${t}' is forbidden\nhttps://svelte.dev/e/a11y_no_abstract_role`)}function Oe(e,t,n){ke(e,"a11y_no_interactive_element_to_noninteractive_role",`\`<${t}>\` cannot have role '${n}'\nhttps://svelte.dev/e/a11y_no_interactive_element_to_noninteractive_role`)}function Ne(e,t,n){ke(e,"a11y_no_noninteractive_element_to_interactive_role",`Non-interactive element \`<${t}>\` cannot have interactive role '${n}'\nhttps://svelte.dev/e/a11y_no_noninteractive_element_to_interactive_role`)}function De(e,t){ke(e,"a11y_no_redundant_roles",`Redundant role '${t}'\nhttps://svelte.dev/e/a11y_no_redundant_roles`)}function je(e){ke(e,"a11y_positive_tabindex","Avoid tabindex values above zero\nhttps://svelte.dev/e/a11y_positive_tabindex")}function Be(e,t,n){ke(e,"a11y_role_has_required_aria_props",`Elements with the ARIA role "${t}" must have the following attributes defined: ${n}\nhttps://svelte.dev/e/a11y_role_has_required_aria_props`)}function Fe(e,t,n){ke(e,"a11y_role_supports_aria_props",`The attribute '${t}' is not supported by the role '${n}'\nhttps://svelte.dev/e/a11y_role_supports_aria_props`)}function Ve(e,t,n,s){ke(e,"a11y_role_supports_aria_props_implicit",`The attribute '${t}' is not supported by the role '${n}'. This role is implicit on the element \`<${s}>\`\nhttps://svelte.dev/e/a11y_role_supports_aria_props_implicit`)}function He(e,t,n){ke(e,"a11y_unknown_aria_attribute",(n?`Unknown aria attribute 'aria-${t}'. Did you mean '${n}'?`:`Unknown aria attribute 'aria-${t}'`)+"\nhttps://svelte.dev/e/a11y_unknown_aria_attribute")}function Ue(e,t,n){ke(e,"a11y_unknown_role",(n?`Unknown role '${t}'. Did you mean '${n}'?`:`Unknown role '${t}'`)+"\nhttps://svelte.dev/e/a11y_unknown_role")}function ze(e,t,n){ke(e,"legacy_code",`\`${t}\` is no longer valid — please use \`${n}\` instead\nhttps://svelte.dev/e/legacy_code`)}function We(e,t,n){ke(e,"unknown_code",(n?`\`${t}\` is not a recognised code (did you mean \`${n}\`?)`:`\`${t}\` is not a recognised code`)+"\nhttps://svelte.dev/e/unknown_code")}function Ge(e){ke(e,"options_deprecated_accessors","The `accessors` option has been deprecated. It will have no effect in runes mode\nhttps://svelte.dev/e/options_deprecated_accessors")}function Ke(e){ke(e,"options_deprecated_immutable","The `immutable` option has been deprecated. It will have no effect in runes mode\nhttps://svelte.dev/e/options_deprecated_immutable")}function Qe(e){ke(e,"options_missing_custom_element","The `customElement` option is used when generating a custom element. Did you forget the `customElement: true` compile option?\nhttps://svelte.dev/e/options_missing_custom_element")}function Xe(e){ke(e,"options_renamed_ssr_dom",'`generate: "dom"` and `generate: "ssr"` options have been renamed to "client" and "server" respectively\nhttps://svelte.dev/e/options_renamed_ssr_dom')}function Ye(e,t){ke(e,"export_let_unused",`Component has unused export property '${t}'. If it is for external reference only, please consider using \`export const ${t}\`\nhttps://svelte.dev/e/export_let_unused`)}function Je(e,t){ke(e,"non_reactive_update",`\`${t}\` is updated, but is not declared with \`$state(...)\`. Changing its value will not correctly trigger updates\nhttps://svelte.dev/e/non_reactive_update`)}function Ze(e,t){ke(e,"store_rune_conflict",`It looks like you're using the \`$${t}\` rune, but there is a local binding called \`${t}\`. Referencing a local variable with a \`$\` prefix will create a store subscription. Please rename \`${t}\` to avoid the ambiguity\nhttps://svelte.dev/e/store_rune_conflict`)}function et(e){ke(e,"attribute_avoid_is",'The "is" attribute is not supported cross-browser and should be avoided\nhttps://svelte.dev/e/attribute_avoid_is')}function tt(e,t){ke(e,"attribute_global_event_reference",`You are referencing \`globalThis.${t}\`. Did you forget to declare a variable with that name?\nhttps://svelte.dev/e/attribute_global_event_reference`)}function nt(e,t,n){ke(e,"attribute_invalid_property_name",`'${t}' is not a valid HTML attribute. Did you mean '${n}'?\nhttps://svelte.dev/e/attribute_invalid_property_name`)}function st(e,t){ke(e,"node_invalid_placement_ssr",`${t}. When rendering this component on the server, the resulting HTML will be modified by the browser (by moving, removing, or inserting elements), likely resulting in a \`hydration_mismatch\` warning\nhttps://svelte.dev/e/node_invalid_placement_ssr`)}function rt(e){ke(e,"script_unknown_attribute","Unrecognized attribute — should be one of `generics`, `lang` or `module`. If this exists for a preprocessor, ensure that the preprocessor removes it\nhttps://svelte.dev/e/script_unknown_attribute")}const at=/^\s*svelte-ignore\s/,it={"non-top-level-reactive-declaration":"reactive_declaration_invalid_placement","module-script-reactive-declaration":"reactive_declaration_module_script","empty-block":"block_empty","avoid-is":"attribute_avoid_is","invalid-html-attribute":"attribute_invalid_property_name","a11y-structure":"a11y_figcaption_parent","illegal-attribute-character":"attribute_illegal_colon","invalid-rest-eachblock-binding":"bind_invalid_each_rest","unused-export-let":"export_let_unused"},ot=["a11y_accesskey","a11y_aria_activedescendant_has_tabindex","a11y_aria_attributes","a11y_autocomplete_valid","a11y_autofocus","a11y_click_events_have_key_events","a11y_consider_explicit_label","a11y_distracting_elements","a11y_figcaption_index","a11y_figcaption_parent","a11y_hidden","a11y_img_redundant_alt","a11y_incorrect_aria_attribute_type","a11y_incorrect_aria_attribute_type_boolean","a11y_incorrect_aria_attribute_type_id","a11y_incorrect_aria_attribute_type_idlist","a11y_incorrect_aria_attribute_type_integer","a11y_incorrect_aria_attribute_type_token","a11y_incorrect_aria_attribute_type_tokenlist","a11y_incorrect_aria_attribute_type_tristate","a11y_interactive_supports_focus","a11y_invalid_attribute","a11y_label_has_associated_control","a11y_media_has_caption","a11y_misplaced_role","a11y_misplaced_scope","a11y_missing_attribute","a11y_missing_content","a11y_mouse_events_have_key_events","a11y_no_abstract_role","a11y_no_interactive_element_to_noninteractive_role","a11y_no_noninteractive_element_interactions","a11y_no_noninteractive_element_to_interactive_role","a11y_no_noninteractive_tabindex","a11y_no_redundant_roles","a11y_no_static_element_interactions","a11y_positive_tabindex","a11y_role_has_required_aria_props","a11y_role_supports_aria_props","a11y_role_supports_aria_props_implicit","a11y_unknown_aria_attribute","a11y_unknown_role","legacy_code","unknown_code","options_deprecated_accessors","options_deprecated_immutable","options_missing_custom_element","options_removed_enable_sourcemap","options_removed_hydratable","options_removed_loop_guard_timeout","options_renamed_ssr_dom","export_let_unused","legacy_component_creation","non_reactive_update","perf_avoid_inline_class","perf_avoid_nested_class","reactive_declaration_invalid_placement","reactive_declaration_module_script_dependency","state_referenced_locally","store_rune_conflict","css_unused_selector","attribute_avoid_is","attribute_global_event_reference","attribute_illegal_colon","attribute_invalid_property_name","attribute_quoted","bind_invalid_each_rest","block_empty","component_name_lowercase","element_invalid_self_closing_tag","event_directive_deprecated","node_invalid_placement_ssr","script_context_deprecated","script_unknown_attribute","slot_element_deprecated","svelte_component_deprecated","svelte_element_invalid_this","svelte_self_deprecated"].concat(["state_snapshot_uncloneable","binding_property_non_reactive","hydration_attribute_changed","hydration_html_changed","ownership_invalid_binding","ownership_invalid_mutation"]);function lt(e,t,n){const s=at.exec(t);if(!s)return[];let r=s[0].length;e+=r;const a=[];if(n)for(const n of t.slice(r).matchAll(/([\w$-]+)(,)?/gm)){const t=n[1];if(ot.includes(t))a.push(t);else{const s=it[t]??t.replace(/-/g,"_"),r=e+n.index,a=r+t.length;if(ot.includes(s))ze({start:r,end:a},t,s);else{We({start:r,end:a},t,T(t,ot))}}if(!n[2])break}else for(const e of t.slice(r).matchAll(/[\w$-]+/gm)){const t=e[0];if(a.push(t),!ot.includes(t)){const e=it[t]??t.replace(/-/g,"_");ot.includes(e)&&a.push(e)}}return a}function ct(e){const t=at.exec(e);if(!t)return e;const n=t[0].length;return e.substring(0,n)+e.substring(n).replace(/\w+-\w+(-\w+)*/g,((t,s,r)=>{let a=it[t]??t.replace(/-/g,"_");return/\w+-\w+/.test(e.substring(n+r+t.length))&&(a+=","),a}))}function pt(e){const t=e.at(0),n=e.at(-1);"Text"===t?.type&&(p.test(t.data)?t.data=t.data.replace(o,""):e.shift()),"Text"===n?.type&&(p.test(n.data)?n.data=n.data.replace(c,""):e.pop())}var ut=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],dt=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],ht="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",mt={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},ft="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",yt={5:ft,"5module":ft+" export import",6:ft+" const class extends export import super"},vt=/^in(stanceof)?$/,gt=new RegExp("["+ht+"]"),bt=new RegExp("["+ht+"‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");function _t(e,t){for(var n=65536,s=0;se)return!1;if((n+=t[s+1])>=e)return!0}return!1}function xt(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&>.test(String.fromCharCode(e)):!1!==t&&_t(e,dt)))}function Ct(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&bt.test(String.fromCharCode(e)):!1!==t&&(_t(e,dt)||_t(e,ut)))))}var wt=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function kt(e,t){return new wt(e,{beforeExpr:!0,binop:t})}var St={beforeExpr:!0},Pt={startsExpr:!0},Et={};function Tt(e,t){return void 0===t&&(t={}),t.keyword=e,Et[e]=new wt(e,t)}var At={num:new wt("num",Pt),regexp:new wt("regexp",Pt),string:new wt("string",Pt),name:new wt("name",Pt),privateId:new wt("privateId",Pt),eof:new wt("eof"),bracketL:new wt("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new wt("]"),braceL:new wt("{",{beforeExpr:!0,startsExpr:!0}),braceR:new wt("}"),parenL:new wt("(",{beforeExpr:!0,startsExpr:!0}),parenR:new wt(")"),comma:new wt(",",St),semi:new wt(";",St),colon:new wt(":",St),dot:new wt("."),question:new wt("?",St),questionDot:new wt("?."),arrow:new wt("=>",St),template:new wt("template"),invalidTemplate:new wt("invalidTemplate"),ellipsis:new wt("...",St),backQuote:new wt("`",Pt),dollarBraceL:new wt("${",{beforeExpr:!0,startsExpr:!0}),eq:new wt("=",{beforeExpr:!0,isAssign:!0}),assign:new wt("_=",{beforeExpr:!0,isAssign:!0}),incDec:new wt("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new wt("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:kt("||",1),logicalAND:kt("&&",2),bitwiseOR:kt("|",3),bitwiseXOR:kt("^",4),bitwiseAND:kt("&",5),equality:kt("==/!=/===/!==",6),relational:kt("/<=/>=",7),bitShift:kt("<>/>>>",8),plusMin:new wt("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:kt("%",10),star:kt("*",10),slash:kt("/",10),starstar:new wt("**",{beforeExpr:!0}),coalesce:kt("??",1),_break:Tt("break"),_case:Tt("case",St),_catch:Tt("catch"),_continue:Tt("continue"),_debugger:Tt("debugger"),_default:Tt("default",St),_do:Tt("do",{isLoop:!0,beforeExpr:!0}),_else:Tt("else",St),_finally:Tt("finally"),_for:Tt("for",{isLoop:!0}),_function:Tt("function",Pt),_if:Tt("if"),_return:Tt("return",St),_switch:Tt("switch"),_throw:Tt("throw",St),_try:Tt("try"),_var:Tt("var"),_const:Tt("const"),_while:Tt("while",{isLoop:!0}),_with:Tt("with"),_new:Tt("new",{beforeExpr:!0,startsExpr:!0}),_this:Tt("this",Pt),_super:Tt("super",Pt),_class:Tt("class",Pt),_extends:Tt("extends",St),_export:Tt("export"),_import:Tt("import",Pt),_null:Tt("null",Pt),_true:Tt("true",Pt),_false:Tt("false",Pt),_in:Tt("in",{beforeExpr:!0,binop:7}),_instanceof:Tt("instanceof",{beforeExpr:!0,binop:7}),_typeof:Tt("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:Tt("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:Tt("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},$t=/\r\n?|\n|\u2028|\u2029/,It=new RegExp($t.source,"g");function Rt(e){return 10===e||13===e||8232===e||8233===e}function Mt(e,t,n){void 0===n&&(n=e.length);for(var s=t;s>10),56320+(1023&e)))}var Ut=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,zt=function(e,t){this.line=e,this.column=t};zt.prototype.offset=function(e){return new zt(this.line,this.column+e)};var Wt=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function Gt(e,t){for(var n=1,s=0;;){var r=Mt(e,s,t);if(r<0)return new zt(n,t-s);++n,s=r}}var Kt={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},Qt=!1;function Xt(e){var t={};for(var n in Kt)t[n]=e&&jt(e,n)?e[n]:Kt[n];if("latest"===t.ecmaVersion?t.ecmaVersion=1e8:null==t.ecmaVersion?(!Qt&&"object"==typeof console&&console.warn&&(Qt=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),e&&null!=e.allowHashBang||(t.allowHashBang=t.ecmaVersion>=14),Bt(t.onToken)){var s=t.onToken;t.onToken=function(e){return s.push(e)}}return Bt(t.onComment)&&(t.onComment=function(e,t){return function(n,s,r,a,i,o){var l={type:n?"Block":"Line",value:s,start:r,end:a};e.locations&&(l.loc=new Wt(this,i,o)),e.ranges&&(l.range=[r,a]),t.push(l)}}(t,t.onComment)),t}var Yt=256;function Jt(e,t){return 2|(e?4:0)|(t?8:0)}var Zt=function(e,t,n){this.options=e=Xt(e),this.sourceFile=e.sourceFile,this.keywords=Vt(yt[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var s="";!0!==e.allowReserved&&(s=mt[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(s+=" await")),this.reservedWords=Vt(s);var r=(s?s+" ":"")+mt.strict;this.reservedWordsStrict=Vt(r),this.reservedWordsStrictBind=Vt(r+" "+mt.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split($t).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=At.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]},en={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};Zt.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},en.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},en.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},en.inAsync.get=function(){return(4&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},en.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&Yt)return!1;if(2&t.flags)return(4&t.flags)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},en.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,n=e.inClassFieldInit;return(64&t)>0||n||this.options.allowSuperOutsideMethod},en.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},en.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},en.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,n=e.inClassFieldInit;return(258&t)>0||n},en.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Yt)>0},Zt.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,s=0;s=,?^&]/.test(r)||"!"===r&&"="===this.input.charAt(s+1))}e+=t[0].length,Lt.lastIndex=e,e+=Lt.exec(this.input)[0].length,";"===this.input[e]&&e++}},tn.eat=function(e){return this.type===e&&(this.next(),!0)},tn.isContextual=function(e){return this.type===At.name&&this.value===e&&!this.containsEsc},tn.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},tn.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},tn.canInsertSemicolon=function(){return this.type===At.eof||this.type===At.braceR||$t.test(this.input.slice(this.lastTokEnd,this.start))},tn.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},tn.semicolon=function(){this.eat(At.semi)||this.insertSemicolon()||this.unexpected()},tn.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},tn.expect=function(e){this.eat(e)||this.unexpected()},tn.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var sn=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};tn.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?"Assigning to rvalue":"Parenthesized pattern")}},tn.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,s=e.doubleProto;if(!t)return n>=0||s>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")},tn.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&s<56320)return!0;if(xt(s,!0)){for(var r=n+1;Ct(s=this.input.charCodeAt(r),!0);)++r;if(92===s||s>55295&&s<56320)return!0;var a=this.input.slice(n,r);if(!vt.test(a))return!0}return!1},rn.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;Lt.lastIndex=this.pos;var e,t=Lt.exec(this.input),n=this.pos+t[0].length;return!($t.test(this.input.slice(this.pos,n))||"function"!==this.input.slice(n,n+8)||n+8!==this.input.length&&(Ct(e=this.input.charCodeAt(n+8))||e>55295&&e<56320))},rn.parseStatement=function(e,t,n){var s,r=this.type,a=this.startNode();switch(this.isLet(e)&&(r=At._var,s="let"),r){case At._break:case At._continue:return this.parseBreakContinueStatement(a,r.keyword);case At._debugger:return this.parseDebuggerStatement(a);case At._do:return this.parseDoStatement(a);case At._for:return this.parseForStatement(a);case At._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(a,!1,!e);case At._class:return e&&this.unexpected(),this.parseClass(a,!0);case At._if:return this.parseIfStatement(a);case At._return:return this.parseReturnStatement(a);case At._switch:return this.parseSwitchStatement(a);case At._throw:return this.parseThrowStatement(a);case At._try:return this.parseTryStatement(a);case At._const:case At._var:return s=s||this.value,e&&"var"!==s&&this.unexpected(),this.parseVarStatement(a,s);case At._while:return this.parseWhileStatement(a);case At._with:return this.parseWithStatement(a);case At.braceL:return this.parseBlock(!0,a);case At.semi:return this.parseEmptyStatement(a);case At._export:case At._import:if(this.options.ecmaVersion>10&&r===At._import){Lt.lastIndex=this.pos;var i=Lt.exec(this.input),o=this.pos+i[0].length,l=this.input.charCodeAt(o);if(40===l||46===l)return this.parseExpressionStatement(a,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===At._import?this.parseImport(a):this.parseExport(a,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(a,!0,!e);var c=this.value,p=this.parseExpression();return r===At.name&&"Identifier"===p.type&&this.eat(At.colon)?this.parseLabeledStatement(a,c,p,e):this.parseExpressionStatement(a,p)}},rn.parseBreakContinueStatement=function(e,t){var n="break"===t;this.next(),this.eat(At.semi)||this.insertSemicolon()?e.label=null:this.type!==At.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var s=0;s=6?this.eat(At.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},rn.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(an),this.enterScope(0),this.expect(At.parenL),this.type===At.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===At._var||this.type===At._const||n){var s=this.startNode(),r=n?"let":this.value;return this.next(),this.parseVar(s,!0,r),this.finishNode(s,"VariableDeclaration"),(this.type===At._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===s.declarations.length?(this.options.ecmaVersion>=9&&(this.type===At._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,s)):(t>-1&&this.unexpected(t),this.parseFor(e,s))}var a=this.isContextual("let"),i=!1,o=this.containsEsc,l=new sn,c=this.start,p=t>-1?this.parseExprSubscripts(l,"await"):this.parseExpression(!0,l);return this.type===At._in||(i=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===At._in&&this.unexpected(t),e.await=!0):i&&this.options.ecmaVersion>=8&&(p.start!==c||o||"Identifier"!==p.type||"async"!==p.name?this.options.ecmaVersion>=9&&(e.await=!1):this.unexpected()),a&&i&&this.raise(p.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(p,!1,l),this.checkLValPattern(p),this.parseForIn(e,p)):(this.checkExpressionErrors(l,!0),t>-1&&this.unexpected(t),this.parseFor(e,p))},rn.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,cn|(n?0:pn),!1,t)},rn.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(At._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},rn.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(At.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},rn.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(At.braceL),this.labels.push(on),this.enterScope(0);for(var n=!1;this.type!==At.braceR;)if(this.type===At._case||this.type===At._default){var s=this.type===At._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),s?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(At.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},rn.parseThrowStatement=function(e){return this.next(),$t.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var ln=[];rn.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t="Identifier"===e.type;return this.enterScope(t?32:0),this.checkLValPattern(e,t?4:2),this.expect(At.parenR),e},rn.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===At._catch){var t=this.startNode();this.next(),this.eat(At.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(At._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},rn.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")},rn.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(an),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},rn.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},rn.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},rn.parseLabeledStatement=function(e,t,n,s){for(var r=0,a=this.labels;r=0;o--){var l=this.labels[o];if(l.statementStart!==e.start)break;l.statementStart=this.start,l.kind=i}return this.labels.push({name:t,kind:i,statementStart:this.start}),e.body=this.parseStatement(s?-1===s.indexOf("label")?s+"label":s:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},rn.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},rn.parseBlock=function(e,t,n){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(At.braceL),e&&this.enterScope(0);this.type!==At.braceR;){var s=this.parseStatement(null);t.body.push(s)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},rn.parseFor=function(e,t){return e.init=t,this.expect(At.semi),e.test=this.type===At.semi?null:this.parseExpression(),this.expect(At.semi),e.update=this.type===At.parenR?null:this.parseExpression(),this.expect(At.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},rn.parseForIn=function(e,t){var n=this.type===At._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!n||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(At.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")},rn.parseVar=function(e,t,n,s){for(e.declarations=[],e.kind=n;;){var r=this.startNode();if(this.parseVarId(r,n),this.eat(At.eq)?r.init=this.parseMaybeAssign(t):s||"const"!==n||this.type===At._in||this.options.ecmaVersion>=6&&this.isContextual("of")?s||"Identifier"===r.id.type||t&&(this.type===At._in||this.isContextual("of"))?r.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(At.comma))break}return e},rn.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?1:2,!1)};var cn=1,pn=2;function un(e,t){var n=t.key.name,s=e[n],r="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(r=(t.static?"s":"i")+t.kind),"iget"===s&&"iset"===r||"iset"===s&&"iget"===r||"sget"===s&&"sset"===r||"sset"===s&&"sget"===r?(e[n]="true",!1):!!s||(e[n]=r,!1)}function dn(e,t){var n=e.computed,s=e.key;return!n&&("Identifier"===s.type&&s.name===t||"Literal"===s.type&&s.value===t)}rn.parseFunction=function(e,t,n,s,r){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!s)&&(this.type===At.star&&t&pn&&this.unexpected(),e.generator=this.eat(At.star)),this.options.ecmaVersion>=8&&(e.async=!!s),t&cn&&(e.id=4&t&&this.type!==At.name?null:this.parseIdent(),!e.id||t&pn||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var a=this.yieldPos,i=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Jt(e.async,e.generator)),t&cn||(e.id=this.type===At.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,r),this.yieldPos=a,this.awaitPos=i,this.awaitIdentPos=o,this.finishNode(e,t&cn?"FunctionDeclaration":"FunctionExpression")},rn.parseFunctionParams=function(e){this.expect(At.parenL),e.params=this.parseBindingList(At.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},rn.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var s=this.enterClassBody(),r=this.startNode(),a=!1;for(r.body=[],this.expect(At.braceL);this.type!==At.braceR;){var i=this.parseClassElement(null!==e.superClass);i&&(r.body.push(i),"MethodDefinition"===i.type&&"constructor"===i.kind?(a&&this.raiseRecoverable(i.start,"Duplicate constructor in the same class"),a=!0):i.key&&"PrivateIdentifier"===i.key.type&&un(s,i)&&this.raiseRecoverable(i.key.start,"Identifier '#"+i.key.name+"' has already been declared"))}return this.strict=n,this.next(),e.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},rn.parseClassElement=function(e){if(this.eat(At.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),s="",r=!1,a=!1,i="method",o=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(At.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===At.star?o=!0:s="static"}if(n.static=o,!s&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==At.star||this.canInsertSemicolon()?s="async":a=!0),!s&&(t>=9||!a)&&this.eat(At.star)&&(r=!0),!s&&!a&&!r){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?i=l:s=l)}if(s?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=s,this.finishNode(n.key,"Identifier")):this.parseClassElementName(n),t<13||this.type===At.parenL||"method"!==i||r||a){var c=!n.static&&dn(n,"constructor"),p=c&&e;c&&"method"!==i&&this.raise(n.key.start,"Constructor can't have get/set modifier"),n.kind=c?"constructor":i,this.parseClassMethod(n,r,a,p)}else this.parseClassField(n);return n},rn.isClassElementNameStart=function(){return this.type===At.name||this.type===At.privateId||this.type===At.num||this.type===At.string||this.type===At.bracketL||this.type.keyword},rn.parseClassElementName=function(e){this.type===At.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},rn.parseClassMethod=function(e,t,n,s){var r=e.key;"constructor"===e.kind?(t&&this.raise(r.start,"Constructor can't be a generator"),n&&this.raise(r.start,"Constructor can't be an async method")):e.static&&dn(e,"prototype")&&this.raise(r.start,"Classes may not have a static property named prototype");var a=e.value=this.parseMethod(t,n,s);return"get"===e.kind&&0!==a.params.length&&this.raiseRecoverable(a.start,"getter should have no params"),"set"===e.kind&&1!==a.params.length&&this.raiseRecoverable(a.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===a.params[0].type&&this.raiseRecoverable(a.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},rn.parseClassField=function(e){if(dn(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&dn(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(At.eq)){var t=this.currentThisScope(),n=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=n}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")},rn.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==At.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},rn.parseClassId=function(e,t){this.type===At.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},rn.parseClassSuper=function(e){e.superClass=this.eat(At._extends)?this.parseExprSubscripts(null,!1):null},rn.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},rn.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,n=e.used;if(this.options.checkPrivateFields)for(var s=this.privateNameStack.length,r=0===s?null:this.privateNameStack[s-1],a=0;a=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==At.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")},rn.parseExport=function(e,t){if(this.next(),this.eat(At.star))return this.parseExportAllDeclaration(e,t);if(this.eat(At._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==At.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var n=0,s=e.specifiers;n=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},rn.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportSpecifier")},rn.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportDefaultSpecifier")},rn.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportNamespaceSpecifier")},rn.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===At.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(At.comma)))return e;if(this.type===At.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(At.braceL);!this.eat(At.braceR);){if(t)t=!1;else if(this.expect(At.comma),this.afterTrailingComma(At.braceR))break;e.push(this.parseImportSpecifier())}return e},rn.parseWithClause=function(){var e=[];if(!this.eat(At._with))return e;this.expect(At.braceL);for(var t={},n=!0;!this.eat(At.braceR);){if(n)n=!1;else if(this.expect(At.comma),this.afterTrailingComma(At.braceR))break;var s=this.parseImportAttribute(),r="Identifier"===s.key.type?s.key.name:s.key.value;jt(t,r)&&this.raiseRecoverable(s.key.start,"Duplicate attribute key '"+r+"'"),t[r]=!0,e.push(s)}return e},rn.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===At.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(At.colon),this.type!==At.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")},rn.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===At.string){var e=this.parseLiteral(this.value);return Ut.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},rn.adaptDirectivePrologue=function(e){for(var t=0;t=5&&"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var hn=Zt.prototype;hn.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var s=0,r=e.properties;s=8&&!o&&"async"===l.name&&!this.canInsertSemicolon()&&this.eat(At._function))return this.overrideContext(fn.f_expr),this.parseFunction(this.startNodeAt(a,i),0,!1,!0,t);if(r&&!this.canInsertSemicolon()){if(this.eat(At.arrow))return this.parseArrowExpression(this.startNodeAt(a,i),[l],!1,t);if(this.options.ecmaVersion>=8&&"async"===l.name&&this.type===At.name&&!o&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return l=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(At.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,i),[l],!0,t)}return l;case At.regexp:var c=this.value;return(s=this.parseLiteral(c.value)).regex={pattern:c.pattern,flags:c.flags},s;case At.num:case At.string:return this.parseLiteral(this.value);case At._null:case At._true:case At._false:return(s=this.startNode()).value=this.type===At._null?null:this.type===At._true,s.raw=this.type.keyword,this.next(),this.finishNode(s,"Literal");case At.parenL:var p=this.start,u=this.parseParenAndDistinguishExpression(r,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(e.parenthesizedAssign=p),e.parenthesizedBind<0&&(e.parenthesizedBind=p)),u;case At.bracketL:return s=this.startNode(),this.next(),s.elements=this.parseExprList(At.bracketR,!0,!0,e),this.finishNode(s,"ArrayExpression");case At.braceL:return this.overrideContext(fn.b_expr),this.parseObj(!1,e);case At._function:return s=this.startNode(),this.next(),this.parseFunction(s,0);case At._class:return this.parseClass(this.startNode(),!1);case At._new:return this.parseNew();case At.backQuote:return this.parseTemplate();case At._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}},vn.parseExprAtomDefault=function(){this.unexpected()},vn.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===At.parenL&&!e)return this.parseDynamicImport(t);if(this.type===At.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name="import",t.meta=this.finishNode(n,"Identifier"),this.parseImportMeta(t)}this.unexpected()},vn.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(At.parenR)?e.options=null:(this.expect(At.comma),this.afterTrailingComma(At.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(At.parenR)||(this.expect(At.comma),this.afterTrailingComma(At.parenR)||this.unexpected())));else if(!this.eat(At.parenR)){var t=this.start;this.eat(At.comma)&&this.eat(At.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},vn.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),"meta"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},vn.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},vn.parseParenExpression=function(){this.expect(At.parenL);var e=this.parseExpression();return this.expect(At.parenR),e},vn.shouldParseArrow=function(e){return!this.canInsertSemicolon()},vn.parseParenAndDistinguishExpression=function(e,t){var n,s=this.start,r=this.startLoc,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var i,o=this.start,l=this.startLoc,c=[],p=!0,u=!1,d=new sn,h=this.yieldPos,m=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==At.parenR;){if(p?p=!1:this.expect(At.comma),a&&this.afterTrailingComma(At.parenR,!0)){u=!0;break}if(this.type===At.ellipsis){i=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===At.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}c.push(this.parseMaybeAssign(!1,d,this.parseParenItem))}var f=this.lastTokEnd,y=this.lastTokEndLoc;if(this.expect(At.parenR),e&&this.shouldParseArrow(c)&&this.eat(At.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=h,this.awaitPos=m,this.parseParenArrowList(s,r,c,t);c.length&&!u||this.unexpected(this.lastTokStart),i&&this.unexpected(i),this.checkExpressionErrors(d,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=m||this.awaitPos,c.length>1?((n=this.startNodeAt(o,l)).expressions=c,this.finishNodeAt(n,"SequenceExpression",f,y)):n=c[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var v=this.startNodeAt(s,r);return v.expression=n,this.finishNode(v,"ParenthesizedExpression")}return n},vn.parseParenItem=function(e){return e},vn.parseParenArrowList=function(e,t,n,s){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,s)};var _n=[];vn.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===At.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var n=this.containsEsc;return e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),n&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var s=this.start,r=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),s,r,!0,!1),this.eat(At.parenL)?e.arguments=this.parseExprList(At.parenR,this.options.ecmaVersion>=8,!1):e.arguments=_n,this.finishNode(e,"NewExpression")},vn.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===At.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value.replace(/\r\n?/g,"\n"),cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===At.backQuote,this.finishNode(n,"TemplateElement")},vn.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var s=this.parseTemplateElement({isTagged:t});for(n.quasis=[s];!s.tail;)this.type===At.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(At.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(At.braceR),n.quasis.push(s=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},vn.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===At.name||this.type===At.num||this.type===At.string||this.type===At.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===At.star)&&!$t.test(this.input.slice(this.lastTokEnd,this.start))},vn.parseObj=function(e,t){var n=this.startNode(),s=!0,r={};for(n.properties=[],this.next();!this.eat(At.braceR);){if(s)s=!1;else if(this.expect(At.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(At.braceR))break;var a=this.parseProperty(e,t);e||this.checkPropClash(a,r,t),n.properties.push(a)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},vn.parseProperty=function(e,t){var n,s,r,a,i=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(At.ellipsis))return e?(i.argument=this.parseIdent(!1),this.type===At.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(!1,t),this.type===At.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(e||t)&&(r=this.start,a=this.startLoc),e||(n=this.eat(At.star)));var o=this.containsEsc;return this.parsePropertyName(i),!e&&!o&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(i)?(s=!0,n=this.options.ecmaVersion>=9&&this.eat(At.star),this.parsePropertyName(i)):s=!1,this.parsePropertyValue(i,e,n,s,r,a,t,o),this.finishNode(i,"Property")},vn.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t="get"===e.kind?0:1;if(e.value.params.length!==t){var n=e.value.start;"get"===e.kind?this.raiseRecoverable(n,"getter should have no params"):this.raiseRecoverable(n,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")},vn.parsePropertyValue=function(e,t,n,s,r,a,i,o){(n||s)&&this.type===At.colon&&this.unexpected(),this.eat(At.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,i),e.kind="init"):this.options.ecmaVersion>=6&&this.type===At.parenL?(t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,s)):t||o||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===At.comma||this.type===At.braceR||this.type===At.eq?this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((n||s)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=r),e.kind="init",t?e.value=this.parseMaybeDefault(r,a,this.copyNode(e.key)):this.type===At.eq&&i?(i.shorthandAssign<0&&(i.shorthandAssign=this.start),e.value=this.parseMaybeDefault(r,a,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected():((n||s)&&this.unexpected(),this.parseGetterSetter(e))},vn.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(At.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(At.bracketR),e.key;e.computed=!1}return e.key=this.type===At.num||this.type===At.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},vn.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},vn.parseMethod=function(e,t,n){var s=this.startNode(),r=this.yieldPos,a=this.awaitPos,i=this.awaitIdentPos;return this.initFunction(s),this.options.ecmaVersion>=6&&(s.generator=e),this.options.ecmaVersion>=8&&(s.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|Jt(t,s.generator)|(n?128:0)),this.expect(At.parenL),s.params=this.parseBindingList(At.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0,!1),this.yieldPos=r,this.awaitPos=a,this.awaitIdentPos=i,this.finishNode(s,"FunctionExpression")},vn.parseArrowExpression=function(e,t,n,s){var r=this.yieldPos,a=this.awaitPos,i=this.awaitIdentPos;return this.enterScope(16|Jt(n,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,s),this.yieldPos=r,this.awaitPos=a,this.awaitIdentPos=i,this.finishNode(e,"ArrowFunctionExpression")},vn.parseFunctionBody=function(e,t,n,s){var r=t&&this.type!==At.braceL,a=this.strict,i=!1;if(r)e.body=this.parseMaybeAssign(s),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);a&&!o||(i=this.strictDirective(this.end))&&o&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var l=this.labels;this.labels=[],i&&(this.strict=!0),this.checkParams(e,!a&&!i&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,5),e.body=this.parseBlock(!1,void 0,i&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()},vn.isSimpleParamList=function(e){for(var t=0,n=e;t-1||r.functions.indexOf(e)>-1||r.var.indexOf(e)>-1,r.lexical.push(e),this.inModule&&1&r.flags&&delete this.undefinedExports[e]}else if(4===t){this.currentScope().lexical.push(e)}else if(3===t){var a=this.currentScope();s=this.treatFunctionsAsVar?a.lexical.indexOf(e)>-1:a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1,a.functions.push(e)}else for(var i=this.scopeStack.length-1;i>=0;--i){var o=this.scopeStack[i];if(o.lexical.indexOf(e)>-1&&!(32&o.flags&&o.lexical[0]===e)||!this.treatFunctionsAsVarInScope(o)&&o.functions.indexOf(e)>-1){s=!0;break}if(o.var.push(e),this.inModule&&1&o.flags&&delete this.undefinedExports[e],259&o.flags)break}s&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")},Cn.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},Cn.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Cn.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags)return t}},Cn.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags&&!(16&t.flags))return t}};var kn=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new Wt(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},Sn=Zt.prototype;function Pn(e,t,n,s){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=s),this.options.ranges&&(e.range[1]=n),e}Sn.startNode=function(){return new kn(this,this.start,this.startLoc)},Sn.startNodeAt=function(e,t){return new kn(this,e,t)},Sn.finishNode=function(e,t){return Pn.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},Sn.finishNodeAt=function(e,t,n,s){return Pn.call(this,e,t,n,s)},Sn.copyNode=function(e){var t=new kn(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var En="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Tn=En+" Extended_Pictographic",An=Tn+" EBase EComp EMod EPres ExtPict",$n={9:En,10:Tn,11:Tn,12:An,13:An,14:An},In={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},Rn="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Mn="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",qn=Mn+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Ln=qn+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",On=Ln+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Nn=On+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Dn={9:Mn,10:qn,11:Ln,12:On,13:Nn,14:Nn+" Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz"},jn={};function Bn(e){var t=jn[e]={binary:Vt($n[e]+" "+Rn),binaryOfStrings:Vt(In[e]),nonBinary:{General_Category:Vt(Rn),Script:Vt(Dn[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var Fn=0,Vn=[9,10,11,12,13,14];Fn=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"")+(e.options.ecmaVersion>=15?"v":""),this.unicodeProperties=jn[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};function Wn(e){return 105===e||109===e||115===e}function Gn(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function Kn(e){return e>=65&&e<=90||e>=97&&e<=122}zn.prototype.reset=function(e,t,n){var s=-1!==n.indexOf("v"),r=-1!==n.indexOf("u");this.start=0|e,this.source=t+"",this.flags=n,s&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=r&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=r&&this.parser.options.ecmaVersion>=9)},zn.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},zn.prototype.at=function(e,t){void 0===t&&(t=!1);var n=this.source,s=n.length;if(e>=s)return-1;var r=n.charCodeAt(e);if(!t&&!this.switchU||r<=55295||r>=57344||e+1>=s)return r;var a=n.charCodeAt(e+1);return a>=56320&&a<=57343?(r<<10)+a-56613888:r},zn.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var n=this.source,s=n.length;if(e>=s)return s;var r,a=n.charCodeAt(e);return!t&&!this.switchU||a<=55295||a>=57344||e+1>=s||(r=n.charCodeAt(e+1))<56320||r>57343?e+1:e+2},zn.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},zn.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},zn.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},zn.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},zn.prototype.eatChars=function(e,t){void 0===t&&(t=!1);for(var n=this.pos,s=0,r=e;s-1&&this.raise(e.start,"Duplicate regular expression flag"),"u"===i&&(s=!0),"v"===i&&(r=!0)}this.options.ecmaVersion>=15&&s&&r&&this.raise(e.start,"Invalid regular expression flag")},Hn.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&function(e){for(var t in e)return!0;return!1}(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},Hn.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t=16;for(t&&(e.branchID=new Un(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},Hn.regexp_alternative=function(e){for(;e.pos=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},Hn.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},Hn.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},Hn.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var s=0,r=-1;if(this.regexp_eatDecimalDigits(e)&&(s=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue),e.eat(125)))return-1!==r&&r=16){var n=this.regexp_eatModifiers(e),s=e.eat(45);if(n||s){for(var r=0;r-1&&e.raise("Duplicate regular expression modifiers")}if(s){var i=this.regexp_eatModifiers(e);n||i||58!==e.current()||e.raise("Invalid regular expression modifiers");for(var o=0;o-1||n.indexOf(l)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1},Hn.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},Hn.regexp_eatModifiers=function(e){for(var t="",n=0;-1!==(n=e.current())&&Wn(n);)t+=Ht(n),e.advance();return t},Hn.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},Hn.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},Hn.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!Gn(t)&&(e.lastIntValue=t,e.advance(),!0)},Hn.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;-1!==(n=e.current())&&!Gn(n);)e.advance();return e.pos!==t},Hn.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t)&&(e.advance(),!0)},Hn.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,n=e.groupNames[e.lastStringValue];if(n)if(t)for(var s=0,r=n;s=11,s=e.current(n);return e.advance(n),92===s&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(s=e.lastIntValue),function(e){return xt(e,!0)||36===e||95===e}(s)?(e.lastIntValue=s,!0):(e.pos=t,!1)},Hn.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,s=e.current(n);return e.advance(n),92===s&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(s=e.lastIntValue),function(e){return Ct(e,!0)||36===e||95===e||8204===e||8205===e}(s)?(e.lastIntValue=s,!0):(e.pos=t,!1)},Hn.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},Hn.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},Hn.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},Hn.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},Hn.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},Hn.regexp_eatZero=function(e){return 48===e.current()&&!Yn(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},Hn.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},Hn.regexp_eatControlLetter=function(e){var t=e.current();return!!Kn(t)&&(e.lastIntValue=t%32,e.advance(),!0)},Hn.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var n,s=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(r&&a>=55296&&a<=56319){var i=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=1024*(a-55296)+(o-56320)+65536,!0}e.pos=i,e.lastIntValue=a}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&((n=e.lastIntValue)>=0&&n<=1114111))return!0;r&&e.raise("Invalid unicode escape"),e.pos=s}return!1},Hn.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t)&&(e.lastIntValue=t,e.advance(),!0)},Hn.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1};function Qn(e){return Kn(e)||95===e}function Xn(e){return Qn(e)||Yn(e)}function Yn(e){return e>=48&&e<=57}function Jn(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Zn(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function es(e){return e>=48&&e<=55}Hn.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(function(e){return 100===e||68===e||115===e||83===e||119===e||87===e}(t))return e.lastIntValue=-1,e.advance(),1;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=80===t)||112===t)){var s;if(e.lastIntValue=-1,e.advance(),e.eat(123)&&(s=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return n&&2===s&&e.raise("Invalid property name"),s;e.raise("Invalid property name")}return 0},Hn.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var s=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,s),1}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,r)}return 0},Hn.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){jt(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")},Hn.regexp_validateUnicodePropertyNameOrValue=function(e,t){return e.unicodeProperties.binary.test(t)?1:e.switchV&&e.unicodeProperties.binaryOfStrings.test(t)?2:void e.raise("Invalid property name")},Hn.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Qn(t=e.current());)e.lastStringValue+=Ht(t),e.advance();return""!==e.lastStringValue},Hn.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Xn(t=e.current());)e.lastStringValue+=Ht(t),e.advance();return""!==e.lastStringValue},Hn.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},Hn.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&2===n&&e.raise("Negated character class may contain strings"),!0}return!1},Hn.regexp_classContents=function(e){return 93===e.current()?1:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),1)},Hn.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;!e.switchU||-1!==t&&-1!==n||e.raise("Invalid character class"),-1!==t&&-1!==n&&t>n&&e.raise("Range out of order in character class")}}},Hn.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(99===n||es(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var s=e.current();return 93!==s&&(e.lastIntValue=s,e.advance(),!0)},Hn.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},Hn.regexp_classSetExpression=function(e){var t,n=1;if(this.regexp_eatClassSetRange(e));else if(t=this.regexp_eatClassSetOperand(e)){2===t&&(n=2);for(var s=e.pos;e.eatChars([38,38]);)38!==e.current()&&(t=this.regexp_eatClassSetOperand(e))?2!==t&&(n=1):e.raise("Invalid character in character class");if(s!==e.pos)return n;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(s!==e.pos)return n}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(!(t=this.regexp_eatClassSetOperand(e)))return n;2===t&&(n=2)}},Hn.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var s=e.lastIntValue;return-1!==n&&-1!==s&&n>s&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1},Hn.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?1:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},Hn.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),s=this.regexp_classContents(e);if(e.eat(93))return n&&2===s&&e.raise("Negated character class may contain strings"),s;e.pos=t}if(e.eat(92)){var r=this.regexp_eatCharacterClassEscape(e);if(r)return r;e.pos=t}return null},Hn.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise("Invalid escape");e.pos=t}return null},Hn.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)2===this.regexp_classString(e)&&(t=2);return t},Hn.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return 1===t?1:2},Hn.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return!(!this.regexp_eatCharacterEscape(e)&&!this.regexp_eatClassSetReservedPunctuator(e))||(e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1));var n=e.current();return!(n<0||n===e.lookahead()&&function(e){return 33===e||e>=35&&e<=38||e>=42&&e<=44||46===e||e>=58&&e<=64||94===e||96===e||126===e}(n))&&(!function(e){return 40===e||41===e||45===e||47===e||e>=91&&e<=93||e>=123&&e<=125}(n)&&(e.advance(),e.lastIntValue=n,!0))},Hn.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return!!function(e){return 33===e||35===e||37===e||38===e||44===e||45===e||e>=58&&e<=62||64===e||96===e||126===e}(t)&&(e.lastIntValue=t,e.advance(),!0)},Hn.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!Yn(t)&&95!==t)&&(e.lastIntValue=t%32,e.advance(),!0)},Hn.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},Hn.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Yn(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t},Hn.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Jn(n=e.current());)e.lastIntValue=16*e.lastIntValue+Zn(n),e.advance();return e.pos!==t},Hn.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*n+e.lastIntValue:e.lastIntValue=8*t+n}else e.lastIntValue=t;return!0}return!1},Hn.regexp_eatOctalDigit=function(e){var t=e.current();return es(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},Hn.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var s=0;s=this.input.length?this.finishToken(At.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},ns.readToken=function(e){return xt(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},ns.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888},ns.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(-1===n&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations)for(var s=void 0,r=t;(s=Mt(this.input,r,this.pos))>-1;)++this.curLine,r=this.lineStart=s;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())},ns.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),s=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&qt.test(String.fromCharCode(e))))break e;++this.pos}}},ns.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},ns.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(At.ellipsis)):(++this.pos,this.finishToken(At.dot))},ns.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(At.assign,2):this.finishOp(At.slash,1)},ns.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,s=42===e?At.star:At.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++n,s=At.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(At.assign,n+1):this.finishOp(s,n)},ns.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(At.assign,3);return this.finishOp(124===e?At.logicalOR:At.logicalAND,2)}return 61===t?this.finishOp(At.assign,2):this.finishOp(124===e?At.bitwiseOR:At.bitwiseAND,1)},ns.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(At.assign,2):this.finishOp(At.bitwiseXOR,1)},ns.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!$t.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(At.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(At.assign,2):this.finishOp(At.plusMin,1)},ns.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(At.assign,n+1):this.finishOp(At.bitShift,n)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(At.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},ns.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(At.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(At.arrow)):this.finishOp(61===e?At.eq:At.prefix,1)},ns.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(46===t){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(At.questionDot,2)}if(63===t){if(e>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(At.assign,3);return this.finishOp(At.coalesce,2)}}return this.finishOp(At.question,1)},ns.readToken_numberSign=function(){var e=35;if(this.options.ecmaVersion>=13&&(++this.pos,xt(e=this.fullCharCodeAtPos(),!0)||92===e))return this.finishToken(At.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Ht(e)+"'")},ns.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(At.parenL);case 41:return++this.pos,this.finishToken(At.parenR);case 59:return++this.pos,this.finishToken(At.semi);case 44:return++this.pos,this.finishToken(At.comma);case 91:return++this.pos,this.finishToken(At.bracketL);case 93:return++this.pos,this.finishToken(At.bracketR);case 123:return++this.pos,this.finishToken(At.braceL);case 125:return++this.pos,this.finishToken(At.braceR);case 58:return++this.pos,this.finishToken(At.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(At.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(At.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Ht(e)+"'")},ns.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},ns.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var s=this.input.charAt(this.pos);if($t.test(s)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if("["===s)t=!0;else if("]"===s&&t)t=!1;else if("/"===s&&!t)break;e="\\"===s}++this.pos}var r=this.input.slice(n,this.pos);++this.pos;var a=this.pos,i=this.readWord1();this.containsEsc&&this.unexpected(a);var o=this.regexpState||(this.regexpState=new zn(this));o.reset(n,r,i),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var l=null;try{l=new RegExp(r,i)}catch(e){}return this.finishToken(At.regexp,{pattern:r,flags:i,value:l})},ns.readInt=function(e,t,n){for(var s=this.options.ecmaVersion>=12&&void 0===t,r=n&&48===this.input.charCodeAt(this.pos),a=this.pos,i=0,o=0,l=0,c=null==t?1/0:t;l=97?p-97+10:p>=65?p-65+10:p>=48&&p<=57?p-48:1/0)>=e)break;o=p,i=i*e+u}}return s&&95===o&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===a||null!=t&&this.pos-a!==t?null:i},ns.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return null==n&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(n=ss(this.input.slice(t,this.pos)),++this.pos):xt(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(At.num,n)},ns.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10,void 0,!0)||this.raise(t,"Invalid number");var n=this.pos-t>=2&&48===this.input.charCodeAt(t);n&&this.strict&&this.raise(t,"Invalid number");var s=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&110===s){var r=ss(this.input.slice(t,this.pos));return++this.pos,xt(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(At.num,r)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),46!==s||n||(++this.pos,this.readInt(10),s=this.input.charCodeAt(this.pos)),69!==s&&101!==s||n||(43!==(s=this.input.charCodeAt(++this.pos))&&45!==s||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),xt(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a,i=(a=this.input.slice(t,this.pos),n?parseInt(a,8):parseFloat(a.replace(/_/g,"")));return this.finishToken(At.num,i)},ns.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},ns.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var s=this.input.charCodeAt(this.pos);if(s===e)break;92===s?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):8232===s||8233===s?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Rt(s)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(At.string,t)};var rs={};ns.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==rs)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},ns.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw rs;this.raise(e,t)},ns.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==At.template&&this.type!==At.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(At.template,e)):36===n?(this.pos+=2,this.finishToken(At.dollarBraceL)):(++this.pos,this.finishToken(At.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Rt(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},ns.readInvalidTemplateToken=function(){for(;this.pos=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),"0"===s&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return Rt(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}},ns.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},ns.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,s=this.options.ecmaVersion>=6;this.pos...",!0,!0)},p=new RegExp(`^(?:${Object.keys(o).join("|")})$`);l.jsxTagStart.updateContext=function(){this.context.push(c.tc_expr),this.context.push(c.tc_oTag),this.exprAllowed=!1},l.jsxTagEnd.updateContext=function(e){let t=this.context.pop();t===c.tc_oTag&&e===At.slash||t===c.tc_cTag?(this.context.pop(),this.exprAllowed=this.curContext()===c.tc_expr):this.exprAllowed=!0},n={tokTypes:{...o,...l},tokContexts:{...c},keywordsRegExp:p,tokenIsLiteralPropertyName:e,tokenIsKeywordOrIdentifier:t,tokenIsIdentifier:s,tokenIsTSDeclarationStart:r,tokenIsTSTypeOperator:a,tokenIsTemplate:i}}return n}var us=1024,ds=new RegExp("(?=("+/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/y.source+"))\\1"+/(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source,"y"),hs=class{constructor(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}};function ms(e,t){const n=t.key.name,s=e[n];let r="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(r=(t.static?"s":"i")+t.kind),"iget"===s&&"iset"===r||"iset"===s&&"iget"===r||"sget"===s&&"sset"===r||"sset"===s&&"sget"===r?(e[n]="true",!1):!!s||(e[n]=r,!1)}function fs(e,t){const{computed:n,key:s}=e;return!n&&("Identifier"===s.type&&s.name===t||"Literal"===s.type&&s.value===t)}var ys={AbstractMethodHasImplementation:({methodName:e})=>`Method '${e}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:e})=>`Property '${e}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",CannotFindName:({name:e})=>`Cannot find name '${e}'.`,ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:e})=>`'declare' is not allowed in ${e}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:()=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",IncompatibleModifiers:({modifiers:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",MixedLabeledAndUnlabeledElements:"Tuple members must all have names or all not have names.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,PrivateMethodsHasAccessibility:({modifier:e})=>`Private methods cannot have an accessibility modifier ('${e}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",GenericsEndWithComma:"Trailing comma is not allowed at the end of generics.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`,LetInLexicalBinding:"'let' is not allowed to be used as a name in 'let' or 'const' declarations."},vs={UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",TrailingDecorator:"Decorators must be attached to a class element.",SpreadElementDecorator:"Decorators can't be used with SpreadElement"};var gs=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function bs(e){if(!e)throw new Error("Assert fail")}function _s(e){return"accessor"===e}function xs(e){return"in"===e||"out"===e}var Cs={SCOPE_TOP:1,SCOPE_FUNCTION:2,SCOPE_ASYNC:4,SCOPE_GENERATOR:8,SCOPE_ARROW:16,SCOPE_SIMPLE_CATCH:32,SCOPE_SUPER:64,SCOPE_DIRECT_SUPER:128,SCOPE_CLASS_STATIC_BLOCK:256,SCOPE_VAR:256,BIND_NONE:0,BIND_VAR:1,BIND_LEXICAL:2,BIND_FUNCTION:3,BIND_SIMPLE_CATCH:4,BIND_OUTSIDE:5,BIND_TS_TYPE:6,BIND_TS_INTERFACE:7,BIND_TS_NAMESPACE:8,BIND_FLAGS_TS_EXPORT_ONLY:1024,BIND_FLAGS_TS_IMPORT:4096,BIND_FLAGS_TS_ENUM:256,BIND_FLAGS_TS_CONST_ENUM:512,BIND_FLAGS_CLASS:128};function ws(e,t){return Cs.SCOPE_FUNCTION|(e?Cs.SCOPE_ASYNC:0)|(t?Cs.SCOPE_GENERATOR:0)}function ks(e){if("MemberExpression"!==e.type)return!1;const{computed:t,property:n}=e;return(!t||!("TemplateLiteral"!==n.type||n.expressions.length>0))&&Ss(e.object)}function Ss(e){return"Identifier"===e.type||"MemberExpression"===e.type&&(!e.computed&&Ss(e.object))}function Ps(e){return"private"===e||"public"===e||"protected"===e}const Es=Zt.extend(function(e){const{dts:t=!1}={},n=!!e?.jsx;return function(e){const s=e.acorn||is,r=ps(s),a=s.tokTypes,i=s.keywordTypes,o=s.isIdentifierStart,l=s.lineBreak,c=s.isNewLine,p=s.tokContexts,u=s.isIdentifierChar,{tokTypes:d,tokContexts:h,keywordsRegExp:m,tokenIsLiteralPropertyName:f,tokenIsTemplate:y,tokenIsTSDeclarationStart:v,tokenIsIdentifier:g,tokenIsKeywordOrIdentifier:b,tokenIsTSTypeOperator:_}=r;function x(e,t,n=e.length){for(let s=t;s{this.tsParseModifiers({modified:e,allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:ys.InvalidModifierOnTypeParameterPositions})},this.ecmaVersion=this.options.ecmaVersion}static get acornTypeScript(){return r}get acornTypeScript(){return r}getTokenFromCodeInType(e){return 62===e||60===e?this.finishOp(a.relational,1):super.getTokenFromCode(e)}readToken(e){if(!this.inType){let t=this.curContext();if(t===h.tc_expr)return this.jsx_readToken();if(t===h.tc_oTag||t===h.tc_cTag){if(o(e))return this.jsx_readWord();if(62==e)return++this.pos,this.finishToken(d.jsxTagEnd);if((34===e||39===e)&&t==h.tc_oTag)return this.jsx_readString(e)}if(60===e&&this.exprAllowed&&33!==this.input.charCodeAt(this.pos+1))return++this.pos,this.finishToken(a.relational,"<")}return super.readToken(e)}getTokenFromCode(e){return this.inType?this.getTokenFromCodeInType(e):64===e?(++this.pos,this.finishToken(d.at)):super.getTokenFromCode(e)}isAbstractClass(){return this.ts_isContextual(d.abstract)&&this.lookahead().type===a._class}finishNode(e,t){return""!==e.type&&0!==e.end?e:super.finishNode(e,t)}tryParse(e,t=this.cloneCurLookaheadState()){const n={node:null};try{return{node:e(((e=null)=>{throw n.node=e,n})),error:null,thrown:!1,aborted:!1,failState:null}}catch(e){const s=this.getCurLookaheadState();if(this.setLookaheadState(t),e instanceof SyntaxError)return{node:null,error:e,thrown:!0,aborted:!1,failState:s};if(e===n)return{node:n.node,error:null,thrown:!1,aborted:!0,failState:s};throw e}}setOptionalParametersError(e,t){e.optionalParametersLoc=t?.loc??this.startLoc}reScan_lt_gt(){this.type===a.relational&&(this.pos-=1,this.readToken_lt_gt(this.fullCharCodeAtPos()))}reScan_lt(){const{type:e}=this;return e===a.bitShift?(this.pos-=2,this.finishOp(a.relational,1),a.relational):e}resetEndLocation(e,t=this.lastTokEnd,n=this.lastTokEndLoc){e.end=t,e.loc.end=n,this.options.ranges&&(e.range[1]=t)}startNodeAtNode(e){return super.startNodeAt(e.start,e.loc.start)}nextTokenStart(){return this.nextTokenStartSince(this.pos)}tsHasSomeModifiers(e,t){return t.some((t=>Ps(t)?e.accessibility===t:!!e[t]))}tsIsStartOfStaticBlocks(){return this.isContextual("static")&&123===this.lookaheadCharCode()}tsCheckForInvalidTypeCasts(e){e.forEach((e=>{"TSTypeCastExpression"===e?.type&&this.raise(e.typeAnnotation.start,ys.UnexpectedTypeAnnotation)}))}atPossibleAsyncArrow(e){return"Identifier"===e.type&&"async"===e.name&&this.lastTokEndLoc.column===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&e.start===this.potentialArrowAt}tsIsIdentifier(){return g(this.type)}tsTryParseTypeOrTypePredicateAnnotation(){return this.match(a.colon)?this.tsParseTypeOrTypePredicateAnnotation(a.colon):void 0}tsTryParseGenericAsyncArrowFunction(e,t,n){if(!this.tsMatchLeftRelational())return;const s=this.maybeInArrowParameters;this.maybeInArrowParameters=!0;const r=this.tsTryParseAndCatch((()=>{const n=this.startNodeAt(e,t);return n.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(n),n.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(a.arrow),n}));return this.maybeInArrowParameters=s,r?super.parseArrowExpression(r,null,!0,n):void 0}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===a.relational)return this.tsParseTypeArguments()}tsInNoContext(e){const t=this.context;this.context=[t[0]];try{return e()}finally{this.context=t}}tsTryParseTypeAnnotation(){return this.match(a.colon)?this.tsParseTypeAnnotation():void 0}isUnparsedContextual(e,t){const n=e+t.length;if(this.input.slice(e,n)===t){const e=this.input.charCodeAt(n);return!(u(e)||55296==(64512&e))}return!1}isAbstractConstructorSignature(){return this.ts_isContextual(d.abstract)&&this.lookahead().type===a._new}nextTokenStartSince(e){return gs.lastIndex=e,gs.test(this.input)?gs.lastIndex:e}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}compareLookaheadState(e,t){for(const n of Object.keys(e))if(e[n]!==t[n])return!1;return!0}createLookaheadState(){this.value=null,this.context=[this.curContext()]}getCurLookaheadState(){return{endLoc:this.endLoc,lastTokEnd:this.lastTokEnd,lastTokStart:this.lastTokStart,lastTokStartLoc:this.lastTokStartLoc,pos:this.pos,value:this.value,type:this.type,start:this.start,end:this.end,context:this.context,startLoc:this.startLoc,lastTokEndLoc:this.lastTokEndLoc,curLine:this.curLine,lineStart:this.lineStart,curPosition:this.curPosition,containsEsc:this.containsEsc}}cloneCurLookaheadState(){return{pos:this.pos,value:this.value,type:this.type,start:this.start,end:this.end,context:this.context&&this.context.slice(),startLoc:this.startLoc,lastTokEndLoc:this.lastTokEndLoc,endLoc:this.endLoc,lastTokEnd:this.lastTokEnd,lastTokStart:this.lastTokStart,lastTokStartLoc:this.lastTokStartLoc,curLine:this.curLine,lineStart:this.lineStart,curPosition:this.curPosition,containsEsc:this.containsEsc}}setLookaheadState(e){this.pos=e.pos,this.value=e.value,this.endLoc=e.endLoc,this.lastTokEnd=e.lastTokEnd,this.lastTokStart=e.lastTokStart,this.lastTokStartLoc=e.lastTokStartLoc,this.type=e.type,this.start=e.start,this.end=e.end,this.context=e.context,this.startLoc=e.startLoc,this.lastTokEndLoc=e.lastTokEndLoc,this.curLine=e.curLine,this.lineStart=e.lineStart,this.curPosition=e.curPosition,this.containsEsc=e.containsEsc}tsLookAhead(e){const t=this.getCurLookaheadState(),n=e();return this.setLookaheadState(t),n}lookahead(e){const t=this.getCurLookaheadState();if(this.createLookaheadState(),this.isLookahead=!0,void 0!==e)for(let t=0;t-1;)++this.curLine,n=this.lineStart=e;this.isLookahead||this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())}skipLineComment(e){let t,n=this.pos;this.isLookahead||(t=this.options.onComment&&this.curPosition());let s=this.input.charCodeAt(this.pos+=e);for(;this.pos{if(n===a._function)return e.declare=!0,this.parseFunctionStatement(e,!1,!0);if(n===a._class)return e.declare=!0,this.parseClass(e,!0);if(n===d.enum)return this.tsParseEnumDeclaration(e,{declare:!0});if(n===d.global)return this.tsParseAmbientExternalModuleDeclaration(e);if(n===a._const||n===a._var)return this.match(a._const)&&this.isLookaheadContextual("enum")?(this.expect(a._const),this.tsParseEnumDeclaration(e,{const:!0,declare:!0})):(e.declare=!0,this.parseVarStatement(e,t||this.value,!0));if(n===d.interface){const t=this.tsParseInterfaceDeclaration(e,{declare:!0});if(t)return t}return g(n)?this.tsParseDeclaration(e,this.value,!0):void 0}))}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(a.braceR);case"HeritageClauseElement":return this.match(a.braceL);case"TupleElementTypes":return this.match(a.bracketR);case"TypeParametersOrArguments":return this.tsMatchRightRelational()}}tsParseDelimitedListWorker(e,t,n,s){const r=[];let i=-1;for(;!this.tsIsListTerminator(e);){i=-1;const s=t();if(null==s)return;if(r.push(s),!this.eat(a.comma)){if(this.tsIsListTerminator(e))break;return void(n&&this.expect(a.comma))}i=this.lastTokStart}return s&&(s.value=i),r}tsParseDelimitedList(e,t,n){return function(e){if(null==e)throw new Error(`Unexpected ${e} value.`);return e}(this.tsParseDelimitedListWorker(e,t,!0,n))}tsParseBracketedList(e,t,n,s,r){s||(n?this.expect(a.bracketL):this.expect(a.relational));const i=this.tsParseDelimitedList(e,t,r);return n?this.expect(a.bracketR):this.expect(a.relational),i}tsParseTypeParameterName(){return this.parseIdent().name}tsEatThenParseType(e){return this.match(e)?this.tsNextThenParseType():void 0}tsExpectThenParseType(e){return this.tsDoThenParseType((()=>this.expect(e)))}tsNextThenParseType(){return this.tsDoThenParseType((()=>this.next()))}tsDoThenParseType(e){return this.tsInType((()=>(e(),this.tsParseType())))}tsSkipParameterStart(){if(g(this.type)||this.match(a._this))return this.next(),!0;if(this.match(a.braceL))try{return this.parseObj(!0),!0}catch{return!1}if(this.match(a.bracketL)){this.next();try{return this.parseBindingList(a.bracketR,!0,!0),!0}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(a.parenR)||this.match(a.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(a.colon)||this.match(a.comma)||this.match(a.question)||this.match(a.eq))return!0;if(this.match(a.parenR)&&(this.next(),this.match(a.arrow)))return!0}return!1}tsIsStartOfFunctionType(){return!!this.tsMatchLeftRelational()||this.match(a.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsInAllowConditionalTypesContext(e){const t=this.inDisallowConditionalTypesContext;this.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.inDisallowConditionalTypesContext=t}}tsParseBindingListForSignature(){return super.parseBindingList(a.parenR,!0,!0).map((e=>("Identifier"!==e.type&&"RestElement"!==e.type&&"ObjectPattern"!==e.type&&"ArrayPattern"!==e.type&&this.raise(e.start,ys.UnsupportedSignatureParameterKind(e.type)),e)))}tsParseTypePredicateAsserts(){if(this.type!==d.asserts)return!1;const e=this.containsEsc;return this.next(),!(!g(this.type)&&!this.match(a._this))&&(e&&this.raise(this.lastTokStart,"Escape sequence in keyword asserts"),!0)}tsParseThisTypeNode(){const e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeAnnotation(e=!0,t=this.startNode()){return this.tsInType((()=>{e&&this.expect(a.colon),t.typeAnnotation=this.tsParseType()})),this.finishNode(t,"TSTypeAnnotation")}tsParseThisTypePredicate(e){this.next();const t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),t.asserts=!1,this.finishNode(t,"TSTypePredicate")}tsParseThisTypeOrThisTypePredicate(){const e=this.tsParseThisTypeNode();return this.isContextual("is")&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseTypePredicatePrefix(){const e=this.parseIdent();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType((()=>{const t=this.startNode();this.expect(e);const n=this.startNode(),s=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(s&&this.match(a._this)){let e=this.tsParseThisTypeOrThisTypePredicate();return"TSThisType"===e.type?(n.parameterName=e,n.asserts=!0,n.typeAnnotation=null,e=this.finishNode(n,"TSTypePredicate")):(this.resetStartLocationFromNode(e,n),e.asserts=!0),t.typeAnnotation=e,this.finishNode(t,"TSTypeAnnotation")}const r=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!r)return s?(n.parameterName=this.parseIdent(),n.asserts=s,n.typeAnnotation=null,t.typeAnnotation=this.finishNode(n,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,t);const i=this.tsParseTypeAnnotation(!1);return n.parameterName=r,n.typeAnnotation=i,n.asserts=s,t.typeAnnotation=this.finishNode(n,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")}))}tsFillSignature(e,t){const n=e===a.arrow,s="typeAnnotation";t.typeParameters=this.tsTryParseTypeParameters(),this.expect(a.parenL),t.parameters=this.tsParseBindingListForSignature(),(n||this.match(e))&&(t[s]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsTryNextParseConstantContext(){if(this.lookahead().type!==a._const)return null;this.next();const e=this.tsParseTypeReference();return(e.typeParameters||e.typeArguments)&&this.raise(e.typeName.start,ys.CannotFindName({name:"const"})),e}tsParseFunctionOrConstructorType(e,t){const n=this.startNode();return"TSConstructorType"===e&&(n.abstract=!!t,t&&this.next(),this.next()),this.tsInAllowConditionalTypesContext((()=>this.tsFillSignature(a.arrow,n))),this.finishNode(n,e)}tsParseUnionOrIntersectionType(e,t,n){const s=this.startNode(),r=this.eat(n),a=[];do{a.push(t())}while(this.eat(n));return 1!==a.length||r?(s.types=a,this.finishNode(s,e)):a[0]}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(e.start,ys.UnexpectedReadonly)}}tsParseTypeOperator(){const e=this.startNode(),t=this.value;return this.next(),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===t&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsParseConstraintForInferType(){if(this.eat(a._extends)){const e=this.tsInDisallowConditionalTypesContext((()=>this.tsParseType()));if(this.inDisallowConditionalTypesContext||!this.match(a.question))return e}}tsParseInferType(){const e=this.startNode();this.expectContextual("infer");const t=this.startNode();return t.name=this.tsParseTypeParameterName(),t.constraint=this.tsTryParse((()=>this.tsParseConstraintForInferType())),e.typeParameter=this.finishNode(t,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseLiteralTypeNode(){const e=this.startNode();return e.literal=(()=>{switch(this.type){case a.num:case a.string:case a._true:case a._false:return this.parseExprAtom();default:this.unexpected()}})(),this.finishNode(e,"TSLiteralType")}tsParseImportType(){const e=this.startNode();return this.expect(a._import),this.expect(a.parenL),this.match(a.string)||this.raise(this.start,ys.UnsupportedImportTypeArgument),e.argument=this.parseExprAtom(),this.expect(a.parenR),this.eat(a.dot)&&(e.qualifier=this.tsParseEntityName()),this.tsMatchLeftRelational()&&(e.typeArguments=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseTypeQuery(){const e=this.startNode();return this.expect(a._typeof),this.match(a._import)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.tsMatchLeftRelational()&&(e.typeArguments=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseMappedTypeParameter(){const e=this.startNode();return e.name=this.tsParseTypeParameterName(),e.constraint=this.tsExpectThenParseType(a._in),this.finishNode(e,"TSTypeParameter")}tsParseMappedType(){const e=this.startNode();return this.expect(a.braceL),this.match(a.plusMin)?(e.readonly=this.value,this.next(),this.expectContextual("readonly")):this.eatContextual("readonly")&&(e.readonly=!0),this.expect(a.bracketL),e.typeParameter=this.tsParseMappedTypeParameter(),e.nameType=this.eatContextual("as")?this.tsParseType():null,this.expect(a.bracketR),this.match(a.plusMin)?(e.optional=this.value,this.next(),this.expect(a.question)):this.eat(a.question)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(a.braceR),this.finishNode(e,"TSMappedType")}tsParseTypeLiteral(){const e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseTupleElementType(){const e=this.startLoc,t=this.start,n=this.eat(a.ellipsis);let s=this.tsParseType();const r=this.eat(a.question);if(this.eat(a.colon)){const e=this.startNodeAtNode(s);e.optional=r,"TSTypeReference"!==s.type||s.typeArguments||"Identifier"!==s.typeName.type?(this.raise(s.start,ys.InvalidTupleMemberLabel),e.label=s):e.label=s.typeName,e.elementType=this.tsParseType(),s=this.finishNode(e,"TSNamedTupleMember")}else if(r){const e=this.startNodeAtNode(s);e.typeAnnotation=s,s=this.finishNode(e,"TSOptionalType")}if(n){const n=this.startNodeAt(t,e);n.typeAnnotation=s,s=this.finishNode(n,"TSRestType")}return s}tsParseTupleType(){const e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let t=!1,n=null;return e.elementTypes.forEach((e=>{const{type:s}=e;!t||"TSRestType"===s||"TSOptionalType"===s||"TSNamedTupleMember"===s&&e.optional||this.raise(e.start,ys.OptionalTypeBeforeRequired),t||="TSNamedTupleMember"===s&&e.optional||"TSOptionalType"===s;let r=s;"TSRestType"===s&&(r=(e=e.typeAnnotation).type);const a="TSNamedTupleMember"===r;n??=a,n!==a&&this.raise(e.start,ys.MixedLabeledAndUnlabeledElements)})),this.finishNode(e,"TSTupleType")}tsParseTemplateLiteralType(){const e=this.startNode();return e.literal=this.parseTemplate({isTagged:!1}),this.finishNode(e,"TSLiteralType")}tsParseTypeReference(){const e=this.startNode();return e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.tsMatchLeftRelational()&&(e.typeArguments=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsMatchLeftRelational(){return this.match(a.relational)&&"<"===this.value}tsMatchRightRelational(){return this.match(a.relational)&&">"===this.value}tsParseParenthesizedType(){const e=this.startNode();return this.expect(a.parenL),e.typeAnnotation=this.tsParseType(),this.expect(a.parenR),this.finishNode(e,"TSParenthesizedType")}tsParseNonArrayType(){switch(this.type){case a.string:case a.num:case a._true:case a._false:return this.tsParseLiteralTypeNode();case a.plusMin:if("-"===this.value){const e=this.startNode();return this.lookahead().type!==a.num&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case a._this:return this.tsParseThisTypeOrThisTypePredicate();case a._typeof:return this.tsParseTypeQuery();case a._import:return this.tsParseImportType();case a.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case a.bracketL:return this.tsParseTupleType();case a.parenL:return this.tsParseParenthesizedType();case a.backQuote:case a.dollarBraceL:return this.tsParseTemplateLiteralType();default:{const{type:e}=this;if(g(e)||e===a._void||e===a._null){const t=e===a._void?"TSVoidKeyword":e===a._null?"TSNullKeyword":function(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}(this.value);if(void 0!==t&&46!==this.lookaheadCharCode()){const e=this.startNode();return this.next(),this.finishNode(e,t)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(a.bracketL);)if(this.match(a.bracketR)){const t=this.startNodeAtNode(e);t.elementType=e,this.expect(a.bracketR),e=this.finishNode(t,"TSArrayType")}else{const t=this.startNodeAtNode(e);t.objectType=e,t.indexType=this.tsParseType(),this.expect(a.bracketR),e=this.finishNode(t,"TSIndexedAccessType")}return e}tsParseTypeOperatorOrHigher(){return _(this.type)&&!this.containsEsc?this.tsParseTypeOperator():this.isContextual("infer")?this.tsParseInferType():this.tsInAllowConditionalTypesContext((()=>this.tsParseArrayTypeOrHigher()))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),a.bitwiseAND)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),a.bitwiseOR)}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(a._new)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseType(){bs(this.inType);const e=this.tsParseNonConditionalType();if(this.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(a._extends))return e;const t=this.startNodeAtNode(e);return t.checkType=e,t.extendsType=this.tsInDisallowConditionalTypesContext((()=>this.tsParseNonConditionalType())),this.expect(a.question),t.trueType=this.tsInAllowConditionalTypesContext((()=>this.tsParseType())),this.expect(a.colon),t.falseType=this.tsInAllowConditionalTypesContext((()=>this.tsParseType())),this.finishNode(t,"TSConditionalType")}tsIsUnambiguouslyIndexSignature(){return this.next(),!!g(this.type)&&(this.next(),this.match(a.colon))}tsInType(e){const t=this.inType;this.inType=!0;try{return e()}finally{this.inType=t}}tsTryParseIndexSignature(e){if(!this.match(a.bracketL)||!this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))return;this.expect(a.bracketL);const t=this.parseIdent();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(a.bracketR),e.parameters=[t];const n=this.tsTryParseTypeAnnotation();return n&&(e.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParseNoneModifiers(e){this.tsParseModifiers({modified:e,allowedModifiers:[],disallowedModifiers:["in","out"],errorTemplate:ys.InvalidModifierOnTypeParameterPositions})}tsParseTypeParameter(e=this.tsParseNoneModifiers.bind(this)){const t=this.startNode();return e(t),t.name=this.tsParseTypeParameterName(),t.constraint=this.tsEatThenParseType(a._extends),t.default=this.tsEatThenParseType(a.eq),this.finishNode(t,"TSTypeParameter")}tsParseTypeParameters(e){const t=this.startNode();this.tsMatchLeftRelational()||this.matchJsx("jsxTagStart")?this.next():this.unexpected();const n={value:-1};return t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,n),0===t.params.length&&this.raise(this.start,ys.EmptyTypeParameters),-1!==n.value&&this.addExtra(t,"trailingComma",n.value),this.finishNode(t,"TSTypeParameterDeclaration")}tsTryParseTypeParameters(e){if(this.tsMatchLeftRelational())return this.tsParseTypeParameters(e)}tsTryParse(e){const t=this.getCurLookaheadState(),n=e();return void 0!==n&&!1!==n?n:void this.setLookaheadState(t)}tsTokenCanFollowModifier(){return(this.match(a.bracketL)||this.match(a.braceL)||this.match(a.star)||this.match(a.ellipsis)||this.match(a.privateId)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(!0),this.tsTokenCanFollowModifier()}tsParseModifier(e,t){const n=this.value;if(-1!==e.indexOf(n)&&!this.containsEsc){if(t&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return n}}tsParseModifiersByMap({modified:e,map:t}){for(const n of Object.keys(t))e[n]=t[n]}tsParseModifiers({modified:e,allowedModifiers:t,disallowedModifiers:n,stopOnStartOfClassStaticBlock:s,errorTemplate:r=ys.InvalidModifierOnTypeMember}){const a={},i=(t,n,s,r)=>{n===s&&e[r]&&this.raise(t.column,ys.InvalidModifiersOrder({orderedModifiers:[s,r]}))},o=(t,n,s,r)=>{(e[s]&&n===r||e[r]&&n===s)&&this.raise(t.column,ys.IncompatibleModifiers({modifiers:[s,r]}))};for(;;){const l=this.startLoc,c=this.tsParseModifier(t.concat(n??[]),s);if(!c)break;Ps(c)?e.accessibility?this.raise(this.start,ys.DuplicateAccessibilityModifier()):(i(l,c,c,"override"),i(l,c,c,"static"),i(l,c,c,"readonly"),i(l,c,c,"accessor"),a.accessibility=c,e.accessibility=c):xs(c)?e[c]?this.raise(this.start,ys.DuplicateModifier({modifier:c})):(i(l,c,"in","out"),a[c]=c,e[c]=!0):_s(c)?e[c]?this.raise(this.start,ys.DuplicateModifier({modifier:c})):(o(l,c,"accessor","readonly"),o(l,c,"accessor","static"),o(l,c,"accessor","override"),a[c]=c,e[c]=!0):"const"===c?e[c]?this.raise(this.start,ys.DuplicateModifier({modifier:c})):(a[c]=c,e[c]=!0):Object.hasOwnProperty.call(e,c)?this.raise(this.start,ys.DuplicateModifier({modifier:c})):(i(l,c,"static","readonly"),i(l,c,"static","override"),i(l,c,"override","readonly"),i(l,c,"abstract","override"),o(l,c,"declare","override"),o(l,c,"static","abstract"),a[c]=c,e[c]=!0),n?.includes(c)&&this.raise(this.start,r)}return a}tsParseInOutModifiers(e){this.tsParseModifiers({modified:e,allowedModifiers:["in","out"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:ys.InvalidModifierOnTypeParameter})}parseMaybeUnary(e,t,n,s){return this.tsMatchLeftRelational()?this.tsParseTypeAssertion():super.parseMaybeUnary(e,t,n,s)}tsParseTypeAssertion(){const e=this.tryParse((()=>{const e=this.startNode(),t=this.tsTryNextParseConstantContext();return e.typeAnnotation=t||this.tsNextThenParseType(),this.expect(a.relational),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}));return e.error?this.tsParseTypeParameters(this.tsParseConstModifier):e.node}tsParseTypeArguments(){const e=this.startNode();return e.params=this.tsInType((()=>this.tsInNoContext((()=>(this.expect(a.relational),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))))),0===e.params.length&&this.raise(this.start,ys.EmptyTypeArguments),this.exprAllowed=!1,this.expect(a.relational),this.finishNode(e,"TSTypeParameterInstantiation")}tsParseHeritageClause(e){const t=this.start,n=this.tsParseDelimitedList("HeritageClauseElement",(()=>{const e=this.startNode();return e.expression=this.tsParseEntityName(),this.tsMatchLeftRelational()&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSExpressionWithTypeArguments")}));return n.length||this.raise(t,ys.EmptyHeritageClauseType({token:e})),n}tsParseTypeMemberSemicolon(){this.eat(a.comma)||this.isLineTerminator()||this.expect(a.semi)}tsTryParseAndCatch(e){const t=this.tryParse((t=>e()||t()));if(!t.aborted&&t.node)return t.error&&this.setLookaheadState(t.failState),t.node}tsParseSignatureMember(e,t){return this.tsFillSignature(a.colon,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)}tsParsePropertyOrMethodSignature(e,t){this.eat(a.question)&&(e.optional=!0);const n=e;if(this.match(a.parenL)||this.tsMatchLeftRelational()){t&&this.raise(e.start,ys.ReadonlyForMethodSignature);const s=n;s.kind&&this.tsMatchLeftRelational()&&this.raise(this.start,ys.AccesorCannotHaveTypeParameters),this.tsFillSignature(a.colon,s),this.tsParseTypeMemberSemicolon();const r="parameters",i="typeAnnotation";if("get"===s.kind)s[r].length>0&&(this.raise(this.start,"A 'get' accesor must not have any formal parameters."),this.isThisParam(s[r][0])&&this.raise(this.start,ys.AccesorCannotDeclareThisParameter));else if("set"===s.kind){if(1!==s[r].length)this.raise(this.start,"A 'get' accesor must not have any formal parameters.");else{const e=s[r][0];this.isThisParam(e)&&this.raise(this.start,ys.AccesorCannotDeclareThisParameter),"Identifier"===e.type&&e.optional&&this.raise(this.start,ys.SetAccesorCannotHaveOptionalParameter),"RestElement"===e.type&&this.raise(this.start,ys.SetAccesorCannotHaveRestParameter)}s[i]&&this.raise(s[i].start,ys.SetAccesorCannotHaveReturnType)}else s.kind="method";return this.finishNode(s,"TSMethodSignature")}{const e=n;t&&(e.readonly=!0);const s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSPropertySignature")}}tsParseTypeMember(){const e=this.startNode();if(this.match(a.parenL)||this.tsMatchLeftRelational())return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(a._new)){const t=this.startNode();return this.next(),this.match(a.parenL)||this.tsMatchLeftRelational()?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(t,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers({modified:e,allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]});const t=this.tsTryParseIndexSignature(e);return t||(this.parsePropertyName(e),e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||!this.tsTokenCanFollowModifier()||(e.kind=e.key.name,this.parsePropertyName(e)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseList(e,t){const n=[];for(;!this.tsIsListTerminator(e);)n.push(t());return n}tsParseObjectTypeMembers(){this.expect(a.braceL);const e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(a.braceR),e}tsParseInterfaceDeclaration(e,t={}){if(this.hasFollowingLineBreak())return null;this.expectContextual("interface"),t.declare&&(e.declare=!0),g(this.type)?(e.id=this.parseIdent(),this.checkLValSimple(e.id,Cs.BIND_TS_INTERFACE)):(e.id=null,this.raise(this.start,ys.MissingInterfaceName)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)),this.eat(a._extends)&&(e.extends=this.tsParseHeritageClause("extends"));const n=this.startNode();return n.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(n,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseAbstractDeclaration(e){if(this.match(a._class))return e.abstract=!0,this.parseClass(e,!0);if(this.ts_isContextual(d.interface)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.tsParseInterfaceDeclaration(e)}else this.unexpected(e.start)}tsIsDeclarationStart(){return v(this.type)}tsParseExpressionStatement(e,t){switch(t.name){case"declare":{const t=this.tsTryParseDeclare(e);if(t)return t.declare=!0,t;break}case"global":if(this.match(a.braceL)){this.enterScope(us);const n=e;return n.global=!0,n.id=t,n.body=this.tsParseModuleBlock(),super.exitScope(),this.finishNode(n,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,t.name,!1)}}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsIsExportDefaultSpecifier(){const{type:e}=this,t=this.isAsyncFunction(),n=this.isLet();if(g(e)){if(t&&!this.containsEsc||n)return!1;if((e===d.type||e===d.interface)&&!this.containsEsc){const e=this.lookahead();if(g(e.type)&&!this.isContextualWithState("from",e)||e.type===a.braceL)return!1}}else if(!this.match(a._default))return!1;const s=this.nextTokenStart(),r=this.isUnparsedContextual(s,"from");if(44===this.input.charCodeAt(s)||g(this.type)&&r)return!0;if(this.match(a._default)&&r){const e=this.input.charCodeAt(this.nextTokenStartSince(s+4));return 34===e||39===e}return!1}tsInAmbientContext(e){const t=this.isAmbientContext;this.isAmbientContext=!0;try{return e()}finally{this.isAmbientContext=t}}tsCheckLineTerminator(e){return e?!this.hasFollowingLineBreak()&&(this.next(),!0):!this.isLineTerminator()}tsParseModuleOrNamespaceDeclaration(e,t=!1){if(e.id=this.parseIdent(),t||this.checkLValSimple(e.id,Cs.BIND_TS_NAMESPACE),this.eat(a.dot)){const t=this.startNode();this.tsParseModuleOrNamespaceDeclaration(t,!0),e.body=t}else this.enterScope(us),e.body=this.tsParseModuleBlock(),super.exitScope();return this.finishNode(e,"TSModuleDeclaration")}checkLValSimple(e,t=Cs.BIND_NONE,n){return"TSNonNullExpression"!==e.type&&"TSAsExpression"!==e.type||(e=e.expression),super.checkLValSimple(e,t,n)}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdent(),this.checkLValSimple(e.id,Cs.BIND_TS_TYPE),e.typeAnnotation=this.tsInType((()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)),this.expect(a.eq),this.ts_isContextual(d.interface)&&this.lookahead().type!==a.dot){const e=this.startNode();return this.next(),this.finishNode(e,"TSIntrinsicKeyword")}return this.tsParseType()})),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsParseDeclaration(e,t,n){switch(t){case"abstract":if(this.tsCheckLineTerminator(n)&&(this.match(a._class)||g(this.type)))return this.tsParseAbstractDeclaration(e);break;case"module":if(this.tsCheckLineTerminator(n)){if(this.match(a.string))return this.tsParseAmbientExternalModuleDeclaration(e);if(g(this.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(n)&&g(this.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(n)&&g(this.type))return this.tsParseTypeAliasDeclaration(e)}}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.value,!0)}tsParseImportEqualsDeclaration(e,t){e.isExport=t||!1,e.id=this.parseIdent(),this.checkLValSimple(e.id,Cs.BIND_LEXICAL),super.expect(a.eq);const n=this.tsParseModuleReference();return"type"===e.importKind&&"TSExternalModuleReference"!==n.type&&this.raise(n.start,ys.ImportAliasHasImportType),e.moduleReference=n,super.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}isExportDefaultSpecifier(){if(this.tsIsDeclarationStart())return!1;const{type:e}=this;if(g(e)){if(this.isContextual("async")||this.isContextual("let"))return!1;if((e===d.type||e===d.interface)&&!this.containsEsc){const e=this.lookahead();if(g(e.type)&&!this.isContextualWithState("from",e)||e.type===a.braceL)return!1}}else if(!this.match(a._default))return!1;const t=this.nextTokenStart(),n=this.isUnparsedContextual(t,"from");if(44===this.input.charCodeAt(t)||g(this.type)&&n)return!0;if(this.match(a._default)&&n){const e=this.input.charCodeAt(this.nextTokenStartSince(t+4));return 34===e||39===e}return!1}parseTemplate({isTagged:e=!1}={}){let t=this.startNode();this.next(),t.expressions=[];let n=this.parseTemplateElement({isTagged:e});for(t.quasis=[n];!n.tail;)this.type===a.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(a.dollarBraceL),t.expressions.push(this.inType?this.tsParseType():this.parseExpression()),this.expect(a.braceR),t.quasis.push(n=this.parseTemplateElement({isTagged:e}));return this.next(),this.finishNode(t,"TemplateLiteral")}parseFunction(e,t,n,s,r){this.initFunction(e),(this.ecmaVersion>=9||this.ecmaVersion>=6&&!s)&&(this.type===a.star&&2&t&&this.unexpected(),e.generator=this.eat(a.star)),this.ecmaVersion>=8&&(e.async=!!s),1&t&&(e.id=4&t&&this.type!==a.name?null:this.parseIdent());let i=this.yieldPos,o=this.awaitPos,l=this.awaitIdentPos;const c=this.maybeInArrowParameters;this.maybeInArrowParameters=!1,this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ws(e.async,e.generator)),1&t||(e.id=this.type===a.name?this.parseIdent():null),this.parseFunctionParams(e);const p=1&t;return this.parseFunctionBody(e,n,!1,r,{isFunctionDeclaration:p}),this.yieldPos=i,this.awaitPos=o,this.awaitIdentPos=l,1&t&&e.id&&!(2&t)&&(e.body?this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Cs.BIND_VAR:Cs.BIND_LEXICAL:Cs.BIND_FUNCTION):this.checkLValSimple(e.id,Cs.BIND_NONE)),this.maybeInArrowParameters=c,this.finishNode(e,p?"FunctionDeclaration":"FunctionExpression")}parseFunctionBody(e,t=!1,n=!1,s=!1,r){this.match(a.colon)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(a.colon));const i=r?.isFunctionDeclaration?"TSDeclareFunction":r?.isClassMethod?"TSDeclareMethod":void 0;return i&&!this.match(a.braceL)&&this.isLineTerminator()?this.finishNode(e,i):"TSDeclareFunction"===i&&this.isAmbientContext&&(this.raise(e.start,ys.DeclareFunctionHasImplementation),e.declare)?(super.parseFunctionBody(e,t,n,!1),this.finishNode(e,i)):(super.parseFunctionBody(e,t,n,s),e)}parseNew(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");let e=this.startNode(),t=this.parseIdent(!0);if(this.ecmaVersion>=6&&this.eat(a.dot)){e.meta=t;let n=this.containsEsc;return e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),n&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}let n=this.start,s=this.startLoc,r=this.type===a._import;e.callee=this.parseSubscripts(this.parseExprAtom(),n,s,!0,!1),r&&"ImportExpression"===e.callee.type&&this.raise(n,"Cannot use new with import()");const{callee:i}=e;return"TSInstantiationExpression"!==i.type||i.extra?.parenthesized||(e.typeArguments=i.typeArguments,e.callee=i.expression),this.eat(a.parenL)?e.arguments=this.parseExprList(a.parenR,this.ecmaVersion>=8,!1):e.arguments=[],this.finishNode(e,"NewExpression")}parseExprOp(e,t,n,s,r){if(a._in.binop>s&&!this.hasPrecedingLineBreak()){let a;if(this.isContextual("as")&&(a="TSAsExpression"),this.isContextual("satisfies")&&(a="TSSatisfiesExpression"),a){const i=this.startNodeAt(t,n);i.expression=e;const o=this.tsTryNextParseConstantContext();return i.typeAnnotation=o||this.tsNextThenParseType(),this.finishNode(i,a),this.reScan_lt_gt(),this.parseExprOp(i,t,n,s,r)}}return super.parseExprOp(e,t,n,s,r)}parseImportSpecifiers(){let e=[],t=!0;if(r.tokenIsIdentifier(this.type)&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(a.comma)))return e;if(this.type===a.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(a.braceL);!this.eat(a.braceR);){if(t)t=!1;else if(this.expect(a.comma),this.afterTrailingComma(a.braceR))break;e.push(this.parseImportSpecifier())}return e}parseImport(e){let t=this.lookahead();if(e.importKind="value",this.importOrExportOuterKind="value",g(t.type)||this.match(a.star)||this.match(a.braceL)){let n=this.lookahead(2);if(n.type!==a.comma&&!this.isContextualWithState("from",n)&&n.type!==a.eq&&this.ts_eatContextualWithState("type",1,t)&&(this.importOrExportOuterKind="type",e.importKind="type",t=this.lookahead(),n=this.lookahead(2)),g(t.type)&&n.type===a.eq){this.next();const t=this.tsParseImportEqualsDeclaration(e);return this.importOrExportOuterKind="value",t}}return this.next(),this.type===a.string?(e.specifiers=[],e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===a.string?this.parseExprAtom():this.unexpected()),this.parseMaybeImportAttributes(e),this.semicolon(),this.finishNode(e,"ImportDeclaration"),this.importOrExportOuterKind="value","type"===e.importKind&&e.specifiers.length>1&&"ImportDefaultSpecifier"===e.specifiers[0].type&&this.raise(e.start,ys.TypeImportCannotSpecifyDefaultAndNamed),e}parseExportDefaultDeclaration(){if(this.isAbstractClass()){const e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0)}if(this.match(d.interface)){const e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultDeclaration()}parseExportAllDeclaration(e,t){return this.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==a.string&&this.unexpected(),e.source=this.parseExprAtom(),this.parseMaybeImportAttributes(e),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")}parseDynamicImport(e){if(this.next(),e.source=this.parseMaybeAssign(),this.eat(a.comma)){const t=this.parseExpression();e.arguments=[t]}if(!this.eat(a.parenR)){const e=this.start;this.eat(a.comma)&&this.eat(a.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(e,"ImportExpression")}parseExport(e,t){let n=this.lookahead();if(this.ts_eatWithState(a._import,2,n)){this.ts_isContextual(d.type)&&61!==this.lookaheadCharCode()?(e.importKind="type",this.importOrExportOuterKind="type",this.next()):(e.importKind="value",this.importOrExportOuterKind="value");const t=this.tsParseImportEqualsDeclaration(e,!0);return this.importOrExportOuterKind=void 0,t}if(this.ts_eatWithState(a.eq,2,n)){const t=e;return t.expression=this.parseExpression(),this.semicolon(),this.importOrExportOuterKind=void 0,this.finishNode(t,"TSExportAssignment")}if(this.ts_eatContextualWithState("as",2,n)){const t=e;return this.expectContextual("namespace"),t.id=this.parseIdent(),this.semicolon(),this.importOrExportOuterKind=void 0,this.finishNode(t,"TSNamespaceExportDeclaration")}if(this.ts_isContextualWithState(n,d.type)&&this.lookahead(2).type===a.braceL?(this.next(),this.importOrExportOuterKind="type",e.exportKind="type"):(this.importOrExportOuterKind="value",e.exportKind="value"),this.next(),this.eat(a.star))return this.parseExportAllDeclaration(e,t);if(this.eat(a._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==a.string&&this.unexpected(),e.source=this.parseExprAtom(),this.parseMaybeImportAttributes(e);else{for(let t of e.specifiers)this.checkUnreserved(t.local),this.checkLocalExport(t.local),"Literal"===t.local.type&&this.raise(t.local.start,"A string literal cannot be used as an exported binding without `from`.");e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")}checkExport(e,t,n){e&&("string"!=typeof t&&(t="Identifier"===t.type?t.name:t.value),e[t]=!0)}parseMaybeDefault(e,t,n){const s=super.parseMaybeDefault(e,t,n);return"AssignmentPattern"===s.type&&s.typeAnnotation&&s.right.start=8&&!r&&"async"===i.name&&!this.canInsertSemicolon()&&this.eat(a._function))return this.overrideContext(p.f_expr),this.parseFunction(this.startNodeAt(n,s),0,!1,!0,t);if(e&&!this.canInsertSemicolon()){if(this.eat(a.arrow))return this.parseArrowExpression(this.startNodeAt(n,s),[i],!1,t);if(this.ecmaVersion>=8&&"async"===i.name&&this.type===a.name&&!r&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return i=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(a.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(n,s),[i],!0,t)}return i}return super.parseExprAtom(e,t,n)}parseExprAtomDefault(){if(g(this.type)){const e=this.potentialArrowAt===this.start,t=this.containsEsc,n=this.parseIdent();if(!t&&"async"===n.name&&!this.canInsertSemicolon()){const{type:e}=this;if(e===a._function)return this.next(),this.parseFunction(this.startNodeAtNode(n),void 0,!0,!0);if(g(e)){if(61===this.lookaheadCharCode()){const e=this.parseIdent(!1);return!this.canInsertSemicolon()&&this.eat(a.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAtNode(n),[e],!0)}return n}}return e&&this.match(a.arrow)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(n),[n],!1)):n}this.unexpected()}parseIdentNode(){let e=this.startNode();return b(this.type)&&("class"!==this.type.keyword&&"function"!==this.type.keyword||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart))?(e.name=this.value,e):super.parseIdentNode()}parseVarStatement(e,t,n=!1){const{isAmbientContext:s}=this;this.next(),super.parseVar(e,!1,t,n||s),this.semicolon();const r=this.finishNode(e,"VariableDeclaration");if(!s)return r;for(const{id:e,init:n}of r.declarations)n&&("const"!==t||e.typeAnnotation?this.raise(n.start,ys.InitializerNotAllowedInAmbientContext):"StringLiteral"!==n.type&&"BooleanLiteral"!==n.type&&"NumericLiteral"!==n.type&&"BigIntLiteral"!==n.type&&("TemplateLiteral"!==n.type||n.expressions.length>0)&&!ks(n)&&this.raise(n.start,ys.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference));return r}parseStatement(e,t,n){if(this.match(d.at)&&this.parseDecorators(!0),this.match(a._const)&&this.isLookaheadContextual("enum")){const e=this.startNode();return this.expect(a._const),this.tsParseEnumDeclaration(e,{const:!0})}if(this.ts_isContextual(d.enum))return this.tsParseEnumDeclaration(this.startNode());if(this.ts_isContextual(d.interface)){const e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseStatement(e,t,n)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}parsePostMemberNameModifiers(e){this.eat(a.question)&&(e.optional=!0),e.readonly&&this.match(a.parenL)&&this.raise(e.start,ys.ClassMethodHasReadonly),e.declare&&this.match(a.parenL)&&this.raise(e.start,ys.ClassMethodHasDeclare)}parseExpressionStatement(e,t){return("Identifier"===t.type?this.tsParseExpressionStatement(e,t):void 0)||super.parseExpressionStatement(e,t)}shouldParseExportStatement(){return!!this.tsIsDeclarationStart()||(!!this.match(d.at)||super.shouldParseExportStatement())}parseConditional(e,t,n,s,r){if(this.eat(a.question)){let r=this.startNodeAt(t,n);return r.test=e,r.consequent=this.parseMaybeAssign(),this.expect(a.colon),r.alternate=this.parseMaybeAssign(s),this.finishNode(r,"ConditionalExpression")}return e}parseMaybeConditional(e,t){let n=this.start,s=this.startLoc,r=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return r;if(!this.maybeInArrowParameters||!this.match(a.question))return this.parseConditional(r,n,s,e,t);const i=this.tryParse((()=>this.parseConditional(r,n,s,e,t)));return i.node?(i.error&&this.setLookaheadState(i.failState),i.node):(i.error&&this.setOptionalParametersError(t,i.error),r)}parseParenItem(e){const t=this.start,n=this.startLoc;if(e=super.parseParenItem(e),this.eat(a.question)&&(e.optional=!0,this.resetEndLocation(e)),this.match(a.colon)){const s=this.startNodeAt(t,n);return s.expression=e,s.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(s,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.isAmbientContext&&this.ts_isContextual(d.declare))return this.tsInAmbientContext((()=>this.parseExportDeclaration(e)));const t=this.start,n=this.startLoc,s=this.eatContextual("declare");!s||!this.ts_isContextual(d.declare)&&this.shouldParseExportStatement()||this.raise(this.start,ys.ExpectedAmbientAfterExportDeclare);const r=g(this.type)&&this.tsTryParseExportDeclaration()||this.parseStatement(null);return r?(("TSInterfaceDeclaration"===r.type||"TSTypeAliasDeclaration"===r.type||s)&&(e.exportKind="type"),s&&(this.resetStartLocation(r,t,n),r.declare=!0),r):null}parseClassId(e,t){if(!t&&this.isContextual("implements"))return;super.parseClassId(e,t);const n=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this));n&&(e.typeParameters=n)}parseClassPropertyAnnotation(e){e.optional||("!"===this.value&&this.eat(a.prefix)?e.definite=!0:this.eat(a.question)&&(e.optional=!0));const t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t)}parseClassField(e){if("PrivateIdentifier"===e.key.type)e.abstract&&this.raise(e.start,ys.PrivateElementHasAbstract),e.accessibility&&this.raise(e.start,ys.PrivateElementHasAccessibility({modifier:e.accessibility})),this.parseClassPropertyAnnotation(e);else if(this.parseClassPropertyAnnotation(e),this.isAmbientContext&&(!e.readonly||e.typeAnnotation)&&this.match(a.eq)&&this.raise(this.start,ys.DeclareClassFieldHasInitializer),e.abstract&&this.match(a.eq)){const{key:t}=e;this.raise(this.start,ys.AbstractPropertyHasInitializer({propertyName:"Identifier"!==t.type||e.computed?`[${this.input.slice(t.start,t.end)}]`:t.name}))}return super.parseClassField(e)}parseClassMethod(e,t,n,s){const r="constructor"===e.kind,a="PrivateIdentifier"===e.key.type,i=this.tsTryParseTypeParameters(this.tsParseConstModifier);a?(i&&(e.typeParameters=i),e.accessibility&&this.raise(e.start,ys.PrivateMethodsHasAccessibility({modifier:e.accessibility}))):i&&r&&this.raise(i.start,ys.ConstructorHasTypeParameters);const{declare:o=!1,kind:l}=e;!o||"get"!==l&&"set"!==l||this.raise(e.start,ys.DeclareAccessor({kind:l})),i&&(e.typeParameters=i);const c=e.key;"constructor"===e.kind?(t&&this.raise(c.start,"Constructor can't be a generator"),n&&this.raise(c.start,"Constructor can't be an async method")):e.static&&fs(e,"prototype")&&this.raise(c.start,"Classes may not have a static property named prototype");const p=e.value=this.parseMethod(t,n,s,!0,e);return"get"===e.kind&&0!==p.params.length&&this.raiseRecoverable(p.start,"getter should have no params"),"set"===e.kind&&1!==p.params.length&&this.raiseRecoverable(p.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===p.params[0].type&&this.raiseRecoverable(p.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")}isClassMethod(){return this.match(a.relational)}parseClassElement(e){if(this.eat(a.semi))return null;let t=this.startNode(),n="",s=!1,r=!1,i="method",o=!1;const l=["declare","private","public","protected","accessor","override","abstract","readonly","static"],c=this.tsParseModifiers({modified:t,allowedModifiers:l,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:ys.InvalidModifierOnTypeParameterPositions});o=Boolean(c.static);const p=()=>{if(!this.tsIsStartOfStaticBlocks()){const l=this.tsTryParseIndexSignature(t);if(l)return t.abstract&&this.raise(t.start,ys.IndexSignatureHasAbstract),t.accessibility&&this.raise(t.start,ys.IndexSignatureHasAccessibility({modifier:t.accessibility})),t.declare&&this.raise(t.start,ys.IndexSignatureHasDeclare),t.override&&this.raise(t.start,ys.IndexSignatureHasOverride),l;if(!this.inAbstractClass&&t.abstract&&this.raise(t.start,ys.NonAbstractClassHasAbstractMethod),t.override&&(e||this.raise(t.start,ys.OverrideNotInSubClass)),t.static=o,o&&(this.isClassElementNameStart()||this.type===a.star||(n="static")),!n&&this.ecmaVersion>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==a.star||this.canInsertSemicolon()?n="async":r=!0),!n&&(this.ecmaVersion>=9||!r)&&this.eat(a.star)&&(s=!0),!n&&!r&&!s){const e=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?i=e:n=e)}if(n?(t.computed=!1,t.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),t.key.name=n,this.finishNode(t.key,"Identifier")):this.parseClassElementName(t),this.parsePostMemberNameModifiers(t),this.isClassMethod()||this.ecmaVersion<13||this.type===a.parenL||"method"!==i||s||r){const n=!t.static&&fs(t,"constructor"),a=n&&e;n&&"method"!==i&&this.raise(t.key.start,"Constructor can't have get/set modifier"),t.kind=n?"constructor":i,this.parseClassMethod(t,s,r,a)}else this.parseClassField(t);return t}if(this.next(),this.next(),this.tsHasSomeModifiers(t,l)&&this.raise(this.start,ys.StaticBlockCannotHaveModifier),this.ecmaVersion>=13)return super.parseClassStaticBlock(t),t};return t.declare?this.tsInAmbientContext(p):p(),t}isClassElementNameStart(){return!!this.tsIsIdentifier()||super.isClassElementNameStart()}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.tsMatchLeftRelational()||this.match(a.bitShift))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual("implements")&&(e.implements=this.tsParseHeritageClause("implements"))}parseFunctionParams(e){const t=this.tsTryParseTypeParameters(this.tsParseConstModifier);t&&(e.typeParameters=t),super.parseFunctionParams(e)}parseVarId(e,t){super.parseVarId(e,t),"Identifier"===e.id.type&&!this.hasPrecedingLineBreak()&&"!"===this.value&&this.eat(a.prefix)&&(e.definite=!0);const n=this.tsTryParseTypeAnnotation();n&&(e.id.typeAnnotation=n,this.resetEndLocation(e.id))}parseArrowExpression(e,t,n,s){this.match(a.colon)&&(e.returnType=this.tsParseTypeAnnotation());let r=this.yieldPos,i=this.awaitPos,o=this.awaitIdentPos;this.enterScope(ws(n,!1)|Cs.SCOPE_ARROW),this.initFunction(e);const l=this.maybeInArrowParameters;return this.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.maybeInArrowParameters=!0,e.params=this.toAssignableList(t,!0),this.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0,!1,s),this.yieldPos=r,this.awaitPos=i,this.awaitIdentPos=o,this.maybeInArrowParameters=l,this.finishNode(e,"ArrowFunctionExpression")}parseMaybeAssignOrigin(e,t,n){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}let s=!1,r=-1,i=-1,o=-1;t?(r=t.parenthesizedAssign,i=t.trailingComma,o=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new hs,s=!0);let l=this.start,c=this.startLoc;(this.type===a.parenL||g(this.type))&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===e);let p=this.parseMaybeConditional(e,t);if(n&&(p=n.call(this,p,l,c)),this.type.isAssign){let n=this.startNodeAt(l,c);return n.operator=this.value,this.type===a.eq&&(p=this.toAssignable(p,!0,t)),s||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=p.start&&(t.shorthandAssign=-1),this.maybeInArrowParameters||(this.type===a.eq?this.checkLValPattern(p):this.checkLValSimple(p)),n.left=p,this.next(),n.right=this.parseMaybeAssign(e),o>-1&&(t.doubleProto=o),this.finishNode(n,"AssignmentExpression")}return s&&this.checkExpressionErrors(t,!0),r>-1&&(t.parenthesizedAssign=r),i>-1&&(t.trailingComma=i),p}parseMaybeAssign(e,t,n){let s,r,a;if(!this.tsMatchLeftRelational())return this.parseMaybeAssignOrigin(e,t,n);s&&!this.compareLookaheadState(s,this.getCurLookaheadState())||(s=this.cloneCurLookaheadState());const i=this.tryParse((s=>{a=this.tsParseTypeParameters(this.tsParseConstModifier);const r=this.parseMaybeAssignOrigin(e,t,n);return("ArrowFunctionExpression"!==r.type||r.extra?.parenthesized)&&s(),0!==a?.params.length&&this.resetStartLocationFromNode(r,a),r.typeParameters=a,r}),s);if(!i.error&&!i.aborted)return a&&this.reportReservedArrowTypeParam(a),i.node;if(bs(!0),r=this.tryParse((()=>this.parseMaybeAssignOrigin(e,t,n)),s),!r.error)return r.node;if(i.node)return this.setLookaheadState(i.failState),a&&this.reportReservedArrowTypeParam(a),i.node;if(r?.node)return this.setLookaheadState(r.failState),r.node;if(i.thrown)throw i.error;if(r?.thrown)throw r.error;throw i.error||r?.error}parseAssignableListItem(e){const t=[];for(;this.match(d.at);)t.push(this.parseDecorator());const n=this.start,s=this.startLoc;let r,a=!1,i=!1;if(void 0!==e){const t={};this.tsParseModifiers({modified:t,allowedModifiers:["public","private","protected","override","readonly"]}),r=t.accessibility,i=t.override,a=t.readonly,!1===e&&(r||a||i)&&this.raise(s.start,ys.UnexpectedParameterModifier)}const o=this.parseMaybeDefault(n,s);this.parseBindingListItem(o);const l=this.parseMaybeDefault(o.start,o.loc,o);if(t.length&&(l.decorators=t),r||a||i){const e=this.startNodeAt(n,s);return r&&(e.accessibility=r),a&&(e.readonly=a),i&&(e.override=i),"Identifier"!==l.type&&"AssignmentPattern"!==l.type&&this.raise(e.start,ys.UnsupportedParameterPropertyKind),e.parameter=l,this.finishNode(e,"TSParameterProperty")}return l}checkLValInnerPattern(e,t=Cs.BIND_NONE,n){if("TSParameterProperty"===e.type)this.checkLValInnerPattern(e.parameter,t,n);else super.checkLValInnerPattern(e,t,n)}parseBindingListItem(e){this.eat(a.question)&&("Identifier"===e.type||this.isAmbientContext||this.inType||this.raise(e.start,ys.PatternIsOptional),e.optional=!0);const t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t),this.resetEndLocation(e),e}isAssignable(e,t){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,t);case"TSParameterProperty":case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{const t=e.properties.length-1;return e.properties.every(((e,n)=>"ObjectMethod"!==e.type&&(n===t||"SpreadElement"!==e.type)&&this.isAssignable(e)))}case"Property":case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every((e=>null===e||this.isAssignable(e)));case"AssignmentExpression":return"="===e.operator;case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!t;default:return!1}}toAssignable(e,t=!1,n=new hs){switch(e.type){case"ParenthesizedExpression":return this.toAssignableParenthesizedExpression(e,t,n);case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":return t||this.raise(e.start,ys.UnexpectedTypeCastInParameter),this.toAssignable(e.expression,t,n);case"MemberExpression":break;case"AssignmentExpression":return t||"TSTypeCastExpression"!==e.left.type||(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,t,n);case"TSTypeCastExpression":return this.typeCastToParameter(e);default:return super.toAssignable(e,t,n)}return e}toAssignableParenthesizedExpression(e,t,n){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":return this.toAssignable(e.expression,t,n);default:return super.toAssignable(e,t,n)}}parseBindingAtom(){return this.type===a._this?this.parseIdent(!0):super.parseBindingAtom()}shouldParseArrow(e){let t;if(t=this.match(a.colon)?e.every((e=>this.isAssignable(e,!0))):!this.canInsertSemicolon(),t){if(this.match(a.colon)){const e=this.tryParse((e=>{const t=this.tsParseTypeOrTypePredicateAnnotation(a.colon);return!this.canInsertSemicolon()&&this.match(a.arrow)||e(),t}));if(e.aborted)return this.shouldParseArrowReturnType=void 0,!1;e.thrown||(e.error&&this.setLookaheadState(e.failState),this.shouldParseArrowReturnType=e.node)}return!!this.match(a.arrow)||(this.shouldParseArrowReturnType=void 0,!1)}return this.shouldParseArrowReturnType=void 0,t}parseParenArrowList(e,t,n,s){const r=this.startNodeAt(e,t);return r.returnType=this.shouldParseArrowReturnType,this.shouldParseArrowReturnType=void 0,this.parseArrowExpression(r,n,!1,s)}parseParenAndDistinguishExpression(e,t){let n,s=this.start,r=this.startLoc,i=this.ecmaVersion>=8;if(this.ecmaVersion>=6){const o=this.maybeInArrowParameters;this.maybeInArrowParameters=!0,this.next();let l,c=this.start,p=this.startLoc,u=[],d=!0,h=!1,m=new hs,f=this.yieldPos,y=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==a.parenR;){if(d?d=!1:this.expect(a.comma),i&&this.afterTrailingComma(a.parenR,!0)){h=!0;break}if(this.type===a.ellipsis){l=this.start,u.push(this.parseParenItem(this.parseRestBinding())),this.type===a.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}u.push(this.parseMaybeAssign(t,m,this.parseParenItem))}let v=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(a.parenR),this.maybeInArrowParameters=o,e&&this.shouldParseArrow(u)&&this.eat(a.arrow))return this.checkPatternErrors(m,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=y,this.parseParenArrowList(s,r,u,t);u.length&&!h||this.unexpected(this.lastTokStart),l&&this.unexpected(l),this.checkExpressionErrors(m,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=y||this.awaitPos,u.length>1?(n=this.startNodeAt(c,p),n.expressions=u,this.finishNodeAt(n,"SequenceExpression",v,g)):n=u[0]}else n=this.parseParenExpression();if(this.options.preserveParens){let e=this.startNodeAt(s,r);return e.expression=n,this.finishNode(e,"ParenthesizedExpression")}return n}parseTaggedTemplateExpression(e,t,n,s){const r=this.startNodeAt(t,n);return r.tag=e,r.quasi=this.parseTemplate({isTagged:!0}),s&&this.raise(t,"Tagged Template Literals are not allowed in optionalChain."),this.finishNode(r,"TaggedTemplateExpression")}shouldParseAsyncArrow(){if(!this.match(a.colon))return!this.canInsertSemicolon()&&this.eat(a.arrow);{const e=this.tryParse((e=>{const t=this.tsParseTypeOrTypePredicateAnnotation(a.colon);return!this.canInsertSemicolon()&&this.match(a.arrow)||e(),t}));if(e.aborted)return this.shouldParseAsyncArrowReturnType=void 0,!1;if(!e.thrown)return e.error&&this.setLookaheadState(e.failState),this.shouldParseAsyncArrowReturnType=e.node,!this.canInsertSemicolon()&&this.eat(a.arrow)}}parseSubscriptAsyncArrow(e,t,n,s){const r=this.startNodeAt(e,t);return r.returnType=this.shouldParseAsyncArrowReturnType,this.shouldParseAsyncArrowReturnType=void 0,this.parseArrowExpression(r,n,!0,s)}parseExprList(e,t,n,s){let r=[],i=!0;for(;!this.eat(e);){if(i)i=!1;else if(this.expect(a.comma),t&&this.afterTrailingComma(e))break;let o;n&&this.type===a.comma?o=null:this.type===a.ellipsis?(o=this.parseSpread(s),this.maybeInArrowParameters&&this.match(a.colon)&&(o.typeAnnotation=this.tsParseTypeAnnotation()),s&&this.type===a.comma&&s.trailingComma<0&&(s.trailingComma=this.start)):o=this.parseMaybeAssign(!1,s,this.parseParenItem),r.push(o)}return r}parseSubscript(e,t,n,s,r,i,o){let l=i;if(!this.hasPrecedingLineBreak()&&"!"===this.value&&this.match(a.prefix)){this.exprAllowed=!1,this.next();const s=this.startNodeAt(t,n);return s.expression=e,e=this.finishNode(s,"TSNonNullExpression")}let c=!1;if(this.match(a.questionDot)&&60===this.lookaheadCharCode()){if(s)return e;e.optional=!0,l=c=!0,this.next()}if(this.tsMatchLeftRelational()||this.match(a.bitShift)){let r;const i=this.tsTryParseAndCatch((()=>{if(!s&&this.atPossibleAsyncArrow(e)){const s=this.tsTryParseGenericAsyncArrowFunction(t,n,o);if(s)return e=s}const i=this.tsParseTypeArgumentsInExpression();if(!i)return e;if(c&&!this.match(a.parenL))return r=this.curPosition(),e;if(y(this.type)||this.type===a.backQuote){const s=this.parseTaggedTemplateExpression(e,t,n,l);return s.typeArguments=i,s}if(!s&&this.eat(a.parenL)){let s=new hs;const r=this.startNodeAt(t,n);return r.callee=e,r.arguments=this.parseExprList(a.parenR,this.ecmaVersion>=8,!1,s),this.tsCheckForInvalidTypeCasts(r.arguments),r.typeArguments=i,l&&(r.optional=c),this.checkExpressionErrors(s,!0),e=this.finishNode(r,"CallExpression")}const p=this.type;if(this.tsMatchRightRelational()||p===a.bitShift||p!==a.parenL&&Boolean(p.startsExpr)&&!this.hasPrecedingLineBreak())return;const u=this.startNodeAt(t,n);return u.expression=e,u.typeArguments=i,this.finishNode(u,"TSInstantiationExpression")}));if(r&&this.unexpected(r),i)return"TSInstantiationExpression"===i.type&&(this.match(a.dot)||this.match(a.questionDot)&&40!==this.lookaheadCharCode())&&this.raise(this.start,ys.InvalidPropertyAccessAfterInstantiationExpression),e=i}let p=this.ecmaVersion>=11,u=p&&this.eat(a.questionDot);s&&u&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");let d=this.eat(a.bracketL);if(d||u&&this.type!==a.parenL&&this.type!==a.backQuote||this.eat(a.dot)){let s=this.startNodeAt(t,n);s.object=e,d?(s.property=this.parseExpression(),this.expect(a.bracketR)):this.type===a.privateId&&"Super"!==e.type?s.property=this.parsePrivateIdent():s.property=this.parseIdent("never"!==this.options.allowReserved),s.computed=!!d,p&&(s.optional=u),e=this.finishNode(s,"MemberExpression")}else if(!s&&this.eat(a.parenL)){const s=this.maybeInArrowParameters;this.maybeInArrowParameters=!0;let i=new hs,l=this.yieldPos,c=this.awaitPos,d=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;let h=this.parseExprList(a.parenR,this.ecmaVersion>=8,!1,i);if(r&&!u&&this.shouldParseAsyncArrow())this.checkPatternErrors(i,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=l,this.awaitPos=c,this.awaitIdentPos=d,e=this.parseSubscriptAsyncArrow(t,n,h,o);else{this.checkExpressionErrors(i,!0),this.yieldPos=l||this.yieldPos,this.awaitPos=c||this.awaitPos,this.awaitIdentPos=d||this.awaitIdentPos;let s=this.startNodeAt(t,n);s.callee=e,s.arguments=h,p&&(s.optional=u),e=this.finishNode(s,"CallExpression")}this.maybeInArrowParameters=s}else if(this.type===a.backQuote){(u||l)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");let s=this.startNodeAt(t,n);s.tag=e,s.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(s,"TaggedTemplateExpression")}return e}parseGetterSetter(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);let t="get"===e.kind?0:1;const n=e.value.params[0];if(t=n&&this.isThisParam(n)?t+1:t,e.value.params.length!==t){let t=e.value.start;"get"===e.kind?this.raiseRecoverable(t,"getter should have no params"):this.raiseRecoverable(t,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}parseProperty(e,t){if(!e){let n=[];if(this.match(d.at))for(;this.match(d.at);)n.push(this.parseDecorator());const s=super.parseProperty(e,t);return"SpreadElement"===s.type&&n.length&&this.raise(s.start,vs.SpreadElementDecorator),n.length&&(s.decorators=n,n=[]),s}return super.parseProperty(e,t)}parseCatchClauseParam(){const e=this.parseBindingAtom();let t="Identifier"===e.type;this.enterScope(t?Cs.SCOPE_SIMPLE_CATCH:0),this.checkLValPattern(e,t?Cs.BIND_SIMPLE_CATCH:Cs.BIND_LEXICAL);const n=this.tsTryParseTypeAnnotation();return n&&(e.typeAnnotation=n,this.resetEndLocation(e)),this.expect(a.parenR),e}parseClass(e,t){const n=this.inAbstractClass;this.inAbstractClass=!!e.abstract;try{this.next(),this.takeDecorators(e);const n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);const s=this.enterClassBody(),r=this.startNode();let i=!1;r.body=[];let o=[];for(this.expect(a.braceL);this.type!==a.braceR;){if(this.match(d.at)){o.push(this.parseDecorator());continue}const t=this.parseClassElement(null!==e.superClass);o.length&&(t.decorators=o,this.resetStartLocationFromNode(t,o[0]),o=[]),t&&(r.body.push(t),"MethodDefinition"===t.type&&"constructor"===t.kind&&"FunctionExpression"===t.value.type?(i&&this.raiseRecoverable(t.start,"Duplicate constructor in the same class"),i=!0,t.decorators&&t.decorators.length>0&&this.raise(t.start,vs.DecoratorConstructor)):t.key&&"PrivateIdentifier"===t.key.type&&ms(s,t)&&this.raiseRecoverable(t.key.start,`Identifier '#${t.key.name}' has already been declared`))}return this.strict=n,this.next(),o.length&&this.raise(this.start,vs.TrailingDecorator),e.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")}finally{this.inAbstractClass=n}}parseClassFunctionParams(){const e=this.tsTryParseTypeParameters();let t=this.parseBindingList(a.parenR,!1,this.ecmaVersion>=8,!0);return e&&(t.typeParameters=e),t}parseMethod(e,t,n,s,r){let i=this.startNode(),o=this.yieldPos,l=this.awaitPos,c=this.awaitIdentPos;if(this.initFunction(i),this.ecmaVersion>=6&&(i.generator=e),this.ecmaVersion>=8&&(i.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ws(t,i.generator)|Cs.SCOPE_SUPER|(n?Cs.SCOPE_DIRECT_SUPER:0)),this.expect(a.parenL),i.params=this.parseClassFunctionParams(),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(i,!1,!0,!1,{isClassMethod:s}),this.yieldPos=o,this.awaitPos=l,this.awaitIdentPos=c,r&&r.abstract){if(!!i.body){const{key:e}=r;this.raise(r.start,ys.AbstractMethodHasImplementation({methodName:"Identifier"!==e.type||r.computed?`[${this.input.slice(e.start,e.end)}]`:e.name}))}}return this.finishNode(i,"FunctionExpression")}static parse(e,n){if(!1===n.locations)throw new Error("You have to enable options.locations while using acorn-typescript");n.locations=!0;const s=new this(n,e);return t&&(s.isAmbientContext=!0),s.parse()}static parseExpressionAt(e,n,s){if(!1===s.locations)throw new Error("You have to enable options.locations while using acorn-typescript");s.locations=!0;const r=new this(s,e,n);return t&&(r.isAmbientContext=!0),r.nextToken(),r.parseExpression()}parseImportSpecifier(){if(this.ts_isContextual(d.type)){let e=this.startNode();return e.imported=this.parseModuleExportName(),this.parseTypeOnlyImportExportSpecifier(e,!0,"type"===this.importOrExportOuterKind),this.finishNode(e,"ImportSpecifier")}{const e=super.parseImportSpecifier();return e.importKind="value",e}}parseExportSpecifier(e){const t=this.ts_isContextual(d.type);if(!this.match(a.string)&&t){let t=this.startNode();return t.local=this.parseModuleExportName(),this.parseTypeOnlyImportExportSpecifier(t,!1,"type"===this.importOrExportOuterKind),this.finishNode(t,"ExportSpecifier"),this.checkExport(e,t.exported,t.exported.start),t}{const t=super.parseExportSpecifier(e);return t.exportKind="value",t}}parseTypeOnlyImportExportSpecifier(e,t,n){const s=t?"imported":"local",r=t?"local":"exported";let a,i=e[s],o=!1,l=!0;const c=i.start;if(this.isContextual("as")){const e=this.parseIdent();if(this.isContextual("as")){const n=this.parseIdent();b(this.type)?(o=!0,i=e,a=t?this.parseIdent():this.parseModuleExportName(),l=!1):(a=n,l=!1)}else b(this.type)?(l=!1,a=t?this.parseIdent():this.parseModuleExportName()):(o=!0,i=e)}else b(this.type)&&(o=!0,t?(i=super.parseIdent(!0),this.isContextual("as")||this.checkUnreserved(i)):i=this.parseModuleExportName());o&&n&&this.raise(c,t?ys.TypeModifierIsUsedInTypeImports:ys.TypeModifierIsUsedInTypeExports),e[s]=i,e[r]=a;e[t?"importKind":"exportKind"]=o?"type":"value",l&&this.eatContextual("as")&&(e[r]=t?this.parseIdent():this.parseModuleExportName()),e[r]||(e[r]=this.copyNode(e[s])),t&&this.checkLValSimple(e[r],Cs.BIND_LEXICAL)}raiseCommonCheck(e,t,n){return"Comma is not permitted after the rest element"===t?this.isAmbientContext&&this.match(a.comma)&&41===this.lookaheadCharCode()?void this.next():super.raise(e,t):n?super.raiseRecoverable(e,t):super.raise(e,t)}raiseRecoverable(e,t){return this.raiseCommonCheck(e,t,!0)}raise(e,t){return this.raiseCommonCheck(e,t,!0)}updateContext(e){const{type:t}=this;if(t==a.braceL){var n=this.curContext();n==h.tc_oTag?this.context.push(p.b_expr):n==h.tc_expr?this.context.push(p.b_tmpl):super.updateContext(e),this.exprAllowed=!0}else{if(t!==a.slash||e!==d.jsxTagStart)return super.updateContext(e);this.context.length-=2,this.context.push(h.tc_cTag),this.exprAllowed=!1}}jsx_parseOpeningElementAt(e,t){let n=this.startNodeAt(e,t),s=this.jsx_parseElementName();if(s&&(n.name=s),this.match(a.relational)||this.match(a.bitShift)){const e=this.tsTryParseAndCatch((()=>this.tsParseTypeArgumentsInExpression()));e&&(n.typeArguments=e)}for(n.attributes=[];this.type!==a.slash&&this.type!==d.jsxTagEnd;)n.attributes.push(this.jsx_parseAttribute());return n.selfClosing=this.eat(a.slash),this.expect(d.jsxTagEnd),this.finishNode(n,s?"JSXOpeningElement":"JSXOpeningFragment")}enterScope(e){e===us&&this.importsStack.push([]),super.enterScope(e);const t=super.currentScope();t.types=[],t.enums=[],t.constEnums=[],t.classes=[],t.exportOnlyBindings=[]}exitScope(){super.currentScope().flags===us&&this.importsStack.pop(),super.exitScope()}hasImport(e,t){const n=this.importsStack.length;if(this.importsStack[n-1].indexOf(e)>-1)return!0;if(!t&&n>1)for(let t=0;t-1)return!0;return!1}maybeExportDefined(e,t){this.inModule&&e.flags&Cs.SCOPE_TOP&&this.undefinedExports.delete(t)}declareName(e,t,n){if(t&Cs.BIND_FLAGS_TS_IMPORT)return this.hasImport(e,!0)&&this.raise(n,`Identifier '${e}' has already been declared.`),void this.importsStack[this.importsStack.length-1].push(e);const s=this.currentScope();if(t&Cs.BIND_FLAGS_TS_EXPORT_ONLY)return this.maybeExportDefined(s,e),void s.exportOnlyBindings.push(e);t===Cs.BIND_TS_TYPE||t===Cs.BIND_TS_INTERFACE?(t===Cs.BIND_TS_TYPE&&s.types.includes(e)&&this.raise(n,`type '${e}' has already been declared.`),s.types.push(e)):super.declareName(e,t,n),t&Cs.BIND_FLAGS_TS_ENUM&&s.enums.push(e),t&Cs.BIND_FLAGS_TS_CONST_ENUM&&s.constEnums.push(e),t&Cs.BIND_FLAGS_CLASS&&s.classes.push(e)}checkLocalExport(e){const{name:t}=e;if(this.hasImport(t))return;for(let e=this.scopeStack.length-1;e>=0;e--){const n=this.scopeStack[e];if(n.types.indexOf(t)>-1||n.exportOnlyBindings.indexOf(t)>-1)return}super.checkLocalExport(e)}}}}());function Ts(e,t,n){const s=t?Es:Zt,{onComment:r,add_comments:a}=$s(e),i=s.prototype.parseStatement;let o;n&&(s.prototype.parseStatement=function(...e){const t=i.call(this,...e);return this.undefinedExports={},t});try{o=s.parse(e,{onComment:r,sourceType:"module",ecmaVersion:13,locations:!0})}finally{n&&(s.prototype.parseStatement=i)}return a(o),o}function As(e,t,n){const s=t?Es:Zt,{onComment:r,add_comments:a}=$s(e),i=s.parseExpressionAt(e,n,{onComment:r,sourceType:"module",ecmaVersion:13,locations:!0});return a(i),i}function $s(e){const n=[];return{onComment:(t,s,r,a)=>{if(t&&/\n/.test(s)){let t=r;for(;t>0&&"\n"!==e[t-1];)t-=1;let n=t;for(;/[ \t]/.test(e[n]);)n+=1;const a=e.slice(t,n);s=s.replace(new RegExp(`^${a}`,"gm"),"")}n.push({type:t?"Block":"Line",value:s,start:r,end:a})},add_comments(s){0!==n.length&&(t(s,null,{_(t,{next:s,path:r}){let a;for(;n[0]&&n[0].start=s.end)break;(t.trailingComments||=[]).push(e),n.shift(),e.end}else t.end<=n[0].start&&/^[,) \t]*$/.test(r)&&(t.trailingComments=[n.shift()])}}}}),n.length>0&&(n[0].start>=s.end||"Program"===s.type)&&(s.trailingComments||=[]).push(...n.splice(0)))}}}class Is extends Error{message="";#e;constructor(e,t,n){super(t),this.stack="",this.#e=new Ce(e,t,n),Object.assign(this,this.#e),this.name="CompileError"}toString(){return this.#e.toString()}toJSON(){return this.#e.toJSON()}}function Rs(e,t,n){const s="number"==typeof e?e:e?.start;throw new Is(t,n,void 0!==s?[s,("number"==typeof e?e:e?.end)??s]:void 0)}function Ms(e,t){Rs(e,"options_unrecognised",`Unrecognised compiler option ${t}\nhttps://svelte.dev/e/options_unrecognised`)}function qs(e,t){Rs(e,"constant_assignment",`Cannot assign to ${t}\nhttps://svelte.dev/e/constant_assignment`)}function Ls(e){Rs(e,"declaration_duplicate_module_import","Cannot declare a variable with the same name as an import inside `\n\n'); + } + migrate_css(state); + return { + code: str.toString() + }; + } catch (e) { + if (!(e instanceof MigrationError)) { + // eslint-disable-next-line no-console + console.error('Error while migrating Svelte code', e); + } + has_migration_task = true; + return { + code: `\n${og_source}` + }; + } finally { + if (has_migration_task) { + // eslint-disable-next-line no-console + console.log( + `One or more \`@migration-task\` comments were added to ${filename ? `\`${filename}\`` : "a file (unfortunately we don't know the name)"}, please check them and complete the migration manually.` + ); + } + } +} + +/** + * @typedef {{ + * scope: Scope; + * str: MagicString; + * analysis: ComponentAnalysis; + * filename?: string; + * indent: string; + * props: Array<{ local: string; exported: string; init: string; bindable: boolean; slot_name?: string; optional: boolean; type: string; comment?: string; trailing_comment?: string; type_only?: boolean; needs_refine_type?: boolean; }>; + * props_insertion_point: number; + * has_props_rune: boolean; + * has_type_or_fallback: boolean; + * end: number; + * names: Record; + * legacy_imports: Set; + * script_insertions: Set; + * derived_components: Map; + * derived_conflicting_slots: Map; + * derived_labeled_statements: Set; + * has_svelte_self: boolean; + * uses_ts: boolean; + * }} State + */ + +/** @type {Visitors} */ +const instance_script = { + _(node, { state, next }) { + // @ts-expect-error + const comments = node.leadingComments; + if (comments) { + for (const comment of comments) { + if (comment.type === 'Line') { + const migrated = migrate_svelte_ignore(comment.value); + if (migrated !== comment.value) { + state.str.overwrite(comment.start + '//'.length, comment.end, migrated); + } + } + } + } + next(); + }, + Identifier(node, { state, path }) { + handle_identifier(node, state, path); + }, + ImportDeclaration(node, { state }) { + state.props_insertion_point = node.end ?? state.props_insertion_point; + if (node.source.value === 'svelte') { + let illegal_specifiers = []; + let removed_specifiers = 0; + for (let specifier of node.specifiers) { + if ( + specifier.type === 'ImportSpecifier' && + specifier.imported.type === 'Identifier' && + ['beforeUpdate', 'afterUpdate'].includes(specifier.imported.name) + ) { + const references = state.scope.references.get(specifier.local.name); + if (!references) { + let end = /** @type {number} */ ( + state.str.original.indexOf(',', specifier.end) !== -1 && + state.str.original.indexOf(',', specifier.end) < + state.str.original.indexOf('}', specifier.end) + ? state.str.original.indexOf(',', specifier.end) + 1 + : specifier.end + ); + while (state.str.original[end].trim() === '') end++; + state.str.remove(/** @type {number} */ (specifier.start), end); + removed_specifiers++; + continue; + } + illegal_specifiers.push(specifier.imported.name); + } + } + if (removed_specifiers === node.specifiers.length) { + state.str.remove(/** @type {number} */ (node.start), /** @type {number} */ (node.end)); + } + if (illegal_specifiers.length > 0) { + throw new MigrationError( + `Can't migrate code with ${illegal_specifiers.join(' and ')}. Please migrate by hand.` + ); + } + } + }, + ExportNamedDeclaration(node, { state, next }) { + if (node.declaration) { + next(); + return; + } + + let count_removed = 0; + for (const specifier of node.specifiers) { + if (specifier.local.type !== 'Identifier') continue; + + const binding = state.scope.get(specifier.local.name); + if (binding?.kind === 'bindable_prop') { + state.str.remove( + /** @type {number} */ (specifier.start), + /** @type {number} */ (specifier.end) + ); + count_removed++; + } + } + if (count_removed === node.specifiers.length) { + state.str.remove(/** @type {number} */ (node.start), /** @type {number} */ (node.end)); + } + }, + VariableDeclaration(node, { state, path, visit, next }) { + if (state.scope !== state.analysis.instance.scope) { + return; + } + + let nr_of_props = 0; + + for (let i = 0; i < node.declarations.length; i++) { + const declarator = node.declarations[i]; + if (state.analysis.runes) { + if (get_rune(declarator.init, state.scope) === '$props') { + state.props_insertion_point = /** @type {number} */ (declarator.id.start) + 1; + state.has_props_rune = true; + } + continue; + } + + let bindings; + try { + bindings = state.scope.get_bindings(declarator); + } catch (e) { + // no bindings, so we can skip this + next(); + continue; + } + const has_state = bindings.some((binding) => binding.kind === 'state'); + const has_props = bindings.some((binding) => binding.kind === 'bindable_prop'); + + if (!has_state && !has_props) { + next(); + continue; + } + + if (has_props) { + nr_of_props++; + + if (declarator.id.type !== 'Identifier') { + // TODO invest time in this? + throw new MigrationError( + 'Encountered an export declaration pattern that is not supported for automigration.' + ); + // Turn export let into props. It's really really weird because export let { x: foo, z: [bar]} = .. + // means that foo and bar are the props (i.e. the leafs are the prop names), not x and z. + // const tmp = state.scope.generate('tmp'); + // const paths = extract_paths(declarator.id); + // state.props_pre.push( + // b.declaration('const', b.id(tmp), visit(declarator.init!) as Expression) + // ); + // for (const path of paths) { + // const name = (path.node as Identifier).name; + // const binding = state.scope.get(name)!; + // const value = path.expression!(b.id(tmp)); + // if (binding.kind === 'bindable_prop' || binding.kind === 'rest_prop') { + // state.props.push({ + // local: name, + // exported: binding.prop_alias ? binding.prop_alias : name, + // init: value + // }); + // state.props_insertion_point = /** @type {number} */(declarator.end); + // } else { + // declarations.push(b.declarator(path.node, value)); + // } + // } + } + + const name = declarator.id.name; + const binding = /** @type {Binding} */ (state.scope.get(name)); + + if (state.analysis.uses_props && (declarator.init || binding.updated)) { + throw new MigrationError( + '$$props is used together with named props in a way that cannot be automatically migrated.' + ); + } + + const prop = state.props.find((prop) => prop.exported === (binding.prop_alias || name)); + if (prop) { + next(); + // $$Props type was used + prop.init = declarator.init + ? state.str + .snip( + /** @type {number} */ (declarator.init.start), + /** @type {number} */ (declarator.init.end) + ) + .toString() + : ''; + prop.bindable = binding.updated; + prop.exported = binding.prop_alias || name; + prop.type_only = false; + } else { + next(); + state.props.push({ + local: name, + exported: binding.prop_alias ? binding.prop_alias : name, + init: declarator.init + ? state.str + .snip( + /** @type {number} */ (declarator.init.start), + /** @type {number} */ (declarator.init.end) + ) + .toString() + : '', + optional: !!declarator.init, + bindable: binding.updated, + ...extract_type_and_comment(declarator, state, path) + }); + } + + let start = /** @type {number} */ (declarator.start); + let end = /** @type {number} */ (declarator.end); + + // handle cases like let a,b,c; where only some are exported + if (node.declarations.length > 1) { + // move the insertion point after the node itself; + state.props_insertion_point = /** @type {number} */ (node.end); + // if it's not the first declaration remove from the , of the previous declaration + if (i !== 0) { + start = state.str.original.indexOf( + ',', + /** @type {number} */ (node.declarations[i - 1].end) + ); + } + // if it's not the last declaration remove either from up until the + // start of the next declaration (if it's the first declaration) or + // up until the last index of , from the next declaration + if (i !== node.declarations.length - 1) { + if (i === 0) { + end = /** @type {number} */ (node.declarations[i + 1].start); + } else { + end = state.str.original.lastIndexOf( + ',', + /** @type {number} */ (node.declarations[i + 1].start) + ); + } + } + } else { + state.props_insertion_point = /** @type {number} */ (declarator.end); + } + + state.str.update(start, end, ''); + + continue; + } + + /** + * @param {"state"|"derived"} rune + */ + function check_rune_binding(rune) { + const has_rune_binding = !!state.scope.get(rune); + if (has_rune_binding) { + throw new MigrationError( + `can't migrate \`${state.str.original.substring(/** @type {number} */ (node.start), node.end)}\` to \`$${rune}\` because there's a variable named ${rune}.\n Rename the variable and try again or migrate by hand.` + ); + } + } + + // state + if (declarator.init) { + let { start, end } = /** @type {{ start: number, end: number }} */ (declarator.init); + + if (declarator.init.type === 'SequenceExpression') { + while (state.str.original[start] !== '(') start -= 1; + while (state.str.original[end - 1] !== ')') end += 1; + } + + check_rune_binding('state'); + + state.str.prependLeft(start, '$state('); + state.str.appendRight(end, ')'); + } else { + /** + * @type {AssignmentExpression | undefined} + */ + let assignment_in_labeled; + /** + * @type {LabeledStatement | undefined} + */ + let labeled_statement; + + // Analyze declaration bindings to see if they're exclusively updated within a single reactive statement + const possible_derived = bindings.every((binding) => + binding.references.every((reference) => { + const declaration = reference.path.find((el) => el.type === 'VariableDeclaration'); + const assignment = reference.path.find((el) => el.type === 'AssignmentExpression'); + const update = reference.path.find((el) => el.type === 'UpdateExpression'); + const labeled = /** @type {LabeledStatement | undefined} */ ( + reference.path.find((el) => el.type === 'LabeledStatement' && el.label.name === '$') + ); + + if ( + assignment && + labeled && + // ensure that $: foo = bar * 2 is not counted as a reassignment of bar + (labeled.body.type !== 'ExpressionStatement' || + labeled.body.expression !== assignment || + (assignment.left.type === 'Identifier' && + assignment.left.name === binding.node.name)) + ) { + if (assignment_in_labeled) return false; + assignment_in_labeled = /** @type {AssignmentExpression} */ (assignment); + labeled_statement = labeled; + } + + return ( + !update && + ((declaration && binding.initial) || + (labeled && assignment) || + (!labeled && !assignment)) + ); + }) + ); + + const labeled_has_single_assignment = + labeled_statement?.body.type === 'BlockStatement' && + labeled_statement.body.body.length === 1 && + labeled_statement.body.body[0].type === 'ExpressionStatement'; + + const is_expression_assignment = + labeled_statement?.body.type === 'ExpressionStatement' && + labeled_statement.body.expression.type === 'AssignmentExpression'; + + let should_be_state = false; + + if (is_expression_assignment) { + const body = /**@type {ExpressionStatement}*/ (labeled_statement?.body); + const expression = /**@type {AssignmentExpression}*/ (body.expression); + const [, ids] = extract_all_identifiers_from_expression(expression.right); + if (ids.length === 0) { + should_be_state = true; + state.derived_labeled_statements.add( + /** @type {LabeledStatement} */ (labeled_statement) + ); + } + } + + if ( + !should_be_state && + possible_derived && + assignment_in_labeled && + labeled_statement && + (labeled_has_single_assignment || is_expression_assignment) + ) { + const indent = state.str.original.substring( + state.str.original.lastIndexOf('\n', /** @type {number} */ (node.start)) + 1, + /** @type {number} */ (node.start) + ); + // transfer all the leading comments + if ( + labeled_statement.body.type === 'BlockStatement' && + labeled_statement.body.body[0].leadingComments + ) { + for (let comment of labeled_statement.body.body[0].leadingComments) { + state.str.prependLeft( + /** @type {number} */ (node.start), + comment.type === 'Block' + ? `/*${comment.value}*/\n${indent}` + : `// ${comment.value}\n${indent}` + ); + } + } + + check_rune_binding('derived'); + + // Someone wrote a `$: { ... }` statement which we can turn into a `$derived` + state.str.appendRight( + /** @type {number} */ (declarator.id.typeAnnotation?.end ?? declarator.id.end), + ' = $derived(' + ); + visit(assignment_in_labeled.right); + state.str.appendRight( + /** @type {number} */ (declarator.id.typeAnnotation?.end ?? declarator.id.end), + state.str + .snip( + /** @type {number} */ (assignment_in_labeled.right.start), + /** @type {number} */ (assignment_in_labeled.right.end) + ) + .toString() + ); + state.str.remove( + /** @type {number} */ (labeled_statement.start), + /** @type {number} */ (labeled_statement.end) + ); + state.str.appendRight( + /** @type {number} */ (declarator.id.typeAnnotation?.end ?? declarator.id.end), + ')' + ); + state.derived_labeled_statements.add(labeled_statement); + + // transfer all the trailing comments + if ( + labeled_statement.body.type === 'BlockStatement' && + labeled_statement.body.body[0].trailingComments + ) { + for (let comment of labeled_statement.body.body[0].trailingComments) { + state.str.appendRight( + /** @type {number} */ (declarator.id.typeAnnotation?.end ?? declarator.id.end), + comment.type === 'Block' + ? `\n${indent}/*${comment.value}*/` + : `\n${indent}// ${comment.value}` + ); + } + } + } else { + check_rune_binding('state'); + + state.str.prependLeft( + /** @type {number} */ (declarator.id.typeAnnotation?.end ?? declarator.id.end), + ' = $state(' + ); + if (should_be_state) { + // someone wrote a `$: foo = ...` statement which we can turn into `let foo = $state(...)` + state.str.appendRight( + /** @type {number} */ (declarator.id.typeAnnotation?.end ?? declarator.id.end), + state.str + .snip( + /** @type {number} */ ( + /** @type {AssignmentExpression} */ (assignment_in_labeled).right.start + ), + /** @type {number} */ ( + /** @type {AssignmentExpression} */ (assignment_in_labeled).right.end + ) + ) + .toString() + ); + state.str.remove( + /** @type {number} */ (/** @type {LabeledStatement} */ (labeled_statement).start), + /** @type {number} */ (/** @type {LabeledStatement} */ (labeled_statement).end) + ); + } + state.str.appendRight( + /** @type {number} */ (declarator.id.typeAnnotation?.end ?? declarator.id.end), + ')' + ); + } + } + } + + if (nr_of_props === node.declarations.length) { + let start = /** @type {number} */ (node.start); + let end = /** @type {number} */ (node.end); + + const parent = path.at(-1); + if (parent?.type === 'ExportNamedDeclaration') { + start = /** @type {number} */ (parent.start); + end = /** @type {number} */ (parent.end); + } + while (state.str.original[start] !== '\n') start--; + while (state.str.original[end] !== '\n') end++; + state.str.update(start, end, ''); + } + }, + BreakStatement(node, { state, path }) { + if (path[1].type !== 'LabeledStatement') return; + if (node.label?.name !== '$') return; + state.str.update( + /** @type {number} */ (node.start), + /** @type {number} */ (node.end), + 'return;' + ); + }, + LabeledStatement(node, { path, state, next }) { + if (state.analysis.runes) return; + if (path.length > 1) return; + if (node.label.name !== '$') return; + if (state.derived_labeled_statements.has(node)) return; + + next(); + + /** + * @param {"state"|"derived"} rune + */ + function check_rune_binding(rune) { + const has_rune_binding = state.scope.get(rune); + if (has_rune_binding) { + throw new MigrationError( + `can't migrate \`$: ${state.str.original.substring(/** @type {number} */ (node.body.start), node.body.end)}\` to \`$${rune}\` because there's a variable named ${rune}.\n Rename the variable and try again or migrate by hand.` + ); + } + } + + if ( + node.body.type === 'ExpressionStatement' && + node.body.expression.type === 'AssignmentExpression' + ) { + const { left, right } = node.body.expression; + + const ids = extract_identifiers(left); + const [, expression_ids] = extract_all_identifiers_from_expression(right); + const bindings = ids.map((id) => /** @type {Binding} */ (state.scope.get(id.name))); + + if (bindings.every((b) => b.kind === 'legacy_reactive')) { + if ( + right.type !== 'Literal' && + bindings.every((b) => b.kind !== 'store_sub') && + left.type !== 'MemberExpression' + ) { + let { start, end } = /** @type {{ start: number, end: number }} */ (right); + + check_rune_binding('derived'); + + // $derived + state.str.update( + /** @type {number} */ (node.start), + /** @type {number} */ (node.body.expression.start), + 'let ' + ); + + if (right.type === 'SequenceExpression') { + while (state.str.original[start] !== '(') start -= 1; + while (state.str.original[end - 1] !== ')') end += 1; + } + + state.str.prependRight(start, `$derived(`); + + // in a case like `$: ({ a } = b())`, there's already a trailing parenthesis. + // otherwise, we need to add one + if (state.str.original[/** @type {number} */ (node.body.start)] !== '(') { + state.str.appendLeft(end, `)`); + } + + return; + } + + for (const binding of bindings) { + if (binding.reassigned && (ids.includes(binding.node) || expression_ids.length === 0)) { + check_rune_binding('state'); + const init = + binding.kind === 'state' + ? ' = $state()' + : expression_ids.length === 0 + ? ` = $state(${state.str.original.substring(/** @type {number} */ (right.start), right.end)})` + : ''; + // implicitly-declared variable which we need to make explicit + state.str.prependLeft( + /** @type {number} */ (node.start), + `let ${binding.node.name}${init};\n${state.indent}` + ); + } + } + + if (expression_ids.length === 0 && bindings.every((b) => b.kind !== 'store_sub')) { + state.str.remove(/** @type {number} */ (node.start), /** @type {number} */ (node.end)); + return; + } + } + } + + state.legacy_imports.add('run'); + const is_block_stmt = node.body.type === 'BlockStatement'; + const start_end = /** @type {number} */ (node.body.start); + // TODO try to find out if we can use $derived.by instead? + if (is_block_stmt) { + state.str.update( + /** @type {number} */ (node.start), + start_end + 1, + `${state.names.run}(() => {` + ); + const end = /** @type {number} */ (node.body.end); + state.str.update(end - 1, end, '});'); + } else { + state.str.update( + /** @type {number} */ (node.start), + start_end, + `${state.names.run}(() => {\n${state.indent}` + ); + state.str.indent(state.indent, { + exclude: [ + [0, /** @type {number} */ (node.body.start)], + [/** @type {number} */ (node.body.end), state.end] + ] + }); + state.str.appendLeft(/** @type {number} */ (node.end), `\n${state.indent}});`); + } + } +}; + +/** + * + * @param {State} state + * @param {number} start + * @param {number} end + */ +function trim_block(state, start, end) { + const original = state.str.snip(start, end).toString(); + const without_parens = original.substring(1, original.length - 1); + if (without_parens.trim().length !== without_parens.length) { + state.str.update(start + 1, end - 1, without_parens.trim()); + } +} + +/** @type {Visitors} */ +const template = { + Identifier(node, { state, path }) { + handle_identifier(node, state, path); + }, + RegularElement(node, { state, path, next }) { + migrate_slot_usage(node, path, state); + handle_events(node, state); + // Strip off any namespace from the beginning of the node name. + const node_name = node.name.replace(/[a-zA-Z-]*:/g, ''); + + if (state.analysis.source[node.end - 2] === '/' && !is_void(node_name) && !is_svg(node_name)) { + let trimmed_position = node.end - 2; + while (state.str.original.charAt(trimmed_position - 1) === ' ') trimmed_position--; + state.str.remove(trimmed_position, node.end - 1); + state.str.appendRight(node.end, ``); + } + next(); + }, + SvelteSelf(node, { state, next }) { + const source = state.str.original.substring(node.start, node.end); + if (!state.filename) { + const indent = guess_indent(source); + has_migration_task = true; + state.str.prependRight( + node.start, + `\n${indent}` + ); + next(); + return; + } + // overwrite the open tag + state.str.overwrite( + node.start + 1, + node.start + 1 + 'svelte:self'.length, + `${state.analysis.name}` + ); + // if it has a fragment we need to overwrite the closing tag too + if (node.fragment.nodes.length > 0) { + state.str.overwrite( + state.str.original.lastIndexOf('<', node.end) + 2, + node.end - 1, + `${state.analysis.name}` + ); + } else if (!source.endsWith('/>')) { + // special case for case `` it has no fragment but + // we still need to overwrite the end tag + state.str.overwrite( + node.start + source.lastIndexOf('= 0; i--) { + const part = path[i]; + if ( + part.type === 'EachBlock' || + part.type === 'AwaitBlock' || + part.type === 'IfBlock' || + part.type === 'SnippetBlock' || + part.type === 'Component' || + part.type === 'SvelteComponent' + ) { + let position = node.start; + if (i !== path.length - 1) { + for (let modifier = 1; modifier < path.length - i; modifier++) { + const path_part = path[i + modifier]; + if ('start' in path_part) { + position = /** @type {number} */ (path_part.start); + break; + } + } + } + const indent = state.str.original.substring( + state.str.original.lastIndexOf('\n', position) + 1, + position + ); + state.str.appendRight( + position, + `{@const ${expression} = ${current_expression}}\n${indent}` + ); + needs_derived = false; + break; + } + } + if (needs_derived) { + if (state.derived_components.has(current_expression)) { + expression = /** @type {string} */ (state.derived_components.get(current_expression)); + } else { + state.derived_components.set(current_expression, expression); + } + } + } + + state.str.overwrite(node.start + 1, node.start + node.name.length + 1, expression); + + if (state.str.original.substring(node.end - node.name.length - 1, node.end - 1) === node.name) { + state.str.overwrite(node.end - node.name.length - 1, node.end - 1, expression); + } + let this_pos = state.str.original.lastIndexOf('this', node.expression.start); + while (!state.str.original.charAt(this_pos - 1).trim()) this_pos--; + const end_pos = state.str.original.indexOf('}', node.expression.end) + 1; + state.str.remove(this_pos, end_pos); + }, + SvelteFragment(node, { state, path, next }) { + migrate_slot_usage(node, path, state); + next(); + }, + SvelteWindow(node, { state, next }) { + handle_events(node, state); + next(); + }, + SvelteBody(node, { state, next }) { + handle_events(node, state); + next(); + }, + SvelteDocument(node, { state, next }) { + handle_events(node, state); + next(); + }, + SlotElement(node, { state, path, next, visit }) { + migrate_slot_usage(node, path, state); + + if (state.analysis.custom_element) return; + let name = 'children'; + let slot_name = 'default'; + let slot_props = '{ '; + let aliased_slot_name; + + for (const attr of node.attributes) { + if (attr.type === 'SpreadAttribute') { + slot_props += `...${state.str.original.substring(/** @type {number} */ (attr.expression.start), attr.expression.end)}, `; + } else if (attr.type === 'Attribute') { + if (attr.name === 'slot') { + continue; + } + + if (attr.name === 'name') { + slot_name = /** @type {any} */ (attr.value)[0].data; + // if some of the parents or this node itself har a slot + // attribute with the sane name of this slot + // we want to create a derived or the migrated snippet + // will shadow the slot prop + if ( + path.some( + (parent) => + (parent.type === 'RegularElement' || + parent.type === 'SvelteElement' || + parent.type === 'Component' || + parent.type === 'SvelteComponent' || + parent.type === 'SvelteFragment') && + parent.attributes.some( + (attribute) => + attribute.type === 'Attribute' && + attribute.name === 'slot' && + is_text_attribute(attribute) && + attribute.value[0].data === slot_name + ) + ) || + node.attributes.some( + (attribute) => + attribute.type === 'Attribute' && + attribute.name === 'slot' && + is_text_attribute(attribute) && + attribute.value[0].data === slot_name + ) + ) { + aliased_slot_name = `${slot_name}_render`; + state.derived_conflicting_slots.set(aliased_slot_name, slot_name); + } + } else { + const attr_value = + attr.value === true || Array.isArray(attr.value) ? attr.value : [attr.value]; + let value = 'true'; + if (attr_value !== true) { + const first = attr_value[0]; + const last = attr_value[attr_value.length - 1]; + for (const attr of attr_value) { + visit(attr); + } + value = state.str + .snip( + first.type === 'Text' + ? first.start - 1 + : /** @type {number} */ (first.expression.start), + last.type === 'Text' ? last.end + 1 : /** @type {number} */ (last.expression.end) + ) + .toString(); + } + slot_props += value === attr.name ? `${value}, ` : `${attr.name}: ${value}, `; + } + } + } + + slot_props += '}'; + if (slot_props === '{ }') { + slot_props = ''; + } + + const existing_prop = state.props.find((prop) => prop.slot_name === slot_name); + if (existing_prop) { + name = existing_prop.local; + } else if (slot_name !== 'default') { + name = state.scope.generate(slot_name); + if (name !== slot_name) { + throw new MigrationError( + 'This migration would change the name of a slot making the component unusable' + ); + } + } + + if (!existing_prop) { + state.props.push({ + local: name, + exported: name, + init: '', + bindable: false, + optional: true, + slot_name, + type: `import('svelte').${slot_props ? 'Snippet<[any]>' : 'Snippet'}` + }); + } else if (existing_prop.needs_refine_type) { + existing_prop.type = `import('svelte').${slot_props ? 'Snippet<[any]>' : 'Snippet'}`; + existing_prop.needs_refine_type = false; + } + + if ( + slot_name === 'default' && + path.some( + (parent) => + (parent.type === 'SvelteComponent' || + parent.type === 'Component' || + parent.type === 'RegularElement' || + parent.type === 'SvelteElement' || + parent.type === 'SvelteFragment') && + parent.attributes.some((attr) => attr.type === 'LetDirective') + ) + ) { + aliased_slot_name = `${name}_render`; + state.derived_conflicting_slots.set(aliased_slot_name, name); + } + name = aliased_slot_name ?? name; + + if (node.fragment.nodes.length > 0) { + next(); + state.str.update( + node.start, + node.fragment.nodes[0].start, + `{#if ${name}}{@render ${state.analysis.uses_props ? `${state.names.props}.` : ''}${name}(${slot_props})}{:else}` + ); + state.str.update(node.fragment.nodes[node.fragment.nodes.length - 1].end, node.end, '{/if}'); + } else { + state.str.update( + node.start, + node.end, + `{@render ${state.analysis.uses_props ? `${state.names.props}.` : ''}${name}?.(${slot_props})}` + ); + } + }, + Comment(node, { state }) { + const migrated = migrate_svelte_ignore(node.data); + if (migrated !== node.data) { + state.str.overwrite(node.start + ''.length, migrated); + } + }, + HtmlTag(node, { state, next }) { + trim_block(state, node.start, node.end); + next(); + }, + ConstTag(node, { state, next }) { + trim_block(state, node.start, node.end); + next(); + }, + IfBlock(node, { state, next }) { + const start = node.start; + const end = state.str.original.indexOf('}', node.test.end) + 1; + trim_block(state, start, end); + next(); + }, + AwaitBlock(node, { state, next }) { + const start = node.start; + const end = + state.str.original.indexOf( + '}', + node.pending !== null ? node.expression.end : node.value?.end + ) + 1; + trim_block(state, start, end); + if (node.pending !== null) { + const start = state.str.original.lastIndexOf('{', node.value?.start); + const end = state.str.original.indexOf('}', node.value?.end) + 1; + trim_block(state, start, end); + } + if (node.catch !== null) { + const start = state.str.original.lastIndexOf('{', node.error?.start); + const end = state.str.original.indexOf('}', node.error?.end) + 1; + trim_block(state, start, end); + } + next(); + }, + KeyBlock(node, { state, next }) { + const start = node.start; + const end = state.str.original.indexOf('}', node.expression.end) + 1; + trim_block(state, start, end); + next(); + } +}; + +/** + * @param {AST.RegularElement | AST.SvelteElement | AST.SvelteComponent | AST.Component | AST.SlotElement | AST.SvelteFragment} node + * @param {AST.SvelteNode[]} path + * @param {State} state + */ +function migrate_slot_usage(node, path, state) { + const parent = path.at(-2); + // Bail on custom element slot usage + if ( + parent?.type !== 'Component' && + parent?.type !== 'SvelteComponent' && + node.type !== 'Component' && + node.type !== 'SvelteComponent' + ) { + return; + } + + let snippet_name = 'children'; + let snippet_props = []; + + // if we stop the transform because the name is not correct we don't want to + // remove the let directive and they could come before the name + let removal_queue = []; + + for (let attribute of node.attributes) { + if ( + attribute.type === 'Attribute' && + attribute.name === 'slot' && + is_text_attribute(attribute) + ) { + snippet_name = attribute.value[0].data; + // the default slot in svelte 4 if what the children slot is for svelte 5 + if (snippet_name === 'default') { + snippet_name = 'children'; + } + if (!regex_is_valid_identifier.test(snippet_name) || is_reserved(snippet_name)) { + has_migration_task = true; + state.str.appendLeft( + node.start, + `\n${state.indent}` + ); + return; + } + if (parent?.type === 'Component' || parent?.type === 'SvelteComponent') { + for (let attribute of parent.attributes) { + if (attribute.type === 'Attribute' || attribute.type === 'BindDirective') { + if (attribute.name === snippet_name) { + state.str.appendLeft( + node.start, + `\n${state.indent}` + ); + return; + } + } + } + } + // flush the queue after we found the name + for (let remove_let of removal_queue) { + remove_let(); + } + state.str.remove(attribute.start, attribute.end); + } + if (attribute.type === 'LetDirective') { + snippet_props.push( + attribute.name + + (attribute.expression + ? `: ${state.str.original.substring(/** @type {number} */ (attribute.expression.start), /** @type {number} */ (attribute.expression.end))}` + : '') + ); + // we just add to the queue to remove them after we found if we need to migrate or we bail + removal_queue.push(() => state.str.remove(attribute.start, attribute.end)); + } + } + + if (removal_queue.length > 0) { + for (let remove_let of removal_queue) { + remove_let(); + } + } + + if (node.type === 'SvelteFragment' && node.fragment.nodes.length > 0) { + // remove node itself, keep content + state.str.remove(node.start, node.fragment.nodes[0].start); + state.str.remove(node.fragment.nodes[node.fragment.nodes.length - 1].end, node.end); + } + + const props = snippet_props.length > 0 ? `{ ${snippet_props.join(', ')} }` : ''; + + if (snippet_name === 'children' && node.type !== 'SvelteFragment') { + if (snippet_props.length === 0) return; // nothing to do + + let inner_start = 0; + let inner_end = 0; + for (let i = 0; i < node.fragment.nodes.length; i++) { + const inner = node.fragment.nodes[i]; + const is_empty_text = inner.type === 'Text' && !inner.data.trim(); + + if ( + (inner.type === 'RegularElement' || + inner.type === 'SvelteElement' || + inner.type === 'Component' || + inner.type === 'SvelteComponent' || + inner.type === 'SlotElement' || + inner.type === 'SvelteFragment') && + inner.attributes.some((attr) => attr.type === 'Attribute' && attr.name === 'slot') + ) { + if (inner_start && !inner_end) { + // End of default slot content + inner_end = inner.start; + } + } else if (!inner_start && !is_empty_text) { + // Start of default slot content + inner_start = inner.start; + } else if (inner_end && !is_empty_text) { + // There was default slot content before, then some named slot content, now some default slot content again. + // We're moving the last character back by one to avoid the closing {/snippet} tag inserted afterwards + // to come before the opening {#snippet} tag of the named slot. + state.str.update(inner_end - 1, inner_end, ''); + state.str.prependLeft(inner_end - 1, state.str.original[inner_end - 1]); + state.str.move(inner.start, inner.end, inner_end - 1); + } + } + + if (!inner_end) { + inner_end = node.fragment.nodes[node.fragment.nodes.length - 1].end; + } + + state.str.appendLeft( + inner_start, + `{#snippet ${snippet_name}(${props})}\n${state.indent.repeat(path.length)}` + ); + state.str.indent(state.indent, { + exclude: [ + [0, inner_start], + [inner_end, state.str.original.length] + ] + }); + if (inner_end < node.fragment.nodes[node.fragment.nodes.length - 1].end) { + // Named slots coming afterwards + state.str.prependLeft(inner_end, `{/snippet}\n${state.indent.repeat(path.length)}`); + } else { + // No named slots coming afterwards + state.str.prependLeft( + inner_end, + `${state.indent.repeat(path.length)}{/snippet}\n${state.indent.repeat(path.length - 1)}` + ); + } + } else { + // Named slot or `svelte:fragment`: wrap element itself in a snippet + state.str.prependLeft( + node.start, + `{#snippet ${snippet_name}(${props})}\n${state.indent.repeat(path.length - 2)}` + ); + state.str.indent(state.indent, { + exclude: [ + [0, node.start], + [node.end, state.str.original.length] + ] + }); + const str = `\n${state.indent.repeat(path.length - 2)}{/snippet}`; + + if (node.type === 'SlotElement') { + state.str.appendRight(node.end, str); + } else { + state.str.appendLeft(node.end, str); + } + } +} + +/** + * @param {VariableDeclarator} declarator + * @param {State} state + * @param {AST.SvelteNode[]} path + */ +function extract_type_and_comment(declarator, state, path) { + const str = state.str; + const parent = path.at(-1); + + // Try to find jsdoc above the declaration + let comment_node = /** @type {Node} */ (parent)?.leadingComments?.at(-1); + + const comment_start = /** @type {any} */ (comment_node)?.start; + const comment_end = /** @type {any} */ (comment_node)?.end; + let comment = comment_node && str.original.substring(comment_start, comment_end); + if (comment_node) { + str.update(comment_start, comment_end, ''); + } + + // Find trailing comments + const trailing_comment_node = /** @type {Node} */ (parent)?.trailingComments?.at(0); + const trailing_comment_start = /** @type {any} */ (trailing_comment_node)?.start; + const trailing_comment_end = /** @type {any} */ (trailing_comment_node)?.end; + let trailing_comment = + trailing_comment_node && str.original.substring(trailing_comment_start, trailing_comment_end); + + if (trailing_comment_node) { + str.update(trailing_comment_start, trailing_comment_end, ''); + } + + if (declarator.id.typeAnnotation) { + state.has_type_or_fallback = true; + let start = declarator.id.typeAnnotation.start + 1; // skip the colon + while (str.original[start] === ' ') { + start++; + } + return { + type: str.original.substring(start, declarator.id.typeAnnotation.end), + comment, + trailing_comment + }; + } + + let cleaned_comment_arr = comment + ?.split('\n') + .map((line) => + line + .trim() + // replace `// ` for one liners + .replace(/^\/\/\s*/g, '') + // replace `\**` for the initial JSDoc + .replace(/^\/\*\*?\s*/g, '') + // migrate `*/` for the end of JSDoc + .replace(/\s*\*\/$/g, '') + // remove any initial `* ` to clean the comment + .replace(/^\*\s*/g, '') + ) + .filter(Boolean); + const first_at_comment = cleaned_comment_arr?.findIndex((line) => line.startsWith('@')); + let cleaned_comment = cleaned_comment_arr + ?.slice(0, first_at_comment !== -1 ? first_at_comment : cleaned_comment_arr.length) + .join('\n'); + + let cleaned_comment_arr_trailing = trailing_comment + ?.split('\n') + .map((line) => + line + .trim() + // replace `// ` for one liners + .replace(/^\/\/\s*/g, '') + // replace `\**` for the initial JSDoc + .replace(/^\/\*\*?\s*/g, '') + // migrate `*/` for the end of JSDoc + .replace(/\s*\*\/$/g, '') + // remove any initial `* ` to clean the comment + .replace(/^\*\s*/g, '') + ) + .filter(Boolean); + const first_at_comment_trailing = cleaned_comment_arr_trailing?.findIndex((line) => + line.startsWith('@') + ); + let cleaned_comment_trailing = cleaned_comment_arr_trailing + ?.slice( + 0, + first_at_comment_trailing !== -1 + ? first_at_comment_trailing + : cleaned_comment_arr_trailing.length + ) + .join('\n'); + + // try to find a comment with a type annotation, hinting at jsdoc + if (parent?.type === 'ExportNamedDeclaration' && comment_node) { + state.has_type_or_fallback = true; + const match = /@type {(.+)}/.exec(comment_node.value); + if (match) { + // try to find JSDoc comments after a hyphen `-` + const jsdoc_comment = /@type {.+} (?:\w+|\[.*?\]) - (.+)/.exec(comment_node.value); + if (jsdoc_comment) { + cleaned_comment += jsdoc_comment[1]?.trim(); + } + return { + type: match[1], + comment: cleaned_comment, + trailing_comment: cleaned_comment_trailing + }; + } + } + + // try to infer it from the init + if (declarator.init?.type === 'Literal') { + state.has_type_or_fallback = true; // only assume type if it's trivial to infer - else someone would've added a type annotation + const type = typeof declarator.init.value; + if (type === 'string' || type === 'number' || type === 'boolean') { + return { + type, + comment: state.uses_ts ? comment : cleaned_comment, + trailing_comment: state.uses_ts ? trailing_comment : cleaned_comment_trailing + }; + } + } + return { + type: 'any', + comment: state.uses_ts ? comment : cleaned_comment, + trailing_comment: state.uses_ts ? trailing_comment : cleaned_comment_trailing + }; +} + +// Ensure modifiers are applied in the same order as Svelte 4 +const modifier_order = [ + 'preventDefault', + 'stopPropagation', + 'stopImmediatePropagation', + 'self', + 'trusted', + 'once' +]; + +/** + * @param {AST.RegularElement | AST.SvelteElement | AST.SvelteWindow | AST.SvelteDocument | AST.SvelteBody} element + * @param {State} state + */ +function handle_events(element, state) { + /** @type {Map} */ + const handlers = new Map(); + for (const attribute of element.attributes) { + if (attribute.type !== 'OnDirective') continue; + + let name = `on${attribute.name}`; + if (attribute.modifiers.includes('capture')) { + name += 'capture'; + } + + const nodes = handlers.get(name) || []; + nodes.push(attribute); + handlers.set(name, nodes); + } + + for (const [name, nodes] of handlers) { + const handlers = []; + + let first = null; + + for (const node of nodes) { + /** @type {string} */ + let body; + + if (node.expression) { + body = state.str.original.substring( + /** @type {number} */ (node.expression.start), + /** @type {number} */ (node.expression.end) + ); + } else { + body = `${state.names.bubble}('${node.name}')`; + state.legacy_imports.add('createBubbler'); + state.script_insertions.add( + `const ${state.names.bubble} = ${state.names.createBubbler}();` + ); + } + + const has_passive = node.modifiers.includes('passive'); + const has_nonpassive = node.modifiers.includes('nonpassive'); + + const modifiers = modifier_order.filter((modifier) => node.modifiers.includes(modifier)); + + for (const modifier of modifiers) { + state.legacy_imports.add(modifier); + body = `${state.names[modifier]}(${body})`; + } + + if (has_passive || has_nonpassive) { + const action = has_passive ? 'passive' : 'nonpassive'; + state.legacy_imports.add(action); + + state.str.overwrite( + node.start, + node.end, + `use:${state.names[action]}={['${node.name}', () => ${body}]}` + ); + } else { + if (first) { + let start = node.start; + let end = node.end; + + while (/[\s\n]/.test(state.str.original[start - 1])) start -= 1; + state.str.remove(start, end); + } else { + first = node; + } + + handlers.push(body); + } + } + + if (first) { + /** @type {string} */ + let replacement; + + if (handlers.length > 1) { + state.legacy_imports.add('handlers'); + replacement = `${name}={${state.names.handlers}(${handlers.join(', ')})}`; + } else { + const handler = handlers[0]; + replacement = handler === name ? `{${handler}}` : `${name}={${handler}}`; + } + + state.str.overwrite(first.start, first.end, replacement); + } + } +} + +/** + * Returns start and end of the node. If the start is preceeded with white-space-only before a line break, + * the start will be the start of the line. + * @param {string} source + * @param {LabeledStatement} node + */ +function get_node_range(source, node) { + const first_leading_comment = node.leadingComments?.[0]; + const last_trailing_comment = node.trailingComments?.[node.trailingComments.length - 1]; + + // @ts-expect-error the type of `Comment` seems to be wrong...the node actually contains + // start and end but the type seems to only contain a `range` (which doesn't actually exists) + let start = /** @type {number} */ (first_leading_comment?.start ?? node.start); + // @ts-expect-error the type of `Comment` seems to be wrong...the node actually contains + // start and end but the type seems to only contain a `range` (which doesn't actually exists) + let end = /** @type {number} */ (last_trailing_comment?.end ?? node.end); + + let idx = start; + while (source[idx - 1] !== '\n' && source[idx - 1] !== '\r') { + idx--; + if (source[idx] !== ' ' && source[idx] !== '\t') { + idx = start; + break; + } + } + + start = idx; + + return { start, end }; +} + +/** + * @param {Identifier} node + * @param {State} state + * @param {any[]} path + */ +function handle_identifier(node, state, path) { + const parent = path.at(-1); + if (parent?.type === 'MemberExpression' && parent.property === node) return; + + if (state.analysis.uses_props && node.name !== '$$slots') { + if (node.name === '$$props' || node.name === '$$restProps') { + // not 100% correct for $$restProps but it'll do + state.str.update( + /** @type {number} */ (node.start), + /** @type {number} */ (node.end), + state.names.props + ); + } else { + const binding = state.scope.get(node.name); + if (binding?.kind === 'bindable_prop' && binding.node !== node) { + state.str.prependLeft(/** @type {number} */ (node.start), `${state.names.props}.`); + } + } + } else if (node.name === '$$restProps' && state.analysis.uses_rest_props) { + state.str.update( + /** @type {number} */ (node.start), + /** @type {number} */ (node.end), + state.names.rest + ); + } else if (node.name === '$$slots' && state.analysis.uses_slots) { + if (parent?.type === 'MemberExpression') { + if (state.analysis.custom_element) return; + + let name = parent.property.type === 'Literal' ? parent.property.value : parent.property.name; + let slot_name = name; + const existing_prop = state.props.find((prop) => prop.slot_name === name); + if (existing_prop) { + name = existing_prop.local; + } else if (name !== 'default') { + let new_name = state.scope.generate(name); + if (new_name !== name) { + throw new MigrationError( + 'This migration would change the name of a slot making the component unusable' + ); + } + } + + name = name === 'default' ? 'children' : name; + + if (!existing_prop) { + state.props.push({ + local: name, + exported: name, + init: '', + bindable: false, + optional: true, + slot_name, + // if it's the first time we encounter this slot + // we start with any and delegate to when the slot + // is actually rendered (it might not happen in that case) + // any is still a safe bet + type: `import('svelte').Snippet<[any]>`, + needs_refine_type: true + }); + } + + state.str.update( + /** @type {number} */ (node.start), + parent.property.start, + state.analysis.uses_props ? `${state.names.props}.` : '' + ); + state.str.update(parent.property.start, parent.end, name); + } + // else passed as identifier, we don't know what to do here, so let it error + } else if ( + parent?.type === 'TSInterfaceDeclaration' || + parent?.type === 'TSTypeAliasDeclaration' + ) { + const members = + parent.type === 'TSInterfaceDeclaration' ? parent.body.body : parent.typeAnnotation?.members; + if (Array.isArray(members)) { + if (node.name === '$$Props') { + state.has_type_or_fallback = true; + + for (const member of members) { + const prop = state.props.find((prop) => prop.exported === member.key.name); + + const type = state.str.original.substring( + member.typeAnnotation.typeAnnotation.start, + member.typeAnnotation.typeAnnotation.end + ); + + let comment; + const comment_node = member.leadingComments?.at(-1); + if (comment_node?.type === 'Block') { + comment = state.str.original.substring(comment_node.start, comment_node.end); + } + + const trailing_comment = member.trailingComments?.at(0)?.value; + + if (prop) { + prop.type = type; + prop.optional = member.optional; + prop.comment = comment ?? prop.comment; + prop.trailing_comment = trailing_comment ?? prop.trailing_comment; + } else { + state.props.push({ + local: member.key.name, + exported: member.key.name, + init: '', + bindable: false, + optional: member.optional, + type, + comment, + trailing_comment, + type_only: true + }); + } + } + + state.str.remove(parent.start, parent.end); + } + } + } +} + +/** @param {string} content */ +function guess_indent(content) { + const lines = content.split('\n'); + + const tabbed = lines.filter((line) => /^\t+/.test(line)); + const spaced = lines.filter((line) => /^ {2,}/.test(line)); + + if (tabbed.length === 0 && spaced.length === 0) { + return '\t'; + } + + // More lines tabbed than spaced? Assume tabs, and + // default to tabs in the case of a tie (or nothing + // to go on) + if (tabbed.length >= spaced.length) { + return '\t'; + } + + // Otherwise, we need to guess the multiple + const min = spaced.reduce((previous, current) => { + const count = /^ +/.exec(current)?.[0].length ?? 0; + return Math.min(count, previous); + }, Infinity); + + return ' '.repeat(min); +} diff --git a/node_modules/svelte/src/compiler/phases/1-parse/acorn.js b/node_modules/svelte/src/compiler/phases/1-parse/acorn.js new file mode 100644 index 0000000..36f7688 --- /dev/null +++ b/node_modules/svelte/src/compiler/phases/1-parse/acorn.js @@ -0,0 +1,171 @@ +/** @import { Comment, Program } from 'estree' */ +import * as acorn from 'acorn'; +import { walk } from 'zimmerframe'; +import { tsPlugin } from '@sveltejs/acorn-typescript'; + +const ParserWithTS = acorn.Parser.extend(tsPlugin()); + +/** + * @param {string} source + * @param {boolean} typescript + * @param {boolean} [is_script] + */ +export function parse(source, typescript, is_script) { + const parser = typescript ? ParserWithTS : acorn.Parser; + const { onComment, add_comments } = get_comment_handlers(source); + // @ts-ignore + const parse_statement = parser.prototype.parseStatement; + + // If we're dealing with a `; +} + +export function reset_elements() { + let old_parent = parent; + parent = null; + return () => { + parent = old_parent; + }; +} + +/** + * @param {Payload} payload + * @param {string} tag + * @param {number} line + * @param {number} column + */ +export function push_element(payload, tag, line, column) { + var filename = /** @type {Component} */ (current_component).function[FILENAME]; + var child = { tag, parent, filename, line, column }; + + if (parent !== null) { + var ancestor = parent.parent; + var ancestors = [parent.tag]; + + const child_loc = filename ? `${filename}:${line}:${column}` : undefined; + const parent_loc = parent.filename + ? `${parent.filename}:${parent.line}:${parent.column}` + : undefined; + + const message = is_tag_valid_with_parent(tag, parent.tag, child_loc, parent_loc); + if (message) print_error(payload, message); + + while (ancestor != null) { + ancestors.push(ancestor.tag); + const ancestor_loc = ancestor.filename + ? `${ancestor.filename}:${ancestor.line}:${ancestor.column}` + : undefined; + + const message = is_tag_valid_with_ancestor(tag, ancestors, child_loc, ancestor_loc); + if (message) print_error(payload, message); + + ancestor = ancestor.parent; + } + } + + parent = child; +} + +export function pop_element() { + parent = /** @type {Element} */ (parent).parent; +} + +/** + * @param {Payload} payload + */ +export function validate_snippet_args(payload) { + if ( + typeof payload !== 'object' || + // for some reason typescript consider the type of payload as never after the first instanceof + !(payload instanceof Payload || /** @type {any} */ (payload) instanceof HeadPayload) + ) { + invalid_snippet_arguments(); + } +} diff --git a/node_modules/svelte/src/internal/server/errors.js b/node_modules/svelte/src/internal/server/errors.js new file mode 100644 index 0000000..38c545c --- /dev/null +++ b/node_modules/svelte/src/internal/server/errors.js @@ -0,0 +1,13 @@ +/* This file is generated by scripts/process-messages/index.js. Do not edit! */ + +/** + * `%name%(...)` is not available on the server + * @param {string} name + * @returns {never} + */ +export function lifecycle_function_unavailable(name) { + const error = new Error(`lifecycle_function_unavailable\n\`${name}(...)\` is not available on the server\nhttps://svelte.dev/e/lifecycle_function_unavailable`); + + error.name = 'Svelte error'; + throw error; +} \ No newline at end of file diff --git a/node_modules/svelte/src/internal/server/hydration.js b/node_modules/svelte/src/internal/server/hydration.js new file mode 100644 index 0000000..94fc61b --- /dev/null +++ b/node_modules/svelte/src/internal/server/hydration.js @@ -0,0 +1,6 @@ +import { HYDRATION_END, HYDRATION_START, HYDRATION_START_ELSE } from '../../constants.js'; + +export const BLOCK_OPEN = ``; +export const BLOCK_OPEN_ELSE = ``; +export const BLOCK_CLOSE = ``; +export const EMPTY_COMMENT = ``; diff --git a/node_modules/svelte/src/internal/server/index.js b/node_modules/svelte/src/internal/server/index.js new file mode 100644 index 0000000..b58a1d4 --- /dev/null +++ b/node_modules/svelte/src/internal/server/index.js @@ -0,0 +1,516 @@ +/** @import { ComponentType, SvelteComponent } from 'svelte' */ +/** @import { Component, RenderOutput } from '#server' */ +/** @import { Store } from '#shared' */ +export { FILENAME, HMR } from '../../constants.js'; +import { attr, clsx, to_class, to_style } from '../shared/attributes.js'; +import { is_promise, noop } from '../shared/utils.js'; +import { subscribe_to_store } from '../../store/utils.js'; +import { + UNINITIALIZED, + ELEMENT_PRESERVE_ATTRIBUTE_CASE, + ELEMENT_IS_NAMESPACED +} from '../../constants.js'; +import { escape_html } from '../../escaping.js'; +import { DEV } from 'esm-env'; +import { current_component, pop, push } from './context.js'; +import { EMPTY_COMMENT, BLOCK_CLOSE, BLOCK_OPEN, BLOCK_OPEN_ELSE } from './hydration.js'; +import { validate_store } from '../shared/validate.js'; +import { is_boolean_attribute, is_raw_text_element, is_void } from '../../utils.js'; +import { reset_elements } from './dev.js'; +import { Payload } from './payload.js'; + +// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 +// https://infra.spec.whatwg.org/#noncharacter +const INVALID_ATTR_NAME_CHAR_REGEX = + /[\s'">/=\u{FDD0}-\u{FDEF}\u{FFFE}\u{FFFF}\u{1FFFE}\u{1FFFF}\u{2FFFE}\u{2FFFF}\u{3FFFE}\u{3FFFF}\u{4FFFE}\u{4FFFF}\u{5FFFE}\u{5FFFF}\u{6FFFE}\u{6FFFF}\u{7FFFE}\u{7FFFF}\u{8FFFE}\u{8FFFF}\u{9FFFE}\u{9FFFF}\u{AFFFE}\u{AFFFF}\u{BFFFE}\u{BFFFF}\u{CFFFE}\u{CFFFF}\u{DFFFE}\u{DFFFF}\u{EFFFE}\u{EFFFF}\u{FFFFE}\u{FFFFF}\u{10FFFE}\u{10FFFF}]/u; + +/** + * @param {Payload} payload + * @param {string} tag + * @param {() => void} attributes_fn + * @param {() => void} children_fn + * @returns {void} + */ +export function element(payload, tag, attributes_fn = noop, children_fn = noop) { + payload.out += ''; + + if (tag) { + payload.out += `<${tag}`; + attributes_fn(); + payload.out += `>`; + + if (!is_void(tag)) { + children_fn(); + if (!is_raw_text_element(tag)) { + payload.out += EMPTY_COMMENT; + } + payload.out += ``; + } + } + + payload.out += ''; +} + +/** + * Array of `onDestroy` callbacks that should be called at the end of the server render function + * @type {Function[]} + */ +export let on_destroy = []; + +/** + * Only available on the server and when compiling with the `server` option. + * Takes a component and returns an object with `body` and `head` properties on it, which you can use to populate the HTML when server-rendering your app. + * @template {Record} Props + * @param {import('svelte').Component | ComponentType>} component + * @param {{ props?: Omit; context?: Map; idPrefix?: string }} [options] + * @returns {RenderOutput} + */ +export function render(component, options = {}) { + const payload = new Payload(options.idPrefix ? options.idPrefix + '-' : ''); + + const prev_on_destroy = on_destroy; + on_destroy = []; + payload.out += BLOCK_OPEN; + + let reset_reset_element; + + if (DEV) { + // prevent parent/child element state being corrupted by a bad render + reset_reset_element = reset_elements(); + } + + if (options.context) { + push(); + /** @type {Component} */ (current_component).c = options.context; + } + + // @ts-expect-error + component(payload, options.props ?? {}, {}, {}); + + if (options.context) { + pop(); + } + + if (reset_reset_element) { + reset_reset_element(); + } + + payload.out += BLOCK_CLOSE; + for (const cleanup of on_destroy) cleanup(); + on_destroy = prev_on_destroy; + + let head = payload.head.out + payload.head.title; + + for (const { hash, code } of payload.css) { + head += ``; + } + + return { + head, + html: payload.out, + body: payload.out + }; +} + +/** + * @param {Payload} payload + * @param {(head_payload: Payload['head']) => void} fn + * @returns {void} + */ +export function head(payload, fn) { + const head_payload = payload.head; + head_payload.out += BLOCK_OPEN; + fn(head_payload); + head_payload.out += BLOCK_CLOSE; +} + +/** + * @param {Payload} payload + * @param {boolean} is_html + * @param {Record} props + * @param {() => void} component + * @param {boolean} dynamic + * @returns {void} + */ +export function css_props(payload, is_html, props, component, dynamic = false) { + const styles = style_object_to_string(props); + + if (is_html) { + payload.out += ``; + } else { + payload.out += ``; + } + + if (dynamic) { + payload.out += ''; + } + + component(); + + if (is_html) { + payload.out += ``; + } else { + payload.out += ``; + } +} + +/** + * @param {Record} attrs + * @param {string | null} css_hash + * @param {Record} [classes] + * @param {Record} [styles] + * @param {number} [flags] + * @returns {string} + */ +export function spread_attributes(attrs, css_hash, classes, styles, flags = 0) { + if (styles) { + attrs.style = to_style(attrs.style, styles); + } + + if (attrs.class) { + attrs.class = clsx(attrs.class); + } + + if (css_hash || classes) { + attrs.class = to_class(attrs.class, css_hash, classes); + } + + let attr_str = ''; + let name; + + const is_html = (flags & ELEMENT_IS_NAMESPACED) === 0; + const lowercase = (flags & ELEMENT_PRESERVE_ATTRIBUTE_CASE) === 0; + + for (name in attrs) { + // omit functions, internal svelte properties and invalid attribute names + if (typeof attrs[name] === 'function') continue; + if (name[0] === '$' && name[1] === '$') continue; // faster than name.startsWith('$$') + if (INVALID_ATTR_NAME_CHAR_REGEX.test(name)) continue; + + var value = attrs[name]; + + if (lowercase) { + name = name.toLowerCase(); + } + + attr_str += attr(name, value, is_html && is_boolean_attribute(name)); + } + + return attr_str; +} + +/** + * @param {Record[]} props + * @returns {Record} + */ +export function spread_props(props) { + /** @type {Record} */ + const merged_props = {}; + let key; + + for (let i = 0; i < props.length; i++) { + const obj = props[i]; + for (key in obj) { + const desc = Object.getOwnPropertyDescriptor(obj, key); + if (desc) { + Object.defineProperty(merged_props, key, desc); + } else { + merged_props[key] = obj[key]; + } + } + } + return merged_props; +} + +/** + * @param {unknown} value + * @returns {string} + */ +export function stringify(value) { + return typeof value === 'string' ? value : value == null ? '' : value + ''; +} + +/** @param {Record} style_object */ +function style_object_to_string(style_object) { + return Object.keys(style_object) + .filter(/** @param {any} key */ (key) => style_object[key] != null && style_object[key] !== '') + .map(/** @param {any} key */ (key) => `${key}: ${escape_html(style_object[key], true)};`) + .join(' '); +} + +/** + * @param {any} value + * @param {string | undefined} [hash] + * @param {Record} [directives] + */ +export function attr_class(value, hash, directives) { + var result = to_class(value, hash, directives); + return result ? ` class="${escape_html(result, true)}"` : ''; +} + +/** + * @param {any} value + * @param {Record|[Record,Record]} [directives] + */ +export function attr_style(value, directives) { + var result = to_style(value, directives); + return result ? ` style="${escape_html(result, true)}"` : ''; +} + +/** + * @template V + * @param {Record} store_values + * @param {string} store_name + * @param {Store | null | undefined} store + * @returns {V} + */ +export function store_get(store_values, store_name, store) { + if (DEV) { + validate_store(store, store_name.slice(1)); + } + + // it could be that someone eagerly updates the store in the instance script, so + // we should only reuse the store value in the template + if (store_name in store_values && store_values[store_name][0] === store) { + return store_values[store_name][2]; + } + + store_values[store_name]?.[1](); // if store was switched, unsubscribe from old store + store_values[store_name] = [store, null, undefined]; + const unsub = subscribe_to_store( + store, + /** @param {any} v */ (v) => (store_values[store_name][2] = v) + ); + store_values[store_name][1] = unsub; + return store_values[store_name][2]; +} + +/** + * Sets the new value of a store and returns that value. + * @template V + * @param {Store} store + * @param {V} value + * @returns {V} + */ +export function store_set(store, value) { + store.set(value); + return value; +} + +/** + * Updates a store with a new value. + * @template V + * @param {Record} store_values + * @param {string} store_name + * @param {Store} store + * @param {any} expression + */ +export function store_mutate(store_values, store_name, store, expression) { + store_set(store, store_get(store_values, store_name, store)); + return expression; +} + +/** + * @param {Record} store_values + * @param {string} store_name + * @param {Store} store + * @param {1 | -1} [d] + * @returns {number} + */ +export function update_store(store_values, store_name, store, d = 1) { + let store_value = store_get(store_values, store_name, store); + store.set(store_value + d); + return store_value; +} + +/** + * @param {Record} store_values + * @param {string} store_name + * @param {Store} store + * @param {1 | -1} [d] + * @returns {number} + */ +export function update_store_pre(store_values, store_name, store, d = 1) { + const value = store_get(store_values, store_name, store) + d; + store.set(value); + return value; +} + +/** @param {Record} store_values */ +export function unsubscribe_stores(store_values) { + for (const store_name in store_values) { + store_values[store_name][1](); + } +} + +/** + * @param {Payload} payload + * @param {Record} $$props + * @param {string} name + * @param {Record} slot_props + * @param {null | (() => void)} fallback_fn + * @returns {void} + */ +export function slot(payload, $$props, name, slot_props, fallback_fn) { + var slot_fn = $$props.$$slots?.[name]; + // Interop: Can use snippets to fill slots + if (slot_fn === true) { + slot_fn = $$props[name === 'default' ? 'children' : name]; + } + + if (slot_fn !== undefined) { + slot_fn(payload, slot_props); + } else { + fallback_fn?.(); + } +} + +/** + * @param {Record} props + * @param {string[]} rest + * @returns {Record} + */ +export function rest_props(props, rest) { + /** @type {Record} */ + const rest_props = {}; + let key; + for (key in props) { + if (!rest.includes(key)) { + rest_props[key] = props[key]; + } + } + return rest_props; +} + +/** + * @param {Record} props + * @returns {Record} + */ +export function sanitize_props(props) { + const { children, $$slots, ...sanitized } = props; + return sanitized; +} + +/** + * @param {Record} props + * @returns {Record} + */ +export function sanitize_slots(props) { + /** @type {Record} */ + const sanitized = {}; + if (props.children) sanitized.default = true; + for (const key in props.$$slots) { + sanitized[key] = true; + } + return sanitized; +} + +/** + * Legacy mode: If the prop has a fallback and is bound in the + * parent component, propagate the fallback value upwards. + * @param {Record} props_parent + * @param {Record} props_now + */ +export function bind_props(props_parent, props_now) { + for (const key in props_now) { + const initial_value = props_parent[key]; + const value = props_now[key]; + if ( + initial_value === undefined && + value !== undefined && + Object.getOwnPropertyDescriptor(props_parent, key)?.set + ) { + props_parent[key] = value; + } + } +} + +/** + * @template V + * @param {Payload} payload + * @param {Promise} promise + * @param {null | (() => void)} pending_fn + * @param {(value: V) => void} then_fn + * @returns {void} + */ +function await_block(payload, promise, pending_fn, then_fn) { + if (is_promise(promise)) { + payload.out += BLOCK_OPEN; + promise.then(null, noop); + if (pending_fn !== null) { + pending_fn(); + } + } else if (then_fn !== null) { + payload.out += BLOCK_OPEN_ELSE; + then_fn(promise); + } +} + +export { await_block as await }; + +/** @param {any} array_like_or_iterator */ +export function ensure_array_like(array_like_or_iterator) { + if (array_like_or_iterator) { + return array_like_or_iterator.length !== undefined + ? array_like_or_iterator + : Array.from(array_like_or_iterator); + } + return []; +} + +/** + * @param {any[]} args + * @param {Function} [inspect] + */ +// eslint-disable-next-line no-console +export function inspect(args, inspect = console.log) { + inspect('init', ...args); +} + +/** + * @template V + * @param {() => V} get_value + */ +export function once(get_value) { + let value = /** @type {V} */ (UNINITIALIZED); + return () => { + if (value === UNINITIALIZED) { + value = get_value(); + } + return value; + }; +} + +/** + * Create an unique ID + * @param {Payload} payload + * @returns {string} + */ +export function props_id(payload) { + const uid = payload.uid(); + payload.out += ''; + return uid; +} + +export { attr, clsx }; + +export { html } from './blocks/html.js'; + +export { push, pop } from './context.js'; + +export { push_element, pop_element, validate_snippet_args } from './dev.js'; + +export { assign_payload, copy_payload } from './payload.js'; + +export { snapshot } from '../shared/clone.js'; + +export { fallback } from '../shared/utils.js'; + +export { + invalid_default_snippet, + validate_dynamic_element_tag, + validate_void_dynamic_element, + prevent_snippet_stringification +} from '../shared/validate.js'; + +export { escape_html as escape }; diff --git a/node_modules/svelte/src/internal/server/payload.js b/node_modules/svelte/src/internal/server/payload.js new file mode 100644 index 0000000..8df5787 --- /dev/null +++ b/node_modules/svelte/src/internal/server/payload.js @@ -0,0 +1,72 @@ +export class HeadPayload { + /** @type {Set<{ hash: string; code: string }>} */ + css = new Set(); + out = ''; + uid = () => ''; + title = ''; + + constructor(css = new Set(), out = '', title = '', uid = () => '') { + this.css = css; + this.out = out; + this.title = title; + this.uid = uid; + } +} + +export class Payload { + /** @type {Set<{ hash: string; code: string }>} */ + css = new Set(); + out = ''; + uid = () => ''; + + head = new HeadPayload(); + + constructor(id_prefix = '') { + this.uid = props_id_generator(id_prefix); + this.head.uid = this.uid; + } +} + +/** + * Used in legacy mode to handle bindings + * @param {Payload} to_copy + * @returns {Payload} + */ +export function copy_payload({ out, css, head, uid }) { + const payload = new Payload(); + + payload.out = out; + payload.css = new Set(css); + payload.uid = uid; + + payload.head = new HeadPayload(); + payload.head.out = head.out; + payload.head.css = new Set(head.css); + payload.head.title = head.title; + payload.head.uid = head.uid; + + return payload; +} + +/** + * Assigns second payload to first + * @param {Payload} p1 + * @param {Payload} p2 + * @returns {void} + */ +export function assign_payload(p1, p2) { + p1.out = p2.out; + p1.css = p2.css; + p1.head = p2.head; + p1.uid = p2.uid; +} + +/** + * Creates an ID generator + * @param {string} prefix + * @returns {() => string} + */ +function props_id_generator(prefix) { + let uid = 1; + return () => `${prefix}s${uid++}`; +} diff --git a/node_modules/svelte/src/internal/shared/attributes.js b/node_modules/svelte/src/internal/shared/attributes.js new file mode 100644 index 0000000..c8758c1 --- /dev/null +++ b/node_modules/svelte/src/internal/shared/attributes.js @@ -0,0 +1,219 @@ +import { escape_html } from '../../escaping.js'; +import { clsx as _clsx } from 'clsx'; + +/** + * `
` should be rendered as `
` and _not_ + * `
`, which is equivalent to `
`. There + * may be other odd cases that need to be added to this list in future + * @type {Record>} + */ +const replacements = { + translate: new Map([ + [true, 'yes'], + [false, 'no'] + ]) +}; + +/** + * @template V + * @param {string} name + * @param {V} value + * @param {boolean} [is_boolean] + * @returns {string} + */ +export function attr(name, value, is_boolean = false) { + if (value == null || (!value && is_boolean)) return ''; + const normalized = (name in replacements && replacements[name].get(value)) || value; + const assignment = is_boolean ? '' : `="${escape_html(normalized, true)}"`; + return ` ${name}${assignment}`; +} + +/** + * Small wrapper around clsx to preserve Svelte's (weird) handling of falsy values. + * TODO Svelte 6 revisit this, and likely turn all falsy values into the empty string (what clsx also does) + * @param {any} value + */ +export function clsx(value) { + if (typeof value === 'object') { + return _clsx(value); + } else { + return value ?? ''; + } +} + +const whitespace = [...' \t\n\r\f\u00a0\u000b\ufeff']; + +/** + * @param {any} value + * @param {string | null} [hash] + * @param {Record} [directives] + * @returns {string | null} + */ +export function to_class(value, hash, directives) { + var classname = value == null ? '' : '' + value; + + if (hash) { + classname = classname ? classname + ' ' + hash : hash; + } + + if (directives) { + for (var key in directives) { + if (directives[key]) { + classname = classname ? classname + ' ' + key : key; + } else if (classname.length) { + var len = key.length; + var a = 0; + + while ((a = classname.indexOf(key, a)) >= 0) { + var b = a + len; + + if ( + (a === 0 || whitespace.includes(classname[a - 1])) && + (b === classname.length || whitespace.includes(classname[b])) + ) { + classname = (a === 0 ? '' : classname.substring(0, a)) + classname.substring(b + 1); + } else { + a = b; + } + } + } + } + } + + return classname === '' ? null : classname; +} + +/** + * + * @param {Record} styles + * @param {boolean} important + */ +function append_styles(styles, important = false) { + var separator = important ? ' !important;' : ';'; + var css = ''; + + for (var key in styles) { + var value = styles[key]; + if (value != null && value !== '') { + css += ' ' + key + ': ' + value + separator; + } + } + + return css; +} + +/** + * @param {string} name + * @returns {string} + */ +function to_css_name(name) { + if (name[0] !== '-' || name[1] !== '-') { + return name.toLowerCase(); + } + return name; +} + +/** + * @param {any} value + * @param {Record | [Record, Record]} [styles] + * @returns {string | null} + */ +export function to_style(value, styles) { + if (styles) { + var new_style = ''; + + /** @type {Record | undefined} */ + var normal_styles; + + /** @type {Record | undefined} */ + var important_styles; + + if (Array.isArray(styles)) { + normal_styles = styles[0]; + important_styles = styles[1]; + } else { + normal_styles = styles; + } + + if (value) { + value = String(value) + .replaceAll(/\s*\/\*.*?\*\/\s*/g, '') + .trim(); + + /** @type {boolean | '"' | "'"} */ + var in_str = false; + var in_apo = 0; + var in_comment = false; + + var reserved_names = []; + + if (normal_styles) { + reserved_names.push(...Object.keys(normal_styles).map(to_css_name)); + } + if (important_styles) { + reserved_names.push(...Object.keys(important_styles).map(to_css_name)); + } + + var start_index = 0; + var name_index = -1; + + const len = value.length; + for (var i = 0; i < len; i++) { + var c = value[i]; + + if (in_comment) { + if (c === '/' && value[i - 1] === '*') { + in_comment = false; + } + } else if (in_str) { + if (in_str === c) { + in_str = false; + } + } else if (c === '/' && value[i + 1] === '*') { + in_comment = true; + } else if (c === '"' || c === "'") { + in_str = c; + } else if (c === '(') { + in_apo++; + } else if (c === ')') { + in_apo--; + } + + if (!in_comment && in_str === false && in_apo === 0) { + if (c === ':' && name_index === -1) { + name_index = i; + } else if (c === ';' || i === len - 1) { + if (name_index !== -1) { + var name = to_css_name(value.substring(start_index, name_index).trim()); + + if (!reserved_names.includes(name)) { + if (c !== ';') { + i++; + } + + var property = value.substring(start_index, i).trim(); + new_style += ' ' + property + ';'; + } + } + + start_index = i + 1; + name_index = -1; + } + } + } + } + + if (normal_styles) { + new_style += append_styles(normal_styles); + } + + if (important_styles) { + new_style += append_styles(important_styles, true); + } + + new_style = new_style.trim(); + return new_style === '' ? null : new_style; + } + + return value == null ? null : String(value); +} diff --git a/node_modules/svelte/src/internal/shared/clone.js b/node_modules/svelte/src/internal/shared/clone.js new file mode 100644 index 0000000..4632fc3 --- /dev/null +++ b/node_modules/svelte/src/internal/shared/clone.js @@ -0,0 +1,128 @@ +/** @import { Snapshot } from './types' */ +import { DEV } from 'esm-env'; +import * as w from './warnings.js'; +import { get_prototype_of, is_array, object_prototype } from './utils.js'; + +/** + * In dev, we keep track of which properties could not be cloned. In prod + * we don't bother, but we keep a dummy array around so that the + * signature stays the same + * @type {string[]} + */ +const empty = []; + +/** + * @template T + * @param {T} value + * @param {boolean} [skip_warning] + * @returns {Snapshot} + */ +export function snapshot(value, skip_warning = false) { + if (DEV && !skip_warning) { + /** @type {string[]} */ + const paths = []; + + const copy = clone(value, new Map(), '', paths); + if (paths.length === 1 && paths[0] === '') { + // value could not be cloned + w.state_snapshot_uncloneable(); + } else if (paths.length > 0) { + // some properties could not be cloned + const slice = paths.length > 10 ? paths.slice(0, 7) : paths.slice(0, 10); + const excess = paths.length - slice.length; + + let uncloned = slice.map((path) => `- ${path}`).join('\n'); + if (excess > 0) uncloned += `\n- ...and ${excess} more`; + + w.state_snapshot_uncloneable(uncloned); + } + + return copy; + } + + return clone(value, new Map(), '', empty); +} + +/** + * @template T + * @param {T} value + * @param {Map>} cloned + * @param {string} path + * @param {string[]} paths + * @param {null | T} original The original value, if `value` was produced from a `toJSON` call + * @returns {Snapshot} + */ +function clone(value, cloned, path, paths, original = null) { + if (typeof value === 'object' && value !== null) { + var unwrapped = cloned.get(value); + if (unwrapped !== undefined) return unwrapped; + + if (value instanceof Map) return /** @type {Snapshot} */ (new Map(value)); + if (value instanceof Set) return /** @type {Snapshot} */ (new Set(value)); + + if (is_array(value)) { + var copy = /** @type {Snapshot} */ (Array(value.length)); + cloned.set(value, copy); + + if (original !== null) { + cloned.set(original, copy); + } + + for (var i = 0; i < value.length; i += 1) { + var element = value[i]; + if (i in value) { + copy[i] = clone(element, cloned, DEV ? `${path}[${i}]` : path, paths); + } + } + + return copy; + } + + if (get_prototype_of(value) === object_prototype) { + /** @type {Snapshot} */ + copy = {}; + cloned.set(value, copy); + + if (original !== null) { + cloned.set(original, copy); + } + + for (var key in value) { + // @ts-expect-error + copy[key] = clone(value[key], cloned, DEV ? `${path}.${key}` : path, paths); + } + + return copy; + } + + if (value instanceof Date) { + return /** @type {Snapshot} */ (structuredClone(value)); + } + + if (typeof (/** @type {T & { toJSON?: any } } */ (value).toJSON) === 'function') { + return clone( + /** @type {T & { toJSON(): any } } */ (value).toJSON(), + cloned, + DEV ? `${path}.toJSON()` : path, + paths, + // Associate the instance with the toJSON clone + value + ); + } + } + + if (value instanceof EventTarget) { + // can't be cloned + return /** @type {Snapshot} */ (value); + } + + try { + return /** @type {Snapshot} */ (structuredClone(value)); + } catch (e) { + if (DEV) { + paths.push(path); + } + + return /** @type {Snapshot} */ (value); + } +} diff --git a/node_modules/svelte/src/internal/shared/errors.js b/node_modules/svelte/src/internal/shared/errors.js new file mode 100644 index 0000000..b8606fb --- /dev/null +++ b/node_modules/svelte/src/internal/shared/errors.js @@ -0,0 +1,95 @@ +/* This file is generated by scripts/process-messages/index.js. Do not edit! */ + +import { DEV } from 'esm-env'; + +/** + * Cannot use `{@render children(...)}` if the parent component uses `let:` directives. Consider using a named snippet instead + * @returns {never} + */ +export function invalid_default_snippet() { + if (DEV) { + const error = new Error(`invalid_default_snippet\nCannot use \`{@render children(...)}\` if the parent component uses \`let:\` directives. Consider using a named snippet instead\nhttps://svelte.dev/e/invalid_default_snippet`); + + error.name = 'Svelte error'; + throw error; + } else { + throw new Error(`https://svelte.dev/e/invalid_default_snippet`); + } +} + +/** + * A snippet function was passed invalid arguments. Snippets should only be instantiated via `{@render ...}` + * @returns {never} + */ +export function invalid_snippet_arguments() { + if (DEV) { + const error = new Error(`invalid_snippet_arguments\nA snippet function was passed invalid arguments. Snippets should only be instantiated via \`{@render ...}\`\nhttps://svelte.dev/e/invalid_snippet_arguments`); + + error.name = 'Svelte error'; + throw error; + } else { + throw new Error(`https://svelte.dev/e/invalid_snippet_arguments`); + } +} + +/** + * `%name%(...)` can only be used during component initialisation + * @param {string} name + * @returns {never} + */ +export function lifecycle_outside_component(name) { + if (DEV) { + const error = new Error(`lifecycle_outside_component\n\`${name}(...)\` can only be used during component initialisation\nhttps://svelte.dev/e/lifecycle_outside_component`); + + error.name = 'Svelte error'; + throw error; + } else { + throw new Error(`https://svelte.dev/e/lifecycle_outside_component`); + } +} + +/** + * Attempted to render a snippet without a `{@render}` block. This would cause the snippet code to be stringified instead of its content being rendered to the DOM. To fix this, change `{snippet}` to `{@render snippet()}`. + * @returns {never} + */ +export function snippet_without_render_tag() { + if (DEV) { + const error = new Error(`snippet_without_render_tag\nAttempted to render a snippet without a \`{@render}\` block. This would cause the snippet code to be stringified instead of its content being rendered to the DOM. To fix this, change \`{snippet}\` to \`{@render snippet()}\`.\nhttps://svelte.dev/e/snippet_without_render_tag`); + + error.name = 'Svelte error'; + throw error; + } else { + throw new Error(`https://svelte.dev/e/snippet_without_render_tag`); + } +} + +/** + * `%name%` is not a store with a `subscribe` method + * @param {string} name + * @returns {never} + */ +export function store_invalid_shape(name) { + if (DEV) { + const error = new Error(`store_invalid_shape\n\`${name}\` is not a store with a \`subscribe\` method\nhttps://svelte.dev/e/store_invalid_shape`); + + error.name = 'Svelte error'; + throw error; + } else { + throw new Error(`https://svelte.dev/e/store_invalid_shape`); + } +} + +/** + * The `this` prop on `` must be a string, if defined + * @returns {never} + */ +export function svelte_element_invalid_this_value() { + if (DEV) { + const error = new Error(`svelte_element_invalid_this_value\nThe \`this\` prop on \`\` must be a string, if defined\nhttps://svelte.dev/e/svelte_element_invalid_this_value`); + + error.name = 'Svelte error'; + throw error; + } else { + throw new Error(`https://svelte.dev/e/svelte_element_invalid_this_value`); + } +} \ No newline at end of file diff --git a/node_modules/svelte/src/internal/shared/utils.js b/node_modules/svelte/src/internal/shared/utils.js new file mode 100644 index 0000000..5e7f315 --- /dev/null +++ b/node_modules/svelte/src/internal/shared/utils.js @@ -0,0 +1,83 @@ +// Store the references to globals in case someone tries to monkey patch these, causing the below +// to de-opt (this occurs often when using popular extensions). +export var is_array = Array.isArray; +export var index_of = Array.prototype.indexOf; +export var array_from = Array.from; +export var object_keys = Object.keys; +export var define_property = Object.defineProperty; +export var get_descriptor = Object.getOwnPropertyDescriptor; +export var get_descriptors = Object.getOwnPropertyDescriptors; +export var object_prototype = Object.prototype; +export var array_prototype = Array.prototype; +export var get_prototype_of = Object.getPrototypeOf; +export var is_extensible = Object.isExtensible; + +/** + * @param {any} thing + * @returns {thing is Function} + */ +export function is_function(thing) { + return typeof thing === 'function'; +} + +export const noop = () => {}; + +// Adapted from https://github.com/then/is-promise/blob/master/index.js +// Distributed under MIT License https://github.com/then/is-promise/blob/master/LICENSE + +/** + * @template [T=any] + * @param {any} value + * @returns {value is PromiseLike} + */ +export function is_promise(value) { + return typeof value?.then === 'function'; +} + +/** @param {Function} fn */ +export function run(fn) { + return fn(); +} + +/** @param {Array<() => void>} arr */ +export function run_all(arr) { + for (var i = 0; i < arr.length; i++) { + arr[i](); + } +} + +/** + * TODO replace with Promise.withResolvers once supported widely enough + * @template T + */ +export function deferred() { + /** @type {(value: T) => void} */ + var resolve; + + /** @type {(reason: any) => void} */ + var reject; + + /** @type {Promise} */ + var promise = new Promise((res, rej) => { + resolve = res; + reject = rej; + }); + + // @ts-expect-error + return { promise, resolve, reject }; +} + +/** + * @template V + * @param {V} value + * @param {V | (() => V)} fallback + * @param {boolean} [lazy] + * @returns {V} + */ +export function fallback(value, fallback, lazy = false) { + return value === undefined + ? lazy + ? /** @type {() => V} */ (fallback)() + : /** @type {V} */ (fallback) + : value; +} diff --git a/node_modules/svelte/src/internal/shared/validate.js b/node_modules/svelte/src/internal/shared/validate.js new file mode 100644 index 0000000..bbb2375 --- /dev/null +++ b/node_modules/svelte/src/internal/shared/validate.js @@ -0,0 +1,49 @@ +/** @import { TemplateNode } from '#client' */ +/** @import { Getters } from '#shared' */ +import { is_void } from '../../utils.js'; +import * as w from './warnings.js'; +import * as e from './errors.js'; + +export { invalid_default_snippet } from './errors.js'; + +/** + * @param {() => string} tag_fn + * @returns {void} + */ +export function validate_void_dynamic_element(tag_fn) { + const tag = tag_fn(); + if (tag && is_void(tag)) { + w.dynamic_void_element_content(tag); + } +} + +/** @param {() => unknown} tag_fn */ +export function validate_dynamic_element_tag(tag_fn) { + const tag = tag_fn(); + const is_string = typeof tag === 'string'; + if (tag && !is_string) { + e.svelte_element_invalid_this_value(); + } +} + +/** + * @param {any} store + * @param {string} name + */ +export function validate_store(store, name) { + if (store != null && typeof store.subscribe !== 'function') { + e.store_invalid_shape(name); + } +} + +/** + * @template {() => unknown} T + * @param {T} fn + */ +export function prevent_snippet_stringification(fn) { + fn.toString = () => { + e.snippet_without_render_tag(); + return ''; + }; + return fn; +} diff --git a/node_modules/svelte/src/internal/shared/warnings.js b/node_modules/svelte/src/internal/shared/warnings.js new file mode 100644 index 0000000..281be08 --- /dev/null +++ b/node_modules/svelte/src/internal/shared/warnings.js @@ -0,0 +1,36 @@ +/* This file is generated by scripts/process-messages/index.js. Do not edit! */ + +import { DEV } from 'esm-env'; + +var bold = 'font-weight: bold'; +var normal = 'font-weight: normal'; + +/** + * `` is a void element — it cannot have content + * @param {string} tag + */ +export function dynamic_void_element_content(tag) { + if (DEV) { + console.warn(`%c[svelte] dynamic_void_element_content\n%c\`\` is a void element — it cannot have content\nhttps://svelte.dev/e/dynamic_void_element_content`, bold, normal); + } else { + console.warn(`https://svelte.dev/e/dynamic_void_element_content`); + } +} + +/** + * The following properties cannot be cloned with `$state.snapshot` — the return value contains the originals: + * + * %properties% + * @param {string | undefined | null} [properties] + */ +export function state_snapshot_uncloneable(properties) { + if (DEV) { + console.warn(`%c[svelte] state_snapshot_uncloneable\n%c${properties + ? `The following properties cannot be cloned with \`$state.snapshot\` — the return value contains the originals: + +${properties}` + : 'Value cannot be cloned with `$state.snapshot` — the original value was returned'}\nhttps://svelte.dev/e/state_snapshot_uncloneable`, bold, normal); + } else { + console.warn(`https://svelte.dev/e/state_snapshot_uncloneable`); + } +} \ No newline at end of file diff --git a/node_modules/svelte/src/legacy/legacy-client.js b/node_modules/svelte/src/legacy/legacy-client.js new file mode 100644 index 0000000..bb9a5a9 --- /dev/null +++ b/node_modules/svelte/src/legacy/legacy-client.js @@ -0,0 +1,276 @@ +/** @import { ComponentConstructorOptions, ComponentType, SvelteComponent, Component } from 'svelte' */ +import { DIRTY, LEGACY_PROPS, MAYBE_DIRTY } from '../internal/client/constants.js'; +import { user_pre_effect } from '../internal/client/reactivity/effects.js'; +import { mutable_source, set } from '../internal/client/reactivity/sources.js'; +import { hydrate, mount, unmount } from '../internal/client/render.js'; +import { active_effect, flushSync, get, set_signal_status } from '../internal/client/runtime.js'; +import { lifecycle_outside_component } from '../internal/shared/errors.js'; +import { define_property, is_array } from '../internal/shared/utils.js'; +import * as w from '../internal/client/warnings.js'; +import { DEV } from 'esm-env'; +import { FILENAME } from '../constants.js'; +import { component_context, dev_current_component_function } from '../internal/client/context.js'; + +/** + * Takes the same options as a Svelte 4 component and the component function and returns a Svelte 4 compatible component. + * + * @deprecated Use this only as a temporary solution to migrate your imperative component code to Svelte 5. + * + * @template {Record} Props + * @template {Record} Exports + * @template {Record} Events + * @template {Record} Slots + * + * @param {ComponentConstructorOptions & { + * component: ComponentType> | Component; + * }} options + * @returns {SvelteComponent & Exports} + */ +export function createClassComponent(options) { + // @ts-expect-error $$prop_def etc are not actually defined + return new Svelte4Component(options); +} + +/** + * Takes the component function and returns a Svelte 4 compatible component constructor. + * + * @deprecated Use this only as a temporary solution to migrate your imperative component code to Svelte 5. + * + * @template {Record} Props + * @template {Record} Exports + * @template {Record} Events + * @template {Record} Slots + * + * @param {SvelteComponent | Component} component + * @returns {ComponentType & Exports>} + */ +export function asClassComponent(component) { + // @ts-expect-error $$prop_def etc are not actually defined + return class extends Svelte4Component { + /** @param {any} options */ + constructor(options) { + super({ + component, + ...options + }); + } + }; +} + +/** + * Support using the component as both a class and function during the transition period + * @typedef {{new (o: ComponentConstructorOptions): SvelteComponent;(...args: Parameters>>): ReturnType, Record>>;}} LegacyComponentType + */ + +class Svelte4Component { + /** @type {any} */ + #events; + + /** @type {Record} */ + #instance; + + /** + * @param {ComponentConstructorOptions & { + * component: any; + * }} options + */ + constructor(options) { + var sources = new Map(); + + /** + * @param {string | symbol} key + * @param {unknown} value + */ + var add_source = (key, value) => { + var s = mutable_source(value); + sources.set(key, s); + return s; + }; + + // Replicate coarse-grained props through a proxy that has a version source for + // each property, which is incremented on updates to the property itself. Do not + // use our $state proxy because that one has fine-grained reactivity. + const props = new Proxy( + { ...(options.props || {}), $$events: {} }, + { + get(target, prop) { + return get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop))); + }, + has(target, prop) { + // Necessary to not throw "invalid binding" validation errors on the component side + if (prop === LEGACY_PROPS) return true; + + get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop))); + return Reflect.has(target, prop); + }, + set(target, prop, value) { + set(sources.get(prop) ?? add_source(prop, value), value); + return Reflect.set(target, prop, value); + } + } + ); + + this.#instance = (options.hydrate ? hydrate : mount)(options.component, { + target: options.target, + anchor: options.anchor, + props, + context: options.context, + intro: options.intro ?? false, + recover: options.recover + }); + + // We don't flushSync for custom element wrappers or if the user doesn't want it + if (!options?.props?.$$host || options.sync === false) { + flushSync(); + } + + this.#events = props.$$events; + + for (const key of Object.keys(this.#instance)) { + if (key === '$set' || key === '$destroy' || key === '$on') continue; + define_property(this, key, { + get() { + return this.#instance[key]; + }, + /** @param {any} value */ + set(value) { + this.#instance[key] = value; + }, + enumerable: true + }); + } + + this.#instance.$set = /** @param {Record} next */ (next) => { + Object.assign(props, next); + }; + + this.#instance.$destroy = () => { + unmount(this.#instance); + }; + } + + /** @param {Record} props */ + $set(props) { + this.#instance.$set(props); + } + + /** + * @param {string} event + * @param {(...args: any[]) => any} callback + * @returns {any} + */ + $on(event, callback) { + this.#events[event] = this.#events[event] || []; + + /** @param {any[]} args */ + const cb = (...args) => callback.call(this, ...args); + this.#events[event].push(cb); + return () => { + this.#events[event] = this.#events[event].filter(/** @param {any} fn */ (fn) => fn !== cb); + }; + } + + $destroy() { + this.#instance.$destroy(); + } +} + +/** + * Runs the given function once immediately on the server, and works like `$effect.pre` on the client. + * + * @deprecated Use this only as a temporary solution to migrate your component code to Svelte 5. + * @param {() => void | (() => void)} fn + * @returns {void} + */ +export function run(fn) { + user_pre_effect(() => { + fn(); + var effect = /** @type {import('#client').Effect} */ (active_effect); + // If the effect is immediately made dirty again, mark it as maybe dirty to emulate legacy behaviour + if ((effect.f & DIRTY) !== 0) { + let filename = "a file (we can't know which one)"; + if (DEV) { + // @ts-ignore + filename = dev_current_component_function?.[FILENAME] ?? filename; + } + w.legacy_recursive_reactive_block(filename); + set_signal_status(effect, MAYBE_DIRTY); + } + }); +} + +/** + * Function to mimic the multiple listeners available in svelte 4 + * @deprecated + * @param {EventListener[]} handlers + * @returns {EventListener} + */ +export function handlers(...handlers) { + return function (event) { + const { stopImmediatePropagation } = event; + let stopped = false; + + event.stopImmediatePropagation = () => { + stopped = true; + stopImmediatePropagation.call(event); + }; + + const errors = []; + + for (const handler of handlers) { + try { + // @ts-expect-error `this` is not typed + handler?.call(this, event); + } catch (e) { + errors.push(e); + } + + if (stopped) { + break; + } + } + + for (let error of errors) { + queueMicrotask(() => { + throw error; + }); + } + }; +} + +/** + * Function to create a `bubble` function that mimic the behavior of `on:click` without handler available in svelte 4. + * @deprecated Use this only as a temporary solution to migrate your automatically delegated events in Svelte 5. + */ +export function createBubbler() { + const active_component_context = component_context; + if (active_component_context === null) { + lifecycle_outside_component('createBubbler'); + } + + return (/**@type {string}*/ type) => (/**@type {Event}*/ event) => { + const events = /** @type {Record} */ ( + active_component_context.s.$$events + )?.[/** @type {any} */ (type)]; + + if (events) { + const callbacks = is_array(events) ? events.slice() : [events]; + for (const fn of callbacks) { + fn.call(active_component_context.x, event); + } + return !event.defaultPrevented; + } + return true; + }; +} + +export { + once, + preventDefault, + self, + stopImmediatePropagation, + stopPropagation, + trusted, + passive, + nonpassive +} from '../internal/client/dom/legacy/event-modifiers.js'; diff --git a/node_modules/svelte/src/legacy/legacy-server.js b/node_modules/svelte/src/legacy/legacy-server.js new file mode 100644 index 0000000..60bd8c9 --- /dev/null +++ b/node_modules/svelte/src/legacy/legacy-server.js @@ -0,0 +1,66 @@ +/** @import { SvelteComponent } from '../index.js' */ +import { asClassComponent as as_class_component, createClassComponent } from './legacy-client.js'; +import { render } from '../internal/server/index.js'; + +// By having this as a separate entry point for server environments, we save the client bundle from having to include the server runtime + +export { createClassComponent }; + +/** + * Takes a Svelte 5 component and returns a Svelte 4 compatible component constructor. + * + * @deprecated Use this only as a temporary solution to migrate your imperative component code to Svelte 5. + * + * @template {Record} Props + * @template {Record} Exports + * @template {Record} Events + * @template {Record} Slots + * + * @param {SvelteComponent} component + * @returns {typeof SvelteComponent & Exports} + */ +export function asClassComponent(component) { + const component_constructor = as_class_component(component); + /** @type {(props?: {}, opts?: { $$slots?: {}; context?: Map; }) => { html: any; css: { code: string; map: any; }; head: string; } } */ + const _render = (props, { context } = {}) => { + // @ts-expect-error the typings are off, but this will work if the component is compiled in SSR mode + const result = render(component, { props, context }); + return { + css: { code: '', map: null }, + head: result.head, + html: result.body + }; + }; + // @ts-expect-error this is present for SSR + component_constructor.render = _render; + + // @ts-ignore + return component_constructor; +} + +/** + * Runs the given function once immediately on the server, and works like `$effect.pre` on the client. + * + * @deprecated Use this only as a temporary solution to migrate your component code to Svelte 5. + * @param {() => void | (() => void)} fn + * @returns {void} + */ +export function run(fn) { + fn(); +} + +const noop = () => {}; + +// event stuff, no need to worry about it for SSR but needs to be there or it will crash +export { + noop as handlers, + noop as createBubbler, + noop as once, + noop as preventDefault, + noop as self, + noop as stopImmediatePropagation, + noop as stopPropagation, + noop as trusted, + noop as passive, + noop as nonpassive +}; diff --git a/node_modules/svelte/src/motion/index.js b/node_modules/svelte/src/motion/index.js new file mode 100644 index 0000000..f4262a5 --- /dev/null +++ b/node_modules/svelte/src/motion/index.js @@ -0,0 +1,32 @@ +import { MediaQuery } from 'svelte/reactivity'; + +export * from './spring.js'; +export * from './tweened.js'; + +/** + * A [media query](https://svelte.dev/docs/svelte/svelte-reactivity#MediaQuery) that matches if the user [prefers reduced motion](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion). + * + * ```svelte + * + * + * + * + * {#if visible} + *

+ * flies in, unless the user prefers reduced motion + *

+ * {/if} + * ``` + * @type {MediaQuery} + * @since 5.7.0 + */ +export const prefersReducedMotion = /*@__PURE__*/ new MediaQuery( + '(prefers-reduced-motion: reduce)' +); diff --git a/node_modules/svelte/src/motion/spring.js b/node_modules/svelte/src/motion/spring.js new file mode 100644 index 0000000..1c8e5f1 --- /dev/null +++ b/node_modules/svelte/src/motion/spring.js @@ -0,0 +1,358 @@ +/** @import { Task } from '#client' */ +/** @import { SpringOpts, SpringUpdateOpts, TickContext } from './private.js' */ +/** @import { Spring as SpringStore } from './public.js' */ +import { writable } from '../store/shared/index.js'; +import { loop } from '../internal/client/loop.js'; +import { raf } from '../internal/client/timing.js'; +import { is_date } from './utils.js'; +import { set, source } from '../internal/client/reactivity/sources.js'; +import { render_effect } from '../internal/client/reactivity/effects.js'; +import { get } from '../internal/client/runtime.js'; +import { deferred, noop } from '../internal/shared/utils.js'; + +/** + * @template T + * @param {TickContext} ctx + * @param {T} last_value + * @param {T} current_value + * @param {T} target_value + * @returns {T} + */ +function tick_spring(ctx, last_value, current_value, target_value) { + if (typeof current_value === 'number' || is_date(current_value)) { + // @ts-ignore + const delta = target_value - current_value; + // @ts-ignore + const velocity = (current_value - last_value) / (ctx.dt || 1 / 60); // guard div by 0 + const spring = ctx.opts.stiffness * delta; + const damper = ctx.opts.damping * velocity; + const acceleration = (spring - damper) * ctx.inv_mass; + const d = (velocity + acceleration) * ctx.dt; + if (Math.abs(d) < ctx.opts.precision && Math.abs(delta) < ctx.opts.precision) { + return target_value; // settled + } else { + ctx.settled = false; // signal loop to keep ticking + // @ts-ignore + return is_date(current_value) ? new Date(current_value.getTime() + d) : current_value + d; + } + } else if (Array.isArray(current_value)) { + // @ts-ignore + return current_value.map((_, i) => + // @ts-ignore + tick_spring(ctx, last_value[i], current_value[i], target_value[i]) + ); + } else if (typeof current_value === 'object') { + const next_value = {}; + for (const k in current_value) { + // @ts-ignore + next_value[k] = tick_spring(ctx, last_value[k], current_value[k], target_value[k]); + } + // @ts-ignore + return next_value; + } else { + throw new Error(`Cannot spring ${typeof current_value} values`); + } +} + +/** + * The spring function in Svelte creates a store whose value is animated, with a motion that simulates the behavior of a spring. This means when the value changes, instead of transitioning at a steady rate, it "bounces" like a spring would, depending on the physics parameters provided. This adds a level of realism to the transitions and can enhance the user experience. + * + * @deprecated Use [`Spring`](https://svelte.dev/docs/svelte/svelte-motion#Spring) instead + * @template [T=any] + * @param {T} [value] + * @param {SpringOpts} [opts] + * @returns {SpringStore} + */ +export function spring(value, opts = {}) { + const store = writable(value); + const { stiffness = 0.15, damping = 0.8, precision = 0.01 } = opts; + /** @type {number} */ + let last_time; + /** @type {Task | null} */ + let task; + /** @type {object} */ + let current_token; + + let last_value = /** @type {T} */ (value); + let target_value = /** @type {T | undefined} */ (value); + + let inv_mass = 1; + let inv_mass_recovery_rate = 0; + let cancel_task = false; + /** + * @param {T} new_value + * @param {SpringUpdateOpts} opts + * @returns {Promise} + */ + function set(new_value, opts = {}) { + target_value = new_value; + const token = (current_token = {}); + if (value == null || opts.hard || (spring.stiffness >= 1 && spring.damping >= 1)) { + cancel_task = true; // cancel any running animation + last_time = raf.now(); + last_value = new_value; + store.set((value = target_value)); + return Promise.resolve(); + } else if (opts.soft) { + const rate = opts.soft === true ? 0.5 : +opts.soft; + inv_mass_recovery_rate = 1 / (rate * 60); + inv_mass = 0; // infinite mass, unaffected by spring forces + } + if (!task) { + last_time = raf.now(); + cancel_task = false; + task = loop((now) => { + if (cancel_task) { + cancel_task = false; + task = null; + return false; + } + inv_mass = Math.min(inv_mass + inv_mass_recovery_rate, 1); + + // clamp elapsed time to 1/30th of a second, so that longer pauses + // (blocked thread or inactive tab) don't cause the spring to go haywire + const elapsed = Math.min(now - last_time, 1000 / 30); + + /** @type {TickContext} */ + const ctx = { + inv_mass, + opts: spring, + settled: true, + dt: (elapsed * 60) / 1000 + }; + // @ts-ignore + const next_value = tick_spring(ctx, last_value, value, target_value); + last_time = now; + last_value = /** @type {T} */ (value); + store.set((value = /** @type {T} */ (next_value))); + if (ctx.settled) { + task = null; + } + return !ctx.settled; + }); + } + return new Promise((fulfil) => { + /** @type {Task} */ (task).promise.then(() => { + if (token === current_token) fulfil(); + }); + }); + } + /** @type {SpringStore} */ + // @ts-expect-error - class-only properties are missing + const spring = { + set, + update: (fn, opts) => set(fn(/** @type {T} */ (target_value), /** @type {T} */ (value)), opts), + subscribe: store.subscribe, + stiffness, + damping, + precision + }; + return spring; +} + +/** + * A wrapper for a value that behaves in a spring-like fashion. Changes to `spring.target` will cause `spring.current` to + * move towards it over time, taking account of the `spring.stiffness` and `spring.damping` parameters. + * + * ```svelte + * + * + * + * + * ``` + * @template T + * @since 5.8.0 + */ +export class Spring { + #stiffness = source(0.15); + #damping = source(0.8); + #precision = source(0.01); + + #current = source(/** @type {T} */ (undefined)); + #target = source(/** @type {T} */ (undefined)); + + #last_value = /** @type {T} */ (undefined); + #last_time = 0; + + #inverse_mass = 1; + #momentum = 0; + + /** @type {import('../internal/client/types').Task | null} */ + #task = null; + + /** @type {ReturnType | null} */ + #deferred = null; + + /** + * @param {T} value + * @param {SpringOpts} [options] + */ + constructor(value, options = {}) { + this.#current.v = this.#target.v = value; + + if (typeof options.stiffness === 'number') this.#stiffness.v = clamp(options.stiffness, 0, 1); + if (typeof options.damping === 'number') this.#damping.v = clamp(options.damping, 0, 1); + if (typeof options.precision === 'number') this.#precision.v = options.precision; + } + + /** + * Create a spring whose value is bound to the return value of `fn`. This must be called + * inside an effect root (for example, during component initialisation). + * + * ```svelte + * + * ``` + * @template U + * @param {() => U} fn + * @param {SpringOpts} [options] + */ + static of(fn, options) { + const spring = new Spring(fn(), options); + + render_effect(() => { + spring.set(fn()); + }); + + return spring; + } + + /** @param {T} value */ + #update(value) { + set(this.#target, value); + + this.#current.v ??= value; + this.#last_value ??= this.#current.v; + + if (!this.#task) { + this.#last_time = raf.now(); + + var inv_mass_recovery_rate = 1000 / (this.#momentum * 60); + + this.#task ??= loop((now) => { + this.#inverse_mass = Math.min(this.#inverse_mass + inv_mass_recovery_rate, 1); + + // clamp elapsed time to 1/30th of a second, so that longer pauses + // (blocked thread or inactive tab) don't cause the spring to go haywire + const elapsed = Math.min(now - this.#last_time, 1000 / 30); + + /** @type {import('./private').TickContext} */ + const ctx = { + inv_mass: this.#inverse_mass, + opts: { + stiffness: this.#stiffness.v, + damping: this.#damping.v, + precision: this.#precision.v + }, + settled: true, + dt: (elapsed * 60) / 1000 + }; + + var next = tick_spring(ctx, this.#last_value, this.#current.v, this.#target.v); + this.#last_value = this.#current.v; + this.#last_time = now; + set(this.#current, next); + + if (ctx.settled) { + this.#task = null; + } + + return !ctx.settled; + }); + } + + return this.#task.promise; + } + + /** + * Sets `spring.target` to `value` and returns a `Promise` that resolves if and when `spring.current` catches up to it. + * + * If `options.instant` is `true`, `spring.current` immediately matches `spring.target`. + * + * If `options.preserveMomentum` is provided, the spring will continue on its current trajectory for + * the specified number of milliseconds. This is useful for things like 'fling' gestures. + * + * @param {T} value + * @param {SpringUpdateOpts} [options] + */ + set(value, options) { + this.#deferred?.reject(new Error('Aborted')); + + if (options?.instant || this.#current.v === undefined) { + this.#task?.abort(); + this.#task = null; + set(this.#current, set(this.#target, value)); + this.#last_value = value; + return Promise.resolve(); + } + + if (options?.preserveMomentum) { + this.#inverse_mass = 0; + this.#momentum = options.preserveMomentum; + } + + var d = (this.#deferred = deferred()); + d.promise.catch(noop); + + this.#update(value).then(() => { + if (d !== this.#deferred) return; + d.resolve(undefined); + }); + + return d.promise; + } + + get current() { + return get(this.#current); + } + + get damping() { + return get(this.#damping); + } + + set damping(v) { + set(this.#damping, clamp(v, 0, 1)); + } + + get precision() { + return get(this.#precision); + } + + set precision(v) { + set(this.#precision, v); + } + + get stiffness() { + return get(this.#stiffness); + } + + set stiffness(v) { + set(this.#stiffness, clamp(v, 0, 1)); + } + + get target() { + return get(this.#target); + } + + set target(v) { + this.set(v); + } +} + +/** + * @param {number} n + * @param {number} min + * @param {number} max + */ +function clamp(n, min, max) { + return Math.max(min, Math.min(max, n)); +} diff --git a/node_modules/svelte/src/motion/tweened.js b/node_modules/svelte/src/motion/tweened.js new file mode 100644 index 0000000..31cddf8 --- /dev/null +++ b/node_modules/svelte/src/motion/tweened.js @@ -0,0 +1,298 @@ +/** @import { Task } from '../internal/client/types' */ +/** @import { Tweened } from './public' */ +/** @import { TweenedOptions } from './private' */ +import { writable } from '../store/shared/index.js'; +import { raf } from '../internal/client/timing.js'; +import { loop } from '../internal/client/loop.js'; +import { linear } from '../easing/index.js'; +import { is_date } from './utils.js'; +import { set, source } from '../internal/client/reactivity/sources.js'; +import { get, render_effect } from 'svelte/internal/client'; + +/** + * @template T + * @param {T} a + * @param {T} b + * @returns {(t: number) => T} + */ +function get_interpolator(a, b) { + if (a === b || a !== a) return () => a; + + const type = typeof a; + if (type !== typeof b || Array.isArray(a) !== Array.isArray(b)) { + throw new Error('Cannot interpolate values of different type'); + } + + if (Array.isArray(a)) { + const arr = /** @type {Array} */ (b).map((bi, i) => { + return get_interpolator(/** @type {Array} */ (a)[i], bi); + }); + + // @ts-ignore + return (t) => arr.map((fn) => fn(t)); + } + + if (type === 'object') { + if (!a || !b) { + throw new Error('Object cannot be null'); + } + + if (is_date(a) && is_date(b)) { + const an = a.getTime(); + const bn = b.getTime(); + const delta = bn - an; + + // @ts-ignore + return (t) => new Date(an + t * delta); + } + + const keys = Object.keys(b); + + /** @type {Record T>} */ + const interpolators = {}; + keys.forEach((key) => { + // @ts-ignore + interpolators[key] = get_interpolator(a[key], b[key]); + }); + + // @ts-ignore + return (t) => { + /** @type {Record} */ + const result = {}; + keys.forEach((key) => { + result[key] = interpolators[key](t); + }); + return result; + }; + } + + if (type === 'number') { + const delta = /** @type {number} */ (b) - /** @type {number} */ (a); + // @ts-ignore + return (t) => a + t * delta; + } + + // for non-numeric values, snap to the final value immediately + return () => b; +} + +/** + * A tweened store in Svelte is a special type of store that provides smooth transitions between state values over time. + * + * @deprecated Use [`Tween`](https://svelte.dev/docs/svelte/svelte-motion#Tween) instead + * @template T + * @param {T} [value] + * @param {TweenedOptions} [defaults] + * @returns {Tweened} + */ +export function tweened(value, defaults = {}) { + const store = writable(value); + /** @type {Task} */ + let task; + let target_value = value; + /** + * @param {T} new_value + * @param {TweenedOptions} [opts] + */ + function set(new_value, opts) { + target_value = new_value; + + if (value == null) { + store.set((value = new_value)); + return Promise.resolve(); + } + + /** @type {Task | null} */ + let previous_task = task; + + let started = false; + let { + delay = 0, + duration = 400, + easing = linear, + interpolate = get_interpolator + } = { ...defaults, ...opts }; + + if (duration === 0) { + if (previous_task) { + previous_task.abort(); + previous_task = null; + } + store.set((value = target_value)); + return Promise.resolve(); + } + + const start = raf.now() + delay; + + /** @type {(t: number) => T} */ + let fn; + task = loop((now) => { + if (now < start) return true; + if (!started) { + fn = interpolate(/** @type {any} */ (value), new_value); + if (typeof duration === 'function') + duration = duration(/** @type {any} */ (value), new_value); + started = true; + } + if (previous_task) { + previous_task.abort(); + previous_task = null; + } + const elapsed = now - start; + if (elapsed > /** @type {number} */ (duration)) { + store.set((value = new_value)); + return false; + } + // @ts-ignore + store.set((value = fn(easing(elapsed / duration)))); + return true; + }); + return task.promise; + } + return { + set, + update: (fn, opts) => + set(fn(/** @type {any} */ (target_value), /** @type {any} */ (value)), opts), + subscribe: store.subscribe + }; +} + +/** + * A wrapper for a value that tweens smoothly to its target value. Changes to `tween.target` will cause `tween.current` to + * move towards it over time, taking account of the `delay`, `duration` and `easing` options. + * + * ```svelte + * + * + * + * + * ``` + * @template T + * @since 5.8.0 + */ +export class Tween { + #current = source(/** @type {T} */ (undefined)); + #target = source(/** @type {T} */ (undefined)); + + /** @type {TweenedOptions} */ + #defaults; + + /** @type {import('../internal/client/types').Task | null} */ + #task = null; + + /** + * @param {T} value + * @param {TweenedOptions} options + */ + constructor(value, options = {}) { + this.#current.v = this.#target.v = value; + this.#defaults = options; + } + + /** + * Create a tween whose value is bound to the return value of `fn`. This must be called + * inside an effect root (for example, during component initialisation). + * + * ```svelte + * + * ``` + * @template U + * @param {() => U} fn + * @param {TweenedOptions} [options] + */ + static of(fn, options) { + const tween = new Tween(fn(), options); + + render_effect(() => { + tween.set(fn()); + }); + + return tween; + } + + /** + * Sets `tween.target` to `value` and returns a `Promise` that resolves if and when `tween.current` catches up to it. + * + * If `options` are provided, they will override the tween's defaults. + * @param {T} value + * @param {TweenedOptions} [options] + * @returns + */ + set(value, options) { + set(this.#target, value); + + let { + delay = 0, + duration = 400, + easing = linear, + interpolate = get_interpolator + } = { ...this.#defaults, ...options }; + + if (duration === 0) { + this.#task?.abort(); + set(this.#current, value); + return Promise.resolve(); + } + + const start = raf.now() + delay; + + /** @type {(t: number) => T} */ + let fn; + let started = false; + let previous_task = this.#task; + + this.#task = loop((now) => { + if (now < start) { + return true; + } + + if (!started) { + started = true; + + const prev = this.#current.v; + + fn = interpolate(prev, value); + + if (typeof duration === 'function') { + duration = duration(prev, value); + } + + previous_task?.abort(); + } + + const elapsed = now - start; + + if (elapsed > /** @type {number} */ (duration)) { + set(this.#current, value); + return false; + } + + set(this.#current, fn(easing(elapsed / /** @type {number} */ (duration)))); + return true; + }); + + return this.#task.promise; + } + + get current() { + return get(this.#current); + } + + get target() { + return get(this.#target); + } + + set target(v) { + this.set(v); + } +} diff --git a/node_modules/svelte/src/motion/utils.js b/node_modules/svelte/src/motion/utils.js new file mode 100644 index 0000000..62342dc --- /dev/null +++ b/node_modules/svelte/src/motion/utils.js @@ -0,0 +1,7 @@ +/** + * @param {any} obj + * @returns {obj is Date} + */ +export function is_date(obj) { + return Object.prototype.toString.call(obj) === '[object Date]'; +} diff --git a/node_modules/svelte/src/reactivity/create-subscriber.js b/node_modules/svelte/src/reactivity/create-subscriber.js new file mode 100644 index 0000000..63deca6 --- /dev/null +++ b/node_modules/svelte/src/reactivity/create-subscriber.js @@ -0,0 +1,81 @@ +import { get, tick, untrack } from '../internal/client/runtime.js'; +import { effect_tracking, render_effect } from '../internal/client/reactivity/effects.js'; +import { source } from '../internal/client/reactivity/sources.js'; +import { increment } from './utils.js'; + +/** + * Returns a `subscribe` function that, if called in an effect (including expressions in the template), + * calls its `start` callback with an `update` function. Whenever `update` is called, the effect re-runs. + * + * If `start` returns a function, it will be called when the effect is destroyed. + * + * If `subscribe` is called in multiple effects, `start` will only be called once as long as the effects + * are active, and the returned teardown function will only be called when all effects are destroyed. + * + * It's best understood with an example. Here's an implementation of [`MediaQuery`](https://svelte.dev/docs/svelte/svelte-reactivity#MediaQuery): + * + * ```js + * import { createSubscriber } from 'svelte/reactivity'; + * import { on } from 'svelte/events'; + * + * export class MediaQuery { + * #query; + * #subscribe; + * + * constructor(query) { + * this.#query = window.matchMedia(`(${query})`); + * + * this.#subscribe = createSubscriber((update) => { + * // when the `change` event occurs, re-run any effects that read `this.current` + * const off = on(this.#query, 'change', update); + * + * // stop listening when all the effects are destroyed + * return () => off(); + * }); + * } + * + * get current() { + * this.#subscribe(); + * + * // Return the current state of the query, whether or not we're in an effect + * return this.#query.matches; + * } + * } + * ``` + * @param {(update: () => void) => (() => void) | void} start + * @since 5.7.0 + */ +export function createSubscriber(start) { + let subscribers = 0; + let version = source(0); + /** @type {(() => void) | void} */ + let stop; + + return () => { + if (effect_tracking()) { + get(version); + + render_effect(() => { + if (subscribers === 0) { + stop = untrack(() => start(() => increment(version))); + } + + subscribers += 1; + + return () => { + tick().then(() => { + // Only count down after timeout, else we would reach 0 before our own render effect reruns, + // but reach 1 again when the tick callback of the prior teardown runs. That would mean we + // re-subcribe unnecessarily and create a memory leak because the old subscription is never cleaned up. + subscribers -= 1; + + if (subscribers === 0) { + stop?.(); + stop = undefined; + } + }); + }; + }); + } + }; +} diff --git a/node_modules/svelte/src/reactivity/date.js b/node_modules/svelte/src/reactivity/date.js new file mode 100644 index 0000000..721673b --- /dev/null +++ b/node_modules/svelte/src/reactivity/date.js @@ -0,0 +1,111 @@ +/** @import { Source } from '#client' */ +import { derived } from '../internal/client/index.js'; +import { source, set } from '../internal/client/reactivity/sources.js'; +import { active_reaction, get, set_active_reaction } from '../internal/client/runtime.js'; + +var inited = false; + +/** + * A reactive version of the built-in [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) object. + * Reading the date (whether with methods like `date.getTime()` or `date.toString()`, or via things like [`Intl.DateTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat)) + * in an [effect](https://svelte.dev/docs/svelte/$effect) or [derived](https://svelte.dev/docs/svelte/$derived) + * will cause it to be re-evaluated when the value of the date changes. + * + * ```svelte + * + * + *

The time is {formatter.format(date)}

+ * ``` + */ +export class SvelteDate extends Date { + #time = source(super.getTime()); + + /** @type {Map>} */ + #deriveds = new Map(); + + #reaction = active_reaction; + + /** @param {any[]} params */ + constructor(...params) { + // @ts-ignore + super(...params); + if (!inited) this.#init(); + } + + #init() { + inited = true; + + var proto = SvelteDate.prototype; + var date_proto = Date.prototype; + + var methods = /** @type {Array} */ ( + Object.getOwnPropertyNames(date_proto) + ); + + for (const method of methods) { + if (method.startsWith('get') || method.startsWith('to') || method === 'valueOf') { + // @ts-ignore + proto[method] = function (...args) { + // don't memoize if there are arguments + // @ts-ignore + if (args.length > 0) { + get(this.#time); + // @ts-ignore + return date_proto[method].apply(this, args); + } + + var d = this.#deriveds.get(method); + + if (d === undefined) { + // lazily create the derived, but as though it were being + // created at the same time as the class instance + const reaction = active_reaction; + set_active_reaction(this.#reaction); + + d = derived(() => { + get(this.#time); + // @ts-ignore + return date_proto[method].apply(this, args); + }); + + this.#deriveds.set(method, d); + + set_active_reaction(reaction); + } + + return get(d); + }; + } + + if (method.startsWith('set')) { + // @ts-ignore + proto[method] = function (...args) { + // @ts-ignore + var result = date_proto[method].apply(this, args); + set(this.#time, date_proto.getTime.call(this)); + return result; + }; + } + } + } +} diff --git a/node_modules/svelte/src/reactivity/index-client.js b/node_modules/svelte/src/reactivity/index-client.js new file mode 100644 index 0000000..3eb9b95 --- /dev/null +++ b/node_modules/svelte/src/reactivity/index-client.js @@ -0,0 +1,7 @@ +export { SvelteDate } from './date.js'; +export { SvelteSet } from './set.js'; +export { SvelteMap } from './map.js'; +export { SvelteURL } from './url.js'; +export { SvelteURLSearchParams } from './url-search-params.js'; +export { MediaQuery } from './media-query.js'; +export { createSubscriber } from './create-subscriber.js'; diff --git a/node_modules/svelte/src/reactivity/index-server.js b/node_modules/svelte/src/reactivity/index-server.js new file mode 100644 index 0000000..6a6c9dc --- /dev/null +++ b/node_modules/svelte/src/reactivity/index-server.js @@ -0,0 +1,23 @@ +export const SvelteDate = globalThis.Date; +export const SvelteSet = globalThis.Set; +export const SvelteMap = globalThis.Map; +export const SvelteURL = globalThis.URL; +export const SvelteURLSearchParams = globalThis.URLSearchParams; + +export class MediaQuery { + current; + /** + * @param {string} query + * @param {boolean} [matches] + */ + constructor(query, matches = false) { + this.current = matches; + } +} + +/** + * @param {any} _ + */ +export function createSubscriber(_) { + return () => {}; +} diff --git a/node_modules/svelte/src/reactivity/map.js b/node_modules/svelte/src/reactivity/map.js new file mode 100644 index 0000000..3ae8fe5 --- /dev/null +++ b/node_modules/svelte/src/reactivity/map.js @@ -0,0 +1,233 @@ +/** @import { Source } from '#client' */ +import { DEV } from 'esm-env'; +import { set, source } from '../internal/client/reactivity/sources.js'; +import { get } from '../internal/client/runtime.js'; +import { increment } from './utils.js'; + +/** + * A reactive version of the built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) object. + * Reading contents of the map (by iterating, or by reading `map.size` or calling `map.get(...)` or `map.has(...)` as in the [tic-tac-toe example](https://svelte.dev/playground/0b0ff4aa49c9443f9b47fe5203c78293) below) in an [effect](https://svelte.dev/docs/svelte/$effect) or [derived](https://svelte.dev/docs/svelte/$derived) + * will cause it to be re-evaluated as necessary when the map is updated. + * + * Note that values in a reactive map are _not_ made [deeply reactive](https://svelte.dev/docs/svelte/$state#Deep-state). + * + * ```svelte + * + * + *
+ * {#each Array(9), i} + * + * {/each} + *
+ * + * {#if winner} + *

{winner} wins!

+ * + * {:else} + *

{player} is next

+ * {/if} + * ``` + * + * @template K + * @template V + * @extends {Map} + */ +export class SvelteMap extends Map { + /** @type {Map>} */ + #sources = new Map(); + #version = source(0); + #size = source(0); + + /** + * @param {Iterable | null | undefined} [value] + */ + constructor(value) { + super(); + + // If the value is invalid then the native exception will fire here + if (DEV) value = new Map(value); + + if (value) { + for (var [key, v] of value) { + super.set(key, v); + } + this.#size.v = super.size; + } + } + + /** @param {K} key */ + has(key) { + var sources = this.#sources; + var s = sources.get(key); + + if (s === undefined) { + var ret = super.get(key); + if (ret !== undefined) { + s = source(0); + sources.set(key, s); + } else { + // We should always track the version in case + // the Set ever gets this value in the future. + get(this.#version); + return false; + } + } + + get(s); + return true; + } + + /** + * @param {(value: V, key: K, map: Map) => void} callbackfn + * @param {any} [this_arg] + */ + forEach(callbackfn, this_arg) { + this.#read_all(); + super.forEach(callbackfn, this_arg); + } + + /** @param {K} key */ + get(key) { + var sources = this.#sources; + var s = sources.get(key); + + if (s === undefined) { + var ret = super.get(key); + if (ret !== undefined) { + s = source(0); + sources.set(key, s); + } else { + // We should always track the version in case + // the Set ever gets this value in the future. + get(this.#version); + return undefined; + } + } + + get(s); + return super.get(key); + } + + /** + * @param {K} key + * @param {V} value + * */ + set(key, value) { + var sources = this.#sources; + var s = sources.get(key); + var prev_res = super.get(key); + var res = super.set(key, value); + var version = this.#version; + + if (s === undefined) { + sources.set(key, source(0)); + set(this.#size, super.size); + increment(version); + } else if (prev_res !== value) { + increment(s); + + // if not every reaction of s is a reaction of version we need to also include version + var v_reactions = version.reactions === null ? null : new Set(version.reactions); + var needs_version_increase = + v_reactions === null || + !s.reactions?.every((r) => + /** @type {NonNullable} */ (v_reactions).has(r) + ); + if (needs_version_increase) { + increment(version); + } + } + + return res; + } + + /** @param {K} key */ + delete(key) { + var sources = this.#sources; + var s = sources.get(key); + var res = super.delete(key); + + if (s !== undefined) { + sources.delete(key); + set(this.#size, super.size); + set(s, -1); + increment(this.#version); + } + + return res; + } + + clear() { + if (super.size === 0) { + return; + } + // Clear first, so we get nice console.log outputs with $inspect + super.clear(); + var sources = this.#sources; + set(this.#size, 0); + for (var s of sources.values()) { + set(s, -1); + } + increment(this.#version); + sources.clear(); + } + + #read_all() { + get(this.#version); + + var sources = this.#sources; + if (this.#size.v !== sources.size) { + for (var key of super.keys()) { + if (!sources.has(key)) { + sources.set(key, source(0)); + } + } + } + + for (var [, s] of this.#sources) { + get(s); + } + } + + keys() { + get(this.#version); + return super.keys(); + } + + values() { + this.#read_all(); + return super.values(); + } + + entries() { + this.#read_all(); + return super.entries(); + } + + [Symbol.iterator]() { + return this.entries(); + } + + get size() { + get(this.#size); + return super.size; + } +} diff --git a/node_modules/svelte/src/reactivity/media-query.js b/node_modules/svelte/src/reactivity/media-query.js new file mode 100644 index 0000000..22310df --- /dev/null +++ b/node_modules/svelte/src/reactivity/media-query.js @@ -0,0 +1,37 @@ +import { on } from '../events/index.js'; +import { ReactiveValue } from './reactive-value.js'; + +const parenthesis_regex = /\(.+\)/; + +/** + * Creates a media query and provides a `current` property that reflects whether or not it matches. + * + * Use it carefully — during server-side rendering, there is no way to know what the correct value should be, potentially causing content to change upon hydration. + * If you can use the media query in CSS to achieve the same effect, do that. + * + * ```svelte + * + * + *

{large.current ? 'large screen' : 'small screen'}

+ * ``` + * @extends {ReactiveValue} + * @since 5.7.0 + */ +export class MediaQuery extends ReactiveValue { + /** + * @param {string} query A media query string + * @param {boolean} [fallback] Fallback value for the server + */ + constructor(query, fallback) { + let final_query = parenthesis_regex.test(query) ? query : `(${query})`; + const q = window.matchMedia(final_query); + super( + () => q.matches, + (update) => on(q, 'change', update) + ); + } +} diff --git a/node_modules/svelte/src/reactivity/reactive-value.js b/node_modules/svelte/src/reactivity/reactive-value.js new file mode 100644 index 0000000..c7c14ad --- /dev/null +++ b/node_modules/svelte/src/reactivity/reactive-value.js @@ -0,0 +1,24 @@ +import { createSubscriber } from './create-subscriber.js'; + +/** + * @template T + */ +export class ReactiveValue { + #fn; + #subscribe; + + /** + * + * @param {() => T} fn + * @param {(update: () => void) => void} onsubscribe + */ + constructor(fn, onsubscribe) { + this.#fn = fn; + this.#subscribe = createSubscriber(onsubscribe); + } + + get current() { + this.#subscribe(); + return this.#fn(); + } +} diff --git a/node_modules/svelte/src/reactivity/set.js b/node_modules/svelte/src/reactivity/set.js new file mode 100644 index 0000000..4a0b4df --- /dev/null +++ b/node_modules/svelte/src/reactivity/set.js @@ -0,0 +1,189 @@ +/** @import { Source } from '#client' */ +import { DEV } from 'esm-env'; +import { source, set } from '../internal/client/reactivity/sources.js'; +import { get } from '../internal/client/runtime.js'; +import { increment } from './utils.js'; + +var read_methods = ['forEach', 'isDisjointFrom', 'isSubsetOf', 'isSupersetOf']; +var set_like_methods = ['difference', 'intersection', 'symmetricDifference', 'union']; + +var inited = false; + +/** + * A reactive version of the built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) object. + * Reading contents of the set (by iterating, or by reading `set.size` or calling `set.has(...)` as in the [example](https://svelte.dev/playground/53438b51194b4882bcc18cddf9f96f15) below) in an [effect](https://svelte.dev/docs/svelte/$effect) or [derived](https://svelte.dev/docs/svelte/$derived) + * will cause it to be re-evaluated as necessary when the set is updated. + * + * Note that values in a reactive set are _not_ made [deeply reactive](https://svelte.dev/docs/svelte/$state#Deep-state). + * + * ```svelte + * + * + * {#each ['🙈', '🙉', '🙊'] as monkey} + * + * {/each} + * + * + * + * {#if monkeys.has('🙈')}

see no evil

{/if} + * {#if monkeys.has('🙉')}

hear no evil

{/if} + * {#if monkeys.has('🙊')}

speak no evil

{/if} + * ``` + * + * @template T + * @extends {Set} + */ +export class SvelteSet extends Set { + /** @type {Map>} */ + #sources = new Map(); + #version = source(0); + #size = source(0); + + /** + * @param {Iterable | null | undefined} [value] + */ + constructor(value) { + super(); + + // If the value is invalid then the native exception will fire here + if (DEV) value = new Set(value); + + if (value) { + for (var element of value) { + super.add(element); + } + this.#size.v = super.size; + } + + if (!inited) this.#init(); + } + + // We init as part of the first instance so that we can treeshake this class + #init() { + inited = true; + + var proto = SvelteSet.prototype; + var set_proto = Set.prototype; + + for (const method of read_methods) { + // @ts-ignore + proto[method] = function (...v) { + get(this.#version); + // @ts-ignore + return set_proto[method].apply(this, v); + }; + } + + for (const method of set_like_methods) { + // @ts-ignore + proto[method] = function (...v) { + get(this.#version); + // @ts-ignore + var set = /** @type {Set} */ (set_proto[method].apply(this, v)); + return new SvelteSet(set); + }; + } + } + + /** @param {T} value */ + has(value) { + var has = super.has(value); + var sources = this.#sources; + var s = sources.get(value); + + if (s === undefined) { + if (!has) { + // If the value doesn't exist, track the version in case it's added later + // but don't create sources willy-nilly to track all possible values + get(this.#version); + return false; + } + + s = source(true); + sources.set(value, s); + } + + get(s); + return has; + } + + /** @param {T} value */ + add(value) { + if (!super.has(value)) { + super.add(value); + set(this.#size, super.size); + increment(this.#version); + } + + return this; + } + + /** @param {T} value */ + delete(value) { + var deleted = super.delete(value); + var sources = this.#sources; + var s = sources.get(value); + + if (s !== undefined) { + sources.delete(value); + set(s, false); + } + + if (deleted) { + set(this.#size, super.size); + increment(this.#version); + } + + return deleted; + } + + clear() { + if (super.size === 0) { + return; + } + // Clear first, so we get nice console.log outputs with $inspect + super.clear(); + var sources = this.#sources; + + for (var s of sources.values()) { + set(s, false); + } + + sources.clear(); + set(this.#size, 0); + increment(this.#version); + } + + keys() { + return this.values(); + } + + values() { + get(this.#version); + return super.values(); + } + + entries() { + get(this.#version); + return super.entries(); + } + + [Symbol.iterator]() { + return this.keys(); + } + + get size() { + return get(this.#size); + } +} diff --git a/node_modules/svelte/src/reactivity/url-search-params.js b/node_modules/svelte/src/reactivity/url-search-params.js new file mode 100644 index 0000000..c1a8275 --- /dev/null +++ b/node_modules/svelte/src/reactivity/url-search-params.js @@ -0,0 +1,173 @@ +import { source } from '../internal/client/reactivity/sources.js'; +import { get } from '../internal/client/runtime.js'; +import { get_current_url } from './url.js'; +import { increment } from './utils.js'; + +export const REPLACE = Symbol(); + +/** + * A reactive version of the built-in [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) object. + * Reading its contents (by iterating, or by calling `params.get(...)` or `params.getAll(...)` as in the [example](https://svelte.dev/playground/b3926c86c5384bab9f2cf993bc08c1c8) below) in an [effect](https://svelte.dev/docs/svelte/$effect) or [derived](https://svelte.dev/docs/svelte/$derived) + * will cause it to be re-evaluated as necessary when the params are updated. + * + * ```svelte + * + * + * + * + * + * + *

?{params.toString()}

+ * + * {#each params as [key, value]} + *

{key}: {value}

+ * {/each} + * ``` + */ +export class SvelteURLSearchParams extends URLSearchParams { + #version = source(0); + #url = get_current_url(); + + #updating = false; + + #update_url() { + if (!this.#url || this.#updating) return; + this.#updating = true; + + const search = this.toString(); + this.#url.search = search && `?${search}`; + + this.#updating = false; + } + + /** + * @param {URLSearchParams} params + * @internal + */ + [REPLACE](params) { + if (this.#updating) return; + this.#updating = true; + + for (const key of [...super.keys()]) { + super.delete(key); + } + + for (const [key, value] of params) { + super.append(key, value); + } + + increment(this.#version); + this.#updating = false; + } + + /** + * @param {string} name + * @param {string} value + * @returns {void} + */ + append(name, value) { + super.append(name, value); + this.#update_url(); + increment(this.#version); + } + + /** + * @param {string} name + * @param {string=} value + * @returns {void} + */ + delete(name, value) { + var has_value = super.has(name, value); + super.delete(name, value); + if (has_value) { + this.#update_url(); + increment(this.#version); + } + } + + /** + * @param {string} name + * @returns {string|null} + */ + get(name) { + get(this.#version); + return super.get(name); + } + + /** + * @param {string} name + * @returns {string[]} + */ + getAll(name) { + get(this.#version); + return super.getAll(name); + } + + /** + * @param {string} name + * @param {string=} value + * @returns {boolean} + */ + has(name, value) { + get(this.#version); + return super.has(name, value); + } + + keys() { + get(this.#version); + return super.keys(); + } + + /** + * @param {string} name + * @param {string} value + * @returns {void} + */ + set(name, value) { + var previous = super.getAll(name).join(''); + super.set(name, value); + // can't use has(name, value), because for something like https://svelte.dev?foo=1&bar=2&foo=3 + // if you set `foo` to 1, then foo=3 gets deleted whilst `has("foo", "1")` returns true + if (previous !== super.getAll(name).join('')) { + this.#update_url(); + increment(this.#version); + } + } + + sort() { + super.sort(); + this.#update_url(); + increment(this.#version); + } + + toString() { + get(this.#version); + return super.toString(); + } + + values() { + get(this.#version); + return super.values(); + } + + entries() { + get(this.#version); + return super.entries(); + } + + [Symbol.iterator]() { + return this.entries(); + } + + get size() { + get(this.#version); + return super.size; + } +} diff --git a/node_modules/svelte/src/reactivity/url.js b/node_modules/svelte/src/reactivity/url.js new file mode 100644 index 0000000..879006f --- /dev/null +++ b/node_modules/svelte/src/reactivity/url.js @@ -0,0 +1,192 @@ +import { source, set } from '../internal/client/reactivity/sources.js'; +import { get } from '../internal/client/runtime.js'; +import { REPLACE, SvelteURLSearchParams } from './url-search-params.js'; + +/** @type {SvelteURL | null} */ +let current_url = null; + +export function get_current_url() { + // ideally we'd just export `current_url` directly, but it seems Vitest doesn't respect live bindings + return current_url; +} + +/** + * A reactive version of the built-in [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) object. + * Reading properties of the URL (such as `url.href` or `url.pathname`) in an [effect](https://svelte.dev/docs/svelte/$effect) or [derived](https://svelte.dev/docs/svelte/$derived) + * will cause it to be re-evaluated as necessary when the URL changes. + * + * The `searchParams` property is an instance of [SvelteURLSearchParams](https://svelte.dev/docs/svelte/svelte-reactivity#SvelteURLSearchParams). + * + * [Example](https://svelte.dev/playground/5a694758901b448c83dc40dc31c71f2a): + * + * ```svelte + * + * + * + * + * + * + * + *
+ * + * + * + * ``` + */ +export class SvelteURL extends URL { + #protocol = source(super.protocol); + #username = source(super.username); + #password = source(super.password); + #hostname = source(super.hostname); + #port = source(super.port); + #pathname = source(super.pathname); + #hash = source(super.hash); + #search = source(super.search); + #searchParams; + + /** + * @param {string | URL} url + * @param {string | URL} [base] + */ + constructor(url, base) { + url = new URL(url, base); + super(url); + + current_url = this; + this.#searchParams = new SvelteURLSearchParams(url.searchParams); + current_url = null; + } + + get hash() { + return get(this.#hash); + } + + set hash(value) { + super.hash = value; + set(this.#hash, super.hash); + } + + get host() { + get(this.#hostname); + get(this.#port); + return super.host; + } + + set host(value) { + super.host = value; + set(this.#hostname, super.hostname); + set(this.#port, super.port); + } + + get hostname() { + return get(this.#hostname); + } + + set hostname(value) { + super.hostname = value; + set(this.#hostname, super.hostname); + } + + get href() { + get(this.#protocol); + get(this.#username); + get(this.#password); + get(this.#hostname); + get(this.#port); + get(this.#pathname); + get(this.#hash); + get(this.#search); + return super.href; + } + + set href(value) { + super.href = value; + set(this.#protocol, super.protocol); + set(this.#username, super.username); + set(this.#password, super.password); + set(this.#hostname, super.hostname); + set(this.#port, super.port); + set(this.#pathname, super.pathname); + set(this.#hash, super.hash); + set(this.#search, super.search); + this.#searchParams[REPLACE](super.searchParams); + } + + get password() { + return get(this.#password); + } + + set password(value) { + super.password = value; + set(this.#password, super.password); + } + + get pathname() { + return get(this.#pathname); + } + + set pathname(value) { + super.pathname = value; + set(this.#pathname, super.pathname); + } + + get port() { + return get(this.#port); + } + + set port(value) { + super.port = value; + set(this.#port, super.port); + } + + get protocol() { + return get(this.#protocol); + } + + set protocol(value) { + super.protocol = value; + set(this.#protocol, super.protocol); + } + + get search() { + return get(this.#search); + } + + set search(value) { + super.search = value; + set(this.#search, value); + this.#searchParams[REPLACE](super.searchParams); + } + + get username() { + return get(this.#username); + } + + set username(value) { + super.username = value; + set(this.#username, super.username); + } + + get origin() { + get(this.#protocol); + get(this.#hostname); + get(this.#port); + return super.origin; + } + + get searchParams() { + return this.#searchParams; + } + + toString() { + return this.href; + } + + toJSON() { + return this.href; + } +} diff --git a/node_modules/svelte/src/reactivity/utils.js b/node_modules/svelte/src/reactivity/utils.js new file mode 100644 index 0000000..cd55e0e --- /dev/null +++ b/node_modules/svelte/src/reactivity/utils.js @@ -0,0 +1,7 @@ +/** @import { Source } from '#client' */ +import { set } from '../internal/client/reactivity/sources.js'; + +/** @param {Source} source */ +export function increment(source) { + set(source, source.v + 1); +} diff --git a/node_modules/svelte/src/reactivity/window/index.js b/node_modules/svelte/src/reactivity/window/index.js new file mode 100644 index 0000000..8c50a5c --- /dev/null +++ b/node_modules/svelte/src/reactivity/window/index.js @@ -0,0 +1,156 @@ +import { BROWSER } from 'esm-env'; +import { on } from '../../events/index.js'; +import { ReactiveValue } from '../reactive-value.js'; +import { get } from '../../internal/client/index.js'; +import { set, source } from '../../internal/client/reactivity/sources.js'; + +/** + * `scrollX.current` is a reactive view of `window.scrollX`. On the server it is `undefined`. + * @since 5.11.0 + */ +export const scrollX = new ReactiveValue( + BROWSER ? () => window.scrollX : () => undefined, + (update) => on(window, 'scroll', update) +); + +/** + * `scrollY.current` is a reactive view of `window.scrollY`. On the server it is `undefined`. + * @since 5.11.0 + */ +export const scrollY = new ReactiveValue( + BROWSER ? () => window.scrollY : () => undefined, + (update) => on(window, 'scroll', update) +); + +/** + * `innerWidth.current` is a reactive view of `window.innerWidth`. On the server it is `undefined`. + * @since 5.11.0 + */ +export const innerWidth = new ReactiveValue( + BROWSER ? () => window.innerWidth : () => undefined, + (update) => on(window, 'resize', update) +); + +/** + * `innerHeight.current` is a reactive view of `window.innerHeight`. On the server it is `undefined`. + * @since 5.11.0 + */ +export const innerHeight = new ReactiveValue( + BROWSER ? () => window.innerHeight : () => undefined, + (update) => on(window, 'resize', update) +); + +/** + * `outerWidth.current` is a reactive view of `window.outerWidth`. On the server it is `undefined`. + * @since 5.11.0 + */ +export const outerWidth = new ReactiveValue( + BROWSER ? () => window.outerWidth : () => undefined, + (update) => on(window, 'resize', update) +); + +/** + * `outerHeight.current` is a reactive view of `window.outerHeight`. On the server it is `undefined`. + * @since 5.11.0 + */ +export const outerHeight = new ReactiveValue( + BROWSER ? () => window.outerHeight : () => undefined, + (update) => on(window, 'resize', update) +); + +/** + * `screenLeft.current` is a reactive view of `window.screenLeft`. It is updated inside a `requestAnimationFrame` callback. On the server it is `undefined`. + * @since 5.11.0 + */ +export const screenLeft = new ReactiveValue( + BROWSER ? () => window.screenLeft : () => undefined, + (update) => { + let value = window.screenLeft; + + let frame = requestAnimationFrame(function check() { + frame = requestAnimationFrame(check); + + if (value !== (value = window.screenLeft)) { + update(); + } + }); + + return () => { + cancelAnimationFrame(frame); + }; + } +); + +/** + * `screenTop.current` is a reactive view of `window.screenTop`. It is updated inside a `requestAnimationFrame` callback. On the server it is `undefined`. + * @since 5.11.0 + */ +export const screenTop = new ReactiveValue( + BROWSER ? () => window.screenTop : () => undefined, + (update) => { + let value = window.screenTop; + + let frame = requestAnimationFrame(function check() { + frame = requestAnimationFrame(check); + + if (value !== (value = window.screenTop)) { + update(); + } + }); + + return () => { + cancelAnimationFrame(frame); + }; + } +); + +/** + * `online.current` is a reactive view of `navigator.onLine`. On the server it is `undefined`. + * @since 5.11.0 + */ +export const online = new ReactiveValue( + BROWSER ? () => navigator.onLine : () => undefined, + (update) => { + const unsub_online = on(window, 'online', update); + const unsub_offline = on(window, 'offline', update); + return () => { + unsub_online(); + unsub_offline(); + }; + } +); + +/** + * `devicePixelRatio.current` is a reactive view of `window.devicePixelRatio`. On the server it is `undefined`. + * Note that behaviour differs between browsers — on Chrome it will respond to the current zoom level, + * on Firefox and Safari it won't. + * @type {{ get current(): number | undefined }} + * @since 5.11.0 + */ +export const devicePixelRatio = /* @__PURE__ */ new (class DevicePixelRatio { + #dpr = source(BROWSER ? window.devicePixelRatio : undefined); + + #update() { + const off = on( + window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`), + 'change', + () => { + set(this.#dpr, window.devicePixelRatio); + + off(); + this.#update(); + } + ); + } + + constructor() { + if (BROWSER) { + this.#update(); + } + } + + get current() { + get(this.#dpr); + return BROWSER ? window.devicePixelRatio : undefined; + } +})(); diff --git a/node_modules/svelte/src/server/index.js b/node_modules/svelte/src/server/index.js new file mode 100644 index 0000000..c02e9d0 --- /dev/null +++ b/node_modules/svelte/src/server/index.js @@ -0,0 +1 @@ +export { render } from '../internal/server/index.js'; diff --git a/node_modules/svelte/src/store/index-client.js b/node_modules/svelte/src/store/index-client.js new file mode 100644 index 0000000..2f0a1a8 --- /dev/null +++ b/node_modules/svelte/src/store/index-client.js @@ -0,0 +1,169 @@ +/** @import { Readable, Writable } from './public.js' */ +import { + effect_root, + effect_tracking, + render_effect +} from '../internal/client/reactivity/effects.js'; +import { get, writable } from './shared/index.js'; +import { createSubscriber } from '../reactivity/create-subscriber.js'; +import { + active_effect, + active_reaction, + set_active_effect, + set_active_reaction +} from '../internal/client/runtime.js'; + +export { derived, get, readable, readonly, writable } from './shared/index.js'; + +/** + * @template V + * @overload + * @param {() => V} get + * @param {(v: V) => void} set + * @returns {Writable} + */ +/** + * @template V + * @overload + * @param {() => V} get + * @returns {Readable} + */ +/** + * Create a store from a function that returns state, and (to make a writable store), an + * optional second function that sets state. + * + * ```ts + * import { toStore } from 'svelte/store'; + * + * let count = $state(0); + * + * const store = toStore(() => count, (v) => (count = v)); + * ``` + * @template V + * @param {() => V} get + * @param {(v: V) => void} [set] + * @returns {Writable | Readable} + */ +export function toStore(get, set) { + var effect = active_effect; + var reaction = active_reaction; + var init_value = get(); + + const store = writable(init_value, (set) => { + // If the value has changed before we call subscribe, then + // we need to treat the value as already having run + var ran = init_value !== get(); + + // TODO do we need a different implementation on the server? + var teardown; + // Apply the reaction and effect at the time of toStore being called + var previous_reaction = active_reaction; + var previous_effect = active_effect; + set_active_reaction(reaction); + set_active_effect(effect); + + try { + teardown = effect_root(() => { + render_effect(() => { + const value = get(); + if (ran) set(value); + }); + }); + } finally { + set_active_reaction(previous_reaction); + set_active_effect(previous_effect); + } + + ran = true; + + return teardown; + }); + + if (set) { + return { + set, + update: (fn) => set(fn(get())), + subscribe: store.subscribe + }; + } + + return { + subscribe: store.subscribe + }; +} + +/** + * @template V + * @overload + * @param {Writable} store + * @returns {{ current: V }} + */ +/** + * @template V + * @overload + * @param {Readable} store + * @returns {{ readonly current: V }} + */ +/** + * Convert a store to an object with a reactive `current` property. If `store` + * is a readable store, `current` will be a readonly property. + * + * ```ts + * import { fromStore, get, writable } from 'svelte/store'; + * + * const store = writable(0); + * + * const count = fromStore(store); + * + * count.current; // 0; + * store.set(1); + * count.current; // 1 + * + * count.current += 1; + * get(store); // 2 + * ``` + * @template V + * @param {Writable | Readable} store + */ +export function fromStore(store) { + let value = /** @type {V} */ (undefined); + + const subscribe = createSubscriber((update) => { + let ran = false; + + const unsubscribe = store.subscribe((v) => { + value = v; + if (ran) update(); + }); + + ran = true; + + return unsubscribe; + }); + + function current() { + if (effect_tracking()) { + subscribe(); + return value; + } + + return get(store); + } + + if ('set' in store) { + return { + get current() { + return current(); + }, + set current(v) { + store.set(v); + } + }; + } + + return { + get current() { + return current(); + } + }; +} diff --git a/node_modules/svelte/src/store/index-server.js b/node_modules/svelte/src/store/index-server.js new file mode 100644 index 0000000..3eddd78 --- /dev/null +++ b/node_modules/svelte/src/store/index-server.js @@ -0,0 +1,101 @@ +/** @import { Readable, Writable } from './public.js' */ +import { get, writable } from './shared/index.js'; + +export { derived, get, readable, readonly, writable } from './shared/index.js'; + +/** + * @template V + * @overload + * @param {() => V} get + * @param {(v: V) => void} set + * @returns {Writable} + */ +/** + * @template V + * @overload + * @param {() => V} get + * @returns {Readable} + */ +/** + * Create a store from a function that returns state, and (to make a writable store), an + * optional second function that sets state. + * + * ```ts + * import { toStore } from 'svelte/store'; + * + * let count = $state(0); + * + * const store = toStore(() => count, (v) => (count = v)); + * ``` + * @template V + * @param {() => V} get + * @param {(v: V) => void} [set] + * @returns {Writable | Readable} + */ +export function toStore(get, set) { + const store = writable(get()); + + if (set) { + return { + set, + update: (fn) => set(fn(get())), + subscribe: store.subscribe + }; + } + + return { + subscribe: store.subscribe + }; +} + +/** + * @template V + * @overload + * @param {Writable} store + * @returns {{ current: V }} + */ +/** + * @template V + * @overload + * @param {Readable} store + * @returns {{ readonly current: V }} + */ +/** + * Convert a store to an object with a reactive `current` property. If `store` + * is a readable store, `current` will be a readonly property. + * + * ```ts + * import { fromStore, get, writable } from 'svelte/store'; + * + * const store = writable(0); + * + * const count = fromStore(store); + * + * count.current; // 0; + * store.set(1); + * count.current; // 1 + * + * count.current += 1; + * get(store); // 2 + * ``` + * @template V + * @param {Writable | Readable} store + */ +export function fromStore(store) { + if ('set' in store) { + return { + get current() { + return get(store); + }, + set current(v) { + store.set(v); + } + }; + } + + return { + get current() { + return get(store); + } + }; +} diff --git a/node_modules/svelte/src/store/shared/index.js b/node_modules/svelte/src/store/shared/index.js new file mode 100644 index 0000000..2b92360 --- /dev/null +++ b/node_modules/svelte/src/store/shared/index.js @@ -0,0 +1,209 @@ +/** @import { Readable, StartStopNotifier, Subscriber, Unsubscriber, Updater, Writable } from '../public.js' */ +/** @import { Stores, StoresValues, SubscribeInvalidateTuple } from '../private.js' */ +import { noop, run_all } from '../../internal/shared/utils.js'; +import { safe_not_equal } from '../../internal/client/reactivity/equality.js'; +import { subscribe_to_store } from '../utils.js'; + +/** + * @type {Array | any>} + */ +const subscriber_queue = []; + +/** + * Creates a `Readable` store that allows reading by subscription. + * + * @template T + * @param {T} [value] initial value + * @param {StartStopNotifier} [start] + * @returns {Readable} + */ +export function readable(value, start) { + return { + subscribe: writable(value, start).subscribe + }; +} + +/** + * Create a `Writable` store that allows both updating and reading by subscription. + * + * @template T + * @param {T} [value] initial value + * @param {StartStopNotifier} [start] + * @returns {Writable} + */ +export function writable(value, start = noop) { + /** @type {Unsubscriber | null} */ + let stop = null; + + /** @type {Set>} */ + const subscribers = new Set(); + + /** + * @param {T} new_value + * @returns {void} + */ + function set(new_value) { + if (safe_not_equal(value, new_value)) { + value = new_value; + if (stop) { + // store is ready + const run_queue = !subscriber_queue.length; + for (const subscriber of subscribers) { + subscriber[1](); + subscriber_queue.push(subscriber, value); + } + if (run_queue) { + for (let i = 0; i < subscriber_queue.length; i += 2) { + subscriber_queue[i][0](subscriber_queue[i + 1]); + } + subscriber_queue.length = 0; + } + } + } + } + + /** + * @param {Updater} fn + * @returns {void} + */ + function update(fn) { + set(fn(/** @type {T} */ (value))); + } + + /** + * @param {Subscriber} run + * @param {() => void} [invalidate] + * @returns {Unsubscriber} + */ + function subscribe(run, invalidate = noop) { + /** @type {SubscribeInvalidateTuple} */ + const subscriber = [run, invalidate]; + subscribers.add(subscriber); + if (subscribers.size === 1) { + stop = start(set, update) || noop; + } + run(/** @type {T} */ (value)); + return () => { + subscribers.delete(subscriber); + if (subscribers.size === 0 && stop) { + stop(); + stop = null; + } + }; + } + return { set, update, subscribe }; +} + +/** + * Derived value store by synchronizing one or more readable stores and + * applying an aggregation function over its input values. + * + * @template {Stores} S + * @template T + * @overload + * @param {S} stores + * @param {(values: StoresValues, set: (value: T) => void, update: (fn: Updater) => void) => Unsubscriber | void} fn + * @param {T} [initial_value] + * @returns {Readable} + */ +/** + * Derived value store by synchronizing one or more readable stores and + * applying an aggregation function over its input values. + * + * @template {Stores} S + * @template T + * @overload + * @param {S} stores + * @param {(values: StoresValues) => T} fn + * @param {T} [initial_value] + * @returns {Readable} + */ +/** + * @template {Stores} S + * @template T + * @param {S} stores + * @param {Function} fn + * @param {T} [initial_value] + * @returns {Readable} + */ +export function derived(stores, fn, initial_value) { + const single = !Array.isArray(stores); + /** @type {Array>} */ + const stores_array = single ? [stores] : stores; + if (!stores_array.every(Boolean)) { + throw new Error('derived() expects stores as input, got a falsy value'); + } + const auto = fn.length < 2; + return readable(initial_value, (set, update) => { + let started = false; + /** @type {T[]} */ + const values = []; + let pending = 0; + let cleanup = noop; + const sync = () => { + if (pending) { + return; + } + cleanup(); + const result = fn(single ? values[0] : values, set, update); + if (auto) { + set(result); + } else { + cleanup = typeof result === 'function' ? result : noop; + } + }; + const unsubscribers = stores_array.map((store, i) => + subscribe_to_store( + store, + (value) => { + values[i] = value; + pending &= ~(1 << i); + if (started) { + sync(); + } + }, + () => { + pending |= 1 << i; + } + ) + ); + started = true; + sync(); + return function stop() { + run_all(unsubscribers); + cleanup(); + // We need to set this to false because callbacks can still happen despite having unsubscribed: + // Callbacks might already be placed in the queue which doesn't know it should no longer + // invoke this derived store. + started = false; + }; + }); +} + +/** + * Takes a store and returns a new one derived from the old one that is readable. + * + * @template T + * @param {Readable} store - store to make readonly + * @returns {Readable} + */ +export function readonly(store) { + return { + // @ts-expect-error TODO i suspect the bind is unnecessary + subscribe: store.subscribe.bind(store) + }; +} + +/** + * Get the current value from a store by subscribing and immediately unsubscribing. + * + * @template T + * @param {Readable} store + * @returns {T} + */ +export function get(store) { + let value; + subscribe_to_store(store, (_) => (value = _))(); + // @ts-expect-error + return value; +} diff --git a/node_modules/svelte/src/store/utils.js b/node_modules/svelte/src/store/utils.js new file mode 100644 index 0000000..db2a62c --- /dev/null +++ b/node_modules/svelte/src/store/utils.js @@ -0,0 +1,36 @@ +/** @import { Readable } from './public' */ +import { untrack } from '../index-client.js'; +import { noop } from '../internal/shared/utils.js'; + +/** + * @template T + * @param {Readable | null | undefined} store + * @param {(value: T) => void} run + * @param {(value: T) => void} [invalidate] + * @returns {() => void} + */ +export function subscribe_to_store(store, run, invalidate) { + if (store == null) { + // @ts-expect-error + run(undefined); + + // @ts-expect-error + if (invalidate) invalidate(undefined); + + return noop; + } + + // Svelte store takes a private second argument + // StartStopNotifier could mutate state, and we want to silence the corresponding validation error + const unsub = untrack(() => + store.subscribe( + run, + // @ts-expect-error + invalidate + ) + ); + + // Also support RxJS + // @ts-expect-error TODO fix this in the types? + return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub; +} diff --git a/node_modules/svelte/src/transition/index.js b/node_modules/svelte/src/transition/index.js new file mode 100644 index 0000000..898a929 --- /dev/null +++ b/node_modules/svelte/src/transition/index.js @@ -0,0 +1,300 @@ +/** @import { BlurParams, CrossfadeParams, DrawParams, FadeParams, FlyParams, ScaleParams, SlideParams, TransitionConfig } from './public' */ + +import { DEV } from 'esm-env'; +import * as w from '../internal/client/warnings.js'; + +/** @param {number} x */ +const linear = (x) => x; + +/** @param {number} t */ +function cubic_out(t) { + const f = t - 1.0; + return f * f * f + 1.0; +} + +/** + * @param {number} t + * @returns {number} + */ +function cubic_in_out(t) { + return t < 0.5 ? 4.0 * t * t * t : 0.5 * Math.pow(2.0 * t - 2.0, 3.0) + 1.0; +} + +/** @param {number | string} value + * @returns {[number, string]} + */ +function split_css_unit(value) { + const split = typeof value === 'string' && value.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/); + return split ? [parseFloat(split[1]), split[2] || 'px'] : [/** @type {number} */ (value), 'px']; +} + +/** + * Animates a `blur` filter alongside an element's opacity. + * + * @param {Element} node + * @param {BlurParams} [params] + * @returns {TransitionConfig} + */ +export function blur( + node, + { delay = 0, duration = 400, easing = cubic_in_out, amount = 5, opacity = 0 } = {} +) { + const style = getComputedStyle(node); + const target_opacity = +style.opacity; + const f = style.filter === 'none' ? '' : style.filter; + const od = target_opacity * (1 - opacity); + const [value, unit] = split_css_unit(amount); + return { + delay, + duration, + easing, + css: (_t, u) => `opacity: ${target_opacity - od * u}; filter: ${f} blur(${u * value}${unit});` + }; +} + +/** + * Animates the opacity of an element from 0 to the current opacity for `in` transitions and from the current opacity to 0 for `out` transitions. + * + * @param {Element} node + * @param {FadeParams} [params] + * @returns {TransitionConfig} + */ +export function fade(node, { delay = 0, duration = 400, easing = linear } = {}) { + const o = +getComputedStyle(node).opacity; + return { + delay, + duration, + easing, + css: (t) => `opacity: ${t * o}` + }; +} + +/** + * Animates the x and y positions and the opacity of an element. `in` transitions animate from the provided values, passed as parameters to the element's default values. `out` transitions animate from the element's default values to the provided values. + * + * @param {Element} node + * @param {FlyParams} [params] + * @returns {TransitionConfig} + */ +export function fly( + node, + { delay = 0, duration = 400, easing = cubic_out, x = 0, y = 0, opacity = 0 } = {} +) { + const style = getComputedStyle(node); + const target_opacity = +style.opacity; + const transform = style.transform === 'none' ? '' : style.transform; + const od = target_opacity * (1 - opacity); + const [x_value, x_unit] = split_css_unit(x); + const [y_value, y_unit] = split_css_unit(y); + return { + delay, + duration, + easing, + css: (t, u) => ` + transform: ${transform} translate(${(1 - t) * x_value}${x_unit}, ${(1 - t) * y_value}${y_unit}); + opacity: ${target_opacity - od * u}` + }; +} + +var slide_warning = false; + +/** + * Slides an element in and out. + * + * @param {Element} node + * @param {SlideParams} [params] + * @returns {TransitionConfig} + */ +export function slide(node, { delay = 0, duration = 400, easing = cubic_out, axis = 'y' } = {}) { + const style = getComputedStyle(node); + + if (DEV && !slide_warning && /(contents|inline|table)/.test(style.display)) { + slide_warning = true; + Promise.resolve().then(() => (slide_warning = false)); + w.transition_slide_display(style.display); + } + + const opacity = +style.opacity; + const primary_property = axis === 'y' ? 'height' : 'width'; + const primary_property_value = parseFloat(style[primary_property]); + const secondary_properties = axis === 'y' ? ['top', 'bottom'] : ['left', 'right']; + const capitalized_secondary_properties = secondary_properties.map( + (e) => /** @type {'Left' | 'Right' | 'Top' | 'Bottom'} */ (`${e[0].toUpperCase()}${e.slice(1)}`) + ); + const padding_start_value = parseFloat(style[`padding${capitalized_secondary_properties[0]}`]); + const padding_end_value = parseFloat(style[`padding${capitalized_secondary_properties[1]}`]); + const margin_start_value = parseFloat(style[`margin${capitalized_secondary_properties[0]}`]); + const margin_end_value = parseFloat(style[`margin${capitalized_secondary_properties[1]}`]); + const border_width_start_value = parseFloat( + style[`border${capitalized_secondary_properties[0]}Width`] + ); + const border_width_end_value = parseFloat( + style[`border${capitalized_secondary_properties[1]}Width`] + ); + return { + delay, + duration, + easing, + css: (t) => + 'overflow: hidden;' + + `opacity: ${Math.min(t * 20, 1) * opacity};` + + `${primary_property}: ${t * primary_property_value}px;` + + `padding-${secondary_properties[0]}: ${t * padding_start_value}px;` + + `padding-${secondary_properties[1]}: ${t * padding_end_value}px;` + + `margin-${secondary_properties[0]}: ${t * margin_start_value}px;` + + `margin-${secondary_properties[1]}: ${t * margin_end_value}px;` + + `border-${secondary_properties[0]}-width: ${t * border_width_start_value}px;` + + `border-${secondary_properties[1]}-width: ${t * border_width_end_value}px;` + + `min-${primary_property}: 0` + }; +} + +/** + * Animates the opacity and scale of an element. `in` transitions animate from the provided values, passed as parameters, to an element's current (default) values. `out` transitions animate from an element's default values to the provided values. + * + * @param {Element} node + * @param {ScaleParams} [params] + * @returns {TransitionConfig} + */ +export function scale( + node, + { delay = 0, duration = 400, easing = cubic_out, start = 0, opacity = 0 } = {} +) { + const style = getComputedStyle(node); + const target_opacity = +style.opacity; + const transform = style.transform === 'none' ? '' : style.transform; + const sd = 1 - start; + const od = target_opacity * (1 - opacity); + return { + delay, + duration, + easing, + css: (_t, u) => ` + transform: ${transform} scale(${1 - sd * u}); + opacity: ${target_opacity - od * u} + ` + }; +} + +/** + * Animates the stroke of an SVG element, like a snake in a tube. `in` transitions begin with the path invisible and draw the path to the screen over time. `out` transitions start in a visible state and gradually erase the path. `draw` only works with elements that have a `getTotalLength` method, like `` and ``. + * + * @param {SVGElement & { getTotalLength(): number }} node + * @param {DrawParams} [params] + * @returns {TransitionConfig} + */ +export function draw(node, { delay = 0, speed, duration, easing = cubic_in_out } = {}) { + let len = node.getTotalLength(); + const style = getComputedStyle(node); + if (style.strokeLinecap !== 'butt') { + len += parseInt(style.strokeWidth); + } + if (duration === undefined) { + if (speed === undefined) { + duration = 800; + } else { + duration = len / speed; + } + } else if (typeof duration === 'function') { + duration = duration(len); + } + return { + delay, + duration, + easing, + css: (_, u) => ` + stroke-dasharray: ${len}; + stroke-dashoffset: ${u * len}; + ` + }; +} + +/** + * @template T + * @template S + * @param {T} tar + * @param {S} src + * @returns {T & S} + */ +function assign(tar, src) { + // @ts-ignore + for (const k in src) tar[k] = src[k]; + return /** @type {T & S} */ (tar); +} + +/** + * The `crossfade` function creates a pair of [transitions](https://svelte.dev/docs/svelte/transition) called `send` and `receive`. When an element is 'sent', it looks for a corresponding element being 'received', and generates a transition that transforms the element to its counterpart's position and fades it out. When an element is 'received', the reverse happens. If there is no counterpart, the `fallback` transition is used. + * + * @param {CrossfadeParams & { + * fallback?: (node: Element, params: CrossfadeParams, intro: boolean) => TransitionConfig; + * }} params + * @returns {[(node: any, params: CrossfadeParams & { key: any; }) => () => TransitionConfig, (node: any, params: CrossfadeParams & { key: any; }) => () => TransitionConfig]} + */ +export function crossfade({ fallback, ...defaults }) { + /** @type {Map} */ + const to_receive = new Map(); + /** @type {Map} */ + const to_send = new Map(); + + /** + * @param {Element} from_node + * @param {Element} node + * @param {CrossfadeParams} params + * @returns {TransitionConfig} + */ + function crossfade(from_node, node, params) { + const { + delay = 0, + duration = /** @param {number} d */ (d) => Math.sqrt(d) * 30, + easing = cubic_out + } = assign(assign({}, defaults), params); + const from = from_node.getBoundingClientRect(); + const to = node.getBoundingClientRect(); + const dx = from.left - to.left; + const dy = from.top - to.top; + const dw = from.width / to.width; + const dh = from.height / to.height; + const d = Math.sqrt(dx * dx + dy * dy); + const style = getComputedStyle(node); + const transform = style.transform === 'none' ? '' : style.transform; + const opacity = +style.opacity; + return { + delay, + duration: typeof duration === 'function' ? duration(d) : duration, + easing, + css: (t, u) => ` + opacity: ${t * opacity}; + transform-origin: top left; + transform: ${transform} translate(${u * dx}px,${u * dy}px) scale(${t + (1 - t) * dw}, ${ + t + (1 - t) * dh + }); + ` + }; + } + + /** + * @param {Map} items + * @param {Map} counterparts + * @param {boolean} intro + * @returns {(node: any, params: CrossfadeParams & { key: any; }) => () => TransitionConfig} + */ + function transition(items, counterparts, intro) { + // @ts-expect-error TODO improve typings (are the public types wrong?) + return (node, params) => { + items.set(params.key, node); + return () => { + if (counterparts.has(params.key)) { + const other_node = counterparts.get(params.key); + counterparts.delete(params.key); + return crossfade(/** @type {Element} */ (other_node), node, params); + } + // if the node is disappearing altogether + // (i.e. wasn't claimed by the other list) + // then we need to supply an outro + items.delete(params.key); + return fallback && fallback(node, params, intro); + }; + }; + } + return [transition(to_send, to_receive, false), transition(to_receive, to_send, true)]; +} diff --git a/node_modules/svelte/src/utils.js b/node_modules/svelte/src/utils.js new file mode 100644 index 0000000..ada318e --- /dev/null +++ b/node_modules/svelte/src/utils.js @@ -0,0 +1,474 @@ +const regex_return_characters = /\r/g; + +/** + * @param {string} str + * @returns {string} + */ +export function hash(str) { + str = str.replace(regex_return_characters, ''); + let hash = 5381; + let i = str.length; + + while (i--) hash = ((hash << 5) - hash) ^ str.charCodeAt(i); + return (hash >>> 0).toString(36); +} + +const VOID_ELEMENT_NAMES = [ + 'area', + 'base', + 'br', + 'col', + 'command', + 'embed', + 'hr', + 'img', + 'input', + 'keygen', + 'link', + 'meta', + 'param', + 'source', + 'track', + 'wbr' +]; + +/** + * Returns `true` if `name` is of a void element + * @param {string} name + */ +export function is_void(name) { + return VOID_ELEMENT_NAMES.includes(name) || name.toLowerCase() === '!doctype'; +} + +const RESERVED_WORDS = [ + 'arguments', + 'await', + 'break', + 'case', + 'catch', + 'class', + 'const', + 'continue', + 'debugger', + 'default', + 'delete', + 'do', + 'else', + 'enum', + 'eval', + 'export', + 'extends', + 'false', + 'finally', + 'for', + 'function', + 'if', + 'implements', + 'import', + 'in', + 'instanceof', + 'interface', + 'let', + 'new', + 'null', + 'package', + 'private', + 'protected', + 'public', + 'return', + 'static', + 'super', + 'switch', + 'this', + 'throw', + 'true', + 'try', + 'typeof', + 'var', + 'void', + 'while', + 'with', + 'yield' +]; + +/** + * Returns `true` if `word` is a reserved JavaScript keyword + * @param {string} word + */ +export function is_reserved(word) { + return RESERVED_WORDS.includes(word); +} + +/** + * @param {string} name + */ +export function is_capture_event(name) { + return name.endsWith('capture') && name !== 'gotpointercapture' && name !== 'lostpointercapture'; +} + +/** List of Element events that will be delegated */ +const DELEGATED_EVENTS = [ + 'beforeinput', + 'click', + 'change', + 'dblclick', + 'contextmenu', + 'focusin', + 'focusout', + 'input', + 'keydown', + 'keyup', + 'mousedown', + 'mousemove', + 'mouseout', + 'mouseover', + 'mouseup', + 'pointerdown', + 'pointermove', + 'pointerout', + 'pointerover', + 'pointerup', + 'touchend', + 'touchmove', + 'touchstart' +]; + +/** + * Returns `true` if `event_name` is a delegated event + * @param {string} event_name + */ +export function is_delegated(event_name) { + return DELEGATED_EVENTS.includes(event_name); +} + +/** + * Attributes that are boolean, i.e. they are present or not present. + */ +const DOM_BOOLEAN_ATTRIBUTES = [ + 'allowfullscreen', + 'async', + 'autofocus', + 'autoplay', + 'checked', + 'controls', + 'default', + 'disabled', + 'formnovalidate', + 'hidden', + 'indeterminate', + 'inert', + 'ismap', + 'loop', + 'multiple', + 'muted', + 'nomodule', + 'novalidate', + 'open', + 'playsinline', + 'readonly', + 'required', + 'reversed', + 'seamless', + 'selected', + 'webkitdirectory', + 'defer', + 'disablepictureinpicture', + 'disableremoteplayback' +]; + +/** + * Returns `true` if `name` is a boolean attribute + * @param {string} name + */ +export function is_boolean_attribute(name) { + return DOM_BOOLEAN_ATTRIBUTES.includes(name); +} + +/** + * @type {Record} + * List of attribute names that should be aliased to their property names + * because they behave differently between setting them as an attribute and + * setting them as a property. + */ +const ATTRIBUTE_ALIASES = { + // no `class: 'className'` because we handle that separately + formnovalidate: 'formNoValidate', + ismap: 'isMap', + nomodule: 'noModule', + playsinline: 'playsInline', + readonly: 'readOnly', + defaultvalue: 'defaultValue', + defaultchecked: 'defaultChecked', + srcobject: 'srcObject', + novalidate: 'noValidate', + allowfullscreen: 'allowFullscreen', + disablepictureinpicture: 'disablePictureInPicture', + disableremoteplayback: 'disableRemotePlayback' +}; + +/** + * @param {string} name + */ +export function normalize_attribute(name) { + name = name.toLowerCase(); + return ATTRIBUTE_ALIASES[name] ?? name; +} + +const DOM_PROPERTIES = [ + ...DOM_BOOLEAN_ATTRIBUTES, + 'formNoValidate', + 'isMap', + 'noModule', + 'playsInline', + 'readOnly', + 'value', + 'volume', + 'defaultValue', + 'defaultChecked', + 'srcObject', + 'noValidate', + 'allowFullscreen', + 'disablePictureInPicture', + 'disableRemotePlayback' +]; + +/** + * @param {string} name + */ +export function is_dom_property(name) { + return DOM_PROPERTIES.includes(name); +} + +const NON_STATIC_PROPERTIES = ['autofocus', 'muted', 'defaultValue', 'defaultChecked']; + +/** + * Returns `true` if the given attribute cannot be set through the template + * string, i.e. needs some kind of JavaScript handling to work. + * @param {string} name + */ +export function cannot_be_set_statically(name) { + return NON_STATIC_PROPERTIES.includes(name); +} + +/** + * Subset of delegated events which should be passive by default. + * These two are already passive via browser defaults on window, document and body. + * But since + * - we're delegating them + * - they happen often + * - they apply to mobile which is generally less performant + * we're marking them as passive by default for other elements, too. + */ +const PASSIVE_EVENTS = ['touchstart', 'touchmove']; + +/** + * Returns `true` if `name` is a passive event + * @param {string} name + */ +export function is_passive_event(name) { + return PASSIVE_EVENTS.includes(name); +} + +const CONTENT_EDITABLE_BINDINGS = ['textContent', 'innerHTML', 'innerText']; + +/** @param {string} name */ +export function is_content_editable_binding(name) { + return CONTENT_EDITABLE_BINDINGS.includes(name); +} + +const LOAD_ERROR_ELEMENTS = [ + 'body', + 'embed', + 'iframe', + 'img', + 'link', + 'object', + 'script', + 'style', + 'track' +]; + +/** + * Returns `true` if the element emits `load` and `error` events + * @param {string} name + */ +export function is_load_error_element(name) { + return LOAD_ERROR_ELEMENTS.includes(name); +} + +const SVG_ELEMENTS = [ + 'altGlyph', + 'altGlyphDef', + 'altGlyphItem', + 'animate', + 'animateColor', + 'animateMotion', + 'animateTransform', + 'circle', + 'clipPath', + 'color-profile', + 'cursor', + 'defs', + 'desc', + 'discard', + 'ellipse', + 'feBlend', + 'feColorMatrix', + 'feComponentTransfer', + 'feComposite', + 'feConvolveMatrix', + 'feDiffuseLighting', + 'feDisplacementMap', + 'feDistantLight', + 'feDropShadow', + 'feFlood', + 'feFuncA', + 'feFuncB', + 'feFuncG', + 'feFuncR', + 'feGaussianBlur', + 'feImage', + 'feMerge', + 'feMergeNode', + 'feMorphology', + 'feOffset', + 'fePointLight', + 'feSpecularLighting', + 'feSpotLight', + 'feTile', + 'feTurbulence', + 'filter', + 'font', + 'font-face', + 'font-face-format', + 'font-face-name', + 'font-face-src', + 'font-face-uri', + 'foreignObject', + 'g', + 'glyph', + 'glyphRef', + 'hatch', + 'hatchpath', + 'hkern', + 'image', + 'line', + 'linearGradient', + 'marker', + 'mask', + 'mesh', + 'meshgradient', + 'meshpatch', + 'meshrow', + 'metadata', + 'missing-glyph', + 'mpath', + 'path', + 'pattern', + 'polygon', + 'polyline', + 'radialGradient', + 'rect', + 'set', + 'solidcolor', + 'stop', + 'svg', + 'switch', + 'symbol', + 'text', + 'textPath', + 'tref', + 'tspan', + 'unknown', + 'use', + 'view', + 'vkern' +]; + +/** @param {string} name */ +export function is_svg(name) { + return SVG_ELEMENTS.includes(name); +} + +const MATHML_ELEMENTS = [ + 'annotation', + 'annotation-xml', + 'maction', + 'math', + 'merror', + 'mfrac', + 'mi', + 'mmultiscripts', + 'mn', + 'mo', + 'mover', + 'mpadded', + 'mphantom', + 'mprescripts', + 'mroot', + 'mrow', + 'ms', + 'mspace', + 'msqrt', + 'mstyle', + 'msub', + 'msubsup', + 'msup', + 'mtable', + 'mtd', + 'mtext', + 'mtr', + 'munder', + 'munderover', + 'semantics' +]; + +/** @param {string} name */ +export function is_mathml(name) { + return MATHML_ELEMENTS.includes(name); +} + +const RUNES = /** @type {const} */ ([ + '$state', + '$state.raw', + '$state.snapshot', + '$props', + '$props.id', + '$bindable', + '$derived', + '$derived.by', + '$effect', + '$effect.pre', + '$effect.tracking', + '$effect.root', + '$inspect', + '$inspect().with', + '$inspect.trace', + '$host' +]); + +/** + * @param {string} name + * @returns {name is RUNES[number]} + */ +export function is_rune(name) { + return RUNES.includes(/** @type {RUNES[number]} */ (name)); +} + +/** List of elements that require raw contents and should not have SSR comments put in them */ +const RAW_TEXT_ELEMENTS = /** @type {const} */ (['textarea', 'script', 'style', 'title']); + +/** @param {string} name */ +export function is_raw_text_element(name) { + return RAW_TEXT_ELEMENTS.includes(/** @type {RAW_TEXT_ELEMENTS[number]} */ (name)); +} + +/** + * Prevent devtools trying to make `location` a clickable link by inserting a zero-width space + * @template {string | undefined} T + * @param {T} location + * @returns {T}; + */ +export function sanitize_location(location) { + return /** @type {T} */ (location?.replace(/\//g, '/\u200b')); +} diff --git a/node_modules/svelte/src/version.js b/node_modules/svelte/src/version.js new file mode 100644 index 0000000..a3a9979 --- /dev/null +++ b/node_modules/svelte/src/version.js @@ -0,0 +1,8 @@ +// generated during release, do not modify + +/** + * The current version, as set in package.json. + * @type {string} + */ +export const VERSION = '5.28.2'; +export const PUBLIC_VERSION = '5'; diff --git a/node_modules/svelte/store.d.ts b/node_modules/svelte/store.d.ts new file mode 100644 index 0000000..a1a0ce5 --- /dev/null +++ b/node_modules/svelte/store.d.ts @@ -0,0 +1 @@ +import './types/index.js'; diff --git a/node_modules/svelte/svelte-html.d.ts b/node_modules/svelte/svelte-html.d.ts new file mode 100644 index 0000000..5042eaa --- /dev/null +++ b/node_modules/svelte/svelte-html.d.ts @@ -0,0 +1,256 @@ +/// +// This file is deliberately not exposed through the exports map. +// It's meant to be loaded directly by the Svelte language server +/* eslint-disable @typescript-eslint/no-empty-interface */ + +import * as svelteElements from './elements.js'; + +/** + * @internal do not use + */ +type HTMLProps = Omit< + import('./elements.js').SvelteHTMLElements[Property], + keyof Override +> & + Override; + +declare global { + /** + * This namespace does not exist in the runtime, it is only used for typings + */ + namespace svelteHTML { + // Every namespace eligible for use needs to implement the following two functions + /** + * @internal do not use + */ + function mapElementTag(tag: K): ElementTagNameMap[K]; + function mapElementTag(tag: K): SVGElementTagNameMap[K]; + function mapElementTag(tag: any): any; // needs to be any because used in context of + + /** + * @internal do not use + */ + function createElement( + // "undefined | null" because of + element: Key | undefined | null, + attrs: string extends Key ? svelteElements.HTMLAttributes : Elements[Key] + ): Key extends keyof ElementTagNameMap + ? ElementTagNameMap[Key] + : Key extends keyof SVGElementTagNameMap + ? SVGElementTagNameMap[Key] + : any; + function createElement( + // "undefined | null" because of + element: Key | undefined | null, + attrsEnhancers: T, + attrs: (string extends Key ? svelteElements.HTMLAttributes : Elements[Key]) & T + ): Key extends keyof ElementTagNameMap + ? ElementTagNameMap[Key] + : Key extends keyof SVGElementTagNameMap + ? SVGElementTagNameMap[Key] + : any; + + // For backwards-compatibility and ease-of-use, in case someone enhanced the typings from import('svelte/elements').HTMLAttributes/SVGAttributes + // eslint-disable-next-line @typescript-eslint/no-unused-vars + interface HTMLAttributes {} + // eslint-disable-next-line @typescript-eslint/no-unused-vars + interface SVGAttributes {} + + /** + * Avoid using this interface directly. Instead use the `SvelteHTMLElements` interface exported by `svelte/elements` + * This should only be used if you need to extend the interface with custom elements + */ + interface IntrinsicElements extends svelteElements.SvelteHTMLElements { + a: HTMLProps<'a', HTMLAttributes>; + abbr: HTMLProps<'abbr', HTMLAttributes>; + address: HTMLProps<'address', HTMLAttributes>; + area: HTMLProps<'area', HTMLAttributes>; + article: HTMLProps<'article', HTMLAttributes>; + aside: HTMLProps<'aside', HTMLAttributes>; + audio: HTMLProps<'audio', HTMLAttributes>; + b: HTMLProps<'b', HTMLAttributes>; + base: HTMLProps<'base', HTMLAttributes>; + bdi: HTMLProps<'bdi', HTMLAttributes>; + bdo: HTMLProps<'bdo', HTMLAttributes>; + big: HTMLProps<'big', HTMLAttributes>; + blockquote: HTMLProps<'blockquote', HTMLAttributes>; + body: HTMLProps<'body', HTMLAttributes>; + br: HTMLProps<'br', HTMLAttributes>; + button: HTMLProps<'button', HTMLAttributes>; + canvas: HTMLProps<'canvas', HTMLAttributes>; + caption: HTMLProps<'caption', HTMLAttributes>; + cite: HTMLProps<'cite', HTMLAttributes>; + code: HTMLProps<'code', HTMLAttributes>; + col: HTMLProps<'col', HTMLAttributes>; + colgroup: HTMLProps<'colgroup', HTMLAttributes>; + data: HTMLProps<'data', HTMLAttributes>; + datalist: HTMLProps<'datalist', HTMLAttributes>; + dd: HTMLProps<'dd', HTMLAttributes>; + del: HTMLProps<'del', HTMLAttributes>; + details: HTMLProps<'details', HTMLAttributes>; + dfn: HTMLProps<'dfn', HTMLAttributes>; + dialog: HTMLProps<'dialog', HTMLAttributes>; + div: HTMLProps<'div', HTMLAttributes>; + dl: HTMLProps<'dl', HTMLAttributes>; + dt: HTMLProps<'dt', HTMLAttributes>; + em: HTMLProps<'em', HTMLAttributes>; + embed: HTMLProps<'embed', HTMLAttributes>; + fieldset: HTMLProps<'fieldset', HTMLAttributes>; + figcaption: HTMLProps<'figcaption', HTMLAttributes>; + figure: HTMLProps<'figure', HTMLAttributes>; + footer: HTMLProps<'footer', HTMLAttributes>; + form: HTMLProps<'form', HTMLAttributes>; + h1: HTMLProps<'h1', HTMLAttributes>; + h2: HTMLProps<'h2', HTMLAttributes>; + h3: HTMLProps<'h3', HTMLAttributes>; + h4: HTMLProps<'h4', HTMLAttributes>; + h5: HTMLProps<'h5', HTMLAttributes>; + h6: HTMLProps<'h6', HTMLAttributes>; + head: HTMLProps<'head', HTMLAttributes>; + header: HTMLProps<'header', HTMLAttributes>; + hgroup: HTMLProps<'hgroup', HTMLAttributes>; + hr: HTMLProps<'hr', HTMLAttributes>; + html: HTMLProps<'html', HTMLAttributes>; + i: HTMLProps<'i', HTMLAttributes>; + iframe: HTMLProps<'iframe', HTMLAttributes>; + img: HTMLProps<'img', HTMLAttributes>; + input: HTMLProps<'input', HTMLAttributes>; + ins: HTMLProps<'ins', HTMLAttributes>; + kbd: HTMLProps<'kbd', HTMLAttributes>; + keygen: HTMLProps<'keygen', HTMLAttributes>; + label: HTMLProps<'label', HTMLAttributes>; + legend: HTMLProps<'legend', HTMLAttributes>; + li: HTMLProps<'li', HTMLAttributes>; + link: HTMLProps<'link', HTMLAttributes>; + main: HTMLProps<'main', HTMLAttributes>; + map: HTMLProps<'map', HTMLAttributes>; + mark: HTMLProps<'mark', HTMLAttributes>; + menu: HTMLProps<'menu', HTMLAttributes>; + menuitem: HTMLProps<'menuitem', HTMLAttributes>; + meta: HTMLProps<'meta', HTMLAttributes>; + meter: HTMLProps<'meter', HTMLAttributes>; + nav: HTMLProps<'nav', HTMLAttributes>; + noscript: HTMLProps<'noscript', HTMLAttributes>; + object: HTMLProps<'object', HTMLAttributes>; + ol: HTMLProps<'ol', HTMLAttributes>; + optgroup: HTMLProps<'optgroup', HTMLAttributes>; + option: HTMLProps<'option', HTMLAttributes>; + output: HTMLProps<'output', HTMLAttributes>; + p: HTMLProps<'p', HTMLAttributes>; + param: HTMLProps<'param', HTMLAttributes>; + picture: HTMLProps<'picture', HTMLAttributes>; + pre: HTMLProps<'pre', HTMLAttributes>; + progress: HTMLProps<'progress', HTMLAttributes>; + q: HTMLProps<'q', HTMLAttributes>; + rp: HTMLProps<'rp', HTMLAttributes>; + rt: HTMLProps<'rt', HTMLAttributes>; + ruby: HTMLProps<'ruby', HTMLAttributes>; + s: HTMLProps<'s', HTMLAttributes>; + samp: HTMLProps<'samp', HTMLAttributes>; + slot: HTMLProps<'slot', HTMLAttributes>; + script: HTMLProps<'script', HTMLAttributes>; + section: HTMLProps<'section', HTMLAttributes>; + select: HTMLProps<'select', HTMLAttributes>; + small: HTMLProps<'small', HTMLAttributes>; + source: HTMLProps<'source', HTMLAttributes>; + span: HTMLProps<'span', HTMLAttributes>; + strong: HTMLProps<'strong', HTMLAttributes>; + style: HTMLProps<'style', HTMLAttributes>; + sub: HTMLProps<'sub', HTMLAttributes>; + summary: HTMLProps<'summary', HTMLAttributes>; + sup: HTMLProps<'sup', HTMLAttributes>; + table: HTMLProps<'table', HTMLAttributes>; + template: HTMLProps<'template', HTMLAttributes>; + tbody: HTMLProps<'tbody', HTMLAttributes>; + td: HTMLProps<'td', HTMLAttributes>; + textarea: HTMLProps<'textarea', HTMLAttributes>; + tfoot: HTMLProps<'tfoot', HTMLAttributes>; + th: HTMLProps<'th', HTMLAttributes>; + thead: HTMLProps<'thead', HTMLAttributes>; + time: HTMLProps<'time', HTMLAttributes>; + title: HTMLProps<'title', HTMLAttributes>; + tr: HTMLProps<'tr', HTMLAttributes>; + track: HTMLProps<'track', HTMLAttributes>; + u: HTMLProps<'u', HTMLAttributes>; + ul: HTMLProps<'ul', HTMLAttributes>; + var: HTMLProps<'var', HTMLAttributes>; + video: HTMLProps<'video', HTMLAttributes>; + wbr: HTMLProps<'wbr', HTMLAttributes>; + webview: HTMLProps<'webview', HTMLAttributes>; + // SVG + svg: HTMLProps<'svg', SVGAttributes>; + + animate: HTMLProps<'animate', SVGAttributes>; + animateMotion: HTMLProps<'animateMotion', SVGAttributes>; + animateTransform: HTMLProps<'animateTransform', SVGAttributes>; + circle: HTMLProps<'circle', SVGAttributes>; + clipPath: HTMLProps<'clipPath', SVGAttributes>; + defs: HTMLProps<'defs', SVGAttributes>; + desc: HTMLProps<'desc', SVGAttributes>; + ellipse: HTMLProps<'ellipse', SVGAttributes>; + feBlend: HTMLProps<'feBlend', SVGAttributes>; + feColorMatrix: HTMLProps<'feColorMatrix', SVGAttributes>; + feComponentTransfer: HTMLProps<'feComponentTransfer', SVGAttributes>; + feComposite: HTMLProps<'feComposite', SVGAttributes>; + feConvolveMatrix: HTMLProps<'feConvolveMatrix', SVGAttributes>; + feDiffuseLighting: HTMLProps<'feDiffuseLighting', SVGAttributes>; + feDisplacementMap: HTMLProps<'feDisplacementMap', SVGAttributes>; + feDistantLight: HTMLProps<'feDistantLight', SVGAttributes>; + feDropShadow: HTMLProps<'feDropShadow', SVGAttributes>; + feFlood: HTMLProps<'feFlood', SVGAttributes>; + feFuncA: HTMLProps<'feFuncA', SVGAttributes>; + feFuncB: HTMLProps<'feFuncB', SVGAttributes>; + feFuncG: HTMLProps<'feFuncG', SVGAttributes>; + feFuncR: HTMLProps<'feFuncR', SVGAttributes>; + feGaussianBlur: HTMLProps<'feGaussianBlur', SVGAttributes>; + feImage: HTMLProps<'feImage', SVGAttributes>; + feMerge: HTMLProps<'feMerge', SVGAttributes>; + feMergeNode: HTMLProps<'feMergeNode', SVGAttributes>; + feMorphology: HTMLProps<'feMorphology', SVGAttributes>; + feOffset: HTMLProps<'feOffset', SVGAttributes>; + fePointLight: HTMLProps<'fePointLight', SVGAttributes>; + feSpecularLighting: HTMLProps<'feSpecularLighting', SVGAttributes>; + feSpotLight: HTMLProps<'feSpotLight', SVGAttributes>; + feTile: HTMLProps<'feTile', SVGAttributes>; + feTurbulence: HTMLProps<'feTurbulence', SVGAttributes>; + filter: HTMLProps<'filter', SVGAttributes>; + foreignObject: HTMLProps<'foreignObject', SVGAttributes>; + g: HTMLProps<'g', SVGAttributes>; + image: HTMLProps<'image', SVGAttributes>; + line: HTMLProps<'line', SVGAttributes>; + linearGradient: HTMLProps<'linearGradient', SVGAttributes>; + marker: HTMLProps<'marker', SVGAttributes>; + mask: HTMLProps<'mask', SVGAttributes>; + metadata: HTMLProps<'metadata', SVGAttributes>; + mpath: HTMLProps<'mpath', SVGAttributes>; + path: HTMLProps<'path', SVGAttributes>; + pattern: HTMLProps<'pattern', SVGAttributes>; + polygon: HTMLProps<'polygon', SVGAttributes>; + polyline: HTMLProps<'polyline', SVGAttributes>; + radialGradient: HTMLProps<'radialGradient', SVGAttributes>; + rect: HTMLProps<'rect', SVGAttributes>; + stop: HTMLProps<'stop', SVGAttributes>; + switch: HTMLProps<'switch', SVGAttributes>; + symbol: HTMLProps<'symbol', SVGAttributes>; + text: HTMLProps<'text', SVGAttributes>; + textPath: HTMLProps<'textPath', SVGAttributes>; + tspan: HTMLProps<'tspan', SVGAttributes>; + use: HTMLProps<'use', SVGAttributes>; + view: HTMLProps<'view', SVGAttributes>; + + // Svelte specific + 'svelte:window': HTMLProps<'svelte:window', HTMLAttributes>; + 'svelte:body': HTMLProps<'svelte:body', HTMLAttributes>; + 'svelte:document': HTMLProps<'svelte:document', HTMLAttributes>; + 'svelte:fragment': { slot?: string }; + 'svelte:head': { [name: string]: any }; + 'svelte:boundary': { + onerror?: (error: unknown, reset: () => void) => void; + failed?: import('svelte').Snippet<[error: unknown, reset: () => void]>; + }; + // don't type svelte:options, it would override the types in svelte/elements and it isn't extendable anyway + + [name: string]: { [name: string]: any }; + } + } +} diff --git a/node_modules/svelte/transition.d.ts b/node_modules/svelte/transition.d.ts new file mode 100644 index 0000000..a1a0ce5 --- /dev/null +++ b/node_modules/svelte/transition.d.ts @@ -0,0 +1 @@ +import './types/index.js'; diff --git a/node_modules/svelte/types/compiler/interfaces.d.ts b/node_modules/svelte/types/compiler/interfaces.d.ts new file mode 100644 index 0000000..c89a925 --- /dev/null +++ b/node_modules/svelte/types/compiler/interfaces.d.ts @@ -0,0 +1 @@ +import '../index.js'; diff --git a/node_modules/svelte/types/compiler/preprocess.d.ts b/node_modules/svelte/types/compiler/preprocess.d.ts new file mode 100644 index 0000000..c89a925 --- /dev/null +++ b/node_modules/svelte/types/compiler/preprocess.d.ts @@ -0,0 +1 @@ +import '../index.js'; diff --git a/node_modules/svelte/types/index.d.ts b/node_modules/svelte/types/index.d.ts new file mode 100644 index 0000000..b233cfc --- /dev/null +++ b/node_modules/svelte/types/index.d.ts @@ -0,0 +1,3345 @@ +declare module 'svelte' { + /** + * @deprecated In Svelte 4, components are classes. In Svelte 5, they are functions. + * Use `mount` instead to instantiate components. + * See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) + * for more info. + */ + export interface ComponentConstructorOptions< + Props extends Record = Record + > { + target: Element | Document | ShadowRoot; + anchor?: Element; + props?: Props; + context?: Map; + hydrate?: boolean; + intro?: boolean; + recover?: boolean; + sync?: boolean; + idPrefix?: string; + $$inline?: boolean; + } + + /** + * Utility type for ensuring backwards compatibility on a type level that if there's a default slot, add 'children' to the props + */ + type Properties = Props & + (Slots extends { default: any } + ? // This is unfortunate because it means "accepts no props" turns into "accepts any prop" + // but the alternative is non-fixable type errors because of the way TypeScript index + // signatures work (they will always take precedence and make an impossible-to-satisfy children type). + Props extends Record + ? any + : { children?: any } + : {}); + + /** + * This was the base class for Svelte components in Svelte 4. Svelte 5+ components + * are completely different under the hood. For typing, use `Component` instead. + * To instantiate components, use `mount` instead. + * See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) for more info. + */ + export class SvelteComponent< + Props extends Record = Record, + Events extends Record = any, + Slots extends Record = any + > { + /** The custom element version of the component. Only present if compiled with the `customElement` compiler option */ + static element?: typeof HTMLElement; + + [prop: string]: any; + /** + * @deprecated This constructor only exists when using the `asClassComponent` compatibility helper, which + * is a stop-gap solution. Migrate towards using `mount` instead. See + * [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) for more info. + */ + constructor(options: ComponentConstructorOptions>); + /** + * For type checking capabilities only. + * Does not exist at runtime. + * ### DO NOT USE! + */ + $$prop_def: Props; // Without Properties: unnecessary, causes type bugs + /** + * For type checking capabilities only. + * Does not exist at runtime. + * ### DO NOT USE! + */ + $$events_def: Events; + /** + * For type checking capabilities only. + * Does not exist at runtime. + * ### DO NOT USE! + */ + $$slot_def: Slots; + /** + * For type checking capabilities only. + * Does not exist at runtime. + * ### DO NOT USE! + */ + $$bindings?: string; + + /** + * @deprecated This method only exists when using one of the legacy compatibility helpers, which + * is a stop-gap solution. See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) + * for more info. + */ + $destroy(): void; + + /** + * @deprecated This method only exists when using one of the legacy compatibility helpers, which + * is a stop-gap solution. See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) + * for more info. + */ + $on>( + type: K, + callback: (e: Events[K]) => void + ): () => void; + + /** + * @deprecated This method only exists when using one of the legacy compatibility helpers, which + * is a stop-gap solution. See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) + * for more info. + */ + $set(props: Partial): void; + } + + const brand: unique symbol; + type Brand = { [brand]: B }; + type Branded = T & Brand; + + /** + * Internal implementation details that vary between environments + */ + export type ComponentInternals = Branded<{}, 'ComponentInternals'>; + + /** + * Can be used to create strongly typed Svelte components. + * + * #### Example: + * + * You have component library on npm called `component-library`, from which + * you export a component called `MyComponent`. For Svelte+TypeScript users, + * you want to provide typings. Therefore you create a `index.d.ts`: + * ```ts + * import type { Component } from 'svelte'; + * export declare const MyComponent: Component<{ foo: string }> {} + * ``` + * Typing this makes it possible for IDEs like VS Code with the Svelte extension + * to provide intellisense and to use the component like this in a Svelte file + * with TypeScript: + * ```svelte + * + * + * ``` + */ + export interface Component< + Props extends Record = {}, + Exports extends Record = {}, + Bindings extends keyof Props | '' = string + > { + /** + * @param internal An internal object used by Svelte. Do not use or modify. + * @param props The props passed to the component. + */ + ( + this: void, + internals: ComponentInternals, + props: Props + ): { + /** + * @deprecated This method only exists when using one of the legacy compatibility helpers, which + * is a stop-gap solution. See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) + * for more info. + */ + $on?(type: string, callback: (e: any) => void): () => void; + /** + * @deprecated This method only exists when using one of the legacy compatibility helpers, which + * is a stop-gap solution. See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) + * for more info. + */ + $set?(props: Partial): void; + } & Exports; + /** The custom element version of the component. Only present if compiled with the `customElement` compiler option */ + element?: typeof HTMLElement; + /** Does not exist at runtime, for typing capabilities only. DO NOT USE */ + z_$$bindings?: Bindings; + } + + /** + * @deprecated Use `Component` instead. See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) for more information. + */ + export class SvelteComponentTyped< + Props extends Record = Record, + Events extends Record = any, + Slots extends Record = any + > extends SvelteComponent {} + + /** + * @deprecated The new `Component` type does not have a dedicated Events type. Use `ComponentProps` instead. + * + * @description + * Convenience type to get the events the given component expects. Example: + * ```html + * + * + * + * ``` + */ + export type ComponentEvents = + Comp extends SvelteComponent ? Events : never; + + /** + * Convenience type to get the props the given component expects. + * + * Example: Ensure a variable contains the props expected by `MyComponent`: + * + * ```ts + * import type { ComponentProps } from 'svelte'; + * import MyComponent from './MyComponent.svelte'; + * + * // Errors if these aren't the correct props expected by MyComponent. + * const props: ComponentProps = { foo: 'bar' }; + * ``` + * + * > [!NOTE] In Svelte 4, you would do `ComponentProps` because `MyComponent` was a class. + * + * Example: A generic function that accepts some component and infers the type of its props: + * + * ```ts + * import type { Component, ComponentProps } from 'svelte'; + * import MyComponent from './MyComponent.svelte'; + * + * function withProps>( + * component: TComponent, + * props: ComponentProps + * ) {}; + * + * // Errors if the second argument is not the correct props expected by the component in the first argument. + * withProps(MyComponent, { foo: 'bar' }); + * ``` + */ + export type ComponentProps> = + Comp extends SvelteComponent + ? Props + : Comp extends Component + ? Props + : never; + + /** + * @deprecated This type is obsolete when working with the new `Component` type. + * + * @description + * Convenience type to get the type of a Svelte component. Useful for example in combination with + * dynamic components using ``. + * + * Example: + * ```html + * + * + * + * + * ``` + */ + export type ComponentType = (new ( + options: ComponentConstructorOptions< + Comp extends SvelteComponent ? Props : Record + > + ) => Comp) & { + /** The custom element version of the component. Only present if compiled with the `customElement` compiler option */ + element?: typeof HTMLElement; + }; + + const SnippetReturn: unique symbol; + + // Use an interface instead of a type, makes for better intellisense info because the type is named in more situations. + /** + * The type of a `#snippet` block. You can use it to (for example) express that your component expects a snippet of a certain type: + * ```ts + * let { banner }: { banner: Snippet<[{ text: string }]> } = $props(); + * ``` + * You can only call a snippet through the `{@render ...}` tag. + * + * See the [snippet documentation](https://svelte.dev/docs/svelte/snippet) for more info. + * + * @template Parameters the parameters that the snippet expects (if any) as a tuple. + */ + export interface Snippet { + ( + this: void, + // this conditional allows tuples but not arrays. Arrays would indicate a + // rest parameter type, which is not supported. If rest parameters are added + // in the future, the condition can be removed. + ...args: number extends Parameters['length'] ? never : Parameters + ): { + '{@render ...} must be called with a Snippet': "import type { Snippet } from 'svelte'"; + } & typeof SnippetReturn; + } + + interface DispatchOptions { + cancelable?: boolean; + } + + export interface EventDispatcher> { + // Implementation notes: + // - undefined extends X instead of X extends undefined makes this work better with both strict and nonstrict mode + // - | null | undefined is added for convenience, as they are equivalent for the custom event constructor (both result in a null detail) + ( + ...args: null extends EventMap[Type] + ? [type: Type, parameter?: EventMap[Type] | null | undefined, options?: DispatchOptions] + : undefined extends EventMap[Type] + ? [type: Type, parameter?: EventMap[Type] | null | undefined, options?: DispatchOptions] + : [type: Type, parameter: EventMap[Type], options?: DispatchOptions] + ): boolean; + } + + /** + * Defines the options accepted by the `mount()` function. + */ + export type MountOptions = Record> = { + /** + * Target element where the component will be mounted. + */ + target: Document | Element | ShadowRoot; + /** + * Optional node inside `target`. When specified, it is used to render the component immediately before it. + */ + anchor?: Node; + /** + * Allows the specification of events. + * @deprecated Use callback props instead. + */ + events?: Record any>; + /** + * Can be accessed via `getContext()` at the component level. + */ + context?: Map; + /** + * Whether or not to play transitions on initial render. + * @default true + */ + intro?: boolean; + } & ({} extends Props + ? { + /** + * Component properties. + */ + props?: Props; + } + : { + /** + * Component properties. + */ + props: Props; + }); + /** + * `onMount`, like [`$effect`](https://svelte.dev/docs/svelte/$effect), schedules a function to run as soon as the component has been mounted to the DOM. + * Unlike `$effect`, the provided function only runs once. + * + * It must be called during the component's initialisation (but doesn't need to live _inside_ the component; + * it can be called from an external module). If a function is returned _synchronously_ from `onMount`, + * it will be called when the component is unmounted. + * + * `onMount` functions do not run during [server-side rendering](https://svelte.dev/docs/svelte/svelte-server#render). + * + * */ + export function onMount(fn: () => NotFunction | Promise> | (() => any)): void; + /** + * Schedules a callback to run immediately before the component is unmounted. + * + * Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the + * only one that runs inside a server-side component. + * + * */ + export function onDestroy(fn: () => any): void; + /** + * Creates an event dispatcher that can be used to dispatch [component events](https://svelte.dev/docs/svelte/legacy-on#Component-events). + * Event dispatchers are functions that can take two arguments: `name` and `detail`. + * + * Component events created with `createEventDispatcher` create a + * [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent). + * These events do not [bubble](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture). + * The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail) + * property and can contain any type of data. + * + * The event dispatcher can be typed to narrow the allowed event names and the type of the `detail` argument: + * ```ts + * const dispatch = createEventDispatcher<{ + * loaded: null; // does not take a detail argument + * change: string; // takes a detail argument of type string, which is required + * optional: number | null; // takes an optional detail argument of type number + * }>(); + * ``` + * + * @deprecated Use callback props and/or the `$host()` rune instead — see [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Event-changes-Component-events) + * */ + export function createEventDispatcher = any>(): EventDispatcher; + /** + * Schedules a callback to run immediately before the component is updated after any state change. + * + * The first time the callback runs will be before the initial `onMount`. + * + * In runes mode use `$effect.pre` instead. + * + * @deprecated Use [`$effect.pre`](https://svelte.dev/docs/svelte/$effect#$effect.pre) instead + * */ + export function beforeUpdate(fn: () => void): void; + /** + * Schedules a callback to run immediately after the component has been updated. + * + * The first time the callback runs will be after the initial `onMount`. + * + * In runes mode use `$effect` instead. + * + * @deprecated Use [`$effect`](https://svelte.dev/docs/svelte/$effect) instead + * */ + export function afterUpdate(fn: () => void): void; + /** + * Create a snippet programmatically + * */ + export function createRawSnippet(fn: (...params: Getters) => { + render: () => string; + setup?: (element: Element) => void | (() => void); + }): Snippet; + /** Anything except a function */ + type NotFunction = T extends Function ? never : T; + /** + * Synchronously flush any pending updates. + * Returns void if no callback is provided, otherwise returns the result of calling the callback. + * */ + export function flushSync(fn?: (() => T) | undefined): T; + /** + * Returns a promise that resolves once any pending state changes have been applied. + * */ + export function tick(): Promise; + /** + * When used inside a [`$derived`](https://svelte.dev/docs/svelte/$derived) or [`$effect`](https://svelte.dev/docs/svelte/$effect), + * any state read inside `fn` will not be treated as a dependency. + * + * ```ts + * $effect(() => { + * // this will run when `data` changes, but not when `time` changes + * save(data, { + * timestamp: untrack(() => time) + * }); + * }); + * ``` + * */ + export function untrack(fn: () => T): T; + /** + * Retrieves the context that belongs to the closest parent component with the specified `key`. + * Must be called during component initialisation. + * + * */ + export function getContext(key: any): T; + /** + * Associates an arbitrary `context` object with the current component and the specified `key` + * and returns that object. The context is then available to children of the component + * (including slotted content) with `getContext`. + * + * Like lifecycle functions, this must be called during component initialisation. + * + * */ + export function setContext(key: any, context: T): T; + /** + * Checks whether a given `key` has been set in the context of a parent component. + * Must be called during component initialisation. + * + * */ + export function hasContext(key: any): boolean; + /** + * Retrieves the whole context map that belongs to the closest parent component. + * Must be called during component initialisation. Useful, for example, if you + * programmatically create a component and want to pass the existing context to it. + * + * */ + export function getAllContexts = Map>(): T; + /** + * Mounts a component to the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component. + * Transitions will play during the initial render unless the `intro` option is set to `false`. + * + * */ + export function mount, Exports extends Record>(component: ComponentType> | Component, options: MountOptions): Exports; + /** + * Hydrates a component on the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component + * + * */ + export function hydrate, Exports extends Record>(component: ComponentType> | Component, options: {} extends Props ? { + target: Document | Element | ShadowRoot; + props?: Props; + events?: Record any>; + context?: Map; + intro?: boolean; + recover?: boolean; + } : { + target: Document | Element | ShadowRoot; + props: Props; + events?: Record any>; + context?: Map; + intro?: boolean; + recover?: boolean; + }): Exports; + /** + * Unmounts a component that was previously mounted using `mount` or `hydrate`. + * + * Since 5.13.0, if `options.outro` is `true`, [transitions](https://svelte.dev/docs/svelte/transition) will play before the component is removed from the DOM. + * + * Returns a `Promise` that resolves after transitions have completed if `options.outro` is true, or immediately otherwise (prior to 5.13.0, returns `void`). + * + * ```js + * import { mount, unmount } from 'svelte'; + * import App from './App.svelte'; + * + * const app = mount(App, { target: document.body }); + * + * // later... + * unmount(app, { outro: true }); + * ``` + * */ + export function unmount(component: Record, options?: { + outro?: boolean; + } | undefined): Promise; + type Getters = { + [K in keyof T]: () => T[K]; + }; + + export {}; +} + +declare module 'svelte/action' { + /** + * Actions can return an object containing the two properties defined in this interface. Both are optional. + * - update: An action can have a parameter. This method will be called whenever that parameter changes, + * immediately after Svelte has applied updates to the markup. `ActionReturn` and `ActionReturn` both + * mean that the action accepts no parameters. + * - destroy: Method that is called after the element is unmounted + * + * Additionally, you can specify which additional attributes and events the action enables on the applied element. + * This applies to TypeScript typings only and has no effect at runtime. + * + * Example usage: + * ```ts + * interface Attributes { + * newprop?: string; + * 'on:event': (e: CustomEvent) => void; + * } + * + * export function myAction(node: HTMLElement, parameter: Parameter): ActionReturn { + * // ... + * return { + * update: (updatedParameter) => {...}, + * destroy: () => {...} + * }; + * } + * ``` + */ + export interface ActionReturn< + Parameter = undefined, + Attributes extends Record = Record + > { + update?: (parameter: Parameter) => void; + destroy?: () => void; + /** + * ### DO NOT USE THIS + * This exists solely for type-checking and has no effect at runtime. + * Set this through the `Attributes` generic instead. + */ + $$_attributes?: Attributes; + } + + /** + * Actions are functions that are called when an element is created. + * You can use this interface to type such actions. + * The following example defines an action that only works on `
` elements + * and optionally accepts a parameter which it has a default value for: + * ```ts + * export const myAction: Action = (node, param = { someProperty: true }) => { + * // ... + * } + * ``` + * `Action` and `Action` both signal that the action accepts no parameters. + * + * You can return an object with methods `update` and `destroy` from the function and type which additional attributes and events it has. + * See interface `ActionReturn` for more details. + */ + export interface Action< + Element = HTMLElement, + Parameter = undefined, + Attributes extends Record = Record + > { + ( + ...args: undefined extends Parameter + ? [node: Node, parameter?: Parameter] + : [node: Node, parameter: Parameter] + ): void | ActionReturn; + } + + // Implementation notes: + // - undefined extends X instead of X extends undefined makes this work better with both strict and nonstrict mode + + export {}; +} + +declare module 'svelte/animate' { + // todo: same as Transition, should it be shared? + export interface AnimationConfig { + delay?: number; + duration?: number; + easing?: (t: number) => number; + css?: (t: number, u: number) => string; + tick?: (t: number, u: number) => void; + } + + export interface FlipParams { + delay?: number; + duration?: number | ((len: number) => number); + easing?: (t: number) => number; + } + /** + * The flip function calculates the start and end position of an element and animates between them, translating the x and y values. + * `flip` stands for [First, Last, Invert, Play](https://aerotwist.com/blog/flip-your-animations/). + * + * */ + export function flip(node: Element, { from, to }: { + from: DOMRect; + to: DOMRect; + }, params?: FlipParams): AnimationConfig; + + export {}; +} + +declare module 'svelte/compiler' { + import type { SourceMap } from 'magic-string'; + import type { ArrayExpression, ArrowFunctionExpression, VariableDeclaration, VariableDeclarator, Expression, Identifier, MemberExpression, Node, ObjectExpression, Pattern, Program, ChainExpression, SimpleCallExpression, SequenceExpression } from 'estree'; + import type { Location } from 'locate-character'; + /** + * `compile` converts your `.svelte` source code into a JavaScript module that exports a component + * + * @param source The component source code + * @param options The compiler options + * */ + export function compile(source: string, options: CompileOptions): CompileResult; + /** + * `compileModule` takes your JavaScript source code containing runes, and turns it into a JavaScript module. + * + * @param source The component source code + * */ + export function compileModule(source: string, options: ModuleCompileOptions): CompileResult; + /** + * The parse function parses a component, returning only its abstract syntax tree. + * + * The `modern` option (`false` by default in Svelte 5) makes the parser return a modern AST instead of the legacy AST. + * `modern` will become `true` by default in Svelte 6, and the option will be removed in Svelte 7. + * + * */ + export function parse(source: string, options: { + filename?: string; + modern: true; + loose?: boolean; + }): AST.Root; + /** + * The parse function parses a component, returning only its abstract syntax tree. + * + * The `modern` option (`false` by default in Svelte 5) makes the parser return a modern AST instead of the legacy AST. + * `modern` will become `true` by default in Svelte 6, and the option will be removed in Svelte 7. + * + * */ + export function parse(source: string, options?: { + filename?: string; + modern?: false; + loose?: boolean; + } | undefined): Record; + /** + * @deprecated Replace this with `import { walk } from 'estree-walker'` + * */ + export function walk(): never; + /** + * The result of a preprocessor run. If the preprocessor does not return a result, it is assumed that the code is unchanged. + */ + export interface Processed { + /** + * The new code + */ + code: string; + /** + * A source map mapping back to the original code + */ + map?: string | object; // we are opaque with the type here to avoid dependency on the remapping module for our public types. + /** + * A list of additional files to watch for changes + */ + dependencies?: string[]; + /** + * Only for script/style preprocessors: The updated attributes to set on the tag. If undefined, attributes stay unchanged. + */ + attributes?: Record; + toString?: () => string; + } + + /** + * A markup preprocessor that takes a string of code and returns a processed version. + */ + export type MarkupPreprocessor = (options: { + /** + * The whole Svelte file content + */ + content: string; + /** + * The filename of the Svelte file + */ + filename?: string; + }) => Processed | void | Promise; + + /** + * A script/style preprocessor that takes a string of code and returns a processed version. + */ + export type Preprocessor = (options: { + /** + * The script/style tag content + */ + content: string; + /** + * The attributes on the script/style tag + */ + attributes: Record; + /** + * The whole Svelte file content + */ + markup: string; + /** + * The filename of the Svelte file + */ + filename?: string; + }) => Processed | void | Promise; + + /** + * A preprocessor group is a set of preprocessors that are applied to a Svelte file. + */ + export interface PreprocessorGroup { + /** Name of the preprocessor. Will be a required option in the next major version */ + name?: string; + markup?: MarkupPreprocessor; + style?: Preprocessor; + script?: Preprocessor; + } + /** The return value of `compile` from `svelte/compiler` */ + export interface CompileResult { + /** The compiled JavaScript */ + js: { + /** The generated code */ + code: string; + /** A source map */ + map: SourceMap; + }; + /** The compiled CSS */ + css: null | { + /** The generated code */ + code: string; + /** A source map */ + map: SourceMap; + /** Whether or not the CSS includes global rules */ + hasGlobal: boolean; + }; + /** + * An array of warning objects that were generated during compilation. Each warning has several properties: + * - `code` is a string identifying the category of warning + * - `message` describes the issue in human-readable terms + * - `start` and `end`, if the warning relates to a specific location, are objects with `line`, `column` and `character` properties + */ + warnings: Warning[]; + /** + * Metadata about the compiled component + */ + metadata: { + /** + * Whether the file was compiled in runes mode, either because of an explicit option or inferred from usage. + * For `compileModule`, this is always `true` + */ + runes: boolean; + }; + /** The AST */ + ast: any; + } + + export interface Warning extends ICompileDiagnostic {} + + export interface CompileError extends ICompileDiagnostic {} + + type CssHashGetter = (args: { + name: string; + filename: string; + css: string; + hash: (input: string) => string; + }) => string; + + export interface CompileOptions extends ModuleCompileOptions { + /** + * Sets the name of the resulting JavaScript class (though the compiler will rename it if it would otherwise conflict with other variables in scope). + * If unspecified, will be inferred from `filename` + */ + name?: string; + /** + * If `true`, tells the compiler to generate a custom element constructor instead of a regular Svelte component. + * + * @default false + */ + customElement?: boolean; + /** + * If `true`, getters and setters will be created for the component's props. If `false`, they will only be created for readonly exported values (i.e. those declared with `const`, `class` and `function`). If compiling with `customElement: true` this option defaults to `true`. + * + * @default false + * @deprecated This will have no effect in runes mode + */ + accessors?: boolean; + /** + * The namespace of the element; e.g., `"html"`, `"svg"`, `"mathml"`. + * + * @default 'html' + */ + namespace?: Namespace; + /** + * If `true`, tells the compiler that you promise not to mutate any objects. + * This allows it to be less conservative about checking whether values have changed. + * + * @default false + * @deprecated This will have no effect in runes mode + */ + immutable?: boolean; + /** + * - `'injected'`: styles will be included in the `head` when using `render(...)`, and injected into the document (if not already present) when the component mounts. For components compiled as custom elements, styles are injected to the shadow root. + * - `'external'`: the CSS will only be returned in the `css` field of the compilation result. Most Svelte bundler plugins will set this to `'external'` and use the CSS that is statically generated for better performance, as it will result in smaller JavaScript bundles and the output can be served as cacheable `.css` files. + * This is always `'injected'` when compiling with `customElement` mode. + */ + css?: 'injected' | 'external'; + /** + * A function that takes a `{ hash, css, name, filename }` argument and returns the string that is used as a classname for scoped CSS. + * It defaults to returning `svelte-${hash(css)}`. + * + * @default undefined + */ + cssHash?: CssHashGetter; + /** + * If `true`, your HTML comments will be preserved in the output. By default, they are stripped out. + * + * @default false + */ + preserveComments?: boolean; + /** + * If `true`, whitespace inside and between elements is kept as you typed it, rather than removed or collapsed to a single space where possible. + * + * @default false + */ + preserveWhitespace?: boolean; + /** + * Set to `true` to force the compiler into runes mode, even if there are no indications of runes usage. + * Set to `false` to force the compiler into ignoring runes, even if there are indications of runes usage. + * Set to `undefined` (the default) to infer runes mode from the component code. + * Is always `true` for JS/TS modules compiled with Svelte. + * Will be `true` by default in Svelte 6. + * Note that setting this to `true` in your `svelte.config.js` will force runes mode for your entire project, including components in `node_modules`, + * which is likely not what you want. If you're using Vite, consider using [dynamicCompileOptions](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md#dynamiccompileoptions) instead. + * @default undefined + */ + runes?: boolean | undefined; + /** + * If `true`, exposes the Svelte major version in the browser by adding it to a `Set` stored in the global `window.__svelte.v`. + * + * @default true + */ + discloseVersion?: boolean; + /** + * @deprecated Use these only as a temporary solution before migrating your code + */ + compatibility?: { + /** + * Applies a transformation so that the default export of Svelte files can still be instantiated the same way as in Svelte 4 — + * as a class when compiling for the browser (as though using `createClassComponent(MyComponent, {...})` from `svelte/legacy`) + * or as an object with a `.render(...)` method when compiling for the server + * @default 5 + */ + componentApi?: 4 | 5; + }; + /** + * An initial sourcemap that will be merged into the final output sourcemap. + * This is usually the preprocessor sourcemap. + * + * @default null + */ + sourcemap?: object | string; + /** + * Used for your JavaScript sourcemap. + * + * @default null + */ + outputFilename?: string; + /** + * Used for your CSS sourcemap. + * + * @default null + */ + cssOutputFilename?: string; + /** + * If `true`, compiles components with hot reloading support. + * + * @default false + */ + hmr?: boolean; + /** + * If `true`, returns the modern version of the AST. + * Will become `true` by default in Svelte 6, and the option will be removed in Svelte 7. + * + * @default false + */ + modernAst?: boolean; + } + + export interface ModuleCompileOptions { + /** + * If `true`, causes extra code to be added that will perform runtime checks and provide debugging information during development. + * + * @default false + */ + dev?: boolean; + /** + * If `"client"`, Svelte emits code designed to run in the browser. + * If `"server"`, Svelte emits code suitable for server-side rendering. + * If `false`, nothing is generated. Useful for tooling that is only interested in warnings. + * + * @default 'client' + */ + generate?: 'client' | 'server' | false; + /** + * Used for debugging hints and sourcemaps. Your bundler plugin will set it automatically. + */ + filename?: string; + /** + * Used for ensuring filenames don't leak filesystem information. Your bundler plugin will set it automatically. + * @default process.cwd() on node-like environments, undefined elsewhere + */ + rootDir?: string; + /** + * A function that gets a `Warning` as an argument and returns a boolean. + * Use this to filter out warnings. Return `true` to keep the warning, `false` to discard it. + */ + warningFilter?: (warning: Warning) => boolean; + } + /** + * - `html` — the default, for e.g. `
` or `` + * - `svg` — for e.g. `` or `` + * - `mathml` — for e.g. `` or `` + */ + type Namespace = 'html' | 'svg' | 'mathml'; + + export namespace AST { + export interface BaseNode { + type: string; + start: number; + end: number; + } + + export interface Fragment { + type: 'Fragment'; + nodes: Array; + } + + export interface Root extends BaseNode { + type: 'Root'; + /** + * Inline options provided by `` — these override options passed to `compile(...)` + */ + options: SvelteOptions | null; + fragment: Fragment; + /** The parsed `(fn: () => U, options?: SpringOpts): Spring; + + /** + * Sets `spring.target` to `value` and returns a `Promise` that resolves if and when `spring.current` catches up to it. + * + * If `options.instant` is `true`, `spring.current` immediately matches `spring.target`. + * + * If `options.preserveMomentum` is provided, the spring will continue on its current trajectory for + * the specified number of milliseconds. This is useful for things like 'fling' gestures. + */ + set(value: T, options?: SpringUpdateOpts): Promise; + + damping: number; + precision: number; + stiffness: number; + /** + * The end value of the spring. + * This property only exists on the `Spring` class, not the legacy `spring` store. + */ + target: T; + /** + * The current value of the spring. + * This property only exists on the `Spring` class, not the legacy `spring` store. + */ + get current(): T; + } + + export interface Tweened extends Readable { + set(value: T, opts?: TweenedOptions): Promise; + update(updater: Updater, opts?: TweenedOptions): Promise; + } + /** Callback to inform of a value updates. */ + type Subscriber = (value: T) => void; + + /** Unsubscribes from value updates. */ + type Unsubscriber = () => void; + + /** Readable interface for subscribing. */ + interface Readable { + /** + * Subscribe on value changes. + * @param run subscription callback + * @param invalidate cleanup callback + */ + subscribe(this: void, run: Subscriber, invalidate?: () => void): Unsubscriber; + } + interface SpringOpts { + stiffness?: number; + damping?: number; + precision?: number; + } + + interface SpringUpdateOpts { + /** + * @deprecated Only use this for the spring store; does nothing when set on the Spring class + */ + hard?: any; + /** + * @deprecated Only use this for the spring store; does nothing when set on the Spring class + */ + soft?: string | number | boolean; + /** + * Only use this for the Spring class; does nothing when set on the spring store + */ + instant?: boolean; + /** + * Only use this for the Spring class; does nothing when set on the spring store + */ + preserveMomentum?: number; + } + + type Updater = (target_value: T, value: T) => T; + + interface TweenedOptions { + delay?: number; + duration?: number | ((from: T, to: T) => number); + easing?: (t: number) => number; + interpolate?: (a: T, b: T) => (t: number) => T; + } + /** + * A [media query](https://svelte.dev/docs/svelte/svelte-reactivity#MediaQuery) that matches if the user [prefers reduced motion](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion). + * + * ```svelte + * + * + * + * + * {#if visible} + *

+ * flies in, unless the user prefers reduced motion + *

+ * {/if} + * ``` + * @since 5.7.0 + */ + export const prefersReducedMotion: MediaQuery; + /** + * The spring function in Svelte creates a store whose value is animated, with a motion that simulates the behavior of a spring. This means when the value changes, instead of transitioning at a steady rate, it "bounces" like a spring would, depending on the physics parameters provided. This adds a level of realism to the transitions and can enhance the user experience. + * + * @deprecated Use [`Spring`](https://svelte.dev/docs/svelte/svelte-motion#Spring) instead + * */ + export function spring(value?: T | undefined, opts?: SpringOpts | undefined): Spring; + /** + * A tweened store in Svelte is a special type of store that provides smooth transitions between state values over time. + * + * @deprecated Use [`Tween`](https://svelte.dev/docs/svelte/svelte-motion#Tween) instead + * */ + export function tweened(value?: T | undefined, defaults?: TweenedOptions | undefined): Tweened; + /** + * A wrapper for a value that tweens smoothly to its target value. Changes to `tween.target` will cause `tween.current` to + * move towards it over time, taking account of the `delay`, `duration` and `easing` options. + * + * ```svelte + * + * + * + * + * ``` + * @since 5.8.0 + */ + export class Tween { + /** + * Create a tween whose value is bound to the return value of `fn`. This must be called + * inside an effect root (for example, during component initialisation). + * + * ```svelte + * + * ``` + * + */ + static of(fn: () => U, options?: TweenedOptions | undefined): Tween; + + constructor(value: T, options?: TweenedOptions); + /** + * Sets `tween.target` to `value` and returns a `Promise` that resolves if and when `tween.current` catches up to it. + * + * If `options` are provided, they will override the tween's defaults. + * */ + set(value: T, options?: TweenedOptions | undefined): Promise; + get current(): T; + set target(v: T); + get target(): T; + #private; + } + + export {}; +} + +declare module 'svelte/reactivity' { + /** + * A reactive version of the built-in [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) object. + * Reading the date (whether with methods like `date.getTime()` or `date.toString()`, or via things like [`Intl.DateTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat)) + * in an [effect](https://svelte.dev/docs/svelte/$effect) or [derived](https://svelte.dev/docs/svelte/$derived) + * will cause it to be re-evaluated when the value of the date changes. + * + * ```svelte + * + * + *

The time is {formatter.format(date)}

+ * ``` + */ + export class SvelteDate extends Date { + + constructor(...params: any[]); + #private; + } + /** + * A reactive version of the built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) object. + * Reading contents of the set (by iterating, or by reading `set.size` or calling `set.has(...)` as in the [example](https://svelte.dev/playground/53438b51194b4882bcc18cddf9f96f15) below) in an [effect](https://svelte.dev/docs/svelte/$effect) or [derived](https://svelte.dev/docs/svelte/$derived) + * will cause it to be re-evaluated as necessary when the set is updated. + * + * Note that values in a reactive set are _not_ made [deeply reactive](https://svelte.dev/docs/svelte/$state#Deep-state). + * + * ```svelte + * + * + * {#each ['🙈', '🙉', '🙊'] as monkey} + * + * {/each} + * + * + * + * {#if monkeys.has('🙈')}

see no evil

{/if} + * {#if monkeys.has('🙉')}

hear no evil

{/if} + * {#if monkeys.has('🙊')}

speak no evil

{/if} + * ``` + * + * + */ + export class SvelteSet extends Set { + + constructor(value?: Iterable | null | undefined); + + add(value: T): this; + #private; + } + /** + * A reactive version of the built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) object. + * Reading contents of the map (by iterating, or by reading `map.size` or calling `map.get(...)` or `map.has(...)` as in the [tic-tac-toe example](https://svelte.dev/playground/0b0ff4aa49c9443f9b47fe5203c78293) below) in an [effect](https://svelte.dev/docs/svelte/$effect) or [derived](https://svelte.dev/docs/svelte/$derived) + * will cause it to be re-evaluated as necessary when the map is updated. + * + * Note that values in a reactive map are _not_ made [deeply reactive](https://svelte.dev/docs/svelte/$state#Deep-state). + * + * ```svelte + * + * + *
+ * {#each Array(9), i} + * + * {/each} + *
+ * + * {#if winner} + *

{winner} wins!

+ * + * {:else} + *

{player} is next

+ * {/if} + * ``` + * + * + */ + export class SvelteMap extends Map { + + constructor(value?: Iterable | null | undefined); + + set(key: K, value: V): this; + #private; + } + /** + * A reactive version of the built-in [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) object. + * Reading properties of the URL (such as `url.href` or `url.pathname`) in an [effect](https://svelte.dev/docs/svelte/$effect) or [derived](https://svelte.dev/docs/svelte/$derived) + * will cause it to be re-evaluated as necessary when the URL changes. + * + * The `searchParams` property is an instance of [SvelteURLSearchParams](https://svelte.dev/docs/svelte/svelte-reactivity#SvelteURLSearchParams). + * + * [Example](https://svelte.dev/playground/5a694758901b448c83dc40dc31c71f2a): + * + * ```svelte + * + * + * + * + * + * + * + *
+ * + * + * + * ``` + */ + export class SvelteURL extends URL { + get searchParams(): SvelteURLSearchParams; + #private; + } + const REPLACE: unique symbol; + /** + * A reactive version of the built-in [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) object. + * Reading its contents (by iterating, or by calling `params.get(...)` or `params.getAll(...)` as in the [example](https://svelte.dev/playground/b3926c86c5384bab9f2cf993bc08c1c8) below) in an [effect](https://svelte.dev/docs/svelte/$effect) or [derived](https://svelte.dev/docs/svelte/$derived) + * will cause it to be re-evaluated as necessary when the params are updated. + * + * ```svelte + * + * + * + * + * + * + *

?{params.toString()}

+ * + * {#each params as [key, value]} + *

{key}: {value}

+ * {/each} + * ``` + */ + export class SvelteURLSearchParams extends URLSearchParams { + + [REPLACE](params: URLSearchParams): void; + #private; + } + /** + * Creates a media query and provides a `current` property that reflects whether or not it matches. + * + * Use it carefully — during server-side rendering, there is no way to know what the correct value should be, potentially causing content to change upon hydration. + * If you can use the media query in CSS to achieve the same effect, do that. + * + * ```svelte + * + * + *

{large.current ? 'large screen' : 'small screen'}

+ * ``` + * @extends {ReactiveValue} + * @since 5.7.0 + */ + export class MediaQuery extends ReactiveValue { + /** + * @param query A media query string + * @param fallback Fallback value for the server + */ + constructor(query: string, fallback?: boolean | undefined); + } + /** + * Returns a `subscribe` function that, if called in an effect (including expressions in the template), + * calls its `start` callback with an `update` function. Whenever `update` is called, the effect re-runs. + * + * If `start` returns a function, it will be called when the effect is destroyed. + * + * If `subscribe` is called in multiple effects, `start` will only be called once as long as the effects + * are active, and the returned teardown function will only be called when all effects are destroyed. + * + * It's best understood with an example. Here's an implementation of [`MediaQuery`](https://svelte.dev/docs/svelte/svelte-reactivity#MediaQuery): + * + * ```js + * import { createSubscriber } from 'svelte/reactivity'; + * import { on } from 'svelte/events'; + * + * export class MediaQuery { + * #query; + * #subscribe; + * + * constructor(query) { + * this.#query = window.matchMedia(`(${query})`); + * + * this.#subscribe = createSubscriber((update) => { + * // when the `change` event occurs, re-run any effects that read `this.current` + * const off = on(this.#query, 'change', update); + * + * // stop listening when all the effects are destroyed + * return () => off(); + * }); + * } + * + * get current() { + * this.#subscribe(); + * + * // Return the current state of the query, whether or not we're in an effect + * return this.#query.matches; + * } + * } + * ``` + * @since 5.7.0 + */ + export function createSubscriber(start: (update: () => void) => (() => void) | void): () => void; + class ReactiveValue { + + constructor(fn: () => T, onsubscribe: (update: () => void) => void); + get current(): T; + #private; + } + + export {}; +} + +declare module 'svelte/reactivity/window' { + /** + * `scrollX.current` is a reactive view of `window.scrollX`. On the server it is `undefined`. + * @since 5.11.0 + */ + export const scrollX: ReactiveValue; + /** + * `scrollY.current` is a reactive view of `window.scrollY`. On the server it is `undefined`. + * @since 5.11.0 + */ + export const scrollY: ReactiveValue; + /** + * `innerWidth.current` is a reactive view of `window.innerWidth`. On the server it is `undefined`. + * @since 5.11.0 + */ + export const innerWidth: ReactiveValue; + /** + * `innerHeight.current` is a reactive view of `window.innerHeight`. On the server it is `undefined`. + * @since 5.11.0 + */ + export const innerHeight: ReactiveValue; + /** + * `outerWidth.current` is a reactive view of `window.outerWidth`. On the server it is `undefined`. + * @since 5.11.0 + */ + export const outerWidth: ReactiveValue; + /** + * `outerHeight.current` is a reactive view of `window.outerHeight`. On the server it is `undefined`. + * @since 5.11.0 + */ + export const outerHeight: ReactiveValue; + /** + * `screenLeft.current` is a reactive view of `window.screenLeft`. It is updated inside a `requestAnimationFrame` callback. On the server it is `undefined`. + * @since 5.11.0 + */ + export const screenLeft: ReactiveValue; + /** + * `screenTop.current` is a reactive view of `window.screenTop`. It is updated inside a `requestAnimationFrame` callback. On the server it is `undefined`. + * @since 5.11.0 + */ + export const screenTop: ReactiveValue; + /** + * `online.current` is a reactive view of `navigator.onLine`. On the server it is `undefined`. + * @since 5.11.0 + */ + export const online: ReactiveValue; + /** + * `devicePixelRatio.current` is a reactive view of `window.devicePixelRatio`. On the server it is `undefined`. + * Note that behaviour differs between browsers — on Chrome it will respond to the current zoom level, + * on Firefox and Safari it won't. + * @since 5.11.0 + */ + export const devicePixelRatio: { + get current(): number | undefined; + }; + class ReactiveValue { + + constructor(fn: () => T, onsubscribe: (update: () => void) => void); + get current(): T; + #private; + } + + export {}; +} + +declare module 'svelte/server' { + import type { ComponentProps, Component, SvelteComponent, ComponentType } from 'svelte'; + /** + * Only available on the server and when compiling with the `server` option. + * Takes a component and returns an object with `body` and `head` properties on it, which you can use to populate the HTML when server-rendering your app. + */ + export function render< + Comp extends SvelteComponent | Component, + Props extends ComponentProps = ComponentProps + >( + ...args: {} extends Props + ? [ + component: Comp extends SvelteComponent ? ComponentType : Comp, + options?: { + props?: Omit; + context?: Map; + idPrefix?: string; + } + ] + : [ + component: Comp extends SvelteComponent ? ComponentType : Comp, + options: { + props: Omit; + context?: Map; + idPrefix?: string; + } + ] + ): RenderOutput; + interface RenderOutput { + /** HTML that goes into the `` */ + head: string; + /** @deprecated use `body` instead */ + html: string; + /** HTML that goes somewhere into the `` */ + body: string; + } + + export {}; +} + +declare module 'svelte/store' { + /** Callback to inform of a value updates. */ + export type Subscriber = (value: T) => void; + + /** Unsubscribes from value updates. */ + export type Unsubscriber = () => void; + + /** Callback to update a value. */ + export type Updater = (value: T) => T; + + /** + * Start and stop notification callbacks. + * This function is called when the first subscriber subscribes. + * + * @param set Function that sets the value of the store. + * @param update Function that sets the value of the store after passing the current value to the update function. + * @returns Optionally, a cleanup function that is called when the last remaining + * subscriber unsubscribes. + */ + export type StartStopNotifier = ( + set: (value: T) => void, + update: (fn: Updater) => void + ) => void | (() => void); + + /** Readable interface for subscribing. */ + export interface Readable { + /** + * Subscribe on value changes. + * @param run subscription callback + * @param invalidate cleanup callback + */ + subscribe(this: void, run: Subscriber, invalidate?: () => void): Unsubscriber; + } + + /** Writable interface for both updating and subscribing. */ + export interface Writable extends Readable { + /** + * Set value and inform subscribers. + * @param value to set + */ + set(this: void, value: T): void; + + /** + * Update value using callback and inform subscribers. + * @param updater callback + */ + update(this: void, updater: Updater): void; + } + export function toStore(get: () => V, set: (v: V) => void): Writable; + + export function toStore(get: () => V): Readable; + + export function fromStore(store: Writable): { + current: V; + }; + + export function fromStore(store: Readable): { + readonly current: V; + }; + /** + * Creates a `Readable` store that allows reading by subscription. + * + * @param value initial value + * */ + export function readable(value?: T | undefined, start?: StartStopNotifier | undefined): Readable; + /** + * Create a `Writable` store that allows both updating and reading by subscription. + * + * @param value initial value + * */ + export function writable(value?: T | undefined, start?: StartStopNotifier | undefined): Writable; + /** + * Derived value store by synchronizing one or more readable stores and + * applying an aggregation function over its input values. + * + * */ + export function derived(stores: S, fn: (values: StoresValues, set: (value: T) => void, update: (fn: Updater) => void) => Unsubscriber | void, initial_value?: T | undefined): Readable; + /** + * Derived value store by synchronizing one or more readable stores and + * applying an aggregation function over its input values. + * + * */ + export function derived(stores: S, fn: (values: StoresValues) => T, initial_value?: T | undefined): Readable; + /** + * Takes a store and returns a new one derived from the old one that is readable. + * + * @param store - store to make readonly + * */ + export function readonly(store: Readable): Readable; + /** + * Get the current value from a store by subscribing and immediately unsubscribing. + * + * */ + export function get(store: Readable): T; + /** One or more `Readable`s. */ + type Stores = Readable | [Readable, ...Array>] | Array>; + + /** One or more values from `Readable` stores. */ + type StoresValues = + T extends Readable ? U : { [K in keyof T]: T[K] extends Readable ? U : never }; + + export {}; +} + +declare module 'svelte/transition' { + export type EasingFunction = (t: number) => number; + + export interface TransitionConfig { + delay?: number; + duration?: number; + easing?: EasingFunction; + css?: (t: number, u: number) => string; + tick?: (t: number, u: number) => void; + } + + export interface BlurParams { + delay?: number; + duration?: number; + easing?: EasingFunction; + amount?: number | string; + opacity?: number; + } + + export interface FadeParams { + delay?: number; + duration?: number; + easing?: EasingFunction; + } + + export interface FlyParams { + delay?: number; + duration?: number; + easing?: EasingFunction; + x?: number | string; + y?: number | string; + opacity?: number; + } + + export interface SlideParams { + delay?: number; + duration?: number; + easing?: EasingFunction; + axis?: 'x' | 'y'; + } + + export interface ScaleParams { + delay?: number; + duration?: number; + easing?: EasingFunction; + start?: number; + opacity?: number; + } + + export interface DrawParams { + delay?: number; + speed?: number; + duration?: number | ((len: number) => number); + easing?: EasingFunction; + } + + export interface CrossfadeParams { + delay?: number; + duration?: number | ((len: number) => number); + easing?: EasingFunction; + } + /** + * Animates a `blur` filter alongside an element's opacity. + * + * */ + export function blur(node: Element, { delay, duration, easing, amount, opacity }?: BlurParams | undefined): TransitionConfig; + /** + * Animates the opacity of an element from 0 to the current opacity for `in` transitions and from the current opacity to 0 for `out` transitions. + * + * */ + export function fade(node: Element, { delay, duration, easing }?: FadeParams | undefined): TransitionConfig; + /** + * Animates the x and y positions and the opacity of an element. `in` transitions animate from the provided values, passed as parameters to the element's default values. `out` transitions animate from the element's default values to the provided values. + * + * */ + export function fly(node: Element, { delay, duration, easing, x, y, opacity }?: FlyParams | undefined): TransitionConfig; + /** + * Slides an element in and out. + * + * */ + export function slide(node: Element, { delay, duration, easing, axis }?: SlideParams | undefined): TransitionConfig; + /** + * Animates the opacity and scale of an element. `in` transitions animate from the provided values, passed as parameters, to an element's current (default) values. `out` transitions animate from an element's default values to the provided values. + * + * */ + export function scale(node: Element, { delay, duration, easing, start, opacity }?: ScaleParams | undefined): TransitionConfig; + /** + * Animates the stroke of an SVG element, like a snake in a tube. `in` transitions begin with the path invisible and draw the path to the screen over time. `out` transitions start in a visible state and gradually erase the path. `draw` only works with elements that have a `getTotalLength` method, like `` and ``. + * + * */ + export function draw(node: SVGElement & { + getTotalLength(): number; + }, { delay, speed, duration, easing }?: DrawParams | undefined): TransitionConfig; + /** + * The `crossfade` function creates a pair of [transitions](https://svelte.dev/docs/svelte/transition) called `send` and `receive`. When an element is 'sent', it looks for a corresponding element being 'received', and generates a transition that transforms the element to its counterpart's position and fades it out. When an element is 'received', the reverse happens. If there is no counterpart, the `fallback` transition is used. + * + * */ + export function crossfade({ fallback, ...defaults }: CrossfadeParams & { + fallback?: (node: Element, params: CrossfadeParams, intro: boolean) => TransitionConfig; + }): [(node: any, params: CrossfadeParams & { + key: any; + }) => () => TransitionConfig, (node: any, params: CrossfadeParams & { + key: any; + }) => () => TransitionConfig]; + + export {}; +} + +declare module 'svelte/events' { + // Once https://github.com/microsoft/TypeScript/issues/59980 is fixed we can put these overloads into the JSDoc comments of the `on` function + + /** + * Attaches an event handler to the window and returns a function that removes the handler. Using this + * rather than `addEventListener` will preserve the correct order relative to handlers added declaratively + * (with attributes like `onclick`), which use event delegation for performance reasons + */ + export function on( + window: Window, + type: Type, + handler: (this: Window, event: WindowEventMap[Type]) => any, + options?: AddEventListenerOptions | undefined + ): () => void; + /** + * Attaches an event handler to the document and returns a function that removes the handler. Using this + * rather than `addEventListener` will preserve the correct order relative to handlers added declaratively + * (with attributes like `onclick`), which use event delegation for performance reasons + */ + export function on( + document: Document, + type: Type, + handler: (this: Document, event: DocumentEventMap[Type]) => any, + options?: AddEventListenerOptions | undefined + ): () => void; + /** + * Attaches an event handler to an element and returns a function that removes the handler. Using this + * rather than `addEventListener` will preserve the correct order relative to handlers added declaratively + * (with attributes like `onclick`), which use event delegation for performance reasons + */ + export function on( + element: Element, + type: Type, + handler: (this: Element, event: HTMLElementEventMap[Type]) => any, + options?: AddEventListenerOptions | undefined + ): () => void; + /** + * Attaches an event handler to an element and returns a function that removes the handler. Using this + * rather than `addEventListener` will preserve the correct order relative to handlers added declaratively + * (with attributes like `onclick`), which use event delegation for performance reasons + */ + export function on( + element: Element, + type: Type, + handler: (this: Element, event: MediaQueryListEventMap[Type]) => any, + options?: AddEventListenerOptions | undefined + ): () => void; + /** + * Attaches an event handler to an element and returns a function that removes the handler. Using this + * rather than `addEventListener` will preserve the correct order relative to handlers added declaratively + * (with attributes like `onclick`), which use event delegation for performance reasons + */ + export function on( + element: EventTarget, + type: string, + handler: EventListener, + options?: AddEventListenerOptions | undefined + ): () => void; + + export {}; +} + +declare module 'svelte/types/compiler/preprocess' { + /** @deprecated import this from 'svelte/preprocess' instead */ + export type MarkupPreprocessor = MarkupPreprocessor_1; + /** @deprecated import this from 'svelte/preprocess' instead */ + export type Preprocessor = Preprocessor_1; + /** @deprecated import this from 'svelte/preprocess' instead */ + export type PreprocessorGroup = PreprocessorGroup_1; + /** @deprecated import this from 'svelte/preprocess' instead */ + export type Processed = Processed_1; + /** @deprecated import this from 'svelte/preprocess' instead */ + export type SveltePreprocessor = SveltePreprocessor_1< + PreprocessorType, + Options + >; + /** + * The result of a preprocessor run. If the preprocessor does not return a result, it is assumed that the code is unchanged. + */ + interface Processed_1 { + /** + * The new code + */ + code: string; + /** + * A source map mapping back to the original code + */ + map?: string | object; // we are opaque with the type here to avoid dependency on the remapping module for our public types. + /** + * A list of additional files to watch for changes + */ + dependencies?: string[]; + /** + * Only for script/style preprocessors: The updated attributes to set on the tag. If undefined, attributes stay unchanged. + */ + attributes?: Record; + toString?: () => string; + } + + /** + * A markup preprocessor that takes a string of code and returns a processed version. + */ + type MarkupPreprocessor_1 = (options: { + /** + * The whole Svelte file content + */ + content: string; + /** + * The filename of the Svelte file + */ + filename?: string; + }) => Processed_1 | void | Promise; + + /** + * A script/style preprocessor that takes a string of code and returns a processed version. + */ + type Preprocessor_1 = (options: { + /** + * The script/style tag content + */ + content: string; + /** + * The attributes on the script/style tag + */ + attributes: Record; + /** + * The whole Svelte file content + */ + markup: string; + /** + * The filename of the Svelte file + */ + filename?: string; + }) => Processed_1 | void | Promise; + + /** + * A preprocessor group is a set of preprocessors that are applied to a Svelte file. + */ + interface PreprocessorGroup_1 { + /** Name of the preprocessor. Will be a required option in the next major version */ + name?: string; + markup?: MarkupPreprocessor_1; + style?: Preprocessor_1; + script?: Preprocessor_1; + } + + /** + * @description Utility type to extract the type of a preprocessor from a preprocessor group + * @deprecated Create this utility type yourself instead + */ + interface SveltePreprocessor_1< + PreprocessorType extends keyof PreprocessorGroup_1, + Options = any + > { + (options?: Options): Required>; + } + + export {}; +} + +declare module 'svelte/types/compiler/interfaces' { + import type { Location } from 'locate-character'; + /** @deprecated import this from 'svelte' instead */ + export type CompileOptions = CompileOptions_1; + /** @deprecated import this from 'svelte' instead */ + export type Warning = Warning_1; + interface Warning_1 extends ICompileDiagnostic {} + + type CssHashGetter = (args: { + name: string; + filename: string; + css: string; + hash: (input: string) => string; + }) => string; + + interface CompileOptions_1 extends ModuleCompileOptions { + /** + * Sets the name of the resulting JavaScript class (though the compiler will rename it if it would otherwise conflict with other variables in scope). + * If unspecified, will be inferred from `filename` + */ + name?: string; + /** + * If `true`, tells the compiler to generate a custom element constructor instead of a regular Svelte component. + * + * @default false + */ + customElement?: boolean; + /** + * If `true`, getters and setters will be created for the component's props. If `false`, they will only be created for readonly exported values (i.e. those declared with `const`, `class` and `function`). If compiling with `customElement: true` this option defaults to `true`. + * + * @default false + * @deprecated This will have no effect in runes mode + */ + accessors?: boolean; + /** + * The namespace of the element; e.g., `"html"`, `"svg"`, `"mathml"`. + * + * @default 'html' + */ + namespace?: Namespace; + /** + * If `true`, tells the compiler that you promise not to mutate any objects. + * This allows it to be less conservative about checking whether values have changed. + * + * @default false + * @deprecated This will have no effect in runes mode + */ + immutable?: boolean; + /** + * - `'injected'`: styles will be included in the `head` when using `render(...)`, and injected into the document (if not already present) when the component mounts. For components compiled as custom elements, styles are injected to the shadow root. + * - `'external'`: the CSS will only be returned in the `css` field of the compilation result. Most Svelte bundler plugins will set this to `'external'` and use the CSS that is statically generated for better performance, as it will result in smaller JavaScript bundles and the output can be served as cacheable `.css` files. + * This is always `'injected'` when compiling with `customElement` mode. + */ + css?: 'injected' | 'external'; + /** + * A function that takes a `{ hash, css, name, filename }` argument and returns the string that is used as a classname for scoped CSS. + * It defaults to returning `svelte-${hash(css)}`. + * + * @default undefined + */ + cssHash?: CssHashGetter; + /** + * If `true`, your HTML comments will be preserved in the output. By default, they are stripped out. + * + * @default false + */ + preserveComments?: boolean; + /** + * If `true`, whitespace inside and between elements is kept as you typed it, rather than removed or collapsed to a single space where possible. + * + * @default false + */ + preserveWhitespace?: boolean; + /** + * Set to `true` to force the compiler into runes mode, even if there are no indications of runes usage. + * Set to `false` to force the compiler into ignoring runes, even if there are indications of runes usage. + * Set to `undefined` (the default) to infer runes mode from the component code. + * Is always `true` for JS/TS modules compiled with Svelte. + * Will be `true` by default in Svelte 6. + * Note that setting this to `true` in your `svelte.config.js` will force runes mode for your entire project, including components in `node_modules`, + * which is likely not what you want. If you're using Vite, consider using [dynamicCompileOptions](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md#dynamiccompileoptions) instead. + * @default undefined + */ + runes?: boolean | undefined; + /** + * If `true`, exposes the Svelte major version in the browser by adding it to a `Set` stored in the global `window.__svelte.v`. + * + * @default true + */ + discloseVersion?: boolean; + /** + * @deprecated Use these only as a temporary solution before migrating your code + */ + compatibility?: { + /** + * Applies a transformation so that the default export of Svelte files can still be instantiated the same way as in Svelte 4 — + * as a class when compiling for the browser (as though using `createClassComponent(MyComponent, {...})` from `svelte/legacy`) + * or as an object with a `.render(...)` method when compiling for the server + * @default 5 + */ + componentApi?: 4 | 5; + }; + /** + * An initial sourcemap that will be merged into the final output sourcemap. + * This is usually the preprocessor sourcemap. + * + * @default null + */ + sourcemap?: object | string; + /** + * Used for your JavaScript sourcemap. + * + * @default null + */ + outputFilename?: string; + /** + * Used for your CSS sourcemap. + * + * @default null + */ + cssOutputFilename?: string; + /** + * If `true`, compiles components with hot reloading support. + * + * @default false + */ + hmr?: boolean; + /** + * If `true`, returns the modern version of the AST. + * Will become `true` by default in Svelte 6, and the option will be removed in Svelte 7. + * + * @default false + */ + modernAst?: boolean; + } + + interface ModuleCompileOptions { + /** + * If `true`, causes extra code to be added that will perform runtime checks and provide debugging information during development. + * + * @default false + */ + dev?: boolean; + /** + * If `"client"`, Svelte emits code designed to run in the browser. + * If `"server"`, Svelte emits code suitable for server-side rendering. + * If `false`, nothing is generated. Useful for tooling that is only interested in warnings. + * + * @default 'client' + */ + generate?: 'client' | 'server' | false; + /** + * Used for debugging hints and sourcemaps. Your bundler plugin will set it automatically. + */ + filename?: string; + /** + * Used for ensuring filenames don't leak filesystem information. Your bundler plugin will set it automatically. + * @default process.cwd() on node-like environments, undefined elsewhere + */ + rootDir?: string; + /** + * A function that gets a `Warning` as an argument and returns a boolean. + * Use this to filter out warnings. Return `true` to keep the warning, `false` to discard it. + */ + warningFilter?: (warning: Warning_1) => boolean; + } + /** + * - `html` — the default, for e.g. `
` or `` + * - `svg` — for e.g. `` or `` + * - `mathml` — for e.g. `` or `` + */ + type Namespace = 'html' | 'svg' | 'mathml'; + type ICompileDiagnostic = { + code: string; + message: string; + stack?: string; + filename?: string; + start?: Location; + end?: Location; + position?: [number, number]; + frame?: string; + }; + + export {}; +}declare module '*.svelte' { + // use prettier-ignore for a while because of https://github.com/sveltejs/language-tools/commit/026111228b5814a9109cc4d779d37fb02955fb8b + // prettier-ignore + import { SvelteComponent } from 'svelte' + import { LegacyComponentType } from 'svelte/legacy'; + const Comp: LegacyComponentType; + type Comp = SvelteComponent; + export default Comp; +} + +/** + * Declares reactive state. + * + * Example: + * ```ts + * let count = $state(0); + * ``` + * + * https://svelte.dev/docs/svelte/$state + * + * @param initial The initial value + */ +declare function $state(initial: T): T; +declare function $state(): T | undefined; + +declare namespace $state { + type Primitive = string | number | boolean | null | undefined; + + type TypedArray = + | Int8Array + | Uint8Array + | Uint8ClampedArray + | Int16Array + | Uint16Array + | Int32Array + | Uint32Array + | Float32Array + | Float64Array + | BigInt64Array + | BigUint64Array; + + /** The things that `structuredClone` can handle — https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm */ + export type Cloneable = + | ArrayBuffer + | DataView + | Date + | Error + | Map + | RegExp + | Set + | TypedArray + // web APIs + | Blob + | CryptoKey + | DOMException + | DOMMatrix + | DOMMatrixReadOnly + | DOMPoint + | DOMPointReadOnly + | DOMQuad + | DOMRect + | DOMRectReadOnly + | File + | FileList + | FileSystemDirectoryHandle + | FileSystemFileHandle + | FileSystemHandle + | ImageBitmap + | ImageData + | RTCCertificate + | VideoFrame; + + /** Turn `SvelteDate`, `SvelteMap` and `SvelteSet` into their non-reactive counterparts. (`URL` is uncloneable.) */ + type NonReactive = T extends Date + ? Date + : T extends Map + ? Map + : T extends Set + ? Set + : T; + + type Snapshot = T extends Primitive + ? T + : T extends Cloneable + ? NonReactive + : T extends { toJSON(): infer R } + ? R + : T extends Array + ? Array> + : T extends object + ? T extends { [key: string]: any } + ? { [K in keyof T]: Snapshot } + : never + : never; + + /** + * Declares state that is _not_ made deeply reactive — instead of mutating it, + * you must reassign it. + * + * Example: + * ```ts + * + * + * + * ``` + * + * https://svelte.dev/docs/svelte/$state#$state.raw + * + * @param initial The initial value + */ + export function raw(initial: T): T; + export function raw(): T | undefined; + /** + * To take a static snapshot of a deeply reactive `$state` proxy, use `$state.snapshot`: + * + * Example: + * ```ts + * + * ``` + * + * https://svelte.dev/docs/svelte/$state#$state.snapshot + * + * @param state The value to snapshot + */ + export function snapshot(state: T): Snapshot; + + // prevent intellisense from being unhelpful + /** @deprecated */ + export const apply: never; + /** @deprecated */ + // @ts-ignore + export const arguments: never; + /** @deprecated */ + export const bind: never; + /** @deprecated */ + export const call: never; + /** @deprecated */ + export const caller: never; + /** @deprecated */ + export const length: never; + /** @deprecated */ + export const name: never; + /** @deprecated */ + export const prototype: never; + /** @deprecated */ + export const toString: never; +} + +/** + * Declares derived state, i.e. one that depends on other state variables. + * The expression inside `$derived(...)` should be free of side-effects. + * + * Example: + * ```ts + * let double = $derived(count * 2); + * ``` + * + * https://svelte.dev/docs/svelte/$derived + * + * @param expression The derived state expression + */ +declare function $derived(expression: T): T; + +declare namespace $derived { + /** + * Sometimes you need to create complex derivations that don't fit inside a short expression. + * In these cases, you can use `$derived.by` which accepts a function as its argument. + * + * Example: + * ```ts + * let total = $derived.by(() => { + * let result = 0; + * for (const n of numbers) { + * result += n; + * } + * return result; + * }); + * ``` + * + * https://svelte.dev/docs/svelte/$derived#$derived.by + */ + export function by(fn: () => T): T; + + // prevent intellisense from being unhelpful + /** @deprecated */ + export const apply: never; + /** @deprecated */ + // @ts-ignore + export const arguments: never; + /** @deprecated */ + export const bind: never; + /** @deprecated */ + export const call: never; + /** @deprecated */ + export const caller: never; + /** @deprecated */ + export const length: never; + /** @deprecated */ + export const name: never; + /** @deprecated */ + export const prototype: never; + /** @deprecated */ + export const toString: never; +} + +/** + * Runs code when a component is mounted to the DOM, and then whenever its dependencies change, i.e. `$state` or `$derived` values. + * The timing of the execution is after the DOM has been updated. + * + * Example: + * ```ts + * $effect(() => console.log('The count is now ' + count)); + * ``` + * + * If you return a function from the effect, it will be called right before the effect is run again, or when the component is unmounted. + * + * Does not run during server side rendering. + * + * https://svelte.dev/docs/svelte/$effect + * @param fn The function to execute + */ +declare function $effect(fn: () => void | (() => void)): void; + +declare namespace $effect { + /** + * Runs code right before a component is mounted to the DOM, and then whenever its dependencies change, i.e. `$state` or `$derived` values. + * The timing of the execution is right before the DOM is updated. + * + * Example: + * ```ts + * $effect.pre(() => console.log('The count is now ' + count)); + * ``` + * + * If you return a function from the effect, it will be called right before the effect is run again, or when the component is unmounted. + * + * Does not run during server side rendering. + * + * https://svelte.dev/docs/svelte/$effect#$effect.pre + * @param fn The function to execute + */ + export function pre(fn: () => void | (() => void)): void; + + /** + * The `$effect.tracking` rune is an advanced feature that tells you whether or not the code is running inside a tracking context, such as an effect or inside your template. + * + * Example: + * ```svelte + * + * + *

in template: {$effect.tracking()}

+ * ``` + * + * This allows you to (for example) add things like subscriptions without causing memory leaks, by putting them in child effects. + * + * https://svelte.dev/docs/svelte/$effect#$effect.tracking + */ + export function tracking(): boolean; + + /** + * The `$effect.root` rune is an advanced feature that creates a non-tracked scope that doesn't auto-cleanup. This is useful for + * nested effects that you want to manually control. This rune also allows for creation of effects outside of the component + * initialisation phase. + * + * Example: + * ```svelte + * + * + * + * ``` + * + * https://svelte.dev/docs/svelte/$effect#$effect.root + */ + export function root(fn: () => void | (() => void)): () => void; + + // prevent intellisense from being unhelpful + /** @deprecated */ + export const apply: never; + /** @deprecated */ + // @ts-ignore + export const arguments: never; + /** @deprecated */ + export const bind: never; + /** @deprecated */ + export const call: never; + /** @deprecated */ + export const caller: never; + /** @deprecated */ + export const length: never; + /** @deprecated */ + export const name: never; + /** @deprecated */ + export const prototype: never; + /** @deprecated */ + export const toString: never; +} + +/** + * Declares the props that a component accepts. Example: + * + * ```ts + * let { optionalProp = 42, requiredProp, bindableProp = $bindable() }: { optionalProp?: number; requiredProps: string; bindableProp: boolean } = $props(); + * ``` + * + * https://svelte.dev/docs/svelte/$props + */ +declare function $props(): any; + +declare namespace $props { + /** + * Generates an ID that is unique to the current component instance. When hydrating a server-rendered component, + * the value will be consistent between server and client. + * + * This is useful for linking elements via attributes like `for` and `aria-labelledby`. + * @since 5.20.0 + */ + export function id(): string; + + // prevent intellisense from being unhelpful + /** @deprecated */ + export const apply: never; + /** @deprecated */ + // @ts-ignore + export const arguments: never; + /** @deprecated */ + export const bind: never; + /** @deprecated */ + export const call: never; + /** @deprecated */ + export const caller: never; + /** @deprecated */ + export const length: never; + /** @deprecated */ + export const name: never; + /** @deprecated */ + export const prototype: never; + /** @deprecated */ + export const toString: never; +} + +/** + * Declares a prop as bindable, meaning the parent component can use `bind:propName={value}` to bind to it. + * + * ```ts + * let { propName = $bindable() }: { propName: boolean } = $props(); + * ``` + * + * https://svelte.dev/docs/svelte/$bindable + */ +declare function $bindable(fallback?: T): T; + +declare namespace $bindable { + // prevent intellisense from being unhelpful + /** @deprecated */ + export const apply: never; + /** @deprecated */ + // @ts-ignore + export const arguments: never; + /** @deprecated */ + export const bind: never; + /** @deprecated */ + export const call: never; + /** @deprecated */ + export const caller: never; + /** @deprecated */ + export const length: never; + /** @deprecated */ + export const name: never; + /** @deprecated */ + export const prototype: never; + /** @deprecated */ + export const toString: never; +} + +/** + * Inspects one or more values whenever they, or the properties they contain, change. Example: + * + * ```ts + * $inspect(someValue, someOtherValue) + * ``` + * + * `$inspect` returns a `with` function, which you can invoke with a callback function that + * will be called with the value and the event type (`'init'` or `'update'`) on every change. + * By default, the values will be logged to the console. + * + * ```ts + * $inspect(x).with(console.trace); + * $inspect(x, y).with(() => { debugger; }); + * ``` + * + * https://svelte.dev/docs/svelte/$inspect + */ +declare function $inspect( + ...values: T +): { with: (fn: (type: 'init' | 'update', ...values: T) => void) => void }; + +declare namespace $inspect { + /** + * Tracks which reactive state changes caused an effect to re-run. Must be the first + * statement of a function body. Example: + * + * ```svelte + * + */ + export function trace(name?: string): void; + + // prevent intellisense from being unhelpful + /** @deprecated */ + export const apply: never; + /** @deprecated */ + // @ts-ignore + export const arguments: never; + /** @deprecated */ + export const bind: never; + /** @deprecated */ + export const call: never; + /** @deprecated */ + export const caller: never; + /** @deprecated */ + export const length: never; + /** @deprecated */ + export const name: never; + /** @deprecated */ + export const prototype: never; + /** @deprecated */ + export const toString: never; +} + +/** + * Retrieves the `this` reference of the custom element that contains this component. Example: + * + * ```svelte + * + * + * + * + * + * ``` + * + * Only available inside custom element components, and only on the client-side. + * + * https://svelte.dev/docs/svelte/$host + */ +declare function $host(): El; + +declare namespace $host { + // prevent intellisense from being unhelpful + /** @deprecated */ + export const apply: never; + /** @deprecated */ + // @ts-ignore + export const arguments: never; + /** @deprecated */ + export const bind: never; + /** @deprecated */ + export const call: never; + /** @deprecated */ + export const caller: never; + /** @deprecated */ + export const length: never; + /** @deprecated */ + export const name: never; + /** @deprecated */ + export const prototype: never; + /** @deprecated */ + export const toString: never; +} + +//# sourceMappingURL=index.d.ts.map diff --git a/node_modules/svelte/types/index.d.ts.map b/node_modules/svelte/types/index.d.ts.map new file mode 100644 index 0000000..df0882e --- /dev/null +++ b/node_modules/svelte/types/index.d.ts.map @@ -0,0 +1,254 @@ +{ + "version": 3, + "file": "index.d.ts", + "names": [ + "ComponentConstructorOptions", + "SvelteComponent", + "ComponentInternals", + "Component", + "SvelteComponentTyped", + "ComponentEvents", + "ComponentProps", + "ComponentType", + "Snippet", + "EventDispatcher", + "MountOptions", + "onMount", + "onDestroy", + "createEventDispatcher", + "beforeUpdate", + "afterUpdate", + "createRawSnippet", + "NotFunction", + "flushSync", + "tick", + "untrack", + "getContext", + "setContext", + "hasContext", + "getAllContexts", + "mount", + "hydrate", + "unmount", + "Getters", + "ActionReturn", + "Action", + "AnimationConfig", + "FlipParams", + "flip", + "compile", + "compileModule", + "walk", + "Processed", + "MarkupPreprocessor", + "Preprocessor", + "PreprocessorGroup", + "CompileResult", + "Warning", + "CompileError", + "CssHashGetter", + "CompileOptions", + "ModuleCompileOptions", + "Namespace", + "AST", + "preprocess", + "VERSION", + "migrate", + "_CSS", + "linear", + "backInOut", + "backIn", + "backOut", + "bounceOut", + "bounceInOut", + "bounceIn", + "circInOut", + "circIn", + "circOut", + "cubicInOut", + "cubicIn", + "cubicOut", + "elasticInOut", + "elasticIn", + "elasticOut", + "expoInOut", + "expoIn", + "expoOut", + "quadInOut", + "quadIn", + "quadOut", + "quartInOut", + "quartIn", + "quartOut", + "quintInOut", + "quintIn", + "quintOut", + "sineInOut", + "sineIn", + "sineOut", + "createClassComponent", + "asClassComponent", + "run", + "handlers", + "createBubbler", + "LegacyComponentType", + "trusted", + "self", + "stopPropagation", + "once", + "stopImmediatePropagation", + "preventDefault", + "passive", + "nonpassive", + "Spring", + "Tweened", + "Subscriber", + "Unsubscriber", + "Readable", + "SpringOpts", + "SpringUpdateOpts", + "Updater", + "TweenedOptions", + "prefersReducedMotion", + "spring", + "tweened", + "Tween", + "SvelteDate", + "SvelteSet", + "SvelteMap", + "SvelteURL", + "REPLACE", + "SvelteURLSearchParams", + "MediaQuery", + "createSubscriber", + "ReactiveValue", + "scrollX", + "scrollY", + "innerWidth", + "innerHeight", + "outerWidth", + "outerHeight", + "screenLeft", + "screenTop", + "online", + "devicePixelRatio", + "render", + "RenderOutput", + "StartStopNotifier", + "Writable", + "readable", + "writable", + "readonly", + "get", + "EasingFunction", + "TransitionConfig", + "BlurParams", + "FadeParams", + "FlyParams", + "SlideParams", + "ScaleParams", + "DrawParams", + "CrossfadeParams", + "blur", + "fade", + "fly", + "slide", + "scale", + "draw", + "crossfade", + "on", + "SveltePreprocessor" + ], + "sources": [ + "../src/index.d.ts", + "../src/index-client.js", + "../src/internal/client/dom/blocks/snippet.js", + "../src/internal/types.d.ts", + "../src/internal/client/runtime.js", + "../src/internal/client/context.js", + "../src/internal/client/render.js", + "../src/internal/shared/types.d.ts", + "../src/action/public.d.ts", + "../src/animate/public.d.ts", + "../src/animate/index.js", + "../src/compiler/index.js", + "../src/compiler/preprocess/public.d.ts", + "../src/compiler/types/index.d.ts", + "../src/compiler/types/template.d.ts", + "../src/compiler/preprocess/index.js", + "../src/version.js", + "../src/compiler/migrate/index.js", + "../src/compiler/types/css.d.ts", + "../src/easing/index.js", + "../src/legacy/legacy-client.js", + "../src/internal/client/dom/legacy/event-modifiers.js", + "../src/motion/public.d.ts", + "../src/store/public.d.ts", + "../src/motion/private.d.ts", + "../src/motion/index.js", + "../src/motion/spring.js", + "../src/motion/tweened.js", + "../src/reactivity/date.js", + "../src/reactivity/set.js", + "../src/reactivity/map.js", + "../src/reactivity/url.js", + "../src/reactivity/url-search-params.js", + "../src/reactivity/media-query.js", + "../src/reactivity/create-subscriber.js", + "../src/reactivity/reactive-value.js", + "../src/reactivity/window/index.js", + "../src/server/index.d.ts", + "../src/internal/server/types.d.ts", + "../src/store/shared/index.js", + "../src/transition/public.d.ts", + "../src/transition/index.js", + "../src/events/public.d.ts" + ], + "sourcesContent": [ + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null + ], + "mappings": ";;;;;;;kBAUiBA,2BAA2BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkC/BC,eAAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAwEhBC,kBAAkBA;;;;;;;;;;;;;;;;;;;;;;;;kBAwBbC,SAASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAoCbC,oBAAoBA;;;;;;;;;;;;;;;;;;;;;;;;aAwBrBC,eAAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAiCfC,cAAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA6BdC,aAAaA;;;;;;;;;;;;;;;;;;;;;;;kBAuBRC,OAAOA;;;;;;;;;;;;;;;;kBAgBPC,eAAeA;;;;;;;;;;;;;;;;aAgBpBC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCjQRC,OAAOA;;;;;;;;iBAwBPC,S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AiBA;;aA3DjBH,SAASA;;aAuETsH,kBAAkBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aCflB9G,cAAcA;;aAfdH,OAAOA;;;MAIZE,aAAaA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAoIRE,oBAAoBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MCzJzBC,SAASA", + "ignoreList": [] +} \ No newline at end of file diff --git a/node_modules/tailwindcss/LICENSE b/node_modules/tailwindcss/LICENSE new file mode 100644 index 0000000..d6a8229 --- /dev/null +++ b/node_modules/tailwindcss/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Tailwind Labs, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/tailwindcss/README.md b/node_modules/tailwindcss/README.md new file mode 100644 index 0000000..95ec9d8 --- /dev/null +++ b/node_modules/tailwindcss/README.md @@ -0,0 +1,40 @@ +

+ + + + + Tailwind CSS + + +

+ +

+ A utility-first CSS framework for rapidly building custom user interfaces. +

+ +

+ Build Status + Total Downloads + Latest Release + License +

+ +--- + +## Documentation + +For full documentation, visit [tailwindcss.com](https://tailwindcss.com). + +## Community + +For help, discussion about best practices, or any other conversation that would benefit from being searchable: + +[Discuss Tailwind CSS on GitHub](https://github.com/tailwindcss/tailwindcss/discussions) + +For chatting with others using the framework: + +[Join the Tailwind CSS Discord Server](https://discord.gg/7NF8GNe) + +## Contributing + +If you're interested in contributing to Tailwind CSS, please read our [contributing docs](https://github.com/tailwindcss/tailwindcss/blob/next/.github/CONTRIBUTING.md) **before submitting a pull request**. diff --git a/node_modules/tailwindcss/dist/chunk-HTB5LLOP.mjs b/node_modules/tailwindcss/dist/chunk-HTB5LLOP.mjs new file mode 100644 index 0000000..8a95483 --- /dev/null +++ b/node_modules/tailwindcss/dist/chunk-HTB5LLOP.mjs @@ -0,0 +1 @@ +var l={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.046 257.417)",600:"oklch(44.6% 0.043 257.281)",700:"oklch(37.2% 0.044 257.287)",800:"oklch(27.9% 0.041 260.031)",900:"oklch(20.8% 0.042 265.755)",950:"oklch(12.9% 0.042 264.695)"},gray:{50:"oklch(98.5% 0.002 247.839)",100:"oklch(96.7% 0.003 264.542)",200:"oklch(92.8% 0.006 264.531)",300:"oklch(87.2% 0.01 258.338)",400:"oklch(70.7% 0.022 261.325)",500:"oklch(55.1% 0.027 264.364)",600:"oklch(44.6% 0.03 256.802)",700:"oklch(37.3% 0.034 259.733)",800:"oklch(27.8% 0.033 256.848)",900:"oklch(21% 0.034 264.665)",950:"oklch(13% 0.028 261.692)"},zinc:{50:"oklch(98.5% 0 0)",100:"oklch(96.7% 0.001 286.375)",200:"oklch(92% 0.004 286.32)",300:"oklch(87.1% 0.006 286.286)",400:"oklch(70.5% 0.015 286.067)",500:"oklch(55.2% 0.016 285.938)",600:"oklch(44.2% 0.017 285.786)",700:"oklch(37% 0.013 285.805)",800:"oklch(27.4% 0.006 286.033)",900:"oklch(21% 0.006 285.885)",950:"oklch(14.1% 0.005 285.823)"},neutral:{50:"oklch(98.5% 0 0)",100:"oklch(97% 0 0)",200:"oklch(92.2% 0 0)",300:"oklch(87% 0 0)",400:"oklch(70.8% 0 0)",500:"oklch(55.6% 0 0)",600:"oklch(43.9% 0 0)",700:"oklch(37.1% 0 0)",800:"oklch(26.9% 0 0)",900:"oklch(20.5% 0 0)",950:"oklch(14.5% 0 0)"},stone:{50:"oklch(98.5% 0.001 106.423)",100:"oklch(97% 0.001 106.424)",200:"oklch(92.3% 0.003 48.717)",300:"oklch(86.9% 0.005 56.366)",400:"oklch(70.9% 0.01 56.259)",500:"oklch(55.3% 0.013 58.071)",600:"oklch(44.4% 0.011 73.639)",700:"oklch(37.4% 0.01 67.558)",800:"oklch(26.8% 0.007 34.298)",900:"oklch(21.6% 0.006 56.043)",950:"oklch(14.7% 0.004 49.25)"},red:{50:"oklch(97.1% 0.013 17.38)",100:"oklch(93.6% 0.032 17.717)",200:"oklch(88.5% 0.062 18.334)",300:"oklch(80.8% 0.114 19.571)",400:"oklch(70.4% 0.191 22.216)",500:"oklch(63.7% 0.237 25.331)",600:"oklch(57.7% 0.245 27.325)",700:"oklch(50.5% 0.213 27.518)",800:"oklch(44.4% 0.177 26.899)",900:"oklch(39.6% 0.141 25.723)",950:"oklch(25.8% 0.092 26.042)"},orange:{50:"oklch(98% 0.016 73.684)",100:"oklch(95.4% 0.038 75.164)",200:"oklch(90.1% 0.076 70.697)",300:"oklch(83.7% 0.128 66.29)",400:"oklch(75% 0.183 55.934)",500:"oklch(70.5% 0.213 47.604)",600:"oklch(64.6% 0.222 41.116)",700:"oklch(55.3% 0.195 38.402)",800:"oklch(47% 0.157 37.304)",900:"oklch(40.8% 0.123 38.172)",950:"oklch(26.6% 0.079 36.259)"},amber:{50:"oklch(98.7% 0.022 95.277)",100:"oklch(96.2% 0.059 95.617)",200:"oklch(92.4% 0.12 95.746)",300:"oklch(87.9% 0.169 91.605)",400:"oklch(82.8% 0.189 84.429)",500:"oklch(76.9% 0.188 70.08)",600:"oklch(66.6% 0.179 58.318)",700:"oklch(55.5% 0.163 48.998)",800:"oklch(47.3% 0.137 46.201)",900:"oklch(41.4% 0.112 45.904)",950:"oklch(27.9% 0.077 45.635)"},yellow:{50:"oklch(98.7% 0.026 102.212)",100:"oklch(97.3% 0.071 103.193)",200:"oklch(94.5% 0.129 101.54)",300:"oklch(90.5% 0.182 98.111)",400:"oklch(85.2% 0.199 91.936)",500:"oklch(79.5% 0.184 86.047)",600:"oklch(68.1% 0.162 75.834)",700:"oklch(55.4% 0.135 66.442)",800:"oklch(47.6% 0.114 61.907)",900:"oklch(42.1% 0.095 57.708)",950:"oklch(28.6% 0.066 53.813)"},lime:{50:"oklch(98.6% 0.031 120.757)",100:"oklch(96.7% 0.067 122.328)",200:"oklch(93.8% 0.127 124.321)",300:"oklch(89.7% 0.196 126.665)",400:"oklch(84.1% 0.238 128.85)",500:"oklch(76.8% 0.233 130.85)",600:"oklch(64.8% 0.2 131.684)",700:"oklch(53.2% 0.157 131.589)",800:"oklch(45.3% 0.124 130.933)",900:"oklch(40.5% 0.101 131.063)",950:"oklch(27.4% 0.072 132.109)"},green:{50:"oklch(98.2% 0.018 155.826)",100:"oklch(96.2% 0.044 156.743)",200:"oklch(92.5% 0.084 155.995)",300:"oklch(87.1% 0.15 154.449)",400:"oklch(79.2% 0.209 151.711)",500:"oklch(72.3% 0.219 149.579)",600:"oklch(62.7% 0.194 149.214)",700:"oklch(52.7% 0.154 150.069)",800:"oklch(44.8% 0.119 151.328)",900:"oklch(39.3% 0.095 152.535)",950:"oklch(26.6% 0.065 152.934)"},emerald:{50:"oklch(97.9% 0.021 166.113)",100:"oklch(95% 0.052 163.051)",200:"oklch(90.5% 0.093 164.15)",300:"oklch(84.5% 0.143 164.978)",400:"oklch(76.5% 0.177 163.223)",500:"oklch(69.6% 0.17 162.48)",600:"oklch(59.6% 0.145 163.225)",700:"oklch(50.8% 0.118 165.612)",800:"oklch(43.2% 0.095 166.913)",900:"oklch(37.8% 0.077 168.94)",950:"oklch(26.2% 0.051 172.552)"},teal:{50:"oklch(98.4% 0.014 180.72)",100:"oklch(95.3% 0.051 180.801)",200:"oklch(91% 0.096 180.426)",300:"oklch(85.5% 0.138 181.071)",400:"oklch(77.7% 0.152 181.912)",500:"oklch(70.4% 0.14 182.503)",600:"oklch(60% 0.118 184.704)",700:"oklch(51.1% 0.096 186.391)",800:"oklch(43.7% 0.078 188.216)",900:"oklch(38.6% 0.063 188.416)",950:"oklch(27.7% 0.046 192.524)"},cyan:{50:"oklch(98.4% 0.019 200.873)",100:"oklch(95.6% 0.045 203.388)",200:"oklch(91.7% 0.08 205.041)",300:"oklch(86.5% 0.127 207.078)",400:"oklch(78.9% 0.154 211.53)",500:"oklch(71.5% 0.143 215.221)",600:"oklch(60.9% 0.126 221.723)",700:"oklch(52% 0.105 223.128)",800:"oklch(45% 0.085 224.283)",900:"oklch(39.8% 0.07 227.392)",950:"oklch(30.2% 0.056 229.695)"},sky:{50:"oklch(97.7% 0.013 236.62)",100:"oklch(95.1% 0.026 236.824)",200:"oklch(90.1% 0.058 230.902)",300:"oklch(82.8% 0.111 230.318)",400:"oklch(74.6% 0.16 232.661)",500:"oklch(68.5% 0.169 237.323)",600:"oklch(58.8% 0.158 241.966)",700:"oklch(50% 0.134 242.749)",800:"oklch(44.3% 0.11 240.79)",900:"oklch(39.1% 0.09 240.876)",950:"oklch(29.3% 0.066 243.157)"},blue:{50:"oklch(97% 0.014 254.604)",100:"oklch(93.2% 0.032 255.585)",200:"oklch(88.2% 0.059 254.128)",300:"oklch(80.9% 0.105 251.813)",400:"oklch(70.7% 0.165 254.624)",500:"oklch(62.3% 0.214 259.815)",600:"oklch(54.6% 0.245 262.881)",700:"oklch(48.8% 0.243 264.376)",800:"oklch(42.4% 0.199 265.638)",900:"oklch(37.9% 0.146 265.522)",950:"oklch(28.2% 0.091 267.935)"},indigo:{50:"oklch(96.2% 0.018 272.314)",100:"oklch(93% 0.034 272.788)",200:"oklch(87% 0.065 274.039)",300:"oklch(78.5% 0.115 274.713)",400:"oklch(67.3% 0.182 276.935)",500:"oklch(58.5% 0.233 277.117)",600:"oklch(51.1% 0.262 276.966)",700:"oklch(45.7% 0.24 277.023)",800:"oklch(39.8% 0.195 277.366)",900:"oklch(35.9% 0.144 278.697)",950:"oklch(25.7% 0.09 281.288)"},violet:{50:"oklch(96.9% 0.016 293.756)",100:"oklch(94.3% 0.029 294.588)",200:"oklch(89.4% 0.057 293.283)",300:"oklch(81.1% 0.111 293.571)",400:"oklch(70.2% 0.183 293.541)",500:"oklch(60.6% 0.25 292.717)",600:"oklch(54.1% 0.281 293.009)",700:"oklch(49.1% 0.27 292.581)",800:"oklch(43.2% 0.232 292.759)",900:"oklch(38% 0.189 293.745)",950:"oklch(28.3% 0.141 291.089)"},purple:{50:"oklch(97.7% 0.014 308.299)",100:"oklch(94.6% 0.033 307.174)",200:"oklch(90.2% 0.063 306.703)",300:"oklch(82.7% 0.119 306.383)",400:"oklch(71.4% 0.203 305.504)",500:"oklch(62.7% 0.265 303.9)",600:"oklch(55.8% 0.288 302.321)",700:"oklch(49.6% 0.265 301.924)",800:"oklch(43.8% 0.218 303.724)",900:"oklch(38.1% 0.176 304.987)",950:"oklch(29.1% 0.149 302.717)"},fuchsia:{50:"oklch(97.7% 0.017 320.058)",100:"oklch(95.2% 0.037 318.852)",200:"oklch(90.3% 0.076 319.62)",300:"oklch(83.3% 0.145 321.434)",400:"oklch(74% 0.238 322.16)",500:"oklch(66.7% 0.295 322.15)",600:"oklch(59.1% 0.293 322.896)",700:"oklch(51.8% 0.253 323.949)",800:"oklch(45.2% 0.211 324.591)",900:"oklch(40.1% 0.17 325.612)",950:"oklch(29.3% 0.136 325.661)"},pink:{50:"oklch(97.1% 0.014 343.198)",100:"oklch(94.8% 0.028 342.258)",200:"oklch(89.9% 0.061 343.231)",300:"oklch(82.3% 0.12 346.018)",400:"oklch(71.8% 0.202 349.761)",500:"oklch(65.6% 0.241 354.308)",600:"oklch(59.2% 0.249 0.584)",700:"oklch(52.5% 0.223 3.958)",800:"oklch(45.9% 0.187 3.815)",900:"oklch(40.8% 0.153 2.432)",950:"oklch(28.4% 0.109 3.907)"},rose:{50:"oklch(96.9% 0.015 12.422)",100:"oklch(94.1% 0.03 12.58)",200:"oklch(89.2% 0.058 10.001)",300:"oklch(81% 0.117 11.638)",400:"oklch(71.2% 0.194 13.428)",500:"oklch(64.5% 0.246 16.439)",600:"oklch(58.6% 0.253 17.585)",700:"oklch(51.4% 0.222 16.935)",800:"oklch(45.5% 0.188 13.697)",900:"oklch(41% 0.159 10.272)",950:"oklch(27.1% 0.105 12.094)"}};export{l as a}; diff --git a/node_modules/tailwindcss/dist/chunk-NZOSKIBJ.mjs b/node_modules/tailwindcss/dist/chunk-NZOSKIBJ.mjs new file mode 100644 index 0000000..ff8d54a --- /dev/null +++ b/node_modules/tailwindcss/dist/chunk-NZOSKIBJ.mjs @@ -0,0 +1,36 @@ +import{a as At,b as _,c as W,d as E,e as rt,f as de,g as _e,h as $t}from"./chunk-P5FH2LZE.mjs";import{a as Ct}from"./chunk-HTB5LLOP.mjs";var Nt="4.1.5";var $e=92,De=47,Ue=42,Wr=34,Br=39,qr=58,Ie=59,pe=10,Ne=32,Fe=9,Vt=123,it=125,at=40,Tt=41,Gr=91,Jr=93,St=45,nt=64,Hr=33;function me(r){r[0]==="\uFEFF"&&(r=r.slice(1)),r=r.replaceAll(`\r +`,` +`);let t=[],i=[],e=[],o=null,s=null,l="",d="",u;for(let c=0;c0&&r[A]===g[g.length-1]&&(g=g.slice(0,-1));let v=ot(l,w);if(!v)throw new Error("Invalid custom property, expected a value");o?o.nodes.push(v):t.push(v),l=""}else if(m===Ie&&l.charCodeAt(0)===nt)s=Ve(l),o?o.nodes.push(s):t.push(s),l="",s=null;else if(m===Ie&&d[d.length-1]!==")"){let g=ot(l);if(!g)throw l.length===0?new Error("Unexpected semicolon"):new Error(`Invalid declaration: \`${l.trim()}\``);o?o.nodes.push(g):t.push(g),l=""}else if(m===Vt&&d[d.length-1]!==")")d+="}",s=B(l.trim()),o&&o.nodes.push(s),e.push(o),o=s,l="",s=null;else if(m===it&&d[d.length-1]!==")"){if(d==="")throw new Error("Missing opening {");if(d=d.slice(0,-1),l.length>0)if(l.charCodeAt(0)===nt)s=Ve(l),o?o.nodes.push(s):t.push(s),l="",s=null;else{let h=l.indexOf(":");if(o){let w=ot(l,h);if(!w)throw new Error(`Invalid declaration: \`${l.trim()}\``);o.nodes.push(w)}}let g=e.pop()??null;g===null&&o&&t.push(o),o=g,l="",s=null}else if(m===at)d+=")",l+="(";else if(m===Tt){if(d[d.length-1]!==")")throw new Error("Missing opening (");d=d.slice(0,-1),l+=")"}else{if(l.length===0&&(m===Ne||m===pe||m===Fe))continue;l+=String.fromCharCode(m)}}}if(l.charCodeAt(0)===nt&&t.push(Ve(l)),d.length>0&&o){if(o.kind==="rule")throw new Error(`Missing closing } at ${o.selector}`);if(o.kind==="at-rule")throw new Error(`Missing closing } at ${o.name} ${o.params}`)}return i.length>0?i.concat(t):t}function Ve(r,t=[]){for(let i=5;i=1&&o<=31||o===127||e===0&&o>=48&&o<=57||e===1&&o>=48&&o<=57&&l===45){s+="\\"+o.toString(16)+" ";continue}if(o>=128||o===45||o===95||o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122){s+=t.charAt(e);continue}s+="\\"+t.charAt(e)}return s}function ge(r){return r.replace(/\\([\dA-Fa-f]{1,6}[\t\n\f\r ]?|[\S\s])/g,t=>t.length>2?String.fromCodePoint(Number.parseInt(t.slice(1).trim(),16)):t[1])}var Rt=new Map([["--font",["--font-weight","--font-size"]],["--inset",["--inset-shadow","--inset-ring"]],["--text",["--text-color","--text-decoration-color","--text-decoration-thickness","--text-indent","--text-shadow","--text-underline-offset"]]]);function Et(r,t){return(Rt.get(t)??[]).some(i=>r===i||r.startsWith(`${i}-`))}var Le=class{constructor(t=new Map,i=new Set([])){this.values=t;this.keyframes=i}prefix=null;add(t,i,e=0){if(t.endsWith("-*")){if(i!=="initial")throw new Error(`Invalid theme value \`${i}\` for namespace \`${t}\``);t==="--*"?this.values.clear():this.clearNamespace(t.slice(0,-2),0)}if(e&4){let o=this.values.get(t);if(o&&!(o.options&4))return}i==="initial"?this.values.delete(t):this.values.set(t,{value:i,options:e})}keysInNamespaces(t){let i=[];for(let e of t){let o=`${e}-`;for(let s of this.values.keys())s.startsWith(o)&&s.indexOf("--",2)===-1&&(Et(s,e)||i.push(s.slice(o.length)))}return i}get(t){for(let i of t){let e=this.values.get(i);if(e)return e.value}return null}hasDefault(t){return(this.getOptions(t)&4)===4}getOptions(t){return t=ge(this.#r(t)),this.values.get(t)?.options??0}entries(){return this.prefix?Array.from(this.values,t=>(t[0]=this.prefixKey(t[0]),t)):this.values.entries()}prefixKey(t){return this.prefix?`--${this.prefix}-${t.slice(2)}`:t}#r(t){return this.prefix?`--${t.slice(3+this.prefix.length)}`:t}clearNamespace(t,i){let e=Rt.get(t)??[];e:for(let o of this.values.keys())if(o.startsWith(t)){if(i!==0&&(this.getOptions(o)&i)!==i)continue;for(let s of e)if(o.startsWith(s))continue e;this.values.delete(o)}}#e(t,i){for(let e of i){let o=t!==null?`${e}-${t}`:e;if(!this.values.has(o))if(t!==null&&t.includes(".")){if(o=`${e}-${t.replaceAll(".","_")}`,!this.values.has(o))continue}else continue;if(!Et(o,e))return o}return null}#t(t){let i=this.values.get(t);if(!i)return null;let e=null;return i.options&2&&(e=i.value),`var(${se(this.prefixKey(t))}${e?`, ${e}`:""})`}markUsedVariable(t){let i=ge(this.#r(t)),e=this.values.get(i);if(!e)return!1;let o=e.options&16;return e.options|=16,!o}resolve(t,i,e=0){let o=this.#e(t,i);if(!o)return null;let s=this.values.get(o);return(e|s.options)&1?s.value:this.#t(o)}resolveValue(t,i){let e=this.#e(t,i);return e?this.values.get(e).value:null}resolveWith(t,i,e=[]){let o=this.#e(t,i);if(!o)return null;let s={};for(let d of e){let u=`${o}${d}`,c=this.values.get(u);c&&(c.options&1?s[d]=c.value:s[d]=this.#t(u))}let l=this.values.get(o);return l.options&1?[l.value,s]:[this.#t(o),s]}namespace(t){let i=new Map,e=`${t}-`;for(let[o,s]of this.values)o===t?i.set(null,s.value):o.startsWith(`${e}-`)?i.set(o.slice(t.length),s.value):o.startsWith(e)&&i.set(o.slice(e.length),s.value);return i}addKeyframes(t){this.keyframes.add(t)}getKeyframes(){return Array.from(this.keyframes)}};var q=class extends Map{constructor(i){super();this.factory=i}get(i){let e=super.get(i);return e===void 0&&(e=this.factory(i,this),this.set(i,e)),e}};function st(r){return{kind:"word",value:r}}function Yr(r,t){return{kind:"function",value:r,nodes:t}}function Zr(r){return{kind:"separator",value:r}}function ee(r,t,i=null){for(let e=0;e0){let g=st(o);e?e.nodes.push(g):t.push(g),o=""}let u=l,c=l+1;for(;c0){let c=st(o);u.nodes.push(c),o=""}i.length>0?e=i[i.length-1]:e=null;break}default:o+=String.fromCharCode(d)}}return o.length>0&&t.push(st(o)),t}function Me(r){let t=[];return ee(G(r),i=>{if(!(i.kind!=="function"||i.value!=="var"))return ee(i.nodes,e=>{e.kind!=="word"||e.value[0]!=="-"||e.value[1]!=="-"||t.push(e.value)}),1}),t}var ii=64;function L(r,t=[]){return{kind:"rule",selector:r,nodes:t}}function I(r,t="",i=[]){return{kind:"at-rule",name:r,params:t,nodes:i}}function B(r,t=[]){return r.charCodeAt(0)===ii?Ve(r,t):L(r,t)}function a(r,t,i=!1){return{kind:"declaration",property:r,value:t,important:i}}function ze(r){return{kind:"comment",value:r}}function ne(r,t){return{kind:"context",context:r,nodes:t}}function D(r){return{kind:"at-root",nodes:r}}function F(r,t,i=[],e={}){for(let o=0;onew Set),l=new q(()=>new Set),d=new Set,u=new Set,c=[],m=[],g=new q(()=>new Set);function h(v,A,k={},b=0){if(v.kind==="declaration"){if(v.property==="--tw-sort"||v.value===void 0||v.value===null)return;if(k.theme&&v.property[0]==="-"&&v.property[1]==="-"){if(v.value==="initial"){v.value=void 0;return}k.keyframes||s.get(A).add(v)}if(v.value.includes("var("))if(k.theme&&v.property[0]==="-"&&v.property[1]==="-")for(let V of Me(v.value))g.get(V).add(v.property);else t.trackUsedVariables(v.value);if(v.property==="animation")for(let V of Lt(v.value))u.add(V);i&2&&v.value.includes("color-mix(")&&l.get(A).add(v),A.push(v)}else if(v.kind==="rule")if(v.selector==="&")for(let V of v.nodes){let S=[];h(V,S,k,b+1),S.length>0&&A.push(...S)}else{let V={...v,nodes:[]};for(let S of v.nodes)h(S,V.nodes,k,b+1);V.nodes.length>0&&A.push(V)}else if(v.kind==="at-rule"&&v.name==="@property"&&b===0){if(o.has(v.params))return;if(i&1){let S=v.params,R=null,O=!1;for(let U of v.nodes)U.kind==="declaration"&&(U.property==="initial-value"?R=U.value:U.property==="inherits"&&(O=U.value==="true"));O?c.push(a(S,R??"initial")):m.push(a(S,R??"initial"))}o.add(v.params);let V={...v,nodes:[]};for(let S of v.nodes)h(S,V.nodes,k,b+1);A.push(V)}else if(v.kind==="at-rule"){v.name==="@keyframes"&&(k={...k,keyframes:!0});let V={...v,nodes:[]};for(let S of v.nodes)h(S,V.nodes,k,b+1);v.name==="@keyframes"&&k.theme&&d.add(V),(V.nodes.length>0||V.name==="@layer"||V.name==="@charset"||V.name==="@custom-media"||V.name==="@namespace"||V.name==="@import")&&A.push(V)}else if(v.kind==="at-root")for(let V of v.nodes){let S=[];h(V,S,k,0);for(let R of S)e.push(R)}else if(v.kind==="context"){if(v.context.reference)return;for(let V of v.nodes)h(V,A,{...k,...v.context},b)}else v.kind==="comment"&&A.push(v)}let w=[];for(let v of r)h(v,w,{},0);e:for(let[v,A]of s)for(let k of A){if(Mt(k.property,t.theme,g)){if(k.property.startsWith(t.theme.prefixKey("--animate-")))for(let S of Lt(k.value))u.add(S);continue}let V=v.indexOf(k);if(v.splice(V,1),v.length===0){let S=ni(w,R=>R.kind==="rule"&&R.nodes===v);if(!S||S.length===0)continue e;S.unshift({kind:"at-root",nodes:w});do{let R=S.pop();if(!R)break;let O=S[S.length-1];if(!O||O.kind!=="at-root"&&O.kind!=="at-rule")break;let U=O.nodes.indexOf(R);if(U===-1)break;O.nodes.splice(U,1)}while(!0);continue e}}for(let v of d)if(!u.has(v.params)){let A=e.indexOf(v);e.splice(A,1)}if(w=w.concat(e),i&2)for(let[v,A]of l)for(let k of A){let b=v.indexOf(k);if(b===-1||k.value==null)continue;let V=G(k.value),S=!1;if(ee(V,(U,{replaceWith:P})=>{if(U.kind!=="function"||U.value!=="color-mix")return;let H=!1,M=!1;if(ee(U.nodes,(z,{replaceWith:te})=>{if(z.kind=="word"&&z.value.toLowerCase()==="currentcolor"){M=!0,S=!0;return}let X=z,ae=null,n=new Set;do{if(X.kind!=="function"||X.value!=="var")return;let f=X.nodes[0];if(!f||f.kind!=="word")return;let p=f.value;if(n.has(p)){H=!0;return}if(n.add(p),S=!0,ae=t.theme.resolveValue(null,[f.value]),!ae){H=!0;return}if(ae.toLowerCase()==="currentcolor"){M=!0;return}ae.startsWith("var(")?X=G(ae)[0]:X=null}while(X);te({kind:"word",value:ae})}),H||M){let z=U.nodes.findIndex(X=>X.kind==="separator"&&X.value.trim().includes(","));if(z===-1)return;let te=U.nodes.length>z?U.nodes[z+1]:null;if(!te)return;P(te)}else if(S){let z=U.nodes[2];z.kind==="word"&&(z.value==="oklab"||z.value==="oklch"||z.value==="lab"||z.value==="lch")&&(z.value="srgb")}}),!S)continue;let R={...k,value:Y(V)},O=B("@supports (color: color-mix(in lab, red, red))",[k]);v.splice(b,1,R,O)}if(i&1){let v=[];if(c.length>0&&v.push(B(":root, :host",c)),m.length>0&&v.push(B("*, ::before, ::after, ::backdrop",m)),v.length>0){let A=w.findIndex(k=>!(k.kind==="comment"||k.kind==="at-rule"&&(k.name==="@charset"||k.name==="@import")));w.splice(A<0?w.length:A,0,I("@layer","properties",[])),w.push(B("@layer properties",[I("@supports","((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b))))",v)]))}}return w}function re(r){function t(e,o=0){let s="",l=" ".repeat(o);if(e.kind==="declaration")s+=`${l}${e.property}: ${e.value}${e.important?" !important":""}; +`;else if(e.kind==="rule"){s+=`${l}${e.selector} { +`;for(let d of e.nodes)s+=t(d,o+1);s+=`${l}} +`}else if(e.kind==="at-rule"){if(e.nodes.length===0)return`${l}${e.name} ${e.params}; +`;s+=`${l}${e.name}${e.params?` ${e.params} `:" "}{ +`;for(let d of e.nodes)s+=t(d,o+1);s+=`${l}} +`}else if(e.kind==="comment")s+=`${l}/*${e.value}*/ +`;else if(e.kind==="context"||e.kind==="at-root")return"";return s}let i="";for(let e of r){let o=t(e);o!==""&&(i+=o)}return i}function ni(r,t){let i=[];return F(r,(e,{path:o})=>{if(t(e))return i=[...o],2}),i}function Mt(r,t,i,e=new Set){if(e.has(r)||(e.add(r),t.getOptions(r)&24))return!0;{let s=i.get(r)??[];for(let l of s)if(Mt(l,t,i,e))return!0}return!1}function Lt(r){return r.split(/[\s,]+/)}function ue(r){if(r.indexOf("(")===-1)return ke(r);let t=G(r);return ft(t),r=Y(t),r=At(r),r}function ke(r,t=!1){let i="";for(let e=0;e0&&o===ct[t-1]&&t--;break;case 59:if(t===0)return!1;break}}return!0}var ai=58,Wt=45,Bt=97,qt=122;function*Gt(r,t){let i=_(r,":");if(t.theme.prefix){if(i.length===1||i[0]!==t.theme.prefix)return null;i.shift()}let e=i.pop(),o=[];for(let g=i.length-1;g>=0;--g){let h=t.parseVariant(i[g]);if(h===null)return;o.push(h)}let s=!1;e[e.length-1]==="!"?(s=!0,e=e.slice(0,-1)):e[0]==="!"&&(s=!0,e=e.slice(1)),t.utilities.has(e,"static")&&!e.includes("[")&&(yield{kind:"static",root:e,variants:o,important:s,raw:r});let[l,d=null,u]=_(e,"/");if(u)return;let c=d===null?null:dt(d);if(d!==null&&c===null)return;if(l[0]==="["){if(l[l.length-1]!=="]")return;let g=l.charCodeAt(1);if(g!==Wt&&!(g>=Bt&&g<=qt))return;l=l.slice(1,-1);let h=l.indexOf(":");if(h===-1||h===0||h===l.length-1)return;let w=l.slice(0,h),v=ue(l.slice(h+1));if(!fe(v))return;yield{kind:"arbitrary",property:w,value:v,modifier:c,variants:o,important:s,raw:r};return}let m;if(l[l.length-1]==="]"){let g=l.indexOf("-[");if(g===-1)return;let h=l.slice(0,g);if(!t.utilities.has(h,"functional"))return;let w=l.slice(g+1);m=[[h,w]]}else if(l[l.length-1]===")"){let g=l.indexOf("-(");if(g===-1)return;let h=l.slice(0,g);if(!t.utilities.has(h,"functional"))return;let w=l.slice(g+2,-1),v=_(w,":"),A=null;if(v.length===2&&(A=v[0],w=v[1]),w[0]!=="-"&&w[1]!=="-")return;m=[[h,A===null?`[var(${w})]`:`[${A}:var(${w})]`]]}else m=Ht(l,g=>t.utilities.has(g,"functional"));for(let[g,h]of m){let w={kind:"functional",root:g,modifier:c,value:null,variants:o,important:s,raw:r};if(h===null){yield w;continue}{let v=h.indexOf("[");if(v!==-1){if(h[h.length-1]!=="]")return;let k=ue(h.slice(v+1,-1));if(!fe(k))continue;let b="";for(let V=0;V=Bt&&S<=qt))break}if(k.length===0||k.trim().length===0)continue;w.value={kind:"arbitrary",dataType:b||null,value:k}}else{let k=d===null||w.modifier?.kind==="arbitrary"?null:`${h}/${d}`;w.value={kind:"named",value:h,fraction:k}}}yield w}}function dt(r){if(r[0]==="["&&r[r.length-1]==="]"){let t=ue(r.slice(1,-1));return!fe(t)||t.length===0||t.trim().length===0?null:{kind:"arbitrary",value:t}}if(r[0]==="("&&r[r.length-1]===")"){let t=ue(r.slice(1,-1));return!fe(t)||t.length===0||t.trim().length===0||t[0]!=="-"&&t[1]!=="-"?null:{kind:"arbitrary",value:`var(${t})`}}return{kind:"named",value:r}}function Jt(r,t){if(r[0]==="["&&r[r.length-1]==="]"){if(r[1]==="@"&&r.includes("&"))return null;let i=ue(r.slice(1,-1));if(!fe(i)||i.length===0||i.trim().length===0)return null;let e=i[0]===">"||i[0]==="+"||i[0]==="~";return!e&&i[0]!=="@"&&!i.includes("&")&&(i=`&:is(${i})`),{kind:"arbitrary",selector:i,relative:e}}{let[i,e=null,o]=_(r,"/");if(o)return null;let s=Ht(i,l=>t.variants.has(l));for(let[l,d]of s)switch(t.variants.kind(l)){case"static":return d!==null||e!==null?null:{kind:"static",root:l};case"functional":{let u=e===null?null:dt(e);if(e!==null&&u===null)return null;if(d===null)return{kind:"functional",root:l,modifier:u,value:null};if(d[d.length-1]==="]"){if(d[0]!=="[")continue;let c=ue(d.slice(1,-1));return!fe(c)||c.length===0||c.trim().length===0?null:{kind:"functional",root:l,modifier:u,value:{kind:"arbitrary",value:c}}}if(d[d.length-1]===")"){if(d[0]!=="(")continue;let c=ue(d.slice(1,-1));return!fe(c)||c.length===0||c.trim().length===0||c[0]!=="-"&&c[1]!=="-"?null:{kind:"functional",root:l,modifier:u,value:{kind:"arbitrary",value:`var(${c})`}}}return{kind:"functional",root:l,modifier:u,value:{kind:"named",value:d}}}case"compound":{if(d===null)return null;let u=t.parseVariant(d);if(u===null||!t.variants.compoundsWith(l,u))return null;let c=e===null?null:dt(e);return e!==null&&c===null?null:{kind:"compound",root:l,modifier:c,variant:u}}}}return null}function*Ht(r,t){t(r)&&(yield[r,null]);let i=r.lastIndexOf("-");for(;i>0;){let e=r.slice(0,i);if(t(e)){let o=[e,r.slice(i+1)];if(o[1]==="")break;yield o}i=r.lastIndexOf("-",i-1)}r[0]==="@"&&t("@")&&(yield["@",r.slice(1)])}function ve(r,t,i){if(r===t)return 0;let e=r.indexOf("("),o=t.indexOf("("),s=e===-1?r.replace(/[\d.]+/g,""):r.slice(0,e),l=o===-1?t.replace(/[\d.]+/g,""):t.slice(0,o),d=(s===l?0:s{e=e.trim();let o=_(e," ").filter(c=>c.trim()!==""),s=null,l=null,d=null;for(let c of o)li.has(c)||(Yt.test(c)?(l===null?l=c:d===null&&(d=c),Yt.lastIndex=0):s===null&&(s=c));if(l===null||d===null)return e;let u=t(s??"currentcolor");return s!==null?e.replace(s,u):`${e} ${u}`}).join(", ")}var si=/^-?[a-z][a-zA-Z0-9/%._-]*$/,ui=/^-?[a-z][a-zA-Z0-9/%._-]*-\*$/,Ge=["0","0.5","1","1.5","2","2.5","3","3.5","4","5","6","7","8","9","10","11","12","14","16","20","24","28","32","36","40","44","48","52","56","60","64","72","80","96"],pt=class{utilities=new q(()=>[]);completions=new Map;static(t,i){this.utilities.get(t).push({kind:"static",compileFn:i})}functional(t,i,e){this.utilities.get(t).push({kind:"functional",compileFn:i,options:e})}has(t,i){return this.utilities.has(t)&&this.utilities.get(t).some(e=>e.kind===i)}get(t){return this.utilities.has(t)?this.utilities.get(t):[]}getCompletions(t){return this.completions.get(t)?.()??[]}suggest(t,i){this.completions.set(t,i)}keys(t){let i=[];for(let[e,o]of this.utilities.entries())for(let s of o)if(s.kind===t){i.push(e);break}return i}};function $(r,t,i){return I("@property",r,[a("syntax",i?`"${i}"`:'"*"'),a("inherits","false"),...t?[a("initial-value",t)]:[]])}function J(r,t){if(t===null)return r;let i=Number(t);return Number.isNaN(i)||(t=`${i*100}%`),t==="100%"?r:`color-mix(in oklab, ${r} ${t}, transparent)`}function Qt(r,t){let i=Number(t);return Number.isNaN(i)||(t=`${i*100}%`),`oklab(from ${r} l a b / ${t})`}function Z(r,t,i){if(!t)return r;if(t.kind==="arbitrary")return J(r,t.value);let e=i.resolve(t.value,["--opacity"]);return e?J(r,e):_e(t.value)?J(r,`${t.value}%`):null}function Q(r,t,i){let e=null;switch(r.value.value){case"inherit":{e="inherit";break}case"transparent":{e="transparent";break}case"current":{e="currentcolor";break}default:{e=t.resolve(r.value.value,i);break}}return e?Z(e,r.modifier,t):null}var Xt=/(\d+)_(\d+)/g;function er(r){let t=new pt;function i(n,f){function*p(y){for(let C of r.keysInNamespaces(y))yield C.replace(Xt,(K,N,T)=>`${N}.${T}`)}let x=["1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","2/6","3/6","4/6","5/6","1/12","2/12","3/12","4/12","5/12","6/12","7/12","8/12","9/12","10/12","11/12"];t.suggest(n,()=>{let y=[];for(let C of f()){if(typeof C=="string"){y.push({values:[C],modifiers:[]});continue}let K=[...C.values??[],...p(C.valueThemeKeys??[])],N=[...C.modifiers??[],...p(C.modifierThemeKeys??[])];C.supportsFractions&&K.push(...x),C.hasDefaultValue&&K.unshift(null),y.push({supportsNegative:C.supportsNegative,values:K,modifiers:N})}return y})}function e(n,f){t.static(n,()=>f.map(p=>typeof p=="function"?p():a(p[0],p[1])))}function o(n,f){function p({negative:x}){return y=>{let C=null,K=null;if(y.value)if(y.value.kind==="arbitrary"){if(y.modifier)return;C=y.value.value,K=y.value.dataType}else{if(C=r.resolve(y.value.fraction??y.value.value,f.themeKeys??[]),C===null&&f.supportsFractions&&y.value.fraction){let[N,T]=_(y.value.fraction,"/");if(!E(N)||!E(T))return;C=`calc(${y.value.fraction} * 100%)`}if(C===null&&x&&f.handleNegativeBareValue){if(C=f.handleNegativeBareValue(y.value),!C?.includes("/")&&y.modifier)return;if(C!==null)return f.handle(C,null)}if(C===null&&f.handleBareValue&&(C=f.handleBareValue(y.value),!C?.includes("/")&&y.modifier))return}else{if(y.modifier)return;C=f.defaultValue!==void 0?f.defaultValue:r.resolve(null,f.themeKeys??[])}if(C!==null)return f.handle(x?`calc(${C} * -1)`:C,K)}}f.supportsNegative&&t.functional(`-${n}`,p({negative:!0})),t.functional(n,p({negative:!1})),i(n,()=>[{supportsNegative:f.supportsNegative,valueThemeKeys:f.themeKeys??[],hasDefaultValue:f.defaultValue!==void 0&&f.defaultValue!==null,supportsFractions:f.supportsFractions}])}function s(n,f){t.functional(n,p=>{if(!p.value)return;let x=null;if(p.value.kind==="arbitrary"?(x=p.value.value,x=Z(x,p.modifier,r)):x=Q(p,r,f.themeKeys),x!==null)return f.handle(x)}),i(n,()=>[{values:["current","inherit","transparent"],valueThemeKeys:f.themeKeys,modifiers:Array.from({length:21},(p,x)=>`${x*5}`)}])}function l(n,f,p,{supportsNegative:x=!1,supportsFractions:y=!1}={}){x&&t.static(`-${n}-px`,()=>p("-1px")),t.static(`${n}-px`,()=>p("1px")),o(n,{themeKeys:f,supportsFractions:y,supportsNegative:x,defaultValue:null,handleBareValue:({value:C})=>{let K=r.resolve(null,["--spacing"]);return!K||!de(C)?null:`calc(${K} * ${C})`},handleNegativeBareValue:({value:C})=>{let K=r.resolve(null,["--spacing"]);return!K||!de(C)?null:`calc(${K} * -${C})`},handle:p}),i(n,()=>[{values:r.get(["--spacing"])?Ge:[],supportsNegative:x,supportsFractions:y,valueThemeKeys:f}])}e("sr-only",[["position","absolute"],["width","1px"],["height","1px"],["padding","0"],["margin","-1px"],["overflow","hidden"],["clip","rect(0, 0, 0, 0)"],["white-space","nowrap"],["border-width","0"]]),e("not-sr-only",[["position","static"],["width","auto"],["height","auto"],["padding","0"],["margin","0"],["overflow","visible"],["clip","auto"],["white-space","normal"]]),e("pointer-events-none",[["pointer-events","none"]]),e("pointer-events-auto",[["pointer-events","auto"]]),e("visible",[["visibility","visible"]]),e("invisible",[["visibility","hidden"]]),e("collapse",[["visibility","collapse"]]),e("static",[["position","static"]]),e("fixed",[["position","fixed"]]),e("absolute",[["position","absolute"]]),e("relative",[["position","relative"]]),e("sticky",[["position","sticky"]]);for(let[n,f]of[["inset","inset"],["inset-x","inset-inline"],["inset-y","inset-block"],["start","inset-inline-start"],["end","inset-inline-end"],["top","top"],["right","right"],["bottom","bottom"],["left","left"]])e(`${n}-auto`,[[f,"auto"]]),e(`${n}-full`,[[f,"100%"]]),e(`-${n}-full`,[[f,"-100%"]]),l(n,["--inset","--spacing"],p=>[a(f,p)],{supportsNegative:!0,supportsFractions:!0});e("isolate",[["isolation","isolate"]]),e("isolation-auto",[["isolation","auto"]]),e("z-auto",[["z-index","auto"]]),o("z",{supportsNegative:!0,handleBareValue:({value:n})=>E(n)?n:null,themeKeys:["--z-index"],handle:n=>[a("z-index",n)]}),i("z",()=>[{supportsNegative:!0,values:["0","10","20","30","40","50"],valueThemeKeys:["--z-index"]}]),e("order-first",[["order","-9999"]]),e("order-last",[["order","9999"]]),e("order-none",[["order","0"]]),o("order",{supportsNegative:!0,handleBareValue:({value:n})=>E(n)?n:null,themeKeys:["--order"],handle:n=>[a("order",n)]}),i("order",()=>[{supportsNegative:!0,values:Array.from({length:12},(n,f)=>`${f+1}`),valueThemeKeys:["--order"]}]),e("col-auto",[["grid-column","auto"]]),o("col",{supportsNegative:!0,handleBareValue:({value:n})=>E(n)?n:null,themeKeys:["--grid-column"],handle:n=>[a("grid-column",n)]}),e("col-span-full",[["grid-column","1 / -1"]]),o("col-span",{handleBareValue:({value:n})=>E(n)?n:null,handle:n=>[a("grid-column",`span ${n} / span ${n}`)]}),e("col-start-auto",[["grid-column-start","auto"]]),o("col-start",{supportsNegative:!0,handleBareValue:({value:n})=>E(n)?n:null,themeKeys:["--grid-column-start"],handle:n=>[a("grid-column-start",n)]}),e("col-end-auto",[["grid-column-end","auto"]]),o("col-end",{supportsNegative:!0,handleBareValue:({value:n})=>E(n)?n:null,themeKeys:["--grid-column-end"],handle:n=>[a("grid-column-end",n)]}),i("col-span",()=>[{values:Array.from({length:12},(n,f)=>`${f+1}`),valueThemeKeys:[]}]),i("col-start",()=>[{supportsNegative:!0,values:Array.from({length:13},(n,f)=>`${f+1}`),valueThemeKeys:["--grid-column-start"]}]),i("col-end",()=>[{supportsNegative:!0,values:Array.from({length:13},(n,f)=>`${f+1}`),valueThemeKeys:["--grid-column-end"]}]),e("row-auto",[["grid-row","auto"]]),o("row",{supportsNegative:!0,handleBareValue:({value:n})=>E(n)?n:null,themeKeys:["--grid-row"],handle:n=>[a("grid-row",n)]}),e("row-span-full",[["grid-row","1 / -1"]]),o("row-span",{themeKeys:[],handleBareValue:({value:n})=>E(n)?n:null,handle:n=>[a("grid-row",`span ${n} / span ${n}`)]}),e("row-start-auto",[["grid-row-start","auto"]]),o("row-start",{supportsNegative:!0,handleBareValue:({value:n})=>E(n)?n:null,themeKeys:["--grid-row-start"],handle:n=>[a("grid-row-start",n)]}),e("row-end-auto",[["grid-row-end","auto"]]),o("row-end",{supportsNegative:!0,handleBareValue:({value:n})=>E(n)?n:null,themeKeys:["--grid-row-end"],handle:n=>[a("grid-row-end",n)]}),i("row-span",()=>[{values:Array.from({length:12},(n,f)=>`${f+1}`),valueThemeKeys:[]}]),i("row-start",()=>[{supportsNegative:!0,values:Array.from({length:13},(n,f)=>`${f+1}`),valueThemeKeys:["--grid-row-start"]}]),i("row-end",()=>[{supportsNegative:!0,values:Array.from({length:13},(n,f)=>`${f+1}`),valueThemeKeys:["--grid-row-end"]}]),e("float-start",[["float","inline-start"]]),e("float-end",[["float","inline-end"]]),e("float-right",[["float","right"]]),e("float-left",[["float","left"]]),e("float-none",[["float","none"]]),e("clear-start",[["clear","inline-start"]]),e("clear-end",[["clear","inline-end"]]),e("clear-right",[["clear","right"]]),e("clear-left",[["clear","left"]]),e("clear-both",[["clear","both"]]),e("clear-none",[["clear","none"]]);for(let[n,f]of[["m","margin"],["mx","margin-inline"],["my","margin-block"],["ms","margin-inline-start"],["me","margin-inline-end"],["mt","margin-top"],["mr","margin-right"],["mb","margin-bottom"],["ml","margin-left"]])e(`${n}-auto`,[[f,"auto"]]),l(n,["--margin","--spacing"],p=>[a(f,p)],{supportsNegative:!0});e("box-border",[["box-sizing","border-box"]]),e("box-content",[["box-sizing","content-box"]]),e("line-clamp-none",[["overflow","visible"],["display","block"],["-webkit-box-orient","horizontal"],["-webkit-line-clamp","unset"]]),o("line-clamp",{themeKeys:["--line-clamp"],handleBareValue:({value:n})=>E(n)?n:null,handle:n=>[a("overflow","hidden"),a("display","-webkit-box"),a("-webkit-box-orient","vertical"),a("-webkit-line-clamp",n)]}),i("line-clamp",()=>[{values:["1","2","3","4","5","6"],valueThemeKeys:["--line-clamp"]}]),e("block",[["display","block"]]),e("inline-block",[["display","inline-block"]]),e("inline",[["display","inline"]]),e("hidden",[["display","none"]]),e("inline-flex",[["display","inline-flex"]]),e("table",[["display","table"]]),e("inline-table",[["display","inline-table"]]),e("table-caption",[["display","table-caption"]]),e("table-cell",[["display","table-cell"]]),e("table-column",[["display","table-column"]]),e("table-column-group",[["display","table-column-group"]]),e("table-footer-group",[["display","table-footer-group"]]),e("table-header-group",[["display","table-header-group"]]),e("table-row-group",[["display","table-row-group"]]),e("table-row",[["display","table-row"]]),e("flow-root",[["display","flow-root"]]),e("flex",[["display","flex"]]),e("grid",[["display","grid"]]),e("inline-grid",[["display","inline-grid"]]),e("contents",[["display","contents"]]),e("list-item",[["display","list-item"]]),e("field-sizing-content",[["field-sizing","content"]]),e("field-sizing-fixed",[["field-sizing","fixed"]]),e("aspect-auto",[["aspect-ratio","auto"]]),e("aspect-square",[["aspect-ratio","1 / 1"]]),o("aspect",{themeKeys:["--aspect"],handleBareValue:({fraction:n})=>{if(n===null)return null;let[f,p]=_(n,"/");return!E(f)||!E(p)?null:n},handle:n=>[a("aspect-ratio",n)]});for(let[n,f]of[["full","100%"],["svw","100svw"],["lvw","100lvw"],["dvw","100dvw"],["svh","100svh"],["lvh","100lvh"],["dvh","100dvh"],["min","min-content"],["max","max-content"],["fit","fit-content"]])e(`size-${n}`,[["--tw-sort","size"],["width",f],["height",f]]),e(`w-${n}`,[["width",f]]),e(`h-${n}`,[["height",f]]),e(`min-w-${n}`,[["min-width",f]]),e(`min-h-${n}`,[["min-height",f]]),e(`max-w-${n}`,[["max-width",f]]),e(`max-h-${n}`,[["max-height",f]]);e("size-auto",[["--tw-sort","size"],["width","auto"],["height","auto"]]),e("w-auto",[["width","auto"]]),e("h-auto",[["height","auto"]]),e("min-w-auto",[["min-width","auto"]]),e("min-h-auto",[["min-height","auto"]]),e("h-lh",[["height","1lh"]]),e("min-h-lh",[["min-height","1lh"]]),e("max-h-lh",[["max-height","1lh"]]),e("w-screen",[["width","100vw"]]),e("min-w-screen",[["min-width","100vw"]]),e("max-w-screen",[["max-width","100vw"]]),e("h-screen",[["height","100vh"]]),e("min-h-screen",[["min-height","100vh"]]),e("max-h-screen",[["max-height","100vh"]]),e("max-w-none",[["max-width","none"]]),e("max-h-none",[["max-height","none"]]),l("size",["--size","--spacing"],n=>[a("--tw-sort","size"),a("width",n),a("height",n)],{supportsFractions:!0});for(let[n,f,p]of[["w",["--width","--spacing","--container"],"width"],["min-w",["--min-width","--spacing","--container"],"min-width"],["max-w",["--max-width","--spacing","--container"],"max-width"],["h",["--height","--spacing"],"height"],["min-h",["--min-height","--height","--spacing"],"min-height"],["max-h",["--max-height","--height","--spacing"],"max-height"]])l(n,f,x=>[a(p,x)],{supportsFractions:!0});t.static("container",()=>{let n=[...r.namespace("--breakpoint").values()];n.sort((p,x)=>ve(p,x,"asc"));let f=[a("--tw-sort","--tw-container-component"),a("width","100%")];for(let p of n)f.push(I("@media",`(width >= ${p})`,[a("max-width",p)]));return f}),e("flex-auto",[["flex","auto"]]),e("flex-initial",[["flex","0 auto"]]),e("flex-none",[["flex","none"]]),t.functional("flex",n=>{if(n.value){if(n.value.kind==="arbitrary")return n.modifier?void 0:[a("flex",n.value.value)];if(n.value.fraction){let[f,p]=_(n.value.fraction,"/");return!E(f)||!E(p)?void 0:[a("flex",`calc(${n.value.fraction} * 100%)`)]}if(E(n.value.value))return n.modifier?void 0:[a("flex",n.value.value)]}}),i("flex",()=>[{supportsFractions:!0}]),o("shrink",{defaultValue:"1",handleBareValue:({value:n})=>E(n)?n:null,handle:n=>[a("flex-shrink",n)]}),o("grow",{defaultValue:"1",handleBareValue:({value:n})=>E(n)?n:null,handle:n=>[a("flex-grow",n)]}),i("shrink",()=>[{values:["0"],valueThemeKeys:[],hasDefaultValue:!0}]),i("grow",()=>[{values:["0"],valueThemeKeys:[],hasDefaultValue:!0}]),e("basis-auto",[["flex-basis","auto"]]),e("basis-full",[["flex-basis","100%"]]),l("basis",["--flex-basis","--spacing","--container"],n=>[a("flex-basis",n)],{supportsFractions:!0}),e("table-auto",[["table-layout","auto"]]),e("table-fixed",[["table-layout","fixed"]]),e("caption-top",[["caption-side","top"]]),e("caption-bottom",[["caption-side","bottom"]]),e("border-collapse",[["border-collapse","collapse"]]),e("border-separate",[["border-collapse","separate"]]);let d=()=>D([$("--tw-border-spacing-x","0",""),$("--tw-border-spacing-y","0","")]);l("border-spacing",["--border-spacing","--spacing"],n=>[d(),a("--tw-border-spacing-x",n),a("--tw-border-spacing-y",n),a("border-spacing","var(--tw-border-spacing-x) var(--tw-border-spacing-y)")]),l("border-spacing-x",["--border-spacing","--spacing"],n=>[d(),a("--tw-border-spacing-x",n),a("border-spacing","var(--tw-border-spacing-x) var(--tw-border-spacing-y)")]),l("border-spacing-y",["--border-spacing","--spacing"],n=>[d(),a("--tw-border-spacing-y",n),a("border-spacing","var(--tw-border-spacing-x) var(--tw-border-spacing-y)")]),e("origin-center",[["transform-origin","center"]]),e("origin-top",[["transform-origin","top"]]),e("origin-top-right",[["transform-origin","top right"]]),e("origin-right",[["transform-origin","right"]]),e("origin-bottom-right",[["transform-origin","bottom right"]]),e("origin-bottom",[["transform-origin","bottom"]]),e("origin-bottom-left",[["transform-origin","bottom left"]]),e("origin-left",[["transform-origin","left"]]),e("origin-top-left",[["transform-origin","top left"]]),o("origin",{themeKeys:["--transform-origin"],handle:n=>[a("transform-origin",n)]}),e("perspective-origin-center",[["perspective-origin","center"]]),e("perspective-origin-top",[["perspective-origin","top"]]),e("perspective-origin-top-right",[["perspective-origin","top right"]]),e("perspective-origin-right",[["perspective-origin","right"]]),e("perspective-origin-bottom-right",[["perspective-origin","bottom right"]]),e("perspective-origin-bottom",[["perspective-origin","bottom"]]),e("perspective-origin-bottom-left",[["perspective-origin","bottom left"]]),e("perspective-origin-left",[["perspective-origin","left"]]),e("perspective-origin-top-left",[["perspective-origin","top left"]]),o("perspective-origin",{themeKeys:["--perspective-origin"],handle:n=>[a("perspective-origin",n)]}),e("perspective-none",[["perspective","none"]]),o("perspective",{themeKeys:["--perspective"],handle:n=>[a("perspective",n)]});let u=()=>D([$("--tw-translate-x","0"),$("--tw-translate-y","0"),$("--tw-translate-z","0")]);e("translate-none",[["translate","none"]]),e("-translate-full",[u,["--tw-translate-x","-100%"],["--tw-translate-y","-100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),e("translate-full",[u,["--tw-translate-x","100%"],["--tw-translate-y","100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),l("translate",["--translate","--spacing"],n=>[u(),a("--tw-translate-x",n),a("--tw-translate-y",n),a("translate","var(--tw-translate-x) var(--tw-translate-y)")],{supportsNegative:!0,supportsFractions:!0});for(let n of["x","y"])e(`-translate-${n}-full`,[u,[`--tw-translate-${n}`,"-100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),e(`translate-${n}-full`,[u,[`--tw-translate-${n}`,"100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),l(`translate-${n}`,["--translate","--spacing"],f=>[u(),a(`--tw-translate-${n}`,f),a("translate","var(--tw-translate-x) var(--tw-translate-y)")],{supportsNegative:!0,supportsFractions:!0});l("translate-z",["--translate","--spacing"],n=>[u(),a("--tw-translate-z",n),a("translate","var(--tw-translate-x) var(--tw-translate-y) var(--tw-translate-z)")],{supportsNegative:!0}),e("translate-3d",[u,["translate","var(--tw-translate-x) var(--tw-translate-y) var(--tw-translate-z)"]]);let c=()=>D([$("--tw-scale-x","1"),$("--tw-scale-y","1"),$("--tw-scale-z","1")]);e("scale-none",[["scale","none"]]);function m({negative:n}){return f=>{if(!f.value||f.modifier)return;let p;return f.value.kind==="arbitrary"?(p=f.value.value,[a("scale",p)]):(p=r.resolve(f.value.value,["--scale"]),!p&&E(f.value.value)&&(p=`${f.value.value}%`),p?(p=n?`calc(${p} * -1)`:p,[c(),a("--tw-scale-x",p),a("--tw-scale-y",p),a("--tw-scale-z",p),a("scale","var(--tw-scale-x) var(--tw-scale-y)")]):void 0)}}t.functional("-scale",m({negative:!0})),t.functional("scale",m({negative:!1})),i("scale",()=>[{supportsNegative:!0,values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--scale"]}]);for(let n of["x","y","z"])o(`scale-${n}`,{supportsNegative:!0,themeKeys:["--scale"],handleBareValue:({value:f})=>E(f)?`${f}%`:null,handle:f=>[c(),a(`--tw-scale-${n}`,f),a("scale",`var(--tw-scale-x) var(--tw-scale-y)${n==="z"?" var(--tw-scale-z)":""}`)]}),i(`scale-${n}`,()=>[{supportsNegative:!0,values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--scale"]}]);e("scale-3d",[c,["scale","var(--tw-scale-x) var(--tw-scale-y) var(--tw-scale-z)"]]),e("rotate-none",[["rotate","none"]]);function g({negative:n}){return f=>{if(!f.value||f.modifier)return;let p;if(f.value.kind==="arbitrary"){p=f.value.value;let x=f.value.dataType??W(p,["angle","vector"]);if(x==="vector")return[a("rotate",`${p} var(--tw-rotate)`)];if(x!=="angle")return[a("rotate",p)]}else if(p=r.resolve(f.value.value,["--rotate"]),!p&&E(f.value.value)&&(p=`${f.value.value}deg`),!p)return;return[a("rotate",n?`calc(${p} * -1)`:p)]}}t.functional("-rotate",g({negative:!0})),t.functional("rotate",g({negative:!1})),i("rotate",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"],valueThemeKeys:["--rotate"]}]);{let n=["var(--tw-rotate-x,)","var(--tw-rotate-y,)","var(--tw-rotate-z,)","var(--tw-skew-x,)","var(--tw-skew-y,)"].join(" "),f=()=>D([$("--tw-rotate-x"),$("--tw-rotate-y"),$("--tw-rotate-z"),$("--tw-skew-x"),$("--tw-skew-y")]);for(let p of["x","y","z"])o(`rotate-${p}`,{supportsNegative:!0,themeKeys:["--rotate"],handleBareValue:({value:x})=>E(x)?`${x}deg`:null,handle:x=>[f(),a(`--tw-rotate-${p}`,`rotate${p.toUpperCase()}(${x})`),a("transform",n)]}),i(`rotate-${p}`,()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"],valueThemeKeys:["--rotate"]}]);o("skew",{supportsNegative:!0,themeKeys:["--skew"],handleBareValue:({value:p})=>E(p)?`${p}deg`:null,handle:p=>[f(),a("--tw-skew-x",`skewX(${p})`),a("--tw-skew-y",`skewY(${p})`),a("transform",n)]}),o("skew-x",{supportsNegative:!0,themeKeys:["--skew"],handleBareValue:({value:p})=>E(p)?`${p}deg`:null,handle:p=>[f(),a("--tw-skew-x",`skewX(${p})`),a("transform",n)]}),o("skew-y",{supportsNegative:!0,themeKeys:["--skew"],handleBareValue:({value:p})=>E(p)?`${p}deg`:null,handle:p=>[f(),a("--tw-skew-y",`skewY(${p})`),a("transform",n)]}),i("skew",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12"],valueThemeKeys:["--skew"]}]),i("skew-x",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12"],valueThemeKeys:["--skew"]}]),i("skew-y",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12"],valueThemeKeys:["--skew"]}]),t.functional("transform",p=>{if(p.modifier)return;let x=null;if(p.value?p.value.kind==="arbitrary"&&(x=p.value.value):x=n,x!==null)return[f(),a("transform",x)]}),i("transform",()=>[{hasDefaultValue:!0}]),e("transform-cpu",[["transform",n]]),e("transform-gpu",[["transform",`translateZ(0) ${n}`]]),e("transform-none",[["transform","none"]])}e("transform-flat",[["transform-style","flat"]]),e("transform-3d",[["transform-style","preserve-3d"]]),e("transform-content",[["transform-box","content-box"]]),e("transform-border",[["transform-box","border-box"]]),e("transform-fill",[["transform-box","fill-box"]]),e("transform-stroke",[["transform-box","stroke-box"]]),e("transform-view",[["transform-box","view-box"]]),e("backface-visible",[["backface-visibility","visible"]]),e("backface-hidden",[["backface-visibility","hidden"]]);for(let n of["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out"])e(`cursor-${n}`,[["cursor",n]]);o("cursor",{themeKeys:["--cursor"],handle:n=>[a("cursor",n)]});for(let n of["auto","none","manipulation"])e(`touch-${n}`,[["touch-action",n]]);let h=()=>D([$("--tw-pan-x"),$("--tw-pan-y"),$("--tw-pinch-zoom")]);for(let n of["x","left","right"])e(`touch-pan-${n}`,[h,["--tw-pan-x",`pan-${n}`],["touch-action","var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)"]]);for(let n of["y","up","down"])e(`touch-pan-${n}`,[h,["--tw-pan-y",`pan-${n}`],["touch-action","var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)"]]);e("touch-pinch-zoom",[h,["--tw-pinch-zoom","pinch-zoom"],["touch-action","var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)"]]);for(let n of["none","text","all","auto"])e(`select-${n}`,[["-webkit-user-select",n],["user-select",n]]);e("resize-none",[["resize","none"]]),e("resize-x",[["resize","horizontal"]]),e("resize-y",[["resize","vertical"]]),e("resize",[["resize","both"]]),e("snap-none",[["scroll-snap-type","none"]]);let w=()=>D([$("--tw-scroll-snap-strictness","proximity","*")]);for(let n of["x","y","both"])e(`snap-${n}`,[w,["scroll-snap-type",`${n} var(--tw-scroll-snap-strictness)`]]);e("snap-mandatory",[w,["--tw-scroll-snap-strictness","mandatory"]]),e("snap-proximity",[w,["--tw-scroll-snap-strictness","proximity"]]),e("snap-align-none",[["scroll-snap-align","none"]]),e("snap-start",[["scroll-snap-align","start"]]),e("snap-end",[["scroll-snap-align","end"]]),e("snap-center",[["scroll-snap-align","center"]]),e("snap-normal",[["scroll-snap-stop","normal"]]),e("snap-always",[["scroll-snap-stop","always"]]);for(let[n,f]of[["scroll-m","scroll-margin"],["scroll-mx","scroll-margin-inline"],["scroll-my","scroll-margin-block"],["scroll-ms","scroll-margin-inline-start"],["scroll-me","scroll-margin-inline-end"],["scroll-mt","scroll-margin-top"],["scroll-mr","scroll-margin-right"],["scroll-mb","scroll-margin-bottom"],["scroll-ml","scroll-margin-left"]])l(n,["--scroll-margin","--spacing"],p=>[a(f,p)],{supportsNegative:!0});for(let[n,f]of[["scroll-p","scroll-padding"],["scroll-px","scroll-padding-inline"],["scroll-py","scroll-padding-block"],["scroll-ps","scroll-padding-inline-start"],["scroll-pe","scroll-padding-inline-end"],["scroll-pt","scroll-padding-top"],["scroll-pr","scroll-padding-right"],["scroll-pb","scroll-padding-bottom"],["scroll-pl","scroll-padding-left"]])l(n,["--scroll-padding","--spacing"],p=>[a(f,p)]);e("list-inside",[["list-style-position","inside"]]),e("list-outside",[["list-style-position","outside"]]),e("list-none",[["list-style-type","none"]]),e("list-disc",[["list-style-type","disc"]]),e("list-decimal",[["list-style-type","decimal"]]),o("list",{themeKeys:["--list-style-type"],handle:n=>[a("list-style-type",n)]}),e("list-image-none",[["list-style-image","none"]]),o("list-image",{themeKeys:["--list-style-image"],handle:n=>[a("list-style-image",n)]}),e("appearance-none",[["appearance","none"]]),e("appearance-auto",[["appearance","auto"]]),e("scheme-normal",[["color-scheme","normal"]]),e("scheme-dark",[["color-scheme","dark"]]),e("scheme-light",[["color-scheme","light"]]),e("scheme-light-dark",[["color-scheme","light dark"]]),e("scheme-only-dark",[["color-scheme","only dark"]]),e("scheme-only-light",[["color-scheme","only light"]]),e("columns-auto",[["columns","auto"]]),o("columns",{themeKeys:["--columns","--container"],handleBareValue:({value:n})=>E(n)?n:null,handle:n=>[a("columns",n)]}),i("columns",()=>[{values:Array.from({length:12},(n,f)=>`${f+1}`),valueThemeKeys:["--columns","--container"]}]);for(let n of["auto","avoid","all","avoid-page","page","left","right","column"])e(`break-before-${n}`,[["break-before",n]]);for(let n of["auto","avoid","avoid-page","avoid-column"])e(`break-inside-${n}`,[["break-inside",n]]);for(let n of["auto","avoid","all","avoid-page","page","left","right","column"])e(`break-after-${n}`,[["break-after",n]]);e("grid-flow-row",[["grid-auto-flow","row"]]),e("grid-flow-col",[["grid-auto-flow","column"]]),e("grid-flow-dense",[["grid-auto-flow","dense"]]),e("grid-flow-row-dense",[["grid-auto-flow","row dense"]]),e("grid-flow-col-dense",[["grid-auto-flow","column dense"]]),e("auto-cols-auto",[["grid-auto-columns","auto"]]),e("auto-cols-min",[["grid-auto-columns","min-content"]]),e("auto-cols-max",[["grid-auto-columns","max-content"]]),e("auto-cols-fr",[["grid-auto-columns","minmax(0, 1fr)"]]),o("auto-cols",{themeKeys:["--grid-auto-columns"],handle:n=>[a("grid-auto-columns",n)]}),e("auto-rows-auto",[["grid-auto-rows","auto"]]),e("auto-rows-min",[["grid-auto-rows","min-content"]]),e("auto-rows-max",[["grid-auto-rows","max-content"]]),e("auto-rows-fr",[["grid-auto-rows","minmax(0, 1fr)"]]),o("auto-rows",{themeKeys:["--grid-auto-rows"],handle:n=>[a("grid-auto-rows",n)]}),e("grid-cols-none",[["grid-template-columns","none"]]),e("grid-cols-subgrid",[["grid-template-columns","subgrid"]]),o("grid-cols",{themeKeys:["--grid-template-columns"],handleBareValue:({value:n})=>rt(n)?`repeat(${n}, minmax(0, 1fr))`:null,handle:n=>[a("grid-template-columns",n)]}),e("grid-rows-none",[["grid-template-rows","none"]]),e("grid-rows-subgrid",[["grid-template-rows","subgrid"]]),o("grid-rows",{themeKeys:["--grid-template-rows"],handleBareValue:({value:n})=>rt(n)?`repeat(${n}, minmax(0, 1fr))`:null,handle:n=>[a("grid-template-rows",n)]}),i("grid-cols",()=>[{values:Array.from({length:12},(n,f)=>`${f+1}`),valueThemeKeys:["--grid-template-columns"]}]),i("grid-rows",()=>[{values:Array.from({length:12},(n,f)=>`${f+1}`),valueThemeKeys:["--grid-template-rows"]}]),e("flex-row",[["flex-direction","row"]]),e("flex-row-reverse",[["flex-direction","row-reverse"]]),e("flex-col",[["flex-direction","column"]]),e("flex-col-reverse",[["flex-direction","column-reverse"]]),e("flex-wrap",[["flex-wrap","wrap"]]),e("flex-nowrap",[["flex-wrap","nowrap"]]),e("flex-wrap-reverse",[["flex-wrap","wrap-reverse"]]),e("place-content-center",[["place-content","center"]]),e("place-content-start",[["place-content","start"]]),e("place-content-end",[["place-content","end"]]),e("place-content-center-safe",[["place-content","safe center"]]),e("place-content-end-safe",[["place-content","safe end"]]),e("place-content-between",[["place-content","space-between"]]),e("place-content-around",[["place-content","space-around"]]),e("place-content-evenly",[["place-content","space-evenly"]]),e("place-content-baseline",[["place-content","baseline"]]),e("place-content-stretch",[["place-content","stretch"]]),e("place-items-center",[["place-items","center"]]),e("place-items-start",[["place-items","start"]]),e("place-items-end",[["place-items","end"]]),e("place-items-center-safe",[["place-items","safe center"]]),e("place-items-end-safe",[["place-items","safe end"]]),e("place-items-baseline",[["place-items","baseline"]]),e("place-items-stretch",[["place-items","stretch"]]),e("content-normal",[["align-content","normal"]]),e("content-center",[["align-content","center"]]),e("content-start",[["align-content","flex-start"]]),e("content-end",[["align-content","flex-end"]]),e("content-center-safe",[["align-content","safe center"]]),e("content-end-safe",[["align-content","safe flex-end"]]),e("content-between",[["align-content","space-between"]]),e("content-around",[["align-content","space-around"]]),e("content-evenly",[["align-content","space-evenly"]]),e("content-baseline",[["align-content","baseline"]]),e("content-stretch",[["align-content","stretch"]]),e("items-center",[["align-items","center"]]),e("items-start",[["align-items","flex-start"]]),e("items-end",[["align-items","flex-end"]]),e("items-center-safe",[["align-items","safe center"]]),e("items-end-safe",[["align-items","safe flex-end"]]),e("items-baseline",[["align-items","baseline"]]),e("items-baseline-last",[["align-items","last baseline"]]),e("items-stretch",[["align-items","stretch"]]),e("justify-normal",[["justify-content","normal"]]),e("justify-center",[["justify-content","center"]]),e("justify-start",[["justify-content","flex-start"]]),e("justify-end",[["justify-content","flex-end"]]),e("justify-center-safe",[["justify-content","safe center"]]),e("justify-end-safe",[["justify-content","safe flex-end"]]),e("justify-between",[["justify-content","space-between"]]),e("justify-around",[["justify-content","space-around"]]),e("justify-evenly",[["justify-content","space-evenly"]]),e("justify-baseline",[["justify-content","baseline"]]),e("justify-stretch",[["justify-content","stretch"]]),e("justify-items-normal",[["justify-items","normal"]]),e("justify-items-center",[["justify-items","center"]]),e("justify-items-start",[["justify-items","start"]]),e("justify-items-end",[["justify-items","end"]]),e("justify-items-center-safe",[["justify-items","safe center"]]),e("justify-items-end-safe",[["justify-items","safe end"]]),e("justify-items-stretch",[["justify-items","stretch"]]),l("gap",["--gap","--spacing"],n=>[a("gap",n)]),l("gap-x",["--gap","--spacing"],n=>[a("column-gap",n)]),l("gap-y",["--gap","--spacing"],n=>[a("row-gap",n)]),l("space-x",["--space","--spacing"],n=>[D([$("--tw-space-x-reverse","0")]),L(":where(& > :not(:last-child))",[a("--tw-sort","row-gap"),a("--tw-space-x-reverse","0"),a("margin-inline-start",`calc(${n} * var(--tw-space-x-reverse))`),a("margin-inline-end",`calc(${n} * calc(1 - var(--tw-space-x-reverse)))`)])],{supportsNegative:!0}),l("space-y",["--space","--spacing"],n=>[D([$("--tw-space-y-reverse","0")]),L(":where(& > :not(:last-child))",[a("--tw-sort","column-gap"),a("--tw-space-y-reverse","0"),a("margin-block-start",`calc(${n} * var(--tw-space-y-reverse))`),a("margin-block-end",`calc(${n} * calc(1 - var(--tw-space-y-reverse)))`)])],{supportsNegative:!0}),e("space-x-reverse",[()=>D([$("--tw-space-x-reverse","0")]),()=>L(":where(& > :not(:last-child))",[a("--tw-sort","row-gap"),a("--tw-space-x-reverse","1")])]),e("space-y-reverse",[()=>D([$("--tw-space-y-reverse","0")]),()=>L(":where(& > :not(:last-child))",[a("--tw-sort","column-gap"),a("--tw-space-y-reverse","1")])]),e("accent-auto",[["accent-color","auto"]]),s("accent",{themeKeys:["--accent-color","--color"],handle:n=>[a("accent-color",n)]}),s("caret",{themeKeys:["--caret-color","--color"],handle:n=>[a("caret-color",n)]}),s("divide",{themeKeys:["--divide-color","--color"],handle:n=>[L(":where(& > :not(:last-child))",[a("--tw-sort","divide-color"),a("border-color",n)])]}),e("place-self-auto",[["place-self","auto"]]),e("place-self-start",[["place-self","start"]]),e("place-self-end",[["place-self","end"]]),e("place-self-center",[["place-self","center"]]),e("place-self-end-safe",[["place-self","safe end"]]),e("place-self-center-safe",[["place-self","safe center"]]),e("place-self-stretch",[["place-self","stretch"]]),e("self-auto",[["align-self","auto"]]),e("self-start",[["align-self","flex-start"]]),e("self-end",[["align-self","flex-end"]]),e("self-center",[["align-self","center"]]),e("self-end-safe",[["align-self","safe flex-end"]]),e("self-center-safe",[["align-self","safe center"]]),e("self-stretch",[["align-self","stretch"]]),e("self-baseline",[["align-self","baseline"]]),e("self-baseline-last",[["align-self","last baseline"]]),e("justify-self-auto",[["justify-self","auto"]]),e("justify-self-start",[["justify-self","flex-start"]]),e("justify-self-end",[["justify-self","flex-end"]]),e("justify-self-center",[["justify-self","center"]]),e("justify-self-end-safe",[["justify-self","safe flex-end"]]),e("justify-self-center-safe",[["justify-self","safe center"]]),e("justify-self-stretch",[["justify-self","stretch"]]);for(let n of["auto","hidden","clip","visible","scroll"])e(`overflow-${n}`,[["overflow",n]]),e(`overflow-x-${n}`,[["overflow-x",n]]),e(`overflow-y-${n}`,[["overflow-y",n]]);for(let n of["auto","contain","none"])e(`overscroll-${n}`,[["overscroll-behavior",n]]),e(`overscroll-x-${n}`,[["overscroll-behavior-x",n]]),e(`overscroll-y-${n}`,[["overscroll-behavior-y",n]]);e("scroll-auto",[["scroll-behavior","auto"]]),e("scroll-smooth",[["scroll-behavior","smooth"]]),e("truncate",[["overflow","hidden"],["text-overflow","ellipsis"],["white-space","nowrap"]]),e("text-ellipsis",[["text-overflow","ellipsis"]]),e("text-clip",[["text-overflow","clip"]]),e("hyphens-none",[["-webkit-hyphens","none"],["hyphens","none"]]),e("hyphens-manual",[["-webkit-hyphens","manual"],["hyphens","manual"]]),e("hyphens-auto",[["-webkit-hyphens","auto"],["hyphens","auto"]]),e("whitespace-normal",[["white-space","normal"]]),e("whitespace-nowrap",[["white-space","nowrap"]]),e("whitespace-pre",[["white-space","pre"]]),e("whitespace-pre-line",[["white-space","pre-line"]]),e("whitespace-pre-wrap",[["white-space","pre-wrap"]]),e("whitespace-break-spaces",[["white-space","break-spaces"]]),e("text-wrap",[["text-wrap","wrap"]]),e("text-nowrap",[["text-wrap","nowrap"]]),e("text-balance",[["text-wrap","balance"]]),e("text-pretty",[["text-wrap","pretty"]]),e("break-normal",[["overflow-wrap","normal"],["word-break","normal"]]),e("break-words",[["overflow-wrap","break-word"]]),e("break-all",[["word-break","break-all"]]),e("break-keep",[["word-break","keep-all"]]),e("wrap-anywhere",[["overflow-wrap","anywhere"]]),e("wrap-break-word",[["overflow-wrap","break-word"]]),e("wrap-normal",[["overflow-wrap","normal"]]);for(let[n,f]of[["rounded",["border-radius"]],["rounded-s",["border-start-start-radius","border-end-start-radius"]],["rounded-e",["border-start-end-radius","border-end-end-radius"]],["rounded-t",["border-top-left-radius","border-top-right-radius"]],["rounded-r",["border-top-right-radius","border-bottom-right-radius"]],["rounded-b",["border-bottom-right-radius","border-bottom-left-radius"]],["rounded-l",["border-top-left-radius","border-bottom-left-radius"]],["rounded-ss",["border-start-start-radius"]],["rounded-se",["border-start-end-radius"]],["rounded-ee",["border-end-end-radius"]],["rounded-es",["border-end-start-radius"]],["rounded-tl",["border-top-left-radius"]],["rounded-tr",["border-top-right-radius"]],["rounded-br",["border-bottom-right-radius"]],["rounded-bl",["border-bottom-left-radius"]]])e(`${n}-none`,f.map(p=>[p,"0"])),e(`${n}-full`,f.map(p=>[p,"calc(infinity * 1px)"])),o(n,{themeKeys:["--radius"],handle:p=>f.map(x=>a(x,p))});e("border-solid",[["--tw-border-style","solid"],["border-style","solid"]]),e("border-dashed",[["--tw-border-style","dashed"],["border-style","dashed"]]),e("border-dotted",[["--tw-border-style","dotted"],["border-style","dotted"]]),e("border-double",[["--tw-border-style","double"],["border-style","double"]]),e("border-hidden",[["--tw-border-style","hidden"],["border-style","hidden"]]),e("border-none",[["--tw-border-style","none"],["border-style","none"]]);{let f=function(p,x){t.functional(p,y=>{if(!y.value){if(y.modifier)return;let C=r.get(["--default-border-width"])??"1px",K=x.width(C);return K?[n(),...K]:void 0}if(y.value.kind==="arbitrary"){let C=y.value.value;switch(y.value.dataType??W(C,["color","line-width","length"])){case"line-width":case"length":{if(y.modifier)return;let N=x.width(C);return N?[n(),...N]:void 0}default:return C=Z(C,y.modifier,r),C===null?void 0:x.color(C)}}{let C=Q(y,r,["--border-color","--color"]);if(C)return x.color(C)}{if(y.modifier)return;let C=r.resolve(y.value.value,["--border-width"]);if(C){let K=x.width(C);return K?[n(),...K]:void 0}if(E(y.value.value)){let K=x.width(`${y.value.value}px`);return K?[n(),...K]:void 0}}}),i(p,()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--border-color","--color"],modifiers:Array.from({length:21},(y,C)=>`${C*5}`),hasDefaultValue:!0},{values:["0","2","4","8"],valueThemeKeys:["--border-width"]}])};var H=f;let n=()=>D([$("--tw-border-style","solid")]);f("border",{width:p=>[a("border-style","var(--tw-border-style)"),a("border-width",p)],color:p=>[a("border-color",p)]}),f("border-x",{width:p=>[a("border-inline-style","var(--tw-border-style)"),a("border-inline-width",p)],color:p=>[a("border-inline-color",p)]}),f("border-y",{width:p=>[a("border-block-style","var(--tw-border-style)"),a("border-block-width",p)],color:p=>[a("border-block-color",p)]}),f("border-s",{width:p=>[a("border-inline-start-style","var(--tw-border-style)"),a("border-inline-start-width",p)],color:p=>[a("border-inline-start-color",p)]}),f("border-e",{width:p=>[a("border-inline-end-style","var(--tw-border-style)"),a("border-inline-end-width",p)],color:p=>[a("border-inline-end-color",p)]}),f("border-t",{width:p=>[a("border-top-style","var(--tw-border-style)"),a("border-top-width",p)],color:p=>[a("border-top-color",p)]}),f("border-r",{width:p=>[a("border-right-style","var(--tw-border-style)"),a("border-right-width",p)],color:p=>[a("border-right-color",p)]}),f("border-b",{width:p=>[a("border-bottom-style","var(--tw-border-style)"),a("border-bottom-width",p)],color:p=>[a("border-bottom-color",p)]}),f("border-l",{width:p=>[a("border-left-style","var(--tw-border-style)"),a("border-left-width",p)],color:p=>[a("border-left-color",p)]}),o("divide-x",{defaultValue:r.get(["--default-border-width"])??"1px",themeKeys:["--divide-width","--border-width"],handleBareValue:({value:p})=>E(p)?`${p}px`:null,handle:p=>[D([$("--tw-divide-x-reverse","0")]),L(":where(& > :not(:last-child))",[a("--tw-sort","divide-x-width"),n(),a("--tw-divide-x-reverse","0"),a("border-inline-style","var(--tw-border-style)"),a("border-inline-start-width",`calc(${p} * var(--tw-divide-x-reverse))`),a("border-inline-end-width",`calc(${p} * calc(1 - var(--tw-divide-x-reverse)))`)])]}),o("divide-y",{defaultValue:r.get(["--default-border-width"])??"1px",themeKeys:["--divide-width","--border-width"],handleBareValue:({value:p})=>E(p)?`${p}px`:null,handle:p=>[D([$("--tw-divide-y-reverse","0")]),L(":where(& > :not(:last-child))",[a("--tw-sort","divide-y-width"),n(),a("--tw-divide-y-reverse","0"),a("border-bottom-style","var(--tw-border-style)"),a("border-top-style","var(--tw-border-style)"),a("border-top-width",`calc(${p} * var(--tw-divide-y-reverse))`),a("border-bottom-width",`calc(${p} * calc(1 - var(--tw-divide-y-reverse)))`)])]}),i("divide-x",()=>[{values:["0","2","4","8"],valueThemeKeys:["--divide-width","--border-width"],hasDefaultValue:!0}]),i("divide-y",()=>[{values:["0","2","4","8"],valueThemeKeys:["--divide-width","--border-width"],hasDefaultValue:!0}]),e("divide-x-reverse",[()=>D([$("--tw-divide-x-reverse","0")]),()=>L(":where(& > :not(:last-child))",[a("--tw-divide-x-reverse","1")])]),e("divide-y-reverse",[()=>D([$("--tw-divide-y-reverse","0")]),()=>L(":where(& > :not(:last-child))",[a("--tw-divide-y-reverse","1")])]);for(let p of["solid","dashed","dotted","double","none"])e(`divide-${p}`,[()=>L(":where(& > :not(:last-child))",[a("--tw-sort","divide-style"),a("--tw-border-style",p),a("border-style",p)])])}e("bg-auto",[["background-size","auto"]]),e("bg-cover",[["background-size","cover"]]),e("bg-contain",[["background-size","contain"]]),o("bg-size",{handle(n){if(n)return[a("background-size",n)]}}),e("bg-fixed",[["background-attachment","fixed"]]),e("bg-local",[["background-attachment","local"]]),e("bg-scroll",[["background-attachment","scroll"]]),e("bg-top",[["background-position","top"]]),e("bg-top-left",[["background-position","left top"]]),e("bg-top-right",[["background-position","right top"]]),e("bg-bottom",[["background-position","bottom"]]),e("bg-bottom-left",[["background-position","left bottom"]]),e("bg-bottom-right",[["background-position","right bottom"]]),e("bg-left",[["background-position","left"]]),e("bg-right",[["background-position","right"]]),e("bg-center",[["background-position","center"]]),o("bg-position",{handle(n){if(n)return[a("background-position",n)]}}),e("bg-repeat",[["background-repeat","repeat"]]),e("bg-no-repeat",[["background-repeat","no-repeat"]]),e("bg-repeat-x",[["background-repeat","repeat-x"]]),e("bg-repeat-y",[["background-repeat","repeat-y"]]),e("bg-repeat-round",[["background-repeat","round"]]),e("bg-repeat-space",[["background-repeat","space"]]),e("bg-none",[["background-image","none"]]);{let p=function(C){let K="in oklab";if(C?.kind==="named")switch(C.value){case"longer":case"shorter":case"increasing":case"decreasing":K=`in oklch ${C.value} hue`;break;default:K=`in ${C.value}`}else C?.kind==="arbitrary"&&(K=C.value);return K},x=function({negative:C}){return K=>{if(!K.value)return;if(K.value.kind==="arbitrary"){if(K.modifier)return;let j=K.value.value;switch(K.value.dataType??W(j,["angle"])){case"angle":return j=C?`calc(${j} * -1)`:`${j}`,[a("--tw-gradient-position",j),a("background-image",`linear-gradient(var(--tw-gradient-stops,${j}))`)];default:return C?void 0:[a("--tw-gradient-position",j),a("background-image",`linear-gradient(var(--tw-gradient-stops,${j}))`)]}}let N=K.value.value;if(!C&&f.has(N))N=f.get(N);else if(E(N))N=C?`calc(${N}deg * -1)`:`${N}deg`;else return;let T=p(K.modifier);return[a("--tw-gradient-position",`${N}`),B("@supports (background-image: linear-gradient(in lab, red, red))",[a("--tw-gradient-position",`${N} ${T}`)]),a("background-image","linear-gradient(var(--tw-gradient-stops))")]}},y=function({negative:C}){return K=>{if(K.value?.kind==="arbitrary"){if(K.modifier)return;let j=K.value.value;return[a("--tw-gradient-position",j),a("background-image",`conic-gradient(var(--tw-gradient-stops,${j}))`)]}let N=p(K.modifier);if(!K.value)return[a("--tw-gradient-position",N),a("background-image","conic-gradient(var(--tw-gradient-stops))")];let T=K.value.value;if(E(T))return T=C?`calc(${T}deg * -1)`:`${T}deg`,[a("--tw-gradient-position",`from ${T} ${N}`),a("background-image","conic-gradient(var(--tw-gradient-stops))")]}};var M=p,z=x,te=y;let n=["oklab","oklch","srgb","hsl","longer","shorter","increasing","decreasing"],f=new Map([["to-t","to top"],["to-tr","to top right"],["to-r","to right"],["to-br","to bottom right"],["to-b","to bottom"],["to-bl","to bottom left"],["to-l","to left"],["to-tl","to top left"]]);t.functional("-bg-linear",x({negative:!0})),t.functional("bg-linear",x({negative:!1})),i("bg-linear",()=>[{values:[...f.keys()],modifiers:n},{values:["0","30","60","90","120","150","180","210","240","270","300","330"],supportsNegative:!0,modifiers:n}]),t.functional("-bg-conic",y({negative:!0})),t.functional("bg-conic",y({negative:!1})),i("bg-conic",()=>[{hasDefaultValue:!0,modifiers:n},{values:["0","30","60","90","120","150","180","210","240","270","300","330"],supportsNegative:!0,modifiers:n}]),t.functional("bg-radial",C=>{if(!C.value){let K=p(C.modifier);return[a("--tw-gradient-position",K),a("background-image","radial-gradient(var(--tw-gradient-stops))")]}if(C.value.kind==="arbitrary"){if(C.modifier)return;let K=C.value.value;return[a("--tw-gradient-position",K),a("background-image",`radial-gradient(var(--tw-gradient-stops,${K}))`)]}}),i("bg-radial",()=>[{hasDefaultValue:!0,modifiers:n}])}t.functional("bg",n=>{if(n.value){if(n.value.kind==="arbitrary"){let f=n.value.value;switch(n.value.dataType??W(f,["image","color","percentage","position","bg-size","length","url"])){case"percentage":case"position":return n.modifier?void 0:[a("background-position",f)];case"bg-size":case"length":case"size":return n.modifier?void 0:[a("background-size",f)];case"image":case"url":return n.modifier?void 0:[a("background-image",f)];default:return f=Z(f,n.modifier,r),f===null?void 0:[a("background-color",f)]}}{let f=Q(n,r,["--background-color","--color"]);if(f)return[a("background-color",f)]}{if(n.modifier)return;let f=r.resolve(n.value.value,["--background-image"]);if(f)return[a("background-image",f)]}}}),i("bg",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(n,f)=>`${f*5}`)},{values:[],valueThemeKeys:["--background-image"]}]);let v=()=>D([$("--tw-gradient-position"),$("--tw-gradient-from","#0000",""),$("--tw-gradient-via","#0000",""),$("--tw-gradient-to","#0000",""),$("--tw-gradient-stops"),$("--tw-gradient-via-stops"),$("--tw-gradient-from-position","0%",""),$("--tw-gradient-via-position","50%",""),$("--tw-gradient-to-position","100%","")]);function A(n,f){t.functional(n,p=>{if(p.value){if(p.value.kind==="arbitrary"){let x=p.value.value;switch(p.value.dataType??W(x,["color","length","percentage"])){case"length":case"percentage":return p.modifier?void 0:f.position(x);default:return x=Z(x,p.modifier,r),x===null?void 0:f.color(x)}}{let x=Q(p,r,["--background-color","--color"]);if(x)return f.color(x)}{if(p.modifier)return;let x=r.resolve(p.value.value,["--gradient-color-stop-positions"]);if(x)return f.position(x);if(p.value.value[p.value.value.length-1]==="%"&&E(p.value.value.slice(0,-1)))return f.position(p.value.value)}}}),i(n,()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(p,x)=>`${x*5}`)},{values:Array.from({length:21},(p,x)=>`${x*5}%`),valueThemeKeys:["--gradient-color-stop-positions"]}])}A("from",{color:n=>[v(),a("--tw-sort","--tw-gradient-from"),a("--tw-gradient-from",n),a("--tw-gradient-stops","var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))")],position:n=>[v(),a("--tw-gradient-from-position",n)]}),e("via-none",[["--tw-gradient-via-stops","initial"]]),A("via",{color:n=>[v(),a("--tw-sort","--tw-gradient-via"),a("--tw-gradient-via",n),a("--tw-gradient-via-stops","var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position)"),a("--tw-gradient-stops","var(--tw-gradient-via-stops)")],position:n=>[v(),a("--tw-gradient-via-position",n)]}),A("to",{color:n=>[v(),a("--tw-sort","--tw-gradient-to"),a("--tw-gradient-to",n),a("--tw-gradient-stops","var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))")],position:n=>[v(),a("--tw-gradient-to-position",n)]}),e("mask-none",[["mask-image","none"]]),t.functional("mask",n=>{if(!n.value||n.modifier||n.value.kind!=="arbitrary")return;let f=n.value.value;switch(n.value.dataType??W(f,["image","percentage","position","bg-size","length","url"])){case"percentage":case"position":return n.modifier?void 0:[a("mask-position",f)];case"bg-size":case"length":case"size":return[a("mask-size",f)];case"image":case"url":default:return[a("mask-image",f)]}}),e("mask-add",[["mask-composite","add"]]),e("mask-subtract",[["mask-composite","subtract"]]),e("mask-intersect",[["mask-composite","intersect"]]),e("mask-exclude",[["mask-composite","exclude"]]),e("mask-alpha",[["mask-mode","alpha"]]),e("mask-luminance",[["mask-mode","luminance"]]),e("mask-match",[["mask-mode","match-source"]]),e("mask-type-alpha",[["mask-type","alpha"]]),e("mask-type-luminance",[["mask-type","luminance"]]),e("mask-auto",[["mask-size","auto"]]),e("mask-cover",[["mask-size","cover"]]),e("mask-contain",[["mask-size","contain"]]),o("mask-size",{handle(n){if(n)return[a("mask-size",n)]}}),e("mask-top",[["mask-position","top"]]),e("mask-top-left",[["mask-position","left top"]]),e("mask-top-right",[["mask-position","right top"]]),e("mask-bottom",[["mask-position","bottom"]]),e("mask-bottom-left",[["mask-position","left bottom"]]),e("mask-bottom-right",[["mask-position","right bottom"]]),e("mask-left",[["mask-position","left"]]),e("mask-right",[["mask-position","right"]]),e("mask-center",[["mask-position","center"]]),o("mask-position",{handle(n){if(n)return[a("mask-position",n)]}}),e("mask-repeat",[["mask-repeat","repeat"]]),e("mask-no-repeat",[["mask-repeat","no-repeat"]]),e("mask-repeat-x",[["mask-repeat","repeat-x"]]),e("mask-repeat-y",[["mask-repeat","repeat-y"]]),e("mask-repeat-round",[["mask-repeat","round"]]),e("mask-repeat-space",[["mask-repeat","space"]]),e("mask-clip-border",[["mask-clip","border-box"]]),e("mask-clip-padding",[["mask-clip","padding-box"]]),e("mask-clip-content",[["mask-clip","content-box"]]),e("mask-clip-fill",[["mask-clip","fill-box"]]),e("mask-clip-stroke",[["mask-clip","stroke-box"]]),e("mask-clip-view",[["mask-clip","view-box"]]),e("mask-no-clip",[["mask-clip","no-clip"]]),e("mask-origin-border",[["mask-origin","border-box"]]),e("mask-origin-padding",[["mask-origin","padding-box"]]),e("mask-origin-content",[["mask-origin","content-box"]]),e("mask-origin-fill",[["mask-origin","fill-box"]]),e("mask-origin-stroke",[["mask-origin","stroke-box"]]),e("mask-origin-view",[["mask-origin","view-box"]]);let k=()=>D([$("--tw-mask-linear","linear-gradient(#fff, #fff)"),$("--tw-mask-radial","linear-gradient(#fff, #fff)"),$("--tw-mask-conic","linear-gradient(#fff, #fff)")]);function b(n,f){t.functional(n,p=>{if(p.value){if(p.value.kind==="arbitrary"){let x=p.value.value;switch(p.value.dataType??W(x,["length","percentage","color"])){case"color":return x=Z(x,p.modifier,r),x===null?void 0:f.color(x);case"percentage":return p.modifier||!E(x.slice(0,-1))?void 0:f.position(x);default:return p.modifier?void 0:f.position(x)}}{let x=Q(p,r,["--background-color","--color"]);if(x)return f.color(x)}{if(p.modifier)return;let x=W(p.value.value,["number","percentage"]);if(!x)return;switch(x){case"number":{let y=r.resolve(null,["--spacing"]);return!y||!de(p.value.value)?void 0:f.position(`calc(${y} * ${p.value.value})`)}case"percentage":return E(p.value.value.slice(0,-1))?f.position(p.value.value):void 0;default:return}}}}),i(n,()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(p,x)=>`${x*5}`)},{values:Array.from({length:21},(p,x)=>`${x*5}%`),valueThemeKeys:["--gradient-color-stop-positions"]}]),i(n,()=>[{values:Array.from({length:21},(p,x)=>`${x*5}%`)},{values:r.get(["--spacing"])?Ge:[]},{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(p,x)=>`${x*5}`)}])}let V=()=>D([$("--tw-mask-left","linear-gradient(#fff, #fff)"),$("--tw-mask-right","linear-gradient(#fff, #fff)"),$("--tw-mask-bottom","linear-gradient(#fff, #fff)"),$("--tw-mask-top","linear-gradient(#fff, #fff)")]);function S(n,f,p){b(n,{color(x){let y=[k(),V(),a("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),a("mask-composite","intersect"),a("--tw-mask-linear","var(--tw-mask-left), var(--tw-mask-right), var(--tw-mask-bottom), var(--tw-mask-top)")];for(let C of["top","right","bottom","left"])p[C]&&(y.push(a(`--tw-mask-${C}`,`linear-gradient(to ${C}, var(--tw-mask-${C}-from-color) var(--tw-mask-${C}-from-position), var(--tw-mask-${C}-to-color) var(--tw-mask-${C}-to-position))`)),y.push(D([$(`--tw-mask-${C}-from-position`,"0%"),$(`--tw-mask-${C}-to-position`,"100%"),$(`--tw-mask-${C}-from-color`,"black"),$(`--tw-mask-${C}-to-color`,"transparent")])),y.push(a(`--tw-mask-${C}-${f}-color`,x)));return y},position(x){let y=[k(),V(),a("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),a("mask-composite","intersect"),a("--tw-mask-linear","var(--tw-mask-left), var(--tw-mask-right), var(--tw-mask-bottom), var(--tw-mask-top)")];for(let C of["top","right","bottom","left"])p[C]&&(y.push(a(`--tw-mask-${C}`,`linear-gradient(to ${C}, var(--tw-mask-${C}-from-color) var(--tw-mask-${C}-from-position), var(--tw-mask-${C}-to-color) var(--tw-mask-${C}-to-position))`)),y.push(D([$(`--tw-mask-${C}-from-position`,"0%"),$(`--tw-mask-${C}-to-position`,"100%"),$(`--tw-mask-${C}-from-color`,"black"),$(`--tw-mask-${C}-to-color`,"transparent")])),y.push(a(`--tw-mask-${C}-${f}-position`,x)));return y}})}S("mask-x-from","from",{top:!1,right:!0,bottom:!1,left:!0}),S("mask-x-to","to",{top:!1,right:!0,bottom:!1,left:!0}),S("mask-y-from","from",{top:!0,right:!1,bottom:!0,left:!1}),S("mask-y-to","to",{top:!0,right:!1,bottom:!0,left:!1}),S("mask-t-from","from",{top:!0,right:!1,bottom:!1,left:!1}),S("mask-t-to","to",{top:!0,right:!1,bottom:!1,left:!1}),S("mask-r-from","from",{top:!1,right:!0,bottom:!1,left:!1}),S("mask-r-to","to",{top:!1,right:!0,bottom:!1,left:!1}),S("mask-b-from","from",{top:!1,right:!1,bottom:!0,left:!1}),S("mask-b-to","to",{top:!1,right:!1,bottom:!0,left:!1}),S("mask-l-from","from",{top:!1,right:!1,bottom:!1,left:!0}),S("mask-l-to","to",{top:!1,right:!1,bottom:!1,left:!0});let R=()=>D([$("--tw-mask-linear-position","0deg"),$("--tw-mask-linear-from-position","0%"),$("--tw-mask-linear-to-position","100%"),$("--tw-mask-linear-from-color","black"),$("--tw-mask-linear-to-color","transparent")]);o("mask-linear",{defaultValue:null,supportsNegative:!0,supportsFractions:!1,handleBareValue(n){return E(n.value)?`calc(1deg * ${n.value})`:null},handleNegativeBareValue(n){return E(n.value)?`calc(1deg * -${n.value})`:null},handle:n=>[k(),R(),a("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),a("mask-composite","intersect"),a("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops, var(--tw-mask-linear-position)))"),a("--tw-mask-linear-position",n)]}),i("mask-linear",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"]}]),b("mask-linear-from",{color:n=>[k(),R(),a("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),a("mask-composite","intersect"),a("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),a("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),a("--tw-mask-linear-from-color",n)],position:n=>[k(),R(),a("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),a("mask-composite","intersect"),a("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),a("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),a("--tw-mask-linear-from-position",n)]}),b("mask-linear-to",{color:n=>[k(),R(),a("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),a("mask-composite","intersect"),a("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),a("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),a("--tw-mask-linear-to-color",n)],position:n=>[k(),R(),a("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),a("mask-composite","intersect"),a("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),a("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),a("--tw-mask-linear-to-position",n)]});let O=()=>D([$("--tw-mask-radial-from-position","0%"),$("--tw-mask-radial-to-position","100%"),$("--tw-mask-radial-from-color","black"),$("--tw-mask-radial-to-color","transparent"),$("--tw-mask-radial-shape","ellipse"),$("--tw-mask-radial-size","farthest-corner"),$("--tw-mask-radial-position","center")]);e("mask-circle",[["--tw-mask-radial-shape","circle"]]),e("mask-ellipse",[["--tw-mask-radial-shape","ellipse"]]),e("mask-radial-closest-side",[["--tw-mask-radial-size","closest-side"]]),e("mask-radial-farthest-side",[["--tw-mask-radial-size","farthest-side"]]),e("mask-radial-closest-corner",[["--tw-mask-radial-size","closest-corner"]]),e("mask-radial-farthest-corner",[["--tw-mask-radial-size","farthest-corner"]]),e("mask-radial-at-top",[["--tw-mask-radial-position","top"]]),e("mask-radial-at-top-left",[["--tw-mask-radial-position","top left"]]),e("mask-radial-at-top-right",[["--tw-mask-radial-position","top right"]]),e("mask-radial-at-bottom",[["--tw-mask-radial-position","bottom"]]),e("mask-radial-at-bottom-left",[["--tw-mask-radial-position","bottom left"]]),e("mask-radial-at-bottom-right",[["--tw-mask-radial-position","bottom right"]]),e("mask-radial-at-left",[["--tw-mask-radial-position","left"]]),e("mask-radial-at-right",[["--tw-mask-radial-position","right"]]),e("mask-radial-at-center",[["--tw-mask-radial-position","center"]]),o("mask-radial-at",{defaultValue:null,supportsNegative:!1,supportsFractions:!1,handle:n=>[a("--tw-mask-radial-position",n)]}),o("mask-radial",{defaultValue:null,supportsNegative:!1,supportsFractions:!1,handle:n=>[k(),O(),a("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),a("mask-composite","intersect"),a("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops, var(--tw-mask-radial-size)))"),a("--tw-mask-radial-size",n)]}),b("mask-radial-from",{color:n=>[k(),O(),a("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),a("mask-composite","intersect"),a("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),a("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),a("--tw-mask-radial-from-color",n)],position:n=>[k(),O(),a("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),a("mask-composite","intersect"),a("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),a("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),a("--tw-mask-radial-from-position",n)]}),b("mask-radial-to",{color:n=>[k(),O(),a("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),a("mask-composite","intersect"),a("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),a("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),a("--tw-mask-radial-to-color",n)],position:n=>[k(),O(),a("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),a("mask-composite","intersect"),a("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),a("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),a("--tw-mask-radial-to-position",n)]});let U=()=>D([$("--tw-mask-conic-position","0deg"),$("--tw-mask-conic-from-position","0%"),$("--tw-mask-conic-to-position","100%"),$("--tw-mask-conic-from-color","black"),$("--tw-mask-conic-to-color","transparent")]);o("mask-conic",{defaultValue:null,supportsNegative:!0,supportsFractions:!1,handleBareValue(n){return E(n.value)?`calc(1deg * ${n.value})`:null},handleNegativeBareValue(n){return E(n.value)?`calc(1deg * -${n.value})`:null},handle:n=>[k(),U(),a("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),a("mask-composite","intersect"),a("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops, var(--tw-mask-conic-position)))"),a("--tw-mask-conic-position",n)]}),i("mask-conic",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"]}]),b("mask-conic-from",{color:n=>[k(),U(),a("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),a("mask-composite","intersect"),a("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),a("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),a("--tw-mask-conic-from-color",n)],position:n=>[k(),U(),a("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),a("mask-composite","intersect"),a("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),a("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),a("--tw-mask-conic-from-position",n)]}),b("mask-conic-to",{color:n=>[k(),U(),a("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),a("mask-composite","intersect"),a("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),a("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),a("--tw-mask-conic-to-color",n)],position:n=>[k(),U(),a("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),a("mask-composite","intersect"),a("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),a("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),a("--tw-mask-conic-to-position",n)]}),e("box-decoration-slice",[["-webkit-box-decoration-break","slice"],["box-decoration-break","slice"]]),e("box-decoration-clone",[["-webkit-box-decoration-break","clone"],["box-decoration-break","clone"]]),e("bg-clip-text",[["background-clip","text"]]),e("bg-clip-border",[["background-clip","border-box"]]),e("bg-clip-padding",[["background-clip","padding-box"]]),e("bg-clip-content",[["background-clip","content-box"]]),e("bg-origin-border",[["background-origin","border-box"]]),e("bg-origin-padding",[["background-origin","padding-box"]]),e("bg-origin-content",[["background-origin","content-box"]]);for(let n of["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"])e(`bg-blend-${n}`,[["background-blend-mode",n]]),e(`mix-blend-${n}`,[["mix-blend-mode",n]]);e("mix-blend-plus-darker",[["mix-blend-mode","plus-darker"]]),e("mix-blend-plus-lighter",[["mix-blend-mode","plus-lighter"]]),e("fill-none",[["fill","none"]]),t.functional("fill",n=>{if(!n.value)return;if(n.value.kind==="arbitrary"){let p=Z(n.value.value,n.modifier,r);return p===null?void 0:[a("fill",p)]}let f=Q(n,r,["--fill","--color"]);if(f)return[a("fill",f)]}),i("fill",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--fill","--color"],modifiers:Array.from({length:21},(n,f)=>`${f*5}`)}]),e("stroke-none",[["stroke","none"]]),t.functional("stroke",n=>{if(n.value){if(n.value.kind==="arbitrary"){let f=n.value.value;switch(n.value.dataType??W(f,["color","number","length","percentage"])){case"number":case"length":case"percentage":return n.modifier?void 0:[a("stroke-width",f)];default:return f=Z(n.value.value,n.modifier,r),f===null?void 0:[a("stroke",f)]}}{let f=Q(n,r,["--stroke","--color"]);if(f)return[a("stroke",f)]}{let f=r.resolve(n.value.value,["--stroke-width"]);if(f)return[a("stroke-width",f)];if(E(n.value.value))return[a("stroke-width",n.value.value)]}}}),i("stroke",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--stroke","--color"],modifiers:Array.from({length:21},(n,f)=>`${f*5}`)},{values:["0","1","2","3"],valueThemeKeys:["--stroke-width"]}]),e("object-contain",[["object-fit","contain"]]),e("object-cover",[["object-fit","cover"]]),e("object-fill",[["object-fit","fill"]]),e("object-none",[["object-fit","none"]]),e("object-scale-down",[["object-fit","scale-down"]]),e("object-top",[["object-position","top"]]),e("object-top-left",[["object-position","left top"]]),e("object-top-right",[["object-position","right top"]]),e("object-bottom",[["object-position","bottom"]]),e("object-bottom-left",[["object-position","left bottom"]]),e("object-bottom-right",[["object-position","right bottom"]]),e("object-left",[["object-position","left"]]),e("object-right",[["object-position","right"]]),e("object-center",[["object-position","center"]]),o("object",{themeKeys:["--object-position"],handle:n=>[a("object-position",n)]});for(let[n,f]of[["p","padding"],["px","padding-inline"],["py","padding-block"],["ps","padding-inline-start"],["pe","padding-inline-end"],["pt","padding-top"],["pr","padding-right"],["pb","padding-bottom"],["pl","padding-left"]])l(n,["--padding","--spacing"],p=>[a(f,p)]);e("text-left",[["text-align","left"]]),e("text-center",[["text-align","center"]]),e("text-right",[["text-align","right"]]),e("text-justify",[["text-align","justify"]]),e("text-start",[["text-align","start"]]),e("text-end",[["text-align","end"]]),l("indent",["--text-indent","--spacing"],n=>[a("text-indent",n)],{supportsNegative:!0}),e("align-baseline",[["vertical-align","baseline"]]),e("align-top",[["vertical-align","top"]]),e("align-middle",[["vertical-align","middle"]]),e("align-bottom",[["vertical-align","bottom"]]),e("align-text-top",[["vertical-align","text-top"]]),e("align-text-bottom",[["vertical-align","text-bottom"]]),e("align-sub",[["vertical-align","sub"]]),e("align-super",[["vertical-align","super"]]),o("align",{themeKeys:[],handle:n=>[a("vertical-align",n)]}),t.functional("font",n=>{if(!(!n.value||n.modifier)){if(n.value.kind==="arbitrary"){let f=n.value.value;switch(n.value.dataType??W(f,["number","generic-name","family-name"])){case"generic-name":case"family-name":return[a("font-family",f)];default:return[D([$("--tw-font-weight")]),a("--tw-font-weight",f),a("font-weight",f)]}}{let f=r.resolveWith(n.value.value,["--font"],["--font-feature-settings","--font-variation-settings"]);if(f){let[p,x={}]=f;return[a("font-family",p),a("font-feature-settings",x["--font-feature-settings"]),a("font-variation-settings",x["--font-variation-settings"])]}}{let f=r.resolve(n.value.value,["--font-weight"]);if(f)return[D([$("--tw-font-weight")]),a("--tw-font-weight",f),a("font-weight",f)]}}}),i("font",()=>[{values:[],valueThemeKeys:["--font"]},{values:[],valueThemeKeys:["--font-weight"]}]),e("uppercase",[["text-transform","uppercase"]]),e("lowercase",[["text-transform","lowercase"]]),e("capitalize",[["text-transform","capitalize"]]),e("normal-case",[["text-transform","none"]]),e("italic",[["font-style","italic"]]),e("not-italic",[["font-style","normal"]]),e("underline",[["text-decoration-line","underline"]]),e("overline",[["text-decoration-line","overline"]]),e("line-through",[["text-decoration-line","line-through"]]),e("no-underline",[["text-decoration-line","none"]]),e("font-stretch-normal",[["font-stretch","normal"]]),e("font-stretch-ultra-condensed",[["font-stretch","ultra-condensed"]]),e("font-stretch-extra-condensed",[["font-stretch","extra-condensed"]]),e("font-stretch-condensed",[["font-stretch","condensed"]]),e("font-stretch-semi-condensed",[["font-stretch","semi-condensed"]]),e("font-stretch-semi-expanded",[["font-stretch","semi-expanded"]]),e("font-stretch-expanded",[["font-stretch","expanded"]]),e("font-stretch-extra-expanded",[["font-stretch","extra-expanded"]]),e("font-stretch-ultra-expanded",[["font-stretch","ultra-expanded"]]),o("font-stretch",{handleBareValue:({value:n})=>{if(!n.endsWith("%"))return null;let f=Number(n.slice(0,-1));return!E(f)||Number.isNaN(f)||f<50||f>200?null:n},handle:n=>[a("font-stretch",n)]}),i("font-stretch",()=>[{values:["50%","75%","90%","95%","100%","105%","110%","125%","150%","200%"]}]),s("placeholder",{themeKeys:["--background-color","--color"],handle:n=>[L("&::placeholder",[a("--tw-sort","placeholder-color"),a("color",n)])]}),e("decoration-solid",[["text-decoration-style","solid"]]),e("decoration-double",[["text-decoration-style","double"]]),e("decoration-dotted",[["text-decoration-style","dotted"]]),e("decoration-dashed",[["text-decoration-style","dashed"]]),e("decoration-wavy",[["text-decoration-style","wavy"]]),e("decoration-auto",[["text-decoration-thickness","auto"]]),e("decoration-from-font",[["text-decoration-thickness","from-font"]]),t.functional("decoration",n=>{if(n.value){if(n.value.kind==="arbitrary"){let f=n.value.value;switch(n.value.dataType??W(f,["color","length","percentage"])){case"length":case"percentage":return n.modifier?void 0:[a("text-decoration-thickness",f)];default:return f=Z(f,n.modifier,r),f===null?void 0:[a("text-decoration-color",f)]}}{let f=r.resolve(n.value.value,["--text-decoration-thickness"]);if(f)return n.modifier?void 0:[a("text-decoration-thickness",f)];if(E(n.value.value))return n.modifier?void 0:[a("text-decoration-thickness",`${n.value.value}px`)]}{let f=Q(n,r,["--text-decoration-color","--color"]);if(f)return[a("text-decoration-color",f)]}}}),i("decoration",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--text-decoration-color","--color"],modifiers:Array.from({length:21},(n,f)=>`${f*5}`)},{values:["0","1","2"],valueThemeKeys:["--text-decoration-thickness"]}]),e("animate-none",[["animation","none"]]),o("animate",{themeKeys:["--animate"],handle:n=>[a("animation",n)]});{let n=["var(--tw-blur,)","var(--tw-brightness,)","var(--tw-contrast,)","var(--tw-grayscale,)","var(--tw-hue-rotate,)","var(--tw-invert,)","var(--tw-saturate,)","var(--tw-sepia,)","var(--tw-drop-shadow,)"].join(" "),f=["var(--tw-backdrop-blur,)","var(--tw-backdrop-brightness,)","var(--tw-backdrop-contrast,)","var(--tw-backdrop-grayscale,)","var(--tw-backdrop-hue-rotate,)","var(--tw-backdrop-invert,)","var(--tw-backdrop-opacity,)","var(--tw-backdrop-saturate,)","var(--tw-backdrop-sepia,)"].join(" "),p=()=>D([$("--tw-blur"),$("--tw-brightness"),$("--tw-contrast"),$("--tw-grayscale"),$("--tw-hue-rotate"),$("--tw-invert"),$("--tw-opacity"),$("--tw-saturate"),$("--tw-sepia"),$("--tw-drop-shadow"),$("--tw-drop-shadow-color"),$("--tw-drop-shadow-alpha","100%",""),$("--tw-drop-shadow-size")]),x=()=>D([$("--tw-backdrop-blur"),$("--tw-backdrop-brightness"),$("--tw-backdrop-contrast"),$("--tw-backdrop-grayscale"),$("--tw-backdrop-hue-rotate"),$("--tw-backdrop-invert"),$("--tw-backdrop-opacity"),$("--tw-backdrop-saturate"),$("--tw-backdrop-sepia")]);t.functional("filter",y=>{if(!y.modifier){if(y.value===null)return[p(),a("filter",n)];if(y.value.kind==="arbitrary")return[a("filter",y.value.value)];switch(y.value.value){case"none":return[a("filter","none")]}}}),t.functional("backdrop-filter",y=>{if(!y.modifier){if(y.value===null)return[x(),a("-webkit-backdrop-filter",f),a("backdrop-filter",f)];if(y.value.kind==="arbitrary")return[a("-webkit-backdrop-filter",y.value.value),a("backdrop-filter",y.value.value)];switch(y.value.value){case"none":return[a("-webkit-backdrop-filter","none"),a("backdrop-filter","none")]}}}),o("blur",{themeKeys:["--blur"],handle:y=>[p(),a("--tw-blur",`blur(${y})`),a("filter",n)]}),e("blur-none",[p,["--tw-blur"," "],["filter",n]]),o("backdrop-blur",{themeKeys:["--backdrop-blur","--blur"],handle:y=>[x(),a("--tw-backdrop-blur",`blur(${y})`),a("-webkit-backdrop-filter",f),a("backdrop-filter",f)]}),e("backdrop-blur-none",[x,["--tw-backdrop-blur"," "],["-webkit-backdrop-filter",f],["backdrop-filter",f]]),o("brightness",{themeKeys:["--brightness"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,handle:y=>[p(),a("--tw-brightness",`brightness(${y})`),a("filter",n)]}),o("backdrop-brightness",{themeKeys:["--backdrop-brightness","--brightness"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,handle:y=>[x(),a("--tw-backdrop-brightness",`brightness(${y})`),a("-webkit-backdrop-filter",f),a("backdrop-filter",f)]}),i("brightness",()=>[{values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--brightness"]}]),i("backdrop-brightness",()=>[{values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--backdrop-brightness","--brightness"]}]),o("contrast",{themeKeys:["--contrast"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,handle:y=>[p(),a("--tw-contrast",`contrast(${y})`),a("filter",n)]}),o("backdrop-contrast",{themeKeys:["--backdrop-contrast","--contrast"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,handle:y=>[x(),a("--tw-backdrop-contrast",`contrast(${y})`),a("-webkit-backdrop-filter",f),a("backdrop-filter",f)]}),i("contrast",()=>[{values:["0","50","75","100","125","150","200"],valueThemeKeys:["--contrast"]}]),i("backdrop-contrast",()=>[{values:["0","50","75","100","125","150","200"],valueThemeKeys:["--backdrop-contrast","--contrast"]}]),o("grayscale",{themeKeys:["--grayscale"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,defaultValue:"100%",handle:y=>[p(),a("--tw-grayscale",`grayscale(${y})`),a("filter",n)]}),o("backdrop-grayscale",{themeKeys:["--backdrop-grayscale","--grayscale"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,defaultValue:"100%",handle:y=>[x(),a("--tw-backdrop-grayscale",`grayscale(${y})`),a("-webkit-backdrop-filter",f),a("backdrop-filter",f)]}),i("grayscale",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--grayscale"],hasDefaultValue:!0}]),i("backdrop-grayscale",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--backdrop-grayscale","--grayscale"],hasDefaultValue:!0}]),o("hue-rotate",{supportsNegative:!0,themeKeys:["--hue-rotate"],handleBareValue:({value:y})=>E(y)?`${y}deg`:null,handle:y=>[p(),a("--tw-hue-rotate",`hue-rotate(${y})`),a("filter",n)]}),o("backdrop-hue-rotate",{supportsNegative:!0,themeKeys:["--backdrop-hue-rotate","--hue-rotate"],handleBareValue:({value:y})=>E(y)?`${y}deg`:null,handle:y=>[x(),a("--tw-backdrop-hue-rotate",`hue-rotate(${y})`),a("-webkit-backdrop-filter",f),a("backdrop-filter",f)]}),i("hue-rotate",()=>[{values:["0","15","30","60","90","180"],valueThemeKeys:["--hue-rotate"]}]),i("backdrop-hue-rotate",()=>[{values:["0","15","30","60","90","180"],valueThemeKeys:["--backdrop-hue-rotate","--hue-rotate"]}]),o("invert",{themeKeys:["--invert"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,defaultValue:"100%",handle:y=>[p(),a("--tw-invert",`invert(${y})`),a("filter",n)]}),o("backdrop-invert",{themeKeys:["--backdrop-invert","--invert"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,defaultValue:"100%",handle:y=>[x(),a("--tw-backdrop-invert",`invert(${y})`),a("-webkit-backdrop-filter",f),a("backdrop-filter",f)]}),i("invert",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--invert"],hasDefaultValue:!0}]),i("backdrop-invert",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--backdrop-invert","--invert"],hasDefaultValue:!0}]),o("saturate",{themeKeys:["--saturate"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,handle:y=>[p(),a("--tw-saturate",`saturate(${y})`),a("filter",n)]}),o("backdrop-saturate",{themeKeys:["--backdrop-saturate","--saturate"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,handle:y=>[x(),a("--tw-backdrop-saturate",`saturate(${y})`),a("-webkit-backdrop-filter",f),a("backdrop-filter",f)]}),i("saturate",()=>[{values:["0","50","100","150","200"],valueThemeKeys:["--saturate"]}]),i("backdrop-saturate",()=>[{values:["0","50","100","150","200"],valueThemeKeys:["--backdrop-saturate","--saturate"]}]),o("sepia",{themeKeys:["--sepia"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,defaultValue:"100%",handle:y=>[p(),a("--tw-sepia",`sepia(${y})`),a("filter",n)]}),o("backdrop-sepia",{themeKeys:["--backdrop-sepia","--sepia"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,defaultValue:"100%",handle:y=>[x(),a("--tw-backdrop-sepia",`sepia(${y})`),a("-webkit-backdrop-filter",f),a("backdrop-filter",f)]}),i("sepia",()=>[{values:["0","50","100"],valueThemeKeys:["--sepia"],hasDefaultValue:!0}]),i("backdrop-sepia",()=>[{values:["0","50","100"],valueThemeKeys:["--backdrop-sepia","--sepia"],hasDefaultValue:!0}]),e("drop-shadow-none",[p,["--tw-drop-shadow"," "],["filter",n]]),t.functional("drop-shadow",y=>{let C;if(y.modifier&&(y.modifier.kind==="arbitrary"?C=y.modifier.value:E(y.modifier.value)&&(C=`${y.modifier.value}%`)),!y.value){let K=r.get(["--drop-shadow"]),N=r.resolve(null,["--drop-shadow"]);return K===null||N===null?void 0:[p(),a("--tw-drop-shadow-alpha",C),...qe("--tw-drop-shadow-size",K,C,T=>`var(--tw-drop-shadow-color, ${T})`),a("--tw-drop-shadow",_(N,",").map(T=>`drop-shadow(${T})`).join(" ")),a("filter",n)]}if(y.value.kind==="arbitrary"){let K=y.value.value;switch(y.value.dataType??W(K,["color"])){case"color":return K=Z(K,y.modifier,r),K===null?void 0:[p(),a("--tw-drop-shadow-color",J(K,"var(--tw-drop-shadow-alpha)")),a("--tw-drop-shadow","var(--tw-drop-shadow-size)")];default:return y.modifier&&!C?void 0:[p(),a("--tw-drop-shadow-alpha",C),...qe("--tw-drop-shadow-size",K,C,T=>`var(--tw-drop-shadow-color, ${T})`),a("--tw-drop-shadow","var(--tw-drop-shadow-size)"),a("filter",n)]}}{let K=r.get([`--drop-shadow-${y.value.value}`]),N=r.resolve(y.value.value,["--drop-shadow"]);if(K&&N)return y.modifier&&!C?void 0:C?[p(),a("--tw-drop-shadow-alpha",C),...qe("--tw-drop-shadow-size",K,C,T=>`var(--tw-drop-shadow-color, ${T})`),a("--tw-drop-shadow","var(--tw-drop-shadow-size)"),a("filter",n)]:[p(),a("--tw-drop-shadow-alpha",C),...qe("--tw-drop-shadow-size",K,C,T=>`var(--tw-drop-shadow-color, ${T})`),a("--tw-drop-shadow",_(N,",").map(T=>`drop-shadow(${T})`).join(" ")),a("filter",n)]}{let K=Q(y,r,["--drop-shadow-color","--color"]);if(K)return K==="inherit"?[p(),a("--tw-drop-shadow-color","inherit"),a("--tw-drop-shadow","var(--tw-drop-shadow-size)")]:[p(),a("--tw-drop-shadow-color",J(K,"var(--tw-drop-shadow-alpha)")),a("--tw-drop-shadow","var(--tw-drop-shadow-size)")]}}),i("drop-shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--drop-shadow-color","--color"],modifiers:Array.from({length:21},(y,C)=>`${C*5}`)},{valueThemeKeys:["--drop-shadow"]}]),o("backdrop-opacity",{themeKeys:["--backdrop-opacity","--opacity"],handleBareValue:({value:y})=>_e(y)?`${y}%`:null,handle:y=>[x(),a("--tw-backdrop-opacity",`opacity(${y})`),a("-webkit-backdrop-filter",f),a("backdrop-filter",f)]}),i("backdrop-opacity",()=>[{values:Array.from({length:21},(y,C)=>`${C*5}`),valueThemeKeys:["--backdrop-opacity","--opacity"]}])}{let n=`var(--tw-ease, ${r.resolve(null,["--default-transition-timing-function"])??"ease"})`,f=`var(--tw-duration, ${r.resolve(null,["--default-transition-duration"])??"0s"})`;e("transition-none",[["transition-property","none"]]),e("transition-all",[["transition-property","all"],["transition-timing-function",n],["transition-duration",f]]),e("transition-colors",[["transition-property","color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to"],["transition-timing-function",n],["transition-duration",f]]),e("transition-opacity",[["transition-property","opacity"],["transition-timing-function",n],["transition-duration",f]]),e("transition-shadow",[["transition-property","box-shadow"],["transition-timing-function",n],["transition-duration",f]]),e("transition-transform",[["transition-property","transform, translate, scale, rotate"],["transition-timing-function",n],["transition-duration",f]]),o("transition",{defaultValue:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, visibility, content-visibility, overlay, pointer-events",themeKeys:["--transition-property"],handle:p=>[a("transition-property",p),a("transition-timing-function",n),a("transition-duration",f)]}),e("transition-discrete",[["transition-behavior","allow-discrete"]]),e("transition-normal",[["transition-behavior","normal"]]),o("delay",{handleBareValue:({value:p})=>E(p)?`${p}ms`:null,themeKeys:["--transition-delay"],handle:p=>[a("transition-delay",p)]});{let p=()=>D([$("--tw-duration")]);e("duration-initial",[p,["--tw-duration","initial"]]),t.functional("duration",x=>{if(x.modifier||!x.value)return;let y=null;if(x.value.kind==="arbitrary"?y=x.value.value:(y=r.resolve(x.value.fraction??x.value.value,["--transition-duration"]),y===null&&E(x.value.value)&&(y=`${x.value.value}ms`)),y!==null)return[p(),a("--tw-duration",y),a("transition-duration",y)]})}i("delay",()=>[{values:["75","100","150","200","300","500","700","1000"],valueThemeKeys:["--transition-delay"]}]),i("duration",()=>[{values:["75","100","150","200","300","500","700","1000"],valueThemeKeys:["--transition-duration"]}])}{let n=()=>D([$("--tw-ease")]);e("ease-initial",[n,["--tw-ease","initial"]]),e("ease-linear",[n,["--tw-ease","linear"],["transition-timing-function","linear"]]),o("ease",{themeKeys:["--ease"],handle:f=>[n(),a("--tw-ease",f),a("transition-timing-function",f)]})}e("will-change-auto",[["will-change","auto"]]),e("will-change-scroll",[["will-change","scroll-position"]]),e("will-change-contents",[["will-change","contents"]]),e("will-change-transform",[["will-change","transform"]]),o("will-change",{themeKeys:[],handle:n=>[a("will-change",n)]}),e("content-none",[["--tw-content","none"],["content","none"]]),o("content",{themeKeys:[],handle:n=>[D([$("--tw-content",'""')]),a("--tw-content",n),a("content","var(--tw-content)")]});{let n="var(--tw-contain-size,) var(--tw-contain-layout,) var(--tw-contain-paint,) var(--tw-contain-style,)",f=()=>D([$("--tw-contain-size"),$("--tw-contain-layout"),$("--tw-contain-paint"),$("--tw-contain-style")]);e("contain-none",[["contain","none"]]),e("contain-content",[["contain","content"]]),e("contain-strict",[["contain","strict"]]),e("contain-size",[f,["--tw-contain-size","size"],["contain",n]]),e("contain-inline-size",[f,["--tw-contain-size","inline-size"],["contain",n]]),e("contain-layout",[f,["--tw-contain-layout","layout"],["contain",n]]),e("contain-paint",[f,["--tw-contain-paint","paint"],["contain",n]]),e("contain-style",[f,["--tw-contain-style","style"],["contain",n]]),o("contain",{themeKeys:[],handle:p=>[a("contain",p)]})}e("forced-color-adjust-none",[["forced-color-adjust","none"]]),e("forced-color-adjust-auto",[["forced-color-adjust","auto"]]),e("leading-none",[()=>D([$("--tw-leading")]),["--tw-leading","1"],["line-height","1"]]),l("leading",["--leading","--spacing"],n=>[D([$("--tw-leading")]),a("--tw-leading",n),a("line-height",n)]),o("tracking",{supportsNegative:!0,themeKeys:["--tracking"],handle:n=>[D([$("--tw-tracking")]),a("--tw-tracking",n),a("letter-spacing",n)]}),e("antialiased",[["-webkit-font-smoothing","antialiased"],["-moz-osx-font-smoothing","grayscale"]]),e("subpixel-antialiased",[["-webkit-font-smoothing","auto"],["-moz-osx-font-smoothing","auto"]]);{let n="var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)",f=()=>D([$("--tw-ordinal"),$("--tw-slashed-zero"),$("--tw-numeric-figure"),$("--tw-numeric-spacing"),$("--tw-numeric-fraction")]);e("normal-nums",[["font-variant-numeric","normal"]]),e("ordinal",[f,["--tw-ordinal","ordinal"],["font-variant-numeric",n]]),e("slashed-zero",[f,["--tw-slashed-zero","slashed-zero"],["font-variant-numeric",n]]),e("lining-nums",[f,["--tw-numeric-figure","lining-nums"],["font-variant-numeric",n]]),e("oldstyle-nums",[f,["--tw-numeric-figure","oldstyle-nums"],["font-variant-numeric",n]]),e("proportional-nums",[f,["--tw-numeric-spacing","proportional-nums"],["font-variant-numeric",n]]),e("tabular-nums",[f,["--tw-numeric-spacing","tabular-nums"],["font-variant-numeric",n]]),e("diagonal-fractions",[f,["--tw-numeric-fraction","diagonal-fractions"],["font-variant-numeric",n]]),e("stacked-fractions",[f,["--tw-numeric-fraction","stacked-fractions"],["font-variant-numeric",n]])}{let n=()=>D([$("--tw-outline-style","solid")]);t.static("outline-hidden",()=>[a("--tw-outline-style","none"),a("outline-style","none"),I("@media","(forced-colors: active)",[a("outline","2px solid transparent"),a("outline-offset","2px")])]),e("outline-none",[["--tw-outline-style","none"],["outline-style","none"]]),e("outline-solid",[["--tw-outline-style","solid"],["outline-style","solid"]]),e("outline-dashed",[["--tw-outline-style","dashed"],["outline-style","dashed"]]),e("outline-dotted",[["--tw-outline-style","dotted"],["outline-style","dotted"]]),e("outline-double",[["--tw-outline-style","double"],["outline-style","double"]]),t.functional("outline",f=>{if(f.value===null){if(f.modifier)return;let p=r.get(["--default-outline-width"])??"1px";return[n(),a("outline-style","var(--tw-outline-style)"),a("outline-width",p)]}if(f.value.kind==="arbitrary"){let p=f.value.value;switch(f.value.dataType??W(p,["color","length","number","percentage"])){case"length":case"number":case"percentage":return f.modifier?void 0:[n(),a("outline-style","var(--tw-outline-style)"),a("outline-width",p)];default:return p=Z(p,f.modifier,r),p===null?void 0:[a("outline-color",p)]}}{let p=Q(f,r,["--outline-color","--color"]);if(p)return[a("outline-color",p)]}{if(f.modifier)return;let p=r.resolve(f.value.value,["--outline-width"]);if(p)return[n(),a("outline-style","var(--tw-outline-style)"),a("outline-width",p)];if(E(f.value.value))return[n(),a("outline-style","var(--tw-outline-style)"),a("outline-width",`${f.value.value}px`)]}}),i("outline",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--outline-color","--color"],modifiers:Array.from({length:21},(f,p)=>`${p*5}`),hasDefaultValue:!0},{values:["0","1","2","4","8"],valueThemeKeys:["--outline-width"]}]),o("outline-offset",{supportsNegative:!0,themeKeys:["--outline-offset"],handleBareValue:({value:f})=>E(f)?`${f}px`:null,handle:f=>[a("outline-offset",f)]}),i("outline-offset",()=>[{supportsNegative:!0,values:["0","1","2","4","8"],valueThemeKeys:["--outline-offset"]}])}o("opacity",{themeKeys:["--opacity"],handleBareValue:({value:n})=>_e(n)?`${n}%`:null,handle:n=>[a("opacity",n)]}),i("opacity",()=>[{values:Array.from({length:21},(n,f)=>`${f*5}`),valueThemeKeys:["--opacity"]}]),e("underline-offset-auto",[["text-underline-offset","auto"]]),o("underline-offset",{supportsNegative:!0,themeKeys:["--text-underline-offset"],handleBareValue:({value:n})=>E(n)?`${n}px`:null,handle:n=>[a("text-underline-offset",n)]}),i("underline-offset",()=>[{supportsNegative:!0,values:["0","1","2","4","8"],valueThemeKeys:["--text-underline-offset"]}]),t.functional("text",n=>{if(n.value){if(n.value.kind==="arbitrary"){let f=n.value.value;switch(n.value.dataType??W(f,["color","length","percentage","absolute-size","relative-size"])){case"size":case"length":case"percentage":case"absolute-size":case"relative-size":{if(n.modifier){let x=n.modifier.kind==="arbitrary"?n.modifier.value:r.resolve(n.modifier.value,["--leading"]);if(!x&&de(n.modifier.value)){let y=r.resolve(null,["--spacing"]);if(!y)return null;x=`calc(${y} * ${n.modifier.value})`}return!x&&n.modifier.value==="none"&&(x="1"),x?[a("font-size",f),a("line-height",x)]:null}return[a("font-size",f)]}default:return f=Z(f,n.modifier,r),f===null?void 0:[a("color",f)]}}{let f=Q(n,r,["--text-color","--color"]);if(f)return[a("color",f)]}{let f=r.resolveWith(n.value.value,["--text"],["--line-height","--letter-spacing","--font-weight"]);if(f){let[p,x={}]=Array.isArray(f)?f:[f];if(n.modifier){let y=n.modifier.kind==="arbitrary"?n.modifier.value:r.resolve(n.modifier.value,["--leading"]);if(!y&&de(n.modifier.value)){let K=r.resolve(null,["--spacing"]);if(!K)return null;y=`calc(${K} * ${n.modifier.value})`}if(!y&&n.modifier.value==="none"&&(y="1"),!y)return null;let C=[a("font-size",p)];return y&&C.push(a("line-height",y)),C}return typeof x=="string"?[a("font-size",p),a("line-height",x)]:[a("font-size",p),a("line-height",x["--line-height"]?`var(--tw-leading, ${x["--line-height"]})`:void 0),a("letter-spacing",x["--letter-spacing"]?`var(--tw-tracking, ${x["--letter-spacing"]})`:void 0),a("font-weight",x["--font-weight"]?`var(--tw-font-weight, ${x["--font-weight"]})`:void 0)]}}}}),i("text",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--text-color","--color"],modifiers:Array.from({length:21},(n,f)=>`${f*5}`)},{values:[],valueThemeKeys:["--text"],modifiers:[],modifierThemeKeys:["--leading"]}]);let P=()=>D([$("--tw-text-shadow-color"),$("--tw-text-shadow-alpha","100%","")]);e("text-shadow-initial",[P,["--tw-text-shadow-color","initial"]]),t.functional("text-shadow",n=>{let f;if(n.modifier&&(n.modifier.kind==="arbitrary"?f=n.modifier.value:E(n.modifier.value)&&(f=`${n.modifier.value}%`)),!n.value){let p=r.get(["--text-shadow"]);return p===null?void 0:[P(),a("--tw-text-shadow-alpha",f),...le("text-shadow",p,f,x=>`var(--tw-text-shadow-color, ${x})`)]}if(n.value.kind==="arbitrary"){let p=n.value.value;switch(n.value.dataType??W(p,["color"])){case"color":return p=Z(p,n.modifier,r),p===null?void 0:[P(),a("--tw-text-shadow-color",J(p,"var(--tw-text-shadow-alpha)"))];default:return[P(),a("--tw-text-shadow-alpha",f),...le("text-shadow",p,f,y=>`var(--tw-text-shadow-color, ${y})`)]}}switch(n.value.value){case"none":return n.modifier?void 0:[P(),a("text-shadow","none")];case"inherit":return n.modifier?void 0:[P(),a("--tw-text-shadow-color","inherit")]}{let p=r.get([`--text-shadow-${n.value.value}`]);if(p)return[P(),a("--tw-text-shadow-alpha",f),...le("text-shadow",p,f,x=>`var(--tw-text-shadow-color, ${x})`)]}{let p=Q(n,r,["--text-shadow-color","--color"]);if(p)return[P(),a("--tw-text-shadow-color",J(p,"var(--tw-text-shadow-alpha)"))]}}),i("text-shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--text-shadow-color","--color"],modifiers:Array.from({length:21},(n,f)=>`${f*5}`)},{values:["none"]},{valueThemeKeys:["--text-shadow"],modifiers:Array.from({length:21},(n,f)=>`${f*5}`),hasDefaultValue:r.get(["--text-shadow"])!==null}]);{let y=function(N){return`var(--tw-ring-inset,) 0 0 0 calc(${N} + var(--tw-ring-offset-width)) var(--tw-ring-color, ${x})`},C=function(N){return`inset 0 0 0 ${N} var(--tw-inset-ring-color, currentcolor)`};var X=y,ae=C;let n=["var(--tw-inset-shadow)","var(--tw-inset-ring-shadow)","var(--tw-ring-offset-shadow)","var(--tw-ring-shadow)","var(--tw-shadow)"].join(", "),f="0 0 #0000",p=()=>D([$("--tw-shadow",f),$("--tw-shadow-color"),$("--tw-shadow-alpha","100%",""),$("--tw-inset-shadow",f),$("--tw-inset-shadow-color"),$("--tw-inset-shadow-alpha","100%",""),$("--tw-ring-color"),$("--tw-ring-shadow",f),$("--tw-inset-ring-color"),$("--tw-inset-ring-shadow",f),$("--tw-ring-inset"),$("--tw-ring-offset-width","0px",""),$("--tw-ring-offset-color","#fff"),$("--tw-ring-offset-shadow",f)]);e("shadow-initial",[p,["--tw-shadow-color","initial"]]),t.functional("shadow",N=>{let T;if(N.modifier&&(N.modifier.kind==="arbitrary"?T=N.modifier.value:E(N.modifier.value)&&(T=`${N.modifier.value}%`)),!N.value){let j=r.get(["--shadow"]);return j===null?void 0:[p(),a("--tw-shadow-alpha",T),...le("--tw-shadow",j,T,ie=>`var(--tw-shadow-color, ${ie})`),a("box-shadow",n)]}if(N.value.kind==="arbitrary"){let j=N.value.value;switch(N.value.dataType??W(j,["color"])){case"color":return j=Z(j,N.modifier,r),j===null?void 0:[p(),a("--tw-shadow-color",J(j,"var(--tw-shadow-alpha)"))];default:return[p(),a("--tw-shadow-alpha",T),...le("--tw-shadow",j,T,tt=>`var(--tw-shadow-color, ${tt})`),a("box-shadow",n)]}}switch(N.value.value){case"none":return N.modifier?void 0:[p(),a("--tw-shadow",f),a("box-shadow",n)];case"inherit":return N.modifier?void 0:[p(),a("--tw-shadow-color","inherit")]}{let j=r.get([`--shadow-${N.value.value}`]);if(j)return[p(),a("--tw-shadow-alpha",T),...le("--tw-shadow",j,T,ie=>`var(--tw-shadow-color, ${ie})`),a("box-shadow",n)]}{let j=Q(N,r,["--box-shadow-color","--color"]);if(j)return[p(),a("--tw-shadow-color",J(j,"var(--tw-shadow-alpha)"))]}}),i("shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--box-shadow-color","--color"],modifiers:Array.from({length:21},(N,T)=>`${T*5}`)},{values:["none"]},{valueThemeKeys:["--shadow"],modifiers:Array.from({length:21},(N,T)=>`${T*5}`),hasDefaultValue:r.get(["--shadow"])!==null}]),e("inset-shadow-initial",[p,["--tw-inset-shadow-color","initial"]]),t.functional("inset-shadow",N=>{let T;if(N.modifier&&(N.modifier.kind==="arbitrary"?T=N.modifier.value:E(N.modifier.value)&&(T=`${N.modifier.value}%`)),!N.value){let j=r.get(["--inset-shadow"]);return j===null?void 0:[p(),a("--tw-inset-shadow-alpha",T),...le("--tw-inset-shadow",j,T,ie=>`var(--tw-inset-shadow-color, ${ie})`),a("box-shadow",n)]}if(N.value.kind==="arbitrary"){let j=N.value.value;switch(N.value.dataType??W(j,["color"])){case"color":return j=Z(j,N.modifier,r),j===null?void 0:[p(),a("--tw-inset-shadow-color",J(j,"var(--tw-inset-shadow-alpha)"))];default:return[p(),a("--tw-inset-shadow-alpha",T),...le("--tw-inset-shadow",j,T,tt=>`var(--tw-inset-shadow-color, ${tt})`,"inset "),a("box-shadow",n)]}}switch(N.value.value){case"none":return N.modifier?void 0:[p(),a("--tw-inset-shadow",f),a("box-shadow",n)];case"inherit":return N.modifier?void 0:[p(),a("--tw-inset-shadow-color","inherit")]}{let j=r.get([`--inset-shadow-${N.value.value}`]);if(j)return[p(),a("--tw-inset-shadow-alpha",T),...le("--tw-inset-shadow",j,T,ie=>`var(--tw-inset-shadow-color, ${ie})`),a("box-shadow",n)]}{let j=Q(N,r,["--box-shadow-color","--color"]);if(j)return[p(),a("--tw-inset-shadow-color",J(j,"var(--tw-inset-shadow-alpha)"))]}}),i("inset-shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--box-shadow-color","--color"],modifiers:Array.from({length:21},(N,T)=>`${T*5}`)},{values:["none"]},{valueThemeKeys:["--inset-shadow"],modifiers:Array.from({length:21},(N,T)=>`${T*5}`),hasDefaultValue:r.get(["--inset-shadow"])!==null}]),e("ring-inset",[p,["--tw-ring-inset","inset"]]);let x=r.get(["--default-ring-color"])??"currentcolor";t.functional("ring",N=>{if(!N.value){if(N.modifier)return;let T=r.get(["--default-ring-width"])??"1px";return[p(),a("--tw-ring-shadow",y(T)),a("box-shadow",n)]}if(N.value.kind==="arbitrary"){let T=N.value.value;switch(N.value.dataType??W(T,["color","length"])){case"length":return N.modifier?void 0:[p(),a("--tw-ring-shadow",y(T)),a("box-shadow",n)];default:return T=Z(T,N.modifier,r),T===null?void 0:[a("--tw-ring-color",T)]}}{let T=Q(N,r,["--ring-color","--color"]);if(T)return[a("--tw-ring-color",T)]}{if(N.modifier)return;let T=r.resolve(N.value.value,["--ring-width"]);if(T===null&&E(N.value.value)&&(T=`${N.value.value}px`),T)return[p(),a("--tw-ring-shadow",y(T)),a("box-shadow",n)]}}),i("ring",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--ring-color","--color"],modifiers:Array.from({length:21},(N,T)=>`${T*5}`)},{values:["0","1","2","4","8"],valueThemeKeys:["--ring-width"],hasDefaultValue:!0}]),t.functional("inset-ring",N=>{if(!N.value)return N.modifier?void 0:[p(),a("--tw-inset-ring-shadow",C("1px")),a("box-shadow",n)];if(N.value.kind==="arbitrary"){let T=N.value.value;switch(N.value.dataType??W(T,["color","length"])){case"length":return N.modifier?void 0:[p(),a("--tw-inset-ring-shadow",C(T)),a("box-shadow",n)];default:return T=Z(T,N.modifier,r),T===null?void 0:[a("--tw-inset-ring-color",T)]}}{let T=Q(N,r,["--ring-color","--color"]);if(T)return[a("--tw-inset-ring-color",T)]}{if(N.modifier)return;let T=r.resolve(N.value.value,["--ring-width"]);if(T===null&&E(N.value.value)&&(T=`${N.value.value}px`),T)return[p(),a("--tw-inset-ring-shadow",C(T)),a("box-shadow",n)]}}),i("inset-ring",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--ring-color","--color"],modifiers:Array.from({length:21},(N,T)=>`${T*5}`)},{values:["0","1","2","4","8"],valueThemeKeys:["--ring-width"],hasDefaultValue:!0}]);let K="var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)";t.functional("ring-offset",N=>{if(N.value){if(N.value.kind==="arbitrary"){let T=N.value.value;switch(N.value.dataType??W(T,["color","length"])){case"length":return N.modifier?void 0:[a("--tw-ring-offset-width",T),a("--tw-ring-offset-shadow",K)];default:return T=Z(T,N.modifier,r),T===null?void 0:[a("--tw-ring-offset-color",T)]}}{let T=r.resolve(N.value.value,["--ring-offset-width"]);if(T)return N.modifier?void 0:[a("--tw-ring-offset-width",T),a("--tw-ring-offset-shadow",K)];if(E(N.value.value))return N.modifier?void 0:[a("--tw-ring-offset-width",`${N.value.value}px`),a("--tw-ring-offset-shadow",K)]}{let T=Q(N,r,["--ring-offset-color","--color"]);if(T)return[a("--tw-ring-offset-color",T)]}}})}return i("ring-offset",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--ring-offset-color","--color"],modifiers:Array.from({length:21},(n,f)=>`${f*5}`)},{values:["0","1","2","4","8"],valueThemeKeys:["--ring-offset-width"]}]),t.functional("@container",n=>{let f=null;if(n.value===null?f="inline-size":n.value.kind==="arbitrary"?f=n.value.value:n.value.kind==="named"&&n.value.value==="normal"&&(f="normal"),f!==null)return n.modifier?[a("container-type",f),a("container-name",n.modifier.value)]:[a("container-type",f)]}),i("@container",()=>[{values:["normal"],valueThemeKeys:[],hasDefaultValue:!0}]),t}var mt=["number","integer","ratio","percentage"];function tr(r){let t=r.params;return ui.test(t)?i=>{let e={"--value":{usedSpacingInteger:!1,usedSpacingNumber:!1,themeKeys:new Set,literals:new Set},"--modifier":{usedSpacingInteger:!1,usedSpacingNumber:!1,themeKeys:new Set,literals:new Set}};F(r.nodes,o=>{if(o.kind!=="declaration"||!o.value||!o.value.includes("--value(")&&!o.value.includes("--modifier("))return;let s=G(o.value);ee(s,l=>{if(l.kind!=="function")return;if(l.value==="--spacing"&&!(e["--modifier"].usedSpacingNumber&&e["--value"].usedSpacingNumber))return ee(l.nodes,u=>{if(u.kind!=="function"||u.value!=="--value"&&u.value!=="--modifier")return;let c=u.value;for(let m of u.nodes)if(m.kind==="word"){if(m.value==="integer")e[c].usedSpacingInteger||=!0;else if(m.value==="number"&&(e[c].usedSpacingNumber||=!0,e["--modifier"].usedSpacingNumber&&e["--value"].usedSpacingNumber))return 2}}),0;if(l.value!=="--value"&&l.value!=="--modifier")return;let d=_(Y(l.nodes),",");for(let[u,c]of d.entries())c=c.replace(/\\\*/g,"*"),c=c.replace(/--(.*?)\s--(.*?)/g,"--$1-*--$2"),c=c.replace(/\s+/g,""),c=c.replace(/(-\*){2,}/g,"-*"),c[0]==="-"&&c[1]==="-"&&!c.includes("-*")&&(c+="-*"),d[u]=c;l.nodes=G(d.join(","));for(let u of l.nodes)if(u.kind==="word"&&(u.value[0]==='"'||u.value[0]==="'")&&u.value[0]===u.value[u.value.length-1]){let c=u.value.slice(1,-1);e[l.value].literals.add(c)}else if(u.kind==="word"&&u.value[0]==="-"&&u.value[1]==="-"){let c=u.value.replace(/-\*.*$/g,"");e[l.value].themeKeys.add(c)}else if(u.kind==="word"&&!(u.value[0]==="["&&u.value[u.value.length-1]==="]")&&!mt.includes(u.value)){console.warn(`Unsupported bare value data type: "${u.value}". +Only valid data types are: ${mt.map(A=>`"${A}"`).join(", ")}. +`);let c=u.value,m=structuredClone(l),g="\xB6";ee(m.nodes,(A,{replaceWith:k})=>{A.kind==="word"&&A.value===c&&k({kind:"word",value:g})});let h="^".repeat(Y([u]).length),w=Y([m]).indexOf(g),v=["```css",Y([l])," ".repeat(w)+h,"```"].join(` +`);console.warn(v)}}),o.value=Y(s)}),i.utilities.functional(t.slice(0,-2),o=>{let s=structuredClone(r),l=o.value,d=o.modifier;if(l===null)return;let u=!1,c=!1,m=!1,g=!1,h=new Map,w=!1;if(F([s],(v,{parent:A,replaceWith:k})=>{if(A?.kind!=="rule"&&A?.kind!=="at-rule"||v.kind!=="declaration"||!v.value)return;let b=G(v.value);(ee(b,(S,{replaceWith:R})=>{if(S.kind==="function"){if(S.value==="--value"){u=!0;let O=Zt(l,S,i);return O?(c=!0,O.ratio?w=!0:h.set(v,A),R(O.nodes),1):(u||=!1,k([]),2)}else if(S.value==="--modifier"){if(d===null)return k([]),2;m=!0;let O=Zt(d,S,i);return O?(g=!0,R(O.nodes),1):(m||=!1,k([]),2)}}})??0)===0&&(v.value=Y(b))}),u&&!c||m&&!g||w&&g||d&&!w&&!g)return null;if(w)for(let[v,A]of h){let k=A.nodes.indexOf(v);k!==-1&&A.nodes.splice(k,1)}return s.nodes}),i.utilities.suggest(t.slice(0,-2),()=>{let o=[],s=[];for(let[l,{literals:d,usedSpacingNumber:u,usedSpacingInteger:c,themeKeys:m}]of[[o,e["--value"]],[s,e["--modifier"]]]){for(let g of d)l.push(g);if(u)l.push(...Ge);else if(c)for(let g of Ge)E(g)&&l.push(g);for(let g of i.theme.keysInNamespaces(m))l.push(g.replace(Xt,(h,w,v)=>`${w}.${v}`))}return[{values:o,modifiers:s}]})}:si.test(t)?i=>{i.utilities.static(t,()=>structuredClone(r.nodes))}:null}function Zt(r,t,i){for(let e of t.nodes){if(r.kind==="named"&&e.kind==="word"&&(e.value[0]==="'"||e.value[0]==='"')&&e.value[e.value.length-1]===e.value[0]&&e.value.slice(1,-1)===r.value)return{nodes:G(r.value)};if(r.kind==="named"&&e.kind==="word"&&e.value[0]==="-"&&e.value[1]==="-"){let o=e.value;if(o.endsWith("-*")){o=o.slice(0,-2);let s=i.theme.resolve(r.value,[o]);if(s)return{nodes:G(s)}}else{let s=o.split("-*");if(s.length<=1)continue;let l=[s.shift()],d=i.theme.resolveWith(r.value,l,s);if(d){let[,u={}]=d;{let c=u[s.pop()];if(c)return{nodes:G(c)}}}}}else if(r.kind==="named"&&e.kind==="word"){if(!mt.includes(e.value))continue;let o=e.value==="ratio"&&"fraction"in r?r.fraction:r.value;if(!o)continue;let s=W(o,[e.value]);if(s===null)continue;if(s==="ratio"){let[l,d]=_(o,"/");if(!E(l)||!E(d))continue}else{if(s==="number"&&!de(o))continue;if(s==="percentage"&&!E(o.slice(0,-1)))continue}return{nodes:G(o),ratio:s==="ratio"}}else if(r.kind==="arbitrary"&&e.kind==="word"&&e.value[0]==="["&&e.value[e.value.length-1]==="]"){let o=e.value.slice(1,-1);if(o==="*")return{nodes:G(r.value)};if("dataType"in r&&r.dataType&&r.dataType!==o)continue;if("dataType"in r&&r.dataType)return{nodes:G(r.value)};if(W(r.value,[o])!==null)return{nodes:G(r.value)}}}}function le(r,t,i,e,o=""){let s=!1,l=Te(t,u=>i==null?e(u):u.startsWith("current")?e(J(u,i)):((u.startsWith("var(")||i.startsWith("var("))&&(s=!0),e(Qt(u,i))));function d(u){return o?_(u,",").map(c=>o+c).join(","):u}return s?[a(r,d(Te(t,e))),B("@supports (color: lab(from red l a b))",[a(r,d(l))])]:[a(r,d(l))]}function qe(r,t,i,e,o=""){let s=!1,l=_(t,",").map(d=>Te(d,u=>i==null?e(u):u.startsWith("current")?e(J(u,i)):((u.startsWith("var(")||i.startsWith("var("))&&(s=!0),e(Qt(u,i))))).map(d=>`drop-shadow(${d})`).join(" ");return s?[a(r,o+_(t,",").map(d=>`drop-shadow(${Te(d,e)})`).join(" ")),B("@supports (color: lab(from red l a b))",[a(r,o+l)])]:[a(r,o+l)]}var gt={"--alpha":fi,"--spacing":ci,"--theme":di,theme:pi};function fi(r,t,i,...e){let[o,s]=_(i,"/").map(l=>l.trim());if(!o||!s)throw new Error(`The --alpha(\u2026) function requires a color and an alpha value, e.g.: \`--alpha(${o||"var(--my-color)"} / ${s||"50%"})\``);if(e.length>0)throw new Error(`The --alpha(\u2026) function only accepts one argument, e.g.: \`--alpha(${o||"var(--my-color)"} / ${s||"50%"})\``);return J(o,s)}function ci(r,t,i,...e){if(!i)throw new Error("The --spacing(\u2026) function requires an argument, but received none.");if(e.length>0)throw new Error(`The --spacing(\u2026) function only accepts a single argument, but received ${e.length+1}.`);let o=r.theme.resolve(null,["--spacing"]);if(!o)throw new Error("The --spacing(\u2026) function requires that the `--spacing` theme variable exists, but it was not found.");return`calc(${o} * ${i})`}function di(r,t,i,...e){if(!i.startsWith("--"))throw new Error("The --theme(\u2026) function can only be used with CSS variables from your theme.");let o=!1;i.endsWith(" inline")&&(o=!0,i=i.slice(0,-7)),t.kind==="at-rule"&&(o=!0);let s=r.resolveThemeValue(i,o);if(!s){if(e.length>0)return e.join(", ");throw new Error(`Could not resolve value for theme function: \`theme(${i})\`. Consider checking if the variable name is correct or provide a fallback value to silence this error.`)}if(e.length===0)return s;let l=e.join(", ");if(l==="initial")return s;if(s==="initial")return l;if(s.startsWith("var(")||s.startsWith("theme(")||s.startsWith("--theme(")){let d=G(s);return gi(d,l),Y(d)}return s}function pi(r,t,i,...e){i=mi(i);let o=r.resolveThemeValue(i);if(!o&&e.length>0)return e.join(", ");if(!o)throw new Error(`Could not resolve value for theme function: \`theme(${i})\`. Consider checking if the path is correct or provide a fallback value to silence this error.`);return o}var rr=new RegExp(Object.keys(gt).map(r=>`${r}\\(`).join("|"));function be(r,t){let i=0;return F(r,e=>{if(e.kind==="declaration"&&e.value&&rr.test(e.value)){i|=8,e.value=ir(e.value,e,t);return}e.kind==="at-rule"&&(e.name==="@media"||e.name==="@custom-media"||e.name==="@container"||e.name==="@supports")&&rr.test(e.params)&&(i|=8,e.params=ir(e.params,e,t))}),i}function ir(r,t,i){let e=G(r);return ee(e,(o,{replaceWith:s})=>{if(o.kind==="function"&&o.value in gt){let l=_(Y(o.nodes).trim(),",").map(u=>u.trim()),d=gt[o.value](i,t,...l);return s(G(d))}}),Y(e)}function mi(r){if(r[0]!=="'"&&r[0]!=='"')return r;let t="",i=r[0];for(let e=1;e{if(i.kind==="function"&&!(i.value!=="var"&&i.value!=="theme"&&i.value!=="--theme"))if(i.nodes.length===1)i.nodes.push({kind:"word",value:`, ${t}`});else{let e=i.nodes[i.nodes.length-1];e.kind==="word"&&e.value==="initial"&&(e.value=t)}})}function Je(r,t){let i=r.length,e=t.length,o=i=48&&l<=57&&d>=48&&d<=57){let u=s,c=s+1,m=s,g=s+1;for(l=r.charCodeAt(c);l>=48&&l<=57;)l=r.charCodeAt(++c);for(d=t.charCodeAt(g);d>=48&&d<=57;)d=t.charCodeAt(++g);let h=r.slice(u,c),w=t.slice(m,g),v=Number(h)-Number(w);if(v)return v;if(hw)return 1;continue}if(l!==d)return l-d}return r.length-t.length}var hi=/^\d+\/\d+$/;function nr(r){let t=[];for(let e of r.utilities.keys("static"))t.push({name:e,utility:e,fraction:!1,modifiers:[]});for(let e of r.utilities.keys("functional")){let o=r.utilities.getCompletions(e);for(let s of o)for(let l of s.values){let d=l!==null&&hi.test(l),u=l===null?e:`${e}-${l}`;t.push({name:u,utility:e,fraction:d,modifiers:s.modifiers}),s.supportsNegative&&t.push({name:`-${u}`,utility:`-${e}`,fraction:d,modifiers:s.modifiers})}}return t.length===0?[]:(t.sort((e,o)=>Je(e.name,o.name)),vi(t))}function vi(r){let t=[],i=null,e=new Map,o=new q(()=>[]);for(let l of r){let{utility:d,fraction:u}=l;i||(i={utility:d,items:[]},e.set(d,i)),d!==i.utility&&(t.push(i),i={utility:d,items:[]},e.set(d,i)),u?o.get(d).push(l):i.items.push(l)}i&&t[t.length-1]!==i&&t.push(i);for(let[l,d]of o){let u=e.get(l);u&&u.items.push(...d)}let s=[];for(let l of t)for(let d of l.items)s.push([d.name,{modifiers:d.modifiers}]);return s}function or(r){let t=[];for(let[e,o]of r.variants.entries()){let d=function({value:u,modifier:c}={}){let m=e;u&&(m+=s?`-${u}`:u),c&&(m+=`/${c}`);let g=r.parseVariant(m);if(!g)return[];let h=L(".__placeholder__",[]);if(xe(h,g,r.variants)===null)return[];let w=[];return We(h.nodes,(v,{path:A})=>{if(v.kind!=="rule"&&v.kind!=="at-rule"||v.nodes.length>0)return;A.sort((V,S)=>{let R=V.kind==="at-rule",O=S.kind==="at-rule";return R&&!O?-1:!R&&O?1:0});let k=A.flatMap(V=>V.kind==="rule"?V.selector==="&"?[]:[V.selector]:V.kind==="at-rule"?[`${V.name} ${V.params}`]:[]),b="";for(let V=k.length-1;V>=0;V--)b=b===""?k[V]:`${k[V]} { ${b} }`;w.push(b)}),w};var i=d;if(o.kind==="arbitrary")continue;let s=e!=="@",l=r.variants.getCompletions(e);switch(o.kind){case"static":{t.push({name:e,values:l,isArbitrary:!1,hasDash:s,selectors:d});break}case"functional":{t.push({name:e,values:l,isArbitrary:!0,hasDash:s,selectors:d});break}case"compound":{t.push({name:e,values:l,isArbitrary:!0,hasDash:s,selectors:d});break}}}return t}function ar(r,t){let{astNodes:i,nodeSorting:e}=ce(Array.from(t),r),o=new Map(t.map(l=>[l,null])),s=0n;for(let l of i){let d=e.get(l)?.candidate;d&&o.set(d,o.get(d)??s++)}return t.map(l=>[l,o.get(l)??null])}var He=/^@?[a-zA-Z0-9_-]*$/;var ht=class{compareFns=new Map;variants=new Map;completions=new Map;groupOrder=null;lastOrder=0;static(t,i,{compounds:e,order:o}={}){this.set(t,{kind:"static",applyFn:i,compoundsWith:0,compounds:e??2,order:o})}fromAst(t,i){let e=[];F(i,o=>{o.kind==="rule"?e.push(o.selector):o.kind==="at-rule"&&o.name!=="@slot"&&e.push(`${o.name} ${o.params}`)}),this.static(t,o=>{let s=structuredClone(i);vt(s,o.nodes),o.nodes=s},{compounds:we(e)})}functional(t,i,{compounds:e,order:o}={}){this.set(t,{kind:"functional",applyFn:i,compoundsWith:0,compounds:e??2,order:o})}compound(t,i,e,{compounds:o,order:s}={}){this.set(t,{kind:"compound",applyFn:e,compoundsWith:i,compounds:o??2,order:s})}group(t,i){this.groupOrder=this.nextOrder(),i&&this.compareFns.set(this.groupOrder,i),t(),this.groupOrder=null}has(t){return this.variants.has(t)}get(t){return this.variants.get(t)}kind(t){return this.variants.get(t)?.kind}compoundsWith(t,i){let e=this.variants.get(t),o=typeof i=="string"?this.variants.get(i):i.kind==="arbitrary"?{compounds:we([i.selector])}:this.variants.get(i.root);return!(!e||!o||e.kind!=="compound"||o.compounds===0||e.compoundsWith===0||(e.compoundsWith&o.compounds)===0)}suggest(t,i){this.completions.set(t,i)}getCompletions(t){return this.completions.get(t)?.()??[]}compare(t,i){if(t===i)return 0;if(t===null)return-1;if(i===null)return 1;if(t.kind==="arbitrary"&&i.kind==="arbitrary")return t.selector{h.nodes=m.map(w=>B(w,h.nodes))},{compounds:g})}i("*",[":is(& > *)"],{compounds:0}),i("**",[":is(& *)"],{compounds:0});function e(c,m){return m.map(g=>{g=g.trim();let h=_(g," ");return h[0]==="not"?h.slice(1).join(" "):c==="@container"?h[0][0]==="("?`not ${g}`:h[1]==="not"?`${h[0]} ${h.slice(2).join(" ")}`:`${h[0]} not ${h.slice(1).join(" ")}`:`not ${g}`})}let o=["@media","@supports","@container"];function s(c){for(let m of o){if(m!==c.name)continue;let g=_(c.params,",");return g.length>1?null:(g=e(c.name,g),I(c.name,g.join(", ")))}return null}function l(c){return c.includes("::")?null:`&:not(${_(c,",").map(g=>(g=g.replaceAll("&","*"),g)).join(", ")})`}t.compound("not",3,(c,m)=>{if(m.variant.kind==="arbitrary"&&m.variant.relative||m.modifier)return null;let g=!1;if(F([c],(h,{path:w})=>{if(h.kind!=="rule"&&h.kind!=="at-rule")return 0;if(h.nodes.length>0)return 0;let v=[],A=[];for(let b of w)b.kind==="at-rule"?v.push(b):b.kind==="rule"&&A.push(b);if(v.length>1)return 2;if(A.length>1)return 2;let k=[];for(let b of A){let V=l(b.selector);if(!V)return g=!1,2;k.push(L(V,[]))}for(let b of v){let V=s(b);if(!V)return g=!1,2;k.push(V)}return Object.assign(c,L("&",k)),g=!0,1}),c.kind==="rule"&&c.selector==="&"&&c.nodes.length===1&&Object.assign(c,c.nodes[0]),!g)return null}),t.suggest("not",()=>Array.from(t.keys()).filter(c=>t.compoundsWith("not",c))),t.compound("group",2,(c,m)=>{if(m.variant.kind==="arbitrary"&&m.variant.relative)return null;let g=m.modifier?`:where(.${r.prefix?`${r.prefix}\\:`:""}group\\/${m.modifier.value})`:`:where(.${r.prefix?`${r.prefix}\\:`:""}group)`,h=!1;if(F([c],(w,{path:v})=>{if(w.kind!=="rule")return 0;for(let k of v.slice(0,-1))if(k.kind==="rule")return h=!1,2;let A=w.selector.replaceAll("&",g);_(A,",").length>1&&(A=`:is(${A})`),w.selector=`&:is(${A} *)`,h=!0}),!h)return null}),t.suggest("group",()=>Array.from(t.keys()).filter(c=>t.compoundsWith("group",c))),t.compound("peer",2,(c,m)=>{if(m.variant.kind==="arbitrary"&&m.variant.relative)return null;let g=m.modifier?`:where(.${r.prefix?`${r.prefix}\\:`:""}peer\\/${m.modifier.value})`:`:where(.${r.prefix?`${r.prefix}\\:`:""}peer)`,h=!1;if(F([c],(w,{path:v})=>{if(w.kind!=="rule")return 0;for(let k of v.slice(0,-1))if(k.kind==="rule")return h=!1,2;let A=w.selector.replaceAll("&",g);_(A,",").length>1&&(A=`:is(${A})`),w.selector=`&:is(${A} ~ *)`,h=!0}),!h)return null}),t.suggest("peer",()=>Array.from(t.keys()).filter(c=>t.compoundsWith("peer",c))),i("first-letter",["&::first-letter"]),i("first-line",["&::first-line"]),i("marker",["& *::marker","&::marker","& *::-webkit-details-marker","&::-webkit-details-marker"]),i("selection",["& *::selection","&::selection"]),i("file",["&::file-selector-button"]),i("placeholder",["&::placeholder"]),i("backdrop",["&::backdrop"]),i("details-content",["&::details-content"]);{let c=function(){return D([I("@property","--tw-content",[a("syntax",'"*"'),a("initial-value",'""'),a("inherits","false")])])};var d=c;t.static("before",m=>{m.nodes=[L("&::before",[c(),a("content","var(--tw-content)"),...m.nodes])]},{compounds:0}),t.static("after",m=>{m.nodes=[L("&::after",[c(),a("content","var(--tw-content)"),...m.nodes])]},{compounds:0})}i("first",["&:first-child"]),i("last",["&:last-child"]),i("only",["&:only-child"]),i("odd",["&:nth-child(odd)"]),i("even",["&:nth-child(even)"]),i("first-of-type",["&:first-of-type"]),i("last-of-type",["&:last-of-type"]),i("only-of-type",["&:only-of-type"]),i("visited",["&:visited"]),i("target",["&:target"]),i("open",["&:is([open], :popover-open, :open)"]),i("default",["&:default"]),i("checked",["&:checked"]),i("indeterminate",["&:indeterminate"]),i("placeholder-shown",["&:placeholder-shown"]),i("autofill",["&:autofill"]),i("optional",["&:optional"]),i("required",["&:required"]),i("valid",["&:valid"]),i("invalid",["&:invalid"]),i("user-valid",["&:user-valid"]),i("user-invalid",["&:user-invalid"]),i("in-range",["&:in-range"]),i("out-of-range",["&:out-of-range"]),i("read-only",["&:read-only"]),i("empty",["&:empty"]),i("focus-within",["&:focus-within"]),t.static("hover",c=>{c.nodes=[L("&:hover",[I("@media","(hover: hover)",c.nodes)])]}),i("focus",["&:focus"]),i("focus-visible",["&:focus-visible"]),i("active",["&:active"]),i("enabled",["&:enabled"]),i("disabled",["&:disabled"]),i("inert",["&:is([inert], [inert] *)"]),t.compound("in",2,(c,m)=>{if(m.modifier)return null;let g=!1;if(F([c],(h,{path:w})=>{if(h.kind!=="rule")return 0;for(let v of w.slice(0,-1))if(v.kind==="rule")return g=!1,2;h.selector=`:where(${h.selector.replaceAll("&","*")}) &`,g=!0}),!g)return null}),t.suggest("in",()=>Array.from(t.keys()).filter(c=>t.compoundsWith("in",c))),t.compound("has",2,(c,m)=>{if(m.modifier)return null;let g=!1;if(F([c],(h,{path:w})=>{if(h.kind!=="rule")return 0;for(let v of w.slice(0,-1))if(v.kind==="rule")return g=!1,2;h.selector=`&:has(${h.selector.replaceAll("&","*")})`,g=!0}),!g)return null}),t.suggest("has",()=>Array.from(t.keys()).filter(c=>t.compoundsWith("has",c))),t.functional("aria",(c,m)=>{if(!m.value||m.modifier)return null;m.value.kind==="arbitrary"?c.nodes=[L(`&[aria-${lr(m.value.value)}]`,c.nodes)]:c.nodes=[L(`&[aria-${m.value.value}="true"]`,c.nodes)]}),t.suggest("aria",()=>["busy","checked","disabled","expanded","hidden","pressed","readonly","required","selected"]),t.functional("data",(c,m)=>{if(!m.value||m.modifier)return null;c.nodes=[L(`&[data-${lr(m.value.value)}]`,c.nodes)]}),t.functional("nth",(c,m)=>{if(!m.value||m.modifier||m.value.kind==="named"&&!E(m.value.value))return null;c.nodes=[L(`&:nth-child(${m.value.value})`,c.nodes)]}),t.functional("nth-last",(c,m)=>{if(!m.value||m.modifier||m.value.kind==="named"&&!E(m.value.value))return null;c.nodes=[L(`&:nth-last-child(${m.value.value})`,c.nodes)]}),t.functional("nth-of-type",(c,m)=>{if(!m.value||m.modifier||m.value.kind==="named"&&!E(m.value.value))return null;c.nodes=[L(`&:nth-of-type(${m.value.value})`,c.nodes)]}),t.functional("nth-last-of-type",(c,m)=>{if(!m.value||m.modifier||m.value.kind==="named"&&!E(m.value.value))return null;c.nodes=[L(`&:nth-last-of-type(${m.value.value})`,c.nodes)]}),t.functional("supports",(c,m)=>{if(!m.value||m.modifier)return null;let g=m.value.value;if(g===null)return null;if(/^[\w-]*\s*\(/.test(g)){let h=g.replace(/\b(and|or|not)\b/g," $1 ");c.nodes=[I("@supports",h,c.nodes)];return}g.includes(":")||(g=`${g}: var(--tw)`),(g[0]!=="("||g[g.length-1]!==")")&&(g=`(${g})`),c.nodes=[I("@supports",g,c.nodes)]},{compounds:1}),i("motion-safe",["@media (prefers-reduced-motion: no-preference)"]),i("motion-reduce",["@media (prefers-reduced-motion: reduce)"]),i("contrast-more",["@media (prefers-contrast: more)"]),i("contrast-less",["@media (prefers-contrast: less)"]);{let c=function(m,g,h,w){if(m===g)return 0;let v=w.get(m);if(v===null)return h==="asc"?-1:1;let A=w.get(g);return A===null?h==="asc"?1:-1:ve(v,A,h)};var u=c;{let m=r.namespace("--breakpoint"),g=new q(h=>{switch(h.kind){case"static":return r.resolveValue(h.root,["--breakpoint"])??null;case"functional":{if(!h.value||h.modifier)return null;let w=null;return h.value.kind==="arbitrary"?w=h.value.value:h.value.kind==="named"&&(w=r.resolveValue(h.value.value,["--breakpoint"])),!w||w.includes("var(")?null:w}case"arbitrary":case"compound":return null}});t.group(()=>{t.functional("max",(h,w)=>{if(w.modifier)return null;let v=g.get(w);if(v===null)return null;h.nodes=[I("@media",`(width < ${v})`,h.nodes)]},{compounds:1})},(h,w)=>c(h,w,"desc",g)),t.suggest("max",()=>Array.from(m.keys()).filter(h=>h!==null)),t.group(()=>{for(let[h,w]of r.namespace("--breakpoint"))h!==null&&t.static(h,v=>{v.nodes=[I("@media",`(width >= ${w})`,v.nodes)]},{compounds:1});t.functional("min",(h,w)=>{if(w.modifier)return null;let v=g.get(w);if(v===null)return null;h.nodes=[I("@media",`(width >= ${v})`,h.nodes)]},{compounds:1})},(h,w)=>c(h,w,"asc",g)),t.suggest("min",()=>Array.from(m.keys()).filter(h=>h!==null))}{let m=r.namespace("--container"),g=new q(h=>{switch(h.kind){case"functional":{if(h.value===null)return null;let w=null;return h.value.kind==="arbitrary"?w=h.value.value:h.value.kind==="named"&&(w=r.resolveValue(h.value.value,["--container"])),!w||w.includes("var(")?null:w}case"static":case"arbitrary":case"compound":return null}});t.group(()=>{t.functional("@max",(h,w)=>{let v=g.get(w);if(v===null)return null;h.nodes=[I("@container",w.modifier?`${w.modifier.value} (width < ${v})`:`(width < ${v})`,h.nodes)]},{compounds:1})},(h,w)=>c(h,w,"desc",g)),t.suggest("@max",()=>Array.from(m.keys()).filter(h=>h!==null)),t.group(()=>{t.functional("@",(h,w)=>{let v=g.get(w);if(v===null)return null;h.nodes=[I("@container",w.modifier?`${w.modifier.value} (width >= ${v})`:`(width >= ${v})`,h.nodes)]},{compounds:1}),t.functional("@min",(h,w)=>{let v=g.get(w);if(v===null)return null;h.nodes=[I("@container",w.modifier?`${w.modifier.value} (width >= ${v})`:`(width >= ${v})`,h.nodes)]},{compounds:1})},(h,w)=>c(h,w,"asc",g)),t.suggest("@min",()=>Array.from(m.keys()).filter(h=>h!==null)),t.suggest("@",()=>Array.from(m.keys()).filter(h=>h!==null))}}return i("portrait",["@media (orientation: portrait)"]),i("landscape",["@media (orientation: landscape)"]),i("ltr",['&:where(:dir(ltr), [dir="ltr"], [dir="ltr"] *)']),i("rtl",['&:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *)']),i("dark",["@media (prefers-color-scheme: dark)"]),i("starting",["@starting-style"]),i("print",["@media print"]),i("forced-colors",["@media (forced-colors: active)"]),i("inverted-colors",["@media (inverted-colors: inverted)"]),i("pointer-none",["@media (pointer: none)"]),i("pointer-coarse",["@media (pointer: coarse)"]),i("pointer-fine",["@media (pointer: fine)"]),i("any-pointer-none",["@media (any-pointer: none)"]),i("any-pointer-coarse",["@media (any-pointer: coarse)"]),i("any-pointer-fine",["@media (any-pointer: fine)"]),i("noscript",["@media (scripting: none)"]),t}function lr(r){if(r.includes("=")){let[t,...i]=_(r,"="),e=i.join("=").trim();if(e[0]==="'"||e[0]==='"')return r;if(e.length>1){let o=e[e.length-1];if(e[e.length-2]===" "&&(o==="i"||o==="I"||o==="s"||o==="S"))return`${t}="${e.slice(0,-2)}" ${o}`}return`${t}="${e}"`}return r}function vt(r,t){F(r,(i,{replaceWith:e})=>{if(i.kind==="at-rule"&&i.name==="@slot")e(t);else if(i.kind==="at-rule"&&(i.name==="@keyframes"||i.name==="@property"))return Object.assign(i,D([I(i.name,i.params,i.nodes)])),1})}function ur(r){let t=er(r),i=sr(r),e=new q(u=>Jt(u,d)),o=new q(u=>Array.from(Gt(u,d))),s=new q(u=>{let c=fr(u,d);try{be(c.map(({node:m})=>m),d)}catch{return[]}return c}),l=new q(u=>{for(let c of Me(u))r.markUsedVariable(c)}),d={theme:r,utilities:t,variants:i,invalidCandidates:new Set,important:!1,candidatesToCss(u){let c=[];for(let m of u){let g=!1,{astNodes:h}=ce([m],this,{onInvalidCandidate(){g=!0}});h=he(h,d,0),h.length===0||g?c.push(null):c.push(re(h))}return c},getClassOrder(u){return ar(this,u)},getClassList(){return nr(this)},getVariants(){return or(this)},parseCandidate(u){return o.get(u)},parseVariant(u){return e.get(u)},compileAstNodes(u){return s.get(u)},getVariantOrder(){let u=Array.from(e.values());u.sort((h,w)=>this.variants.compare(h,w));let c=new Map,m,g=0;for(let h of u)h!==null&&(m!==void 0&&this.variants.compare(m,h)!==0&&g++,c.set(h,g),m=h);return c},resolveThemeValue(u,c=!0){let m=u.lastIndexOf("/"),g=null;m!==-1&&(g=u.slice(m+1).trim(),u=u.slice(0,m).trim());let h=r.resolve(null,[u],c?1:0)??void 0;return g&&h?J(h,g):h},trackUsedVariables(u){l.get(u)}};return d}var wt=["container-type","pointer-events","visibility","position","inset","inset-inline","inset-block","inset-inline-start","inset-inline-end","top","right","bottom","left","isolation","z-index","order","grid-column","grid-column-start","grid-column-end","grid-row","grid-row-start","grid-row-end","float","clear","--tw-container-component","margin","margin-inline","margin-block","margin-inline-start","margin-inline-end","margin-top","margin-right","margin-bottom","margin-left","box-sizing","display","field-sizing","aspect-ratio","height","max-height","min-height","width","max-width","min-width","flex","flex-shrink","flex-grow","flex-basis","table-layout","caption-side","border-collapse","border-spacing","transform-origin","translate","--tw-translate-x","--tw-translate-y","--tw-translate-z","scale","--tw-scale-x","--tw-scale-y","--tw-scale-z","rotate","--tw-rotate-x","--tw-rotate-y","--tw-rotate-z","--tw-skew-x","--tw-skew-y","transform","animation","cursor","touch-action","--tw-pan-x","--tw-pan-y","--tw-pinch-zoom","resize","scroll-snap-type","--tw-scroll-snap-strictness","scroll-snap-align","scroll-snap-stop","scroll-margin","scroll-margin-inline","scroll-margin-block","scroll-margin-inline-start","scroll-margin-inline-end","scroll-margin-top","scroll-margin-right","scroll-margin-bottom","scroll-margin-left","scroll-padding","scroll-padding-inline","scroll-padding-block","scroll-padding-inline-start","scroll-padding-inline-end","scroll-padding-top","scroll-padding-right","scroll-padding-bottom","scroll-padding-left","list-style-position","list-style-type","list-style-image","appearance","columns","break-before","break-inside","break-after","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-template-columns","grid-template-rows","flex-direction","flex-wrap","place-content","place-items","align-content","align-items","justify-content","justify-items","gap","column-gap","row-gap","--tw-space-x-reverse","--tw-space-y-reverse","divide-x-width","divide-y-width","--tw-divide-y-reverse","divide-style","divide-color","place-self","align-self","justify-self","overflow","overflow-x","overflow-y","overscroll-behavior","overscroll-behavior-x","overscroll-behavior-y","scroll-behavior","border-radius","border-start-radius","border-end-radius","border-top-radius","border-right-radius","border-bottom-radius","border-left-radius","border-start-start-radius","border-start-end-radius","border-end-end-radius","border-end-start-radius","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","border-width","border-inline-width","border-block-width","border-inline-start-width","border-inline-end-width","border-top-width","border-right-width","border-bottom-width","border-left-width","border-style","border-inline-style","border-block-style","border-inline-start-style","border-inline-end-style","border-top-style","border-right-style","border-bottom-style","border-left-style","border-color","border-inline-color","border-block-color","border-inline-start-color","border-inline-end-color","border-top-color","border-right-color","border-bottom-color","border-left-color","background-color","background-image","--tw-gradient-position","--tw-gradient-stops","--tw-gradient-via-stops","--tw-gradient-from","--tw-gradient-from-position","--tw-gradient-via","--tw-gradient-via-position","--tw-gradient-to","--tw-gradient-to-position","mask-image","--tw-mask-top","--tw-mask-top-from-color","--tw-mask-top-from-position","--tw-mask-top-to-color","--tw-mask-top-to-position","--tw-mask-right","--tw-mask-right-from-color","--tw-mask-right-from-position","--tw-mask-right-to-color","--tw-mask-right-to-position","--tw-mask-bottom","--tw-mask-bottom-from-color","--tw-mask-bottom-from-position","--tw-mask-bottom-to-color","--tw-mask-bottom-to-position","--tw-mask-left","--tw-mask-left-from-color","--tw-mask-left-from-position","--tw-mask-left-to-color","--tw-mask-left-to-position","--tw-mask-linear","--tw-mask-linear-position","--tw-mask-linear-from-color","--tw-mask-linear-from-position","--tw-mask-linear-to-color","--tw-mask-linear-to-position","--tw-mask-radial","--tw-mask-radial-shape","--tw-mask-radial-size","--tw-mask-radial-position","--tw-mask-radial-from-color","--tw-mask-radial-from-position","--tw-mask-radial-to-color","--tw-mask-radial-to-position","--tw-mask-conic","--tw-mask-conic-position","--tw-mask-conic-from-color","--tw-mask-conic-from-position","--tw-mask-conic-to-color","--tw-mask-conic-to-position","box-decoration-break","background-size","background-attachment","background-clip","background-position","background-repeat","background-origin","mask-composite","mask-mode","mask-type","mask-size","mask-clip","mask-position","mask-repeat","mask-origin","fill","stroke","stroke-width","object-fit","object-position","padding","padding-inline","padding-block","padding-inline-start","padding-inline-end","padding-top","padding-right","padding-bottom","padding-left","text-align","text-indent","vertical-align","font-family","font-size","line-height","font-weight","letter-spacing","text-wrap","overflow-wrap","word-break","text-overflow","hyphens","white-space","color","text-transform","font-style","font-stretch","font-variant-numeric","text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","-webkit-font-smoothing","placeholder-color","caret-color","accent-color","color-scheme","opacity","background-blend-mode","mix-blend-mode","box-shadow","--tw-shadow","--tw-shadow-color","--tw-ring-shadow","--tw-ring-color","--tw-inset-shadow","--tw-inset-shadow-color","--tw-inset-ring-shadow","--tw-inset-ring-color","--tw-ring-offset-width","--tw-ring-offset-color","outline","outline-width","outline-offset","outline-color","--tw-blur","--tw-brightness","--tw-contrast","--tw-drop-shadow","--tw-grayscale","--tw-hue-rotate","--tw-invert","--tw-saturate","--tw-sepia","filter","--tw-backdrop-blur","--tw-backdrop-brightness","--tw-backdrop-contrast","--tw-backdrop-grayscale","--tw-backdrop-hue-rotate","--tw-backdrop-invert","--tw-backdrop-opacity","--tw-backdrop-saturate","--tw-backdrop-sepia","backdrop-filter","transition-property","transition-behavior","transition-delay","transition-duration","transition-timing-function","will-change","contain","content","forced-color-adjust"];function ce(r,t,{onInvalidCandidate:i}={}){let e=new Map,o=[],s=new Map;for(let d of r){if(t.invalidCandidates.has(d)){i?.(d);continue}let u=t.parseCandidate(d);if(u.length===0){i?.(d);continue}s.set(d,u)}let l=t.getVariantOrder();for(let[d,u]of s){let c=!1;for(let m of u){let g=t.compileAstNodes(m);if(g.length!==0){c=!0;for(let{node:h,propertySort:w}of g){let v=0n;for(let A of m.variants)v|=1n<{let c=e.get(d),m=e.get(u);if(c.variants-m.variants!==0n)return Number(c.variants-m.variants);let g=0;for(;g1)return null;for(let u of l.nodes)if(u.kind!=="rule"&&u.kind!=="at-rule"||o(u,t)===null)return null;F(l.nodes,u=>{if((u.kind==="rule"||u.kind==="at-rule")&&u.nodes.length<=0)return u.nodes=r.nodes,1}),r.nodes=l.nodes;return}if(o(r,t)===null)return null}function cr(r){let t=r.options?.types??[];return t.length>1&&t.includes("any")}function wi(r,t){if(r.kind==="arbitrary"){let l=r.value;return r.modifier&&(l=Z(l,r.modifier,t.theme)),l===null?[]:[[a(r.property,l)]]}let i=t.utilities.get(r.root)??[],e=[],o=i.filter(l=>!cr(l));for(let l of o){if(l.kind!==r.kind)continue;let d=l.compileFn(r);if(d!==void 0){if(d===null)return e;e.push(d)}}if(e.length>0)return e;let s=i.filter(l=>cr(l));for(let l of s){if(l.kind!==r.kind)continue;let d=l.compileFn(r);if(d!==void 0){if(d===null)return e;e.push(d)}}return e}function dr(r){for(let t of r)t.kind!=="at-root"&&(t.kind==="declaration"?t.important=!0:(t.kind==="rule"||t.kind==="at-rule")&&dr(t.nodes))}function yi(r){let t=new Set,i=0,e=r.slice(),o=!1;for(;e.length>0;){let s=e.shift();if(s.kind==="declaration"){if(s.value===void 0||(i++,o))continue;if(s.property==="--tw-sort"){let d=wt.indexOf(s.value??"");if(d!==-1){t.add(d),o=!0;continue}}let l=wt.indexOf(s.property);l!==-1&&t.add(l)}else if(s.kind==="rule"||s.kind==="at-rule")for(let l of s.nodes)e.push(l)}return{order:Array.from(t).sort((s,l)=>s-l),count:i}}function Re(r,t){let i=0,e=B("&",r),o=new Set,s=new q(()=>new Set),l=new q(()=>new Set);F([e],(g,{parent:h})=>{if(g.kind==="at-rule"){if(g.name==="@keyframes")return F(g.nodes,w=>{if(w.kind==="at-rule"&&w.name==="@apply")throw new Error("You cannot use `@apply` inside `@keyframes`.")}),1;if(g.name==="@utility"){let w=g.params.replace(/-\*$/,"");l.get(w).add(g),F(g.nodes,v=>{if(!(v.kind!=="at-rule"||v.name!=="@apply")){o.add(g);for(let A of pr(v,t))s.get(g).add(A)}});return}if(g.name==="@apply"){if(h===null)return;i|=1,o.add(h);for(let w of pr(g,t))s.get(h).add(w)}}});let d=new Set,u=[],c=new Set;function m(g,h=[]){if(!d.has(g)){if(c.has(g)){let w=h[(h.indexOf(g)+1)%h.length];throw g.kind==="at-rule"&&g.name==="@utility"&&w.kind==="at-rule"&&w.name==="@utility"&&F(g.nodes,v=>{if(v.kind!=="at-rule"||v.name!=="@apply")return;let A=v.params.split(/\s+/g);for(let k of A)for(let b of t.parseCandidate(k))switch(b.kind){case"arbitrary":break;case"static":case"functional":if(w.params.replace(/-\*$/,"")===b.root)throw new Error(`You cannot \`@apply\` the \`${k}\` utility here because it creates a circular dependency.`);break;default:}}),new Error(`Circular dependency detected: + +${re([g])} +Relies on: + +${re([w])}`)}c.add(g);for(let w of s.get(g))for(let v of l.get(w))h.push(g),m(v,h),h.pop();d.add(g),c.delete(g),u.push(g)}}for(let g of o)m(g);for(let g of u)if("nodes"in g)for(let h=0;h{throw new Error(`Cannot apply unknown utility class: ${b}`)}}).astNodes,k=[];for(let b of A)if(b.kind==="rule")for(let V of b.nodes)k.push(V);else k.push(b);g.nodes.splice(h,1,...k)}}return i}function*pr(r,t){for(let i of r.params.split(/\s+/g))for(let e of t.parseCandidate(i))switch(e.kind){case"arbitrary":break;case"static":case"functional":yield e.root;break;default:}}async function yt(r,t,i,e=0){let o=0,s=[];return F(r,(l,{replaceWith:d})=>{if(l.kind==="at-rule"&&(l.name==="@import"||l.name==="@reference")){let u=ki(G(l.params));if(u===null)return;l.name==="@reference"&&(u.media="reference"),o|=2;let{uri:c,layer:m,media:g,supports:h}=u;if(c.startsWith("data:")||c.startsWith("http://")||c.startsWith("https://"))return;let w=ne({},[]);return s.push((async()=>{if(e>100)throw new Error(`Exceeded maximum recursion depth while resolving \`${c}\` in \`${t}\`)`);let v=await i(c,t),A=me(v.content);await yt(A,v.base,i,e+1),w.nodes=bi([ne({base:v.base},A)],m,g,h)})()),d(w),1}}),s.length>0&&await Promise.all(s),o}function ki(r){let t,i=null,e=null,o=null;for(let s=0;s/g,"1")),e[0]==="opacity"&&(typeof o=="number"||typeof o=="string")){let l=typeof o=="string"?parseFloat(o):o;l>=0&&l<=1&&(o=l*100+"%")}let s=Ye(e);s&&r.theme.add(`--${s}`,""+o,7)}if(Object.hasOwn(t,"fontFamily")){let e=5;{let o=Ae(t.fontFamily.sans);o&&r.theme.hasDefault("--font-sans")&&(r.theme.add("--default-font-family",o,e),r.theme.add("--default-font-feature-settings",Ae(t.fontFamily.sans,"fontFeatureSettings")??"normal",e),r.theme.add("--default-font-variation-settings",Ae(t.fontFamily.sans,"fontVariationSettings")??"normal",e))}{let o=Ae(t.fontFamily.mono);o&&r.theme.hasDefault("--font-mono")&&(r.theme.add("--default-mono-font-family",o,e),r.theme.add("--default-mono-font-feature-settings",Ae(t.fontFamily.mono,"fontFeatureSettings")??"normal",e),r.theme.add("--default-mono-font-variation-settings",Ae(t.fontFamily.mono,"fontVariationSettings")??"normal",e))}}return t}function xi(r){let t=[];return gr(r,[],(i,e)=>{if(Ci(i))return t.push([e,i]),1;if($i(i)){t.push([e,i[0]]);for(let o of Reflect.ownKeys(i[1]))t.push([[...e,`-${o}`],i[1][o]]);return 1}if(Array.isArray(i)&&i.every(o=>typeof o=="string"))return e[0]==="fontSize"?(t.push([e,i[0]]),i.length>=2&&t.push([[...e,"-line-height"],i[1]])):t.push([e,i.join(", ")]),1}),t}var Ai=/^[a-zA-Z0-9-_%/\.]+$/;function Ye(r){if(r[0]==="container")return null;r=structuredClone(r),r[0]==="animation"&&(r[0]="animate"),r[0]==="aspectRatio"&&(r[0]="aspect"),r[0]==="borderRadius"&&(r[0]="radius"),r[0]==="boxShadow"&&(r[0]="shadow"),r[0]==="colors"&&(r[0]="color"),r[0]==="containers"&&(r[0]="container"),r[0]==="fontFamily"&&(r[0]="font"),r[0]==="fontSize"&&(r[0]="text"),r[0]==="letterSpacing"&&(r[0]="tracking"),r[0]==="lineHeight"&&(r[0]="leading"),r[0]==="maxWidth"&&(r[0]="container"),r[0]==="screens"&&(r[0]="breakpoint"),r[0]==="transitionTimingFunction"&&(r[0]="ease");for(let t of r)if(!Ai.test(t))return null;return r.map((t,i,e)=>t==="1"&&i!==e.length-1?"":t).map(t=>t.replaceAll(".","_").replace(/([a-z])([A-Z])/g,(i,e,o)=>`${e}-${o.toLowerCase()}`)).filter((t,i)=>t!=="DEFAULT"||i!==r.length-1).join("-")}function Ci(r){return typeof r=="number"||typeof r=="string"}function $i(r){if(!Array.isArray(r)||r.length!==2||typeof r[0]!="string"&&typeof r[0]!="number"||r[1]===void 0||r[1]===null||typeof r[1]!="object")return!1;for(let t of Reflect.ownKeys(r[1]))if(typeof t!="string"||typeof r[1][t]!="string"&&typeof r[1][t]!="number")return!1;return!0}function gr(r,t=[],i){for(let e of Reflect.ownKeys(r)){let o=r[e];if(o==null)continue;let s=[...t,e],l=i(o,s)??0;if(l!==1){if(l===2)return 2;if(!(!Array.isArray(o)&&typeof o!="object")&&gr(o,s,i)===2)return 2}}}function Ze(r){let t=[];for(let i of _(r,".")){if(!i.includes("[")){t.push(i);continue}let e=0;for(;;){let o=i.indexOf("[",e),s=i.indexOf("]",o);if(o===-1||s===-1)break;o>e&&t.push(i.slice(e,o)),t.push(i.slice(o+1,s)),e=s+1}e<=i.length-1&&t.push(i.slice(e))}return t}function Ce(r){if(Object.prototype.toString.call(r)!=="[object Object]")return!1;let t=Object.getPrototypeOf(r);return t===null||Object.getPrototypeOf(t)===null}function Ke(r,t,i,e=[]){for(let o of t)if(o!=null)for(let s of Reflect.ownKeys(o)){e.push(s);let l=i(r[s],o[s],e);l!==void 0?r[s]=l:!Ce(r[s])||!Ce(o[s])?r[s]=o[s]:r[s]=Ke({},[r[s],o[s]],i,e),e.pop()}return r}function Qe(r,t,i){return function(o,s){let l=o.lastIndexOf("/"),d=null;l!==-1&&(d=o.slice(l+1).trim(),o=o.slice(0,l).trim());let u=(()=>{let c=Ze(o),[m,g]=Ni(r.theme,c),h=i(hr(t()??{},c)??null);if(typeof h=="string"&&(h=h.replace("","1")),typeof m!="object")return typeof g!="object"&&g&4?h??m:m;if(h!==null&&typeof h=="object"&&!Array.isArray(h)){let w=Ke({},[h],(v,A)=>A);if(m===null&&Object.hasOwn(h,"__CSS_VALUES__")){let v={};for(let A in h.__CSS_VALUES__)v[A]=h[A],delete w[A];m=v}for(let v in m)v!=="__CSS_VALUES__"&&(h?.__CSS_VALUES__?.[v]&4&&hr(w,v.split("-"))!==void 0||(w[ge(v)]=m[v]));return w}if(Array.isArray(m)&&Array.isArray(g)&&Array.isArray(h)){let w=m[0],v=m[1];g[0]&4&&(w=h[0]??w);for(let A of Object.keys(v))g[1][A]&4&&(v[A]=h[1][A]??v[A]);return[w,v]}return m??h})();return d&&typeof u=="string"&&(u=J(u,d)),u??s}}function Ni(r,t){if(t.length===1&&t[0].startsWith("--"))return[r.get([t[0]]),r.getOptions(t[0])];let i=Ye(t),e=new Map,o=new q(()=>new Map),s=r.namespace(`--${i}`);if(s.size===0)return[null,0];let l=new Map;for(let[m,g]of s){if(!m||!m.includes("--")){e.set(m,g),l.set(m,r.getOptions(m?`--${i}-${m}`:`--${i}`));continue}let h=m.indexOf("--"),w=m.slice(0,h),v=m.slice(h+2);v=v.replace(/-([a-z])/g,(A,k)=>k.toUpperCase()),o.get(w===""?null:w).set(v,[g,r.getOptions(`--${i}${m}`)])}let d=r.getOptions(`--${i}`);for(let[m,g]of o){let h=e.get(m);if(typeof h!="string")continue;let w={},v={};for(let[A,[k,b]]of g)w[A]=k,v[A]=b;e.set(m,[h,w]),l.set(m,[d,v])}let u={},c={};for(let[m,g]of e)vr(u,[m??"DEFAULT"],g);for(let[m,g]of l)vr(c,[m??"DEFAULT"],g);return t[t.length-1]==="DEFAULT"?[u?.DEFAULT??null,c.DEFAULT??0]:"DEFAULT"in u&&Object.keys(u).length===1?[u.DEFAULT,c.DEFAULT??0]:(u.__CSS_VALUES__=c,[u,c])}function hr(r,t){for(let i=0;i0){let h=Pe(o);e?e.nodes.push(h):t.push(h),o=""}let u=l,c=l+1;for(;c0){let c=Pe(o);u.nodes.push(c),o=""}i.length>0?e=i[i.length-1]:e=null;break}case Oi:case Ki:case ji:{if(o.length>0){let u=Pe(o);e?e.nodes.push(u):t.push(u)}o=String.fromCharCode(d);break}case Ar:{if(o.length>0){let m=Pe(o);e?e.nodes.push(m):t.push(m)}o="";let u=l,c=0;for(let m=l+1;m0&&t.push(Pe(o)),t}var Sr=/^[a-z@][a-zA-Z0-9/%._-]*$/;function kt({designSystem:r,ast:t,resolvedConfig:i,featuresRef:e,referenceMode:o}){let s={addBase(l){if(o)return;let d=oe(l);e.current|=be(d,r),t.push(I("@layer","base",d))},addVariant(l,d){if(!He.test(l))throw new Error(`\`addVariant('${l}')\` defines an invalid variant name. Variants should only contain alphanumeric, dashes or underscore characters.`);typeof d=="string"||Array.isArray(d)?r.variants.static(l,u=>{u.nodes=Er(d,u.nodes)},{compounds:we(typeof d=="string"?[d]:d)}):typeof d=="object"&&r.variants.fromAst(l,oe(d))},matchVariant(l,d,u){function c(g,h,w){let v=d(g,{modifier:h?.value??null});return Er(v,w)}let m=Object.keys(u?.values??{});r.variants.group(()=>{r.variants.functional(l,(g,h)=>{if(!h.value){if(u?.values&&"DEFAULT"in u.values){g.nodes=c(u.values.DEFAULT,h.modifier,g.nodes);return}return null}if(h.value.kind==="arbitrary")g.nodes=c(h.value.value,h.modifier,g.nodes);else if(h.value.kind==="named"&&u?.values){let w=u.values[h.value.value];if(typeof w!="string")return;g.nodes=c(w,h.modifier,g.nodes)}})},(g,h)=>{if(g.kind!=="functional"||h.kind!=="functional")return 0;let w=g.value?g.value.value:"DEFAULT",v=h.value?h.value.value:"DEFAULT",A=u?.values?.[w]??w,k=u?.values?.[v]??v;if(u&&typeof u.sort=="function")return u.sort({value:A,modifier:g.modifier?.value??null},{value:k,modifier:h.modifier?.value??null});let b=m.indexOf(w),V=m.indexOf(v);return b=b===-1?m.length:b,V=V===-1?m.length:V,b!==V?b-V:AObject.entries(c));d=d.flatMap(([c,m])=>_(c,",").map(g=>[g.trim(),m]));let u=new q(()=>[]);for(let[c,m]of d){if(c.startsWith("@keyframes ")){o||t.push(B(c,oe(m)));continue}let g=Xe(c),h=!1;if(Oe(g,w=>{if(w.kind==="selector"&&w.value[0]==="."&&Sr.test(w.value.slice(1))){let v=w.value;w.value="&";let A=je(g),k=v.slice(1),b=A==="&"?oe(m):[B(A,oe(m))];u.get(k).push(...b),h=!0,w.value=v;return}if(w.kind==="function"&&w.value===":not")return 1}),!h)throw new Error(`\`addUtilities({ '${c}' : \u2026 })\` defines an invalid utility selector. Utilities must be a single class name and start with a lowercase letter, eg. \`.scrollbar-none\`.`)}for(let[c,m]of u)r.theme.prefix&&F(m,g=>{if(g.kind==="rule"){let h=Xe(g.selector);Oe(h,w=>{w.kind==="selector"&&w.value[0]==="."&&(w.value=`.${r.theme.prefix}\\:${w.value.slice(1)}`)}),g.selector=je(h)}}),r.utilities.static(c,g=>{let h=structuredClone(m);return Rr(h,c,g.raw),e.current|=Re(h,r),h})},matchUtilities(l,d){let u=d?.type?Array.isArray(d?.type)?d.type:[d.type]:["any"];for(let[m,g]of Object.entries(l)){let h=function({negative:w}){return v=>{if(v.value?.kind==="arbitrary"&&u.length>0&&!u.includes("any")&&(v.value.dataType&&!u.includes(v.value.dataType)||!v.value.dataType&&!W(v.value.value,u)))return;let A=u.includes("color"),k=null,b=!1;{let R=d?.values??{};A&&(R=Object.assign({inherit:"inherit",transparent:"transparent",current:"currentcolor"},R)),v.value?v.value.kind==="arbitrary"?k=v.value.value:v.value.fraction&&R[v.value.fraction]?(k=R[v.value.fraction],b=!0):R[v.value.value]?k=R[v.value.value]:R.__BARE_VALUE__&&(k=R.__BARE_VALUE__(v.value)??null,b=(v.value.fraction!==null&&k?.includes("/"))??!1):k=R.DEFAULT??null}if(k===null)return;let V;{let R=d?.modifiers??null;v.modifier?R==="any"||v.modifier.kind==="arbitrary"?V=v.modifier.value:R?.[v.modifier.value]?V=R[v.modifier.value]:A&&!Number.isNaN(Number(v.modifier.value))?V=`${v.modifier.value}%`:V=null:V=null}if(v.modifier&&V===null&&!b)return v.value?.kind==="arbitrary"?null:void 0;A&&V!==null&&(k=J(k,V)),w&&(k=`calc(${k} * -1)`);let S=oe(g(k,{modifier:V}));return Rr(S,m,v.raw),e.current|=Re(S,r),S}};var c=h;if(!Sr.test(m))throw new Error(`\`matchUtilities({ '${m}' : \u2026 })\` defines an invalid utility name. Utilities should be alphanumeric and start with a lowercase letter, eg. \`scrollbar\`.`);d?.supportsNegativeValues&&r.utilities.functional(`-${m}`,h({negative:!0}),{types:u}),r.utilities.functional(m,h({negative:!1}),{types:u}),r.utilities.suggest(m,()=>{let w=d?.values??{},v=new Set(Object.keys(w));v.delete("__BARE_VALUE__"),v.has("DEFAULT")&&(v.delete("DEFAULT"),v.add(null));let A=d?.modifiers??{},k=A==="any"?[]:Object.keys(A);return[{supportsNegative:d?.supportsNegativeValues??!1,values:Array.from(v),modifiers:k}]})}},addComponents(l,d){this.addUtilities(l,d)},matchComponents(l,d){this.matchUtilities(l,d)},theme:Qe(r,()=>i.theme??{},l=>l),prefix(l){return l},config(l,d){let u=i;if(!l)return u;let c=Ze(l);for(let m=0;mObject.entries(e));for(let[e,o]of i)if(typeof o!="object"){if(!e.startsWith("--")){if(o==="@slot"){t.push(B(e,[I("@slot")]));continue}e=e.replace(/([A-Z])/g,"-$1").toLowerCase()}t.push(a(e,String(o)))}else if(Array.isArray(o))for(let s of o)typeof s=="string"?t.push(a(e,s)):t.push(B(e,oe(s)));else o!==null&&t.push(B(e,oe(o)));return t}function Er(r,t){return(typeof r=="string"?[r]:r).flatMap(e=>{if(e.trim().endsWith("}")){let o=e.replace("}","{@slot}}"),s=me(o);return vt(s,t),s}else return B(e,t)})}function Rr(r,t,i){F(r,e=>{if(e.kind==="rule"){let o=Xe(e.selector);Oe(o,s=>{s.kind==="selector"&&s.value===`.${t}`&&(s.value=`.${se(i)}`)}),e.selector=je(o)}})}function Kr(r,t,i){for(let e of Ui(t))r.theme.addKeyframes(e)}function Ui(r){let t=[];if("keyframes"in r.theme)for(let[i,e]of Object.entries(r.theme.keyframes))t.push(I("@keyframes",i,oe(e)));return t}function Pr(r){return{theme:{...$t,colors:({theme:t})=>t("color",{}),extend:{fontSize:({theme:t})=>({...t("text",{})}),boxShadow:({theme:t})=>({...t("shadow",{})}),animation:({theme:t})=>({...t("animate",{})}),aspectRatio:({theme:t})=>({...t("aspect",{})}),borderRadius:({theme:t})=>({...t("radius",{})}),screens:({theme:t})=>({...t("breakpoint",{})}),letterSpacing:({theme:t})=>({...t("tracking",{})}),lineHeight:({theme:t})=>({...t("leading",{})}),transitionDuration:{DEFAULT:r.get(["--default-transition-duration"])??null},transitionTimingFunction:{DEFAULT:r.get(["--default-transition-timing-function"])??null},maxWidth:({theme:t})=>({...t("container",{})})}}}}var Ii={blocklist:[],future:{},prefix:"",important:!1,darkMode:null,theme:{},plugins:[],content:{files:[]}};function xt(r,t){let i={design:r,configs:[],plugins:[],content:{files:[]},theme:{},extend:{},result:structuredClone(Ii)};for(let o of t)bt(i,o);for(let o of i.configs)"darkMode"in o&&o.darkMode!==void 0&&(i.result.darkMode=o.darkMode??null),"prefix"in o&&o.prefix!==void 0&&(i.result.prefix=o.prefix??""),"blocklist"in o&&o.blocklist!==void 0&&(i.result.blocklist=o.blocklist??[]),"important"in o&&o.important!==void 0&&(i.result.important=o.important??!1);let e=zi(i);return{resolvedConfig:{...i.result,content:i.content,theme:i.theme,plugins:i.plugins},replacedThemeKeys:e}}function Fi(r,t){if(Array.isArray(r)&&Ce(r[0]))return r.concat(t);if(Array.isArray(t)&&Ce(t[0])&&Ce(r))return[r,...t];if(Array.isArray(t))return t}function bt(r,{config:t,base:i,path:e,reference:o}){let s=[];for(let u of t.plugins??[])"__isOptionsFunction"in u?s.push({...u(),reference:o}):"handler"in u?s.push({...u,reference:o}):s.push({handler:u,reference:o});if(Array.isArray(t.presets)&&t.presets.length===0)throw new Error("Error in the config file/plugin/preset. An empty preset (`preset: []`) is not currently supported.");for(let u of t.presets??[])bt(r,{path:e,base:i,config:u,reference:o});for(let u of s)r.plugins.push(u),u.config&&bt(r,{path:e,base:i,config:u.config,reference:!!u.reference});let l=t.content??[],d=Array.isArray(l)?l:l.files;for(let u of d)r.content.files.push(typeof u=="object"?u:{base:i,pattern:u});r.configs.push(t)}function zi(r){let t=new Set,i=Qe(r.design,()=>r.theme,o),e=Object.assign(i,{theme:i,colors:Ct});function o(s){return typeof s=="function"?s(e)??null:s??null}for(let s of r.configs){let l=s.theme??{},d=l.extend??{};for(let u in l)u!=="extend"&&t.add(u);Object.assign(r.theme,l);for(let u in d)r.extend[u]??=[],r.extend[u].push(d[u])}delete r.theme.extend;for(let s in r.extend){let l=[r.theme[s],...r.extend[s]];r.theme[s]=()=>{let d=l.map(o);return Ke({},d,Fi)}}for(let s in r.theme)r.theme[s]=o(r.theme[s]);if(r.theme.screens&&typeof r.theme.screens=="object")for(let s of Object.keys(r.theme.screens)){let l=r.theme.screens[s];l&&typeof l=="object"&&("raw"in l||"max"in l||"min"in l&&(r.theme.screens[s]=l.min))}return t}function Or(r,t){let i=r.theme.container||{};if(typeof i!="object"||i===null)return;let e=Li(i,t);e.length!==0&&t.utilities.static("container",()=>structuredClone(e))}function Li({center:r,padding:t,screens:i},e){let o=[],s=null;if(r&&o.push(a("margin-inline","auto")),(typeof t=="string"||typeof t=="object"&&t!==null&&"DEFAULT"in t)&&o.push(a("padding-inline",typeof t=="string"?t:t.DEFAULT)),typeof i=="object"&&i!==null){s=new Map;let l=Array.from(e.theme.namespace("--breakpoint").entries());if(l.sort((d,u)=>ve(d[1],u[1],"asc")),l.length>0){let[d]=l[0];o.push(I("@media",`(width >= --theme(--breakpoint-${d}))`,[a("max-width","none")]))}for(let[d,u]of Object.entries(i)){if(typeof u=="object")if("min"in u)u=u.min;else continue;s.set(d,I("@media",`(width >= ${u})`,[a("max-width",u)]))}}if(typeof t=="object"&&t!==null){let l=Object.entries(t).filter(([d])=>d!=="DEFAULT").map(([d,u])=>[d,e.theme.resolveValue(d,["--breakpoint"]),u]).filter(Boolean);l.sort((d,u)=>ve(d[1],u[1],"asc"));for(let[d,,u]of l)if(s&&s.has(d))s.get(d).nodes.push(a("padding-inline",u));else{if(s)continue;o.push(I("@media",`(width >= theme(--breakpoint-${d}))`,[a("padding-inline",u)]))}}if(s)for(let[,l]of s)o.push(l);return o}function jr({addVariant:r,config:t}){let i=t("darkMode",null),[e,o=".dark"]=Array.isArray(i)?i:[i];if(e==="variant"){let s;if(Array.isArray(o)||typeof o=="function"?s=o:typeof o=="string"&&(s=[o]),Array.isArray(s))for(let l of s)l===".dark"?(e=!1,console.warn('When using `variant` for `darkMode`, you must provide a selector.\nExample: `darkMode: ["variant", ".your-selector &"]`')):l.includes("&")||(e=!1,console.warn('When using `variant` for `darkMode`, your selector must contain `&`.\nExample `darkMode: ["variant", ".your-selector &"]`'));o=s}e===null||(e==="selector"?r("dark",`&:where(${o}, ${o} *)`):e==="media"?r("dark","@media (prefers-color-scheme: dark)"):e==="variant"?r("dark",o):e==="class"&&r("dark",`&:is(${o} *)`))}function _r(r){for(let[t,i]of[["t","top"],["tr","top right"],["r","right"],["br","bottom right"],["b","bottom"],["bl","bottom left"],["l","left"],["tl","top left"]])r.utilities.static(`bg-gradient-to-${t}`,()=>[a("--tw-gradient-position",`to ${i} in oklab`),a("background-image","linear-gradient(var(--tw-gradient-stops))")]);r.utilities.static("bg-left-top",()=>[a("background-position","left top")]),r.utilities.static("bg-right-top",()=>[a("background-position","right top")]),r.utilities.static("bg-left-bottom",()=>[a("background-position","left bottom")]),r.utilities.static("bg-right-bottom",()=>[a("background-position","right bottom")]),r.utilities.static("object-left-top",()=>[a("object-position","left top")]),r.utilities.static("object-right-top",()=>[a("object-position","right top")]),r.utilities.static("object-left-bottom",()=>[a("object-position","left bottom")]),r.utilities.static("object-right-bottom",()=>[a("object-position","right bottom")]),r.utilities.functional("max-w-screen",t=>{if(!t.value||t.value.kind==="arbitrary")return;let i=r.theme.resolve(t.value.value,["--breakpoint"]);if(i)return[a("max-width",i)]}),r.utilities.static("overflow-ellipsis",()=>[a("text-overflow","ellipsis")]),r.utilities.static("decoration-slice",()=>[a("-webkit-box-decoration-break","slice"),a("box-decoration-break","slice")]),r.utilities.static("decoration-clone",()=>[a("-webkit-box-decoration-break","clone"),a("box-decoration-break","clone")]),r.utilities.functional("flex-shrink",t=>{if(!t.modifier){if(!t.value)return[a("flex-shrink","1")];if(t.value.kind==="arbitrary")return[a("flex-shrink",t.value.value)];if(E(t.value.value))return[a("flex-shrink",t.value.value)]}}),r.utilities.functional("flex-grow",t=>{if(!t.modifier){if(!t.value)return[a("flex-grow","1")];if(t.value.kind==="arbitrary")return[a("flex-grow",t.value.value)];if(E(t.value.value))return[a("flex-grow",t.value.value)]}})}function Dr(r,t){let i=r.theme.screens||{},e=t.variants.get("min")?.order??0,o=[];for(let[l,d]of Object.entries(i)){let h=function(w){t.variants.static(l,v=>{v.nodes=[I("@media",g,v.nodes)]},{order:w})};var s=h;let u=t.variants.get(l),c=t.theme.resolveValue(l,["--breakpoint"]);if(u&&c&&!t.theme.hasDefault(`--breakpoint-${l}`))continue;let m=!0;typeof d=="string"&&(m=!1);let g=Mi(d);m?o.push(h):h(e)}if(o.length!==0){for(let[,l]of t.variants.variants)l.order>e&&(l.order+=o.length);t.variants.compareFns=new Map(Array.from(t.variants.compareFns).map(([l,d])=>(l>e&&(l+=o.length),[l,d])));for(let[l,d]of o.entries())d(e+l+1)}}function Mi(r){return(Array.isArray(r)?r:[r]).map(i=>typeof i=="string"?{min:i}:i&&typeof i=="object"?i:null).map(i=>{if(i===null)return null;if("raw"in i)return i.raw;let e="";return i.max!==void 0&&(e+=`${i.max} >= `),e+="width",i.min!==void 0&&(e+=` >= ${i.min}`),`(${e})`}).filter(Boolean).join(", ")}function Ur(r,t){let i=r.theme.aria||{},e=r.theme.supports||{},o=r.theme.data||{};if(Object.keys(i).length>0){let s=t.variants.get("aria"),l=s?.applyFn,d=s?.compounds;t.variants.functional("aria",(u,c)=>{let m=c.value;return m&&m.kind==="named"&&m.value in i?l?.(u,{...c,value:{kind:"arbitrary",value:i[m.value]}}):l?.(u,c)},{compounds:d})}if(Object.keys(e).length>0){let s=t.variants.get("supports"),l=s?.applyFn,d=s?.compounds;t.variants.functional("supports",(u,c)=>{let m=c.value;return m&&m.kind==="named"&&m.value in e?l?.(u,{...c,value:{kind:"arbitrary",value:e[m.value]}}):l?.(u,c)},{compounds:d})}if(Object.keys(o).length>0){let s=t.variants.get("data"),l=s?.applyFn,d=s?.compounds;t.variants.functional("data",(u,c)=>{let m=c.value;return m&&m.kind==="named"&&m.value in o?l?.(u,{...c,value:{kind:"arbitrary",value:o[m.value]}}):l?.(u,c)},{compounds:d})}}var Wi=/^[a-z]+$/;async function Fr({designSystem:r,base:t,ast:i,loadModule:e,sources:o}){let s=0,l=[],d=[];F(i,(g,{parent:h,replaceWith:w,context:v})=>{if(g.kind==="at-rule"){if(g.name==="@plugin"){if(h!==null)throw new Error("`@plugin` cannot be nested.");let A=g.params.slice(1,-1);if(A.length===0)throw new Error("`@plugin` must have a path.");let k={};for(let b of g.nodes??[]){if(b.kind!=="declaration")throw new Error(`Unexpected \`@plugin\` option: + +${re([b])} + +\`@plugin\` options must be a flat list of declarations.`);if(b.value===void 0)continue;let V=b.value,S=_(V,",").map(R=>{if(R=R.trim(),R==="null")return null;if(R==="true")return!0;if(R==="false")return!1;if(Number.isNaN(Number(R))){if(R[0]==='"'&&R[R.length-1]==='"'||R[0]==="'"&&R[R.length-1]==="'")return R.slice(1,-1);if(R[0]==="{"&&R[R.length-1]==="}")throw new Error(`Unexpected \`@plugin\` option: Value of declaration \`${re([b]).trim()}\` is not supported. + +Using an object as a plugin option is currently only supported in JavaScript configuration files.`)}else return Number(R);return R});k[b.property]=S.length===1?S[0]:S}l.push([{id:A,base:v.base,reference:!!v.reference},Object.keys(k).length>0?k:null]),w([]),s|=4;return}if(g.name==="@config"){if(g.nodes.length>0)throw new Error("`@config` cannot have a body.");if(h!==null)throw new Error("`@config` cannot be nested.");d.push({id:g.params.slice(1,-1),base:v.base,reference:!!v.reference}),w([]),s|=4;return}}}),_r(r);let u=r.resolveThemeValue;if(r.resolveThemeValue=function(h,w){return h.startsWith("--")?u(h,w):(s|=Ir({designSystem:r,base:t,ast:i,sources:o,configs:[],pluginDetails:[]}),r.resolveThemeValue(h,w))},!l.length&&!d.length)return 0;let[c,m]=await Promise.all([Promise.all(d.map(async({id:g,base:h,reference:w})=>{let v=await e(g,h,"config");return{path:g,base:v.base,config:v.module,reference:w}})),Promise.all(l.map(async([{id:g,base:h,reference:w},v])=>{let A=await e(g,h,"plugin");return{path:g,base:A.base,plugin:A.module,options:v,reference:w}}))]);return s|=Ir({designSystem:r,base:t,ast:i,sources:o,configs:c,pluginDetails:m}),s}function Ir({designSystem:r,base:t,ast:i,sources:e,configs:o,pluginDetails:s}){let l=0,u=[...s.map(k=>{if(!k.options)return{config:{plugins:[k.plugin]},base:k.base,reference:k.reference};if("__isOptionsFunction"in k.plugin)return{config:{plugins:[k.plugin(k.options)]},base:k.base,reference:k.reference};throw new Error(`The plugin "${k.path}" does not accept options`)}),...o],{resolvedConfig:c}=xt(r,[{config:Pr(r.theme),base:t,reference:!0},...u,{config:{plugins:[jr]},base:t,reference:!0}]),{resolvedConfig:m,replacedThemeKeys:g}=xt(r,u),h=r.resolveThemeValue;r.resolveThemeValue=function(b,V){if(b[0]==="-"&&b[1]==="-")return h(b,V);let S=v.theme(b,void 0);if(Array.isArray(S)&&S.length===2)return S[0];if(Array.isArray(S))return S.join(", ");if(typeof S=="string")return S};let w={designSystem:r,ast:i,resolvedConfig:c,featuresRef:{set current(k){l|=k}}},v=kt({...w,referenceMode:!1}),A;for(let{handler:k,reference:b}of c.plugins)b?(A||=kt({...w,referenceMode:!0}),k(A)):k(v);if(mr(r,m,g),Kr(r,m,g),Ur(m,r),Dr(m,r),Or(m,r),!r.theme.prefix&&c.prefix){if(c.prefix.endsWith("-")&&(c.prefix=c.prefix.slice(0,-1),console.warn(`The prefix "${c.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only and is written as a variant before all utilities. We have fixed up the prefix for you. Remove the trailing \`-\` to silence this warning.`)),!Wi.test(c.prefix))throw new Error(`The prefix "${c.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only.`);r.theme.prefix=c.prefix}if(!r.important&&c.important===!0&&(r.important=!0),typeof c.important=="string"){let k=c.important;F(i,(b,{replaceWith:V,parent:S})=>{if(b.kind==="at-rule"&&!(b.name!=="@tailwind"||b.params!=="utilities"))return S?.kind==="rule"&&S.selector===k?2:(V(L(k,[b])),2)})}for(let k of c.blocklist)r.invalidCandidates.add(k);for(let k of c.content.files){if("raw"in k)throw new Error(`Error in the config file/plugin/preset. The \`content\` key contains a \`raw\` entry: + +${JSON.stringify(k,null,2)} + +This feature is not currently supported.`);let b=!1;k.pattern[0]=="!"&&(b=!0,k.pattern=k.pattern.slice(1)),e.push({...k,negated:b})}return l}var zr=/^(-?\d+)\.\.(-?\d+)(?:\.\.(-?\d+))?$/;function et(r){let t=r.indexOf("{");if(t===-1)return[r];let i=[],e=r.slice(0,t),o=r.slice(t),s=0,l=o.lastIndexOf("}");for(let g=0;get(g));let m=et(u);for(let g of m)for(let h of c)i.push(e+h+g);return i}function Bi(r){return zr.test(r)}function qi(r){let t=r.match(zr);if(!t)return[r];let[,i,e,o]=t,s=o?parseInt(o,10):void 0,l=[];if(/^-?\d+$/.test(i)&&/^-?\d+$/.test(e)){let d=parseInt(i,10),u=parseInt(e,10);if(s===void 0&&(s=d<=u?1:-1),s===0)throw new Error("Step cannot be zero in sequence expansion.");let c=d0&&(s=-s);for(let m=d;c?m<=u:m>=u;m+=s)l.push(m.toString())}return l}var Gi=/^[a-z]+$/,ut=(o=>(o[o.None=0]="None",o[o.AtProperty=1]="AtProperty",o[o.ColorMix=2]="ColorMix",o[o.All=3]="All",o))(ut||{});function Ji(){throw new Error("No `loadModule` function provided to `compile`")}function Hi(){throw new Error("No `loadStylesheet` function provided to `compile`")}function Yi(r){let t=0,i=null;for(let e of _(r," "))e==="reference"?t|=2:e==="inline"?t|=1:e==="default"?t|=4:e==="static"?t|=8:e.startsWith("prefix(")&&e.endsWith(")")&&(i=e.slice(7,-1));return[t,i]}var Se=(d=>(d[d.None=0]="None",d[d.AtApply=1]="AtApply",d[d.AtImport=2]="AtImport",d[d.JsPluginCompat=4]="JsPluginCompat",d[d.ThemeFunction=8]="ThemeFunction",d[d.Utilities=16]="Utilities",d[d.Variants=32]="Variants",d))(Se||{});async function Lr(r,{base:t="",loadModule:i=Ji,loadStylesheet:e=Hi}={}){let o=0;r=[ne({base:t},r)],o|=await yt(r,t,e);let s=null,l=new Le,d=[],u=[],c=null,m=null,g=[],h=[],w=[],v=[],A=null;F(r,(b,{parent:V,replaceWith:S,context:R})=>{if(b.kind==="at-rule"){if(b.name==="@tailwind"&&(b.params==="utilities"||b.params.startsWith("utilities"))){if(m!==null){S([]);return}let O=_(b.params," ");for(let U of O)if(U.startsWith("source(")){let P=U.slice(7,-1);if(P==="none"){A=P;continue}if(P[0]==='"'&&P[P.length-1]!=='"'||P[0]==="'"&&P[P.length-1]!=="'"||P[0]!=="'"&&P[0]!=='"')throw new Error("`source(\u2026)` paths must be quoted.");A={base:R.sourceBase??R.base,pattern:P.slice(1,-1)}}m=b,o|=16}if(b.name==="@utility"){if(V!==null)throw new Error("`@utility` cannot be nested.");if(b.nodes.length===0)throw new Error(`\`@utility ${b.params}\` is empty. Utilities should include at least one property.`);let O=tr(b);if(O===null)throw new Error(`\`@utility ${b.params}\` defines an invalid utility name. Utilities should be alphanumeric and start with a lowercase letter.`);u.push(O)}if(b.name==="@source"){if(b.nodes.length>0)throw new Error("`@source` cannot have a body.");if(V!==null)throw new Error("`@source` cannot be nested.");let O=!1,U=!1,P=b.params;if(P[0]==="n"&&P.startsWith("not ")&&(O=!0,P=P.slice(4)),P[0]==="i"&&P.startsWith("inline(")&&(U=!0,P=P.slice(7,-1)),P[0]==='"'&&P[P.length-1]!=='"'||P[0]==="'"&&P[P.length-1]!=="'"||P[0]!=="'"&&P[0]!=='"')throw new Error("`@source` paths must be quoted.");let H=P.slice(1,-1);if(U){let M=O?v:w,z=_(H," ");for(let te of z)for(let X of et(te))M.push(X)}else h.push({base:R.base,pattern:H,negated:O});S([]);return}if(b.name==="@variant"&&(V===null?b.nodes.length===0?b.name="@custom-variant":(F(b.nodes,O=>{if(O.kind==="at-rule"&&O.name==="@slot")return b.name="@custom-variant",2}),b.name==="@variant"&&g.push(b)):g.push(b)),b.name==="@custom-variant"){if(V!==null)throw new Error("`@custom-variant` cannot be nested.");S([]);let[O,U]=_(b.params," ");if(!He.test(O))throw new Error(`\`@custom-variant ${O}\` defines an invalid variant name. Variants should only contain alphanumeric, dashes or underscore characters.`);if(b.nodes.length>0&&U)throw new Error(`\`@custom-variant ${O}\` cannot have both a selector and a body.`);if(b.nodes.length===0){if(!U)throw new Error(`\`@custom-variant ${O}\` has no selector or body.`);let P=_(U.slice(1,-1),",");if(P.length===0||P.some(z=>z.trim()===""))throw new Error(`\`@custom-variant ${O} (${P.join(",")})\` selector is invalid.`);let H=[],M=[];for(let z of P)z=z.trim(),z[0]==="@"?H.push(z):M.push(z);d.push(z=>{z.variants.static(O,te=>{let X=[];M.length>0&&X.push(L(M.join(", "),te.nodes));for(let ae of H)X.push(B(ae,te.nodes));te.nodes=X},{compounds:we([...M,...H])})});return}else{d.push(P=>{P.variants.fromAst(O,b.nodes)});return}}if(b.name==="@media"){let O=_(b.params," "),U=[];for(let P of O)if(P.startsWith("source(")){let H=P.slice(7,-1);F(b.nodes,(M,{replaceWith:z})=>{if(M.kind==="at-rule"&&M.name==="@tailwind"&&M.params==="utilities")return M.params+=` source(${H})`,z([ne({sourceBase:R.base},[M])]),2})}else if(P.startsWith("theme(")){let H=P.slice(6,-1),M=H.includes("reference");F(b.nodes,z=>{if(z.kind!=="at-rule"){if(M)throw new Error('Files imported with `@import "\u2026" theme(reference)` must only contain `@theme` blocks.\nUse `@reference "\u2026";` instead.');return 0}if(z.name==="@theme")return z.params+=" "+H,1})}else if(P.startsWith("prefix(")){let H=P.slice(7,-1);F(b.nodes,M=>{if(M.kind==="at-rule"&&M.name==="@theme")return M.params+=` prefix(${H})`,1})}else P==="important"?s=!0:P==="reference"?b.nodes=[ne({reference:!0},b.nodes)]:U.push(P);U.length>0?b.params=U.join(" "):O.length>0&&S(b.nodes)}if(b.name==="@theme"){let[O,U]=Yi(b.params);if(R.reference&&(O|=2),U){if(!Gi.test(U))throw new Error(`The prefix "${U}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only.`);l.prefix=U}return F(b.nodes,P=>{if(P.kind==="at-rule"&&P.name==="@keyframes")return l.addKeyframes(P),1;if(P.kind==="comment")return;if(P.kind==="declaration"&&P.property.startsWith("--")){l.add(ge(P.property),P.value??"",O);return}let H=re([I(b.name,b.params,[P])]).split(` +`).map((M,z,te)=>`${z===0||z>=te.length-2?" ":">"} ${M}`).join(` +`);throw new Error(`\`@theme\` blocks must only contain custom properties or \`@keyframes\`. + +${H}`)}),c?S([]):(c=L(":root, :host",[]),S([c])),1}}});let k=ur(l);if(s&&(k.important=s),v.length>0)for(let b of v)k.invalidCandidates.add(b);o|=await Fr({designSystem:k,base:t,ast:r,loadModule:i,sources:h});for(let b of d)b(k);for(let b of u)b(k);if(c){let b=[];for(let[S,R]of k.theme.entries())R.options&2||b.push(a(se(S),R.value));let V=k.theme.getKeyframes();for(let S of V)r.push(ne({theme:!0},[D([S])]));c.nodes=[ne({theme:!0},b)]}if(m){let b=m;b.kind="context",b.context={}}if(g.length>0){for(let b of g){let V=L("&",b.nodes),S=b.params,R=k.parseVariant(S);if(R===null)throw new Error(`Cannot use \`@variant\` with unknown variant: ${S}`);if(xe(V,R,k.variants)===null)throw new Error(`Cannot use \`@variant\` with variant: ${S}`);Object.assign(b,V)}o|=32}return o|=be(r,k),o|=Re(r,k),F(r,(b,{replaceWith:V})=>{if(b.kind==="at-rule")return b.name==="@utility"&&V([]),1}),{designSystem:k,ast:r,sources:h,root:A,utilitiesNode:m,features:o,inlineCandidates:w}}async function Zi(r,t={}){let{designSystem:i,ast:e,sources:o,root:s,utilitiesNode:l,features:d,inlineCandidates:u}=await Lr(r,t);e.unshift(ze(`! tailwindcss v${Nt} | MIT License | https://tailwindcss.com `));function c(v){i.invalidCandidates.add(v)}let m=new Set,g=null,h=0,w=!1;for(let v of u)i.invalidCandidates.has(v)||(m.add(v),w=!0);return{sources:o,root:s,features:d,build(v){if(d===0)return r;if(!l)return g??=he(e,i,t.polyfills),g;let A=w,k=!1;w=!1;let b=m.size;for(let S of v)if(!i.invalidCandidates.has(S))if(S[0]==="-"&&S[1]==="-"){let R=i.theme.markUsedVariable(S);A||=R,k||=R}else m.add(S),A||=m.size!==b;if(!A)return g??=he(e,i,t.polyfills),g;let V=ce(m,i,{onInvalidCandidate:c}).astNodes;return!k&&h===V.length?(g??=he(e,i,t.polyfills),g):(h=V.length,l.nodes=V,g=he(e,i,t.polyfills),g)}}}async function el(r,t={}){let i=me(r),e=await Zi(i,t),o=i,s=r;return{...e,build(l){let d=e.build(l);return d===o||(s=re(d),o=d),s}}}async function tl(r,t={}){return(await Lr(me(r),t)).designSystem}function Qi(){throw new Error("It looks like you're trying to use `tailwindcss` directly as a PostCSS plugin. The PostCSS plugin has moved to a separate package, so to continue using Tailwind CSS with PostCSS you'll need to install `@tailwindcss/postcss` and update your PostCSS configuration.")}export{ut as a,Se as b,Zi as c,el as d,tl as e,Qi as f}; diff --git a/node_modules/tailwindcss/dist/chunk-P5FH2LZE.mjs b/node_modules/tailwindcss/dist/chunk-P5FH2LZE.mjs new file mode 100644 index 0000000..f8e601b --- /dev/null +++ b/node_modules/tailwindcss/dist/chunk-P5FH2LZE.mjs @@ -0,0 +1 @@ +import{a as S}from"./chunk-HTB5LLOP.mjs";var O=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","transparent","currentcolor","canvas","canvastext","linktext","visitedtext","activetext","buttonface","buttontext","buttonborder","field","fieldtext","highlight","highlighttext","selecteditem","selecteditemtext","mark","marktext","graytext","accentcolor","accentcolortext"]),R=/^(rgba?|hsla?|hwb|color|(ok)?(lab|lch)|light-dark|color-mix)\(/i;function v(e){return e.charCodeAt(0)===35||R.test(e)||O.has(e.toLowerCase())}var E=["calc","min","max","clamp","mod","rem","sin","cos","tan","asin","acos","atan","atan2","pow","sqrt","hypot","log","exp","round"],h=["anchor-size"],A=new RegExp(`(${h.join("|")})\\(`,"g");function b(e){return e.indexOf("(")!==-1&&E.some(r=>e.includes(`${r}(`))}function ie(e){if(!E.some(n=>e.includes(n)))return e;let r=!1;h.some(n=>e.includes(n))&&(A.lastIndex=0,e=e.replace(A,(n,o)=>(r=!0,`$${h.indexOf(o)}$(`)));let t="",i=[];for(let n=0;n=0;c--){let x=e.charCodeAt(c);if(x>=48&&x<=57)m=c;else if(x>=97&&x<=122)m=c;else break}let a=e.slice(m,n);if(E.includes(a)){i.unshift(!0);continue}else if(i[0]&&a===""){i.unshift(!0);continue}i.unshift(!1);continue}else if(o===")")t+=o,i.shift();else if(o===","&&i[0]){t+=", ";continue}else{if(o===" "&&i[0]&&t[t.length-1]===" ")continue;if((o==="+"||o==="*"||o==="/"||o==="-")&&i[0]){let m=t.trimEnd(),a=m[m.length-1];if(a==="+"||a==="*"||a==="/"||a==="-"){t+=o;continue}else if(a==="("||a===","){t+=o;continue}else e[n-1]===" "?t+=`${o} `:t+=` ${o} `}else if(i[0]&&e.startsWith("to-zero",n)){let m=n;n+=7,t+=e.slice(m,n+1)}else t+=o}}return r?t.replace(/\$(\d+)\$/g,(n,o)=>h[o]??n):t}var y=new Uint8Array(256);function g(e,r){let t=0,i=[],n=0,o=e.length,m=r.charCodeAt(0);for(let a=0;a0&&c===y[t-1]&&t--;break}}return i.push(e.slice(n)),i}var _={color:v,length:w,percentage:C,ratio:j,number:N,integer:p,url:z,position:Q,"bg-size":X,"line-width":I,image:H,"family-name":q,"generic-name":P,"absolute-size":B,"relative-size":W,angle:ee,vector:re};function pe(e,r){if(e.startsWith("var("))return null;for(let t of r)if(_[t]?.(e))return t;return null}var D=/^url\(.*\)$/;function z(e){return D.test(e)}function I(e){return g(e," ").every(r=>w(r)||N(r)||r==="thin"||r==="medium"||r==="thick")}var F=/^(?:element|image|cross-fade|image-set)\(/,$=/^(repeating-)?(conic|linear|radial)-gradient\(/;function H(e){let r=0;for(let t of g(e,","))if(!t.startsWith("var(")){if(z(t)){r+=1;continue}if($.test(t)){r+=1;continue}if(F.test(t)){r+=1;continue}return!1}return r>0}function P(e){return e==="serif"||e==="sans-serif"||e==="monospace"||e==="cursive"||e==="fantasy"||e==="system-ui"||e==="ui-serif"||e==="ui-sans-serif"||e==="ui-monospace"||e==="ui-rounded"||e==="math"||e==="emoji"||e==="fangsong"}function q(e){let r=0;for(let t of g(e,",")){let i=t.charCodeAt(0);if(i>=48&&i<=57)return!1;t.startsWith("var(")||(r+=1)}return r>0}function B(e){return e==="xx-small"||e==="x-small"||e==="small"||e==="medium"||e==="large"||e==="x-large"||e==="xx-large"||e==="xxx-large"}function W(e){return e==="larger"||e==="smaller"}var u=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,M=new RegExp(`^${u.source}$`);function N(e){return M.test(e)||b(e)}var G=new RegExp(`^${u.source}%$`);function C(e){return G.test(e)||b(e)}var V=new RegExp(`^${u.source}s*/s*${u.source}$`);function j(e){return V.test(e)||b(e)}var K=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],Y=new RegExp(`^${u.source}(${K.join("|")})$`);function w(e){return Y.test(e)||b(e)}function Q(e){let r=0;for(let t of g(e," ")){if(t==="center"||t==="top"||t==="right"||t==="bottom"||t==="left"){r+=1;continue}if(!t.startsWith("var(")){if(w(t)||C(t)){r+=1;continue}return!1}}return r>0}function X(e){let r=0;for(let t of g(e,",")){if(t==="cover"||t==="contain"){r+=1;continue}let i=g(t," ");if(i.length!==1&&i.length!==2)return!1;if(i.every(n=>n==="auto"||w(n)||C(n))){r+=1;continue}}return r>0}var J=["deg","rad","grad","turn"],Z=new RegExp(`^${u.source}(${J.join("|")})$`);function ee(e){return Z.test(e)}var te=new RegExp(`^${u.source} +${u.source} +${u.source}$`);function re(e){return te.test(e)}function p(e){let r=Number(e);return Number.isInteger(r)&&r>=0&&String(r)===String(e)}function ge(e){let r=Number(e);return Number.isInteger(r)&&r>0&&String(r)===String(e)}function ue(e){return T(e,.25)}function de(e){return T(e,.25)}function T(e,r){let t=Number(e);return t>=0&&t%r===0&&String(t)===String(e)}function f(e){return{__BARE_VALUE__:e}}var l=f(e=>{if(p(e.value))return e.value}),s=f(e=>{if(p(e.value))return`${e.value}%`}),d=f(e=>{if(p(e.value))return`${e.value}px`}),L=f(e=>{if(p(e.value))return`${e.value}ms`}),k=f(e=>{if(p(e.value))return`${e.value}deg`}),ne=f(e=>{if(e.fraction===null)return;let[r,t]=g(e.fraction,"/");if(!(!p(r)||!p(t)))return e.fraction}),U=f(e=>{if(p(Number(e.value)))return`repeat(${e.value}, minmax(0, 1fr))`}),ye={accentColor:({theme:e})=>e("colors"),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9",...ne},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>({...e("brightness"),...s}),backdropContrast:({theme:e})=>({...e("contrast"),...s}),backdropGrayscale:({theme:e})=>({...e("grayscale"),...s}),backdropHueRotate:({theme:e})=>({...e("hueRotate"),...k}),backdropInvert:({theme:e})=>({...e("invert"),...s}),backdropOpacity:({theme:e})=>({...e("opacity"),...s}),backdropSaturate:({theme:e})=>({...e("saturate"),...s}),backdropSepia:({theme:e})=>({...e("sepia"),...s}),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>e("spacing"),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px",...d},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2",...s},caretColor:({theme:e})=>e("colors"),colors:()=>({...S}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",...l},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2",...s},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>({...e("borderWidth"),...d}),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>e("colors"),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",...e("spacing")}),flexGrow:{0:"0",DEFAULT:"1",...l},flexShrink:{0:"0",DEFAULT:"1",...l},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%",...s},grayscale:{0:"0",DEFAULT:"100%",...s},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...l},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...l},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...l},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...l},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...U},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...U},height:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg",...k},inset:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),invert:{0:"0",DEFAULT:"100%",...s},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",...l},maxHeight:({theme:e})=>({none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),maxWidth:({theme:e})=>({none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...e("spacing")}),minHeight:({theme:e})=>({full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),minWidth:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1",...s},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",...l},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...d},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...d},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...d},ringOpacity:({theme:e})=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...d},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg",...k},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2",...s},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",...s},screens:{sm:"40rem",md:"48rem",lg:"64rem",xl:"80rem","2xl":"96rem"},scrollMargin:({theme:e})=>e("spacing"),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%",...s},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",...k},space:({theme:e})=>e("spacing"),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2",...l},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...d},textIndent:({theme:e})=>e("spacing"),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...d},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...L},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...L},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),size:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),width:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50",...l}};export{ie as a,g as b,pe as c,p as d,ge as e,ue as f,de as g,ye as h}; diff --git a/node_modules/tailwindcss/dist/colors-b_6i0Oi7.d.ts b/node_modules/tailwindcss/dist/colors-b_6i0Oi7.d.ts new file mode 100644 index 0000000..8f187dc --- /dev/null +++ b/node_modules/tailwindcss/dist/colors-b_6i0Oi7.d.ts @@ -0,0 +1,295 @@ +declare const _default: { + inherit: string; + current: string; + transparent: string; + black: string; + white: string; + slate: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + gray: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + zinc: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + neutral: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + stone: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + red: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + orange: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + amber: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + yellow: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + lime: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + green: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + emerald: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + teal: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + cyan: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + sky: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + blue: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + indigo: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + violet: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + purple: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + fuchsia: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + pink: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + rose: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; +}; + +export { _default as _ }; diff --git a/node_modules/tailwindcss/dist/colors.d.mts b/node_modules/tailwindcss/dist/colors.d.mts new file mode 100644 index 0000000..5ea4701 --- /dev/null +++ b/node_modules/tailwindcss/dist/colors.d.mts @@ -0,0 +1,295 @@ +declare const _default: { + inherit: string; + current: string; + transparent: string; + black: string; + white: string; + slate: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + gray: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + zinc: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + neutral: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + stone: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + red: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + orange: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + amber: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + yellow: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + lime: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + green: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + emerald: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + teal: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + cyan: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + sky: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + blue: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + indigo: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + violet: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + purple: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + fuchsia: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + pink: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + rose: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; +}; + +export { _default as default }; diff --git a/node_modules/tailwindcss/dist/colors.d.ts b/node_modules/tailwindcss/dist/colors.d.ts new file mode 100644 index 0000000..e9d15d3 --- /dev/null +++ b/node_modules/tailwindcss/dist/colors.d.ts @@ -0,0 +1,5 @@ +import { _ as _default } from './colors-b_6i0Oi7.js'; + + + +export { _default as default }; diff --git a/node_modules/tailwindcss/dist/colors.js b/node_modules/tailwindcss/dist/colors.js new file mode 100644 index 0000000..409c0d5 --- /dev/null +++ b/node_modules/tailwindcss/dist/colors.js @@ -0,0 +1 @@ +"use strict";var l={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.046 257.417)",600:"oklch(44.6% 0.043 257.281)",700:"oklch(37.2% 0.044 257.287)",800:"oklch(27.9% 0.041 260.031)",900:"oklch(20.8% 0.042 265.755)",950:"oklch(12.9% 0.042 264.695)"},gray:{50:"oklch(98.5% 0.002 247.839)",100:"oklch(96.7% 0.003 264.542)",200:"oklch(92.8% 0.006 264.531)",300:"oklch(87.2% 0.01 258.338)",400:"oklch(70.7% 0.022 261.325)",500:"oklch(55.1% 0.027 264.364)",600:"oklch(44.6% 0.03 256.802)",700:"oklch(37.3% 0.034 259.733)",800:"oklch(27.8% 0.033 256.848)",900:"oklch(21% 0.034 264.665)",950:"oklch(13% 0.028 261.692)"},zinc:{50:"oklch(98.5% 0 0)",100:"oklch(96.7% 0.001 286.375)",200:"oklch(92% 0.004 286.32)",300:"oklch(87.1% 0.006 286.286)",400:"oklch(70.5% 0.015 286.067)",500:"oklch(55.2% 0.016 285.938)",600:"oklch(44.2% 0.017 285.786)",700:"oklch(37% 0.013 285.805)",800:"oklch(27.4% 0.006 286.033)",900:"oklch(21% 0.006 285.885)",950:"oklch(14.1% 0.005 285.823)"},neutral:{50:"oklch(98.5% 0 0)",100:"oklch(97% 0 0)",200:"oklch(92.2% 0 0)",300:"oklch(87% 0 0)",400:"oklch(70.8% 0 0)",500:"oklch(55.6% 0 0)",600:"oklch(43.9% 0 0)",700:"oklch(37.1% 0 0)",800:"oklch(26.9% 0 0)",900:"oklch(20.5% 0 0)",950:"oklch(14.5% 0 0)"},stone:{50:"oklch(98.5% 0.001 106.423)",100:"oklch(97% 0.001 106.424)",200:"oklch(92.3% 0.003 48.717)",300:"oklch(86.9% 0.005 56.366)",400:"oklch(70.9% 0.01 56.259)",500:"oklch(55.3% 0.013 58.071)",600:"oklch(44.4% 0.011 73.639)",700:"oklch(37.4% 0.01 67.558)",800:"oklch(26.8% 0.007 34.298)",900:"oklch(21.6% 0.006 56.043)",950:"oklch(14.7% 0.004 49.25)"},red:{50:"oklch(97.1% 0.013 17.38)",100:"oklch(93.6% 0.032 17.717)",200:"oklch(88.5% 0.062 18.334)",300:"oklch(80.8% 0.114 19.571)",400:"oklch(70.4% 0.191 22.216)",500:"oklch(63.7% 0.237 25.331)",600:"oklch(57.7% 0.245 27.325)",700:"oklch(50.5% 0.213 27.518)",800:"oklch(44.4% 0.177 26.899)",900:"oklch(39.6% 0.141 25.723)",950:"oklch(25.8% 0.092 26.042)"},orange:{50:"oklch(98% 0.016 73.684)",100:"oklch(95.4% 0.038 75.164)",200:"oklch(90.1% 0.076 70.697)",300:"oklch(83.7% 0.128 66.29)",400:"oklch(75% 0.183 55.934)",500:"oklch(70.5% 0.213 47.604)",600:"oklch(64.6% 0.222 41.116)",700:"oklch(55.3% 0.195 38.402)",800:"oklch(47% 0.157 37.304)",900:"oklch(40.8% 0.123 38.172)",950:"oklch(26.6% 0.079 36.259)"},amber:{50:"oklch(98.7% 0.022 95.277)",100:"oklch(96.2% 0.059 95.617)",200:"oklch(92.4% 0.12 95.746)",300:"oklch(87.9% 0.169 91.605)",400:"oklch(82.8% 0.189 84.429)",500:"oklch(76.9% 0.188 70.08)",600:"oklch(66.6% 0.179 58.318)",700:"oklch(55.5% 0.163 48.998)",800:"oklch(47.3% 0.137 46.201)",900:"oklch(41.4% 0.112 45.904)",950:"oklch(27.9% 0.077 45.635)"},yellow:{50:"oklch(98.7% 0.026 102.212)",100:"oklch(97.3% 0.071 103.193)",200:"oklch(94.5% 0.129 101.54)",300:"oklch(90.5% 0.182 98.111)",400:"oklch(85.2% 0.199 91.936)",500:"oklch(79.5% 0.184 86.047)",600:"oklch(68.1% 0.162 75.834)",700:"oklch(55.4% 0.135 66.442)",800:"oklch(47.6% 0.114 61.907)",900:"oklch(42.1% 0.095 57.708)",950:"oklch(28.6% 0.066 53.813)"},lime:{50:"oklch(98.6% 0.031 120.757)",100:"oklch(96.7% 0.067 122.328)",200:"oklch(93.8% 0.127 124.321)",300:"oklch(89.7% 0.196 126.665)",400:"oklch(84.1% 0.238 128.85)",500:"oklch(76.8% 0.233 130.85)",600:"oklch(64.8% 0.2 131.684)",700:"oklch(53.2% 0.157 131.589)",800:"oklch(45.3% 0.124 130.933)",900:"oklch(40.5% 0.101 131.063)",950:"oklch(27.4% 0.072 132.109)"},green:{50:"oklch(98.2% 0.018 155.826)",100:"oklch(96.2% 0.044 156.743)",200:"oklch(92.5% 0.084 155.995)",300:"oklch(87.1% 0.15 154.449)",400:"oklch(79.2% 0.209 151.711)",500:"oklch(72.3% 0.219 149.579)",600:"oklch(62.7% 0.194 149.214)",700:"oklch(52.7% 0.154 150.069)",800:"oklch(44.8% 0.119 151.328)",900:"oklch(39.3% 0.095 152.535)",950:"oklch(26.6% 0.065 152.934)"},emerald:{50:"oklch(97.9% 0.021 166.113)",100:"oklch(95% 0.052 163.051)",200:"oklch(90.5% 0.093 164.15)",300:"oklch(84.5% 0.143 164.978)",400:"oklch(76.5% 0.177 163.223)",500:"oklch(69.6% 0.17 162.48)",600:"oklch(59.6% 0.145 163.225)",700:"oklch(50.8% 0.118 165.612)",800:"oklch(43.2% 0.095 166.913)",900:"oklch(37.8% 0.077 168.94)",950:"oklch(26.2% 0.051 172.552)"},teal:{50:"oklch(98.4% 0.014 180.72)",100:"oklch(95.3% 0.051 180.801)",200:"oklch(91% 0.096 180.426)",300:"oklch(85.5% 0.138 181.071)",400:"oklch(77.7% 0.152 181.912)",500:"oklch(70.4% 0.14 182.503)",600:"oklch(60% 0.118 184.704)",700:"oklch(51.1% 0.096 186.391)",800:"oklch(43.7% 0.078 188.216)",900:"oklch(38.6% 0.063 188.416)",950:"oklch(27.7% 0.046 192.524)"},cyan:{50:"oklch(98.4% 0.019 200.873)",100:"oklch(95.6% 0.045 203.388)",200:"oklch(91.7% 0.08 205.041)",300:"oklch(86.5% 0.127 207.078)",400:"oklch(78.9% 0.154 211.53)",500:"oklch(71.5% 0.143 215.221)",600:"oklch(60.9% 0.126 221.723)",700:"oklch(52% 0.105 223.128)",800:"oklch(45% 0.085 224.283)",900:"oklch(39.8% 0.07 227.392)",950:"oklch(30.2% 0.056 229.695)"},sky:{50:"oklch(97.7% 0.013 236.62)",100:"oklch(95.1% 0.026 236.824)",200:"oklch(90.1% 0.058 230.902)",300:"oklch(82.8% 0.111 230.318)",400:"oklch(74.6% 0.16 232.661)",500:"oklch(68.5% 0.169 237.323)",600:"oklch(58.8% 0.158 241.966)",700:"oklch(50% 0.134 242.749)",800:"oklch(44.3% 0.11 240.79)",900:"oklch(39.1% 0.09 240.876)",950:"oklch(29.3% 0.066 243.157)"},blue:{50:"oklch(97% 0.014 254.604)",100:"oklch(93.2% 0.032 255.585)",200:"oklch(88.2% 0.059 254.128)",300:"oklch(80.9% 0.105 251.813)",400:"oklch(70.7% 0.165 254.624)",500:"oklch(62.3% 0.214 259.815)",600:"oklch(54.6% 0.245 262.881)",700:"oklch(48.8% 0.243 264.376)",800:"oklch(42.4% 0.199 265.638)",900:"oklch(37.9% 0.146 265.522)",950:"oklch(28.2% 0.091 267.935)"},indigo:{50:"oklch(96.2% 0.018 272.314)",100:"oklch(93% 0.034 272.788)",200:"oklch(87% 0.065 274.039)",300:"oklch(78.5% 0.115 274.713)",400:"oklch(67.3% 0.182 276.935)",500:"oklch(58.5% 0.233 277.117)",600:"oklch(51.1% 0.262 276.966)",700:"oklch(45.7% 0.24 277.023)",800:"oklch(39.8% 0.195 277.366)",900:"oklch(35.9% 0.144 278.697)",950:"oklch(25.7% 0.09 281.288)"},violet:{50:"oklch(96.9% 0.016 293.756)",100:"oklch(94.3% 0.029 294.588)",200:"oklch(89.4% 0.057 293.283)",300:"oklch(81.1% 0.111 293.571)",400:"oklch(70.2% 0.183 293.541)",500:"oklch(60.6% 0.25 292.717)",600:"oklch(54.1% 0.281 293.009)",700:"oklch(49.1% 0.27 292.581)",800:"oklch(43.2% 0.232 292.759)",900:"oklch(38% 0.189 293.745)",950:"oklch(28.3% 0.141 291.089)"},purple:{50:"oklch(97.7% 0.014 308.299)",100:"oklch(94.6% 0.033 307.174)",200:"oklch(90.2% 0.063 306.703)",300:"oklch(82.7% 0.119 306.383)",400:"oklch(71.4% 0.203 305.504)",500:"oklch(62.7% 0.265 303.9)",600:"oklch(55.8% 0.288 302.321)",700:"oklch(49.6% 0.265 301.924)",800:"oklch(43.8% 0.218 303.724)",900:"oklch(38.1% 0.176 304.987)",950:"oklch(29.1% 0.149 302.717)"},fuchsia:{50:"oklch(97.7% 0.017 320.058)",100:"oklch(95.2% 0.037 318.852)",200:"oklch(90.3% 0.076 319.62)",300:"oklch(83.3% 0.145 321.434)",400:"oklch(74% 0.238 322.16)",500:"oklch(66.7% 0.295 322.15)",600:"oklch(59.1% 0.293 322.896)",700:"oklch(51.8% 0.253 323.949)",800:"oklch(45.2% 0.211 324.591)",900:"oklch(40.1% 0.17 325.612)",950:"oklch(29.3% 0.136 325.661)"},pink:{50:"oklch(97.1% 0.014 343.198)",100:"oklch(94.8% 0.028 342.258)",200:"oklch(89.9% 0.061 343.231)",300:"oklch(82.3% 0.12 346.018)",400:"oklch(71.8% 0.202 349.761)",500:"oklch(65.6% 0.241 354.308)",600:"oklch(59.2% 0.249 0.584)",700:"oklch(52.5% 0.223 3.958)",800:"oklch(45.9% 0.187 3.815)",900:"oklch(40.8% 0.153 2.432)",950:"oklch(28.4% 0.109 3.907)"},rose:{50:"oklch(96.9% 0.015 12.422)",100:"oklch(94.1% 0.03 12.58)",200:"oklch(89.2% 0.058 10.001)",300:"oklch(81% 0.117 11.638)",400:"oklch(71.2% 0.194 13.428)",500:"oklch(64.5% 0.246 16.439)",600:"oklch(58.6% 0.253 17.585)",700:"oklch(51.4% 0.222 16.935)",800:"oklch(45.5% 0.188 13.697)",900:"oklch(41% 0.159 10.272)",950:"oklch(27.1% 0.105 12.094)"}};module.exports=l; diff --git a/node_modules/tailwindcss/dist/colors.mjs b/node_modules/tailwindcss/dist/colors.mjs new file mode 100644 index 0000000..9d20fbc --- /dev/null +++ b/node_modules/tailwindcss/dist/colors.mjs @@ -0,0 +1 @@ +import{a}from"./chunk-HTB5LLOP.mjs";export{a as default}; diff --git a/node_modules/tailwindcss/dist/default-theme.d.mts b/node_modules/tailwindcss/dist/default-theme.d.mts new file mode 100644 index 0000000..1b80d8a --- /dev/null +++ b/node_modules/tailwindcss/dist/default-theme.d.mts @@ -0,0 +1,1147 @@ +import { P as PluginUtils, N as NamedUtilityValue } from './resolve-config-QUZ9b-Gn.mjs'; +import './colors.mjs'; + +declare const _default: { + accentColor: ({ theme }: PluginUtils) => any; + animation: { + none: string; + spin: string; + ping: string; + pulse: string; + bounce: string; + }; + aria: { + busy: string; + checked: string; + disabled: string; + expanded: string; + hidden: string; + pressed: string; + readonly: string; + required: string; + selected: string; + }; + aspectRatio: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + square: string; + video: string; + }; + backdropBlur: ({ theme }: PluginUtils) => any; + backdropBrightness: ({ theme }: PluginUtils) => any; + backdropContrast: ({ theme }: PluginUtils) => any; + backdropGrayscale: ({ theme }: PluginUtils) => any; + backdropHueRotate: ({ theme }: PluginUtils) => any; + backdropInvert: ({ theme }: PluginUtils) => any; + backdropOpacity: ({ theme }: PluginUtils) => any; + backdropSaturate: ({ theme }: PluginUtils) => any; + backdropSepia: ({ theme }: PluginUtils) => any; + backgroundColor: ({ theme }: PluginUtils) => any; + backgroundImage: { + none: string; + 'gradient-to-t': string; + 'gradient-to-tr': string; + 'gradient-to-r': string; + 'gradient-to-br': string; + 'gradient-to-b': string; + 'gradient-to-bl': string; + 'gradient-to-l': string; + 'gradient-to-tl': string; + }; + backgroundOpacity: ({ theme }: PluginUtils) => any; + backgroundPosition: { + bottom: string; + center: string; + left: string; + 'left-bottom': string; + 'left-top': string; + right: string; + 'right-bottom': string; + 'right-top': string; + top: string; + }; + backgroundSize: { + auto: string; + cover: string; + contain: string; + }; + blur: { + 0: string; + none: string; + sm: string; + DEFAULT: string; + md: string; + lg: string; + xl: string; + '2xl': string; + '3xl': string; + }; + borderColor: ({ theme }: PluginUtils) => any; + borderOpacity: ({ theme }: PluginUtils) => any; + borderRadius: { + none: string; + sm: string; + DEFAULT: string; + md: string; + lg: string; + xl: string; + '2xl': string; + '3xl': string; + full: string; + }; + borderSpacing: ({ theme }: PluginUtils) => any; + borderWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + DEFAULT: string; + 0: string; + 2: string; + 4: string; + 8: string; + }; + boxShadow: { + sm: string; + DEFAULT: string; + md: string; + lg: string; + xl: string; + '2xl': string; + inner: string; + none: string; + }; + boxShadowColor: ({ theme }: PluginUtils) => any; + brightness: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 75: string; + 90: string; + 95: string; + 100: string; + 105: string; + 110: string; + 125: string; + 150: string; + 200: string; + }; + caretColor: ({ theme }: PluginUtils) => any; + colors: () => { + inherit: string; + current: string; + transparent: string; + black: string; + white: string; + slate: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + gray: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + zinc: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + neutral: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + stone: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + red: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + orange: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + amber: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + yellow: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + lime: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + green: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + emerald: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + teal: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + cyan: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + sky: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + blue: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + indigo: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + violet: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + purple: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + fuchsia: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + pink: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + rose: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + }; + columns: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + '3xs': string; + '2xs': string; + xs: string; + sm: string; + md: string; + lg: string; + xl: string; + '2xl': string; + '3xl': string; + '4xl': string; + '5xl': string; + '6xl': string; + '7xl': string; + }; + container: {}; + content: { + none: string; + }; + contrast: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 75: string; + 100: string; + 125: string; + 150: string; + 200: string; + }; + cursor: { + auto: string; + default: string; + pointer: string; + wait: string; + text: string; + move: string; + help: string; + 'not-allowed': string; + none: string; + 'context-menu': string; + progress: string; + cell: string; + crosshair: string; + 'vertical-text': string; + alias: string; + copy: string; + 'no-drop': string; + grab: string; + grabbing: string; + 'all-scroll': string; + 'col-resize': string; + 'row-resize': string; + 'n-resize': string; + 'e-resize': string; + 's-resize': string; + 'w-resize': string; + 'ne-resize': string; + 'nw-resize': string; + 'se-resize': string; + 'sw-resize': string; + 'ew-resize': string; + 'ns-resize': string; + 'nesw-resize': string; + 'nwse-resize': string; + 'zoom-in': string; + 'zoom-out': string; + }; + divideColor: ({ theme }: PluginUtils) => any; + divideOpacity: ({ theme }: PluginUtils) => any; + divideWidth: ({ theme }: PluginUtils) => any; + dropShadow: { + sm: string; + DEFAULT: string[]; + md: string[]; + lg: string[]; + xl: string[]; + '2xl': string; + none: string; + }; + fill: ({ theme }: PluginUtils) => any; + flex: { + 1: string; + auto: string; + initial: string; + none: string; + }; + flexBasis: ({ theme }: PluginUtils) => any; + flexGrow: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + flexShrink: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + fontFamily: { + sans: string[]; + serif: string[]; + mono: string[]; + }; + fontSize: { + xs: (string | { + lineHeight: string; + })[]; + sm: (string | { + lineHeight: string; + })[]; + base: (string | { + lineHeight: string; + })[]; + lg: (string | { + lineHeight: string; + })[]; + xl: (string | { + lineHeight: string; + })[]; + '2xl': (string | { + lineHeight: string; + })[]; + '3xl': (string | { + lineHeight: string; + })[]; + '4xl': (string | { + lineHeight: string; + })[]; + '5xl': (string | { + lineHeight: string; + })[]; + '6xl': (string | { + lineHeight: string; + })[]; + '7xl': (string | { + lineHeight: string; + })[]; + '8xl': (string | { + lineHeight: string; + })[]; + '9xl': (string | { + lineHeight: string; + })[]; + }; + fontWeight: { + thin: string; + extralight: string; + light: string; + normal: string; + medium: string; + semibold: string; + bold: string; + extrabold: string; + black: string; + }; + gap: ({ theme }: PluginUtils) => any; + gradientColorStops: ({ theme }: PluginUtils) => any; + gradientColorStopPositions: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + '0%': string; + '5%': string; + '10%': string; + '15%': string; + '20%': string; + '25%': string; + '30%': string; + '35%': string; + '40%': string; + '45%': string; + '50%': string; + '55%': string; + '60%': string; + '65%': string; + '70%': string; + '75%': string; + '80%': string; + '85%': string; + '90%': string; + '95%': string; + '100%': string; + }; + grayscale: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + gridAutoColumns: { + auto: string; + min: string; + max: string; + fr: string; + }; + gridAutoRows: { + auto: string; + min: string; + max: string; + fr: string; + }; + gridColumn: { + auto: string; + 'span-1': string; + 'span-2': string; + 'span-3': string; + 'span-4': string; + 'span-5': string; + 'span-6': string; + 'span-7': string; + 'span-8': string; + 'span-9': string; + 'span-10': string; + 'span-11': string; + 'span-12': string; + 'span-full': string; + }; + gridColumnEnd: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridColumnStart: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridRow: { + auto: string; + 'span-1': string; + 'span-2': string; + 'span-3': string; + 'span-4': string; + 'span-5': string; + 'span-6': string; + 'span-7': string; + 'span-8': string; + 'span-9': string; + 'span-10': string; + 'span-11': string; + 'span-12': string; + 'span-full': string; + }; + gridRowEnd: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridRowStart: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridTemplateColumns: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + none: string; + subgrid: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + }; + gridTemplateRows: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + none: string; + subgrid: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + }; + height: ({ theme }: PluginUtils) => any; + hueRotate: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 15: string; + 30: string; + 60: string; + 90: string; + 180: string; + }; + inset: ({ theme }: PluginUtils) => any; + invert: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + keyframes: { + spin: { + to: { + transform: string; + }; + }; + ping: { + '75%, 100%': { + transform: string; + opacity: string; + }; + }; + pulse: { + '50%': { + opacity: string; + }; + }; + bounce: { + '0%, 100%': { + transform: string; + animationTimingFunction: string; + }; + '50%': { + transform: string; + animationTimingFunction: string; + }; + }; + }; + letterSpacing: { + tighter: string; + tight: string; + normal: string; + wide: string; + wider: string; + widest: string; + }; + lineHeight: { + none: string; + tight: string; + snug: string; + normal: string; + relaxed: string; + loose: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + }; + listStyleType: { + none: string; + disc: string; + decimal: string; + }; + listStyleImage: { + none: string; + }; + margin: ({ theme }: PluginUtils) => any; + lineClamp: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + }; + maxHeight: ({ theme }: PluginUtils) => any; + maxWidth: ({ theme }: PluginUtils) => any; + minHeight: ({ theme }: PluginUtils) => any; + minWidth: ({ theme }: PluginUtils) => any; + objectPosition: { + bottom: string; + center: string; + left: string; + 'left-bottom': string; + 'left-top': string; + right: string; + 'right-bottom': string; + 'right-top': string; + top: string; + }; + opacity: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 5: string; + 10: string; + 15: string; + 20: string; + 25: string; + 30: string; + 35: string; + 40: string; + 45: string; + 50: string; + 55: string; + 60: string; + 65: string; + 70: string; + 75: string; + 80: string; + 85: string; + 90: string; + 95: string; + 100: string; + }; + order: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + first: string; + last: string; + none: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + }; + outlineColor: ({ theme }: PluginUtils) => any; + outlineOffset: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + outlineWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + padding: ({ theme }: PluginUtils) => any; + placeholderColor: ({ theme }: PluginUtils) => any; + placeholderOpacity: ({ theme }: PluginUtils) => any; + ringColor: ({ theme }: PluginUtils) => any; + ringOffsetColor: ({ theme }: PluginUtils) => any; + ringOffsetWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + ringOpacity: ({ theme }: PluginUtils) => any; + ringWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + DEFAULT: string; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + rotate: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 3: string; + 6: string; + 12: string; + 45: string; + 90: string; + 180: string; + }; + saturate: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 100: string; + 150: string; + 200: string; + }; + scale: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 75: string; + 90: string; + 95: string; + 100: string; + 105: string; + 110: string; + 125: string; + 150: string; + }; + screens: { + sm: string; + md: string; + lg: string; + xl: string; + '2xl': string; + }; + scrollMargin: ({ theme }: PluginUtils) => any; + scrollPadding: ({ theme }: PluginUtils) => any; + sepia: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + skew: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 3: string; + 6: string; + 12: string; + }; + space: ({ theme }: PluginUtils) => any; + spacing: { + px: string; + 0: string; + 0.5: string; + 1: string; + 1.5: string; + 2: string; + 2.5: string; + 3: string; + 3.5: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 14: string; + 16: string; + 20: string; + 24: string; + 28: string; + 32: string; + 36: string; + 40: string; + 44: string; + 48: string; + 52: string; + 56: string; + 60: string; + 64: string; + 72: string; + 80: string; + 96: string; + }; + stroke: ({ theme }: PluginUtils) => any; + strokeWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + }; + supports: {}; + data: {}; + textColor: ({ theme }: PluginUtils) => any; + textDecorationColor: ({ theme }: PluginUtils) => any; + textDecorationThickness: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 'from-font': string; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + textIndent: ({ theme }: PluginUtils) => any; + textOpacity: ({ theme }: PluginUtils) => any; + textUnderlineOffset: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + transformOrigin: { + center: string; + top: string; + 'top-right': string; + right: string; + 'bottom-right': string; + bottom: string; + 'bottom-left': string; + left: string; + 'top-left': string; + }; + transitionDelay: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 75: string; + 100: string; + 150: string; + 200: string; + 300: string; + 500: string; + 700: string; + 1000: string; + }; + transitionDuration: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + DEFAULT: string; + 0: string; + 75: string; + 100: string; + 150: string; + 200: string; + 300: string; + 500: string; + 700: string; + 1000: string; + }; + transitionProperty: { + none: string; + all: string; + DEFAULT: string; + colors: string; + opacity: string; + shadow: string; + transform: string; + }; + transitionTimingFunction: { + DEFAULT: string; + linear: string; + in: string; + out: string; + 'in-out': string; + }; + translate: ({ theme }: PluginUtils) => any; + size: ({ theme }: PluginUtils) => any; + width: ({ theme }: PluginUtils) => any; + willChange: { + auto: string; + scroll: string; + contents: string; + transform: string; + }; + zIndex: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 0: string; + 10: string; + 20: string; + 30: string; + 40: string; + 50: string; + }; +}; + +export { _default as default }; diff --git a/node_modules/tailwindcss/dist/default-theme.d.ts b/node_modules/tailwindcss/dist/default-theme.d.ts new file mode 100644 index 0000000..6d36e26 --- /dev/null +++ b/node_modules/tailwindcss/dist/default-theme.d.ts @@ -0,0 +1,1147 @@ +import { P as PluginUtils, N as NamedUtilityValue } from './resolve-config-BIFUA2FY.js'; +import './colors-b_6i0Oi7.js'; + +declare const _default: { + accentColor: ({ theme }: PluginUtils) => any; + animation: { + none: string; + spin: string; + ping: string; + pulse: string; + bounce: string; + }; + aria: { + busy: string; + checked: string; + disabled: string; + expanded: string; + hidden: string; + pressed: string; + readonly: string; + required: string; + selected: string; + }; + aspectRatio: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + square: string; + video: string; + }; + backdropBlur: ({ theme }: PluginUtils) => any; + backdropBrightness: ({ theme }: PluginUtils) => any; + backdropContrast: ({ theme }: PluginUtils) => any; + backdropGrayscale: ({ theme }: PluginUtils) => any; + backdropHueRotate: ({ theme }: PluginUtils) => any; + backdropInvert: ({ theme }: PluginUtils) => any; + backdropOpacity: ({ theme }: PluginUtils) => any; + backdropSaturate: ({ theme }: PluginUtils) => any; + backdropSepia: ({ theme }: PluginUtils) => any; + backgroundColor: ({ theme }: PluginUtils) => any; + backgroundImage: { + none: string; + 'gradient-to-t': string; + 'gradient-to-tr': string; + 'gradient-to-r': string; + 'gradient-to-br': string; + 'gradient-to-b': string; + 'gradient-to-bl': string; + 'gradient-to-l': string; + 'gradient-to-tl': string; + }; + backgroundOpacity: ({ theme }: PluginUtils) => any; + backgroundPosition: { + bottom: string; + center: string; + left: string; + 'left-bottom': string; + 'left-top': string; + right: string; + 'right-bottom': string; + 'right-top': string; + top: string; + }; + backgroundSize: { + auto: string; + cover: string; + contain: string; + }; + blur: { + 0: string; + none: string; + sm: string; + DEFAULT: string; + md: string; + lg: string; + xl: string; + '2xl': string; + '3xl': string; + }; + borderColor: ({ theme }: PluginUtils) => any; + borderOpacity: ({ theme }: PluginUtils) => any; + borderRadius: { + none: string; + sm: string; + DEFAULT: string; + md: string; + lg: string; + xl: string; + '2xl': string; + '3xl': string; + full: string; + }; + borderSpacing: ({ theme }: PluginUtils) => any; + borderWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + DEFAULT: string; + 0: string; + 2: string; + 4: string; + 8: string; + }; + boxShadow: { + sm: string; + DEFAULT: string; + md: string; + lg: string; + xl: string; + '2xl': string; + inner: string; + none: string; + }; + boxShadowColor: ({ theme }: PluginUtils) => any; + brightness: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 75: string; + 90: string; + 95: string; + 100: string; + 105: string; + 110: string; + 125: string; + 150: string; + 200: string; + }; + caretColor: ({ theme }: PluginUtils) => any; + colors: () => { + inherit: string; + current: string; + transparent: string; + black: string; + white: string; + slate: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + gray: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + zinc: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + neutral: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + stone: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + red: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + orange: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + amber: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + yellow: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + lime: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + green: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + emerald: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + teal: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + cyan: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + sky: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + blue: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + indigo: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + violet: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + purple: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + fuchsia: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + pink: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + rose: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + }; + columns: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + '3xs': string; + '2xs': string; + xs: string; + sm: string; + md: string; + lg: string; + xl: string; + '2xl': string; + '3xl': string; + '4xl': string; + '5xl': string; + '6xl': string; + '7xl': string; + }; + container: {}; + content: { + none: string; + }; + contrast: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 75: string; + 100: string; + 125: string; + 150: string; + 200: string; + }; + cursor: { + auto: string; + default: string; + pointer: string; + wait: string; + text: string; + move: string; + help: string; + 'not-allowed': string; + none: string; + 'context-menu': string; + progress: string; + cell: string; + crosshair: string; + 'vertical-text': string; + alias: string; + copy: string; + 'no-drop': string; + grab: string; + grabbing: string; + 'all-scroll': string; + 'col-resize': string; + 'row-resize': string; + 'n-resize': string; + 'e-resize': string; + 's-resize': string; + 'w-resize': string; + 'ne-resize': string; + 'nw-resize': string; + 'se-resize': string; + 'sw-resize': string; + 'ew-resize': string; + 'ns-resize': string; + 'nesw-resize': string; + 'nwse-resize': string; + 'zoom-in': string; + 'zoom-out': string; + }; + divideColor: ({ theme }: PluginUtils) => any; + divideOpacity: ({ theme }: PluginUtils) => any; + divideWidth: ({ theme }: PluginUtils) => any; + dropShadow: { + sm: string; + DEFAULT: string[]; + md: string[]; + lg: string[]; + xl: string[]; + '2xl': string; + none: string; + }; + fill: ({ theme }: PluginUtils) => any; + flex: { + 1: string; + auto: string; + initial: string; + none: string; + }; + flexBasis: ({ theme }: PluginUtils) => any; + flexGrow: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + flexShrink: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + fontFamily: { + sans: string[]; + serif: string[]; + mono: string[]; + }; + fontSize: { + xs: (string | { + lineHeight: string; + })[]; + sm: (string | { + lineHeight: string; + })[]; + base: (string | { + lineHeight: string; + })[]; + lg: (string | { + lineHeight: string; + })[]; + xl: (string | { + lineHeight: string; + })[]; + '2xl': (string | { + lineHeight: string; + })[]; + '3xl': (string | { + lineHeight: string; + })[]; + '4xl': (string | { + lineHeight: string; + })[]; + '5xl': (string | { + lineHeight: string; + })[]; + '6xl': (string | { + lineHeight: string; + })[]; + '7xl': (string | { + lineHeight: string; + })[]; + '8xl': (string | { + lineHeight: string; + })[]; + '9xl': (string | { + lineHeight: string; + })[]; + }; + fontWeight: { + thin: string; + extralight: string; + light: string; + normal: string; + medium: string; + semibold: string; + bold: string; + extrabold: string; + black: string; + }; + gap: ({ theme }: PluginUtils) => any; + gradientColorStops: ({ theme }: PluginUtils) => any; + gradientColorStopPositions: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + '0%': string; + '5%': string; + '10%': string; + '15%': string; + '20%': string; + '25%': string; + '30%': string; + '35%': string; + '40%': string; + '45%': string; + '50%': string; + '55%': string; + '60%': string; + '65%': string; + '70%': string; + '75%': string; + '80%': string; + '85%': string; + '90%': string; + '95%': string; + '100%': string; + }; + grayscale: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + gridAutoColumns: { + auto: string; + min: string; + max: string; + fr: string; + }; + gridAutoRows: { + auto: string; + min: string; + max: string; + fr: string; + }; + gridColumn: { + auto: string; + 'span-1': string; + 'span-2': string; + 'span-3': string; + 'span-4': string; + 'span-5': string; + 'span-6': string; + 'span-7': string; + 'span-8': string; + 'span-9': string; + 'span-10': string; + 'span-11': string; + 'span-12': string; + 'span-full': string; + }; + gridColumnEnd: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridColumnStart: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridRow: { + auto: string; + 'span-1': string; + 'span-2': string; + 'span-3': string; + 'span-4': string; + 'span-5': string; + 'span-6': string; + 'span-7': string; + 'span-8': string; + 'span-9': string; + 'span-10': string; + 'span-11': string; + 'span-12': string; + 'span-full': string; + }; + gridRowEnd: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridRowStart: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridTemplateColumns: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + none: string; + subgrid: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + }; + gridTemplateRows: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + none: string; + subgrid: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + }; + height: ({ theme }: PluginUtils) => any; + hueRotate: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 15: string; + 30: string; + 60: string; + 90: string; + 180: string; + }; + inset: ({ theme }: PluginUtils) => any; + invert: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + keyframes: { + spin: { + to: { + transform: string; + }; + }; + ping: { + '75%, 100%': { + transform: string; + opacity: string; + }; + }; + pulse: { + '50%': { + opacity: string; + }; + }; + bounce: { + '0%, 100%': { + transform: string; + animationTimingFunction: string; + }; + '50%': { + transform: string; + animationTimingFunction: string; + }; + }; + }; + letterSpacing: { + tighter: string; + tight: string; + normal: string; + wide: string; + wider: string; + widest: string; + }; + lineHeight: { + none: string; + tight: string; + snug: string; + normal: string; + relaxed: string; + loose: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + }; + listStyleType: { + none: string; + disc: string; + decimal: string; + }; + listStyleImage: { + none: string; + }; + margin: ({ theme }: PluginUtils) => any; + lineClamp: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + }; + maxHeight: ({ theme }: PluginUtils) => any; + maxWidth: ({ theme }: PluginUtils) => any; + minHeight: ({ theme }: PluginUtils) => any; + minWidth: ({ theme }: PluginUtils) => any; + objectPosition: { + bottom: string; + center: string; + left: string; + 'left-bottom': string; + 'left-top': string; + right: string; + 'right-bottom': string; + 'right-top': string; + top: string; + }; + opacity: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 5: string; + 10: string; + 15: string; + 20: string; + 25: string; + 30: string; + 35: string; + 40: string; + 45: string; + 50: string; + 55: string; + 60: string; + 65: string; + 70: string; + 75: string; + 80: string; + 85: string; + 90: string; + 95: string; + 100: string; + }; + order: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + first: string; + last: string; + none: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + }; + outlineColor: ({ theme }: PluginUtils) => any; + outlineOffset: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + outlineWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + padding: ({ theme }: PluginUtils) => any; + placeholderColor: ({ theme }: PluginUtils) => any; + placeholderOpacity: ({ theme }: PluginUtils) => any; + ringColor: ({ theme }: PluginUtils) => any; + ringOffsetColor: ({ theme }: PluginUtils) => any; + ringOffsetWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + ringOpacity: ({ theme }: PluginUtils) => any; + ringWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + DEFAULT: string; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + rotate: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 3: string; + 6: string; + 12: string; + 45: string; + 90: string; + 180: string; + }; + saturate: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 100: string; + 150: string; + 200: string; + }; + scale: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 75: string; + 90: string; + 95: string; + 100: string; + 105: string; + 110: string; + 125: string; + 150: string; + }; + screens: { + sm: string; + md: string; + lg: string; + xl: string; + '2xl': string; + }; + scrollMargin: ({ theme }: PluginUtils) => any; + scrollPadding: ({ theme }: PluginUtils) => any; + sepia: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + skew: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 3: string; + 6: string; + 12: string; + }; + space: ({ theme }: PluginUtils) => any; + spacing: { + px: string; + 0: string; + 0.5: string; + 1: string; + 1.5: string; + 2: string; + 2.5: string; + 3: string; + 3.5: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 14: string; + 16: string; + 20: string; + 24: string; + 28: string; + 32: string; + 36: string; + 40: string; + 44: string; + 48: string; + 52: string; + 56: string; + 60: string; + 64: string; + 72: string; + 80: string; + 96: string; + }; + stroke: ({ theme }: PluginUtils) => any; + strokeWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + }; + supports: {}; + data: {}; + textColor: ({ theme }: PluginUtils) => any; + textDecorationColor: ({ theme }: PluginUtils) => any; + textDecorationThickness: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 'from-font': string; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + textIndent: ({ theme }: PluginUtils) => any; + textOpacity: ({ theme }: PluginUtils) => any; + textUnderlineOffset: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + transformOrigin: { + center: string; + top: string; + 'top-right': string; + right: string; + 'bottom-right': string; + bottom: string; + 'bottom-left': string; + left: string; + 'top-left': string; + }; + transitionDelay: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 75: string; + 100: string; + 150: string; + 200: string; + 300: string; + 500: string; + 700: string; + 1000: string; + }; + transitionDuration: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + DEFAULT: string; + 0: string; + 75: string; + 100: string; + 150: string; + 200: string; + 300: string; + 500: string; + 700: string; + 1000: string; + }; + transitionProperty: { + none: string; + all: string; + DEFAULT: string; + colors: string; + opacity: string; + shadow: string; + transform: string; + }; + transitionTimingFunction: { + DEFAULT: string; + linear: string; + in: string; + out: string; + 'in-out': string; + }; + translate: ({ theme }: PluginUtils) => any; + size: ({ theme }: PluginUtils) => any; + width: ({ theme }: PluginUtils) => any; + willChange: { + auto: string; + scroll: string; + contents: string; + transform: string; + }; + zIndex: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 0: string; + 10: string; + 20: string; + 30: string; + 40: string; + 50: string; + }; +}; + +export { _default as default }; diff --git a/node_modules/tailwindcss/dist/default-theme.js b/node_modules/tailwindcss/dist/default-theme.js new file mode 100644 index 0000000..bbc94db --- /dev/null +++ b/node_modules/tailwindcss/dist/default-theme.js @@ -0,0 +1 @@ +"use strict";var v=["anchor-size"],N=new RegExp(`(${v.join("|")})\\(`,"g");var m=new Uint8Array(256);function k(e,c){let t=0,g=[],u=0,d=e.length,E=c.charCodeAt(0);for(let n=0;n0&&h===m[t-1]&&t--;break}}return g.push(e.slice(u)),g}var i=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,I=new RegExp(`^${i.source}$`);var F=new RegExp(`^${i.source}%$`);var $=new RegExp(`^${i.source}s*/s*${i.source}$`);var C=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],H=new RegExp(`^${i.source}(${C.join("|")})$`);var S=["deg","rad","grad","turn"],P=new RegExp(`^${i.source}(${S.join("|")})$`);var q=new RegExp(`^${i.source} +${i.source} +${i.source}$`);function l(e){let c=Number(e);return Number.isInteger(c)&&c>=0&&String(c)===String(e)}var f={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.046 257.417)",600:"oklch(44.6% 0.043 257.281)",700:"oklch(37.2% 0.044 257.287)",800:"oklch(27.9% 0.041 260.031)",900:"oklch(20.8% 0.042 265.755)",950:"oklch(12.9% 0.042 264.695)"},gray:{50:"oklch(98.5% 0.002 247.839)",100:"oklch(96.7% 0.003 264.542)",200:"oklch(92.8% 0.006 264.531)",300:"oklch(87.2% 0.01 258.338)",400:"oklch(70.7% 0.022 261.325)",500:"oklch(55.1% 0.027 264.364)",600:"oklch(44.6% 0.03 256.802)",700:"oklch(37.3% 0.034 259.733)",800:"oklch(27.8% 0.033 256.848)",900:"oklch(21% 0.034 264.665)",950:"oklch(13% 0.028 261.692)"},zinc:{50:"oklch(98.5% 0 0)",100:"oklch(96.7% 0.001 286.375)",200:"oklch(92% 0.004 286.32)",300:"oklch(87.1% 0.006 286.286)",400:"oklch(70.5% 0.015 286.067)",500:"oklch(55.2% 0.016 285.938)",600:"oklch(44.2% 0.017 285.786)",700:"oklch(37% 0.013 285.805)",800:"oklch(27.4% 0.006 286.033)",900:"oklch(21% 0.006 285.885)",950:"oklch(14.1% 0.005 285.823)"},neutral:{50:"oklch(98.5% 0 0)",100:"oklch(97% 0 0)",200:"oklch(92.2% 0 0)",300:"oklch(87% 0 0)",400:"oklch(70.8% 0 0)",500:"oklch(55.6% 0 0)",600:"oklch(43.9% 0 0)",700:"oklch(37.1% 0 0)",800:"oklch(26.9% 0 0)",900:"oklch(20.5% 0 0)",950:"oklch(14.5% 0 0)"},stone:{50:"oklch(98.5% 0.001 106.423)",100:"oklch(97% 0.001 106.424)",200:"oklch(92.3% 0.003 48.717)",300:"oklch(86.9% 0.005 56.366)",400:"oklch(70.9% 0.01 56.259)",500:"oklch(55.3% 0.013 58.071)",600:"oklch(44.4% 0.011 73.639)",700:"oklch(37.4% 0.01 67.558)",800:"oklch(26.8% 0.007 34.298)",900:"oklch(21.6% 0.006 56.043)",950:"oklch(14.7% 0.004 49.25)"},red:{50:"oklch(97.1% 0.013 17.38)",100:"oklch(93.6% 0.032 17.717)",200:"oklch(88.5% 0.062 18.334)",300:"oklch(80.8% 0.114 19.571)",400:"oklch(70.4% 0.191 22.216)",500:"oklch(63.7% 0.237 25.331)",600:"oklch(57.7% 0.245 27.325)",700:"oklch(50.5% 0.213 27.518)",800:"oklch(44.4% 0.177 26.899)",900:"oklch(39.6% 0.141 25.723)",950:"oklch(25.8% 0.092 26.042)"},orange:{50:"oklch(98% 0.016 73.684)",100:"oklch(95.4% 0.038 75.164)",200:"oklch(90.1% 0.076 70.697)",300:"oklch(83.7% 0.128 66.29)",400:"oklch(75% 0.183 55.934)",500:"oklch(70.5% 0.213 47.604)",600:"oklch(64.6% 0.222 41.116)",700:"oklch(55.3% 0.195 38.402)",800:"oklch(47% 0.157 37.304)",900:"oklch(40.8% 0.123 38.172)",950:"oklch(26.6% 0.079 36.259)"},amber:{50:"oklch(98.7% 0.022 95.277)",100:"oklch(96.2% 0.059 95.617)",200:"oklch(92.4% 0.12 95.746)",300:"oklch(87.9% 0.169 91.605)",400:"oklch(82.8% 0.189 84.429)",500:"oklch(76.9% 0.188 70.08)",600:"oklch(66.6% 0.179 58.318)",700:"oklch(55.5% 0.163 48.998)",800:"oklch(47.3% 0.137 46.201)",900:"oklch(41.4% 0.112 45.904)",950:"oklch(27.9% 0.077 45.635)"},yellow:{50:"oklch(98.7% 0.026 102.212)",100:"oklch(97.3% 0.071 103.193)",200:"oklch(94.5% 0.129 101.54)",300:"oklch(90.5% 0.182 98.111)",400:"oklch(85.2% 0.199 91.936)",500:"oklch(79.5% 0.184 86.047)",600:"oklch(68.1% 0.162 75.834)",700:"oklch(55.4% 0.135 66.442)",800:"oklch(47.6% 0.114 61.907)",900:"oklch(42.1% 0.095 57.708)",950:"oklch(28.6% 0.066 53.813)"},lime:{50:"oklch(98.6% 0.031 120.757)",100:"oklch(96.7% 0.067 122.328)",200:"oklch(93.8% 0.127 124.321)",300:"oklch(89.7% 0.196 126.665)",400:"oklch(84.1% 0.238 128.85)",500:"oklch(76.8% 0.233 130.85)",600:"oklch(64.8% 0.2 131.684)",700:"oklch(53.2% 0.157 131.589)",800:"oklch(45.3% 0.124 130.933)",900:"oklch(40.5% 0.101 131.063)",950:"oklch(27.4% 0.072 132.109)"},green:{50:"oklch(98.2% 0.018 155.826)",100:"oklch(96.2% 0.044 156.743)",200:"oklch(92.5% 0.084 155.995)",300:"oklch(87.1% 0.15 154.449)",400:"oklch(79.2% 0.209 151.711)",500:"oklch(72.3% 0.219 149.579)",600:"oklch(62.7% 0.194 149.214)",700:"oklch(52.7% 0.154 150.069)",800:"oklch(44.8% 0.119 151.328)",900:"oklch(39.3% 0.095 152.535)",950:"oklch(26.6% 0.065 152.934)"},emerald:{50:"oklch(97.9% 0.021 166.113)",100:"oklch(95% 0.052 163.051)",200:"oklch(90.5% 0.093 164.15)",300:"oklch(84.5% 0.143 164.978)",400:"oklch(76.5% 0.177 163.223)",500:"oklch(69.6% 0.17 162.48)",600:"oklch(59.6% 0.145 163.225)",700:"oklch(50.8% 0.118 165.612)",800:"oklch(43.2% 0.095 166.913)",900:"oklch(37.8% 0.077 168.94)",950:"oklch(26.2% 0.051 172.552)"},teal:{50:"oklch(98.4% 0.014 180.72)",100:"oklch(95.3% 0.051 180.801)",200:"oklch(91% 0.096 180.426)",300:"oklch(85.5% 0.138 181.071)",400:"oklch(77.7% 0.152 181.912)",500:"oklch(70.4% 0.14 182.503)",600:"oklch(60% 0.118 184.704)",700:"oklch(51.1% 0.096 186.391)",800:"oklch(43.7% 0.078 188.216)",900:"oklch(38.6% 0.063 188.416)",950:"oklch(27.7% 0.046 192.524)"},cyan:{50:"oklch(98.4% 0.019 200.873)",100:"oklch(95.6% 0.045 203.388)",200:"oklch(91.7% 0.08 205.041)",300:"oklch(86.5% 0.127 207.078)",400:"oklch(78.9% 0.154 211.53)",500:"oklch(71.5% 0.143 215.221)",600:"oklch(60.9% 0.126 221.723)",700:"oklch(52% 0.105 223.128)",800:"oklch(45% 0.085 224.283)",900:"oklch(39.8% 0.07 227.392)",950:"oklch(30.2% 0.056 229.695)"},sky:{50:"oklch(97.7% 0.013 236.62)",100:"oklch(95.1% 0.026 236.824)",200:"oklch(90.1% 0.058 230.902)",300:"oklch(82.8% 0.111 230.318)",400:"oklch(74.6% 0.16 232.661)",500:"oklch(68.5% 0.169 237.323)",600:"oklch(58.8% 0.158 241.966)",700:"oklch(50% 0.134 242.749)",800:"oklch(44.3% 0.11 240.79)",900:"oklch(39.1% 0.09 240.876)",950:"oklch(29.3% 0.066 243.157)"},blue:{50:"oklch(97% 0.014 254.604)",100:"oklch(93.2% 0.032 255.585)",200:"oklch(88.2% 0.059 254.128)",300:"oklch(80.9% 0.105 251.813)",400:"oklch(70.7% 0.165 254.624)",500:"oklch(62.3% 0.214 259.815)",600:"oklch(54.6% 0.245 262.881)",700:"oklch(48.8% 0.243 264.376)",800:"oklch(42.4% 0.199 265.638)",900:"oklch(37.9% 0.146 265.522)",950:"oklch(28.2% 0.091 267.935)"},indigo:{50:"oklch(96.2% 0.018 272.314)",100:"oklch(93% 0.034 272.788)",200:"oklch(87% 0.065 274.039)",300:"oklch(78.5% 0.115 274.713)",400:"oklch(67.3% 0.182 276.935)",500:"oklch(58.5% 0.233 277.117)",600:"oklch(51.1% 0.262 276.966)",700:"oklch(45.7% 0.24 277.023)",800:"oklch(39.8% 0.195 277.366)",900:"oklch(35.9% 0.144 278.697)",950:"oklch(25.7% 0.09 281.288)"},violet:{50:"oklch(96.9% 0.016 293.756)",100:"oklch(94.3% 0.029 294.588)",200:"oklch(89.4% 0.057 293.283)",300:"oklch(81.1% 0.111 293.571)",400:"oklch(70.2% 0.183 293.541)",500:"oklch(60.6% 0.25 292.717)",600:"oklch(54.1% 0.281 293.009)",700:"oklch(49.1% 0.27 292.581)",800:"oklch(43.2% 0.232 292.759)",900:"oklch(38% 0.189 293.745)",950:"oklch(28.3% 0.141 291.089)"},purple:{50:"oklch(97.7% 0.014 308.299)",100:"oklch(94.6% 0.033 307.174)",200:"oklch(90.2% 0.063 306.703)",300:"oklch(82.7% 0.119 306.383)",400:"oklch(71.4% 0.203 305.504)",500:"oklch(62.7% 0.265 303.9)",600:"oklch(55.8% 0.288 302.321)",700:"oklch(49.6% 0.265 301.924)",800:"oklch(43.8% 0.218 303.724)",900:"oklch(38.1% 0.176 304.987)",950:"oklch(29.1% 0.149 302.717)"},fuchsia:{50:"oklch(97.7% 0.017 320.058)",100:"oklch(95.2% 0.037 318.852)",200:"oklch(90.3% 0.076 319.62)",300:"oklch(83.3% 0.145 321.434)",400:"oklch(74% 0.238 322.16)",500:"oklch(66.7% 0.295 322.15)",600:"oklch(59.1% 0.293 322.896)",700:"oklch(51.8% 0.253 323.949)",800:"oklch(45.2% 0.211 324.591)",900:"oklch(40.1% 0.17 325.612)",950:"oklch(29.3% 0.136 325.661)"},pink:{50:"oklch(97.1% 0.014 343.198)",100:"oklch(94.8% 0.028 342.258)",200:"oklch(89.9% 0.061 343.231)",300:"oklch(82.3% 0.12 346.018)",400:"oklch(71.8% 0.202 349.761)",500:"oklch(65.6% 0.241 354.308)",600:"oklch(59.2% 0.249 0.584)",700:"oklch(52.5% 0.223 3.958)",800:"oklch(45.9% 0.187 3.815)",900:"oklch(40.8% 0.153 2.432)",950:"oklch(28.4% 0.109 3.907)"},rose:{50:"oklch(96.9% 0.015 12.422)",100:"oklch(94.1% 0.03 12.58)",200:"oklch(89.2% 0.058 10.001)",300:"oklch(81% 0.117 11.638)",400:"oklch(71.2% 0.194 13.428)",500:"oklch(64.5% 0.246 16.439)",600:"oklch(58.6% 0.253 17.585)",700:"oklch(51.4% 0.222 16.935)",800:"oklch(45.5% 0.188 13.697)",900:"oklch(41% 0.159 10.272)",950:"oklch(27.1% 0.105 12.094)"}};function s(e){return{__BARE_VALUE__:e}}var r=s(e=>{if(l(e.value))return e.value}),o=s(e=>{if(l(e.value))return`${e.value}%`}),a=s(e=>{if(l(e.value))return`${e.value}px`}),b=s(e=>{if(l(e.value))return`${e.value}ms`}),p=s(e=>{if(l(e.value))return`${e.value}deg`}),A=s(e=>{if(e.fraction===null)return;let[c,t]=k(e.fraction,"/");if(!(!l(c)||!l(t)))return e.fraction}),y=s(e=>{if(l(Number(e.value)))return`repeat(${e.value}, minmax(0, 1fr))`}),w={accentColor:({theme:e})=>e("colors"),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9",...A},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>({...e("brightness"),...o}),backdropContrast:({theme:e})=>({...e("contrast"),...o}),backdropGrayscale:({theme:e})=>({...e("grayscale"),...o}),backdropHueRotate:({theme:e})=>({...e("hueRotate"),...p}),backdropInvert:({theme:e})=>({...e("invert"),...o}),backdropOpacity:({theme:e})=>({...e("opacity"),...o}),backdropSaturate:({theme:e})=>({...e("saturate"),...o}),backdropSepia:({theme:e})=>({...e("sepia"),...o}),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>e("spacing"),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px",...a},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2",...o},caretColor:({theme:e})=>e("colors"),colors:()=>({...f}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",...r},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2",...o},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>({...e("borderWidth"),...a}),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>e("colors"),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",...e("spacing")}),flexGrow:{0:"0",DEFAULT:"1",...r},flexShrink:{0:"0",DEFAULT:"1",...r},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%",...o},grayscale:{0:"0",DEFAULT:"100%",...o},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...r},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...r},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...r},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...r},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...y},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...y},height:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg",...p},inset:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),invert:{0:"0",DEFAULT:"100%",...o},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",...r},maxHeight:({theme:e})=>({none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),maxWidth:({theme:e})=>({none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...e("spacing")}),minHeight:({theme:e})=>({full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),minWidth:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1",...o},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",...r},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...a},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...a},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...a},ringOpacity:({theme:e})=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...a},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg",...p},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2",...o},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",...o},screens:{sm:"40rem",md:"48rem",lg:"64rem",xl:"80rem","2xl":"96rem"},scrollMargin:({theme:e})=>e("spacing"),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%",...o},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",...p},space:({theme:e})=>e("spacing"),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2",...r},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...a},textIndent:({theme:e})=>e("spacing"),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...a},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...b},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...b},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),size:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),width:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50",...r}};module.exports=w; diff --git a/node_modules/tailwindcss/dist/default-theme.mjs b/node_modules/tailwindcss/dist/default-theme.mjs new file mode 100644 index 0000000..7bf7fa7 --- /dev/null +++ b/node_modules/tailwindcss/dist/default-theme.mjs @@ -0,0 +1 @@ +import{h as a}from"./chunk-P5FH2LZE.mjs";import"./chunk-HTB5LLOP.mjs";export{a as default}; diff --git a/node_modules/tailwindcss/dist/flatten-color-palette.d.mts b/node_modules/tailwindcss/dist/flatten-color-palette.d.mts new file mode 100644 index 0000000..1151604 --- /dev/null +++ b/node_modules/tailwindcss/dist/flatten-color-palette.d.mts @@ -0,0 +1,6 @@ +type Colors = { + [key: string | number]: string | Colors; +}; +declare function flattenColorPalette(colors: Colors): Record; + +export { flattenColorPalette as default }; diff --git a/node_modules/tailwindcss/dist/flatten-color-palette.d.ts b/node_modules/tailwindcss/dist/flatten-color-palette.d.ts new file mode 100644 index 0000000..1151604 --- /dev/null +++ b/node_modules/tailwindcss/dist/flatten-color-palette.d.ts @@ -0,0 +1,6 @@ +type Colors = { + [key: string | number]: string | Colors; +}; +declare function flattenColorPalette(colors: Colors): Record; + +export { flattenColorPalette as default }; diff --git a/node_modules/tailwindcss/dist/flatten-color-palette.js b/node_modules/tailwindcss/dist/flatten-color-palette.js new file mode 100644 index 0000000..fecbeb6 --- /dev/null +++ b/node_modules/tailwindcss/dist/flatten-color-palette.js @@ -0,0 +1,3 @@ +"use strict";function _(e){return{kind:"word",value:e}}function le(e,i){return{kind:"function",value:e,nodes:i}}function ae(e){return{kind:"separator",value:e}}function A(e,i,t=null){for(let r=0;r0){let L=_(n);r?r.nodes.push(L):i.push(L),n=""}let a=l,u=l+1;for(;u0){let u=_(n);a.nodes.push(u),n=""}t.length>0?r=t[t.length-1]:r=null;break}default:n+=String.fromCharCode(s)}}return n.length>0&&i.push(_(n)),i}var pe=["anchor-size"],Fe=new RegExp(`(${pe.join("|")})\\(`,"g");var We=new Uint8Array(256);var T=new Uint8Array(256);function c(e,i){let t=0,r=[],n=0,o=e.length,l=i.charCodeAt(0);for(let s=0;s0&&a===T[t-1]&&t--;break}}return r.push(e.slice(n)),r}var m=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,at=new RegExp(`^${m.source}$`);var st=new RegExp(`^${m.source}%$`);var ut=new RegExp(`^${m.source}s*/s*${m.source}$`);var de=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],ft=new RegExp(`^${m.source}(${de.join("|")})$`);var me=["deg","rad","grad","turn"],ct=new RegExp(`^${m.source}(${me.join("|")})$`);var pt=new RegExp(`^${m.source} +${m.source} +${m.source}$`);function p(e){let i=Number(e);return Number.isInteger(i)&&i>=0&&String(i)===String(e)}function N(e,i){if(i===null)return e;let t=Number(i);return Number.isNaN(t)||(i=`${t*100}%`),i==="100%"?e:`color-mix(in oklab, ${e} ${i}, transparent)`}var ve={"--alpha":we,"--spacing":ke,"--theme":ye,theme:be};function we(e,i,t,...r){let[n,o]=c(t,"/").map(l=>l.trim());if(!n||!o)throw new Error(`The --alpha(\u2026) function requires a color and an alpha value, e.g.: \`--alpha(${n||"var(--my-color)"} / ${o||"50%"})\``);if(r.length>0)throw new Error(`The --alpha(\u2026) function only accepts one argument, e.g.: \`--alpha(${n||"var(--my-color)"} / ${o||"50%"})\``);return N(n,o)}function ke(e,i,t,...r){if(!t)throw new Error("The --spacing(\u2026) function requires an argument, but received none.");if(r.length>0)throw new Error(`The --spacing(\u2026) function only accepts a single argument, but received ${r.length+1}.`);let n=e.theme.resolve(null,["--spacing"]);if(!n)throw new Error("The --spacing(\u2026) function requires that the `--spacing` theme variable exists, but it was not found.");return`calc(${n} * ${t})`}function ye(e,i,t,...r){if(!t.startsWith("--"))throw new Error("The --theme(\u2026) function can only be used with CSS variables from your theme.");let n=!1;t.endsWith(" inline")&&(n=!0,t=t.slice(0,-7)),i.kind==="at-rule"&&(n=!0);let o=e.resolveThemeValue(t,n);if(!o){if(r.length>0)return r.join(", ");throw new Error(`Could not resolve value for theme function: \`theme(${t})\`. Consider checking if the variable name is correct or provide a fallback value to silence this error.`)}if(r.length===0)return o;let l=r.join(", ");if(l==="initial")return o;if(o==="initial")return l;if(o.startsWith("var(")||o.startsWith("theme(")||o.startsWith("--theme(")){let s=k(o);return Ae(s,l),w(s)}return o}function be(e,i,t,...r){t=xe(t);let n=e.resolveThemeValue(t);if(!n&&r.length>0)return r.join(", ");if(!n)throw new Error(`Could not resolve value for theme function: \`theme(${t})\`. Consider checking if the path is correct or provide a fallback value to silence this error.`);return n}var Rt=new RegExp(Object.keys(ve).map(e=>`${e}\\(`).join("|"));function xe(e){if(e[0]!=="'"&&e[0]!=='"')return e;let i="",t=e[0];for(let r=1;r{if(t.kind==="function"&&!(t.value!=="var"&&t.value!=="theme"&&t.value!=="--theme"))if(t.nodes.length===1)t.nodes.push({kind:"word",value:`, ${i}`});else{let r=t.nodes[t.nodes.length-1];r.kind==="word"&&r.value==="initial"&&(r.value=i)}})}var F={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.046 257.417)",600:"oklch(44.6% 0.043 257.281)",700:"oklch(37.2% 0.044 257.287)",800:"oklch(27.9% 0.041 260.031)",900:"oklch(20.8% 0.042 265.755)",950:"oklch(12.9% 0.042 264.695)"},gray:{50:"oklch(98.5% 0.002 247.839)",100:"oklch(96.7% 0.003 264.542)",200:"oklch(92.8% 0.006 264.531)",300:"oklch(87.2% 0.01 258.338)",400:"oklch(70.7% 0.022 261.325)",500:"oklch(55.1% 0.027 264.364)",600:"oklch(44.6% 0.03 256.802)",700:"oklch(37.3% 0.034 259.733)",800:"oklch(27.8% 0.033 256.848)",900:"oklch(21% 0.034 264.665)",950:"oklch(13% 0.028 261.692)"},zinc:{50:"oklch(98.5% 0 0)",100:"oklch(96.7% 0.001 286.375)",200:"oklch(92% 0.004 286.32)",300:"oklch(87.1% 0.006 286.286)",400:"oklch(70.5% 0.015 286.067)",500:"oklch(55.2% 0.016 285.938)",600:"oklch(44.2% 0.017 285.786)",700:"oklch(37% 0.013 285.805)",800:"oklch(27.4% 0.006 286.033)",900:"oklch(21% 0.006 285.885)",950:"oklch(14.1% 0.005 285.823)"},neutral:{50:"oklch(98.5% 0 0)",100:"oklch(97% 0 0)",200:"oklch(92.2% 0 0)",300:"oklch(87% 0 0)",400:"oklch(70.8% 0 0)",500:"oklch(55.6% 0 0)",600:"oklch(43.9% 0 0)",700:"oklch(37.1% 0 0)",800:"oklch(26.9% 0 0)",900:"oklch(20.5% 0 0)",950:"oklch(14.5% 0 0)"},stone:{50:"oklch(98.5% 0.001 106.423)",100:"oklch(97% 0.001 106.424)",200:"oklch(92.3% 0.003 48.717)",300:"oklch(86.9% 0.005 56.366)",400:"oklch(70.9% 0.01 56.259)",500:"oklch(55.3% 0.013 58.071)",600:"oklch(44.4% 0.011 73.639)",700:"oklch(37.4% 0.01 67.558)",800:"oklch(26.8% 0.007 34.298)",900:"oklch(21.6% 0.006 56.043)",950:"oklch(14.7% 0.004 49.25)"},red:{50:"oklch(97.1% 0.013 17.38)",100:"oklch(93.6% 0.032 17.717)",200:"oklch(88.5% 0.062 18.334)",300:"oklch(80.8% 0.114 19.571)",400:"oklch(70.4% 0.191 22.216)",500:"oklch(63.7% 0.237 25.331)",600:"oklch(57.7% 0.245 27.325)",700:"oklch(50.5% 0.213 27.518)",800:"oklch(44.4% 0.177 26.899)",900:"oklch(39.6% 0.141 25.723)",950:"oklch(25.8% 0.092 26.042)"},orange:{50:"oklch(98% 0.016 73.684)",100:"oklch(95.4% 0.038 75.164)",200:"oklch(90.1% 0.076 70.697)",300:"oklch(83.7% 0.128 66.29)",400:"oklch(75% 0.183 55.934)",500:"oklch(70.5% 0.213 47.604)",600:"oklch(64.6% 0.222 41.116)",700:"oklch(55.3% 0.195 38.402)",800:"oklch(47% 0.157 37.304)",900:"oklch(40.8% 0.123 38.172)",950:"oklch(26.6% 0.079 36.259)"},amber:{50:"oklch(98.7% 0.022 95.277)",100:"oklch(96.2% 0.059 95.617)",200:"oklch(92.4% 0.12 95.746)",300:"oklch(87.9% 0.169 91.605)",400:"oklch(82.8% 0.189 84.429)",500:"oklch(76.9% 0.188 70.08)",600:"oklch(66.6% 0.179 58.318)",700:"oklch(55.5% 0.163 48.998)",800:"oklch(47.3% 0.137 46.201)",900:"oklch(41.4% 0.112 45.904)",950:"oklch(27.9% 0.077 45.635)"},yellow:{50:"oklch(98.7% 0.026 102.212)",100:"oklch(97.3% 0.071 103.193)",200:"oklch(94.5% 0.129 101.54)",300:"oklch(90.5% 0.182 98.111)",400:"oklch(85.2% 0.199 91.936)",500:"oklch(79.5% 0.184 86.047)",600:"oklch(68.1% 0.162 75.834)",700:"oklch(55.4% 0.135 66.442)",800:"oklch(47.6% 0.114 61.907)",900:"oklch(42.1% 0.095 57.708)",950:"oklch(28.6% 0.066 53.813)"},lime:{50:"oklch(98.6% 0.031 120.757)",100:"oklch(96.7% 0.067 122.328)",200:"oklch(93.8% 0.127 124.321)",300:"oklch(89.7% 0.196 126.665)",400:"oklch(84.1% 0.238 128.85)",500:"oklch(76.8% 0.233 130.85)",600:"oklch(64.8% 0.2 131.684)",700:"oklch(53.2% 0.157 131.589)",800:"oklch(45.3% 0.124 130.933)",900:"oklch(40.5% 0.101 131.063)",950:"oklch(27.4% 0.072 132.109)"},green:{50:"oklch(98.2% 0.018 155.826)",100:"oklch(96.2% 0.044 156.743)",200:"oklch(92.5% 0.084 155.995)",300:"oklch(87.1% 0.15 154.449)",400:"oklch(79.2% 0.209 151.711)",500:"oklch(72.3% 0.219 149.579)",600:"oklch(62.7% 0.194 149.214)",700:"oklch(52.7% 0.154 150.069)",800:"oklch(44.8% 0.119 151.328)",900:"oklch(39.3% 0.095 152.535)",950:"oklch(26.6% 0.065 152.934)"},emerald:{50:"oklch(97.9% 0.021 166.113)",100:"oklch(95% 0.052 163.051)",200:"oklch(90.5% 0.093 164.15)",300:"oklch(84.5% 0.143 164.978)",400:"oklch(76.5% 0.177 163.223)",500:"oklch(69.6% 0.17 162.48)",600:"oklch(59.6% 0.145 163.225)",700:"oklch(50.8% 0.118 165.612)",800:"oklch(43.2% 0.095 166.913)",900:"oklch(37.8% 0.077 168.94)",950:"oklch(26.2% 0.051 172.552)"},teal:{50:"oklch(98.4% 0.014 180.72)",100:"oklch(95.3% 0.051 180.801)",200:"oklch(91% 0.096 180.426)",300:"oklch(85.5% 0.138 181.071)",400:"oklch(77.7% 0.152 181.912)",500:"oklch(70.4% 0.14 182.503)",600:"oklch(60% 0.118 184.704)",700:"oklch(51.1% 0.096 186.391)",800:"oklch(43.7% 0.078 188.216)",900:"oklch(38.6% 0.063 188.416)",950:"oklch(27.7% 0.046 192.524)"},cyan:{50:"oklch(98.4% 0.019 200.873)",100:"oklch(95.6% 0.045 203.388)",200:"oklch(91.7% 0.08 205.041)",300:"oklch(86.5% 0.127 207.078)",400:"oklch(78.9% 0.154 211.53)",500:"oklch(71.5% 0.143 215.221)",600:"oklch(60.9% 0.126 221.723)",700:"oklch(52% 0.105 223.128)",800:"oklch(45% 0.085 224.283)",900:"oklch(39.8% 0.07 227.392)",950:"oklch(30.2% 0.056 229.695)"},sky:{50:"oklch(97.7% 0.013 236.62)",100:"oklch(95.1% 0.026 236.824)",200:"oklch(90.1% 0.058 230.902)",300:"oklch(82.8% 0.111 230.318)",400:"oklch(74.6% 0.16 232.661)",500:"oklch(68.5% 0.169 237.323)",600:"oklch(58.8% 0.158 241.966)",700:"oklch(50% 0.134 242.749)",800:"oklch(44.3% 0.11 240.79)",900:"oklch(39.1% 0.09 240.876)",950:"oklch(29.3% 0.066 243.157)"},blue:{50:"oklch(97% 0.014 254.604)",100:"oklch(93.2% 0.032 255.585)",200:"oklch(88.2% 0.059 254.128)",300:"oklch(80.9% 0.105 251.813)",400:"oklch(70.7% 0.165 254.624)",500:"oklch(62.3% 0.214 259.815)",600:"oklch(54.6% 0.245 262.881)",700:"oklch(48.8% 0.243 264.376)",800:"oklch(42.4% 0.199 265.638)",900:"oklch(37.9% 0.146 265.522)",950:"oklch(28.2% 0.091 267.935)"},indigo:{50:"oklch(96.2% 0.018 272.314)",100:"oklch(93% 0.034 272.788)",200:"oklch(87% 0.065 274.039)",300:"oklch(78.5% 0.115 274.713)",400:"oklch(67.3% 0.182 276.935)",500:"oklch(58.5% 0.233 277.117)",600:"oklch(51.1% 0.262 276.966)",700:"oklch(45.7% 0.24 277.023)",800:"oklch(39.8% 0.195 277.366)",900:"oklch(35.9% 0.144 278.697)",950:"oklch(25.7% 0.09 281.288)"},violet:{50:"oklch(96.9% 0.016 293.756)",100:"oklch(94.3% 0.029 294.588)",200:"oklch(89.4% 0.057 293.283)",300:"oklch(81.1% 0.111 293.571)",400:"oklch(70.2% 0.183 293.541)",500:"oklch(60.6% 0.25 292.717)",600:"oklch(54.1% 0.281 293.009)",700:"oklch(49.1% 0.27 292.581)",800:"oklch(43.2% 0.232 292.759)",900:"oklch(38% 0.189 293.745)",950:"oklch(28.3% 0.141 291.089)"},purple:{50:"oklch(97.7% 0.014 308.299)",100:"oklch(94.6% 0.033 307.174)",200:"oklch(90.2% 0.063 306.703)",300:"oklch(82.7% 0.119 306.383)",400:"oklch(71.4% 0.203 305.504)",500:"oklch(62.7% 0.265 303.9)",600:"oklch(55.8% 0.288 302.321)",700:"oklch(49.6% 0.265 301.924)",800:"oklch(43.8% 0.218 303.724)",900:"oklch(38.1% 0.176 304.987)",950:"oklch(29.1% 0.149 302.717)"},fuchsia:{50:"oklch(97.7% 0.017 320.058)",100:"oklch(95.2% 0.037 318.852)",200:"oklch(90.3% 0.076 319.62)",300:"oklch(83.3% 0.145 321.434)",400:"oklch(74% 0.238 322.16)",500:"oklch(66.7% 0.295 322.15)",600:"oklch(59.1% 0.293 322.896)",700:"oklch(51.8% 0.253 323.949)",800:"oklch(45.2% 0.211 324.591)",900:"oklch(40.1% 0.17 325.612)",950:"oklch(29.3% 0.136 325.661)"},pink:{50:"oklch(97.1% 0.014 343.198)",100:"oklch(94.8% 0.028 342.258)",200:"oklch(89.9% 0.061 343.231)",300:"oklch(82.3% 0.12 346.018)",400:"oklch(71.8% 0.202 349.761)",500:"oklch(65.6% 0.241 354.308)",600:"oklch(59.2% 0.249 0.584)",700:"oklch(52.5% 0.223 3.958)",800:"oklch(45.9% 0.187 3.815)",900:"oklch(40.8% 0.153 2.432)",950:"oklch(28.4% 0.109 3.907)"},rose:{50:"oklch(96.9% 0.015 12.422)",100:"oklch(94.1% 0.03 12.58)",200:"oklch(89.2% 0.058 10.001)",300:"oklch(81% 0.117 11.638)",400:"oklch(71.2% 0.194 13.428)",500:"oklch(64.5% 0.246 16.439)",600:"oklch(58.6% 0.253 17.585)",700:"oklch(51.4% 0.222 16.935)",800:"oklch(45.5% 0.188 13.697)",900:"oklch(41% 0.159 10.272)",950:"oklch(27.1% 0.105 12.094)"}};function x(e){return{__BARE_VALUE__:e}}var d=x(e=>{if(p(e.value))return e.value}),f=x(e=>{if(p(e.value))return`${e.value}%`}),v=x(e=>{if(p(e.value))return`${e.value}px`}),ne=x(e=>{if(p(e.value))return`${e.value}ms`}),R=x(e=>{if(p(e.value))return`${e.value}deg`}),De=x(e=>{if(e.fraction===null)return;let[i,t]=c(e.fraction,"/");if(!(!p(i)||!p(t)))return e.fraction}),oe=x(e=>{if(p(Number(e.value)))return`repeat(${e.value}, minmax(0, 1fr))`}),ze={accentColor:({theme:e})=>e("colors"),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9",...De},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>({...e("brightness"),...f}),backdropContrast:({theme:e})=>({...e("contrast"),...f}),backdropGrayscale:({theme:e})=>({...e("grayscale"),...f}),backdropHueRotate:({theme:e})=>({...e("hueRotate"),...R}),backdropInvert:({theme:e})=>({...e("invert"),...f}),backdropOpacity:({theme:e})=>({...e("opacity"),...f}),backdropSaturate:({theme:e})=>({...e("saturate"),...f}),backdropSepia:({theme:e})=>({...e("sepia"),...f}),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>e("spacing"),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px",...v},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2",...f},caretColor:({theme:e})=>e("colors"),colors:()=>({...F}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",...d},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2",...f},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>({...e("borderWidth"),...v}),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>e("colors"),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",...e("spacing")}),flexGrow:{0:"0",DEFAULT:"1",...d},flexShrink:{0:"0",DEFAULT:"1",...d},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%",...f},grayscale:{0:"0",DEFAULT:"100%",...f},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...d},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...d},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...d},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...d},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...oe},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...oe},height:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg",...R},inset:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),invert:{0:"0",DEFAULT:"100%",...f},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",...d},maxHeight:({theme:e})=>({none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),maxWidth:({theme:e})=>({none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...e("spacing")}),minHeight:({theme:e})=>({full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),minWidth:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1",...f},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",...d},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...v},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...v},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...v},ringOpacity:({theme:e})=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...v},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg",...R},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2",...f},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",...f},screens:{sm:"40rem",md:"48rem",lg:"64rem",xl:"80rem","2xl":"96rem"},scrollMargin:({theme:e})=>e("spacing"),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%",...f},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",...R},space:({theme:e})=>e("spacing"),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2",...d},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...v},textIndent:({theme:e})=>e("spacing"),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...v},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...ne},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...ne},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),size:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),width:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50",...d}};function O(e){let i={};for(let[t,r]of Object.entries(e??{}))if(t!=="__CSS_VALUES__")if(typeof r=="object"&&r!==null)for(let[n,o]of Object.entries(O(r)))i[`${t}${n==="DEFAULT"?"":`-${n}`}`]=o;else i[t]=r;if("__CSS_VALUES__"in e)for(let[t,r]of Object.entries(e.__CSS_VALUES__))(Number(r)&4)===0&&(i[t]=e[t]);return i}module.exports=O; diff --git a/node_modules/tailwindcss/dist/flatten-color-palette.mjs b/node_modules/tailwindcss/dist/flatten-color-palette.mjs new file mode 100644 index 0000000..8a3d9ef --- /dev/null +++ b/node_modules/tailwindcss/dist/flatten-color-palette.mjs @@ -0,0 +1 @@ +import"./chunk-NZOSKIBJ.mjs";import"./chunk-P5FH2LZE.mjs";import"./chunk-HTB5LLOP.mjs";function i(r){let n={};for(let[e,t]of Object.entries(r??{}))if(e!=="__CSS_VALUES__")if(typeof t=="object"&&t!==null)for(let[o,f]of Object.entries(i(t)))n[`${e}${o==="DEFAULT"?"":`-${o}`}`]=f;else n[e]=t;if("__CSS_VALUES__"in r)for(let[e,t]of Object.entries(r.__CSS_VALUES__))(Number(t)&4)===0&&(n[e]=r[e]);return n}export{i as default}; diff --git a/node_modules/tailwindcss/dist/lib.d.mts b/node_modules/tailwindcss/dist/lib.d.mts new file mode 100644 index 0000000..70f7b6d --- /dev/null +++ b/node_modules/tailwindcss/dist/lib.d.mts @@ -0,0 +1,273 @@ +import { U as UserConfig, P as Plugin } from './types-B254mqw1.mjs'; +import { V as Variant, C as Candidate } from './resolve-config-QUZ9b-Gn.mjs'; +import './colors.mjs'; + +declare const enum ThemeOptions { + NONE = 0, + INLINE = 1, + REFERENCE = 2, + DEFAULT = 4, + STATIC = 8, + USED = 16 +} +declare class Theme { + #private; + private values; + private keyframes; + prefix: string | null; + constructor(values?: Map, keyframes?: Set); + add(key: string, value: string, options?: ThemeOptions): void; + keysInNamespaces(themeKeys: Iterable): string[]; + get(themeKeys: ThemeKey[]): string | null; + hasDefault(key: string): boolean; + getOptions(key: string): ThemeOptions; + entries(): IterableIterator<[string, { + value: string; + options: ThemeOptions; + }]> | [string, { + value: string; + options: ThemeOptions; + }][]; + prefixKey(key: string): string; + clearNamespace(namespace: string, clearOptions: ThemeOptions): void; + markUsedVariable(themeKey: string): boolean; + resolve(candidateValue: string | null, themeKeys: ThemeKey[], options?: ThemeOptions): string | null; + resolveValue(candidateValue: string | null, themeKeys: ThemeKey[]): string | null; + resolveWith(candidateValue: string, themeKeys: ThemeKey[], nestedKeys?: `--${string}`[]): [string, Record] | null; + namespace(namespace: string): Map; + addKeyframes(value: AtRule): void; + getKeyframes(): AtRule[]; +} +type ThemeKey = `--${string}`; + +type VariantFn = (rule: Rule, variant: Extract) => null | void; +type CompareFn = (a: Variant, z: Variant) => number; +declare const enum Compounds { + Never = 0, + AtRules = 1, + StyleRules = 2 +} +declare class Variants { + compareFns: Map; + variants: Map; + compoundsWith: Compounds; + compounds: Compounds; + }>; + private completions; + /** + * Registering a group of variants should result in the same sort number for + * all the variants. This is to ensure that the variants are applied in the + * correct order. + */ + private groupOrder; + /** + * Keep track of the last sort order instead of using the size of the map to + * avoid unnecessarily skipping order numbers. + */ + private lastOrder; + static(name: string, applyFn: VariantFn<'static'>, { compounds, order }?: { + compounds?: Compounds; + order?: number; + }): void; + fromAst(name: string, ast: AstNode[]): void; + functional(name: string, applyFn: VariantFn<'functional'>, { compounds, order }?: { + compounds?: Compounds; + order?: number; + }): void; + compound(name: string, compoundsWith: Compounds, applyFn: VariantFn<'compound'>, { compounds, order }?: { + compounds?: Compounds; + order?: number; + }): void; + group(fn: () => void, compareFn?: CompareFn): void; + has(name: string): boolean; + get(name: string): { + kind: Variant["kind"]; + order: number; + applyFn: VariantFn; + compoundsWith: Compounds; + compounds: Compounds; + } | undefined; + kind(name: string): "arbitrary" | "static" | "functional" | "compound"; + compoundsWith(parent: string, child: string | Variant): boolean; + suggest(name: string, suggestions: () => string[]): void; + getCompletions(name: string): string[]; + compare(a: Variant | null, z: Variant | null): number; + keys(): IterableIterator; + entries(): IterableIterator<[string, { + kind: Variant["kind"]; + order: number; + applyFn: VariantFn; + compoundsWith: Compounds; + compounds: Compounds; + }]>; + private set; + private nextOrder; +} + +declare function compileAstNodes(candidate: Candidate, designSystem: DesignSystem): { + node: AstNode; + propertySort: { + order: number[]; + count: number; + }; +}[]; + +interface ClassMetadata { + modifiers: string[]; +} +type ClassEntry = [string, ClassMetadata]; +interface SelectorOptions { + modifier?: string; + value?: string; +} +interface VariantEntry { + name: string; + isArbitrary: boolean; + values: string[]; + hasDash: boolean; + selectors: (options: SelectorOptions) => string[]; +} + +type CompileFn = (value: Extract) => AstNode[] | undefined | null; +interface SuggestionGroup { + supportsNegative?: boolean; + values: (string | null)[]; + modifiers: string[]; +} +type UtilityOptions = { + types: string[]; +}; +type Utility = { + kind: 'static' | 'functional'; + compileFn: CompileFn; + options?: UtilityOptions; +}; +declare class Utilities { + private utilities; + private completions; + static(name: string, compileFn: CompileFn<'static'>): void; + functional(name: string, compileFn: CompileFn<'functional'>, options?: UtilityOptions): void; + has(name: string, kind: 'static' | 'functional'): boolean; + get(name: string): Utility[]; + getCompletions(name: string): SuggestionGroup[]; + suggest(name: string, groups: () => SuggestionGroup[]): void; + keys(kind: 'static' | 'functional'): string[]; +} + +type DesignSystem = { + theme: Theme; + utilities: Utilities; + variants: Variants; + invalidCandidates: Set; + important: boolean; + getClassOrder(classes: string[]): [string, bigint | null][]; + getClassList(): ClassEntry[]; + getVariants(): VariantEntry[]; + parseCandidate(candidate: string): Readonly[]; + parseVariant(variant: string): Readonly | null; + compileAstNodes(candidate: Candidate): ReturnType; + getVariantOrder(): Map; + resolveThemeValue(path: string, forceInline?: boolean): string | undefined; + trackUsedVariables(raw: string): void; + candidatesToCss(classes: string[]): (string | null)[]; +}; + +type StyleRule = { + kind: 'rule'; + selector: string; + nodes: AstNode[]; +}; +type AtRule = { + kind: 'at-rule'; + name: string; + params: string; + nodes: AstNode[]; +}; +type Declaration = { + kind: 'declaration'; + property: string; + value: string | undefined; + important: boolean; +}; +type Comment = { + kind: 'comment'; + value: string; +}; +type Context = { + kind: 'context'; + context: Record; + nodes: AstNode[]; +}; +type AtRoot = { + kind: 'at-root'; + nodes: AstNode[]; +}; +type Rule = StyleRule | AtRule; +type AstNode = StyleRule | AtRule | Declaration | Comment | Context | AtRoot; + +type Config = UserConfig; +declare const enum Polyfills { + None = 0, + AtProperty = 1, + ColorMix = 2, + All = 3 +} +type CompileOptions = { + base?: string; + polyfills?: Polyfills; + loadModule?: (id: string, base: string, resourceHint: 'plugin' | 'config') => Promise<{ + module: Plugin | Config; + base: string; + }>; + loadStylesheet?: (id: string, base: string) => Promise<{ + content: string; + base: string; + }>; +}; +type Root = null | 'none' | { + base: string; + pattern: string; +}; +declare const enum Features { + None = 0, + AtApply = 1, + AtImport = 2, + JsPluginCompat = 4, + ThemeFunction = 8, + Utilities = 16, + Variants = 32 +} +declare function compileAst(input: AstNode[], opts?: CompileOptions): Promise<{ + sources: { + base: string; + pattern: string; + negated: boolean; + }[]; + root: Root; + features: Features; + build(candidates: string[]): AstNode[]; +}>; +declare function compile(css: string, opts?: CompileOptions): Promise<{ + sources: { + base: string; + pattern: string; + negated: boolean; + }[]; + root: Root; + features: Features; + build(candidates: string[]): string; +}>; +declare function __unstable__loadDesignSystem(css: string, opts?: CompileOptions): Promise; +declare function postcssPluginWarning(): void; + +export { type Config, Features, Polyfills, __unstable__loadDesignSystem, compile, compileAst, postcssPluginWarning as default }; diff --git a/node_modules/tailwindcss/dist/lib.d.ts b/node_modules/tailwindcss/dist/lib.d.ts new file mode 100644 index 0000000..411ce06 --- /dev/null +++ b/node_modules/tailwindcss/dist/lib.d.ts @@ -0,0 +1,3 @@ +declare function postcssPluginWarning(): void; + +export { postcssPluginWarning as default }; diff --git a/node_modules/tailwindcss/dist/lib.js b/node_modules/tailwindcss/dist/lib.js new file mode 100644 index 0000000..90bdc6c --- /dev/null +++ b/node_modules/tailwindcss/dist/lib.js @@ -0,0 +1,36 @@ +"use strict";var fi=Object.defineProperty;var pi=(t,r)=>{for(var i in r)fi(t,i,{get:r[i],enumerable:!0})};var mt={};pi(mt,{Features:()=>Ve,Polyfills:()=>Ze,__unstable__loadDesignSystem:()=>Yn,compile:()=>Gn,compileAst:()=>ci,default:()=>Le});var jt="4.1.5";var Re=92,Me=47,We=42,mi=34,gi=39,hi=58,Be=59,he=10,Oe=32,qe=9,zt=123,ht=125,kt=40,It=41,vi=91,wi=93,Ft=45,vt=64,ki=33;function ve(t){t[0]==="\uFEFF"&&(t=t.slice(1)),t=t.replaceAll(`\r +`,` +`);let r=[],i=[],e=[],n=null,s=null,a="",p="",u;for(let c=0;c0&&t[A]===g[g.length-1]&&(g=g.slice(0,-1));let v=wt(a,w);if(!v)throw new Error("Invalid custom property, expected a value");n?n.nodes.push(v):r.push(v),a=""}else if(m===Be&&a.charCodeAt(0)===vt)s=Pe(a),n?n.nodes.push(s):r.push(s),a="",s=null;else if(m===Be&&p[p.length-1]!==")"){let g=wt(a);if(!g)throw a.length===0?new Error("Unexpected semicolon"):new Error(`Invalid declaration: \`${a.trim()}\``);n?n.nodes.push(g):r.push(g),a=""}else if(m===zt&&p[p.length-1]!==")")p+="}",s=W(a.trim()),n&&n.nodes.push(s),e.push(n),n=s,a="",s=null;else if(m===ht&&p[p.length-1]!==")"){if(p==="")throw new Error("Missing opening {");if(p=p.slice(0,-1),a.length>0)if(a.charCodeAt(0)===vt)s=Pe(a),n?n.nodes.push(s):r.push(s),a="",s=null;else{let h=a.indexOf(":");if(n){let w=wt(a,h);if(!w)throw new Error(`Invalid declaration: \`${a.trim()}\``);n.nodes.push(w)}}let g=e.pop()??null;g===null&&n&&r.push(n),n=g,a="",s=null}else if(m===kt)p+=")",a+="(";else if(m===It){if(p[p.length-1]!==")")throw new Error("Missing opening (");p=p.slice(0,-1),a+=")"}else{if(a.length===0&&(m===Oe||m===he||m===qe))continue;a+=String.fromCharCode(m)}}}if(a.charCodeAt(0)===vt&&r.push(Pe(a)),p.length>0&&n){if(n.kind==="rule")throw new Error(`Missing closing } at ${n.selector}`);if(n.kind==="at-rule")throw new Error(`Missing closing } at ${n.name} ${n.params}`)}return i.length>0?i.concat(r):r}function Pe(t,r=[]){for(let i=5;i=1&&n<=31||n===127||e===0&&n>=48&&n<=57||e===1&&n>=48&&n<=57&&a===45){s+="\\"+n.toString(16)+" ";continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){s+=r.charAt(e);continue}s+="\\"+r.charAt(e)}return s}function we(t){return t.replace(/\\([\dA-Fa-f]{1,6}[\t\n\f\r ]?|[\S\s])/g,r=>r.length>2?String.fromCodePoint(Number.parseInt(r.slice(1).trim(),16)):r[1])}var Mt=new Map([["--font",["--font-weight","--font-size"]],["--inset",["--inset-shadow","--inset-ring"]],["--text",["--text-color","--text-decoration-color","--text-decoration-thickness","--text-indent","--text-shadow","--text-underline-offset"]]]);function Lt(t,r){return(Mt.get(r)??[]).some(i=>t===i||t.startsWith(`${i}-`))}var Ge=class{constructor(r=new Map,i=new Set([])){this.values=r;this.keyframes=i}prefix=null;add(r,i,e=0){if(r.endsWith("-*")){if(i!=="initial")throw new Error(`Invalid theme value \`${i}\` for namespace \`${r}\``);r==="--*"?this.values.clear():this.clearNamespace(r.slice(0,-2),0)}if(e&4){let n=this.values.get(r);if(n&&!(n.options&4))return}i==="initial"?this.values.delete(r):this.values.set(r,{value:i,options:e})}keysInNamespaces(r){let i=[];for(let e of r){let n=`${e}-`;for(let s of this.values.keys())s.startsWith(n)&&s.indexOf("--",2)===-1&&(Lt(s,e)||i.push(s.slice(n.length)))}return i}get(r){for(let i of r){let e=this.values.get(i);if(e)return e.value}return null}hasDefault(r){return(this.getOptions(r)&4)===4}getOptions(r){return r=we(this.#r(r)),this.values.get(r)?.options??0}entries(){return this.prefix?Array.from(this.values,r=>(r[0]=this.prefixKey(r[0]),r)):this.values.entries()}prefixKey(r){return this.prefix?`--${this.prefix}-${r.slice(2)}`:r}#r(r){return this.prefix?`--${r.slice(3+this.prefix.length)}`:r}clearNamespace(r,i){let e=Mt.get(r)??[];e:for(let n of this.values.keys())if(n.startsWith(r)){if(i!==0&&(this.getOptions(n)&i)!==i)continue;for(let s of e)if(n.startsWith(s))continue e;this.values.delete(n)}}#e(r,i){for(let e of i){let n=r!==null?`${e}-${r}`:e;if(!this.values.has(n))if(r!==null&&r.includes(".")){if(n=`${e}-${r.replaceAll(".","_")}`,!this.values.has(n))continue}else continue;if(!Lt(n,e))return n}return null}#t(r){let i=this.values.get(r);if(!i)return null;let e=null;return i.options&2&&(e=i.value),`var(${fe(this.prefixKey(r))}${e?`, ${e}`:""})`}markUsedVariable(r){let i=we(this.#r(r)),e=this.values.get(i);if(!e)return!1;let n=e.options&16;return e.options|=16,!n}resolve(r,i,e=0){let n=this.#e(r,i);if(!n)return null;let s=this.values.get(n);return(e|s.options)&1?s.value:this.#t(n)}resolveValue(r,i){let e=this.#e(r,i);return e?this.values.get(e).value:null}resolveWith(r,i,e=[]){let n=this.#e(r,i);if(!n)return null;let s={};for(let p of e){let u=`${n}${p}`,c=this.values.get(u);c&&(c.options&1?s[p]=c.value:s[p]=this.#t(u))}let a=this.values.get(n);return a.options&1?[a.value,s]:[this.#t(n),s]}namespace(r){let i=new Map,e=`${r}-`;for(let[n,s]of this.values)n===r?i.set(null,s.value):n.startsWith(`${e}-`)?i.set(n.slice(r.length),s.value):n.startsWith(e)&&i.set(n.slice(e.length),s.value);return i}addKeyframes(r){this.keyframes.add(r)}getKeyframes(){return Array.from(this.keyframes)}};var B=class extends Map{constructor(i){super();this.factory=i}get(i){let e=super.get(i);return e===void 0&&(e=this.factory(i,this),this.set(i,e)),e}};function yt(t){return{kind:"word",value:t}}function bi(t,r){return{kind:"function",value:t,nodes:r}}function yi(t){return{kind:"separator",value:t}}function te(t,r,i=null){for(let e=0;e0){let g=yt(n);e?e.nodes.push(g):r.push(g),n=""}let u=a,c=a+1;for(;c0){let c=yt(n);u.nodes.push(c),n=""}i.length>0?e=i[i.length-1]:e=null;break}default:n+=String.fromCharCode(p)}}return n.length>0&&r.push(yt(n)),r}function Ye(t){let r=[];return te(H(t),i=>{if(!(i.kind!=="function"||i.value!=="var"))return te(i.nodes,e=>{e.kind!=="word"||e.value[0]!=="-"||e.value[1]!=="-"||r.push(e.value)}),1}),r}var Vi=64;function L(t,r=[]){return{kind:"rule",selector:t,nodes:r}}function z(t,r="",i=[]){return{kind:"at-rule",name:t,params:r,nodes:i}}function W(t,r=[]){return t.charCodeAt(0)===Vi?Pe(t,r):L(t,r)}function l(t,r,i=!1){return{kind:"declaration",property:t,value:r,important:i}}function He(t){return{kind:"comment",value:t}}function le(t,r){return{kind:"context",context:t,nodes:r}}function D(t){return{kind:"at-root",nodes:t}}function I(t,r,i=[],e={}){for(let n=0;nnew Set),a=new B(()=>new Set),p=new Set,u=new Set,c=[],m=[],g=new B(()=>new Set);function h(v,A,b={},y=0){if(v.kind==="declaration"){if(v.property==="--tw-sort"||v.value===void 0||v.value===null)return;if(b.theme&&v.property[0]==="-"&&v.property[1]==="-"){if(v.value==="initial"){v.value=void 0;return}b.keyframes||s.get(A).add(v)}if(v.value.includes("var("))if(b.theme&&v.property[0]==="-"&&v.property[1]==="-")for(let V of Ye(v.value))g.get(V).add(v.property);else r.trackUsedVariables(v.value);if(v.property==="animation")for(let V of er(v.value))u.add(V);i&2&&v.value.includes("color-mix(")&&a.get(A).add(v),A.push(v)}else if(v.kind==="rule")if(v.selector==="&")for(let V of v.nodes){let T=[];h(V,T,b,y+1),T.length>0&&A.push(...T)}else{let V={...v,nodes:[]};for(let T of v.nodes)h(T,V.nodes,b,y+1);V.nodes.length>0&&A.push(V)}else if(v.kind==="at-rule"&&v.name==="@property"&&y===0){if(n.has(v.params))return;if(i&1){let T=v.params,R=null,_=!1;for(let j of v.nodes)j.kind==="declaration"&&(j.property==="initial-value"?R=j.value:j.property==="inherits"&&(_=j.value==="true"));_?c.push(l(T,R??"initial")):m.push(l(T,R??"initial"))}n.add(v.params);let V={...v,nodes:[]};for(let T of v.nodes)h(T,V.nodes,b,y+1);A.push(V)}else if(v.kind==="at-rule"){v.name==="@keyframes"&&(b={...b,keyframes:!0});let V={...v,nodes:[]};for(let T of v.nodes)h(T,V.nodes,b,y+1);v.name==="@keyframes"&&b.theme&&p.add(V),(V.nodes.length>0||V.name==="@layer"||V.name==="@charset"||V.name==="@custom-media"||V.name==="@namespace"||V.name==="@import")&&A.push(V)}else if(v.kind==="at-root")for(let V of v.nodes){let T=[];h(V,T,b,0);for(let R of T)e.push(R)}else if(v.kind==="context"){if(v.context.reference)return;for(let V of v.nodes)h(V,A,{...b,...v.context},y)}else v.kind==="comment"&&A.push(v)}let w=[];for(let v of t)h(v,w,{},0);e:for(let[v,A]of s)for(let b of A){if(tr(b.property,r.theme,g)){if(b.property.startsWith(r.theme.prefixKey("--animate-")))for(let T of er(b.value))u.add(T);continue}let V=v.indexOf(b);if(v.splice(V,1),v.length===0){let T=Si(w,R=>R.kind==="rule"&&R.nodes===v);if(!T||T.length===0)continue e;T.unshift({kind:"at-root",nodes:w});do{let R=T.pop();if(!R)break;let _=T[T.length-1];if(!_||_.kind!=="at-root"&&_.kind!=="at-rule")break;let j=_.nodes.indexOf(R);if(j===-1)break;_.nodes.splice(j,1)}while(!0);continue e}}for(let v of p)if(!u.has(v.params)){let A=e.indexOf(v);e.splice(A,1)}if(w=w.concat(e),i&2)for(let[v,A]of a)for(let b of A){let y=v.indexOf(b);if(y===-1||b.value==null)continue;let V=H(b.value),T=!1;if(te(V,(j,{replaceWith:P})=>{if(j.kind!=="function"||j.value!=="color-mix")return;let Y=!1,M=!1;if(te(j.nodes,(F,{replaceWith:re})=>{if(F.kind=="word"&&F.value.toLowerCase()==="currentcolor"){M=!0,T=!0;return}let X=F,se=null,o=new Set;do{if(X.kind!=="function"||X.value!=="var")return;let f=X.nodes[0];if(!f||f.kind!=="word")return;let d=f.value;if(o.has(d)){Y=!0;return}if(o.add(d),T=!0,se=r.theme.resolveValue(null,[f.value]),!se){Y=!0;return}if(se.toLowerCase()==="currentcolor"){M=!0;return}se.startsWith("var(")?X=H(se)[0]:X=null}while(X);re({kind:"word",value:se})}),Y||M){let F=j.nodes.findIndex(X=>X.kind==="separator"&&X.value.trim().includes(","));if(F===-1)return;let re=j.nodes.length>F?j.nodes[F+1]:null;if(!re)return;P(re)}else if(T){let F=j.nodes[2];F.kind==="word"&&(F.value==="oklab"||F.value==="oklch"||F.value==="lab"||F.value==="lch")&&(F.value="srgb")}}),!T)continue;let R={...b,value:J(V)},_=W("@supports (color: color-mix(in lab, red, red))",[b]);v.splice(y,1,R,_)}if(i&1){let v=[];if(c.length>0&&v.push(W(":root, :host",c)),m.length>0&&v.push(W("*, ::before, ::after, ::backdrop",m)),v.length>0){let A=w.findIndex(b=>!(b.kind==="comment"||b.kind==="at-rule"&&(b.name==="@charset"||b.name==="@import")));w.splice(A<0?w.length:A,0,z("@layer","properties",[])),w.push(W("@layer properties",[z("@supports","((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b))))",v)]))}}return w}function ie(t){function r(e,n=0){let s="",a=" ".repeat(n);if(e.kind==="declaration")s+=`${a}${e.property}: ${e.value}${e.important?" !important":""}; +`;else if(e.kind==="rule"){s+=`${a}${e.selector} { +`;for(let p of e.nodes)s+=r(p,n+1);s+=`${a}} +`}else if(e.kind==="at-rule"){if(e.nodes.length===0)return`${a}${e.name} ${e.params}; +`;s+=`${a}${e.name}${e.params?` ${e.params} `:" "}{ +`;for(let p of e.nodes)s+=r(p,n+1);s+=`${a}} +`}else if(e.kind==="comment")s+=`${a}/*${e.value}*/ +`;else if(e.kind==="context"||e.kind==="at-root")return"";return s}let i="";for(let e of t){let n=r(e);n!==""&&(i+=n)}return i}function Si(t,r){let i=[];return I(t,(e,{path:n})=>{if(r(e))return i=[...n],2}),i}function tr(t,r,i,e=new Set){if(e.has(t)||(e.add(t),r.getOptions(t)&24))return!0;{let s=i.get(t)??[];for(let a of s)if(tr(a,r,i,e))return!0}return!1}function er(t){return t.split(/[\s,]+/)}var xt=["calc","min","max","clamp","mod","rem","sin","cos","tan","asin","acos","atan","atan2","pow","sqrt","hypot","log","exp","round"],Xe=["anchor-size"],rr=new RegExp(`(${Xe.join("|")})\\(`,"g");function _e(t){return t.indexOf("(")!==-1&&xt.some(r=>t.includes(`${r}(`))}function ir(t){if(!xt.some(n=>t.includes(n)))return t;let r=!1;Xe.some(n=>t.includes(n))&&(rr.lastIndex=0,t=t.replace(rr,(n,s)=>(r=!0,`$${Xe.indexOf(s)}$(`)));let i="",e=[];for(let n=0;n=0;u--){let c=t.charCodeAt(u);if(c>=48&&c<=57)a=u;else if(c>=97&&c<=122)a=u;else break}let p=t.slice(a,n);if(xt.includes(p)){e.unshift(!0);continue}else if(e[0]&&p===""){e.unshift(!0);continue}e.unshift(!1);continue}else if(s===")")i+=s,e.shift();else if(s===","&&e[0]){i+=", ";continue}else{if(s===" "&&e[0]&&i[i.length-1]===" ")continue;if((s==="+"||s==="*"||s==="/"||s==="-")&&e[0]){let a=i.trimEnd(),p=a[a.length-1];if(p==="+"||p==="*"||p==="/"||p==="-"){i+=s;continue}else if(p==="("||p===","){i+=s;continue}else t[n-1]===" "?i+=`${s} `:i+=` ${s} `}else if(e[0]&&t.startsWith("to-zero",n)){let a=n;n+=7,i+=t.slice(a,n+1)}else i+=s}}return r?i.replace(/\$(\d+)\$/g,(n,s)=>Xe[s]??n):i}function pe(t){if(t.indexOf("(")===-1)return Ne(t);let r=H(t);return At(r),t=J(r),t=ir(t),t}function Ne(t,r=!1){let i="";for(let e=0;e0&&n===Ct[r-1]&&r--;break;case 59:if(r===0)return!1;break}}return!0}var et=new Uint8Array(256);function K(t,r){let i=0,e=[],n=0,s=t.length,a=r.charCodeAt(0);for(let p=0;p0&&u===et[i-1]&&i--;break}}return e.push(t.slice(n)),e}var Ei=58,nr=45,or=97,lr=122;function*ar(t,r){let i=K(t,":");if(r.theme.prefix){if(i.length===1||i[0]!==r.theme.prefix)return null;i.shift()}let e=i.pop(),n=[];for(let g=i.length-1;g>=0;--g){let h=r.parseVariant(i[g]);if(h===null)return;n.push(h)}let s=!1;e[e.length-1]==="!"?(s=!0,e=e.slice(0,-1)):e[0]==="!"&&(s=!0,e=e.slice(1)),r.utilities.has(e,"static")&&!e.includes("[")&&(yield{kind:"static",root:e,variants:n,important:s,raw:t});let[a,p=null,u]=K(e,"/");if(u)return;let c=p===null?null:Nt(p);if(p!==null&&c===null)return;if(a[0]==="["){if(a[a.length-1]!=="]")return;let g=a.charCodeAt(1);if(g!==nr&&!(g>=or&&g<=lr))return;a=a.slice(1,-1);let h=a.indexOf(":");if(h===-1||h===0||h===a.length-1)return;let w=a.slice(0,h),v=pe(a.slice(h+1));if(!de(v))return;yield{kind:"arbitrary",property:w,value:v,modifier:c,variants:n,important:s,raw:t};return}let m;if(a[a.length-1]==="]"){let g=a.indexOf("-[");if(g===-1)return;let h=a.slice(0,g);if(!r.utilities.has(h,"functional"))return;let w=a.slice(g+1);m=[[h,w]]}else if(a[a.length-1]===")"){let g=a.indexOf("-(");if(g===-1)return;let h=a.slice(0,g);if(!r.utilities.has(h,"functional"))return;let w=a.slice(g+2,-1),v=K(w,":"),A=null;if(v.length===2&&(A=v[0],w=v[1]),w[0]!=="-"&&w[1]!=="-")return;m=[[h,A===null?`[var(${w})]`:`[${A}:var(${w})]`]]}else m=ur(a,g=>r.utilities.has(g,"functional"));for(let[g,h]of m){let w={kind:"functional",root:g,modifier:c,value:null,variants:n,important:s,raw:t};if(h===null){yield w;continue}{let v=h.indexOf("[");if(v!==-1){if(h[h.length-1]!=="]")return;let b=pe(h.slice(v+1,-1));if(!de(b))continue;let y="";for(let V=0;V=or&&T<=lr))break}if(b.length===0||b.trim().length===0)continue;w.value={kind:"arbitrary",dataType:y||null,value:b}}else{let b=p===null||w.modifier?.kind==="arbitrary"?null:`${h}/${p}`;w.value={kind:"named",value:h,fraction:b}}}yield w}}function Nt(t){if(t[0]==="["&&t[t.length-1]==="]"){let r=pe(t.slice(1,-1));return!de(r)||r.length===0||r.trim().length===0?null:{kind:"arbitrary",value:r}}if(t[0]==="("&&t[t.length-1]===")"){let r=pe(t.slice(1,-1));return!de(r)||r.length===0||r.trim().length===0||r[0]!=="-"&&r[1]!=="-"?null:{kind:"arbitrary",value:`var(${r})`}}return{kind:"named",value:t}}function sr(t,r){if(t[0]==="["&&t[t.length-1]==="]"){if(t[1]==="@"&&t.includes("&"))return null;let i=pe(t.slice(1,-1));if(!de(i)||i.length===0||i.trim().length===0)return null;let e=i[0]===">"||i[0]==="+"||i[0]==="~";return!e&&i[0]!=="@"&&!i.includes("&")&&(i=`&:is(${i})`),{kind:"arbitrary",selector:i,relative:e}}{let[i,e=null,n]=K(t,"/");if(n)return null;let s=ur(i,a=>r.variants.has(a));for(let[a,p]of s)switch(r.variants.kind(a)){case"static":return p!==null||e!==null?null:{kind:"static",root:a};case"functional":{let u=e===null?null:Nt(e);if(e!==null&&u===null)return null;if(p===null)return{kind:"functional",root:a,modifier:u,value:null};if(p[p.length-1]==="]"){if(p[0]!=="[")continue;let c=pe(p.slice(1,-1));return!de(c)||c.length===0||c.trim().length===0?null:{kind:"functional",root:a,modifier:u,value:{kind:"arbitrary",value:c}}}if(p[p.length-1]===")"){if(p[0]!=="(")continue;let c=pe(p.slice(1,-1));return!de(c)||c.length===0||c.trim().length===0||c[0]!=="-"&&c[1]!=="-"?null:{kind:"functional",root:a,modifier:u,value:{kind:"arbitrary",value:`var(${c})`}}}return{kind:"functional",root:a,modifier:u,value:{kind:"named",value:p}}}case"compound":{if(p===null)return null;let u=r.parseVariant(p);if(u===null||!r.variants.compoundsWith(a,u))return null;let c=e===null?null:Nt(e);return e!==null&&c===null?null:{kind:"compound",root:a,modifier:c,variant:u}}}}return null}function*ur(t,r){r(t)&&(yield[t,null]);let i=t.lastIndexOf("-");for(;i>0;){let e=t.slice(0,i);if(r(e)){let n=[e,t.slice(i+1)];if(n[1]==="")break;yield n}i=t.lastIndexOf("-",i-1)}t[0]==="@"&&r("@")&&(yield["@",t.slice(1)])}function be(t,r,i){if(t===r)return 0;let e=t.indexOf("("),n=r.indexOf("("),s=e===-1?t.replace(/[\d.]+/g,""):t.slice(0,e),a=n===-1?r.replace(/[\d.]+/g,""):r.slice(0,n),p=(s===a?0:stt(r)||pr(r)||r==="thin"||r==="medium"||r==="thick")}var Ui=/^(?:element|image|cross-fade|image-set)\(/,Di=/^(repeating-)?(conic|linear|radial)-gradient\(/;function ji(t){let r=0;for(let i of K(t,","))if(!i.startsWith("var(")){if(fr(i)){r+=1;continue}if(Di.test(i)){r+=1;continue}if(Ui.test(i)){r+=1;continue}return!1}return r>0}function zi(t){return t==="serif"||t==="sans-serif"||t==="monospace"||t==="cursive"||t==="fantasy"||t==="system-ui"||t==="ui-serif"||t==="ui-sans-serif"||t==="ui-monospace"||t==="ui-rounded"||t==="math"||t==="emoji"||t==="fangsong"}function Ii(t){let r=0;for(let i of K(t,",")){let e=i.charCodeAt(0);if(e>=48&&e<=57)return!1;i.startsWith("var(")||(r+=1)}return r>0}function Fi(t){return t==="xx-small"||t==="x-small"||t==="small"||t==="medium"||t==="large"||t==="x-large"||t==="xx-large"||t==="xxx-large"}function Li(t){return t==="larger"||t==="smaller"}var ue=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,Mi=new RegExp(`^${ue.source}$`);function pr(t){return Mi.test(t)||_e(t)}var Wi=new RegExp(`^${ue.source}%$`);function $t(t){return Wi.test(t)||_e(t)}var Bi=new RegExp(`^${ue.source}s*/s*${ue.source}$`);function qi(t){return Bi.test(t)||_e(t)}var Hi=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],Gi=new RegExp(`^${ue.source}(${Hi.join("|")})$`);function tt(t){return Gi.test(t)||_e(t)}function Yi(t){let r=0;for(let i of K(t," ")){if(i==="center"||i==="top"||i==="right"||i==="bottom"||i==="left"){r+=1;continue}if(!i.startsWith("var(")){if(tt(i)||$t(i)){r+=1;continue}return!1}}return r>0}function Ji(t){let r=0;for(let i of K(t,",")){if(i==="cover"||i==="contain"){r+=1;continue}let e=K(i," ");if(e.length!==1&&e.length!==2)return!1;if(e.every(n=>n==="auto"||tt(n)||$t(n))){r+=1;continue}}return r>0}var Qi=["deg","rad","grad","turn"],Zi=new RegExp(`^${ue.source}(${Qi.join("|")})$`);function Xi(t){return Zi.test(t)}var en=new RegExp(`^${ue.source} +${ue.source} +${ue.source}$`);function tn(t){return en.test(t)}function E(t){let r=Number(t);return Number.isInteger(r)&&r>=0&&String(r)===String(t)}function Vt(t){let r=Number(t);return Number.isInteger(r)&&r>0&&String(r)===String(t)}function ye(t){return dr(t,.25)}function rt(t){return dr(t,.25)}function dr(t,r){let i=Number(t);return i>=0&&i%r===0&&String(i)===String(t)}var rn=new Set(["inset","inherit","initial","revert","unset"]),mr=/^-?(\d+|\.\d+)(.*?)$/g;function Ke(t,r){return K(t,",").map(e=>{e=e.trim();let n=K(e," ").filter(c=>c.trim()!==""),s=null,a=null,p=null;for(let c of n)rn.has(c)||(mr.test(c)?(a===null?a=c:p===null&&(p=c),mr.lastIndex=0):s===null&&(s=c));if(a===null||p===null)return e;let u=r(s??"currentcolor");return s!==null?e.replace(s,u):`${e} ${u}`}).join(", ")}var nn=/^-?[a-z][a-zA-Z0-9/%._-]*$/,on=/^-?[a-z][a-zA-Z0-9/%._-]*-\*$/,nt=["0","0.5","1","1.5","2","2.5","3","3.5","4","5","6","7","8","9","10","11","12","14","16","20","24","28","32","36","40","44","48","52","56","60","64","72","80","96"],St=class{utilities=new B(()=>[]);completions=new Map;static(r,i){this.utilities.get(r).push({kind:"static",compileFn:i})}functional(r,i,e){this.utilities.get(r).push({kind:"functional",compileFn:i,options:e})}has(r,i){return this.utilities.has(r)&&this.utilities.get(r).some(e=>e.kind===i)}get(r){return this.utilities.has(r)?this.utilities.get(r):[]}getCompletions(r){return this.completions.get(r)?.()??[]}suggest(r,i){this.completions.set(r,i)}keys(r){let i=[];for(let[e,n]of this.utilities.entries())for(let s of n)if(s.kind===r){i.push(e);break}return i}};function N(t,r,i){return z("@property",t,[l("syntax",i?`"${i}"`:'"*"'),l("inherits","false"),...r?[l("initial-value",r)]:[]])}function G(t,r){if(r===null)return t;let i=Number(r);return Number.isNaN(i)||(r=`${i*100}%`),r==="100%"?t:`color-mix(in oklab, ${t} ${r}, transparent)`}function hr(t,r){let i=Number(r);return Number.isNaN(i)||(r=`${i*100}%`),`oklab(from ${t} l a b / ${r})`}function Q(t,r,i){if(!r)return t;if(r.kind==="arbitrary")return G(t,r.value);let e=i.resolve(r.value,["--opacity"]);return e?G(t,e):rt(r.value)?G(t,`${r.value}%`):null}function Z(t,r,i){let e=null;switch(t.value.value){case"inherit":{e="inherit";break}case"transparent":{e="transparent";break}case"current":{e="currentcolor";break}default:{e=r.resolve(t.value.value,i);break}}return e?Q(e,t.modifier,r):null}var vr=/(\d+)_(\d+)/g;function wr(t){let r=new St;function i(o,f){function*d(k){for(let C of t.keysInNamespaces(k))yield C.replace(vr,(O,$,S)=>`${$}.${S}`)}let x=["1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","2/6","3/6","4/6","5/6","1/12","2/12","3/12","4/12","5/12","6/12","7/12","8/12","9/12","10/12","11/12"];r.suggest(o,()=>{let k=[];for(let C of f()){if(typeof C=="string"){k.push({values:[C],modifiers:[]});continue}let O=[...C.values??[],...d(C.valueThemeKeys??[])],$=[...C.modifiers??[],...d(C.modifierThemeKeys??[])];C.supportsFractions&&O.push(...x),C.hasDefaultValue&&O.unshift(null),k.push({supportsNegative:C.supportsNegative,values:O,modifiers:$})}return k})}function e(o,f){r.static(o,()=>f.map(d=>typeof d=="function"?d():l(d[0],d[1])))}function n(o,f){function d({negative:x}){return k=>{let C=null,O=null;if(k.value)if(k.value.kind==="arbitrary"){if(k.modifier)return;C=k.value.value,O=k.value.dataType}else{if(C=t.resolve(k.value.fraction??k.value.value,f.themeKeys??[]),C===null&&f.supportsFractions&&k.value.fraction){let[$,S]=K(k.value.fraction,"/");if(!E($)||!E(S))return;C=`calc(${k.value.fraction} * 100%)`}if(C===null&&x&&f.handleNegativeBareValue){if(C=f.handleNegativeBareValue(k.value),!C?.includes("/")&&k.modifier)return;if(C!==null)return f.handle(C,null)}if(C===null&&f.handleBareValue&&(C=f.handleBareValue(k.value),!C?.includes("/")&&k.modifier))return}else{if(k.modifier)return;C=f.defaultValue!==void 0?f.defaultValue:t.resolve(null,f.themeKeys??[])}if(C!==null)return f.handle(x?`calc(${C} * -1)`:C,O)}}f.supportsNegative&&r.functional(`-${o}`,d({negative:!0})),r.functional(o,d({negative:!1})),i(o,()=>[{supportsNegative:f.supportsNegative,valueThemeKeys:f.themeKeys??[],hasDefaultValue:f.defaultValue!==void 0&&f.defaultValue!==null,supportsFractions:f.supportsFractions}])}function s(o,f){r.functional(o,d=>{if(!d.value)return;let x=null;if(d.value.kind==="arbitrary"?(x=d.value.value,x=Q(x,d.modifier,t)):x=Z(d,t,f.themeKeys),x!==null)return f.handle(x)}),i(o,()=>[{values:["current","inherit","transparent"],valueThemeKeys:f.themeKeys,modifiers:Array.from({length:21},(d,x)=>`${x*5}`)}])}function a(o,f,d,{supportsNegative:x=!1,supportsFractions:k=!1}={}){x&&r.static(`-${o}-px`,()=>d("-1px")),r.static(`${o}-px`,()=>d("1px")),n(o,{themeKeys:f,supportsFractions:k,supportsNegative:x,defaultValue:null,handleBareValue:({value:C})=>{let O=t.resolve(null,["--spacing"]);return!O||!ye(C)?null:`calc(${O} * ${C})`},handleNegativeBareValue:({value:C})=>{let O=t.resolve(null,["--spacing"]);return!O||!ye(C)?null:`calc(${O} * -${C})`},handle:d}),i(o,()=>[{values:t.get(["--spacing"])?nt:[],supportsNegative:x,supportsFractions:k,valueThemeKeys:f}])}e("sr-only",[["position","absolute"],["width","1px"],["height","1px"],["padding","0"],["margin","-1px"],["overflow","hidden"],["clip","rect(0, 0, 0, 0)"],["white-space","nowrap"],["border-width","0"]]),e("not-sr-only",[["position","static"],["width","auto"],["height","auto"],["padding","0"],["margin","0"],["overflow","visible"],["clip","auto"],["white-space","normal"]]),e("pointer-events-none",[["pointer-events","none"]]),e("pointer-events-auto",[["pointer-events","auto"]]),e("visible",[["visibility","visible"]]),e("invisible",[["visibility","hidden"]]),e("collapse",[["visibility","collapse"]]),e("static",[["position","static"]]),e("fixed",[["position","fixed"]]),e("absolute",[["position","absolute"]]),e("relative",[["position","relative"]]),e("sticky",[["position","sticky"]]);for(let[o,f]of[["inset","inset"],["inset-x","inset-inline"],["inset-y","inset-block"],["start","inset-inline-start"],["end","inset-inline-end"],["top","top"],["right","right"],["bottom","bottom"],["left","left"]])e(`${o}-auto`,[[f,"auto"]]),e(`${o}-full`,[[f,"100%"]]),e(`-${o}-full`,[[f,"-100%"]]),a(o,["--inset","--spacing"],d=>[l(f,d)],{supportsNegative:!0,supportsFractions:!0});e("isolate",[["isolation","isolate"]]),e("isolation-auto",[["isolation","auto"]]),e("z-auto",[["z-index","auto"]]),n("z",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--z-index"],handle:o=>[l("z-index",o)]}),i("z",()=>[{supportsNegative:!0,values:["0","10","20","30","40","50"],valueThemeKeys:["--z-index"]}]),e("order-first",[["order","-9999"]]),e("order-last",[["order","9999"]]),e("order-none",[["order","0"]]),n("order",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--order"],handle:o=>[l("order",o)]}),i("order",()=>[{supportsNegative:!0,values:Array.from({length:12},(o,f)=>`${f+1}`),valueThemeKeys:["--order"]}]),e("col-auto",[["grid-column","auto"]]),n("col",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--grid-column"],handle:o=>[l("grid-column",o)]}),e("col-span-full",[["grid-column","1 / -1"]]),n("col-span",{handleBareValue:({value:o})=>E(o)?o:null,handle:o=>[l("grid-column",`span ${o} / span ${o}`)]}),e("col-start-auto",[["grid-column-start","auto"]]),n("col-start",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--grid-column-start"],handle:o=>[l("grid-column-start",o)]}),e("col-end-auto",[["grid-column-end","auto"]]),n("col-end",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--grid-column-end"],handle:o=>[l("grid-column-end",o)]}),i("col-span",()=>[{values:Array.from({length:12},(o,f)=>`${f+1}`),valueThemeKeys:[]}]),i("col-start",()=>[{supportsNegative:!0,values:Array.from({length:13},(o,f)=>`${f+1}`),valueThemeKeys:["--grid-column-start"]}]),i("col-end",()=>[{supportsNegative:!0,values:Array.from({length:13},(o,f)=>`${f+1}`),valueThemeKeys:["--grid-column-end"]}]),e("row-auto",[["grid-row","auto"]]),n("row",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--grid-row"],handle:o=>[l("grid-row",o)]}),e("row-span-full",[["grid-row","1 / -1"]]),n("row-span",{themeKeys:[],handleBareValue:({value:o})=>E(o)?o:null,handle:o=>[l("grid-row",`span ${o} / span ${o}`)]}),e("row-start-auto",[["grid-row-start","auto"]]),n("row-start",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--grid-row-start"],handle:o=>[l("grid-row-start",o)]}),e("row-end-auto",[["grid-row-end","auto"]]),n("row-end",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--grid-row-end"],handle:o=>[l("grid-row-end",o)]}),i("row-span",()=>[{values:Array.from({length:12},(o,f)=>`${f+1}`),valueThemeKeys:[]}]),i("row-start",()=>[{supportsNegative:!0,values:Array.from({length:13},(o,f)=>`${f+1}`),valueThemeKeys:["--grid-row-start"]}]),i("row-end",()=>[{supportsNegative:!0,values:Array.from({length:13},(o,f)=>`${f+1}`),valueThemeKeys:["--grid-row-end"]}]),e("float-start",[["float","inline-start"]]),e("float-end",[["float","inline-end"]]),e("float-right",[["float","right"]]),e("float-left",[["float","left"]]),e("float-none",[["float","none"]]),e("clear-start",[["clear","inline-start"]]),e("clear-end",[["clear","inline-end"]]),e("clear-right",[["clear","right"]]),e("clear-left",[["clear","left"]]),e("clear-both",[["clear","both"]]),e("clear-none",[["clear","none"]]);for(let[o,f]of[["m","margin"],["mx","margin-inline"],["my","margin-block"],["ms","margin-inline-start"],["me","margin-inline-end"],["mt","margin-top"],["mr","margin-right"],["mb","margin-bottom"],["ml","margin-left"]])e(`${o}-auto`,[[f,"auto"]]),a(o,["--margin","--spacing"],d=>[l(f,d)],{supportsNegative:!0});e("box-border",[["box-sizing","border-box"]]),e("box-content",[["box-sizing","content-box"]]),e("line-clamp-none",[["overflow","visible"],["display","block"],["-webkit-box-orient","horizontal"],["-webkit-line-clamp","unset"]]),n("line-clamp",{themeKeys:["--line-clamp"],handleBareValue:({value:o})=>E(o)?o:null,handle:o=>[l("overflow","hidden"),l("display","-webkit-box"),l("-webkit-box-orient","vertical"),l("-webkit-line-clamp",o)]}),i("line-clamp",()=>[{values:["1","2","3","4","5","6"],valueThemeKeys:["--line-clamp"]}]),e("block",[["display","block"]]),e("inline-block",[["display","inline-block"]]),e("inline",[["display","inline"]]),e("hidden",[["display","none"]]),e("inline-flex",[["display","inline-flex"]]),e("table",[["display","table"]]),e("inline-table",[["display","inline-table"]]),e("table-caption",[["display","table-caption"]]),e("table-cell",[["display","table-cell"]]),e("table-column",[["display","table-column"]]),e("table-column-group",[["display","table-column-group"]]),e("table-footer-group",[["display","table-footer-group"]]),e("table-header-group",[["display","table-header-group"]]),e("table-row-group",[["display","table-row-group"]]),e("table-row",[["display","table-row"]]),e("flow-root",[["display","flow-root"]]),e("flex",[["display","flex"]]),e("grid",[["display","grid"]]),e("inline-grid",[["display","inline-grid"]]),e("contents",[["display","contents"]]),e("list-item",[["display","list-item"]]),e("field-sizing-content",[["field-sizing","content"]]),e("field-sizing-fixed",[["field-sizing","fixed"]]),e("aspect-auto",[["aspect-ratio","auto"]]),e("aspect-square",[["aspect-ratio","1 / 1"]]),n("aspect",{themeKeys:["--aspect"],handleBareValue:({fraction:o})=>{if(o===null)return null;let[f,d]=K(o,"/");return!E(f)||!E(d)?null:o},handle:o=>[l("aspect-ratio",o)]});for(let[o,f]of[["full","100%"],["svw","100svw"],["lvw","100lvw"],["dvw","100dvw"],["svh","100svh"],["lvh","100lvh"],["dvh","100dvh"],["min","min-content"],["max","max-content"],["fit","fit-content"]])e(`size-${o}`,[["--tw-sort","size"],["width",f],["height",f]]),e(`w-${o}`,[["width",f]]),e(`h-${o}`,[["height",f]]),e(`min-w-${o}`,[["min-width",f]]),e(`min-h-${o}`,[["min-height",f]]),e(`max-w-${o}`,[["max-width",f]]),e(`max-h-${o}`,[["max-height",f]]);e("size-auto",[["--tw-sort","size"],["width","auto"],["height","auto"]]),e("w-auto",[["width","auto"]]),e("h-auto",[["height","auto"]]),e("min-w-auto",[["min-width","auto"]]),e("min-h-auto",[["min-height","auto"]]),e("h-lh",[["height","1lh"]]),e("min-h-lh",[["min-height","1lh"]]),e("max-h-lh",[["max-height","1lh"]]),e("w-screen",[["width","100vw"]]),e("min-w-screen",[["min-width","100vw"]]),e("max-w-screen",[["max-width","100vw"]]),e("h-screen",[["height","100vh"]]),e("min-h-screen",[["min-height","100vh"]]),e("max-h-screen",[["max-height","100vh"]]),e("max-w-none",[["max-width","none"]]),e("max-h-none",[["max-height","none"]]),a("size",["--size","--spacing"],o=>[l("--tw-sort","size"),l("width",o),l("height",o)],{supportsFractions:!0});for(let[o,f,d]of[["w",["--width","--spacing","--container"],"width"],["min-w",["--min-width","--spacing","--container"],"min-width"],["max-w",["--max-width","--spacing","--container"],"max-width"],["h",["--height","--spacing"],"height"],["min-h",["--min-height","--height","--spacing"],"min-height"],["max-h",["--max-height","--height","--spacing"],"max-height"]])a(o,f,x=>[l(d,x)],{supportsFractions:!0});r.static("container",()=>{let o=[...t.namespace("--breakpoint").values()];o.sort((d,x)=>be(d,x,"asc"));let f=[l("--tw-sort","--tw-container-component"),l("width","100%")];for(let d of o)f.push(z("@media",`(width >= ${d})`,[l("max-width",d)]));return f}),e("flex-auto",[["flex","auto"]]),e("flex-initial",[["flex","0 auto"]]),e("flex-none",[["flex","none"]]),r.functional("flex",o=>{if(o.value){if(o.value.kind==="arbitrary")return o.modifier?void 0:[l("flex",o.value.value)];if(o.value.fraction){let[f,d]=K(o.value.fraction,"/");return!E(f)||!E(d)?void 0:[l("flex",`calc(${o.value.fraction} * 100%)`)]}if(E(o.value.value))return o.modifier?void 0:[l("flex",o.value.value)]}}),i("flex",()=>[{supportsFractions:!0}]),n("shrink",{defaultValue:"1",handleBareValue:({value:o})=>E(o)?o:null,handle:o=>[l("flex-shrink",o)]}),n("grow",{defaultValue:"1",handleBareValue:({value:o})=>E(o)?o:null,handle:o=>[l("flex-grow",o)]}),i("shrink",()=>[{values:["0"],valueThemeKeys:[],hasDefaultValue:!0}]),i("grow",()=>[{values:["0"],valueThemeKeys:[],hasDefaultValue:!0}]),e("basis-auto",[["flex-basis","auto"]]),e("basis-full",[["flex-basis","100%"]]),a("basis",["--flex-basis","--spacing","--container"],o=>[l("flex-basis",o)],{supportsFractions:!0}),e("table-auto",[["table-layout","auto"]]),e("table-fixed",[["table-layout","fixed"]]),e("caption-top",[["caption-side","top"]]),e("caption-bottom",[["caption-side","bottom"]]),e("border-collapse",[["border-collapse","collapse"]]),e("border-separate",[["border-collapse","separate"]]);let p=()=>D([N("--tw-border-spacing-x","0",""),N("--tw-border-spacing-y","0","")]);a("border-spacing",["--border-spacing","--spacing"],o=>[p(),l("--tw-border-spacing-x",o),l("--tw-border-spacing-y",o),l("border-spacing","var(--tw-border-spacing-x) var(--tw-border-spacing-y)")]),a("border-spacing-x",["--border-spacing","--spacing"],o=>[p(),l("--tw-border-spacing-x",o),l("border-spacing","var(--tw-border-spacing-x) var(--tw-border-spacing-y)")]),a("border-spacing-y",["--border-spacing","--spacing"],o=>[p(),l("--tw-border-spacing-y",o),l("border-spacing","var(--tw-border-spacing-x) var(--tw-border-spacing-y)")]),e("origin-center",[["transform-origin","center"]]),e("origin-top",[["transform-origin","top"]]),e("origin-top-right",[["transform-origin","top right"]]),e("origin-right",[["transform-origin","right"]]),e("origin-bottom-right",[["transform-origin","bottom right"]]),e("origin-bottom",[["transform-origin","bottom"]]),e("origin-bottom-left",[["transform-origin","bottom left"]]),e("origin-left",[["transform-origin","left"]]),e("origin-top-left",[["transform-origin","top left"]]),n("origin",{themeKeys:["--transform-origin"],handle:o=>[l("transform-origin",o)]}),e("perspective-origin-center",[["perspective-origin","center"]]),e("perspective-origin-top",[["perspective-origin","top"]]),e("perspective-origin-top-right",[["perspective-origin","top right"]]),e("perspective-origin-right",[["perspective-origin","right"]]),e("perspective-origin-bottom-right",[["perspective-origin","bottom right"]]),e("perspective-origin-bottom",[["perspective-origin","bottom"]]),e("perspective-origin-bottom-left",[["perspective-origin","bottom left"]]),e("perspective-origin-left",[["perspective-origin","left"]]),e("perspective-origin-top-left",[["perspective-origin","top left"]]),n("perspective-origin",{themeKeys:["--perspective-origin"],handle:o=>[l("perspective-origin",o)]}),e("perspective-none",[["perspective","none"]]),n("perspective",{themeKeys:["--perspective"],handle:o=>[l("perspective",o)]});let u=()=>D([N("--tw-translate-x","0"),N("--tw-translate-y","0"),N("--tw-translate-z","0")]);e("translate-none",[["translate","none"]]),e("-translate-full",[u,["--tw-translate-x","-100%"],["--tw-translate-y","-100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),e("translate-full",[u,["--tw-translate-x","100%"],["--tw-translate-y","100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),a("translate",["--translate","--spacing"],o=>[u(),l("--tw-translate-x",o),l("--tw-translate-y",o),l("translate","var(--tw-translate-x) var(--tw-translate-y)")],{supportsNegative:!0,supportsFractions:!0});for(let o of["x","y"])e(`-translate-${o}-full`,[u,[`--tw-translate-${o}`,"-100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),e(`translate-${o}-full`,[u,[`--tw-translate-${o}`,"100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),a(`translate-${o}`,["--translate","--spacing"],f=>[u(),l(`--tw-translate-${o}`,f),l("translate","var(--tw-translate-x) var(--tw-translate-y)")],{supportsNegative:!0,supportsFractions:!0});a("translate-z",["--translate","--spacing"],o=>[u(),l("--tw-translate-z",o),l("translate","var(--tw-translate-x) var(--tw-translate-y) var(--tw-translate-z)")],{supportsNegative:!0}),e("translate-3d",[u,["translate","var(--tw-translate-x) var(--tw-translate-y) var(--tw-translate-z)"]]);let c=()=>D([N("--tw-scale-x","1"),N("--tw-scale-y","1"),N("--tw-scale-z","1")]);e("scale-none",[["scale","none"]]);function m({negative:o}){return f=>{if(!f.value||f.modifier)return;let d;return f.value.kind==="arbitrary"?(d=f.value.value,[l("scale",d)]):(d=t.resolve(f.value.value,["--scale"]),!d&&E(f.value.value)&&(d=`${f.value.value}%`),d?(d=o?`calc(${d} * -1)`:d,[c(),l("--tw-scale-x",d),l("--tw-scale-y",d),l("--tw-scale-z",d),l("scale","var(--tw-scale-x) var(--tw-scale-y)")]):void 0)}}r.functional("-scale",m({negative:!0})),r.functional("scale",m({negative:!1})),i("scale",()=>[{supportsNegative:!0,values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--scale"]}]);for(let o of["x","y","z"])n(`scale-${o}`,{supportsNegative:!0,themeKeys:["--scale"],handleBareValue:({value:f})=>E(f)?`${f}%`:null,handle:f=>[c(),l(`--tw-scale-${o}`,f),l("scale",`var(--tw-scale-x) var(--tw-scale-y)${o==="z"?" var(--tw-scale-z)":""}`)]}),i(`scale-${o}`,()=>[{supportsNegative:!0,values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--scale"]}]);e("scale-3d",[c,["scale","var(--tw-scale-x) var(--tw-scale-y) var(--tw-scale-z)"]]),e("rotate-none",[["rotate","none"]]);function g({negative:o}){return f=>{if(!f.value||f.modifier)return;let d;if(f.value.kind==="arbitrary"){d=f.value.value;let x=f.value.dataType??q(d,["angle","vector"]);if(x==="vector")return[l("rotate",`${d} var(--tw-rotate)`)];if(x!=="angle")return[l("rotate",d)]}else if(d=t.resolve(f.value.value,["--rotate"]),!d&&E(f.value.value)&&(d=`${f.value.value}deg`),!d)return;return[l("rotate",o?`calc(${d} * -1)`:d)]}}r.functional("-rotate",g({negative:!0})),r.functional("rotate",g({negative:!1})),i("rotate",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"],valueThemeKeys:["--rotate"]}]);{let o=["var(--tw-rotate-x,)","var(--tw-rotate-y,)","var(--tw-rotate-z,)","var(--tw-skew-x,)","var(--tw-skew-y,)"].join(" "),f=()=>D([N("--tw-rotate-x"),N("--tw-rotate-y"),N("--tw-rotate-z"),N("--tw-skew-x"),N("--tw-skew-y")]);for(let d of["x","y","z"])n(`rotate-${d}`,{supportsNegative:!0,themeKeys:["--rotate"],handleBareValue:({value:x})=>E(x)?`${x}deg`:null,handle:x=>[f(),l(`--tw-rotate-${d}`,`rotate${d.toUpperCase()}(${x})`),l("transform",o)]}),i(`rotate-${d}`,()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"],valueThemeKeys:["--rotate"]}]);n("skew",{supportsNegative:!0,themeKeys:["--skew"],handleBareValue:({value:d})=>E(d)?`${d}deg`:null,handle:d=>[f(),l("--tw-skew-x",`skewX(${d})`),l("--tw-skew-y",`skewY(${d})`),l("transform",o)]}),n("skew-x",{supportsNegative:!0,themeKeys:["--skew"],handleBareValue:({value:d})=>E(d)?`${d}deg`:null,handle:d=>[f(),l("--tw-skew-x",`skewX(${d})`),l("transform",o)]}),n("skew-y",{supportsNegative:!0,themeKeys:["--skew"],handleBareValue:({value:d})=>E(d)?`${d}deg`:null,handle:d=>[f(),l("--tw-skew-y",`skewY(${d})`),l("transform",o)]}),i("skew",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12"],valueThemeKeys:["--skew"]}]),i("skew-x",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12"],valueThemeKeys:["--skew"]}]),i("skew-y",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12"],valueThemeKeys:["--skew"]}]),r.functional("transform",d=>{if(d.modifier)return;let x=null;if(d.value?d.value.kind==="arbitrary"&&(x=d.value.value):x=o,x!==null)return[f(),l("transform",x)]}),i("transform",()=>[{hasDefaultValue:!0}]),e("transform-cpu",[["transform",o]]),e("transform-gpu",[["transform",`translateZ(0) ${o}`]]),e("transform-none",[["transform","none"]])}e("transform-flat",[["transform-style","flat"]]),e("transform-3d",[["transform-style","preserve-3d"]]),e("transform-content",[["transform-box","content-box"]]),e("transform-border",[["transform-box","border-box"]]),e("transform-fill",[["transform-box","fill-box"]]),e("transform-stroke",[["transform-box","stroke-box"]]),e("transform-view",[["transform-box","view-box"]]),e("backface-visible",[["backface-visibility","visible"]]),e("backface-hidden",[["backface-visibility","hidden"]]);for(let o of["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out"])e(`cursor-${o}`,[["cursor",o]]);n("cursor",{themeKeys:["--cursor"],handle:o=>[l("cursor",o)]});for(let o of["auto","none","manipulation"])e(`touch-${o}`,[["touch-action",o]]);let h=()=>D([N("--tw-pan-x"),N("--tw-pan-y"),N("--tw-pinch-zoom")]);for(let o of["x","left","right"])e(`touch-pan-${o}`,[h,["--tw-pan-x",`pan-${o}`],["touch-action","var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)"]]);for(let o of["y","up","down"])e(`touch-pan-${o}`,[h,["--tw-pan-y",`pan-${o}`],["touch-action","var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)"]]);e("touch-pinch-zoom",[h,["--tw-pinch-zoom","pinch-zoom"],["touch-action","var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)"]]);for(let o of["none","text","all","auto"])e(`select-${o}`,[["-webkit-user-select",o],["user-select",o]]);e("resize-none",[["resize","none"]]),e("resize-x",[["resize","horizontal"]]),e("resize-y",[["resize","vertical"]]),e("resize",[["resize","both"]]),e("snap-none",[["scroll-snap-type","none"]]);let w=()=>D([N("--tw-scroll-snap-strictness","proximity","*")]);for(let o of["x","y","both"])e(`snap-${o}`,[w,["scroll-snap-type",`${o} var(--tw-scroll-snap-strictness)`]]);e("snap-mandatory",[w,["--tw-scroll-snap-strictness","mandatory"]]),e("snap-proximity",[w,["--tw-scroll-snap-strictness","proximity"]]),e("snap-align-none",[["scroll-snap-align","none"]]),e("snap-start",[["scroll-snap-align","start"]]),e("snap-end",[["scroll-snap-align","end"]]),e("snap-center",[["scroll-snap-align","center"]]),e("snap-normal",[["scroll-snap-stop","normal"]]),e("snap-always",[["scroll-snap-stop","always"]]);for(let[o,f]of[["scroll-m","scroll-margin"],["scroll-mx","scroll-margin-inline"],["scroll-my","scroll-margin-block"],["scroll-ms","scroll-margin-inline-start"],["scroll-me","scroll-margin-inline-end"],["scroll-mt","scroll-margin-top"],["scroll-mr","scroll-margin-right"],["scroll-mb","scroll-margin-bottom"],["scroll-ml","scroll-margin-left"]])a(o,["--scroll-margin","--spacing"],d=>[l(f,d)],{supportsNegative:!0});for(let[o,f]of[["scroll-p","scroll-padding"],["scroll-px","scroll-padding-inline"],["scroll-py","scroll-padding-block"],["scroll-ps","scroll-padding-inline-start"],["scroll-pe","scroll-padding-inline-end"],["scroll-pt","scroll-padding-top"],["scroll-pr","scroll-padding-right"],["scroll-pb","scroll-padding-bottom"],["scroll-pl","scroll-padding-left"]])a(o,["--scroll-padding","--spacing"],d=>[l(f,d)]);e("list-inside",[["list-style-position","inside"]]),e("list-outside",[["list-style-position","outside"]]),e("list-none",[["list-style-type","none"]]),e("list-disc",[["list-style-type","disc"]]),e("list-decimal",[["list-style-type","decimal"]]),n("list",{themeKeys:["--list-style-type"],handle:o=>[l("list-style-type",o)]}),e("list-image-none",[["list-style-image","none"]]),n("list-image",{themeKeys:["--list-style-image"],handle:o=>[l("list-style-image",o)]}),e("appearance-none",[["appearance","none"]]),e("appearance-auto",[["appearance","auto"]]),e("scheme-normal",[["color-scheme","normal"]]),e("scheme-dark",[["color-scheme","dark"]]),e("scheme-light",[["color-scheme","light"]]),e("scheme-light-dark",[["color-scheme","light dark"]]),e("scheme-only-dark",[["color-scheme","only dark"]]),e("scheme-only-light",[["color-scheme","only light"]]),e("columns-auto",[["columns","auto"]]),n("columns",{themeKeys:["--columns","--container"],handleBareValue:({value:o})=>E(o)?o:null,handle:o=>[l("columns",o)]}),i("columns",()=>[{values:Array.from({length:12},(o,f)=>`${f+1}`),valueThemeKeys:["--columns","--container"]}]);for(let o of["auto","avoid","all","avoid-page","page","left","right","column"])e(`break-before-${o}`,[["break-before",o]]);for(let o of["auto","avoid","avoid-page","avoid-column"])e(`break-inside-${o}`,[["break-inside",o]]);for(let o of["auto","avoid","all","avoid-page","page","left","right","column"])e(`break-after-${o}`,[["break-after",o]]);e("grid-flow-row",[["grid-auto-flow","row"]]),e("grid-flow-col",[["grid-auto-flow","column"]]),e("grid-flow-dense",[["grid-auto-flow","dense"]]),e("grid-flow-row-dense",[["grid-auto-flow","row dense"]]),e("grid-flow-col-dense",[["grid-auto-flow","column dense"]]),e("auto-cols-auto",[["grid-auto-columns","auto"]]),e("auto-cols-min",[["grid-auto-columns","min-content"]]),e("auto-cols-max",[["grid-auto-columns","max-content"]]),e("auto-cols-fr",[["grid-auto-columns","minmax(0, 1fr)"]]),n("auto-cols",{themeKeys:["--grid-auto-columns"],handle:o=>[l("grid-auto-columns",o)]}),e("auto-rows-auto",[["grid-auto-rows","auto"]]),e("auto-rows-min",[["grid-auto-rows","min-content"]]),e("auto-rows-max",[["grid-auto-rows","max-content"]]),e("auto-rows-fr",[["grid-auto-rows","minmax(0, 1fr)"]]),n("auto-rows",{themeKeys:["--grid-auto-rows"],handle:o=>[l("grid-auto-rows",o)]}),e("grid-cols-none",[["grid-template-columns","none"]]),e("grid-cols-subgrid",[["grid-template-columns","subgrid"]]),n("grid-cols",{themeKeys:["--grid-template-columns"],handleBareValue:({value:o})=>Vt(o)?`repeat(${o}, minmax(0, 1fr))`:null,handle:o=>[l("grid-template-columns",o)]}),e("grid-rows-none",[["grid-template-rows","none"]]),e("grid-rows-subgrid",[["grid-template-rows","subgrid"]]),n("grid-rows",{themeKeys:["--grid-template-rows"],handleBareValue:({value:o})=>Vt(o)?`repeat(${o}, minmax(0, 1fr))`:null,handle:o=>[l("grid-template-rows",o)]}),i("grid-cols",()=>[{values:Array.from({length:12},(o,f)=>`${f+1}`),valueThemeKeys:["--grid-template-columns"]}]),i("grid-rows",()=>[{values:Array.from({length:12},(o,f)=>`${f+1}`),valueThemeKeys:["--grid-template-rows"]}]),e("flex-row",[["flex-direction","row"]]),e("flex-row-reverse",[["flex-direction","row-reverse"]]),e("flex-col",[["flex-direction","column"]]),e("flex-col-reverse",[["flex-direction","column-reverse"]]),e("flex-wrap",[["flex-wrap","wrap"]]),e("flex-nowrap",[["flex-wrap","nowrap"]]),e("flex-wrap-reverse",[["flex-wrap","wrap-reverse"]]),e("place-content-center",[["place-content","center"]]),e("place-content-start",[["place-content","start"]]),e("place-content-end",[["place-content","end"]]),e("place-content-center-safe",[["place-content","safe center"]]),e("place-content-end-safe",[["place-content","safe end"]]),e("place-content-between",[["place-content","space-between"]]),e("place-content-around",[["place-content","space-around"]]),e("place-content-evenly",[["place-content","space-evenly"]]),e("place-content-baseline",[["place-content","baseline"]]),e("place-content-stretch",[["place-content","stretch"]]),e("place-items-center",[["place-items","center"]]),e("place-items-start",[["place-items","start"]]),e("place-items-end",[["place-items","end"]]),e("place-items-center-safe",[["place-items","safe center"]]),e("place-items-end-safe",[["place-items","safe end"]]),e("place-items-baseline",[["place-items","baseline"]]),e("place-items-stretch",[["place-items","stretch"]]),e("content-normal",[["align-content","normal"]]),e("content-center",[["align-content","center"]]),e("content-start",[["align-content","flex-start"]]),e("content-end",[["align-content","flex-end"]]),e("content-center-safe",[["align-content","safe center"]]),e("content-end-safe",[["align-content","safe flex-end"]]),e("content-between",[["align-content","space-between"]]),e("content-around",[["align-content","space-around"]]),e("content-evenly",[["align-content","space-evenly"]]),e("content-baseline",[["align-content","baseline"]]),e("content-stretch",[["align-content","stretch"]]),e("items-center",[["align-items","center"]]),e("items-start",[["align-items","flex-start"]]),e("items-end",[["align-items","flex-end"]]),e("items-center-safe",[["align-items","safe center"]]),e("items-end-safe",[["align-items","safe flex-end"]]),e("items-baseline",[["align-items","baseline"]]),e("items-baseline-last",[["align-items","last baseline"]]),e("items-stretch",[["align-items","stretch"]]),e("justify-normal",[["justify-content","normal"]]),e("justify-center",[["justify-content","center"]]),e("justify-start",[["justify-content","flex-start"]]),e("justify-end",[["justify-content","flex-end"]]),e("justify-center-safe",[["justify-content","safe center"]]),e("justify-end-safe",[["justify-content","safe flex-end"]]),e("justify-between",[["justify-content","space-between"]]),e("justify-around",[["justify-content","space-around"]]),e("justify-evenly",[["justify-content","space-evenly"]]),e("justify-baseline",[["justify-content","baseline"]]),e("justify-stretch",[["justify-content","stretch"]]),e("justify-items-normal",[["justify-items","normal"]]),e("justify-items-center",[["justify-items","center"]]),e("justify-items-start",[["justify-items","start"]]),e("justify-items-end",[["justify-items","end"]]),e("justify-items-center-safe",[["justify-items","safe center"]]),e("justify-items-end-safe",[["justify-items","safe end"]]),e("justify-items-stretch",[["justify-items","stretch"]]),a("gap",["--gap","--spacing"],o=>[l("gap",o)]),a("gap-x",["--gap","--spacing"],o=>[l("column-gap",o)]),a("gap-y",["--gap","--spacing"],o=>[l("row-gap",o)]),a("space-x",["--space","--spacing"],o=>[D([N("--tw-space-x-reverse","0")]),L(":where(& > :not(:last-child))",[l("--tw-sort","row-gap"),l("--tw-space-x-reverse","0"),l("margin-inline-start",`calc(${o} * var(--tw-space-x-reverse))`),l("margin-inline-end",`calc(${o} * calc(1 - var(--tw-space-x-reverse)))`)])],{supportsNegative:!0}),a("space-y",["--space","--spacing"],o=>[D([N("--tw-space-y-reverse","0")]),L(":where(& > :not(:last-child))",[l("--tw-sort","column-gap"),l("--tw-space-y-reverse","0"),l("margin-block-start",`calc(${o} * var(--tw-space-y-reverse))`),l("margin-block-end",`calc(${o} * calc(1 - var(--tw-space-y-reverse)))`)])],{supportsNegative:!0}),e("space-x-reverse",[()=>D([N("--tw-space-x-reverse","0")]),()=>L(":where(& > :not(:last-child))",[l("--tw-sort","row-gap"),l("--tw-space-x-reverse","1")])]),e("space-y-reverse",[()=>D([N("--tw-space-y-reverse","0")]),()=>L(":where(& > :not(:last-child))",[l("--tw-sort","column-gap"),l("--tw-space-y-reverse","1")])]),e("accent-auto",[["accent-color","auto"]]),s("accent",{themeKeys:["--accent-color","--color"],handle:o=>[l("accent-color",o)]}),s("caret",{themeKeys:["--caret-color","--color"],handle:o=>[l("caret-color",o)]}),s("divide",{themeKeys:["--divide-color","--color"],handle:o=>[L(":where(& > :not(:last-child))",[l("--tw-sort","divide-color"),l("border-color",o)])]}),e("place-self-auto",[["place-self","auto"]]),e("place-self-start",[["place-self","start"]]),e("place-self-end",[["place-self","end"]]),e("place-self-center",[["place-self","center"]]),e("place-self-end-safe",[["place-self","safe end"]]),e("place-self-center-safe",[["place-self","safe center"]]),e("place-self-stretch",[["place-self","stretch"]]),e("self-auto",[["align-self","auto"]]),e("self-start",[["align-self","flex-start"]]),e("self-end",[["align-self","flex-end"]]),e("self-center",[["align-self","center"]]),e("self-end-safe",[["align-self","safe flex-end"]]),e("self-center-safe",[["align-self","safe center"]]),e("self-stretch",[["align-self","stretch"]]),e("self-baseline",[["align-self","baseline"]]),e("self-baseline-last",[["align-self","last baseline"]]),e("justify-self-auto",[["justify-self","auto"]]),e("justify-self-start",[["justify-self","flex-start"]]),e("justify-self-end",[["justify-self","flex-end"]]),e("justify-self-center",[["justify-self","center"]]),e("justify-self-end-safe",[["justify-self","safe flex-end"]]),e("justify-self-center-safe",[["justify-self","safe center"]]),e("justify-self-stretch",[["justify-self","stretch"]]);for(let o of["auto","hidden","clip","visible","scroll"])e(`overflow-${o}`,[["overflow",o]]),e(`overflow-x-${o}`,[["overflow-x",o]]),e(`overflow-y-${o}`,[["overflow-y",o]]);for(let o of["auto","contain","none"])e(`overscroll-${o}`,[["overscroll-behavior",o]]),e(`overscroll-x-${o}`,[["overscroll-behavior-x",o]]),e(`overscroll-y-${o}`,[["overscroll-behavior-y",o]]);e("scroll-auto",[["scroll-behavior","auto"]]),e("scroll-smooth",[["scroll-behavior","smooth"]]),e("truncate",[["overflow","hidden"],["text-overflow","ellipsis"],["white-space","nowrap"]]),e("text-ellipsis",[["text-overflow","ellipsis"]]),e("text-clip",[["text-overflow","clip"]]),e("hyphens-none",[["-webkit-hyphens","none"],["hyphens","none"]]),e("hyphens-manual",[["-webkit-hyphens","manual"],["hyphens","manual"]]),e("hyphens-auto",[["-webkit-hyphens","auto"],["hyphens","auto"]]),e("whitespace-normal",[["white-space","normal"]]),e("whitespace-nowrap",[["white-space","nowrap"]]),e("whitespace-pre",[["white-space","pre"]]),e("whitespace-pre-line",[["white-space","pre-line"]]),e("whitespace-pre-wrap",[["white-space","pre-wrap"]]),e("whitespace-break-spaces",[["white-space","break-spaces"]]),e("text-wrap",[["text-wrap","wrap"]]),e("text-nowrap",[["text-wrap","nowrap"]]),e("text-balance",[["text-wrap","balance"]]),e("text-pretty",[["text-wrap","pretty"]]),e("break-normal",[["overflow-wrap","normal"],["word-break","normal"]]),e("break-words",[["overflow-wrap","break-word"]]),e("break-all",[["word-break","break-all"]]),e("break-keep",[["word-break","keep-all"]]),e("wrap-anywhere",[["overflow-wrap","anywhere"]]),e("wrap-break-word",[["overflow-wrap","break-word"]]),e("wrap-normal",[["overflow-wrap","normal"]]);for(let[o,f]of[["rounded",["border-radius"]],["rounded-s",["border-start-start-radius","border-end-start-radius"]],["rounded-e",["border-start-end-radius","border-end-end-radius"]],["rounded-t",["border-top-left-radius","border-top-right-radius"]],["rounded-r",["border-top-right-radius","border-bottom-right-radius"]],["rounded-b",["border-bottom-right-radius","border-bottom-left-radius"]],["rounded-l",["border-top-left-radius","border-bottom-left-radius"]],["rounded-ss",["border-start-start-radius"]],["rounded-se",["border-start-end-radius"]],["rounded-ee",["border-end-end-radius"]],["rounded-es",["border-end-start-radius"]],["rounded-tl",["border-top-left-radius"]],["rounded-tr",["border-top-right-radius"]],["rounded-br",["border-bottom-right-radius"]],["rounded-bl",["border-bottom-left-radius"]]])e(`${o}-none`,f.map(d=>[d,"0"])),e(`${o}-full`,f.map(d=>[d,"calc(infinity * 1px)"])),n(o,{themeKeys:["--radius"],handle:d=>f.map(x=>l(x,d))});e("border-solid",[["--tw-border-style","solid"],["border-style","solid"]]),e("border-dashed",[["--tw-border-style","dashed"],["border-style","dashed"]]),e("border-dotted",[["--tw-border-style","dotted"],["border-style","dotted"]]),e("border-double",[["--tw-border-style","double"],["border-style","double"]]),e("border-hidden",[["--tw-border-style","hidden"],["border-style","hidden"]]),e("border-none",[["--tw-border-style","none"],["border-style","none"]]);{let f=function(d,x){r.functional(d,k=>{if(!k.value){if(k.modifier)return;let C=t.get(["--default-border-width"])??"1px",O=x.width(C);return O?[o(),...O]:void 0}if(k.value.kind==="arbitrary"){let C=k.value.value;switch(k.value.dataType??q(C,["color","line-width","length"])){case"line-width":case"length":{if(k.modifier)return;let $=x.width(C);return $?[o(),...$]:void 0}default:return C=Q(C,k.modifier,t),C===null?void 0:x.color(C)}}{let C=Z(k,t,["--border-color","--color"]);if(C)return x.color(C)}{if(k.modifier)return;let C=t.resolve(k.value.value,["--border-width"]);if(C){let O=x.width(C);return O?[o(),...O]:void 0}if(E(k.value.value)){let O=x.width(`${k.value.value}px`);return O?[o(),...O]:void 0}}}),i(d,()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--border-color","--color"],modifiers:Array.from({length:21},(k,C)=>`${C*5}`),hasDefaultValue:!0},{values:["0","2","4","8"],valueThemeKeys:["--border-width"]}])};var Y=f;let o=()=>D([N("--tw-border-style","solid")]);f("border",{width:d=>[l("border-style","var(--tw-border-style)"),l("border-width",d)],color:d=>[l("border-color",d)]}),f("border-x",{width:d=>[l("border-inline-style","var(--tw-border-style)"),l("border-inline-width",d)],color:d=>[l("border-inline-color",d)]}),f("border-y",{width:d=>[l("border-block-style","var(--tw-border-style)"),l("border-block-width",d)],color:d=>[l("border-block-color",d)]}),f("border-s",{width:d=>[l("border-inline-start-style","var(--tw-border-style)"),l("border-inline-start-width",d)],color:d=>[l("border-inline-start-color",d)]}),f("border-e",{width:d=>[l("border-inline-end-style","var(--tw-border-style)"),l("border-inline-end-width",d)],color:d=>[l("border-inline-end-color",d)]}),f("border-t",{width:d=>[l("border-top-style","var(--tw-border-style)"),l("border-top-width",d)],color:d=>[l("border-top-color",d)]}),f("border-r",{width:d=>[l("border-right-style","var(--tw-border-style)"),l("border-right-width",d)],color:d=>[l("border-right-color",d)]}),f("border-b",{width:d=>[l("border-bottom-style","var(--tw-border-style)"),l("border-bottom-width",d)],color:d=>[l("border-bottom-color",d)]}),f("border-l",{width:d=>[l("border-left-style","var(--tw-border-style)"),l("border-left-width",d)],color:d=>[l("border-left-color",d)]}),n("divide-x",{defaultValue:t.get(["--default-border-width"])??"1px",themeKeys:["--divide-width","--border-width"],handleBareValue:({value:d})=>E(d)?`${d}px`:null,handle:d=>[D([N("--tw-divide-x-reverse","0")]),L(":where(& > :not(:last-child))",[l("--tw-sort","divide-x-width"),o(),l("--tw-divide-x-reverse","0"),l("border-inline-style","var(--tw-border-style)"),l("border-inline-start-width",`calc(${d} * var(--tw-divide-x-reverse))`),l("border-inline-end-width",`calc(${d} * calc(1 - var(--tw-divide-x-reverse)))`)])]}),n("divide-y",{defaultValue:t.get(["--default-border-width"])??"1px",themeKeys:["--divide-width","--border-width"],handleBareValue:({value:d})=>E(d)?`${d}px`:null,handle:d=>[D([N("--tw-divide-y-reverse","0")]),L(":where(& > :not(:last-child))",[l("--tw-sort","divide-y-width"),o(),l("--tw-divide-y-reverse","0"),l("border-bottom-style","var(--tw-border-style)"),l("border-top-style","var(--tw-border-style)"),l("border-top-width",`calc(${d} * var(--tw-divide-y-reverse))`),l("border-bottom-width",`calc(${d} * calc(1 - var(--tw-divide-y-reverse)))`)])]}),i("divide-x",()=>[{values:["0","2","4","8"],valueThemeKeys:["--divide-width","--border-width"],hasDefaultValue:!0}]),i("divide-y",()=>[{values:["0","2","4","8"],valueThemeKeys:["--divide-width","--border-width"],hasDefaultValue:!0}]),e("divide-x-reverse",[()=>D([N("--tw-divide-x-reverse","0")]),()=>L(":where(& > :not(:last-child))",[l("--tw-divide-x-reverse","1")])]),e("divide-y-reverse",[()=>D([N("--tw-divide-y-reverse","0")]),()=>L(":where(& > :not(:last-child))",[l("--tw-divide-y-reverse","1")])]);for(let d of["solid","dashed","dotted","double","none"])e(`divide-${d}`,[()=>L(":where(& > :not(:last-child))",[l("--tw-sort","divide-style"),l("--tw-border-style",d),l("border-style",d)])])}e("bg-auto",[["background-size","auto"]]),e("bg-cover",[["background-size","cover"]]),e("bg-contain",[["background-size","contain"]]),n("bg-size",{handle(o){if(o)return[l("background-size",o)]}}),e("bg-fixed",[["background-attachment","fixed"]]),e("bg-local",[["background-attachment","local"]]),e("bg-scroll",[["background-attachment","scroll"]]),e("bg-top",[["background-position","top"]]),e("bg-top-left",[["background-position","left top"]]),e("bg-top-right",[["background-position","right top"]]),e("bg-bottom",[["background-position","bottom"]]),e("bg-bottom-left",[["background-position","left bottom"]]),e("bg-bottom-right",[["background-position","right bottom"]]),e("bg-left",[["background-position","left"]]),e("bg-right",[["background-position","right"]]),e("bg-center",[["background-position","center"]]),n("bg-position",{handle(o){if(o)return[l("background-position",o)]}}),e("bg-repeat",[["background-repeat","repeat"]]),e("bg-no-repeat",[["background-repeat","no-repeat"]]),e("bg-repeat-x",[["background-repeat","repeat-x"]]),e("bg-repeat-y",[["background-repeat","repeat-y"]]),e("bg-repeat-round",[["background-repeat","round"]]),e("bg-repeat-space",[["background-repeat","space"]]),e("bg-none",[["background-image","none"]]);{let d=function(C){let O="in oklab";if(C?.kind==="named")switch(C.value){case"longer":case"shorter":case"increasing":case"decreasing":O=`in oklch ${C.value} hue`;break;default:O=`in ${C.value}`}else C?.kind==="arbitrary"&&(O=C.value);return O},x=function({negative:C}){return O=>{if(!O.value)return;if(O.value.kind==="arbitrary"){if(O.modifier)return;let U=O.value.value;switch(O.value.dataType??q(U,["angle"])){case"angle":return U=C?`calc(${U} * -1)`:`${U}`,[l("--tw-gradient-position",U),l("background-image",`linear-gradient(var(--tw-gradient-stops,${U}))`)];default:return C?void 0:[l("--tw-gradient-position",U),l("background-image",`linear-gradient(var(--tw-gradient-stops,${U}))`)]}}let $=O.value.value;if(!C&&f.has($))$=f.get($);else if(E($))$=C?`calc(${$}deg * -1)`:`${$}deg`;else return;let S=d(O.modifier);return[l("--tw-gradient-position",`${$}`),W("@supports (background-image: linear-gradient(in lab, red, red))",[l("--tw-gradient-position",`${$} ${S}`)]),l("background-image","linear-gradient(var(--tw-gradient-stops))")]}},k=function({negative:C}){return O=>{if(O.value?.kind==="arbitrary"){if(O.modifier)return;let U=O.value.value;return[l("--tw-gradient-position",U),l("background-image",`conic-gradient(var(--tw-gradient-stops,${U}))`)]}let $=d(O.modifier);if(!O.value)return[l("--tw-gradient-position",$),l("background-image","conic-gradient(var(--tw-gradient-stops))")];let S=O.value.value;if(E(S))return S=C?`calc(${S}deg * -1)`:`${S}deg`,[l("--tw-gradient-position",`from ${S} ${$}`),l("background-image","conic-gradient(var(--tw-gradient-stops))")]}};var M=d,F=x,re=k;let o=["oklab","oklch","srgb","hsl","longer","shorter","increasing","decreasing"],f=new Map([["to-t","to top"],["to-tr","to top right"],["to-r","to right"],["to-br","to bottom right"],["to-b","to bottom"],["to-bl","to bottom left"],["to-l","to left"],["to-tl","to top left"]]);r.functional("-bg-linear",x({negative:!0})),r.functional("bg-linear",x({negative:!1})),i("bg-linear",()=>[{values:[...f.keys()],modifiers:o},{values:["0","30","60","90","120","150","180","210","240","270","300","330"],supportsNegative:!0,modifiers:o}]),r.functional("-bg-conic",k({negative:!0})),r.functional("bg-conic",k({negative:!1})),i("bg-conic",()=>[{hasDefaultValue:!0,modifiers:o},{values:["0","30","60","90","120","150","180","210","240","270","300","330"],supportsNegative:!0,modifiers:o}]),r.functional("bg-radial",C=>{if(!C.value){let O=d(C.modifier);return[l("--tw-gradient-position",O),l("background-image","radial-gradient(var(--tw-gradient-stops))")]}if(C.value.kind==="arbitrary"){if(C.modifier)return;let O=C.value.value;return[l("--tw-gradient-position",O),l("background-image",`radial-gradient(var(--tw-gradient-stops,${O}))`)]}}),i("bg-radial",()=>[{hasDefaultValue:!0,modifiers:o}])}r.functional("bg",o=>{if(o.value){if(o.value.kind==="arbitrary"){let f=o.value.value;switch(o.value.dataType??q(f,["image","color","percentage","position","bg-size","length","url"])){case"percentage":case"position":return o.modifier?void 0:[l("background-position",f)];case"bg-size":case"length":case"size":return o.modifier?void 0:[l("background-size",f)];case"image":case"url":return o.modifier?void 0:[l("background-image",f)];default:return f=Q(f,o.modifier,t),f===null?void 0:[l("background-color",f)]}}{let f=Z(o,t,["--background-color","--color"]);if(f)return[l("background-color",f)]}{if(o.modifier)return;let f=t.resolve(o.value.value,["--background-image"]);if(f)return[l("background-image",f)]}}}),i("bg",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(o,f)=>`${f*5}`)},{values:[],valueThemeKeys:["--background-image"]}]);let v=()=>D([N("--tw-gradient-position"),N("--tw-gradient-from","#0000",""),N("--tw-gradient-via","#0000",""),N("--tw-gradient-to","#0000",""),N("--tw-gradient-stops"),N("--tw-gradient-via-stops"),N("--tw-gradient-from-position","0%",""),N("--tw-gradient-via-position","50%",""),N("--tw-gradient-to-position","100%","")]);function A(o,f){r.functional(o,d=>{if(d.value){if(d.value.kind==="arbitrary"){let x=d.value.value;switch(d.value.dataType??q(x,["color","length","percentage"])){case"length":case"percentage":return d.modifier?void 0:f.position(x);default:return x=Q(x,d.modifier,t),x===null?void 0:f.color(x)}}{let x=Z(d,t,["--background-color","--color"]);if(x)return f.color(x)}{if(d.modifier)return;let x=t.resolve(d.value.value,["--gradient-color-stop-positions"]);if(x)return f.position(x);if(d.value.value[d.value.value.length-1]==="%"&&E(d.value.value.slice(0,-1)))return f.position(d.value.value)}}}),i(o,()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(d,x)=>`${x*5}`)},{values:Array.from({length:21},(d,x)=>`${x*5}%`),valueThemeKeys:["--gradient-color-stop-positions"]}])}A("from",{color:o=>[v(),l("--tw-sort","--tw-gradient-from"),l("--tw-gradient-from",o),l("--tw-gradient-stops","var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))")],position:o=>[v(),l("--tw-gradient-from-position",o)]}),e("via-none",[["--tw-gradient-via-stops","initial"]]),A("via",{color:o=>[v(),l("--tw-sort","--tw-gradient-via"),l("--tw-gradient-via",o),l("--tw-gradient-via-stops","var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position)"),l("--tw-gradient-stops","var(--tw-gradient-via-stops)")],position:o=>[v(),l("--tw-gradient-via-position",o)]}),A("to",{color:o=>[v(),l("--tw-sort","--tw-gradient-to"),l("--tw-gradient-to",o),l("--tw-gradient-stops","var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))")],position:o=>[v(),l("--tw-gradient-to-position",o)]}),e("mask-none",[["mask-image","none"]]),r.functional("mask",o=>{if(!o.value||o.modifier||o.value.kind!=="arbitrary")return;let f=o.value.value;switch(o.value.dataType??q(f,["image","percentage","position","bg-size","length","url"])){case"percentage":case"position":return o.modifier?void 0:[l("mask-position",f)];case"bg-size":case"length":case"size":return[l("mask-size",f)];case"image":case"url":default:return[l("mask-image",f)]}}),e("mask-add",[["mask-composite","add"]]),e("mask-subtract",[["mask-composite","subtract"]]),e("mask-intersect",[["mask-composite","intersect"]]),e("mask-exclude",[["mask-composite","exclude"]]),e("mask-alpha",[["mask-mode","alpha"]]),e("mask-luminance",[["mask-mode","luminance"]]),e("mask-match",[["mask-mode","match-source"]]),e("mask-type-alpha",[["mask-type","alpha"]]),e("mask-type-luminance",[["mask-type","luminance"]]),e("mask-auto",[["mask-size","auto"]]),e("mask-cover",[["mask-size","cover"]]),e("mask-contain",[["mask-size","contain"]]),n("mask-size",{handle(o){if(o)return[l("mask-size",o)]}}),e("mask-top",[["mask-position","top"]]),e("mask-top-left",[["mask-position","left top"]]),e("mask-top-right",[["mask-position","right top"]]),e("mask-bottom",[["mask-position","bottom"]]),e("mask-bottom-left",[["mask-position","left bottom"]]),e("mask-bottom-right",[["mask-position","right bottom"]]),e("mask-left",[["mask-position","left"]]),e("mask-right",[["mask-position","right"]]),e("mask-center",[["mask-position","center"]]),n("mask-position",{handle(o){if(o)return[l("mask-position",o)]}}),e("mask-repeat",[["mask-repeat","repeat"]]),e("mask-no-repeat",[["mask-repeat","no-repeat"]]),e("mask-repeat-x",[["mask-repeat","repeat-x"]]),e("mask-repeat-y",[["mask-repeat","repeat-y"]]),e("mask-repeat-round",[["mask-repeat","round"]]),e("mask-repeat-space",[["mask-repeat","space"]]),e("mask-clip-border",[["mask-clip","border-box"]]),e("mask-clip-padding",[["mask-clip","padding-box"]]),e("mask-clip-content",[["mask-clip","content-box"]]),e("mask-clip-fill",[["mask-clip","fill-box"]]),e("mask-clip-stroke",[["mask-clip","stroke-box"]]),e("mask-clip-view",[["mask-clip","view-box"]]),e("mask-no-clip",[["mask-clip","no-clip"]]),e("mask-origin-border",[["mask-origin","border-box"]]),e("mask-origin-padding",[["mask-origin","padding-box"]]),e("mask-origin-content",[["mask-origin","content-box"]]),e("mask-origin-fill",[["mask-origin","fill-box"]]),e("mask-origin-stroke",[["mask-origin","stroke-box"]]),e("mask-origin-view",[["mask-origin","view-box"]]);let b=()=>D([N("--tw-mask-linear","linear-gradient(#fff, #fff)"),N("--tw-mask-radial","linear-gradient(#fff, #fff)"),N("--tw-mask-conic","linear-gradient(#fff, #fff)")]);function y(o,f){r.functional(o,d=>{if(d.value){if(d.value.kind==="arbitrary"){let x=d.value.value;switch(d.value.dataType??q(x,["length","percentage","color"])){case"color":return x=Q(x,d.modifier,t),x===null?void 0:f.color(x);case"percentage":return d.modifier||!E(x.slice(0,-1))?void 0:f.position(x);default:return d.modifier?void 0:f.position(x)}}{let x=Z(d,t,["--background-color","--color"]);if(x)return f.color(x)}{if(d.modifier)return;let x=q(d.value.value,["number","percentage"]);if(!x)return;switch(x){case"number":{let k=t.resolve(null,["--spacing"]);return!k||!ye(d.value.value)?void 0:f.position(`calc(${k} * ${d.value.value})`)}case"percentage":return E(d.value.value.slice(0,-1))?f.position(d.value.value):void 0;default:return}}}}),i(o,()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(d,x)=>`${x*5}`)},{values:Array.from({length:21},(d,x)=>`${x*5}%`),valueThemeKeys:["--gradient-color-stop-positions"]}]),i(o,()=>[{values:Array.from({length:21},(d,x)=>`${x*5}%`)},{values:t.get(["--spacing"])?nt:[]},{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(d,x)=>`${x*5}`)}])}let V=()=>D([N("--tw-mask-left","linear-gradient(#fff, #fff)"),N("--tw-mask-right","linear-gradient(#fff, #fff)"),N("--tw-mask-bottom","linear-gradient(#fff, #fff)"),N("--tw-mask-top","linear-gradient(#fff, #fff)")]);function T(o,f,d){y(o,{color(x){let k=[b(),V(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear","var(--tw-mask-left), var(--tw-mask-right), var(--tw-mask-bottom), var(--tw-mask-top)")];for(let C of["top","right","bottom","left"])d[C]&&(k.push(l(`--tw-mask-${C}`,`linear-gradient(to ${C}, var(--tw-mask-${C}-from-color) var(--tw-mask-${C}-from-position), var(--tw-mask-${C}-to-color) var(--tw-mask-${C}-to-position))`)),k.push(D([N(`--tw-mask-${C}-from-position`,"0%"),N(`--tw-mask-${C}-to-position`,"100%"),N(`--tw-mask-${C}-from-color`,"black"),N(`--tw-mask-${C}-to-color`,"transparent")])),k.push(l(`--tw-mask-${C}-${f}-color`,x)));return k},position(x){let k=[b(),V(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear","var(--tw-mask-left), var(--tw-mask-right), var(--tw-mask-bottom), var(--tw-mask-top)")];for(let C of["top","right","bottom","left"])d[C]&&(k.push(l(`--tw-mask-${C}`,`linear-gradient(to ${C}, var(--tw-mask-${C}-from-color) var(--tw-mask-${C}-from-position), var(--tw-mask-${C}-to-color) var(--tw-mask-${C}-to-position))`)),k.push(D([N(`--tw-mask-${C}-from-position`,"0%"),N(`--tw-mask-${C}-to-position`,"100%"),N(`--tw-mask-${C}-from-color`,"black"),N(`--tw-mask-${C}-to-color`,"transparent")])),k.push(l(`--tw-mask-${C}-${f}-position`,x)));return k}})}T("mask-x-from","from",{top:!1,right:!0,bottom:!1,left:!0}),T("mask-x-to","to",{top:!1,right:!0,bottom:!1,left:!0}),T("mask-y-from","from",{top:!0,right:!1,bottom:!0,left:!1}),T("mask-y-to","to",{top:!0,right:!1,bottom:!0,left:!1}),T("mask-t-from","from",{top:!0,right:!1,bottom:!1,left:!1}),T("mask-t-to","to",{top:!0,right:!1,bottom:!1,left:!1}),T("mask-r-from","from",{top:!1,right:!0,bottom:!1,left:!1}),T("mask-r-to","to",{top:!1,right:!0,bottom:!1,left:!1}),T("mask-b-from","from",{top:!1,right:!1,bottom:!0,left:!1}),T("mask-b-to","to",{top:!1,right:!1,bottom:!0,left:!1}),T("mask-l-from","from",{top:!1,right:!1,bottom:!1,left:!0}),T("mask-l-to","to",{top:!1,right:!1,bottom:!1,left:!0});let R=()=>D([N("--tw-mask-linear-position","0deg"),N("--tw-mask-linear-from-position","0%"),N("--tw-mask-linear-to-position","100%"),N("--tw-mask-linear-from-color","black"),N("--tw-mask-linear-to-color","transparent")]);n("mask-linear",{defaultValue:null,supportsNegative:!0,supportsFractions:!1,handleBareValue(o){return E(o.value)?`calc(1deg * ${o.value})`:null},handleNegativeBareValue(o){return E(o.value)?`calc(1deg * -${o.value})`:null},handle:o=>[b(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops, var(--tw-mask-linear-position)))"),l("--tw-mask-linear-position",o)]}),i("mask-linear",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"]}]),y("mask-linear-from",{color:o=>[b(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),l("--tw-mask-linear-from-color",o)],position:o=>[b(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),l("--tw-mask-linear-from-position",o)]}),y("mask-linear-to",{color:o=>[b(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),l("--tw-mask-linear-to-color",o)],position:o=>[b(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),l("--tw-mask-linear-to-position",o)]});let _=()=>D([N("--tw-mask-radial-from-position","0%"),N("--tw-mask-radial-to-position","100%"),N("--tw-mask-radial-from-color","black"),N("--tw-mask-radial-to-color","transparent"),N("--tw-mask-radial-shape","ellipse"),N("--tw-mask-radial-size","farthest-corner"),N("--tw-mask-radial-position","center")]);e("mask-circle",[["--tw-mask-radial-shape","circle"]]),e("mask-ellipse",[["--tw-mask-radial-shape","ellipse"]]),e("mask-radial-closest-side",[["--tw-mask-radial-size","closest-side"]]),e("mask-radial-farthest-side",[["--tw-mask-radial-size","farthest-side"]]),e("mask-radial-closest-corner",[["--tw-mask-radial-size","closest-corner"]]),e("mask-radial-farthest-corner",[["--tw-mask-radial-size","farthest-corner"]]),e("mask-radial-at-top",[["--tw-mask-radial-position","top"]]),e("mask-radial-at-top-left",[["--tw-mask-radial-position","top left"]]),e("mask-radial-at-top-right",[["--tw-mask-radial-position","top right"]]),e("mask-radial-at-bottom",[["--tw-mask-radial-position","bottom"]]),e("mask-radial-at-bottom-left",[["--tw-mask-radial-position","bottom left"]]),e("mask-radial-at-bottom-right",[["--tw-mask-radial-position","bottom right"]]),e("mask-radial-at-left",[["--tw-mask-radial-position","left"]]),e("mask-radial-at-right",[["--tw-mask-radial-position","right"]]),e("mask-radial-at-center",[["--tw-mask-radial-position","center"]]),n("mask-radial-at",{defaultValue:null,supportsNegative:!1,supportsFractions:!1,handle:o=>[l("--tw-mask-radial-position",o)]}),n("mask-radial",{defaultValue:null,supportsNegative:!1,supportsFractions:!1,handle:o=>[b(),_(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops, var(--tw-mask-radial-size)))"),l("--tw-mask-radial-size",o)]}),y("mask-radial-from",{color:o=>[b(),_(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),l("--tw-mask-radial-from-color",o)],position:o=>[b(),_(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),l("--tw-mask-radial-from-position",o)]}),y("mask-radial-to",{color:o=>[b(),_(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),l("--tw-mask-radial-to-color",o)],position:o=>[b(),_(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),l("--tw-mask-radial-to-position",o)]});let j=()=>D([N("--tw-mask-conic-position","0deg"),N("--tw-mask-conic-from-position","0%"),N("--tw-mask-conic-to-position","100%"),N("--tw-mask-conic-from-color","black"),N("--tw-mask-conic-to-color","transparent")]);n("mask-conic",{defaultValue:null,supportsNegative:!0,supportsFractions:!1,handleBareValue(o){return E(o.value)?`calc(1deg * ${o.value})`:null},handleNegativeBareValue(o){return E(o.value)?`calc(1deg * -${o.value})`:null},handle:o=>[b(),j(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops, var(--tw-mask-conic-position)))"),l("--tw-mask-conic-position",o)]}),i("mask-conic",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"]}]),y("mask-conic-from",{color:o=>[b(),j(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),l("--tw-mask-conic-from-color",o)],position:o=>[b(),j(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),l("--tw-mask-conic-from-position",o)]}),y("mask-conic-to",{color:o=>[b(),j(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),l("--tw-mask-conic-to-color",o)],position:o=>[b(),j(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),l("--tw-mask-conic-to-position",o)]}),e("box-decoration-slice",[["-webkit-box-decoration-break","slice"],["box-decoration-break","slice"]]),e("box-decoration-clone",[["-webkit-box-decoration-break","clone"],["box-decoration-break","clone"]]),e("bg-clip-text",[["background-clip","text"]]),e("bg-clip-border",[["background-clip","border-box"]]),e("bg-clip-padding",[["background-clip","padding-box"]]),e("bg-clip-content",[["background-clip","content-box"]]),e("bg-origin-border",[["background-origin","border-box"]]),e("bg-origin-padding",[["background-origin","padding-box"]]),e("bg-origin-content",[["background-origin","content-box"]]);for(let o of["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"])e(`bg-blend-${o}`,[["background-blend-mode",o]]),e(`mix-blend-${o}`,[["mix-blend-mode",o]]);e("mix-blend-plus-darker",[["mix-blend-mode","plus-darker"]]),e("mix-blend-plus-lighter",[["mix-blend-mode","plus-lighter"]]),e("fill-none",[["fill","none"]]),r.functional("fill",o=>{if(!o.value)return;if(o.value.kind==="arbitrary"){let d=Q(o.value.value,o.modifier,t);return d===null?void 0:[l("fill",d)]}let f=Z(o,t,["--fill","--color"]);if(f)return[l("fill",f)]}),i("fill",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--fill","--color"],modifiers:Array.from({length:21},(o,f)=>`${f*5}`)}]),e("stroke-none",[["stroke","none"]]),r.functional("stroke",o=>{if(o.value){if(o.value.kind==="arbitrary"){let f=o.value.value;switch(o.value.dataType??q(f,["color","number","length","percentage"])){case"number":case"length":case"percentage":return o.modifier?void 0:[l("stroke-width",f)];default:return f=Q(o.value.value,o.modifier,t),f===null?void 0:[l("stroke",f)]}}{let f=Z(o,t,["--stroke","--color"]);if(f)return[l("stroke",f)]}{let f=t.resolve(o.value.value,["--stroke-width"]);if(f)return[l("stroke-width",f)];if(E(o.value.value))return[l("stroke-width",o.value.value)]}}}),i("stroke",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--stroke","--color"],modifiers:Array.from({length:21},(o,f)=>`${f*5}`)},{values:["0","1","2","3"],valueThemeKeys:["--stroke-width"]}]),e("object-contain",[["object-fit","contain"]]),e("object-cover",[["object-fit","cover"]]),e("object-fill",[["object-fit","fill"]]),e("object-none",[["object-fit","none"]]),e("object-scale-down",[["object-fit","scale-down"]]),e("object-top",[["object-position","top"]]),e("object-top-left",[["object-position","left top"]]),e("object-top-right",[["object-position","right top"]]),e("object-bottom",[["object-position","bottom"]]),e("object-bottom-left",[["object-position","left bottom"]]),e("object-bottom-right",[["object-position","right bottom"]]),e("object-left",[["object-position","left"]]),e("object-right",[["object-position","right"]]),e("object-center",[["object-position","center"]]),n("object",{themeKeys:["--object-position"],handle:o=>[l("object-position",o)]});for(let[o,f]of[["p","padding"],["px","padding-inline"],["py","padding-block"],["ps","padding-inline-start"],["pe","padding-inline-end"],["pt","padding-top"],["pr","padding-right"],["pb","padding-bottom"],["pl","padding-left"]])a(o,["--padding","--spacing"],d=>[l(f,d)]);e("text-left",[["text-align","left"]]),e("text-center",[["text-align","center"]]),e("text-right",[["text-align","right"]]),e("text-justify",[["text-align","justify"]]),e("text-start",[["text-align","start"]]),e("text-end",[["text-align","end"]]),a("indent",["--text-indent","--spacing"],o=>[l("text-indent",o)],{supportsNegative:!0}),e("align-baseline",[["vertical-align","baseline"]]),e("align-top",[["vertical-align","top"]]),e("align-middle",[["vertical-align","middle"]]),e("align-bottom",[["vertical-align","bottom"]]),e("align-text-top",[["vertical-align","text-top"]]),e("align-text-bottom",[["vertical-align","text-bottom"]]),e("align-sub",[["vertical-align","sub"]]),e("align-super",[["vertical-align","super"]]),n("align",{themeKeys:[],handle:o=>[l("vertical-align",o)]}),r.functional("font",o=>{if(!(!o.value||o.modifier)){if(o.value.kind==="arbitrary"){let f=o.value.value;switch(o.value.dataType??q(f,["number","generic-name","family-name"])){case"generic-name":case"family-name":return[l("font-family",f)];default:return[D([N("--tw-font-weight")]),l("--tw-font-weight",f),l("font-weight",f)]}}{let f=t.resolveWith(o.value.value,["--font"],["--font-feature-settings","--font-variation-settings"]);if(f){let[d,x={}]=f;return[l("font-family",d),l("font-feature-settings",x["--font-feature-settings"]),l("font-variation-settings",x["--font-variation-settings"])]}}{let f=t.resolve(o.value.value,["--font-weight"]);if(f)return[D([N("--tw-font-weight")]),l("--tw-font-weight",f),l("font-weight",f)]}}}),i("font",()=>[{values:[],valueThemeKeys:["--font"]},{values:[],valueThemeKeys:["--font-weight"]}]),e("uppercase",[["text-transform","uppercase"]]),e("lowercase",[["text-transform","lowercase"]]),e("capitalize",[["text-transform","capitalize"]]),e("normal-case",[["text-transform","none"]]),e("italic",[["font-style","italic"]]),e("not-italic",[["font-style","normal"]]),e("underline",[["text-decoration-line","underline"]]),e("overline",[["text-decoration-line","overline"]]),e("line-through",[["text-decoration-line","line-through"]]),e("no-underline",[["text-decoration-line","none"]]),e("font-stretch-normal",[["font-stretch","normal"]]),e("font-stretch-ultra-condensed",[["font-stretch","ultra-condensed"]]),e("font-stretch-extra-condensed",[["font-stretch","extra-condensed"]]),e("font-stretch-condensed",[["font-stretch","condensed"]]),e("font-stretch-semi-condensed",[["font-stretch","semi-condensed"]]),e("font-stretch-semi-expanded",[["font-stretch","semi-expanded"]]),e("font-stretch-expanded",[["font-stretch","expanded"]]),e("font-stretch-extra-expanded",[["font-stretch","extra-expanded"]]),e("font-stretch-ultra-expanded",[["font-stretch","ultra-expanded"]]),n("font-stretch",{handleBareValue:({value:o})=>{if(!o.endsWith("%"))return null;let f=Number(o.slice(0,-1));return!E(f)||Number.isNaN(f)||f<50||f>200?null:o},handle:o=>[l("font-stretch",o)]}),i("font-stretch",()=>[{values:["50%","75%","90%","95%","100%","105%","110%","125%","150%","200%"]}]),s("placeholder",{themeKeys:["--background-color","--color"],handle:o=>[L("&::placeholder",[l("--tw-sort","placeholder-color"),l("color",o)])]}),e("decoration-solid",[["text-decoration-style","solid"]]),e("decoration-double",[["text-decoration-style","double"]]),e("decoration-dotted",[["text-decoration-style","dotted"]]),e("decoration-dashed",[["text-decoration-style","dashed"]]),e("decoration-wavy",[["text-decoration-style","wavy"]]),e("decoration-auto",[["text-decoration-thickness","auto"]]),e("decoration-from-font",[["text-decoration-thickness","from-font"]]),r.functional("decoration",o=>{if(o.value){if(o.value.kind==="arbitrary"){let f=o.value.value;switch(o.value.dataType??q(f,["color","length","percentage"])){case"length":case"percentage":return o.modifier?void 0:[l("text-decoration-thickness",f)];default:return f=Q(f,o.modifier,t),f===null?void 0:[l("text-decoration-color",f)]}}{let f=t.resolve(o.value.value,["--text-decoration-thickness"]);if(f)return o.modifier?void 0:[l("text-decoration-thickness",f)];if(E(o.value.value))return o.modifier?void 0:[l("text-decoration-thickness",`${o.value.value}px`)]}{let f=Z(o,t,["--text-decoration-color","--color"]);if(f)return[l("text-decoration-color",f)]}}}),i("decoration",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--text-decoration-color","--color"],modifiers:Array.from({length:21},(o,f)=>`${f*5}`)},{values:["0","1","2"],valueThemeKeys:["--text-decoration-thickness"]}]),e("animate-none",[["animation","none"]]),n("animate",{themeKeys:["--animate"],handle:o=>[l("animation",o)]});{let o=["var(--tw-blur,)","var(--tw-brightness,)","var(--tw-contrast,)","var(--tw-grayscale,)","var(--tw-hue-rotate,)","var(--tw-invert,)","var(--tw-saturate,)","var(--tw-sepia,)","var(--tw-drop-shadow,)"].join(" "),f=["var(--tw-backdrop-blur,)","var(--tw-backdrop-brightness,)","var(--tw-backdrop-contrast,)","var(--tw-backdrop-grayscale,)","var(--tw-backdrop-hue-rotate,)","var(--tw-backdrop-invert,)","var(--tw-backdrop-opacity,)","var(--tw-backdrop-saturate,)","var(--tw-backdrop-sepia,)"].join(" "),d=()=>D([N("--tw-blur"),N("--tw-brightness"),N("--tw-contrast"),N("--tw-grayscale"),N("--tw-hue-rotate"),N("--tw-invert"),N("--tw-opacity"),N("--tw-saturate"),N("--tw-sepia"),N("--tw-drop-shadow"),N("--tw-drop-shadow-color"),N("--tw-drop-shadow-alpha","100%",""),N("--tw-drop-shadow-size")]),x=()=>D([N("--tw-backdrop-blur"),N("--tw-backdrop-brightness"),N("--tw-backdrop-contrast"),N("--tw-backdrop-grayscale"),N("--tw-backdrop-hue-rotate"),N("--tw-backdrop-invert"),N("--tw-backdrop-opacity"),N("--tw-backdrop-saturate"),N("--tw-backdrop-sepia")]);r.functional("filter",k=>{if(!k.modifier){if(k.value===null)return[d(),l("filter",o)];if(k.value.kind==="arbitrary")return[l("filter",k.value.value)];switch(k.value.value){case"none":return[l("filter","none")]}}}),r.functional("backdrop-filter",k=>{if(!k.modifier){if(k.value===null)return[x(),l("-webkit-backdrop-filter",f),l("backdrop-filter",f)];if(k.value.kind==="arbitrary")return[l("-webkit-backdrop-filter",k.value.value),l("backdrop-filter",k.value.value)];switch(k.value.value){case"none":return[l("-webkit-backdrop-filter","none"),l("backdrop-filter","none")]}}}),n("blur",{themeKeys:["--blur"],handle:k=>[d(),l("--tw-blur",`blur(${k})`),l("filter",o)]}),e("blur-none",[d,["--tw-blur"," "],["filter",o]]),n("backdrop-blur",{themeKeys:["--backdrop-blur","--blur"],handle:k=>[x(),l("--tw-backdrop-blur",`blur(${k})`),l("-webkit-backdrop-filter",f),l("backdrop-filter",f)]}),e("backdrop-blur-none",[x,["--tw-backdrop-blur"," "],["-webkit-backdrop-filter",f],["backdrop-filter",f]]),n("brightness",{themeKeys:["--brightness"],handleBareValue:({value:k})=>E(k)?`${k}%`:null,handle:k=>[d(),l("--tw-brightness",`brightness(${k})`),l("filter",o)]}),n("backdrop-brightness",{themeKeys:["--backdrop-brightness","--brightness"],handleBareValue:({value:k})=>E(k)?`${k}%`:null,handle:k=>[x(),l("--tw-backdrop-brightness",`brightness(${k})`),l("-webkit-backdrop-filter",f),l("backdrop-filter",f)]}),i("brightness",()=>[{values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--brightness"]}]),i("backdrop-brightness",()=>[{values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--backdrop-brightness","--brightness"]}]),n("contrast",{themeKeys:["--contrast"],handleBareValue:({value:k})=>E(k)?`${k}%`:null,handle:k=>[d(),l("--tw-contrast",`contrast(${k})`),l("filter",o)]}),n("backdrop-contrast",{themeKeys:["--backdrop-contrast","--contrast"],handleBareValue:({value:k})=>E(k)?`${k}%`:null,handle:k=>[x(),l("--tw-backdrop-contrast",`contrast(${k})`),l("-webkit-backdrop-filter",f),l("backdrop-filter",f)]}),i("contrast",()=>[{values:["0","50","75","100","125","150","200"],valueThemeKeys:["--contrast"]}]),i("backdrop-contrast",()=>[{values:["0","50","75","100","125","150","200"],valueThemeKeys:["--backdrop-contrast","--contrast"]}]),n("grayscale",{themeKeys:["--grayscale"],handleBareValue:({value:k})=>E(k)?`${k}%`:null,defaultValue:"100%",handle:k=>[d(),l("--tw-grayscale",`grayscale(${k})`),l("filter",o)]}),n("backdrop-grayscale",{themeKeys:["--backdrop-grayscale","--grayscale"],handleBareValue:({value:k})=>E(k)?`${k}%`:null,defaultValue:"100%",handle:k=>[x(),l("--tw-backdrop-grayscale",`grayscale(${k})`),l("-webkit-backdrop-filter",f),l("backdrop-filter",f)]}),i("grayscale",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--grayscale"],hasDefaultValue:!0}]),i("backdrop-grayscale",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--backdrop-grayscale","--grayscale"],hasDefaultValue:!0}]),n("hue-rotate",{supportsNegative:!0,themeKeys:["--hue-rotate"],handleBareValue:({value:k})=>E(k)?`${k}deg`:null,handle:k=>[d(),l("--tw-hue-rotate",`hue-rotate(${k})`),l("filter",o)]}),n("backdrop-hue-rotate",{supportsNegative:!0,themeKeys:["--backdrop-hue-rotate","--hue-rotate"],handleBareValue:({value:k})=>E(k)?`${k}deg`:null,handle:k=>[x(),l("--tw-backdrop-hue-rotate",`hue-rotate(${k})`),l("-webkit-backdrop-filter",f),l("backdrop-filter",f)]}),i("hue-rotate",()=>[{values:["0","15","30","60","90","180"],valueThemeKeys:["--hue-rotate"]}]),i("backdrop-hue-rotate",()=>[{values:["0","15","30","60","90","180"],valueThemeKeys:["--backdrop-hue-rotate","--hue-rotate"]}]),n("invert",{themeKeys:["--invert"],handleBareValue:({value:k})=>E(k)?`${k}%`:null,defaultValue:"100%",handle:k=>[d(),l("--tw-invert",`invert(${k})`),l("filter",o)]}),n("backdrop-invert",{themeKeys:["--backdrop-invert","--invert"],handleBareValue:({value:k})=>E(k)?`${k}%`:null,defaultValue:"100%",handle:k=>[x(),l("--tw-backdrop-invert",`invert(${k})`),l("-webkit-backdrop-filter",f),l("backdrop-filter",f)]}),i("invert",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--invert"],hasDefaultValue:!0}]),i("backdrop-invert",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--backdrop-invert","--invert"],hasDefaultValue:!0}]),n("saturate",{themeKeys:["--saturate"],handleBareValue:({value:k})=>E(k)?`${k}%`:null,handle:k=>[d(),l("--tw-saturate",`saturate(${k})`),l("filter",o)]}),n("backdrop-saturate",{themeKeys:["--backdrop-saturate","--saturate"],handleBareValue:({value:k})=>E(k)?`${k}%`:null,handle:k=>[x(),l("--tw-backdrop-saturate",`saturate(${k})`),l("-webkit-backdrop-filter",f),l("backdrop-filter",f)]}),i("saturate",()=>[{values:["0","50","100","150","200"],valueThemeKeys:["--saturate"]}]),i("backdrop-saturate",()=>[{values:["0","50","100","150","200"],valueThemeKeys:["--backdrop-saturate","--saturate"]}]),n("sepia",{themeKeys:["--sepia"],handleBareValue:({value:k})=>E(k)?`${k}%`:null,defaultValue:"100%",handle:k=>[d(),l("--tw-sepia",`sepia(${k})`),l("filter",o)]}),n("backdrop-sepia",{themeKeys:["--backdrop-sepia","--sepia"],handleBareValue:({value:k})=>E(k)?`${k}%`:null,defaultValue:"100%",handle:k=>[x(),l("--tw-backdrop-sepia",`sepia(${k})`),l("-webkit-backdrop-filter",f),l("backdrop-filter",f)]}),i("sepia",()=>[{values:["0","50","100"],valueThemeKeys:["--sepia"],hasDefaultValue:!0}]),i("backdrop-sepia",()=>[{values:["0","50","100"],valueThemeKeys:["--backdrop-sepia","--sepia"],hasDefaultValue:!0}]),e("drop-shadow-none",[d,["--tw-drop-shadow"," "],["filter",o]]),r.functional("drop-shadow",k=>{let C;if(k.modifier&&(k.modifier.kind==="arbitrary"?C=k.modifier.value:E(k.modifier.value)&&(C=`${k.modifier.value}%`)),!k.value){let O=t.get(["--drop-shadow"]),$=t.resolve(null,["--drop-shadow"]);return O===null||$===null?void 0:[d(),l("--tw-drop-shadow-alpha",C),...it("--tw-drop-shadow-size",O,C,S=>`var(--tw-drop-shadow-color, ${S})`),l("--tw-drop-shadow",K($,",").map(S=>`drop-shadow(${S})`).join(" ")),l("filter",o)]}if(k.value.kind==="arbitrary"){let O=k.value.value;switch(k.value.dataType??q(O,["color"])){case"color":return O=Q(O,k.modifier,t),O===null?void 0:[d(),l("--tw-drop-shadow-color",G(O,"var(--tw-drop-shadow-alpha)")),l("--tw-drop-shadow","var(--tw-drop-shadow-size)")];default:return k.modifier&&!C?void 0:[d(),l("--tw-drop-shadow-alpha",C),...it("--tw-drop-shadow-size",O,C,S=>`var(--tw-drop-shadow-color, ${S})`),l("--tw-drop-shadow","var(--tw-drop-shadow-size)"),l("filter",o)]}}{let O=t.get([`--drop-shadow-${k.value.value}`]),$=t.resolve(k.value.value,["--drop-shadow"]);if(O&&$)return k.modifier&&!C?void 0:C?[d(),l("--tw-drop-shadow-alpha",C),...it("--tw-drop-shadow-size",O,C,S=>`var(--tw-drop-shadow-color, ${S})`),l("--tw-drop-shadow","var(--tw-drop-shadow-size)"),l("filter",o)]:[d(),l("--tw-drop-shadow-alpha",C),...it("--tw-drop-shadow-size",O,C,S=>`var(--tw-drop-shadow-color, ${S})`),l("--tw-drop-shadow",K($,",").map(S=>`drop-shadow(${S})`).join(" ")),l("filter",o)]}{let O=Z(k,t,["--drop-shadow-color","--color"]);if(O)return O==="inherit"?[d(),l("--tw-drop-shadow-color","inherit"),l("--tw-drop-shadow","var(--tw-drop-shadow-size)")]:[d(),l("--tw-drop-shadow-color",G(O,"var(--tw-drop-shadow-alpha)")),l("--tw-drop-shadow","var(--tw-drop-shadow-size)")]}}),i("drop-shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--drop-shadow-color","--color"],modifiers:Array.from({length:21},(k,C)=>`${C*5}`)},{valueThemeKeys:["--drop-shadow"]}]),n("backdrop-opacity",{themeKeys:["--backdrop-opacity","--opacity"],handleBareValue:({value:k})=>rt(k)?`${k}%`:null,handle:k=>[x(),l("--tw-backdrop-opacity",`opacity(${k})`),l("-webkit-backdrop-filter",f),l("backdrop-filter",f)]}),i("backdrop-opacity",()=>[{values:Array.from({length:21},(k,C)=>`${C*5}`),valueThemeKeys:["--backdrop-opacity","--opacity"]}])}{let o=`var(--tw-ease, ${t.resolve(null,["--default-transition-timing-function"])??"ease"})`,f=`var(--tw-duration, ${t.resolve(null,["--default-transition-duration"])??"0s"})`;e("transition-none",[["transition-property","none"]]),e("transition-all",[["transition-property","all"],["transition-timing-function",o],["transition-duration",f]]),e("transition-colors",[["transition-property","color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to"],["transition-timing-function",o],["transition-duration",f]]),e("transition-opacity",[["transition-property","opacity"],["transition-timing-function",o],["transition-duration",f]]),e("transition-shadow",[["transition-property","box-shadow"],["transition-timing-function",o],["transition-duration",f]]),e("transition-transform",[["transition-property","transform, translate, scale, rotate"],["transition-timing-function",o],["transition-duration",f]]),n("transition",{defaultValue:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, visibility, content-visibility, overlay, pointer-events",themeKeys:["--transition-property"],handle:d=>[l("transition-property",d),l("transition-timing-function",o),l("transition-duration",f)]}),e("transition-discrete",[["transition-behavior","allow-discrete"]]),e("transition-normal",[["transition-behavior","normal"]]),n("delay",{handleBareValue:({value:d})=>E(d)?`${d}ms`:null,themeKeys:["--transition-delay"],handle:d=>[l("transition-delay",d)]});{let d=()=>D([N("--tw-duration")]);e("duration-initial",[d,["--tw-duration","initial"]]),r.functional("duration",x=>{if(x.modifier||!x.value)return;let k=null;if(x.value.kind==="arbitrary"?k=x.value.value:(k=t.resolve(x.value.fraction??x.value.value,["--transition-duration"]),k===null&&E(x.value.value)&&(k=`${x.value.value}ms`)),k!==null)return[d(),l("--tw-duration",k),l("transition-duration",k)]})}i("delay",()=>[{values:["75","100","150","200","300","500","700","1000"],valueThemeKeys:["--transition-delay"]}]),i("duration",()=>[{values:["75","100","150","200","300","500","700","1000"],valueThemeKeys:["--transition-duration"]}])}{let o=()=>D([N("--tw-ease")]);e("ease-initial",[o,["--tw-ease","initial"]]),e("ease-linear",[o,["--tw-ease","linear"],["transition-timing-function","linear"]]),n("ease",{themeKeys:["--ease"],handle:f=>[o(),l("--tw-ease",f),l("transition-timing-function",f)]})}e("will-change-auto",[["will-change","auto"]]),e("will-change-scroll",[["will-change","scroll-position"]]),e("will-change-contents",[["will-change","contents"]]),e("will-change-transform",[["will-change","transform"]]),n("will-change",{themeKeys:[],handle:o=>[l("will-change",o)]}),e("content-none",[["--tw-content","none"],["content","none"]]),n("content",{themeKeys:[],handle:o=>[D([N("--tw-content",'""')]),l("--tw-content",o),l("content","var(--tw-content)")]});{let o="var(--tw-contain-size,) var(--tw-contain-layout,) var(--tw-contain-paint,) var(--tw-contain-style,)",f=()=>D([N("--tw-contain-size"),N("--tw-contain-layout"),N("--tw-contain-paint"),N("--tw-contain-style")]);e("contain-none",[["contain","none"]]),e("contain-content",[["contain","content"]]),e("contain-strict",[["contain","strict"]]),e("contain-size",[f,["--tw-contain-size","size"],["contain",o]]),e("contain-inline-size",[f,["--tw-contain-size","inline-size"],["contain",o]]),e("contain-layout",[f,["--tw-contain-layout","layout"],["contain",o]]),e("contain-paint",[f,["--tw-contain-paint","paint"],["contain",o]]),e("contain-style",[f,["--tw-contain-style","style"],["contain",o]]),n("contain",{themeKeys:[],handle:d=>[l("contain",d)]})}e("forced-color-adjust-none",[["forced-color-adjust","none"]]),e("forced-color-adjust-auto",[["forced-color-adjust","auto"]]),e("leading-none",[()=>D([N("--tw-leading")]),["--tw-leading","1"],["line-height","1"]]),a("leading",["--leading","--spacing"],o=>[D([N("--tw-leading")]),l("--tw-leading",o),l("line-height",o)]),n("tracking",{supportsNegative:!0,themeKeys:["--tracking"],handle:o=>[D([N("--tw-tracking")]),l("--tw-tracking",o),l("letter-spacing",o)]}),e("antialiased",[["-webkit-font-smoothing","antialiased"],["-moz-osx-font-smoothing","grayscale"]]),e("subpixel-antialiased",[["-webkit-font-smoothing","auto"],["-moz-osx-font-smoothing","auto"]]);{let o="var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)",f=()=>D([N("--tw-ordinal"),N("--tw-slashed-zero"),N("--tw-numeric-figure"),N("--tw-numeric-spacing"),N("--tw-numeric-fraction")]);e("normal-nums",[["font-variant-numeric","normal"]]),e("ordinal",[f,["--tw-ordinal","ordinal"],["font-variant-numeric",o]]),e("slashed-zero",[f,["--tw-slashed-zero","slashed-zero"],["font-variant-numeric",o]]),e("lining-nums",[f,["--tw-numeric-figure","lining-nums"],["font-variant-numeric",o]]),e("oldstyle-nums",[f,["--tw-numeric-figure","oldstyle-nums"],["font-variant-numeric",o]]),e("proportional-nums",[f,["--tw-numeric-spacing","proportional-nums"],["font-variant-numeric",o]]),e("tabular-nums",[f,["--tw-numeric-spacing","tabular-nums"],["font-variant-numeric",o]]),e("diagonal-fractions",[f,["--tw-numeric-fraction","diagonal-fractions"],["font-variant-numeric",o]]),e("stacked-fractions",[f,["--tw-numeric-fraction","stacked-fractions"],["font-variant-numeric",o]])}{let o=()=>D([N("--tw-outline-style","solid")]);r.static("outline-hidden",()=>[l("--tw-outline-style","none"),l("outline-style","none"),z("@media","(forced-colors: active)",[l("outline","2px solid transparent"),l("outline-offset","2px")])]),e("outline-none",[["--tw-outline-style","none"],["outline-style","none"]]),e("outline-solid",[["--tw-outline-style","solid"],["outline-style","solid"]]),e("outline-dashed",[["--tw-outline-style","dashed"],["outline-style","dashed"]]),e("outline-dotted",[["--tw-outline-style","dotted"],["outline-style","dotted"]]),e("outline-double",[["--tw-outline-style","double"],["outline-style","double"]]),r.functional("outline",f=>{if(f.value===null){if(f.modifier)return;let d=t.get(["--default-outline-width"])??"1px";return[o(),l("outline-style","var(--tw-outline-style)"),l("outline-width",d)]}if(f.value.kind==="arbitrary"){let d=f.value.value;switch(f.value.dataType??q(d,["color","length","number","percentage"])){case"length":case"number":case"percentage":return f.modifier?void 0:[o(),l("outline-style","var(--tw-outline-style)"),l("outline-width",d)];default:return d=Q(d,f.modifier,t),d===null?void 0:[l("outline-color",d)]}}{let d=Z(f,t,["--outline-color","--color"]);if(d)return[l("outline-color",d)]}{if(f.modifier)return;let d=t.resolve(f.value.value,["--outline-width"]);if(d)return[o(),l("outline-style","var(--tw-outline-style)"),l("outline-width",d)];if(E(f.value.value))return[o(),l("outline-style","var(--tw-outline-style)"),l("outline-width",`${f.value.value}px`)]}}),i("outline",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--outline-color","--color"],modifiers:Array.from({length:21},(f,d)=>`${d*5}`),hasDefaultValue:!0},{values:["0","1","2","4","8"],valueThemeKeys:["--outline-width"]}]),n("outline-offset",{supportsNegative:!0,themeKeys:["--outline-offset"],handleBareValue:({value:f})=>E(f)?`${f}px`:null,handle:f=>[l("outline-offset",f)]}),i("outline-offset",()=>[{supportsNegative:!0,values:["0","1","2","4","8"],valueThemeKeys:["--outline-offset"]}])}n("opacity",{themeKeys:["--opacity"],handleBareValue:({value:o})=>rt(o)?`${o}%`:null,handle:o=>[l("opacity",o)]}),i("opacity",()=>[{values:Array.from({length:21},(o,f)=>`${f*5}`),valueThemeKeys:["--opacity"]}]),e("underline-offset-auto",[["text-underline-offset","auto"]]),n("underline-offset",{supportsNegative:!0,themeKeys:["--text-underline-offset"],handleBareValue:({value:o})=>E(o)?`${o}px`:null,handle:o=>[l("text-underline-offset",o)]}),i("underline-offset",()=>[{supportsNegative:!0,values:["0","1","2","4","8"],valueThemeKeys:["--text-underline-offset"]}]),r.functional("text",o=>{if(o.value){if(o.value.kind==="arbitrary"){let f=o.value.value;switch(o.value.dataType??q(f,["color","length","percentage","absolute-size","relative-size"])){case"size":case"length":case"percentage":case"absolute-size":case"relative-size":{if(o.modifier){let x=o.modifier.kind==="arbitrary"?o.modifier.value:t.resolve(o.modifier.value,["--leading"]);if(!x&&ye(o.modifier.value)){let k=t.resolve(null,["--spacing"]);if(!k)return null;x=`calc(${k} * ${o.modifier.value})`}return!x&&o.modifier.value==="none"&&(x="1"),x?[l("font-size",f),l("line-height",x)]:null}return[l("font-size",f)]}default:return f=Q(f,o.modifier,t),f===null?void 0:[l("color",f)]}}{let f=Z(o,t,["--text-color","--color"]);if(f)return[l("color",f)]}{let f=t.resolveWith(o.value.value,["--text"],["--line-height","--letter-spacing","--font-weight"]);if(f){let[d,x={}]=Array.isArray(f)?f:[f];if(o.modifier){let k=o.modifier.kind==="arbitrary"?o.modifier.value:t.resolve(o.modifier.value,["--leading"]);if(!k&&ye(o.modifier.value)){let O=t.resolve(null,["--spacing"]);if(!O)return null;k=`calc(${O} * ${o.modifier.value})`}if(!k&&o.modifier.value==="none"&&(k="1"),!k)return null;let C=[l("font-size",d)];return k&&C.push(l("line-height",k)),C}return typeof x=="string"?[l("font-size",d),l("line-height",x)]:[l("font-size",d),l("line-height",x["--line-height"]?`var(--tw-leading, ${x["--line-height"]})`:void 0),l("letter-spacing",x["--letter-spacing"]?`var(--tw-tracking, ${x["--letter-spacing"]})`:void 0),l("font-weight",x["--font-weight"]?`var(--tw-font-weight, ${x["--font-weight"]})`:void 0)]}}}}),i("text",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--text-color","--color"],modifiers:Array.from({length:21},(o,f)=>`${f*5}`)},{values:[],valueThemeKeys:["--text"],modifiers:[],modifierThemeKeys:["--leading"]}]);let P=()=>D([N("--tw-text-shadow-color"),N("--tw-text-shadow-alpha","100%","")]);e("text-shadow-initial",[P,["--tw-text-shadow-color","initial"]]),r.functional("text-shadow",o=>{let f;if(o.modifier&&(o.modifier.kind==="arbitrary"?f=o.modifier.value:E(o.modifier.value)&&(f=`${o.modifier.value}%`)),!o.value){let d=t.get(["--text-shadow"]);return d===null?void 0:[P(),l("--tw-text-shadow-alpha",f),...ce("text-shadow",d,f,x=>`var(--tw-text-shadow-color, ${x})`)]}if(o.value.kind==="arbitrary"){let d=o.value.value;switch(o.value.dataType??q(d,["color"])){case"color":return d=Q(d,o.modifier,t),d===null?void 0:[P(),l("--tw-text-shadow-color",G(d,"var(--tw-text-shadow-alpha)"))];default:return[P(),l("--tw-text-shadow-alpha",f),...ce("text-shadow",d,f,k=>`var(--tw-text-shadow-color, ${k})`)]}}switch(o.value.value){case"none":return o.modifier?void 0:[P(),l("text-shadow","none")];case"inherit":return o.modifier?void 0:[P(),l("--tw-text-shadow-color","inherit")]}{let d=t.get([`--text-shadow-${o.value.value}`]);if(d)return[P(),l("--tw-text-shadow-alpha",f),...ce("text-shadow",d,f,x=>`var(--tw-text-shadow-color, ${x})`)]}{let d=Z(o,t,["--text-shadow-color","--color"]);if(d)return[P(),l("--tw-text-shadow-color",G(d,"var(--tw-text-shadow-alpha)"))]}}),i("text-shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--text-shadow-color","--color"],modifiers:Array.from({length:21},(o,f)=>`${f*5}`)},{values:["none"]},{valueThemeKeys:["--text-shadow"],modifiers:Array.from({length:21},(o,f)=>`${f*5}`),hasDefaultValue:t.get(["--text-shadow"])!==null}]);{let k=function($){return`var(--tw-ring-inset,) 0 0 0 calc(${$} + var(--tw-ring-offset-width)) var(--tw-ring-color, ${x})`},C=function($){return`inset 0 0 0 ${$} var(--tw-inset-ring-color, currentcolor)`};var X=k,se=C;let o=["var(--tw-inset-shadow)","var(--tw-inset-ring-shadow)","var(--tw-ring-offset-shadow)","var(--tw-ring-shadow)","var(--tw-shadow)"].join(", "),f="0 0 #0000",d=()=>D([N("--tw-shadow",f),N("--tw-shadow-color"),N("--tw-shadow-alpha","100%",""),N("--tw-inset-shadow",f),N("--tw-inset-shadow-color"),N("--tw-inset-shadow-alpha","100%",""),N("--tw-ring-color"),N("--tw-ring-shadow",f),N("--tw-inset-ring-color"),N("--tw-inset-ring-shadow",f),N("--tw-ring-inset"),N("--tw-ring-offset-width","0px",""),N("--tw-ring-offset-color","#fff"),N("--tw-ring-offset-shadow",f)]);e("shadow-initial",[d,["--tw-shadow-color","initial"]]),r.functional("shadow",$=>{let S;if($.modifier&&($.modifier.kind==="arbitrary"?S=$.modifier.value:E($.modifier.value)&&(S=`${$.modifier.value}%`)),!$.value){let U=t.get(["--shadow"]);return U===null?void 0:[d(),l("--tw-shadow-alpha",S),...ce("--tw-shadow",U,S,oe=>`var(--tw-shadow-color, ${oe})`),l("box-shadow",o)]}if($.value.kind==="arbitrary"){let U=$.value.value;switch($.value.dataType??q(U,["color"])){case"color":return U=Q(U,$.modifier,t),U===null?void 0:[d(),l("--tw-shadow-color",G(U,"var(--tw-shadow-alpha)"))];default:return[d(),l("--tw-shadow-alpha",S),...ce("--tw-shadow",U,S,gt=>`var(--tw-shadow-color, ${gt})`),l("box-shadow",o)]}}switch($.value.value){case"none":return $.modifier?void 0:[d(),l("--tw-shadow",f),l("box-shadow",o)];case"inherit":return $.modifier?void 0:[d(),l("--tw-shadow-color","inherit")]}{let U=t.get([`--shadow-${$.value.value}`]);if(U)return[d(),l("--tw-shadow-alpha",S),...ce("--tw-shadow",U,S,oe=>`var(--tw-shadow-color, ${oe})`),l("box-shadow",o)]}{let U=Z($,t,["--box-shadow-color","--color"]);if(U)return[d(),l("--tw-shadow-color",G(U,"var(--tw-shadow-alpha)"))]}}),i("shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--box-shadow-color","--color"],modifiers:Array.from({length:21},($,S)=>`${S*5}`)},{values:["none"]},{valueThemeKeys:["--shadow"],modifiers:Array.from({length:21},($,S)=>`${S*5}`),hasDefaultValue:t.get(["--shadow"])!==null}]),e("inset-shadow-initial",[d,["--tw-inset-shadow-color","initial"]]),r.functional("inset-shadow",$=>{let S;if($.modifier&&($.modifier.kind==="arbitrary"?S=$.modifier.value:E($.modifier.value)&&(S=`${$.modifier.value}%`)),!$.value){let U=t.get(["--inset-shadow"]);return U===null?void 0:[d(),l("--tw-inset-shadow-alpha",S),...ce("--tw-inset-shadow",U,S,oe=>`var(--tw-inset-shadow-color, ${oe})`),l("box-shadow",o)]}if($.value.kind==="arbitrary"){let U=$.value.value;switch($.value.dataType??q(U,["color"])){case"color":return U=Q(U,$.modifier,t),U===null?void 0:[d(),l("--tw-inset-shadow-color",G(U,"var(--tw-inset-shadow-alpha)"))];default:return[d(),l("--tw-inset-shadow-alpha",S),...ce("--tw-inset-shadow",U,S,gt=>`var(--tw-inset-shadow-color, ${gt})`,"inset "),l("box-shadow",o)]}}switch($.value.value){case"none":return $.modifier?void 0:[d(),l("--tw-inset-shadow",f),l("box-shadow",o)];case"inherit":return $.modifier?void 0:[d(),l("--tw-inset-shadow-color","inherit")]}{let U=t.get([`--inset-shadow-${$.value.value}`]);if(U)return[d(),l("--tw-inset-shadow-alpha",S),...ce("--tw-inset-shadow",U,S,oe=>`var(--tw-inset-shadow-color, ${oe})`),l("box-shadow",o)]}{let U=Z($,t,["--box-shadow-color","--color"]);if(U)return[d(),l("--tw-inset-shadow-color",G(U,"var(--tw-inset-shadow-alpha)"))]}}),i("inset-shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--box-shadow-color","--color"],modifiers:Array.from({length:21},($,S)=>`${S*5}`)},{values:["none"]},{valueThemeKeys:["--inset-shadow"],modifiers:Array.from({length:21},($,S)=>`${S*5}`),hasDefaultValue:t.get(["--inset-shadow"])!==null}]),e("ring-inset",[d,["--tw-ring-inset","inset"]]);let x=t.get(["--default-ring-color"])??"currentcolor";r.functional("ring",$=>{if(!$.value){if($.modifier)return;let S=t.get(["--default-ring-width"])??"1px";return[d(),l("--tw-ring-shadow",k(S)),l("box-shadow",o)]}if($.value.kind==="arbitrary"){let S=$.value.value;switch($.value.dataType??q(S,["color","length"])){case"length":return $.modifier?void 0:[d(),l("--tw-ring-shadow",k(S)),l("box-shadow",o)];default:return S=Q(S,$.modifier,t),S===null?void 0:[l("--tw-ring-color",S)]}}{let S=Z($,t,["--ring-color","--color"]);if(S)return[l("--tw-ring-color",S)]}{if($.modifier)return;let S=t.resolve($.value.value,["--ring-width"]);if(S===null&&E($.value.value)&&(S=`${$.value.value}px`),S)return[d(),l("--tw-ring-shadow",k(S)),l("box-shadow",o)]}}),i("ring",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--ring-color","--color"],modifiers:Array.from({length:21},($,S)=>`${S*5}`)},{values:["0","1","2","4","8"],valueThemeKeys:["--ring-width"],hasDefaultValue:!0}]),r.functional("inset-ring",$=>{if(!$.value)return $.modifier?void 0:[d(),l("--tw-inset-ring-shadow",C("1px")),l("box-shadow",o)];if($.value.kind==="arbitrary"){let S=$.value.value;switch($.value.dataType??q(S,["color","length"])){case"length":return $.modifier?void 0:[d(),l("--tw-inset-ring-shadow",C(S)),l("box-shadow",o)];default:return S=Q(S,$.modifier,t),S===null?void 0:[l("--tw-inset-ring-color",S)]}}{let S=Z($,t,["--ring-color","--color"]);if(S)return[l("--tw-inset-ring-color",S)]}{if($.modifier)return;let S=t.resolve($.value.value,["--ring-width"]);if(S===null&&E($.value.value)&&(S=`${$.value.value}px`),S)return[d(),l("--tw-inset-ring-shadow",C(S)),l("box-shadow",o)]}}),i("inset-ring",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--ring-color","--color"],modifiers:Array.from({length:21},($,S)=>`${S*5}`)},{values:["0","1","2","4","8"],valueThemeKeys:["--ring-width"],hasDefaultValue:!0}]);let O="var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)";r.functional("ring-offset",$=>{if($.value){if($.value.kind==="arbitrary"){let S=$.value.value;switch($.value.dataType??q(S,["color","length"])){case"length":return $.modifier?void 0:[l("--tw-ring-offset-width",S),l("--tw-ring-offset-shadow",O)];default:return S=Q(S,$.modifier,t),S===null?void 0:[l("--tw-ring-offset-color",S)]}}{let S=t.resolve($.value.value,["--ring-offset-width"]);if(S)return $.modifier?void 0:[l("--tw-ring-offset-width",S),l("--tw-ring-offset-shadow",O)];if(E($.value.value))return $.modifier?void 0:[l("--tw-ring-offset-width",`${$.value.value}px`),l("--tw-ring-offset-shadow",O)]}{let S=Z($,t,["--ring-offset-color","--color"]);if(S)return[l("--tw-ring-offset-color",S)]}}})}return i("ring-offset",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--ring-offset-color","--color"],modifiers:Array.from({length:21},(o,f)=>`${f*5}`)},{values:["0","1","2","4","8"],valueThemeKeys:["--ring-offset-width"]}]),r.functional("@container",o=>{let f=null;if(o.value===null?f="inline-size":o.value.kind==="arbitrary"?f=o.value.value:o.value.kind==="named"&&o.value.value==="normal"&&(f="normal"),f!==null)return o.modifier?[l("container-type",f),l("container-name",o.modifier.value)]:[l("container-type",f)]}),i("@container",()=>[{values:["normal"],valueThemeKeys:[],hasDefaultValue:!0}]),r}var Tt=["number","integer","ratio","percentage"];function kr(t){let r=t.params;return on.test(r)?i=>{let e={"--value":{usedSpacingInteger:!1,usedSpacingNumber:!1,themeKeys:new Set,literals:new Set},"--modifier":{usedSpacingInteger:!1,usedSpacingNumber:!1,themeKeys:new Set,literals:new Set}};I(t.nodes,n=>{if(n.kind!=="declaration"||!n.value||!n.value.includes("--value(")&&!n.value.includes("--modifier("))return;let s=H(n.value);te(s,a=>{if(a.kind!=="function")return;if(a.value==="--spacing"&&!(e["--modifier"].usedSpacingNumber&&e["--value"].usedSpacingNumber))return te(a.nodes,u=>{if(u.kind!=="function"||u.value!=="--value"&&u.value!=="--modifier")return;let c=u.value;for(let m of u.nodes)if(m.kind==="word"){if(m.value==="integer")e[c].usedSpacingInteger||=!0;else if(m.value==="number"&&(e[c].usedSpacingNumber||=!0,e["--modifier"].usedSpacingNumber&&e["--value"].usedSpacingNumber))return 2}}),0;if(a.value!=="--value"&&a.value!=="--modifier")return;let p=K(J(a.nodes),",");for(let[u,c]of p.entries())c=c.replace(/\\\*/g,"*"),c=c.replace(/--(.*?)\s--(.*?)/g,"--$1-*--$2"),c=c.replace(/\s+/g,""),c=c.replace(/(-\*){2,}/g,"-*"),c[0]==="-"&&c[1]==="-"&&!c.includes("-*")&&(c+="-*"),p[u]=c;a.nodes=H(p.join(","));for(let u of a.nodes)if(u.kind==="word"&&(u.value[0]==='"'||u.value[0]==="'")&&u.value[0]===u.value[u.value.length-1]){let c=u.value.slice(1,-1);e[a.value].literals.add(c)}else if(u.kind==="word"&&u.value[0]==="-"&&u.value[1]==="-"){let c=u.value.replace(/-\*.*$/g,"");e[a.value].themeKeys.add(c)}else if(u.kind==="word"&&!(u.value[0]==="["&&u.value[u.value.length-1]==="]")&&!Tt.includes(u.value)){console.warn(`Unsupported bare value data type: "${u.value}". +Only valid data types are: ${Tt.map(A=>`"${A}"`).join(", ")}. +`);let c=u.value,m=structuredClone(a),g="\xB6";te(m.nodes,(A,{replaceWith:b})=>{A.kind==="word"&&A.value===c&&b({kind:"word",value:g})});let h="^".repeat(J([u]).length),w=J([m]).indexOf(g),v=["```css",J([a])," ".repeat(w)+h,"```"].join(` +`);console.warn(v)}}),n.value=J(s)}),i.utilities.functional(r.slice(0,-2),n=>{let s=structuredClone(t),a=n.value,p=n.modifier;if(a===null)return;let u=!1,c=!1,m=!1,g=!1,h=new Map,w=!1;if(I([s],(v,{parent:A,replaceWith:b})=>{if(A?.kind!=="rule"&&A?.kind!=="at-rule"||v.kind!=="declaration"||!v.value)return;let y=H(v.value);(te(y,(T,{replaceWith:R})=>{if(T.kind==="function"){if(T.value==="--value"){u=!0;let _=gr(a,T,i);return _?(c=!0,_.ratio?w=!0:h.set(v,A),R(_.nodes),1):(u||=!1,b([]),2)}else if(T.value==="--modifier"){if(p===null)return b([]),2;m=!0;let _=gr(p,T,i);return _?(g=!0,R(_.nodes),1):(m||=!1,b([]),2)}}})??0)===0&&(v.value=J(y))}),u&&!c||m&&!g||w&&g||p&&!w&&!g)return null;if(w)for(let[v,A]of h){let b=A.nodes.indexOf(v);b!==-1&&A.nodes.splice(b,1)}return s.nodes}),i.utilities.suggest(r.slice(0,-2),()=>{let n=[],s=[];for(let[a,{literals:p,usedSpacingNumber:u,usedSpacingInteger:c,themeKeys:m}]of[[n,e["--value"]],[s,e["--modifier"]]]){for(let g of p)a.push(g);if(u)a.push(...nt);else if(c)for(let g of nt)E(g)&&a.push(g);for(let g of i.theme.keysInNamespaces(m))a.push(g.replace(vr,(h,w,v)=>`${w}.${v}`))}return[{values:n,modifiers:s}]})}:nn.test(r)?i=>{i.utilities.static(r,()=>structuredClone(t.nodes))}:null}function gr(t,r,i){for(let e of r.nodes){if(t.kind==="named"&&e.kind==="word"&&(e.value[0]==="'"||e.value[0]==='"')&&e.value[e.value.length-1]===e.value[0]&&e.value.slice(1,-1)===t.value)return{nodes:H(t.value)};if(t.kind==="named"&&e.kind==="word"&&e.value[0]==="-"&&e.value[1]==="-"){let n=e.value;if(n.endsWith("-*")){n=n.slice(0,-2);let s=i.theme.resolve(t.value,[n]);if(s)return{nodes:H(s)}}else{let s=n.split("-*");if(s.length<=1)continue;let a=[s.shift()],p=i.theme.resolveWith(t.value,a,s);if(p){let[,u={}]=p;{let c=u[s.pop()];if(c)return{nodes:H(c)}}}}}else if(t.kind==="named"&&e.kind==="word"){if(!Tt.includes(e.value))continue;let n=e.value==="ratio"&&"fraction"in t?t.fraction:t.value;if(!n)continue;let s=q(n,[e.value]);if(s===null)continue;if(s==="ratio"){let[a,p]=K(n,"/");if(!E(a)||!E(p))continue}else{if(s==="number"&&!ye(n))continue;if(s==="percentage"&&!E(n.slice(0,-1)))continue}return{nodes:H(n),ratio:s==="ratio"}}else if(t.kind==="arbitrary"&&e.kind==="word"&&e.value[0]==="["&&e.value[e.value.length-1]==="]"){let n=e.value.slice(1,-1);if(n==="*")return{nodes:H(t.value)};if("dataType"in t&&t.dataType&&t.dataType!==n)continue;if("dataType"in t&&t.dataType)return{nodes:H(t.value)};if(q(t.value,[n])!==null)return{nodes:H(t.value)}}}}function ce(t,r,i,e,n=""){let s=!1,a=Ke(r,u=>i==null?e(u):u.startsWith("current")?e(G(u,i)):((u.startsWith("var(")||i.startsWith("var("))&&(s=!0),e(hr(u,i))));function p(u){return n?K(u,",").map(c=>n+c).join(","):u}return s?[l(t,p(Ke(r,e))),W("@supports (color: lab(from red l a b))",[l(t,p(a))])]:[l(t,p(a))]}function it(t,r,i,e,n=""){let s=!1,a=K(r,",").map(p=>Ke(p,u=>i==null?e(u):u.startsWith("current")?e(G(u,i)):((u.startsWith("var(")||i.startsWith("var("))&&(s=!0),e(hr(u,i))))).map(p=>`drop-shadow(${p})`).join(" ");return s?[l(t,n+K(r,",").map(p=>`drop-shadow(${Ke(p,e)})`).join(" ")),W("@supports (color: lab(from red l a b))",[l(t,n+a)])]:[l(t,n+a)]}var Et={"--alpha":ln,"--spacing":an,"--theme":sn,theme:un};function ln(t,r,i,...e){let[n,s]=K(i,"/").map(a=>a.trim());if(!n||!s)throw new Error(`The --alpha(\u2026) function requires a color and an alpha value, e.g.: \`--alpha(${n||"var(--my-color)"} / ${s||"50%"})\``);if(e.length>0)throw new Error(`The --alpha(\u2026) function only accepts one argument, e.g.: \`--alpha(${n||"var(--my-color)"} / ${s||"50%"})\``);return G(n,s)}function an(t,r,i,...e){if(!i)throw new Error("The --spacing(\u2026) function requires an argument, but received none.");if(e.length>0)throw new Error(`The --spacing(\u2026) function only accepts a single argument, but received ${e.length+1}.`);let n=t.theme.resolve(null,["--spacing"]);if(!n)throw new Error("The --spacing(\u2026) function requires that the `--spacing` theme variable exists, but it was not found.");return`calc(${n} * ${i})`}function sn(t,r,i,...e){if(!i.startsWith("--"))throw new Error("The --theme(\u2026) function can only be used with CSS variables from your theme.");let n=!1;i.endsWith(" inline")&&(n=!0,i=i.slice(0,-7)),r.kind==="at-rule"&&(n=!0);let s=t.resolveThemeValue(i,n);if(!s){if(e.length>0)return e.join(", ");throw new Error(`Could not resolve value for theme function: \`theme(${i})\`. Consider checking if the variable name is correct or provide a fallback value to silence this error.`)}if(e.length===0)return s;let a=e.join(", ");if(a==="initial")return s;if(s==="initial")return a;if(s.startsWith("var(")||s.startsWith("theme(")||s.startsWith("--theme(")){let p=H(s);return fn(p,a),J(p)}return s}function un(t,r,i,...e){i=cn(i);let n=t.resolveThemeValue(i);if(!n&&e.length>0)return e.join(", ");if(!n)throw new Error(`Could not resolve value for theme function: \`theme(${i})\`. Consider checking if the path is correct or provide a fallback value to silence this error.`);return n}var br=new RegExp(Object.keys(Et).map(t=>`${t}\\(`).join("|"));function $e(t,r){let i=0;return I(t,e=>{if(e.kind==="declaration"&&e.value&&br.test(e.value)){i|=8,e.value=yr(e.value,e,r);return}e.kind==="at-rule"&&(e.name==="@media"||e.name==="@custom-media"||e.name==="@container"||e.name==="@supports")&&br.test(e.params)&&(i|=8,e.params=yr(e.params,e,r))}),i}function yr(t,r,i){let e=H(t);return te(e,(n,{replaceWith:s})=>{if(n.kind==="function"&&n.value in Et){let a=K(J(n.nodes).trim(),",").map(u=>u.trim()),p=Et[n.value](i,r,...a);return s(H(p))}}),J(e)}function cn(t){if(t[0]!=="'"&&t[0]!=='"')return t;let r="",i=t[0];for(let e=1;e{if(i.kind==="function"&&!(i.value!=="var"&&i.value!=="theme"&&i.value!=="--theme"))if(i.nodes.length===1)i.nodes.push({kind:"word",value:`, ${r}`});else{let e=i.nodes[i.nodes.length-1];e.kind==="word"&&e.value==="initial"&&(e.value=r)}})}function ot(t,r){let i=t.length,e=r.length,n=i=48&&a<=57&&p>=48&&p<=57){let u=s,c=s+1,m=s,g=s+1;for(a=t.charCodeAt(c);a>=48&&a<=57;)a=t.charCodeAt(++c);for(p=r.charCodeAt(g);p>=48&&p<=57;)p=r.charCodeAt(++g);let h=t.slice(u,c),w=r.slice(m,g),v=Number(h)-Number(w);if(v)return v;if(hw)return 1;continue}if(a!==p)return a-p}return t.length-r.length}var pn=/^\d+\/\d+$/;function xr(t){let r=[];for(let e of t.utilities.keys("static"))r.push({name:e,utility:e,fraction:!1,modifiers:[]});for(let e of t.utilities.keys("functional")){let n=t.utilities.getCompletions(e);for(let s of n)for(let a of s.values){let p=a!==null&&pn.test(a),u=a===null?e:`${e}-${a}`;r.push({name:u,utility:e,fraction:p,modifiers:s.modifiers}),s.supportsNegative&&r.push({name:`-${u}`,utility:`-${e}`,fraction:p,modifiers:s.modifiers})}}return r.length===0?[]:(r.sort((e,n)=>ot(e.name,n.name)),dn(r))}function dn(t){let r=[],i=null,e=new Map,n=new B(()=>[]);for(let a of t){let{utility:p,fraction:u}=a;i||(i={utility:p,items:[]},e.set(p,i)),p!==i.utility&&(r.push(i),i={utility:p,items:[]},e.set(p,i)),u?n.get(p).push(a):i.items.push(a)}i&&r[r.length-1]!==i&&r.push(i);for(let[a,p]of n){let u=e.get(a);u&&u.items.push(...p)}let s=[];for(let a of r)for(let p of a.items)s.push([p.name,{modifiers:p.modifiers}]);return s}function Ar(t){let r=[];for(let[e,n]of t.variants.entries()){let p=function({value:u,modifier:c}={}){let m=e;u&&(m+=s?`-${u}`:u),c&&(m+=`/${c}`);let g=t.parseVariant(m);if(!g)return[];let h=L(".__placeholder__",[]);if(Se(h,g,t.variants)===null)return[];let w=[];return Je(h.nodes,(v,{path:A})=>{if(v.kind!=="rule"&&v.kind!=="at-rule"||v.nodes.length>0)return;A.sort((V,T)=>{let R=V.kind==="at-rule",_=T.kind==="at-rule";return R&&!_?-1:!R&&_?1:0});let b=A.flatMap(V=>V.kind==="rule"?V.selector==="&"?[]:[V.selector]:V.kind==="at-rule"?[`${V.name} ${V.params}`]:[]),y="";for(let V=b.length-1;V>=0;V--)y=y===""?b[V]:`${b[V]} { ${y} }`;w.push(y)}),w};var i=p;if(n.kind==="arbitrary")continue;let s=e!=="@",a=t.variants.getCompletions(e);switch(n.kind){case"static":{r.push({name:e,values:a,isArbitrary:!1,hasDash:s,selectors:p});break}case"functional":{r.push({name:e,values:a,isArbitrary:!0,hasDash:s,selectors:p});break}case"compound":{r.push({name:e,values:a,isArbitrary:!0,hasDash:s,selectors:p});break}}}return r}function Cr(t,r){let{astNodes:i,nodeSorting:e}=me(Array.from(r),t),n=new Map(r.map(a=>[a,null])),s=0n;for(let a of i){let p=e.get(a)?.candidate;p&&n.set(p,n.get(p)??s++)}return r.map(a=>[a,n.get(a)??null])}var lt=/^@?[a-zA-Z0-9_-]*$/;var Rt=class{compareFns=new Map;variants=new Map;completions=new Map;groupOrder=null;lastOrder=0;static(r,i,{compounds:e,order:n}={}){this.set(r,{kind:"static",applyFn:i,compoundsWith:0,compounds:e??2,order:n})}fromAst(r,i){let e=[];I(i,n=>{n.kind==="rule"?e.push(n.selector):n.kind==="at-rule"&&n.name!=="@slot"&&e.push(`${n.name} ${n.params}`)}),this.static(r,n=>{let s=structuredClone(i);Ot(s,n.nodes),n.nodes=s},{compounds:xe(e)})}functional(r,i,{compounds:e,order:n}={}){this.set(r,{kind:"functional",applyFn:i,compoundsWith:0,compounds:e??2,order:n})}compound(r,i,e,{compounds:n,order:s}={}){this.set(r,{kind:"compound",applyFn:e,compoundsWith:i,compounds:n??2,order:s})}group(r,i){this.groupOrder=this.nextOrder(),i&&this.compareFns.set(this.groupOrder,i),r(),this.groupOrder=null}has(r){return this.variants.has(r)}get(r){return this.variants.get(r)}kind(r){return this.variants.get(r)?.kind}compoundsWith(r,i){let e=this.variants.get(r),n=typeof i=="string"?this.variants.get(i):i.kind==="arbitrary"?{compounds:xe([i.selector])}:this.variants.get(i.root);return!(!e||!n||e.kind!=="compound"||n.compounds===0||e.compoundsWith===0||(e.compoundsWith&n.compounds)===0)}suggest(r,i){this.completions.set(r,i)}getCompletions(r){return this.completions.get(r)?.()??[]}compare(r,i){if(r===i)return 0;if(r===null)return-1;if(i===null)return 1;if(r.kind==="arbitrary"&&i.kind==="arbitrary")return r.selector{h.nodes=m.map(w=>W(w,h.nodes))},{compounds:g})}i("*",[":is(& > *)"],{compounds:0}),i("**",[":is(& *)"],{compounds:0});function e(c,m){return m.map(g=>{g=g.trim();let h=K(g," ");return h[0]==="not"?h.slice(1).join(" "):c==="@container"?h[0][0]==="("?`not ${g}`:h[1]==="not"?`${h[0]} ${h.slice(2).join(" ")}`:`${h[0]} not ${h.slice(1).join(" ")}`:`not ${g}`})}let n=["@media","@supports","@container"];function s(c){for(let m of n){if(m!==c.name)continue;let g=K(c.params,",");return g.length>1?null:(g=e(c.name,g),z(c.name,g.join(", ")))}return null}function a(c){return c.includes("::")?null:`&:not(${K(c,",").map(g=>(g=g.replaceAll("&","*"),g)).join(", ")})`}r.compound("not",3,(c,m)=>{if(m.variant.kind==="arbitrary"&&m.variant.relative||m.modifier)return null;let g=!1;if(I([c],(h,{path:w})=>{if(h.kind!=="rule"&&h.kind!=="at-rule")return 0;if(h.nodes.length>0)return 0;let v=[],A=[];for(let y of w)y.kind==="at-rule"?v.push(y):y.kind==="rule"&&A.push(y);if(v.length>1)return 2;if(A.length>1)return 2;let b=[];for(let y of A){let V=a(y.selector);if(!V)return g=!1,2;b.push(L(V,[]))}for(let y of v){let V=s(y);if(!V)return g=!1,2;b.push(V)}return Object.assign(c,L("&",b)),g=!0,1}),c.kind==="rule"&&c.selector==="&"&&c.nodes.length===1&&Object.assign(c,c.nodes[0]),!g)return null}),r.suggest("not",()=>Array.from(r.keys()).filter(c=>r.compoundsWith("not",c))),r.compound("group",2,(c,m)=>{if(m.variant.kind==="arbitrary"&&m.variant.relative)return null;let g=m.modifier?`:where(.${t.prefix?`${t.prefix}\\:`:""}group\\/${m.modifier.value})`:`:where(.${t.prefix?`${t.prefix}\\:`:""}group)`,h=!1;if(I([c],(w,{path:v})=>{if(w.kind!=="rule")return 0;for(let b of v.slice(0,-1))if(b.kind==="rule")return h=!1,2;let A=w.selector.replaceAll("&",g);K(A,",").length>1&&(A=`:is(${A})`),w.selector=`&:is(${A} *)`,h=!0}),!h)return null}),r.suggest("group",()=>Array.from(r.keys()).filter(c=>r.compoundsWith("group",c))),r.compound("peer",2,(c,m)=>{if(m.variant.kind==="arbitrary"&&m.variant.relative)return null;let g=m.modifier?`:where(.${t.prefix?`${t.prefix}\\:`:""}peer\\/${m.modifier.value})`:`:where(.${t.prefix?`${t.prefix}\\:`:""}peer)`,h=!1;if(I([c],(w,{path:v})=>{if(w.kind!=="rule")return 0;for(let b of v.slice(0,-1))if(b.kind==="rule")return h=!1,2;let A=w.selector.replaceAll("&",g);K(A,",").length>1&&(A=`:is(${A})`),w.selector=`&:is(${A} ~ *)`,h=!0}),!h)return null}),r.suggest("peer",()=>Array.from(r.keys()).filter(c=>r.compoundsWith("peer",c))),i("first-letter",["&::first-letter"]),i("first-line",["&::first-line"]),i("marker",["& *::marker","&::marker","& *::-webkit-details-marker","&::-webkit-details-marker"]),i("selection",["& *::selection","&::selection"]),i("file",["&::file-selector-button"]),i("placeholder",["&::placeholder"]),i("backdrop",["&::backdrop"]),i("details-content",["&::details-content"]);{let c=function(){return D([z("@property","--tw-content",[l("syntax",'"*"'),l("initial-value",'""'),l("inherits","false")])])};var p=c;r.static("before",m=>{m.nodes=[L("&::before",[c(),l("content","var(--tw-content)"),...m.nodes])]},{compounds:0}),r.static("after",m=>{m.nodes=[L("&::after",[c(),l("content","var(--tw-content)"),...m.nodes])]},{compounds:0})}i("first",["&:first-child"]),i("last",["&:last-child"]),i("only",["&:only-child"]),i("odd",["&:nth-child(odd)"]),i("even",["&:nth-child(even)"]),i("first-of-type",["&:first-of-type"]),i("last-of-type",["&:last-of-type"]),i("only-of-type",["&:only-of-type"]),i("visited",["&:visited"]),i("target",["&:target"]),i("open",["&:is([open], :popover-open, :open)"]),i("default",["&:default"]),i("checked",["&:checked"]),i("indeterminate",["&:indeterminate"]),i("placeholder-shown",["&:placeholder-shown"]),i("autofill",["&:autofill"]),i("optional",["&:optional"]),i("required",["&:required"]),i("valid",["&:valid"]),i("invalid",["&:invalid"]),i("user-valid",["&:user-valid"]),i("user-invalid",["&:user-invalid"]),i("in-range",["&:in-range"]),i("out-of-range",["&:out-of-range"]),i("read-only",["&:read-only"]),i("empty",["&:empty"]),i("focus-within",["&:focus-within"]),r.static("hover",c=>{c.nodes=[L("&:hover",[z("@media","(hover: hover)",c.nodes)])]}),i("focus",["&:focus"]),i("focus-visible",["&:focus-visible"]),i("active",["&:active"]),i("enabled",["&:enabled"]),i("disabled",["&:disabled"]),i("inert",["&:is([inert], [inert] *)"]),r.compound("in",2,(c,m)=>{if(m.modifier)return null;let g=!1;if(I([c],(h,{path:w})=>{if(h.kind!=="rule")return 0;for(let v of w.slice(0,-1))if(v.kind==="rule")return g=!1,2;h.selector=`:where(${h.selector.replaceAll("&","*")}) &`,g=!0}),!g)return null}),r.suggest("in",()=>Array.from(r.keys()).filter(c=>r.compoundsWith("in",c))),r.compound("has",2,(c,m)=>{if(m.modifier)return null;let g=!1;if(I([c],(h,{path:w})=>{if(h.kind!=="rule")return 0;for(let v of w.slice(0,-1))if(v.kind==="rule")return g=!1,2;h.selector=`&:has(${h.selector.replaceAll("&","*")})`,g=!0}),!g)return null}),r.suggest("has",()=>Array.from(r.keys()).filter(c=>r.compoundsWith("has",c))),r.functional("aria",(c,m)=>{if(!m.value||m.modifier)return null;m.value.kind==="arbitrary"?c.nodes=[L(`&[aria-${Nr(m.value.value)}]`,c.nodes)]:c.nodes=[L(`&[aria-${m.value.value}="true"]`,c.nodes)]}),r.suggest("aria",()=>["busy","checked","disabled","expanded","hidden","pressed","readonly","required","selected"]),r.functional("data",(c,m)=>{if(!m.value||m.modifier)return null;c.nodes=[L(`&[data-${Nr(m.value.value)}]`,c.nodes)]}),r.functional("nth",(c,m)=>{if(!m.value||m.modifier||m.value.kind==="named"&&!E(m.value.value))return null;c.nodes=[L(`&:nth-child(${m.value.value})`,c.nodes)]}),r.functional("nth-last",(c,m)=>{if(!m.value||m.modifier||m.value.kind==="named"&&!E(m.value.value))return null;c.nodes=[L(`&:nth-last-child(${m.value.value})`,c.nodes)]}),r.functional("nth-of-type",(c,m)=>{if(!m.value||m.modifier||m.value.kind==="named"&&!E(m.value.value))return null;c.nodes=[L(`&:nth-of-type(${m.value.value})`,c.nodes)]}),r.functional("nth-last-of-type",(c,m)=>{if(!m.value||m.modifier||m.value.kind==="named"&&!E(m.value.value))return null;c.nodes=[L(`&:nth-last-of-type(${m.value.value})`,c.nodes)]}),r.functional("supports",(c,m)=>{if(!m.value||m.modifier)return null;let g=m.value.value;if(g===null)return null;if(/^[\w-]*\s*\(/.test(g)){let h=g.replace(/\b(and|or|not)\b/g," $1 ");c.nodes=[z("@supports",h,c.nodes)];return}g.includes(":")||(g=`${g}: var(--tw)`),(g[0]!=="("||g[g.length-1]!==")")&&(g=`(${g})`),c.nodes=[z("@supports",g,c.nodes)]},{compounds:1}),i("motion-safe",["@media (prefers-reduced-motion: no-preference)"]),i("motion-reduce",["@media (prefers-reduced-motion: reduce)"]),i("contrast-more",["@media (prefers-contrast: more)"]),i("contrast-less",["@media (prefers-contrast: less)"]);{let c=function(m,g,h,w){if(m===g)return 0;let v=w.get(m);if(v===null)return h==="asc"?-1:1;let A=w.get(g);return A===null?h==="asc"?1:-1:be(v,A,h)};var u=c;{let m=t.namespace("--breakpoint"),g=new B(h=>{switch(h.kind){case"static":return t.resolveValue(h.root,["--breakpoint"])??null;case"functional":{if(!h.value||h.modifier)return null;let w=null;return h.value.kind==="arbitrary"?w=h.value.value:h.value.kind==="named"&&(w=t.resolveValue(h.value.value,["--breakpoint"])),!w||w.includes("var(")?null:w}case"arbitrary":case"compound":return null}});r.group(()=>{r.functional("max",(h,w)=>{if(w.modifier)return null;let v=g.get(w);if(v===null)return null;h.nodes=[z("@media",`(width < ${v})`,h.nodes)]},{compounds:1})},(h,w)=>c(h,w,"desc",g)),r.suggest("max",()=>Array.from(m.keys()).filter(h=>h!==null)),r.group(()=>{for(let[h,w]of t.namespace("--breakpoint"))h!==null&&r.static(h,v=>{v.nodes=[z("@media",`(width >= ${w})`,v.nodes)]},{compounds:1});r.functional("min",(h,w)=>{if(w.modifier)return null;let v=g.get(w);if(v===null)return null;h.nodes=[z("@media",`(width >= ${v})`,h.nodes)]},{compounds:1})},(h,w)=>c(h,w,"asc",g)),r.suggest("min",()=>Array.from(m.keys()).filter(h=>h!==null))}{let m=t.namespace("--container"),g=new B(h=>{switch(h.kind){case"functional":{if(h.value===null)return null;let w=null;return h.value.kind==="arbitrary"?w=h.value.value:h.value.kind==="named"&&(w=t.resolveValue(h.value.value,["--container"])),!w||w.includes("var(")?null:w}case"static":case"arbitrary":case"compound":return null}});r.group(()=>{r.functional("@max",(h,w)=>{let v=g.get(w);if(v===null)return null;h.nodes=[z("@container",w.modifier?`${w.modifier.value} (width < ${v})`:`(width < ${v})`,h.nodes)]},{compounds:1})},(h,w)=>c(h,w,"desc",g)),r.suggest("@max",()=>Array.from(m.keys()).filter(h=>h!==null)),r.group(()=>{r.functional("@",(h,w)=>{let v=g.get(w);if(v===null)return null;h.nodes=[z("@container",w.modifier?`${w.modifier.value} (width >= ${v})`:`(width >= ${v})`,h.nodes)]},{compounds:1}),r.functional("@min",(h,w)=>{let v=g.get(w);if(v===null)return null;h.nodes=[z("@container",w.modifier?`${w.modifier.value} (width >= ${v})`:`(width >= ${v})`,h.nodes)]},{compounds:1})},(h,w)=>c(h,w,"asc",g)),r.suggest("@min",()=>Array.from(m.keys()).filter(h=>h!==null)),r.suggest("@",()=>Array.from(m.keys()).filter(h=>h!==null))}}return i("portrait",["@media (orientation: portrait)"]),i("landscape",["@media (orientation: landscape)"]),i("ltr",['&:where(:dir(ltr), [dir="ltr"], [dir="ltr"] *)']),i("rtl",['&:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *)']),i("dark",["@media (prefers-color-scheme: dark)"]),i("starting",["@starting-style"]),i("print",["@media print"]),i("forced-colors",["@media (forced-colors: active)"]),i("inverted-colors",["@media (inverted-colors: inverted)"]),i("pointer-none",["@media (pointer: none)"]),i("pointer-coarse",["@media (pointer: coarse)"]),i("pointer-fine",["@media (pointer: fine)"]),i("any-pointer-none",["@media (any-pointer: none)"]),i("any-pointer-coarse",["@media (any-pointer: coarse)"]),i("any-pointer-fine",["@media (any-pointer: fine)"]),i("noscript",["@media (scripting: none)"]),r}function Nr(t){if(t.includes("=")){let[r,...i]=K(t,"="),e=i.join("=").trim();if(e[0]==="'"||e[0]==='"')return t;if(e.length>1){let n=e[e.length-1];if(e[e.length-2]===" "&&(n==="i"||n==="I"||n==="s"||n==="S"))return`${r}="${e.slice(0,-2)}" ${n}`}return`${r}="${e}"`}return t}function Ot(t,r){I(t,(i,{replaceWith:e})=>{if(i.kind==="at-rule"&&i.name==="@slot")e(r);else if(i.kind==="at-rule"&&(i.name==="@keyframes"||i.name==="@property"))return Object.assign(i,D([z(i.name,i.params,i.nodes)])),1})}function Vr(t){let r=wr(t),i=$r(t),e=new B(u=>sr(u,p)),n=new B(u=>Array.from(ar(u,p))),s=new B(u=>{let c=Sr(u,p);try{$e(c.map(({node:m})=>m),p)}catch{return[]}return c}),a=new B(u=>{for(let c of Ye(u))t.markUsedVariable(c)}),p={theme:t,utilities:r,variants:i,invalidCandidates:new Set,important:!1,candidatesToCss(u){let c=[];for(let m of u){let g=!1,{astNodes:h}=me([m],this,{onInvalidCandidate(){g=!0}});h=ke(h,p,0),h.length===0||g?c.push(null):c.push(ie(h))}return c},getClassOrder(u){return Cr(this,u)},getClassList(){return xr(this)},getVariants(){return Ar(this)},parseCandidate(u){return n.get(u)},parseVariant(u){return e.get(u)},compileAstNodes(u){return s.get(u)},getVariantOrder(){let u=Array.from(e.values());u.sort((h,w)=>this.variants.compare(h,w));let c=new Map,m,g=0;for(let h of u)h!==null&&(m!==void 0&&this.variants.compare(m,h)!==0&&g++,c.set(h,g),m=h);return c},resolveThemeValue(u,c=!0){let m=u.lastIndexOf("/"),g=null;m!==-1&&(g=u.slice(m+1).trim(),u=u.slice(0,m).trim());let h=t.resolve(null,[u],c?1:0)??void 0;return g&&h?G(h,g):h},trackUsedVariables(u){a.get(u)}};return p}var Pt=["container-type","pointer-events","visibility","position","inset","inset-inline","inset-block","inset-inline-start","inset-inline-end","top","right","bottom","left","isolation","z-index","order","grid-column","grid-column-start","grid-column-end","grid-row","grid-row-start","grid-row-end","float","clear","--tw-container-component","margin","margin-inline","margin-block","margin-inline-start","margin-inline-end","margin-top","margin-right","margin-bottom","margin-left","box-sizing","display","field-sizing","aspect-ratio","height","max-height","min-height","width","max-width","min-width","flex","flex-shrink","flex-grow","flex-basis","table-layout","caption-side","border-collapse","border-spacing","transform-origin","translate","--tw-translate-x","--tw-translate-y","--tw-translate-z","scale","--tw-scale-x","--tw-scale-y","--tw-scale-z","rotate","--tw-rotate-x","--tw-rotate-y","--tw-rotate-z","--tw-skew-x","--tw-skew-y","transform","animation","cursor","touch-action","--tw-pan-x","--tw-pan-y","--tw-pinch-zoom","resize","scroll-snap-type","--tw-scroll-snap-strictness","scroll-snap-align","scroll-snap-stop","scroll-margin","scroll-margin-inline","scroll-margin-block","scroll-margin-inline-start","scroll-margin-inline-end","scroll-margin-top","scroll-margin-right","scroll-margin-bottom","scroll-margin-left","scroll-padding","scroll-padding-inline","scroll-padding-block","scroll-padding-inline-start","scroll-padding-inline-end","scroll-padding-top","scroll-padding-right","scroll-padding-bottom","scroll-padding-left","list-style-position","list-style-type","list-style-image","appearance","columns","break-before","break-inside","break-after","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-template-columns","grid-template-rows","flex-direction","flex-wrap","place-content","place-items","align-content","align-items","justify-content","justify-items","gap","column-gap","row-gap","--tw-space-x-reverse","--tw-space-y-reverse","divide-x-width","divide-y-width","--tw-divide-y-reverse","divide-style","divide-color","place-self","align-self","justify-self","overflow","overflow-x","overflow-y","overscroll-behavior","overscroll-behavior-x","overscroll-behavior-y","scroll-behavior","border-radius","border-start-radius","border-end-radius","border-top-radius","border-right-radius","border-bottom-radius","border-left-radius","border-start-start-radius","border-start-end-radius","border-end-end-radius","border-end-start-radius","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","border-width","border-inline-width","border-block-width","border-inline-start-width","border-inline-end-width","border-top-width","border-right-width","border-bottom-width","border-left-width","border-style","border-inline-style","border-block-style","border-inline-start-style","border-inline-end-style","border-top-style","border-right-style","border-bottom-style","border-left-style","border-color","border-inline-color","border-block-color","border-inline-start-color","border-inline-end-color","border-top-color","border-right-color","border-bottom-color","border-left-color","background-color","background-image","--tw-gradient-position","--tw-gradient-stops","--tw-gradient-via-stops","--tw-gradient-from","--tw-gradient-from-position","--tw-gradient-via","--tw-gradient-via-position","--tw-gradient-to","--tw-gradient-to-position","mask-image","--tw-mask-top","--tw-mask-top-from-color","--tw-mask-top-from-position","--tw-mask-top-to-color","--tw-mask-top-to-position","--tw-mask-right","--tw-mask-right-from-color","--tw-mask-right-from-position","--tw-mask-right-to-color","--tw-mask-right-to-position","--tw-mask-bottom","--tw-mask-bottom-from-color","--tw-mask-bottom-from-position","--tw-mask-bottom-to-color","--tw-mask-bottom-to-position","--tw-mask-left","--tw-mask-left-from-color","--tw-mask-left-from-position","--tw-mask-left-to-color","--tw-mask-left-to-position","--tw-mask-linear","--tw-mask-linear-position","--tw-mask-linear-from-color","--tw-mask-linear-from-position","--tw-mask-linear-to-color","--tw-mask-linear-to-position","--tw-mask-radial","--tw-mask-radial-shape","--tw-mask-radial-size","--tw-mask-radial-position","--tw-mask-radial-from-color","--tw-mask-radial-from-position","--tw-mask-radial-to-color","--tw-mask-radial-to-position","--tw-mask-conic","--tw-mask-conic-position","--tw-mask-conic-from-color","--tw-mask-conic-from-position","--tw-mask-conic-to-color","--tw-mask-conic-to-position","box-decoration-break","background-size","background-attachment","background-clip","background-position","background-repeat","background-origin","mask-composite","mask-mode","mask-type","mask-size","mask-clip","mask-position","mask-repeat","mask-origin","fill","stroke","stroke-width","object-fit","object-position","padding","padding-inline","padding-block","padding-inline-start","padding-inline-end","padding-top","padding-right","padding-bottom","padding-left","text-align","text-indent","vertical-align","font-family","font-size","line-height","font-weight","letter-spacing","text-wrap","overflow-wrap","word-break","text-overflow","hyphens","white-space","color","text-transform","font-style","font-stretch","font-variant-numeric","text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","-webkit-font-smoothing","placeholder-color","caret-color","accent-color","color-scheme","opacity","background-blend-mode","mix-blend-mode","box-shadow","--tw-shadow","--tw-shadow-color","--tw-ring-shadow","--tw-ring-color","--tw-inset-shadow","--tw-inset-shadow-color","--tw-inset-ring-shadow","--tw-inset-ring-color","--tw-ring-offset-width","--tw-ring-offset-color","outline","outline-width","outline-offset","outline-color","--tw-blur","--tw-brightness","--tw-contrast","--tw-drop-shadow","--tw-grayscale","--tw-hue-rotate","--tw-invert","--tw-saturate","--tw-sepia","filter","--tw-backdrop-blur","--tw-backdrop-brightness","--tw-backdrop-contrast","--tw-backdrop-grayscale","--tw-backdrop-hue-rotate","--tw-backdrop-invert","--tw-backdrop-opacity","--tw-backdrop-saturate","--tw-backdrop-sepia","backdrop-filter","transition-property","transition-behavior","transition-delay","transition-duration","transition-timing-function","will-change","contain","content","forced-color-adjust"];function me(t,r,{onInvalidCandidate:i}={}){let e=new Map,n=[],s=new Map;for(let p of t){if(r.invalidCandidates.has(p)){i?.(p);continue}let u=r.parseCandidate(p);if(u.length===0){i?.(p);continue}s.set(p,u)}let a=r.getVariantOrder();for(let[p,u]of s){let c=!1;for(let m of u){let g=r.compileAstNodes(m);if(g.length!==0){c=!0;for(let{node:h,propertySort:w}of g){let v=0n;for(let A of m.variants)v|=1n<{let c=e.get(p),m=e.get(u);if(c.variants-m.variants!==0n)return Number(c.variants-m.variants);let g=0;for(;g1)return null;for(let u of a.nodes)if(u.kind!=="rule"&&u.kind!=="at-rule"||n(u,r)===null)return null;I(a.nodes,u=>{if((u.kind==="rule"||u.kind==="at-rule")&&u.nodes.length<=0)return u.nodes=t.nodes,1}),t.nodes=a.nodes;return}if(n(t,r)===null)return null}function Tr(t){let r=t.options?.types??[];return r.length>1&&r.includes("any")}function mn(t,r){if(t.kind==="arbitrary"){let a=t.value;return t.modifier&&(a=Q(a,t.modifier,r.theme)),a===null?[]:[[l(t.property,a)]]}let i=r.utilities.get(t.root)??[],e=[],n=i.filter(a=>!Tr(a));for(let a of n){if(a.kind!==t.kind)continue;let p=a.compileFn(t);if(p!==void 0){if(p===null)return e;e.push(p)}}if(e.length>0)return e;let s=i.filter(a=>Tr(a));for(let a of s){if(a.kind!==t.kind)continue;let p=a.compileFn(t);if(p!==void 0){if(p===null)return e;e.push(p)}}return e}function Er(t){for(let r of t)r.kind!=="at-root"&&(r.kind==="declaration"?r.important=!0:(r.kind==="rule"||r.kind==="at-rule")&&Er(r.nodes))}function gn(t){let r=new Set,i=0,e=t.slice(),n=!1;for(;e.length>0;){let s=e.shift();if(s.kind==="declaration"){if(s.value===void 0||(i++,n))continue;if(s.property==="--tw-sort"){let p=Pt.indexOf(s.value??"");if(p!==-1){r.add(p),n=!0;continue}}let a=Pt.indexOf(s.property);a!==-1&&r.add(a)}else if(s.kind==="rule"||s.kind==="at-rule")for(let a of s.nodes)e.push(a)}return{order:Array.from(r).sort((s,a)=>s-a),count:i}}function De(t,r){let i=0,e=W("&",t),n=new Set,s=new B(()=>new Set),a=new B(()=>new Set);I([e],(g,{parent:h})=>{if(g.kind==="at-rule"){if(g.name==="@keyframes")return I(g.nodes,w=>{if(w.kind==="at-rule"&&w.name==="@apply")throw new Error("You cannot use `@apply` inside `@keyframes`.")}),1;if(g.name==="@utility"){let w=g.params.replace(/-\*$/,"");a.get(w).add(g),I(g.nodes,v=>{if(!(v.kind!=="at-rule"||v.name!=="@apply")){n.add(g);for(let A of Rr(v,r))s.get(g).add(A)}});return}if(g.name==="@apply"){if(h===null)return;i|=1,n.add(h);for(let w of Rr(g,r))s.get(h).add(w)}}});let p=new Set,u=[],c=new Set;function m(g,h=[]){if(!p.has(g)){if(c.has(g)){let w=h[(h.indexOf(g)+1)%h.length];throw g.kind==="at-rule"&&g.name==="@utility"&&w.kind==="at-rule"&&w.name==="@utility"&&I(g.nodes,v=>{if(v.kind!=="at-rule"||v.name!=="@apply")return;let A=v.params.split(/\s+/g);for(let b of A)for(let y of r.parseCandidate(b))switch(y.kind){case"arbitrary":break;case"static":case"functional":if(w.params.replace(/-\*$/,"")===y.root)throw new Error(`You cannot \`@apply\` the \`${b}\` utility here because it creates a circular dependency.`);break;default:}}),new Error(`Circular dependency detected: + +${ie([g])} +Relies on: + +${ie([w])}`)}c.add(g);for(let w of s.get(g))for(let v of a.get(w))h.push(g),m(v,h),h.pop();p.add(g),c.delete(g),u.push(g)}}for(let g of n)m(g);for(let g of u)if("nodes"in g)for(let h=0;h{throw new Error(`Cannot apply unknown utility class: ${y}`)}}).astNodes,b=[];for(let y of A)if(y.kind==="rule")for(let V of y.nodes)b.push(V);else b.push(y);g.nodes.splice(h,1,...b)}}return i}function*Rr(t,r){for(let i of t.params.split(/\s+/g))for(let e of r.parseCandidate(i))switch(e.kind){case"arbitrary":break;case"static":case"functional":yield e.root;break;default:}}async function _t(t,r,i,e=0){let n=0,s=[];return I(t,(a,{replaceWith:p})=>{if(a.kind==="at-rule"&&(a.name==="@import"||a.name==="@reference")){let u=hn(H(a.params));if(u===null)return;a.name==="@reference"&&(u.media="reference"),n|=2;let{uri:c,layer:m,media:g,supports:h}=u;if(c.startsWith("data:")||c.startsWith("http://")||c.startsWith("https://"))return;let w=le({},[]);return s.push((async()=>{if(e>100)throw new Error(`Exceeded maximum recursion depth while resolving \`${c}\` in \`${r}\`)`);let v=await i(c,r),A=ve(v.content);await _t(A,v.base,i,e+1),w.nodes=vn([le({base:v.base},A)],m,g,h)})()),p(w),1}}),s.length>0&&await Promise.all(s),n}function hn(t){let r,i=null,e=null,n=null;for(let s=0;s/g,"1")),e[0]==="opacity"&&(typeof n=="number"||typeof n=="string")){let a=typeof n=="string"?parseFloat(n):n;a>=0&&a<=1&&(n=a*100+"%")}let s=at(e);s&&t.theme.add(`--${s}`,""+n,7)}if(Object.hasOwn(r,"fontFamily")){let e=5;{let n=Te(r.fontFamily.sans);n&&t.theme.hasDefault("--font-sans")&&(t.theme.add("--default-font-family",n,e),t.theme.add("--default-font-feature-settings",Te(r.fontFamily.sans,"fontFeatureSettings")??"normal",e),t.theme.add("--default-font-variation-settings",Te(r.fontFamily.sans,"fontVariationSettings")??"normal",e))}{let n=Te(r.fontFamily.mono);n&&t.theme.hasDefault("--font-mono")&&(t.theme.add("--default-mono-font-family",n,e),t.theme.add("--default-mono-font-feature-settings",Te(r.fontFamily.mono,"fontFeatureSettings")??"normal",e),t.theme.add("--default-mono-font-variation-settings",Te(r.fontFamily.mono,"fontVariationSettings")??"normal",e))}}return r}function wn(t){let r=[];return Pr(t,[],(i,e)=>{if(bn(i))return r.push([e,i]),1;if(yn(i)){r.push([e,i[0]]);for(let n of Reflect.ownKeys(i[1]))r.push([[...e,`-${n}`],i[1][n]]);return 1}if(Array.isArray(i)&&i.every(n=>typeof n=="string"))return e[0]==="fontSize"?(r.push([e,i[0]]),i.length>=2&&r.push([[...e,"-line-height"],i[1]])):r.push([e,i.join(", ")]),1}),r}var kn=/^[a-zA-Z0-9-_%/\.]+$/;function at(t){if(t[0]==="container")return null;t=structuredClone(t),t[0]==="animation"&&(t[0]="animate"),t[0]==="aspectRatio"&&(t[0]="aspect"),t[0]==="borderRadius"&&(t[0]="radius"),t[0]==="boxShadow"&&(t[0]="shadow"),t[0]==="colors"&&(t[0]="color"),t[0]==="containers"&&(t[0]="container"),t[0]==="fontFamily"&&(t[0]="font"),t[0]==="fontSize"&&(t[0]="text"),t[0]==="letterSpacing"&&(t[0]="tracking"),t[0]==="lineHeight"&&(t[0]="leading"),t[0]==="maxWidth"&&(t[0]="container"),t[0]==="screens"&&(t[0]="breakpoint"),t[0]==="transitionTimingFunction"&&(t[0]="ease");for(let r of t)if(!kn.test(r))return null;return t.map((r,i,e)=>r==="1"&&i!==e.length-1?"":r).map(r=>r.replaceAll(".","_").replace(/([a-z])([A-Z])/g,(i,e,n)=>`${e}-${n.toLowerCase()}`)).filter((r,i)=>r!=="DEFAULT"||i!==t.length-1).join("-")}function bn(t){return typeof t=="number"||typeof t=="string"}function yn(t){if(!Array.isArray(t)||t.length!==2||typeof t[0]!="string"&&typeof t[0]!="number"||t[1]===void 0||t[1]===null||typeof t[1]!="object")return!1;for(let r of Reflect.ownKeys(t[1]))if(typeof r!="string"||typeof t[1][r]!="string"&&typeof t[1][r]!="number")return!1;return!0}function Pr(t,r=[],i){for(let e of Reflect.ownKeys(t)){let n=t[e];if(n==null)continue;let s=[...r,e],a=i(n,s)??0;if(a!==1){if(a===2)return 2;if(!(!Array.isArray(n)&&typeof n!="object")&&Pr(n,s,i)===2)return 2}}}function st(t){let r=[];for(let i of K(t,".")){if(!i.includes("[")){r.push(i);continue}let e=0;for(;;){let n=i.indexOf("[",e),s=i.indexOf("]",n);if(n===-1||s===-1)break;n>e&&r.push(i.slice(e,n)),r.push(i.slice(n+1,s)),e=s+1}e<=i.length-1&&r.push(i.slice(e))}return r}function Ee(t){if(Object.prototype.toString.call(t)!=="[object Object]")return!1;let r=Object.getPrototypeOf(t);return r===null||Object.getPrototypeOf(r)===null}function je(t,r,i,e=[]){for(let n of r)if(n!=null)for(let s of Reflect.ownKeys(n)){e.push(s);let a=i(t[s],n[s],e);a!==void 0?t[s]=a:!Ee(t[s])||!Ee(n[s])?t[s]=n[s]:t[s]=je({},[t[s],n[s]],i,e),e.pop()}return t}function ut(t,r,i){return function(n,s){let a=n.lastIndexOf("/"),p=null;a!==-1&&(p=n.slice(a+1).trim(),n=n.slice(0,a).trim());let u=(()=>{let c=st(n),[m,g]=xn(t.theme,c),h=i(_r(r()??{},c)??null);if(typeof h=="string"&&(h=h.replace("","1")),typeof m!="object")return typeof g!="object"&&g&4?h??m:m;if(h!==null&&typeof h=="object"&&!Array.isArray(h)){let w=je({},[h],(v,A)=>A);if(m===null&&Object.hasOwn(h,"__CSS_VALUES__")){let v={};for(let A in h.__CSS_VALUES__)v[A]=h[A],delete w[A];m=v}for(let v in m)v!=="__CSS_VALUES__"&&(h?.__CSS_VALUES__?.[v]&4&&_r(w,v.split("-"))!==void 0||(w[we(v)]=m[v]));return w}if(Array.isArray(m)&&Array.isArray(g)&&Array.isArray(h)){let w=m[0],v=m[1];g[0]&4&&(w=h[0]??w);for(let A of Object.keys(v))g[1][A]&4&&(v[A]=h[1][A]??v[A]);return[w,v]}return m??h})();return p&&typeof u=="string"&&(u=G(u,p)),u??s}}function xn(t,r){if(r.length===1&&r[0].startsWith("--"))return[t.get([r[0]]),t.getOptions(r[0])];let i=at(r),e=new Map,n=new B(()=>new Map),s=t.namespace(`--${i}`);if(s.size===0)return[null,0];let a=new Map;for(let[m,g]of s){if(!m||!m.includes("--")){e.set(m,g),a.set(m,t.getOptions(m?`--${i}-${m}`:`--${i}`));continue}let h=m.indexOf("--"),w=m.slice(0,h),v=m.slice(h+2);v=v.replace(/-([a-z])/g,(A,b)=>b.toUpperCase()),n.get(w===""?null:w).set(v,[g,t.getOptions(`--${i}${m}`)])}let p=t.getOptions(`--${i}`);for(let[m,g]of n){let h=e.get(m);if(typeof h!="string")continue;let w={},v={};for(let[A,[b,y]]of g)w[A]=b,v[A]=y;e.set(m,[h,w]),a.set(m,[p,v])}let u={},c={};for(let[m,g]of e)Kr(u,[m??"DEFAULT"],g);for(let[m,g]of a)Kr(c,[m??"DEFAULT"],g);return r[r.length-1]==="DEFAULT"?[u?.DEFAULT??null,c.DEFAULT??0]:"DEFAULT"in u&&Object.keys(u).length===1?[u.DEFAULT,c.DEFAULT??0]:(u.__CSS_VALUES__=c,[u,c])}function _r(t,r){for(let i=0;i0){let h=ze(n);e?e.nodes.push(h):r.push(h),n=""}let u=a,c=a+1;for(;c0){let c=ze(n);u.nodes.push(c),n=""}i.length>0?e=i[i.length-1]:e=null;break}case En:case Sn:case Rn:{if(n.length>0){let u=ze(n);e?e.nodes.push(u):r.push(u)}n=String.fromCharCode(p);break}case Fr:{if(n.length>0){let m=ze(n);e?e.nodes.push(m):r.push(m)}n="";let u=a,c=0;for(let m=a+1;m0&&r.push(ze(n)),r}var Hr=/^[a-z@][a-zA-Z0-9/%._-]*$/;function Kt({designSystem:t,ast:r,resolvedConfig:i,featuresRef:e,referenceMode:n}){let s={addBase(a){if(n)return;let p=ae(a);e.current|=$e(p,t),r.push(z("@layer","base",p))},addVariant(a,p){if(!lt.test(a))throw new Error(`\`addVariant('${a}')\` defines an invalid variant name. Variants should only contain alphanumeric, dashes or underscore characters.`);typeof p=="string"||Array.isArray(p)?t.variants.static(a,u=>{u.nodes=Gr(p,u.nodes)},{compounds:xe(typeof p=="string"?[p]:p)}):typeof p=="object"&&t.variants.fromAst(a,ae(p))},matchVariant(a,p,u){function c(g,h,w){let v=p(g,{modifier:h?.value??null});return Gr(v,w)}let m=Object.keys(u?.values??{});t.variants.group(()=>{t.variants.functional(a,(g,h)=>{if(!h.value){if(u?.values&&"DEFAULT"in u.values){g.nodes=c(u.values.DEFAULT,h.modifier,g.nodes);return}return null}if(h.value.kind==="arbitrary")g.nodes=c(h.value.value,h.modifier,g.nodes);else if(h.value.kind==="named"&&u?.values){let w=u.values[h.value.value];if(typeof w!="string")return;g.nodes=c(w,h.modifier,g.nodes)}})},(g,h)=>{if(g.kind!=="functional"||h.kind!=="functional")return 0;let w=g.value?g.value.value:"DEFAULT",v=h.value?h.value.value:"DEFAULT",A=u?.values?.[w]??w,b=u?.values?.[v]??v;if(u&&typeof u.sort=="function")return u.sort({value:A,modifier:g.modifier?.value??null},{value:b,modifier:h.modifier?.value??null});let y=m.indexOf(w),V=m.indexOf(v);return y=y===-1?m.length:y,V=V===-1?m.length:V,y!==V?y-V:AObject.entries(c));p=p.flatMap(([c,m])=>K(c,",").map(g=>[g.trim(),m]));let u=new B(()=>[]);for(let[c,m]of p){if(c.startsWith("@keyframes ")){n||r.push(W(c,ae(m)));continue}let g=ct(c),h=!1;if(Ie(g,w=>{if(w.kind==="selector"&&w.value[0]==="."&&Hr.test(w.value.slice(1))){let v=w.value;w.value="&";let A=Fe(g),b=v.slice(1),y=A==="&"?ae(m):[W(A,ae(m))];u.get(b).push(...y),h=!0,w.value=v;return}if(w.kind==="function"&&w.value===":not")return 1}),!h)throw new Error(`\`addUtilities({ '${c}' : \u2026 })\` defines an invalid utility selector. Utilities must be a single class name and start with a lowercase letter, eg. \`.scrollbar-none\`.`)}for(let[c,m]of u)t.theme.prefix&&I(m,g=>{if(g.kind==="rule"){let h=ct(g.selector);Ie(h,w=>{w.kind==="selector"&&w.value[0]==="."&&(w.value=`.${t.theme.prefix}\\:${w.value.slice(1)}`)}),g.selector=Fe(h)}}),t.utilities.static(c,g=>{let h=structuredClone(m);return Yr(h,c,g.raw),e.current|=De(h,t),h})},matchUtilities(a,p){let u=p?.type?Array.isArray(p?.type)?p.type:[p.type]:["any"];for(let[m,g]of Object.entries(a)){let h=function({negative:w}){return v=>{if(v.value?.kind==="arbitrary"&&u.length>0&&!u.includes("any")&&(v.value.dataType&&!u.includes(v.value.dataType)||!v.value.dataType&&!q(v.value.value,u)))return;let A=u.includes("color"),b=null,y=!1;{let R=p?.values??{};A&&(R=Object.assign({inherit:"inherit",transparent:"transparent",current:"currentcolor"},R)),v.value?v.value.kind==="arbitrary"?b=v.value.value:v.value.fraction&&R[v.value.fraction]?(b=R[v.value.fraction],y=!0):R[v.value.value]?b=R[v.value.value]:R.__BARE_VALUE__&&(b=R.__BARE_VALUE__(v.value)??null,y=(v.value.fraction!==null&&b?.includes("/"))??!1):b=R.DEFAULT??null}if(b===null)return;let V;{let R=p?.modifiers??null;v.modifier?R==="any"||v.modifier.kind==="arbitrary"?V=v.modifier.value:R?.[v.modifier.value]?V=R[v.modifier.value]:A&&!Number.isNaN(Number(v.modifier.value))?V=`${v.modifier.value}%`:V=null:V=null}if(v.modifier&&V===null&&!y)return v.value?.kind==="arbitrary"?null:void 0;A&&V!==null&&(b=G(b,V)),w&&(b=`calc(${b} * -1)`);let T=ae(g(b,{modifier:V}));return Yr(T,m,v.raw),e.current|=De(T,t),T}};var c=h;if(!Hr.test(m))throw new Error(`\`matchUtilities({ '${m}' : \u2026 })\` defines an invalid utility name. Utilities should be alphanumeric and start with a lowercase letter, eg. \`scrollbar\`.`);p?.supportsNegativeValues&&t.utilities.functional(`-${m}`,h({negative:!0}),{types:u}),t.utilities.functional(m,h({negative:!1}),{types:u}),t.utilities.suggest(m,()=>{let w=p?.values??{},v=new Set(Object.keys(w));v.delete("__BARE_VALUE__"),v.has("DEFAULT")&&(v.delete("DEFAULT"),v.add(null));let A=p?.modifiers??{},b=A==="any"?[]:Object.keys(A);return[{supportsNegative:p?.supportsNegativeValues??!1,values:Array.from(v),modifiers:b}]})}},addComponents(a,p){this.addUtilities(a,p)},matchComponents(a,p){this.matchUtilities(a,p)},theme:ut(t,()=>i.theme??{},a=>a),prefix(a){return a},config(a,p){let u=i;if(!a)return u;let c=st(a);for(let m=0;mObject.entries(e));for(let[e,n]of i)if(typeof n!="object"){if(!e.startsWith("--")){if(n==="@slot"){r.push(W(e,[z("@slot")]));continue}e=e.replace(/([A-Z])/g,"-$1").toLowerCase()}r.push(l(e,String(n)))}else if(Array.isArray(n))for(let s of n)typeof s=="string"?r.push(l(e,s)):r.push(W(e,ae(s)));else n!==null&&r.push(W(e,ae(n)));return r}function Gr(t,r){return(typeof t=="string"?[t]:t).flatMap(e=>{if(e.trim().endsWith("}")){let n=e.replace("}","{@slot}}"),s=ve(n);return Ot(s,r),s}else return W(e,r)})}function Yr(t,r,i){I(t,e=>{if(e.kind==="rule"){let n=ct(e.selector);Ie(n,s=>{s.kind==="selector"&&s.value===`.${r}`&&(s.value=`.${fe(i)}`)}),e.selector=Fe(n)}})}function Jr(t,r,i){for(let e of _n(r))t.theme.addKeyframes(e)}function _n(t){let r=[];if("keyframes"in t.theme)for(let[i,e]of Object.entries(t.theme.keyframes))r.push(z("@keyframes",i,ae(e)));return r}var ft={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.046 257.417)",600:"oklch(44.6% 0.043 257.281)",700:"oklch(37.2% 0.044 257.287)",800:"oklch(27.9% 0.041 260.031)",900:"oklch(20.8% 0.042 265.755)",950:"oklch(12.9% 0.042 264.695)"},gray:{50:"oklch(98.5% 0.002 247.839)",100:"oklch(96.7% 0.003 264.542)",200:"oklch(92.8% 0.006 264.531)",300:"oklch(87.2% 0.01 258.338)",400:"oklch(70.7% 0.022 261.325)",500:"oklch(55.1% 0.027 264.364)",600:"oklch(44.6% 0.03 256.802)",700:"oklch(37.3% 0.034 259.733)",800:"oklch(27.8% 0.033 256.848)",900:"oklch(21% 0.034 264.665)",950:"oklch(13% 0.028 261.692)"},zinc:{50:"oklch(98.5% 0 0)",100:"oklch(96.7% 0.001 286.375)",200:"oklch(92% 0.004 286.32)",300:"oklch(87.1% 0.006 286.286)",400:"oklch(70.5% 0.015 286.067)",500:"oklch(55.2% 0.016 285.938)",600:"oklch(44.2% 0.017 285.786)",700:"oklch(37% 0.013 285.805)",800:"oklch(27.4% 0.006 286.033)",900:"oklch(21% 0.006 285.885)",950:"oklch(14.1% 0.005 285.823)"},neutral:{50:"oklch(98.5% 0 0)",100:"oklch(97% 0 0)",200:"oklch(92.2% 0 0)",300:"oklch(87% 0 0)",400:"oklch(70.8% 0 0)",500:"oklch(55.6% 0 0)",600:"oklch(43.9% 0 0)",700:"oklch(37.1% 0 0)",800:"oklch(26.9% 0 0)",900:"oklch(20.5% 0 0)",950:"oklch(14.5% 0 0)"},stone:{50:"oklch(98.5% 0.001 106.423)",100:"oklch(97% 0.001 106.424)",200:"oklch(92.3% 0.003 48.717)",300:"oklch(86.9% 0.005 56.366)",400:"oklch(70.9% 0.01 56.259)",500:"oklch(55.3% 0.013 58.071)",600:"oklch(44.4% 0.011 73.639)",700:"oklch(37.4% 0.01 67.558)",800:"oklch(26.8% 0.007 34.298)",900:"oklch(21.6% 0.006 56.043)",950:"oklch(14.7% 0.004 49.25)"},red:{50:"oklch(97.1% 0.013 17.38)",100:"oklch(93.6% 0.032 17.717)",200:"oklch(88.5% 0.062 18.334)",300:"oklch(80.8% 0.114 19.571)",400:"oklch(70.4% 0.191 22.216)",500:"oklch(63.7% 0.237 25.331)",600:"oklch(57.7% 0.245 27.325)",700:"oklch(50.5% 0.213 27.518)",800:"oklch(44.4% 0.177 26.899)",900:"oklch(39.6% 0.141 25.723)",950:"oklch(25.8% 0.092 26.042)"},orange:{50:"oklch(98% 0.016 73.684)",100:"oklch(95.4% 0.038 75.164)",200:"oklch(90.1% 0.076 70.697)",300:"oklch(83.7% 0.128 66.29)",400:"oklch(75% 0.183 55.934)",500:"oklch(70.5% 0.213 47.604)",600:"oklch(64.6% 0.222 41.116)",700:"oklch(55.3% 0.195 38.402)",800:"oklch(47% 0.157 37.304)",900:"oklch(40.8% 0.123 38.172)",950:"oklch(26.6% 0.079 36.259)"},amber:{50:"oklch(98.7% 0.022 95.277)",100:"oklch(96.2% 0.059 95.617)",200:"oklch(92.4% 0.12 95.746)",300:"oklch(87.9% 0.169 91.605)",400:"oklch(82.8% 0.189 84.429)",500:"oklch(76.9% 0.188 70.08)",600:"oklch(66.6% 0.179 58.318)",700:"oklch(55.5% 0.163 48.998)",800:"oklch(47.3% 0.137 46.201)",900:"oklch(41.4% 0.112 45.904)",950:"oklch(27.9% 0.077 45.635)"},yellow:{50:"oklch(98.7% 0.026 102.212)",100:"oklch(97.3% 0.071 103.193)",200:"oklch(94.5% 0.129 101.54)",300:"oklch(90.5% 0.182 98.111)",400:"oklch(85.2% 0.199 91.936)",500:"oklch(79.5% 0.184 86.047)",600:"oklch(68.1% 0.162 75.834)",700:"oklch(55.4% 0.135 66.442)",800:"oklch(47.6% 0.114 61.907)",900:"oklch(42.1% 0.095 57.708)",950:"oklch(28.6% 0.066 53.813)"},lime:{50:"oklch(98.6% 0.031 120.757)",100:"oklch(96.7% 0.067 122.328)",200:"oklch(93.8% 0.127 124.321)",300:"oklch(89.7% 0.196 126.665)",400:"oklch(84.1% 0.238 128.85)",500:"oklch(76.8% 0.233 130.85)",600:"oklch(64.8% 0.2 131.684)",700:"oklch(53.2% 0.157 131.589)",800:"oklch(45.3% 0.124 130.933)",900:"oklch(40.5% 0.101 131.063)",950:"oklch(27.4% 0.072 132.109)"},green:{50:"oklch(98.2% 0.018 155.826)",100:"oklch(96.2% 0.044 156.743)",200:"oklch(92.5% 0.084 155.995)",300:"oklch(87.1% 0.15 154.449)",400:"oklch(79.2% 0.209 151.711)",500:"oklch(72.3% 0.219 149.579)",600:"oklch(62.7% 0.194 149.214)",700:"oklch(52.7% 0.154 150.069)",800:"oklch(44.8% 0.119 151.328)",900:"oklch(39.3% 0.095 152.535)",950:"oklch(26.6% 0.065 152.934)"},emerald:{50:"oklch(97.9% 0.021 166.113)",100:"oklch(95% 0.052 163.051)",200:"oklch(90.5% 0.093 164.15)",300:"oklch(84.5% 0.143 164.978)",400:"oklch(76.5% 0.177 163.223)",500:"oklch(69.6% 0.17 162.48)",600:"oklch(59.6% 0.145 163.225)",700:"oklch(50.8% 0.118 165.612)",800:"oklch(43.2% 0.095 166.913)",900:"oklch(37.8% 0.077 168.94)",950:"oklch(26.2% 0.051 172.552)"},teal:{50:"oklch(98.4% 0.014 180.72)",100:"oklch(95.3% 0.051 180.801)",200:"oklch(91% 0.096 180.426)",300:"oklch(85.5% 0.138 181.071)",400:"oklch(77.7% 0.152 181.912)",500:"oklch(70.4% 0.14 182.503)",600:"oklch(60% 0.118 184.704)",700:"oklch(51.1% 0.096 186.391)",800:"oklch(43.7% 0.078 188.216)",900:"oklch(38.6% 0.063 188.416)",950:"oklch(27.7% 0.046 192.524)"},cyan:{50:"oklch(98.4% 0.019 200.873)",100:"oklch(95.6% 0.045 203.388)",200:"oklch(91.7% 0.08 205.041)",300:"oklch(86.5% 0.127 207.078)",400:"oklch(78.9% 0.154 211.53)",500:"oklch(71.5% 0.143 215.221)",600:"oklch(60.9% 0.126 221.723)",700:"oklch(52% 0.105 223.128)",800:"oklch(45% 0.085 224.283)",900:"oklch(39.8% 0.07 227.392)",950:"oklch(30.2% 0.056 229.695)"},sky:{50:"oklch(97.7% 0.013 236.62)",100:"oklch(95.1% 0.026 236.824)",200:"oklch(90.1% 0.058 230.902)",300:"oklch(82.8% 0.111 230.318)",400:"oklch(74.6% 0.16 232.661)",500:"oklch(68.5% 0.169 237.323)",600:"oklch(58.8% 0.158 241.966)",700:"oklch(50% 0.134 242.749)",800:"oklch(44.3% 0.11 240.79)",900:"oklch(39.1% 0.09 240.876)",950:"oklch(29.3% 0.066 243.157)"},blue:{50:"oklch(97% 0.014 254.604)",100:"oklch(93.2% 0.032 255.585)",200:"oklch(88.2% 0.059 254.128)",300:"oklch(80.9% 0.105 251.813)",400:"oklch(70.7% 0.165 254.624)",500:"oklch(62.3% 0.214 259.815)",600:"oklch(54.6% 0.245 262.881)",700:"oklch(48.8% 0.243 264.376)",800:"oklch(42.4% 0.199 265.638)",900:"oklch(37.9% 0.146 265.522)",950:"oklch(28.2% 0.091 267.935)"},indigo:{50:"oklch(96.2% 0.018 272.314)",100:"oklch(93% 0.034 272.788)",200:"oklch(87% 0.065 274.039)",300:"oklch(78.5% 0.115 274.713)",400:"oklch(67.3% 0.182 276.935)",500:"oklch(58.5% 0.233 277.117)",600:"oklch(51.1% 0.262 276.966)",700:"oklch(45.7% 0.24 277.023)",800:"oklch(39.8% 0.195 277.366)",900:"oklch(35.9% 0.144 278.697)",950:"oklch(25.7% 0.09 281.288)"},violet:{50:"oklch(96.9% 0.016 293.756)",100:"oklch(94.3% 0.029 294.588)",200:"oklch(89.4% 0.057 293.283)",300:"oklch(81.1% 0.111 293.571)",400:"oklch(70.2% 0.183 293.541)",500:"oklch(60.6% 0.25 292.717)",600:"oklch(54.1% 0.281 293.009)",700:"oklch(49.1% 0.27 292.581)",800:"oklch(43.2% 0.232 292.759)",900:"oklch(38% 0.189 293.745)",950:"oklch(28.3% 0.141 291.089)"},purple:{50:"oklch(97.7% 0.014 308.299)",100:"oklch(94.6% 0.033 307.174)",200:"oklch(90.2% 0.063 306.703)",300:"oklch(82.7% 0.119 306.383)",400:"oklch(71.4% 0.203 305.504)",500:"oklch(62.7% 0.265 303.9)",600:"oklch(55.8% 0.288 302.321)",700:"oklch(49.6% 0.265 301.924)",800:"oklch(43.8% 0.218 303.724)",900:"oklch(38.1% 0.176 304.987)",950:"oklch(29.1% 0.149 302.717)"},fuchsia:{50:"oklch(97.7% 0.017 320.058)",100:"oklch(95.2% 0.037 318.852)",200:"oklch(90.3% 0.076 319.62)",300:"oklch(83.3% 0.145 321.434)",400:"oklch(74% 0.238 322.16)",500:"oklch(66.7% 0.295 322.15)",600:"oklch(59.1% 0.293 322.896)",700:"oklch(51.8% 0.253 323.949)",800:"oklch(45.2% 0.211 324.591)",900:"oklch(40.1% 0.17 325.612)",950:"oklch(29.3% 0.136 325.661)"},pink:{50:"oklch(97.1% 0.014 343.198)",100:"oklch(94.8% 0.028 342.258)",200:"oklch(89.9% 0.061 343.231)",300:"oklch(82.3% 0.12 346.018)",400:"oklch(71.8% 0.202 349.761)",500:"oklch(65.6% 0.241 354.308)",600:"oklch(59.2% 0.249 0.584)",700:"oklch(52.5% 0.223 3.958)",800:"oklch(45.9% 0.187 3.815)",900:"oklch(40.8% 0.153 2.432)",950:"oklch(28.4% 0.109 3.907)"},rose:{50:"oklch(96.9% 0.015 12.422)",100:"oklch(94.1% 0.03 12.58)",200:"oklch(89.2% 0.058 10.001)",300:"oklch(81% 0.117 11.638)",400:"oklch(71.2% 0.194 13.428)",500:"oklch(64.5% 0.246 16.439)",600:"oklch(58.6% 0.253 17.585)",700:"oklch(51.4% 0.222 16.935)",800:"oklch(45.5% 0.188 13.697)",900:"oklch(41% 0.159 10.272)",950:"oklch(27.1% 0.105 12.094)"}};function Ae(t){return{__BARE_VALUE__:t}}var ne=Ae(t=>{if(E(t.value))return t.value}),ee=Ae(t=>{if(E(t.value))return`${t.value}%`}),ge=Ae(t=>{if(E(t.value))return`${t.value}px`}),Qr=Ae(t=>{if(E(t.value))return`${t.value}ms`}),pt=Ae(t=>{if(E(t.value))return`${t.value}deg`}),Kn=Ae(t=>{if(t.fraction===null)return;let[r,i]=K(t.fraction,"/");if(!(!E(r)||!E(i)))return t.fraction}),Zr=Ae(t=>{if(E(Number(t.value)))return`repeat(${t.value}, minmax(0, 1fr))`}),Xr={accentColor:({theme:t})=>t("colors"),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9",...Kn},backdropBlur:({theme:t})=>t("blur"),backdropBrightness:({theme:t})=>({...t("brightness"),...ee}),backdropContrast:({theme:t})=>({...t("contrast"),...ee}),backdropGrayscale:({theme:t})=>({...t("grayscale"),...ee}),backdropHueRotate:({theme:t})=>({...t("hueRotate"),...pt}),backdropInvert:({theme:t})=>({...t("invert"),...ee}),backdropOpacity:({theme:t})=>({...t("opacity"),...ee}),backdropSaturate:({theme:t})=>({...t("saturate"),...ee}),backdropSepia:({theme:t})=>({...t("sepia"),...ee}),backgroundColor:({theme:t})=>t("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:t})=>t("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:t})=>({DEFAULT:"currentcolor",...t("colors")}),borderOpacity:({theme:t})=>t("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:t})=>t("spacing"),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px",...ge},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:t})=>t("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2",...ee},caretColor:({theme:t})=>t("colors"),colors:()=>({...ft}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",...ne},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2",...ee},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:t})=>t("borderColor"),divideOpacity:({theme:t})=>t("borderOpacity"),divideWidth:({theme:t})=>({...t("borderWidth"),...ge}),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:t})=>t("colors"),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:t})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",...t("spacing")}),flexGrow:{0:"0",DEFAULT:"1",...ne},flexShrink:{0:"0",DEFAULT:"1",...ne},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:t})=>t("spacing"),gradientColorStops:({theme:t})=>t("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%",...ee},grayscale:{0:"0",DEFAULT:"100%",...ee},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...ne},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...ne},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...ne},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...ne},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...Zr},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...Zr},height:({theme:t})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...t("spacing")}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg",...pt},inset:({theme:t})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...t("spacing")}),invert:{0:"0",DEFAULT:"100%",...ee},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:t})=>({auto:"auto",...t("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",...ne},maxHeight:({theme:t})=>({none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...t("spacing")}),maxWidth:({theme:t})=>({none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...t("spacing")}),minHeight:({theme:t})=>({full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...t("spacing")}),minWidth:({theme:t})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...t("spacing")}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1",...ee},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",...ne},outlineColor:({theme:t})=>t("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...ge},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...ge},padding:({theme:t})=>t("spacing"),placeholderColor:({theme:t})=>t("colors"),placeholderOpacity:({theme:t})=>t("opacity"),ringColor:({theme:t})=>({DEFAULT:"currentcolor",...t("colors")}),ringOffsetColor:({theme:t})=>t("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...ge},ringOpacity:({theme:t})=>({DEFAULT:"0.5",...t("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...ge},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg",...pt},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2",...ee},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",...ee},screens:{sm:"40rem",md:"48rem",lg:"64rem",xl:"80rem","2xl":"96rem"},scrollMargin:({theme:t})=>t("spacing"),scrollPadding:({theme:t})=>t("spacing"),sepia:{0:"0",DEFAULT:"100%",...ee},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",...pt},space:({theme:t})=>t("spacing"),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:t})=>({none:"none",...t("colors")}),strokeWidth:{0:"0",1:"1",2:"2",...ne},supports:{},data:{},textColor:({theme:t})=>t("colors"),textDecorationColor:({theme:t})=>t("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...ge},textIndent:({theme:t})=>t("spacing"),textOpacity:({theme:t})=>t("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...ge},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...Qr},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...Qr},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:t})=>({"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...t("spacing")}),size:({theme:t})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...t("spacing")}),width:({theme:t})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content",...t("spacing")}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50",...ne}};function ei(t){return{theme:{...Xr,colors:({theme:r})=>r("color",{}),extend:{fontSize:({theme:r})=>({...r("text",{})}),boxShadow:({theme:r})=>({...r("shadow",{})}),animation:({theme:r})=>({...r("animate",{})}),aspectRatio:({theme:r})=>({...r("aspect",{})}),borderRadius:({theme:r})=>({...r("radius",{})}),screens:({theme:r})=>({...r("breakpoint",{})}),letterSpacing:({theme:r})=>({...r("tracking",{})}),lineHeight:({theme:r})=>({...r("leading",{})}),transitionDuration:{DEFAULT:t.get(["--default-transition-duration"])??null},transitionTimingFunction:{DEFAULT:t.get(["--default-transition-timing-function"])??null},maxWidth:({theme:r})=>({...r("container",{})})}}}}var Un={blocklist:[],future:{},prefix:"",important:!1,darkMode:null,theme:{},plugins:[],content:{files:[]}};function Dt(t,r){let i={design:t,configs:[],plugins:[],content:{files:[]},theme:{},extend:{},result:structuredClone(Un)};for(let n of r)Ut(i,n);for(let n of i.configs)"darkMode"in n&&n.darkMode!==void 0&&(i.result.darkMode=n.darkMode??null),"prefix"in n&&n.prefix!==void 0&&(i.result.prefix=n.prefix??""),"blocklist"in n&&n.blocklist!==void 0&&(i.result.blocklist=n.blocklist??[]),"important"in n&&n.important!==void 0&&(i.result.important=n.important??!1);let e=jn(i);return{resolvedConfig:{...i.result,content:i.content,theme:i.theme,plugins:i.plugins},replacedThemeKeys:e}}function Dn(t,r){if(Array.isArray(t)&&Ee(t[0]))return t.concat(r);if(Array.isArray(r)&&Ee(r[0])&&Ee(t))return[t,...r];if(Array.isArray(r))return r}function Ut(t,{config:r,base:i,path:e,reference:n}){let s=[];for(let u of r.plugins??[])"__isOptionsFunction"in u?s.push({...u(),reference:n}):"handler"in u?s.push({...u,reference:n}):s.push({handler:u,reference:n});if(Array.isArray(r.presets)&&r.presets.length===0)throw new Error("Error in the config file/plugin/preset. An empty preset (`preset: []`) is not currently supported.");for(let u of r.presets??[])Ut(t,{path:e,base:i,config:u,reference:n});for(let u of s)t.plugins.push(u),u.config&&Ut(t,{path:e,base:i,config:u.config,reference:!!u.reference});let a=r.content??[],p=Array.isArray(a)?a:a.files;for(let u of p)t.content.files.push(typeof u=="object"?u:{base:i,pattern:u});t.configs.push(r)}function jn(t){let r=new Set,i=ut(t.design,()=>t.theme,n),e=Object.assign(i,{theme:i,colors:ft});function n(s){return typeof s=="function"?s(e)??null:s??null}for(let s of t.configs){let a=s.theme??{},p=a.extend??{};for(let u in a)u!=="extend"&&r.add(u);Object.assign(t.theme,a);for(let u in p)t.extend[u]??=[],t.extend[u].push(p[u])}delete t.theme.extend;for(let s in t.extend){let a=[t.theme[s],...t.extend[s]];t.theme[s]=()=>{let p=a.map(n);return je({},p,Dn)}}for(let s in t.theme)t.theme[s]=n(t.theme[s]);if(t.theme.screens&&typeof t.theme.screens=="object")for(let s of Object.keys(t.theme.screens)){let a=t.theme.screens[s];a&&typeof a=="object"&&("raw"in a||"max"in a||"min"in a&&(t.theme.screens[s]=a.min))}return r}function ti(t,r){let i=t.theme.container||{};if(typeof i!="object"||i===null)return;let e=zn(i,r);e.length!==0&&r.utilities.static("container",()=>structuredClone(e))}function zn({center:t,padding:r,screens:i},e){let n=[],s=null;if(t&&n.push(l("margin-inline","auto")),(typeof r=="string"||typeof r=="object"&&r!==null&&"DEFAULT"in r)&&n.push(l("padding-inline",typeof r=="string"?r:r.DEFAULT)),typeof i=="object"&&i!==null){s=new Map;let a=Array.from(e.theme.namespace("--breakpoint").entries());if(a.sort((p,u)=>be(p[1],u[1],"asc")),a.length>0){let[p]=a[0];n.push(z("@media",`(width >= --theme(--breakpoint-${p}))`,[l("max-width","none")]))}for(let[p,u]of Object.entries(i)){if(typeof u=="object")if("min"in u)u=u.min;else continue;s.set(p,z("@media",`(width >= ${u})`,[l("max-width",u)]))}}if(typeof r=="object"&&r!==null){let a=Object.entries(r).filter(([p])=>p!=="DEFAULT").map(([p,u])=>[p,e.theme.resolveValue(p,["--breakpoint"]),u]).filter(Boolean);a.sort((p,u)=>be(p[1],u[1],"asc"));for(let[p,,u]of a)if(s&&s.has(p))s.get(p).nodes.push(l("padding-inline",u));else{if(s)continue;n.push(z("@media",`(width >= theme(--breakpoint-${p}))`,[l("padding-inline",u)]))}}if(s)for(let[,a]of s)n.push(a);return n}function ri({addVariant:t,config:r}){let i=r("darkMode",null),[e,n=".dark"]=Array.isArray(i)?i:[i];if(e==="variant"){let s;if(Array.isArray(n)||typeof n=="function"?s=n:typeof n=="string"&&(s=[n]),Array.isArray(s))for(let a of s)a===".dark"?(e=!1,console.warn('When using `variant` for `darkMode`, you must provide a selector.\nExample: `darkMode: ["variant", ".your-selector &"]`')):a.includes("&")||(e=!1,console.warn('When using `variant` for `darkMode`, your selector must contain `&`.\nExample `darkMode: ["variant", ".your-selector &"]`'));n=s}e===null||(e==="selector"?t("dark",`&:where(${n}, ${n} *)`):e==="media"?t("dark","@media (prefers-color-scheme: dark)"):e==="variant"?t("dark",n):e==="class"&&t("dark",`&:is(${n} *)`))}function ii(t){for(let[r,i]of[["t","top"],["tr","top right"],["r","right"],["br","bottom right"],["b","bottom"],["bl","bottom left"],["l","left"],["tl","top left"]])t.utilities.static(`bg-gradient-to-${r}`,()=>[l("--tw-gradient-position",`to ${i} in oklab`),l("background-image","linear-gradient(var(--tw-gradient-stops))")]);t.utilities.static("bg-left-top",()=>[l("background-position","left top")]),t.utilities.static("bg-right-top",()=>[l("background-position","right top")]),t.utilities.static("bg-left-bottom",()=>[l("background-position","left bottom")]),t.utilities.static("bg-right-bottom",()=>[l("background-position","right bottom")]),t.utilities.static("object-left-top",()=>[l("object-position","left top")]),t.utilities.static("object-right-top",()=>[l("object-position","right top")]),t.utilities.static("object-left-bottom",()=>[l("object-position","left bottom")]),t.utilities.static("object-right-bottom",()=>[l("object-position","right bottom")]),t.utilities.functional("max-w-screen",r=>{if(!r.value||r.value.kind==="arbitrary")return;let i=t.theme.resolve(r.value.value,["--breakpoint"]);if(i)return[l("max-width",i)]}),t.utilities.static("overflow-ellipsis",()=>[l("text-overflow","ellipsis")]),t.utilities.static("decoration-slice",()=>[l("-webkit-box-decoration-break","slice"),l("box-decoration-break","slice")]),t.utilities.static("decoration-clone",()=>[l("-webkit-box-decoration-break","clone"),l("box-decoration-break","clone")]),t.utilities.functional("flex-shrink",r=>{if(!r.modifier){if(!r.value)return[l("flex-shrink","1")];if(r.value.kind==="arbitrary")return[l("flex-shrink",r.value.value)];if(E(r.value.value))return[l("flex-shrink",r.value.value)]}}),t.utilities.functional("flex-grow",r=>{if(!r.modifier){if(!r.value)return[l("flex-grow","1")];if(r.value.kind==="arbitrary")return[l("flex-grow",r.value.value)];if(E(r.value.value))return[l("flex-grow",r.value.value)]}})}function ni(t,r){let i=t.theme.screens||{},e=r.variants.get("min")?.order??0,n=[];for(let[a,p]of Object.entries(i)){let h=function(w){r.variants.static(a,v=>{v.nodes=[z("@media",g,v.nodes)]},{order:w})};var s=h;let u=r.variants.get(a),c=r.theme.resolveValue(a,["--breakpoint"]);if(u&&c&&!r.theme.hasDefault(`--breakpoint-${a}`))continue;let m=!0;typeof p=="string"&&(m=!1);let g=In(p);m?n.push(h):h(e)}if(n.length!==0){for(let[,a]of r.variants.variants)a.order>e&&(a.order+=n.length);r.variants.compareFns=new Map(Array.from(r.variants.compareFns).map(([a,p])=>(a>e&&(a+=n.length),[a,p])));for(let[a,p]of n.entries())p(e+a+1)}}function In(t){return(Array.isArray(t)?t:[t]).map(i=>typeof i=="string"?{min:i}:i&&typeof i=="object"?i:null).map(i=>{if(i===null)return null;if("raw"in i)return i.raw;let e="";return i.max!==void 0&&(e+=`${i.max} >= `),e+="width",i.min!==void 0&&(e+=` >= ${i.min}`),`(${e})`}).filter(Boolean).join(", ")}function oi(t,r){let i=t.theme.aria||{},e=t.theme.supports||{},n=t.theme.data||{};if(Object.keys(i).length>0){let s=r.variants.get("aria"),a=s?.applyFn,p=s?.compounds;r.variants.functional("aria",(u,c)=>{let m=c.value;return m&&m.kind==="named"&&m.value in i?a?.(u,{...c,value:{kind:"arbitrary",value:i[m.value]}}):a?.(u,c)},{compounds:p})}if(Object.keys(e).length>0){let s=r.variants.get("supports"),a=s?.applyFn,p=s?.compounds;r.variants.functional("supports",(u,c)=>{let m=c.value;return m&&m.kind==="named"&&m.value in e?a?.(u,{...c,value:{kind:"arbitrary",value:e[m.value]}}):a?.(u,c)},{compounds:p})}if(Object.keys(n).length>0){let s=r.variants.get("data"),a=s?.applyFn,p=s?.compounds;r.variants.functional("data",(u,c)=>{let m=c.value;return m&&m.kind==="named"&&m.value in n?a?.(u,{...c,value:{kind:"arbitrary",value:n[m.value]}}):a?.(u,c)},{compounds:p})}}var Fn=/^[a-z]+$/;async function ai({designSystem:t,base:r,ast:i,loadModule:e,sources:n}){let s=0,a=[],p=[];I(i,(g,{parent:h,replaceWith:w,context:v})=>{if(g.kind==="at-rule"){if(g.name==="@plugin"){if(h!==null)throw new Error("`@plugin` cannot be nested.");let A=g.params.slice(1,-1);if(A.length===0)throw new Error("`@plugin` must have a path.");let b={};for(let y of g.nodes??[]){if(y.kind!=="declaration")throw new Error(`Unexpected \`@plugin\` option: + +${ie([y])} + +\`@plugin\` options must be a flat list of declarations.`);if(y.value===void 0)continue;let V=y.value,T=K(V,",").map(R=>{if(R=R.trim(),R==="null")return null;if(R==="true")return!0;if(R==="false")return!1;if(Number.isNaN(Number(R))){if(R[0]==='"'&&R[R.length-1]==='"'||R[0]==="'"&&R[R.length-1]==="'")return R.slice(1,-1);if(R[0]==="{"&&R[R.length-1]==="}")throw new Error(`Unexpected \`@plugin\` option: Value of declaration \`${ie([y]).trim()}\` is not supported. + +Using an object as a plugin option is currently only supported in JavaScript configuration files.`)}else return Number(R);return R});b[y.property]=T.length===1?T[0]:T}a.push([{id:A,base:v.base,reference:!!v.reference},Object.keys(b).length>0?b:null]),w([]),s|=4;return}if(g.name==="@config"){if(g.nodes.length>0)throw new Error("`@config` cannot have a body.");if(h!==null)throw new Error("`@config` cannot be nested.");p.push({id:g.params.slice(1,-1),base:v.base,reference:!!v.reference}),w([]),s|=4;return}}}),ii(t);let u=t.resolveThemeValue;if(t.resolveThemeValue=function(h,w){return h.startsWith("--")?u(h,w):(s|=li({designSystem:t,base:r,ast:i,sources:n,configs:[],pluginDetails:[]}),t.resolveThemeValue(h,w))},!a.length&&!p.length)return 0;let[c,m]=await Promise.all([Promise.all(p.map(async({id:g,base:h,reference:w})=>{let v=await e(g,h,"config");return{path:g,base:v.base,config:v.module,reference:w}})),Promise.all(a.map(async([{id:g,base:h,reference:w},v])=>{let A=await e(g,h,"plugin");return{path:g,base:A.base,plugin:A.module,options:v,reference:w}}))]);return s|=li({designSystem:t,base:r,ast:i,sources:n,configs:c,pluginDetails:m}),s}function li({designSystem:t,base:r,ast:i,sources:e,configs:n,pluginDetails:s}){let a=0,u=[...s.map(b=>{if(!b.options)return{config:{plugins:[b.plugin]},base:b.base,reference:b.reference};if("__isOptionsFunction"in b.plugin)return{config:{plugins:[b.plugin(b.options)]},base:b.base,reference:b.reference};throw new Error(`The plugin "${b.path}" does not accept options`)}),...n],{resolvedConfig:c}=Dt(t,[{config:ei(t.theme),base:r,reference:!0},...u,{config:{plugins:[ri]},base:r,reference:!0}]),{resolvedConfig:m,replacedThemeKeys:g}=Dt(t,u),h=t.resolveThemeValue;t.resolveThemeValue=function(y,V){if(y[0]==="-"&&y[1]==="-")return h(y,V);let T=v.theme(y,void 0);if(Array.isArray(T)&&T.length===2)return T[0];if(Array.isArray(T))return T.join(", ");if(typeof T=="string")return T};let w={designSystem:t,ast:i,resolvedConfig:c,featuresRef:{set current(b){a|=b}}},v=Kt({...w,referenceMode:!1}),A;for(let{handler:b,reference:y}of c.plugins)y?(A||=Kt({...w,referenceMode:!0}),b(A)):b(v);if(Or(t,m,g),Jr(t,m,g),oi(m,t),ni(m,t),ti(m,t),!t.theme.prefix&&c.prefix){if(c.prefix.endsWith("-")&&(c.prefix=c.prefix.slice(0,-1),console.warn(`The prefix "${c.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only and is written as a variant before all utilities. We have fixed up the prefix for you. Remove the trailing \`-\` to silence this warning.`)),!Fn.test(c.prefix))throw new Error(`The prefix "${c.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only.`);t.theme.prefix=c.prefix}if(!t.important&&c.important===!0&&(t.important=!0),typeof c.important=="string"){let b=c.important;I(i,(y,{replaceWith:V,parent:T})=>{if(y.kind==="at-rule"&&!(y.name!=="@tailwind"||y.params!=="utilities"))return T?.kind==="rule"&&T.selector===b?2:(V(L(b,[y])),2)})}for(let b of c.blocklist)t.invalidCandidates.add(b);for(let b of c.content.files){if("raw"in b)throw new Error(`Error in the config file/plugin/preset. The \`content\` key contains a \`raw\` entry: + +${JSON.stringify(b,null,2)} + +This feature is not currently supported.`);let y=!1;b.pattern[0]=="!"&&(y=!0,b.pattern=b.pattern.slice(1)),e.push({...b,negated:y})}return a}var si=/^(-?\d+)\.\.(-?\d+)(?:\.\.(-?\d+))?$/;function dt(t){let r=t.indexOf("{");if(r===-1)return[t];let i=[],e=t.slice(0,r),n=t.slice(r),s=0,a=n.lastIndexOf("}");for(let g=0;gdt(g));let m=dt(u);for(let g of m)for(let h of c)i.push(e+h+g);return i}function Ln(t){return si.test(t)}function Mn(t){let r=t.match(si);if(!r)return[t];let[,i,e,n]=r,s=n?parseInt(n,10):void 0,a=[];if(/^-?\d+$/.test(i)&&/^-?\d+$/.test(e)){let p=parseInt(i,10),u=parseInt(e,10);if(s===void 0&&(s=p<=u?1:-1),s===0)throw new Error("Step cannot be zero in sequence expansion.");let c=p0&&(s=-s);for(let m=p;c?m<=u:m>=u;m+=s)a.push(m.toString())}return a}var Wn=/^[a-z]+$/,Ze=(n=>(n[n.None=0]="None",n[n.AtProperty=1]="AtProperty",n[n.ColorMix=2]="ColorMix",n[n.All=3]="All",n))(Ze||{});function Bn(){throw new Error("No `loadModule` function provided to `compile`")}function qn(){throw new Error("No `loadStylesheet` function provided to `compile`")}function Hn(t){let r=0,i=null;for(let e of K(t," "))e==="reference"?r|=2:e==="inline"?r|=1:e==="default"?r|=4:e==="static"?r|=8:e.startsWith("prefix(")&&e.endsWith(")")&&(i=e.slice(7,-1));return[r,i]}var Ve=(p=>(p[p.None=0]="None",p[p.AtApply=1]="AtApply",p[p.AtImport=2]="AtImport",p[p.JsPluginCompat=4]="JsPluginCompat",p[p.ThemeFunction=8]="ThemeFunction",p[p.Utilities=16]="Utilities",p[p.Variants=32]="Variants",p))(Ve||{});async function ui(t,{base:r="",loadModule:i=Bn,loadStylesheet:e=qn}={}){let n=0;t=[le({base:r},t)],n|=await _t(t,r,e);let s=null,a=new Ge,p=[],u=[],c=null,m=null,g=[],h=[],w=[],v=[],A=null;I(t,(y,{parent:V,replaceWith:T,context:R})=>{if(y.kind==="at-rule"){if(y.name==="@tailwind"&&(y.params==="utilities"||y.params.startsWith("utilities"))){if(m!==null){T([]);return}let _=K(y.params," ");for(let j of _)if(j.startsWith("source(")){let P=j.slice(7,-1);if(P==="none"){A=P;continue}if(P[0]==='"'&&P[P.length-1]!=='"'||P[0]==="'"&&P[P.length-1]!=="'"||P[0]!=="'"&&P[0]!=='"')throw new Error("`source(\u2026)` paths must be quoted.");A={base:R.sourceBase??R.base,pattern:P.slice(1,-1)}}m=y,n|=16}if(y.name==="@utility"){if(V!==null)throw new Error("`@utility` cannot be nested.");if(y.nodes.length===0)throw new Error(`\`@utility ${y.params}\` is empty. Utilities should include at least one property.`);let _=kr(y);if(_===null)throw new Error(`\`@utility ${y.params}\` defines an invalid utility name. Utilities should be alphanumeric and start with a lowercase letter.`);u.push(_)}if(y.name==="@source"){if(y.nodes.length>0)throw new Error("`@source` cannot have a body.");if(V!==null)throw new Error("`@source` cannot be nested.");let _=!1,j=!1,P=y.params;if(P[0]==="n"&&P.startsWith("not ")&&(_=!0,P=P.slice(4)),P[0]==="i"&&P.startsWith("inline(")&&(j=!0,P=P.slice(7,-1)),P[0]==='"'&&P[P.length-1]!=='"'||P[0]==="'"&&P[P.length-1]!=="'"||P[0]!=="'"&&P[0]!=='"')throw new Error("`@source` paths must be quoted.");let Y=P.slice(1,-1);if(j){let M=_?v:w,F=K(Y," ");for(let re of F)for(let X of dt(re))M.push(X)}else h.push({base:R.base,pattern:Y,negated:_});T([]);return}if(y.name==="@variant"&&(V===null?y.nodes.length===0?y.name="@custom-variant":(I(y.nodes,_=>{if(_.kind==="at-rule"&&_.name==="@slot")return y.name="@custom-variant",2}),y.name==="@variant"&&g.push(y)):g.push(y)),y.name==="@custom-variant"){if(V!==null)throw new Error("`@custom-variant` cannot be nested.");T([]);let[_,j]=K(y.params," ");if(!lt.test(_))throw new Error(`\`@custom-variant ${_}\` defines an invalid variant name. Variants should only contain alphanumeric, dashes or underscore characters.`);if(y.nodes.length>0&&j)throw new Error(`\`@custom-variant ${_}\` cannot have both a selector and a body.`);if(y.nodes.length===0){if(!j)throw new Error(`\`@custom-variant ${_}\` has no selector or body.`);let P=K(j.slice(1,-1),",");if(P.length===0||P.some(F=>F.trim()===""))throw new Error(`\`@custom-variant ${_} (${P.join(",")})\` selector is invalid.`);let Y=[],M=[];for(let F of P)F=F.trim(),F[0]==="@"?Y.push(F):M.push(F);p.push(F=>{F.variants.static(_,re=>{let X=[];M.length>0&&X.push(L(M.join(", "),re.nodes));for(let se of Y)X.push(W(se,re.nodes));re.nodes=X},{compounds:xe([...M,...Y])})});return}else{p.push(P=>{P.variants.fromAst(_,y.nodes)});return}}if(y.name==="@media"){let _=K(y.params," "),j=[];for(let P of _)if(P.startsWith("source(")){let Y=P.slice(7,-1);I(y.nodes,(M,{replaceWith:F})=>{if(M.kind==="at-rule"&&M.name==="@tailwind"&&M.params==="utilities")return M.params+=` source(${Y})`,F([le({sourceBase:R.base},[M])]),2})}else if(P.startsWith("theme(")){let Y=P.slice(6,-1),M=Y.includes("reference");I(y.nodes,F=>{if(F.kind!=="at-rule"){if(M)throw new Error('Files imported with `@import "\u2026" theme(reference)` must only contain `@theme` blocks.\nUse `@reference "\u2026";` instead.');return 0}if(F.name==="@theme")return F.params+=" "+Y,1})}else if(P.startsWith("prefix(")){let Y=P.slice(7,-1);I(y.nodes,M=>{if(M.kind==="at-rule"&&M.name==="@theme")return M.params+=` prefix(${Y})`,1})}else P==="important"?s=!0:P==="reference"?y.nodes=[le({reference:!0},y.nodes)]:j.push(P);j.length>0?y.params=j.join(" "):_.length>0&&T(y.nodes)}if(y.name==="@theme"){let[_,j]=Hn(y.params);if(R.reference&&(_|=2),j){if(!Wn.test(j))throw new Error(`The prefix "${j}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only.`);a.prefix=j}return I(y.nodes,P=>{if(P.kind==="at-rule"&&P.name==="@keyframes")return a.addKeyframes(P),1;if(P.kind==="comment")return;if(P.kind==="declaration"&&P.property.startsWith("--")){a.add(we(P.property),P.value??"",_);return}let Y=ie([z(y.name,y.params,[P])]).split(` +`).map((M,F,re)=>`${F===0||F>=re.length-2?" ":">"} ${M}`).join(` +`);throw new Error(`\`@theme\` blocks must only contain custom properties or \`@keyframes\`. + +${Y}`)}),c?T([]):(c=L(":root, :host",[]),T([c])),1}}});let b=Vr(a);if(s&&(b.important=s),v.length>0)for(let y of v)b.invalidCandidates.add(y);n|=await ai({designSystem:b,base:r,ast:t,loadModule:i,sources:h});for(let y of p)y(b);for(let y of u)y(b);if(c){let y=[];for(let[T,R]of b.theme.entries())R.options&2||y.push(l(fe(T),R.value));let V=b.theme.getKeyframes();for(let T of V)t.push(le({theme:!0},[D([T])]));c.nodes=[le({theme:!0},y)]}if(m){let y=m;y.kind="context",y.context={}}if(g.length>0){for(let y of g){let V=L("&",y.nodes),T=y.params,R=b.parseVariant(T);if(R===null)throw new Error(`Cannot use \`@variant\` with unknown variant: ${T}`);if(Se(V,R,b.variants)===null)throw new Error(`Cannot use \`@variant\` with variant: ${T}`);Object.assign(y,V)}n|=32}return n|=$e(t,b),n|=De(t,b),I(t,(y,{replaceWith:V})=>{if(y.kind==="at-rule")return y.name==="@utility"&&V([]),1}),{designSystem:b,ast:t,sources:h,root:A,utilitiesNode:m,features:n,inlineCandidates:w}}async function ci(t,r={}){let{designSystem:i,ast:e,sources:n,root:s,utilitiesNode:a,features:p,inlineCandidates:u}=await ui(t,r);e.unshift(He(`! tailwindcss v${jt} | MIT License | https://tailwindcss.com `));function c(v){i.invalidCandidates.add(v)}let m=new Set,g=null,h=0,w=!1;for(let v of u)i.invalidCandidates.has(v)||(m.add(v),w=!0);return{sources:n,root:s,features:p,build(v){if(p===0)return t;if(!a)return g??=ke(e,i,r.polyfills),g;let A=w,b=!1;w=!1;let y=m.size;for(let T of v)if(!i.invalidCandidates.has(T))if(T[0]==="-"&&T[1]==="-"){let R=i.theme.markUsedVariable(T);A||=R,b||=R}else m.add(T),A||=m.size!==y;if(!A)return g??=ke(e,i,r.polyfills),g;let V=me(m,i,{onInvalidCandidate:c}).astNodes;return!b&&h===V.length?(g??=ke(e,i,r.polyfills),g):(h=V.length,a.nodes=V,g=ke(e,i,r.polyfills),g)}}}async function Gn(t,r={}){let i=ve(t),e=await ci(i,r),n=i,s=t;return{...e,build(a){let p=e.build(a);return p===n||(s=ie(p),n=p),s}}}async function Yn(t,r={}){return(await ui(ve(t),r)).designSystem}function Le(){throw new Error("It looks like you're trying to use `tailwindcss` directly as a PostCSS plugin. The PostCSS plugin has moved to a separate package, so to continue using Tailwind CSS with PostCSS you'll need to install `@tailwindcss/postcss` and update your PostCSS configuration.")}for(let t in mt)t!=="default"&&(Le[t]=mt[t]);module.exports=Le; diff --git a/node_modules/tailwindcss/dist/lib.mjs b/node_modules/tailwindcss/dist/lib.mjs new file mode 100644 index 0000000..714ea2a --- /dev/null +++ b/node_modules/tailwindcss/dist/lib.mjs @@ -0,0 +1 @@ +import{a,b,c,d,e,f}from"./chunk-NZOSKIBJ.mjs";import"./chunk-P5FH2LZE.mjs";import"./chunk-HTB5LLOP.mjs";export{b as Features,a as Polyfills,e as __unstable__loadDesignSystem,d as compile,c as compileAst,f as default}; diff --git a/node_modules/tailwindcss/dist/plugin.d.mts b/node_modules/tailwindcss/dist/plugin.d.mts new file mode 100644 index 0000000..6c11f7d --- /dev/null +++ b/node_modules/tailwindcss/dist/plugin.d.mts @@ -0,0 +1,11 @@ +export { P as PluginUtils } from './resolve-config-QUZ9b-Gn.mjs'; +import { a as PluginFn, C as Config, b as PluginWithConfig, c as PluginWithOptions } from './types-B254mqw1.mjs'; +export { d as PluginAPI, P as PluginsConfig, T as ThemeConfig } from './types-B254mqw1.mjs'; +import './colors.mjs'; + +declare function createPlugin(handler: PluginFn, config?: Partial): PluginWithConfig; +declare namespace createPlugin { + var withOptions: (pluginFunction: (options?: T) => PluginFn, configFunction?: (options?: T) => Partial) => PluginWithOptions; +} + +export { Config, PluginFn as PluginCreator, createPlugin as default }; diff --git a/node_modules/tailwindcss/dist/plugin.d.ts b/node_modules/tailwindcss/dist/plugin.d.ts new file mode 100644 index 0000000..305e84e --- /dev/null +++ b/node_modules/tailwindcss/dist/plugin.d.ts @@ -0,0 +1,104 @@ +import { N as NamedUtilityValue, P as PluginUtils } from './resolve-config-BIFUA2FY.js'; +import './colors-b_6i0Oi7.js'; + +type Config = UserConfig; +type PluginFn = (api: PluginAPI) => void; +type PluginWithConfig = { + handler: PluginFn; + config?: UserConfig; + /** @internal */ + reference?: boolean; +}; +type PluginWithOptions = { + (options?: T): PluginWithConfig; + __isOptionsFunction: true; +}; +type Plugin = PluginFn | PluginWithConfig | PluginWithOptions; +type PluginAPI = { + addBase(base: CssInJs): void; + addVariant(name: string, variant: string | string[] | CssInJs): void; + matchVariant(name: string, cb: (value: T | string, extra: { + modifier: string | null; + }) => string | string[], options?: { + values?: Record; + sort?(a: { + value: T | string; + modifier: string | null; + }, b: { + value: T | string; + modifier: string | null; + }): number; + }): void; + addUtilities(utilities: Record | Record[], options?: {}): void; + matchUtilities(utilities: Record CssInJs | CssInJs[]>, options?: Partial<{ + type: string | string[]; + supportsNegativeValues: boolean; + values: Record & { + __BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined; + }; + modifiers: 'any' | Record; + }>): void; + addComponents(utilities: Record | Record[], options?: {}): void; + matchComponents(utilities: Record CssInJs>, options?: Partial<{ + type: string | string[]; + supportsNegativeValues: boolean; + values: Record & { + __BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined; + }; + modifiers: 'any' | Record; + }>): void; + theme(path: string, defaultValue?: any): any; + config(path?: string, defaultValue?: any): any; + prefix(className: string): string; +}; +type CssInJs = { + [key: string]: string | string[] | CssInJs | CssInJs[]; +}; + +type ResolvableTo = T | ((utils: PluginUtils) => T); +type ThemeValue = ResolvableTo> | null | undefined; +type ThemeConfig = Record & { + extend?: Record; +}; +type ContentFile = string | { + raw: string; + extension?: string; +}; +type DarkModeStrategy = false | 'media' | 'class' | ['class', string] | 'selector' | ['selector', string] | ['variant', string | string[]]; +interface UserConfig { + presets?: UserConfig[]; + theme?: ThemeConfig; + plugins?: Plugin[]; +} +interface UserConfig { + content?: ContentFile[] | { + relative?: boolean; + files: ContentFile[]; + }; +} +interface UserConfig { + darkMode?: DarkModeStrategy; +} +interface UserConfig { + prefix?: string; +} +interface UserConfig { + blocklist?: string[]; +} +interface UserConfig { + important?: boolean | string; +} +interface UserConfig { + future?: 'all' | Record; +} + +declare function createPlugin(handler: PluginFn, config?: Partial): PluginWithConfig; +declare namespace createPlugin { + var withOptions: (pluginFunction: (options?: T) => PluginFn, configFunction?: (options?: T) => Partial) => PluginWithOptions; +} + +export { createPlugin as default }; diff --git a/node_modules/tailwindcss/dist/plugin.js b/node_modules/tailwindcss/dist/plugin.js new file mode 100644 index 0000000..eca100c --- /dev/null +++ b/node_modules/tailwindcss/dist/plugin.js @@ -0,0 +1 @@ +"use strict";function g(i,n){return{handler:i,config:n}}g.withOptions=function(i,n=()=>({})){function t(o){return{handler:i(o),config:n(o)}}return t.__isOptionsFunction=!0,t};var u=g;module.exports=u; diff --git a/node_modules/tailwindcss/dist/plugin.mjs b/node_modules/tailwindcss/dist/plugin.mjs new file mode 100644 index 0000000..430fa25 --- /dev/null +++ b/node_modules/tailwindcss/dist/plugin.mjs @@ -0,0 +1 @@ +function g(i,n){return{handler:i,config:n}}g.withOptions=function(i,n=()=>({})){function t(o){return{handler:i(o),config:n(o)}}return t.__isOptionsFunction=!0,t};var u=g;export{u as default}; diff --git a/node_modules/tailwindcss/dist/resolve-config-BIFUA2FY.d.ts b/node_modules/tailwindcss/dist/resolve-config-BIFUA2FY.d.ts new file mode 100644 index 0000000..5d9dbe2 --- /dev/null +++ b/node_modules/tailwindcss/dist/resolve-config-BIFUA2FY.d.ts @@ -0,0 +1,29 @@ +import { _ as _default } from './colors-b_6i0Oi7.js'; + +type NamedUtilityValue = { + kind: 'named'; + /** + * ``` + * bg-red-500 + * ^^^^^^^ + * + * w-1/2 + * ^ + * ``` + */ + value: string; + /** + * ``` + * w-1/2 + * ^^^ + * ``` + */ + fraction: string | null; +}; + +type PluginUtils = { + theme: (keypath: string, defaultValue?: any) => any; + colors: typeof _default; +}; + +export type { NamedUtilityValue as N, PluginUtils as P }; diff --git a/node_modules/tailwindcss/dist/resolve-config-QUZ9b-Gn.d.mts b/node_modules/tailwindcss/dist/resolve-config-QUZ9b-Gn.d.mts new file mode 100644 index 0000000..e1cde16 --- /dev/null +++ b/node_modules/tailwindcss/dist/resolve-config-QUZ9b-Gn.d.mts @@ -0,0 +1,190 @@ +import _default from './colors.mjs'; + +type ArbitraryUtilityValue = { + kind: 'arbitrary'; + /** + * ``` + * bg-[color:var(--my-color)] + * ^^^^^ + * + * bg-(color:--my-color) + * ^^^^^ + * ``` + */ + dataType: string | null; + /** + * ``` + * bg-[#0088cc] + * ^^^^^^^ + * + * bg-[var(--my_variable)] + * ^^^^^^^^^^^^^^^^^^ + * + * bg-(--my_variable) + * ^^^^^^^^^^^^^^ + * ``` + */ + value: string; +}; +type NamedUtilityValue = { + kind: 'named'; + /** + * ``` + * bg-red-500 + * ^^^^^^^ + * + * w-1/2 + * ^ + * ``` + */ + value: string; + /** + * ``` + * w-1/2 + * ^^^ + * ``` + */ + fraction: string | null; +}; +type ArbitraryModifier = { + kind: 'arbitrary'; + /** + * ``` + * bg-red-500/[50%] + * ^^^ + * ``` + */ + value: string; +}; +type NamedModifier = { + kind: 'named'; + /** + * ``` + * bg-red-500/50 + * ^^ + * ``` + */ + value: string; +}; +type ArbitraryVariantValue = { + kind: 'arbitrary'; + value: string; +}; +type NamedVariantValue = { + kind: 'named'; + value: string; +}; +type Variant = +/** + * Arbitrary variants are variants that take a selector and generate a variant + * on the fly. + * + * E.g.: `[&_p]` + */ +{ + kind: 'arbitrary'; + selector: string; + relative: boolean; +} +/** + * Static variants are variants that don't take any arguments. + * + * E.g.: `hover` + */ + | { + kind: 'static'; + root: string; +} +/** + * Functional variants are variants that can take an argument. The argument is + * either a named variant value or an arbitrary variant value. + * + * E.g.: + * + * - `aria-disabled` + * - `aria-[disabled]` + * - `@container-size` -> @container, with named value `size` + * - `@container-[inline-size]` -> @container, with arbitrary variant value `inline-size` + * - `@container` -> @container, with no value + */ + | { + kind: 'functional'; + root: string; + value: ArbitraryVariantValue | NamedVariantValue | null; + modifier: ArbitraryModifier | NamedModifier | null; +} +/** + * Compound variants are variants that take another variant as an argument. + * + * E.g.: + * + * - `has-[&_p]` + * - `group-*` + * - `peer-*` + */ + | { + kind: 'compound'; + root: string; + modifier: ArbitraryModifier | NamedModifier | null; + variant: Variant; +}; +type Candidate = +/** + * Arbitrary candidates are candidates that register utilities on the fly with + * a property and a value. + * + * E.g.: + * + * - `[color:red]` + * - `[color:red]/50` + * - `[color:red]/50!` + */ +{ + kind: 'arbitrary'; + property: string; + value: string; + modifier: ArbitraryModifier | NamedModifier | null; + variants: Variant[]; + important: boolean; + raw: string; +} +/** + * Static candidates are candidates that don't take any arguments. + * + * E.g.: + * + * - `underline` + * - `box-border` + */ + | { + kind: 'static'; + root: string; + variants: Variant[]; + important: boolean; + raw: string; +} +/** + * Functional candidates are candidates that can take an argument. + * + * E.g.: + * + * - `bg-red-500` + * - `bg-[#0088cc]` + * - `w-1/2` + */ + | { + kind: 'functional'; + root: string; + value: ArbitraryUtilityValue | NamedUtilityValue | null; + modifier: ArbitraryModifier | NamedModifier | null; + variants: Variant[]; + important: boolean; + raw: string; +}; + +type PluginUtils = { + theme: (keypath: string, defaultValue?: any) => any; + colors: typeof _default; +}; + +export type { Candidate as C, NamedUtilityValue as N, PluginUtils as P, Variant as V }; diff --git a/node_modules/tailwindcss/dist/types-B254mqw1.d.mts b/node_modules/tailwindcss/dist/types-B254mqw1.d.mts new file mode 100644 index 0000000..b3ac7a9 --- /dev/null +++ b/node_modules/tailwindcss/dist/types-B254mqw1.d.mts @@ -0,0 +1,98 @@ +import { N as NamedUtilityValue, P as PluginUtils } from './resolve-config-QUZ9b-Gn.mjs'; + +type Config = UserConfig; +type PluginFn = (api: PluginAPI) => void; +type PluginWithConfig = { + handler: PluginFn; + config?: UserConfig; + /** @internal */ + reference?: boolean; +}; +type PluginWithOptions = { + (options?: T): PluginWithConfig; + __isOptionsFunction: true; +}; +type Plugin = PluginFn | PluginWithConfig | PluginWithOptions; +type PluginAPI = { + addBase(base: CssInJs): void; + addVariant(name: string, variant: string | string[] | CssInJs): void; + matchVariant(name: string, cb: (value: T | string, extra: { + modifier: string | null; + }) => string | string[], options?: { + values?: Record; + sort?(a: { + value: T | string; + modifier: string | null; + }, b: { + value: T | string; + modifier: string | null; + }): number; + }): void; + addUtilities(utilities: Record | Record[], options?: {}): void; + matchUtilities(utilities: Record CssInJs | CssInJs[]>, options?: Partial<{ + type: string | string[]; + supportsNegativeValues: boolean; + values: Record & { + __BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined; + }; + modifiers: 'any' | Record; + }>): void; + addComponents(utilities: Record | Record[], options?: {}): void; + matchComponents(utilities: Record CssInJs>, options?: Partial<{ + type: string | string[]; + supportsNegativeValues: boolean; + values: Record & { + __BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined; + }; + modifiers: 'any' | Record; + }>): void; + theme(path: string, defaultValue?: any): any; + config(path?: string, defaultValue?: any): any; + prefix(className: string): string; +}; +type CssInJs = { + [key: string]: string | string[] | CssInJs | CssInJs[]; +}; + +type ResolvableTo = T | ((utils: PluginUtils) => T); +type ThemeValue = ResolvableTo> | null | undefined; +type ThemeConfig = Record & { + extend?: Record; +}; +type ContentFile = string | { + raw: string; + extension?: string; +}; +type DarkModeStrategy = false | 'media' | 'class' | ['class', string] | 'selector' | ['selector', string] | ['variant', string | string[]]; +interface UserConfig { + presets?: UserConfig[]; + theme?: ThemeConfig; + plugins?: Plugin[]; +} +interface UserConfig { + content?: ContentFile[] | { + relative?: boolean; + files: ContentFile[]; + }; +} +interface UserConfig { + darkMode?: DarkModeStrategy; +} +interface UserConfig { + prefix?: string; +} +interface UserConfig { + blocklist?: string[]; +} +interface UserConfig { + important?: boolean | string; +} +interface UserConfig { + future?: 'all' | Record; +} + +export type { Config as C, Plugin as P, ThemeConfig as T, UserConfig as U, PluginFn as a, PluginWithConfig as b, PluginWithOptions as c, PluginAPI as d }; diff --git a/node_modules/tailwindcss/index.css b/node_modules/tailwindcss/index.css new file mode 100644 index 0000000..0792ea3 --- /dev/null +++ b/node_modules/tailwindcss/index.css @@ -0,0 +1,888 @@ +@layer theme, base, components, utilities; + +@layer theme { + @theme default { + --font-sans: + ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", + "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; + --font-mono: + ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", + "Courier New", monospace; + + --color-red-50: oklch(97.1% 0.013 17.38); + --color-red-100: oklch(93.6% 0.032 17.717); + --color-red-200: oklch(88.5% 0.062 18.334); + --color-red-300: oklch(80.8% 0.114 19.571); + --color-red-400: oklch(70.4% 0.191 22.216); + --color-red-500: oklch(63.7% 0.237 25.331); + --color-red-600: oklch(57.7% 0.245 27.325); + --color-red-700: oklch(50.5% 0.213 27.518); + --color-red-800: oklch(44.4% 0.177 26.899); + --color-red-900: oklch(39.6% 0.141 25.723); + --color-red-950: oklch(25.8% 0.092 26.042); + + --color-orange-50: oklch(98% 0.016 73.684); + --color-orange-100: oklch(95.4% 0.038 75.164); + --color-orange-200: oklch(90.1% 0.076 70.697); + --color-orange-300: oklch(83.7% 0.128 66.29); + --color-orange-400: oklch(75% 0.183 55.934); + --color-orange-500: oklch(70.5% 0.213 47.604); + --color-orange-600: oklch(64.6% 0.222 41.116); + --color-orange-700: oklch(55.3% 0.195 38.402); + --color-orange-800: oklch(47% 0.157 37.304); + --color-orange-900: oklch(40.8% 0.123 38.172); + --color-orange-950: oklch(26.6% 0.079 36.259); + + --color-amber-50: oklch(98.7% 0.022 95.277); + --color-amber-100: oklch(96.2% 0.059 95.617); + --color-amber-200: oklch(92.4% 0.12 95.746); + --color-amber-300: oklch(87.9% 0.169 91.605); + --color-amber-400: oklch(82.8% 0.189 84.429); + --color-amber-500: oklch(76.9% 0.188 70.08); + --color-amber-600: oklch(66.6% 0.179 58.318); + --color-amber-700: oklch(55.5% 0.163 48.998); + --color-amber-800: oklch(47.3% 0.137 46.201); + --color-amber-900: oklch(41.4% 0.112 45.904); + --color-amber-950: oklch(27.9% 0.077 45.635); + + --color-yellow-50: oklch(98.7% 0.026 102.212); + --color-yellow-100: oklch(97.3% 0.071 103.193); + --color-yellow-200: oklch(94.5% 0.129 101.54); + --color-yellow-300: oklch(90.5% 0.182 98.111); + --color-yellow-400: oklch(85.2% 0.199 91.936); + --color-yellow-500: oklch(79.5% 0.184 86.047); + --color-yellow-600: oklch(68.1% 0.162 75.834); + --color-yellow-700: oklch(55.4% 0.135 66.442); + --color-yellow-800: oklch(47.6% 0.114 61.907); + --color-yellow-900: oklch(42.1% 0.095 57.708); + --color-yellow-950: oklch(28.6% 0.066 53.813); + + --color-lime-50: oklch(98.6% 0.031 120.757); + --color-lime-100: oklch(96.7% 0.067 122.328); + --color-lime-200: oklch(93.8% 0.127 124.321); + --color-lime-300: oklch(89.7% 0.196 126.665); + --color-lime-400: oklch(84.1% 0.238 128.85); + --color-lime-500: oklch(76.8% 0.233 130.85); + --color-lime-600: oklch(64.8% 0.2 131.684); + --color-lime-700: oklch(53.2% 0.157 131.589); + --color-lime-800: oklch(45.3% 0.124 130.933); + --color-lime-900: oklch(40.5% 0.101 131.063); + --color-lime-950: oklch(27.4% 0.072 132.109); + + --color-green-50: oklch(98.2% 0.018 155.826); + --color-green-100: oklch(96.2% 0.044 156.743); + --color-green-200: oklch(92.5% 0.084 155.995); + --color-green-300: oklch(87.1% 0.15 154.449); + --color-green-400: oklch(79.2% 0.209 151.711); + --color-green-500: oklch(72.3% 0.219 149.579); + --color-green-600: oklch(62.7% 0.194 149.214); + --color-green-700: oklch(52.7% 0.154 150.069); + --color-green-800: oklch(44.8% 0.119 151.328); + --color-green-900: oklch(39.3% 0.095 152.535); + --color-green-950: oklch(26.6% 0.065 152.934); + + --color-emerald-50: oklch(97.9% 0.021 166.113); + --color-emerald-100: oklch(95% 0.052 163.051); + --color-emerald-200: oklch(90.5% 0.093 164.15); + --color-emerald-300: oklch(84.5% 0.143 164.978); + --color-emerald-400: oklch(76.5% 0.177 163.223); + --color-emerald-500: oklch(69.6% 0.17 162.48); + --color-emerald-600: oklch(59.6% 0.145 163.225); + --color-emerald-700: oklch(50.8% 0.118 165.612); + --color-emerald-800: oklch(43.2% 0.095 166.913); + --color-emerald-900: oklch(37.8% 0.077 168.94); + --color-emerald-950: oklch(26.2% 0.051 172.552); + + --color-teal-50: oklch(98.4% 0.014 180.72); + --color-teal-100: oklch(95.3% 0.051 180.801); + --color-teal-200: oklch(91% 0.096 180.426); + --color-teal-300: oklch(85.5% 0.138 181.071); + --color-teal-400: oklch(77.7% 0.152 181.912); + --color-teal-500: oklch(70.4% 0.14 182.503); + --color-teal-600: oklch(60% 0.118 184.704); + --color-teal-700: oklch(51.1% 0.096 186.391); + --color-teal-800: oklch(43.7% 0.078 188.216); + --color-teal-900: oklch(38.6% 0.063 188.416); + --color-teal-950: oklch(27.7% 0.046 192.524); + + --color-cyan-50: oklch(98.4% 0.019 200.873); + --color-cyan-100: oklch(95.6% 0.045 203.388); + --color-cyan-200: oklch(91.7% 0.08 205.041); + --color-cyan-300: oklch(86.5% 0.127 207.078); + --color-cyan-400: oklch(78.9% 0.154 211.53); + --color-cyan-500: oklch(71.5% 0.143 215.221); + --color-cyan-600: oklch(60.9% 0.126 221.723); + --color-cyan-700: oklch(52% 0.105 223.128); + --color-cyan-800: oklch(45% 0.085 224.283); + --color-cyan-900: oklch(39.8% 0.07 227.392); + --color-cyan-950: oklch(30.2% 0.056 229.695); + + --color-sky-50: oklch(97.7% 0.013 236.62); + --color-sky-100: oklch(95.1% 0.026 236.824); + --color-sky-200: oklch(90.1% 0.058 230.902); + --color-sky-300: oklch(82.8% 0.111 230.318); + --color-sky-400: oklch(74.6% 0.16 232.661); + --color-sky-500: oklch(68.5% 0.169 237.323); + --color-sky-600: oklch(58.8% 0.158 241.966); + --color-sky-700: oklch(50% 0.134 242.749); + --color-sky-800: oklch(44.3% 0.11 240.79); + --color-sky-900: oklch(39.1% 0.09 240.876); + --color-sky-950: oklch(29.3% 0.066 243.157); + + --color-blue-50: oklch(97% 0.014 254.604); + --color-blue-100: oklch(93.2% 0.032 255.585); + --color-blue-200: oklch(88.2% 0.059 254.128); + --color-blue-300: oklch(80.9% 0.105 251.813); + --color-blue-400: oklch(70.7% 0.165 254.624); + --color-blue-500: oklch(62.3% 0.214 259.815); + --color-blue-600: oklch(54.6% 0.245 262.881); + --color-blue-700: oklch(48.8% 0.243 264.376); + --color-blue-800: oklch(42.4% 0.199 265.638); + --color-blue-900: oklch(37.9% 0.146 265.522); + --color-blue-950: oklch(28.2% 0.091 267.935); + + --color-indigo-50: oklch(96.2% 0.018 272.314); + --color-indigo-100: oklch(93% 0.034 272.788); + --color-indigo-200: oklch(87% 0.065 274.039); + --color-indigo-300: oklch(78.5% 0.115 274.713); + --color-indigo-400: oklch(67.3% 0.182 276.935); + --color-indigo-500: oklch(58.5% 0.233 277.117); + --color-indigo-600: oklch(51.1% 0.262 276.966); + --color-indigo-700: oklch(45.7% 0.24 277.023); + --color-indigo-800: oklch(39.8% 0.195 277.366); + --color-indigo-900: oklch(35.9% 0.144 278.697); + --color-indigo-950: oklch(25.7% 0.09 281.288); + + --color-violet-50: oklch(96.9% 0.016 293.756); + --color-violet-100: oklch(94.3% 0.029 294.588); + --color-violet-200: oklch(89.4% 0.057 293.283); + --color-violet-300: oklch(81.1% 0.111 293.571); + --color-violet-400: oklch(70.2% 0.183 293.541); + --color-violet-500: oklch(60.6% 0.25 292.717); + --color-violet-600: oklch(54.1% 0.281 293.009); + --color-violet-700: oklch(49.1% 0.27 292.581); + --color-violet-800: oklch(43.2% 0.232 292.759); + --color-violet-900: oklch(38% 0.189 293.745); + --color-violet-950: oklch(28.3% 0.141 291.089); + + --color-purple-50: oklch(97.7% 0.014 308.299); + --color-purple-100: oklch(94.6% 0.033 307.174); + --color-purple-200: oklch(90.2% 0.063 306.703); + --color-purple-300: oklch(82.7% 0.119 306.383); + --color-purple-400: oklch(71.4% 0.203 305.504); + --color-purple-500: oklch(62.7% 0.265 303.9); + --color-purple-600: oklch(55.8% 0.288 302.321); + --color-purple-700: oklch(49.6% 0.265 301.924); + --color-purple-800: oklch(43.8% 0.218 303.724); + --color-purple-900: oklch(38.1% 0.176 304.987); + --color-purple-950: oklch(29.1% 0.149 302.717); + + --color-fuchsia-50: oklch(97.7% 0.017 320.058); + --color-fuchsia-100: oklch(95.2% 0.037 318.852); + --color-fuchsia-200: oklch(90.3% 0.076 319.62); + --color-fuchsia-300: oklch(83.3% 0.145 321.434); + --color-fuchsia-400: oklch(74% 0.238 322.16); + --color-fuchsia-500: oklch(66.7% 0.295 322.15); + --color-fuchsia-600: oklch(59.1% 0.293 322.896); + --color-fuchsia-700: oklch(51.8% 0.253 323.949); + --color-fuchsia-800: oklch(45.2% 0.211 324.591); + --color-fuchsia-900: oklch(40.1% 0.17 325.612); + --color-fuchsia-950: oklch(29.3% 0.136 325.661); + + --color-pink-50: oklch(97.1% 0.014 343.198); + --color-pink-100: oklch(94.8% 0.028 342.258); + --color-pink-200: oklch(89.9% 0.061 343.231); + --color-pink-300: oklch(82.3% 0.12 346.018); + --color-pink-400: oklch(71.8% 0.202 349.761); + --color-pink-500: oklch(65.6% 0.241 354.308); + --color-pink-600: oklch(59.2% 0.249 0.584); + --color-pink-700: oklch(52.5% 0.223 3.958); + --color-pink-800: oklch(45.9% 0.187 3.815); + --color-pink-900: oklch(40.8% 0.153 2.432); + --color-pink-950: oklch(28.4% 0.109 3.907); + + --color-rose-50: oklch(96.9% 0.015 12.422); + --color-rose-100: oklch(94.1% 0.03 12.58); + --color-rose-200: oklch(89.2% 0.058 10.001); + --color-rose-300: oklch(81% 0.117 11.638); + --color-rose-400: oklch(71.2% 0.194 13.428); + --color-rose-500: oklch(64.5% 0.246 16.439); + --color-rose-600: oklch(58.6% 0.253 17.585); + --color-rose-700: oklch(51.4% 0.222 16.935); + --color-rose-800: oklch(45.5% 0.188 13.697); + --color-rose-900: oklch(41% 0.159 10.272); + --color-rose-950: oklch(27.1% 0.105 12.094); + + --color-slate-50: oklch(98.4% 0.003 247.858); + --color-slate-100: oklch(96.8% 0.007 247.896); + --color-slate-200: oklch(92.9% 0.013 255.508); + --color-slate-300: oklch(86.9% 0.022 252.894); + --color-slate-400: oklch(70.4% 0.04 256.788); + --color-slate-500: oklch(55.4% 0.046 257.417); + --color-slate-600: oklch(44.6% 0.043 257.281); + --color-slate-700: oklch(37.2% 0.044 257.287); + --color-slate-800: oklch(27.9% 0.041 260.031); + --color-slate-900: oklch(20.8% 0.042 265.755); + --color-slate-950: oklch(12.9% 0.042 264.695); + + --color-gray-50: oklch(98.5% 0.002 247.839); + --color-gray-100: oklch(96.7% 0.003 264.542); + --color-gray-200: oklch(92.8% 0.006 264.531); + --color-gray-300: oklch(87.2% 0.01 258.338); + --color-gray-400: oklch(70.7% 0.022 261.325); + --color-gray-500: oklch(55.1% 0.027 264.364); + --color-gray-600: oklch(44.6% 0.03 256.802); + --color-gray-700: oklch(37.3% 0.034 259.733); + --color-gray-800: oklch(27.8% 0.033 256.848); + --color-gray-900: oklch(21% 0.034 264.665); + --color-gray-950: oklch(13% 0.028 261.692); + + --color-zinc-50: oklch(98.5% 0 0); + --color-zinc-100: oklch(96.7% 0.001 286.375); + --color-zinc-200: oklch(92% 0.004 286.32); + --color-zinc-300: oklch(87.1% 0.006 286.286); + --color-zinc-400: oklch(70.5% 0.015 286.067); + --color-zinc-500: oklch(55.2% 0.016 285.938); + --color-zinc-600: oklch(44.2% 0.017 285.786); + --color-zinc-700: oklch(37% 0.013 285.805); + --color-zinc-800: oklch(27.4% 0.006 286.033); + --color-zinc-900: oklch(21% 0.006 285.885); + --color-zinc-950: oklch(14.1% 0.005 285.823); + + --color-neutral-50: oklch(98.5% 0 0); + --color-neutral-100: oklch(97% 0 0); + --color-neutral-200: oklch(92.2% 0 0); + --color-neutral-300: oklch(87% 0 0); + --color-neutral-400: oklch(70.8% 0 0); + --color-neutral-500: oklch(55.6% 0 0); + --color-neutral-600: oklch(43.9% 0 0); + --color-neutral-700: oklch(37.1% 0 0); + --color-neutral-800: oklch(26.9% 0 0); + --color-neutral-900: oklch(20.5% 0 0); + --color-neutral-950: oklch(14.5% 0 0); + + --color-stone-50: oklch(98.5% 0.001 106.423); + --color-stone-100: oklch(97% 0.001 106.424); + --color-stone-200: oklch(92.3% 0.003 48.717); + --color-stone-300: oklch(86.9% 0.005 56.366); + --color-stone-400: oklch(70.9% 0.01 56.259); + --color-stone-500: oklch(55.3% 0.013 58.071); + --color-stone-600: oklch(44.4% 0.011 73.639); + --color-stone-700: oklch(37.4% 0.01 67.558); + --color-stone-800: oklch(26.8% 0.007 34.298); + --color-stone-900: oklch(21.6% 0.006 56.043); + --color-stone-950: oklch(14.7% 0.004 49.25); + + --color-black: #000; + --color-white: #fff; + + --spacing: 0.25rem; + + --breakpoint-sm: 40rem; + --breakpoint-md: 48rem; + --breakpoint-lg: 64rem; + --breakpoint-xl: 80rem; + --breakpoint-2xl: 96rem; + + --container-3xs: 16rem; + --container-2xs: 18rem; + --container-xs: 20rem; + --container-sm: 24rem; + --container-md: 28rem; + --container-lg: 32rem; + --container-xl: 36rem; + --container-2xl: 42rem; + --container-3xl: 48rem; + --container-4xl: 56rem; + --container-5xl: 64rem; + --container-6xl: 72rem; + --container-7xl: 80rem; + + --text-xs: 0.75rem; + --text-xs--line-height: calc(1 / 0.75); + --text-sm: 0.875rem; + --text-sm--line-height: calc(1.25 / 0.875); + --text-base: 1rem; + --text-base--line-height: calc(1.5 / 1); + --text-lg: 1.125rem; + --text-lg--line-height: calc(1.75 / 1.125); + --text-xl: 1.25rem; + --text-xl--line-height: calc(1.75 / 1.25); + --text-2xl: 1.5rem; + --text-2xl--line-height: calc(2 / 1.5); + --text-3xl: 1.875rem; + --text-3xl--line-height: calc(2.25 / 1.875); + --text-4xl: 2.25rem; + --text-4xl--line-height: calc(2.5 / 2.25); + --text-5xl: 3rem; + --text-5xl--line-height: 1; + --text-6xl: 3.75rem; + --text-6xl--line-height: 1; + --text-7xl: 4.5rem; + --text-7xl--line-height: 1; + --text-8xl: 6rem; + --text-8xl--line-height: 1; + --text-9xl: 8rem; + --text-9xl--line-height: 1; + + --font-weight-thin: 100; + --font-weight-extralight: 200; + --font-weight-light: 300; + --font-weight-normal: 400; + --font-weight-medium: 500; + --font-weight-semibold: 600; + --font-weight-bold: 700; + --font-weight-extrabold: 800; + --font-weight-black: 900; + + --tracking-tighter: -0.05em; + --tracking-tight: -0.025em; + --tracking-normal: 0em; + --tracking-wide: 0.025em; + --tracking-wider: 0.05em; + --tracking-widest: 0.1em; + + --leading-tight: 1.25; + --leading-snug: 1.375; + --leading-normal: 1.5; + --leading-relaxed: 1.625; + --leading-loose: 2; + + --radius-xs: 0.125rem; + --radius-sm: 0.25rem; + --radius-md: 0.375rem; + --radius-lg: 0.5rem; + --radius-xl: 0.75rem; + --radius-2xl: 1rem; + --radius-3xl: 1.5rem; + --radius-4xl: 2rem; + + --shadow-2xs: 0 1px rgb(0 0 0 / 0.05); + --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05); + --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --shadow-md: + 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); + --shadow-lg: + 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); + --shadow-xl: + 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); + --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25); + + --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / 0.05); + --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / 0.05); + --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / 0.05); + + --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / 0.05); + --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.15); + --drop-shadow-md: 0 3px 3px rgb(0 0 0 / 0.12); + --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / 0.15); + --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / 0.1); + --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / 0.15); + + --text-shadow-2xs: 0px 1px 0px rgb(0 0 0 / 0.15); + --text-shadow-xs: 0px 1px 1px rgb(0 0 0 / 0.2); + --text-shadow-sm: + 0px 1px 0px rgb(0 0 0 / 0.075), 0px 1px 1px rgb(0 0 0 / 0.075), + 0px 2px 2px rgb(0 0 0 / 0.075); + --text-shadow-md: + 0px 1px 1px rgb(0 0 0 / 0.1), 0px 1px 2px rgb(0 0 0 / 0.1), + 0px 2px 4px rgb(0 0 0 / 0.1); + --text-shadow-lg: + 0px 1px 2px rgb(0 0 0 / 0.1), 0px 3px 2px rgb(0 0 0 / 0.1), + 0px 4px 8px rgb(0 0 0 / 0.1); + + --ease-in: cubic-bezier(0.4, 0, 1, 1); + --ease-out: cubic-bezier(0, 0, 0.2, 1); + --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1); + + --animate-spin: spin 1s linear infinite; + --animate-ping: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; + --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; + --animate-bounce: bounce 1s infinite; + + @keyframes spin { + to { + transform: rotate(360deg); + } + } + + @keyframes ping { + 75%, + 100% { + transform: scale(2); + opacity: 0; + } + } + + @keyframes pulse { + 50% { + opacity: 0.5; + } + } + + @keyframes bounce { + 0%, + 100% { + transform: translateY(-25%); + animation-timing-function: cubic-bezier(0.8, 0, 1, 1); + } + + 50% { + transform: none; + animation-timing-function: cubic-bezier(0, 0, 0.2, 1); + } + } + + --blur-xs: 4px; + --blur-sm: 8px; + --blur-md: 12px; + --blur-lg: 16px; + --blur-xl: 24px; + --blur-2xl: 40px; + --blur-3xl: 64px; + + --perspective-dramatic: 100px; + --perspective-near: 300px; + --perspective-normal: 500px; + --perspective-midrange: 800px; + --perspective-distant: 1200px; + + --aspect-video: 16 / 9; + + --default-transition-duration: 150ms; + --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + --default-font-family: --theme(--font-sans, initial); + --default-font-feature-settings: --theme( + --font-sans--font-feature-settings, + initial + ); + --default-font-variation-settings: --theme( + --font-sans--font-variation-settings, + initial + ); + --default-mono-font-family: --theme(--font-mono, initial); + --default-mono-font-feature-settings: --theme( + --font-mono--font-feature-settings, + initial + ); + --default-mono-font-variation-settings: --theme( + --font-mono--font-variation-settings, + initial + ); + } + + /* Deprecated */ + @theme default inline reference { + --blur: 8px; + --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); + --drop-shadow: 0 1px 2px rgb(0 0 0 / 0.1), 0 1px 1px rgb(0 0 0 / 0.06); + --radius: 0.25rem; + --max-width-prose: 65ch; + } +} + +@layer base { + /* + 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) + 2. Remove default margins and padding + 3. Reset all borders. +*/ + + *, + ::after, + ::before, + ::backdrop, + ::file-selector-button { + box-sizing: border-box; /* 1 */ + margin: 0; /* 2 */ + padding: 0; /* 2 */ + border: 0 solid; /* 3 */ + } + + /* + 1. Use a consistent sensible line-height in all browsers. + 2. Prevent adjustments of font size after orientation changes in iOS. + 3. Use a more readable tab size. + 4. Use the user's configured `sans` font-family by default. + 5. Use the user's configured `sans` font-feature-settings by default. + 6. Use the user's configured `sans` font-variation-settings by default. + 7. Disable tap highlights on iOS. +*/ + + html, + :host { + line-height: 1.5; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ + tab-size: 4; /* 3 */ + font-family: --theme( + --default-font-family, + ui-sans-serif, + system-ui, + sans-serif, + "Apple Color Emoji", + "Segoe UI Emoji", + "Segoe UI Symbol", + "Noto Color Emoji" + ); /* 4 */ + font-feature-settings: --theme( + --default-font-feature-settings, + normal + ); /* 5 */ + font-variation-settings: --theme( + --default-font-variation-settings, + normal + ); /* 6 */ + -webkit-tap-highlight-color: transparent; /* 7 */ + } + + /* + 1. Add the correct height in Firefox. + 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) + 3. Reset the default border style to a 1px solid border. +*/ + + hr { + height: 0; /* 1 */ + color: inherit; /* 2 */ + border-top-width: 1px; /* 3 */ + } + + /* + Add the correct text decoration in Chrome, Edge, and Safari. +*/ + + abbr:where([title]) { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + + /* + Remove the default font size and weight for headings. +*/ + + h1, + h2, + h3, + h4, + h5, + h6 { + font-size: inherit; + font-weight: inherit; + } + + /* + Reset links to optimize for opt-in styling instead of opt-out. +*/ + + a { + color: inherit; + -webkit-text-decoration: inherit; + text-decoration: inherit; + } + + /* + Add the correct font weight in Edge and Safari. +*/ + + b, + strong { + font-weight: bolder; + } + + /* + 1. Use the user's configured `mono` font-family by default. + 2. Use the user's configured `mono` font-feature-settings by default. + 3. Use the user's configured `mono` font-variation-settings by default. + 4. Correct the odd `em` font sizing in all browsers. +*/ + + code, + kbd, + samp, + pre { + font-family: --theme( + --default-mono-font-family, + ui-monospace, + SFMono-Regular, + Menlo, + Monaco, + Consolas, + "Liberation Mono", + "Courier New", + monospace + ); /* 1 */ + font-feature-settings: --theme( + --default-mono-font-feature-settings, + normal + ); /* 2 */ + font-variation-settings: --theme( + --default-mono-font-variation-settings, + normal + ); /* 3 */ + font-size: 1em; /* 4 */ + } + + /* + Add the correct font size in all browsers. +*/ + + small { + font-size: 80%; + } + + /* + Prevent `sub` and `sup` elements from affecting the line height in all browsers. +*/ + + sub, + sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + + sub { + bottom: -0.25em; + } + + sup { + top: -0.5em; + } + + /* + 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) + 2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) + 3. Remove gaps between table borders by default. +*/ + + table { + text-indent: 0; /* 1 */ + border-color: inherit; /* 2 */ + border-collapse: collapse; /* 3 */ + } + + /* + Use the modern Firefox focus style for all focusable elements. +*/ + + :-moz-focusring { + outline: auto; + } + + /* + Add the correct vertical alignment in Chrome and Firefox. +*/ + + progress { + vertical-align: baseline; + } + + /* + Add the correct display in Chrome and Safari. +*/ + + summary { + display: list-item; + } + + /* + Make lists unstyled by default. +*/ + + ol, + ul, + menu { + list-style: none; + } + + /* + 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) + 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) + This can trigger a poorly considered lint error in some tools but is included by design. +*/ + + img, + svg, + video, + canvas, + audio, + iframe, + embed, + object { + display: block; /* 1 */ + vertical-align: middle; /* 2 */ + } + + /* + Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) +*/ + + img, + video { + max-width: 100%; + height: auto; + } + + /* + 1. Inherit font styles in all browsers. + 2. Remove border radius in all browsers. + 3. Remove background color in all browsers. + 4. Ensure consistent opacity for disabled states in all browsers. +*/ + + button, + input, + select, + optgroup, + textarea, + ::file-selector-button { + font: inherit; /* 1 */ + font-feature-settings: inherit; /* 1 */ + font-variation-settings: inherit; /* 1 */ + letter-spacing: inherit; /* 1 */ + color: inherit; /* 1 */ + border-radius: 0; /* 2 */ + background-color: transparent; /* 3 */ + opacity: 1; /* 4 */ + } + + /* + Restore default font weight. +*/ + + :where(select:is([multiple], [size])) optgroup { + font-weight: bolder; + } + + /* + Restore indentation. +*/ + + :where(select:is([multiple], [size])) optgroup option { + padding-inline-start: 20px; + } + + /* + Restore space after button. +*/ + + ::file-selector-button { + margin-inline-end: 4px; + } + + /* + Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) +*/ + + ::placeholder { + opacity: 1; + } + + /* + Set the default placeholder color to a semi-transparent version of the current text color in browsers that do not + crash when using `color-mix(…)` with `currentcolor`. (https://github.com/tailwindlabs/tailwindcss/issues/17194) +*/ + + @supports (not (-webkit-appearance: -apple-pay-button)) /* Not Safari */ or + (contain-intrinsic-size: 1px) /* Safari 17+ */ { + ::placeholder { + color: color-mix(in oklab, currentcolor 50%, transparent); + } + } + + /* + Prevent resizing textareas horizontally by default. +*/ + + textarea { + resize: vertical; + } + + /* + Remove the inner padding in Chrome and Safari on macOS. +*/ + + ::-webkit-search-decoration { + -webkit-appearance: none; + } + + /* + 1. Ensure date/time inputs have the same height when empty in iOS Safari. + 2. Ensure text alignment can be changed on date/time inputs in iOS Safari. +*/ + + ::-webkit-date-and-time-value { + min-height: 1lh; /* 1 */ + text-align: inherit; /* 2 */ + } + + /* + Prevent height from changing on date/time inputs in macOS Safari when the input is set to `display: block`. +*/ + + ::-webkit-datetime-edit { + display: inline-flex; + } + + /* + Remove excess padding from pseudo-elements in date/time inputs to ensure consistent height across browsers. +*/ + + ::-webkit-datetime-edit-fields-wrapper { + padding: 0; + } + + ::-webkit-datetime-edit, + ::-webkit-datetime-edit-year-field, + ::-webkit-datetime-edit-month-field, + ::-webkit-datetime-edit-day-field, + ::-webkit-datetime-edit-hour-field, + ::-webkit-datetime-edit-minute-field, + ::-webkit-datetime-edit-second-field, + ::-webkit-datetime-edit-millisecond-field, + ::-webkit-datetime-edit-meridiem-field { + padding-block: 0; + } + + /* + Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) +*/ + + :-moz-ui-invalid { + box-shadow: none; + } + + /* + Correct the inability to style the border radius in iOS Safari. +*/ + + button, + input:where([type="button"], [type="reset"], [type="submit"]), + ::file-selector-button { + appearance: button; + } + + /* + Correct the cursor style of increment and decrement buttons in Safari. +*/ + + ::-webkit-inner-spin-button, + ::-webkit-outer-spin-button { + height: auto; + } + + /* + Make elements with the HTML hidden attribute stay hidden by default. +*/ + + [hidden]:where(:not([hidden="until-found"])) { + display: none !important; + } +} + +@layer utilities { + @tailwind utilities; +} diff --git a/node_modules/tailwindcss/package.json b/node_modules/tailwindcss/package.json new file mode 100644 index 0000000..0504f66 --- /dev/null +++ b/node_modules/tailwindcss/package.json @@ -0,0 +1,86 @@ +{ + "name": "tailwindcss", + "version": "4.1.5", + "description": "A utility-first CSS framework for rapidly building custom user interfaces.", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/tailwindlabs/tailwindcss.git", + "directory": "packages/tailwindcss" + }, + "bugs": "https://github.com/tailwindlabs/tailwindcss/issues", + "homepage": "https://tailwindcss.com", + "exports": { + ".": { + "types": "./dist/lib.d.mts", + "style": "./index.css", + "require": "./dist/lib.js", + "import": "./dist/lib.mjs" + }, + "./plugin": { + "require": "./dist/plugin.js", + "import": "./dist/plugin.mjs" + }, + "./plugin.js": { + "require": "./dist/plugin.js", + "import": "./dist/plugin.mjs" + }, + "./defaultTheme": { + "require": "./dist/default-theme.js", + "import": "./dist/default-theme.mjs" + }, + "./defaultTheme.js": { + "require": "./dist/default-theme.js", + "import": "./dist/default-theme.mjs" + }, + "./colors": { + "require": "./dist/colors.js", + "import": "./dist/colors.mjs" + }, + "./colors.js": { + "require": "./dist/colors.js", + "import": "./dist/colors.mjs" + }, + "./lib/util/flattenColorPalette": { + "require": "./dist/flatten-color-palette.js", + "import": "./dist/flatten-color-palette.mjs" + }, + "./lib/util/flattenColorPalette.js": { + "require": "./dist/flatten-color-palette.js", + "import": "./dist/flatten-color-palette.mjs" + }, + "./package.json": "./package.json", + "./index.css": "./index.css", + "./index": "./index.css", + "./preflight.css": "./preflight.css", + "./preflight": "./preflight.css", + "./theme.css": "./theme.css", + "./theme": "./theme.css", + "./utilities.css": "./utilities.css", + "./utilities": "./utilities.css" + }, + "publishConfig": { + "provenance": true, + "access": "public" + }, + "style": "index.css", + "files": [ + "dist", + "index.css", + "preflight.css", + "theme.css", + "utilities.css" + ], + "devDependencies": { + "@types/node": "^20.14.8", + "lightningcss": "1.29.2", + "dedent": "1.5.3", + "@tailwindcss/oxide": "^4.1.5" + }, + "scripts": { + "lint": "tsc --noEmit", + "build": "tsup-node --env.NODE_ENV production", + "dev": "tsup-node --env.NODE_ENV development --watch", + "test:ui": "playwright test" + } +} \ No newline at end of file diff --git a/node_modules/tailwindcss/preflight.css b/node_modules/tailwindcss/preflight.css new file mode 100644 index 0000000..0976a40 --- /dev/null +++ b/node_modules/tailwindcss/preflight.css @@ -0,0 +1,385 @@ +/* + 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) + 2. Remove default margins and padding + 3. Reset all borders. +*/ + +*, +::after, +::before, +::backdrop, +::file-selector-button { + box-sizing: border-box; /* 1 */ + margin: 0; /* 2 */ + padding: 0; /* 2 */ + border: 0 solid; /* 3 */ +} + +/* + 1. Use a consistent sensible line-height in all browsers. + 2. Prevent adjustments of font size after orientation changes in iOS. + 3. Use a more readable tab size. + 4. Use the user's configured `sans` font-family by default. + 5. Use the user's configured `sans` font-feature-settings by default. + 6. Use the user's configured `sans` font-variation-settings by default. + 7. Disable tap highlights on iOS. +*/ + +html, +:host { + line-height: 1.5; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ + tab-size: 4; /* 3 */ + font-family: --theme( + --default-font-family, + ui-sans-serif, + system-ui, + sans-serif, + 'Apple Color Emoji', + 'Segoe UI Emoji', + 'Segoe UI Symbol', + 'Noto Color Emoji' + ); /* 4 */ + font-feature-settings: --theme(--default-font-feature-settings, normal); /* 5 */ + font-variation-settings: --theme(--default-font-variation-settings, normal); /* 6 */ + -webkit-tap-highlight-color: transparent; /* 7 */ +} + +/* + 1. Add the correct height in Firefox. + 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) + 3. Reset the default border style to a 1px solid border. +*/ + +hr { + height: 0; /* 1 */ + color: inherit; /* 2 */ + border-top-width: 1px; /* 3 */ +} + +/* + Add the correct text decoration in Chrome, Edge, and Safari. +*/ + +abbr:where([title]) { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; +} + +/* + Remove the default font size and weight for headings. +*/ + +h1, +h2, +h3, +h4, +h5, +h6 { + font-size: inherit; + font-weight: inherit; +} + +/* + Reset links to optimize for opt-in styling instead of opt-out. +*/ + +a { + color: inherit; + -webkit-text-decoration: inherit; + text-decoration: inherit; +} + +/* + Add the correct font weight in Edge and Safari. +*/ + +b, +strong { + font-weight: bolder; +} + +/* + 1. Use the user's configured `mono` font-family by default. + 2. Use the user's configured `mono` font-feature-settings by default. + 3. Use the user's configured `mono` font-variation-settings by default. + 4. Correct the odd `em` font sizing in all browsers. +*/ + +code, +kbd, +samp, +pre { + font-family: --theme( + --default-mono-font-family, + ui-monospace, + SFMono-Regular, + Menlo, + Monaco, + Consolas, + 'Liberation Mono', + 'Courier New', + monospace + ); /* 1 */ + font-feature-settings: --theme(--default-mono-font-feature-settings, normal); /* 2 */ + font-variation-settings: --theme(--default-mono-font-variation-settings, normal); /* 3 */ + font-size: 1em; /* 4 */ +} + +/* + Add the correct font size in all browsers. +*/ + +small { + font-size: 80%; +} + +/* + Prevent `sub` and `sup` elements from affecting the line height in all browsers. +*/ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* + 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) + 2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) + 3. Remove gaps between table borders by default. +*/ + +table { + text-indent: 0; /* 1 */ + border-color: inherit; /* 2 */ + border-collapse: collapse; /* 3 */ +} + +/* + Use the modern Firefox focus style for all focusable elements. +*/ + +:-moz-focusring { + outline: auto; +} + +/* + Add the correct vertical alignment in Chrome and Firefox. +*/ + +progress { + vertical-align: baseline; +} + +/* + Add the correct display in Chrome and Safari. +*/ + +summary { + display: list-item; +} + +/* + Make lists unstyled by default. +*/ + +ol, +ul, +menu { + list-style: none; +} + +/* + 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) + 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) + This can trigger a poorly considered lint error in some tools but is included by design. +*/ + +img, +svg, +video, +canvas, +audio, +iframe, +embed, +object { + display: block; /* 1 */ + vertical-align: middle; /* 2 */ +} + +/* + Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) +*/ + +img, +video { + max-width: 100%; + height: auto; +} + +/* + 1. Inherit font styles in all browsers. + 2. Remove border radius in all browsers. + 3. Remove background color in all browsers. + 4. Ensure consistent opacity for disabled states in all browsers. +*/ + +button, +input, +select, +optgroup, +textarea, +::file-selector-button { + font: inherit; /* 1 */ + font-feature-settings: inherit; /* 1 */ + font-variation-settings: inherit; /* 1 */ + letter-spacing: inherit; /* 1 */ + color: inherit; /* 1 */ + border-radius: 0; /* 2 */ + background-color: transparent; /* 3 */ + opacity: 1; /* 4 */ +} + +/* + Restore default font weight. +*/ + +:where(select:is([multiple], [size])) optgroup { + font-weight: bolder; +} + +/* + Restore indentation. +*/ + +:where(select:is([multiple], [size])) optgroup option { + padding-inline-start: 20px; +} + +/* + Restore space after button. +*/ + +::file-selector-button { + margin-inline-end: 4px; +} + +/* + Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) +*/ + +::placeholder { + opacity: 1; +} + +/* + Set the default placeholder color to a semi-transparent version of the current text color in browsers that do not + crash when using `color-mix(…)` with `currentcolor`. (https://github.com/tailwindlabs/tailwindcss/issues/17194) +*/ + +@supports (not (-webkit-appearance: -apple-pay-button)) /* Not Safari */ or + (contain-intrinsic-size: 1px) /* Safari 17+ */ { + ::placeholder { + color: color-mix(in oklab, currentcolor 50%, transparent); + } +} + +/* + Prevent resizing textareas horizontally by default. +*/ + +textarea { + resize: vertical; +} + +/* + Remove the inner padding in Chrome and Safari on macOS. +*/ + +::-webkit-search-decoration { + -webkit-appearance: none; +} + +/* + 1. Ensure date/time inputs have the same height when empty in iOS Safari. + 2. Ensure text alignment can be changed on date/time inputs in iOS Safari. +*/ + +::-webkit-date-and-time-value { + min-height: 1lh; /* 1 */ + text-align: inherit; /* 2 */ +} + +/* + Prevent height from changing on date/time inputs in macOS Safari when the input is set to `display: block`. +*/ + +::-webkit-datetime-edit { + display: inline-flex; +} + +/* + Remove excess padding from pseudo-elements in date/time inputs to ensure consistent height across browsers. +*/ + +::-webkit-datetime-edit-fields-wrapper { + padding: 0; +} + +::-webkit-datetime-edit, +::-webkit-datetime-edit-year-field, +::-webkit-datetime-edit-month-field, +::-webkit-datetime-edit-day-field, +::-webkit-datetime-edit-hour-field, +::-webkit-datetime-edit-minute-field, +::-webkit-datetime-edit-second-field, +::-webkit-datetime-edit-millisecond-field, +::-webkit-datetime-edit-meridiem-field { + padding-block: 0; +} + +/* + Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) +*/ + +:-moz-ui-invalid { + box-shadow: none; +} + +/* + Correct the inability to style the border radius in iOS Safari. +*/ + +button, +input:where([type='button'], [type='reset'], [type='submit']), +::file-selector-button { + appearance: button; +} + +/* + Correct the cursor style of increment and decrement buttons in Safari. +*/ + +::-webkit-inner-spin-button, +::-webkit-outer-spin-button { + height: auto; +} + +/* + Make elements with the HTML hidden attribute stay hidden by default. +*/ + +[hidden]:where(:not([hidden='until-found'])) { + display: none !important; +} diff --git a/node_modules/tailwindcss/theme.css b/node_modules/tailwindcss/theme.css new file mode 100644 index 0000000..52d447f --- /dev/null +++ b/node_modules/tailwindcss/theme.css @@ -0,0 +1,462 @@ +@theme default { + --font-sans: + ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', + 'Noto Color Emoji'; + --font-serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif; + --font-mono: + ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', + monospace; + + --color-red-50: oklch(97.1% 0.013 17.38); + --color-red-100: oklch(93.6% 0.032 17.717); + --color-red-200: oklch(88.5% 0.062 18.334); + --color-red-300: oklch(80.8% 0.114 19.571); + --color-red-400: oklch(70.4% 0.191 22.216); + --color-red-500: oklch(63.7% 0.237 25.331); + --color-red-600: oklch(57.7% 0.245 27.325); + --color-red-700: oklch(50.5% 0.213 27.518); + --color-red-800: oklch(44.4% 0.177 26.899); + --color-red-900: oklch(39.6% 0.141 25.723); + --color-red-950: oklch(25.8% 0.092 26.042); + + --color-orange-50: oklch(98% 0.016 73.684); + --color-orange-100: oklch(95.4% 0.038 75.164); + --color-orange-200: oklch(90.1% 0.076 70.697); + --color-orange-300: oklch(83.7% 0.128 66.29); + --color-orange-400: oklch(75% 0.183 55.934); + --color-orange-500: oklch(70.5% 0.213 47.604); + --color-orange-600: oklch(64.6% 0.222 41.116); + --color-orange-700: oklch(55.3% 0.195 38.402); + --color-orange-800: oklch(47% 0.157 37.304); + --color-orange-900: oklch(40.8% 0.123 38.172); + --color-orange-950: oklch(26.6% 0.079 36.259); + + --color-amber-50: oklch(98.7% 0.022 95.277); + --color-amber-100: oklch(96.2% 0.059 95.617); + --color-amber-200: oklch(92.4% 0.12 95.746); + --color-amber-300: oklch(87.9% 0.169 91.605); + --color-amber-400: oklch(82.8% 0.189 84.429); + --color-amber-500: oklch(76.9% 0.188 70.08); + --color-amber-600: oklch(66.6% 0.179 58.318); + --color-amber-700: oklch(55.5% 0.163 48.998); + --color-amber-800: oklch(47.3% 0.137 46.201); + --color-amber-900: oklch(41.4% 0.112 45.904); + --color-amber-950: oklch(27.9% 0.077 45.635); + + --color-yellow-50: oklch(98.7% 0.026 102.212); + --color-yellow-100: oklch(97.3% 0.071 103.193); + --color-yellow-200: oklch(94.5% 0.129 101.54); + --color-yellow-300: oklch(90.5% 0.182 98.111); + --color-yellow-400: oklch(85.2% 0.199 91.936); + --color-yellow-500: oklch(79.5% 0.184 86.047); + --color-yellow-600: oklch(68.1% 0.162 75.834); + --color-yellow-700: oklch(55.4% 0.135 66.442); + --color-yellow-800: oklch(47.6% 0.114 61.907); + --color-yellow-900: oklch(42.1% 0.095 57.708); + --color-yellow-950: oklch(28.6% 0.066 53.813); + + --color-lime-50: oklch(98.6% 0.031 120.757); + --color-lime-100: oklch(96.7% 0.067 122.328); + --color-lime-200: oklch(93.8% 0.127 124.321); + --color-lime-300: oklch(89.7% 0.196 126.665); + --color-lime-400: oklch(84.1% 0.238 128.85); + --color-lime-500: oklch(76.8% 0.233 130.85); + --color-lime-600: oklch(64.8% 0.2 131.684); + --color-lime-700: oklch(53.2% 0.157 131.589); + --color-lime-800: oklch(45.3% 0.124 130.933); + --color-lime-900: oklch(40.5% 0.101 131.063); + --color-lime-950: oklch(27.4% 0.072 132.109); + + --color-green-50: oklch(98.2% 0.018 155.826); + --color-green-100: oklch(96.2% 0.044 156.743); + --color-green-200: oklch(92.5% 0.084 155.995); + --color-green-300: oklch(87.1% 0.15 154.449); + --color-green-400: oklch(79.2% 0.209 151.711); + --color-green-500: oklch(72.3% 0.219 149.579); + --color-green-600: oklch(62.7% 0.194 149.214); + --color-green-700: oklch(52.7% 0.154 150.069); + --color-green-800: oklch(44.8% 0.119 151.328); + --color-green-900: oklch(39.3% 0.095 152.535); + --color-green-950: oklch(26.6% 0.065 152.934); + + --color-emerald-50: oklch(97.9% 0.021 166.113); + --color-emerald-100: oklch(95% 0.052 163.051); + --color-emerald-200: oklch(90.5% 0.093 164.15); + --color-emerald-300: oklch(84.5% 0.143 164.978); + --color-emerald-400: oklch(76.5% 0.177 163.223); + --color-emerald-500: oklch(69.6% 0.17 162.48); + --color-emerald-600: oklch(59.6% 0.145 163.225); + --color-emerald-700: oklch(50.8% 0.118 165.612); + --color-emerald-800: oklch(43.2% 0.095 166.913); + --color-emerald-900: oklch(37.8% 0.077 168.94); + --color-emerald-950: oklch(26.2% 0.051 172.552); + + --color-teal-50: oklch(98.4% 0.014 180.72); + --color-teal-100: oklch(95.3% 0.051 180.801); + --color-teal-200: oklch(91% 0.096 180.426); + --color-teal-300: oklch(85.5% 0.138 181.071); + --color-teal-400: oklch(77.7% 0.152 181.912); + --color-teal-500: oklch(70.4% 0.14 182.503); + --color-teal-600: oklch(60% 0.118 184.704); + --color-teal-700: oklch(51.1% 0.096 186.391); + --color-teal-800: oklch(43.7% 0.078 188.216); + --color-teal-900: oklch(38.6% 0.063 188.416); + --color-teal-950: oklch(27.7% 0.046 192.524); + + --color-cyan-50: oklch(98.4% 0.019 200.873); + --color-cyan-100: oklch(95.6% 0.045 203.388); + --color-cyan-200: oklch(91.7% 0.08 205.041); + --color-cyan-300: oklch(86.5% 0.127 207.078); + --color-cyan-400: oklch(78.9% 0.154 211.53); + --color-cyan-500: oklch(71.5% 0.143 215.221); + --color-cyan-600: oklch(60.9% 0.126 221.723); + --color-cyan-700: oklch(52% 0.105 223.128); + --color-cyan-800: oklch(45% 0.085 224.283); + --color-cyan-900: oklch(39.8% 0.07 227.392); + --color-cyan-950: oklch(30.2% 0.056 229.695); + + --color-sky-50: oklch(97.7% 0.013 236.62); + --color-sky-100: oklch(95.1% 0.026 236.824); + --color-sky-200: oklch(90.1% 0.058 230.902); + --color-sky-300: oklch(82.8% 0.111 230.318); + --color-sky-400: oklch(74.6% 0.16 232.661); + --color-sky-500: oklch(68.5% 0.169 237.323); + --color-sky-600: oklch(58.8% 0.158 241.966); + --color-sky-700: oklch(50% 0.134 242.749); + --color-sky-800: oklch(44.3% 0.11 240.79); + --color-sky-900: oklch(39.1% 0.09 240.876); + --color-sky-950: oklch(29.3% 0.066 243.157); + + --color-blue-50: oklch(97% 0.014 254.604); + --color-blue-100: oklch(93.2% 0.032 255.585); + --color-blue-200: oklch(88.2% 0.059 254.128); + --color-blue-300: oklch(80.9% 0.105 251.813); + --color-blue-400: oklch(70.7% 0.165 254.624); + --color-blue-500: oklch(62.3% 0.214 259.815); + --color-blue-600: oklch(54.6% 0.245 262.881); + --color-blue-700: oklch(48.8% 0.243 264.376); + --color-blue-800: oklch(42.4% 0.199 265.638); + --color-blue-900: oklch(37.9% 0.146 265.522); + --color-blue-950: oklch(28.2% 0.091 267.935); + + --color-indigo-50: oklch(96.2% 0.018 272.314); + --color-indigo-100: oklch(93% 0.034 272.788); + --color-indigo-200: oklch(87% 0.065 274.039); + --color-indigo-300: oklch(78.5% 0.115 274.713); + --color-indigo-400: oklch(67.3% 0.182 276.935); + --color-indigo-500: oklch(58.5% 0.233 277.117); + --color-indigo-600: oklch(51.1% 0.262 276.966); + --color-indigo-700: oklch(45.7% 0.24 277.023); + --color-indigo-800: oklch(39.8% 0.195 277.366); + --color-indigo-900: oklch(35.9% 0.144 278.697); + --color-indigo-950: oklch(25.7% 0.09 281.288); + + --color-violet-50: oklch(96.9% 0.016 293.756); + --color-violet-100: oklch(94.3% 0.029 294.588); + --color-violet-200: oklch(89.4% 0.057 293.283); + --color-violet-300: oklch(81.1% 0.111 293.571); + --color-violet-400: oklch(70.2% 0.183 293.541); + --color-violet-500: oklch(60.6% 0.25 292.717); + --color-violet-600: oklch(54.1% 0.281 293.009); + --color-violet-700: oklch(49.1% 0.27 292.581); + --color-violet-800: oklch(43.2% 0.232 292.759); + --color-violet-900: oklch(38% 0.189 293.745); + --color-violet-950: oklch(28.3% 0.141 291.089); + + --color-purple-50: oklch(97.7% 0.014 308.299); + --color-purple-100: oklch(94.6% 0.033 307.174); + --color-purple-200: oklch(90.2% 0.063 306.703); + --color-purple-300: oklch(82.7% 0.119 306.383); + --color-purple-400: oklch(71.4% 0.203 305.504); + --color-purple-500: oklch(62.7% 0.265 303.9); + --color-purple-600: oklch(55.8% 0.288 302.321); + --color-purple-700: oklch(49.6% 0.265 301.924); + --color-purple-800: oklch(43.8% 0.218 303.724); + --color-purple-900: oklch(38.1% 0.176 304.987); + --color-purple-950: oklch(29.1% 0.149 302.717); + + --color-fuchsia-50: oklch(97.7% 0.017 320.058); + --color-fuchsia-100: oklch(95.2% 0.037 318.852); + --color-fuchsia-200: oklch(90.3% 0.076 319.62); + --color-fuchsia-300: oklch(83.3% 0.145 321.434); + --color-fuchsia-400: oklch(74% 0.238 322.16); + --color-fuchsia-500: oklch(66.7% 0.295 322.15); + --color-fuchsia-600: oklch(59.1% 0.293 322.896); + --color-fuchsia-700: oklch(51.8% 0.253 323.949); + --color-fuchsia-800: oklch(45.2% 0.211 324.591); + --color-fuchsia-900: oklch(40.1% 0.17 325.612); + --color-fuchsia-950: oklch(29.3% 0.136 325.661); + + --color-pink-50: oklch(97.1% 0.014 343.198); + --color-pink-100: oklch(94.8% 0.028 342.258); + --color-pink-200: oklch(89.9% 0.061 343.231); + --color-pink-300: oklch(82.3% 0.12 346.018); + --color-pink-400: oklch(71.8% 0.202 349.761); + --color-pink-500: oklch(65.6% 0.241 354.308); + --color-pink-600: oklch(59.2% 0.249 0.584); + --color-pink-700: oklch(52.5% 0.223 3.958); + --color-pink-800: oklch(45.9% 0.187 3.815); + --color-pink-900: oklch(40.8% 0.153 2.432); + --color-pink-950: oklch(28.4% 0.109 3.907); + + --color-rose-50: oklch(96.9% 0.015 12.422); + --color-rose-100: oklch(94.1% 0.03 12.58); + --color-rose-200: oklch(89.2% 0.058 10.001); + --color-rose-300: oklch(81% 0.117 11.638); + --color-rose-400: oklch(71.2% 0.194 13.428); + --color-rose-500: oklch(64.5% 0.246 16.439); + --color-rose-600: oklch(58.6% 0.253 17.585); + --color-rose-700: oklch(51.4% 0.222 16.935); + --color-rose-800: oklch(45.5% 0.188 13.697); + --color-rose-900: oklch(41% 0.159 10.272); + --color-rose-950: oklch(27.1% 0.105 12.094); + + --color-slate-50: oklch(98.4% 0.003 247.858); + --color-slate-100: oklch(96.8% 0.007 247.896); + --color-slate-200: oklch(92.9% 0.013 255.508); + --color-slate-300: oklch(86.9% 0.022 252.894); + --color-slate-400: oklch(70.4% 0.04 256.788); + --color-slate-500: oklch(55.4% 0.046 257.417); + --color-slate-600: oklch(44.6% 0.043 257.281); + --color-slate-700: oklch(37.2% 0.044 257.287); + --color-slate-800: oklch(27.9% 0.041 260.031); + --color-slate-900: oklch(20.8% 0.042 265.755); + --color-slate-950: oklch(12.9% 0.042 264.695); + + --color-gray-50: oklch(98.5% 0.002 247.839); + --color-gray-100: oklch(96.7% 0.003 264.542); + --color-gray-200: oklch(92.8% 0.006 264.531); + --color-gray-300: oklch(87.2% 0.01 258.338); + --color-gray-400: oklch(70.7% 0.022 261.325); + --color-gray-500: oklch(55.1% 0.027 264.364); + --color-gray-600: oklch(44.6% 0.03 256.802); + --color-gray-700: oklch(37.3% 0.034 259.733); + --color-gray-800: oklch(27.8% 0.033 256.848); + --color-gray-900: oklch(21% 0.034 264.665); + --color-gray-950: oklch(13% 0.028 261.692); + + --color-zinc-50: oklch(98.5% 0 0); + --color-zinc-100: oklch(96.7% 0.001 286.375); + --color-zinc-200: oklch(92% 0.004 286.32); + --color-zinc-300: oklch(87.1% 0.006 286.286); + --color-zinc-400: oklch(70.5% 0.015 286.067); + --color-zinc-500: oklch(55.2% 0.016 285.938); + --color-zinc-600: oklch(44.2% 0.017 285.786); + --color-zinc-700: oklch(37% 0.013 285.805); + --color-zinc-800: oklch(27.4% 0.006 286.033); + --color-zinc-900: oklch(21% 0.006 285.885); + --color-zinc-950: oklch(14.1% 0.005 285.823); + + --color-neutral-50: oklch(98.5% 0 0); + --color-neutral-100: oklch(97% 0 0); + --color-neutral-200: oklch(92.2% 0 0); + --color-neutral-300: oklch(87% 0 0); + --color-neutral-400: oklch(70.8% 0 0); + --color-neutral-500: oklch(55.6% 0 0); + --color-neutral-600: oklch(43.9% 0 0); + --color-neutral-700: oklch(37.1% 0 0); + --color-neutral-800: oklch(26.9% 0 0); + --color-neutral-900: oklch(20.5% 0 0); + --color-neutral-950: oklch(14.5% 0 0); + + --color-stone-50: oklch(98.5% 0.001 106.423); + --color-stone-100: oklch(97% 0.001 106.424); + --color-stone-200: oklch(92.3% 0.003 48.717); + --color-stone-300: oklch(86.9% 0.005 56.366); + --color-stone-400: oklch(70.9% 0.01 56.259); + --color-stone-500: oklch(55.3% 0.013 58.071); + --color-stone-600: oklch(44.4% 0.011 73.639); + --color-stone-700: oklch(37.4% 0.01 67.558); + --color-stone-800: oklch(26.8% 0.007 34.298); + --color-stone-900: oklch(21.6% 0.006 56.043); + --color-stone-950: oklch(14.7% 0.004 49.25); + + --color-black: #000; + --color-white: #fff; + + --spacing: 0.25rem; + + --breakpoint-sm: 40rem; + --breakpoint-md: 48rem; + --breakpoint-lg: 64rem; + --breakpoint-xl: 80rem; + --breakpoint-2xl: 96rem; + + --container-3xs: 16rem; + --container-2xs: 18rem; + --container-xs: 20rem; + --container-sm: 24rem; + --container-md: 28rem; + --container-lg: 32rem; + --container-xl: 36rem; + --container-2xl: 42rem; + --container-3xl: 48rem; + --container-4xl: 56rem; + --container-5xl: 64rem; + --container-6xl: 72rem; + --container-7xl: 80rem; + + --text-xs: 0.75rem; + --text-xs--line-height: calc(1 / 0.75); + --text-sm: 0.875rem; + --text-sm--line-height: calc(1.25 / 0.875); + --text-base: 1rem; + --text-base--line-height: calc(1.5 / 1); + --text-lg: 1.125rem; + --text-lg--line-height: calc(1.75 / 1.125); + --text-xl: 1.25rem; + --text-xl--line-height: calc(1.75 / 1.25); + --text-2xl: 1.5rem; + --text-2xl--line-height: calc(2 / 1.5); + --text-3xl: 1.875rem; + --text-3xl--line-height: calc(2.25 / 1.875); + --text-4xl: 2.25rem; + --text-4xl--line-height: calc(2.5 / 2.25); + --text-5xl: 3rem; + --text-5xl--line-height: 1; + --text-6xl: 3.75rem; + --text-6xl--line-height: 1; + --text-7xl: 4.5rem; + --text-7xl--line-height: 1; + --text-8xl: 6rem; + --text-8xl--line-height: 1; + --text-9xl: 8rem; + --text-9xl--line-height: 1; + + --font-weight-thin: 100; + --font-weight-extralight: 200; + --font-weight-light: 300; + --font-weight-normal: 400; + --font-weight-medium: 500; + --font-weight-semibold: 600; + --font-weight-bold: 700; + --font-weight-extrabold: 800; + --font-weight-black: 900; + + --tracking-tighter: -0.05em; + --tracking-tight: -0.025em; + --tracking-normal: 0em; + --tracking-wide: 0.025em; + --tracking-wider: 0.05em; + --tracking-widest: 0.1em; + + --leading-tight: 1.25; + --leading-snug: 1.375; + --leading-normal: 1.5; + --leading-relaxed: 1.625; + --leading-loose: 2; + + --radius-xs: 0.125rem; + --radius-sm: 0.25rem; + --radius-md: 0.375rem; + --radius-lg: 0.5rem; + --radius-xl: 0.75rem; + --radius-2xl: 1rem; + --radius-3xl: 1.5rem; + --radius-4xl: 2rem; + + --shadow-2xs: 0 1px rgb(0 0 0 / 0.05); + --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05); + --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); + --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); + --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); + --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25); + + --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / 0.05); + --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / 0.05); + --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / 0.05); + + --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / 0.05); + --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.15); + --drop-shadow-md: 0 3px 3px rgb(0 0 0 / 0.12); + --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / 0.15); + --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / 0.1); + --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / 0.15); + + --text-shadow-2xs: 0px 1px 0px rgb(0 0 0 / 0.15); + --text-shadow-xs: 0px 1px 1px rgb(0 0 0 / 0.2); + --text-shadow-sm: + 0px 1px 0px rgb(0 0 0 / 0.075), 0px 1px 1px rgb(0 0 0 / 0.075), 0px 2px 2px rgb(0 0 0 / 0.075); + --text-shadow-md: + 0px 1px 1px rgb(0 0 0 / 0.1), 0px 1px 2px rgb(0 0 0 / 0.1), 0px 2px 4px rgb(0 0 0 / 0.1); + --text-shadow-lg: + 0px 1px 2px rgb(0 0 0 / 0.1), 0px 3px 2px rgb(0 0 0 / 0.1), 0px 4px 8px rgb(0 0 0 / 0.1); + + --ease-in: cubic-bezier(0.4, 0, 1, 1); + --ease-out: cubic-bezier(0, 0, 0.2, 1); + --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1); + + --animate-spin: spin 1s linear infinite; + --animate-ping: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; + --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; + --animate-bounce: bounce 1s infinite; + + @keyframes spin { + to { + transform: rotate(360deg); + } + } + + @keyframes ping { + 75%, + 100% { + transform: scale(2); + opacity: 0; + } + } + + @keyframes pulse { + 50% { + opacity: 0.5; + } + } + + @keyframes bounce { + 0%, + 100% { + transform: translateY(-25%); + animation-timing-function: cubic-bezier(0.8, 0, 1, 1); + } + + 50% { + transform: none; + animation-timing-function: cubic-bezier(0, 0, 0.2, 1); + } + } + + --blur-xs: 4px; + --blur-sm: 8px; + --blur-md: 12px; + --blur-lg: 16px; + --blur-xl: 24px; + --blur-2xl: 40px; + --blur-3xl: 64px; + + --perspective-dramatic: 100px; + --perspective-near: 300px; + --perspective-normal: 500px; + --perspective-midrange: 800px; + --perspective-distant: 1200px; + + --aspect-video: 16 / 9; + + --default-transition-duration: 150ms; + --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + --default-font-family: --theme(--font-sans, initial); + --default-font-feature-settings: --theme(--font-sans--font-feature-settings, initial); + --default-font-variation-settings: --theme(--font-sans--font-variation-settings, initial); + --default-mono-font-family: --theme(--font-mono, initial); + --default-mono-font-feature-settings: --theme(--font-mono--font-feature-settings, initial); + --default-mono-font-variation-settings: --theme(--font-mono--font-variation-settings, initial); +} + +/* Deprecated */ +@theme default inline reference { + --blur: 8px; + --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); + --drop-shadow: 0 1px 2px rgb(0 0 0 / 0.1), 0 1px 1px rgb(0 0 0 / 0.06); + --radius: 0.25rem; + --max-width-prose: 65ch; +} diff --git a/node_modules/tailwindcss/utilities.css b/node_modules/tailwindcss/utilities.css new file mode 100644 index 0000000..65dd5f6 --- /dev/null +++ b/node_modules/tailwindcss/utilities.css @@ -0,0 +1 @@ +@tailwind utilities; diff --git a/node_modules/tapable/LICENSE b/node_modules/tapable/LICENSE new file mode 100644 index 0000000..03c083c --- /dev/null +++ b/node_modules/tapable/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright JS Foundation and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/tapable/README.md b/node_modules/tapable/README.md new file mode 100644 index 0000000..1377197 --- /dev/null +++ b/node_modules/tapable/README.md @@ -0,0 +1,296 @@ +# Tapable + +The tapable package expose many Hook classes, which can be used to create hooks for plugins. + +``` javascript +const { + SyncHook, + SyncBailHook, + SyncWaterfallHook, + SyncLoopHook, + AsyncParallelHook, + AsyncParallelBailHook, + AsyncSeriesHook, + AsyncSeriesBailHook, + AsyncSeriesWaterfallHook + } = require("tapable"); +``` + +## Installation + +``` shell +npm install --save tapable +``` + +## Usage + +All Hook constructors take one optional argument, which is a list of argument names as strings. + +``` js +const hook = new SyncHook(["arg1", "arg2", "arg3"]); +``` + +The best practice is to expose all hooks of a class in a `hooks` property: + +``` js +class Car { + constructor() { + this.hooks = { + accelerate: new SyncHook(["newSpeed"]), + brake: new SyncHook(), + calculateRoutes: new AsyncParallelHook(["source", "target", "routesList"]) + }; + } + + /* ... */ +} +``` + +Other people can now use these hooks: + +``` js +const myCar = new Car(); + +// Use the tap method to add a consument +myCar.hooks.brake.tap("WarningLampPlugin", () => warningLamp.on()); +``` + +It's required to pass a name to identify the plugin/reason. + +You may receive arguments: + +``` js +myCar.hooks.accelerate.tap("LoggerPlugin", newSpeed => console.log(`Accelerating to ${newSpeed}`)); +``` + +For sync hooks, `tap` is the only valid method to add a plugin. Async hooks also support async plugins: + +``` js +myCar.hooks.calculateRoutes.tapPromise("GoogleMapsPlugin", (source, target, routesList) => { + // return a promise + return google.maps.findRoute(source, target).then(route => { + routesList.add(route); + }); +}); +myCar.hooks.calculateRoutes.tapAsync("BingMapsPlugin", (source, target, routesList, callback) => { + bing.findRoute(source, target, (err, route) => { + if(err) return callback(err); + routesList.add(route); + // call the callback + callback(); + }); +}); + +// You can still use sync plugins +myCar.hooks.calculateRoutes.tap("CachedRoutesPlugin", (source, target, routesList) => { + const cachedRoute = cache.get(source, target); + if(cachedRoute) + routesList.add(cachedRoute); +}) +``` +The class declaring these hooks need to call them: + +``` js +class Car { + /** + * You won't get returned value from SyncHook or AsyncParallelHook, + * to do that, use SyncWaterfallHook and AsyncSeriesWaterfallHook respectively + **/ + + setSpeed(newSpeed) { + // following call returns undefined even when you returned values + this.hooks.accelerate.call(newSpeed); + } + + useNavigationSystemPromise(source, target) { + const routesList = new List(); + return this.hooks.calculateRoutes.promise(source, target, routesList).then((res) => { + // res is undefined for AsyncParallelHook + return routesList.getRoutes(); + }); + } + + useNavigationSystemAsync(source, target, callback) { + const routesList = new List(); + this.hooks.calculateRoutes.callAsync(source, target, routesList, err => { + if(err) return callback(err); + callback(null, routesList.getRoutes()); + }); + } +} +``` + +The Hook will compile a method with the most efficient way of running your plugins. It generates code depending on: +* The number of registered plugins (none, one, many) +* The kind of registered plugins (sync, async, promise) +* The used call method (sync, async, promise) +* The number of arguments +* Whether interception is used + +This ensures fastest possible execution. + +## Hook types + +Each hook can be tapped with one or several functions. How they are executed depends on the hook type: + +* Basic hook (without “Waterfall”, “Bail” or “Loop” in its name). This hook simply calls every function it tapped in a row. + +* __Waterfall__. A waterfall hook also calls each tapped function in a row. Unlike the basic hook, it passes a return value from each function to the next function. + +* __Bail__. A bail hook allows exiting early. When any of the tapped function returns anything, the bail hook will stop executing the remaining ones. + +* __Loop__. When a plugin in a loop hook returns a non-undefined value the hook will restart from the first plugin. It will loop until all plugins return undefined. + +Additionally, hooks can be synchronous or asynchronous. To reflect this, there’re “Sync”, “AsyncSeries”, and “AsyncParallel” hook classes: + +* __Sync__. A sync hook can only be tapped with synchronous functions (using `myHook.tap()`). + +* __AsyncSeries__. An async-series hook can be tapped with synchronous, callback-based and promise-based functions (using `myHook.tap()`, `myHook.tapAsync()` and `myHook.tapPromise()`). They call each async method in a row. + +* __AsyncParallel__. An async-parallel hook can also be tapped with synchronous, callback-based and promise-based functions (using `myHook.tap()`, `myHook.tapAsync()` and `myHook.tapPromise()`). However, they run each async method in parallel. + +The hook type is reflected in its class name. E.g., `AsyncSeriesWaterfallHook` allows asynchronous functions and runs them in series, passing each function’s return value into the next function. + + +## Interception + +All Hooks offer an additional interception API: + +``` js +myCar.hooks.calculateRoutes.intercept({ + call: (source, target, routesList) => { + console.log("Starting to calculate routes"); + }, + register: (tapInfo) => { + // tapInfo = { type: "promise", name: "GoogleMapsPlugin", fn: ... } + console.log(`${tapInfo.name} is doing its job`); + return tapInfo; // may return a new tapInfo object + } +}) +``` + +**call**: `(...args) => void` Adding `call` to your interceptor will trigger when hooks are triggered. You have access to the hooks arguments. + +**tap**: `(tap: Tap) => void` Adding `tap` to your interceptor will trigger when a plugin taps into a hook. Provided is the `Tap` object. `Tap` object can't be changed. + +**loop**: `(...args) => void` Adding `loop` to your interceptor will trigger for each loop of a looping hook. + +**register**: `(tap: Tap) => Tap | undefined` Adding `register` to your interceptor will trigger for each added `Tap` and allows to modify it. + +## Context + +Plugins and interceptors can opt-in to access an optional `context` object, which can be used to pass arbitrary values to subsequent plugins and interceptors. + +``` js +myCar.hooks.accelerate.intercept({ + context: true, + tap: (context, tapInfo) => { + // tapInfo = { type: "sync", name: "NoisePlugin", fn: ... } + console.log(`${tapInfo.name} is doing it's job`); + + // `context` starts as an empty object if at least one plugin uses `context: true`. + // If no plugins use `context: true`, then `context` is undefined. + if (context) { + // Arbitrary properties can be added to `context`, which plugins can then access. + context.hasMuffler = true; + } + } +}); + +myCar.hooks.accelerate.tap({ + name: "NoisePlugin", + context: true +}, (context, newSpeed) => { + if (context && context.hasMuffler) { + console.log("Silence..."); + } else { + console.log("Vroom!"); + } +}); +``` + +## HookMap + +A HookMap is a helper class for a Map with Hooks + +``` js +const keyedHook = new HookMap(key => new SyncHook(["arg"])) +``` + +``` js +keyedHook.for("some-key").tap("MyPlugin", (arg) => { /* ... */ }); +keyedHook.for("some-key").tapAsync("MyPlugin", (arg, callback) => { /* ... */ }); +keyedHook.for("some-key").tapPromise("MyPlugin", (arg) => { /* ... */ }); +``` + +``` js +const hook = keyedHook.get("some-key"); +if(hook !== undefined) { + hook.callAsync("arg", err => { /* ... */ }); +} +``` + +## Hook/HookMap interface + +Public: + +``` ts +interface Hook { + tap: (name: string | Tap, fn: (context?, ...args) => Result) => void, + tapAsync: (name: string | Tap, fn: (context?, ...args, callback: (err, result: Result) => void) => void) => void, + tapPromise: (name: string | Tap, fn: (context?, ...args) => Promise) => void, + intercept: (interceptor: HookInterceptor) => void +} + +interface HookInterceptor { + call: (context?, ...args) => void, + loop: (context?, ...args) => void, + tap: (context?, tap: Tap) => void, + register: (tap: Tap) => Tap, + context: boolean +} + +interface HookMap { + for: (key: any) => Hook, + intercept: (interceptor: HookMapInterceptor) => void +} + +interface HookMapInterceptor { + factory: (key: any, hook: Hook) => Hook +} + +interface Tap { + name: string, + type: string + fn: Function, + stage: number, + context: boolean, + before?: string | Array +} +``` + +Protected (only for the class containing the hook): + +``` ts +interface Hook { + isUsed: () => boolean, + call: (...args) => Result, + promise: (...args) => Promise, + callAsync: (...args, callback: (err, result: Result) => void) => void, +} + +interface HookMap { + get: (key: any) => Hook | undefined, + for: (key: any) => Hook +} +``` + +## MultiHook + +A helper Hook-like class to redirect taps to multiple other hooks: + +``` js +const { MultiHook } = require("tapable"); + +this.hooks.allHooks = new MultiHook([this.hooks.hookA, this.hooks.hookB]); +``` diff --git a/node_modules/tapable/lib/AsyncParallelBailHook.js b/node_modules/tapable/lib/AsyncParallelBailHook.js new file mode 100644 index 0000000..45eca33 --- /dev/null +++ b/node_modules/tapable/lib/AsyncParallelBailHook.js @@ -0,0 +1,85 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const Hook = require("./Hook"); +const HookCodeFactory = require("./HookCodeFactory"); + +class AsyncParallelBailHookCodeFactory extends HookCodeFactory { + content({ onError, onResult, onDone }) { + let code = ""; + code += `var _results = new Array(${this.options.taps.length});\n`; + code += "var _checkDone = function() {\n"; + code += "for(var i = 0; i < _results.length; i++) {\n"; + code += "var item = _results[i];\n"; + code += "if(item === undefined) return false;\n"; + code += "if(item.result !== undefined) {\n"; + code += onResult("item.result"); + code += "return true;\n"; + code += "}\n"; + code += "if(item.error) {\n"; + code += onError("item.error"); + code += "return true;\n"; + code += "}\n"; + code += "}\n"; + code += "return false;\n"; + code += "}\n"; + code += this.callTapsParallel({ + onError: (i, err, done, doneBreak) => { + let code = ""; + code += `if(${i} < _results.length && ((_results.length = ${i + + 1}), (_results[${i}] = { error: ${err} }), _checkDone())) {\n`; + code += doneBreak(true); + code += "} else {\n"; + code += done(); + code += "}\n"; + return code; + }, + onResult: (i, result, done, doneBreak) => { + let code = ""; + code += `if(${i} < _results.length && (${result} !== undefined && (_results.length = ${i + + 1}), (_results[${i}] = { result: ${result} }), _checkDone())) {\n`; + code += doneBreak(true); + code += "} else {\n"; + code += done(); + code += "}\n"; + return code; + }, + onTap: (i, run, done, doneBreak) => { + let code = ""; + if (i > 0) { + code += `if(${i} >= _results.length) {\n`; + code += done(); + code += "} else {\n"; + } + code += run(); + if (i > 0) code += "}\n"; + return code; + }, + onDone + }); + return code; + } +} + +const factory = new AsyncParallelBailHookCodeFactory(); + +const COMPILE = function(options) { + factory.setup(this, options); + return factory.create(options); +}; + +function AsyncParallelBailHook(args = [], name = undefined) { + const hook = new Hook(args, name); + hook.constructor = AsyncParallelBailHook; + hook.compile = COMPILE; + hook._call = undefined; + hook.call = undefined; + return hook; +} + +AsyncParallelBailHook.prototype = null; + +module.exports = AsyncParallelBailHook; diff --git a/node_modules/tapable/lib/AsyncParallelHook.js b/node_modules/tapable/lib/AsyncParallelHook.js new file mode 100644 index 0000000..b7a3631 --- /dev/null +++ b/node_modules/tapable/lib/AsyncParallelHook.js @@ -0,0 +1,37 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const Hook = require("./Hook"); +const HookCodeFactory = require("./HookCodeFactory"); + +class AsyncParallelHookCodeFactory extends HookCodeFactory { + content({ onError, onDone }) { + return this.callTapsParallel({ + onError: (i, err, done, doneBreak) => onError(err) + doneBreak(true), + onDone + }); + } +} + +const factory = new AsyncParallelHookCodeFactory(); + +const COMPILE = function(options) { + factory.setup(this, options); + return factory.create(options); +}; + +function AsyncParallelHook(args = [], name = undefined) { + const hook = new Hook(args, name); + hook.constructor = AsyncParallelHook; + hook.compile = COMPILE; + hook._call = undefined; + hook.call = undefined; + return hook; +} + +AsyncParallelHook.prototype = null; + +module.exports = AsyncParallelHook; diff --git a/node_modules/tapable/lib/AsyncSeriesBailHook.js b/node_modules/tapable/lib/AsyncSeriesBailHook.js new file mode 100644 index 0000000..5df66df --- /dev/null +++ b/node_modules/tapable/lib/AsyncSeriesBailHook.js @@ -0,0 +1,42 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const Hook = require("./Hook"); +const HookCodeFactory = require("./HookCodeFactory"); + +class AsyncSeriesBailHookCodeFactory extends HookCodeFactory { + content({ onError, onResult, resultReturns, onDone }) { + return this.callTapsSeries({ + onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true), + onResult: (i, result, next) => + `if(${result} !== undefined) {\n${onResult( + result + )}\n} else {\n${next()}}\n`, + resultReturns, + onDone + }); + } +} + +const factory = new AsyncSeriesBailHookCodeFactory(); + +const COMPILE = function(options) { + factory.setup(this, options); + return factory.create(options); +}; + +function AsyncSeriesBailHook(args = [], name = undefined) { + const hook = new Hook(args, name); + hook.constructor = AsyncSeriesBailHook; + hook.compile = COMPILE; + hook._call = undefined; + hook.call = undefined; + return hook; +} + +AsyncSeriesBailHook.prototype = null; + +module.exports = AsyncSeriesBailHook; diff --git a/node_modules/tapable/lib/AsyncSeriesHook.js b/node_modules/tapable/lib/AsyncSeriesHook.js new file mode 100644 index 0000000..3edad00 --- /dev/null +++ b/node_modules/tapable/lib/AsyncSeriesHook.js @@ -0,0 +1,37 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const Hook = require("./Hook"); +const HookCodeFactory = require("./HookCodeFactory"); + +class AsyncSeriesHookCodeFactory extends HookCodeFactory { + content({ onError, onDone }) { + return this.callTapsSeries({ + onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true), + onDone + }); + } +} + +const factory = new AsyncSeriesHookCodeFactory(); + +const COMPILE = function(options) { + factory.setup(this, options); + return factory.create(options); +}; + +function AsyncSeriesHook(args = [], name = undefined) { + const hook = new Hook(args, name); + hook.constructor = AsyncSeriesHook; + hook.compile = COMPILE; + hook._call = undefined; + hook.call = undefined; + return hook; +} + +AsyncSeriesHook.prototype = null; + +module.exports = AsyncSeriesHook; diff --git a/node_modules/tapable/lib/AsyncSeriesLoopHook.js b/node_modules/tapable/lib/AsyncSeriesLoopHook.js new file mode 100644 index 0000000..fb5f067 --- /dev/null +++ b/node_modules/tapable/lib/AsyncSeriesLoopHook.js @@ -0,0 +1,37 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const Hook = require("./Hook"); +const HookCodeFactory = require("./HookCodeFactory"); + +class AsyncSeriesLoopHookCodeFactory extends HookCodeFactory { + content({ onError, onDone }) { + return this.callTapsLooping({ + onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true), + onDone + }); + } +} + +const factory = new AsyncSeriesLoopHookCodeFactory(); + +const COMPILE = function(options) { + factory.setup(this, options); + return factory.create(options); +}; + +function AsyncSeriesLoopHook(args = [], name = undefined) { + const hook = new Hook(args, name); + hook.constructor = AsyncSeriesLoopHook; + hook.compile = COMPILE; + hook._call = undefined; + hook.call = undefined; + return hook; +} + +AsyncSeriesLoopHook.prototype = null; + +module.exports = AsyncSeriesLoopHook; diff --git a/node_modules/tapable/lib/AsyncSeriesWaterfallHook.js b/node_modules/tapable/lib/AsyncSeriesWaterfallHook.js new file mode 100644 index 0000000..910b536 --- /dev/null +++ b/node_modules/tapable/lib/AsyncSeriesWaterfallHook.js @@ -0,0 +1,47 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const Hook = require("./Hook"); +const HookCodeFactory = require("./HookCodeFactory"); + +class AsyncSeriesWaterfallHookCodeFactory extends HookCodeFactory { + content({ onError, onResult, onDone }) { + return this.callTapsSeries({ + onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true), + onResult: (i, result, next) => { + let code = ""; + code += `if(${result} !== undefined) {\n`; + code += `${this._args[0]} = ${result};\n`; + code += `}\n`; + code += next(); + return code; + }, + onDone: () => onResult(this._args[0]) + }); + } +} + +const factory = new AsyncSeriesWaterfallHookCodeFactory(); + +const COMPILE = function(options) { + factory.setup(this, options); + return factory.create(options); +}; + +function AsyncSeriesWaterfallHook(args = [], name = undefined) { + if (args.length < 1) + throw new Error("Waterfall hooks must have at least one argument"); + const hook = new Hook(args, name); + hook.constructor = AsyncSeriesWaterfallHook; + hook.compile = COMPILE; + hook._call = undefined; + hook.call = undefined; + return hook; +} + +AsyncSeriesWaterfallHook.prototype = null; + +module.exports = AsyncSeriesWaterfallHook; diff --git a/node_modules/tapable/lib/Hook.js b/node_modules/tapable/lib/Hook.js new file mode 100644 index 0000000..db04426 --- /dev/null +++ b/node_modules/tapable/lib/Hook.js @@ -0,0 +1,175 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const util = require("util"); + +const deprecateContext = util.deprecate(() => {}, +"Hook.context is deprecated and will be removed"); + +const CALL_DELEGATE = function(...args) { + this.call = this._createCall("sync"); + return this.call(...args); +}; +const CALL_ASYNC_DELEGATE = function(...args) { + this.callAsync = this._createCall("async"); + return this.callAsync(...args); +}; +const PROMISE_DELEGATE = function(...args) { + this.promise = this._createCall("promise"); + return this.promise(...args); +}; + +class Hook { + constructor(args = [], name = undefined) { + this._args = args; + this.name = name; + this.taps = []; + this.interceptors = []; + this._call = CALL_DELEGATE; + this.call = CALL_DELEGATE; + this._callAsync = CALL_ASYNC_DELEGATE; + this.callAsync = CALL_ASYNC_DELEGATE; + this._promise = PROMISE_DELEGATE; + this.promise = PROMISE_DELEGATE; + this._x = undefined; + + this.compile = this.compile; + this.tap = this.tap; + this.tapAsync = this.tapAsync; + this.tapPromise = this.tapPromise; + } + + compile(options) { + throw new Error("Abstract: should be overridden"); + } + + _createCall(type) { + return this.compile({ + taps: this.taps, + interceptors: this.interceptors, + args: this._args, + type: type + }); + } + + _tap(type, options, fn) { + if (typeof options === "string") { + options = { + name: options.trim() + }; + } else if (typeof options !== "object" || options === null) { + throw new Error("Invalid tap options"); + } + if (typeof options.name !== "string" || options.name === "") { + throw new Error("Missing name for tap"); + } + if (typeof options.context !== "undefined") { + deprecateContext(); + } + options = Object.assign({ type, fn }, options); + options = this._runRegisterInterceptors(options); + this._insert(options); + } + + tap(options, fn) { + this._tap("sync", options, fn); + } + + tapAsync(options, fn) { + this._tap("async", options, fn); + } + + tapPromise(options, fn) { + this._tap("promise", options, fn); + } + + _runRegisterInterceptors(options) { + for (const interceptor of this.interceptors) { + if (interceptor.register) { + const newOptions = interceptor.register(options); + if (newOptions !== undefined) { + options = newOptions; + } + } + } + return options; + } + + withOptions(options) { + const mergeOptions = opt => + Object.assign({}, options, typeof opt === "string" ? { name: opt } : opt); + + return { + name: this.name, + tap: (opt, fn) => this.tap(mergeOptions(opt), fn), + tapAsync: (opt, fn) => this.tapAsync(mergeOptions(opt), fn), + tapPromise: (opt, fn) => this.tapPromise(mergeOptions(opt), fn), + intercept: interceptor => this.intercept(interceptor), + isUsed: () => this.isUsed(), + withOptions: opt => this.withOptions(mergeOptions(opt)) + }; + } + + isUsed() { + return this.taps.length > 0 || this.interceptors.length > 0; + } + + intercept(interceptor) { + this._resetCompilation(); + this.interceptors.push(Object.assign({}, interceptor)); + if (interceptor.register) { + for (let i = 0; i < this.taps.length; i++) { + this.taps[i] = interceptor.register(this.taps[i]); + } + } + } + + _resetCompilation() { + this.call = this._call; + this.callAsync = this._callAsync; + this.promise = this._promise; + } + + _insert(item) { + this._resetCompilation(); + let before; + if (typeof item.before === "string") { + before = new Set([item.before]); + } else if (Array.isArray(item.before)) { + before = new Set(item.before); + } + let stage = 0; + if (typeof item.stage === "number") { + stage = item.stage; + } + let i = this.taps.length; + while (i > 0) { + i--; + const x = this.taps[i]; + this.taps[i + 1] = x; + const xStage = x.stage || 0; + if (before) { + if (before.has(x.name)) { + before.delete(x.name); + continue; + } + if (before.size > 0) { + continue; + } + } + if (xStage > stage) { + continue; + } + i++; + break; + } + this.taps[i] = item; + } +} + +Object.setPrototypeOf(Hook.prototype, null); + +module.exports = Hook; diff --git a/node_modules/tapable/lib/HookCodeFactory.js b/node_modules/tapable/lib/HookCodeFactory.js new file mode 100644 index 0000000..c9f5340 --- /dev/null +++ b/node_modules/tapable/lib/HookCodeFactory.js @@ -0,0 +1,468 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +class HookCodeFactory { + constructor(config) { + this.config = config; + this.options = undefined; + this._args = undefined; + } + + create(options) { + this.init(options); + let fn; + switch (this.options.type) { + case "sync": + fn = new Function( + this.args(), + '"use strict";\n' + + this.header() + + this.contentWithInterceptors({ + onError: err => `throw ${err};\n`, + onResult: result => `return ${result};\n`, + resultReturns: true, + onDone: () => "", + rethrowIfPossible: true + }) + ); + break; + case "async": + fn = new Function( + this.args({ + after: "_callback" + }), + '"use strict";\n' + + this.header() + + this.contentWithInterceptors({ + onError: err => `_callback(${err});\n`, + onResult: result => `_callback(null, ${result});\n`, + onDone: () => "_callback();\n" + }) + ); + break; + case "promise": + let errorHelperUsed = false; + const content = this.contentWithInterceptors({ + onError: err => { + errorHelperUsed = true; + return `_error(${err});\n`; + }, + onResult: result => `_resolve(${result});\n`, + onDone: () => "_resolve();\n" + }); + let code = ""; + code += '"use strict";\n'; + code += this.header(); + code += "return new Promise((function(_resolve, _reject) {\n"; + if (errorHelperUsed) { + code += "var _sync = true;\n"; + code += "function _error(_err) {\n"; + code += "if(_sync)\n"; + code += + "_resolve(Promise.resolve().then((function() { throw _err; })));\n"; + code += "else\n"; + code += "_reject(_err);\n"; + code += "};\n"; + } + code += content; + if (errorHelperUsed) { + code += "_sync = false;\n"; + } + code += "}));\n"; + fn = new Function(this.args(), code); + break; + } + this.deinit(); + return fn; + } + + setup(instance, options) { + instance._x = options.taps.map(t => t.fn); + } + + /** + * @param {{ type: "sync" | "promise" | "async", taps: Array, interceptors: Array }} options + */ + init(options) { + this.options = options; + this._args = options.args.slice(); + } + + deinit() { + this.options = undefined; + this._args = undefined; + } + + contentWithInterceptors(options) { + if (this.options.interceptors.length > 0) { + const onError = options.onError; + const onResult = options.onResult; + const onDone = options.onDone; + let code = ""; + for (let i = 0; i < this.options.interceptors.length; i++) { + const interceptor = this.options.interceptors[i]; + if (interceptor.call) { + code += `${this.getInterceptor(i)}.call(${this.args({ + before: interceptor.context ? "_context" : undefined + })});\n`; + } + } + code += this.content( + Object.assign(options, { + onError: + onError && + (err => { + let code = ""; + for (let i = 0; i < this.options.interceptors.length; i++) { + const interceptor = this.options.interceptors[i]; + if (interceptor.error) { + code += `${this.getInterceptor(i)}.error(${err});\n`; + } + } + code += onError(err); + return code; + }), + onResult: + onResult && + (result => { + let code = ""; + for (let i = 0; i < this.options.interceptors.length; i++) { + const interceptor = this.options.interceptors[i]; + if (interceptor.result) { + code += `${this.getInterceptor(i)}.result(${result});\n`; + } + } + code += onResult(result); + return code; + }), + onDone: + onDone && + (() => { + let code = ""; + for (let i = 0; i < this.options.interceptors.length; i++) { + const interceptor = this.options.interceptors[i]; + if (interceptor.done) { + code += `${this.getInterceptor(i)}.done();\n`; + } + } + code += onDone(); + return code; + }) + }) + ); + return code; + } else { + return this.content(options); + } + } + + header() { + let code = ""; + if (this.needContext()) { + code += "var _context = {};\n"; + } else { + code += "var _context;\n"; + } + code += "var _x = this._x;\n"; + if (this.options.interceptors.length > 0) { + code += "var _taps = this.taps;\n"; + code += "var _interceptors = this.interceptors;\n"; + } + return code; + } + + needContext() { + for (const tap of this.options.taps) if (tap.context) return true; + return false; + } + + callTap(tapIndex, { onError, onResult, onDone, rethrowIfPossible }) { + let code = ""; + let hasTapCached = false; + for (let i = 0; i < this.options.interceptors.length; i++) { + const interceptor = this.options.interceptors[i]; + if (interceptor.tap) { + if (!hasTapCached) { + code += `var _tap${tapIndex} = ${this.getTap(tapIndex)};\n`; + hasTapCached = true; + } + code += `${this.getInterceptor(i)}.tap(${ + interceptor.context ? "_context, " : "" + }_tap${tapIndex});\n`; + } + } + code += `var _fn${tapIndex} = ${this.getTapFn(tapIndex)};\n`; + const tap = this.options.taps[tapIndex]; + switch (tap.type) { + case "sync": + if (!rethrowIfPossible) { + code += `var _hasError${tapIndex} = false;\n`; + code += "try {\n"; + } + if (onResult) { + code += `var _result${tapIndex} = _fn${tapIndex}(${this.args({ + before: tap.context ? "_context" : undefined + })});\n`; + } else { + code += `_fn${tapIndex}(${this.args({ + before: tap.context ? "_context" : undefined + })});\n`; + } + if (!rethrowIfPossible) { + code += "} catch(_err) {\n"; + code += `_hasError${tapIndex} = true;\n`; + code += onError("_err"); + code += "}\n"; + code += `if(!_hasError${tapIndex}) {\n`; + } + if (onResult) { + code += onResult(`_result${tapIndex}`); + } + if (onDone) { + code += onDone(); + } + if (!rethrowIfPossible) { + code += "}\n"; + } + break; + case "async": + let cbCode = ""; + if (onResult) + cbCode += `(function(_err${tapIndex}, _result${tapIndex}) {\n`; + else cbCode += `(function(_err${tapIndex}) {\n`; + cbCode += `if(_err${tapIndex}) {\n`; + cbCode += onError(`_err${tapIndex}`); + cbCode += "} else {\n"; + if (onResult) { + cbCode += onResult(`_result${tapIndex}`); + } + if (onDone) { + cbCode += onDone(); + } + cbCode += "}\n"; + cbCode += "})"; + code += `_fn${tapIndex}(${this.args({ + before: tap.context ? "_context" : undefined, + after: cbCode + })});\n`; + break; + case "promise": + code += `var _hasResult${tapIndex} = false;\n`; + code += `var _promise${tapIndex} = _fn${tapIndex}(${this.args({ + before: tap.context ? "_context" : undefined + })});\n`; + code += `if (!_promise${tapIndex} || !_promise${tapIndex}.then)\n`; + code += ` throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise${tapIndex} + ')');\n`; + code += `_promise${tapIndex}.then((function(_result${tapIndex}) {\n`; + code += `_hasResult${tapIndex} = true;\n`; + if (onResult) { + code += onResult(`_result${tapIndex}`); + } + if (onDone) { + code += onDone(); + } + code += `}), function(_err${tapIndex}) {\n`; + code += `if(_hasResult${tapIndex}) throw _err${tapIndex};\n`; + code += onError(`_err${tapIndex}`); + code += "});\n"; + break; + } + return code; + } + + callTapsSeries({ + onError, + onResult, + resultReturns, + onDone, + doneReturns, + rethrowIfPossible + }) { + if (this.options.taps.length === 0) return onDone(); + const firstAsync = this.options.taps.findIndex(t => t.type !== "sync"); + const somethingReturns = resultReturns || doneReturns; + let code = ""; + let current = onDone; + let unrollCounter = 0; + for (let j = this.options.taps.length - 1; j >= 0; j--) { + const i = j; + const unroll = + current !== onDone && + (this.options.taps[i].type !== "sync" || unrollCounter++ > 20); + if (unroll) { + unrollCounter = 0; + code += `function _next${i}() {\n`; + code += current(); + code += `}\n`; + current = () => `${somethingReturns ? "return " : ""}_next${i}();\n`; + } + const done = current; + const doneBreak = skipDone => { + if (skipDone) return ""; + return onDone(); + }; + const content = this.callTap(i, { + onError: error => onError(i, error, done, doneBreak), + onResult: + onResult && + (result => { + return onResult(i, result, done, doneBreak); + }), + onDone: !onResult && done, + rethrowIfPossible: + rethrowIfPossible && (firstAsync < 0 || i < firstAsync) + }); + current = () => content; + } + code += current(); + return code; + } + + callTapsLooping({ onError, onDone, rethrowIfPossible }) { + if (this.options.taps.length === 0) return onDone(); + const syncOnly = this.options.taps.every(t => t.type === "sync"); + let code = ""; + if (!syncOnly) { + code += "var _looper = (function() {\n"; + code += "var _loopAsync = false;\n"; + } + code += "var _loop;\n"; + code += "do {\n"; + code += "_loop = false;\n"; + for (let i = 0; i < this.options.interceptors.length; i++) { + const interceptor = this.options.interceptors[i]; + if (interceptor.loop) { + code += `${this.getInterceptor(i)}.loop(${this.args({ + before: interceptor.context ? "_context" : undefined + })});\n`; + } + } + code += this.callTapsSeries({ + onError, + onResult: (i, result, next, doneBreak) => { + let code = ""; + code += `if(${result} !== undefined) {\n`; + code += "_loop = true;\n"; + if (!syncOnly) code += "if(_loopAsync) _looper();\n"; + code += doneBreak(true); + code += `} else {\n`; + code += next(); + code += `}\n`; + return code; + }, + onDone: + onDone && + (() => { + let code = ""; + code += "if(!_loop) {\n"; + code += onDone(); + code += "}\n"; + return code; + }), + rethrowIfPossible: rethrowIfPossible && syncOnly + }); + code += "} while(_loop);\n"; + if (!syncOnly) { + code += "_loopAsync = true;\n"; + code += "});\n"; + code += "_looper();\n"; + } + return code; + } + + callTapsParallel({ + onError, + onResult, + onDone, + rethrowIfPossible, + onTap = (i, run) => run() + }) { + if (this.options.taps.length <= 1) { + return this.callTapsSeries({ + onError, + onResult, + onDone, + rethrowIfPossible + }); + } + let code = ""; + code += "do {\n"; + code += `var _counter = ${this.options.taps.length};\n`; + if (onDone) { + code += "var _done = (function() {\n"; + code += onDone(); + code += "});\n"; + } + for (let i = 0; i < this.options.taps.length; i++) { + const done = () => { + if (onDone) return "if(--_counter === 0) _done();\n"; + else return "--_counter;"; + }; + const doneBreak = skipDone => { + if (skipDone || !onDone) return "_counter = 0;\n"; + else return "_counter = 0;\n_done();\n"; + }; + code += "if(_counter <= 0) break;\n"; + code += onTap( + i, + () => + this.callTap(i, { + onError: error => { + let code = ""; + code += "if(_counter > 0) {\n"; + code += onError(i, error, done, doneBreak); + code += "}\n"; + return code; + }, + onResult: + onResult && + (result => { + let code = ""; + code += "if(_counter > 0) {\n"; + code += onResult(i, result, done, doneBreak); + code += "}\n"; + return code; + }), + onDone: + !onResult && + (() => { + return done(); + }), + rethrowIfPossible + }), + done, + doneBreak + ); + } + code += "} while(false);\n"; + return code; + } + + args({ before, after } = {}) { + let allArgs = this._args; + if (before) allArgs = [before].concat(allArgs); + if (after) allArgs = allArgs.concat(after); + if (allArgs.length === 0) { + return ""; + } else { + return allArgs.join(", "); + } + } + + getTapFn(idx) { + return `_x[${idx}]`; + } + + getTap(idx) { + return `_taps[${idx}]`; + } + + getInterceptor(idx) { + return `_interceptors[${idx}]`; + } +} + +module.exports = HookCodeFactory; diff --git a/node_modules/tapable/lib/HookMap.js b/node_modules/tapable/lib/HookMap.js new file mode 100644 index 0000000..129ad6a --- /dev/null +++ b/node_modules/tapable/lib/HookMap.js @@ -0,0 +1,61 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const util = require("util"); + +const defaultFactory = (key, hook) => hook; + +class HookMap { + constructor(factory, name = undefined) { + this._map = new Map(); + this.name = name; + this._factory = factory; + this._interceptors = []; + } + + get(key) { + return this._map.get(key); + } + + for(key) { + const hook = this.get(key); + if (hook !== undefined) { + return hook; + } + let newHook = this._factory(key); + const interceptors = this._interceptors; + for (let i = 0; i < interceptors.length; i++) { + newHook = interceptors[i].factory(key, newHook); + } + this._map.set(key, newHook); + return newHook; + } + + intercept(interceptor) { + this._interceptors.push( + Object.assign( + { + factory: defaultFactory + }, + interceptor + ) + ); + } +} + +HookMap.prototype.tap = util.deprecate(function(key, options, fn) { + return this.for(key).tap(options, fn); +}, "HookMap#tap(key,…) is deprecated. Use HookMap#for(key).tap(…) instead."); + +HookMap.prototype.tapAsync = util.deprecate(function(key, options, fn) { + return this.for(key).tapAsync(options, fn); +}, "HookMap#tapAsync(key,…) is deprecated. Use HookMap#for(key).tapAsync(…) instead."); + +HookMap.prototype.tapPromise = util.deprecate(function(key, options, fn) { + return this.for(key).tapPromise(options, fn); +}, "HookMap#tapPromise(key,…) is deprecated. Use HookMap#for(key).tapPromise(…) instead."); + +module.exports = HookMap; diff --git a/node_modules/tapable/lib/MultiHook.js b/node_modules/tapable/lib/MultiHook.js new file mode 100644 index 0000000..e4fc2ce --- /dev/null +++ b/node_modules/tapable/lib/MultiHook.js @@ -0,0 +1,54 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const Hook = require("./Hook"); + +class MultiHook { + constructor(hooks, name = undefined) { + this.hooks = hooks; + this.name = name; + } + + tap(options, fn) { + for (const hook of this.hooks) { + hook.tap(options, fn); + } + } + + tapAsync(options, fn) { + for (const hook of this.hooks) { + hook.tapAsync(options, fn); + } + } + + tapPromise(options, fn) { + for (const hook of this.hooks) { + hook.tapPromise(options, fn); + } + } + + isUsed() { + for (const hook of this.hooks) { + if (hook.isUsed()) return true; + } + return false; + } + + intercept(interceptor) { + for (const hook of this.hooks) { + hook.intercept(interceptor); + } + } + + withOptions(options) { + return new MultiHook( + this.hooks.map(h => h.withOptions(options)), + this.name + ); + } +} + +module.exports = MultiHook; diff --git a/node_modules/tapable/lib/SyncBailHook.js b/node_modules/tapable/lib/SyncBailHook.js new file mode 100644 index 0000000..bdd5b45 --- /dev/null +++ b/node_modules/tapable/lib/SyncBailHook.js @@ -0,0 +1,51 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const Hook = require("./Hook"); +const HookCodeFactory = require("./HookCodeFactory"); + +class SyncBailHookCodeFactory extends HookCodeFactory { + content({ onError, onResult, resultReturns, onDone, rethrowIfPossible }) { + return this.callTapsSeries({ + onError: (i, err) => onError(err), + onResult: (i, result, next) => + `if(${result} !== undefined) {\n${onResult( + result + )};\n} else {\n${next()}}\n`, + resultReturns, + onDone, + rethrowIfPossible + }); + } +} + +const factory = new SyncBailHookCodeFactory(); + +const TAP_ASYNC = () => { + throw new Error("tapAsync is not supported on a SyncBailHook"); +}; + +const TAP_PROMISE = () => { + throw new Error("tapPromise is not supported on a SyncBailHook"); +}; + +const COMPILE = function(options) { + factory.setup(this, options); + return factory.create(options); +}; + +function SyncBailHook(args = [], name = undefined) { + const hook = new Hook(args, name); + hook.constructor = SyncBailHook; + hook.tapAsync = TAP_ASYNC; + hook.tapPromise = TAP_PROMISE; + hook.compile = COMPILE; + return hook; +} + +SyncBailHook.prototype = null; + +module.exports = SyncBailHook; diff --git a/node_modules/tapable/lib/SyncHook.js b/node_modules/tapable/lib/SyncHook.js new file mode 100644 index 0000000..e2512be --- /dev/null +++ b/node_modules/tapable/lib/SyncHook.js @@ -0,0 +1,46 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const Hook = require("./Hook"); +const HookCodeFactory = require("./HookCodeFactory"); + +class SyncHookCodeFactory extends HookCodeFactory { + content({ onError, onDone, rethrowIfPossible }) { + return this.callTapsSeries({ + onError: (i, err) => onError(err), + onDone, + rethrowIfPossible + }); + } +} + +const factory = new SyncHookCodeFactory(); + +const TAP_ASYNC = () => { + throw new Error("tapAsync is not supported on a SyncHook"); +}; + +const TAP_PROMISE = () => { + throw new Error("tapPromise is not supported on a SyncHook"); +}; + +const COMPILE = function(options) { + factory.setup(this, options); + return factory.create(options); +}; + +function SyncHook(args = [], name = undefined) { + const hook = new Hook(args, name); + hook.constructor = SyncHook; + hook.tapAsync = TAP_ASYNC; + hook.tapPromise = TAP_PROMISE; + hook.compile = COMPILE; + return hook; +} + +SyncHook.prototype = null; + +module.exports = SyncHook; diff --git a/node_modules/tapable/lib/SyncLoopHook.js b/node_modules/tapable/lib/SyncLoopHook.js new file mode 100644 index 0000000..be0e4fd --- /dev/null +++ b/node_modules/tapable/lib/SyncLoopHook.js @@ -0,0 +1,46 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const Hook = require("./Hook"); +const HookCodeFactory = require("./HookCodeFactory"); + +class SyncLoopHookCodeFactory extends HookCodeFactory { + content({ onError, onDone, rethrowIfPossible }) { + return this.callTapsLooping({ + onError: (i, err) => onError(err), + onDone, + rethrowIfPossible + }); + } +} + +const factory = new SyncLoopHookCodeFactory(); + +const TAP_ASYNC = () => { + throw new Error("tapAsync is not supported on a SyncLoopHook"); +}; + +const TAP_PROMISE = () => { + throw new Error("tapPromise is not supported on a SyncLoopHook"); +}; + +const COMPILE = function(options) { + factory.setup(this, options); + return factory.create(options); +}; + +function SyncLoopHook(args = [], name = undefined) { + const hook = new Hook(args, name); + hook.constructor = SyncLoopHook; + hook.tapAsync = TAP_ASYNC; + hook.tapPromise = TAP_PROMISE; + hook.compile = COMPILE; + return hook; +} + +SyncLoopHook.prototype = null; + +module.exports = SyncLoopHook; diff --git a/node_modules/tapable/lib/SyncWaterfallHook.js b/node_modules/tapable/lib/SyncWaterfallHook.js new file mode 100644 index 0000000..c878b7f --- /dev/null +++ b/node_modules/tapable/lib/SyncWaterfallHook.js @@ -0,0 +1,57 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const Hook = require("./Hook"); +const HookCodeFactory = require("./HookCodeFactory"); + +class SyncWaterfallHookCodeFactory extends HookCodeFactory { + content({ onError, onResult, resultReturns, rethrowIfPossible }) { + return this.callTapsSeries({ + onError: (i, err) => onError(err), + onResult: (i, result, next) => { + let code = ""; + code += `if(${result} !== undefined) {\n`; + code += `${this._args[0]} = ${result};\n`; + code += `}\n`; + code += next(); + return code; + }, + onDone: () => onResult(this._args[0]), + doneReturns: resultReturns, + rethrowIfPossible + }); + } +} + +const factory = new SyncWaterfallHookCodeFactory(); + +const TAP_ASYNC = () => { + throw new Error("tapAsync is not supported on a SyncWaterfallHook"); +}; + +const TAP_PROMISE = () => { + throw new Error("tapPromise is not supported on a SyncWaterfallHook"); +}; + +const COMPILE = function(options) { + factory.setup(this, options); + return factory.create(options); +}; + +function SyncWaterfallHook(args = [], name = undefined) { + if (args.length < 1) + throw new Error("Waterfall hooks must have at least one argument"); + const hook = new Hook(args, name); + hook.constructor = SyncWaterfallHook; + hook.tapAsync = TAP_ASYNC; + hook.tapPromise = TAP_PROMISE; + hook.compile = COMPILE; + return hook; +} + +SyncWaterfallHook.prototype = null; + +module.exports = SyncWaterfallHook; diff --git a/node_modules/tapable/lib/index.js b/node_modules/tapable/lib/index.js new file mode 100644 index 0000000..0a94a53 --- /dev/null +++ b/node_modules/tapable/lib/index.js @@ -0,0 +1,19 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +exports.__esModule = true; +exports.SyncHook = require("./SyncHook"); +exports.SyncBailHook = require("./SyncBailHook"); +exports.SyncWaterfallHook = require("./SyncWaterfallHook"); +exports.SyncLoopHook = require("./SyncLoopHook"); +exports.AsyncParallelHook = require("./AsyncParallelHook"); +exports.AsyncParallelBailHook = require("./AsyncParallelBailHook"); +exports.AsyncSeriesHook = require("./AsyncSeriesHook"); +exports.AsyncSeriesBailHook = require("./AsyncSeriesBailHook"); +exports.AsyncSeriesLoopHook = require("./AsyncSeriesLoopHook"); +exports.AsyncSeriesWaterfallHook = require("./AsyncSeriesWaterfallHook"); +exports.HookMap = require("./HookMap"); +exports.MultiHook = require("./MultiHook"); diff --git a/node_modules/tapable/lib/util-browser.js b/node_modules/tapable/lib/util-browser.js new file mode 100644 index 0000000..ee4fb9a --- /dev/null +++ b/node_modules/tapable/lib/util-browser.js @@ -0,0 +1,16 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +exports.deprecate = (fn, msg) => { + let once = true; + return function() { + if (once) { + console.warn("DeprecationWarning: " + msg); + once = false; + } + return fn.apply(this, arguments); + }; +}; diff --git a/node_modules/tapable/package.json b/node_modules/tapable/package.json new file mode 100644 index 0000000..3c13120 --- /dev/null +++ b/node_modules/tapable/package.json @@ -0,0 +1,44 @@ +{ + "name": "tapable", + "version": "2.2.1", + "author": "Tobias Koppers @sokra", + "description": "Just a little module for plugins.", + "license": "MIT", + "homepage": "https://github.com/webpack/tapable", + "repository": { + "type": "git", + "url": "http://github.com/webpack/tapable.git" + }, + "devDependencies": { + "@babel/core": "^7.4.4", + "@babel/preset-env": "^7.4.4", + "babel-jest": "^24.8.0", + "codecov": "^3.5.0", + "jest": "^24.8.0", + "prettier": "^1.17.1" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "lib", + "!lib/__tests__", + "tapable.d.ts" + ], + "main": "lib/index.js", + "types": "./tapable.d.ts", + "browser": { + "util": "./lib/util-browser.js" + }, + "scripts": { + "test": "jest", + "travis": "yarn pretty-lint && jest --coverage && codecov", + "pretty-lint": "prettier --check lib/*.js lib/__tests__/*.js", + "pretty": "prettier --loglevel warn --write lib/*.js lib/__tests__/*.js" + }, + "jest": { + "transform": { + "__tests__[\\\\/].+\\.js$": "babel-jest" + } + } +} diff --git a/node_modules/tapable/tapable.d.ts b/node_modules/tapable/tapable.d.ts new file mode 100644 index 0000000..0201c9a --- /dev/null +++ b/node_modules/tapable/tapable.d.ts @@ -0,0 +1,116 @@ +type FixedSizeArray = T extends 0 + ? void[] + : ReadonlyArray & { + 0: U; + length: T; + }; +type Measure = T extends 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 + ? T + : never; +type Append = { + 0: [U]; + 1: [T[0], U]; + 2: [T[0], T[1], U]; + 3: [T[0], T[1], T[2], U]; + 4: [T[0], T[1], T[2], T[3], U]; + 5: [T[0], T[1], T[2], T[3], T[4], U]; + 6: [T[0], T[1], T[2], T[3], T[4], T[5], U]; + 7: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], U]; + 8: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], T[7], U]; +}[Measure]; +type AsArray = T extends any[] ? T : [T]; + +declare class UnsetAdditionalOptions { + _UnsetAdditionalOptions: true +} +type IfSet = X extends UnsetAdditionalOptions ? {} : X; + +type Callback = (error: E | null, result?: T) => void; +type InnerCallback = (error?: E | null | false, result?: T) => void; + +type FullTap = Tap & { + type: "sync" | "async" | "promise", + fn: Function +} + +type Tap = TapOptions & { + name: string; +}; + +type TapOptions = { + before?: string; + stage?: number; +}; + +interface HookInterceptor { + name?: string; + tap?: (tap: FullTap & IfSet) => void; + call?: (...args: any[]) => void; + loop?: (...args: any[]) => void; + error?: (err: Error) => void; + result?: (result: R) => void; + done?: () => void; + register?: (tap: FullTap & IfSet) => FullTap & IfSet; +} + +type ArgumentNames = FixedSizeArray; + +declare class Hook { + constructor(args?: ArgumentNames>, name?: string); + name: string | undefined; + taps: FullTap[]; + intercept(interceptor: HookInterceptor): void; + isUsed(): boolean; + callAsync(...args: Append, Callback>): void; + promise(...args: AsArray): Promise; + tap(options: string | Tap & IfSet, fn: (...args: AsArray) => R): void; + withOptions(options: TapOptions & IfSet): Omit; +} + +export class SyncHook extends Hook { + call(...args: AsArray): R; +} + +export class SyncBailHook extends SyncHook {} +export class SyncLoopHook extends SyncHook {} +export class SyncWaterfallHook extends SyncHook[0], AdditionalOptions> {} + +declare class AsyncHook extends Hook { + tapAsync( + options: string | Tap & IfSet, + fn: (...args: Append, InnerCallback>) => void + ): void; + tapPromise( + options: string | Tap & IfSet, + fn: (...args: AsArray) => Promise + ): void; +} + +export class AsyncParallelHook extends AsyncHook {} +export class AsyncParallelBailHook extends AsyncHook {} +export class AsyncSeriesHook extends AsyncHook {} +export class AsyncSeriesBailHook extends AsyncHook {} +export class AsyncSeriesLoopHook extends AsyncHook {} +export class AsyncSeriesWaterfallHook extends AsyncHook[0], AdditionalOptions> {} + +type HookFactory = (key: any, hook?: H) => H; + +interface HookMapInterceptor { + factory?: HookFactory; +} + +export class HookMap { + constructor(factory: HookFactory, name?: string); + name: string | undefined; + get(key: any): H | undefined; + for(key: any): H; + intercept(interceptor: HookMapInterceptor): void; +} + +export class MultiHook { + constructor(hooks: H[], name?: string); + name: string | undefined; + tap(options: string | Tap, fn?: Function): void; + tapAsync(options: string | Tap, fn?: Function): void; + tapPromise(options: string | Tap, fn?: Function): void; +} diff --git a/node_modules/tar/LICENSE b/node_modules/tar/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/tar/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/tar/README.md b/node_modules/tar/README.md new file mode 100644 index 0000000..feb225c --- /dev/null +++ b/node_modules/tar/README.md @@ -0,0 +1,1105 @@ +# node-tar + +Fast and full-featured Tar for Node.js + +The API is designed to mimic the behavior of `tar(1)` on unix systems. +If you are familiar with how tar works, most of this will hopefully be +straightforward for you. If not, then hopefully this module can teach +you useful unix skills that may come in handy someday :) + +## Background + +A "tar file" or "tarball" is an archive of file system entries +(directories, files, links, etc.) The name comes from "tape archive". +If you run `man tar` on almost any Unix command line, you'll learn +quite a bit about what it can do, and its history. + +Tar has 5 main top-level commands: + +- `c` Create an archive +- `r` Replace entries within an archive +- `u` Update entries within an archive (ie, replace if they're newer) +- `t` List out the contents of an archive +- `x` Extract an archive to disk + +The other flags and options modify how this top level function works. + +## High-Level API + +These 5 functions are the high-level API. All of them have a +single-character name (for unix nerds familiar with `tar(1)`) as well +as a long name (for everyone else). + +All the high-level functions take the following arguments, all three +of which are optional and may be omitted. + +1. `options` - An optional object specifying various options +2. `paths` - An array of paths to add or extract +3. `callback` - Called when the command is completed, if async. (If + sync or no file specified, providing a callback throws a + `TypeError`.) + +If the command is sync (ie, if `options.sync=true`), then the +callback is not allowed, since the action will be completed immediately. + +If a `file` argument is specified, and the command is async, then a +`Promise` is returned. In this case, if async, a callback may be +provided which is called when the command is completed. + +If a `file` option is not specified, then a stream is returned. For +`create`, this is a readable stream of the generated archive. For +`list` and `extract` this is a writable stream that an archive should +be written into. If a file is not specified, then a callback is not +allowed, because you're already getting a stream to work with. + +`replace` and `update` only work on existing archives, and so require +a `file` argument. + +Sync commands without a file argument return a stream that acts on its +input immediately in the same tick. For readable streams, this means +that all of the data is immediately available by calling +`stream.read()`. For writable streams, it will be acted upon as soon +as it is provided, but this can be at any time. + +### Warnings and Errors + +Tar emits warnings and errors for recoverable and unrecoverable situations, +respectively. In many cases, a warning only affects a single entry in an +archive, or is simply informing you that it's modifying an entry to comply +with the settings provided. + +Unrecoverable warnings will always raise an error (ie, emit `'error'` on +streaming actions, throw for non-streaming sync actions, reject the +returned Promise for non-streaming async operations, or call a provided +callback with an `Error` as the first argument). Recoverable errors will +raise an error only if `strict: true` is set in the options. + +Respond to (recoverable) warnings by listening to the `warn` event. +Handlers receive 3 arguments: + +- `code` String. One of the error codes below. This may not match + `data.code`, which preserves the original error code from fs and zlib. +- `message` String. More details about the error. +- `data` Metadata about the error. An `Error` object for errors raised by + fs and zlib. All fields are attached to errors raisd by tar. Typically + contains the following fields, as relevant: + - `tarCode` The tar error code. + - `code` Either the tar error code, or the error code set by the + underlying system. + - `file` The archive file being read or written. + - `cwd` Working directory for creation and extraction operations. + - `entry` The entry object (if it could be created) for `TAR_ENTRY_INFO`, + `TAR_ENTRY_INVALID`, and `TAR_ENTRY_ERROR` warnings. + - `header` The header object (if it could be created, and the entry could + not be created) for `TAR_ENTRY_INFO` and `TAR_ENTRY_INVALID` warnings. + - `recoverable` Boolean. If `false`, then the warning will emit an + `error`, even in non-strict mode. + +#### Error Codes + +- `TAR_ENTRY_INFO` An informative error indicating that an entry is being + modified, but otherwise processed normally. For example, removing `/` or + `C:\` from absolute paths if `preservePaths` is not set. + +- `TAR_ENTRY_INVALID` An indication that a given entry is not a valid tar + archive entry, and will be skipped. This occurs when: + + - a checksum fails, + - a `linkpath` is missing for a link type, or + - a `linkpath` is provided for a non-link type. + + If every entry in a parsed archive raises an `TAR_ENTRY_INVALID` error, + then the archive is presumed to be unrecoverably broken, and + `TAR_BAD_ARCHIVE` will be raised. + +- `TAR_ENTRY_ERROR` The entry appears to be a valid tar archive entry, but + encountered an error which prevented it from being unpacked. This occurs + when: + + - an unrecoverable fs error happens during unpacking, + - an entry is trying to extract into an excessively deep + location (by default, limited to 1024 subfolders), + - an entry has `..` in the path and `preservePaths` is not set, or + - an entry is extracting through a symbolic link, when `preservePaths` is + not set. + +- `TAR_ENTRY_UNSUPPORTED` An indication that a given entry is + a valid archive entry, but of a type that is unsupported, and so will be + skipped in archive creation or extracting. + +- `TAR_ABORT` When parsing gzipped-encoded archives, the parser will + abort the parse process raise a warning for any zlib errors encountered. + Aborts are considered unrecoverable for both parsing and unpacking. + +- `TAR_BAD_ARCHIVE` The archive file is totally hosed. This can happen for + a number of reasons, and always occurs at the end of a parse or extract: + + - An entry body was truncated before seeing the full number of bytes. + - The archive contained only invalid entries, indicating that it is + likely not an archive, or at least, not an archive this library can + parse. + + `TAR_BAD_ARCHIVE` is considered informative for parse operations, but + unrecoverable for extraction. Note that, if encountered at the end of an + extraction, tar WILL still have extracted as much it could from the + archive, so there may be some garbage files to clean up. + +Errors that occur deeper in the system (ie, either the filesystem or zlib) +will have their error codes left intact, and a `tarCode` matching one of +the above will be added to the warning metadata or the raised error object. + +Errors generated by tar will have one of the above codes set as the +`error.code` field as well, but since errors originating in zlib or fs will +have their original codes, it's better to read `error.tarCode` if you wish +to see how tar is handling the issue. + +### Examples + +The API mimics the `tar(1)` command line functionality, with aliases +for more human-readable option and function names. The goal is that +if you know how to use `tar(1)` in Unix, then you know how to use +`import('tar')` in JavaScript. + +To replicate `tar czf my-tarball.tgz files and folders`, you'd do: + +```js +import { create } from 'tar' +create( + { + gzip: , + file: 'my-tarball.tgz' + }, + ['some', 'files', 'and', 'folders'] +).then(_ => { .. tarball has been created .. }) +``` + +To replicate `tar cz files and folders > my-tarball.tgz`, you'd do: + +```js +// if you're familiar with the tar(1) cli flags, this can be nice +import * as tar from 'tar' +tar.c( + { + // 'z' is alias for 'gzip' option + z: + }, + ['some', 'files', 'and', 'folders'] +).pipe(fs.createWriteStream('my-tarball.tgz')) +``` + +To replicate `tar xf my-tarball.tgz` you'd do: + +```js +tar.x( // or `tar.extract` + { + // or `file:` + f: 'my-tarball.tgz' + } +).then(_=> { .. tarball has been dumped in cwd .. }) +``` + +To replicate `cat my-tarball.tgz | tar x -C some-dir --strip=1`: + +```js +fs.createReadStream('my-tarball.tgz').pipe( + tar.x({ + strip: 1, + C: 'some-dir', // alias for cwd:'some-dir', also ok + }), +) +``` + +To replicate `tar tf my-tarball.tgz`, do this: + +```js +tar.t({ + file: 'my-tarball.tgz', + onReadEntry: entry => { .. do whatever with it .. } +}) +``` + +For example, to just get the list of filenames from an archive: + +```js +const getEntryFilenames = async tarballFilename => { + const filenames = [] + await tar.t({ + file: tarballFilename, + onReadEntry: entry => filenames.push(entry.path), + }) + return filenames +} +``` + +To replicate `cat my-tarball.tgz | tar t` do: + +```js +fs.createReadStream('my-tarball.tgz') + .pipe(tar.t()) + .on('entry', entry => { .. do whatever with it .. }) +``` + +To do anything synchronous, add `sync: true` to the options. Note +that sync functions don't take a callback and don't return a promise. +When the function returns, it's already done. Sync methods without a +file argument return a sync stream, which flushes immediately. But, +of course, it still won't be done until you `.end()` it. + +```js +const getEntryFilenamesSync = tarballFilename => { + const filenames = [] + tar.t({ + file: tarballFilename, + onReadEntry: entry => filenames.push(entry.path), + sync: true, + }) + return filenames +} +``` + +To filter entries, add `filter: ` to the options. +Tar-creating methods call the filter with `filter(path, stat)`. +Tar-reading methods (including extraction) call the filter with +`filter(path, entry)`. The filter is called in the `this`-context of +the `Pack` or `Unpack` stream object. + +The arguments list to `tar t` and `tar x` specify a list of filenames +to extract or list, so they're equivalent to a filter that tests if +the file is in the list. + +For those who _aren't_ fans of tar's single-character command names: + +``` +tar.c === tar.create +tar.r === tar.replace (appends to archive, file is required) +tar.u === tar.update (appends if newer, file is required) +tar.x === tar.extract +tar.t === tar.list +``` + +Keep reading for all the command descriptions and options, as well as +the low-level API that they are built on. + +### tar.c(options, fileList, callback) [alias: tar.create] + +Create a tarball archive. + +The `fileList` is an array of paths to add to the tarball. Adding a +directory also adds its children recursively. + +An entry in `fileList` that starts with an `@` symbol is a tar archive +whose entries will be added. To add a file that starts with `@`, +prepend it with `./`. + +The following options are supported: + +- `file` Write the tarball archive to the specified filename. If this + is specified, then the callback will be fired when the file has been + written, and a promise will be returned that resolves when the file + is written. If a filename is not specified, then a Readable Stream + will be returned which will emit the file data. [Alias: `f`] +- `sync` Act synchronously. If this is set, then any provided file + will be fully written after the call to `tar.c`. If this is set, + and a file is not provided, then the resulting stream will already + have the data ready to `read` or `emit('data')` as soon as you + request it. +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") +- `strict` Treat warnings as crash-worthy errors. Default false. +- `cwd` The current working directory for creating the archive. + Defaults to `process.cwd()`. [Alias: `C`] +- `prefix` A path portion to prefix onto the entries in the archive. +- `gzip` Set to any truthy value to create a gzipped archive, or an + object with settings for `zlib.Gzip()` [Alias: `z`] +- `filter` A function that gets called with `(path, stat)` for each + entry being added. Return `true` to add the entry to the archive, + or `false` to omit it. +- `portable` Omit metadata that is system-specific: `ctime`, `atime`, + `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note + that `mtime` is still included, because this is necessary for other + time-based operations. Additionally, `mode` is set to a "reasonable + default" for most unix systems, based on a `umask` value of `0o22`. +- `preservePaths` Allow absolute paths. By default, `/` is stripped + from absolute paths. [Alias: `P`] +- `mode` The mode to set on the created file archive +- `noDirRecurse` Do not recursively archive the contents of + directories. [Alias: `n`] +- `follow` Set to true to pack the targets of symbolic links. Without + this option, symbolic links are archived as such. [Alias: `L`, `h`] +- `noPax` Suppress pax extended headers. Note that this means that + long paths and linkpaths will be truncated, and large or negative + numeric values may be interpreted incorrectly. +- `noMtime` Set to true to omit writing `mtime` values for entries. + Note that this prevents using other mtime-based features like + `tar.update` or the `keepNewer` option with the resulting tar archive. + [Alias: `m`, `no-mtime`] +- `mtime` Set to a `Date` object to force a specific `mtime` for + everything added to the archive. Overridden by `noMtime`. +- `onWriteEntry` Called with each `WriteEntry` or + `WriteEntrySync` that is created in the course of writing the + archive. + +The following options are mostly internal, but can be modified in some +advanced use cases, such as re-using caches between runs. + +- `linkCache` A Map object containing the device and inode value for + any file whose nlink is > 1, to identify hard links. +- `statCache` A Map object that caches calls `lstat`. +- `readdirCache` A Map object that caches calls to `readdir`. +- `jobs` A number specifying how many concurrent jobs to run. + Defaults to 4. +- `maxReadSize` The maximum buffer size for `fs.read()` operations. + Defaults to 16 MB. + +### tar.x(options, fileList, callback) [alias: tar.extract] + +Extract a tarball archive. + +The `fileList` is an array of paths to extract from the tarball. If +no paths are provided, then all the entries are extracted. + +If the archive is gzipped, then tar will detect this and unzip it. + +Note that all directories that are created will be forced to be +writable, readable, and listable by their owner, to avoid cases where +a directory prevents extraction of child entries by virtue of its +mode. + +Most extraction errors will cause a `warn` event to be emitted. If +the `cwd` is missing, or not a directory, then the extraction will +fail completely. + +The following options are supported: + +- `cwd` Extract files relative to the specified directory. Defaults + to `process.cwd()`. If provided, this must exist and must be a + directory. [Alias: `C`] +- `file` The archive file to extract. If not specified, then a + Writable stream is returned where the archive data should be + written. [Alias: `f`] +- `sync` Create files and directories synchronously. +- `strict` Treat warnings as crash-worthy errors. Default false. +- `filter` A function that gets called with `(path, entry)` for each + entry being unpacked. Return `true` to unpack the entry from the + archive, or `false` to skip it. +- `newer` Set to true to keep the existing file on disk if it's newer + than the file in the archive. [Alias: `keep-newer`, + `keep-newer-files`] +- `keep` Do not overwrite existing files. In particular, if a file + appears more than once in an archive, later copies will not + overwrite earlier copies. [Alias: `k`, `keep-existing`] +- `preservePaths` Allow absolute paths, paths containing `..`, and + extracting through symbolic links. By default, `/` is stripped from + absolute paths, `..` paths are not extracted, and any file whose + location would be modified by a symbolic link is not extracted. + [Alias: `P`] +- `unlink` Unlink files before creating them. Without this option, + tar overwrites existing files, which preserves existing hardlinks. + With this option, existing hardlinks will be broken, as will any + symlink that would affect the location of an extracted file. [Alias: + `U`] +- `strip` Remove the specified number of leading path elements. + Pathnames with fewer elements will be silently skipped. Note that + the pathname is edited after applying the filter, but before + security checks. [Alias: `strip-components`, `stripComponents`] +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") +- `preserveOwner` If true, tar will set the `uid` and `gid` of + extracted entries to the `uid` and `gid` fields in the archive. + This defaults to true when run as root, and false otherwise. If + false, then files and directories will be set with the owner and + group of the user running the process. This is similar to `-p` in + `tar(1)`, but ACLs and other system-specific data is never unpacked + in this implementation, and modes are set by default already. + [Alias: `p`] +- `uid` Set to a number to force ownership of all extracted files and + folders, and all implicitly created directories, to be owned by the + specified user id, regardless of the `uid` field in the archive. + Cannot be used along with `preserveOwner`. Requires also setting a + `gid` option. +- `gid` Set to a number to force ownership of all extracted files and + folders, and all implicitly created directories, to be owned by the + specified group id, regardless of the `gid` field in the archive. + Cannot be used along with `preserveOwner`. Requires also setting a + `uid` option. +- `noMtime` Set to true to omit writing `mtime` value for extracted + entries. [Alias: `m`, `no-mtime`] +- `transform` Provide a function that takes an `entry` object, and + returns a stream, or any falsey value. If a stream is provided, + then that stream's data will be written instead of the contents of + the archive entry. If a falsey value is provided, then the entry is + written to disk as normal. (To exclude items from extraction, use + the `filter` option described above.) +- `onReadEntry` A function that gets called with `(entry)` for each entry + that passes the filter. +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") +- `chmod` Set to true to call `fs.chmod()` to ensure that the + extracted file matches the entry mode. This may necessitate a + call to the deprecated and thread-unsafe `process.umask()` + method to determine the default umask value, unless a + `processUmask` options is also provided. Otherwise tar will + extract with whatever mode is provided, and let the process + `umask` apply normally. +- `processUmask` Set to an explicit numeric value to avoid + calling `process.umask()` when `chmod: true` is set. +- `maxDepth` The maximum depth of subfolders to extract into. This + defaults to 1024. Anything deeper than the limit will raise a + warning and skip the entry. Set to `Infinity` to remove the + limitation. + +The following options are mostly internal, but can be modified in some +advanced use cases, such as re-using caches between runs. + +- `maxReadSize` The maximum buffer size for `fs.read()` operations. + Defaults to 16 MB. +- `umask` Filter the modes of entries like `process.umask()`. +- `dmode` Default mode for directories +- `fmode` Default mode for files +- `dirCache` A Map object of which directories exist. +- `maxMetaEntrySize` The maximum size of meta entries that is + supported. Defaults to 1 MB. + +Note that using an asynchronous stream type with the `transform` +option will cause undefined behavior in sync extractions. +[MiniPass](http://npm.im/minipass)-based streams are designed for this +use case. + +### tar.t(options, fileList, callback) [alias: tar.list] + +List the contents of a tarball archive. + +The `fileList` is an array of paths to list from the tarball. If +no paths are provided, then all the entries are listed. + +If the archive is gzipped, then tar will detect this and unzip it. + +If the `file` option is _not_ provided, then returns an event emitter that +emits `entry` events with `tar.ReadEntry` objects. However, they don't +emit `'data'` or `'end'` events. (If you want to get actual readable +entries, use the `tar.Parse` class instead.) + +If a `file` option _is_ provided, then the return value will be a promise +that resolves when the file has been fully traversed in async mode, or +`undefined` if `sync: true` is set. Thus, you _must_ specify an `onReadEntry` +method in order to do anything useful with the data it parses. + +The following options are supported: + +- `file` The archive file to list. If not specified, then a + Writable stream is returned where the archive data should be + written. [Alias: `f`] +- `sync` Read the specified file synchronously. (This has no effect + when a file option isn't specified, because entries are emitted as + fast as they are parsed from the stream anyway.) +- `strict` Treat warnings as crash-worthy errors. Default false. +- `filter` A function that gets called with `(path, entry)` for each + entry being listed. Return `true` to emit the entry from the + archive, or `false` to skip it. +- `onReadEntry` A function that gets called with `(entry)` for each entry + that passes the filter. This is important for when `file` is set, + because there is no other way to do anything useful with this method. +- `maxReadSize` The maximum buffer size for `fs.read()` operations. + Defaults to 16 MB. +- `noResume` By default, `entry` streams are resumed immediately after + the call to `onReadEntry`. Set `noResume: true` to suppress this + behavior. Note that by opting into this, the stream will never + complete until the entry data is consumed. +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") + +### tar.u(options, fileList, callback) [alias: tar.update] + +Add files to an archive if they are newer than the entry already in +the tarball archive. + +The `fileList` is an array of paths to add to the tarball. Adding a +directory also adds its children recursively. + +An entry in `fileList` that starts with an `@` symbol is a tar archive +whose entries will be added. To add a file that starts with `@`, +prepend it with `./`. + +The following options are supported: + +- `file` Required. Write the tarball archive to the specified + filename. [Alias: `f`] +- `sync` Act synchronously. If this is set, then any provided file + will be fully written after the call to `tar.c`. +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") +- `strict` Treat warnings as crash-worthy errors. Default false. +- `cwd` The current working directory for adding entries to the + archive. Defaults to `process.cwd()`. [Alias: `C`] +- `prefix` A path portion to prefix onto the entries in the archive. +- `gzip` Set to any truthy value to create a gzipped archive, or an + object with settings for `zlib.Gzip()` [Alias: `z`] +- `filter` A function that gets called with `(path, stat)` for each + entry being added. Return `true` to add the entry to the archive, + or `false` to omit it. +- `portable` Omit metadata that is system-specific: `ctime`, `atime`, + `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note + that `mtime` is still included, because this is necessary for other + time-based operations. Additionally, `mode` is set to a "reasonable + default" for most unix systems, based on a `umask` value of `0o22`. +- `preservePaths` Allow absolute paths. By default, `/` is stripped + from absolute paths. [Alias: `P`] +- `maxReadSize` The maximum buffer size for `fs.read()` operations. + Defaults to 16 MB. +- `noDirRecurse` Do not recursively archive the contents of + directories. [Alias: `n`] +- `follow` Set to true to pack the targets of symbolic links. Without + this option, symbolic links are archived as such. [Alias: `L`, `h`] +- `noPax` Suppress pax extended headers. Note that this means that + long paths and linkpaths will be truncated, and large or negative + numeric values may be interpreted incorrectly. +- `noMtime` Set to true to omit writing `mtime` values for entries. + Note that this prevents using other mtime-based features like + `tar.update` or the `keepNewer` option with the resulting tar archive. + [Alias: `m`, `no-mtime`] +- `mtime` Set to a `Date` object to force a specific `mtime` for + everything added to the archive. Overridden by `noMtime`. +- `onWriteEntry` Called with each `WriteEntry` or + `WriteEntrySync` that is created in the course of writing the + archive. + +### tar.r(options, fileList, callback) [alias: tar.replace] + +Add files to an existing archive. Because later entries override +earlier entries, this effectively replaces any existing entries. + +The `fileList` is an array of paths to add to the tarball. Adding a +directory also adds its children recursively. + +An entry in `fileList` that starts with an `@` symbol is a tar archive +whose entries will be added. To add a file that starts with `@`, +prepend it with `./`. + +The following options are supported: + +- `file` Required. Write the tarball archive to the specified + filename. [Alias: `f`] +- `sync` Act synchronously. If this is set, then any provided file + will be fully written after the call to `tar.c`. +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") +- `strict` Treat warnings as crash-worthy errors. Default false. +- `cwd` The current working directory for adding entries to the + archive. Defaults to `process.cwd()`. [Alias: `C`] +- `prefix` A path portion to prefix onto the entries in the archive. +- `gzip` Set to any truthy value to create a gzipped archive, or an + object with settings for `zlib.Gzip()` [Alias: `z`] +- `filter` A function that gets called with `(path, stat)` for each + entry being added. Return `true` to add the entry to the archive, + or `false` to omit it. +- `portable` Omit metadata that is system-specific: `ctime`, `atime`, + `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note + that `mtime` is still included, because this is necessary for other + time-based operations. Additionally, `mode` is set to a "reasonable + default" for most unix systems, based on a `umask` value of `0o22`. +- `preservePaths` Allow absolute paths. By default, `/` is stripped + from absolute paths. [Alias: `P`] +- `maxReadSize` The maximum buffer size for `fs.read()` operations. + Defaults to 16 MB. +- `noDirRecurse` Do not recursively archive the contents of + directories. [Alias: `n`] +- `follow` Set to true to pack the targets of symbolic links. Without + this option, symbolic links are archived as such. [Alias: `L`, `h`] +- `noPax` Suppress pax extended headers. Note that this means that + long paths and linkpaths will be truncated, and large or negative + numeric values may be interpreted incorrectly. +- `noMtime` Set to true to omit writing `mtime` values for entries. + Note that this prevents using other mtime-based features like + `tar.update` or the `keepNewer` option with the resulting tar archive. + [Alias: `m`, `no-mtime`] +- `mtime` Set to a `Date` object to force a specific `mtime` for + everything added to the archive. Overridden by `noMtime`. +- `onWriteEntry` Called with each `WriteEntry` or + `WriteEntrySync` that is created in the course of writing the + archive. + +## Low-Level API + +### class Pack + +A readable tar stream. + +Has all the standard readable stream interface stuff. `'data'` and +`'end'` events, `read()` method, `pause()` and `resume()`, etc. + +#### constructor(options) + +The following options are supported: + +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") +- `strict` Treat warnings as crash-worthy errors. Default false. +- `cwd` The current working directory for creating the archive. + Defaults to `process.cwd()`. +- `prefix` A path portion to prefix onto the entries in the archive. +- `gzip` Set to any truthy value to create a gzipped archive, or an + object with settings for `zlib.Gzip()` +- `filter` A function that gets called with `(path, stat)` for each + entry being added. Return `true` to add the entry to the archive, + or `false` to omit it. +- `portable` Omit metadata that is system-specific: `ctime`, `atime`, + `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note + that `mtime` is still included, because this is necessary for other + time-based operations. Additionally, `mode` is set to a "reasonable + default" for most unix systems, based on a `umask` value of `0o22`. +- `preservePaths` Allow absolute paths. By default, `/` is stripped + from absolute paths. +- `linkCache` A Map object containing the device and inode value for + any file whose nlink is > 1, to identify hard links. +- `statCache` A Map object that caches calls `lstat`. +- `readdirCache` A Map object that caches calls to `readdir`. +- `jobs` A number specifying how many concurrent jobs to run. + Defaults to 4. +- `maxReadSize` The maximum buffer size for `fs.read()` operations. + Defaults to 16 MB. +- `noDirRecurse` Do not recursively archive the contents of + directories. +- `follow` Set to true to pack the targets of symbolic links. Without + this option, symbolic links are archived as such. +- `noPax` Suppress pax extended headers. Note that this means that + long paths and linkpaths will be truncated, and large or negative + numeric values may be interpreted incorrectly. +- `noMtime` Set to true to omit writing `mtime` values for entries. + Note that this prevents using other mtime-based features like + `tar.update` or the `keepNewer` option with the resulting tar archive. +- `mtime` Set to a `Date` object to force a specific `mtime` for + everything added to the archive. Overridden by `noMtime`. +- `onWriteEntry` Called with each `WriteEntry` or + `WriteEntrySync` that is created in the course of writing the + archive. + +#### add(path) + +Adds an entry to the archive. Returns the Pack stream. + +#### write(path) + +Adds an entry to the archive. Returns true if flushed. + +#### end() + +Finishes the archive. + +### class PackSync + +Synchronous version of `Pack`. + +### class Unpack + +A writable stream that unpacks a tar archive onto the file system. + +All the normal writable stream stuff is supported. `write()` and +`end()` methods, `'drain'` events, etc. + +Note that all directories that are created will be forced to be +writable, readable, and listable by their owner, to avoid cases where +a directory prevents extraction of child entries by virtue of its +mode. + +`'close'` is emitted when it's done writing stuff to the file system. + +Most unpack errors will cause a `warn` event to be emitted. If the +`cwd` is missing, or not a directory, then an error will be emitted. + +#### constructor(options) + +- `cwd` Extract files relative to the specified directory. Defaults + to `process.cwd()`. If provided, this must exist and must be a + directory. +- `filter` A function that gets called with `(path, entry)` for each + entry being unpacked. Return `true` to unpack the entry from the + archive, or `false` to skip it. +- `newer` Set to true to keep the existing file on disk if it's newer + than the file in the archive. +- `keep` Do not overwrite existing files. In particular, if a file + appears more than once in an archive, later copies will not + overwrite earlier copies. +- `preservePaths` Allow absolute paths, paths containing `..`, and + extracting through symbolic links. By default, `/` is stripped from + absolute paths, `..` paths are not extracted, and any file whose + location would be modified by a symbolic link is not extracted. +- `unlink` Unlink files before creating them. Without this option, + tar overwrites existing files, which preserves existing hardlinks. + With this option, existing hardlinks will be broken, as will any + symlink that would affect the location of an extracted file. +- `strip` Remove the specified number of leading path elements. + Pathnames with fewer elements will be silently skipped. Note that + the pathname is edited after applying the filter, but before + security checks. +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") +- `umask` Filter the modes of entries like `process.umask()`. +- `dmode` Default mode for directories +- `fmode` Default mode for files +- `dirCache` A Map object of which directories exist. +- `maxMetaEntrySize` The maximum size of meta entries that is + supported. Defaults to 1 MB. +- `preserveOwner` If true, tar will set the `uid` and `gid` of + extracted entries to the `uid` and `gid` fields in the archive. + This defaults to true when run as root, and false otherwise. If + false, then files and directories will be set with the owner and + group of the user running the process. This is similar to `-p` in + `tar(1)`, but ACLs and other system-specific data is never unpacked + in this implementation, and modes are set by default already. +- `win32` True if on a windows platform. Causes behavior where + filenames containing `<|>?` chars are converted to + windows-compatible values while being unpacked. +- `uid` Set to a number to force ownership of all extracted files and + folders, and all implicitly created directories, to be owned by the + specified user id, regardless of the `uid` field in the archive. + Cannot be used along with `preserveOwner`. Requires also setting a + `gid` option. +- `gid` Set to a number to force ownership of all extracted files and + folders, and all implicitly created directories, to be owned by the + specified group id, regardless of the `gid` field in the archive. + Cannot be used along with `preserveOwner`. Requires also setting a + `uid` option. +- `noMtime` Set to true to omit writing `mtime` value for extracted + entries. +- `transform` Provide a function that takes an `entry` object, and + returns a stream, or any falsey value. If a stream is provided, + then that stream's data will be written instead of the contents of + the archive entry. If a falsey value is provided, then the entry is + written to disk as normal. (To exclude items from extraction, use + the `filter` option described above.) +- `strict` Treat warnings as crash-worthy errors. Default false. +- `onReadEntry` A function that gets called with `(entry)` for each entry + that passes the filter. +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") +- `chmod` Set to true to call `fs.chmod()` to ensure that the + extracted file matches the entry mode. This may necessitate a + call to the deprecated and thread-unsafe `process.umask()` + method to determine the default umask value, unless a + `processUmask` options is also provided. Otherwise tar will + extract with whatever mode is provided, and let the process + `umask` apply normally. +- `processUmask` Set to an explicit numeric value to avoid + calling `process.umask()` when `chmod: true` is set. +- `maxDepth` The maximum depth of subfolders to extract into. This + defaults to 1024. Anything deeper than the limit will raise a + warning and skip the entry. Set to `Infinity` to remove the + limitation. + +### class UnpackSync + +Synchronous version of `Unpack`. + +Note that using an asynchronous stream type with the `transform` +option will cause undefined behavior in sync unpack streams. +[MiniPass](http://npm.im/minipass)-based streams are designed for this +use case. + +### class tar.Parse + +A writable stream that parses a tar archive stream. All the standard +writable stream stuff is supported. + +If the archive is gzipped, then tar will detect this and unzip it. + +Emits `'entry'` events with `tar.ReadEntry` objects, which are +themselves readable streams that you can pipe wherever. + +Each `entry` will not emit until the one before it is flushed through, +so make sure to either consume the data (with `on('data', ...)` or +`.pipe(...)`) or throw it away with `.resume()` to keep the stream +flowing. + +#### constructor(options) + +Returns an event emitter that emits `entry` events with +`tar.ReadEntry` objects. + +The following options are supported: + +- `strict` Treat warnings as crash-worthy errors. Default false. +- `filter` A function that gets called with `(path, entry)` for each + entry being listed. Return `true` to emit the entry from the + archive, or `false` to skip it. +- `onReadEntry` A function that gets called with `(entry)` for each entry + that passes the filter. +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") + +#### abort(error) + +Stop all parsing activities. This is called when there are zlib +errors. It also emits an unrecoverable warning with the error provided. + +### class tar.ReadEntry extends [MiniPass](http://npm.im/minipass) + +A representation of an entry that is being read out of a tar archive. + +It has the following fields: + +- `extended` The extended metadata object provided to the constructor. +- `globalExtended` The global extended metadata object provided to the + constructor. +- `remain` The number of bytes remaining to be written into the + stream. +- `blockRemain` The number of 512-byte blocks remaining to be written + into the stream. +- `ignore` Whether this entry should be ignored. +- `meta` True if this represents metadata about the next entry, false + if it represents a filesystem object. +- All the fields from the header, extended header, and global extended + header are added to the ReadEntry object. So it has `path`, `type`, + `size`, `mode`, and so on. + +#### constructor(header, extended, globalExtended) + +Create a new ReadEntry object with the specified header, extended +header, and global extended header values. + +### class tar.WriteEntry extends [MiniPass](http://npm.im/minipass) + +A representation of an entry that is being written from the file +system into a tar archive. + +Emits data for the Header, and for the Pax Extended Header if one is +required, as well as any body data. + +Creating a WriteEntry for a directory does not also create +WriteEntry objects for all of the directory contents. + +It has the following fields: + +- `path` The path field that will be written to the archive. By + default, this is also the path from the cwd to the file system + object. +- `portable` Omit metadata that is system-specific: `ctime`, `atime`, + `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note + that `mtime` is still included, because this is necessary for other + time-based operations. Additionally, `mode` is set to a "reasonable + default" for most unix systems, based on a `umask` value of `0o22`. +- `myuid` If supported, the uid of the user running the current + process. +- `myuser` The `env.USER` string if set, or `''`. Set as the entry + `uname` field if the file's `uid` matches `this.myuid`. +- `maxReadSize` The maximum buffer size for `fs.read()` operations. + Defaults to 1 MB. +- `linkCache` A Map object containing the device and inode value for + any file whose nlink is > 1, to identify hard links. +- `statCache` A Map object that caches calls `lstat`. +- `preservePaths` Allow absolute paths. By default, `/` is stripped + from absolute paths. +- `cwd` The current working directory for creating the archive. + Defaults to `process.cwd()`. +- `absolute` The absolute path to the entry on the filesystem. By + default, this is `path.resolve(this.cwd, this.path)`, but it can be + overridden explicitly. +- `strict` Treat warnings as crash-worthy errors. Default false. +- `win32` True if on a windows platform. Causes behavior where paths + replace `\` with `/` and filenames containing the windows-compatible + forms of `<|>?:` characters are converted to actual `<|>?:` characters + in the archive. +- `noPax` Suppress pax extended headers. Note that this means that + long paths and linkpaths will be truncated, and large or negative + numeric values may be interpreted incorrectly. +- `noMtime` Set to true to omit writing `mtime` values for entries. + Note that this prevents using other mtime-based features like + `tar.update` or the `keepNewer` option with the resulting tar archive. + +#### constructor(path, options) + +`path` is the path of the entry as it is written in the archive. + +The following options are supported: + +- `portable` Omit metadata that is system-specific: `ctime`, `atime`, + `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note + that `mtime` is still included, because this is necessary for other + time-based operations. Additionally, `mode` is set to a "reasonable + default" for most unix systems, based on a `umask` value of `0o22`. +- `maxReadSize` The maximum buffer size for `fs.read()` operations. + Defaults to 1 MB. +- `linkCache` A Map object containing the device and inode value for + any file whose nlink is > 1, to identify hard links. +- `statCache` A Map object that caches calls `lstat`. +- `preservePaths` Allow absolute paths. By default, `/` is stripped + from absolute paths. +- `cwd` The current working directory for creating the archive. + Defaults to `process.cwd()`. +- `absolute` The absolute path to the entry on the filesystem. By + default, this is `path.resolve(this.cwd, this.path)`, but it can be + overridden explicitly. +- `strict` Treat warnings as crash-worthy errors. Default false. +- `win32` True if on a windows platform. Causes behavior where paths + replace `\` with `/`. +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") +- `noMtime` Set to true to omit writing `mtime` values for entries. + Note that this prevents using other mtime-based features like + `tar.update` or the `keepNewer` option with the resulting tar archive. +- `umask` Set to restrict the modes on the entries in the archive, + somewhat like how umask works on file creation. Defaults to + `process.umask()` on unix systems, or `0o22` on Windows. + +#### warn(message, data) + +If strict, emit an error with the provided message. + +Othewise, emit a `'warn'` event with the provided message and data. + +### class tar.WriteEntry.Sync + +Synchronous version of tar.WriteEntry + +### class tar.WriteEntry.Tar + +A version of tar.WriteEntry that gets its data from a tar.ReadEntry +instead of from the filesystem. + +#### constructor(readEntry, options) + +`readEntry` is the entry being read out of another archive. + +The following options are supported: + +- `portable` Omit metadata that is system-specific: `ctime`, `atime`, + `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note + that `mtime` is still included, because this is necessary for other + time-based operations. Additionally, `mode` is set to a "reasonable + default" for most unix systems, based on a `umask` value of `0o22`. +- `preservePaths` Allow absolute paths. By default, `/` is stripped + from absolute paths. +- `strict` Treat warnings as crash-worthy errors. Default false. +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") +- `noMtime` Set to true to omit writing `mtime` values for entries. + Note that this prevents using other mtime-based features like + `tar.update` or the `keepNewer` option with the resulting tar archive. + +### class tar.Header + +A class for reading and writing header blocks. + +It has the following fields: + +- `nullBlock` True if decoding a block which is entirely composed of + `0x00` null bytes. (Useful because tar files are terminated by + at least 2 null blocks.) +- `cksumValid` True if the checksum in the header is valid, false + otherwise. +- `needPax` True if the values, as encoded, will require a Pax + extended header. +- `path` The path of the entry. +- `mode` The 4 lowest-order octal digits of the file mode. That is, + read/write/execute permissions for world, group, and owner, and the + setuid, setgid, and sticky bits. +- `uid` Numeric user id of the file owner +- `gid` Numeric group id of the file owner +- `size` Size of the file in bytes +- `mtime` Modified time of the file +- `cksum` The checksum of the header. This is generated by adding all + the bytes of the header block, treating the checksum field itself as + all ascii space characters (that is, `0x20`). +- `type` The human-readable name of the type of entry this represents, + or the alphanumeric key if unknown. +- `typeKey` The alphanumeric key for the type of entry this header + represents. +- `linkpath` The target of Link and SymbolicLink entries. +- `uname` Human-readable user name of the file owner +- `gname` Human-readable group name of the file owner +- `devmaj` The major portion of the device number. Always `0` for + files, directories, and links. +- `devmin` The minor portion of the device number. Always `0` for + files, directories, and links. +- `atime` File access time. +- `ctime` File change time. + +#### constructor(data, [offset=0]) + +`data` is optional. It is either a Buffer that should be interpreted +as a tar Header starting at the specified offset and continuing for +512 bytes, or a data object of keys and values to set on the header +object, and eventually encode as a tar Header. + +#### decode(block, offset) + +Decode the provided buffer starting at the specified offset. + +Buffer length must be greater than 512 bytes. + +#### set(data) + +Set the fields in the data object. + +#### encode(buffer, offset) + +Encode the header fields into the buffer at the specified offset. + +Returns `this.needPax` to indicate whether a Pax Extended Header is +required to properly encode the specified data. + +### class tar.Pax + +An object representing a set of key-value pairs in an Pax extended +header entry. + +It has the following fields. Where the same name is used, they have +the same semantics as the tar.Header field of the same name. + +- `global` True if this represents a global extended header, or false + if it is for a single entry. +- `atime` +- `charset` +- `comment` +- `ctime` +- `gid` +- `gname` +- `linkpath` +- `mtime` +- `path` +- `size` +- `uid` +- `uname` +- `dev` +- `ino` +- `nlink` + +#### constructor(object, global) + +Set the fields set in the object. `global` is a boolean that defaults +to false. + +#### encode() + +Return a Buffer containing the header and body for the Pax extended +header entry, or `null` if there is nothing to encode. + +#### encodeBody() + +Return a string representing the body of the pax extended header +entry. + +#### encodeField(fieldName) + +Return a string representing the key/value encoding for the specified +fieldName, or `''` if the field is unset. + +### tar.Pax.parse(string, extended, global) + +Return a new Pax object created by parsing the contents of the string +provided. + +If the `extended` object is set, then also add the fields from that +object. (This is necessary because multiple metadata entries can +occur in sequence.) + +### tar.types + +A translation table for the `type` field in tar headers. + +#### tar.types.name.get(code) + +Get the human-readable name for a given alphanumeric code. + +#### tar.types.code.get(name) + +Get the alphanumeric code for a given human-readable name. diff --git a/node_modules/tar/dist/commonjs/create.d.ts b/node_modules/tar/dist/commonjs/create.d.ts new file mode 100644 index 0000000..867c5e9 --- /dev/null +++ b/node_modules/tar/dist/commonjs/create.d.ts @@ -0,0 +1,3 @@ +import { Pack, PackSync } from './pack.js'; +export declare const create: import("./make-command.js").TarCommand; +//# sourceMappingURL=create.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/create.d.ts.map b/node_modules/tar/dist/commonjs/create.d.ts.map new file mode 100644 index 0000000..82be947 --- /dev/null +++ b/node_modules/tar/dist/commonjs/create.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/create.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AA8E1C,eAAO,MAAM,MAAM,wDAUlB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/create.js b/node_modules/tar/dist/commonjs/create.js new file mode 100644 index 0000000..3190afc --- /dev/null +++ b/node_modules/tar/dist/commonjs/create.js @@ -0,0 +1,83 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.create = void 0; +const fs_minipass_1 = require("@isaacs/fs-minipass"); +const node_path_1 = __importDefault(require("node:path")); +const list_js_1 = require("./list.js"); +const make_command_js_1 = require("./make-command.js"); +const pack_js_1 = require("./pack.js"); +const createFileSync = (opt, files) => { + const p = new pack_js_1.PackSync(opt); + const stream = new fs_minipass_1.WriteStreamSync(opt.file, { + mode: opt.mode || 0o666, + }); + p.pipe(stream); + addFilesSync(p, files); +}; +const createFile = (opt, files) => { + const p = new pack_js_1.Pack(opt); + const stream = new fs_minipass_1.WriteStream(opt.file, { + mode: opt.mode || 0o666, + }); + p.pipe(stream); + const promise = new Promise((res, rej) => { + stream.on('error', rej); + stream.on('close', res); + p.on('error', rej); + }); + addFilesAsync(p, files); + return promise; +}; +const addFilesSync = (p, files) => { + files.forEach(file => { + if (file.charAt(0) === '@') { + (0, list_js_1.list)({ + file: node_path_1.default.resolve(p.cwd, file.slice(1)), + sync: true, + noResume: true, + onReadEntry: entry => p.add(entry), + }); + } + else { + p.add(file); + } + }); + p.end(); +}; +const addFilesAsync = async (p, files) => { + for (let i = 0; i < files.length; i++) { + const file = String(files[i]); + if (file.charAt(0) === '@') { + await (0, list_js_1.list)({ + file: node_path_1.default.resolve(String(p.cwd), file.slice(1)), + noResume: true, + onReadEntry: entry => { + p.add(entry); + }, + }); + } + else { + p.add(file); + } + } + p.end(); +}; +const createSync = (opt, files) => { + const p = new pack_js_1.PackSync(opt); + addFilesSync(p, files); + return p; +}; +const createAsync = (opt, files) => { + const p = new pack_js_1.Pack(opt); + addFilesAsync(p, files); + return p; +}; +exports.create = (0, make_command_js_1.makeCommand)(createFileSync, createFile, createSync, createAsync, (_opt, files) => { + if (!files?.length) { + throw new TypeError('no paths specified to add to archive'); + } +}); +//# sourceMappingURL=create.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/create.js.map b/node_modules/tar/dist/commonjs/create.js.map new file mode 100644 index 0000000..6325273 --- /dev/null +++ b/node_modules/tar/dist/commonjs/create.js.map @@ -0,0 +1 @@ +{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/create.ts"],"names":[],"mappings":";;;;;;AAAA,qDAAkE;AAElE,0DAA4B;AAC5B,uCAAgC;AAChC,uDAA+C;AAO/C,uCAA0C;AAE1C,MAAM,cAAc,GAAG,CAAC,GAAuB,EAAE,KAAe,EAAE,EAAE;IAClE,MAAM,CAAC,GAAG,IAAI,kBAAQ,CAAC,GAAG,CAAC,CAAA;IAC3B,MAAM,MAAM,GAAG,IAAI,6BAAe,CAAC,GAAG,CAAC,IAAI,EAAE;QAC3C,IAAI,EAAE,GAAG,CAAC,IAAI,IAAI,KAAK;KACxB,CAAC,CAAA;IACF,CAAC,CAAC,IAAI,CAAC,MAAsC,CAAC,CAAA;IAC9C,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;AACxB,CAAC,CAAA;AAED,MAAM,UAAU,GAAG,CAAC,GAAmB,EAAE,KAAe,EAAE,EAAE;IAC1D,MAAM,CAAC,GAAG,IAAI,cAAI,CAAC,GAAG,CAAC,CAAA;IACvB,MAAM,MAAM,GAAG,IAAI,yBAAW,CAAC,GAAG,CAAC,IAAI,EAAE;QACvC,IAAI,EAAE,GAAG,CAAC,IAAI,IAAI,KAAK;KACxB,CAAC,CAAA;IACF,CAAC,CAAC,IAAI,CAAC,MAAsC,CAAC,CAAA;IAE9C,MAAM,OAAO,GAAG,IAAI,OAAO,CAAO,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAC7C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;QACvB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC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,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBAChD,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,KAAK,CAAC,EAAE;oBACnB,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;gBACd,CAAC;aACF,CAAC,CAAA;QACJ,CAAC;aAAM,CAAC;YACN,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QACb,CAAC;IACH,CAAC;IACD,CAAC,CAAC,GAAG,EAAE,CAAA;AACT,CAAC,CAAA;AAED,MAAM,UAAU,GAAG,CAAC,GAAmB,EAAE,KAAe,EAAE,EAAE;IAC1D,MAAM,CAAC,GAAG,IAAI,kBAAQ,CAAC,GAAG,CAAC,CAAA;IAC3B,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;IACtB,OAAO,CAAC,CAAA;AACV,CAAC,CAAA;AAED,MAAM,WAAW,GAAG,CAAC,GAAe,EAAE,KAAe,EAAE,EAAE;IACvD,MAAM,CAAC,GAAG,IAAI,cAAI,CAAC,GAAG,CAAC,CAAA;IACvB,aAAa,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;IACvB,OAAO,CAAC,CAAA;AACV,CAAC,CAAA;AAEY,QAAA,MAAM,GAAG,IAAA,6BAAW,EAC/B,cAAc,EACd,UAAU,EACV,UAAU,EACV,WAAW,EACX,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;IACd,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;QACnB,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAA;IAC7D,CAAC;AACH,CAAC,CACF,CAAA","sourcesContent":["import { WriteStream, WriteStreamSync } from '@isaacs/fs-minipass'\nimport { Minipass } from 'minipass'\nimport path from 'node:path'\nimport { list } from './list.js'\nimport { makeCommand } from './make-command.js'\nimport {\n TarOptions,\n TarOptionsFile,\n TarOptionsSync,\n TarOptionsSyncFile,\n} from './options.js'\nimport { Pack, PackSync } from './pack.js'\n\nconst createFileSync = (opt: TarOptionsSyncFile, files: string[]) => {\n const p = new PackSync(opt)\n const stream = new WriteStreamSync(opt.file, {\n mode: opt.mode || 0o666,\n })\n p.pipe(stream as unknown as Minipass.Writable)\n addFilesSync(p, files)\n}\n\nconst createFile = (opt: TarOptionsFile, files: string[]) => {\n const p = new Pack(opt)\n const stream = new WriteStream(opt.file, {\n mode: opt.mode || 0o666,\n })\n p.pipe(stream as unknown as Minipass.Writable)\n\n const promise = new Promise((res, rej) => {\n stream.on('error', rej)\n stream.on('close', res)\n p.on('error', rej)\n })\n\n addFilesAsync(p, files)\n\n return promise\n}\n\nconst addFilesSync = (p: PackSync, files: string[]) => {\n files.forEach(file => {\n if (file.charAt(0) === '@') {\n list({\n file: path.resolve(p.cwd, file.slice(1)),\n sync: true,\n noResume: true,\n onReadEntry: entry => p.add(entry),\n })\n } else {\n p.add(file)\n }\n })\n p.end()\n}\n\nconst addFilesAsync = async (\n p: Pack,\n files: string[],\n): Promise => {\n for (let i = 0; i < files.length; i++) {\n const file = String(files[i])\n if (file.charAt(0) === '@') {\n await list({\n file: path.resolve(String(p.cwd), file.slice(1)),\n noResume: true,\n onReadEntry: entry => {\n p.add(entry)\n },\n })\n } else {\n p.add(file)\n }\n }\n p.end()\n}\n\nconst createSync = (opt: TarOptionsSync, files: string[]) => {\n const p = new PackSync(opt)\n addFilesSync(p, files)\n return p\n}\n\nconst createAsync = (opt: TarOptions, files: string[]) => {\n const p = new Pack(opt)\n addFilesAsync(p, files)\n return p\n}\n\nexport const create = makeCommand(\n createFileSync,\n createFile,\n createSync,\n createAsync,\n (_opt, files) => {\n if (!files?.length) {\n throw new TypeError('no paths specified to add to archive')\n }\n },\n)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/cwd-error.d.ts b/node_modules/tar/dist/commonjs/cwd-error.d.ts new file mode 100644 index 0000000..16c6460 --- /dev/null +++ b/node_modules/tar/dist/commonjs/cwd-error.d.ts @@ -0,0 +1,8 @@ +export declare class CwdError extends Error { + path: string; + code: string; + syscall: 'chdir'; + constructor(path: string, code: string); + get name(): string; +} +//# sourceMappingURL=cwd-error.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/cwd-error.d.ts.map b/node_modules/tar/dist/commonjs/cwd-error.d.ts.map new file mode 100644 index 0000000..6b9a1a2 --- /dev/null +++ b/node_modules/tar/dist/commonjs/cwd-error.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"cwd-error.d.ts","sourceRoot":"","sources":["../../src/cwd-error.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAS,SAAQ,KAAK;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,OAAO,CAAU;gBAEd,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAMtC,IAAI,IAAI,WAEP;CACF"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/cwd-error.js b/node_modules/tar/dist/commonjs/cwd-error.js new file mode 100644 index 0000000..d703a77 --- /dev/null +++ b/node_modules/tar/dist/commonjs/cwd-error.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CwdError = void 0; +class CwdError extends Error { + path; + code; + syscall = 'chdir'; + constructor(path, code) { + super(`${code}: Cannot cd into '${path}'`); + this.path = path; + this.code = code; + } + get name() { + return 'CwdError'; + } +} +exports.CwdError = CwdError; +//# sourceMappingURL=cwd-error.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/cwd-error.js.map b/node_modules/tar/dist/commonjs/cwd-error.js.map new file mode 100644 index 0000000..d189590 --- /dev/null +++ b/node_modules/tar/dist/commonjs/cwd-error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cwd-error.js","sourceRoot":"","sources":["../../src/cwd-error.ts"],"names":[],"mappings":";;;AAAA,MAAa,QAAS,SAAQ,KAAK;IACjC,IAAI,CAAQ;IACZ,IAAI,CAAQ;IACZ,OAAO,GAAY,OAAO,CAAA;IAE1B,YAAY,IAAY,EAAE,IAAY;QACpC,KAAK,CAAC,GAAG,IAAI,qBAAqB,IAAI,GAAG,CAAC,CAAA;QAC1C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAED,IAAI,IAAI;QACN,OAAO,UAAU,CAAA;IACnB,CAAC;CACF;AAdD,4BAcC","sourcesContent":["export class CwdError extends Error {\n path: string\n code: string\n syscall: 'chdir' = 'chdir'\n\n constructor(path: string, code: string) {\n super(`${code}: Cannot cd into '${path}'`)\n this.path = path\n this.code = code\n }\n\n get name() {\n return 'CwdError'\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/extract.d.ts b/node_modules/tar/dist/commonjs/extract.d.ts new file mode 100644 index 0000000..9cbb18c --- /dev/null +++ b/node_modules/tar/dist/commonjs/extract.d.ts @@ -0,0 +1,3 @@ +import { Unpack, UnpackSync } from './unpack.js'; +export declare const extract: import("./make-command.js").TarCommand; +//# sourceMappingURL=extract.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/extract.d.ts.map b/node_modules/tar/dist/commonjs/extract.d.ts.map new file mode 100644 index 0000000..31008e1 --- /dev/null +++ b/node_modules/tar/dist/commonjs/extract.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../src/extract.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AA2ChD,eAAO,MAAM,OAAO,4DAQnB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/extract.js b/node_modules/tar/dist/commonjs/extract.js new file mode 100644 index 0000000..f848cbc --- /dev/null +++ b/node_modules/tar/dist/commonjs/extract.js @@ -0,0 +1,78 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.extract = void 0; +// tar -x +const fsm = __importStar(require("@isaacs/fs-minipass")); +const node_fs_1 = __importDefault(require("node:fs")); +const list_js_1 = require("./list.js"); +const make_command_js_1 = require("./make-command.js"); +const unpack_js_1 = require("./unpack.js"); +const extractFileSync = (opt) => { + const u = new unpack_js_1.UnpackSync(opt); + const file = opt.file; + const stat = node_fs_1.default.statSync(file); + // This trades a zero-byte read() syscall for a stat + // However, it will usually result in less memory allocation + const readSize = opt.maxReadSize || 16 * 1024 * 1024; + const stream = new fsm.ReadStreamSync(file, { + readSize: readSize, + size: stat.size, + }); + stream.pipe(u); +}; +const extractFile = (opt, _) => { + const u = new unpack_js_1.Unpack(opt); + const readSize = opt.maxReadSize || 16 * 1024 * 1024; + const file = opt.file; + const p = new Promise((resolve, reject) => { + u.on('error', reject); + u.on('close', resolve); + // This trades a zero-byte read() syscall for a stat + // However, it will usually result in less memory allocation + node_fs_1.default.stat(file, (er, stat) => { + if (er) { + reject(er); + } + else { + const stream = new fsm.ReadStream(file, { + readSize: readSize, + size: stat.size, + }); + stream.on('error', reject); + stream.pipe(u); + } + }); + }); + return p; +}; +exports.extract = (0, make_command_js_1.makeCommand)(extractFileSync, extractFile, opt => new unpack_js_1.UnpackSync(opt), opt => new unpack_js_1.Unpack(opt), (opt, files) => { + if (files?.length) + (0, list_js_1.filesFilter)(opt, files); +}); +//# sourceMappingURL=extract.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/extract.js.map b/node_modules/tar/dist/commonjs/extract.js.map new file mode 100644 index 0000000..c3d7713 --- /dev/null +++ b/node_modules/tar/dist/commonjs/extract.js.map @@ -0,0 +1 @@ +{"version":3,"file":"extract.js","sourceRoot":"","sources":["../../src/extract.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS;AACT,yDAA0C;AAC1C,sDAAwB;AACxB,uCAAuC;AACvC,uDAA+C;AAE/C,2CAAgD;AAEhD,MAAM,eAAe,GAAG,CAAC,GAAuB,EAAE,EAAE;IAClD,MAAM,CAAC,GAAG,IAAI,sBAAU,CAAC,GAAG,CAAC,CAAA;IAC7B,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;IACrB,MAAM,IAAI,GAAG,iBAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;IAC9B,oDAAoD;IACpD,4DAA4D;IAC5D,MAAM,QAAQ,GAAG,GAAG,CAAC,WAAW,IAAI,EAAE,GAAG,IAAI,GAAG,IAAI,CAAA;IACpD,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,IAAI,EAAE;QAC1C,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,IAAI,CAAC,IAAI;KAChB,CAAC,CAAA;IACF,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AAChB,CAAC,CAAA;AAED,MAAM,WAAW,GAAG,CAAC,GAAmB,EAAE,CAAY,EAAE,EAAE;IACxD,MAAM,CAAC,GAAG,IAAI,kBAAM,CAAC,GAAG,CAAC,CAAA;IACzB,MAAM,QAAQ,GAAG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from '@isaacs/fs-minipass'\nimport fs from 'node:fs'\nimport { filesFilter } from './list.js'\nimport { makeCommand } from './make-command.js'\nimport { TarOptionsFile, TarOptionsSyncFile } from './options.js'\nimport { Unpack, UnpackSync } from './unpack.js'\n\nconst extractFileSync = (opt: TarOptionsSyncFile) => {\n const u = new UnpackSync(opt)\n const file = opt.file\n const stat = fs.statSync(file)\n // This trades a zero-byte read() syscall for a stat\n // However, it will usually result in less memory allocation\n const readSize = opt.maxReadSize || 16 * 1024 * 1024\n const stream = new fsm.ReadStreamSync(file, {\n readSize: readSize,\n size: stat.size,\n })\n stream.pipe(u)\n}\n\nconst extractFile = (opt: TarOptionsFile, _?: string[]) => {\n const u = new Unpack(opt)\n const readSize = opt.maxReadSize || 16 * 1024 * 1024\n\n const file = opt.file\n const p = new Promise((resolve, reject) => {\n u.on('error', reject)\n u.on('close', resolve)\n\n // This trades a zero-byte read() syscall for a stat\n // However, it will usually result in less memory allocation\n fs.stat(file, (er, stat) => {\n if (er) {\n reject(er)\n } else {\n const stream = new fsm.ReadStream(file, {\n readSize: readSize,\n size: stat.size,\n })\n stream.on('error', reject)\n stream.pipe(u)\n }\n })\n })\n return p\n}\n\nexport const extract = makeCommand(\n extractFileSync,\n extractFile,\n opt => new UnpackSync(opt),\n opt => new Unpack(opt),\n (opt, files) => {\n if (files?.length) filesFilter(opt, files)\n },\n)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/get-write-flag.d.ts b/node_modules/tar/dist/commonjs/get-write-flag.d.ts new file mode 100644 index 0000000..d35ec71 --- /dev/null +++ b/node_modules/tar/dist/commonjs/get-write-flag.d.ts @@ -0,0 +1,2 @@ +export declare const getWriteFlag: (() => string) | ((size: number) => number | "w"); +//# sourceMappingURL=get-write-flag.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/get-write-flag.d.ts.map b/node_modules/tar/dist/commonjs/get-write-flag.d.ts.map new file mode 100644 index 0000000..79af1e1 --- /dev/null +++ b/node_modules/tar/dist/commonjs/get-write-flag.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"get-write-flag.d.ts","sourceRoot":"","sources":["../../src/get-write-flag.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,YAAY,2BAGd,MAAM,kBAAwC,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/get-write-flag.js b/node_modules/tar/dist/commonjs/get-write-flag.js new file mode 100644 index 0000000..94add8f --- /dev/null +++ b/node_modules/tar/dist/commonjs/get-write-flag.js @@ -0,0 +1,29 @@ +"use strict"; +// Get the appropriate flag to use for creating files +// We use fmap on Windows platforms for files less than +// 512kb. This is a fairly low limit, but avoids making +// things slower in some cases. Since most of what this +// library is used for is extracting tarballs of many +// relatively small files in npm packages and the like, +// it can be a big boost on Windows platforms. +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getWriteFlag = void 0; +const fs_1 = __importDefault(require("fs")); +const platform = process.env.__FAKE_PLATFORM__ || process.platform; +const isWindows = platform === 'win32'; +/* c8 ignore start */ +const { O_CREAT, O_TRUNC, O_WRONLY } = fs_1.default.constants; +const UV_FS_O_FILEMAP = Number(process.env.__FAKE_FS_O_FILENAME__) || + fs_1.default.constants.UV_FS_O_FILEMAP || + 0; +/* c8 ignore stop */ +const fMapEnabled = isWindows && !!UV_FS_O_FILEMAP; +const fMapLimit = 512 * 1024; +const fMapFlag = UV_FS_O_FILEMAP | O_TRUNC | O_CREAT | O_WRONLY; +exports.getWriteFlag = !fMapEnabled ? + () => 'w' + : (size) => (size < fMapLimit ? fMapFlag : 'w'); +//# sourceMappingURL=get-write-flag.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/get-write-flag.js.map b/node_modules/tar/dist/commonjs/get-write-flag.js.map new file mode 100644 index 0000000..91e47a0 --- /dev/null +++ b/node_modules/tar/dist/commonjs/get-write-flag.js.map @@ -0,0 +1 @@ +{"version":3,"file":"get-write-flag.js","sourceRoot":"","sources":["../../src/get-write-flag.ts"],"names":[],"mappings":";AAAA,qDAAqD;AACrD,uDAAuD;AACvD,wDAAwD;AACxD,wDAAwD;AACxD,qDAAqD;AACrD,uDAAuD;AACvD,8CAA8C;;;;;;AAE9C,4CAAmB;AAEnB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,OAAO,CAAC,QAAQ,CAAA;AAClE,MAAM,SAAS,GAAG,QAAQ,KAAK,OAAO,CAAA;AAEtC,qBAAqB;AACrB,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,YAAE,CAAC,SAAS,CAAA;AACnD,MAAM,eAAe,GACnB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;IAC1C,YAAE,CAAC,SAAS,CAAC,eAAe;IAC5B,CAAC,CAAA;AACH,oBAAoB;AAEpB,MAAM,WAAW,GAAG,SAAS,IAAI,CAAC,CAAC,eAAe,CAAA;AAClD,MAAM,SAAS,GAAG,GAAG,GAAG,IAAI,CAAA;AAC5B,MAAM,QAAQ,GAAG,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAA;AAClD,QAAA,YAAY,GACvB,CAAC,WAAW,CAAC,CAAC;IACZ,GAAG,EAAE,CAAC,GAAG;IACX,CAAC,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA","sourcesContent":["// Get the appropriate flag to use for creating files\n// We use fmap on Windows platforms for files less than\n// 512kb. This is a fairly low limit, but avoids making\n// things slower in some cases. Since most of what this\n// library is used for is extracting tarballs of many\n// relatively small files in npm packages and the like,\n// it can be a big boost on Windows platforms.\n\nimport fs from 'fs'\n\nconst platform = process.env.__FAKE_PLATFORM__ || process.platform\nconst isWindows = platform === 'win32'\n\n/* c8 ignore start */\nconst { O_CREAT, O_TRUNC, O_WRONLY } = fs.constants\nconst UV_FS_O_FILEMAP =\n Number(process.env.__FAKE_FS_O_FILENAME__) ||\n fs.constants.UV_FS_O_FILEMAP ||\n 0\n/* c8 ignore stop */\n\nconst fMapEnabled = isWindows && !!UV_FS_O_FILEMAP\nconst fMapLimit = 512 * 1024\nconst fMapFlag = UV_FS_O_FILEMAP | O_TRUNC | O_CREAT | O_WRONLY\nexport const getWriteFlag =\n !fMapEnabled ?\n () => 'w'\n : (size: number) => (size < fMapLimit ? fMapFlag : 'w')\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/header.d.ts b/node_modules/tar/dist/commonjs/header.d.ts new file mode 100644 index 0000000..2af2d8e --- /dev/null +++ b/node_modules/tar/dist/commonjs/header.d.ts @@ -0,0 +1,54 @@ +/// +import type { EntryTypeCode, EntryTypeName } from './types.js'; +export type HeaderData = { + path?: string; + mode?: number; + uid?: number; + gid?: number; + size?: number; + cksum?: number; + type?: EntryTypeName | 'Unsupported'; + linkpath?: string; + uname?: string; + gname?: string; + devmaj?: number; + devmin?: number; + atime?: Date; + ctime?: Date; + mtime?: Date; + charset?: string; + comment?: string; + dev?: number; + ino?: number; + nlink?: number; +}; +export declare class Header implements HeaderData { + #private; + cksumValid: boolean; + needPax: boolean; + nullBlock: boolean; + block?: Buffer; + path?: string; + mode?: number; + uid?: number; + gid?: number; + size?: number; + cksum?: number; + linkpath?: string; + uname?: string; + gname?: string; + devmaj: number; + devmin: number; + atime?: Date; + ctime?: Date; + mtime?: Date; + charset?: string; + comment?: string; + constructor(data?: Buffer | HeaderData, off?: number, ex?: HeaderData, gex?: HeaderData); + decode(buf: Buffer, off: number, ex?: HeaderData, gex?: HeaderData): void; + encode(buf?: Buffer, off?: number): boolean; + get type(): EntryTypeName; + get typeKey(): EntryTypeCode | 'Unsupported'; + set type(type: EntryTypeCode | EntryTypeName | 'Unsupported'); +} +//# sourceMappingURL=header.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/header.d.ts.map b/node_modules/tar/dist/commonjs/header.d.ts.map new file mode 100644 index 0000000..7e49f29 --- /dev/null +++ b/node_modules/tar/dist/commonjs/header.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../src/header.ts"],"names":[],"mappings":";AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAG9D,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,aAAa,GAAG,aAAa,CAAA;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IAIZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,qBAAa,MAAO,YAAW,UAAU;;IACvC,UAAU,EAAE,OAAO,CAAQ;IAC3B,OAAO,EAAE,OAAO,CAAQ;IACxB,SAAS,EAAE,OAAO,CAAQ;IAE1B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAI;IAClB,MAAM,EAAE,MAAM,CAAI;IAClB,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IAEZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;gBAGd,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,EAC1B,GAAG,GAAE,MAAU,EACf,EAAE,CAAC,EAAE,UAAU,EACf,GAAG,CAAC,EAAE,UAAU;IASlB,MAAM,CACJ,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,EAAE,CAAC,EAAE,UAAU,EACf,GAAG,CAAC,EAAE,UAAU;IAsGlB,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,GAAE,MAAU;IAwEpC,IAAI,IAAI,IAAI,aAAa,CAKxB;IAED,IAAI,OAAO,IAAI,aAAa,GAAG,aAAa,CAE3C;IAED,IAAI,IAAI,CAAC,IAAI,EAAE,aAAa,GAAG,aAAa,GAAG,aAAa,EAS3D;CACF"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/header.js b/node_modules/tar/dist/commonjs/header.js new file mode 100644 index 0000000..b3a4803 --- /dev/null +++ b/node_modules/tar/dist/commonjs/header.js @@ -0,0 +1,306 @@ +"use strict"; +// parse a 512-byte header block to a data object, or vice-versa +// encode returns `true` if a pax extended header is needed, because +// the data could not be faithfully encoded in a simple header. +// (Also, check header.needPax to see if it needs a pax header.) +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Header = void 0; +const node_path_1 = require("node:path"); +const large = __importStar(require("./large-numbers.js")); +const types = __importStar(require("./types.js")); +class Header { + cksumValid = false; + needPax = false; + nullBlock = false; + block; + path; + mode; + uid; + gid; + size; + cksum; + #type = 'Unsupported'; + linkpath; + uname; + gname; + devmaj = 0; + devmin = 0; + atime; + ctime; + mtime; + charset; + comment; + constructor(data, off = 0, ex, gex) { + if (Buffer.isBuffer(data)) { + this.decode(data, off || 0, ex, gex); + } + else if (data) { + this.#slurp(data); + } + } + decode(buf, off, ex, gex) { + if (!off) { + off = 0; + } + if (!buf || !(buf.length >= off + 512)) { + throw new Error('need 512 bytes for header'); + } + this.path = decString(buf, off, 100); + this.mode = decNumber(buf, off + 100, 8); + this.uid = decNumber(buf, off + 108, 8); + this.gid = decNumber(buf, off + 116, 8); + this.size = decNumber(buf, off + 124, 12); + this.mtime = decDate(buf, off + 136, 12); + this.cksum = decNumber(buf, off + 148, 12); + // if we have extended or global extended headers, apply them now + // See https://github.com/npm/node-tar/pull/187 + // Apply global before local, so it overrides + if (gex) + this.#slurp(gex, true); + if (ex) + this.#slurp(ex); + // old tar versions marked dirs as a file with a trailing / + const t = decString(buf, off + 156, 1); + if (types.isCode(t)) { + this.#type = t || '0'; + } + if (this.#type === '0' && this.path.slice(-1) === '/') { + this.#type = '5'; + } + // tar implementations sometimes incorrectly put the stat(dir).size + // as the size in the tarball, even though Directory entries are + // not able to have any body at all. In the very rare chance that + // it actually DOES have a body, we weren't going to do anything with + // it anyway, and it'll just be a warning about an invalid header. + if (this.#type === '5') { + this.size = 0; + } + this.linkpath = decString(buf, off + 157, 100); + if (buf.subarray(off + 257, off + 265).toString() === + 'ustar\u000000') { + this.uname = decString(buf, off + 265, 32); + this.gname = decString(buf, off + 297, 32); + /* c8 ignore start */ + this.devmaj = decNumber(buf, off + 329, 8) ?? 0; + this.devmin = decNumber(buf, off + 337, 8) ?? 0; + /* c8 ignore stop */ + if (buf[off + 475] !== 0) { + // definitely a prefix, definitely >130 chars. + const prefix = decString(buf, off + 345, 155); + this.path = prefix + '/' + this.path; + } + else { + const prefix = decString(buf, off + 345, 130); + if (prefix) { + this.path = prefix + '/' + this.path; + } + this.atime = decDate(buf, off + 476, 12); + this.ctime = decDate(buf, off + 488, 12); + } + } + let sum = 8 * 0x20; + for (let i = off; i < off + 148; i++) { + sum += buf[i]; + } + for (let i = off + 156; i < off + 512; i++) { + sum += buf[i]; + } + this.cksumValid = sum === this.cksum; + if (this.cksum === undefined && sum === 8 * 0x20) { + this.nullBlock = true; + } + } + #slurp(ex, gex = false) { + Object.assign(this, Object.fromEntries(Object.entries(ex).filter(([k, v]) => { + // we slurp in everything except for the path attribute in + // a global extended header, because that's weird. Also, any + // null/undefined values are ignored. + return !(v === null || + v === undefined || + (k === 'path' && gex) || + (k === 'linkpath' && gex) || + k === 'global'); + }))); + } + encode(buf, off = 0) { + if (!buf) { + buf = this.block = Buffer.alloc(512); + } + if (this.#type === 'Unsupported') { + this.#type = '0'; + } + if (!(buf.length >= off + 512)) { + throw new Error('need 512 bytes for header'); + } + const prefixSize = this.ctime || this.atime ? 130 : 155; + const split = splitPrefix(this.path || '', prefixSize); + const path = split[0]; + const prefix = split[1]; + this.needPax = !!split[2]; + this.needPax = encString(buf, off, 100, path) || this.needPax; + this.needPax = + encNumber(buf, off + 100, 8, this.mode) || this.needPax; + this.needPax = + encNumber(buf, off + 108, 8, this.uid) || this.needPax; + this.needPax = + encNumber(buf, off + 116, 8, this.gid) || this.needPax; + this.needPax = + encNumber(buf, off + 124, 12, this.size) || this.needPax; + this.needPax = + encDate(buf, off + 136, 12, this.mtime) || this.needPax; + buf[off + 156] = this.#type.charCodeAt(0); + this.needPax = + encString(buf, off + 157, 100, this.linkpath) || this.needPax; + buf.write('ustar\u000000', off + 257, 8); + this.needPax = + encString(buf, off + 265, 32, this.uname) || this.needPax; + this.needPax = + encString(buf, off + 297, 32, this.gname) || this.needPax; + this.needPax = + encNumber(buf, off + 329, 8, this.devmaj) || this.needPax; + this.needPax = + encNumber(buf, off + 337, 8, this.devmin) || this.needPax; + this.needPax = + encString(buf, off + 345, prefixSize, prefix) || this.needPax; + if (buf[off + 475] !== 0) { + this.needPax = + encString(buf, off + 345, 155, prefix) || this.needPax; + } + else { + this.needPax = + encString(buf, off + 345, 130, prefix) || this.needPax; + this.needPax = + encDate(buf, off + 476, 12, this.atime) || this.needPax; + this.needPax = + encDate(buf, off + 488, 12, this.ctime) || this.needPax; + } + let sum = 8 * 0x20; + for (let i = off; i < off + 148; i++) { + sum += buf[i]; + } + for (let i = off + 156; i < off + 512; i++) { + sum += buf[i]; + } + this.cksum = sum; + encNumber(buf, off + 148, 8, this.cksum); + this.cksumValid = true; + return this.needPax; + } + get type() { + return (this.#type === 'Unsupported' ? + this.#type + : types.name.get(this.#type)); + } + get typeKey() { + return this.#type; + } + set type(type) { + const c = String(types.code.get(type)); + if (types.isCode(c) || c === 'Unsupported') { + this.#type = c; + } + else if (types.isCode(type)) { + this.#type = type; + } + else { + throw new TypeError('invalid entry type: ' + type); + } + } +} +exports.Header = Header; +const splitPrefix = (p, prefixSize) => { + const pathSize = 100; + let pp = p; + let prefix = ''; + let ret = undefined; + const root = node_path_1.posix.parse(p).root || '.'; + if (Buffer.byteLength(pp) < pathSize) { + ret = [pp, prefix, false]; + } + else { + // first set prefix to the dir, and path to the base + prefix = node_path_1.posix.dirname(pp); + pp = node_path_1.posix.basename(pp); + do { + if (Buffer.byteLength(pp) <= pathSize && + Buffer.byteLength(prefix) <= prefixSize) { + // both fit! + ret = [pp, prefix, false]; + } + else if (Buffer.byteLength(pp) > pathSize && + Buffer.byteLength(prefix) <= prefixSize) { + // prefix fits in prefix, but path doesn't fit in path + ret = [pp.slice(0, pathSize - 1), prefix, true]; + } + else { + // make path take a bit from prefix + pp = node_path_1.posix.join(node_path_1.posix.basename(prefix), pp); + prefix = node_path_1.posix.dirname(prefix); + } + } while (prefix !== root && ret === undefined); + // at this point, found no resolution, just truncate + if (!ret) { + ret = [p.slice(0, pathSize - 1), '', true]; + } + } + return ret; +}; +const decString = (buf, off, size) => buf + .subarray(off, off + size) + .toString('utf8') + .replace(/\0.*/, ''); +const decDate = (buf, off, size) => numToDate(decNumber(buf, off, size)); +const numToDate = (num) => num === undefined ? undefined : new Date(num * 1000); +const decNumber = (buf, off, size) => Number(buf[off]) & 0x80 ? + large.parse(buf.subarray(off, off + size)) + : decSmallNumber(buf, off, size); +const nanUndef = (value) => (isNaN(value) ? undefined : value); +const decSmallNumber = (buf, off, size) => nanUndef(parseInt(buf + .subarray(off, off + size) + .toString('utf8') + .replace(/\0.*$/, '') + .trim(), 8)); +// the maximum encodable as a null-terminated octal, by field size +const MAXNUM = { + 12: 0o77777777777, + 8: 0o7777777, +}; +const encNumber = (buf, off, size, num) => num === undefined ? false + : num > MAXNUM[size] || num < 0 ? + (large.encode(num, buf.subarray(off, off + size)), true) + : (encSmallNumber(buf, off, size, num), false); +const encSmallNumber = (buf, off, size, num) => buf.write(octalString(num, size), off, size, 'ascii'); +const octalString = (num, size) => padOctal(Math.floor(num).toString(8), size); +const padOctal = (str, size) => (str.length === size - 1 ? + str + : new Array(size - str.length - 1).join('0') + str + ' ') + '\0'; +const encDate = (buf, off, size, date) => date === undefined ? false : (encNumber(buf, off, size, date.getTime() / 1000)); +// enough to fill the longest string we've got +const NULLS = new Array(156).join('\0'); +// pad with nulls, return true if it's longer or non-ascii +const encString = (buf, off, size, str) => str === undefined ? false : ((buf.write(str + NULLS, off, size, 'utf8'), + str.length !== Buffer.byteLength(str) || str.length > size)); +//# sourceMappingURL=header.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/header.js.map b/node_modules/tar/dist/commonjs/header.js.map new file mode 100644 index 0000000..708cbc9 --- /dev/null +++ b/node_modules/tar/dist/commonjs/header.js.map @@ -0,0 +1 @@ +{"version":3,"file":"header.js","sourceRoot":"","sources":["../../src/header.ts"],"names":[],"mappings":";AAAA,gEAAgE;AAChE,oEAAoE;AACpE,+DAA+D;AAC/D,gEAAgE;;;;;;;;;;;;;;;;;;;;;;;;;;AAEhE,yCAA+C;AAC/C,0DAA2C;AAE3C,kDAAmC;AA4BnC,MAAa,MAAM;IACjB,UAAU,GAAY,KAAK,CAAA;IAC3B,OAAO,GAAY,KAAK,CAAA;IACxB,SAAS,GAAY,KAAK,CAAA;IAE1B,KAAK,CAAS;IACd,IAAI,CAAS;IACb,IAAI,CAAS;IACb,GAAG,CAAS;IACZ,GAAG,CAAS;IACZ,IAAI,CAAS;IACb,KAAK,CAAS;IACd,KAAK,GAAkC,aAAa,CAAA;IACpD,QAAQ,CAAS;IACjB,KAAK,CAAS;IACd,KAAK,CAAS;IACd,MAAM,GAAW,CAAC,CAAA;IAClB,MAAM,GAAW,CAAC,CAAA;IAClB,KAAK,CAAO;IACZ,KAAK,CAAO;IACZ,KAAK,CAAO;IAEZ,OAAO,CAAS;IAChB,OAAO,CAAS;IAEhB,YACE,IAA0B,EAC1B,MAAc,CAAC,EACf,EAAe,EACf,GAAgB;QAEhB,IAAI,MAAM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,EAAE,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CACjD,CAAA;AAEH,8CAA8C;AAC9C,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACvC,0DAA0D;AAC1D,MAAM,SAAS,GAAG,CAChB,GAAW,EACX,GAAW,EACX,IAAY,EACZ,GAAY,EACZ,EAAE,CACF,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAC1B,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,GAAG,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC;IAC1C,GAAG,CAAC,MAAM,KAAK,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,CAC5D,CAAA","sourcesContent":["// parse a 512-byte header block to a data object, or vice-versa\n// encode returns `true` if a pax extended header is needed, because\n// the data could not be faithfully encoded in a simple header.\n// (Also, check header.needPax to see if it needs a pax header.)\n\nimport { posix as pathModule } from 'node:path'\nimport * as large from './large-numbers.js'\nimport type { EntryTypeCode, EntryTypeName } from './types.js'\nimport * as types from './types.js'\n\nexport type HeaderData = {\n path?: string\n mode?: number\n uid?: number\n gid?: number\n size?: number\n cksum?: number\n type?: EntryTypeName | 'Unsupported'\n linkpath?: string\n uname?: string\n gname?: string\n devmaj?: number\n devmin?: number\n atime?: Date\n ctime?: Date\n mtime?: Date\n\n // fields that are common in extended PAX headers, but not in the\n // \"standard\" tar header block\n charset?: string\n comment?: string\n dev?: number\n ino?: number\n nlink?: number\n}\n\nexport class Header implements HeaderData {\n cksumValid: boolean = false\n needPax: boolean = false\n nullBlock: boolean = false\n\n block?: Buffer\n path?: string\n mode?: number\n uid?: number\n gid?: number\n size?: number\n cksum?: number\n #type: EntryTypeCode | 'Unsupported' = 'Unsupported'\n linkpath?: string\n uname?: string\n gname?: string\n devmaj: number = 0\n devmin: number = 0\n atime?: Date\n ctime?: Date\n mtime?: Date\n\n charset?: string\n comment?: string\n\n constructor(\n data?: Buffer | HeaderData,\n off: number = 0,\n ex?: HeaderData,\n gex?: HeaderData,\n ) {\n if (Buffer.isBuffer(data)) {\n this.decode(data, off || 0, ex, gex)\n } else if (data) {\n this.#slurp(data)\n }\n }\n\n decode(\n buf: Buffer,\n off: number,\n ex?: HeaderData,\n gex?: HeaderData,\n ) {\n if (!off) {\n off = 0\n }\n\n if (!buf || !(buf.length >= off + 512)) {\n throw new Error('need 512 bytes for header')\n }\n\n this.path = decString(buf, off, 100)\n this.mode = decNumber(buf, off + 100, 8)\n this.uid = decNumber(buf, off + 108, 8)\n this.gid = decNumber(buf, off + 116, 8)\n this.size = decNumber(buf, off + 124, 12)\n this.mtime = decDate(buf, off + 136, 12)\n this.cksum = decNumber(buf, off + 148, 12)\n\n // if we have extended or global extended headers, apply them now\n // See https://github.com/npm/node-tar/pull/187\n // Apply global before local, so it overrides\n if (gex) this.#slurp(gex, true)\n if (ex) this.#slurp(ex)\n\n // old tar versions marked dirs as a file with a trailing /\n const t = decString(buf, off + 156, 1)\n if (types.isCode(t)) {\n this.#type = t || '0'\n }\n if (this.#type === '0' && this.path.slice(-1) === '/') {\n this.#type = '5'\n }\n\n // tar implementations sometimes incorrectly put the stat(dir).size\n // as the size in the tarball, even though Directory entries are\n // not able to have any body at all. In the very rare chance that\n // it actually DOES have a body, we weren't going to do anything with\n // it anyway, and it'll just be a warning about an invalid header.\n if (this.#type === '5') {\n this.size = 0\n }\n\n this.linkpath = decString(buf, off + 157, 100)\n if (\n buf.subarray(off + 257, off + 265).toString() ===\n 'ustar\\u000000'\n ) {\n this.uname = decString(buf, off + 265, 32)\n this.gname = decString(buf, off + 297, 32)\n /* c8 ignore start */\n this.devmaj = decNumber(buf, off + 329, 8) ?? 0\n this.devmin = decNumber(buf, off + 337, 8) ?? 0\n /* c8 ignore stop */\n if (buf[off + 475] !== 0) {\n // definitely a prefix, definitely >130 chars.\n const prefix = decString(buf, off + 345, 155)\n this.path = prefix + '/' + this.path\n } else {\n const prefix = decString(buf, off + 345, 130)\n if (prefix) {\n this.path = prefix + '/' + this.path\n }\n this.atime = decDate(buf, off + 476, 12)\n this.ctime = decDate(buf, off + 488, 12)\n }\n }\n\n let sum = 8 * 0x20\n for (let i = off; i < off + 148; i++) {\n sum += buf[i] as number\n }\n\n for (let i = off + 156; i < off + 512; i++) {\n sum += buf[i] as number\n }\n\n this.cksumValid = sum === this.cksum\n if (this.cksum === undefined && sum === 8 * 0x20) {\n this.nullBlock = true\n }\n }\n\n #slurp(ex: HeaderData, gex: boolean = false) {\n Object.assign(\n this,\n Object.fromEntries(\n Object.entries(ex).filter(([k, v]) => {\n // we slurp in everything except for the path attribute in\n // a global extended header, because that's weird. Also, any\n // null/undefined values are ignored.\n return !(\n v === null ||\n v === undefined ||\n (k === 'path' && gex) ||\n (k === 'linkpath' && gex) ||\n k === 'global'\n )\n }),\n ),\n )\n }\n\n encode(buf?: Buffer, off: number = 0) {\n if (!buf) {\n buf = this.block = Buffer.alloc(512)\n }\n\n if (this.#type === 'Unsupported') {\n this.#type = '0'\n }\n\n if (!(buf.length >= off + 512)) {\n throw new Error('need 512 bytes for header')\n }\n\n const prefixSize = this.ctime || this.atime ? 130 : 155\n const split = splitPrefix(this.path || '', prefixSize)\n const path = split[0]\n const prefix = split[1]\n this.needPax = !!split[2]\n\n this.needPax = encString(buf, off, 100, path) || this.needPax\n this.needPax =\n encNumber(buf, off + 100, 8, this.mode) || this.needPax\n this.needPax =\n encNumber(buf, off + 108, 8, this.uid) || this.needPax\n this.needPax =\n encNumber(buf, off + 116, 8, this.gid) || this.needPax\n this.needPax =\n encNumber(buf, off + 124, 12, this.size) || this.needPax\n this.needPax =\n encDate(buf, off + 136, 12, this.mtime) || this.needPax\n buf[off + 156] = this.#type.charCodeAt(0)\n this.needPax =\n encString(buf, off + 157, 100, this.linkpath) || this.needPax\n buf.write('ustar\\u000000', off + 257, 8)\n this.needPax =\n encString(buf, off + 265, 32, this.uname) || this.needPax\n this.needPax =\n encString(buf, off + 297, 32, this.gname) || this.needPax\n this.needPax =\n encNumber(buf, off + 329, 8, this.devmaj) || this.needPax\n this.needPax =\n encNumber(buf, off + 337, 8, this.devmin) || this.needPax\n this.needPax =\n encString(buf, off + 345, prefixSize, prefix) || this.needPax\n if (buf[off + 475] !== 0) {\n this.needPax =\n encString(buf, off + 345, 155, prefix) || this.needPax\n } else {\n this.needPax =\n encString(buf, off + 345, 130, prefix) || this.needPax\n this.needPax =\n encDate(buf, off + 476, 12, this.atime) || this.needPax\n this.needPax =\n encDate(buf, off + 488, 12, this.ctime) || this.needPax\n }\n\n let sum = 8 * 0x20\n for (let i = off; i < off + 148; i++) {\n sum += buf[i] as number\n }\n\n for (let i = off + 156; i < off + 512; i++) {\n sum += buf[i] as number\n }\n\n this.cksum = sum\n encNumber(buf, off + 148, 8, this.cksum)\n this.cksumValid = true\n\n return this.needPax\n }\n\n get type(): EntryTypeName {\n return (\n this.#type === 'Unsupported' ?\n this.#type\n : types.name.get(this.#type)) as EntryTypeName\n }\n\n get typeKey(): EntryTypeCode | 'Unsupported' {\n return this.#type\n }\n\n set type(type: EntryTypeCode | EntryTypeName | 'Unsupported') {\n const c = String(types.code.get(type as EntryTypeName))\n if (types.isCode(c) || c === 'Unsupported') {\n this.#type = c\n } else if (types.isCode(type)) {\n this.#type = type\n } else {\n throw new TypeError('invalid entry type: ' + type)\n }\n }\n}\n\nconst splitPrefix = (\n p: string,\n prefixSize: number,\n): [string, string, boolean] => {\n const pathSize = 100\n let pp = p\n let prefix = ''\n let ret: undefined | [string, string, boolean] = undefined\n const root = pathModule.parse(p).root || '.'\n\n if (Buffer.byteLength(pp) < pathSize) {\n ret = [pp, prefix, false]\n } else {\n // first set prefix to the dir, and path to the base\n prefix = pathModule.dirname(pp)\n pp = pathModule.basename(pp)\n\n do {\n if (\n Buffer.byteLength(pp) <= pathSize &&\n Buffer.byteLength(prefix) <= prefixSize\n ) {\n // both fit!\n ret = [pp, prefix, false]\n } else if (\n Buffer.byteLength(pp) > pathSize &&\n Buffer.byteLength(prefix) <= prefixSize\n ) {\n // prefix fits in prefix, but path doesn't fit in path\n ret = [pp.slice(0, pathSize - 1), prefix, true]\n } else {\n // make path take a bit from prefix\n pp = pathModule.join(pathModule.basename(prefix), pp)\n prefix = pathModule.dirname(prefix)\n }\n } while (prefix !== root && ret === undefined)\n\n // at this point, found no resolution, just truncate\n if (!ret) {\n ret = [p.slice(0, pathSize - 1), '', true]\n }\n }\n return ret\n}\n\nconst decString = (buf: Buffer, off: number, size: number) =>\n buf\n .subarray(off, off + size)\n .toString('utf8')\n .replace(/\\0.*/, '')\n\nconst decDate = (buf: Buffer, off: number, size: number) =>\n numToDate(decNumber(buf, off, size))\n\nconst numToDate = (num?: number) =>\n num === undefined ? undefined : new Date(num * 1000)\n\nconst decNumber = (buf: Buffer, off: number, size: number) =>\n Number(buf[off]) & 0x80 ?\n large.parse(buf.subarray(off, off + size))\n : decSmallNumber(buf, off, size)\n\nconst nanUndef = (value: number) => (isNaN(value) ? undefined : value)\n\nconst decSmallNumber = (buf: Buffer, off: number, size: number) =>\n nanUndef(\n parseInt(\n buf\n .subarray(off, off + size)\n .toString('utf8')\n .replace(/\\0.*$/, '')\n .trim(),\n 8,\n ),\n )\n\n// the maximum encodable as a null-terminated octal, by field size\nconst MAXNUM = {\n 12: 0o77777777777,\n 8: 0o7777777,\n}\n\nconst encNumber = (\n buf: Buffer,\n off: number,\n size: 12 | 8,\n num?: number,\n) =>\n num === undefined ? false\n : num > MAXNUM[size] || num < 0 ?\n (large.encode(num, buf.subarray(off, off + size)), true)\n : (encSmallNumber(buf, off, size, num), false)\n\nconst encSmallNumber = (\n buf: Buffer,\n off: number,\n size: number,\n num: number,\n) => buf.write(octalString(num, size), off, size, 'ascii')\n\nconst octalString = (num: number, size: number) =>\n padOctal(Math.floor(num).toString(8), size)\n\nconst padOctal = (str: string, size: number) =>\n (str.length === size - 1 ?\n str\n : new Array(size - str.length - 1).join('0') + str + ' ') + '\\0'\n\nconst encDate = (\n buf: Buffer,\n off: number,\n size: 8 | 12,\n date?: Date,\n) =>\n date === undefined ? false : (\n encNumber(buf, off, size, date.getTime() / 1000)\n )\n\n// enough to fill the longest string we've got\nconst NULLS = new Array(156).join('\\0')\n// pad with nulls, return true if it's longer or non-ascii\nconst encString = (\n buf: Buffer,\n off: number,\n size: number,\n str?: string,\n) =>\n str === undefined ? false : (\n (buf.write(str + NULLS, off, size, 'utf8'),\n str.length !== Buffer.byteLength(str) || str.length > size)\n )\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/index.d.ts b/node_modules/tar/dist/commonjs/index.d.ts new file mode 100644 index 0000000..a582123 --- /dev/null +++ b/node_modules/tar/dist/commonjs/index.d.ts @@ -0,0 +1,20 @@ +export { type TarOptionsWithAliasesAsync, type TarOptionsWithAliasesAsyncFile, type TarOptionsWithAliasesAsyncNoFile, type TarOptionsWithAliasesSyncNoFile, type TarOptionsWithAliases, type TarOptionsWithAliasesFile, type TarOptionsWithAliasesSync, type TarOptionsWithAliasesSyncFile, } from './options.js'; +export * from './create.js'; +export { create as c } from './create.js'; +export * from './extract.js'; +export { extract as x } from './extract.js'; +export * from './header.js'; +export * from './list.js'; +export { list as t } from './list.js'; +export * from './pack.js'; +export * from './parse.js'; +export * from './pax.js'; +export * from './read-entry.js'; +export * from './replace.js'; +export { replace as r } from './replace.js'; +export * as types from './types.js'; +export * from './unpack.js'; +export * from './update.js'; +export { update as u } from './update.js'; +export * from './write-entry.js'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/index.d.ts.map b/node_modules/tar/dist/commonjs/index.d.ts.map new file mode 100644 index 0000000..71d3bed --- /dev/null +++ b/node_modules/tar/dist/commonjs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EACrC,KAAK,+BAA+B,EACpC,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,GACnC,MAAM,cAAc,CAAA;AAErB,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,aAAa,CAAA;AACzC,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,cAAc,CAAA;AAC3C,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,IAAI,IAAI,CAAC,EAAE,MAAM,WAAW,CAAA;AAErC,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,aAAa,CAAA;AACzC,cAAc,kBAAkB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/index.js b/node_modules/tar/dist/commonjs/index.js new file mode 100644 index 0000000..e93ed5a --- /dev/null +++ b/node_modules/tar/dist/commonjs/index.js @@ -0,0 +1,54 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.u = exports.types = exports.r = exports.t = exports.x = exports.c = void 0; +__exportStar(require("./create.js"), exports); +var create_js_1 = require("./create.js"); +Object.defineProperty(exports, "c", { enumerable: true, get: function () { return create_js_1.create; } }); +__exportStar(require("./extract.js"), exports); +var extract_js_1 = require("./extract.js"); +Object.defineProperty(exports, "x", { enumerable: true, get: function () { return extract_js_1.extract; } }); +__exportStar(require("./header.js"), exports); +__exportStar(require("./list.js"), exports); +var list_js_1 = require("./list.js"); +Object.defineProperty(exports, "t", { enumerable: true, get: function () { return list_js_1.list; } }); +// classes +__exportStar(require("./pack.js"), exports); +__exportStar(require("./parse.js"), exports); +__exportStar(require("./pax.js"), exports); +__exportStar(require("./read-entry.js"), exports); +__exportStar(require("./replace.js"), exports); +var replace_js_1 = require("./replace.js"); +Object.defineProperty(exports, "r", { enumerable: true, get: function () { return replace_js_1.replace; } }); +exports.types = __importStar(require("./types.js")); +__exportStar(require("./unpack.js"), exports); +__exportStar(require("./update.js"), exports); +var update_js_1 = require("./update.js"); +Object.defineProperty(exports, "u", { enumerable: true, get: function () { return update_js_1.update; } }); +__exportStar(require("./write-entry.js"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/index.js.map b/node_modules/tar/dist/commonjs/index.js.map new file mode 100644 index 0000000..6b9c814 --- /dev/null +++ b/node_modules/tar/dist/commonjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,8CAA2B;AAC3B,yCAAyC;AAAhC,8FAAA,MAAM,OAAK;AACpB,+CAA4B;AAC5B,2CAA2C;AAAlC,+FAAA,OAAO,OAAK;AACrB,8CAA2B;AAC3B,4CAAyB;AACzB,qCAAqC;AAA5B,4FAAA,IAAI,OAAK;AAClB,UAAU;AACV,4CAAyB;AACzB,6CAA0B;AAC1B,2CAAwB;AACxB,kDAA+B;AAC/B,+CAA4B;AAC5B,2CAA2C;AAAlC,+FAAA,OAAO,OAAK;AACrB,oDAAmC;AACnC,8CAA2B;AAC3B,8CAA2B;AAC3B,yCAAyC;AAAhC,8FAAA,MAAM,OAAK;AACpB,mDAAgC","sourcesContent":["export {\n type TarOptionsWithAliasesAsync,\n type TarOptionsWithAliasesAsyncFile,\n type TarOptionsWithAliasesAsyncNoFile,\n type TarOptionsWithAliasesSyncNoFile,\n type TarOptionsWithAliases,\n type TarOptionsWithAliasesFile,\n type TarOptionsWithAliasesSync,\n type TarOptionsWithAliasesSyncFile,\n} from './options.js'\n\nexport * from './create.js'\nexport { create as c } from './create.js'\nexport * from './extract.js'\nexport { extract as x } from './extract.js'\nexport * from './header.js'\nexport * from './list.js'\nexport { list as t } from './list.js'\n// classes\nexport * from './pack.js'\nexport * from './parse.js'\nexport * from './pax.js'\nexport * from './read-entry.js'\nexport * from './replace.js'\nexport { replace as r } from './replace.js'\nexport * as types from './types.js'\nexport * from './unpack.js'\nexport * from './update.js'\nexport { update as u } from './update.js'\nexport * from './write-entry.js'\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/large-numbers.d.ts b/node_modules/tar/dist/commonjs/large-numbers.d.ts new file mode 100644 index 0000000..b514d74 --- /dev/null +++ b/node_modules/tar/dist/commonjs/large-numbers.d.ts @@ -0,0 +1,4 @@ +/// +export declare const encode: (num: number, buf: Buffer) => Buffer; +export declare const parse: (buf: Buffer) => number; +//# sourceMappingURL=large-numbers.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/large-numbers.d.ts.map b/node_modules/tar/dist/commonjs/large-numbers.d.ts.map new file mode 100644 index 0000000..6a6d97d --- /dev/null +++ b/node_modules/tar/dist/commonjs/large-numbers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"large-numbers.d.ts","sourceRoot":"","sources":["../../src/large-numbers.ts"],"names":[],"mappings":";AAGA,eAAO,MAAM,MAAM,QAAS,MAAM,OAAO,MAAM,WAa9C,CAAA;AA6BD,eAAO,MAAM,KAAK,QAAS,MAAM,WAmBhC,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/large-numbers.js b/node_modules/tar/dist/commonjs/large-numbers.js new file mode 100644 index 0000000..5b07aa7 --- /dev/null +++ b/node_modules/tar/dist/commonjs/large-numbers.js @@ -0,0 +1,99 @@ +"use strict"; +// Tar can encode large and negative numbers using a leading byte of +// 0xff for negative, and 0x80 for positive. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parse = exports.encode = void 0; +const encode = (num, buf) => { + if (!Number.isSafeInteger(num)) { + // The number is so large that javascript cannot represent it with integer + // precision. + throw Error('cannot encode number outside of javascript safe integer range'); + } + else if (num < 0) { + encodeNegative(num, buf); + } + else { + encodePositive(num, buf); + } + return buf; +}; +exports.encode = encode; +const encodePositive = (num, buf) => { + buf[0] = 0x80; + for (var i = buf.length; i > 1; i--) { + buf[i - 1] = num & 0xff; + num = Math.floor(num / 0x100); + } +}; +const encodeNegative = (num, buf) => { + buf[0] = 0xff; + var flipped = false; + num = num * -1; + for (var i = buf.length; i > 1; i--) { + var byte = num & 0xff; + num = Math.floor(num / 0x100); + if (flipped) { + buf[i - 1] = onesComp(byte); + } + else if (byte === 0) { + buf[i - 1] = 0; + } + else { + flipped = true; + buf[i - 1] = twosComp(byte); + } + } +}; +const parse = (buf) => { + const pre = buf[0]; + const value = pre === 0x80 ? pos(buf.subarray(1, buf.length)) + : pre === 0xff ? twos(buf) + : null; + if (value === null) { + throw Error('invalid base256 encoding'); + } + if (!Number.isSafeInteger(value)) { + // The number is so large that javascript cannot represent it with integer + // precision. + throw Error('parsed number outside of javascript safe integer range'); + } + return value; +}; +exports.parse = parse; +const twos = (buf) => { + var len = buf.length; + var sum = 0; + var flipped = false; + for (var i = len - 1; i > -1; i--) { + var byte = Number(buf[i]); + var f; + if (flipped) { + f = onesComp(byte); + } + else if (byte === 0) { + f = byte; + } + else { + flipped = true; + f = twosComp(byte); + } + if (f !== 0) { + sum -= f * Math.pow(256, len - i - 1); + } + } + return sum; +}; +const pos = (buf) => { + var len = buf.length; + var sum = 0; + for (var i = len - 1; i > -1; i--) { + var byte = Number(buf[i]); + if (byte !== 0) { + sum += byte * Math.pow(256, len - i - 1); + } + } + return sum; +}; +const onesComp = (byte) => (0xff ^ byte) & 0xff; +const twosComp = (byte) => ((0xff ^ byte) + 1) & 0xff; +//# sourceMappingURL=large-numbers.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/large-numbers.js.map b/node_modules/tar/dist/commonjs/large-numbers.js.map new file mode 100644 index 0000000..31ddcd2 --- /dev/null +++ b/node_modules/tar/dist/commonjs/large-numbers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"large-numbers.js","sourceRoot":"","sources":["../../src/large-numbers.ts"],"names":[],"mappings":";AAAA,oEAAoE;AACpE,4CAA4C;;;AAErC,MAAM,MAAM,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,EAAE;IACjD,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/B,0EAA0E;QAC1E,aAAa;QACb,MAAM,KAAK,CACT,+DAA+D,CAChE,CAAA;IACH,CAAC;SAAM,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;QACnB,cAAc,CAAC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for negative, and 0x80 for positive.\n\nexport const encode = (num: number, buf: Buffer) => {\n if (!Number.isSafeInteger(num)) {\n // The number is so large that javascript cannot represent it with integer\n // precision.\n throw Error(\n 'cannot encode number outside of javascript safe integer range',\n )\n } else if (num < 0) {\n encodeNegative(num, buf)\n } else {\n encodePositive(num, buf)\n }\n return buf\n}\n\nconst encodePositive = (num: number, buf: Buffer) => {\n buf[0] = 0x80\n\n for (var i = buf.length; i > 1; i--) {\n buf[i - 1] = num & 0xff\n num = Math.floor(num / 0x100)\n }\n}\n\nconst encodeNegative = (num: number, buf: Buffer) => {\n buf[0] = 0xff\n var flipped = false\n num = num * -1\n for (var i = buf.length; i > 1; i--) {\n var byte = num & 0xff\n num = Math.floor(num / 0x100)\n if (flipped) {\n buf[i - 1] = onesComp(byte)\n } else if (byte === 0) {\n buf[i - 1] = 0\n } else {\n flipped = true\n buf[i - 1] = twosComp(byte)\n }\n }\n}\n\nexport const parse = (buf: Buffer) => {\n const pre = buf[0]\n const value =\n pre === 0x80 ? pos(buf.subarray(1, buf.length))\n : pre === 0xff ? twos(buf)\n : null\n if (value === null) {\n throw Error('invalid base256 encoding')\n }\n\n if (!Number.isSafeInteger(value)) {\n // The number is so large that javascript cannot represent it with integer\n // precision.\n throw Error(\n 'parsed number outside of javascript safe integer range',\n )\n }\n\n return value\n}\n\nconst twos = (buf: Buffer) => {\n var len = buf.length\n var sum = 0\n var flipped = false\n for (var i = len - 1; i > -1; i--) {\n var byte = Number(buf[i])\n var f\n if (flipped) {\n f = onesComp(byte)\n } else if (byte === 0) {\n f = byte\n } else {\n flipped = true\n f = twosComp(byte)\n }\n if (f !== 0) {\n sum -= f * Math.pow(256, len - i - 1)\n }\n }\n return sum\n}\n\nconst pos = (buf: Buffer) => {\n var len = buf.length\n var sum = 0\n for (var i = len - 1; i > -1; i--) {\n var byte = Number(buf[i])\n if (byte !== 0) {\n sum += byte * Math.pow(256, len - i - 1)\n }\n }\n return sum\n}\n\nconst onesComp = (byte: number) => (0xff ^ byte) & 0xff\n\nconst twosComp = (byte: number) => ((0xff ^ byte) + 1) & 0xff\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/list.d.ts b/node_modules/tar/dist/commonjs/list.d.ts new file mode 100644 index 0000000..890a11b --- /dev/null +++ b/node_modules/tar/dist/commonjs/list.d.ts @@ -0,0 +1,7 @@ +import { TarOptions } from './options.js'; +import { Parser } from './parse.js'; +export declare const filesFilter: (opt: TarOptions, files: string[]) => void; +export declare const list: import("./make-command.js").TarCommand; +//# sourceMappingURL=list.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/list.d.ts.map b/node_modules/tar/dist/commonjs/list.d.ts.map new file mode 100644 index 0000000..b45ab2c --- /dev/null +++ b/node_modules/tar/dist/commonjs/list.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/list.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,UAAU,EAGX,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAgBnC,eAAO,MAAM,WAAW,QAAS,UAAU,SAAS,MAAM,EAAE,SA4B3D,CAAA;AA4DD,eAAO,MAAM,IAAI;UAG4B,IAAI;EAMhD,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/list.js b/node_modules/tar/dist/commonjs/list.js new file mode 100644 index 0000000..3cd34bb --- /dev/null +++ b/node_modules/tar/dist/commonjs/list.js @@ -0,0 +1,136 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.list = exports.filesFilter = void 0; +// tar -t +const fsm = __importStar(require("@isaacs/fs-minipass")); +const node_fs_1 = __importDefault(require("node:fs")); +const path_1 = require("path"); +const make_command_js_1 = require("./make-command.js"); +const parse_js_1 = require("./parse.js"); +const strip_trailing_slashes_js_1 = require("./strip-trailing-slashes.js"); +const onReadEntryFunction = (opt) => { + const onReadEntry = opt.onReadEntry; + opt.onReadEntry = + onReadEntry ? + e => { + onReadEntry(e); + e.resume(); + } + : e => e.resume(); +}; +// construct a filter that limits the file entries listed +// include child entries if a dir is included +const filesFilter = (opt, files) => { + const map = new Map(files.map(f => [(0, strip_trailing_slashes_js_1.stripTrailingSlashes)(f), true])); + const filter = opt.filter; + const mapHas = (file, r = '') => { + const root = r || (0, path_1.parse)(file).root || '.'; + let ret; + if (file === root) + ret = false; + else { + const m = map.get(file); + if (m !== undefined) { + ret = m; + } + else { + ret = mapHas((0, path_1.dirname)(file), root); + } + } + map.set(file, ret); + return ret; + }; + opt.filter = + filter ? + (file, entry) => filter(file, entry) && mapHas((0, strip_trailing_slashes_js_1.stripTrailingSlashes)(file)) + : file => mapHas((0, strip_trailing_slashes_js_1.stripTrailingSlashes)(file)); +}; +exports.filesFilter = filesFilter; +const listFileSync = (opt) => { + const p = new parse_js_1.Parser(opt); + const file = opt.file; + let fd; + try { + const stat = node_fs_1.default.statSync(file); + const readSize = opt.maxReadSize || 16 * 1024 * 1024; + if (stat.size < readSize) { + p.end(node_fs_1.default.readFileSync(file)); + } + else { + let pos = 0; + const buf = Buffer.allocUnsafe(readSize); + fd = node_fs_1.default.openSync(file, 'r'); + while (pos < stat.size) { + const bytesRead = node_fs_1.default.readSync(fd, buf, 0, readSize, pos); + pos += bytesRead; + p.write(buf.subarray(0, bytesRead)); + } + p.end(); + } + } + finally { + if (typeof fd === 'number') { + try { + node_fs_1.default.closeSync(fd); + /* c8 ignore next */ + } + catch (er) { } + } + } +}; +const listFile = (opt, _files) => { + const parse = new parse_js_1.Parser(opt); + const readSize = opt.maxReadSize || 16 * 1024 * 1024; + const file = opt.file; + const p = new Promise((resolve, reject) => { + parse.on('error', reject); + parse.on('end', resolve); + node_fs_1.default.stat(file, (er, stat) => { + if (er) { + reject(er); + } + else { + const stream = new fsm.ReadStream(file, { + readSize: readSize, + size: stat.size, + }); + stream.on('error', reject); + stream.pipe(parse); + } + }); + }); + return p; +}; +exports.list = (0, make_command_js_1.makeCommand)(listFileSync, listFile, opt => new parse_js_1.Parser(opt), opt => new parse_js_1.Parser(opt), (opt, files) => { + if (files?.length) + (0, exports.filesFilter)(opt, files); + if (!opt.noResume) + onReadEntryFunction(opt); +}); +//# sourceMappingURL=list.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/list.js.map b/node_modules/tar/dist/commonjs/list.js.map new file mode 100644 index 0000000..a056e1e --- /dev/null +++ b/node_modules/tar/dist/commonjs/list.js.map @@ -0,0 +1 @@ +{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/list.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS;AACT,yDAA0C;AAC1C,sDAAwB;AACxB,+BAAqC;AACrC,uDAA+C;AAM/C,yCAAmC;AACnC,2EAAkE;AAElE,MAAM,mBAAmB,GAAG,CAAC,GAAe,EAAE,EAAE;IAC9C,MAAM,WAAW,GAAG,GAAG,CAAC,WAAW,CAAA;IACnC,GAAG,CAAC,WAAW;QACb,WAAW,CAAC,C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AC,CAAA;IACF,OAAO,CAAC,CAAA;AACV,CAAC,CAAA;AAEY,QAAA,IAAI,GAAG,IAAA,6BAAW,EAC7B,YAAY,EACZ,QAAQ,EACR,GAAG,CAAC,EAAE,CAAC,IAAI,iBAAM,CAAC,GAAG,CAA4B,EACjD,GAAG,CAAC,EAAE,CAAC,IAAI,iBAAM,CAAC,GAAG,CAAC,EACtB,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;IACb,IAAI,KAAK,EAAE,MAAM;QAAE,IAAA,mBAAW,EAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IAC1C,IAAI,CAAC,GAAG,CAAC,QAAQ;QAAE,mBAAmB,CAAC,GAAG,CAAC,CAAA;AAC7C,CAAC,CACF,CAAA","sourcesContent":["// tar -t\nimport * as fsm from '@isaacs/fs-minipass'\nimport fs from 'node:fs'\nimport { dirname, parse } from 'path'\nimport { makeCommand } from './make-command.js'\nimport {\n TarOptions,\n TarOptionsFile,\n TarOptionsSyncFile,\n} from './options.js'\nimport { Parser } from './parse.js'\nimport { stripTrailingSlashes } from './strip-trailing-slashes.js'\n\nconst onReadEntryFunction = (opt: TarOptions) => {\n const onReadEntry = opt.onReadEntry\n opt.onReadEntry =\n onReadEntry ?\n e => {\n onReadEntry(e)\n e.resume()\n }\n : e => e.resume()\n}\n\n// construct a filter that limits the file entries listed\n// include child entries if a dir is included\nexport const filesFilter = (opt: TarOptions, files: string[]) => {\n const map = new Map(\n files.map(f => [stripTrailingSlashes(f), true]),\n )\n const filter = opt.filter\n\n const mapHas = (file: string, r: string = ''): boolean => {\n const root = r || parse(file).root || '.'\n let ret: boolean\n if (file === root) ret = false\n else {\n const m = map.get(file)\n if (m !== undefined) {\n ret = m\n } else {\n ret = mapHas(dirname(file), root)\n }\n }\n\n map.set(file, ret)\n return ret\n }\n\n opt.filter =\n filter ?\n (file, entry) =>\n filter(file, entry) && mapHas(stripTrailingSlashes(file))\n : file => mapHas(stripTrailingSlashes(file))\n}\n\nconst listFileSync = (opt: TarOptionsSyncFile) => {\n const p = new Parser(opt)\n const file = opt.file\n let fd\n try {\n const stat = fs.statSync(file)\n const readSize = opt.maxReadSize || 16 * 1024 * 1024\n if (stat.size < readSize) {\n p.end(fs.readFileSync(file))\n } else {\n let pos = 0\n const buf = Buffer.allocUnsafe(readSize)\n fd = fs.openSync(file, 'r')\n while (pos < stat.size) {\n const bytesRead = fs.readSync(fd, buf, 0, readSize, pos)\n pos += bytesRead\n p.write(buf.subarray(0, bytesRead))\n }\n p.end()\n }\n } finally {\n if (typeof fd === 'number') {\n try {\n fs.closeSync(fd)\n /* c8 ignore next */\n } catch (er) {}\n }\n }\n}\n\nconst listFile = (\n opt: TarOptionsFile,\n _files: string[],\n): Promise => {\n const parse = new Parser(opt)\n const readSize = opt.maxReadSize || 16 * 1024 * 1024\n\n const file = opt.file\n const p = new Promise((resolve, reject) => {\n parse.on('error', reject)\n parse.on('end', resolve)\n\n fs.stat(file, (er, stat) => {\n if (er) {\n reject(er)\n } else {\n const stream = new fsm.ReadStream(file, {\n readSize: readSize,\n size: stat.size,\n })\n stream.on('error', reject)\n stream.pipe(parse)\n }\n })\n })\n return p\n}\n\nexport const list = makeCommand(\n listFileSync,\n listFile,\n opt => new Parser(opt) as Parser & { sync: true },\n opt => new Parser(opt),\n (opt, files) => {\n if (files?.length) filesFilter(opt, files)\n if (!opt.noResume) onReadEntryFunction(opt)\n },\n)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/make-command.d.ts b/node_modules/tar/dist/commonjs/make-command.d.ts new file mode 100644 index 0000000..cd88929 --- /dev/null +++ b/node_modules/tar/dist/commonjs/make-command.d.ts @@ -0,0 +1,49 @@ +import { TarOptions, TarOptionsAsyncFile, TarOptionsAsyncNoFile, TarOptionsSyncFile, TarOptionsSyncNoFile, TarOptionsWithAliases, TarOptionsWithAliasesAsync, TarOptionsWithAliasesAsyncFile, TarOptionsWithAliasesAsyncNoFile, TarOptionsWithAliasesFile, TarOptionsWithAliasesNoFile, TarOptionsWithAliasesSync, TarOptionsWithAliasesSyncFile, TarOptionsWithAliasesSyncNoFile } from './options.js'; +export type CB = (er?: Error) => any; +export type TarCommand = { + (): AsyncClass; + (opt: TarOptionsWithAliasesAsyncNoFile): AsyncClass; + (entries: string[]): AsyncClass; + (opt: TarOptionsWithAliasesAsyncNoFile, entries: string[]): AsyncClass; +} & { + (opt: TarOptionsWithAliasesSyncNoFile): SyncClass; + (opt: TarOptionsWithAliasesSyncNoFile, entries: string[]): SyncClass; +} & { + (opt: TarOptionsWithAliasesAsyncFile): Promise; + (opt: TarOptionsWithAliasesAsyncFile, entries: string[]): Promise; + (opt: TarOptionsWithAliasesAsyncFile, cb: CB): Promise; + (opt: TarOptionsWithAliasesAsyncFile, entries: string[], cb: CB): Promise; +} & { + (opt: TarOptionsWithAliasesSyncFile): void; + (opt: TarOptionsWithAliasesSyncFile, entries: string[]): void; +} & { + (opt: TarOptionsWithAliasesSync): typeof opt extends (TarOptionsWithAliasesFile) ? void : typeof opt extends TarOptionsWithAliasesNoFile ? SyncClass : void | SyncClass; + (opt: TarOptionsWithAliasesSync, entries: string[]): typeof opt extends TarOptionsWithAliasesFile ? void : typeof opt extends TarOptionsWithAliasesNoFile ? SyncClass : void | SyncClass; +} & { + (opt: TarOptionsWithAliasesAsync): typeof opt extends (TarOptionsWithAliasesFile) ? Promise : typeof opt extends TarOptionsWithAliasesNoFile ? AsyncClass : Promise | AsyncClass; + (opt: TarOptionsWithAliasesAsync, entries: string[]): typeof opt extends TarOptionsWithAliasesFile ? Promise : typeof opt extends TarOptionsWithAliasesNoFile ? AsyncClass : Promise | AsyncClass; + (opt: TarOptionsWithAliasesAsync, cb: CB): Promise; + (opt: TarOptionsWithAliasesAsync, entries: string[], cb: CB): typeof opt extends TarOptionsWithAliasesFile ? Promise : typeof opt extends TarOptionsWithAliasesNoFile ? never : Promise; +} & { + (opt: TarOptionsWithAliasesFile): Promise | void; + (opt: TarOptionsWithAliasesFile, entries: string[]): typeof opt extends TarOptionsWithAliasesSync ? void : typeof opt extends TarOptionsWithAliasesAsync ? Promise : Promise | void; + (opt: TarOptionsWithAliasesFile, cb: CB): Promise; + (opt: TarOptionsWithAliasesFile, entries: string[], cb: CB): typeof opt extends TarOptionsWithAliasesSync ? never : typeof opt extends TarOptionsWithAliasesAsync ? Promise : Promise; +} & { + (opt: TarOptionsWithAliasesNoFile): typeof opt extends (TarOptionsWithAliasesSync) ? SyncClass : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass : SyncClass | AsyncClass; + (opt: TarOptionsWithAliasesNoFile, entries: string[]): typeof opt extends TarOptionsWithAliasesSync ? SyncClass : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass : SyncClass | AsyncClass; +} & { + (opt: TarOptionsWithAliases): typeof opt extends (TarOptionsWithAliasesFile) ? typeof opt extends TarOptionsWithAliasesSync ? void : typeof opt extends TarOptionsWithAliasesAsync ? Promise : void | Promise : typeof opt extends TarOptionsWithAliasesNoFile ? typeof opt extends TarOptionsWithAliasesSync ? SyncClass : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass : SyncClass | AsyncClass : typeof opt extends TarOptionsWithAliasesSync ? SyncClass | void : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass | Promise : SyncClass | void | AsyncClass | Promise; +} & { + syncFile: (opt: TarOptionsSyncFile, entries: string[]) => void; + asyncFile: (opt: TarOptionsAsyncFile, entries: string[], cb?: CB) => Promise; + syncNoFile: (opt: TarOptionsSyncNoFile, entries: string[]) => SyncClass; + asyncNoFile: (opt: TarOptionsAsyncNoFile, entries: string[]) => AsyncClass; + validate?: (opt: TarOptions, entries?: string[]) => void; +}; +export declare const makeCommand: (syncFile: (opt: TarOptionsSyncFile, entries: string[]) => void, asyncFile: (opt: TarOptionsAsyncFile, entries: string[], cb?: CB) => Promise, syncNoFile: (opt: TarOptionsSyncNoFile, entries: string[]) => SyncClass, asyncNoFile: (opt: TarOptionsAsyncNoFile, entries: string[]) => AsyncClass, validate?: (opt: TarOptions, entries?: string[]) => void) => TarCommand; +//# sourceMappingURL=make-command.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/make-command.d.ts.map b/node_modules/tar/dist/commonjs/make-command.d.ts.map new file mode 100644 index 0000000..7cb3c16 --- /dev/null +++ b/node_modules/tar/dist/commonjs/make-command.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"make-command.d.ts","sourceRoot":"","sources":["../../src/make-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,UAAU,EACV,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,8BAA8B,EAC9B,gCAAgC,EAChC,yBAAyB,EACzB,2BAA2B,EAC3B,yBAAyB,EACzB,6BAA6B,EAC7B,+BAA+B,EAChC,MAAM,cAAc,CAAA;AAErB,MAAM,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,KAAK,KAAK,GAAG,CAAA;AAEpC,MAAM,MAAM,UAAU,CACpB,UAAU,EACV,SAAS,SAAS;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,IAC9B;IAEF,IAAI,UAAU,CAAA;IACd,CAAC,GAAG,EAAE,gCAAgC,GAAG,UAAU,CAAA;IACnD,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,UAAU,CAAA;IAC/B,CACE,GAAG,EAAE,gCAAgC,EACrC,OAAO,EAAE,MAAM,EAAE,GAChB,UAAU,CAAA;CACd,GAAG;IAEF,CAAC,GAAG,EAAE,+BAA+B,GAAG,SAAS,CAAA;IACjD,CAAC,GAAG,EAAE,+BAA+B,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;CACrE,GAAG;IAEF,CAAC,GAAG,EAAE,8BAA8B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACpD,CACE,GAAG,EAAE,8BAA8B,EACnC,OAAO,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,IAAI,CAAC,C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MAAM,EAAE,KAAK,IAAI,aACnD,CACT,GAAG,EAAE,mBAAmB,EACxB,OAAO,EAAE,MAAM,EAAE,EACjB,EAAE,CAAC,EAAE,EAAE,KACJ,QAAQ,IAAI,CAAC,cACN,CACV,GAAG,EAAE,oBAAoB,EACzB,OAAO,EAAE,MAAM,EAAE,KACd,SAAS,eACD,CACX,GAAG,EAAE,qBAAqB,EAC1B,OAAO,EAAE,MAAM,EAAE,KACd,UAAU,aACJ,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,IAAI,KACvD,WAAW,UAAU,EAAE,SAAS,CAmElC,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/make-command.js b/node_modules/tar/dist/commonjs/make-command.js new file mode 100644 index 0000000..1814319 --- /dev/null +++ b/node_modules/tar/dist/commonjs/make-command.js @@ -0,0 +1,61 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.makeCommand = void 0; +const options_js_1 = require("./options.js"); +const makeCommand = (syncFile, asyncFile, syncNoFile, asyncNoFile, validate) => { + return Object.assign((opt_ = [], entries, cb) => { + if (Array.isArray(opt_)) { + entries = opt_; + opt_ = {}; + } + if (typeof entries === 'function') { + cb = entries; + entries = undefined; + } + if (!entries) { + entries = []; + } + else { + entries = Array.from(entries); + } + const opt = (0, options_js_1.dealias)(opt_); + validate?.(opt, entries); + if ((0, options_js_1.isSyncFile)(opt)) { + if (typeof cb === 'function') { + throw new TypeError('callback not supported for sync tar functions'); + } + return syncFile(opt, entries); + } + else if ((0, options_js_1.isAsyncFile)(opt)) { + const p = asyncFile(opt, entries); + // weirdness to make TS happy + const c = cb ? cb : undefined; + return c ? p.then(() => c(), c) : p; + } + else if ((0, options_js_1.isSyncNoFile)(opt)) { + if (typeof cb === 'function') { + throw new TypeError('callback not supported for sync tar functions'); + } + return syncNoFile(opt, entries); + } + else if ((0, options_js_1.isAsyncNoFile)(opt)) { + if (typeof cb === 'function') { + throw new TypeError('callback only supported with file option'); + } + return asyncNoFile(opt, entries); + /* c8 ignore start */ + } + else { + throw new Error('impossible options??'); + } + /* c8 ignore stop */ + }, { + syncFile, + asyncFile, + syncNoFile, + asyncNoFile, + validate, + }); +}; +exports.makeCommand = makeCommand; +//# sourceMappingURL=make-command.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/make-command.js.map b/node_modules/tar/dist/commonjs/make-command.js.map new file mode 100644 index 0000000..1f1cdeb --- /dev/null +++ b/node_modules/tar/dist/commonjs/make-command.js.map @@ -0,0 +1 @@ +{"version":3,"file":"make-command.js","sourceRoot":"","sources":["../../src/make-command.ts"],"names":[],"mappings":";;;AAAA,6CAoBqB;AA2Id,MAAM,WAAW,GAAG,CAIzB,QAA8D,EAC9D,SAIkB,EAClB,UAGc,EACd,WAGe,EACf,QAAwD,EACrB,EAAE;IACrC,OAAO,MAAM,CAAC,MAAM,CAClB,CACE,OAAyC,EAAE,EAC3C,OAAuB,EACvB,EAAO,EACP,EAAE;QACF,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACxB,OAAO,GAAG,IAAI,CAAA;YACd,IAAI,GAAG,EAAE,CAAA;QACX,CAAC;QAED,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE,CAAC;YAClC,EAAE,GAAG,OAAO,CAAA;YACZ,OAAO,GAAG,SAAS,CAAA;QACrB,CAAC;QAED,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAA;QACd,CAAC;aAAM,CAAC;YACN,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC/B,CAAC;QAED,MAAM,GAAG,GAAG,IAAA,oBAAO,EAAC,IAAI,CAAC,CAAA;QAEzB,QAAQ,EAAE,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;QAExB,IAAI,IAAA,uBAAU,EAAC,GAAG,CAAC,EAAE,CAAC;YACpB,IAAI,OAAO,EAAE,KAA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ourcesContent":["import {\n dealias,\n isAsyncFile,\n isAsyncNoFile,\n isSyncFile,\n isSyncNoFile,\n TarOptions,\n TarOptionsAsyncFile,\n TarOptionsAsyncNoFile,\n TarOptionsSyncFile,\n TarOptionsSyncNoFile,\n TarOptionsWithAliases,\n TarOptionsWithAliasesAsync,\n TarOptionsWithAliasesAsyncFile,\n TarOptionsWithAliasesAsyncNoFile,\n TarOptionsWithAliasesFile,\n TarOptionsWithAliasesNoFile,\n TarOptionsWithAliasesSync,\n TarOptionsWithAliasesSyncFile,\n TarOptionsWithAliasesSyncNoFile,\n} from './options.js'\n\nexport type CB = (er?: Error) => any\n\nexport type TarCommand<\n AsyncClass,\n SyncClass extends { sync: true },\n> = {\n // async and no file specified\n (): AsyncClass\n (opt: TarOptionsWithAliasesAsyncNoFile): AsyncClass\n (entries: string[]): AsyncClass\n (\n opt: TarOptionsWithAliasesAsyncNoFile,\n entries: string[],\n ): AsyncClass\n} & {\n // sync and no file\n (opt: TarOptionsWithAliasesSyncNoFile): SyncClass\n (opt: TarOptionsWithAliasesSyncNoFile, entries: string[]): SyncClass\n} & {\n // async and file\n (opt: TarOptionsWithAliasesAsyncFile): Promise\n (\n opt: TarOptionsWithAliasesAsyncFile,\n entries: string[],\n ): Promise\n (opt: TarOptionsWithAliasesAsyncFile, cb: CB): Promise\n (\n opt: TarOptionsWithAliasesAsyncFile,\n entries: string[],\n cb: CB,\n ): Promise\n} & {\n // sync and file\n (opt: TarOptionsWithAliasesSyncFile): void\n (opt: TarOptionsWithAliasesSyncFile, entries: string[]): void\n} & {\n // sync, maybe file\n (opt: TarOptionsWithAliasesSync): typeof opt extends (\n TarOptionsWithAliasesFile\n ) ?\n void\n : typeof opt extends TarOptionsWithAliasesNoFile ? SyncClass\n : void | SyncClass\n (\n opt: TarOptionsWithAliasesSync,\n entries: string[],\n ): typeof opt extends TarOptionsWithAliasesFile ? void\n : typeof opt extends TarOptionsWithAliasesNoFile ? SyncClass\n : void | SyncClass\n} & {\n // async, maybe file\n (opt: TarOptionsWithAliasesAsync): typeof opt extends (\n TarOptionsWithAliasesFile\n ) ?\n Promise\n : typeof opt extends TarOptionsWithAliasesNoFile ? AsyncClass\n : Promise | AsyncClass\n (\n opt: TarOptionsWithAliasesAsync,\n entries: string[],\n ): typeof opt extends TarOptionsWithAliasesFile ? Promise\n : typeof opt extends TarOptionsWithAliasesNoFile ? AsyncClass\n : Promise | AsyncClass\n (opt: TarOptionsWithAliasesAsync, cb: CB): Promise\n (\n opt: TarOptionsWithAliasesAsync,\n entries: string[],\n cb: CB,\n ): typeof opt extends TarOptionsWithAliasesFile ? Promise\n : typeof opt extends TarOptionsWithAliasesNoFile ? never\n : Promise\n} & {\n // maybe sync, file\n (opt: TarOptionsWithAliasesFile): Promise | void\n (\n opt: TarOptionsWithAliasesFile,\n entries: string[],\n ): typeof opt extends TarOptionsWithAliasesSync ? void\n : typeof opt extends TarOptionsWithAliasesAsync ? Promise\n : Promise | void\n (opt: TarOptionsWithAliasesFile, cb: CB): Promise\n (\n opt: TarOptionsWithAliasesFile,\n entries: string[],\n cb: CB,\n ): typeof opt extends TarOptionsWithAliasesSync ? never\n : typeof opt extends TarOptionsWithAliasesAsync ? Promise\n : Promise\n} & {\n // maybe sync, no file\n (opt: TarOptionsWithAliasesNoFile): typeof opt extends (\n TarOptionsWithAliasesSync\n ) ?\n SyncClass\n : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass\n : SyncClass | AsyncClass\n (\n opt: TarOptionsWithAliasesNoFile,\n entries: string[],\n ): typeof opt extends TarOptionsWithAliasesSync ? SyncClass\n : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass\n : SyncClass | AsyncClass\n} & {\n // maybe sync, maybe file\n (opt: TarOptionsWithAliases): typeof opt extends (\n TarOptionsWithAliasesFile\n ) ?\n typeof opt extends TarOptionsWithAliasesSync ? void\n : typeof opt extends TarOptionsWithAliasesAsync ? Promise\n : void | Promise\n : typeof opt extends TarOptionsWithAliasesNoFile ?\n typeof opt extends TarOptionsWithAliasesSync ? SyncClass\n : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass\n : SyncClass | AsyncClass\n : typeof opt extends TarOptionsWithAliasesSync ? SyncClass | void\n : typeof opt extends TarOptionsWithAliasesAsync ?\n AsyncClass | Promise\n : SyncClass | void | AsyncClass | Promise\n} & {\n // extras\n syncFile: (opt: TarOptionsSyncFile, entries: string[]) => void\n asyncFile: (\n opt: TarOptionsAsyncFile,\n entries: string[],\n cb?: CB,\n ) => Promise\n syncNoFile: (\n opt: TarOptionsSyncNoFile,\n entries: string[],\n ) => SyncClass\n asyncNoFile: (\n opt: TarOptionsAsyncNoFile,\n entries: string[],\n ) => AsyncClass\n validate?: (opt: TarOptions, entries?: string[]) => void\n}\n\nexport const makeCommand = <\n AsyncClass,\n SyncClass extends { sync: true },\n>(\n syncFile: (opt: TarOptionsSyncFile, entries: string[]) => void,\n asyncFile: (\n opt: TarOptionsAsyncFile,\n entries: string[],\n cb?: CB,\n ) => Promise,\n syncNoFile: (\n opt: TarOptionsSyncNoFile,\n entries: string[],\n ) => SyncClass,\n asyncNoFile: (\n opt: TarOptionsAsyncNoFile,\n entries: string[],\n ) => AsyncClass,\n validate?: (opt: TarOptions, entries?: string[]) => void,\n): TarCommand => {\n return Object.assign(\n (\n opt_: TarOptionsWithAliases | string[] = [],\n entries?: string[] | CB,\n cb?: CB,\n ) => {\n if (Array.isArray(opt_)) {\n entries = opt_\n opt_ = {}\n }\n\n if (typeof entries === 'function') {\n cb = entries\n entries = undefined\n }\n\n if (!entries) {\n entries = []\n } else {\n entries = Array.from(entries)\n }\n\n const opt = dealias(opt_)\n\n validate?.(opt, entries)\n\n if (isSyncFile(opt)) {\n if (typeof cb === 'function') {\n throw new TypeError(\n 'callback not supported for sync tar functions',\n )\n }\n return syncFile(opt, entries)\n } else if (isAsyncFile(opt)) {\n const p = asyncFile(opt, entries)\n // weirdness to make TS happy\n const c = cb ? cb : undefined\n return c ? p.then(() => c(), c) : p\n } else if (isSyncNoFile(opt)) {\n if (typeof cb === 'function') {\n throw new TypeError(\n 'callback not supported for sync tar functions',\n )\n }\n return syncNoFile(opt, entries)\n } else if (isAsyncNoFile(opt)) {\n if (typeof cb === 'function') {\n throw new TypeError(\n 'callback only supported with file option',\n )\n }\n return asyncNoFile(opt, entries)\n /* c8 ignore start */\n } else {\n throw new Error('impossible options??')\n }\n /* c8 ignore stop */\n },\n {\n syncFile,\n asyncFile,\n syncNoFile,\n asyncNoFile,\n validate,\n },\n ) as TarCommand\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/mkdir.d.ts b/node_modules/tar/dist/commonjs/mkdir.d.ts new file mode 100644 index 0000000..f28ef9e --- /dev/null +++ b/node_modules/tar/dist/commonjs/mkdir.d.ts @@ -0,0 +1,27 @@ +/// +import { CwdError } from './cwd-error.js'; +import { SymlinkError } from './symlink-error.js'; +export type MkdirOptions = { + uid?: number; + gid?: number; + processUid?: number; + processGid?: number; + umask?: number; + preserve: boolean; + unlink: boolean; + cache: Map; + cwd: string; + mode: number; +}; +export type MkdirError = NodeJS.ErrnoException | CwdError | SymlinkError; +/** + * Wrapper around mkdirp for tar's needs. + * + * The main purpose is to avoid creating directories if we know that + * they already exist (and track which ones exist for this purpose), + * and prevent entries from being extracted into symlinked folders, + * if `preservePaths` is not set. + */ +export declare const mkdir: (dir: string, opt: MkdirOptions, cb: (er?: null | MkdirError, made?: string) => void) => void | Promise; +export declare const mkdirSync: (dir: string, opt: MkdirOptions) => void | SymlinkError; +//# sourceMappingURL=mkdir.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/mkdir.d.ts.map b/node_modules/tar/dist/commonjs/mkdir.d.ts.map new file mode 100644 index 0000000..8e0dbd3 --- /dev/null +++ b/node_modules/tar/dist/commonjs/mkdir.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"mkdir.d.ts","sourceRoot":"","sources":["../../src/mkdir.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,UAAU,GAClB,MAAM,CAAC,cAAc,GACrB,QAAQ,GACR,YAAY,CAAA;AAyBhB;;;;;;;GAOG;AACH,eAAO,MAAM,KAAK,QACX,MAAM,OACN,YAAY,MACb,CAAC,EAAE,CAAC,EAAE,IAAI,GAAG,UAAU,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,yBA0DpD,CAAA;AA+FD,eAAO,MAAM,SAAS,QAAS,MAAM,OAAO,YAAY,wBA+EvD,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/mkdir.js b/node_modules/tar/dist/commonjs/mkdir.js new file mode 100644 index 0000000..2b13ecb --- /dev/null +++ b/node_modules/tar/dist/commonjs/mkdir.js @@ -0,0 +1,209 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.mkdirSync = exports.mkdir = void 0; +const chownr_1 = require("chownr"); +const fs_1 = __importDefault(require("fs")); +const mkdirp_1 = require("mkdirp"); +const node_path_1 = __importDefault(require("node:path")); +const cwd_error_js_1 = require("./cwd-error.js"); +const normalize_windows_path_js_1 = require("./normalize-windows-path.js"); +const symlink_error_js_1 = require("./symlink-error.js"); +const cGet = (cache, key) => cache.get((0, normalize_windows_path_js_1.normalizeWindowsPath)(key)); +const cSet = (cache, key, val) => cache.set((0, normalize_windows_path_js_1.normalizeWindowsPath)(key), val); +const checkCwd = (dir, cb) => { + fs_1.default.stat(dir, (er, st) => { + if (er || !st.isDirectory()) { + er = new cwd_error_js_1.CwdError(dir, er?.code || 'ENOTDIR'); + } + cb(er); + }); +}; +/** + * Wrapper around mkdirp for tar's needs. + * + * The main purpose is to avoid creating directories if we know that + * they already exist (and track which ones exist for this purpose), + * and prevent entries from being extracted into symlinked folders, + * if `preservePaths` is not set. + */ +const mkdir = (dir, opt, cb) => { + dir = (0, normalize_windows_path_js_1.normalizeWindowsPath)(dir); + // if there's any overlap between mask and mode, + // then we'll need an explicit chmod + /* c8 ignore next */ + const umask = opt.umask ?? 0o22; + const mode = opt.mode | 0o0700; + const needChmod = (mode & umask) !== 0; + const uid = opt.uid; + const gid = opt.gid; + const doChown = typeof uid === 'number' && + typeof gid === 'number' && + (uid !== opt.processUid || gid !== opt.processGid); + const preserve = opt.preserve; + const unlink = opt.unlink; + const cache = opt.cache; + const cwd = (0, normalize_windows_path_js_1.normalizeWindowsPath)(opt.cwd); + const done = (er, created) => { + if (er) { + cb(er); + } + else { + cSet(cache, dir, true); + if (created && doChown) { + (0, chownr_1.chownr)(created, uid, gid, er => done(er)); + } + else if (needChmod) { + fs_1.default.chmod(dir, mode, cb); + } + else { + cb(); + } + } + }; + if (cache && cGet(cache, dir) === true) { + return done(); + } + if (dir === cwd) { + return checkCwd(dir, done); + } + if (preserve) { + return (0, mkdirp_1.mkdirp)(dir, { mode }).then(made => done(null, made ?? undefined), // oh, ts + done); + } + const sub = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.relative(cwd, dir)); + const parts = sub.split('/'); + mkdir_(cwd, parts, mode, cache, unlink, cwd, undefined, done); +}; +exports.mkdir = mkdir; +const mkdir_ = (base, parts, mode, cache, unlink, cwd, created, cb) => { + if (!parts.length) { + return cb(null, created); + } + const p = parts.shift(); + const part = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.resolve(base + '/' + p)); + if (cGet(cache, part)) { + return mkdir_(part, parts, mode, cache, unlink, cwd, created, cb); + } + fs_1.default.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd, created, cb)); +}; +const onmkdir = (part, parts, mode, cache, unlink, cwd, created, cb) => (er) => { + if (er) { + fs_1.default.lstat(part, (statEr, st) => { + if (statEr) { + statEr.path = + statEr.path && (0, normalize_windows_path_js_1.normalizeWindowsPath)(statEr.path); + cb(statEr); + } + else if (st.isDirectory()) { + mkdir_(part, parts, mode, cache, unlink, cwd, created, cb); + } + else if (unlink) { + fs_1.default.unlink(part, er => { + if (er) { + return cb(er); + } + fs_1.default.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd, created, cb)); + }); + } + else if (st.isSymbolicLink()) { + return cb(new symlink_error_js_1.SymlinkError(part, part + '/' + parts.join('/'))); + } + else { + cb(er); + } + }); + } + else { + created = created || part; + mkdir_(part, parts, mode, cache, unlink, cwd, created, cb); + } +}; +const checkCwdSync = (dir) => { + let ok = false; + let code = undefined; + try { + ok = fs_1.default.statSync(dir).isDirectory(); + } + catch (er) { + code = er?.code; + } + finally { + if (!ok) { + throw new cwd_error_js_1.CwdError(dir, code ?? 'ENOTDIR'); + } + } +}; +const mkdirSync = (dir, opt) => { + dir = (0, normalize_windows_path_js_1.normalizeWindowsPath)(dir); + // if there's any overlap between mask and mode, + // then we'll need an explicit chmod + /* c8 ignore next */ + const umask = opt.umask ?? 0o22; + const mode = opt.mode | 0o700; + const needChmod = (mode & umask) !== 0; + const uid = opt.uid; + const gid = opt.gid; + const doChown = typeof uid === 'number' && + typeof gid === 'number' && + (uid !== opt.processUid || gid !== opt.processGid); + const preserve = opt.preserve; + const unlink = opt.unlink; + const cache = opt.cache; + const cwd = (0, normalize_windows_path_js_1.normalizeWindowsPath)(opt.cwd); + const done = (created) => { + cSet(cache, dir, true); + if (created && doChown) { + (0, chownr_1.chownrSync)(created, uid, gid); + } + if (needChmod) { + fs_1.default.chmodSync(dir, mode); + } + }; + if (cache && cGet(cache, dir) === true) { + return done(); + } + if (dir === cwd) { + checkCwdSync(cwd); + return done(); + } + if (preserve) { + return done((0, mkdirp_1.mkdirpSync)(dir, mode) ?? undefined); + } + const sub = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.relative(cwd, dir)); + const parts = sub.split('/'); + let created = undefined; + for (let p = parts.shift(), part = cwd; p && (part += '/' + p); p = parts.shift()) { + part = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.resolve(part)); + if (cGet(cache, part)) { + continue; + } + try { + fs_1.default.mkdirSync(part, mode); + created = created || part; + cSet(cache, part, true); + } + catch (er) { + const st = fs_1.default.lstatSync(part); + if (st.isDirectory()) { + cSet(cache, part, true); + continue; + } + else if (unlink) { + fs_1.default.unlinkSync(part); + fs_1.default.mkdirSync(part, mode); + created = created || part; + cSet(cache, part, true); + continue; + } + else if (st.isSymbolicLink()) { + return new symlink_error_js_1.SymlinkError(part, part + '/' + parts.join('/')); + } + } + } + return done(created); +}; +exports.mkdirSync = mkdirSync; +//# sourceMappingURL=mkdir.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/mkdir.js.map b/node_modules/tar/dist/commonjs/mkdir.js.map new file mode 100644 index 0000000..8f430be --- /dev/null +++ b/node_modules/tar/dist/commonjs/mkdir.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mkdir.js","sourceRoot":"","sources":["../../src/mkdir.ts"],"names":[],"mappings":";;;;;;AAAA,mCAA2C;AAC3C,4CAAmB;AACnB,mCAA2C;AAC3C,0DAA4B;AAC5B,iDAAyC;AACzC,2EAAkE;AAClE,yDAAiD;AAoBjD,MAAM,IAAI,GAAG,CAAC,KAA2B,EAAE,GAAW,EAAE,EAAE,CACxD,KAAK,CAAC,GAAG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AC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;YAC7D,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC,OAAO,CAAC,CAAA;AACtB,CAAC,CAAA;AA/EY,QAAA,SAAS,aA+ErB","sourcesContent":["import { chownr, chownrSync } from 'chownr'\nimport fs from 'fs'\nimport { mkdirp, mkdirpSync } from 'mkdirp'\nimport path from 'node:path'\nimport { CwdError } from './cwd-error.js'\nimport { normalizeWindowsPath } from './normalize-windows-path.js'\nimport { SymlinkError } from './symlink-error.js'\n\nexport type MkdirOptions = {\n uid?: number\n gid?: number\n processUid?: number\n processGid?: number\n umask?: number\n preserve: boolean\n unlink: boolean\n cache: Map\n cwd: string\n mode: number\n}\n\nexport type MkdirError =\n | NodeJS.ErrnoException\n | CwdError\n | SymlinkError\n\nconst cGet = (cache: Map, key: string) =>\n cache.get(normalizeWindowsPath(key))\nconst cSet = (\n cache: Map,\n key: string,\n val: boolean,\n) => cache.set(normalizeWindowsPath(key), val)\n\nconst checkCwd = (\n dir: string,\n cb: (er?: null | MkdirError) => any,\n) => {\n fs.stat(dir, (er, st) => {\n if (er || !st.isDirectory()) {\n er = new CwdError(\n dir,\n (er as NodeJS.ErrnoException)?.code || 'ENOTDIR',\n )\n }\n cb(er)\n })\n}\n\n/**\n * Wrapper around mkdirp for tar's needs.\n *\n * The main purpose is to avoid creating directories if we know that\n * they already exist (and track which ones exist for this purpose),\n * and prevent entries from being extracted into symlinked folders,\n * if `preservePaths` is not set.\n */\nexport const mkdir = (\n dir: string,\n opt: MkdirOptions,\n cb: (er?: null | MkdirError, made?: string) => void,\n) => {\n dir = normalizeWindowsPath(dir)\n\n // if there's any overlap between mask and mode,\n // then we'll need an explicit chmod\n /* c8 ignore next */\n const umask = opt.umask ?? 0o22\n const mode = opt.mode | 0o0700\n const needChmod = (mode & umask) !== 0\n\n const uid = opt.uid\n const gid = opt.gid\n const doChown =\n typeof uid === 'number' &&\n typeof gid === 'number' &&\n (uid !== opt.processUid || gid !== opt.processGid)\n\n const preserve = opt.preserve\n const unlink = opt.unlink\n const cache = opt.cache\n const cwd = normalizeWindowsPath(opt.cwd)\n\n const done = (er?: null | MkdirError, created?: string) => {\n if (er) {\n cb(er)\n } else {\n cSet(cache, dir, true)\n if (created && doChown) {\n chownr(created, uid, gid, er =>\n done(er as NodeJS.ErrnoException),\n )\n } else if (needChmod) {\n fs.chmod(dir, mode, cb)\n } else {\n cb()\n }\n }\n }\n\n if (cache && cGet(cache, dir) === true) {\n return done()\n }\n\n if (dir === cwd) {\n return checkCwd(dir, done)\n }\n\n if (preserve) {\n return mkdirp(dir, { mode }).then(\n made => done(null, made ?? undefined), // oh, ts\n done,\n )\n }\n\n const sub = normalizeWindowsPath(path.relative(cwd, dir))\n const parts = sub.split('/')\n mkdir_(cwd, parts, mode, cache, unlink, cwd, undefined, done)\n}\n\nconst mkdir_ = (\n base: string,\n parts: string[],\n mode: number,\n cache: Map,\n unlink: boolean,\n cwd: string,\n created: string | undefined,\n cb: (er?: null | MkdirError, made?: string) => void,\n): void => {\n if (!parts.length) {\n return cb(null, created)\n }\n const p = parts.shift()\n const part = normalizeWindowsPath(path.resolve(base + '/' + p))\n if (cGet(cache, part)) {\n return mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)\n }\n fs.mkdir(\n part,\n mode,\n onmkdir(part, parts, mode, cache, unlink, cwd, created, cb),\n )\n}\n\nconst onmkdir =\n (\n part: string,\n parts: string[],\n mode: number,\n cache: Map,\n unlink: boolean,\n cwd: string,\n created: string | undefined,\n cb: (er?: null | MkdirError, made?: string) => void,\n ) =>\n (er?: null | NodeJS.ErrnoException) => {\n if (er) {\n fs.lstat(part, (statEr, st) => {\n if (statEr) {\n statEr.path =\n statEr.path && normalizeWindowsPath(statEr.path)\n cb(statEr)\n } else if (st.isDirectory()) {\n mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)\n } else if (unlink) {\n fs.unlink(part, er => {\n if (er) {\n return cb(er)\n }\n fs.mkdir(\n part,\n mode,\n onmkdir(\n part,\n parts,\n mode,\n cache,\n unlink,\n cwd,\n created,\n cb,\n ),\n )\n })\n } else if (st.isSymbolicLink()) {\n return cb(\n new SymlinkError(part, part + '/' + parts.join('/')),\n )\n } else {\n cb(er)\n }\n })\n } else {\n created = created || part\n mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)\n }\n }\n\nconst checkCwdSync = (dir: string) => {\n let ok = false\n let code: string | undefined = undefined\n try {\n ok = fs.statSync(dir).isDirectory()\n } catch (er) {\n code = (er as NodeJS.ErrnoException)?.code\n } finally {\n if (!ok) {\n throw new CwdError(dir, code ?? 'ENOTDIR')\n }\n }\n}\n\nexport const mkdirSync = (dir: string, opt: MkdirOptions) => {\n dir = normalizeWindowsPath(dir)\n // if there's any overlap between mask and mode,\n // then we'll need an explicit chmod\n /* c8 ignore next */\n const umask = opt.umask ?? 0o22\n const mode = opt.mode | 0o700\n const needChmod = (mode & umask) !== 0\n\n const uid = opt.uid\n const gid = opt.gid\n const doChown =\n typeof uid === 'number' &&\n typeof gid === 'number' &&\n (uid !== opt.processUid || gid !== opt.processGid)\n\n const preserve = opt.preserve\n const unlink = opt.unlink\n const cache = opt.cache\n const cwd = normalizeWindowsPath(opt.cwd)\n\n const done = (created?: string | undefined) => {\n cSet(cache, dir, true)\n if (created && doChown) {\n chownrSync(created, uid, gid)\n }\n if (needChmod) {\n fs.chmodSync(dir, mode)\n }\n }\n\n if (cache && cGet(cache, dir) === true) {\n return done()\n }\n\n if (dir === cwd) {\n checkCwdSync(cwd)\n return done()\n }\n\n if (preserve) {\n return done(mkdirpSync(dir, mode) ?? undefined)\n }\n\n const sub = normalizeWindowsPath(path.relative(cwd, dir))\n const parts = sub.split('/')\n let created: string | undefined = undefined\n for (\n let p = parts.shift(), part = cwd;\n p && (part += '/' + p);\n p = parts.shift()\n ) {\n part = normalizeWindowsPath(path.resolve(part))\n if (cGet(cache, part)) {\n continue\n }\n\n try {\n fs.mkdirSync(part, mode)\n created = created || part\n cSet(cache, part, true)\n } catch (er) {\n const st = fs.lstatSync(part)\n if (st.isDirectory()) {\n cSet(cache, part, true)\n continue\n } else if (unlink) {\n fs.unlinkSync(part)\n fs.mkdirSync(part, mode)\n created = created || part\n cSet(cache, part, true)\n continue\n } else if (st.isSymbolicLink()) {\n return new SymlinkError(part, part + '/' + parts.join('/'))\n }\n }\n }\n\n return done(created)\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/mode-fix.d.ts b/node_modules/tar/dist/commonjs/mode-fix.d.ts new file mode 100644 index 0000000..38f3d93 --- /dev/null +++ b/node_modules/tar/dist/commonjs/mode-fix.d.ts @@ -0,0 +1,2 @@ +export declare const modeFix: (mode: number, isDir: boolean, portable: boolean) => number; +//# sourceMappingURL=mode-fix.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/mode-fix.d.ts.map b/node_modules/tar/dist/commonjs/mode-fix.d.ts.map new file mode 100644 index 0000000..dbef3bc --- /dev/null +++ b/node_modules/tar/dist/commonjs/mode-fix.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"mode-fix.d.ts","sourceRoot":"","sources":["../../src/mode-fix.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,SACZ,MAAM,SACL,OAAO,YACJ,OAAO,WA0BlB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/mode-fix.js b/node_modules/tar/dist/commonjs/mode-fix.js new file mode 100644 index 0000000..49dd727 --- /dev/null +++ b/node_modules/tar/dist/commonjs/mode-fix.js @@ -0,0 +1,29 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.modeFix = void 0; +const modeFix = (mode, isDir, portable) => { + mode &= 0o7777; + // in portable mode, use the minimum reasonable umask + // if this system creates files with 0o664 by default + // (as some linux distros do), then we'll write the + // archive with 0o644 instead. Also, don't ever create + // a file that is not readable/writable by the owner. + if (portable) { + mode = (mode | 0o600) & ~0o22; + } + // if dirs are readable, then they should be listable + if (isDir) { + if (mode & 0o400) { + mode |= 0o100; + } + if (mode & 0o40) { + mode |= 0o10; + } + if (mode & 0o4) { + mode |= 0o1; + } + } + return mode; +}; +exports.modeFix = modeFix; +//# sourceMappingURL=mode-fix.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/mode-fix.js.map b/node_modules/tar/dist/commonjs/mode-fix.js.map new file mode 100644 index 0000000..a44f846 --- /dev/null +++ b/node_modules/tar/dist/commonjs/mode-fix.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mode-fix.js","sourceRoot":"","sources":["../../src/mode-fix.ts"],"names":[],"mappings":";;;AAAO,MAAM,OAAO,GAAG,CACrB,IAAY,EACZ,KAAc,EACd,QAAiB,EACjB,EAAE;IACF,IAAI,IAAI,MAAM,CAAA;IAEd,qDAAqD;IACrD,qDAAqD;IACrD,mDAAmD;IACnD,uDAAuD;IACvD,qDAAqD;IACrD,IAAI,QAAQ,EAAE,CAAC;QACb,IAAI,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAA;IAC/B,CAAC;IAED,qDAAqD;IACrD,IAAI,KAAK,EAAE,CAAC;QACV,IAAI,IAAI,GAAG,KAAK,EAAE,CAAC;YACjB,IAAI,IAAI,KAAK,CAAA;QACf,CAAC;QACD,IAAI,IAAI,GAAG,IAAI,EAAE,CAAC;YAChB,IAAI,IAAI,IAAI,CAAA;QACd,CAAC;QACD,IAAI,IAAI,GAAG,GAAG,EAAE,CAAC;YACf,IAAI,IAAI,GAAG,CAAA;QACb,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AA7BY,QAAA,OAAO,WA6BnB","sourcesContent":["export const modeFix = (\n mode: number,\n isDir: boolean,\n portable: boolean,\n) => {\n mode &= 0o7777\n\n // in portable mode, use the minimum reasonable umask\n // if this system creates files with 0o664 by default\n // (as some linux distros do), then we'll write the\n // archive with 0o644 instead. Also, don't ever create\n // a file that is not readable/writable by the owner.\n if (portable) {\n mode = (mode | 0o600) & ~0o22\n }\n\n // if dirs are readable, then they should be listable\n if (isDir) {\n if (mode & 0o400) {\n mode |= 0o100\n }\n if (mode & 0o40) {\n mode |= 0o10\n }\n if (mode & 0o4) {\n mode |= 0o1\n }\n }\n return mode\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/normalize-unicode.d.ts b/node_modules/tar/dist/commonjs/normalize-unicode.d.ts new file mode 100644 index 0000000..0413bd7 --- /dev/null +++ b/node_modules/tar/dist/commonjs/normalize-unicode.d.ts @@ -0,0 +1,2 @@ +export declare const normalizeUnicode: (s: string) => any; +//# sourceMappingURL=normalize-unicode.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/normalize-unicode.d.ts.map b/node_modules/tar/dist/commonjs/normalize-unicode.d.ts.map new file mode 100644 index 0000000..9c26ec8 --- /dev/null +++ b/node_modules/tar/dist/commonjs/normalize-unicode.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"normalize-unicode.d.ts","sourceRoot":"","sources":["../../src/normalize-unicode.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,MAAO,MAAM,QAKzC,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/normalize-unicode.js b/node_modules/tar/dist/commonjs/normalize-unicode.js new file mode 100644 index 0000000..2f08ce4 --- /dev/null +++ b/node_modules/tar/dist/commonjs/normalize-unicode.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.normalizeUnicode = void 0; +// warning: extremely hot code path. +// This has been meticulously optimized for use +// within npm install on large package trees. +// Do not edit without careful benchmarking. +const normalizeCache = Object.create(null); +const { hasOwnProperty } = Object.prototype; +const normalizeUnicode = (s) => { + if (!hasOwnProperty.call(normalizeCache, s)) { + normalizeCache[s] = s.normalize('NFD'); + } + return normalizeCache[s]; +}; +exports.normalizeUnicode = normalizeUnicode; +//# sourceMappingURL=normalize-unicode.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/normalize-unicode.js.map b/node_modules/tar/dist/commonjs/normalize-unicode.js.map new file mode 100644 index 0000000..c41f57c --- /dev/null +++ b/node_modules/tar/dist/commonjs/normalize-unicode.js.map @@ -0,0 +1 @@ +{"version":3,"file":"normalize-unicode.js","sourceRoot":"","sources":["../../src/normalize-unicode.ts"],"names":[],"mappings":";;;AAAA,oCAAoC;AACpC,+CAA+C;AAC/C,6CAA6C;AAC7C,4CAA4C;AAC5C,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;AAC1C,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC,SAAS,CAAA;AACpC,MAAM,gBAAgB,GAAG,CAAC,CAAS,EAAE,EAAE;IAC5C,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE,CAAC;QAC5C,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;IACxC,CAAC;IACD,OAAO,cAAc,CAAC,CAAC,CAAC,CAAA;AAC1B,CAAC,CAAA;AALY,QAAA,gBAAgB,oBAK5B","sourcesContent":["// warning: extremely hot code path.\n// This has been meticulously optimized for use\n// within npm install on large package trees.\n// Do not edit without careful benchmarking.\nconst normalizeCache = Object.create(null)\nconst { hasOwnProperty } = Object.prototype\nexport const normalizeUnicode = (s: string) => {\n if (!hasOwnProperty.call(normalizeCache, s)) {\n normalizeCache[s] = s.normalize('NFD')\n }\n return normalizeCache[s]\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts b/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts new file mode 100644 index 0000000..8581105 --- /dev/null +++ b/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts @@ -0,0 +1,2 @@ +export declare const normalizeWindowsPath: (p: string) => string; +//# sourceMappingURL=normalize-windows-path.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts.map b/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts.map new file mode 100644 index 0000000..25de3c0 --- /dev/null +++ b/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"normalize-windows-path.d.ts","sourceRoot":"","sources":["../../src/normalize-windows-path.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,oBAAoB,MAEzB,MAAM,WAC+B,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/normalize-windows-path.js b/node_modules/tar/dist/commonjs/normalize-windows-path.js new file mode 100644 index 0000000..b0c7aaa --- /dev/null +++ b/node_modules/tar/dist/commonjs/normalize-windows-path.js @@ -0,0 +1,12 @@ +"use strict"; +// on windows, either \ or / are valid directory separators. +// on unix, \ is a valid character in filenames. +// so, on windows, and only on windows, we replace all \ chars with /, +// so that we can use / as our one and only directory separator char. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.normalizeWindowsPath = void 0; +const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform; +exports.normalizeWindowsPath = platform !== 'win32' ? + (p) => p + : (p) => p && p.replace(/\\/g, '/'); +//# sourceMappingURL=normalize-windows-path.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/normalize-windows-path.js.map b/node_modules/tar/dist/commonjs/normalize-windows-path.js.map new file mode 100644 index 0000000..8d31dc4 --- /dev/null +++ b/node_modules/tar/dist/commonjs/normalize-windows-path.js.map @@ -0,0 +1 @@ +{"version":3,"file":"normalize-windows-path.js","sourceRoot":"","sources":["../../src/normalize-windows-path.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,gDAAgD;AAChD,sEAAsE;AACtE,qEAAqE;;;AAErE,MAAM,QAAQ,GACZ,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,OAAO,CAAC,QAAQ,CAAA;AAE9C,QAAA,oBAAoB,GAC/B,QAAQ,KAAK,OAAO,CAAC,CAAC;IACpB,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA","sourcesContent":["// on windows, either \\ or / are valid directory separators.\n// on unix, \\ is a valid character in filenames.\n// so, on windows, and only on windows, we replace all \\ chars with /,\n// so that we can use / as our one and only directory separator char.\n\nconst platform =\n process.env.TESTING_TAR_FAKE_PLATFORM || process.platform\n\nexport const normalizeWindowsPath =\n platform !== 'win32' ?\n (p: string) => p\n : (p: string) => p && p.replace(/\\\\/g, '/')\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/options.d.ts b/node_modules/tar/dist/commonjs/options.d.ts new file mode 100644 index 0000000..e3110de --- /dev/null +++ b/node_modules/tar/dist/commonjs/options.d.ts @@ -0,0 +1,605 @@ +/// +import { type GzipOptions, type ZlibOptions } from 'minizlib'; +import { type Stats } from 'node:fs'; +import { type ReadEntry } from './read-entry.js'; +import { type WarnData } from './warn-method.js'; +import { WriteEntry } from './write-entry.js'; +/** + * The options that can be provided to tar commands. + * + * Note that some of these are only relevant for certain commands, since + * they are specific to reading or writing. + * + * Aliases are provided in the {@link TarOptionsWithAliases} type. + */ +export interface TarOptions { + /** + * Perform all I/O operations synchronously. If the stream is ended + * immediately, then it will be processed entirely synchronously. + */ + sync?: boolean; + /** + * The tar file to be read and/or written. When this is set, a stream + * is not returned. Asynchronous commands will return a promise indicating + * when the operation is completed, and synchronous commands will return + * immediately. + */ + file?: string; + /** + * Treat warnings as crash-worthy errors. Defaults false. + */ + strict?: boolean; + /** + * The effective current working directory for this tar command + */ + cwd?: string; + /** + * When creating a tar archive, this can be used to compress it as well. + * Set to `true` to use the default gzip options, or customize them as + * needed. + * + * When reading, if this is unset, then the compression status will be + * inferred from the archive data. This is generally best, unless you are + * sure of the compression settings in use to create the archive, and want to + * fail if the archive doesn't match expectations. + */ + gzip?: boolean | GzipOptions; + /** + * When creating archives, preserve absolute and `..` paths in the archive, + * rather than sanitizing them under the cwd. + * + * When extracting, allow absolute paths, paths containing `..`, and + * extracting through symbolic links. By default, the root `/` is stripped + * from absolute paths (eg, turning `/x/y/z` into `x/y/z`), paths containing + * `..` are not extracted, and any file whose location would be modified by a + * symbolic link is not extracted. + * + * **WARNING** This is almost always unsafe, and must NEVER be used on + * archives from untrusted sources, such as user input, and every entry must + * be validated to ensure it is safe to write. Even if the input is not + * malicious, mistakes can cause a lot of damage! + */ + preservePaths?: boolean; + /** + * When extracting, do not set the `mtime` value for extracted entries to + * match the `mtime` in the archive. + * + * When creating archives, do not store the `mtime` value in the entry. Note + * that this prevents properly using other mtime-based features (such as + * `tar.update` or the `newer` option) with the resulting archive. + */ + noMtime?: boolean; + /** + * Set to `true` or an object with settings for `zlib.BrotliCompress()` to + * create a brotli-compressed archive + * + * When extracting, this will cause the archive to be treated as a + * brotli-compressed file if set to `true` or a ZlibOptions object. + * + * If set `false`, then brotli options will not be used. + * + * If both this and the `gzip` option are left `undefined`, then tar will + * attempt to infer the brotli compression status, but can only do so based + * on the filename. If the filename ends in `.tbr` or `.tar.br`, and the + * first 512 bytes are not a valid tar header, then brotli decompression + * will be attempted. + */ + brotli?: boolean | ZlibOptions; + /** + * A function that is called with `(path, stat)` when creating an archive, or + * `(path, entry)` when extracting. Return true to process the file/entry, or + * false to exclude it. + */ + filter?: (path: string, entry: Stats | ReadEntry) => boolean; + /** + * A function that gets called for any warning encountered. + * + * Note: if `strict` is set, then the warning will throw, and this method + * will not be called. + */ + onwarn?: (code: string, message: string, data: WarnData) => any; + /** + * When extracting, unlink files before creating them. Without this option, + * tar overwrites existing files, which preserves existing hardlinks. With + * this option, existing hardlinks will be broken, as will any symlink that + * would affect the location of an extracted file. + */ + unlink?: boolean; + /** + * When extracting, strip the specified number of path portions from the + * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be + * extracted to `{cwd}/c/d`. + * + * Any entry whose entire path is stripped will be excluded. + */ + strip?: number; + /** + * When extracting, keep the existing file on disk if it's newer than the + * file in the archive. + */ + newer?: boolean; + /** + * When extracting, do not overwrite existing files at all. + */ + keep?: boolean; + /** + * When extracting, set the `uid` and `gid` of extracted entries to the `uid` + * and `gid` fields in the archive. Defaults to true when run as root, and + * false otherwise. + * + * If false, then files and directories will be set with the owner and group + * of the user running the process. This is similar to `-p` in `tar(1)`, but + * ACLs and other system-specific data is never unpacked in this + * implementation, and modes are set by default already. + */ + preserveOwner?: boolean; + /** + * The maximum depth of subfolders to extract into. This defaults to 1024. + * Anything deeper than the limit will raise a warning and skip the entry. + * Set to `Infinity` to remove the limitation. + */ + maxDepth?: number; + /** + * When extracting, force all created files and directories, and all + * implicitly created directories, to be owned by the specified user id, + * regardless of the `uid` field in the archive. + * + * Cannot be used along with `preserveOwner`. Requires also setting the `gid` + * option. + */ + uid?: number; + /** + * When extracting, force all created files and directories, and all + * implicitly created directories, to be owned by the specified group id, + * regardless of the `gid` field in the archive. + * + * Cannot be used along with `preserveOwner`. Requires also setting the `uid` + * option. + */ + gid?: number; + /** + * When extracting, provide a function that takes an `entry` object, and + * returns a stream, or any falsey value. If a stream is provided, then that + * stream's data will be written instead of the contents of the archive + * entry. If a falsey value is provided, then the entry is written to disk as + * normal. + * + * To exclude items from extraction, use the `filter` option. + * + * Note that using an asynchronous stream type with the `transform` option + * will cause undefined behavior in synchronous extractions. + * [MiniPass](http://npm.im/minipass)-based streams are designed for this use + * case. + */ + transform?: (entry: ReadEntry) => any; + /** + * Call `chmod()` to ensure that extracted files match the entry's mode + * field. Without this field set, all mode fields in archive entries are a + * best effort attempt only. + * + * Setting this necessitates a call to the deprecated `process.umask()` + * method to determine the default umask value, unless a `processUmask` + * config is provided as well. + * + * If not set, tar will attempt to create file system entries with whatever + * mode is provided, and let the implicit process `umask` apply normally, but + * if a file already exists to be written to, then its existing mode will not + * be modified. + * + * When setting `chmod: true`, it is highly recommend to set the + * {@link TarOptions#processUmask} option as well, to avoid the call to the + * deprecated (and thread-unsafe) `process.umask()` method. + */ + chmod?: boolean; + /** + * When setting the {@link TarOptions#chmod} option to `true`, you may + * provide a value here to avoid having to call the deprecated and + * thread-unsafe `process.umask()` method. + * + * This has no effect with `chmod` is not set to true, as mode values are not + * set explicitly anyway. If `chmod` is set to `true`, and a value is not + * provided here, then `process.umask()` must be called, which will result in + * deprecation warnings. + * + * The most common values for this are `0o22` (resulting in directories + * created with mode `0o755` and files with `0o644` by default) and `0o2` + * (resulting in directores created with mode `0o775` and files `0o664`, so + * they are group-writable). + */ + processUmask?: number; + /** + * When parsing/listing archives, `entry` streams are by default resumed + * (set into "flowing" mode) immediately after the call to `onReadEntry()`. + * Set `noResume: true` to suppress this behavior. + * + * Note that when this is set, the stream will never complete until the + * data is consumed somehow. + * + * Set automatically in extract operations, since the entry is piped to + * a file system entry right away. Only relevant when parsing. + */ + noResume?: boolean; + /** + * When creating, updating, or replacing within archives, this method will + * be called with each WriteEntry that is created. + */ + onWriteEntry?: (entry: WriteEntry) => any; + /** + * When extracting or listing archives, this method will be called with + * each entry that is not excluded by a `filter`. + * + * Important when listing archives synchronously from a file, because there + * is otherwise no way to interact with the data! + */ + onReadEntry?: (entry: ReadEntry) => any; + /** + * Pack the targets of symbolic links rather than the link itself. + */ + follow?: boolean; + /** + * When creating archives, omit any metadata that is system-specific: + * `ctime`, `atime`, `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and + * `nlink`. Note that `mtime` is still included, because this is necessary + * for other time-based operations such as `tar.update`. Additionally, `mode` + * is set to a "reasonable default" for mose unix systems, based on an + * effective `umask` of `0o22`. + * + * This also defaults the `portable` option in the gzip configs when creating + * a compressed archive, in order to produce deterministic archives that are + * not operating-system specific. + */ + portable?: boolean; + /** + * When creating archives, do not recursively archive the contents of + * directories. By default, archiving a directory archives all of its + * contents as well. + */ + noDirRecurse?: boolean; + /** + * Suppress Pax extended headers when creating archives. Note that this means + * long paths and linkpaths will be truncated, and large or negative numeric + * values may be interpreted incorrectly. + */ + noPax?: boolean; + /** + * Set to a `Date` object to force a specific `mtime` value for everything + * written to an archive. + * + * This is useful when creating archives that are intended to be + * deterministic based on their contents, irrespective of the file's last + * modification time. + * + * Overridden by `noMtime`. + */ + mtime?: Date; + /** + * A path portion to prefix onto the entries added to an archive. + */ + prefix?: string; + /** + * The mode to set on any created file archive, defaults to 0o666 + * masked by the process umask, often resulting in 0o644. + * + * This does *not* affect the mode fields of individual entries, or the + * mode status of extracted entries on the filesystem. + */ + mode?: number; + /** + * A cache of mtime values, to avoid having to stat the same file repeatedly. + * + * @internal + */ + mtimeCache?: Map; + /** + * maximum buffer size for `fs.read()` operations. + * + * @internal + */ + maxReadSize?: number; + /** + * Filter modes of entries being unpacked, like `process.umask()` + * + * @internal + */ + umask?: number; + /** + * Default mode for directories. Used for all implicitly created directories, + * and any directories in the archive that do not have a mode field. + * + * @internal + */ + dmode?: number; + /** + * default mode for files + * + * @internal + */ + fmode?: number; + /** + * Map that tracks which directories already exist, for extraction + * + * @internal + */ + dirCache?: Map; + /** + * maximum supported size of meta entries. Defaults to 1MB + * + * @internal + */ + maxMetaEntrySize?: number; + /** + * A Map object containing the device and inode value for any file whose + * `nlink` value is greater than 1, to identify hard links when creating + * archives. + * + * @internal + */ + linkCache?: Map; + /** + * A map object containing the results of `fs.readdir()` calls. + * + * @internal + */ + readdirCache?: Map; + /** + * A cache of all `lstat` results, for use in creating archives. + * + * @internal + */ + statCache?: Map; + /** + * Number of concurrent jobs to run when creating archives. + * + * Defaults to 4. + * + * @internal + */ + jobs?: number; + /** + * Automatically set to true on Windows systems. + * + * When extracting, causes behavior where filenames containing `<|>?:` + * characters are converted to windows-compatible escape sequences in the + * created filesystem entries. + * + * When packing, causes behavior where paths replace `\` with `/`, and + * filenames containing the windows-compatible escaped forms of `<|>?:` are + * converted to actual `<|>?:` characters in the archive. + * + * @internal + */ + win32?: boolean; + /** + * For `WriteEntry` objects, the absolute path to the entry on the + * filesystem. By default, this is `resolve(cwd, entry.path)`, but it can be + * overridden explicitly. + * + * @internal + */ + absolute?: string; + /** + * Used with Parser stream interface, to attach and take over when the + * stream is completely parsed. If this is set, then the prefinish, + * finish, and end events will not fire, and are the responsibility of + * the ondone method to emit properly. + * + * @internal + */ + ondone?: () => void; + /** + * Mostly for testing, but potentially useful in some cases. + * Forcibly trigger a chown on every entry, no matter what. + */ + forceChown?: boolean; + /** + * ambiguous deprecated name for {@link onReadEntry} + * + * @deprecated + */ + onentry?: (entry: ReadEntry) => any; +} +export type TarOptionsSync = TarOptions & { + sync: true; +}; +export type TarOptionsAsync = TarOptions & { + sync?: false; +}; +export type TarOptionsFile = TarOptions & { + file: string; +}; +export type TarOptionsNoFile = TarOptions & { + file?: undefined; +}; +export type TarOptionsSyncFile = TarOptionsSync & TarOptionsFile; +export type TarOptionsAsyncFile = TarOptionsAsync & TarOptionsFile; +export type TarOptionsSyncNoFile = TarOptionsSync & TarOptionsNoFile; +export type TarOptionsAsyncNoFile = TarOptionsAsync & TarOptionsNoFile; +export type LinkCacheKey = `${number}:${number}`; +export interface TarOptionsWithAliases extends TarOptions { + /** + * The effective current working directory for this tar command + */ + C?: TarOptions['cwd']; + /** + * The tar file to be read and/or written. When this is set, a stream + * is not returned. Asynchronous commands will return a promise indicating + * when the operation is completed, and synchronous commands will return + * immediately. + */ + f?: TarOptions['file']; + /** + * When creating a tar archive, this can be used to compress it as well. + * Set to `true` to use the default gzip options, or customize them as + * needed. + * + * When reading, if this is unset, then the compression status will be + * inferred from the archive data. This is generally best, unless you are + * sure of the compression settings in use to create the archive, and want to + * fail if the archive doesn't match expectations. + */ + z?: TarOptions['gzip']; + /** + * When creating archives, preserve absolute and `..` paths in the archive, + * rather than sanitizing them under the cwd. + * + * When extracting, allow absolute paths, paths containing `..`, and + * extracting through symbolic links. By default, the root `/` is stripped + * from absolute paths (eg, turning `/x/y/z` into `x/y/z`), paths containing + * `..` are not extracted, and any file whose location would be modified by a + * symbolic link is not extracted. + * + * **WARNING** This is almost always unsafe, and must NEVER be used on + * archives from untrusted sources, such as user input, and every entry must + * be validated to ensure it is safe to write. Even if the input is not + * malicious, mistakes can cause a lot of damage! + */ + P?: TarOptions['preservePaths']; + /** + * When extracting, unlink files before creating them. Without this option, + * tar overwrites existing files, which preserves existing hardlinks. With + * this option, existing hardlinks will be broken, as will any symlink that + * would affect the location of an extracted file. + */ + U?: TarOptions['unlink']; + /** + * When extracting, strip the specified number of path portions from the + * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be + * extracted to `{cwd}/c/d`. + */ + 'strip-components'?: TarOptions['strip']; + /** + * When extracting, strip the specified number of path portions from the + * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be + * extracted to `{cwd}/c/d`. + */ + stripComponents?: TarOptions['strip']; + /** + * When extracting, keep the existing file on disk if it's newer than the + * file in the archive. + */ + 'keep-newer'?: TarOptions['newer']; + /** + * When extracting, keep the existing file on disk if it's newer than the + * file in the archive. + */ + keepNewer?: TarOptions['newer']; + /** + * When extracting, keep the existing file on disk if it's newer than the + * file in the archive. + */ + 'keep-newer-files'?: TarOptions['newer']; + /** + * When extracting, keep the existing file on disk if it's newer than the + * file in the archive. + */ + keepNewerFiles?: TarOptions['newer']; + /** + * When extracting, do not overwrite existing files at all. + */ + k?: TarOptions['keep']; + /** + * When extracting, do not overwrite existing files at all. + */ + 'keep-existing'?: TarOptions['keep']; + /** + * When extracting, do not overwrite existing files at all. + */ + keepExisting?: TarOptions['keep']; + /** + * When extracting, do not set the `mtime` value for extracted entries to + * match the `mtime` in the archive. + * + * When creating archives, do not store the `mtime` value in the entry. Note + * that this prevents properly using other mtime-based features (such as + * `tar.update` or the `newer` option) with the resulting archive. + */ + m?: TarOptions['noMtime']; + /** + * When extracting, do not set the `mtime` value for extracted entries to + * match the `mtime` in the archive. + * + * When creating archives, do not store the `mtime` value in the entry. Note + * that this prevents properly using other mtime-based features (such as + * `tar.update` or the `newer` option) with the resulting archive. + */ + 'no-mtime'?: TarOptions['noMtime']; + /** + * When extracting, set the `uid` and `gid` of extracted entries to the `uid` + * and `gid` fields in the archive. Defaults to true when run as root, and + * false otherwise. + * + * If false, then files and directories will be set with the owner and group + * of the user running the process. This is similar to `-p` in `tar(1)`, but + * ACLs and other system-specific data is never unpacked in this + * implementation, and modes are set by default already. + */ + p?: TarOptions['preserveOwner']; + /** + * Pack the targets of symbolic links rather than the link itself. + */ + L?: TarOptions['follow']; + /** + * Pack the targets of symbolic links rather than the link itself. + */ + h?: TarOptions['follow']; + /** + * Deprecated option. Set explicitly false to set `chmod: true`. Ignored + * if {@link TarOptions#chmod} is set to any boolean value. + * + * @deprecated + */ + noChmod?: boolean; +} +export type TarOptionsWithAliasesSync = TarOptionsWithAliases & { + sync: true; +}; +export type TarOptionsWithAliasesAsync = TarOptionsWithAliases & { + sync?: false; +}; +export type TarOptionsWithAliasesFile = (TarOptionsWithAliases & { + file: string; +}) | (TarOptionsWithAliases & { + f: string; +}); +export type TarOptionsWithAliasesSyncFile = TarOptionsWithAliasesSync & TarOptionsWithAliasesFile; +export type TarOptionsWithAliasesAsyncFile = TarOptionsWithAliasesAsync & TarOptionsWithAliasesFile; +export type TarOptionsWithAliasesNoFile = TarOptionsWithAliases & { + f?: undefined; + file?: undefined; +}; +export type TarOptionsWithAliasesSyncNoFile = TarOptionsWithAliasesSync & TarOptionsWithAliasesNoFile; +export type TarOptionsWithAliasesAsyncNoFile = TarOptionsWithAliasesAsync & TarOptionsWithAliasesNoFile; +export declare const isSyncFile: (o: O) => o is O & TarOptions & { + sync: true; +} & { + file: string; +}; +export declare const isAsyncFile: (o: O) => o is O & TarOptions & { + sync?: false | undefined; +} & { + file: string; +}; +export declare const isSyncNoFile: (o: O) => o is O & TarOptions & { + sync: true; +} & { + file?: undefined; +}; +export declare const isAsyncNoFile: (o: O) => o is O & TarOptions & { + sync?: false | undefined; +} & { + file?: undefined; +}; +export declare const isSync: (o: O) => o is O & TarOptions & { + sync: true; +}; +export declare const isAsync: (o: O) => o is O & TarOptions & { + sync?: false | undefined; +}; +export declare const isFile: (o: O) => o is O & TarOptions & { + file: string; +}; +export declare const isNoFile: (o: O) => o is O & TarOptions & { + file?: undefined; +}; +export declare const dealias: (opt?: TarOptionsWithAliases) => TarOptions; +//# sourceMappingURL=options.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/options.d.ts.map b/node_modules/tar/dist/commonjs/options.d.ts.map new file mode 100644 index 0000000..cd32241 --- /dev/null +++ b/node_modules/tar/dist/commonjs/options.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AAC7D,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AA2B7C;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU;IAIzB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,WAAW,CAAA;IAE5B;;;;;;;;;;;;;;OAcG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,WAAW,CAAA;IAE9B;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,IA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,6BAA6B,GACvC,yBAAyB,GAAG,yBAAyB,CAAA;AACvD,MAAM,MAAM,8BAA8B,GACxC,0BAA0B,GAAG,yBAAyB,CAAA;AAExD,MAAM,MAAM,2BAA2B,GAAG,qBAAqB,GAAG;IAChE,CAAC,CAAC,EAAE,SAAS,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,+BAA+B,GACzC,yBAAyB,GAAG,2BAA2B,CAAA;AACzD,MAAM,MAAM,gCAAgC,GAC1C,0BAA0B,GAAG,2BAA2B,CAAA;AAE1D,eAAO,MAAM,UAAU,4BAClB,CAAC;UA/K4C,IAAI;;UAEJ,MAAM;CA8KF,CAAA;AACtD,eAAO,MAAM,WAAW,4BACnB,CAAC;;;UAhL4C,MAAM;CAiLF,CAAA;AACtD,eAAO,MAAM,YAAY,4BACpB,CAAC;UArL4C,IAAI;;WAGD,SAAS;CAmLP,CAAA;AACvD,eAAO,MAAM,aAAa,4BACrB,CAAC;;;WArL+C,SAAS;CAsLP,CAAA;AACvD,eAAO,MAAM,MAAM,4BACd,CAAC;UA3L4C,IAAI;CA4LhB,CAAA;AACtC,eAAO,MAAM,OAAO,4BACf,CAAC;;CACgC,CAAA;AACtC,eAAO,MAAM,MAAM,4BACd,CAAC;UA/L4C,MAAM;CAgMlB,CAAA;AACtC,eAAO,MAAM,QAAQ,4BAChB,CAAC;WAjM+C,SAAS;CAkMvB,CAAA;AAUvC,eAAO,MAAM,OAAO,SACb,qBAAqB,KACzB,UAiBF,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/options.js b/node_modules/tar/dist/commonjs/options.js new file mode 100644 index 0000000..4cd0650 --- /dev/null +++ b/node_modules/tar/dist/commonjs/options.js @@ -0,0 +1,66 @@ +"use strict"; +// turn tar(1) style args like `C` into the more verbose things like `cwd` +Object.defineProperty(exports, "__esModule", { value: true }); +exports.dealias = exports.isNoFile = exports.isFile = exports.isAsync = exports.isSync = exports.isAsyncNoFile = exports.isSyncNoFile = exports.isAsyncFile = exports.isSyncFile = void 0; +const argmap = new Map([ + ['C', 'cwd'], + ['f', 'file'], + ['z', 'gzip'], + ['P', 'preservePaths'], + ['U', 'unlink'], + ['strip-components', 'strip'], + ['stripComponents', 'strip'], + ['keep-newer', 'newer'], + ['keepNewer', 'newer'], + ['keep-newer-files', 'newer'], + ['keepNewerFiles', 'newer'], + ['k', 'keep'], + ['keep-existing', 'keep'], + ['keepExisting', 'keep'], + ['m', 'noMtime'], + ['no-mtime', 'noMtime'], + ['p', 'preserveOwner'], + ['L', 'follow'], + ['h', 'follow'], + ['onentry', 'onReadEntry'], +]); +const isSyncFile = (o) => !!o.sync && !!o.file; +exports.isSyncFile = isSyncFile; +const isAsyncFile = (o) => !o.sync && !!o.file; +exports.isAsyncFile = isAsyncFile; +const isSyncNoFile = (o) => !!o.sync && !o.file; +exports.isSyncNoFile = isSyncNoFile; +const isAsyncNoFile = (o) => !o.sync && !o.file; +exports.isAsyncNoFile = isAsyncNoFile; +const isSync = (o) => !!o.sync; +exports.isSync = isSync; +const isAsync = (o) => !o.sync; +exports.isAsync = isAsync; +const isFile = (o) => !!o.file; +exports.isFile = isFile; +const isNoFile = (o) => !o.file; +exports.isNoFile = isNoFile; +const dealiasKey = (k) => { + const d = argmap.get(k); + if (d) + return d; + return k; +}; +const dealias = (opt = {}) => { + if (!opt) + return {}; + const result = {}; + for (const [key, v] of Object.entries(opt)) { + // TS doesn't know that aliases are going to always be the same type + const k = dealiasKey(key); + result[k] = v; + } + // affordance for deprecated noChmod -> chmod + if (result.chmod === undefined && result.noChmod === false) { + result.chmod = true; + } + delete result.noChmod; + return result; +}; +exports.dealias = dealias; +//# sourceMappingURL=options.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/options.js.map b/node_modules/tar/dist/commonjs/options.js.map new file mode 100644 index 0000000..469ff02 --- /dev/null +++ b/node_modules/tar/dist/commonjs/options.js.map @@ -0,0 +1 @@ +{"version":3,"file":"options.js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AAC,CAAA;IACf,CAAC;IACD,6CAA6C;IAC7C,IAAI,MAAM,CAAC,KAAK,KAAK,SAAS,IAAI,MAAM,CAAC,OAAO,KAAK,KAAK,EAAE,CAAC;QAC3D,MAAM,CAAC,KAAK,GAAG,IAAI,CAAA;IACrB,CAAC;IACD,OAAO,MAAM,CAAC,OAAO,CAAA;IACrB,OAAO,MAAoB,CAAA;AAC7B,CAAC,CAAA;AAnBY,QAAA,OAAO,WAmBnB","sourcesContent":["// turn tar(1) style args like `C` into the more verbose things like `cwd`\n\nimport { type GzipOptions, type ZlibOptions } from 'minizlib'\nimport { type Stats } from 'node:fs'\nimport { type ReadEntry } from './read-entry.js'\nimport { type WarnData } from './warn-method.js'\nimport { WriteEntry } from './write-entry.js'\n\nconst argmap = new Map(\n [\n ['C', 'cwd'],\n ['f', 'file'],\n ['z', 'gzip'],\n ['P', 'preservePaths'],\n ['U', 'unlink'],\n ['strip-components', 'strip'],\n ['stripComponents', 'strip'],\n ['keep-newer', 'newer'],\n ['keepNewer', 'newer'],\n ['keep-newer-files', 'newer'],\n ['keepNewerFiles', 'newer'],\n ['k', 'keep'],\n ['keep-existing', 'keep'],\n ['keepExisting', 'keep'],\n ['m', 'noMtime'],\n ['no-mtime', 'noMtime'],\n ['p', 'preserveOwner'],\n ['L', 'follow'],\n ['h', 'follow'],\n ['onentry', 'onReadEntry'],\n ],\n)\n\n/**\n * The options that can be provided to tar commands.\n *\n * Note that some of these are only relevant for certain commands, since\n * they are specific to reading or writing.\n *\n * Aliases are provided in the {@link TarOptionsWithAliases} type.\n */\nexport interface TarOptions {\n //////////////////////////\n // shared options\n\n /**\n * Perform all I/O operations synchronously. If the stream is ended\n * immediately, then it will be processed entirely synchronously.\n */\n sync?: boolean\n\n /**\n * The tar file to be read and/or written. When this is set, a stream\n * is not returned. Asynchronous commands will return a promise indicating\n * when the operation is completed, and synchronous commands will return\n * immediately.\n */\n file?: string\n\n /**\n * Treat warnings as crash-worthy errors. Defaults false.\n */\n strict?: boolean\n\n /**\n * The effective current working directory for this tar command\n */\n cwd?: string\n\n /**\n * When creating a tar archive, this can be used to compress it as well.\n * Set to `true` to use the default gzip options, or customize them as\n * needed.\n *\n * When reading, if this is unset, then the compression status will be\n * inferred from the archive data. This is generally best, unless you are\n * sure of the compression settings in use to create the archive, and want to\n * fail if the archive doesn't match expectations.\n */\n gzip?: boolean | GzipOptions\n\n /**\n * When creating archives, preserve absolute and `..` paths in the archive,\n * rather than sanitizing them under the cwd.\n *\n * When extracting, allow absolute paths, paths containing `..`, and\n * extracting through symbolic links. By default, the root `/` is stripped\n * from absolute paths (eg, turning `/x/y/z` into `x/y/z`), paths containing\n * `..` are not extracted, and any file whose location would be modified by a\n * symbolic link is not extracted.\n *\n * **WARNING** This is almost always unsafe, and must NEVER be used on\n * archives from untrusted sources, such as user input, and every entry must\n * be validated to ensure it is safe to write. Even if the input is not\n * malicious, mistakes can cause a lot of damage!\n */\n preservePaths?: boolean\n\n /**\n * When extracting, do not set the `mtime` value for extracted entries to\n * match the `mtime` in the archive.\n *\n * When creating archives, do not store the `mtime` value in the entry. Note\n * that this prevents properly using other mtime-based features (such as\n * `tar.update` or the `newer` option) with the resulting archive.\n */\n noMtime?: boolean\n\n /**\n * Set to `true` or an object with settings for `zlib.BrotliCompress()` to\n * create a brotli-compressed archive\n *\n * When extracting, this will cause the archive to be treated as a\n * brotli-compressed file if set to `true` or a ZlibOptions object.\n *\n * If set `false`, then brotli options will not be used.\n *\n * If both this and the `gzip` option are left `undefined`, then tar will\n * attempt to infer the brotli compression status, but can only do so based\n * on the filename. If the filename ends in `.tbr` or `.tar.br`, and the\n * first 512 bytes are not a valid tar header, then brotli decompression\n * will be attempted.\n */\n brotli?: boolean | ZlibOptions\n\n /**\n * A function that is called with `(path, stat)` when creating an archive, or\n * `(path, entry)` when extracting. Return true to process the file/entry, or\n * false to exclude it.\n */\n filter?: (path: string, entry: Stats | ReadEntry) => boolean\n\n /**\n * A function that gets called for any warning encountered.\n *\n * Note: if `strict` is set, then the warning will throw, and this method\n * will not be called.\n */\n onwarn?: (code: string, message: string, data: WarnData) => any\n\n //////////////////////////\n // extraction options\n\n /**\n * When extracting, unlink files before creating them. Without this option,\n * tar overwrites existing files, which preserves existing hardlinks. With\n * this option, existing hardlinks will be broken, as will any symlink that\n * would affect the location of an extracted file.\n */\n unlink?: boolean\n\n /**\n * When extracting, strip the specified number of path portions from the\n * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be\n * extracted to `{cwd}/c/d`.\n *\n * Any entry whose entire path is stripped will be excluded.\n */\n strip?: number\n\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n newer?: boolean\n\n /**\n * When extracting, do not overwrite existing files at all.\n */\n keep?: boolean\n\n /**\n * When extracting, set the `uid` and `gid` of extracted entries to the `uid`\n * and `gid` fields in the archive. Defaults to true when run as root, and\n * false otherwise.\n *\n * If false, then files and directories will be set with the owner and group\n * of the user running the process. This is similar to `-p` in `tar(1)`, but\n * ACLs and other system-specific data is never unpacked in this\n * implementation, and modes are set by default already.\n */\n preserveOwner?: boolean\n\n /**\n * The maximum depth of subfolders to extract into. This defaults to 1024.\n * Anything deeper than the limit will raise a warning and skip the entry.\n * Set to `Infinity` to remove the limitation.\n */\n maxDepth?: number\n\n /**\n * When extracting, force all created files and directories, and all\n * implicitly created directories, to be owned by the specified user id,\n * regardless of the `uid` field in the archive.\n *\n * Cannot be used along with `preserveOwner`. Requires also setting the `gid`\n * option.\n */\n uid?: number\n\n /**\n * When extracting, force all created files and directories, and all\n * implicitly created directories, to be owned by the specified group id,\n * regardless of the `gid` field in the archive.\n *\n * Cannot be used along with `preserveOwner`. Requires also setting the `uid`\n * option.\n */\n gid?: number\n\n /**\n * When extracting, provide a function that takes an `entry` object, and\n * returns a stream, or any falsey value. If a stream is provided, then that\n * stream's data will be written instead of the contents of the archive\n * entry. If a falsey value is provided, then the entry is written to disk as\n * normal.\n *\n * To exclude items from extraction, use the `filter` option.\n *\n * Note that using an asynchronous stream type with the `transform` option\n * will cause undefined behavior in synchronous extractions.\n * [MiniPass](http://npm.im/minipass)-based streams are designed for this use\n * case.\n */\n transform?: (entry: ReadEntry) => any\n\n /**\n * Call `chmod()` to ensure that extracted files match the entry's mode\n * field. Without this field set, all mode fields in archive entries are a\n * best effort attempt only.\n *\n * Setting this necessitates a call to the deprecated `process.umask()`\n * method to determine the default umask value, unless a `processUmask`\n * config is provided as well.\n *\n * If not set, tar will attempt to create file system entries with whatever\n * mode is provided, and let the implicit process `umask` apply normally, but\n * if a file already exists to be written to, then its existing mode will not\n * be modified.\n *\n * When setting `chmod: true`, it is highly recommend to set the\n * {@link TarOptions#processUmask} option as well, to avoid the call to the\n * deprecated (and thread-unsafe) `process.umask()` method.\n */\n chmod?: boolean\n\n /**\n * When setting the {@link TarOptions#chmod} option to `true`, you may\n * provide a value here to avoid having to call the deprecated and\n * thread-unsafe `process.umask()` method.\n *\n * This has no effect with `chmod` is not set to true, as mode values are not\n * set explicitly anyway. If `chmod` is set to `true`, and a value is not\n * provided here, then `process.umask()` must be called, which will result in\n * deprecation warnings.\n *\n * The most common values for this are `0o22` (resulting in directories\n * created with mode `0o755` and files with `0o644` by default) and `0o2`\n * (resulting in directores created with mode `0o775` and files `0o664`, so\n * they are group-writable).\n */\n processUmask?: number\n\n //////////////////////////\n // archive creation options\n\n /**\n * When parsing/listing archives, `entry` streams are by default resumed\n * (set into \"flowing\" mode) immediately after the call to `onReadEntry()`.\n * Set `noResume: true` to suppress this behavior.\n *\n * Note that when this is set, the stream will never complete until the\n * data is consumed somehow.\n *\n * Set automatically in extract operations, since the entry is piped to\n * a file system entry right away. Only relevant when parsing.\n */\n noResume?: boolean\n\n /**\n * When creating, updating, or replacing within archives, this method will\n * be called with each WriteEntry that is created.\n */\n onWriteEntry?: (entry: WriteEntry) => any\n\n /**\n * When extracting or listing archives, this method will be called with\n * each entry that is not excluded by a `filter`.\n *\n * Important when listing archives synchronously from a file, because there\n * is otherwise no way to interact with the data!\n */\n onReadEntry?: (entry: ReadEntry) => any\n\n /**\n * Pack the targets of symbolic links rather than the link itself.\n */\n follow?: boolean\n\n /**\n * When creating archives, omit any metadata that is system-specific:\n * `ctime`, `atime`, `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and\n * `nlink`. Note that `mtime` is still included, because this is necessary\n * for other time-based operations such as `tar.update`. Additionally, `mode`\n * is set to a \"reasonable default\" for mose unix systems, based on an\n * effective `umask` of `0o22`.\n *\n * This also defaults the `portable` option in the gzip configs when creating\n * a compressed archive, in order to produce deterministic archives that are\n * not operating-system specific.\n */\n portable?: boolean\n\n /**\n * When creating archives, do not recursively archive the contents of\n * directories. By default, archiving a directory archives all of its\n * contents as well.\n */\n noDirRecurse?: boolean\n\n /**\n * Suppress Pax extended headers when creating archives. Note that this means\n * long paths and linkpaths will be truncated, and large or negative numeric\n * values may be interpreted incorrectly.\n */\n noPax?: boolean\n\n /**\n * Set to a `Date` object to force a specific `mtime` value for everything\n * written to an archive.\n *\n * This is useful when creating archives that are intended to be\n * deterministic based on their contents, irrespective of the file's last\n * modification time.\n *\n * Overridden by `noMtime`.\n */\n mtime?: Date\n\n /**\n * A path portion to prefix onto the entries added to an archive.\n */\n prefix?: string\n\n /**\n * The mode to set on any created file archive, defaults to 0o666\n * masked by the process umask, often resulting in 0o644.\n *\n * This does *not* affect the mode fields of individual entries, or the\n * mode status of extracted entries on the filesystem.\n */\n mode?: number\n\n //////////////////////////\n // internal options\n\n /**\n * A cache of mtime values, to avoid having to stat the same file repeatedly.\n *\n * @internal\n */\n mtimeCache?: Map\n\n /**\n * maximum buffer size for `fs.read()` operations.\n *\n * @internal\n */\n maxReadSize?: number\n\n /**\n * Filter modes of entries being unpacked, like `process.umask()`\n *\n * @internal\n */\n umask?: number\n\n /**\n * Default mode for directories. Used for all implicitly created directories,\n * and any directories in the archive that do not have a mode field.\n *\n * @internal\n */\n dmode?: number\n\n /**\n * default mode for files\n *\n * @internal\n */\n fmode?: number\n\n /**\n * Map that tracks which directories already exist, for extraction\n *\n * @internal\n */\n dirCache?: Map\n /**\n * maximum supported size of meta entries. Defaults to 1MB\n *\n * @internal\n */\n maxMetaEntrySize?: number\n\n /**\n * A Map object containing the device and inode value for any file whose\n * `nlink` value is greater than 1, to identify hard links when creating\n * archives.\n *\n * @internal\n */\n linkCache?: Map\n\n /**\n * A map object containing the results of `fs.readdir()` calls.\n *\n * @internal\n */\n readdirCache?: Map\n\n /**\n * A cache of all `lstat` results, for use in creating archives.\n *\n * @internal\n */\n statCache?: Map\n\n /**\n * Number of concurrent jobs to run when creating archives.\n *\n * Defaults to 4.\n *\n * @internal\n */\n jobs?: number\n\n /**\n * Automatically set to true on Windows systems.\n *\n * When extracting, causes behavior where filenames containing `<|>?:`\n * characters are converted to windows-compatible escape sequences in the\n * created filesystem entries.\n *\n * When packing, causes behavior where paths replace `\\` with `/`, and\n * filenames containing the windows-compatible escaped forms of `<|>?:` are\n * converted to actual `<|>?:` characters in the archive.\n *\n * @internal\n */\n win32?: boolean\n\n /**\n * For `WriteEntry` objects, the absolute path to the entry on the\n * filesystem. By default, this is `resolve(cwd, entry.path)`, but it can be\n * overridden explicitly.\n *\n * @internal\n */\n absolute?: string\n\n /**\n * Used with Parser stream interface, to attach and take over when the\n * stream is completely parsed. If this is set, then the prefinish,\n * finish, and end events will not fire, and are the responsibility of\n * the ondone method to emit properly.\n *\n * @internal\n */\n ondone?: () => void\n\n /**\n * Mostly for testing, but potentially useful in some cases.\n * Forcibly trigger a chown on every entry, no matter what.\n */\n forceChown?: boolean\n\n /**\n * ambiguous deprecated name for {@link onReadEntry}\n *\n * @deprecated\n */\n onentry?: (entry: ReadEntry) => any\n}\n\nexport type TarOptionsSync = TarOptions & { sync: true }\nexport type TarOptionsAsync = TarOptions & { sync?: false }\nexport type TarOptionsFile = TarOptions & { file: string }\nexport type TarOptionsNoFile = TarOptions & { file?: undefined }\nexport type TarOptionsSyncFile = TarOptionsSync & TarOptionsFile\nexport type TarOptionsAsyncFile = TarOptionsAsync & TarOptionsFile\nexport type TarOptionsSyncNoFile = TarOptionsSync & TarOptionsNoFile\nexport type TarOptionsAsyncNoFile = TarOptionsAsync & TarOptionsNoFile\n\nexport type LinkCacheKey = `${number}:${number}`\n\nexport interface TarOptionsWithAliases extends TarOptions {\n /**\n * The effective current working directory for this tar command\n */\n C?: TarOptions['cwd']\n /**\n * The tar file to be read and/or written. When this is set, a stream\n * is not returned. Asynchronous commands will return a promise indicating\n * when the operation is completed, and synchronous commands will return\n * immediately.\n */\n f?: TarOptions['file']\n /**\n * When creating a tar archive, this can be used to compress it as well.\n * Set to `true` to use the default gzip options, or customize them as\n * needed.\n *\n * When reading, if this is unset, then the compression status will be\n * inferred from the archive data. This is generally best, unless you are\n * sure of the compression settings in use to create the archive, and want to\n * fail if the archive doesn't match expectations.\n */\n z?: TarOptions['gzip']\n /**\n * When creating archives, preserve absolute and `..` paths in the archive,\n * rather than sanitizing them under the cwd.\n *\n * When extracting, allow absolute paths, paths containing `..`, and\n * extracting through symbolic links. By default, the root `/` is stripped\n * from absolute paths (eg, turning `/x/y/z` into `x/y/z`), paths containing\n * `..` are not extracted, and any file whose location would be modified by a\n * symbolic link is not extracted.\n *\n * **WARNING** This is almost always unsafe, and must NEVER be used on\n * archives from untrusted sources, such as user input, and every entry must\n * be validated to ensure it is safe to write. Even if the input is not\n * malicious, mistakes can cause a lot of damage!\n */\n P?: TarOptions['preservePaths']\n /**\n * When extracting, unlink files before creating them. Without this option,\n * tar overwrites existing files, which preserves existing hardlinks. With\n * this option, existing hardlinks will be broken, as will any symlink that\n * would affect the location of an extracted file.\n */\n U?: TarOptions['unlink']\n /**\n * When extracting, strip the specified number of path portions from the\n * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be\n * extracted to `{cwd}/c/d`.\n */\n 'strip-components'?: TarOptions['strip']\n /**\n * When extracting, strip the specified number of path portions from the\n * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be\n * extracted to `{cwd}/c/d`.\n */\n stripComponents?: TarOptions['strip']\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n 'keep-newer'?: TarOptions['newer']\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n keepNewer?: TarOptions['newer']\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n 'keep-newer-files'?: TarOptions['newer']\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n keepNewerFiles?: TarOptions['newer']\n /**\n * When extracting, do not overwrite existing files at all.\n */\n k?: TarOptions['keep']\n /**\n * When extracting, do not overwrite existing files at all.\n */\n 'keep-existing'?: TarOptions['keep']\n /**\n * When extracting, do not overwrite existing files at all.\n */\n keepExisting?: TarOptions['keep']\n /**\n * When extracting, do not set the `mtime` value for extracted entries to\n * match the `mtime` in the archive.\n *\n * When creating archives, do not store the `mtime` value in the entry. Note\n * that this prevents properly using other mtime-based features (such as\n * `tar.update` or the `newer` option) with the resulting archive.\n */\n m?: TarOptions['noMtime']\n /**\n * When extracting, do not set the `mtime` value for extracted entries to\n * match the `mtime` in the archive.\n *\n * When creating archives, do not store the `mtime` value in the entry. Note\n * that this prevents properly using other mtime-based features (such as\n * `tar.update` or the `newer` option) with the resulting archive.\n */\n 'no-mtime'?: TarOptions['noMtime']\n /**\n * When extracting, set the `uid` and `gid` of extracted entries to the `uid`\n * and `gid` fields in the archive. Defaults to true when run as root, and\n * false otherwise.\n *\n * If false, then files and directories will be set with the owner and group\n * of the user running the process. This is similar to `-p` in `tar(1)`, but\n * ACLs and other system-specific data is never unpacked in this\n * implementation, and modes are set by default already.\n */\n p?: TarOptions['preserveOwner']\n /**\n * Pack the targets of symbolic links rather than the link itself.\n */\n L?: TarOptions['follow']\n /**\n * Pack the targets of symbolic links rather than the link itself.\n */\n h?: TarOptions['follow']\n\n /**\n * Deprecated option. Set explicitly false to set `chmod: true`. Ignored\n * if {@link TarOptions#chmod} is set to any boolean value.\n *\n * @deprecated\n */\n noChmod?: boolean\n}\n\nexport type TarOptionsWithAliasesSync = TarOptionsWithAliases & {\n sync: true\n}\nexport type TarOptionsWithAliasesAsync = TarOptionsWithAliases & {\n sync?: false\n}\nexport type TarOptionsWithAliasesFile =\n | (TarOptionsWithAliases & {\n file: string\n })\n | (TarOptionsWithAliases & { f: string })\nexport type TarOptionsWithAliasesSyncFile =\n TarOptionsWithAliasesSync & TarOptionsWithAliasesFile\nexport type TarOptionsWithAliasesAsyncFile =\n TarOptionsWithAliasesAsync & TarOptionsWithAliasesFile\n\nexport type TarOptionsWithAliasesNoFile = TarOptionsWithAliases & {\n f?: undefined\n file?: undefined\n}\n\nexport type TarOptionsWithAliasesSyncNoFile =\n TarOptionsWithAliasesSync & TarOptionsWithAliasesNoFile\nexport type TarOptionsWithAliasesAsyncNoFile =\n TarOptionsWithAliasesAsync & TarOptionsWithAliasesNoFile\n\nexport const isSyncFile = (\n o: O,\n): o is O & TarOptionsSyncFile => !!o.sync && !!o.file\nexport const isAsyncFile = (\n o: O,\n): o is O & TarOptionsAsyncFile => !o.sync && !!o.file\nexport const isSyncNoFile = (\n o: O,\n): o is O & TarOptionsSyncNoFile => !!o.sync && !o.file\nexport const isAsyncNoFile = (\n o: O,\n): o is O & TarOptionsAsyncNoFile => !o.sync && !o.file\nexport const isSync = (\n o: O,\n): o is O & TarOptionsSync => !!o.sync\nexport const isAsync = (\n o: O,\n): o is O & TarOptionsAsync => !o.sync\nexport const isFile = (\n o: O,\n): o is O & TarOptionsFile => !!o.file\nexport const isNoFile = (\n o: O,\n): o is O & TarOptionsNoFile => !o.file\n\nconst dealiasKey = (\n k: keyof TarOptionsWithAliases,\n): keyof TarOptions => {\n const d = argmap.get(k)\n if (d) return d\n return k as keyof TarOptions\n}\n\nexport const dealias = (\n opt: TarOptionsWithAliases = {},\n): TarOptions => {\n if (!opt) return {}\n const result: Record = {}\n for (const [key, v] of Object.entries(opt) as [\n keyof TarOptionsWithAliases,\n any,\n ][]) {\n // TS doesn't know that aliases are going to always be the same type\n const k = dealiasKey(key)\n result[k] = v\n }\n // affordance for deprecated noChmod -> chmod\n if (result.chmod === undefined && result.noChmod === false) {\n result.chmod = true\n }\n delete result.noChmod\n return result as TarOptions\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/pack.d.ts b/node_modules/tar/dist/commonjs/pack.d.ts new file mode 100644 index 0000000..a3e0395 --- /dev/null +++ b/node_modules/tar/dist/commonjs/pack.d.ts @@ -0,0 +1,102 @@ +/// +/// +import { type Stats } from 'fs'; +import { WriteEntry, WriteEntrySync, WriteEntryTar } from './write-entry.js'; +export declare class PackJob { + path: string; + absolute: string; + entry?: WriteEntry | WriteEntryTar; + stat?: Stats; + readdir?: string[]; + pending: boolean; + ignore: boolean; + piped: boolean; + constructor(path: string, absolute: string); +} +import { Minipass } from 'minipass'; +import * as zlib from 'minizlib'; +import { Yallist } from 'yallist'; +import { ReadEntry } from './read-entry.js'; +import { WarnEvent, type WarnData, type Warner } from './warn-method.js'; +declare const ONSTAT: unique symbol; +declare const ENDED: unique symbol; +declare const QUEUE: unique symbol; +declare const CURRENT: unique symbol; +declare const PROCESS: unique symbol; +declare const PROCESSING: unique symbol; +declare const PROCESSJOB: unique symbol; +declare const JOBS: unique symbol; +declare const JOBDONE: unique symbol; +declare const ADDFSENTRY: unique symbol; +declare const ADDTARENTRY: unique symbol; +declare const STAT: unique symbol; +declare const READDIR: unique symbol; +declare const ONREADDIR: unique symbol; +declare const PIPE: unique symbol; +declare const ENTRY: unique symbol; +declare const ENTRYOPT: unique symbol; +declare const WRITEENTRYCLASS: unique symbol; +declare const WRITE: unique symbol; +declare const ONDRAIN: unique symbol; +import { TarOptions } from './options.js'; +export declare class Pack extends Minipass> implements Warner { + opt: TarOptions; + cwd: string; + maxReadSize?: number; + preservePaths: boolean; + strict: boolean; + noPax: boolean; + prefix: string; + linkCache: Exclude; + statCache: Exclude; + file: string; + portable: boolean; + zip?: zlib.BrotliCompress | zlib.Gzip; + readdirCache: Exclude; + noDirRecurse: boolean; + follow: boolean; + noMtime: boolean; + mtime?: Date; + filter: Exclude; + jobs: number; + [WRITEENTRYCLASS]: typeof WriteEntry | typeof WriteEntrySync; + onWriteEntry?: (entry: WriteEntry) => void; + [QUEUE]: Yallist; + [JOBS]: number; + [PROCESSING]: boolean; + [ENDED]: boolean; + constructor(opt?: TarOptions); + [WRITE](chunk: Buffer): boolean; + add(path: string | ReadEntry): this; + end(cb?: () => void): this; + end(path: string | ReadEntry, cb?: () => void): this; + end(path: string | ReadEntry, encoding?: Minipass.Encoding, cb?: () => void): this; + write(path: string | ReadEntry): boolean; + [ADDTARENTRY](p: ReadEntry): void; + [ADDFSENTRY](p: string): void; + [STAT](job: PackJob): void; + [ONSTAT](job: PackJob, stat: Stats): void; + [READDIR](job: PackJob): void; + [ONREADDIR](job: PackJob, entries: string[]): void; + [PROCESS](): void; + get [CURRENT](): PackJob | undefined; + [JOBDONE](_job: PackJob): void; + [PROCESSJOB](job: PackJob): void; + [ENTRYOPT](job: PackJob): TarOptions; + [ENTRY](job: PackJob): WriteEntry | undefined; + [ONDRAIN](): void; + [PIPE](job: PackJob): void; + pause(): void; + warn(code: string, message: string | Error, data?: WarnData): void; +} +export declare class PackSync extends Pack { + sync: true; + constructor(opt: TarOptions); + pause(): void; + resume(): void; + [STAT](job: PackJob): void; + [READDIR](job: PackJob): void; + [PIPE](job: PackJob): void; +} +export {}; +//# sourceMappingURL=pack.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/pack.d.ts.map b/node_modules/tar/dist/commonjs/pack.d.ts.map new file mode 100644 index 0000000..bc8e9f0 --- /dev/null +++ b/node_modules/tar/dist/commonjs/pack.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pack.d.ts","sourceRoot":"","sources":["../../src/pack.ts"],"names":[],"mappings":";;AASA,OAAW,EAAE,KAAK,KAAK,EAAE,MAAM,IAAI,CAAA;AACnC,OAAO,EACL,UAAU,EACV,cAAc,EACd,aAAa,EACd,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AE,OAAO;IAyDzB,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,OAAO,GAAG,UAAU;IAmBpC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,OAAO;IAepB,CAAC,OAAO,CAAC;IAOT,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,OAAO;IAgCnB,KAAK;IAML,IAAI,CACF,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GAAG,KAAK,EACvB,IAAI,GAAE,QAAa,GAClB,IAAI;CAGR;AAED,qBAAa,QAAS,SAAQ,IAAI;IAChC,IAAI,EAAE,IAAI,CAAO;gBACL,GAAG,EAAE,UAAU;IAM3B,KAAK;IACL,MAAM;IAEN,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,OAAO;IAKnB,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,OAAO;IAKtB,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,OAAO;CA0BpB"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/pack.js b/node_modules/tar/dist/commonjs/pack.js new file mode 100644 index 0000000..303e930 --- /dev/null +++ b/node_modules/tar/dist/commonjs/pack.js @@ -0,0 +1,477 @@ +"use strict"; +// A readable tar stream creator +// Technically, this is a transform stream that you write paths into, +// and tar format comes out of. +// The `add()` method is like `write()` but returns this, +// and end() return `this` as well, so you can +// do `new Pack(opt).add('files').add('dir').end().pipe(output) +// You could also do something like: +// streamOfPaths().pipe(new Pack()).pipe(new fs.WriteStream('out.tar')) +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PackSync = exports.Pack = exports.PackJob = void 0; +const fs_1 = __importDefault(require("fs")); +const write_entry_js_1 = require("./write-entry.js"); +class PackJob { + path; + absolute; + entry; + stat; + readdir; + pending = false; + ignore = false; + piped = false; + constructor(path, absolute) { + this.path = path || './'; + this.absolute = absolute; + } +} +exports.PackJob = PackJob; +const minipass_1 = require("minipass"); +const zlib = __importStar(require("minizlib")); +const yallist_1 = require("yallist"); +const read_entry_js_1 = require("./read-entry.js"); +const warn_method_js_1 = require("./warn-method.js"); +const EOF = Buffer.alloc(1024); +const ONSTAT = Symbol('onStat'); +const ENDED = Symbol('ended'); +const QUEUE = Symbol('queue'); +const CURRENT = Symbol('current'); +const PROCESS = Symbol('process'); +const PROCESSING = Symbol('processing'); +const PROCESSJOB = Symbol('processJob'); +const JOBS = Symbol('jobs'); +const JOBDONE = Symbol('jobDone'); +const ADDFSENTRY = Symbol('addFSEntry'); +const ADDTARENTRY = Symbol('addTarEntry'); +const STAT = Symbol('stat'); +const READDIR = Symbol('readdir'); +const ONREADDIR = Symbol('onreaddir'); +const PIPE = Symbol('pipe'); +const ENTRY = Symbol('entry'); +const ENTRYOPT = Symbol('entryOpt'); +const WRITEENTRYCLASS = Symbol('writeEntryClass'); +const WRITE = Symbol('write'); +const ONDRAIN = Symbol('ondrain'); +const path_1 = __importDefault(require("path")); +const normalize_windows_path_js_1 = require("./normalize-windows-path.js"); +class Pack extends minipass_1.Minipass { + opt; + cwd; + maxReadSize; + preservePaths; + strict; + noPax; + prefix; + linkCache; + statCache; + file; + portable; + zip; + readdirCache; + noDirRecurse; + follow; + noMtime; + mtime; + filter; + jobs; + [WRITEENTRYCLASS]; + onWriteEntry; + [QUEUE]; + [JOBS] = 0; + [PROCESSING] = false; + [ENDED] = false; + constructor(opt = {}) { + //@ts-ignore + super(); + this.opt = opt; + this.file = opt.file || ''; + this.cwd = opt.cwd || process.cwd(); + this.maxReadSize = opt.maxReadSize; + this.preservePaths = !!opt.preservePaths; + this.strict = !!opt.strict; + this.noPax = !!opt.noPax; + this.prefix = (0, normalize_windows_path_js_1.normalizeWindowsPath)(opt.prefix || ''); + this.linkCache = opt.linkCache || new Map(); + this.statCache = opt.statCache || new Map(); + this.readdirCache = opt.readdirCache || new Map(); + this.onWriteEntry = opt.onWriteEntry; + this[WRITEENTRYCLASS] = write_entry_js_1.WriteEntry; + if (typeof opt.onwarn === 'function') { + this.on('warn', opt.onwarn); + } + this.portable = !!opt.portable; + if (opt.gzip || opt.brotli) { + if (opt.gzip && opt.brotli) { + throw new TypeError('gzip and brotli are mutually exclusive'); + } + if (opt.gzip) { + if (typeof opt.gzip !== 'object') { + opt.gzip = {}; + } + if (this.portable) { + opt.gzip.portable = true; + } + this.zip = new zlib.Gzip(opt.gzip); + } + if (opt.brotli) { + if (typeof opt.brotli !== 'object') { + opt.brotli = {}; + } + this.zip = new zlib.BrotliCompress(opt.brotli); + } + /* c8 ignore next */ + if (!this.zip) + throw new Error('impossible'); + const zip = this.zip; + zip.on('data', chunk => super.write(chunk)); + zip.on('end', () => super.end()); + zip.on('drain', () => this[ONDRAIN]()); + this.on('resume', () => zip.resume()); + } + else { + this.on('drain', this[ONDRAIN]); + } + this.noDirRecurse = !!opt.noDirRecurse; + this.follow = !!opt.follow; + this.noMtime = !!opt.noMtime; + if (opt.mtime) + this.mtime = opt.mtime; + this.filter = + typeof opt.filter === 'function' ? opt.filter : () => true; + this[QUEUE] = new yallist_1.Yallist(); + this[JOBS] = 0; + this.jobs = Number(opt.jobs) || 4; + this[PROCESSING] = false; + this[ENDED] = false; + } + [WRITE](chunk) { + return super.write(chunk); + } + add(path) { + this.write(path); + return this; + } + end(path, encoding, cb) { + /* c8 ignore start */ + if (typeof path === 'function') { + cb = path; + path = undefined; + } + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + /* c8 ignore stop */ + if (path) { + this.add(path); + } + this[ENDED] = true; + this[PROCESS](); + /* c8 ignore next */ + if (cb) + cb(); + return this; + } + write(path) { + if (this[ENDED]) { + throw new Error('write after end'); + } + if (path instanceof read_entry_js_1.ReadEntry) { + this[ADDTARENTRY](path); + } + else { + this[ADDFSENTRY](path); + } + return this.flowing; + } + [ADDTARENTRY](p) { + const absolute = (0, normalize_windows_path_js_1.normalizeWindowsPath)(path_1.default.resolve(this.cwd, p.path)); + // in this case, we don't have to wait for the stat + if (!this.filter(p.path, p)) { + p.resume(); + } + else { + const job = new PackJob(p.path, absolute); + job.entry = new write_entry_js_1.WriteEntryTar(p, this[ENTRYOPT](job)); + job.entry.on('end', () => this[JOBDONE](job)); + this[JOBS] += 1; + this[QUEUE].push(job); + } + this[PROCESS](); + } + [ADDFSENTRY](p) { + const absolute = (0, normalize_windows_path_js_1.normalizeWindowsPath)(path_1.default.resolve(this.cwd, p)); + this[QUEUE].push(new PackJob(p, absolute)); + this[PROCESS](); + } + [STAT](job) { + job.pending = true; + this[JOBS] += 1; + const stat = this.follow ? 'stat' : 'lstat'; + fs_1.default[stat](job.absolute, (er, stat) => { + job.pending = false; + this[JOBS] -= 1; + if (er) { + this.emit('error', er); + } + else { + this[ONSTAT](job, stat); + } + }); + } + [ONSTAT](job, stat) { + this.statCache.set(job.absolute, stat); + job.stat = stat; + // now we have the stat, we can filter it. + if (!this.filter(job.path, stat)) { + job.ignore = true; + } + this[PROCESS](); + } + [READDIR](job) { + job.pending = true; + this[JOBS] += 1; + fs_1.default.readdir(job.absolute, (er, entries) => { + job.pending = false; + this[JOBS] -= 1; + if (er) { + return this.emit('error', er); + } + this[ONREADDIR](job, entries); + }); + } + [ONREADDIR](job, entries) { + this.readdirCache.set(job.absolute, entries); + job.readdir = entries; + this[PROCESS](); + } + [PROCESS]() { + if (this[PROCESSING]) { + return; + } + this[PROCESSING] = true; + for (let w = this[QUEUE].head; !!w && this[JOBS] < this.jobs; w = w.next) { + this[PROCESSJOB](w.value); + if (w.value.ignore) { + const p = w.next; + this[QUEUE].removeNode(w); + w.next = p; + } + } + this[PROCESSING] = false; + if (this[ENDED] && !this[QUEUE].length && this[JOBS] === 0) { + if (this.zip) { + this.zip.end(EOF); + } + else { + super.write(EOF); + super.end(); + } + } + } + get [CURRENT]() { + return this[QUEUE] && this[QUEUE].head && this[QUEUE].head.value; + } + [JOBDONE](_job) { + this[QUEUE].shift(); + this[JOBS] -= 1; + this[PROCESS](); + } + [PROCESSJOB](job) { + if (job.pending) { + return; + } + if (job.entry) { + if (job === this[CURRENT] && !job.piped) { + this[PIPE](job); + } + return; + } + if (!job.stat) { + const sc = this.statCache.get(job.absolute); + if (sc) { + this[ONSTAT](job, sc); + } + else { + this[STAT](job); + } + } + if (!job.stat) { + return; + } + // filtered out! + if (job.ignore) { + return; + } + if (!this.noDirRecurse && + job.stat.isDirectory() && + !job.readdir) { + const rc = this.readdirCache.get(job.absolute); + if (rc) { + this[ONREADDIR](job, rc); + } + else { + this[READDIR](job); + } + if (!job.readdir) { + return; + } + } + // we know it doesn't have an entry, because that got checked above + job.entry = this[ENTRY](job); + if (!job.entry) { + job.ignore = true; + return; + } + if (job === this[CURRENT] && !job.piped) { + this[PIPE](job); + } + } + [ENTRYOPT](job) { + return { + onwarn: (code, msg, data) => this.warn(code, msg, data), + noPax: this.noPax, + cwd: this.cwd, + absolute: job.absolute, + preservePaths: this.preservePaths, + maxReadSize: this.maxReadSize, + strict: this.strict, + portable: this.portable, + linkCache: this.linkCache, + statCache: this.statCache, + noMtime: this.noMtime, + mtime: this.mtime, + prefix: this.prefix, + onWriteEntry: this.onWriteEntry, + }; + } + [ENTRY](job) { + this[JOBS] += 1; + try { + const e = new this[WRITEENTRYCLASS](job.path, this[ENTRYOPT](job)); + return e + .on('end', () => this[JOBDONE](job)) + .on('error', er => this.emit('error', er)); + } + catch (er) { + this.emit('error', er); + } + } + [ONDRAIN]() { + if (this[CURRENT] && this[CURRENT].entry) { + this[CURRENT].entry.resume(); + } + } + // like .pipe() but using super, because our write() is special + [PIPE](job) { + job.piped = true; + if (job.readdir) { + job.readdir.forEach(entry => { + const p = job.path; + const base = p === './' ? '' : p.replace(/\/*$/, '/'); + this[ADDFSENTRY](base + entry); + }); + } + const source = job.entry; + const zip = this.zip; + /* c8 ignore start */ + if (!source) + throw new Error('cannot pipe without source'); + /* c8 ignore stop */ + if (zip) { + source.on('data', chunk => { + if (!zip.write(chunk)) { + source.pause(); + } + }); + } + else { + source.on('data', chunk => { + if (!super.write(chunk)) { + source.pause(); + } + }); + } + } + pause() { + if (this.zip) { + this.zip.pause(); + } + return super.pause(); + } + warn(code, message, data = {}) { + (0, warn_method_js_1.warnMethod)(this, code, message, data); + } +} +exports.Pack = Pack; +class PackSync extends Pack { + sync = true; + constructor(opt) { + super(opt); + this[WRITEENTRYCLASS] = write_entry_js_1.WriteEntrySync; + } + // pause/resume are no-ops in sync streams. + pause() { } + resume() { } + [STAT](job) { + const stat = this.follow ? 'statSync' : 'lstatSync'; + this[ONSTAT](job, fs_1.default[stat](job.absolute)); + } + [READDIR](job) { + this[ONREADDIR](job, fs_1.default.readdirSync(job.absolute)); + } + // gotta get it all in this tick + [PIPE](job) { + const source = job.entry; + const zip = this.zip; + if (job.readdir) { + job.readdir.forEach(entry => { + const p = job.path; + const base = p === './' ? '' : p.replace(/\/*$/, '/'); + this[ADDFSENTRY](base + entry); + }); + } + /* c8 ignore start */ + if (!source) + throw new Error('Cannot pipe without source'); + /* c8 ignore stop */ + if (zip) { + source.on('data', chunk => { + zip.write(chunk); + }); + } + else { + source.on('data', chunk => { + super[WRITE](chunk); + }); + } + } +} +exports.PackSync = PackSync; +//# sourceMappingURL=pack.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/pack.js.map b/node_modules/tar/dist/commonjs/pack.js.map new file mode 100644 index 0000000..b17f28d --- /dev/null +++ b/node_modules/tar/dist/commonjs/pack.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pack.js","sourceRoot":"","sources":["../../src/pack.ts"],"names":[],"mappings":";AAAA,gCAAgC;AAChC,qEAAqE;AACrE,+BAA+B;AAC/B,yDAAyD;AACzD,8CAA8C;AAC9C,+DAA+D;AAC/D,oCAAoC;AACpC,uEAAuE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEvE,4CAAmC;AACnC,qDAIyB;AAEzB,MAAa,OAAO;IAClB,IAAI,CAAQ;IACZ,QAAQ,CAAQ;IAChB,KAAK,CAA6B;IAClC,IAAI,CAAQ;IACZ,OAAO,CAAW;IAClB,OAAO,GAAY,KAAK,CAAA;IACxB,MAAM,GAAY,KAAK,CAAA;IACvB,KAAK,GAAY,KAAK,CAAA;IACtB,YAAY,IAAY,EAAE,QAAgB;QACxC,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,IAAI,CAAA;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;CACF;AAbD,0BAaC;AAED,uCAAmC;AACnC,+CAAgC;AAChC,qCAAiC;AACjC,mDAA2C;AAC3C,qDAKyB;AAEzB,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AAC9B,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC/B,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;AAC7B,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;AAC7B,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;AACjC,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;AACjC,MAAM,UAA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C,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;gBACrD,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAA;YAChC,CAAC,CAAC,CAAA;QACJ,CAAC;QAED,qBAAqB;QACrB,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;QAC1D,oBAAoB;QAEpB,IAAI,GAAG,EAAE,CAAC;YACR,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE;gBACxB,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;YAClB,CAAC,CAAC,CAAA;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE;gBACxB,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAA;YACrB,CAAC,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;CACF;AA/CD,4BA+CC","sourcesContent":["// A readable tar stream creator\n// Technically, this is a transform stream that you write paths into,\n// and tar format comes out of.\n// The `add()` method is like `write()` but returns this,\n// and end() return `this` as well, so you can\n// do `new Pack(opt).add('files').add('dir').end().pipe(output)\n// You could also do something like:\n// streamOfPaths().pipe(new Pack()).pipe(new fs.WriteStream('out.tar'))\n\nimport fs, { type Stats } from 'fs'\nimport {\n WriteEntry,\n WriteEntrySync,\n WriteEntryTar,\n} from './write-entry.js'\n\nexport class PackJob {\n path: string\n absolute: string\n entry?: WriteEntry | WriteEntryTar\n stat?: Stats\n readdir?: string[]\n pending: boolean = false\n ignore: boolean = false\n piped: boolean = false\n constructor(path: string, absolute: string) {\n this.path = path || './'\n this.absolute = absolute\n }\n}\n\nimport { Minipass } from 'minipass'\nimport * as zlib from 'minizlib'\nimport { Yallist } from 'yallist'\nimport { ReadEntry } from './read-entry.js'\nimport {\n WarnEvent,\n warnMethod,\n type WarnData,\n type Warner,\n} from './warn-method.js'\n\nconst EOF = Buffer.alloc(1024)\nconst ONSTAT = Symbol('onStat')\nconst ENDED = Symbol('ended')\nconst QUEUE = Symbol('queue')\nconst CURRENT = Symbol('current')\nconst PROCESS = Symbol('process')\nconst PROCESSING = Symbol('processing')\nconst PROCESSJOB = Symbol('processJob')\nconst JOBS = Symbol('jobs')\nconst JOBDONE = Symbol('jobDone')\nconst ADDFSENTRY = Symbol('addFSEntry')\nconst ADDTARENTRY = Symbol('addTarEntry')\nconst STAT = Symbol('stat')\nconst READDIR = Symbol('readdir')\nconst ONREADDIR = Symbol('onreaddir')\nconst PIPE = Symbol('pipe')\nconst ENTRY = Symbol('entry')\nconst ENTRYOPT = Symbol('entryOpt')\nconst WRITEENTRYCLASS = Symbol('writeEntryClass')\nconst WRITE = Symbol('write')\nconst ONDRAIN = Symbol('ondrain')\n\nimport path from 'path'\nimport { normalizeWindowsPath } from './normalize-windows-path.js'\nimport { TarOptions } from './options.js'\n\nexport class Pack\n extends Minipass>\n implements Warner\n{\n opt: TarOptions\n cwd: string\n maxReadSize?: number\n preservePaths: boolean\n strict: boolean\n noPax: boolean\n prefix: string\n linkCache: Exclude\n statCache: Exclude\n file: string\n portable: boolean\n zip?: zlib.BrotliCompress | zlib.Gzip\n readdirCache: Exclude\n noDirRecurse: boolean\n follow: boolean\n noMtime: boolean\n mtime?: Date\n filter: Exclude\n jobs: number;\n\n [WRITEENTRYCLASS]: typeof WriteEntry | typeof WriteEntrySync\n onWriteEntry?: (entry: WriteEntry) => void;\n [QUEUE]: Yallist;\n [JOBS]: number = 0;\n [PROCESSING]: boolean = false;\n [ENDED]: boolean = false\n\n constructor(opt: TarOptions = {}) {\n //@ts-ignore\n super()\n this.opt = opt\n this.file = opt.file || ''\n this.cwd = opt.cwd || process.cwd()\n this.maxReadSize = opt.maxReadSize\n this.preservePaths = !!opt.preservePaths\n this.strict = !!opt.strict\n this.noPax = !!opt.noPax\n this.prefix = normalizeWindowsPath(opt.prefix || '')\n this.linkCache = opt.linkCache || new Map()\n this.statCache = opt.statCache || new Map()\n this.readdirCache = opt.readdirCache || new Map()\n this.onWriteEntry = opt.onWriteEntry\n\n this[WRITEENTRYCLASS] = WriteEntry\n if (typeof opt.onwarn === 'function') {\n this.on('warn', opt.onwarn)\n }\n\n this.portable = !!opt.portable\n\n if (opt.gzip || opt.brotli) {\n if (opt.gzip && opt.brotli) {\n throw new TypeError('gzip and brotli are mutually exclusive')\n }\n if (opt.gzip) {\n if (typeof opt.gzip !== 'object') {\n opt.gzip = {}\n }\n if (this.portable) {\n opt.gzip.portable = true\n }\n this.zip = new zlib.Gzip(opt.gzip)\n }\n if (opt.brotli) {\n if (typeof opt.brotli !== 'object') {\n opt.brotli = {}\n }\n this.zip = new zlib.BrotliCompress(opt.brotli)\n }\n /* c8 ignore next */\n if (!this.zip) throw new Error('impossible')\n const zip = this.zip\n zip.on('data', chunk => super.write(chunk as unknown as string))\n zip.on('end', () => super.end())\n zip.on('drain', () => this[ONDRAIN]())\n this.on('resume', () => zip.resume())\n } else {\n this.on('drain', this[ONDRAIN])\n }\n\n this.noDirRecurse = !!opt.noDirRecurse\n this.follow = !!opt.follow\n this.noMtime = !!opt.noMtime\n if (opt.mtime) this.mtime = opt.mtime\n\n this.filter =\n typeof opt.filter === 'function' ? opt.filter : () => true\n\n this[QUEUE] = new Yallist()\n this[JOBS] = 0\n this.jobs = Number(opt.jobs) || 4\n this[PROCESSING] = false\n this[ENDED] = false\n }\n\n [WRITE](chunk: Buffer) {\n return super.write(chunk as unknown as string)\n }\n\n add(path: string | ReadEntry) {\n this.write(path)\n return this\n }\n\n end(cb?: () => void): this\n end(path: string | ReadEntry, cb?: () => void): this\n end(\n path: string | ReadEntry,\n encoding?: Minipass.Encoding,\n cb?: () => void,\n ): this\n end(\n path?: string | ReadEntry | (() => void),\n encoding?: Minipass.Encoding | (() => void),\n cb?: () => void,\n ) {\n /* c8 ignore start */\n if (typeof path === 'function') {\n cb = path\n path = undefined\n }\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n /* c8 ignore stop */\n if (path) {\n this.add(path)\n }\n this[ENDED] = true\n this[PROCESS]()\n /* c8 ignore next */\n if (cb) cb()\n return this\n }\n\n write(path: string | ReadEntry) {\n if (this[ENDED]) {\n throw new Error('write after end')\n }\n\n if (path instanceof ReadEntry) {\n this[ADDTARENTRY](path)\n } else {\n this[ADDFSENTRY](path)\n }\n return this.flowing\n }\n\n [ADDTARENTRY](p: ReadEntry) {\n const absolute = normalizeWindowsPath(\n path.resolve(this.cwd, p.path),\n )\n // in this case, we don't have to wait for the stat\n if (!this.filter(p.path, p)) {\n p.resume()\n } else {\n const job = new PackJob(p.path, absolute)\n job.entry = new WriteEntryTar(p, this[ENTRYOPT](job))\n job.entry.on('end', () => this[JOBDONE](job))\n this[JOBS] += 1\n this[QUEUE].push(job)\n }\n\n this[PROCESS]()\n }\n\n [ADDFSENTRY](p: string) {\n const absolute = normalizeWindowsPath(path.resolve(this.cwd, p))\n this[QUEUE].push(new PackJob(p, absolute))\n this[PROCESS]()\n }\n\n [STAT](job: PackJob) {\n job.pending = true\n this[JOBS] += 1\n const stat = this.follow ? 'stat' : 'lstat'\n fs[stat](job.absolute, (er, stat) => {\n job.pending = false\n this[JOBS] -= 1\n if (er) {\n this.emit('error', er)\n } else {\n this[ONSTAT](job, stat)\n }\n })\n }\n\n [ONSTAT](job: PackJob, stat: Stats) {\n this.statCache.set(job.absolute, stat)\n job.stat = stat\n\n // now we have the stat, we can filter it.\n if (!this.filter(job.path, stat)) {\n job.ignore = true\n }\n\n this[PROCESS]()\n }\n\n [READDIR](job: PackJob) {\n job.pending = true\n this[JOBS] += 1\n fs.readdir(job.absolute, (er, entries) => {\n job.pending = false\n this[JOBS] -= 1\n if (er) {\n return this.emit('error', er)\n }\n this[ONREADDIR](job, entries)\n })\n }\n\n [ONREADDIR](job: PackJob, entries: string[]) {\n this.readdirCache.set(job.absolute, entries)\n job.readdir = entries\n this[PROCESS]()\n }\n\n [PROCESS]() {\n if (this[PROCESSING]) {\n return\n }\n\n this[PROCESSING] = true\n for (\n let w = this[QUEUE].head;\n !!w && this[JOBS] < this.jobs;\n w = w.next\n ) {\n this[PROCESSJOB](w.value)\n if (w.value.ignore) {\n const p = w.next\n this[QUEUE].removeNode(w)\n w.next = p\n }\n }\n\n this[PROCESSING] = false\n\n if (this[ENDED] && !this[QUEUE].length && this[JOBS] === 0) {\n if (this.zip) {\n this.zip.end(EOF)\n } else {\n super.write(EOF as unknown as string)\n super.end()\n }\n }\n }\n\n get [CURRENT]() {\n return this[QUEUE] && this[QUEUE].head && this[QUEUE].head.value\n }\n\n [JOBDONE](_job: PackJob) {\n this[QUEUE].shift()\n this[JOBS] -= 1\n this[PROCESS]()\n }\n\n [PROCESSJOB](job: PackJob) {\n if (job.pending) {\n return\n }\n\n if (job.entry) {\n if (job === this[CURRENT] && !job.piped) {\n this[PIPE](job)\n }\n return\n }\n\n if (!job.stat) {\n const sc = this.statCache.get(job.absolute)\n if (sc) {\n this[ONSTAT](job, sc)\n } else {\n this[STAT](job)\n }\n }\n if (!job.stat) {\n return\n }\n\n // filtered out!\n if (job.ignore) {\n return\n }\n\n if (\n !this.noDirRecurse &&\n job.stat.isDirectory() &&\n !job.readdir\n ) {\n const rc = this.readdirCache.get(job.absolute)\n if (rc) {\n this[ONREADDIR](job, rc)\n } else {\n this[READDIR](job)\n }\n if (!job.readdir) {\n return\n }\n }\n\n // we know it doesn't have an entry, because that got checked above\n job.entry = this[ENTRY](job)\n if (!job.entry) {\n job.ignore = true\n return\n }\n\n if (job === this[CURRENT] && !job.piped) {\n this[PIPE](job)\n }\n }\n\n [ENTRYOPT](job: PackJob): TarOptions {\n return {\n onwarn: (code, msg, data) => this.warn(code, msg, data),\n noPax: this.noPax,\n cwd: this.cwd,\n absolute: job.absolute,\n preservePaths: this.preservePaths,\n maxReadSize: this.maxReadSize,\n strict: this.strict,\n portable: this.portable,\n linkCache: this.linkCache,\n statCache: this.statCache,\n noMtime: this.noMtime,\n mtime: this.mtime,\n prefix: this.prefix,\n onWriteEntry: this.onWriteEntry,\n }\n }\n\n [ENTRY](job: PackJob) {\n this[JOBS] += 1\n try {\n const e = new this[WRITEENTRYCLASS](\n job.path,\n this[ENTRYOPT](job),\n )\n return e\n .on('end', () => this[JOBDONE](job))\n .on('error', er => this.emit('error', er))\n } catch (er) {\n this.emit('error', er)\n }\n }\n\n [ONDRAIN]() {\n if (this[CURRENT] && this[CURRENT].entry) {\n this[CURRENT].entry.resume()\n }\n }\n\n // like .pipe() but using super, because our write() is special\n [PIPE](job: PackJob) {\n job.piped = true\n\n if (job.readdir) {\n job.readdir.forEach(entry => {\n const p = job.path\n const base = p === './' ? '' : p.replace(/\\/*$/, '/')\n this[ADDFSENTRY](base + entry)\n })\n }\n\n const source = job.entry\n const zip = this.zip\n /* c8 ignore start */\n if (!source) throw new Error('cannot pipe without source')\n /* c8 ignore stop */\n\n if (zip) {\n source.on('data', chunk => {\n if (!zip.write(chunk)) {\n source.pause()\n }\n })\n } else {\n source.on('data', chunk => {\n if (!super.write(chunk as unknown as string)) {\n source.pause()\n }\n })\n }\n }\n\n pause() {\n if (this.zip) {\n this.zip.pause()\n }\n return super.pause()\n }\n warn(\n code: string,\n message: string | Error,\n data: WarnData = {},\n ): void {\n warnMethod(this, code, message, data)\n }\n}\n\nexport class PackSync extends Pack {\n sync: true = true\n constructor(opt: TarOptions) {\n super(opt)\n this[WRITEENTRYCLASS] = WriteEntrySync\n }\n\n // pause/resume are no-ops in sync streams.\n pause() {}\n resume() {}\n\n [STAT](job: PackJob) {\n const stat = this.follow ? 'statSync' : 'lstatSync'\n this[ONSTAT](job, fs[stat](job.absolute))\n }\n\n [READDIR](job: PackJob) {\n this[ONREADDIR](job, fs.readdirSync(job.absolute))\n }\n\n // gotta get it all in this tick\n [PIPE](job: PackJob) {\n const source = job.entry\n const zip = this.zip\n\n if (job.readdir) {\n job.readdir.forEach(entry => {\n const p = job.path\n const base = p === './' ? '' : p.replace(/\\/*$/, '/')\n this[ADDFSENTRY](base + entry)\n })\n }\n\n /* c8 ignore start */\n if (!source) throw new Error('Cannot pipe without source')\n /* c8 ignore stop */\n\n if (zip) {\n source.on('data', chunk => {\n zip.write(chunk)\n })\n } else {\n source.on('data', chunk => {\n super[WRITE](chunk)\n })\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/package.json b/node_modules/tar/dist/commonjs/package.json new file mode 100644 index 0000000..5bbefff --- /dev/null +++ b/node_modules/tar/dist/commonjs/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/node_modules/tar/dist/commonjs/parse.d.ts b/node_modules/tar/dist/commonjs/parse.d.ts new file mode 100644 index 0000000..b747ae8 --- /dev/null +++ b/node_modules/tar/dist/commonjs/parse.d.ts @@ -0,0 +1,87 @@ +/// +/// +import { EventEmitter as EE } from 'events'; +import { BrotliDecompress, Unzip } from 'minizlib'; +import { Yallist } from 'yallist'; +import { TarOptions } from './options.js'; +import { Pax } from './pax.js'; +import { ReadEntry } from './read-entry.js'; +import { type WarnData, type Warner } from './warn-method.js'; +declare const STATE: unique symbol; +declare const WRITEENTRY: unique symbol; +declare const READENTRY: unique symbol; +declare const NEXTENTRY: unique symbol; +declare const PROCESSENTRY: unique symbol; +declare const EX: unique symbol; +declare const GEX: unique symbol; +declare const META: unique symbol; +declare const EMITMETA: unique symbol; +declare const BUFFER: unique symbol; +declare const QUEUE: unique symbol; +declare const ENDED: unique symbol; +declare const EMITTEDEND: unique symbol; +declare const EMIT: unique symbol; +declare const UNZIP: unique symbol; +declare const CONSUMECHUNK: unique symbol; +declare const CONSUMECHUNKSUB: unique symbol; +declare const CONSUMEBODY: unique symbol; +declare const CONSUMEMETA: unique symbol; +declare const CONSUMEHEADER: unique symbol; +declare const CONSUMING: unique symbol; +declare const BUFFERCONCAT: unique symbol; +declare const MAYBEEND: unique symbol; +declare const WRITING: unique symbol; +declare const ABORTED: unique symbol; +declare const SAW_VALID_ENTRY: unique symbol; +declare const SAW_NULL_BLOCK: unique symbol; +declare const SAW_EOF: unique symbol; +declare const CLOSESTREAM: unique symbol; +export type State = 'begin' | 'header' | 'ignore' | 'meta' | 'body'; +export declare class Parser extends EE implements Warner { + file: string; + strict: boolean; + maxMetaEntrySize: number; + filter: Exclude; + brotli?: TarOptions['brotli']; + writable: true; + readable: false; + [QUEUE]: Yallist; + [BUFFER]?: Buffer; + [READENTRY]?: ReadEntry; + [WRITEENTRY]?: ReadEntry; + [STATE]: State; + [META]: string; + [EX]?: Pax; + [GEX]?: Pax; + [ENDED]: boolean; + [UNZIP]?: false | Unzip | BrotliDecompress; + [ABORTED]: boolean; + [SAW_VALID_ENTRY]?: boolean; + [SAW_NULL_BLOCK]: boolean; + [SAW_EOF]: boolean; + [WRITING]: boolean; + [CONSUMING]: boolean; + [EMITTEDEND]: boolean; + constructor(opt?: TarOptions); + warn(code: string, message: string | Error, data?: WarnData): void; + [CONSUMEHEADER](chunk: Buffer, position: number): void; + [CLOSESTREAM](): void; + [PROCESSENTRY](entry?: ReadEntry | [string | symbol, any, any]): boolean; + [NEXTENTRY](): void; + [CONSUMEBODY](chunk: Buffer, position: number): number; + [CONSUMEMETA](chunk: Buffer, position: number): number; + [EMIT](ev: string | symbol, data?: any, extra?: any): void; + [EMITMETA](entry: ReadEntry): void; + abort(error: Error): void; + write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; + write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean; + [BUFFERCONCAT](c: Buffer): void; + [MAYBEEND](): void; + [CONSUMECHUNK](chunk?: Buffer): void; + [CONSUMECHUNKSUB](chunk: Buffer): void; + end(cb?: () => void): this; + end(data: string | Buffer, cb?: () => void): this; + end(str: string, encoding?: BufferEncoding, cb?: () => void): this; +} +export {}; +//# sourceMappingURL=parse.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/parse.d.ts.map b/node_modules/tar/dist/commonjs/parse.d.ts.map new file mode 100644 index 0000000..7d8ff6b --- /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AAU,GAAG,MAAM,EAC3B,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,KAAK,IAAI,GAChC,OAAO;IACV,KAAK,CACH,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,cAAc,EACzB,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,KAAK,IAAI,GAChC,OAAO;IA6HV,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,MAAM;IAOxB,CAAC,QAAQ,CAAC;IA0BV,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,EAAE,MAAM;IAkC7B,CAAC,eAAe,CAAC,CAAC,KAAK,EAAE,MAAM;IA6C/B,GAAG,CAAC,EAAE,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;IAC1B,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;IACjD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,cAAc,EAAE,EAAE,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;CAmCnE"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/parse.js b/node_modules/tar/dist/commonjs/parse.js new file mode 100644 index 0000000..9746a25 --- /dev/null +++ b/node_modules/tar/dist/commonjs/parse.js @@ -0,0 +1,599 @@ +"use strict"; +// this[BUFFER] is the remainder of a chunk if we're waiting for +// the full 512 bytes of a header to come in. We will Buffer.concat() +// it to the next write(), which is a mem copy, but a small one. +// +// this[QUEUE] is a Yallist of entries that haven't been emitted +// yet this can only get filled up if the user keeps write()ing after +// a write() returns false, or does a write() with more than one entry +// +// We don't buffer chunks, we always parse them and either create an +// entry, or push it into the active entry. The ReadEntry class knows +// to throw data away if .ignore=true +// +// Shift entry off the buffer when it emits 'end', and emit 'entry' for +// the next one in the list. +// +// At any time, we're pushing body chunks into the entry at WRITEENTRY, +// and waiting for 'end' on the entry at READENTRY +// +// ignored entries get .resume() called on them straight away +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Parser = void 0; +const events_1 = require("events"); +const minizlib_1 = require("minizlib"); +const yallist_1 = require("yallist"); +const header_js_1 = require("./header.js"); +const pax_js_1 = require("./pax.js"); +const read_entry_js_1 = require("./read-entry.js"); +const warn_method_js_1 = require("./warn-method.js"); +const maxMetaEntrySize = 1024 * 1024; +const gzipHeader = Buffer.from([0x1f, 0x8b]); +const STATE = Symbol('state'); +const WRITEENTRY = Symbol('writeEntry'); +const READENTRY = Symbol('readEntry'); +const NEXTENTRY = Symbol('nextEntry'); +const PROCESSENTRY = Symbol('processEntry'); +const EX = Symbol('extendedHeader'); +const GEX = Symbol('globalExtendedHeader'); +const META = Symbol('meta'); +const EMITMETA = Symbol('emitMeta'); +const BUFFER = Symbol('buffer'); +const QUEUE = Symbol('queue'); +const ENDED = Symbol('ended'); +const EMITTEDEND = Symbol('emittedEnd'); +const EMIT = Symbol('emit'); +const UNZIP = Symbol('unzip'); +const CONSUMECHUNK = Symbol('consumeChunk'); +const CONSUMECHUNKSUB = Symbol('consumeChunkSub'); +const CONSUMEBODY = Symbol('consumeBody'); +const CONSUMEMETA = Symbol('consumeMeta'); +const CONSUMEHEADER = Symbol('consumeHeader'); +const CONSUMING = Symbol('consuming'); +const BUFFERCONCAT = Symbol('bufferConcat'); +const MAYBEEND = Symbol('maybeEnd'); +const WRITING = Symbol('writing'); +const ABORTED = Symbol('aborted'); +const DONE = Symbol('onDone'); +const SAW_VALID_ENTRY = Symbol('sawValidEntry'); +const SAW_NULL_BLOCK = Symbol('sawNullBlock'); +const SAW_EOF = Symbol('sawEOF'); +const CLOSESTREAM = Symbol('closeStream'); +const noop = () => true; +class Parser extends events_1.EventEmitter { + file; + strict; + maxMetaEntrySize; + filter; + brotli; + writable = true; + readable = false; + [QUEUE] = new yallist_1.Yallist(); + [BUFFER]; + [READENTRY]; + [WRITEENTRY]; + [STATE] = 'begin'; + [META] = ''; + [EX]; + [GEX]; + [ENDED] = false; + [UNZIP]; + [ABORTED] = false; + [SAW_VALID_ENTRY]; + [SAW_NULL_BLOCK] = false; + [SAW_EOF] = false; + [WRITING] = false; + [CONSUMING] = false; + [EMITTEDEND] = false; + constructor(opt = {}) { + super(); + this.file = opt.file || ''; + // these BADARCHIVE errors can't be detected early. listen on DONE. + this.on(DONE, () => { + if (this[STATE] === 'begin' || + this[SAW_VALID_ENTRY] === false) { + // either less than 1 block of data, or all entries were invalid. + // Either way, probably not even a tarball. + this.warn('TAR_BAD_ARCHIVE', 'Unrecognized archive format'); + } + }); + if (opt.ondone) { + this.on(DONE, opt.ondone); + } + else { + this.on(DONE, () => { + this.emit('prefinish'); + this.emit('finish'); + this.emit('end'); + }); + } + this.strict = !!opt.strict; + this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize; + this.filter = typeof opt.filter === 'function' ? opt.filter : noop; + // Unlike gzip, brotli doesn't have any magic bytes to identify it + // Users need to explicitly tell us they're extracting a brotli file + // Or we infer from the file extension + const isTBR = opt.file && + (opt.file.endsWith('.tar.br') || opt.file.endsWith('.tbr')); + // if it's a tbr file it MIGHT be brotli, but we don't know until + // we look at it and verify it's not a valid tar file. + this.brotli = + !opt.gzip && opt.brotli !== undefined ? opt.brotli + : isTBR ? undefined + : false; + // have to set this so that streams are ok piping into it + this.on('end', () => this[CLOSESTREAM]()); + if (typeof opt.onwarn === 'function') { + this.on('warn', opt.onwarn); + } + if (typeof opt.onReadEntry === 'function') { + this.on('entry', opt.onReadEntry); + } + } + warn(code, message, data = {}) { + (0, warn_method_js_1.warnMethod)(this, code, message, data); + } + [CONSUMEHEADER](chunk, position) { + if (this[SAW_VALID_ENTRY] === undefined) { + this[SAW_VALID_ENTRY] = false; + } + let header; + try { + header = new header_js_1.Header(chunk, position, this[EX], this[GEX]); + } + catch (er) { + return this.warn('TAR_ENTRY_INVALID', er); + } + if (header.nullBlock) { + if (this[SAW_NULL_BLOCK]) { + this[SAW_EOF] = true; + // ending an archive with no entries. pointless, but legal. + if (this[STATE] === 'begin') { + this[STATE] = 'header'; + } + this[EMIT]('eof'); + } + else { + this[SAW_NULL_BLOCK] = true; + this[EMIT]('nullBlock'); + } + } + else { + this[SAW_NULL_BLOCK] = false; + if (!header.cksumValid) { + this.warn('TAR_ENTRY_INVALID', 'checksum failure', { header }); + } + else if (!header.path) { + this.warn('TAR_ENTRY_INVALID', 'path is required', { header }); + } + else { + const type = header.type; + if (/^(Symbolic)?Link$/.test(type) && !header.linkpath) { + this.warn('TAR_ENTRY_INVALID', 'linkpath required', { + header, + }); + } + else if (!/^(Symbolic)?Link$/.test(type) && + !/^(Global)?ExtendedHeader$/.test(type) && + header.linkpath) { + this.warn('TAR_ENTRY_INVALID', 'linkpath forbidden', { + header, + }); + } + else { + const entry = (this[WRITEENTRY] = new read_entry_js_1.ReadEntry(header, this[EX], this[GEX])); + // we do this for meta & ignored entries as well, because they + // are still valid tar, or else we wouldn't know to ignore them + if (!this[SAW_VALID_ENTRY]) { + if (entry.remain) { + // this might be the one! + const onend = () => { + if (!entry.invalid) { + this[SAW_VALID_ENTRY] = true; + } + }; + entry.on('end', onend); + } + else { + this[SAW_VALID_ENTRY] = true; + } + } + if (entry.meta) { + if (entry.size > this.maxMetaEntrySize) { + entry.ignore = true; + this[EMIT]('ignoredEntry', entry); + this[STATE] = 'ignore'; + entry.resume(); + } + else if (entry.size > 0) { + this[META] = ''; + entry.on('data', c => (this[META] += c)); + this[STATE] = 'meta'; + } + } + else { + this[EX] = undefined; + entry.ignore = + entry.ignore || !this.filter(entry.path, entry); + if (entry.ignore) { + // probably valid, just not something we care about + this[EMIT]('ignoredEntry', entry); + this[STATE] = entry.remain ? 'ignore' : 'header'; + entry.resume(); + } + else { + if (entry.remain) { + this[STATE] = 'body'; + } + else { + this[STATE] = 'header'; + entry.end(); + } + if (!this[READENTRY]) { + this[QUEUE].push(entry); + this[NEXTENTRY](); + } + else { + this[QUEUE].push(entry); + } + } + } + } + } + } + } + [CLOSESTREAM]() { + queueMicrotask(() => this.emit('close')); + } + [PROCESSENTRY](entry) { + let go = true; + if (!entry) { + this[READENTRY] = undefined; + go = false; + } + else if (Array.isArray(entry)) { + const [ev, ...args] = entry; + this.emit(ev, ...args); + } + else { + this[READENTRY] = entry; + this.emit('entry', entry); + if (!entry.emittedEnd) { + entry.on('end', () => this[NEXTENTRY]()); + go = false; + } + } + return go; + } + [NEXTENTRY]() { + do { } while (this[PROCESSENTRY](this[QUEUE].shift())); + if (!this[QUEUE].length) { + // At this point, there's nothing in the queue, but we may have an + // entry which is being consumed (readEntry). + // If we don't, then we definitely can handle more data. + // If we do, and either it's flowing, or it has never had any data + // written to it, then it needs more. + // The only other possibility is that it has returned false from a + // write() call, so we wait for the next drain to continue. + const re = this[READENTRY]; + const drainNow = !re || re.flowing || re.size === re.remain; + if (drainNow) { + if (!this[WRITING]) { + this.emit('drain'); + } + } + else { + re.once('drain', () => this.emit('drain')); + } + } + } + [CONSUMEBODY](chunk, position) { + // write up to but no more than writeEntry.blockRemain + const entry = this[WRITEENTRY]; + /* c8 ignore start */ + if (!entry) { + throw new Error('attempt to consume body without entry??'); + } + const br = entry.blockRemain ?? 0; + /* c8 ignore stop */ + const c = br >= chunk.length && position === 0 ? + chunk + : chunk.subarray(position, position + br); + entry.write(c); + if (!entry.blockRemain) { + this[STATE] = 'header'; + this[WRITEENTRY] = undefined; + entry.end(); + } + return c.length; + } + [CONSUMEMETA](chunk, position) { + const entry = this[WRITEENTRY]; + const ret = this[CONSUMEBODY](chunk, position); + // if we finished, then the entry is reset + if (!this[WRITEENTRY] && entry) { + this[EMITMETA](entry); + } + return ret; + } + [EMIT](ev, data, extra) { + if (!this[QUEUE].length && !this[READENTRY]) { + this.emit(ev, data, extra); + } + else { + this[QUEUE].push([ev, data, extra]); + } + } + [EMITMETA](entry) { + this[EMIT]('meta', this[META]); + switch (entry.type) { + case 'ExtendedHeader': + case 'OldExtendedHeader': + this[EX] = pax_js_1.Pax.parse(this[META], this[EX], false); + break; + case 'GlobalExtendedHeader': + this[GEX] = pax_js_1.Pax.parse(this[META], this[GEX], true); + break; + case 'NextFileHasLongPath': + case 'OldGnuLongPath': { + const ex = this[EX] ?? Object.create(null); + this[EX] = ex; + ex.path = this[META].replace(/\0.*/, ''); + break; + } + case 'NextFileHasLongLinkpath': { + const ex = this[EX] || Object.create(null); + this[EX] = ex; + ex.linkpath = this[META].replace(/\0.*/, ''); + break; + } + /* c8 ignore start */ + default: + throw new Error('unknown meta: ' + entry.type); + /* c8 ignore stop */ + } + } + abort(error) { + this[ABORTED] = true; + this.emit('abort', error); + // always throws, even in non-strict mode + this.warn('TAR_ABORT', error, { recoverable: false }); + } + write(chunk, encoding, cb) { + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + if (typeof chunk === 'string') { + chunk = Buffer.from(chunk, + /* c8 ignore next */ + typeof encoding === 'string' ? encoding : 'utf8'); + } + if (this[ABORTED]) { + /* c8 ignore next */ + cb?.(); + return false; + } + // first write, might be gzipped + const needSniff = this[UNZIP] === undefined || + (this.brotli === undefined && this[UNZIP] === false); + if (needSniff && chunk) { + if (this[BUFFER]) { + chunk = Buffer.concat([this[BUFFER], chunk]); + this[BUFFER] = undefined; + } + if (chunk.length < gzipHeader.length) { + this[BUFFER] = chunk; + /* c8 ignore next */ + cb?.(); + return true; + } + // look for gzip header + for (let i = 0; this[UNZIP] === undefined && i < gzipHeader.length; i++) { + if (chunk[i] !== gzipHeader[i]) { + this[UNZIP] = false; + } + } + const maybeBrotli = this.brotli === undefined; + if (this[UNZIP] === false && maybeBrotli) { + // read the first header to see if it's a valid tar file. If so, + // we can safely assume that it's not actually brotli, despite the + // .tbr or .tar.br file extension. + // if we ended before getting a full chunk, yes, def brotli + if (chunk.length < 512) { + if (this[ENDED]) { + this.brotli = true; + } + else { + this[BUFFER] = chunk; + /* c8 ignore next */ + cb?.(); + return true; + } + } + else { + // if it's tar, it's pretty reliably not brotli, chances of + // that happening are astronomical. + try { + new header_js_1.Header(chunk.subarray(0, 512)); + this.brotli = false; + } + catch (_) { + this.brotli = true; + } + } + } + if (this[UNZIP] === undefined || + (this[UNZIP] === false && this.brotli)) { + const ended = this[ENDED]; + this[ENDED] = false; + this[UNZIP] = + this[UNZIP] === undefined ? + new minizlib_1.Unzip({}) + : new minizlib_1.BrotliDecompress({}); + this[UNZIP].on('data', chunk => this[CONSUMECHUNK](chunk)); + this[UNZIP].on('error', er => this.abort(er)); + this[UNZIP].on('end', () => { + this[ENDED] = true; + this[CONSUMECHUNK](); + }); + this[WRITING] = true; + const ret = !!this[UNZIP][ended ? 'end' : 'write'](chunk); + this[WRITING] = false; + cb?.(); + return ret; + } + } + this[WRITING] = true; + if (this[UNZIP]) { + this[UNZIP].write(chunk); + } + else { + this[CONSUMECHUNK](chunk); + } + this[WRITING] = false; + // return false if there's a queue, or if the current entry isn't flowing + const ret = this[QUEUE].length ? false + : this[READENTRY] ? this[READENTRY].flowing + : true; + // if we have no queue, then that means a clogged READENTRY + if (!ret && !this[QUEUE].length) { + this[READENTRY]?.once('drain', () => this.emit('drain')); + } + /* c8 ignore next */ + cb?.(); + return ret; + } + [BUFFERCONCAT](c) { + if (c && !this[ABORTED]) { + this[BUFFER] = + this[BUFFER] ? Buffer.concat([this[BUFFER], c]) : c; + } + } + [MAYBEEND]() { + if (this[ENDED] && + !this[EMITTEDEND] && + !this[ABORTED] && + !this[CONSUMING]) { + this[EMITTEDEND] = true; + const entry = this[WRITEENTRY]; + if (entry && entry.blockRemain) { + // truncated, likely a damaged file + const have = this[BUFFER] ? this[BUFFER].length : 0; + this.warn('TAR_BAD_ARCHIVE', `Truncated input (needed ${entry.blockRemain} more bytes, only ${have} available)`, { entry }); + if (this[BUFFER]) { + entry.write(this[BUFFER]); + } + entry.end(); + } + this[EMIT](DONE); + } + } + [CONSUMECHUNK](chunk) { + if (this[CONSUMING] && chunk) { + this[BUFFERCONCAT](chunk); + } + else if (!chunk && !this[BUFFER]) { + this[MAYBEEND](); + } + else if (chunk) { + this[CONSUMING] = true; + if (this[BUFFER]) { + this[BUFFERCONCAT](chunk); + const c = this[BUFFER]; + this[BUFFER] = undefined; + this[CONSUMECHUNKSUB](c); + } + else { + this[CONSUMECHUNKSUB](chunk); + } + while (this[BUFFER] && + this[BUFFER]?.length >= 512 && + !this[ABORTED] && + !this[SAW_EOF]) { + const c = this[BUFFER]; + this[BUFFER] = undefined; + this[CONSUMECHUNKSUB](c); + } + this[CONSUMING] = false; + } + if (!this[BUFFER] || this[ENDED]) { + this[MAYBEEND](); + } + } + [CONSUMECHUNKSUB](chunk) { + // we know that we are in CONSUMING mode, so anything written goes into + // the buffer. Advance the position and put any remainder in the buffer. + let position = 0; + const length = chunk.length; + while (position + 512 <= length && + !this[ABORTED] && + !this[SAW_EOF]) { + switch (this[STATE]) { + case 'begin': + case 'header': + this[CONSUMEHEADER](chunk, position); + position += 512; + break; + case 'ignore': + case 'body': + position += this[CONSUMEBODY](chunk, position); + break; + case 'meta': + position += this[CONSUMEMETA](chunk, position); + break; + /* c8 ignore start */ + default: + throw new Error('invalid state: ' + this[STATE]); + /* c8 ignore stop */ + } + } + if (position < length) { + if (this[BUFFER]) { + this[BUFFER] = Buffer.concat([ + chunk.subarray(position), + this[BUFFER], + ]); + } + else { + this[BUFFER] = chunk.subarray(position); + } + } + } + end(chunk, encoding, cb) { + if (typeof chunk === 'function') { + cb = chunk; + encoding = undefined; + chunk = undefined; + } + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + if (typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding); + } + if (cb) + this.once('finish', cb); + if (!this[ABORTED]) { + if (this[UNZIP]) { + /* c8 ignore start */ + if (chunk) + this[UNZIP].write(chunk); + /* c8 ignore stop */ + this[UNZIP].end(); + } + else { + this[ENDED] = true; + if (this.brotli === undefined) + chunk = chunk || Buffer.alloc(0); + if (chunk) + this.write(chunk); + this[MAYBEEND](); + } + } + return this; + } +} +exports.Parser = Parser; +//# sourceMappingURL=parse.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/parse.js.map b/node_modules/tar/dist/commonjs/parse.js.map new file mode 100644 index 0000000..915b353 --- /dev/null +++ b/node_modules/tar/dist/commonjs/parse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parse.js","sourceRoot":"","sources":["../../src/parse.ts"],"names":[],"mappings":";AAAA,gEAAgE;AAChE,sEAAsE;AACtE,gEAAgE;AAChE,EAAE;AACF,gEAAgE;AAChE,qEAAqE;AACrE,sEAAsE;AACtE,EAAE;AACF,oEAAoE;AACpE,sEAAsE;AACtE,qCAAqC;AACrC,EAAE;AACF,uEAAuE;AACvE,4BAA4B;AAC5B,EAAE;AACF,uEAAuE;AACvE,kDAAkD;AAClD,EAAE;AACF,6DAA6D;;;AAE7D,mCAA2C;AAC3C,uCAAkD;AAClD,qCAAiC;AACjC,2CAAoC;AAEpC,qCAA8B;AAC9B,mDAA2C;AAC3C,qDAIyB;AAEzB,MAAM,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAAA;AACpC,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAE5C,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;AAC7B,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAA;AACvC,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,CAAA;AACrC,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,CAAA;AACrC,MAAM,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,CAAA;AAC3C,MAAM,EAAE,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAA;AACnC,MAAM,GAAG,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAA;AAC1C,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;AAC3B,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;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AAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;gBAC5B,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAA;YAClB,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAvmBD,wBAumBC","sourcesContent":["// this[BUFFER] is the remainder of a chunk if we're waiting for\n// the full 512 bytes of a header to come in. We will Buffer.concat()\n// it to the next write(), which is a mem copy, but a small one.\n//\n// this[QUEUE] is a Yallist of entries that haven't been emitted\n// yet this can only get filled up if the user keeps write()ing after\n// a write() returns false, or does a write() with more than one entry\n//\n// We don't buffer chunks, we always parse them and either create an\n// entry, or push it into the active entry. The ReadEntry class knows\n// to throw data away if .ignore=true\n//\n// Shift entry off the buffer when it emits 'end', and emit 'entry' for\n// the next one in the list.\n//\n// At any time, we're pushing body chunks into the entry at WRITEENTRY,\n// and waiting for 'end' on the entry at READENTRY\n//\n// ignored entries get .resume() called on them straight away\n\nimport { EventEmitter as EE } from 'events'\nimport { BrotliDecompress, Unzip } from 'minizlib'\nimport { Yallist } from 'yallist'\nimport { Header } from './header.js'\nimport { TarOptions } from './options.js'\nimport { Pax } from './pax.js'\nimport { ReadEntry } from './read-entry.js'\nimport {\n warnMethod,\n type WarnData,\n type Warner,\n} from './warn-method.js'\n\nconst maxMetaEntrySize = 1024 * 1024\nconst gzipHeader = Buffer.from([0x1f, 0x8b])\n\nconst STATE = Symbol('state')\nconst WRITEENTRY = Symbol('writeEntry')\nconst READENTRY = Symbol('readEntry')\nconst NEXTENTRY = Symbol('nextEntry')\nconst PROCESSENTRY = Symbol('processEntry')\nconst EX = Symbol('extendedHeader')\nconst GEX = Symbol('globalExtendedHeader')\nconst META = Symbol('meta')\nconst EMITMETA = Symbol('emitMeta')\nconst BUFFER = Symbol('buffer')\nconst QUEUE = Symbol('queue')\nconst ENDED = Symbol('ended')\nconst EMITTEDEND = Symbol('emittedEnd')\nconst EMIT = Symbol('emit')\nconst UNZIP = Symbol('unzip')\nconst CONSUMECHUNK = Symbol('consumeChunk')\nconst CONSUMECHUNKSUB = Symbol('consumeChunkSub')\nconst CONSUMEBODY = Symbol('consumeBody')\nconst CONSUMEMETA = Symbol('consumeMeta')\nconst CONSUMEHEADER = Symbol('consumeHeader')\nconst CONSUMING = Symbol('consuming')\nconst BUFFERCONCAT = Symbol('bufferConcat')\nconst MAYBEEND = Symbol('maybeEnd')\nconst WRITING = Symbol('writing')\nconst ABORTED = Symbol('aborted')\nconst DONE = Symbol('onDone')\nconst SAW_VALID_ENTRY = Symbol('sawValidEntry')\nconst SAW_NULL_BLOCK = Symbol('sawNullBlock')\nconst SAW_EOF = Symbol('sawEOF')\nconst CLOSESTREAM = Symbol('closeStream')\n\nconst noop = () => true\n\nexport type State = 'begin' | 'header' | 'ignore' | 'meta' | 'body'\n\nexport class Parser extends EE implements Warner {\n file: string\n strict: boolean\n maxMetaEntrySize: number\n filter: Exclude\n brotli?: TarOptions['brotli']\n\n writable: true = true\n readable: false = false;\n\n [QUEUE]: Yallist =\n new Yallist();\n [BUFFER]?: Buffer;\n [READENTRY]?: ReadEntry;\n [WRITEENTRY]?: ReadEntry;\n [STATE]: State = 'begin';\n [META]: string = '';\n [EX]?: Pax;\n [GEX]?: Pax;\n [ENDED]: boolean = false;\n [UNZIP]?: false | Unzip | BrotliDecompress;\n [ABORTED]: boolean = false;\n [SAW_VALID_ENTRY]?: boolean;\n [SAW_NULL_BLOCK]: boolean = false;\n [SAW_EOF]: boolean = false;\n [WRITING]: boolean = false;\n [CONSUMING]: boolean = false;\n [EMITTEDEND]: boolean = false\n\n constructor(opt: TarOptions = {}) {\n super()\n\n this.file = opt.file || ''\n\n // these BADARCHIVE errors can't be detected early. listen on DONE.\n this.on(DONE, () => {\n if (\n this[STATE] === 'begin' ||\n this[SAW_VALID_ENTRY] === false\n ) {\n // either less than 1 block of data, or all entries were invalid.\n // Either way, probably not even a tarball.\n this.warn('TAR_BAD_ARCHIVE', 'Unrecognized archive format')\n }\n })\n\n if (opt.ondone) {\n this.on(DONE, opt.ondone)\n } else {\n this.on(DONE, () => {\n this.emit('prefinish')\n this.emit('finish')\n this.emit('end')\n })\n }\n\n this.strict = !!opt.strict\n this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize\n this.filter = typeof opt.filter === 'function' ? opt.filter : noop\n // Unlike gzip, brotli doesn't have any magic bytes to identify it\n // Users need to explicitly tell us they're extracting a brotli file\n // Or we infer from the file extension\n const isTBR =\n opt.file &&\n (opt.file.endsWith('.tar.br') || opt.file.endsWith('.tbr'))\n // if it's a tbr file it MIGHT be brotli, but we don't know until\n // we look at it and verify it's not a valid tar file.\n this.brotli =\n !opt.gzip && opt.brotli !== undefined ? opt.brotli\n : isTBR ? undefined\n : false\n\n // have to set this so that streams are ok piping into it\n this.on('end', () => this[CLOSESTREAM]())\n\n if (typeof opt.onwarn === 'function') {\n this.on('warn', opt.onwarn)\n }\n if (typeof opt.onReadEntry === 'function') {\n this.on('entry', opt.onReadEntry)\n }\n }\n\n warn(\n code: string,\n message: string | Error,\n data: WarnData = {},\n ): void {\n warnMethod(this, code, message, data)\n }\n\n [CONSUMEHEADER](chunk: Buffer, position: number) {\n if (this[SAW_VALID_ENTRY] === undefined) {\n this[SAW_VALID_ENTRY] = false\n }\n let header\n try {\n header = new Header(chunk, position, this[EX], this[GEX])\n } catch (er) {\n return this.warn('TAR_ENTRY_INVALID', er as Error)\n }\n\n if (header.nullBlock) {\n if (this[SAW_NULL_BLOCK]) {\n this[SAW_EOF] = true\n // ending an archive with no entries. pointless, but legal.\n if (this[STATE] === 'begin') {\n this[STATE] = 'header'\n }\n this[EMIT]('eof')\n } else {\n this[SAW_NULL_BLOCK] = true\n this[EMIT]('nullBlock')\n }\n } else {\n this[SAW_NULL_BLOCK] = false\n if (!header.cksumValid) {\n this.warn('TAR_ENTRY_INVALID', 'checksum failure', { header })\n } else if (!header.path) {\n this.warn('TAR_ENTRY_INVALID', 'path is required', { header })\n } else {\n const type = header.type\n if (/^(Symbolic)?Link$/.test(type) && !header.linkpath) {\n this.warn('TAR_ENTRY_INVALID', 'linkpath required', {\n header,\n })\n } else if (\n !/^(Symbolic)?Link$/.test(type) &&\n !/^(Global)?ExtendedHeader$/.test(type) &&\n header.linkpath\n ) {\n this.warn('TAR_ENTRY_INVALID', 'linkpath forbidden', {\n header,\n })\n } else {\n const entry = (this[WRITEENTRY] = new ReadEntry(\n header,\n this[EX],\n this[GEX],\n ))\n\n // we do this for meta & ignored entries as well, because they\n // are still valid tar, or else we wouldn't know to ignore them\n if (!this[SAW_VALID_ENTRY]) {\n if (entry.remain) {\n // this might be the one!\n const onend = () => {\n if (!entry.invalid) {\n this[SAW_VALID_ENTRY] = true\n }\n }\n entry.on('end', onend)\n } else {\n this[SAW_VALID_ENTRY] = true\n }\n }\n\n if (entry.meta) {\n if (entry.size > this.maxMetaEntrySize) {\n entry.ignore = true\n this[EMIT]('ignoredEntry', entry)\n this[STATE] = 'ignore'\n entry.resume()\n } else if (entry.size > 0) {\n this[META] = ''\n entry.on('data', c => (this[META] += c))\n this[STATE] = 'meta'\n }\n } else {\n this[EX] = undefined\n entry.ignore =\n entry.ignore || !this.filter(entry.path, entry)\n\n if (entry.ignore) {\n // probably valid, just not something we care about\n this[EMIT]('ignoredEntry', entry)\n this[STATE] = entry.remain ? 'ignore' : 'header'\n entry.resume()\n } else {\n if (entry.remain) {\n this[STATE] = 'body'\n } else {\n this[STATE] = 'header'\n entry.end()\n }\n\n if (!this[READENTRY]) {\n this[QUEUE].push(entry)\n this[NEXTENTRY]()\n } else {\n this[QUEUE].push(entry)\n }\n }\n }\n }\n }\n }\n }\n\n [CLOSESTREAM]() {\n queueMicrotask(() => this.emit('close'))\n }\n\n [PROCESSENTRY](entry?: ReadEntry | [string | symbol, any, any]) {\n let go = true\n\n if (!entry) {\n this[READENTRY] = undefined\n go = false\n } else if (Array.isArray(entry)) {\n const [ev, ...args]: [string | symbol, any, any] = entry\n this.emit(ev, ...args)\n } else {\n this[READENTRY] = entry\n this.emit('entry', entry)\n if (!entry.emittedEnd) {\n entry.on('end', () => this[NEXTENTRY]())\n go = false\n }\n }\n\n return go\n }\n\n [NEXTENTRY]() {\n do {} while (this[PROCESSENTRY](this[QUEUE].shift()))\n\n if (!this[QUEUE].length) {\n // At this point, there's nothing in the queue, but we may have an\n // entry which is being consumed (readEntry).\n // If we don't, then we definitely can handle more data.\n // If we do, and either it's flowing, or it has never had any data\n // written to it, then it needs more.\n // The only other possibility is that it has returned false from a\n // write() call, so we wait for the next drain to continue.\n const re = this[READENTRY]\n const drainNow = !re || re.flowing || re.size === re.remain\n if (drainNow) {\n if (!this[WRITING]) {\n this.emit('drain')\n }\n } else {\n re.once('drain', () => this.emit('drain'))\n }\n }\n }\n\n [CONSUMEBODY](chunk: Buffer, position: number) {\n // write up to but no more than writeEntry.blockRemain\n const entry = this[WRITEENTRY]\n /* c8 ignore start */\n if (!entry) {\n throw new Error('attempt to consume body without entry??')\n }\n const br = entry.blockRemain ?? 0\n /* c8 ignore stop */\n const c =\n br >= chunk.length && position === 0 ?\n chunk\n : chunk.subarray(position, position + br)\n\n entry.write(c)\n\n if (!entry.blockRemain) {\n this[STATE] = 'header'\n this[WRITEENTRY] = undefined\n entry.end()\n }\n\n return c.length\n }\n\n [CONSUMEMETA](chunk: Buffer, position: number) {\n const entry = this[WRITEENTRY]\n const ret = this[CONSUMEBODY](chunk, position)\n\n // if we finished, then the entry is reset\n if (!this[WRITEENTRY] && entry) {\n this[EMITMETA](entry)\n }\n\n return ret\n }\n\n [EMIT](ev: string | symbol, data?: any, extra?: any) {\n if (!this[QUEUE].length && !this[READENTRY]) {\n this.emit(ev, data, extra)\n } else {\n this[QUEUE].push([ev, data, extra])\n }\n }\n\n [EMITMETA](entry: ReadEntry) {\n this[EMIT]('meta', this[META])\n switch (entry.type) {\n case 'ExtendedHeader':\n case 'OldExtendedHeader':\n this[EX] = Pax.parse(this[META], this[EX], false)\n break\n\n case 'GlobalExtendedHeader':\n this[GEX] = Pax.parse(this[META], this[GEX], true)\n break\n\n case 'NextFileHasLongPath':\n case 'OldGnuLongPath': {\n const ex = this[EX] ?? Object.create(null)\n this[EX] = ex\n ex.path = this[META].replace(/\\0.*/, '')\n break\n }\n\n case 'NextFileHasLongLinkpath': {\n const ex = this[EX] || Object.create(null)\n this[EX] = ex\n ex.linkpath = this[META].replace(/\\0.*/, '')\n break\n }\n\n /* c8 ignore start */\n default:\n throw new Error('unknown meta: ' + entry.type)\n /* c8 ignore stop */\n }\n }\n\n abort(error: Error) {\n this[ABORTED] = true\n this.emit('abort', error)\n // always throws, even in non-strict mode\n this.warn('TAR_ABORT', error, { recoverable: false })\n }\n\n write(\n buffer: Uint8Array | string,\n cb?: (err?: Error | null) => void,\n ): boolean\n write(\n str: string,\n encoding?: BufferEncoding,\n cb?: (err?: Error | null) => void,\n ): boolean\n write(\n chunk: Buffer | string,\n encoding?: BufferEncoding | (() => any),\n cb?: () => any,\n ): boolean {\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(\n chunk,\n /* c8 ignore next */\n typeof encoding === 'string' ? encoding : 'utf8',\n )\n }\n if (this[ABORTED]) {\n /* c8 ignore next */\n cb?.()\n return false\n }\n\n // first write, might be gzipped\n const needSniff =\n this[UNZIP] === undefined ||\n (this.brotli === undefined && this[UNZIP] === false)\n if (needSniff && chunk) {\n if (this[BUFFER]) {\n chunk = Buffer.concat([this[BUFFER], chunk])\n this[BUFFER] = undefined\n }\n if (chunk.length < gzipHeader.length) {\n this[BUFFER] = chunk\n /* c8 ignore next */\n cb?.()\n return true\n }\n\n // look for gzip header\n for (\n let i = 0;\n this[UNZIP] === undefined && i < gzipHeader.length;\n i++\n ) {\n if (chunk[i] !== gzipHeader[i]) {\n this[UNZIP] = false\n }\n }\n\n const maybeBrotli = this.brotli === undefined\n if (this[UNZIP] === false && maybeBrotli) {\n // read the first header to see if it's a valid tar file. If so,\n // we can safely assume that it's not actually brotli, despite the\n // .tbr or .tar.br file extension.\n // if we ended before getting a full chunk, yes, def brotli\n if (chunk.length < 512) {\n if (this[ENDED]) {\n this.brotli = true\n } else {\n this[BUFFER] = chunk\n /* c8 ignore next */\n cb?.()\n return true\n }\n } else {\n // if it's tar, it's pretty reliably not brotli, chances of\n // that happening are astronomical.\n try {\n new Header(chunk.subarray(0, 512))\n this.brotli = false\n } catch (_) {\n this.brotli = true\n }\n }\n }\n\n if (\n this[UNZIP] === undefined ||\n (this[UNZIP] === false && this.brotli)\n ) {\n const ended = this[ENDED]\n this[ENDED] = false\n this[UNZIP] =\n this[UNZIP] === undefined ?\n new Unzip({})\n : new BrotliDecompress({})\n this[UNZIP].on('data', chunk => this[CONSUMECHUNK](chunk))\n this[UNZIP].on('error', er => this.abort(er as Error))\n this[UNZIP].on('end', () => {\n this[ENDED] = true\n this[CONSUMECHUNK]()\n })\n this[WRITING] = true\n const ret = !!this[UNZIP][ended ? 'end' : 'write'](chunk)\n this[WRITING] = false\n cb?.()\n return ret\n }\n }\n\n this[WRITING] = true\n if (this[UNZIP]) {\n this[UNZIP].write(chunk)\n } else {\n this[CONSUMECHUNK](chunk)\n }\n this[WRITING] = false\n\n // return false if there's a queue, or if the current entry isn't flowing\n const ret =\n this[QUEUE].length ? false\n : this[READENTRY] ? this[READENTRY].flowing\n : true\n\n // if we have no queue, then that means a clogged READENTRY\n if (!ret && !this[QUEUE].length) {\n this[READENTRY]?.once('drain', () => this.emit('drain'))\n }\n\n /* c8 ignore next */\n cb?.()\n return ret\n }\n\n [BUFFERCONCAT](c: Buffer) {\n if (c && !this[ABORTED]) {\n this[BUFFER] =\n this[BUFFER] ? Buffer.concat([this[BUFFER], c]) : c\n }\n }\n\n [MAYBEEND]() {\n if (\n this[ENDED] &&\n !this[EMITTEDEND] &&\n !this[ABORTED] &&\n !this[CONSUMING]\n ) {\n this[EMITTEDEND] = true\n const entry = this[WRITEENTRY]\n if (entry && entry.blockRemain) {\n // truncated, likely a damaged file\n const have = this[BUFFER] ? this[BUFFER].length : 0\n this.warn(\n 'TAR_BAD_ARCHIVE',\n `Truncated input (needed ${entry.blockRemain} more bytes, only ${have} available)`,\n { entry },\n )\n if (this[BUFFER]) {\n entry.write(this[BUFFER])\n }\n entry.end()\n }\n this[EMIT](DONE)\n }\n }\n\n [CONSUMECHUNK](chunk?: Buffer) {\n if (this[CONSUMING] && chunk) {\n this[BUFFERCONCAT](chunk)\n } else if (!chunk && !this[BUFFER]) {\n this[MAYBEEND]()\n } else if (chunk) {\n this[CONSUMING] = true\n if (this[BUFFER]) {\n this[BUFFERCONCAT](chunk)\n const c = this[BUFFER]\n this[BUFFER] = undefined\n this[CONSUMECHUNKSUB](c)\n } else {\n this[CONSUMECHUNKSUB](chunk)\n }\n\n while (\n this[BUFFER] &&\n (this[BUFFER] as Buffer)?.length >= 512 &&\n !this[ABORTED] &&\n !this[SAW_EOF]\n ) {\n const c = this[BUFFER]\n this[BUFFER] = undefined\n this[CONSUMECHUNKSUB](c)\n }\n this[CONSUMING] = false\n }\n\n if (!this[BUFFER] || this[ENDED]) {\n this[MAYBEEND]()\n }\n }\n\n [CONSUMECHUNKSUB](chunk: Buffer) {\n // we know that we are in CONSUMING mode, so anything written goes into\n // the buffer. Advance the position and put any remainder in the buffer.\n let position = 0\n const length = chunk.length\n while (\n position + 512 <= length &&\n !this[ABORTED] &&\n !this[SAW_EOF]\n ) {\n switch (this[STATE]) {\n case 'begin':\n case 'header':\n this[CONSUMEHEADER](chunk, position)\n position += 512\n break\n\n case 'ignore':\n case 'body':\n position += this[CONSUMEBODY](chunk, position)\n break\n\n case 'meta':\n position += this[CONSUMEMETA](chunk, position)\n break\n\n /* c8 ignore start */\n default:\n throw new Error('invalid state: ' + this[STATE])\n /* c8 ignore stop */\n }\n }\n\n if (position < length) {\n if (this[BUFFER]) {\n this[BUFFER] = Buffer.concat([\n chunk.subarray(position),\n this[BUFFER],\n ])\n } else {\n this[BUFFER] = chunk.subarray(position)\n }\n }\n }\n\n end(cb?: () => void): this\n end(data: string | Buffer, cb?: () => void): this\n end(str: string, encoding?: BufferEncoding, cb?: () => void): this\n end(\n chunk?: string | Buffer | (() => void),\n encoding?: BufferEncoding | (() => void),\n cb?: () => void,\n ) {\n if (typeof chunk === 'function') {\n cb = chunk\n encoding = undefined\n chunk = undefined\n }\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding)\n }\n if (cb) this.once('finish', cb)\n if (!this[ABORTED]) {\n if (this[UNZIP]) {\n /* c8 ignore start */\n if (chunk) this[UNZIP].write(chunk)\n /* c8 ignore stop */\n this[UNZIP].end()\n } else {\n this[ENDED] = true\n if (this.brotli === undefined)\n chunk = chunk || Buffer.alloc(0)\n if (chunk) this.write(chunk)\n this[MAYBEEND]()\n }\n }\n return this\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/path-reservations.d.ts b/node_modules/tar/dist/commonjs/path-reservations.d.ts new file mode 100644 index 0000000..44f0482 --- /dev/null +++ b/node_modules/tar/dist/commonjs/path-reservations.d.ts @@ -0,0 +1,11 @@ +export type Reservation = { + paths: string[]; + dirs: Set; +}; +export type Handler = (clear: () => void) => void; +export declare class PathReservations { + #private; + reserve(paths: string[], fn: Handler): boolean; + check(fn: Handler): boolean; +} +//# sourceMappingURL=path-reservations.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/path-reservations.d.ts.map b/node_modules/tar/dist/commonjs/path-reservations.d.ts.map new file mode 100644 index 0000000..2763014 --- /dev/null +++ b/node_modules/tar/dist/commonjs/path-reservations.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"path-reservations.d.ts","sourceRoot":"","sources":["../../src/path-reservations.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,MAAM,IAAI,KAAK,IAAI,CAAA;AAmBjD,qBAAa,gBAAgB;;IAY3B,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,OAAO;IAgEpC,KAAK,CAAC,EAAE,EAAE,OAAO;CA8ElB"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/path-reservations.js b/node_modules/tar/dist/commonjs/path-reservations.js new file mode 100644 index 0000000..9ff391c --- /dev/null +++ b/node_modules/tar/dist/commonjs/path-reservations.js @@ -0,0 +1,170 @@ +"use strict"; +// A path exclusive reservation system +// reserve([list, of, paths], fn) +// When the fn is first in line for all its paths, it +// is called with a cb that clears the reservation. +// +// Used by async unpack to avoid clobbering paths in use, +// while still allowing maximal safe parallelization. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PathReservations = void 0; +const node_path_1 = require("node:path"); +const normalize_unicode_js_1 = require("./normalize-unicode.js"); +const strip_trailing_slashes_js_1 = require("./strip-trailing-slashes.js"); +const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform; +const isWindows = platform === 'win32'; +// return a set of parent dirs for a given path +// '/a/b/c/d' -> ['/', '/a', '/a/b', '/a/b/c', '/a/b/c/d'] +const getDirs = (path) => { + const dirs = path + .split('/') + .slice(0, -1) + .reduce((set, path) => { + const s = set[set.length - 1]; + if (s !== undefined) { + path = (0, node_path_1.join)(s, path); + } + set.push(path || '/'); + return set; + }, []); + return dirs; +}; +class PathReservations { + // path => [function or Set] + // A Set object means a directory reservation + // A fn is a direct reservation on that path + #queues = new Map(); + // fn => {paths:[path,...], dirs:[path, ...]} + #reservations = new Map(); + // functions currently running + #running = new Set(); + reserve(paths, fn) { + paths = + isWindows ? + ['win32 parallelization disabled'] + : paths.map(p => { + // don't need normPath, because we skip this entirely for windows + return (0, strip_trailing_slashes_js_1.stripTrailingSlashes)((0, node_path_1.join)((0, normalize_unicode_js_1.normalizeUnicode)(p))).toLowerCase(); + }); + const dirs = new Set(paths.map(path => getDirs(path)).reduce((a, b) => a.concat(b))); + this.#reservations.set(fn, { dirs, paths }); + for (const p of paths) { + const q = this.#queues.get(p); + if (!q) { + this.#queues.set(p, [fn]); + } + else { + q.push(fn); + } + } + for (const dir of dirs) { + const q = this.#queues.get(dir); + if (!q) { + this.#queues.set(dir, [new Set([fn])]); + } + else { + const l = q[q.length - 1]; + if (l instanceof Set) { + l.add(fn); + } + else { + q.push(new Set([fn])); + } + } + } + return this.#run(fn); + } + // return the queues for each path the function cares about + // fn => {paths, dirs} + #getQueues(fn) { + const res = this.#reservations.get(fn); + /* c8 ignore start */ + if (!res) { + throw new Error('function does not have any path reservations'); + } + /* c8 ignore stop */ + return { + paths: res.paths.map((path) => this.#queues.get(path)), + dirs: [...res.dirs].map(path => this.#queues.get(path)), + }; + } + // check if fn is first in line for all its paths, and is + // included in the first set for all its dir queues + check(fn) { + const { paths, dirs } = this.#getQueues(fn); + return (paths.every(q => q && q[0] === fn) && + dirs.every(q => q && q[0] instanceof Set && q[0].has(fn))); + } + // run the function if it's first in line and not already running + #run(fn) { + if (this.#running.has(fn) || !this.check(fn)) { + return false; + } + this.#running.add(fn); + fn(() => this.#clear(fn)); + return true; + } + #clear(fn) { + if (!this.#running.has(fn)) { + return false; + } + const res = this.#reservations.get(fn); + /* c8 ignore start */ + if (!res) { + throw new Error('invalid reservation'); + } + /* c8 ignore stop */ + const { paths, dirs } = res; + const next = new Set(); + for (const path of paths) { + const q = this.#queues.get(path); + /* c8 ignore start */ + if (!q || q?.[0] !== fn) { + continue; + } + /* c8 ignore stop */ + const q0 = q[1]; + if (!q0) { + this.#queues.delete(path); + continue; + } + q.shift(); + if (typeof q0 === 'function') { + next.add(q0); + } + else { + for (const f of q0) { + next.add(f); + } + } + } + for (const dir of dirs) { + const q = this.#queues.get(dir); + const q0 = q?.[0]; + /* c8 ignore next - type safety only */ + if (!q || !(q0 instanceof Set)) + continue; + if (q0.size === 1 && q.length === 1) { + this.#queues.delete(dir); + continue; + } + else if (q0.size === 1) { + q.shift(); + // next one must be a function, + // or else the Set would've been reused + const n = q[0]; + if (typeof n === 'function') { + next.add(n); + } + } + else { + q0.delete(fn); + } + } + this.#running.delete(fn); + next.forEach(fn => this.#run(fn)); + return true; + } +} +exports.PathReservations = PathReservations; +//# sourceMappingURL=path-reservations.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/path-reservations.js.map b/node_modules/tar/dist/commonjs/path-reservations.js.map new file mode 100644 index 0000000..db5d567 --- /dev/null +++ b/node_modules/tar/dist/commonjs/path-reservations.js.map @@ -0,0 +1 @@ +{"version":3,"file":"path-reservations.js","sourceRoot":"","sources":["../../src/path-reservations.ts"],"names":[],"mappings":";AAAA,sCAAsC;AACtC,iCAAiC;AACjC,qDAAqD;AACrD,mDAAmD;AACnD,EAAE;AACF,yDAAyD;AACzD,qDAAqD;;;AAErD,yCAAgC;AAChC,iEAAyD;AACzD,2EAAkE;AAElE,MAAM,QAAQ,GACZ,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,OAAO,CAAC,QAAQ,CAAA;AAC3D,MAAM,SAAS,GAAG,QAAQ,KAAK,OAAO,CAAA;AAStC,+CAA+C;AAC/C,0DAA0D;AAC1D,MAAM,OAAO,GAAG,CAAC,IAAY,EAAE,EAAE;IAC/B,MAAM,IAAI,GAAG,IAAI;SACd,KAAK,CAAC,GAAG,CAAC;SACV,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SACZ,MAAM,CAAC,CAAC,GAAa,EAAE,IAAI,EAAE,EAAE;QAC9B,MAAM,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;QAC7B,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;YACpB,IAAI,GAAG,IAAA,gBAAI,EAAC,CAAC,EAAE,IAAI,CAAC,CAAA;QACtB,CAAC;QACD,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAA;QACrB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AAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACpC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;gBACxB,SAAQ;YACV,CAAC;iBAAM,IAAI,EAAE,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;gBACzB,CAAC,CAAC,KAAK,EAAE,CAAA;gBACT,+BAA+B;gBAC/B,uCAAuC;gBACvC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;gBACd,IAAI,OAAO,CAAC,KAAK,UAAU,EAAE,CAAC;oBAC5B,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;gBACb,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;YACf,CAAC;QACH,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;QACxB,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAA;QACjC,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AA1JD,4CA0JC","sourcesContent":["// A path exclusive reservation system\n// reserve([list, of, paths], fn)\n// When the fn is first in line for all its paths, it\n// is called with a cb that clears the reservation.\n//\n// Used by async unpack to avoid clobbering paths in use,\n// while still allowing maximal safe parallelization.\n\nimport { join } from 'node:path'\nimport { normalizeUnicode } from './normalize-unicode.js'\nimport { stripTrailingSlashes } from './strip-trailing-slashes.js'\n\nconst platform =\n process.env.TESTING_TAR_FAKE_PLATFORM || process.platform\nconst isWindows = platform === 'win32'\n\nexport type Reservation = {\n paths: string[]\n dirs: Set\n}\n\nexport type Handler = (clear: () => void) => void\n\n// return a set of parent dirs for a given path\n// '/a/b/c/d' -> ['/', '/a', '/a/b', '/a/b/c', '/a/b/c/d']\nconst getDirs = (path: string) => {\n const dirs = path\n .split('/')\n .slice(0, -1)\n .reduce((set: string[], path) => {\n const s = set[set.length - 1]\n if (s !== undefined) {\n path = join(s, path)\n }\n set.push(path || '/')\n return set\n }, [])\n return dirs\n}\n\nexport class PathReservations {\n // path => [function or Set]\n // A Set object means a directory reservation\n // A fn is a direct reservation on that path\n #queues = new Map)[]>()\n\n // fn => {paths:[path,...], dirs:[path, ...]}\n #reservations = new Map()\n\n // functions currently running\n #running = new Set()\n\n reserve(paths: string[], fn: Handler) {\n paths =\n isWindows ?\n ['win32 parallelization disabled']\n : paths.map(p => {\n // don't need normPath, because we skip this entirely for windows\n return stripTrailingSlashes(\n join(normalizeUnicode(p)),\n ).toLowerCase()\n })\n\n const dirs = new Set(\n paths.map(path => getDirs(path)).reduce((a, b) => a.concat(b)),\n )\n this.#reservations.set(fn, { dirs, paths })\n for (const p of paths) {\n const q = this.#queues.get(p)\n if (!q) {\n this.#queues.set(p, [fn])\n } else {\n q.push(fn)\n }\n }\n for (const dir of dirs) {\n const q = this.#queues.get(dir)\n if (!q) {\n this.#queues.set(dir, [new Set([fn])])\n } else {\n const l = q[q.length - 1]\n if (l instanceof Set) {\n l.add(fn)\n } else {\n q.push(new Set([fn]))\n }\n }\n }\n return this.#run(fn)\n }\n\n // return the queues for each path the function cares about\n // fn => {paths, dirs}\n #getQueues(fn: Handler): {\n paths: Handler[][]\n dirs: (Handler | Set)[][]\n } {\n const res = this.#reservations.get(fn)\n /* c8 ignore start */\n if (!res) {\n throw new Error('function does not have any path reservations')\n }\n /* c8 ignore stop */\n return {\n paths: res.paths.map((path: string) =>\n this.#queues.get(path),\n ) as Handler[][],\n dirs: [...res.dirs].map(path => this.#queues.get(path)) as (\n | Handler\n | Set\n )[][],\n }\n }\n\n // check if fn is first in line for all its paths, and is\n // included in the first set for all its dir queues\n check(fn: Handler) {\n const { paths, dirs } = this.#getQueues(fn)\n return (\n paths.every(q => q && q[0] === fn) &&\n dirs.every(q => q && q[0] instanceof Set && q[0].has(fn))\n )\n }\n\n // run the function if it's first in line and not already running\n #run(fn: Handler) {\n if (this.#running.has(fn) || !this.check(fn)) {\n return false\n }\n this.#running.add(fn)\n fn(() => this.#clear(fn))\n return true\n }\n\n #clear(fn: Handler) {\n if (!this.#running.has(fn)) {\n return false\n }\n const res = this.#reservations.get(fn)\n /* c8 ignore start */\n if (!res) {\n throw new Error('invalid reservation')\n }\n /* c8 ignore stop */\n const { paths, dirs } = res\n\n const next = new Set()\n for (const path of paths) {\n const q = this.#queues.get(path)\n /* c8 ignore start */\n if (!q || q?.[0] !== fn) {\n continue\n }\n /* c8 ignore stop */\n const q0 = q[1]\n if (!q0) {\n this.#queues.delete(path)\n continue\n }\n q.shift()\n if (typeof q0 === 'function') {\n next.add(q0)\n } else {\n for (const f of q0) {\n next.add(f)\n }\n }\n }\n\n for (const dir of dirs) {\n const q = this.#queues.get(dir)\n const q0 = q?.[0]\n /* c8 ignore next - type safety only */\n if (!q || !(q0 instanceof Set)) continue\n if (q0.size === 1 && q.length === 1) {\n this.#queues.delete(dir)\n continue\n } else if (q0.size === 1) {\n q.shift()\n // next one must be a function,\n // or else the Set would've been reused\n const n = q[0]\n if (typeof n === 'function') {\n next.add(n)\n }\n } else {\n q0.delete(fn)\n }\n }\n\n this.#running.delete(fn)\n next.forEach(fn => this.#run(fn))\n return true\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/pax.d.ts b/node_modules/tar/dist/commonjs/pax.d.ts new file mode 100644 index 0000000..58d1a80 --- /dev/null +++ b/node_modules/tar/dist/commonjs/pax.d.ts @@ -0,0 +1,27 @@ +/// +import { HeaderData } from './header.js'; +export declare class Pax implements HeaderData { + atime?: Date; + mtime?: Date; + ctime?: Date; + charset?: string; + comment?: string; + gid?: number; + uid?: number; + gname?: string; + uname?: string; + linkpath?: string; + dev?: number; + ino?: number; + nlink?: number; + path?: string; + size?: number; + mode?: number; + global: boolean; + constructor(obj: HeaderData, global?: boolean); + encode(): Buffer; + encodeBody(): string; + encodeField(field: keyof Pax): string; + static parse(str: string, ex?: HeaderData, g?: boolean): Pax; +} +//# sourceMappingURL=pax.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/pax.d.ts.map b/node_modules/tar/dist/commonjs/pax.d.ts.map new file mode 100644 index 0000000..803755c --- /dev/null +++ b/node_modules/tar/dist/commonjs/pax.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pax.d.ts","sourceRoot":"","sources":["../../src/pax.ts"],"names":[],"mappings":";AACA,OAAO,EAAU,UAAU,EAAE,MAAM,aAAa,CAAA;AAEhD,qBAAa,GAAI,YAAW,UAAU;IACpC,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IAEZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,MAAM,EAAE,OAAO,CAAA;gBAEH,GAAG,EAAE,UAAU,EAAE,MAAM,GAAE,OAAe;IAmBpD,MAAM;IAiDN,UAAU;IAoBV,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,MAAM;IA2BrC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,GAAE,OAAe;CAG9D"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/pax.js b/node_modules/tar/dist/commonjs/pax.js new file mode 100644 index 0000000..d30c0f3 --- /dev/null +++ b/node_modules/tar/dist/commonjs/pax.js @@ -0,0 +1,158 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Pax = void 0; +const node_path_1 = require("node:path"); +const header_js_1 = require("./header.js"); +class Pax { + atime; + mtime; + ctime; + charset; + comment; + gid; + uid; + gname; + uname; + linkpath; + dev; + ino; + nlink; + path; + size; + mode; + global; + constructor(obj, global = false) { + this.atime = obj.atime; + this.charset = obj.charset; + this.comment = obj.comment; + this.ctime = obj.ctime; + this.dev = obj.dev; + this.gid = obj.gid; + this.global = global; + this.gname = obj.gname; + this.ino = obj.ino; + this.linkpath = obj.linkpath; + this.mtime = obj.mtime; + this.nlink = obj.nlink; + this.path = obj.path; + this.size = obj.size; + this.uid = obj.uid; + this.uname = obj.uname; + } + encode() { + const body = this.encodeBody(); + if (body === '') { + return Buffer.allocUnsafe(0); + } + const bodyLen = Buffer.byteLength(body); + // round up to 512 bytes + // add 512 for header + const bufLen = 512 * Math.ceil(1 + bodyLen / 512); + const buf = Buffer.allocUnsafe(bufLen); + // 0-fill the header section, it might not hit every field + for (let i = 0; i < 512; i++) { + buf[i] = 0; + } + new header_js_1.Header({ + // XXX split the path + // then the path should be PaxHeader + basename, but less than 99, + // prepend with the dirname + /* c8 ignore start */ + path: ('PaxHeader/' + (0, node_path_1.basename)(this.path ?? '')).slice(0, 99), + /* c8 ignore stop */ + mode: this.mode || 0o644, + uid: this.uid, + gid: this.gid, + size: bodyLen, + mtime: this.mtime, + type: this.global ? 'GlobalExtendedHeader' : 'ExtendedHeader', + linkpath: '', + uname: this.uname || '', + gname: this.gname || '', + devmaj: 0, + devmin: 0, + atime: this.atime, + ctime: this.ctime, + }).encode(buf); + buf.write(body, 512, bodyLen, 'utf8'); + // null pad after the body + for (let i = bodyLen + 512; i < buf.length; i++) { + buf[i] = 0; + } + return buf; + } + encodeBody() { + return (this.encodeField('path') + + this.encodeField('ctime') + + this.encodeField('atime') + + this.encodeField('dev') + + this.encodeField('ino') + + this.encodeField('nlink') + + this.encodeField('charset') + + this.encodeField('comment') + + this.encodeField('gid') + + this.encodeField('gname') + + this.encodeField('linkpath') + + this.encodeField('mtime') + + this.encodeField('size') + + this.encodeField('uid') + + this.encodeField('uname')); + } + encodeField(field) { + if (this[field] === undefined) { + return ''; + } + const r = this[field]; + const v = r instanceof Date ? r.getTime() / 1000 : r; + const s = ' ' + + (field === 'dev' || field === 'ino' || field === 'nlink' ? + 'SCHILY.' + : '') + + field + + '=' + + v + + '\n'; + const byteLen = Buffer.byteLength(s); + // the digits includes the length of the digits in ascii base-10 + // so if it's 9 characters, then adding 1 for the 9 makes it 10 + // which makes it 11 chars. + let digits = Math.floor(Math.log(byteLen) / Math.log(10)) + 1; + if (byteLen + digits >= Math.pow(10, digits)) { + digits += 1; + } + const len = digits + byteLen; + return len + s; + } + static parse(str, ex, g = false) { + return new Pax(merge(parseKV(str), ex), g); + } +} +exports.Pax = Pax; +const merge = (a, b) => b ? Object.assign({}, b, a) : a; +const parseKV = (str) => str + .replace(/\n$/, '') + .split('\n') + .reduce(parseKVLine, Object.create(null)); +const parseKVLine = (set, line) => { + const n = parseInt(line, 10); + // XXX Values with \n in them will fail this. + // Refactor to not be a naive line-by-line parse. + if (n !== Buffer.byteLength(line) + 1) { + return set; + } + line = line.slice((n + ' ').length); + const kv = line.split('='); + const r = kv.shift(); + if (!r) { + return set; + } + const k = r.replace(/^SCHILY\.(dev|ino|nlink)/, '$1'); + const v = kv.join('='); + set[k] = + /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(k) ? + new Date(Number(v) * 1000) + : /^[0-9]+$/.test(v) ? +v + : v; + return set; +}; +//# sourceMappingURL=pax.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/pax.js.map b/node_modules/tar/dist/commonjs/pax.js.map new file mode 100644 index 0000000..0e216f4 --- /dev/null +++ b/node_modules/tar/dist/commonjs/pax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AAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;YAC5B,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACzB,CAAC,CAAC,CAAC,CAAA;IACL,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA","sourcesContent":["import { basename } from 'node:path'\nimport { Header, HeaderData } from './header.js'\n\nexport class Pax implements HeaderData {\n atime?: Date\n mtime?: Date\n ctime?: Date\n\n charset?: string\n comment?: string\n\n gid?: number\n uid?: number\n\n gname?: string\n uname?: string\n linkpath?: string\n dev?: number\n ino?: number\n nlink?: number\n path?: string\n size?: number\n mode?: number\n\n global: boolean\n\n constructor(obj: HeaderData, global: boolean = false) {\n this.atime = obj.atime\n this.charset = obj.charset\n this.comment = obj.comment\n this.ctime = obj.ctime\n this.dev = obj.dev\n this.gid = obj.gid\n this.global = global\n this.gname = obj.gname\n this.ino = obj.ino\n this.linkpath = obj.linkpath\n this.mtime = obj.mtime\n this.nlink = obj.nlink\n this.path = obj.path\n this.size = obj.size\n this.uid = obj.uid\n this.uname = obj.uname\n }\n\n encode() {\n const body = this.encodeBody()\n if (body === '') {\n return Buffer.allocUnsafe(0)\n }\n\n const bodyLen = Buffer.byteLength(body)\n // round up to 512 bytes\n // add 512 for header\n const bufLen = 512 * Math.ceil(1 + bodyLen / 512)\n const buf = Buffer.allocUnsafe(bufLen)\n\n // 0-fill the header section, it might not hit every field\n for (let i = 0; i < 512; i++) {\n buf[i] = 0\n }\n\n new Header({\n // XXX split the path\n // then the path should be PaxHeader + basename, but less than 99,\n // prepend with the dirname\n /* c8 ignore start */\n path: ('PaxHeader/' + basename(this.path ?? '')).slice(0, 99),\n /* c8 ignore stop */\n mode: this.mode || 0o644,\n uid: this.uid,\n gid: this.gid,\n size: bodyLen,\n mtime: this.mtime,\n type: this.global ? 'GlobalExtendedHeader' : 'ExtendedHeader',\n linkpath: '',\n uname: this.uname || '',\n gname: this.gname || '',\n devmaj: 0,\n devmin: 0,\n atime: this.atime,\n ctime: this.ctime,\n }).encode(buf)\n\n buf.write(body, 512, bodyLen, 'utf8')\n\n // null pad after the body\n for (let i = bodyLen + 512; i < buf.length; i++) {\n buf[i] = 0\n }\n\n return buf\n }\n\n encodeBody() {\n return (\n this.encodeField('path') +\n this.encodeField('ctime') +\n this.encodeField('atime') +\n this.encodeField('dev') +\n this.encodeField('ino') +\n this.encodeField('nlink') +\n this.encodeField('charset') +\n this.encodeField('comment') +\n this.encodeField('gid') +\n this.encodeField('gname') +\n this.encodeField('linkpath') +\n this.encodeField('mtime') +\n this.encodeField('size') +\n this.encodeField('uid') +\n this.encodeField('uname')\n )\n }\n\n encodeField(field: keyof Pax): string {\n if (this[field] === undefined) {\n return ''\n }\n const r = this[field]\n const v = r instanceof Date ? r.getTime() / 1000 : r\n const s =\n ' ' +\n (field === 'dev' || field === 'ino' || field === 'nlink' ?\n 'SCHILY.'\n : '') +\n field +\n '=' +\n v +\n '\\n'\n const byteLen = Buffer.byteLength(s)\n // the digits includes the length of the digits in ascii base-10\n // so if it's 9 characters, then adding 1 for the 9 makes it 10\n // which makes it 11 chars.\n let digits = Math.floor(Math.log(byteLen) / Math.log(10)) + 1\n if (byteLen + digits >= Math.pow(10, digits)) {\n digits += 1\n }\n const len = digits + byteLen\n return len + s\n }\n\n static parse(str: string, ex?: HeaderData, g: boolean = false) {\n return new Pax(merge(parseKV(str), ex), g)\n }\n}\n\nconst merge = (a: HeaderData, b?: HeaderData) =>\n b ? Object.assign({}, b, a) : a\n\nconst parseKV = (str: string) =>\n str\n .replace(/\\n$/, '')\n .split('\\n')\n .reduce(parseKVLine, Object.create(null))\n\nconst parseKVLine = (set: Record, line: string) => {\n const n = parseInt(line, 10)\n\n // XXX Values with \\n in them will fail this.\n // Refactor to not be a naive line-by-line parse.\n if (n !== Buffer.byteLength(line) + 1) {\n return set\n }\n\n line = line.slice((n + ' ').length)\n const kv = line.split('=')\n const r = kv.shift()\n\n if (!r) {\n return set\n }\n\n const k = r.replace(/^SCHILY\\.(dev|ino|nlink)/, '$1')\n\n const v = kv.join('=')\n set[k] =\n /^([A-Z]+\\.)?([mac]|birth|creation)time$/.test(k) ?\n new Date(Number(v) * 1000)\n : /^[0-9]+$/.test(v) ? +v\n : v\n return set\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/read-entry.d.ts b/node_modules/tar/dist/commonjs/read-entry.d.ts new file mode 100644 index 0000000..718da5c --- /dev/null +++ b/node_modules/tar/dist/commonjs/read-entry.d.ts @@ -0,0 +1,37 @@ +/// +import { Minipass } from 'minipass'; +import { Header } from './header.js'; +import { Pax } from './pax.js'; +import { EntryTypeName } from './types.js'; +export declare class ReadEntry extends Minipass { + #private; + extended?: Pax; + globalExtended?: Pax; + header: Header; + startBlockSize: number; + blockRemain: number; + remain: number; + type: EntryTypeName; + meta: boolean; + ignore: boolean; + path: string; + mode?: number; + uid?: number; + gid?: number; + uname?: string; + gname?: string; + size: number; + mtime?: Date; + atime?: Date; + ctime?: Date; + linkpath?: string; + dev?: number; + ino?: number; + nlink?: number; + invalid: boolean; + absolute?: string; + unsupported: boolean; + constructor(header: Header, ex?: Pax, gex?: Pax); + write(data: Buffer): boolean; +} +//# sourceMappingURL=read-entry.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/read-entry.d.ts.map b/node_modules/tar/dist/commonjs/read-entry.d.ts.map new file mode 100644 index 0000000..b4ec30f --- /dev/null +++ b/node_modules/tar/dist/commonjs/read-entry.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"read-entry.d.ts","sourceRoot":"","sources":["../../src/read-entry.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE1C,qBAAa,SAAU,SAAQ,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;;IACrD,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,cAAc,CAAC,EAAE,GAAG,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,aAAa,CAAA;IACnB,IAAI,EAAE,OAAO,CAAQ;IACrB,MAAM,EAAE,OAAO,CAAQ;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAI;IAChB,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,OAAO,CAAQ;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,OAAO,CAAQ;gBAEhB,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG;IA+E/C,KAAK,CAAC,IAAI,EAAE,MAAM;CAyCnB"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/read-entry.js b/node_modules/tar/dist/commonjs/read-entry.js new file mode 100644 index 0000000..15e2d55 --- /dev/null +++ b/node_modules/tar/dist/commonjs/read-entry.js @@ -0,0 +1,140 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ReadEntry = void 0; +const minipass_1 = require("minipass"); +const normalize_windows_path_js_1 = require("./normalize-windows-path.js"); +class ReadEntry extends minipass_1.Minipass { + extended; + globalExtended; + header; + startBlockSize; + blockRemain; + remain; + type; + meta = false; + ignore = false; + path; + mode; + uid; + gid; + uname; + gname; + size = 0; + mtime; + atime; + ctime; + linkpath; + dev; + ino; + nlink; + invalid = false; + absolute; + unsupported = false; + constructor(header, ex, gex) { + super({}); + // read entries always start life paused. this is to avoid the + // situation where Minipass's auto-ending empty streams results + // in an entry ending before we're ready for it. + this.pause(); + this.extended = ex; + this.globalExtended = gex; + this.header = header; + /* c8 ignore start */ + this.remain = header.size ?? 0; + /* c8 ignore stop */ + this.startBlockSize = 512 * Math.ceil(this.remain / 512); + this.blockRemain = this.startBlockSize; + this.type = header.type; + switch (this.type) { + case 'File': + case 'OldFile': + case 'Link': + case 'SymbolicLink': + case 'CharacterDevice': + case 'BlockDevice': + case 'Directory': + case 'FIFO': + case 'ContiguousFile': + case 'GNUDumpDir': + break; + case 'NextFileHasLongLinkpath': + case 'NextFileHasLongPath': + case 'OldGnuLongPath': + case 'GlobalExtendedHeader': + case 'ExtendedHeader': + case 'OldExtendedHeader': + this.meta = true; + break; + // NOTE: gnutar and bsdtar treat unrecognized types as 'File' + // it may be worth doing the same, but with a warning. + default: + this.ignore = true; + } + /* c8 ignore start */ + if (!header.path) { + throw new Error('no path provided for tar.ReadEntry'); + } + /* c8 ignore stop */ + this.path = (0, normalize_windows_path_js_1.normalizeWindowsPath)(header.path); + this.mode = header.mode; + if (this.mode) { + this.mode = this.mode & 0o7777; + } + this.uid = header.uid; + this.gid = header.gid; + this.uname = header.uname; + this.gname = header.gname; + this.size = this.remain; + this.mtime = header.mtime; + this.atime = header.atime; + this.ctime = header.ctime; + /* c8 ignore start */ + this.linkpath = + header.linkpath ? + (0, normalize_windows_path_js_1.normalizeWindowsPath)(header.linkpath) + : undefined; + /* c8 ignore stop */ + this.uname = header.uname; + this.gname = header.gname; + if (ex) { + this.#slurp(ex); + } + if (gex) { + this.#slurp(gex, true); + } + } + write(data) { + const writeLen = data.length; + if (writeLen > this.blockRemain) { + throw new Error('writing more to entry than is appropriate'); + } + const r = this.remain; + const br = this.blockRemain; + this.remain = Math.max(0, r - writeLen); + this.blockRemain = Math.max(0, br - writeLen); + if (this.ignore) { + return true; + } + if (r >= writeLen) { + return super.write(data); + } + // r < writeLen + return super.write(data.subarray(0, r)); + } + #slurp(ex, gex = false) { + if (ex.path) + ex.path = (0, normalize_windows_path_js_1.normalizeWindowsPath)(ex.path); + if (ex.linkpath) + ex.linkpath = (0, normalize_windows_path_js_1.normalizeWindowsPath)(ex.linkpath); + Object.assign(this, Object.fromEntries(Object.entries(ex).filter(([k, v]) => { + // we slurp in everything except for the path attribute in + // a global extended header, because that's weird. Also, any + // null/undefined values are ignored. + return !(v === null || + v === undefined || + (k === 'path' && gex)); + }))); + } +} +exports.ReadEntry = ReadEntry; +//# sourceMappingURL=read-entry.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/read-entry.js.map b/node_modules/tar/dist/commonjs/read-entry.js.map new file mode 100644 index 0000000..8fc8c1d --- /dev/null +++ b/node_modules/tar/dist/commonjs/read-entry.js.map @@ -0,0 +1 @@ +{"version":3,"file":"read-entry.js","sourceRoot":"","sources":["../../src/read-entry.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AAEnC,2EAAkE;AAIlE,MAAa,SAAU,SAAQ,mBAAwB;IACrD,QAAQ,CAAM;IACd,cAAc,CAAM;IACpB,MAAM,CAAQ;IACd,cAAc,CAAQ;IACtB,WAAW,CAAQ;IACnB,MAAM,CAAQ;IACd,IAAI,CAAe;IACnB,IAAI,GAAY,KAAK,CAAA;IACrB,MAAM,GAAY,KAAK,CAAA;IACvB,IAAI,CAAQ;IACZ,IAAI,CAAS;IACb,GAAG,CAAS;IACZ,GAAG,CAAS;IACZ,KAAK,CAAS;I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A;QACpD,IAAI,EAAE,CAAC,QAAQ;YAAE,EAAE,CAAC,QAAQ,GAAG,IAAA,gDAAoB,EAAC,EAAE,CAAC,QAAQ,CAAC,CAAA;QAChE,MAAM,CAAC,MAAM,CACX,IAAI,EACJ,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE;YACnC,0DAA0D;YAC1D,4DAA4D;YAC5D,qCAAqC;YACrC,OAAO,CAAC,CACN,CAAC,KAAK,IAAI;gBACV,CAAC,KAAK,SAAS;gBACf,CAAC,CAAC,KAAK,MAAM,IAAI,GAAG,CAAC,CACtB,CAAA;QACH,CAAC,CAAC,CACH,CACF,CAAA;IACH,CAAC;CACF;AArJD,8BAqJC","sourcesContent":["import { Minipass } from 'minipass'\nimport { Header } from './header.js'\nimport { normalizeWindowsPath } from './normalize-windows-path.js'\nimport { Pax } from './pax.js'\nimport { EntryTypeName } from './types.js'\n\nexport class ReadEntry extends Minipass {\n extended?: Pax\n globalExtended?: Pax\n header: Header\n startBlockSize: number\n blockRemain: number\n remain: number\n type: EntryTypeName\n meta: boolean = false\n ignore: boolean = false\n path: string\n mode?: number\n uid?: number\n gid?: number\n uname?: string\n gname?: string\n size: number = 0\n mtime?: Date\n atime?: Date\n ctime?: Date\n linkpath?: string\n\n dev?: number\n ino?: number\n nlink?: number\n invalid: boolean = false\n absolute?: string\n unsupported: boolean = false\n\n constructor(header: Header, ex?: Pax, gex?: Pax) {\n super({})\n // read entries always start life paused. this is to avoid the\n // situation where Minipass's auto-ending empty streams results\n // in an entry ending before we're ready for it.\n this.pause()\n this.extended = ex\n this.globalExtended = gex\n this.header = header\n /* c8 ignore start */\n this.remain = header.size ?? 0\n /* c8 ignore stop */\n this.startBlockSize = 512 * Math.ceil(this.remain / 512)\n this.blockRemain = this.startBlockSize\n this.type = header.type\n switch (this.type) {\n case 'File':\n case 'OldFile':\n case 'Link':\n case 'SymbolicLink':\n case 'CharacterDevice':\n case 'BlockDevice':\n case 'Directory':\n case 'FIFO':\n case 'ContiguousFile':\n case 'GNUDumpDir':\n break\n\n case 'NextFileHasLongLinkpath':\n case 'NextFileHasLongPath':\n case 'OldGnuLongPath':\n case 'GlobalExtendedHeader':\n case 'ExtendedHeader':\n case 'OldExtendedHeader':\n this.meta = true\n break\n\n // NOTE: gnutar and bsdtar treat unrecognized types as 'File'\n // it may be worth doing the same, but with a warning.\n default:\n this.ignore = true\n }\n\n /* c8 ignore start */\n if (!header.path) {\n throw new Error('no path provided for tar.ReadEntry')\n }\n /* c8 ignore stop */\n\n this.path = normalizeWindowsPath(header.path) as string\n this.mode = header.mode\n if (this.mode) {\n this.mode = this.mode & 0o7777\n }\n this.uid = header.uid\n this.gid = header.gid\n this.uname = header.uname\n this.gname = header.gname\n this.size = this.remain\n this.mtime = header.mtime\n this.atime = header.atime\n this.ctime = header.ctime\n /* c8 ignore start */\n this.linkpath =\n header.linkpath ?\n normalizeWindowsPath(header.linkpath)\n : undefined\n /* c8 ignore stop */\n this.uname = header.uname\n this.gname = header.gname\n\n if (ex) {\n this.#slurp(ex)\n }\n if (gex) {\n this.#slurp(gex, true)\n }\n }\n\n write(data: Buffer) {\n const writeLen = data.length\n if (writeLen > this.blockRemain) {\n throw new Error('writing more to entry than is appropriate')\n }\n\n const r = this.remain\n const br = this.blockRemain\n this.remain = Math.max(0, r - writeLen)\n this.blockRemain = Math.max(0, br - writeLen)\n if (this.ignore) {\n return true\n }\n\n if (r >= writeLen) {\n return super.write(data)\n }\n\n // r < writeLen\n return super.write(data.subarray(0, r))\n }\n\n #slurp(ex: Pax, gex: boolean = false) {\n if (ex.path) ex.path = normalizeWindowsPath(ex.path)\n if (ex.linkpath) ex.linkpath = normalizeWindowsPath(ex.linkpath)\n Object.assign(\n this,\n Object.fromEntries(\n Object.entries(ex).filter(([k, v]) => {\n // we slurp in everything except for the path attribute in\n // a global extended header, because that's weird. Also, any\n // null/undefined values are ignored.\n return !(\n v === null ||\n v === undefined ||\n (k === 'path' && gex)\n )\n }),\n ),\n )\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/replace.d.ts b/node_modules/tar/dist/commonjs/replace.d.ts new file mode 100644 index 0000000..8ae4035 --- /dev/null +++ b/node_modules/tar/dist/commonjs/replace.d.ts @@ -0,0 +1,2 @@ +export declare const replace: import("./make-command.js").TarCommand; +//# sourceMappingURL=replace.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/replace.d.ts.map b/node_modules/tar/dist/commonjs/replace.d.ts.map new file mode 100644 index 0000000..66838f5 --- /dev/null +++ b/node_modules/tar/dist/commonjs/replace.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"replace.d.ts","sourceRoot":"","sources":["../../src/replace.ts"],"names":[],"mappings":"AA6QA,eAAO,MAAM,OAAO,sDA6BnB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/replace.js b/node_modules/tar/dist/commonjs/replace.js new file mode 100644 index 0000000..262deec --- /dev/null +++ b/node_modules/tar/dist/commonjs/replace.js @@ -0,0 +1,231 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.replace = void 0; +// tar -r +const fs_minipass_1 = require("@isaacs/fs-minipass"); +const node_fs_1 = __importDefault(require("node:fs")); +const node_path_1 = __importDefault(require("node:path")); +const header_js_1 = require("./header.js"); +const list_js_1 = require("./list.js"); +const make_command_js_1 = require("./make-command.js"); +const options_js_1 = require("./options.js"); +const pack_js_1 = require("./pack.js"); +// starting at the head of the file, read a Header +// If the checksum is invalid, that's our position to start writing +// If it is, jump forward by the specified size (round up to 512) +// and try again. +// Write the new Pack stream starting there. +const replaceSync = (opt, files) => { + const p = new pack_js_1.PackSync(opt); + let threw = true; + let fd; + let position; + try { + try { + fd = node_fs_1.default.openSync(opt.file, 'r+'); + } + catch (er) { + if (er?.code === 'ENOENT') { + fd = node_fs_1.default.openSync(opt.file, 'w+'); + } + else { + throw er; + } + } + const st = node_fs_1.default.fstatSync(fd); + const headBuf = Buffer.alloc(512); + POSITION: for (position = 0; position < st.size; position += 512) { + for (let bufPos = 0, bytes = 0; bufPos < 512; bufPos += bytes) { + bytes = node_fs_1.default.readSync(fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos); + if (position === 0 && + headBuf[0] === 0x1f && + headBuf[1] === 0x8b) { + throw new Error('cannot append to compressed archives'); + } + if (!bytes) { + break POSITION; + } + } + const h = new header_js_1.Header(headBuf); + if (!h.cksumValid) { + break; + } + const entryBlockSize = 512 * Math.ceil((h.size || 0) / 512); + if (position + entryBlockSize + 512 > st.size) { + break; + } + // the 512 for the header we just parsed will be added as well + // also jump ahead all the blocks for the body + position += entryBlockSize; + if (opt.mtimeCache && h.mtime) { + opt.mtimeCache.set(String(h.path), h.mtime); + } + } + threw = false; + streamSync(opt, p, position, fd, files); + } + finally { + if (threw) { + try { + node_fs_1.default.closeSync(fd); + } + catch (er) { } + } + } +}; +const streamSync = (opt, p, position, fd, files) => { + const stream = new fs_minipass_1.WriteStreamSync(opt.file, { + fd: fd, + start: position, + }); + p.pipe(stream); + addFilesSync(p, files); +}; +const replaceAsync = (opt, files) => { + files = Array.from(files); + const p = new pack_js_1.Pack(opt); + const getPos = (fd, size, cb_) => { + const cb = (er, pos) => { + if (er) { + node_fs_1.default.close(fd, _ => cb_(er)); + } + else { + cb_(null, pos); + } + }; + let position = 0; + if (size === 0) { + return cb(null, 0); + } + let bufPos = 0; + const headBuf = Buffer.alloc(512); + const onread = (er, bytes) => { + if (er || typeof bytes === 'undefined') { + return cb(er); + } + bufPos += bytes; + if (bufPos < 512 && bytes) { + return node_fs_1.default.read(fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos, onread); + } + if (position === 0 && + headBuf[0] === 0x1f && + headBuf[1] === 0x8b) { + return cb(new Error('cannot append to compressed archives')); + } + // truncated header + if (bufPos < 512) { + return cb(null, position); + } + const h = new header_js_1.Header(headBuf); + if (!h.cksumValid) { + return cb(null, position); + } + /* c8 ignore next */ + const entryBlockSize = 512 * Math.ceil((h.size ?? 0) / 512); + if (position + entryBlockSize + 512 > size) { + return cb(null, position); + } + position += entryBlockSize + 512; + if (position >= size) { + return cb(null, position); + } + if (opt.mtimeCache && h.mtime) { + opt.mtimeCache.set(String(h.path), h.mtime); + } + bufPos = 0; + node_fs_1.default.read(fd, headBuf, 0, 512, position, onread); + }; + node_fs_1.default.read(fd, headBuf, 0, 512, position, onread); + }; + const promise = new Promise((resolve, reject) => { + p.on('error', reject); + let flag = 'r+'; + const onopen = (er, fd) => { + if (er && er.code === 'ENOENT' && flag === 'r+') { + flag = 'w+'; + return node_fs_1.default.open(opt.file, flag, onopen); + } + if (er || !fd) { + return reject(er); + } + node_fs_1.default.fstat(fd, (er, st) => { + if (er) { + return node_fs_1.default.close(fd, () => reject(er)); + } + getPos(fd, st.size, (er, position) => { + if (er) { + return reject(er); + } + const stream = new fs_minipass_1.WriteStream(opt.file, { + fd: fd, + start: position, + }); + p.pipe(stream); + stream.on('error', reject); + stream.on('close', resolve); + addFilesAsync(p, files); + }); + }); + }; + node_fs_1.default.open(opt.file, flag, onopen); + }); + return promise; +}; +const addFilesSync = (p, files) => { + files.forEach(file => { + if (file.charAt(0) === '@') { + (0, list_js_1.list)({ + file: node_path_1.default.resolve(p.cwd, file.slice(1)), + sync: true, + noResume: true, + onReadEntry: entry => p.add(entry), + }); + } + else { + p.add(file); + } + }); + p.end(); +}; +const addFilesAsync = async (p, files) => { + for (let i = 0; i < files.length; i++) { + const file = String(files[i]); + if (file.charAt(0) === '@') { + await (0, list_js_1.list)({ + file: node_path_1.default.resolve(String(p.cwd), file.slice(1)), + noResume: true, + onReadEntry: entry => p.add(entry), + }); + } + else { + p.add(file); + } + } + p.end(); +}; +exports.replace = (0, make_command_js_1.makeCommand)(replaceSync, replaceAsync, +/* c8 ignore start */ +() => { + throw new TypeError('file is required'); +}, () => { + throw new TypeError('file is required'); +}, +/* c8 ignore stop */ +(opt, entries) => { + if (!(0, options_js_1.isFile)(opt)) { + throw new TypeError('file is required'); + } + if (opt.gzip || + opt.brotli || + opt.file.endsWith('.br') || + opt.file.endsWith('.tbr')) { + throw new TypeError('cannot append to compressed archives'); + } + if (!entries?.length) { + throw new TypeError('no paths specified to add/replace'); + } +}); +//# sourceMappingURL=replace.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/replace.js.map b/node_modules/tar/dist/commonjs/replace.js.map new file mode 100644 index 0000000..b102e46 --- /dev/null +++ b/node_modules/tar/dist/commonjs/replace.js.map @@ -0,0 +1 @@ +{"version":3,"file":"replace.js","sourceRoot":"","sources":["../../src/replace.ts"],"names":[],"mappings":";;;;;;AAAA,SAAS;AACT,qDAAkE;AAElE,sDAAwB;AACxB,0DAA4B;AAC5B,2CAAoC;AACpC,uCAAgC;AAChC,uDAA+C;AAC/C,6CAIqB;AACrB,uCAA0C;AAE1C,kDAAkD;AAClD,mEAAmE;AACnE,iEAAiE;AACjE,iBAAiB;AACjB,4CAA4C;AAE5C,MAAM,WAAW,GAAG,CAAC,GAAuB,EAAE,KAAe,EAAE,EAAE;IAC/D,MAAM,CAAC,GAAG,IAAI,kBAAQ,CAAC,GAAG,CAAC,CAAA;IAE3B,IAAI,KAAK,GAAG,IAAI,CAAA;IAChB,IAAI,EAAE,CAAA;IACN,IAAI,QAAQ,CAAA;IAEZ,IAAI,CAAC;QACH,IAAI,CAAC;YACH,EAAE,GAAG,iBAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QAClC,CAAC;QAAC,OAAO,EAAE,EAAE,CAAC;YACZ,IAAK,EAA4B,EAAE,IAAI,KAAK,QAAQ,EAAE,CAAC;gBACrD,EAAE,GAAG,iBAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAA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EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBAChD,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC;aACnC,CAAC,CAAA;QACJ,CAAC;aAAM,CAAC;YACN,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QACb,CAAC;IACH,CAAC;IACD,CAAC,CAAC,GAAG,EAAE,CAAA;AACT,CAAC,CAAA;AAEY,QAAA,OAAO,GAAG,IAAA,6BAAW,EAChC,WAAW,EACX,YAAY;AACZ,qBAAqB;AACrB,GAAU,EAAE;IACV,MAAM,IAAI,SAAS,CAAC,kBAAkB,CAAC,CAAA;AACzC,CAAC,EACD,GAAU,EAAE;IACV,MAAM,IAAI,SAAS,CAAC,kBAAkB,CAAC,CAAA;AACzC,CAAC;AACD,oBAAoB;AACpB,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;IACf,IAAI,CAAC,IAAA,mBAAM,EAAC,GAAG,CAAC,EAAE,CAAC;QACjB,MAAM,IAAI,SAAS,CAAC,kBAAkB,CAAC,CAAA;IACzC,CAAC;IAED,IACE,GAAG,CAAC,IAAI;QACR,GAAG,CAAC,MAAM;QACV,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;QACxB,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EACzB,CAAC;QACD,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAA;IAC7D,CAAC;IAED,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;QACrB,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;IAC1D,CAAC;AACH,CAAC,CACF,CAAA","sourcesContent":["// tar -r\nimport { WriteStream, WriteStreamSync } from '@isaacs/fs-minipass'\nimport { Minipass } from 'minipass'\nimport fs from 'node:fs'\nimport path from 'node:path'\nimport { Header } from './header.js'\nimport { list } from './list.js'\nimport { makeCommand } from './make-command.js'\nimport {\n isFile,\n TarOptionsFile,\n TarOptionsSyncFile,\n} from './options.js'\nimport { Pack, PackSync } from './pack.js'\n\n// starting at the head of the file, read a Header\n// If the checksum is invalid, that's our position to start writing\n// If it is, jump forward by the specified size (round up to 512)\n// and try again.\n// Write the new Pack stream starting there.\n\nconst replaceSync = (opt: TarOptionsSyncFile, files: string[]) => {\n const p = new PackSync(opt)\n\n let threw = true\n let fd\n let position\n\n try {\n try {\n fd = fs.openSync(opt.file, 'r+')\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') {\n fd = fs.openSync(opt.file, 'w+')\n } else {\n throw er\n }\n }\n\n const st = fs.fstatSync(fd)\n const headBuf = Buffer.alloc(512)\n\n POSITION: for (\n position = 0;\n position < st.size;\n position += 512\n ) {\n for (let bufPos = 0, bytes = 0; bufPos < 512; bufPos += bytes) {\n bytes = fs.readSync(\n fd,\n headBuf,\n bufPos,\n headBuf.length - bufPos,\n position + bufPos,\n )\n\n if (\n position === 0 &&\n headBuf[0] === 0x1f &&\n headBuf[1] === 0x8b\n ) {\n throw new Error('cannot append to compressed archives')\n }\n\n if (!bytes) {\n break POSITION\n }\n }\n\n const h = new Header(headBuf)\n if (!h.cksumValid) {\n break\n }\n const entryBlockSize = 512 * Math.ceil((h.size || 0) / 512)\n if (position + entryBlockSize + 512 > st.size) {\n break\n }\n // the 512 for the header we just parsed will be added as well\n // also jump ahead all the blocks for the body\n position += entryBlockSize\n if (opt.mtimeCache && h.mtime) {\n opt.mtimeCache.set(String(h.path), h.mtime)\n }\n }\n threw = false\n\n streamSync(opt, p, position, fd, files)\n } finally {\n if (threw) {\n try {\n fs.closeSync(fd as number)\n } catch (er) {}\n }\n }\n}\n\nconst streamSync = (\n opt: TarOptionsSyncFile,\n p: Pack,\n position: number,\n fd: number,\n files: string[],\n) => {\n const stream = new WriteStreamSync(opt.file, {\n fd: fd,\n start: position,\n })\n p.pipe(stream as unknown as Minipass.Writable)\n addFilesSync(p, files)\n}\n\nconst replaceAsync = (\n opt: TarOptionsFile,\n files: string[],\n): Promise => {\n files = Array.from(files)\n const p = new Pack(opt)\n\n const getPos = (\n fd: number,\n size: number,\n cb_: (er?: null | Error, pos?: number) => void,\n ) => {\n const cb = (er?: Error | null, pos?: number) => {\n if (er) {\n fs.close(fd, _ => cb_(er))\n } else {\n cb_(null, pos)\n }\n }\n\n let position = 0\n if (size === 0) {\n return cb(null, 0)\n }\n\n let bufPos = 0\n const headBuf = Buffer.alloc(512)\n const onread = (er?: null | Error, bytes?: number): void => {\n if (er || typeof bytes === 'undefined') {\n return cb(er)\n }\n bufPos += bytes\n if (bufPos < 512 && bytes) {\n return fs.read(\n fd,\n headBuf,\n bufPos,\n headBuf.length - bufPos,\n position + bufPos,\n onread,\n )\n }\n\n if (\n position === 0 &&\n headBuf[0] === 0x1f &&\n headBuf[1] === 0x8b\n ) {\n return cb(new Error('cannot append to compressed archives'))\n }\n\n // truncated header\n if (bufPos < 512) {\n return cb(null, position)\n }\n\n const h = new Header(headBuf)\n if (!h.cksumValid) {\n return cb(null, position)\n }\n\n /* c8 ignore next */\n const entryBlockSize = 512 * Math.ceil((h.size ?? 0) / 512)\n if (position + entryBlockSize + 512 > size) {\n return cb(null, position)\n }\n\n position += entryBlockSize + 512\n if (position >= size) {\n return cb(null, position)\n }\n\n if (opt.mtimeCache && h.mtime) {\n opt.mtimeCache.set(String(h.path), h.mtime)\n }\n bufPos = 0\n fs.read(fd, headBuf, 0, 512, position, onread)\n }\n fs.read(fd, headBuf, 0, 512, position, onread)\n }\n\n const promise = new Promise((resolve, reject) => {\n p.on('error', reject)\n let flag = 'r+'\n const onopen = (\n er?: NodeJS.ErrnoException | null,\n fd?: number,\n ) => {\n if (er && er.code === 'ENOENT' && flag === 'r+') {\n flag = 'w+'\n return fs.open(opt.file, flag, onopen)\n }\n\n if (er || !fd) {\n return reject(er)\n }\n\n fs.fstat(fd, (er, st) => {\n if (er) {\n return fs.close(fd, () => reject(er))\n }\n\n getPos(fd, st.size, (er, position) => {\n if (er) {\n return reject(er)\n }\n const stream = new WriteStream(opt.file, {\n fd: fd,\n start: position,\n })\n p.pipe(stream as unknown as Minipass.Writable)\n stream.on('error', reject)\n stream.on('close', resolve)\n addFilesAsync(p, files)\n })\n })\n }\n fs.open(opt.file, flag, onopen)\n })\n\n return promise\n}\n\nconst addFilesSync = (p: Pack, files: string[]) => {\n files.forEach(file => {\n if (file.charAt(0) === '@') {\n list({\n file: path.resolve(p.cwd, file.slice(1)),\n sync: true,\n noResume: true,\n onReadEntry: entry => p.add(entry),\n })\n } else {\n p.add(file)\n }\n })\n p.end()\n}\n\nconst addFilesAsync = async (\n p: Pack,\n files: string[],\n): Promise => {\n for (let i = 0; i < files.length; i++) {\n const file = String(files[i])\n if (file.charAt(0) === '@') {\n await list({\n file: path.resolve(String(p.cwd), file.slice(1)),\n noResume: true,\n onReadEntry: entry => p.add(entry),\n })\n } else {\n p.add(file)\n }\n }\n p.end()\n}\n\nexport const replace = makeCommand(\n replaceSync,\n replaceAsync,\n /* c8 ignore start */\n (): never => {\n throw new TypeError('file is required')\n },\n (): never => {\n throw new TypeError('file is required')\n },\n /* c8 ignore stop */\n (opt, entries) => {\n if (!isFile(opt)) {\n throw new TypeError('file is required')\n }\n\n if (\n opt.gzip ||\n opt.brotli ||\n opt.file.endsWith('.br') ||\n opt.file.endsWith('.tbr')\n ) {\n throw new TypeError('cannot append to compressed archives')\n }\n\n if (!entries?.length) {\n throw new TypeError('no paths specified to add/replace')\n }\n },\n)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts b/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts new file mode 100644 index 0000000..170ce2c --- /dev/null +++ b/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts @@ -0,0 +1,2 @@ +export declare const stripAbsolutePath: (path: string) => string[]; +//# sourceMappingURL=strip-absolute-path.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts.map b/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts.map new file mode 100644 index 0000000..83ca6ed --- /dev/null +++ b/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"strip-absolute-path.d.ts","sourceRoot":"","sources":["../../src/strip-absolute-path.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,iBAAiB,SAAU,MAAM,aAgB7C,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/strip-absolute-path.js b/node_modules/tar/dist/commonjs/strip-absolute-path.js new file mode 100644 index 0000000..bb7639c --- /dev/null +++ b/node_modules/tar/dist/commonjs/strip-absolute-path.js @@ -0,0 +1,29 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.stripAbsolutePath = void 0; +// unix absolute paths are also absolute on win32, so we use this for both +const node_path_1 = require("node:path"); +const { isAbsolute, parse } = node_path_1.win32; +// returns [root, stripped] +// Note that windows will think that //x/y/z/a has a "root" of //x/y, and in +// those cases, we want to sanitize it to x/y/z/a, not z/a, so we strip / +// explicitly if it's the first character. +// drive-specific relative paths on Windows get their root stripped off even +// though they are not absolute, so `c:../foo` becomes ['c:', '../foo'] +const stripAbsolutePath = (path) => { + let r = ''; + let parsed = parse(path); + while (isAbsolute(path) || parsed.root) { + // windows will think that //x/y/z has a "root" of //x/y/ + // but strip the //?/C:/ off of //?/C:/path + const root = path.charAt(0) === '/' && path.slice(0, 4) !== '//?/' ? + '/' + : parsed.root; + path = path.slice(root.length); + r += root; + parsed = parse(path); + } + return [r, path]; +}; +exports.stripAbsolutePath = stripAbsolutePath; +//# sourceMappingURL=strip-absolute-path.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/strip-absolute-path.js.map b/node_modules/tar/dist/commonjs/strip-absolute-path.js.map new file mode 100644 index 0000000..75e5620 --- /dev/null +++ b/node_modules/tar/dist/commonjs/strip-absolute-path.js.map @@ -0,0 +1 @@ +{"version":3,"file":"strip-absolute-path.js","sourceRoot":"","sources":["../../src/strip-absolute-path.ts"],"names":[],"mappings":";;;AAAA,0EAA0E;AAC1E,yCAAiC;AACjC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,iBAAK,CAAA;AAEnC,2BAA2B;AAC3B,4EAA4E;AAC5E,yEAAyE;AACzE,0CAA0C;AAC1C,4EAA4E;AAC5E,uEAAuE;AAChE,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,EAAE;IAChD,IAAI,CAAC,GAAG,EAAE,CAAA;IAEV,IAAI,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,CAAA;IACxB,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QACvC,yDAAyD;QACzD,2CAA2C;QAC3C,MAAM,IAAI,GACR,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC;YACrD,GAAG;YACL,CAAC,CAAC,MAAM,CAAC,IAAI,CAAA;QACf,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAC9B,CAAC,IAAI,IAAI,CAAA;QACT,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,CAAA;IACtB,CAAC;IACD,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;AAClB,CAAC,CAAA;AAhBY,QAAA,iBAAiB,qBAgB7B","sourcesContent":["// unix absolute paths are also absolute on win32, so we use this for both\nimport { win32 } from 'node:path'\nconst { isAbsolute, parse } = win32\n\n// returns [root, stripped]\n// Note that windows will think that //x/y/z/a has a \"root\" of //x/y, and in\n// those cases, we want to sanitize it to x/y/z/a, not z/a, so we strip /\n// explicitly if it's the first character.\n// drive-specific relative paths on Windows get their root stripped off even\n// though they are not absolute, so `c:../foo` becomes ['c:', '../foo']\nexport const stripAbsolutePath = (path: string) => {\n let r = ''\n\n let parsed = parse(path)\n while (isAbsolute(path) || parsed.root) {\n // windows will think that //x/y/z has a \"root\" of //x/y/\n // but strip the //?/C:/ off of //?/C:/path\n const root =\n path.charAt(0) === '/' && path.slice(0, 4) !== '//?/' ?\n '/'\n : parsed.root\n path = path.slice(root.length)\n r += root\n parsed = parse(path)\n }\n return [r, path]\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts b/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts new file mode 100644 index 0000000..dcc4637 --- /dev/null +++ b/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts @@ -0,0 +1,2 @@ +export declare const stripTrailingSlashes: (str: string) => string; +//# sourceMappingURL=strip-trailing-slashes.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts.map b/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts.map new file mode 100644 index 0000000..bf43978 --- /dev/null +++ b/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"strip-trailing-slashes.d.ts","sourceRoot":"","sources":["../../src/strip-trailing-slashes.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB,QAAS,MAAM,WAQ/C,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/strip-trailing-slashes.js b/node_modules/tar/dist/commonjs/strip-trailing-slashes.js new file mode 100644 index 0000000..6fa74ad --- /dev/null +++ b/node_modules/tar/dist/commonjs/strip-trailing-slashes.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.stripTrailingSlashes = void 0; +// warning: extremely hot code path. +// This has been meticulously optimized for use +// within npm install on large package trees. +// Do not edit without careful benchmarking. +const stripTrailingSlashes = (str) => { + let i = str.length - 1; + let slashesStart = -1; + while (i > -1 && str.charAt(i) === '/') { + slashesStart = i; + i--; + } + return slashesStart === -1 ? str : str.slice(0, slashesStart); +}; +exports.stripTrailingSlashes = stripTrailingSlashes; +//# sourceMappingURL=strip-trailing-slashes.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/strip-trailing-slashes.js.map b/node_modules/tar/dist/commonjs/strip-trailing-slashes.js.map new file mode 100644 index 0000000..1c6204d --- /dev/null +++ b/node_modules/tar/dist/commonjs/strip-trailing-slashes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"strip-trailing-slashes.js","sourceRoot":"","sources":["../../src/strip-trailing-slashes.ts"],"names":[],"mappings":";;;AAAA,oCAAoC;AACpC,+CAA+C;AAC/C,6CAA6C;AAC7C,4CAA4C;AACrC,MAAM,oBAAoB,GAAG,CAAC,GAAW,EAAE,EAAE;IAClD,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,CAAA;IACtB,IAAI,YAAY,GAAG,CAAC,CAAC,CAAA;IACrB,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QACvC,YAAY,GAAG,CAAC,CAAA;QAChB,CAAC,EAAE,CAAA;IACL,CAAC;IACD,OAAO,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,YAAY,CAAC,CAAA;AAC/D,CAAC,CAAA;AARY,QAAA,oBAAoB,wBAQhC","sourcesContent":["// warning: extremely hot code path.\n// This has been meticulously optimized for use\n// within npm install on large package trees.\n// Do not edit without careful benchmarking.\nexport const stripTrailingSlashes = (str: string) => {\n let i = str.length - 1\n let slashesStart = -1\n while (i > -1 && str.charAt(i) === '/') {\n slashesStart = i\n i--\n }\n return slashesStart === -1 ? str : str.slice(0, slashesStart)\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/symlink-error.d.ts b/node_modules/tar/dist/commonjs/symlink-error.d.ts new file mode 100644 index 0000000..61b400f --- /dev/null +++ b/node_modules/tar/dist/commonjs/symlink-error.d.ts @@ -0,0 +1,9 @@ +export declare class SymlinkError extends Error { + path: string; + symlink: string; + syscall: 'symlink'; + code: 'TAR_SYMLINK_ERROR'; + constructor(symlink: string, path: string); + get name(): string; +} +//# sourceMappingURL=symlink-error.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/symlink-error.d.ts.map b/node_modules/tar/dist/commonjs/symlink-error.d.ts.map new file mode 100644 index 0000000..5716e8e --- /dev/null +++ b/node_modules/tar/dist/commonjs/symlink-error.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"symlink-error.d.ts","sourceRoot":"","sources":["../../src/symlink-error.ts"],"names":[],"mappings":"AAAA,qBAAa,YAAa,SAAQ,KAAK;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,SAAS,CAAY;IAC9B,IAAI,EAAE,mBAAmB,CAAsB;gBACnC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAKzC,IAAI,IAAI,WAEP;CACF"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/symlink-error.js b/node_modules/tar/dist/commonjs/symlink-error.js new file mode 100644 index 0000000..cc19ac1 --- /dev/null +++ b/node_modules/tar/dist/commonjs/symlink-error.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SymlinkError = void 0; +class SymlinkError extends Error { + path; + symlink; + syscall = 'symlink'; + code = 'TAR_SYMLINK_ERROR'; + constructor(symlink, path) { + super('TAR_SYMLINK_ERROR: Cannot extract through symbolic link'); + this.symlink = symlink; + this.path = path; + } + get name() { + return 'SymlinkError'; + } +} +exports.SymlinkError = SymlinkError; +//# sourceMappingURL=symlink-error.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/symlink-error.js.map b/node_modules/tar/dist/commonjs/symlink-error.js.map new file mode 100644 index 0000000..69fb449 --- /dev/null +++ b/node_modules/tar/dist/commonjs/symlink-error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"symlink-error.js","sourceRoot":"","sources":["../../src/symlink-error.ts"],"names":[],"mappings":";;;AAAA,MAAa,YAAa,SAAQ,KAAK;IACrC,IAAI,CAAQ;IACZ,OAAO,CAAQ;IACf,OAAO,GAAc,SAAS,CAAA;IAC9B,IAAI,GAAwB,mBAAmB,CAAA;IAC/C,YAAY,OAAe,EAAE,IAAY;QACvC,KAAK,CAAC,yDAAyD,CAAC,CAAA;QAChE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IACD,IAAI,IAAI;QACN,OAAO,cAAc,CAAA;IACvB,CAAC;CACF;AAbD,oCAaC","sourcesContent":["export class SymlinkError extends Error {\n path: string\n symlink: string\n syscall: 'symlink' = 'symlink'\n code: 'TAR_SYMLINK_ERROR' = 'TAR_SYMLINK_ERROR'\n constructor(symlink: string, path: string) {\n super('TAR_SYMLINK_ERROR: Cannot extract through symbolic link')\n this.symlink = symlink\n this.path = path\n }\n get name() {\n return 'SymlinkError'\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/types.d.ts b/node_modules/tar/dist/commonjs/types.d.ts new file mode 100644 index 0000000..a39f054 --- /dev/null +++ b/node_modules/tar/dist/commonjs/types.d.ts @@ -0,0 +1,7 @@ +export declare const isCode: (c: string) => c is EntryTypeCode; +export declare const isName: (c: string) => c is EntryTypeName; +export type EntryTypeCode = '0' | '' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | 'g' | 'x' | 'A' | 'D' | 'I' | 'K' | 'L' | 'M' | 'N' | 'S' | 'V' | 'X'; +export type EntryTypeName = 'File' | 'OldFile' | 'Link' | 'SymbolicLink' | 'CharacterDevice' | 'BlockDevice' | 'Directory' | 'FIFO' | 'ContiguousFile' | 'GlobalExtendedHeader' | 'ExtendedHeader' | 'SolarisACL' | 'GNUDumpDir' | 'Inode' | 'NextFileHasLongLinkpath' | 'NextFileHasLongPath' | 'ContinuationFile' | 'OldGnuLongPath' | 'SparseFile' | 'TapeVolumeHeader' | 'OldExtendedHeader' | 'Unsupported'; +export declare const name: Map; +export declare const code: Map; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/types.d.ts.map b/node_modules/tar/dist/commonjs/types.d.ts.map new file mode 100644 index 0000000..6e21eeb --- /dev/null +++ b/node_modules/tar/dist/commonjs/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,MAAO,MAAM,uBACF,CAAA;AAE9B,eAAO,MAAM,MAAM,MAAO,MAAM,uBACF,CAAA;AAE9B,MAAM,MAAM,aAAa,GACrB,GAAG,GACH,EAAE,GACF,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,CAAA;AAEP,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,SAAS,GACT,MAAM,GACN,cAAc,GACd,iBAAiB,GACjB,aAAa,GACb,WAAW,GACX,MAAM,GACN,gBAAgB,GAChB,sBAAsB,GACtB,gBAAgB,GAChB,YAAY,GACZ,YAAY,GACZ,OAAO,GACP,yBAAyB,GACzB,qBAAqB,GACrB,kBAAkB,GAClB,gBAAgB,GAChB,YAAY,GACZ,kBAAkB,GAClB,mBAAmB,GACnB,aAAa,CAAA;AAGjB,eAAO,MAAM,IAAI,mCAsCf,CAAA;AAGF,eAAO,MAAM,IAAI,mCAEhB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/types.js b/node_modules/tar/dist/commonjs/types.js new file mode 100644 index 0000000..cb9b684 --- /dev/null +++ b/node_modules/tar/dist/commonjs/types.js @@ -0,0 +1,50 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.code = exports.name = exports.isName = exports.isCode = void 0; +const isCode = (c) => exports.name.has(c); +exports.isCode = isCode; +const isName = (c) => exports.code.has(c); +exports.isName = isName; +// map types from key to human-friendly name +exports.name = new Map([ + ['0', 'File'], + // same as File + ['', 'OldFile'], + ['1', 'Link'], + ['2', 'SymbolicLink'], + // Devices and FIFOs aren't fully supported + // they are parsed, but skipped when unpacking + ['3', 'CharacterDevice'], + ['4', 'BlockDevice'], + ['5', 'Directory'], + ['6', 'FIFO'], + // same as File + ['7', 'ContiguousFile'], + // pax headers + ['g', 'GlobalExtendedHeader'], + ['x', 'ExtendedHeader'], + // vendor-specific stuff + // skip + ['A', 'SolarisACL'], + // like 5, but with data, which should be skipped + ['D', 'GNUDumpDir'], + // metadata only, skip + ['I', 'Inode'], + // data = link path of next file + ['K', 'NextFileHasLongLinkpath'], + // data = path of next file + ['L', 'NextFileHasLongPath'], + // skip + ['M', 'ContinuationFile'], + // like L + ['N', 'OldGnuLongPath'], + // skip + ['S', 'SparseFile'], + // skip + ['V', 'TapeVolumeHeader'], + // like x + ['X', 'OldExtendedHeader'], +]); +// map the other direction +exports.code = new Map(Array.from(exports.name).map(kv => [kv[1], kv[0]])); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/types.js.map b/node_modules/tar/dist/commonjs/types.js.map new file mode 100644 index 0000000..34e269f --- /dev/null +++ b/node_modules/tar/dist/commonjs/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;AAAO,MAAM,MAAM,GAAG,CAAC,CAAS,EAAsB,EAAE,CACtD,YAAI,CAAC,GAAG,CAAC,CAAkB,CAAC,CAAA;AADjB,QAAA,MAAM,UACW;AAEvB,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KAAK,CAAC,IAAI,CAAC,YAAI,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAC3C,CAAA","sourcesContent":["export const isCode = (c: string): c is EntryTypeCode =>\n name.has(c as EntryTypeCode)\n\nexport const isName = (c: string): c is EntryTypeName =>\n code.has(c as EntryTypeName)\n\nexport type EntryTypeCode =\n | '0'\n | ''\n | '1'\n | '2'\n | '3'\n | '4'\n | '5'\n | '6'\n | '7'\n | 'g'\n | 'x'\n | 'A'\n | 'D'\n | 'I'\n | 'K'\n | 'L'\n | 'M'\n | 'N'\n | 'S'\n | 'V'\n | 'X'\n\nexport type EntryTypeName =\n | 'File'\n | 'OldFile'\n | 'Link'\n | 'SymbolicLink'\n | 'CharacterDevice'\n | 'BlockDevice'\n | 'Directory'\n | 'FIFO'\n | 'ContiguousFile'\n | 'GlobalExtendedHeader'\n | 'ExtendedHeader'\n | 'SolarisACL'\n | 'GNUDumpDir'\n | 'Inode'\n | 'NextFileHasLongLinkpath'\n | 'NextFileHasLongPath'\n | 'ContinuationFile'\n | 'OldGnuLongPath'\n | 'SparseFile'\n | 'TapeVolumeHeader'\n | 'OldExtendedHeader'\n | 'Unsupported'\n\n// map types from key to human-friendly name\nexport const name = new Map([\n ['0', 'File'],\n // same as File\n ['', 'OldFile'],\n ['1', 'Link'],\n ['2', 'SymbolicLink'],\n // Devices and FIFOs aren't fully supported\n // they are parsed, but skipped when unpacking\n ['3', 'CharacterDevice'],\n ['4', 'BlockDevice'],\n ['5', 'Directory'],\n ['6', 'FIFO'],\n // same as File\n ['7', 'ContiguousFile'],\n // pax headers\n ['g', 'GlobalExtendedHeader'],\n ['x', 'ExtendedHeader'],\n // vendor-specific stuff\n // skip\n ['A', 'SolarisACL'],\n // like 5, but with data, which should be skipped\n ['D', 'GNUDumpDir'],\n // metadata only, skip\n ['I', 'Inode'],\n // data = link path of next file\n ['K', 'NextFileHasLongLinkpath'],\n // data = path of next file\n ['L', 'NextFileHasLongPath'],\n // skip\n ['M', 'ContinuationFile'],\n // like L\n ['N', 'OldGnuLongPath'],\n // skip\n ['S', 'SparseFile'],\n // skip\n ['V', 'TapeVolumeHeader'],\n // like x\n ['X', 'OldExtendedHeader'],\n])\n\n// map the other direction\nexport const code = new Map(\n Array.from(name).map(kv => [kv[1], kv[0]]),\n)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/unpack.d.ts b/node_modules/tar/dist/commonjs/unpack.d.ts new file mode 100644 index 0000000..53313e6 --- /dev/null +++ b/node_modules/tar/dist/commonjs/unpack.d.ts @@ -0,0 +1,99 @@ +/// +import { type Stats } from 'node:fs'; +import { MkdirError } from './mkdir.js'; +import { Parser } from './parse.js'; +import { TarOptions } from './options.js'; +import { PathReservations } from './path-reservations.js'; +import { ReadEntry } from './read-entry.js'; +import { WarnData } from './warn-method.js'; +declare const ONENTRY: unique symbol; +declare const CHECKFS: unique symbol; +declare const CHECKFS2: unique symbol; +declare const PRUNECACHE: unique symbol; +declare const ISREUSABLE: unique symbol; +declare const MAKEFS: unique symbol; +declare const FILE: unique symbol; +declare const DIRECTORY: unique symbol; +declare const LINK: unique symbol; +declare const SYMLINK: unique symbol; +declare const HARDLINK: unique symbol; +declare const UNSUPPORTED: unique symbol; +declare const CHECKPATH: unique symbol; +declare const MKDIR: unique symbol; +declare const ONERROR: unique symbol; +declare const PENDING: unique symbol; +declare const PEND: unique symbol; +declare const UNPEND: unique symbol; +declare const ENDED: unique symbol; +declare const MAYBECLOSE: unique symbol; +declare const SKIP: unique symbol; +declare const DOCHOWN: unique symbol; +declare const UID: unique symbol; +declare const GID: unique symbol; +declare const CHECKED_CWD: unique symbol; +export declare class Unpack extends Parser { + [ENDED]: boolean; + [CHECKED_CWD]: boolean; + [PENDING]: number; + reservations: PathReservations; + transform?: TarOptions['transform']; + writable: true; + readable: false; + dirCache: Exclude; + uid?: number; + gid?: number; + setOwner: boolean; + preserveOwner: boolean; + processGid?: number; + processUid?: number; + maxDepth: number; + forceChown: boolean; + win32: boolean; + newer: boolean; + keep: boolean; + noMtime: boolean; + preservePaths: boolean; + unlink: boolean; + cwd: string; + strip: number; + processUmask: number; + umask: number; + dmode: number; + fmode: number; + chmod: boolean; + constructor(opt?: TarOptions); + warn(code: string, msg: string | Error, data?: WarnData): void; + [MAYBECLOSE](): void; + [CHECKPATH](entry: ReadEntry): boolean; + [ONENTRY](entry: ReadEntry): void; + [ONERROR](er: Error, entry: ReadEntry): void; + [MKDIR](dir: string, mode: number, cb: (er?: null | MkdirError, made?: string) => void): void; + [DOCHOWN](entry: ReadEntry): boolean; + [UID](entry: ReadEntry): number | undefined; + [GID](entry: ReadEntry): number | undefined; + [FILE](entry: ReadEntry, fullyDone: () => void): void; + [DIRECTORY](entry: ReadEntry, fullyDone: () => void): void; + [UNSUPPORTED](entry: ReadEntry): void; + [SYMLINK](entry: ReadEntry, done: () => void): void; + [HARDLINK](entry: ReadEntry, done: () => void): void; + [PEND](): void; + [UNPEND](): void; + [SKIP](entry: ReadEntry): void; + [ISREUSABLE](entry: ReadEntry, st: Stats): boolean; + [CHECKFS](entry: ReadEntry): void; + [PRUNECACHE](entry: ReadEntry): void; + [CHECKFS2](entry: ReadEntry, fullyDone: (er?: Error) => void): void; + [MAKEFS](er: null | undefined | Error, entry: ReadEntry, done: () => void): void; + [LINK](entry: ReadEntry, linkpath: string, link: 'link' | 'symlink', done: () => void): void; +} +export declare class UnpackSync extends Unpack { + sync: true; + [MAKEFS](er: null | Error | undefined, entry: ReadEntry): void; + [CHECKFS](entry: ReadEntry): void; + [FILE](entry: ReadEntry, done: () => void): void; + [DIRECTORY](entry: ReadEntry, done: () => void): void; + [MKDIR](dir: string, mode: number): unknown; + [LINK](entry: ReadEntry, linkpath: string, link: 'link' | 'symlink', done: () => void): void; +} +export {}; +//# sourceMappingURL=unpack.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/unpack.d.ts.map b/node_modules/tar/dist/commonjs/unpack.d.ts.map new file mode 100644 index 0000000..d36f103 --- /dev/null +++ b/node_modules/tar/dist/commonjs/unpack.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"unpack.d.ts","sourceRoot":"","sources":["../../src/unpack.ts"],"names":[],"mappings":";AASA,OAAW,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAA;AAGxC,OAAO,EAAS,UAAU,EAAa,MAAM,YAAY,CAAA;AAGzD,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAKnC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAE3C,QAAA,MAAM,OAAO,eAAoB,CAAA;AACjC,QAAA,MAAM,OAAO,eAAoB,CAAA;AACjC,QAAA,MAAM,QAAQ,eAAqB,CAAA;AACnC,QAAA,MAAM,UAAU,eAAuB,CAAA;AACvC,QAAA,MAAM,UAAU,eAAuB,CAAA;AACvC,QAAA,MAAM,MAAM,eAAmB,CAAA;AAC/B,QAAA,MAAM,IAAI,eAAiB,CAAA;AAC3B,QAAA,MAAM,SAAS,eAAsB,CAAA;AACrC,QAAA,MAAM,IAAI,eAAiB,CAAA;AAC3B,QAAA,MAAM,OAAO,eAAoB,CAAA;AACjC,QAAA,MAAM,QAAQ,eAAqB,CAAA;AACnC,QAAA,MAAM,WAAW,eAAwB,CAAA;AACzC,QAAA,MAAM,SAAS,eAAsB,CAAA;AACrC,QAAA,MAAM,KAAK,eAAkB,CAAA;AAC7B,QAAA,MAAM,OAAO,eAAoB,CAAA;AACjC,QAAA,MAAM,OAAO,eAAoB,CAAA;AACjC,QAAA,MAAM,IAAI,eAAiB,CAAA;AAC3B,QAAA,MAAM,MAAM,eAAmB,C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,SAAS,EAAE,EAAE,EAAE,KAAK;IAWxC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,SAAS;IAW1B,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,SAAS;IAkB7B,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,KAAK,IAAI;IA2G5D,CAAC,MAAM,CAAC,CACN,EAAE,EAAE,IAAI,GAAG,SAAS,GAAG,KAAK,EAC5B,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,MAAM,IAAI;IA0BlB,CAAC,IAAI,CAAC,CACJ,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,IAAI,EAAE,MAAM,IAAI;CAanB;AAUD,qBAAa,UAAW,SAAQ,MAAM;IACpC,IAAI,EAAE,IAAI,CAAQ;IAElB,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,IAAI,GAAG,KAAK,GAAG,SAAS,EAAE,KAAK,EAAE,SAAS;IAIvD,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,SAAS;IAuE1B,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,IAAI;IAoFzC,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,IAAI;IAkC9C,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAmBjC,CAAC,IAAI,CAAC,CACJ,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,IAAI,EAAE,MAAM,IAAI;CAWnB"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/unpack.js b/node_modules/tar/dist/commonjs/unpack.js new file mode 100644 index 0000000..edf8acb --- /dev/null +++ b/node_modules/tar/dist/commonjs/unpack.js @@ -0,0 +1,919 @@ +"use strict"; +// the PEND/UNPEND stuff tracks whether we're ready to emit end/close yet. +// but the path reservations are required to avoid race conditions where +// parallelized unpack ops may mess with one another, due to dependencies +// (like a Link depending on its target) or destructive operations (like +// clobbering an fs object to create one of a different type.) +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.UnpackSync = exports.Unpack = void 0; +const fsm = __importStar(require("@isaacs/fs-minipass")); +const node_assert_1 = __importDefault(require("node:assert")); +const node_crypto_1 = require("node:crypto"); +const node_fs_1 = __importDefault(require("node:fs")); +const node_path_1 = __importDefault(require("node:path")); +const get_write_flag_js_1 = require("./get-write-flag.js"); +const mkdir_js_1 = require("./mkdir.js"); +const normalize_unicode_js_1 = require("./normalize-unicode.js"); +const normalize_windows_path_js_1 = require("./normalize-windows-path.js"); +const parse_js_1 = require("./parse.js"); +const strip_absolute_path_js_1 = require("./strip-absolute-path.js"); +const strip_trailing_slashes_js_1 = require("./strip-trailing-slashes.js"); +const wc = __importStar(require("./winchars.js")); +const path_reservations_js_1 = require("./path-reservations.js"); +const ONENTRY = Symbol('onEntry'); +const CHECKFS = Symbol('checkFs'); +const CHECKFS2 = Symbol('checkFs2'); +const PRUNECACHE = Symbol('pruneCache'); +const ISREUSABLE = Symbol('isReusable'); +const MAKEFS = Symbol('makeFs'); +const FILE = Symbol('file'); +const DIRECTORY = Symbol('directory'); +const LINK = Symbol('link'); +const SYMLINK = Symbol('symlink'); +const HARDLINK = Symbol('hardlink'); +const UNSUPPORTED = Symbol('unsupported'); +const CHECKPATH = Symbol('checkPath'); +const MKDIR = Symbol('mkdir'); +const ONERROR = Symbol('onError'); +const PENDING = Symbol('pending'); +const PEND = Symbol('pend'); +const UNPEND = Symbol('unpend'); +const ENDED = Symbol('ended'); +const MAYBECLOSE = Symbol('maybeClose'); +const SKIP = Symbol('skip'); +const DOCHOWN = Symbol('doChown'); +const UID = Symbol('uid'); +const GID = Symbol('gid'); +const CHECKED_CWD = Symbol('checkedCwd'); +const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform; +const isWindows = platform === 'win32'; +const DEFAULT_MAX_DEPTH = 1024; +// Unlinks on Windows are not atomic. +// +// This means that if you have a file entry, followed by another +// file entry with an identical name, and you cannot re-use the file +// (because it's a hardlink, or because unlink:true is set, or it's +// Windows, which does not have useful nlink values), then the unlink +// will be committed to the disk AFTER the new file has been written +// over the old one, deleting the new file. +// +// To work around this, on Windows systems, we rename the file and then +// delete the renamed file. It's a sloppy kludge, but frankly, I do not +// know of a better way to do this, given windows' non-atomic unlink +// semantics. +// +// See: https://github.com/npm/node-tar/issues/183 +/* c8 ignore start */ +const unlinkFile = (path, cb) => { + if (!isWindows) { + return node_fs_1.default.unlink(path, cb); + } + const name = path + '.DELETE.' + (0, node_crypto_1.randomBytes)(16).toString('hex'); + node_fs_1.default.rename(path, name, er => { + if (er) { + return cb(er); + } + node_fs_1.default.unlink(name, cb); + }); +}; +/* c8 ignore stop */ +/* c8 ignore start */ +const unlinkFileSync = (path) => { + if (!isWindows) { + return node_fs_1.default.unlinkSync(path); + } + const name = path + '.DELETE.' + (0, node_crypto_1.randomBytes)(16).toString('hex'); + node_fs_1.default.renameSync(path, name); + node_fs_1.default.unlinkSync(name); +}; +/* c8 ignore stop */ +// this.gid, entry.gid, this.processUid +const uint32 = (a, b, c) => a !== undefined && a === a >>> 0 ? a + : b !== undefined && b === b >>> 0 ? b + : c; +// clear the cache if it's a case-insensitive unicode-squashing match. +// we can't know if the current file system is case-sensitive or supports +// unicode fully, so we check for similarity on the maximally compatible +// representation. Err on the side of pruning, since all it's doing is +// preventing lstats, and it's not the end of the world if we get a false +// positive. +// Note that on windows, we always drop the entire cache whenever a +// symbolic link is encountered, because 8.3 filenames are impossible +// to reason about, and collisions are hazards rather than just failures. +const cacheKeyNormalize = (path) => (0, strip_trailing_slashes_js_1.stripTrailingSlashes)((0, normalize_windows_path_js_1.normalizeWindowsPath)((0, normalize_unicode_js_1.normalizeUnicode)(path))).toLowerCase(); +// remove all cache entries matching ${abs}/** +const pruneCache = (cache, abs) => { + abs = cacheKeyNormalize(abs); + for (const path of cache.keys()) { + const pnorm = cacheKeyNormalize(path); + if (pnorm === abs || pnorm.indexOf(abs + '/') === 0) { + cache.delete(path); + } + } +}; +const dropCache = (cache) => { + for (const key of cache.keys()) { + cache.delete(key); + } +}; +class Unpack extends parse_js_1.Parser { + [ENDED] = false; + [CHECKED_CWD] = false; + [PENDING] = 0; + reservations = new path_reservations_js_1.PathReservations(); + transform; + writable = true; + readable = false; + dirCache; + uid; + gid; + setOwner; + preserveOwner; + processGid; + processUid; + maxDepth; + forceChown; + win32; + newer; + keep; + noMtime; + preservePaths; + unlink; + cwd; + strip; + processUmask; + umask; + dmode; + fmode; + chmod; + constructor(opt = {}) { + opt.ondone = () => { + this[ENDED] = true; + this[MAYBECLOSE](); + }; + super(opt); + this.transform = opt.transform; + this.dirCache = opt.dirCache || new Map(); + this.chmod = !!opt.chmod; + if (typeof opt.uid === 'number' || typeof opt.gid === 'number') { + // need both or neither + if (typeof opt.uid !== 'number' || + typeof opt.gid !== 'number') { + throw new TypeError('cannot set owner without number uid and gid'); + } + if (opt.preserveOwner) { + throw new TypeError('cannot preserve owner in archive and also set owner explicitly'); + } + this.uid = opt.uid; + this.gid = opt.gid; + this.setOwner = true; + } + else { + this.uid = undefined; + this.gid = undefined; + this.setOwner = false; + } + // default true for root + if (opt.preserveOwner === undefined && + typeof opt.uid !== 'number') { + this.preserveOwner = !!(process.getuid && process.getuid() === 0); + } + else { + this.preserveOwner = !!opt.preserveOwner; + } + this.processUid = + (this.preserveOwner || this.setOwner) && process.getuid ? + process.getuid() + : undefined; + this.processGid = + (this.preserveOwner || this.setOwner) && process.getgid ? + process.getgid() + : undefined; + // prevent excessively deep nesting of subfolders + // set to `Infinity` to remove this restriction + this.maxDepth = + typeof opt.maxDepth === 'number' ? + opt.maxDepth + : DEFAULT_MAX_DEPTH; + // mostly just for testing, but useful in some cases. + // Forcibly trigger a chown on every entry, no matter what + this.forceChown = opt.forceChown === true; + // turn > this[ONENTRY](entry)); + } + // a bad or damaged archive is a warning for Parser, but an error + // when extracting. Mark those errors as unrecoverable, because + // the Unpack contract cannot be met. + warn(code, msg, data = {}) { + if (code === 'TAR_BAD_ARCHIVE' || code === 'TAR_ABORT') { + data.recoverable = false; + } + return super.warn(code, msg, data); + } + [MAYBECLOSE]() { + if (this[ENDED] && this[PENDING] === 0) { + this.emit('prefinish'); + this.emit('finish'); + this.emit('end'); + } + } + [CHECKPATH](entry) { + const p = (0, normalize_windows_path_js_1.normalizeWindowsPath)(entry.path); + const parts = p.split('/'); + if (this.strip) { + if (parts.length < this.strip) { + return false; + } + if (entry.type === 'Link') { + const linkparts = (0, normalize_windows_path_js_1.normalizeWindowsPath)(String(entry.linkpath)).split('/'); + if (linkparts.length >= this.strip) { + entry.linkpath = linkparts.slice(this.strip).join('/'); + } + else { + return false; + } + } + parts.splice(0, this.strip); + entry.path = parts.join('/'); + } + if (isFinite(this.maxDepth) && parts.length > this.maxDepth) { + this.warn('TAR_ENTRY_ERROR', 'path excessively deep', { + entry, + path: p, + depth: parts.length, + maxDepth: this.maxDepth, + }); + return false; + } + if (!this.preservePaths) { + if (parts.includes('..') || + /* c8 ignore next */ + (isWindows && /^[a-z]:\.\.$/i.test(parts[0] ?? ''))) { + this.warn('TAR_ENTRY_ERROR', `path contains '..'`, { + entry, + path: p, + }); + return false; + } + // strip off the root + const [root, stripped] = (0, strip_absolute_path_js_1.stripAbsolutePath)(p); + if (root) { + entry.path = String(stripped); + this.warn('TAR_ENTRY_INFO', `stripping ${root} from absolute path`, { + entry, + path: p, + }); + } + } + if (node_path_1.default.isAbsolute(entry.path)) { + entry.absolute = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.resolve(entry.path)); + } + else { + entry.absolute = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.resolve(this.cwd, entry.path)); + } + // if we somehow ended up with a path that escapes the cwd, and we are + // not in preservePaths mode, then something is fishy! This should have + // been prevented above, so ignore this for coverage. + /* c8 ignore start - defense in depth */ + if (!this.preservePaths && + typeof entry.absolute === 'string' && + entry.absolute.indexOf(this.cwd + '/') !== 0 && + entry.absolute !== this.cwd) { + this.warn('TAR_ENTRY_ERROR', 'path escaped extraction target', { + entry, + path: (0, normalize_windows_path_js_1.normalizeWindowsPath)(entry.path), + resolvedPath: entry.absolute, + cwd: this.cwd, + }); + return false; + } + /* c8 ignore stop */ + // an archive can set properties on the extraction directory, but it + // may not replace the cwd with a different kind of thing entirely. + if (entry.absolute === this.cwd && + entry.type !== 'Directory' && + entry.type !== 'GNUDumpDir') { + return false; + } + // only encode : chars that aren't drive letter indicators + if (this.win32) { + const { root: aRoot } = node_path_1.default.win32.parse(String(entry.absolute)); + entry.absolute = + aRoot + wc.encode(String(entry.absolute).slice(aRoot.length)); + const { root: pRoot } = node_path_1.default.win32.parse(entry.path); + entry.path = pRoot + wc.encode(entry.path.slice(pRoot.length)); + } + return true; + } + [ONENTRY](entry) { + if (!this[CHECKPATH](entry)) { + return entry.resume(); + } + node_assert_1.default.equal(typeof entry.absolute, 'string'); + switch (entry.type) { + case 'Directory': + case 'GNUDumpDir': + if (entry.mode) { + entry.mode = entry.mode | 0o700; + } + // eslint-disable-next-line no-fallthrough + case 'File': + case 'OldFile': + case 'ContiguousFile': + case 'Link': + case 'SymbolicLink': + return this[CHECKFS](entry); + case 'CharacterDevice': + case 'BlockDevice': + case 'FIFO': + default: + return this[UNSUPPORTED](entry); + } + } + [ONERROR](er, entry) { + // Cwd has to exist, or else nothing works. That's serious. + // Other errors are warnings, which raise the error in strict + // mode, but otherwise continue on. + if (er.name === 'CwdError') { + this.emit('error', er); + } + else { + this.warn('TAR_ENTRY_ERROR', er, { entry }); + this[UNPEND](); + entry.resume(); + } + } + [MKDIR](dir, mode, cb) { + (0, mkdir_js_1.mkdir)((0, normalize_windows_path_js_1.normalizeWindowsPath)(dir), { + uid: this.uid, + gid: this.gid, + processUid: this.processUid, + processGid: this.processGid, + umask: this.processUmask, + preserve: this.preservePaths, + unlink: this.unlink, + cache: this.dirCache, + cwd: this.cwd, + mode: mode, + }, cb); + } + [DOCHOWN](entry) { + // in preserve owner mode, chown if the entry doesn't match process + // in set owner mode, chown if setting doesn't match process + return (this.forceChown || + (this.preserveOwner && + ((typeof entry.uid === 'number' && + entry.uid !== this.processUid) || + (typeof entry.gid === 'number' && + entry.gid !== this.processGid))) || + (typeof this.uid === 'number' && + this.uid !== this.processUid) || + (typeof this.gid === 'number' && this.gid !== this.processGid)); + } + [UID](entry) { + return uint32(this.uid, entry.uid, this.processUid); + } + [GID](entry) { + return uint32(this.gid, entry.gid, this.processGid); + } + [FILE](entry, fullyDone) { + const mode = typeof entry.mode === 'number' ? + entry.mode & 0o7777 + : this.fmode; + const stream = new fsm.WriteStream(String(entry.absolute), { + // slight lie, but it can be numeric flags + flags: (0, get_write_flag_js_1.getWriteFlag)(entry.size), + mode: mode, + autoClose: false, + }); + stream.on('error', (er) => { + if (stream.fd) { + node_fs_1.default.close(stream.fd, () => { }); + } + // flush all the data out so that we aren't left hanging + // if the error wasn't actually fatal. otherwise the parse + // is blocked, and we never proceed. + stream.write = () => true; + this[ONERROR](er, entry); + fullyDone(); + }); + let actions = 1; + const done = (er) => { + if (er) { + /* c8 ignore start - we should always have a fd by now */ + if (stream.fd) { + node_fs_1.default.close(stream.fd, () => { }); + } + /* c8 ignore stop */ + this[ONERROR](er, entry); + fullyDone(); + return; + } + if (--actions === 0) { + if (stream.fd !== undefined) { + node_fs_1.default.close(stream.fd, er => { + if (er) { + this[ONERROR](er, entry); + } + else { + this[UNPEND](); + } + fullyDone(); + }); + } + } + }; + stream.on('finish', () => { + // if futimes fails, try utimes + // if utimes fails, fail with the original error + // same for fchown/chown + const abs = String(entry.absolute); + const fd = stream.fd; + if (typeof fd === 'number' && entry.mtime && !this.noMtime) { + actions++; + const atime = entry.atime || new Date(); + const mtime = entry.mtime; + node_fs_1.default.futimes(fd, atime, mtime, er => er ? + node_fs_1.default.utimes(abs, atime, mtime, er2 => done(er2 && er)) + : done()); + } + if (typeof fd === 'number' && this[DOCHOWN](entry)) { + actions++; + const uid = this[UID](entry); + const gid = this[GID](entry); + if (typeof uid === 'number' && typeof gid === 'number') { + node_fs_1.default.fchown(fd, uid, gid, er => er ? + node_fs_1.default.chown(abs, uid, gid, er2 => done(er2 && er)) + : done()); + } + } + done(); + }); + const tx = this.transform ? this.transform(entry) || entry : entry; + if (tx !== entry) { + tx.on('error', (er) => { + this[ONERROR](er, entry); + fullyDone(); + }); + entry.pipe(tx); + } + tx.pipe(stream); + } + [DIRECTORY](entry, fullyDone) { + const mode = typeof entry.mode === 'number' ? + entry.mode & 0o7777 + : this.dmode; + this[MKDIR](String(entry.absolute), mode, er => { + if (er) { + this[ONERROR](er, entry); + fullyDone(); + return; + } + let actions = 1; + const done = () => { + if (--actions === 0) { + fullyDone(); + this[UNPEND](); + entry.resume(); + } + }; + if (entry.mtime && !this.noMtime) { + actions++; + node_fs_1.default.utimes(String(entry.absolute), entry.atime || new Date(), entry.mtime, done); + } + if (this[DOCHOWN](entry)) { + actions++; + node_fs_1.default.chown(String(entry.absolute), Number(this[UID](entry)), Number(this[GID](entry)), done); + } + done(); + }); + } + [UNSUPPORTED](entry) { + entry.unsupported = true; + this.warn('TAR_ENTRY_UNSUPPORTED', `unsupported entry type: ${entry.type}`, { entry }); + entry.resume(); + } + [SYMLINK](entry, done) { + this[LINK](entry, String(entry.linkpath), 'symlink', done); + } + [HARDLINK](entry, done) { + const linkpath = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.resolve(this.cwd, String(entry.linkpath))); + this[LINK](entry, linkpath, 'link', done); + } + [PEND]() { + this[PENDING]++; + } + [UNPEND]() { + this[PENDING]--; + this[MAYBECLOSE](); + } + [SKIP](entry) { + this[UNPEND](); + entry.resume(); + } + // Check if we can reuse an existing filesystem entry safely and + // overwrite it, rather than unlinking and recreating + // Windows doesn't report a useful nlink, so we just never reuse entries + [ISREUSABLE](entry, st) { + return (entry.type === 'File' && + !this.unlink && + st.isFile() && + st.nlink <= 1 && + !isWindows); + } + // check if a thing is there, and if so, try to clobber it + [CHECKFS](entry) { + this[PEND](); + const paths = [entry.path]; + if (entry.linkpath) { + paths.push(entry.linkpath); + } + this.reservations.reserve(paths, done => this[CHECKFS2](entry, done)); + } + [PRUNECACHE](entry) { + // if we are not creating a directory, and the path is in the dirCache, + // then that means we are about to delete the directory we created + // previously, and it is no longer going to be a directory, and neither + // is any of its children. + // If a symbolic link is encountered, all bets are off. There is no + // reasonable way to sanitize the cache in such a way we will be able to + // avoid having filesystem collisions. If this happens with a non-symlink + // entry, it'll just fail to unpack, but a symlink to a directory, using an + // 8.3 shortname or certain unicode attacks, can evade detection and lead + // to arbitrary writes to anywhere on the system. + if (entry.type === 'SymbolicLink') { + dropCache(this.dirCache); + } + else if (entry.type !== 'Directory') { + pruneCache(this.dirCache, String(entry.absolute)); + } + } + [CHECKFS2](entry, fullyDone) { + this[PRUNECACHE](entry); + const done = (er) => { + this[PRUNECACHE](entry); + fullyDone(er); + }; + const checkCwd = () => { + this[MKDIR](this.cwd, this.dmode, er => { + if (er) { + this[ONERROR](er, entry); + done(); + return; + } + this[CHECKED_CWD] = true; + start(); + }); + }; + const start = () => { + if (entry.absolute !== this.cwd) { + const parent = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.dirname(String(entry.absolute))); + if (parent !== this.cwd) { + return this[MKDIR](parent, this.dmode, er => { + if (er) { + this[ONERROR](er, entry); + done(); + return; + } + afterMakeParent(); + }); + } + } + afterMakeParent(); + }; + const afterMakeParent = () => { + node_fs_1.default.lstat(String(entry.absolute), (lstatEr, st) => { + if (st && + (this.keep || + /* c8 ignore next */ + (this.newer && st.mtime > (entry.mtime ?? st.mtime)))) { + this[SKIP](entry); + done(); + return; + } + if (lstatEr || this[ISREUSABLE](entry, st)) { + return this[MAKEFS](null, entry, done); + } + if (st.isDirectory()) { + if (entry.type === 'Directory') { + const needChmod = this.chmod && + entry.mode && + (st.mode & 0o7777) !== entry.mode; + const afterChmod = (er) => this[MAKEFS](er ?? null, entry, done); + if (!needChmod) { + return afterChmod(); + } + return node_fs_1.default.chmod(String(entry.absolute), Number(entry.mode), afterChmod); + } + // Not a dir entry, have to remove it. + // NB: the only way to end up with an entry that is the cwd + // itself, in such a way that == does not detect, is a + // tricky windows absolute path with UNC or 8.3 parts (and + // preservePaths:true, or else it will have been stripped). + // In that case, the user has opted out of path protections + // explicitly, so if they blow away the cwd, c'est la vie. + if (entry.absolute !== this.cwd) { + return node_fs_1.default.rmdir(String(entry.absolute), (er) => this[MAKEFS](er ?? null, entry, done)); + } + } + // not a dir, and not reusable + // don't remove if the cwd, we want that error + if (entry.absolute === this.cwd) { + return this[MAKEFS](null, entry, done); + } + unlinkFile(String(entry.absolute), er => this[MAKEFS](er ?? null, entry, done)); + }); + }; + if (this[CHECKED_CWD]) { + start(); + } + else { + checkCwd(); + } + } + [MAKEFS](er, entry, done) { + if (er) { + this[ONERROR](er, entry); + done(); + return; + } + switch (entry.type) { + case 'File': + case 'OldFile': + case 'ContiguousFile': + return this[FILE](entry, done); + case 'Link': + return this[HARDLINK](entry, done); + case 'SymbolicLink': + return this[SYMLINK](entry, done); + case 'Directory': + case 'GNUDumpDir': + return this[DIRECTORY](entry, done); + } + } + [LINK](entry, linkpath, link, done) { + // XXX: get the type ('symlink' or 'junction') for windows + node_fs_1.default[link](linkpath, String(entry.absolute), er => { + if (er) { + this[ONERROR](er, entry); + } + else { + this[UNPEND](); + entry.resume(); + } + done(); + }); + } +} +exports.Unpack = Unpack; +const callSync = (fn) => { + try { + return [null, fn()]; + } + catch (er) { + return [er, null]; + } +}; +class UnpackSync extends Unpack { + sync = true; + [MAKEFS](er, entry) { + return super[MAKEFS](er, entry, () => { }); + } + [CHECKFS](entry) { + this[PRUNECACHE](entry); + if (!this[CHECKED_CWD]) { + const er = this[MKDIR](this.cwd, this.dmode); + if (er) { + return this[ONERROR](er, entry); + } + this[CHECKED_CWD] = true; + } + // don't bother to make the parent if the current entry is the cwd, + // we've already checked it. + if (entry.absolute !== this.cwd) { + const parent = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.dirname(String(entry.absolute))); + if (parent !== this.cwd) { + const mkParent = this[MKDIR](parent, this.dmode); + if (mkParent) { + return this[ONERROR](mkParent, entry); + } + } + } + const [lstatEr, st] = callSync(() => node_fs_1.default.lstatSync(String(entry.absolute))); + if (st && + (this.keep || + /* c8 ignore next */ + (this.newer && st.mtime > (entry.mtime ?? st.mtime)))) { + return this[SKIP](entry); + } + if (lstatEr || this[ISREUSABLE](entry, st)) { + return this[MAKEFS](null, entry); + } + if (st.isDirectory()) { + if (entry.type === 'Directory') { + const needChmod = this.chmod && + entry.mode && + (st.mode & 0o7777) !== entry.mode; + const [er] = needChmod ? + callSync(() => { + node_fs_1.default.chmodSync(String(entry.absolute), Number(entry.mode)); + }) + : []; + return this[MAKEFS](er, entry); + } + // not a dir entry, have to remove it + const [er] = callSync(() => node_fs_1.default.rmdirSync(String(entry.absolute))); + this[MAKEFS](er, entry); + } + // not a dir, and not reusable. + // don't remove if it's the cwd, since we want that error. + const [er] = entry.absolute === this.cwd ? + [] + : callSync(() => unlinkFileSync(String(entry.absolute))); + this[MAKEFS](er, entry); + } + [FILE](entry, done) { + const mode = typeof entry.mode === 'number' ? + entry.mode & 0o7777 + : this.fmode; + const oner = (er) => { + let closeError; + try { + node_fs_1.default.closeSync(fd); + } + catch (e) { + closeError = e; + } + if (er || closeError) { + this[ONERROR](er || closeError, entry); + } + done(); + }; + let fd; + try { + fd = node_fs_1.default.openSync(String(entry.absolute), (0, get_write_flag_js_1.getWriteFlag)(entry.size), mode); + } + catch (er) { + return oner(er); + } + const tx = this.transform ? this.transform(entry) || entry : entry; + if (tx !== entry) { + tx.on('error', (er) => this[ONERROR](er, entry)); + entry.pipe(tx); + } + tx.on('data', (chunk) => { + try { + node_fs_1.default.writeSync(fd, chunk, 0, chunk.length); + } + catch (er) { + oner(er); + } + }); + tx.on('end', () => { + let er = null; + // try both, falling futimes back to utimes + // if either fails, handle the first error + if (entry.mtime && !this.noMtime) { + const atime = entry.atime || new Date(); + const mtime = entry.mtime; + try { + node_fs_1.default.futimesSync(fd, atime, mtime); + } + catch (futimeser) { + try { + node_fs_1.default.utimesSync(String(entry.absolute), atime, mtime); + } + catch (utimeser) { + er = futimeser; + } + } + } + if (this[DOCHOWN](entry)) { + const uid = this[UID](entry); + const gid = this[GID](entry); + try { + node_fs_1.default.fchownSync(fd, Number(uid), Number(gid)); + } + catch (fchowner) { + try { + node_fs_1.default.chownSync(String(entry.absolute), Number(uid), Number(gid)); + } + catch (chowner) { + er = er || fchowner; + } + } + } + oner(er); + }); + } + [DIRECTORY](entry, done) { + const mode = typeof entry.mode === 'number' ? + entry.mode & 0o7777 + : this.dmode; + const er = this[MKDIR](String(entry.absolute), mode); + if (er) { + this[ONERROR](er, entry); + done(); + return; + } + if (entry.mtime && !this.noMtime) { + try { + node_fs_1.default.utimesSync(String(entry.absolute), entry.atime || new Date(), entry.mtime); + /* c8 ignore next */ + } + catch (er) { } + } + if (this[DOCHOWN](entry)) { + try { + node_fs_1.default.chownSync(String(entry.absolute), Number(this[UID](entry)), Number(this[GID](entry))); + } + catch (er) { } + } + done(); + entry.resume(); + } + [MKDIR](dir, mode) { + try { + return (0, mkdir_js_1.mkdirSync)((0, normalize_windows_path_js_1.normalizeWindowsPath)(dir), { + uid: this.uid, + gid: this.gid, + processUid: this.processUid, + processGid: this.processGid, + umask: this.processUmask, + preserve: this.preservePaths, + unlink: this.unlink, + cache: this.dirCache, + cwd: this.cwd, + mode: mode, + }); + } + catch (er) { + return er; + } + } + [LINK](entry, linkpath, link, done) { + const ls = `${link}Sync`; + try { + node_fs_1.default[ls](linkpath, String(entry.absolute)); + done(); + entry.resume(); + } + catch (er) { + return this[ONERROR](er, entry); + } + } +} +exports.UnpackSync = UnpackSync; +//# sourceMappingURL=unpack.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/unpack.js.map b/node_modules/tar/dist/commonjs/unpack.js.map new file mode 100644 index 0000000..163d9b9 --- /dev/null +++ b/node_modules/tar/dist/commonjs/unpack.js.map @@ -0,0 +1 @@ +{"version":3,"file":"unpack.js","sourceRoot":"","sources":["../../src/unpack.ts"],"names":[],"mappings":";AAAA,0EAA0E;AAC1E,wEAAwE;AACxE,yEAAyE;AACzE,wEAAwE;AACxE,8DAA8D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE9D,yDAA0C;AAC1C,8DAAgC;AAChC,6CAAyC;AACzC,sDAAwC;AACxC,0DAA4B;AAC5B,2DAAkD;AAClD,yCAAyD;AACzD,iEAAyD;AACzD,2EAAkE;AAClE,yCAAmC;AACnC,qEAA4D;AAC5D,2EAAkE;AAClE,kDAAmC;AAGnC,iEAAyD;AAIzD,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;AACjC,MAAM,OAAO,GAAG,MAAM,CAAC,SA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A;IAChB,CAAC;IAED,CAAC,KAAK,CAAC,CAAC,GAAW,EAAE,IAAY;QAC/B,IAAI,CAAC;YACH,OAAO,IAAA,oBAAS,EAAC,IAAA,gDAAoB,EAAC,GAAG,CAAC,EAAE;gBAC1C,GAAG,EAAE,IAAI,CAAC,GAAG;gBACb,GAAG,EAAE,IAAI,CAAC,GAAG;gBACb,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,KAAK,EAAE,IAAI,CAAC,YAAY;gBACxB,QAAQ,EAAE,IAAI,CAAC,aAAa;gBAC5B,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,KAAK,EAAE,IAAI,CAAC,QAAQ;gBACpB,GAAG,EAAE,IAAI,CAAC,GAAG;gBACb,IAAI,EAAE,IAAI;aACX,CAAC,CAAA;QACJ,CAAC;QAAC,OAAO,EAAE,EAAE,CAAC;YACZ,OAAO,EAAE,CAAA;QACX,CAAC;IACH,CAAC;IAED,CAAC,IAAI,CAAC,CACJ,KAAgB,EAChB,QAAgB,EAChB,IAAwB,EACxB,IAAgB;QAEhB,MAAM,EAAE,GAAyB,GAAG,IAAI,MAAM,CAAA;QAC9C,IAAI,CAAC;YACH,iBAAE,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;YACxC,IAAI,EAAE,CAAA;YACN,KAAK,CAAC,MAAM,EAAE,CAAA;QAChB,CAAC;QAAC,OAAO,EAAE,EAAE,CAAC;YACZ,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,EAAW,EAAE,KAAK,CAAC,CAAA;QAC1C,CAAC;IACH,CAAC;CACF;AAtOD,gCAsOC","sourcesContent":["// the PEND/UNPEND stuff tracks whether we're ready to emit end/close yet.\n// but the path reservations are required to avoid race conditions where\n// parallelized unpack ops may mess with one another, due to dependencies\n// (like a Link depending on its target) or destructive operations (like\n// clobbering an fs object to create one of a different type.)\n\nimport * as fsm from '@isaacs/fs-minipass'\nimport assert from 'node:assert'\nimport { randomBytes } from 'node:crypto'\nimport fs, { type Stats } from 'node:fs'\nimport path from 'node:path'\nimport { getWriteFlag } from './get-write-flag.js'\nimport { mkdir, MkdirError, mkdirSync } from './mkdir.js'\nimport { normalizeUnicode } from './normalize-unicode.js'\nimport { normalizeWindowsPath } from './normalize-windows-path.js'\nimport { Parser } from './parse.js'\nimport { stripAbsolutePath } from './strip-absolute-path.js'\nimport { stripTrailingSlashes } from './strip-trailing-slashes.js'\nimport * as wc from './winchars.js'\n\nimport { TarOptions } from './options.js'\nimport { PathReservations } from './path-reservations.js'\nimport { ReadEntry } from './read-entry.js'\nimport { WarnData } from './warn-method.js'\n\nconst ONENTRY = Symbol('onEntry')\nconst CHECKFS = Symbol('checkFs')\nconst CHECKFS2 = Symbol('checkFs2')\nconst PRUNECACHE = Symbol('pruneCache')\nconst ISREUSABLE = Symbol('isReusable')\nconst MAKEFS = Symbol('makeFs')\nconst FILE = Symbol('file')\nconst DIRECTORY = Symbol('directory')\nconst LINK = Symbol('link')\nconst SYMLINK = Symbol('symlink')\nconst HARDLINK = Symbol('hardlink')\nconst UNSUPPORTED = Symbol('unsupported')\nconst CHECKPATH = Symbol('checkPath')\nconst MKDIR = Symbol('mkdir')\nconst ONERROR = Symbol('onError')\nconst PENDING = Symbol('pending')\nconst PEND = Symbol('pend')\nconst UNPEND = Symbol('unpend')\nconst ENDED = Symbol('ended')\nconst MAYBECLOSE = Symbol('maybeClose')\nconst SKIP = Symbol('skip')\nconst DOCHOWN = Symbol('doChown')\nconst UID = Symbol('uid')\nconst GID = Symbol('gid')\nconst CHECKED_CWD = Symbol('checkedCwd')\nconst platform =\n process.env.TESTING_TAR_FAKE_PLATFORM || process.platform\nconst isWindows = platform === 'win32'\nconst DEFAULT_MAX_DEPTH = 1024\n\n// Unlinks on Windows are not atomic.\n//\n// This means that if you have a file entry, followed by another\n// file entry with an identical name, and you cannot re-use the file\n// (because it's a hardlink, or because unlink:true is set, or it's\n// Windows, which does not have useful nlink values), then the unlink\n// will be committed to the disk AFTER the new file has been written\n// over the old one, deleting the new file.\n//\n// To work around this, on Windows systems, we rename the file and then\n// delete the renamed file. It's a sloppy kludge, but frankly, I do not\n// know of a better way to do this, given windows' non-atomic unlink\n// semantics.\n//\n// See: https://github.com/npm/node-tar/issues/183\n/* c8 ignore start */\nconst unlinkFile = (\n path: string,\n cb: (er?: Error | null) => void,\n) => {\n if (!isWindows) {\n return fs.unlink(path, cb)\n }\n\n const name = path + '.DELETE.' + randomBytes(16).toString('hex')\n fs.rename(path, name, er => {\n if (er) {\n return cb(er)\n }\n fs.unlink(name, cb)\n })\n}\n/* c8 ignore stop */\n\n/* c8 ignore start */\nconst unlinkFileSync = (path: string) => {\n if (!isWindows) {\n return fs.unlinkSync(path)\n }\n\n const name = path + '.DELETE.' + randomBytes(16).toString('hex')\n fs.renameSync(path, name)\n fs.unlinkSync(name)\n}\n/* c8 ignore stop */\n\n// this.gid, entry.gid, this.processUid\nconst uint32 = (\n a: number | undefined,\n b: number | undefined,\n c: number | undefined,\n) =>\n a !== undefined && a === a >>> 0 ? a\n : b !== undefined && b === b >>> 0 ? b\n : c\n\n// clear the cache if it's a case-insensitive unicode-squashing match.\n// we can't know if the current file system is case-sensitive or supports\n// unicode fully, so we check for similarity on the maximally compatible\n// representation. Err on the side of pruning, since all it's doing is\n// preventing lstats, and it's not the end of the world if we get a false\n// positive.\n// Note that on windows, we always drop the entire cache whenever a\n// symbolic link is encountered, because 8.3 filenames are impossible\n// to reason about, and collisions are hazards rather than just failures.\nconst cacheKeyNormalize = (path: string) =>\n stripTrailingSlashes(\n normalizeWindowsPath(normalizeUnicode(path)),\n ).toLowerCase()\n\n// remove all cache entries matching ${abs}/**\nconst pruneCache = (cache: Map, abs: string) => {\n abs = cacheKeyNormalize(abs)\n for (const path of cache.keys()) {\n const pnorm = cacheKeyNormalize(path)\n if (pnorm === abs || pnorm.indexOf(abs + '/') === 0) {\n cache.delete(path)\n }\n }\n}\n\nconst dropCache = (cache: Map) => {\n for (const key of cache.keys()) {\n cache.delete(key)\n }\n}\n\nexport class Unpack extends Parser {\n [ENDED]: boolean = false;\n [CHECKED_CWD]: boolean = false;\n [PENDING]: number = 0\n\n reservations: PathReservations = new PathReservations()\n transform?: TarOptions['transform']\n writable: true = true\n readable: false = false\n dirCache: Exclude\n uid?: number\n gid?: number\n setOwner: boolean\n preserveOwner: boolean\n processGid?: number\n processUid?: number\n maxDepth: number\n forceChown: boolean\n win32: boolean\n newer: boolean\n keep: boolean\n noMtime: boolean\n preservePaths: boolean\n unlink: boolean\n cwd: string\n strip: number\n processUmask: number\n umask: number\n dmode: number\n fmode: number\n chmod: boolean\n\n constructor(opt: TarOptions = {}) {\n opt.ondone = () => {\n this[ENDED] = true\n this[MAYBECLOSE]()\n }\n\n super(opt)\n\n this.transform = opt.transform\n\n this.dirCache = opt.dirCache || new Map()\n this.chmod = !!opt.chmod\n\n if (typeof opt.uid === 'number' || typeof opt.gid === 'number') {\n // need both or neither\n if (\n typeof opt.uid !== 'number' ||\n typeof opt.gid !== 'number'\n ) {\n throw new TypeError(\n 'cannot set owner without number uid and gid',\n )\n }\n if (opt.preserveOwner) {\n throw new TypeError(\n 'cannot preserve owner in archive and also set owner explicitly',\n )\n }\n this.uid = opt.uid\n this.gid = opt.gid\n this.setOwner = true\n } else {\n this.uid = undefined\n this.gid = undefined\n this.setOwner = false\n }\n\n // default true for root\n if (\n opt.preserveOwner === undefined &&\n typeof opt.uid !== 'number'\n ) {\n this.preserveOwner = !!(\n process.getuid && process.getuid() === 0\n )\n } else {\n this.preserveOwner = !!opt.preserveOwner\n }\n\n this.processUid =\n (this.preserveOwner || this.setOwner) && process.getuid ?\n process.getuid()\n : undefined\n this.processGid =\n (this.preserveOwner || this.setOwner) && process.getgid ?\n process.getgid()\n : undefined\n\n // prevent excessively deep nesting of subfolders\n // set to `Infinity` to remove this restriction\n this.maxDepth =\n typeof opt.maxDepth === 'number' ?\n opt.maxDepth\n : DEFAULT_MAX_DEPTH\n\n // mostly just for testing, but useful in some cases.\n // Forcibly trigger a chown on every entry, no matter what\n this.forceChown = opt.forceChown === true\n\n // turn > this[ONENTRY](entry))\n }\n\n // a bad or damaged archive is a warning for Parser, but an error\n // when extracting. Mark those errors as unrecoverable, because\n // the Unpack contract cannot be met.\n warn(code: string, msg: string | Error, data: WarnData = {}) {\n if (code === 'TAR_BAD_ARCHIVE' || code === 'TAR_ABORT') {\n data.recoverable = false\n }\n return super.warn(code, msg, data)\n }\n\n [MAYBECLOSE]() {\n if (this[ENDED] && this[PENDING] === 0) {\n this.emit('prefinish')\n this.emit('finish')\n this.emit('end')\n }\n }\n\n [CHECKPATH](entry: ReadEntry) {\n const p = normalizeWindowsPath(entry.path)\n const parts = p.split('/')\n\n if (this.strip) {\n if (parts.length < this.strip) {\n return false\n }\n if (entry.type === 'Link') {\n const linkparts = normalizeWindowsPath(\n String(entry.linkpath),\n ).split('/')\n if (linkparts.length >= this.strip) {\n entry.linkpath = linkparts.slice(this.strip).join('/')\n } else {\n return false\n }\n }\n parts.splice(0, this.strip)\n entry.path = parts.join('/')\n }\n\n if (isFinite(this.maxDepth) && parts.length > this.maxDepth) {\n this.warn('TAR_ENTRY_ERROR', 'path excessively deep', {\n entry,\n path: p,\n depth: parts.length,\n maxDepth: this.maxDepth,\n })\n return false\n }\n\n if (!this.preservePaths) {\n if (\n parts.includes('..') ||\n /* c8 ignore next */\n (isWindows && /^[a-z]:\\.\\.$/i.test(parts[0] ?? ''))\n ) {\n this.warn('TAR_ENTRY_ERROR', `path contains '..'`, {\n entry,\n path: p,\n })\n return false\n }\n\n // strip off the root\n const [root, stripped] = stripAbsolutePath(p)\n if (root) {\n entry.path = String(stripped)\n this.warn(\n 'TAR_ENTRY_INFO',\n `stripping ${root} from absolute path`,\n {\n entry,\n path: p,\n },\n )\n }\n }\n\n if (path.isAbsolute(entry.path)) {\n entry.absolute = normalizeWindowsPath(path.resolve(entry.path))\n } else {\n entry.absolute = normalizeWindowsPath(\n path.resolve(this.cwd, entry.path),\n )\n }\n\n // if we somehow ended up with a path that escapes the cwd, and we are\n // not in preservePaths mode, then something is fishy! This should have\n // been prevented above, so ignore this for coverage.\n /* c8 ignore start - defense in depth */\n if (\n !this.preservePaths &&\n typeof entry.absolute === 'string' &&\n entry.absolute.indexOf(this.cwd + '/') !== 0 &&\n entry.absolute !== this.cwd\n ) {\n this.warn('TAR_ENTRY_ERROR', 'path escaped extraction target', {\n entry,\n path: normalizeWindowsPath(entry.path),\n resolvedPath: entry.absolute,\n cwd: this.cwd,\n })\n return false\n }\n /* c8 ignore stop */\n\n // an archive can set properties on the extraction directory, but it\n // may not replace the cwd with a different kind of thing entirely.\n if (\n entry.absolute === this.cwd &&\n entry.type !== 'Directory' &&\n entry.type !== 'GNUDumpDir'\n ) {\n return false\n }\n\n // only encode : chars that aren't drive letter indicators\n if (this.win32) {\n const { root: aRoot } = path.win32.parse(String(entry.absolute))\n entry.absolute =\n aRoot + wc.encode(String(entry.absolute).slice(aRoot.length))\n const { root: pRoot } = path.win32.parse(entry.path)\n entry.path = pRoot + wc.encode(entry.path.slice(pRoot.length))\n }\n\n return true\n }\n\n [ONENTRY](entry: ReadEntry) {\n if (!this[CHECKPATH](entry)) {\n return entry.resume()\n }\n\n assert.equal(typeof entry.absolute, 'string')\n\n switch (entry.type) {\n case 'Directory':\n case 'GNUDumpDir':\n if (entry.mode) {\n entry.mode = entry.mode | 0o700\n }\n\n // eslint-disable-next-line no-fallthrough\n case 'File':\n case 'OldFile':\n case 'ContiguousFile':\n case 'Link':\n case 'SymbolicLink':\n return this[CHECKFS](entry)\n\n case 'CharacterDevice':\n case 'BlockDevice':\n case 'FIFO':\n default:\n return this[UNSUPPORTED](entry)\n }\n }\n\n [ONERROR](er: Error, entry: ReadEntry) {\n // Cwd has to exist, or else nothing works. That's serious.\n // Other errors are warnings, which raise the error in strict\n // mode, but otherwise continue on.\n if (er.name === 'CwdError') {\n this.emit('error', er)\n } else {\n this.warn('TAR_ENTRY_ERROR', er, { entry })\n this[UNPEND]()\n entry.resume()\n }\n }\n\n [MKDIR](\n dir: string,\n mode: number,\n cb: (er?: null | MkdirError, made?: string) => void,\n ) {\n mkdir(\n normalizeWindowsPath(dir),\n {\n uid: this.uid,\n gid: this.gid,\n processUid: this.processUid,\n processGid: this.processGid,\n umask: this.processUmask,\n preserve: this.preservePaths,\n unlink: this.unlink,\n cache: this.dirCache,\n cwd: this.cwd,\n mode: mode,\n },\n cb,\n )\n }\n\n [DOCHOWN](entry: ReadEntry) {\n // in preserve owner mode, chown if the entry doesn't match process\n // in set owner mode, chown if setting doesn't match process\n return (\n this.forceChown ||\n (this.preserveOwner &&\n ((typeof entry.uid === 'number' &&\n entry.uid !== this.processUid) ||\n (typeof entry.gid === 'number' &&\n entry.gid !== this.processGid))) ||\n (typeof this.uid === 'number' &&\n this.uid !== this.processUid) ||\n (typeof this.gid === 'number' && this.gid !== this.processGid)\n )\n }\n\n [UID](entry: ReadEntry) {\n return uint32(this.uid, entry.uid, this.processUid)\n }\n\n [GID](entry: ReadEntry) {\n return uint32(this.gid, entry.gid, this.processGid)\n }\n\n [FILE](entry: ReadEntry, fullyDone: () => void) {\n const mode =\n typeof entry.mode === 'number' ?\n entry.mode & 0o7777\n : this.fmode\n const stream = new fsm.WriteStream(String(entry.absolute), {\n // slight lie, but it can be numeric flags\n flags: getWriteFlag(entry.size) as string,\n mode: mode,\n autoClose: false,\n })\n stream.on('error', (er: Error) => {\n if (stream.fd) {\n fs.close(stream.fd, () => {})\n }\n\n // flush all the data out so that we aren't left hanging\n // if the error wasn't actually fatal. otherwise the parse\n // is blocked, and we never proceed.\n stream.write = () => true\n this[ONERROR](er, entry)\n fullyDone()\n })\n\n let actions = 1\n const done = (er?: null | Error) => {\n if (er) {\n /* c8 ignore start - we should always have a fd by now */\n if (stream.fd) {\n fs.close(stream.fd, () => {})\n }\n /* c8 ignore stop */\n\n this[ONERROR](er, entry)\n fullyDone()\n return\n }\n\n if (--actions === 0) {\n if (stream.fd !== undefined) {\n fs.close(stream.fd, er => {\n if (er) {\n this[ONERROR](er, entry)\n } else {\n this[UNPEND]()\n }\n fullyDone()\n })\n }\n }\n }\n\n stream.on('finish', () => {\n // if futimes fails, try utimes\n // if utimes fails, fail with the original error\n // same for fchown/chown\n const abs = String(entry.absolute)\n const fd = stream.fd\n\n if (typeof fd === 'number' && entry.mtime && !this.noMtime) {\n actions++\n const atime = entry.atime || new Date()\n const mtime = entry.mtime\n fs.futimes(fd, atime, mtime, er =>\n er ?\n fs.utimes(abs, atime, mtime, er2 => done(er2 && er))\n : done(),\n )\n }\n\n if (typeof fd === 'number' && this[DOCHOWN](entry)) {\n actions++\n const uid = this[UID](entry)\n const gid = this[GID](entry)\n if (typeof uid === 'number' && typeof gid === 'number') {\n fs.fchown(fd, uid, gid, er =>\n er ?\n fs.chown(abs, uid, gid, er2 => done(er2 && er))\n : done(),\n )\n }\n }\n\n done()\n })\n\n const tx = this.transform ? this.transform(entry) || entry : entry\n if (tx !== entry) {\n tx.on('error', (er: Error) => {\n this[ONERROR](er, entry)\n fullyDone()\n })\n entry.pipe(tx)\n }\n tx.pipe(stream)\n }\n\n [DIRECTORY](entry: ReadEntry, fullyDone: () => void) {\n const mode =\n typeof entry.mode === 'number' ?\n entry.mode & 0o7777\n : this.dmode\n this[MKDIR](String(entry.absolute), mode, er => {\n if (er) {\n this[ONERROR](er, entry)\n fullyDone()\n return\n }\n\n let actions = 1\n const done = () => {\n if (--actions === 0) {\n fullyDone()\n this[UNPEND]()\n entry.resume()\n }\n }\n\n if (entry.mtime && !this.noMtime) {\n actions++\n fs.utimes(\n String(entry.absolute),\n entry.atime || new Date(),\n entry.mtime,\n done,\n )\n }\n\n if (this[DOCHOWN](entry)) {\n actions++\n fs.chown(\n String(entry.absolute),\n Number(this[UID](entry)),\n Number(this[GID](entry)),\n done,\n )\n }\n\n done()\n })\n }\n\n [UNSUPPORTED](entry: ReadEntry) {\n entry.unsupported = true\n this.warn(\n 'TAR_ENTRY_UNSUPPORTED',\n `unsupported entry type: ${entry.type}`,\n { entry },\n )\n entry.resume()\n }\n\n [SYMLINK](entry: ReadEntry, done: () => void) {\n this[LINK](entry, String(entry.linkpath), 'symlink', done)\n }\n\n [HARDLINK](entry: ReadEntry, done: () => void) {\n const linkpath = normalizeWindowsPath(\n path.resolve(this.cwd, String(entry.linkpath)),\n )\n this[LINK](entry, linkpath, 'link', done)\n }\n\n [PEND]() {\n this[PENDING]++\n }\n\n [UNPEND]() {\n this[PENDING]--\n this[MAYBECLOSE]()\n }\n\n [SKIP](entry: ReadEntry) {\n this[UNPEND]()\n entry.resume()\n }\n\n // Check if we can reuse an existing filesystem entry safely and\n // overwrite it, rather than unlinking and recreating\n // Windows doesn't report a useful nlink, so we just never reuse entries\n [ISREUSABLE](entry: ReadEntry, st: Stats) {\n return (\n entry.type === 'File' &&\n !this.unlink &&\n st.isFile() &&\n st.nlink <= 1 &&\n !isWindows\n )\n }\n\n // check if a thing is there, and if so, try to clobber it\n [CHECKFS](entry: ReadEntry) {\n this[PEND]()\n const paths = [entry.path]\n if (entry.linkpath) {\n paths.push(entry.linkpath)\n }\n this.reservations.reserve(paths, done =>\n this[CHECKFS2](entry, done),\n )\n }\n\n [PRUNECACHE](entry: ReadEntry) {\n // if we are not creating a directory, and the path is in the dirCache,\n // then that means we are about to delete the directory we created\n // previously, and it is no longer going to be a directory, and neither\n // is any of its children.\n // If a symbolic link is encountered, all bets are off. There is no\n // reasonable way to sanitize the cache in such a way we will be able to\n // avoid having filesystem collisions. If this happens with a non-symlink\n // entry, it'll just fail to unpack, but a symlink to a directory, using an\n // 8.3 shortname or certain unicode attacks, can evade detection and lead\n // to arbitrary writes to anywhere on the system.\n if (entry.type === 'SymbolicLink') {\n dropCache(this.dirCache)\n } else if (entry.type !== 'Directory') {\n pruneCache(this.dirCache, String(entry.absolute))\n }\n }\n\n [CHECKFS2](entry: ReadEntry, fullyDone: (er?: Error) => void) {\n this[PRUNECACHE](entry)\n\n const done = (er?: Error) => {\n this[PRUNECACHE](entry)\n fullyDone(er)\n }\n\n const checkCwd = () => {\n this[MKDIR](this.cwd, this.dmode, er => {\n if (er) {\n this[ONERROR](er, entry)\n done()\n return\n }\n this[CHECKED_CWD] = true\n start()\n })\n }\n\n const start = () => {\n if (entry.absolute !== this.cwd) {\n const parent = normalizeWindowsPath(\n path.dirname(String(entry.absolute)),\n )\n if (parent !== this.cwd) {\n return this[MKDIR](parent, this.dmode, er => {\n if (er) {\n this[ONERROR](er, entry)\n done()\n return\n }\n afterMakeParent()\n })\n }\n }\n afterMakeParent()\n }\n\n const afterMakeParent = () => {\n fs.lstat(String(entry.absolute), (lstatEr, st) => {\n if (\n st &&\n (this.keep ||\n /* c8 ignore next */\n (this.newer && st.mtime > (entry.mtime ?? st.mtime)))\n ) {\n this[SKIP](entry)\n done()\n return\n }\n if (lstatEr || this[ISREUSABLE](entry, st)) {\n return this[MAKEFS](null, entry, done)\n }\n\n if (st.isDirectory()) {\n if (entry.type === 'Directory') {\n const needChmod =\n this.chmod &&\n entry.mode &&\n (st.mode & 0o7777) !== entry.mode\n const afterChmod = (er?: Error | null | undefined) =>\n this[MAKEFS](er ?? null, entry, done)\n if (!needChmod) {\n return afterChmod()\n }\n return fs.chmod(\n String(entry.absolute),\n Number(entry.mode),\n afterChmod,\n )\n }\n // Not a dir entry, have to remove it.\n // NB: the only way to end up with an entry that is the cwd\n // itself, in such a way that == does not detect, is a\n // tricky windows absolute path with UNC or 8.3 parts (and\n // preservePaths:true, or else it will have been stripped).\n // In that case, the user has opted out of path protections\n // explicitly, so if they blow away the cwd, c'est la vie.\n if (entry.absolute !== this.cwd) {\n return fs.rmdir(\n String(entry.absolute),\n (er?: null | Error) =>\n this[MAKEFS](er ?? null, entry, done),\n )\n }\n }\n\n // not a dir, and not reusable\n // don't remove if the cwd, we want that error\n if (entry.absolute === this.cwd) {\n return this[MAKEFS](null, entry, done)\n }\n\n unlinkFile(String(entry.absolute), er =>\n this[MAKEFS](er ?? null, entry, done),\n )\n })\n }\n\n if (this[CHECKED_CWD]) {\n start()\n } else {\n checkCwd()\n }\n }\n\n [MAKEFS](\n er: null | undefined | Error,\n entry: ReadEntry,\n done: () => void,\n ) {\n if (er) {\n this[ONERROR](er, entry)\n done()\n return\n }\n\n switch (entry.type) {\n case 'File':\n case 'OldFile':\n case 'ContiguousFile':\n return this[FILE](entry, done)\n\n case 'Link':\n return this[HARDLINK](entry, done)\n\n case 'SymbolicLink':\n return this[SYMLINK](entry, done)\n\n case 'Directory':\n case 'GNUDumpDir':\n return this[DIRECTORY](entry, done)\n }\n }\n\n [LINK](\n entry: ReadEntry,\n linkpath: string,\n link: 'link' | 'symlink',\n done: () => void,\n ) {\n // XXX: get the type ('symlink' or 'junction') for windows\n fs[link](linkpath, String(entry.absolute), er => {\n if (er) {\n this[ONERROR](er, entry)\n } else {\n this[UNPEND]()\n entry.resume()\n }\n done()\n })\n }\n}\n\nconst callSync = (fn: () => any) => {\n try {\n return [null, fn()]\n } catch (er) {\n return [er, null]\n }\n}\n\nexport class UnpackSync extends Unpack {\n sync: true = true;\n\n [MAKEFS](er: null | Error | undefined, entry: ReadEntry) {\n return super[MAKEFS](er, entry, () => {})\n }\n\n [CHECKFS](entry: ReadEntry) {\n this[PRUNECACHE](entry)\n\n if (!this[CHECKED_CWD]) {\n const er = this[MKDIR](this.cwd, this.dmode)\n if (er) {\n return this[ONERROR](er as Error, entry)\n }\n this[CHECKED_CWD] = true\n }\n\n // don't bother to make the parent if the current entry is the cwd,\n // we've already checked it.\n if (entry.absolute !== this.cwd) {\n const parent = normalizeWindowsPath(\n path.dirname(String(entry.absolute)),\n )\n if (parent !== this.cwd) {\n const mkParent = this[MKDIR](parent, this.dmode)\n if (mkParent) {\n return this[ONERROR](mkParent as Error, entry)\n }\n }\n }\n\n const [lstatEr, st] = callSync(() =>\n fs.lstatSync(String(entry.absolute)),\n )\n if (\n st &&\n (this.keep ||\n /* c8 ignore next */\n (this.newer && st.mtime > (entry.mtime ?? st.mtime)))\n ) {\n return this[SKIP](entry)\n }\n\n if (lstatEr || this[ISREUSABLE](entry, st)) {\n return this[MAKEFS](null, entry)\n }\n\n if (st.isDirectory()) {\n if (entry.type === 'Directory') {\n const needChmod =\n this.chmod &&\n entry.mode &&\n (st.mode & 0o7777) !== entry.mode\n const [er] =\n needChmod ?\n callSync(() => {\n fs.chmodSync(String(entry.absolute), Number(entry.mode))\n })\n : []\n return this[MAKEFS](er, entry)\n }\n // not a dir entry, have to remove it\n const [er] = callSync(() =>\n fs.rmdirSync(String(entry.absolute)),\n )\n this[MAKEFS](er, entry)\n }\n\n // not a dir, and not reusable.\n // don't remove if it's the cwd, since we want that error.\n const [er] =\n entry.absolute === this.cwd ?\n []\n : callSync(() => unlinkFileSync(String(entry.absolute)))\n this[MAKEFS](er, entry)\n }\n\n [FILE](entry: ReadEntry, done: () => void) {\n const mode =\n typeof entry.mode === 'number' ?\n entry.mode & 0o7777\n : this.fmode\n\n const oner = (er?: null | Error | undefined) => {\n let closeError\n try {\n fs.closeSync(fd)\n } catch (e) {\n closeError = e\n }\n if (er || closeError) {\n this[ONERROR]((er as Error) || closeError, entry)\n }\n done()\n }\n\n let fd: number\n try {\n fd = fs.openSync(\n String(entry.absolute),\n getWriteFlag(entry.size),\n mode,\n )\n } catch (er) {\n return oner(er as Error)\n }\n const tx = this.transform ? this.transform(entry) || entry : entry\n if (tx !== entry) {\n tx.on('error', (er: Error) => this[ONERROR](er, entry))\n entry.pipe(tx)\n }\n\n tx.on('data', (chunk: Buffer) => {\n try {\n fs.writeSync(fd, chunk, 0, chunk.length)\n } catch (er) {\n oner(er as Error)\n }\n })\n\n tx.on('end', () => {\n let er = null\n // try both, falling futimes back to utimes\n // if either fails, handle the first error\n if (entry.mtime && !this.noMtime) {\n const atime = entry.atime || new Date()\n const mtime = entry.mtime\n try {\n fs.futimesSync(fd, atime, mtime)\n } catch (futimeser) {\n try {\n fs.utimesSync(String(entry.absolute), atime, mtime)\n } catch (utimeser) {\n er = futimeser\n }\n }\n }\n\n if (this[DOCHOWN](entry)) {\n const uid = this[UID](entry)\n const gid = this[GID](entry)\n\n try {\n fs.fchownSync(fd, Number(uid), Number(gid))\n } catch (fchowner) {\n try {\n fs.chownSync(\n String(entry.absolute),\n Number(uid),\n Number(gid),\n )\n } catch (chowner) {\n er = er || fchowner\n }\n }\n }\n\n oner(er as Error)\n })\n }\n\n [DIRECTORY](entry: ReadEntry, done: () => void) {\n const mode =\n typeof entry.mode === 'number' ?\n entry.mode & 0o7777\n : this.dmode\n const er = this[MKDIR](String(entry.absolute), mode)\n if (er) {\n this[ONERROR](er as Error, entry)\n done()\n return\n }\n if (entry.mtime && !this.noMtime) {\n try {\n fs.utimesSync(\n String(entry.absolute),\n entry.atime || new Date(),\n entry.mtime,\n )\n /* c8 ignore next */\n } catch (er) {}\n }\n if (this[DOCHOWN](entry)) {\n try {\n fs.chownSync(\n String(entry.absolute),\n Number(this[UID](entry)),\n Number(this[GID](entry)),\n )\n } catch (er) {}\n }\n done()\n entry.resume()\n }\n\n [MKDIR](dir: string, mode: number) {\n try {\n return mkdirSync(normalizeWindowsPath(dir), {\n uid: this.uid,\n gid: this.gid,\n processUid: this.processUid,\n processGid: this.processGid,\n umask: this.processUmask,\n preserve: this.preservePaths,\n unlink: this.unlink,\n cache: this.dirCache,\n cwd: this.cwd,\n mode: mode,\n })\n } catch (er) {\n return er\n }\n }\n\n [LINK](\n entry: ReadEntry,\n linkpath: string,\n link: 'link' | 'symlink',\n done: () => void,\n ) {\n const ls: `${typeof link}Sync` = `${link}Sync`\n try {\n fs[ls](linkpath, String(entry.absolute))\n done()\n entry.resume()\n } catch (er) {\n return this[ONERROR](er as Error, entry)\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/update.d.ts b/node_modules/tar/dist/commonjs/update.d.ts new file mode 100644 index 0000000..45784eb --- /dev/null +++ b/node_modules/tar/dist/commonjs/update.d.ts @@ -0,0 +1,2 @@ +export declare const update: import("./make-command.js").TarCommand; +//# sourceMappingURL=update.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/update.d.ts.map b/node_modules/tar/dist/commonjs/update.d.ts.map new file mode 100644 index 0000000..4f2ff18 --- /dev/null +++ b/node_modules/tar/dist/commonjs/update.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/update.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM,sDASlB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/update.js b/node_modules/tar/dist/commonjs/update.js new file mode 100644 index 0000000..7687896 --- /dev/null +++ b/node_modules/tar/dist/commonjs/update.js @@ -0,0 +1,33 @@ +"use strict"; +// tar -u +Object.defineProperty(exports, "__esModule", { value: true }); +exports.update = void 0; +const make_command_js_1 = require("./make-command.js"); +const replace_js_1 = require("./replace.js"); +// just call tar.r with the filter and mtimeCache +exports.update = (0, make_command_js_1.makeCommand)(replace_js_1.replace.syncFile, replace_js_1.replace.asyncFile, replace_js_1.replace.syncNoFile, replace_js_1.replace.asyncNoFile, (opt, entries = []) => { + replace_js_1.replace.validate?.(opt, entries); + mtimeFilter(opt); +}); +const mtimeFilter = (opt) => { + const filter = opt.filter; + if (!opt.mtimeCache) { + opt.mtimeCache = new Map(); + } + opt.filter = + filter ? + (path, stat) => filter(path, stat) && + !( + /* c8 ignore start */ + ((opt.mtimeCache?.get(path) ?? stat.mtime ?? 0) > + (stat.mtime ?? 0)) + /* c8 ignore stop */ + ) + : (path, stat) => !( + /* c8 ignore start */ + ((opt.mtimeCache?.get(path) ?? stat.mtime ?? 0) > + (stat.mtime ?? 0)) + /* c8 ignore stop */ + ); +}; +//# sourceMappingURL=update.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/update.js.map b/node_modules/tar/dist/commonjs/update.js.map new file mode 100644 index 0000000..a3053da --- /dev/null +++ b/node_modules/tar/dist/commonjs/update.js.map @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AAC,CAAC,CAClB;YACD,oBAAoB;aACrB,CAAA;AACT,CAAC,CAAA","sourcesContent":["// tar -u\n\nimport { makeCommand } from './make-command.js'\nimport { type TarOptionsWithAliases } from './options.js'\n\nimport { replace as r } from './replace.js'\n\n// just call tar.r with the filter and mtimeCache\nexport const update = makeCommand(\n r.syncFile,\n r.asyncFile,\n r.syncNoFile,\n r.asyncNoFile,\n (opt, entries = []) => {\n r.validate?.(opt, entries)\n mtimeFilter(opt)\n },\n)\n\nconst mtimeFilter = (opt: TarOptionsWithAliases) => {\n const filter = opt.filter\n\n if (!opt.mtimeCache) {\n opt.mtimeCache = new Map()\n }\n\n opt.filter =\n filter ?\n (path, stat) =>\n filter(path, stat) &&\n !(\n /* c8 ignore start */\n (\n (opt.mtimeCache?.get(path) ?? stat.mtime ?? 0) >\n (stat.mtime ?? 0)\n )\n /* c8 ignore stop */\n )\n : (path, stat) =>\n !(\n /* c8 ignore start */\n (\n (opt.mtimeCache?.get(path) ?? stat.mtime ?? 0) >\n (stat.mtime ?? 0)\n )\n /* c8 ignore stop */\n )\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/warn-method.d.ts b/node_modules/tar/dist/commonjs/warn-method.d.ts new file mode 100644 index 0000000..b63d352 --- /dev/null +++ b/node_modules/tar/dist/commonjs/warn-method.d.ts @@ -0,0 +1,25 @@ +/// +import { type Minipass } from 'minipass'; +/** has a warn method */ +export type Warner = { + warn(code: string, message: string | Error, data: any): void; + file?: string; + cwd?: string; + strict?: boolean; + emit(event: 'warn', code: string, message: string, data?: WarnData): void; + emit(event: 'error', error: TarError): void; +}; +export type WarnEvent = Minipass.Events & { + warn: [code: string, message: string, data: WarnData]; +}; +export type WarnData = { + file?: string; + cwd?: string; + code?: string; + tarCode?: string; + recoverable?: boolean; + [k: string]: any; +}; +export type TarError = Error & WarnData; +export declare const warnMethod: (self: Warner, code: string, message: string | Error, data?: WarnData) => void; +//# sourceMappingURL=warn-method.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/warn-method.d.ts.map b/node_modules/tar/dist/commonjs/warn-method.d.ts.map new file mode 100644 index 0000000..1338043 --- /dev/null +++ b/node_modules/tar/dist/commonjs/warn-method.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"warn-method.d.ts","sourceRoot":"","sources":["../../src/warn-method.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC,wBAAwB;AACxB,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,EAAE,IAAI,EAAE,GAAG,GAAG,IAAI,CAAA;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB,IAAI,CACF,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,QAAQ,GACd,IAAI,CAAA;IACP,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAA;CAC5C,CAAA;AAED,MAAM,MAAM,SAAS,CAAC,CAAC,GAAG,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG;IACvD,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;CACtD,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAA;AAEvC,eAAO,MAAM,UAAU,SACf,MAAM,QACN,MAAM,WACH,MAAM,GAAG,KAAK,SACjB,QAAQ,SA2Bf,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/warn-method.js b/node_modules/tar/dist/commonjs/warn-method.js new file mode 100644 index 0000000..f255027 --- /dev/null +++ b/node_modules/tar/dist/commonjs/warn-method.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.warnMethod = void 0; +const warnMethod = (self, code, message, data = {}) => { + if (self.file) { + data.file = self.file; + } + if (self.cwd) { + data.cwd = self.cwd; + } + data.code = + (message instanceof Error && + message.code) || + code; + data.tarCode = code; + if (!self.strict && data.recoverable !== false) { + if (message instanceof Error) { + data = Object.assign(message, data); + message = message.message; + } + self.emit('warn', code, message, data); + } + else if (message instanceof Error) { + self.emit('error', Object.assign(message, data)); + } + else { + self.emit('error', Object.assign(new Error(`${code}: ${message}`), data)); + } +}; +exports.warnMethod = warnMethod; +//# sourceMappingURL=warn-method.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/warn-method.js.map b/node_modules/tar/dist/commonjs/warn-method.js.map new file mode 100644 index 0000000..c9bb26b --- /dev/null +++ b/node_modules/tar/dist/commonjs/warn-method.js.map @@ -0,0 +1 @@ +{"version":3,"file":"warn-method.js","sourceRoot":"","sources":["../../src/warn-method.ts"],"names":[],"mappings":";;;AAiCO,MAAM,UAAU,GAAG,CACxB,IAAY,EACZ,IAAY,EACZ,OAAuB,EACvB,OAAiB,EAAE,EACnB,EAAE;IACF,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;IACvB,CAAC;IACD,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAA;IACrB,CAAC;IACD,IAAI,CAAC,IAAI;QACP,CAAC,OAAO,YAAY,KAAK;YACtB,OAAiC,CAAC,IAAI,CAAC;YAC1C,IAAI,CAAA;IACN,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA;IACnB,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,KAAK,KAAK,EAAE,CAAC;QAC/C,IAAI,OAAO,YAAY,KAAK,EAAE,CAAC;YAC7B,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;YACnC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;QAC3B,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAA;IACxC,CAAC;SAAM,IAAI,OAAO,YAAY,KAAK,EAAE,CAAC;QACpC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAA;IAClD,CAAC;SAAM,CAAC;QACN,IAAI,CAAC,IAAI,CACP,OAAO,EACP,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,GAAG,IAAI,KAAK,OAAO,EAAE,CAAC,EAAE,IAAI,CAAC,CACtD,CAAA;IACH,CAAC;AACH,CAAC,CAAA;AA/BY,QAAA,UAAU,cA+BtB","sourcesContent":["import { type Minipass } from 'minipass'\n\n/** has a warn method */\nexport type Warner = {\n warn(code: string, message: string | Error, data: any): void\n file?: string\n cwd?: string\n strict?: boolean\n\n emit(\n event: 'warn',\n code: string,\n message: string,\n data?: WarnData,\n ): void\n emit(event: 'error', error: TarError): void\n}\n\nexport type WarnEvent = Minipass.Events & {\n warn: [code: string, message: string, data: WarnData]\n}\n\nexport type WarnData = {\n file?: string\n cwd?: string\n code?: string\n tarCode?: string\n recoverable?: boolean\n [k: string]: any\n}\n\nexport type TarError = Error & WarnData\n\nexport const warnMethod = (\n self: Warner,\n code: string,\n message: string | Error,\n data: WarnData = {},\n) => {\n if (self.file) {\n data.file = self.file\n }\n if (self.cwd) {\n data.cwd = self.cwd\n }\n data.code =\n (message instanceof Error &&\n (message as NodeJS.ErrnoException).code) ||\n code\n data.tarCode = code\n if (!self.strict && data.recoverable !== false) {\n if (message instanceof Error) {\n data = Object.assign(message, data)\n message = message.message\n }\n self.emit('warn', code, message, data)\n } else if (message instanceof Error) {\n self.emit('error', Object.assign(message, data))\n } else {\n self.emit(\n 'error',\n Object.assign(new Error(`${code}: ${message}`), data),\n )\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/winchars.d.ts b/node_modules/tar/dist/commonjs/winchars.d.ts new file mode 100644 index 0000000..6c24143 --- /dev/null +++ b/node_modules/tar/dist/commonjs/winchars.d.ts @@ -0,0 +1,3 @@ +export declare const encode: (s: string) => string; +export declare const decode: (s: string) => string; +//# sourceMappingURL=winchars.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/winchars.d.ts.map b/node_modules/tar/dist/commonjs/winchars.d.ts.map new file mode 100644 index 0000000..7a6cd50 --- /dev/null +++ b/node_modules/tar/dist/commonjs/winchars.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"winchars.d.ts","sourceRoot":"","sources":["../../src/winchars.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,MAAM,MAAO,MAAM,WACwB,CAAA;AACxD,eAAO,MAAM,MAAM,MAAO,MAAM,WACwB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/winchars.js b/node_modules/tar/dist/commonjs/winchars.js new file mode 100644 index 0000000..c0a4405 --- /dev/null +++ b/node_modules/tar/dist/commonjs/winchars.js @@ -0,0 +1,14 @@ +"use strict"; +// When writing files on Windows, translate the characters to their +// 0xf000 higher-encoded versions. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decode = exports.encode = void 0; +const raw = ['|', '<', '>', '?', ':']; +const win = raw.map(char => String.fromCharCode(0xf000 + char.charCodeAt(0))); +const toWin = new Map(raw.map((char, i) => [char, win[i]])); +const toRaw = new Map(win.map((char, i) => [char, raw[i]])); +const encode = (s) => raw.reduce((s, c) => s.split(c).join(toWin.get(c)), s); +exports.encode = encode; +const decode = (s) => win.reduce((s, c) => s.split(c).join(toRaw.get(c)), s); +exports.decode = decode; +//# sourceMappingURL=winchars.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/winchars.js.map b/node_modules/tar/dist/commonjs/winchars.js.map new file mode 100644 index 0000000..75fafd7 --- /dev/null +++ b/node_modules/tar/dist/commonjs/winchars.js.map @@ -0,0 +1 @@ +{"version":3,"file":"winchars.js","sourceRoot":"","sources":["../../src/winchars.ts"],"names":[],"mappings":";AAAA,mEAAmE;AACnE,kCAAkC;;;AAElC,MAAM,GAAG,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;AAErC,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CACzB,MAAM,CAAC,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CACjD,CAAA;AAED,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAC3D,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAEpD,MAAM,MAAM,GAAG,CAAC,CAAS,EAAE,EAAE,CAClC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AAD3C,QAAA,MAAM,UACqC;AACjD,MAAM,MAAM,GAAG,CAAC,CAAS,EAAE,EAAE,CAClC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AAD3C,QAAA,MAAM,UACqC","sourcesContent":["// When writing files on Windows, translate the characters to their\n// 0xf000 higher-encoded versions.\n\nconst raw = ['|', '<', '>', '?', ':']\n\nconst win = raw.map(char =>\n String.fromCharCode(0xf000 + char.charCodeAt(0)),\n)\n\nconst toWin = new Map(raw.map((char, i) => [char, win[i]]))\nconst toRaw = new Map(win.map((char, i) => [char, raw[i]]))\n\nexport const encode = (s: string) =>\n raw.reduce((s, c) => s.split(c).join(toWin.get(c)), s)\nexport const decode = (s: string) =>\n win.reduce((s, c) => s.split(c).join(toRaw.get(c)), s)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/write-entry.d.ts b/node_modules/tar/dist/commonjs/write-entry.d.ts new file mode 100644 index 0000000..7b7fd24 --- /dev/null +++ b/node_modules/tar/dist/commonjs/write-entry.d.ts @@ -0,0 +1,132 @@ +/// +/// +/// +import { type Stats } from 'fs'; +import { Minipass } from 'minipass'; +import { Header } from './header.js'; +import { TarOptions, TarOptionsWithAliases } from './options.js'; +import { ReadEntry } from './read-entry.js'; +import { EntryTypeName } from './types.js'; +import { WarnData, Warner, WarnEvent } from './warn-method.js'; +declare const PROCESS: unique symbol; +declare const FILE: unique symbol; +declare const DIRECTORY: unique symbol; +declare const SYMLINK: unique symbol; +declare const HARDLINK: unique symbol; +declare const HEADER: unique symbol; +declare const READ: unique symbol; +declare const LSTAT: unique symbol; +declare const ONLSTAT: unique symbol; +declare const ONREAD: unique symbol; +declare const ONREADLINK: unique symbol; +declare const OPENFILE: unique symbol; +declare const ONOPENFILE: unique symbol; +declare const CLOSE: unique symbol; +declare const MODE: unique symbol; +declare const AWAITDRAIN: unique symbol; +declare const ONDRAIN: unique symbol; +declare const PREFIX: unique symbol; +export declare class WriteEntry extends Minipass implements Warner { + #private; + path: string; + portable: boolean; + myuid: number; + myuser: string; + maxReadSize: number; + linkCache: Exclude; + statCache: Exclude; + preservePaths: boolean; + cwd: string; + strict: boolean; + mtime?: Date; + noPax: boolean; + noMtime: boolean; + prefix?: string; + fd?: number; + blockLen: number; + blockRemain: number; + buf?: Buffer; + pos: number; + remain: number; + length: number; + offset: number; + win32: boolean; + absolute: string; + header?: Header; + type?: EntryTypeName | 'Unsupported'; + linkpath?: string; + stat?: Stats; + onWriteEntry?: (entry: WriteEntry) => any; + constructor(p: string, opt_?: TarOptionsWithAliases); + warn(code: string, message: string | Error, data?: WarnData): void; + emit(ev: keyof WarnEvent, ...data: any[]): boolean; + [LSTAT](): void; + [ONLSTAT](stat: Stats): void; + [PROCESS](): void | this; + [MODE](mode: number): number; + [PREFIX](path: string): string; + [HEADER](): void; + [DIRECTORY](): void; + [SYMLINK](): void; + [ONREADLINK](linkpath: string): void; + [HARDLINK](linkpath: string): void; + [FILE](): void | this; + [OPENFILE](): void; + [ONOPENFILE](fd: number): void; + [READ](): void; + [CLOSE](cb?: (er?: null | Error | NodeJS.ErrnoException) => any): void; + [ONREAD](bytesRead: number): void; + [AWAITDRAIN](cb: () => any): void; + write(buffer: Buffer | string, cb?: () => void): boolean; + write(str: Buffer | string, encoding?: BufferEncoding | null, cb?: () => void): boolean; + [ONDRAIN](): void; +} +export declare class WriteEntrySync extends WriteEntry implements Warner { + sync: true; + [LSTAT](): void; + [SYMLINK](): void; + [OPENFILE](): void; + [READ](): void; + [AWAITDRAIN](cb: () => any): void; + [CLOSE](cb?: (er?: null | Error | NodeJS.ErrnoException) => any): void; +} +export declare class WriteEntryTar extends Minipass implements Warner { + blockLen: number; + blockRemain: number; + buf: number; + pos: number; + remain: number; + length: number; + preservePaths: boolean; + portable: boolean; + strict: boolean; + noPax: boolean; + noMtime: boolean; + readEntry: ReadEntry; + type: EntryTypeName; + prefix?: string; + path: string; + mode?: number; + uid?: number; + gid?: number; + uname?: string; + gname?: string; + header?: Header; + mtime?: Date; + atime?: Date; + ctime?: Date; + linkpath?: string; + size: number; + onWriteEntry?: (entry: WriteEntry) => any; + warn(code: string, message: string | Error, data?: WarnData): void; + constructor(readEntry: ReadEntry, opt_?: TarOptionsWithAliases); + [PREFIX](path: string): string; + [MODE](mode: number): number; + write(buffer: Buffer | string, cb?: () => void): boolean; + write(str: Buffer | string, encoding?: BufferEncoding | null, cb?: () => void): boolean; + end(cb?: () => void): this; + end(chunk: Buffer | string, cb?: () => void): this; + end(chunk: Buffer | string, encoding?: BufferEncoding, cb?: () => void): this; +} +export {}; +//# sourceMappingURL=write-entry.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/write-entry.d.ts.map b/node_modules/tar/dist/commonjs/write-entry.d.ts.map new file mode 100644 index 0000000..1fa474a --- /dev/null +++ b/node_modules/tar/dist/commonjs/write-entry.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"write-entry.d.ts","sourceRoot":"","sources":["../../src/write-entry.ts"],"names":[],"mappings":";;;AAAA,OAAW,EAAE,KAAK,KAAK,EAAE,MAAM,IAAI,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAGpC,OAAO,EAGL,UAAU,EACV,qBAAqB,EACtB,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAG3C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC1C,OAAO,EACL,QAAQ,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CAAC,EAAE,MAAM,IAAI,GACd,OAAO;IA0BV,GAAG,CAAC,EAAE,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;IAC1B,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;IAClD,GAAG,CACD,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,QAAQ,CAAC,EAAE,cAAc,EACzB,EAAE,CAAC,EAAE,MAAM,IAAI,GACd,IAAI;CA2BR"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/write-entry.js b/node_modules/tar/dist/commonjs/write-entry.js new file mode 100644 index 0000000..45b7efe --- /dev/null +++ b/node_modules/tar/dist/commonjs/write-entry.js @@ -0,0 +1,689 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WriteEntryTar = exports.WriteEntrySync = exports.WriteEntry = void 0; +const fs_1 = __importDefault(require("fs")); +const minipass_1 = require("minipass"); +const path_1 = __importDefault(require("path")); +const header_js_1 = require("./header.js"); +const mode_fix_js_1 = require("./mode-fix.js"); +const normalize_windows_path_js_1 = require("./normalize-windows-path.js"); +const options_js_1 = require("./options.js"); +const pax_js_1 = require("./pax.js"); +const strip_absolute_path_js_1 = require("./strip-absolute-path.js"); +const strip_trailing_slashes_js_1 = require("./strip-trailing-slashes.js"); +const warn_method_js_1 = require("./warn-method.js"); +const winchars = __importStar(require("./winchars.js")); +const prefixPath = (path, prefix) => { + if (!prefix) { + return (0, normalize_windows_path_js_1.normalizeWindowsPath)(path); + } + path = (0, normalize_windows_path_js_1.normalizeWindowsPath)(path).replace(/^\.(\/|$)/, ''); + return (0, strip_trailing_slashes_js_1.stripTrailingSlashes)(prefix) + '/' + path; +}; +const maxReadSize = 16 * 1024 * 1024; +const PROCESS = Symbol('process'); +const FILE = Symbol('file'); +const DIRECTORY = Symbol('directory'); +const SYMLINK = Symbol('symlink'); +const HARDLINK = Symbol('hardlink'); +const HEADER = Symbol('header'); +const READ = Symbol('read'); +const LSTAT = Symbol('lstat'); +const ONLSTAT = Symbol('onlstat'); +const ONREAD = Symbol('onread'); +const ONREADLINK = Symbol('onreadlink'); +const OPENFILE = Symbol('openfile'); +const ONOPENFILE = Symbol('onopenfile'); +const CLOSE = Symbol('close'); +const MODE = Symbol('mode'); +const AWAITDRAIN = Symbol('awaitDrain'); +const ONDRAIN = Symbol('ondrain'); +const PREFIX = Symbol('prefix'); +class WriteEntry extends minipass_1.Minipass { + path; + portable; + myuid = (process.getuid && process.getuid()) || 0; + // until node has builtin pwnam functions, this'll have to do + myuser = process.env.USER || ''; + maxReadSize; + linkCache; + statCache; + preservePaths; + cwd; + strict; + mtime; + noPax; + noMtime; + prefix; + fd; + blockLen = 0; + blockRemain = 0; + buf; + pos = 0; + remain = 0; + length = 0; + offset = 0; + win32; + absolute; + header; + type; + linkpath; + stat; + onWriteEntry; + #hadError = false; + constructor(p, opt_ = {}) { + const opt = (0, options_js_1.dealias)(opt_); + super(); + this.path = (0, normalize_windows_path_js_1.normalizeWindowsPath)(p); + // suppress atime, ctime, uid, gid, uname, gname + this.portable = !!opt.portable; + this.maxReadSize = opt.maxReadSize || maxReadSize; + this.linkCache = opt.linkCache || new Map(); + this.statCache = opt.statCache || new Map(); + this.preservePaths = !!opt.preservePaths; + this.cwd = (0, normalize_windows_path_js_1.normalizeWindowsPath)(opt.cwd || process.cwd()); + this.strict = !!opt.strict; + this.noPax = !!opt.noPax; + this.noMtime = !!opt.noMtime; + this.mtime = opt.mtime; + this.prefix = + opt.prefix ? (0, normalize_windows_path_js_1.normalizeWindowsPath)(opt.prefix) : undefined; + this.onWriteEntry = opt.onWriteEntry; + if (typeof opt.onwarn === 'function') { + this.on('warn', opt.onwarn); + } + let pathWarn = false; + if (!this.preservePaths) { + const [root, stripped] = (0, strip_absolute_path_js_1.stripAbsolutePath)(this.path); + if (root && typeof stripped === 'string') { + this.path = stripped; + pathWarn = root; + } + } + this.win32 = !!opt.win32 || process.platform === 'win32'; + if (this.win32) { + // force the \ to / normalization, since we might not *actually* + // be on windows, but want \ to be considered a path separator. + this.path = winchars.decode(this.path.replace(/\\/g, '/')); + p = p.replace(/\\/g, '/'); + } + this.absolute = (0, normalize_windows_path_js_1.normalizeWindowsPath)(opt.absolute || path_1.default.resolve(this.cwd, p)); + if (this.path === '') { + this.path = './'; + } + if (pathWarn) { + this.warn('TAR_ENTRY_INFO', `stripping ${pathWarn} from absolute path`, { + entry: this, + path: pathWarn + this.path, + }); + } + const cs = this.statCache.get(this.absolute); + if (cs) { + this[ONLSTAT](cs); + } + else { + this[LSTAT](); + } + } + warn(code, message, data = {}) { + return (0, warn_method_js_1.warnMethod)(this, code, message, data); + } + emit(ev, ...data) { + if (ev === 'error') { + this.#hadError = true; + } + return super.emit(ev, ...data); + } + [LSTAT]() { + fs_1.default.lstat(this.absolute, (er, stat) => { + if (er) { + return this.emit('error', er); + } + this[ONLSTAT](stat); + }); + } + [ONLSTAT](stat) { + this.statCache.set(this.absolute, stat); + this.stat = stat; + if (!stat.isFile()) { + stat.size = 0; + } + this.type = getType(stat); + this.emit('stat', stat); + this[PROCESS](); + } + [PROCESS]() { + switch (this.type) { + case 'File': + return this[FILE](); + case 'Directory': + return this[DIRECTORY](); + case 'SymbolicLink': + return this[SYMLINK](); + // unsupported types are ignored. + default: + return this.end(); + } + } + [MODE](mode) { + return (0, mode_fix_js_1.modeFix)(mode, this.type === 'Directory', this.portable); + } + [PREFIX](path) { + return prefixPath(path, this.prefix); + } + [HEADER]() { + /* c8 ignore start */ + if (!this.stat) { + throw new Error('cannot write header before stat'); + } + /* c8 ignore stop */ + if (this.type === 'Directory' && this.portable) { + this.noMtime = true; + } + this.onWriteEntry?.(this); + this.header = new header_js_1.Header({ + path: this[PREFIX](this.path), + // only apply the prefix to hard links. + linkpath: this.type === 'Link' && this.linkpath !== undefined ? + this[PREFIX](this.linkpath) + : this.linkpath, + // only the permissions and setuid/setgid/sticky bitflags + // not the higher-order bits that specify file type + mode: this[MODE](this.stat.mode), + uid: this.portable ? undefined : this.stat.uid, + gid: this.portable ? undefined : this.stat.gid, + size: this.stat.size, + mtime: this.noMtime ? undefined : this.mtime || this.stat.mtime, + /* c8 ignore next */ + type: this.type === 'Unsupported' ? undefined : this.type, + uname: this.portable ? undefined + : this.stat.uid === this.myuid ? this.myuser + : '', + atime: this.portable ? undefined : this.stat.atime, + ctime: this.portable ? undefined : this.stat.ctime, + }); + if (this.header.encode() && !this.noPax) { + super.write(new pax_js_1.Pax({ + atime: this.portable ? undefined : this.header.atime, + ctime: this.portable ? undefined : this.header.ctime, + gid: this.portable ? undefined : this.header.gid, + mtime: this.noMtime ? undefined : (this.mtime || this.header.mtime), + path: this[PREFIX](this.path), + linkpath: this.type === 'Link' && this.linkpath !== undefined ? + this[PREFIX](this.linkpath) + : this.linkpath, + size: this.header.size, + uid: this.portable ? undefined : this.header.uid, + uname: this.portable ? undefined : this.header.uname, + dev: this.portable ? undefined : this.stat.dev, + ino: this.portable ? undefined : this.stat.ino, + nlink: this.portable ? undefined : this.stat.nlink, + }).encode()); + } + const block = this.header?.block; + /* c8 ignore start */ + if (!block) { + throw new Error('failed to encode header'); + } + /* c8 ignore stop */ + super.write(block); + } + [DIRECTORY]() { + /* c8 ignore start */ + if (!this.stat) { + throw new Error('cannot create directory entry without stat'); + } + /* c8 ignore stop */ + if (this.path.slice(-1) !== '/') { + this.path += '/'; + } + this.stat.size = 0; + this[HEADER](); + this.end(); + } + [SYMLINK]() { + fs_1.default.readlink(this.absolute, (er, linkpath) => { + if (er) { + return this.emit('error', er); + } + this[ONREADLINK](linkpath); + }); + } + [ONREADLINK](linkpath) { + this.linkpath = (0, normalize_windows_path_js_1.normalizeWindowsPath)(linkpath); + this[HEADER](); + this.end(); + } + [HARDLINK](linkpath) { + /* c8 ignore start */ + if (!this.stat) { + throw new Error('cannot create link entry without stat'); + } + /* c8 ignore stop */ + this.type = 'Link'; + this.linkpath = (0, normalize_windows_path_js_1.normalizeWindowsPath)(path_1.default.relative(this.cwd, linkpath)); + this.stat.size = 0; + this[HEADER](); + this.end(); + } + [FILE]() { + /* c8 ignore start */ + if (!this.stat) { + throw new Error('cannot create file entry without stat'); + } + /* c8 ignore stop */ + if (this.stat.nlink > 1) { + const linkKey = `${this.stat.dev}:${this.stat.ino}`; + const linkpath = this.linkCache.get(linkKey); + if (linkpath?.indexOf(this.cwd) === 0) { + return this[HARDLINK](linkpath); + } + this.linkCache.set(linkKey, this.absolute); + } + this[HEADER](); + if (this.stat.size === 0) { + return this.end(); + } + this[OPENFILE](); + } + [OPENFILE]() { + fs_1.default.open(this.absolute, 'r', (er, fd) => { + if (er) { + return this.emit('error', er); + } + this[ONOPENFILE](fd); + }); + } + [ONOPENFILE](fd) { + this.fd = fd; + if (this.#hadError) { + return this[CLOSE](); + } + /* c8 ignore start */ + if (!this.stat) { + throw new Error('should stat before calling onopenfile'); + } + /* c8 ignore start */ + this.blockLen = 512 * Math.ceil(this.stat.size / 512); + this.blockRemain = this.blockLen; + const bufLen = Math.min(this.blockLen, this.maxReadSize); + this.buf = Buffer.allocUnsafe(bufLen); + this.offset = 0; + this.pos = 0; + this.remain = this.stat.size; + this.length = this.buf.length; + this[READ](); + } + [READ]() { + const { fd, buf, offset, length, pos } = this; + if (fd === undefined || buf === undefined) { + throw new Error('cannot read file without first opening'); + } + fs_1.default.read(fd, buf, offset, length, pos, (er, bytesRead) => { + if (er) { + // ignoring the error from close(2) is a bad practice, but at + // this point we already have an error, don't need another one + return this[CLOSE](() => this.emit('error', er)); + } + this[ONREAD](bytesRead); + }); + } + /* c8 ignore start */ + [CLOSE](cb = () => { }) { + /* c8 ignore stop */ + if (this.fd !== undefined) + fs_1.default.close(this.fd, cb); + } + [ONREAD](bytesRead) { + if (bytesRead <= 0 && this.remain > 0) { + const er = Object.assign(new Error('encountered unexpected EOF'), { + path: this.absolute, + syscall: 'read', + code: 'EOF', + }); + return this[CLOSE](() => this.emit('error', er)); + } + if (bytesRead > this.remain) { + const er = Object.assign(new Error('did not encounter expected EOF'), { + path: this.absolute, + syscall: 'read', + code: 'EOF', + }); + return this[CLOSE](() => this.emit('error', er)); + } + /* c8 ignore start */ + if (!this.buf) { + throw new Error('should have created buffer prior to reading'); + } + /* c8 ignore stop */ + // null out the rest of the buffer, if we could fit the block padding + // at the end of this loop, we've incremented bytesRead and this.remain + // to be incremented up to the blockRemain level, as if we had expected + // to get a null-padded file, and read it until the end. then we will + // decrement both remain and blockRemain by bytesRead, and know that we + // reached the expected EOF, without any null buffer to append. + if (bytesRead === this.remain) { + for (let i = bytesRead; i < this.length && bytesRead < this.blockRemain; i++) { + this.buf[i + this.offset] = 0; + bytesRead++; + this.remain++; + } + } + const chunk = this.offset === 0 && bytesRead === this.buf.length ? + this.buf + : this.buf.subarray(this.offset, this.offset + bytesRead); + const flushed = this.write(chunk); + if (!flushed) { + this[AWAITDRAIN](() => this[ONDRAIN]()); + } + else { + this[ONDRAIN](); + } + } + [AWAITDRAIN](cb) { + this.once('drain', cb); + } + write(chunk, encoding, cb) { + /* c8 ignore start - just junk to comply with NodeJS.WritableStream */ + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + if (typeof chunk === 'string') { + chunk = Buffer.from(chunk, typeof encoding === 'string' ? encoding : 'utf8'); + } + /* c8 ignore stop */ + if (this.blockRemain < chunk.length) { + const er = Object.assign(new Error('writing more data than expected'), { + path: this.absolute, + }); + return this.emit('error', er); + } + this.remain -= chunk.length; + this.blockRemain -= chunk.length; + this.pos += chunk.length; + this.offset += chunk.length; + return super.write(chunk, null, cb); + } + [ONDRAIN]() { + if (!this.remain) { + if (this.blockRemain) { + super.write(Buffer.alloc(this.blockRemain)); + } + return this[CLOSE](er => er ? this.emit('error', er) : this.end()); + } + /* c8 ignore start */ + if (!this.buf) { + throw new Error('buffer lost somehow in ONDRAIN'); + } + /* c8 ignore stop */ + if (this.offset >= this.length) { + // if we only have a smaller bit left to read, alloc a smaller buffer + // otherwise, keep it the same length it was before. + this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)); + this.offset = 0; + } + this.length = this.buf.length - this.offset; + this[READ](); + } +} +exports.WriteEntry = WriteEntry; +class WriteEntrySync extends WriteEntry { + sync = true; + [LSTAT]() { + this[ONLSTAT](fs_1.default.lstatSync(this.absolute)); + } + [SYMLINK]() { + this[ONREADLINK](fs_1.default.readlinkSync(this.absolute)); + } + [OPENFILE]() { + this[ONOPENFILE](fs_1.default.openSync(this.absolute, 'r')); + } + [READ]() { + let threw = true; + try { + const { fd, buf, offset, length, pos } = this; + /* c8 ignore start */ + if (fd === undefined || buf === undefined) { + throw new Error('fd and buf must be set in READ method'); + } + /* c8 ignore stop */ + const bytesRead = fs_1.default.readSync(fd, buf, offset, length, pos); + this[ONREAD](bytesRead); + threw = false; + } + finally { + // ignoring the error from close(2) is a bad practice, but at + // this point we already have an error, don't need another one + if (threw) { + try { + this[CLOSE](() => { }); + } + catch (er) { } + } + } + } + [AWAITDRAIN](cb) { + cb(); + } + /* c8 ignore start */ + [CLOSE](cb = () => { }) { + /* c8 ignore stop */ + if (this.fd !== undefined) + fs_1.default.closeSync(this.fd); + cb(); + } +} +exports.WriteEntrySync = WriteEntrySync; +class WriteEntryTar extends minipass_1.Minipass { + blockLen = 0; + blockRemain = 0; + buf = 0; + pos = 0; + remain = 0; + length = 0; + preservePaths; + portable; + strict; + noPax; + noMtime; + readEntry; + type; + prefix; + path; + mode; + uid; + gid; + uname; + gname; + header; + mtime; + atime; + ctime; + linkpath; + size; + onWriteEntry; + warn(code, message, data = {}) { + return (0, warn_method_js_1.warnMethod)(this, code, message, data); + } + constructor(readEntry, opt_ = {}) { + const opt = (0, options_js_1.dealias)(opt_); + super(); + this.preservePaths = !!opt.preservePaths; + this.portable = !!opt.portable; + this.strict = !!opt.strict; + this.noPax = !!opt.noPax; + this.noMtime = !!opt.noMtime; + this.onWriteEntry = opt.onWriteEntry; + this.readEntry = readEntry; + const { type } = readEntry; + /* c8 ignore start */ + if (type === 'Unsupported') { + throw new Error('writing entry that should be ignored'); + } + /* c8 ignore stop */ + this.type = type; + if (this.type === 'Directory' && this.portable) { + this.noMtime = true; + } + this.prefix = opt.prefix; + this.path = (0, normalize_windows_path_js_1.normalizeWindowsPath)(readEntry.path); + this.mode = + readEntry.mode !== undefined ? + this[MODE](readEntry.mode) + : undefined; + this.uid = this.portable ? undefined : readEntry.uid; + this.gid = this.portable ? undefined : readEntry.gid; + this.uname = this.portable ? undefined : readEntry.uname; + this.gname = this.portable ? undefined : readEntry.gname; + this.size = readEntry.size; + this.mtime = + this.noMtime ? undefined : opt.mtime || readEntry.mtime; + this.atime = this.portable ? undefined : readEntry.atime; + this.ctime = this.portable ? undefined : readEntry.ctime; + this.linkpath = + readEntry.linkpath !== undefined ? + (0, normalize_windows_path_js_1.normalizeWindowsPath)(readEntry.linkpath) + : undefined; + if (typeof opt.onwarn === 'function') { + this.on('warn', opt.onwarn); + } + let pathWarn = false; + if (!this.preservePaths) { + const [root, stripped] = (0, strip_absolute_path_js_1.stripAbsolutePath)(this.path); + if (root && typeof stripped === 'string') { + this.path = stripped; + pathWarn = root; + } + } + this.remain = readEntry.size; + this.blockRemain = readEntry.startBlockSize; + this.onWriteEntry?.(this); + this.header = new header_js_1.Header({ + path: this[PREFIX](this.path), + linkpath: this.type === 'Link' && this.linkpath !== undefined ? + this[PREFIX](this.linkpath) + : this.linkpath, + // only the permissions and setuid/setgid/sticky bitflags + // not the higher-order bits that specify file type + mode: this.mode, + uid: this.portable ? undefined : this.uid, + gid: this.portable ? undefined : this.gid, + size: this.size, + mtime: this.noMtime ? undefined : this.mtime, + type: this.type, + uname: this.portable ? undefined : this.uname, + atime: this.portable ? undefined : this.atime, + ctime: this.portable ? undefined : this.ctime, + }); + if (pathWarn) { + this.warn('TAR_ENTRY_INFO', `stripping ${pathWarn} from absolute path`, { + entry: this, + path: pathWarn + this.path, + }); + } + if (this.header.encode() && !this.noPax) { + super.write(new pax_js_1.Pax({ + atime: this.portable ? undefined : this.atime, + ctime: this.portable ? undefined : this.ctime, + gid: this.portable ? undefined : this.gid, + mtime: this.noMtime ? undefined : this.mtime, + path: this[PREFIX](this.path), + linkpath: this.type === 'Link' && this.linkpath !== undefined ? + this[PREFIX](this.linkpath) + : this.linkpath, + size: this.size, + uid: this.portable ? undefined : this.uid, + uname: this.portable ? undefined : this.uname, + dev: this.portable ? undefined : this.readEntry.dev, + ino: this.portable ? undefined : this.readEntry.ino, + nlink: this.portable ? undefined : this.readEntry.nlink, + }).encode()); + } + const b = this.header?.block; + /* c8 ignore start */ + if (!b) + throw new Error('failed to encode header'); + /* c8 ignore stop */ + super.write(b); + readEntry.pipe(this); + } + [PREFIX](path) { + return prefixPath(path, this.prefix); + } + [MODE](mode) { + return (0, mode_fix_js_1.modeFix)(mode, this.type === 'Directory', this.portable); + } + write(chunk, encoding, cb) { + /* c8 ignore start - just junk to comply with NodeJS.WritableStream */ + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + if (typeof chunk === 'string') { + chunk = Buffer.from(chunk, typeof encoding === 'string' ? encoding : 'utf8'); + } + /* c8 ignore stop */ + const writeLen = chunk.length; + if (writeLen > this.blockRemain) { + throw new Error('writing more to entry than is appropriate'); + } + this.blockRemain -= writeLen; + return super.write(chunk, cb); + } + end(chunk, encoding, cb) { + if (this.blockRemain) { + super.write(Buffer.alloc(this.blockRemain)); + } + /* c8 ignore start - just junk to comply with NodeJS.WritableStream */ + if (typeof chunk === 'function') { + cb = chunk; + encoding = undefined; + chunk = undefined; + } + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + if (typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding ?? 'utf8'); + } + if (cb) + this.once('finish', cb); + chunk ? super.end(chunk, cb) : super.end(cb); + /* c8 ignore stop */ + return this; + } +} +exports.WriteEntryTar = WriteEntryTar; +const getType = (stat) => stat.isFile() ? 'File' + : stat.isDirectory() ? 'Directory' + : stat.isSymbolicLink() ? 'SymbolicLink' + : 'Unsupported'; +//# sourceMappingURL=write-entry.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/write-entry.js.map b/node_modules/tar/dist/commonjs/write-entry.js.map new file mode 100644 index 0000000..4a80682 --- /dev/null +++ b/node_modules/tar/dist/commonjs/write-entry.js.map @@ -0,0 +1 @@ +{"version":3,"file":"write-entry.js","sourceRoot":"","sources":["../../src/write-entry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAmC;AACnC,uCAAmC;AACnC,gDAAuB;AACvB,2CAAoC;AACpC,+CAAuC;AACvC,2EAAkE;AAClE,6CAKqB;AACrB,qCAA8B;AAE9B,qEAA4D;AAC5D,2EAAkE;AAElE,qDAKyB;AACzB,wDAAyC;AAEzC,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,MAAe,EAAE,EAAE;IACnD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,IAAA,gDAAoB,EAAC,IAAI,CAAC,CAAA;IACnC,CAAC;IACD,IAAI,GAAG,IAAA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CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,IAAI,MAAM,CAAC,CAAA;QAChD,CAAC;QACD,IAAI,EAAE;YAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;QAC/B,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QAC5C,oBAAoB;QACpB,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAvOD,sCAuOC;AAED,MAAM,OAAO,GAAG,CAAC,IAAW,EAAiC,EAAE,CAC7D,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM;IACtB,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,WAAW;QAClC,CAAC,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,cAAc;YACxC,CAAC,CAAC,aAAa,CAAA","sourcesContent":["import fs, { type Stats } from 'fs'\nimport { Minipass } from 'minipass'\nimport path from 'path'\nimport { Header } from './header.js'\nimport { modeFix } from './mode-fix.js'\nimport { normalizeWindowsPath } from './normalize-windows-path.js'\nimport {\n dealias,\n LinkCacheKey,\n TarOptions,\n TarOptionsWithAliases,\n} from './options.js'\nimport { Pax } from './pax.js'\nimport { ReadEntry } from './read-entry.js'\nimport { stripAbsolutePath } from './strip-absolute-path.js'\nimport { stripTrailingSlashes } from './strip-trailing-slashes.js'\nimport { EntryTypeName } from './types.js'\nimport {\n WarnData,\n Warner,\n WarnEvent,\n warnMethod,\n} from './warn-method.js'\nimport * as winchars from './winchars.js'\n\nconst prefixPath = (path: string, prefix?: string) => {\n if (!prefix) {\n return normalizeWindowsPath(path)\n }\n path = normalizeWindowsPath(path).replace(/^\\.(\\/|$)/, '')\n return stripTrailingSlashes(prefix) + '/' + path\n}\n\nconst maxReadSize = 16 * 1024 * 1024\n\nconst PROCESS = Symbol('process')\nconst FILE = Symbol('file')\nconst DIRECTORY = Symbol('directory')\nconst SYMLINK = Symbol('symlink')\nconst HARDLINK = Symbol('hardlink')\nconst HEADER = Symbol('header')\nconst READ = Symbol('read')\nconst LSTAT = Symbol('lstat')\nconst ONLSTAT = Symbol('onlstat')\nconst ONREAD = Symbol('onread')\nconst ONREADLINK = Symbol('onreadlink')\nconst OPENFILE = Symbol('openfile')\nconst ONOPENFILE = Symbol('onopenfile')\nconst CLOSE = Symbol('close')\nconst MODE = Symbol('mode')\nconst AWAITDRAIN = Symbol('awaitDrain')\nconst ONDRAIN = Symbol('ondrain')\nconst PREFIX = Symbol('prefix')\n\nexport class WriteEntry\n extends Minipass\n implements Warner\n{\n path: string\n portable: boolean\n myuid: number = (process.getuid && process.getuid()) || 0\n // until node has builtin pwnam functions, this'll have to do\n myuser: string = process.env.USER || ''\n maxReadSize: number\n linkCache: Exclude\n statCache: Exclude\n preservePaths: boolean\n cwd: string\n strict: boolean\n mtime?: Date\n noPax: boolean\n noMtime: boolean\n prefix?: string\n fd?: number\n\n blockLen: number = 0\n blockRemain: number = 0\n buf?: Buffer\n pos: number = 0\n remain: number = 0\n length: number = 0\n offset: number = 0\n\n win32: boolean\n absolute: string\n\n header?: Header\n type?: EntryTypeName | 'Unsupported'\n linkpath?: string\n stat?: Stats\n onWriteEntry?: (entry: WriteEntry) => any\n\n #hadError: boolean = false\n\n constructor(p: string, opt_: TarOptionsWithAliases = {}) {\n const opt = dealias(opt_)\n super()\n this.path = normalizeWindowsPath(p)\n // suppress atime, ctime, uid, gid, uname, gname\n this.portable = !!opt.portable\n this.maxReadSize = opt.maxReadSize || maxReadSize\n this.linkCache = opt.linkCache || new Map()\n this.statCache = opt.statCache || new Map()\n this.preservePaths = !!opt.preservePaths\n this.cwd = normalizeWindowsPath(opt.cwd || process.cwd())\n this.strict = !!opt.strict\n this.noPax = !!opt.noPax\n this.noMtime = !!opt.noMtime\n this.mtime = opt.mtime\n this.prefix =\n opt.prefix ? normalizeWindowsPath(opt.prefix) : undefined\n this.onWriteEntry = opt.onWriteEntry\n\n if (typeof opt.onwarn === 'function') {\n this.on('warn', opt.onwarn)\n }\n\n let pathWarn: string | boolean = false\n if (!this.preservePaths) {\n const [root, stripped] = stripAbsolutePath(this.path)\n if (root && typeof stripped === 'string') {\n this.path = stripped\n pathWarn = root\n }\n }\n\n this.win32 = !!opt.win32 || process.platform === 'win32'\n if (this.win32) {\n // force the \\ to / normalization, since we might not *actually*\n // be on windows, but want \\ to be considered a path separator.\n this.path = winchars.decode(this.path.replace(/\\\\/g, '/'))\n p = p.replace(/\\\\/g, '/')\n }\n\n this.absolute = normalizeWindowsPath(\n opt.absolute || path.resolve(this.cwd, p),\n )\n\n if (this.path === '') {\n this.path = './'\n }\n\n if (pathWarn) {\n this.warn(\n 'TAR_ENTRY_INFO',\n `stripping ${pathWarn} from absolute path`,\n {\n entry: this,\n path: pathWarn + this.path,\n },\n )\n }\n\n const cs = this.statCache.get(this.absolute)\n if (cs) {\n this[ONLSTAT](cs)\n } else {\n this[LSTAT]()\n }\n }\n\n warn(code: string, message: string | Error, data: WarnData = {}) {\n return warnMethod(this, code, message, data)\n }\n\n emit(ev: keyof WarnEvent, ...data: any[]) {\n if (ev === 'error') {\n this.#hadError = true\n }\n return super.emit(ev, ...data)\n }\n\n [LSTAT]() {\n fs.lstat(this.absolute, (er, stat) => {\n if (er) {\n return this.emit('error', er)\n }\n this[ONLSTAT](stat)\n })\n }\n\n [ONLSTAT](stat: Stats) {\n this.statCache.set(this.absolute, stat)\n this.stat = stat\n if (!stat.isFile()) {\n stat.size = 0\n }\n this.type = getType(stat)\n this.emit('stat', stat)\n this[PROCESS]()\n }\n\n [PROCESS]() {\n switch (this.type) {\n case 'File':\n return this[FILE]()\n case 'Directory':\n return this[DIRECTORY]()\n case 'SymbolicLink':\n return this[SYMLINK]()\n // unsupported types are ignored.\n default:\n return this.end()\n }\n }\n\n [MODE](mode: number) {\n return modeFix(mode, this.type === 'Directory', this.portable)\n }\n\n [PREFIX](path: string) {\n return prefixPath(path, this.prefix)\n }\n\n [HEADER]() {\n /* c8 ignore start */\n if (!this.stat) {\n throw new Error('cannot write header before stat')\n }\n /* c8 ignore stop */\n\n if (this.type === 'Directory' && this.portable) {\n this.noMtime = true\n }\n\n this.onWriteEntry?.(this)\n this.header = new Header({\n path: this[PREFIX](this.path),\n // only apply the prefix to hard links.\n linkpath:\n this.type === 'Link' && this.linkpath !== undefined ?\n this[PREFIX](this.linkpath)\n : this.linkpath,\n // only the permissions and setuid/setgid/sticky bitflags\n // not the higher-order bits that specify file type\n mode: this[MODE](this.stat.mode),\n uid: this.portable ? undefined : this.stat.uid,\n gid: this.portable ? undefined : this.stat.gid,\n size: this.stat.size,\n mtime: this.noMtime ? undefined : this.mtime || this.stat.mtime,\n /* c8 ignore next */\n type: this.type === 'Unsupported' ? undefined : this.type,\n uname:\n this.portable ? undefined\n : this.stat.uid === this.myuid ? this.myuser\n : '',\n atime: this.portable ? undefined : this.stat.atime,\n ctime: this.portable ? undefined : this.stat.ctime,\n })\n\n if (this.header.encode() && !this.noPax) {\n super.write(\n new Pax({\n atime: this.portable ? undefined : this.header.atime,\n ctime: this.portable ? undefined : this.header.ctime,\n gid: this.portable ? undefined : this.header.gid,\n mtime:\n this.noMtime ? undefined : (\n this.mtime || this.header.mtime\n ),\n path: this[PREFIX](this.path),\n linkpath:\n this.type === 'Link' && this.linkpath !== undefined ?\n this[PREFIX](this.linkpath)\n : this.linkpath,\n size: this.header.size,\n uid: this.portable ? undefined : this.header.uid,\n uname: this.portable ? undefined : this.header.uname,\n dev: this.portable ? undefined : this.stat.dev,\n ino: this.portable ? undefined : this.stat.ino,\n nlink: this.portable ? undefined : this.stat.nlink,\n }).encode(),\n )\n }\n const block = this.header?.block\n /* c8 ignore start */\n if (!block) {\n throw new Error('failed to encode header')\n }\n /* c8 ignore stop */\n super.write(block)\n }\n\n [DIRECTORY]() {\n /* c8 ignore start */\n if (!this.stat) {\n throw new Error('cannot create directory entry without stat')\n }\n /* c8 ignore stop */\n if (this.path.slice(-1) !== '/') {\n this.path += '/'\n }\n this.stat.size = 0\n this[HEADER]()\n this.end()\n }\n\n [SYMLINK]() {\n fs.readlink(this.absolute, (er, linkpath) => {\n if (er) {\n return this.emit('error', er)\n }\n this[ONREADLINK](linkpath)\n })\n }\n\n [ONREADLINK](linkpath: string) {\n this.linkpath = normalizeWindowsPath(linkpath)\n this[HEADER]()\n this.end()\n }\n\n [HARDLINK](linkpath: string) {\n /* c8 ignore start */\n if (!this.stat) {\n throw new Error('cannot create link entry without stat')\n }\n /* c8 ignore stop */\n this.type = 'Link'\n this.linkpath = normalizeWindowsPath(\n path.relative(this.cwd, linkpath),\n )\n this.stat.size = 0\n this[HEADER]()\n this.end()\n }\n\n [FILE]() {\n /* c8 ignore start */\n if (!this.stat) {\n throw new Error('cannot create file entry without stat')\n }\n /* c8 ignore stop */\n if (this.stat.nlink > 1) {\n const linkKey =\n `${this.stat.dev}:${this.stat.ino}` as LinkCacheKey\n const linkpath = this.linkCache.get(linkKey)\n if (linkpath?.indexOf(this.cwd) === 0) {\n return this[HARDLINK](linkpath)\n }\n this.linkCache.set(linkKey, this.absolute)\n }\n\n this[HEADER]()\n if (this.stat.size === 0) {\n return this.end()\n }\n\n this[OPENFILE]()\n }\n\n [OPENFILE]() {\n fs.open(this.absolute, 'r', (er, fd) => {\n if (er) {\n return this.emit('error', er)\n }\n this[ONOPENFILE](fd)\n })\n }\n\n [ONOPENFILE](fd: number) {\n this.fd = fd\n if (this.#hadError) {\n return this[CLOSE]()\n }\n /* c8 ignore start */\n if (!this.stat) {\n throw new Error('should stat before calling onopenfile')\n }\n /* c8 ignore start */\n\n this.blockLen = 512 * Math.ceil(this.stat.size / 512)\n this.blockRemain = this.blockLen\n const bufLen = Math.min(this.blockLen, this.maxReadSize)\n this.buf = Buffer.allocUnsafe(bufLen)\n this.offset = 0\n this.pos = 0\n this.remain = this.stat.size\n this.length = this.buf.length\n this[READ]()\n }\n\n [READ]() {\n const { fd, buf, offset, length, pos } = this\n if (fd === undefined || buf === undefined) {\n throw new Error('cannot read file without first opening')\n }\n fs.read(fd, buf, offset, length, pos, (er, bytesRead) => {\n if (er) {\n // ignoring the error from close(2) is a bad practice, but at\n // this point we already have an error, don't need another one\n return this[CLOSE](() => this.emit('error', er))\n }\n this[ONREAD](bytesRead)\n })\n }\n\n /* c8 ignore start */\n [CLOSE](\n cb: (er?: null | Error | NodeJS.ErrnoException) => any = () => {},\n ) {\n /* c8 ignore stop */\n if (this.fd !== undefined) fs.close(this.fd, cb)\n }\n\n [ONREAD](bytesRead: number) {\n if (bytesRead <= 0 && this.remain > 0) {\n const er = Object.assign(\n new Error('encountered unexpected EOF'),\n {\n path: this.absolute,\n syscall: 'read',\n code: 'EOF',\n },\n )\n return this[CLOSE](() => this.emit('error', er))\n }\n\n if (bytesRead > this.remain) {\n const er = Object.assign(\n new Error('did not encounter expected EOF'),\n {\n path: this.absolute,\n syscall: 'read',\n code: 'EOF',\n },\n )\n return this[CLOSE](() => this.emit('error', er))\n }\n\n /* c8 ignore start */\n if (!this.buf) {\n throw new Error('should have created buffer prior to reading')\n }\n /* c8 ignore stop */\n\n // null out the rest of the buffer, if we could fit the block padding\n // at the end of this loop, we've incremented bytesRead and this.remain\n // to be incremented up to the blockRemain level, as if we had expected\n // to get a null-padded file, and read it until the end. then we will\n // decrement both remain and blockRemain by bytesRead, and know that we\n // reached the expected EOF, without any null buffer to append.\n if (bytesRead === this.remain) {\n for (\n let i = bytesRead;\n i < this.length && bytesRead < this.blockRemain;\n i++\n ) {\n this.buf[i + this.offset] = 0\n bytesRead++\n this.remain++\n }\n }\n\n const chunk =\n this.offset === 0 && bytesRead === this.buf.length ?\n this.buf\n : this.buf.subarray(this.offset, this.offset + bytesRead)\n\n const flushed = this.write(chunk)\n if (!flushed) {\n this[AWAITDRAIN](() => this[ONDRAIN]())\n } else {\n this[ONDRAIN]()\n }\n }\n\n [AWAITDRAIN](cb: () => any) {\n this.once('drain', cb)\n }\n\n write(buffer: Buffer | string, cb?: () => void): boolean\n write(\n str: Buffer | string,\n encoding?: BufferEncoding | null,\n cb?: () => void,\n ): boolean\n write(\n chunk: Buffer | string,\n encoding?: BufferEncoding | (() => any) | null,\n cb?: () => any,\n ): boolean {\n /* c8 ignore start - just junk to comply with NodeJS.WritableStream */\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(\n chunk,\n typeof encoding === 'string' ? encoding : 'utf8',\n )\n }\n /* c8 ignore stop */\n\n if (this.blockRemain < chunk.length) {\n const er = Object.assign(\n new Error('writing more data than expected'),\n {\n path: this.absolute,\n },\n )\n return this.emit('error', er)\n }\n this.remain -= chunk.length\n this.blockRemain -= chunk.length\n this.pos += chunk.length\n this.offset += chunk.length\n return super.write(chunk, null, cb)\n }\n\n [ONDRAIN]() {\n if (!this.remain) {\n if (this.blockRemain) {\n super.write(Buffer.alloc(this.blockRemain))\n }\n return this[CLOSE](er =>\n er ? this.emit('error', er) : this.end(),\n )\n }\n\n /* c8 ignore start */\n if (!this.buf) {\n throw new Error('buffer lost somehow in ONDRAIN')\n }\n /* c8 ignore stop */\n\n if (this.offset >= this.length) {\n // if we only have a smaller bit left to read, alloc a smaller buffer\n // otherwise, keep it the same length it was before.\n this.buf = Buffer.allocUnsafe(\n Math.min(this.blockRemain, this.buf.length),\n )\n this.offset = 0\n }\n this.length = this.buf.length - this.offset\n this[READ]()\n }\n}\n\nexport class WriteEntrySync extends WriteEntry implements Warner {\n sync: true = true;\n\n [LSTAT]() {\n this[ONLSTAT](fs.lstatSync(this.absolute))\n }\n\n [SYMLINK]() {\n this[ONREADLINK](fs.readlinkSync(this.absolute))\n }\n\n [OPENFILE]() {\n this[ONOPENFILE](fs.openSync(this.absolute, 'r'))\n }\n\n [READ]() {\n let threw = true\n try {\n const { fd, buf, offset, length, pos } = this\n /* c8 ignore start */\n if (fd === undefined || buf === undefined) {\n throw new Error('fd and buf must be set in READ method')\n }\n /* c8 ignore stop */\n const bytesRead = fs.readSync(fd, buf, offset, length, pos)\n this[ONREAD](bytesRead)\n threw = false\n } finally {\n // ignoring the error from close(2) is a bad practice, but at\n // this point we already have an error, don't need another one\n if (threw) {\n try {\n this[CLOSE](() => {})\n } catch (er) {}\n }\n }\n }\n\n [AWAITDRAIN](cb: () => any) {\n cb()\n }\n\n /* c8 ignore start */\n [CLOSE](\n cb: (er?: null | Error | NodeJS.ErrnoException) => any = () => {},\n ) {\n /* c8 ignore stop */\n if (this.fd !== undefined) fs.closeSync(this.fd)\n cb()\n }\n}\n\nexport class WriteEntryTar\n extends Minipass\n implements Warner\n{\n blockLen: number = 0\n blockRemain: number = 0\n buf: number = 0\n pos: number = 0\n remain: number = 0\n length: number = 0\n preservePaths: boolean\n portable: boolean\n strict: boolean\n noPax: boolean\n noMtime: boolean\n readEntry: ReadEntry\n type: EntryTypeName\n prefix?: string\n path: string\n mode?: number\n uid?: number\n gid?: number\n uname?: string\n gname?: string\n header?: Header\n mtime?: Date\n atime?: Date\n ctime?: Date\n linkpath?: string\n size: number\n onWriteEntry?: (entry: WriteEntry) => any\n\n warn(code: string, message: string | Error, data: WarnData = {}) {\n return warnMethod(this, code, message, data)\n }\n\n constructor(\n readEntry: ReadEntry,\n opt_: TarOptionsWithAliases = {},\n ) {\n const opt = dealias(opt_)\n super()\n this.preservePaths = !!opt.preservePaths\n this.portable = !!opt.portable\n this.strict = !!opt.strict\n this.noPax = !!opt.noPax\n this.noMtime = !!opt.noMtime\n this.onWriteEntry = opt.onWriteEntry\n\n this.readEntry = readEntry\n const { type } = readEntry\n /* c8 ignore start */\n if (type === 'Unsupported') {\n throw new Error('writing entry that should be ignored')\n }\n /* c8 ignore stop */\n this.type = type\n if (this.type === 'Directory' && this.portable) {\n this.noMtime = true\n }\n\n this.prefix = opt.prefix\n\n this.path = normalizeWindowsPath(readEntry.path)\n this.mode =\n readEntry.mode !== undefined ?\n this[MODE](readEntry.mode)\n : undefined\n this.uid = this.portable ? undefined : readEntry.uid\n this.gid = this.portable ? undefined : readEntry.gid\n this.uname = this.portable ? undefined : readEntry.uname\n this.gname = this.portable ? undefined : readEntry.gname\n this.size = readEntry.size\n this.mtime =\n this.noMtime ? undefined : opt.mtime || readEntry.mtime\n this.atime = this.portable ? undefined : readEntry.atime\n this.ctime = this.portable ? undefined : readEntry.ctime\n this.linkpath =\n readEntry.linkpath !== undefined ?\n normalizeWindowsPath(readEntry.linkpath)\n : undefined\n\n if (typeof opt.onwarn === 'function') {\n this.on('warn', opt.onwarn)\n }\n\n let pathWarn: false | string = false\n if (!this.preservePaths) {\n const [root, stripped] = stripAbsolutePath(this.path)\n if (root && typeof stripped === 'string') {\n this.path = stripped\n pathWarn = root\n }\n }\n\n this.remain = readEntry.size\n this.blockRemain = readEntry.startBlockSize\n\n this.onWriteEntry?.(this as unknown as WriteEntry)\n this.header = new Header({\n path: this[PREFIX](this.path),\n linkpath:\n this.type === 'Link' && this.linkpath !== undefined ?\n this[PREFIX](this.linkpath)\n : this.linkpath,\n // only the permissions and setuid/setgid/sticky bitflags\n // not the higher-order bits that specify file type\n mode: this.mode,\n uid: this.portable ? undefined : this.uid,\n gid: this.portable ? undefined : this.gid,\n size: this.size,\n mtime: this.noMtime ? undefined : this.mtime,\n type: this.type,\n uname: this.portable ? undefined : this.uname,\n atime: this.portable ? undefined : this.atime,\n ctime: this.portable ? undefined : this.ctime,\n })\n\n if (pathWarn) {\n this.warn(\n 'TAR_ENTRY_INFO',\n `stripping ${pathWarn} from absolute path`,\n {\n entry: this,\n path: pathWarn + this.path,\n },\n )\n }\n\n if (this.header.encode() && !this.noPax) {\n super.write(\n new Pax({\n atime: this.portable ? undefined : this.atime,\n ctime: this.portable ? undefined : this.ctime,\n gid: this.portable ? undefined : this.gid,\n mtime: this.noMtime ? undefined : this.mtime,\n path: this[PREFIX](this.path),\n linkpath:\n this.type === 'Link' && this.linkpath !== undefined ?\n this[PREFIX](this.linkpath)\n : this.linkpath,\n size: this.size,\n uid: this.portable ? undefined : this.uid,\n uname: this.portable ? undefined : this.uname,\n dev: this.portable ? undefined : this.readEntry.dev,\n ino: this.portable ? undefined : this.readEntry.ino,\n nlink: this.portable ? undefined : this.readEntry.nlink,\n }).encode(),\n )\n }\n\n const b = this.header?.block\n /* c8 ignore start */\n if (!b) throw new Error('failed to encode header')\n /* c8 ignore stop */\n super.write(b)\n readEntry.pipe(this)\n }\n\n [PREFIX](path: string) {\n return prefixPath(path, this.prefix)\n }\n\n [MODE](mode: number) {\n return modeFix(mode, this.type === 'Directory', this.portable)\n }\n\n write(buffer: Buffer | string, cb?: () => void): boolean\n write(\n str: Buffer | string,\n encoding?: BufferEncoding | null,\n cb?: () => void,\n ): boolean\n write(\n chunk: Buffer | string,\n encoding?: BufferEncoding | (() => any) | null,\n cb?: () => any,\n ): boolean {\n /* c8 ignore start - just junk to comply with NodeJS.WritableStream */\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(\n chunk,\n typeof encoding === 'string' ? encoding : 'utf8',\n )\n }\n /* c8 ignore stop */\n const writeLen = chunk.length\n if (writeLen > this.blockRemain) {\n throw new Error('writing more to entry than is appropriate')\n }\n this.blockRemain -= writeLen\n return super.write(chunk, cb)\n }\n\n end(cb?: () => void): this\n end(chunk: Buffer | string, cb?: () => void): this\n end(\n chunk: Buffer | string,\n encoding?: BufferEncoding,\n cb?: () => void,\n ): this\n end(\n chunk?: Buffer | string | (() => void),\n encoding?: BufferEncoding | (() => void),\n cb?: () => void,\n ): this {\n if (this.blockRemain) {\n super.write(Buffer.alloc(this.blockRemain))\n }\n /* c8 ignore start - just junk to comply with NodeJS.WritableStream */\n if (typeof chunk === 'function') {\n cb = chunk\n encoding = undefined\n chunk = undefined\n }\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding ?? 'utf8')\n }\n if (cb) this.once('finish', cb)\n chunk ? super.end(chunk, cb) : super.end(cb)\n /* c8 ignore stop */\n return this\n }\n}\n\nconst getType = (stat: Stats): EntryTypeName | 'Unsupported' =>\n stat.isFile() ? 'File'\n : stat.isDirectory() ? 'Directory'\n : stat.isSymbolicLink() ? 'SymbolicLink'\n : 'Unsupported'\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/create.d.ts b/node_modules/tar/dist/esm/create.d.ts new file mode 100644 index 0000000..867c5e9 --- /dev/null +++ b/node_modules/tar/dist/esm/create.d.ts @@ -0,0 +1,3 @@ +import { Pack, PackSync } from './pack.js'; +export declare const create: import("./make-command.js").TarCommand; +//# sourceMappingURL=create.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/create.d.ts.map b/node_modules/tar/dist/esm/create.d.ts.map new file mode 100644 index 0000000..82be947 --- /dev/null +++ b/node_modules/tar/dist/esm/create.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/create.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AA8E1C,eAAO,MAAM,MAAM,wDAUlB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/create.js b/node_modules/tar/dist/esm/create.js new file mode 100644 index 0000000..512a991 --- /dev/null +++ b/node_modules/tar/dist/esm/create.js @@ -0,0 +1,77 @@ +import { WriteStream, WriteStreamSync } from '@isaacs/fs-minipass'; +import path from 'node:path'; +import { list } from './list.js'; +import { makeCommand } from './make-command.js'; +import { Pack, PackSync } from './pack.js'; +const createFileSync = (opt, files) => { + const p = new PackSync(opt); + const stream = new WriteStreamSync(opt.file, { + mode: opt.mode || 0o666, + }); + p.pipe(stream); + addFilesSync(p, files); +}; +const createFile = (opt, files) => { + const p = new Pack(opt); + const stream = new WriteStream(opt.file, { + mode: opt.mode || 0o666, + }); + p.pipe(stream); + const promise = new Promise((res, rej) => { + stream.on('error', rej); + stream.on('close', res); + p.on('error', rej); + }); + addFilesAsync(p, files); + return promise; +}; +const addFilesSync = (p, files) => { + files.forEach(file => { + if (file.charAt(0) === '@') { + list({ + file: path.resolve(p.cwd, file.slice(1)), + sync: true, + noResume: true, + onReadEntry: entry => p.add(entry), + }); + } + else { + p.add(file); + } + }); + p.end(); +}; +const addFilesAsync = async (p, files) => { + for (let i = 0; i < files.length; i++) { + const file = String(files[i]); + if (file.charAt(0) === '@') { + await list({ + file: path.resolve(String(p.cwd), file.slice(1)), + noResume: true, + onReadEntry: entry => { + p.add(entry); + }, + }); + } + else { + p.add(file); + } + } + p.end(); +}; +const createSync = (opt, files) => { + const p = new PackSync(opt); + addFilesSync(p, files); + return p; +}; +const createAsync = (opt, files) => { + const p = new Pack(opt); + addFilesAsync(p, files); + return p; +}; +export const create = makeCommand(createFileSync, createFile, createSync, createAsync, (_opt, files) => { + if (!files?.length) { + throw new TypeError('no paths specified to add to archive'); + } +}); +//# sourceMappingURL=create.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/create.js.map b/node_modules/tar/dist/esm/create.js.map new file mode 100644 index 0000000..9260f91 --- /dev/null +++ b/node_modules/tar/dist/esm/create.js.map @@ -0,0 +1 @@ +{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAElE,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAO/C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAE1C,MAAM,cAAc,GAAG,CAAC,GAAuB,EAAE,KAAe,EAAE,EAAE;IAClE,MAAM,CAAC,GAAG,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAA;IAC3B,MAAM,MAAM,GAAG,IAAI,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AA;AAED,MAAM,WAAW,GAAG,CAAC,GAAe,EAAE,KAAe,EAAE,EAAE;IACvD,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;IACvB,aAAa,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;IACvB,OAAO,CAAC,CAAA;AACV,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,WAAW,CAC/B,cAAc,EACd,UAAU,EACV,UAAU,EACV,WAAW,EACX,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;IACd,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;QACnB,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAA;IAC7D,CAAC;AACH,CAAC,CACF,CAAA","sourcesContent":["import { WriteStream, WriteStreamSync } from '@isaacs/fs-minipass'\nimport { Minipass } from 'minipass'\nimport path from 'node:path'\nimport { list } from './list.js'\nimport { makeCommand } from './make-command.js'\nimport {\n TarOptions,\n TarOptionsFile,\n TarOptionsSync,\n TarOptionsSyncFile,\n} from './options.js'\nimport { Pack, PackSync } from './pack.js'\n\nconst createFileSync = (opt: TarOptionsSyncFile, files: string[]) => {\n const p = new PackSync(opt)\n const stream = new WriteStreamSync(opt.file, {\n mode: opt.mode || 0o666,\n })\n p.pipe(stream as unknown as Minipass.Writable)\n addFilesSync(p, files)\n}\n\nconst createFile = (opt: TarOptionsFile, files: string[]) => {\n const p = new Pack(opt)\n const stream = new WriteStream(opt.file, {\n mode: opt.mode || 0o666,\n })\n p.pipe(stream as unknown as Minipass.Writable)\n\n const promise = new Promise((res, rej) => {\n stream.on('error', rej)\n stream.on('close', res)\n p.on('error', rej)\n })\n\n addFilesAsync(p, files)\n\n return promise\n}\n\nconst addFilesSync = (p: PackSync, files: string[]) => {\n files.forEach(file => {\n if (file.charAt(0) === '@') {\n list({\n file: path.resolve(p.cwd, file.slice(1)),\n sync: true,\n noResume: true,\n onReadEntry: entry => p.add(entry),\n })\n } else {\n p.add(file)\n }\n })\n p.end()\n}\n\nconst addFilesAsync = async (\n p: Pack,\n files: string[],\n): Promise => {\n for (let i = 0; i < files.length; i++) {\n const file = String(files[i])\n if (file.charAt(0) === '@') {\n await list({\n file: path.resolve(String(p.cwd), file.slice(1)),\n noResume: true,\n onReadEntry: entry => {\n p.add(entry)\n },\n })\n } else {\n p.add(file)\n }\n }\n p.end()\n}\n\nconst createSync = (opt: TarOptionsSync, files: string[]) => {\n const p = new PackSync(opt)\n addFilesSync(p, files)\n return p\n}\n\nconst createAsync = (opt: TarOptions, files: string[]) => {\n const p = new Pack(opt)\n addFilesAsync(p, files)\n return p\n}\n\nexport const create = makeCommand(\n createFileSync,\n createFile,\n createSync,\n createAsync,\n (_opt, files) => {\n if (!files?.length) {\n throw new TypeError('no paths specified to add to archive')\n }\n },\n)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/cwd-error.d.ts b/node_modules/tar/dist/esm/cwd-error.d.ts new file mode 100644 index 0000000..16c6460 --- /dev/null +++ b/node_modules/tar/dist/esm/cwd-error.d.ts @@ -0,0 +1,8 @@ +export declare class CwdError extends Error { + path: string; + code: string; + syscall: 'chdir'; + constructor(path: string, code: string); + get name(): string; +} +//# sourceMappingURL=cwd-error.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/cwd-error.d.ts.map b/node_modules/tar/dist/esm/cwd-error.d.ts.map new file mode 100644 index 0000000..6b9a1a2 --- /dev/null +++ b/node_modules/tar/dist/esm/cwd-error.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"cwd-error.d.ts","sourceRoot":"","sources":["../../src/cwd-error.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAS,SAAQ,KAAK;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,OAAO,CAAU;gBAEd,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAMtC,IAAI,IAAI,WAEP;CACF"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/cwd-error.js b/node_modules/tar/dist/esm/cwd-error.js new file mode 100644 index 0000000..289a066 --- /dev/null +++ b/node_modules/tar/dist/esm/cwd-error.js @@ -0,0 +1,14 @@ +export class CwdError extends Error { + path; + code; + syscall = 'chdir'; + constructor(path, code) { + super(`${code}: Cannot cd into '${path}'`); + this.path = path; + this.code = code; + } + get name() { + return 'CwdError'; + } +} +//# sourceMappingURL=cwd-error.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/cwd-error.js.map b/node_modules/tar/dist/esm/cwd-error.js.map new file mode 100644 index 0000000..6956f1a --- /dev/null +++ b/node_modules/tar/dist/esm/cwd-error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cwd-error.js","sourceRoot":"","sources":["../../src/cwd-error.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,QAAS,SAAQ,KAAK;IACjC,IAAI,CAAQ;IACZ,IAAI,CAAQ;IACZ,OAAO,GAAY,OAAO,CAAA;IAE1B,YAAY,IAAY,EAAE,IAAY;QACpC,KAAK,CAAC,GAAG,IAAI,qBAAqB,IAAI,GAAG,CAAC,CAAA;QAC1C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAED,IAAI,IAAI;QACN,OAAO,UAAU,CAAA;IACnB,CAAC;CACF","sourcesContent":["export class CwdError extends Error {\n path: string\n code: string\n syscall: 'chdir' = 'chdir'\n\n constructor(path: string, code: string) {\n super(`${code}: Cannot cd into '${path}'`)\n this.path = path\n this.code = code\n }\n\n get name() {\n return 'CwdError'\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/extract.d.ts b/node_modules/tar/dist/esm/extract.d.ts new file mode 100644 index 0000000..9cbb18c --- /dev/null +++ b/node_modules/tar/dist/esm/extract.d.ts @@ -0,0 +1,3 @@ +import { Unpack, UnpackSync } from './unpack.js'; +export declare const extract: import("./make-command.js").TarCommand; +//# sourceMappingURL=extract.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/extract.d.ts.map b/node_modules/tar/dist/esm/extract.d.ts.map new file mode 100644 index 0000000..31008e1 --- /dev/null +++ b/node_modules/tar/dist/esm/extract.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../src/extract.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AA2ChD,eAAO,MAAM,OAAO,4DAQnB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/extract.js b/node_modules/tar/dist/esm/extract.js new file mode 100644 index 0000000..2274fee --- /dev/null +++ b/node_modules/tar/dist/esm/extract.js @@ -0,0 +1,49 @@ +// tar -x +import * as fsm from '@isaacs/fs-minipass'; +import fs from 'node:fs'; +import { filesFilter } from './list.js'; +import { makeCommand } from './make-command.js'; +import { Unpack, UnpackSync } from './unpack.js'; +const extractFileSync = (opt) => { + const u = new UnpackSync(opt); + const file = opt.file; + const stat = fs.statSync(file); + // This trades a zero-byte read() syscall for a stat + // However, it will usually result in less memory allocation + const readSize = opt.maxReadSize || 16 * 1024 * 1024; + const stream = new fsm.ReadStreamSync(file, { + readSize: readSize, + size: stat.size, + }); + stream.pipe(u); +}; +const extractFile = (opt, _) => { + const u = new Unpack(opt); + const readSize = opt.maxReadSize || 16 * 1024 * 1024; + const file = opt.file; + const p = new Promise((resolve, reject) => { + u.on('error', reject); + u.on('close', resolve); + // This trades a zero-byte read() syscall for a stat + // However, it will usually result in less memory allocation + fs.stat(file, (er, stat) => { + if (er) { + reject(er); + } + else { + const stream = new fsm.ReadStream(file, { + readSize: readSize, + size: stat.size, + }); + stream.on('error', reject); + stream.pipe(u); + } + }); + }); + return p; +}; +export const extract = makeCommand(extractFileSync, extractFile, opt => new UnpackSync(opt), opt => new Unpack(opt), (opt, files) => { + if (files?.length) + filesFilter(opt, files); +}); +//# sourceMappingURL=extract.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/extract.js.map b/node_modules/tar/dist/esm/extract.js.map new file mode 100644 index 0000000..796a1cb --- /dev/null +++ b/node_modules/tar/dist/esm/extract.js.map @@ -0,0 +1 @@ +{"version":3,"file":"extract.js","sourceRoot":"","sources":["../../src/extract.ts"],"names":[],"mappings":"AAAA,SAAS;AACT,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAA;AAC1C,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAEhD,MAAM,eAAe,GAAG,CAAC,GAAuB,EAAE,EAAE;IAClD,MAAM,CAAC,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAA;IAC7B,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;IACrB,MAAM,IAAI,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;IAC9B,oDAAoD;IACpD,4DAA4D;IAC5D,MAAM,QAAQ,GAAG,GAAG,CAAC,WAAW,IAAI,EAAE,GAAG,IAAI,GAAG,IAAI,CAAA;IACpD,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,IAAI,EAAE;QAC1C,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,IAAI,CAAC,IAAI;KAChB,CAAC,CAAA;IACF,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AAChB,CAAC,CAAA;AAED,MAAM,WAAW,GAAG,CAAC,GAAmB,EAAE,CAAY,EAAE,EAAE;IACxD,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,GAAG,CAAC,CAAA;IACzB,MAAM,QAAQ,GAAG,GAAG,CAAC,WAAW,IAAI,EAAE,GAAG,IAAI,GAAG,IAAI,CA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ommand } from './make-command.js'\nimport { TarOptionsFile, TarOptionsSyncFile } from './options.js'\nimport { Unpack, UnpackSync } from './unpack.js'\n\nconst extractFileSync = (opt: TarOptionsSyncFile) => {\n const u = new UnpackSync(opt)\n const file = opt.file\n const stat = fs.statSync(file)\n // This trades a zero-byte read() syscall for a stat\n // However, it will usually result in less memory allocation\n const readSize = opt.maxReadSize || 16 * 1024 * 1024\n const stream = new fsm.ReadStreamSync(file, {\n readSize: readSize,\n size: stat.size,\n })\n stream.pipe(u)\n}\n\nconst extractFile = (opt: TarOptionsFile, _?: string[]) => {\n const u = new Unpack(opt)\n const readSize = opt.maxReadSize || 16 * 1024 * 1024\n\n const file = opt.file\n const p = new Promise((resolve, reject) => {\n u.on('error', reject)\n u.on('close', resolve)\n\n // This trades a zero-byte read() syscall for a stat\n // However, it will usually result in less memory allocation\n fs.stat(file, (er, stat) => {\n if (er) {\n reject(er)\n } else {\n const stream = new fsm.ReadStream(file, {\n readSize: readSize,\n size: stat.size,\n })\n stream.on('error', reject)\n stream.pipe(u)\n }\n })\n })\n return p\n}\n\nexport const extract = makeCommand(\n extractFileSync,\n extractFile,\n opt => new UnpackSync(opt),\n opt => new Unpack(opt),\n (opt, files) => {\n if (files?.length) filesFilter(opt, files)\n },\n)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/get-write-flag.d.ts b/node_modules/tar/dist/esm/get-write-flag.d.ts new file mode 100644 index 0000000..d35ec71 --- /dev/null +++ b/node_modules/tar/dist/esm/get-write-flag.d.ts @@ -0,0 +1,2 @@ +export declare const getWriteFlag: (() => string) | ((size: number) => number | "w"); +//# sourceMappingURL=get-write-flag.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/get-write-flag.d.ts.map b/node_modules/tar/dist/esm/get-write-flag.d.ts.map new file mode 100644 index 0000000..79af1e1 --- /dev/null +++ b/node_modules/tar/dist/esm/get-write-flag.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"get-write-flag.d.ts","sourceRoot":"","sources":["../../src/get-write-flag.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,YAAY,2BAGd,MAAM,kBAAwC,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/get-write-flag.js b/node_modules/tar/dist/esm/get-write-flag.js new file mode 100644 index 0000000..2c7f3e8 --- /dev/null +++ b/node_modules/tar/dist/esm/get-write-flag.js @@ -0,0 +1,23 @@ +// Get the appropriate flag to use for creating files +// We use fmap on Windows platforms for files less than +// 512kb. This is a fairly low limit, but avoids making +// things slower in some cases. Since most of what this +// library is used for is extracting tarballs of many +// relatively small files in npm packages and the like, +// it can be a big boost on Windows platforms. +import fs from 'fs'; +const platform = process.env.__FAKE_PLATFORM__ || process.platform; +const isWindows = platform === 'win32'; +/* c8 ignore start */ +const { O_CREAT, O_TRUNC, O_WRONLY } = fs.constants; +const UV_FS_O_FILEMAP = Number(process.env.__FAKE_FS_O_FILENAME__) || + fs.constants.UV_FS_O_FILEMAP || + 0; +/* c8 ignore stop */ +const fMapEnabled = isWindows && !!UV_FS_O_FILEMAP; +const fMapLimit = 512 * 1024; +const fMapFlag = UV_FS_O_FILEMAP | O_TRUNC | O_CREAT | O_WRONLY; +export const getWriteFlag = !fMapEnabled ? + () => 'w' + : (size) => (size < fMapLimit ? fMapFlag : 'w'); +//# sourceMappingURL=get-write-flag.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/get-write-flag.js.map b/node_modules/tar/dist/esm/get-write-flag.js.map new file mode 100644 index 0000000..2d620c1 --- /dev/null +++ b/node_modules/tar/dist/esm/get-write-flag.js.map @@ -0,0 +1 @@ +{"version":3,"file":"get-write-flag.js","sourceRoot":"","sources":["../../src/get-write-flag.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,uDAAuD;AACvD,wDAAwD;AACxD,wDAAwD;AACxD,qDAAqD;AACrD,uDAAuD;AACvD,8CAA8C;AAE9C,OAAO,EAAE,MAAM,IAAI,CAAA;AAEnB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,OAAO,CAAC,QAAQ,CAAA;AAClE,MAAM,SAAS,GAAG,QAAQ,KAAK,OAAO,CAAA;AAEtC,qBAAqB;AACrB,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,SAAS,CAAA;AACnD,MAAM,eAAe,GACnB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;IAC1C,EAAE,CAAC,SAAS,CAAC,eAAe;IAC5B,CAAC,CAAA;AACH,oBAAoB;AAEpB,MAAM,WAAW,GAAG,SAAS,IAAI,CAAC,CAAC,eAAe,CAAA;AAClD,MAAM,SAAS,GAAG,GAAG,GAAG,IAAI,CAAA;AAC5B,MAAM,QAAQ,GAAG,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAA;AAC/D,MAAM,CAAC,MAAM,YAAY,GACvB,CAAC,WAAW,CAAC,CAAC;IACZ,GAAG,EAAE,CAAC,GAAG;IACX,CAAC,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA","sourcesContent":["// Get the appropriate flag to use for creating files\n// We use fmap on Windows platforms for files less than\n// 512kb. This is a fairly low limit, but avoids making\n// things slower in some cases. Since most of what this\n// library is used for is extracting tarballs of many\n// relatively small files in npm packages and the like,\n// it can be a big boost on Windows platforms.\n\nimport fs from 'fs'\n\nconst platform = process.env.__FAKE_PLATFORM__ || process.platform\nconst isWindows = platform === 'win32'\n\n/* c8 ignore start */\nconst { O_CREAT, O_TRUNC, O_WRONLY } = fs.constants\nconst UV_FS_O_FILEMAP =\n Number(process.env.__FAKE_FS_O_FILENAME__) ||\n fs.constants.UV_FS_O_FILEMAP ||\n 0\n/* c8 ignore stop */\n\nconst fMapEnabled = isWindows && !!UV_FS_O_FILEMAP\nconst fMapLimit = 512 * 1024\nconst fMapFlag = UV_FS_O_FILEMAP | O_TRUNC | O_CREAT | O_WRONLY\nexport const getWriteFlag =\n !fMapEnabled ?\n () => 'w'\n : (size: number) => (size < fMapLimit ? fMapFlag : 'w')\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/header.d.ts b/node_modules/tar/dist/esm/header.d.ts new file mode 100644 index 0000000..7d2f18f --- /dev/null +++ b/node_modules/tar/dist/esm/header.d.ts @@ -0,0 +1,54 @@ +/// +import type { EntryTypeCode, EntryTypeName } from './types.js'; +export type HeaderData = { + path?: string; + mode?: number; + uid?: number; + gid?: number; + size?: number; + cksum?: number; + type?: EntryTypeName | 'Unsupported'; + linkpath?: string; + uname?: string; + gname?: string; + devmaj?: number; + devmin?: number; + atime?: Date; + ctime?: Date; + mtime?: Date; + charset?: string; + comment?: string; + dev?: number; + ino?: number; + nlink?: number; +}; +export declare class Header implements HeaderData { + #private; + cksumValid: boolean; + needPax: boolean; + nullBlock: boolean; + block?: Buffer; + path?: string; + mode?: number; + uid?: number; + gid?: number; + size?: number; + cksum?: number; + linkpath?: string; + uname?: string; + gname?: string; + devmaj: number; + devmin: number; + atime?: Date; + ctime?: Date; + mtime?: Date; + charset?: string; + comment?: string; + constructor(data?: Buffer | HeaderData, off?: number, ex?: HeaderData, gex?: HeaderData); + decode(buf: Buffer, off: number, ex?: HeaderData, gex?: HeaderData): void; + encode(buf?: Buffer, off?: number): boolean; + get type(): EntryTypeName; + get typeKey(): EntryTypeCode | 'Unsupported'; + set type(type: EntryTypeCode | EntryTypeName | 'Unsupported'); +} +//# sourceMappingURL=header.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/header.d.ts.map b/node_modules/tar/dist/esm/header.d.ts.map new file mode 100644 index 0000000..7e49f29 --- /dev/null +++ b/node_modules/tar/dist/esm/header.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../src/header.ts"],"names":[],"mappings":";AAOA,OAAO,KAAK,EA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,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAI;IAClB,MAAM,EAAE,MAAM,CAAI;IAClB,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IAEZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;gBAGd,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,EAC1B,GAAG,GAAE,MAAU,EACf,EAAE,CAAC,EAAE,UAAU,EACf,GAAG,CAAC,EAAE,UAAU;IASlB,MAAM,CACJ,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,EAAE,CAAC,EAAE,UAAU,EACf,GAAG,CAAC,EAAE,UAAU;IAsGlB,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,GAAE,MAAU;IAwEpC,IAAI,IAAI,IAAI,aAAa,CAKxB;IAED,IAAI,OAAO,IAAI,aAAa,GAAG,aAAa,CAE3C;IAED,IAAI,IAAI,CAAC,IAAI,EAAE,aAAa,GAAG,aAAa,GAAG,aAAa,EAS3D;CACF"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/header.js b/node_modules/tar/dist/esm/header.js new file mode 100644 index 0000000..e15192b --- /dev/null +++ b/node_modules/tar/dist/esm/header.js @@ -0,0 +1,279 @@ +// parse a 512-byte header block to a data object, or vice-versa +// encode returns `true` if a pax extended header is needed, because +// the data could not be faithfully encoded in a simple header. +// (Also, check header.needPax to see if it needs a pax header.) +import { posix as pathModule } from 'node:path'; +import * as large from './large-numbers.js'; +import * as types from './types.js'; +export class Header { + cksumValid = false; + needPax = false; + nullBlock = false; + block; + path; + mode; + uid; + gid; + size; + cksum; + #type = 'Unsupported'; + linkpath; + uname; + gname; + devmaj = 0; + devmin = 0; + atime; + ctime; + mtime; + charset; + comment; + constructor(data, off = 0, ex, gex) { + if (Buffer.isBuffer(data)) { + this.decode(data, off || 0, ex, gex); + } + else if (data) { + this.#slurp(data); + } + } + decode(buf, off, ex, gex) { + if (!off) { + off = 0; + } + if (!buf || !(buf.length >= off + 512)) { + throw new Error('need 512 bytes for header'); + } + this.path = decString(buf, off, 100); + this.mode = decNumber(buf, off + 100, 8); + this.uid = decNumber(buf, off + 108, 8); + this.gid = decNumber(buf, off + 116, 8); + this.size = decNumber(buf, off + 124, 12); + this.mtime = decDate(buf, off + 136, 12); + this.cksum = decNumber(buf, off + 148, 12); + // if we have extended or global extended headers, apply them now + // See https://github.com/npm/node-tar/pull/187 + // Apply global before local, so it overrides + if (gex) + this.#slurp(gex, true); + if (ex) + this.#slurp(ex); + // old tar versions marked dirs as a file with a trailing / + const t = decString(buf, off + 156, 1); + if (types.isCode(t)) { + this.#type = t || '0'; + } + if (this.#type === '0' && this.path.slice(-1) === '/') { + this.#type = '5'; + } + // tar implementations sometimes incorrectly put the stat(dir).size + // as the size in the tarball, even though Directory entries are + // not able to have any body at all. In the very rare chance that + // it actually DOES have a body, we weren't going to do anything with + // it anyway, and it'll just be a warning about an invalid header. + if (this.#type === '5') { + this.size = 0; + } + this.linkpath = decString(buf, off + 157, 100); + if (buf.subarray(off + 257, off + 265).toString() === + 'ustar\u000000') { + this.uname = decString(buf, off + 265, 32); + this.gname = decString(buf, off + 297, 32); + /* c8 ignore start */ + this.devmaj = decNumber(buf, off + 329, 8) ?? 0; + this.devmin = decNumber(buf, off + 337, 8) ?? 0; + /* c8 ignore stop */ + if (buf[off + 475] !== 0) { + // definitely a prefix, definitely >130 chars. + const prefix = decString(buf, off + 345, 155); + this.path = prefix + '/' + this.path; + } + else { + const prefix = decString(buf, off + 345, 130); + if (prefix) { + this.path = prefix + '/' + this.path; + } + this.atime = decDate(buf, off + 476, 12); + this.ctime = decDate(buf, off + 488, 12); + } + } + let sum = 8 * 0x20; + for (let i = off; i < off + 148; i++) { + sum += buf[i]; + } + for (let i = off + 156; i < off + 512; i++) { + sum += buf[i]; + } + this.cksumValid = sum === this.cksum; + if (this.cksum === undefined && sum === 8 * 0x20) { + this.nullBlock = true; + } + } + #slurp(ex, gex = false) { + Object.assign(this, Object.fromEntries(Object.entries(ex).filter(([k, v]) => { + // we slurp in everything except for the path attribute in + // a global extended header, because that's weird. Also, any + // null/undefined values are ignored. + return !(v === null || + v === undefined || + (k === 'path' && gex) || + (k === 'linkpath' && gex) || + k === 'global'); + }))); + } + encode(buf, off = 0) { + if (!buf) { + buf = this.block = Buffer.alloc(512); + } + if (this.#type === 'Unsupported') { + this.#type = '0'; + } + if (!(buf.length >= off + 512)) { + throw new Error('need 512 bytes for header'); + } + const prefixSize = this.ctime || this.atime ? 130 : 155; + const split = splitPrefix(this.path || '', prefixSize); + const path = split[0]; + const prefix = split[1]; + this.needPax = !!split[2]; + this.needPax = encString(buf, off, 100, path) || this.needPax; + this.needPax = + encNumber(buf, off + 100, 8, this.mode) || this.needPax; + this.needPax = + encNumber(buf, off + 108, 8, this.uid) || this.needPax; + this.needPax = + encNumber(buf, off + 116, 8, this.gid) || this.needPax; + this.needPax = + encNumber(buf, off + 124, 12, this.size) || this.needPax; + this.needPax = + encDate(buf, off + 136, 12, this.mtime) || this.needPax; + buf[off + 156] = this.#type.charCodeAt(0); + this.needPax = + encString(buf, off + 157, 100, this.linkpath) || this.needPax; + buf.write('ustar\u000000', off + 257, 8); + this.needPax = + encString(buf, off + 265, 32, this.uname) || this.needPax; + this.needPax = + encString(buf, off + 297, 32, this.gname) || this.needPax; + this.needPax = + encNumber(buf, off + 329, 8, this.devmaj) || this.needPax; + this.needPax = + encNumber(buf, off + 337, 8, this.devmin) || this.needPax; + this.needPax = + encString(buf, off + 345, prefixSize, prefix) || this.needPax; + if (buf[off + 475] !== 0) { + this.needPax = + encString(buf, off + 345, 155, prefix) || this.needPax; + } + else { + this.needPax = + encString(buf, off + 345, 130, prefix) || this.needPax; + this.needPax = + encDate(buf, off + 476, 12, this.atime) || this.needPax; + this.needPax = + encDate(buf, off + 488, 12, this.ctime) || this.needPax; + } + let sum = 8 * 0x20; + for (let i = off; i < off + 148; i++) { + sum += buf[i]; + } + for (let i = off + 156; i < off + 512; i++) { + sum += buf[i]; + } + this.cksum = sum; + encNumber(buf, off + 148, 8, this.cksum); + this.cksumValid = true; + return this.needPax; + } + get type() { + return (this.#type === 'Unsupported' ? + this.#type + : types.name.get(this.#type)); + } + get typeKey() { + return this.#type; + } + set type(type) { + const c = String(types.code.get(type)); + if (types.isCode(c) || c === 'Unsupported') { + this.#type = c; + } + else if (types.isCode(type)) { + this.#type = type; + } + else { + throw new TypeError('invalid entry type: ' + type); + } + } +} +const splitPrefix = (p, prefixSize) => { + const pathSize = 100; + let pp = p; + let prefix = ''; + let ret = undefined; + const root = pathModule.parse(p).root || '.'; + if (Buffer.byteLength(pp) < pathSize) { + ret = [pp, prefix, false]; + } + else { + // first set prefix to the dir, and path to the base + prefix = pathModule.dirname(pp); + pp = pathModule.basename(pp); + do { + if (Buffer.byteLength(pp) <= pathSize && + Buffer.byteLength(prefix) <= prefixSize) { + // both fit! + ret = [pp, prefix, false]; + } + else if (Buffer.byteLength(pp) > pathSize && + Buffer.byteLength(prefix) <= prefixSize) { + // prefix fits in prefix, but path doesn't fit in path + ret = [pp.slice(0, pathSize - 1), prefix, true]; + } + else { + // make path take a bit from prefix + pp = pathModule.join(pathModule.basename(prefix), pp); + prefix = pathModule.dirname(prefix); + } + } while (prefix !== root && ret === undefined); + // at this point, found no resolution, just truncate + if (!ret) { + ret = [p.slice(0, pathSize - 1), '', true]; + } + } + return ret; +}; +const decString = (buf, off, size) => buf + .subarray(off, off + size) + .toString('utf8') + .replace(/\0.*/, ''); +const decDate = (buf, off, size) => numToDate(decNumber(buf, off, size)); +const numToDate = (num) => num === undefined ? undefined : new Date(num * 1000); +const decNumber = (buf, off, size) => Number(buf[off]) & 0x80 ? + large.parse(buf.subarray(off, off + size)) + : decSmallNumber(buf, off, size); +const nanUndef = (value) => (isNaN(value) ? undefined : value); +const decSmallNumber = (buf, off, size) => nanUndef(parseInt(buf + .subarray(off, off + size) + .toString('utf8') + .replace(/\0.*$/, '') + .trim(), 8)); +// the maximum encodable as a null-terminated octal, by field size +const MAXNUM = { + 12: 0o77777777777, + 8: 0o7777777, +}; +const encNumber = (buf, off, size, num) => num === undefined ? false + : num > MAXNUM[size] || num < 0 ? + (large.encode(num, buf.subarray(off, off + size)), true) + : (encSmallNumber(buf, off, size, num), false); +const encSmallNumber = (buf, off, size, num) => buf.write(octalString(num, size), off, size, 'ascii'); +const octalString = (num, size) => padOctal(Math.floor(num).toString(8), size); +const padOctal = (str, size) => (str.length === size - 1 ? + str + : new Array(size - str.length - 1).join('0') + str + ' ') + '\0'; +const encDate = (buf, off, size, date) => date === undefined ? false : (encNumber(buf, off, size, date.getTime() / 1000)); +// enough to fill the longest string we've got +const NULLS = new Array(156).join('\0'); +// pad with nulls, return true if it's longer or non-ascii +const encString = (buf, off, size, str) => str === undefined ? false : ((buf.write(str + NULLS, off, size, 'utf8'), + str.length !== Buffer.byteLength(str) || str.length > size)); +//# sourceMappingURL=header.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/header.js.map b/node_modules/tar/dist/esm/header.js.map new file mode 100644 index 0000000..36e065b --- /dev/null +++ b/node_modules/tar/dist/esm/header.js.map @@ -0,0 +1 @@ +{"version":3,"file":"header.js","sourceRoot":"","sources":["../../src/header.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,oEAAoE;AACpE,+DAA+D;AAC/D,gEAAgE;AAEhE,OAAO,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,KAAK,KAAK,MAAM,oBAAoB,CAAA;AAE3C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AA4BnC,MAAM,OAAO,MAAM;IACjB,UAAU,GAAY,KAAK,CAAA;IAC3B,OAAO,GAAY,KAAK,CAAA;IACxB,SAAS,GAAY,KAAK,CAA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G,CAAC,MAAM,KAAK,IAAI,GAAG,CAAC,CAAC,CAAC;IACxB,GAAG;IACL,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,CAAA;AAElE,MAAM,OAAO,GAAG,CACd,GAAW,EACX,GAAW,EACX,IAAY,EACZ,IAAW,EACX,EAAE,CACF,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAC3B,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CACjD,CAAA;AAEH,8CAA8C;AAC9C,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACvC,0DAA0D;AAC1D,MAAM,SAAS,GAAG,CAChB,GAAW,EACX,GAAW,EACX,IAAY,EACZ,GAAY,EACZ,EAAE,CACF,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAC1B,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,GAAG,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC;IAC1C,GAAG,CAAC,MAAM,KAAK,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,CAC5D,CAAA","sourcesContent":["// parse a 512-byte header block to a data object, or vice-versa\n// encode returns `true` if a pax extended header is needed, because\n// the data could not be faithfully encoded in a simple header.\n// (Also, check header.needPax to see if it needs a pax header.)\n\nimport { posix as pathModule } from 'node:path'\nimport * as large from './large-numbers.js'\nimport type { EntryTypeCode, EntryTypeName } from './types.js'\nimport * as types from './types.js'\n\nexport type HeaderData = {\n path?: string\n mode?: number\n uid?: number\n gid?: number\n size?: number\n cksum?: number\n type?: EntryTypeName | 'Unsupported'\n linkpath?: string\n uname?: string\n gname?: string\n devmaj?: number\n devmin?: number\n atime?: Date\n ctime?: Date\n mtime?: Date\n\n // fields that are common in extended PAX headers, but not in the\n // \"standard\" tar header block\n charset?: string\n comment?: string\n dev?: number\n ino?: number\n nlink?: number\n}\n\nexport class Header implements HeaderData {\n cksumValid: boolean = false\n needPax: boolean = false\n nullBlock: boolean = false\n\n block?: Buffer\n path?: string\n mode?: number\n uid?: number\n gid?: number\n size?: number\n cksum?: number\n #type: EntryTypeCode | 'Unsupported' = 'Unsupported'\n linkpath?: string\n uname?: string\n gname?: string\n devmaj: number = 0\n devmin: number = 0\n atime?: Date\n ctime?: Date\n mtime?: Date\n\n charset?: string\n comment?: string\n\n constructor(\n data?: Buffer | HeaderData,\n off: number = 0,\n ex?: HeaderData,\n gex?: HeaderData,\n ) {\n if (Buffer.isBuffer(data)) {\n this.decode(data, off || 0, ex, gex)\n } else if (data) {\n this.#slurp(data)\n }\n }\n\n decode(\n buf: Buffer,\n off: number,\n ex?: HeaderData,\n gex?: HeaderData,\n ) {\n if (!off) {\n off = 0\n }\n\n if (!buf || !(buf.length >= off + 512)) {\n throw new Error('need 512 bytes for header')\n }\n\n this.path = decString(buf, off, 100)\n this.mode = decNumber(buf, off + 100, 8)\n this.uid = decNumber(buf, off + 108, 8)\n this.gid = decNumber(buf, off + 116, 8)\n this.size = decNumber(buf, off + 124, 12)\n this.mtime = decDate(buf, off + 136, 12)\n this.cksum = decNumber(buf, off + 148, 12)\n\n // if we have extended or global extended headers, apply them now\n // See https://github.com/npm/node-tar/pull/187\n // Apply global before local, so it overrides\n if (gex) this.#slurp(gex, true)\n if (ex) this.#slurp(ex)\n\n // old tar versions marked dirs as a file with a trailing /\n const t = decString(buf, off + 156, 1)\n if (types.isCode(t)) {\n this.#type = t || '0'\n }\n if (this.#type === '0' && this.path.slice(-1) === '/') {\n this.#type = '5'\n }\n\n // tar implementations sometimes incorrectly put the stat(dir).size\n // as the size in the tarball, even though Directory entries are\n // not able to have any body at all. In the very rare chance that\n // it actually DOES have a body, we weren't going to do anything with\n // it anyway, and it'll just be a warning about an invalid header.\n if (this.#type === '5') {\n this.size = 0\n }\n\n this.linkpath = decString(buf, off + 157, 100)\n if (\n buf.subarray(off + 257, off + 265).toString() ===\n 'ustar\\u000000'\n ) {\n this.uname = decString(buf, off + 265, 32)\n this.gname = decString(buf, off + 297, 32)\n /* c8 ignore start */\n this.devmaj = decNumber(buf, off + 329, 8) ?? 0\n this.devmin = decNumber(buf, off + 337, 8) ?? 0\n /* c8 ignore stop */\n if (buf[off + 475] !== 0) {\n // definitely a prefix, definitely >130 chars.\n const prefix = decString(buf, off + 345, 155)\n this.path = prefix + '/' + this.path\n } else {\n const prefix = decString(buf, off + 345, 130)\n if (prefix) {\n this.path = prefix + '/' + this.path\n }\n this.atime = decDate(buf, off + 476, 12)\n this.ctime = decDate(buf, off + 488, 12)\n }\n }\n\n let sum = 8 * 0x20\n for (let i = off; i < off + 148; i++) {\n sum += buf[i] as number\n }\n\n for (let i = off + 156; i < off + 512; i++) {\n sum += buf[i] as number\n }\n\n this.cksumValid = sum === this.cksum\n if (this.cksum === undefined && sum === 8 * 0x20) {\n this.nullBlock = true\n }\n }\n\n #slurp(ex: HeaderData, gex: boolean = false) {\n Object.assign(\n this,\n Object.fromEntries(\n Object.entries(ex).filter(([k, v]) => {\n // we slurp in everything except for the path attribute in\n // a global extended header, because that's weird. Also, any\n // null/undefined values are ignored.\n return !(\n v === null ||\n v === undefined ||\n (k === 'path' && gex) ||\n (k === 'linkpath' && gex) ||\n k === 'global'\n )\n }),\n ),\n )\n }\n\n encode(buf?: Buffer, off: number = 0) {\n if (!buf) {\n buf = this.block = Buffer.alloc(512)\n }\n\n if (this.#type === 'Unsupported') {\n this.#type = '0'\n }\n\n if (!(buf.length >= off + 512)) {\n throw new Error('need 512 bytes for header')\n }\n\n const prefixSize = this.ctime || this.atime ? 130 : 155\n const split = splitPrefix(this.path || '', prefixSize)\n const path = split[0]\n const prefix = split[1]\n this.needPax = !!split[2]\n\n this.needPax = encString(buf, off, 100, path) || this.needPax\n this.needPax =\n encNumber(buf, off + 100, 8, this.mode) || this.needPax\n this.needPax =\n encNumber(buf, off + 108, 8, this.uid) || this.needPax\n this.needPax =\n encNumber(buf, off + 116, 8, this.gid) || this.needPax\n this.needPax =\n encNumber(buf, off + 124, 12, this.size) || this.needPax\n this.needPax =\n encDate(buf, off + 136, 12, this.mtime) || this.needPax\n buf[off + 156] = this.#type.charCodeAt(0)\n this.needPax =\n encString(buf, off + 157, 100, this.linkpath) || this.needPax\n buf.write('ustar\\u000000', off + 257, 8)\n this.needPax =\n encString(buf, off + 265, 32, this.uname) || this.needPax\n this.needPax =\n encString(buf, off + 297, 32, this.gname) || this.needPax\n this.needPax =\n encNumber(buf, off + 329, 8, this.devmaj) || this.needPax\n this.needPax =\n encNumber(buf, off + 337, 8, this.devmin) || this.needPax\n this.needPax =\n encString(buf, off + 345, prefixSize, prefix) || this.needPax\n if (buf[off + 475] !== 0) {\n this.needPax =\n encString(buf, off + 345, 155, prefix) || this.needPax\n } else {\n this.needPax =\n encString(buf, off + 345, 130, prefix) || this.needPax\n this.needPax =\n encDate(buf, off + 476, 12, this.atime) || this.needPax\n this.needPax =\n encDate(buf, off + 488, 12, this.ctime) || this.needPax\n }\n\n let sum = 8 * 0x20\n for (let i = off; i < off + 148; i++) {\n sum += buf[i] as number\n }\n\n for (let i = off + 156; i < off + 512; i++) {\n sum += buf[i] as number\n }\n\n this.cksum = sum\n encNumber(buf, off + 148, 8, this.cksum)\n this.cksumValid = true\n\n return this.needPax\n }\n\n get type(): EntryTypeName {\n return (\n this.#type === 'Unsupported' ?\n this.#type\n : types.name.get(this.#type)) as EntryTypeName\n }\n\n get typeKey(): EntryTypeCode | 'Unsupported' {\n return this.#type\n }\n\n set type(type: EntryTypeCode | EntryTypeName | 'Unsupported') {\n const c = String(types.code.get(type as EntryTypeName))\n if (types.isCode(c) || c === 'Unsupported') {\n this.#type = c\n } else if (types.isCode(type)) {\n this.#type = type\n } else {\n throw new TypeError('invalid entry type: ' + type)\n }\n }\n}\n\nconst splitPrefix = (\n p: string,\n prefixSize: number,\n): [string, string, boolean] => {\n const pathSize = 100\n let pp = p\n let prefix = ''\n let ret: undefined | [string, string, boolean] = undefined\n const root = pathModule.parse(p).root || '.'\n\n if (Buffer.byteLength(pp) < pathSize) {\n ret = [pp, prefix, false]\n } else {\n // first set prefix to the dir, and path to the base\n prefix = pathModule.dirname(pp)\n pp = pathModule.basename(pp)\n\n do {\n if (\n Buffer.byteLength(pp) <= pathSize &&\n Buffer.byteLength(prefix) <= prefixSize\n ) {\n // both fit!\n ret = [pp, prefix, false]\n } else if (\n Buffer.byteLength(pp) > pathSize &&\n Buffer.byteLength(prefix) <= prefixSize\n ) {\n // prefix fits in prefix, but path doesn't fit in path\n ret = [pp.slice(0, pathSize - 1), prefix, true]\n } else {\n // make path take a bit from prefix\n pp = pathModule.join(pathModule.basename(prefix), pp)\n prefix = pathModule.dirname(prefix)\n }\n } while (prefix !== root && ret === undefined)\n\n // at this point, found no resolution, just truncate\n if (!ret) {\n ret = [p.slice(0, pathSize - 1), '', true]\n }\n }\n return ret\n}\n\nconst decString = (buf: Buffer, off: number, size: number) =>\n buf\n .subarray(off, off + size)\n .toString('utf8')\n .replace(/\\0.*/, '')\n\nconst decDate = (buf: Buffer, off: number, size: number) =>\n numToDate(decNumber(buf, off, size))\n\nconst numToDate = (num?: number) =>\n num === undefined ? undefined : new Date(num * 1000)\n\nconst decNumber = (buf: Buffer, off: number, size: number) =>\n Number(buf[off]) & 0x80 ?\n large.parse(buf.subarray(off, off + size))\n : decSmallNumber(buf, off, size)\n\nconst nanUndef = (value: number) => (isNaN(value) ? undefined : value)\n\nconst decSmallNumber = (buf: Buffer, off: number, size: number) =>\n nanUndef(\n parseInt(\n buf\n .subarray(off, off + size)\n .toString('utf8')\n .replace(/\\0.*$/, '')\n .trim(),\n 8,\n ),\n )\n\n// the maximum encodable as a null-terminated octal, by field size\nconst MAXNUM = {\n 12: 0o77777777777,\n 8: 0o7777777,\n}\n\nconst encNumber = (\n buf: Buffer,\n off: number,\n size: 12 | 8,\n num?: number,\n) =>\n num === undefined ? false\n : num > MAXNUM[size] || num < 0 ?\n (large.encode(num, buf.subarray(off, off + size)), true)\n : (encSmallNumber(buf, off, size, num), false)\n\nconst encSmallNumber = (\n buf: Buffer,\n off: number,\n size: number,\n num: number,\n) => buf.write(octalString(num, size), off, size, 'ascii')\n\nconst octalString = (num: number, size: number) =>\n padOctal(Math.floor(num).toString(8), size)\n\nconst padOctal = (str: string, size: number) =>\n (str.length === size - 1 ?\n str\n : new Array(size - str.length - 1).join('0') + str + ' ') + '\\0'\n\nconst encDate = (\n buf: Buffer,\n off: number,\n size: 8 | 12,\n date?: Date,\n) =>\n date === undefined ? false : (\n encNumber(buf, off, size, date.getTime() / 1000)\n )\n\n// enough to fill the longest string we've got\nconst NULLS = new Array(156).join('\\0')\n// pad with nulls, return true if it's longer or non-ascii\nconst encString = (\n buf: Buffer,\n off: number,\n size: number,\n str?: string,\n) =>\n str === undefined ? false : (\n (buf.write(str + NULLS, off, size, 'utf8'),\n str.length !== Buffer.byteLength(str) || str.length > size)\n )\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/index.d.ts b/node_modules/tar/dist/esm/index.d.ts new file mode 100644 index 0000000..a582123 --- /dev/null +++ b/node_modules/tar/dist/esm/index.d.ts @@ -0,0 +1,20 @@ +export { type TarOptionsWithAliasesAsync, type TarOptionsWithAliasesAsyncFile, type TarOptionsWithAliasesAsyncNoFile, type TarOptionsWithAliasesSyncNoFile, type TarOptionsWithAliases, type TarOptionsWithAliasesFile, type TarOptionsWithAliasesSync, type TarOptionsWithAliasesSyncFile, } from './options.js'; +export * from './create.js'; +export { create as c } from './create.js'; +export * from './extract.js'; +export { extract as x } from './extract.js'; +export * from './header.js'; +export * from './list.js'; +export { list as t } from './list.js'; +export * from './pack.js'; +export * from './parse.js'; +export * from './pax.js'; +export * from './read-entry.js'; +export * from './replace.js'; +export { replace as r } from './replace.js'; +export * as types from './types.js'; +export * from './unpack.js'; +export * from './update.js'; +export { update as u } from './update.js'; +export * from './write-entry.js'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/index.d.ts.map b/node_modules/tar/dist/esm/index.d.ts.map new file mode 100644 index 0000000..71d3bed --- /dev/null +++ b/node_modules/tar/dist/esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EACrC,KAAK,+BAA+B,EACpC,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,GACnC,MAAM,cAAc,CAAA;AAErB,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,aAAa,CAAA;AACzC,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,cAAc,CAAA;AAC3C,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,IAAI,IAAI,CAAC,EAAE,MAAM,WAAW,CAAA;AAErC,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,aAAa,CAAA;AACzC,cAAc,kBAAkB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/index.js b/node_modules/tar/dist/esm/index.js new file mode 100644 index 0000000..1bac641 --- /dev/null +++ b/node_modules/tar/dist/esm/index.js @@ -0,0 +1,20 @@ +export * from './create.js'; +export { create as c } from './create.js'; +export * from './extract.js'; +export { extract as x } from './extract.js'; +export * from './header.js'; +export * from './list.js'; +export { list as t } from './list.js'; +// classes +export * from './pack.js'; +export * from './parse.js'; +export * from './pax.js'; +export * from './read-entry.js'; +export * from './replace.js'; +export { replace as r } from './replace.js'; +export * as types from './types.js'; +export * from './unpack.js'; +export * from './update.js'; +export { update as u } from './update.js'; +export * from './write-entry.js'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/index.js.map b/node_modules/tar/dist/esm/index.js.map new file mode 100644 index 0000000..c9923d7 --- /dev/null +++ b/node_modules/tar/dist/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAWA,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,aAAa,CAAA;AACzC,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,cAAc,CAAA;AAC3C,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,IAAI,IAAI,CAAC,EAAE,MAAM,WAAW,CAAA;AACrC,UAAU;AACV,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,aAAa,CAAA;AACzC,cAAc,kBAAkB,CAAA","sourcesContent":["export {\n type TarOptionsWithAliasesAsync,\n type TarOptionsWithAliasesAsyncFile,\n type TarOptionsWithAliasesAsyncNoFile,\n type TarOptionsWithAliasesSyncNoFile,\n type TarOptionsWithAliases,\n type TarOptionsWithAliasesFile,\n type TarOptionsWithAliasesSync,\n type TarOptionsWithAliasesSyncFile,\n} from './options.js'\n\nexport * from './create.js'\nexport { create as c } from './create.js'\nexport * from './extract.js'\nexport { extract as x } from './extract.js'\nexport * from './header.js'\nexport * from './list.js'\nexport { list as t } from './list.js'\n// classes\nexport * from './pack.js'\nexport * from './parse.js'\nexport * from './pax.js'\nexport * from './read-entry.js'\nexport * from './replace.js'\nexport { replace as r } from './replace.js'\nexport * as types from './types.js'\nexport * from './unpack.js'\nexport * from './update.js'\nexport { update as u } from './update.js'\nexport * from './write-entry.js'\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/large-numbers.d.ts b/node_modules/tar/dist/esm/large-numbers.d.ts new file mode 100644 index 0000000..5812c6e --- /dev/null +++ b/node_modules/tar/dist/esm/large-numbers.d.ts @@ -0,0 +1,4 @@ +/// +export declare const encode: (num: number, buf: Buffer) => Buffer; +export declare const parse: (buf: Buffer) => number; +//# sourceMappingURL=large-numbers.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/large-numbers.d.ts.map b/node_modules/tar/dist/esm/large-numbers.d.ts.map new file mode 100644 index 0000000..6a6d97d --- /dev/null +++ b/node_modules/tar/dist/esm/large-numbers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"large-numbers.d.ts","sourceRoot":"","sources":["../../src/large-numbers.ts"],"names":[],"mappings":";AAGA,eAAO,MAAM,MAAM,QAAS,MAAM,OAAO,MAAM,WAa9C,CAAA;AA6BD,eAAO,MAAM,KAAK,QAAS,MAAM,WAmBhC,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/large-numbers.js b/node_modules/tar/dist/esm/large-numbers.js new file mode 100644 index 0000000..4f2f7e5 --- /dev/null +++ b/node_modules/tar/dist/esm/large-numbers.js @@ -0,0 +1,94 @@ +// Tar can encode large and negative numbers using a leading byte of +// 0xff for negative, and 0x80 for positive. +export const encode = (num, buf) => { + if (!Number.isSafeInteger(num)) { + // The number is so large that javascript cannot represent it with integer + // precision. + throw Error('cannot encode number outside of javascript safe integer range'); + } + else if (num < 0) { + encodeNegative(num, buf); + } + else { + encodePositive(num, buf); + } + return buf; +}; +const encodePositive = (num, buf) => { + buf[0] = 0x80; + for (var i = buf.length; i > 1; i--) { + buf[i - 1] = num & 0xff; + num = Math.floor(num / 0x100); + } +}; +const encodeNegative = (num, buf) => { + buf[0] = 0xff; + var flipped = false; + num = num * -1; + for (var i = buf.length; i > 1; i--) { + var byte = num & 0xff; + num = Math.floor(num / 0x100); + if (flipped) { + buf[i - 1] = onesComp(byte); + } + else if (byte === 0) { + buf[i - 1] = 0; + } + else { + flipped = true; + buf[i - 1] = twosComp(byte); + } + } +}; +export const parse = (buf) => { + const pre = buf[0]; + const value = pre === 0x80 ? pos(buf.subarray(1, buf.length)) + : pre === 0xff ? twos(buf) + : null; + if (value === null) { + throw Error('invalid base256 encoding'); + } + if (!Number.isSafeInteger(value)) { + // The number is so large that javascript cannot represent it with integer + // precision. + throw Error('parsed number outside of javascript safe integer range'); + } + return value; +}; +const twos = (buf) => { + var len = buf.length; + var sum = 0; + var flipped = false; + for (var i = len - 1; i > -1; i--) { + var byte = Number(buf[i]); + var f; + if (flipped) { + f = onesComp(byte); + } + else if (byte === 0) { + f = byte; + } + else { + flipped = true; + f = twosComp(byte); + } + if (f !== 0) { + sum -= f * Math.pow(256, len - i - 1); + } + } + return sum; +}; +const pos = (buf) => { + var len = buf.length; + var sum = 0; + for (var i = len - 1; i > -1; i--) { + var byte = Number(buf[i]); + if (byte !== 0) { + sum += byte * Math.pow(256, len - i - 1); + } + } + return sum; +}; +const onesComp = (byte) => (0xff ^ byte) & 0xff; +const twosComp = (byte) => ((0xff ^ byte) + 1) & 0xff; +//# sourceMappingURL=large-numbers.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/large-numbers.js.map b/node_modules/tar/dist/esm/large-numbers.js.map new file mode 100644 index 0000000..86bb941 --- /dev/null +++ b/node_modules/tar/dist/esm/large-numbers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"large-numbers.js","sourceRoot":"","sources":["../../src/large-numbers.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,4CAA4C;AAE5C,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,EAAE;IACjD,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/B,0EAA0E;QAC1E,aAAa;QACb,MAAM,KAAK,CACT,+DAA+D,CAChE,CAAA;IACH,CAAC;SAAM,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;QACnB,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;IAC1B,CAAC;SAAM,CAAC;QACN,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;IAC1B,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AAED,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,EAAE;IAClD,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;IAEb,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACpC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAA;QACvB,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,CAAA;IAC/B,CAAC;AACH,CAAC,CAAA;AAED,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,EAAE;IAClD,GAA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C,EAAE,EAAE,CAAC;QAClC,IAAI,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QACzB,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;YACf,GAAG,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AAED,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,CAAA;AAEvD,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAA","sourcesContent":["// Tar can encode large and negative numbers using a leading byte of\n// 0xff for negative, and 0x80 for positive.\n\nexport const encode = (num: number, buf: Buffer) => {\n if (!Number.isSafeInteger(num)) {\n // The number is so large that javascript cannot represent it with integer\n // precision.\n throw Error(\n 'cannot encode number outside of javascript safe integer range',\n )\n } else if (num < 0) {\n encodeNegative(num, buf)\n } else {\n encodePositive(num, buf)\n }\n return buf\n}\n\nconst encodePositive = (num: number, buf: Buffer) => {\n buf[0] = 0x80\n\n for (var i = buf.length; i > 1; i--) {\n buf[i - 1] = num & 0xff\n num = Math.floor(num / 0x100)\n }\n}\n\nconst encodeNegative = (num: number, buf: Buffer) => {\n buf[0] = 0xff\n var flipped = false\n num = num * -1\n for (var i = buf.length; i > 1; i--) {\n var byte = num & 0xff\n num = Math.floor(num / 0x100)\n if (flipped) {\n buf[i - 1] = onesComp(byte)\n } else if (byte === 0) {\n buf[i - 1] = 0\n } else {\n flipped = true\n buf[i - 1] = twosComp(byte)\n }\n }\n}\n\nexport const parse = (buf: Buffer) => {\n const pre = buf[0]\n const value =\n pre === 0x80 ? pos(buf.subarray(1, buf.length))\n : pre === 0xff ? twos(buf)\n : null\n if (value === null) {\n throw Error('invalid base256 encoding')\n }\n\n if (!Number.isSafeInteger(value)) {\n // The number is so large that javascript cannot represent it with integer\n // precision.\n throw Error(\n 'parsed number outside of javascript safe integer range',\n )\n }\n\n return value\n}\n\nconst twos = (buf: Buffer) => {\n var len = buf.length\n var sum = 0\n var flipped = false\n for (var i = len - 1; i > -1; i--) {\n var byte = Number(buf[i])\n var f\n if (flipped) {\n f = onesComp(byte)\n } else if (byte === 0) {\n f = byte\n } else {\n flipped = true\n f = twosComp(byte)\n }\n if (f !== 0) {\n sum -= f * Math.pow(256, len - i - 1)\n }\n }\n return sum\n}\n\nconst pos = (buf: Buffer) => {\n var len = buf.length\n var sum = 0\n for (var i = len - 1; i > -1; i--) {\n var byte = Number(buf[i])\n if (byte !== 0) {\n sum += byte * Math.pow(256, len - i - 1)\n }\n }\n return sum\n}\n\nconst onesComp = (byte: number) => (0xff ^ byte) & 0xff\n\nconst twosComp = (byte: number) => ((0xff ^ byte) + 1) & 0xff\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/list.d.ts b/node_modules/tar/dist/esm/list.d.ts new file mode 100644 index 0000000..890a11b --- /dev/null +++ b/node_modules/tar/dist/esm/list.d.ts @@ -0,0 +1,7 @@ +import { TarOptions } from './options.js'; +import { Parser } from './parse.js'; +export declare const filesFilter: (opt: TarOptions, files: string[]) => void; +export declare const list: import("./make-command.js").TarCommand; +//# sourceMappingURL=list.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/list.d.ts.map b/node_modules/tar/dist/esm/list.d.ts.map new file mode 100644 index 0000000..b45ab2c --- /dev/null +++ b/node_modules/tar/dist/esm/list.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/list.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,UAAU,EAGX,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAgBnC,eAAO,MAAM,WAAW,QAAS,UAAU,SAAS,MAAM,EAAE,SA4B3D,CAAA;AA4DD,eAAO,MAAM,IAAI;UAG4B,IAAI;EAMhD,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/list.js b/node_modules/tar/dist/esm/list.js new file mode 100644 index 0000000..f490684 --- /dev/null +++ b/node_modules/tar/dist/esm/list.js @@ -0,0 +1,106 @@ +// tar -t +import * as fsm from '@isaacs/fs-minipass'; +import fs from 'node:fs'; +import { dirname, parse } from 'path'; +import { makeCommand } from './make-command.js'; +import { Parser } from './parse.js'; +import { stripTrailingSlashes } from './strip-trailing-slashes.js'; +const onReadEntryFunction = (opt) => { + const onReadEntry = opt.onReadEntry; + opt.onReadEntry = + onReadEntry ? + e => { + onReadEntry(e); + e.resume(); + } + : e => e.resume(); +}; +// construct a filter that limits the file entries listed +// include child entries if a dir is included +export const filesFilter = (opt, files) => { + const map = new Map(files.map(f => [stripTrailingSlashes(f), true])); + const filter = opt.filter; + const mapHas = (file, r = '') => { + const root = r || parse(file).root || '.'; + let ret; + if (file === root) + ret = false; + else { + const m = map.get(file); + if (m !== undefined) { + ret = m; + } + else { + ret = mapHas(dirname(file), root); + } + } + map.set(file, ret); + return ret; + }; + opt.filter = + filter ? + (file, entry) => filter(file, entry) && mapHas(stripTrailingSlashes(file)) + : file => mapHas(stripTrailingSlashes(file)); +}; +const listFileSync = (opt) => { + const p = new Parser(opt); + const file = opt.file; + let fd; + try { + const stat = fs.statSync(file); + const readSize = opt.maxReadSize || 16 * 1024 * 1024; + if (stat.size < readSize) { + p.end(fs.readFileSync(file)); + } + else { + let pos = 0; + const buf = Buffer.allocUnsafe(readSize); + fd = fs.openSync(file, 'r'); + while (pos < stat.size) { + const bytesRead = fs.readSync(fd, buf, 0, readSize, pos); + pos += bytesRead; + p.write(buf.subarray(0, bytesRead)); + } + p.end(); + } + } + finally { + if (typeof fd === 'number') { + try { + fs.closeSync(fd); + /* c8 ignore next */ + } + catch (er) { } + } + } +}; +const listFile = (opt, _files) => { + const parse = new Parser(opt); + const readSize = opt.maxReadSize || 16 * 1024 * 1024; + const file = opt.file; + const p = new Promise((resolve, reject) => { + parse.on('error', reject); + parse.on('end', resolve); + fs.stat(file, (er, stat) => { + if (er) { + reject(er); + } + else { + const stream = new fsm.ReadStream(file, { + readSize: readSize, + size: stat.size, + }); + stream.on('error', reject); + stream.pipe(parse); + } + }); + }); + return p; +}; +export const list = makeCommand(listFileSync, listFile, opt => new Parser(opt), opt => new Parser(opt), (opt, files) => { + if (files?.length) + filesFilter(opt, files); + if (!opt.noResume) + onReadEntryFunction(opt); +}); +//# sourceMappingURL=list.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/list.js.map b/node_modules/tar/dist/esm/list.js.map new file mode 100644 index 0000000..9012c4a --- /dev/null +++ b/node_modules/tar/dist/esm/list.js.map @@ -0,0 +1 @@ +{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/list.ts"],"names":[],"mappings":"AAAA,SAAS;AACT,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAA;AAC1C,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAM/C,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAElE,MAAM,mBAAmB,GAAG,CAAC,GAAe,EAAE,EAAE;IAC9C,MAAM,WAAW,GAAG,GAAG,CAAC,WAAW,CAAA;IACnC,GAAG,CAAC,WAAW;QACb,WAAW,CAAC,CAAC;YACX,CAAC,CAAC,EAAE;gBACF,WAAW,CAAC,CAAC,CAAC,CAAA;gBACd,CAAC,CAAC,MAAM,EAAE,CAAA;YACZ,CAAC;YACH,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM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,GAAG,CAAC,EACtB,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;IACb,IAAI,KAAK,EAAE,MAAM;QAAE,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IAC1C,IAAI,CAAC,GAAG,CAAC,QAAQ;QAAE,mBAAmB,CAAC,GAAG,CAAC,CAAA;AAC7C,CAAC,CACF,CAAA","sourcesContent":["// tar -t\nimport * as fsm from '@isaacs/fs-minipass'\nimport fs from 'node:fs'\nimport { dirname, parse } from 'path'\nimport { makeCommand } from './make-command.js'\nimport {\n TarOptions,\n TarOptionsFile,\n TarOptionsSyncFile,\n} from './options.js'\nimport { Parser } from './parse.js'\nimport { stripTrailingSlashes } from './strip-trailing-slashes.js'\n\nconst onReadEntryFunction = (opt: TarOptions) => {\n const onReadEntry = opt.onReadEntry\n opt.onReadEntry =\n onReadEntry ?\n e => {\n onReadEntry(e)\n e.resume()\n }\n : e => e.resume()\n}\n\n// construct a filter that limits the file entries listed\n// include child entries if a dir is included\nexport const filesFilter = (opt: TarOptions, files: string[]) => {\n const map = new Map(\n files.map(f => [stripTrailingSlashes(f), true]),\n )\n const filter = opt.filter\n\n const mapHas = (file: string, r: string = ''): boolean => {\n const root = r || parse(file).root || '.'\n let ret: boolean\n if (file === root) ret = false\n else {\n const m = map.get(file)\n if (m !== undefined) {\n ret = m\n } else {\n ret = mapHas(dirname(file), root)\n }\n }\n\n map.set(file, ret)\n return ret\n }\n\n opt.filter =\n filter ?\n (file, entry) =>\n filter(file, entry) && mapHas(stripTrailingSlashes(file))\n : file => mapHas(stripTrailingSlashes(file))\n}\n\nconst listFileSync = (opt: TarOptionsSyncFile) => {\n const p = new Parser(opt)\n const file = opt.file\n let fd\n try {\n const stat = fs.statSync(file)\n const readSize = opt.maxReadSize || 16 * 1024 * 1024\n if (stat.size < readSize) {\n p.end(fs.readFileSync(file))\n } else {\n let pos = 0\n const buf = Buffer.allocUnsafe(readSize)\n fd = fs.openSync(file, 'r')\n while (pos < stat.size) {\n const bytesRead = fs.readSync(fd, buf, 0, readSize, pos)\n pos += bytesRead\n p.write(buf.subarray(0, bytesRead))\n }\n p.end()\n }\n } finally {\n if (typeof fd === 'number') {\n try {\n fs.closeSync(fd)\n /* c8 ignore next */\n } catch (er) {}\n }\n }\n}\n\nconst listFile = (\n opt: TarOptionsFile,\n _files: string[],\n): Promise => {\n const parse = new Parser(opt)\n const readSize = opt.maxReadSize || 16 * 1024 * 1024\n\n const file = opt.file\n const p = new Promise((resolve, reject) => {\n parse.on('error', reject)\n parse.on('end', resolve)\n\n fs.stat(file, (er, stat) => {\n if (er) {\n reject(er)\n } else {\n const stream = new fsm.ReadStream(file, {\n readSize: readSize,\n size: stat.size,\n })\n stream.on('error', reject)\n stream.pipe(parse)\n }\n })\n })\n return p\n}\n\nexport const list = makeCommand(\n listFileSync,\n listFile,\n opt => new Parser(opt) as Parser & { sync: true },\n opt => new Parser(opt),\n (opt, files) => {\n if (files?.length) filesFilter(opt, files)\n if (!opt.noResume) onReadEntryFunction(opt)\n },\n)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/make-command.d.ts b/node_modules/tar/dist/esm/make-command.d.ts new file mode 100644 index 0000000..cd88929 --- /dev/null +++ b/node_modules/tar/dist/esm/make-command.d.ts @@ -0,0 +1,49 @@ +import { TarOptions, TarOptionsAsyncFile, TarOptionsAsyncNoFile, TarOptionsSyncFile, TarOptionsSyncNoFile, TarOptionsWithAliases, TarOptionsWithAliasesAsync, TarOptionsWithAliasesAsyncFile, TarOptionsWithAliasesAsyncNoFile, TarOptionsWithAliasesFile, TarOptionsWithAliasesNoFile, TarOptionsWithAliasesSync, TarOptionsWithAliasesSyncFile, TarOptionsWithAliasesSyncNoFile } from './options.js'; +export type CB = (er?: Error) => any; +export type TarCommand = { + (): AsyncClass; + (opt: TarOptionsWithAliasesAsyncNoFile): AsyncClass; + (entries: string[]): AsyncClass; + (opt: TarOptionsWithAliasesAsyncNoFile, entries: string[]): AsyncClass; +} & { + (opt: TarOptionsWithAliasesSyncNoFile): SyncClass; + (opt: TarOptionsWithAliasesSyncNoFile, entries: string[]): SyncClass; +} & { + (opt: TarOptionsWithAliasesAsyncFile): Promise; + (opt: TarOptionsWithAliasesAsyncFile, entries: string[]): Promise; + (opt: TarOptionsWithAliasesAsyncFile, cb: CB): Promise; + (opt: TarOptionsWithAliasesAsyncFile, entries: string[], cb: CB): Promise; +} & { + (opt: TarOptionsWithAliasesSyncFile): void; + (opt: TarOptionsWithAliasesSyncFile, entries: string[]): void; +} & { + (opt: TarOptionsWithAliasesSync): typeof opt extends (TarOptionsWithAliasesFile) ? void : typeof opt extends TarOptionsWithAliasesNoFile ? SyncClass : void | SyncClass; + (opt: TarOptionsWithAliasesSync, entries: string[]): typeof opt extends TarOptionsWithAliasesFile ? void : typeof opt extends TarOptionsWithAliasesNoFile ? SyncClass : void | SyncClass; +} & { + (opt: TarOptionsWithAliasesAsync): typeof opt extends (TarOptionsWithAliasesFile) ? Promise : typeof opt extends TarOptionsWithAliasesNoFile ? AsyncClass : Promise | AsyncClass; + (opt: TarOptionsWithAliasesAsync, entries: string[]): typeof opt extends TarOptionsWithAliasesFile ? Promise : typeof opt extends TarOptionsWithAliasesNoFile ? AsyncClass : Promise | AsyncClass; + (opt: TarOptionsWithAliasesAsync, cb: CB): Promise; + (opt: TarOptionsWithAliasesAsync, entries: string[], cb: CB): typeof opt extends TarOptionsWithAliasesFile ? Promise : typeof opt extends TarOptionsWithAliasesNoFile ? never : Promise; +} & { + (opt: TarOptionsWithAliasesFile): Promise | void; + (opt: TarOptionsWithAliasesFile, entries: string[]): typeof opt extends TarOptionsWithAliasesSync ? void : typeof opt extends TarOptionsWithAliasesAsync ? Promise : Promise | void; + (opt: TarOptionsWithAliasesFile, cb: CB): Promise; + (opt: TarOptionsWithAliasesFile, entries: string[], cb: CB): typeof opt extends TarOptionsWithAliasesSync ? never : typeof opt extends TarOptionsWithAliasesAsync ? Promise : Promise; +} & { + (opt: TarOptionsWithAliasesNoFile): typeof opt extends (TarOptionsWithAliasesSync) ? SyncClass : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass : SyncClass | AsyncClass; + (opt: TarOptionsWithAliasesNoFile, entries: string[]): typeof opt extends TarOptionsWithAliasesSync ? SyncClass : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass : SyncClass | AsyncClass; +} & { + (opt: TarOptionsWithAliases): typeof opt extends (TarOptionsWithAliasesFile) ? typeof opt extends TarOptionsWithAliasesSync ? void : typeof opt extends TarOptionsWithAliasesAsync ? Promise : void | Promise : typeof opt extends TarOptionsWithAliasesNoFile ? typeof opt extends TarOptionsWithAliasesSync ? SyncClass : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass : SyncClass | AsyncClass : typeof opt extends TarOptionsWithAliasesSync ? SyncClass | void : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass | Promise : SyncClass | void | AsyncClass | Promise; +} & { + syncFile: (opt: TarOptionsSyncFile, entries: string[]) => void; + asyncFile: (opt: TarOptionsAsyncFile, entries: string[], cb?: CB) => Promise; + syncNoFile: (opt: TarOptionsSyncNoFile, entries: string[]) => SyncClass; + asyncNoFile: (opt: TarOptionsAsyncNoFile, entries: string[]) => AsyncClass; + validate?: (opt: TarOptions, entries?: string[]) => void; +}; +export declare const makeCommand: (syncFile: (opt: TarOptionsSyncFile, entries: string[]) => void, asyncFile: (opt: TarOptionsAsyncFile, entries: string[], cb?: CB) => Promise, syncNoFile: (opt: TarOptionsSyncNoFile, entries: string[]) => SyncClass, asyncNoFile: (opt: TarOptionsAsyncNoFile, entries: string[]) => AsyncClass, validate?: (opt: TarOptions, entries?: string[]) => void) => TarCommand; +//# sourceMappingURL=make-command.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/make-command.d.ts.map b/node_modules/tar/dist/esm/make-command.d.ts.map new file mode 100644 index 0000000..7cb3c16 --- /dev/null +++ b/node_modules/tar/dist/esm/make-command.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"make-command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C1B,OAAO,EAAE,MAAM,EAAE,KACd,UAAU,aACJ,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,IAAI,KACvD,WAAW,UAAU,EAAE,SAAS,CAmElC,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/make-command.js b/node_modules/tar/dist/esm/make-command.js new file mode 100644 index 0000000..f2f737b --- /dev/null +++ b/node_modules/tar/dist/esm/make-command.js @@ -0,0 +1,57 @@ +import { dealias, isAsyncFile, isAsyncNoFile, isSyncFile, isSyncNoFile, } from './options.js'; +export const makeCommand = (syncFile, asyncFile, syncNoFile, asyncNoFile, validate) => { + return Object.assign((opt_ = [], entries, cb) => { + if (Array.isArray(opt_)) { + entries = opt_; + opt_ = {}; + } + if (typeof entries === 'function') { + cb = entries; + entries = undefined; + } + if (!entries) { + entries = []; + } + else { + entries = Array.from(entries); + } + const opt = dealias(opt_); + validate?.(opt, entries); + if (isSyncFile(opt)) { + if (typeof cb === 'function') { + throw new TypeError('callback not supported for sync tar functions'); + } + return syncFile(opt, entries); + } + else if (isAsyncFile(opt)) { + const p = asyncFile(opt, entries); + // weirdness to make TS happy + const c = cb ? cb : undefined; + return c ? p.then(() => c(), c) : p; + } + else if (isSyncNoFile(opt)) { + if (typeof cb === 'function') { + throw new TypeError('callback not supported for sync tar functions'); + } + return syncNoFile(opt, entries); + } + else if (isAsyncNoFile(opt)) { + if (typeof cb === 'function') { + throw new TypeError('callback only supported with file option'); + } + return asyncNoFile(opt, entries); + /* c8 ignore start */ + } + else { + throw new Error('impossible options??'); + } + /* c8 ignore stop */ + }, { + syncFile, + asyncFile, + syncNoFile, + asyncNoFile, + validate, + }); +}; +//# sourceMappingURL=make-command.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/make-command.js.map b/node_modules/tar/dist/esm/make-command.js.map new file mode 100644 index 0000000..de11ae4 --- /dev/null +++ b/node_modules/tar/dist/esm/make-command.js.map @@ -0,0 +1 @@ +{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AC7B,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;YAC7B,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QACrC,CAAC;aAAM,IAAI,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;YAC7B,IAAI,OAAO,EAAE,KAAK,UAAU,EAAE,CAAC;gBAC7B,MAAM,IAAI,SAAS,CACjB,+CAA+C,CAChD,CAAA;YACH,CAAC;YACD,OAAO,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;QACjC,CAAC;aAAM,IAAI,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC;YAC9B,IAAI,OAAO,EAAE,KAAK,UAAU,EAAE,CAAC;gBAC7B,MAAM,IAAI,SAAS,CACjB,0CAA0C,CAC3C,CAAA;YACH,CAAC;YACD,OAAO,WAAW,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;YAChC,qBAAqB;QACvB,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAA;QACzC,CAAC;QACD,oBAAoB;IACtB,CAAC,EACD;QACE,QAAQ;QACR,SAAS;QACT,UAAU;QACV,WAAW;QACX,QAAQ;KACT,CACmC,CAAA;AACxC,CAAC,CAAA","sourcesContent":["import {\n dealias,\n isAsyncFile,\n isAsyncNoFile,\n isSyncFile,\n isSyncNoFile,\n TarOptions,\n TarOptionsAsyncFile,\n TarOptionsAsyncNoFile,\n TarOptionsSyncFile,\n TarOptionsSyncNoFile,\n TarOptionsWithAliases,\n TarOptionsWithAliasesAsync,\n TarOptionsWithAliasesAsyncFile,\n TarOptionsWithAliasesAsyncNoFile,\n TarOptionsWithAliasesFile,\n TarOptionsWithAliasesNoFile,\n TarOptionsWithAliasesSync,\n TarOptionsWithAliasesSyncFile,\n TarOptionsWithAliasesSyncNoFile,\n} from './options.js'\n\nexport type CB = (er?: Error) => any\n\nexport type TarCommand<\n AsyncClass,\n SyncClass extends { sync: true },\n> = {\n // async and no file specified\n (): AsyncClass\n (opt: TarOptionsWithAliasesAsyncNoFile): AsyncClass\n (entries: string[]): AsyncClass\n (\n opt: TarOptionsWithAliasesAsyncNoFile,\n entries: string[],\n ): AsyncClass\n} & {\n // sync and no file\n (opt: TarOptionsWithAliasesSyncNoFile): SyncClass\n (opt: TarOptionsWithAliasesSyncNoFile, entries: string[]): SyncClass\n} & {\n // async and file\n (opt: TarOptionsWithAliasesAsyncFile): Promise\n (\n opt: TarOptionsWithAliasesAsyncFile,\n entries: string[],\n ): Promise\n (opt: TarOptionsWithAliasesAsyncFile, cb: CB): Promise\n (\n opt: TarOptionsWithAliasesAsyncFile,\n entries: string[],\n cb: CB,\n ): Promise\n} & {\n // sync and file\n (opt: TarOptionsWithAliasesSyncFile): void\n (opt: TarOptionsWithAliasesSyncFile, entries: string[]): void\n} & {\n // sync, maybe file\n (opt: TarOptionsWithAliasesSync): typeof opt extends (\n TarOptionsWithAliasesFile\n ) ?\n void\n : typeof opt extends TarOptionsWithAliasesNoFile ? SyncClass\n : void | SyncClass\n (\n opt: TarOptionsWithAliasesSync,\n entries: string[],\n ): typeof opt extends TarOptionsWithAliasesFile ? void\n : typeof opt extends TarOptionsWithAliasesNoFile ? SyncClass\n : void | SyncClass\n} & {\n // async, maybe file\n (opt: TarOptionsWithAliasesAsync): typeof opt extends (\n TarOptionsWithAliasesFile\n ) ?\n Promise\n : typeof opt extends TarOptionsWithAliasesNoFile ? AsyncClass\n : Promise | AsyncClass\n (\n opt: TarOptionsWithAliasesAsync,\n entries: string[],\n ): typeof opt extends TarOptionsWithAliasesFile ? Promise\n : typeof opt extends TarOptionsWithAliasesNoFile ? AsyncClass\n : Promise | AsyncClass\n (opt: TarOptionsWithAliasesAsync, cb: CB): Promise\n (\n opt: TarOptionsWithAliasesAsync,\n entries: string[],\n cb: CB,\n ): typeof opt extends TarOptionsWithAliasesFile ? Promise\n : typeof opt extends TarOptionsWithAliasesNoFile ? never\n : Promise\n} & {\n // maybe sync, file\n (opt: TarOptionsWithAliasesFile): Promise | void\n (\n opt: TarOptionsWithAliasesFile,\n entries: string[],\n ): typeof opt extends TarOptionsWithAliasesSync ? void\n : typeof opt extends TarOptionsWithAliasesAsync ? Promise\n : Promise | void\n (opt: TarOptionsWithAliasesFile, cb: CB): Promise\n (\n opt: TarOptionsWithAliasesFile,\n entries: string[],\n cb: CB,\n ): typeof opt extends TarOptionsWithAliasesSync ? never\n : typeof opt extends TarOptionsWithAliasesAsync ? Promise\n : Promise\n} & {\n // maybe sync, no file\n (opt: TarOptionsWithAliasesNoFile): typeof opt extends (\n TarOptionsWithAliasesSync\n ) ?\n SyncClass\n : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass\n : SyncClass | AsyncClass\n (\n opt: TarOptionsWithAliasesNoFile,\n entries: string[],\n ): typeof opt extends TarOptionsWithAliasesSync ? SyncClass\n : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass\n : SyncClass | AsyncClass\n} & {\n // maybe sync, maybe file\n (opt: TarOptionsWithAliases): typeof opt extends (\n TarOptionsWithAliasesFile\n ) ?\n typeof opt extends TarOptionsWithAliasesSync ? void\n : typeof opt extends TarOptionsWithAliasesAsync ? Promise\n : void | Promise\n : typeof opt extends TarOptionsWithAliasesNoFile ?\n typeof opt extends TarOptionsWithAliasesSync ? SyncClass\n : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass\n : SyncClass | AsyncClass\n : typeof opt extends TarOptionsWithAliasesSync ? SyncClass | void\n : typeof opt extends TarOptionsWithAliasesAsync ?\n AsyncClass | Promise\n : SyncClass | void | AsyncClass | Promise\n} & {\n // extras\n syncFile: (opt: TarOptionsSyncFile, entries: string[]) => void\n asyncFile: (\n opt: TarOptionsAsyncFile,\n entries: string[],\n cb?: CB,\n ) => Promise\n syncNoFile: (\n opt: TarOptionsSyncNoFile,\n entries: string[],\n ) => SyncClass\n asyncNoFile: (\n opt: TarOptionsAsyncNoFile,\n entries: string[],\n ) => AsyncClass\n validate?: (opt: TarOptions, entries?: string[]) => void\n}\n\nexport const makeCommand = <\n AsyncClass,\n SyncClass extends { sync: true },\n>(\n syncFile: (opt: TarOptionsSyncFile, entries: string[]) => void,\n asyncFile: (\n opt: TarOptionsAsyncFile,\n entries: string[],\n cb?: CB,\n ) => Promise,\n syncNoFile: (\n opt: TarOptionsSyncNoFile,\n entries: string[],\n ) => SyncClass,\n asyncNoFile: (\n opt: TarOptionsAsyncNoFile,\n entries: string[],\n ) => AsyncClass,\n validate?: (opt: TarOptions, entries?: string[]) => void,\n): TarCommand => {\n return Object.assign(\n (\n opt_: TarOptionsWithAliases | string[] = [],\n entries?: string[] | CB,\n cb?: CB,\n ) => {\n if (Array.isArray(opt_)) {\n entries = opt_\n opt_ = {}\n }\n\n if (typeof entries === 'function') {\n cb = entries\n entries = undefined\n }\n\n if (!entries) {\n entries = []\n } else {\n entries = Array.from(entries)\n }\n\n const opt = dealias(opt_)\n\n validate?.(opt, entries)\n\n if (isSyncFile(opt)) {\n if (typeof cb === 'function') {\n throw new TypeError(\n 'callback not supported for sync tar functions',\n )\n }\n return syncFile(opt, entries)\n } else if (isAsyncFile(opt)) {\n const p = asyncFile(opt, entries)\n // weirdness to make TS happy\n const c = cb ? cb : undefined\n return c ? p.then(() => c(), c) : p\n } else if (isSyncNoFile(opt)) {\n if (typeof cb === 'function') {\n throw new TypeError(\n 'callback not supported for sync tar functions',\n )\n }\n return syncNoFile(opt, entries)\n } else if (isAsyncNoFile(opt)) {\n if (typeof cb === 'function') {\n throw new TypeError(\n 'callback only supported with file option',\n )\n }\n return asyncNoFile(opt, entries)\n /* c8 ignore start */\n } else {\n throw new Error('impossible options??')\n }\n /* c8 ignore stop */\n },\n {\n syncFile,\n asyncFile,\n syncNoFile,\n asyncNoFile,\n validate,\n },\n ) as TarCommand\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/mkdir.d.ts b/node_modules/tar/dist/esm/mkdir.d.ts new file mode 100644 index 0000000..b60c712 --- /dev/null +++ b/node_modules/tar/dist/esm/mkdir.d.ts @@ -0,0 +1,27 @@ +/// +import { CwdError } from './cwd-error.js'; +import { SymlinkError } from './symlink-error.js'; +export type MkdirOptions = { + uid?: number; + gid?: number; + processUid?: number; + processGid?: number; + umask?: number; + preserve: boolean; + unlink: boolean; + cache: Map; + cwd: string; + mode: number; +}; +export type MkdirError = NodeJS.ErrnoException | CwdError | SymlinkError; +/** + * Wrapper around mkdirp for tar's needs. + * + * The main purpose is to avoid creating directories if we know that + * they already exist (and track which ones exist for this purpose), + * and prevent entries from being extracted into symlinked folders, + * if `preservePaths` is not set. + */ +export declare const mkdir: (dir: string, opt: MkdirOptions, cb: (er?: null | MkdirError, made?: string) => void) => void | Promise; +export declare const mkdirSync: (dir: string, opt: MkdirOptions) => void | SymlinkError; +//# sourceMappingURL=mkdir.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/mkdir.d.ts.map b/node_modules/tar/dist/esm/mkdir.d.ts.map new file mode 100644 index 0000000..8e0dbd3 --- /dev/null +++ b/node_modules/tar/dist/esm/mkdir.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"mkdir.d.ts","sourceRoot":"","sources":["../../src/mkdir.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,UAAU,GAClB,MAAM,CAAC,cAAc,GACrB,QAAQ,GACR,YAAY,CAAA;AAyBhB;;;;;;;GAOG;AACH,eAAO,MAAM,KAAK,QACX,MAAM,OACN,YAAY,MACb,CAAC,EAAE,CAAC,EAAE,IAAI,GAAG,UAAU,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,yBA0DpD,CAAA;AA+FD,eAAO,MAAM,SAAS,QAAS,MAAM,OAAO,YAAY,wBA+EvD,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/mkdir.js b/node_modules/tar/dist/esm/mkdir.js new file mode 100644 index 0000000..13498ef --- /dev/null +++ b/node_modules/tar/dist/esm/mkdir.js @@ -0,0 +1,201 @@ +import { chownr, chownrSync } from 'chownr'; +import fs from 'fs'; +import { mkdirp, mkdirpSync } from 'mkdirp'; +import path from 'node:path'; +import { CwdError } from './cwd-error.js'; +import { normalizeWindowsPath } from './normalize-windows-path.js'; +import { SymlinkError } from './symlink-error.js'; +const cGet = (cache, key) => cache.get(normalizeWindowsPath(key)); +const cSet = (cache, key, val) => cache.set(normalizeWindowsPath(key), val); +const checkCwd = (dir, cb) => { + fs.stat(dir, (er, st) => { + if (er || !st.isDirectory()) { + er = new CwdError(dir, er?.code || 'ENOTDIR'); + } + cb(er); + }); +}; +/** + * Wrapper around mkdirp for tar's needs. + * + * The main purpose is to avoid creating directories if we know that + * they already exist (and track which ones exist for this purpose), + * and prevent entries from being extracted into symlinked folders, + * if `preservePaths` is not set. + */ +export const mkdir = (dir, opt, cb) => { + dir = normalizeWindowsPath(dir); + // if there's any overlap between mask and mode, + // then we'll need an explicit chmod + /* c8 ignore next */ + const umask = opt.umask ?? 0o22; + const mode = opt.mode | 0o0700; + const needChmod = (mode & umask) !== 0; + const uid = opt.uid; + const gid = opt.gid; + const doChown = typeof uid === 'number' && + typeof gid === 'number' && + (uid !== opt.processUid || gid !== opt.processGid); + const preserve = opt.preserve; + const unlink = opt.unlink; + const cache = opt.cache; + const cwd = normalizeWindowsPath(opt.cwd); + const done = (er, created) => { + if (er) { + cb(er); + } + else { + cSet(cache, dir, true); + if (created && doChown) { + chownr(created, uid, gid, er => done(er)); + } + else if (needChmod) { + fs.chmod(dir, mode, cb); + } + else { + cb(); + } + } + }; + if (cache && cGet(cache, dir) === true) { + return done(); + } + if (dir === cwd) { + return checkCwd(dir, done); + } + if (preserve) { + return mkdirp(dir, { mode }).then(made => done(null, made ?? undefined), // oh, ts + done); + } + const sub = normalizeWindowsPath(path.relative(cwd, dir)); + const parts = sub.split('/'); + mkdir_(cwd, parts, mode, cache, unlink, cwd, undefined, done); +}; +const mkdir_ = (base, parts, mode, cache, unlink, cwd, created, cb) => { + if (!parts.length) { + return cb(null, created); + } + const p = parts.shift(); + const part = normalizeWindowsPath(path.resolve(base + '/' + p)); + if (cGet(cache, part)) { + return mkdir_(part, parts, mode, cache, unlink, cwd, created, cb); + } + fs.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd, created, cb)); +}; +const onmkdir = (part, parts, mode, cache, unlink, cwd, created, cb) => (er) => { + if (er) { + fs.lstat(part, (statEr, st) => { + if (statEr) { + statEr.path = + statEr.path && normalizeWindowsPath(statEr.path); + cb(statEr); + } + else if (st.isDirectory()) { + mkdir_(part, parts, mode, cache, unlink, cwd, created, cb); + } + else if (unlink) { + fs.unlink(part, er => { + if (er) { + return cb(er); + } + fs.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd, created, cb)); + }); + } + else if (st.isSymbolicLink()) { + return cb(new SymlinkError(part, part + '/' + parts.join('/'))); + } + else { + cb(er); + } + }); + } + else { + created = created || part; + mkdir_(part, parts, mode, cache, unlink, cwd, created, cb); + } +}; +const checkCwdSync = (dir) => { + let ok = false; + let code = undefined; + try { + ok = fs.statSync(dir).isDirectory(); + } + catch (er) { + code = er?.code; + } + finally { + if (!ok) { + throw new CwdError(dir, code ?? 'ENOTDIR'); + } + } +}; +export const mkdirSync = (dir, opt) => { + dir = normalizeWindowsPath(dir); + // if there's any overlap between mask and mode, + // then we'll need an explicit chmod + /* c8 ignore next */ + const umask = opt.umask ?? 0o22; + const mode = opt.mode | 0o700; + const needChmod = (mode & umask) !== 0; + const uid = opt.uid; + const gid = opt.gid; + const doChown = typeof uid === 'number' && + typeof gid === 'number' && + (uid !== opt.processUid || gid !== opt.processGid); + const preserve = opt.preserve; + const unlink = opt.unlink; + const cache = opt.cache; + const cwd = normalizeWindowsPath(opt.cwd); + const done = (created) => { + cSet(cache, dir, true); + if (created && doChown) { + chownrSync(created, uid, gid); + } + if (needChmod) { + fs.chmodSync(dir, mode); + } + }; + if (cache && cGet(cache, dir) === true) { + return done(); + } + if (dir === cwd) { + checkCwdSync(cwd); + return done(); + } + if (preserve) { + return done(mkdirpSync(dir, mode) ?? undefined); + } + const sub = normalizeWindowsPath(path.relative(cwd, dir)); + const parts = sub.split('/'); + let created = undefined; + for (let p = parts.shift(), part = cwd; p && (part += '/' + p); p = parts.shift()) { + part = normalizeWindowsPath(path.resolve(part)); + if (cGet(cache, part)) { + continue; + } + try { + fs.mkdirSync(part, mode); + created = created || part; + cSet(cache, part, true); + } + catch (er) { + const st = fs.lstatSync(part); + if (st.isDirectory()) { + cSet(cache, part, true); + continue; + } + else if (unlink) { + fs.unlinkSync(part); + fs.mkdirSync(part, mode); + created = created || part; + cSet(cache, part, true); + continue; + } + else if (st.isSymbolicLink()) { + return new SymlinkError(part, part + '/' + parts.join('/')); + } + } + } + return done(created); +}; +//# sourceMappingURL=mkdir.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/mkdir.js.map b/node_modules/tar/dist/esm/mkdir.js.map new file mode 100644 index 0000000..8b441ea --- /dev/null +++ b/node_modules/tar/dist/esm/mkdir.js.map @@ -0,0 +1 @@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C;iBAAM,IAAI,MAAM,EAAE,CAAC;gBAClB,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;gBACnB,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;gBACxB,OAAO,GAAG,OAAO,IAAI,IAAI,CAAA;gBACzB,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;gBACvB,SAAQ;YACV,CAAC;iBAAM,IAAI,EAAE,CAAC,cAAc,EAAE,EAAE,CAAC;gBAC/B,OAAO,IAAI,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;YAC7D,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC,OAAO,CAAC,CAAA;AACtB,CAAC,CAAA","sourcesContent":["import { chownr, chownrSync } from 'chownr'\nimport fs from 'fs'\nimport { mkdirp, mkdirpSync } from 'mkdirp'\nimport path from 'node:path'\nimport { CwdError } from './cwd-error.js'\nimport { normalizeWindowsPath } from './normalize-windows-path.js'\nimport { SymlinkError } from './symlink-error.js'\n\nexport type MkdirOptions = {\n uid?: number\n gid?: number\n processUid?: number\n processGid?: number\n umask?: number\n preserve: boolean\n unlink: boolean\n cache: Map\n cwd: string\n mode: number\n}\n\nexport type MkdirError =\n | NodeJS.ErrnoException\n | CwdError\n | SymlinkError\n\nconst cGet = (cache: Map, key: string) =>\n cache.get(normalizeWindowsPath(key))\nconst cSet = (\n cache: Map,\n key: string,\n val: boolean,\n) => cache.set(normalizeWindowsPath(key), val)\n\nconst checkCwd = (\n dir: string,\n cb: (er?: null | MkdirError) => any,\n) => {\n fs.stat(dir, (er, st) => {\n if (er || !st.isDirectory()) {\n er = new CwdError(\n dir,\n (er as NodeJS.ErrnoException)?.code || 'ENOTDIR',\n )\n }\n cb(er)\n })\n}\n\n/**\n * Wrapper around mkdirp for tar's needs.\n *\n * The main purpose is to avoid creating directories if we know that\n * they already exist (and track which ones exist for this purpose),\n * and prevent entries from being extracted into symlinked folders,\n * if `preservePaths` is not set.\n */\nexport const mkdir = (\n dir: string,\n opt: MkdirOptions,\n cb: (er?: null | MkdirError, made?: string) => void,\n) => {\n dir = normalizeWindowsPath(dir)\n\n // if there's any overlap between mask and mode,\n // then we'll need an explicit chmod\n /* c8 ignore next */\n const umask = opt.umask ?? 0o22\n const mode = opt.mode | 0o0700\n const needChmod = (mode & umask) !== 0\n\n const uid = opt.uid\n const gid = opt.gid\n const doChown =\n typeof uid === 'number' &&\n typeof gid === 'number' &&\n (uid !== opt.processUid || gid !== opt.processGid)\n\n const preserve = opt.preserve\n const unlink = opt.unlink\n const cache = opt.cache\n const cwd = normalizeWindowsPath(opt.cwd)\n\n const done = (er?: null | MkdirError, created?: string) => {\n if (er) {\n cb(er)\n } else {\n cSet(cache, dir, true)\n if (created && doChown) {\n chownr(created, uid, gid, er =>\n done(er as NodeJS.ErrnoException),\n )\n } else if (needChmod) {\n fs.chmod(dir, mode, cb)\n } else {\n cb()\n }\n }\n }\n\n if (cache && cGet(cache, dir) === true) {\n return done()\n }\n\n if (dir === cwd) {\n return checkCwd(dir, done)\n }\n\n if (preserve) {\n return mkdirp(dir, { mode }).then(\n made => done(null, made ?? undefined), // oh, ts\n done,\n )\n }\n\n const sub = normalizeWindowsPath(path.relative(cwd, dir))\n const parts = sub.split('/')\n mkdir_(cwd, parts, mode, cache, unlink, cwd, undefined, done)\n}\n\nconst mkdir_ = (\n base: string,\n parts: string[],\n mode: number,\n cache: Map,\n unlink: boolean,\n cwd: string,\n created: string | undefined,\n cb: (er?: null | MkdirError, made?: string) => void,\n): void => {\n if (!parts.length) {\n return cb(null, created)\n }\n const p = parts.shift()\n const part = normalizeWindowsPath(path.resolve(base + '/' + p))\n if (cGet(cache, part)) {\n return mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)\n }\n fs.mkdir(\n part,\n mode,\n onmkdir(part, parts, mode, cache, unlink, cwd, created, cb),\n )\n}\n\nconst onmkdir =\n (\n part: string,\n parts: string[],\n mode: number,\n cache: Map,\n unlink: boolean,\n cwd: string,\n created: string | undefined,\n cb: (er?: null | MkdirError, made?: string) => void,\n ) =>\n (er?: null | NodeJS.ErrnoException) => {\n if (er) {\n fs.lstat(part, (statEr, st) => {\n if (statEr) {\n statEr.path =\n statEr.path && normalizeWindowsPath(statEr.path)\n cb(statEr)\n } else if (st.isDirectory()) {\n mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)\n } else if (unlink) {\n fs.unlink(part, er => {\n if (er) {\n return cb(er)\n }\n fs.mkdir(\n part,\n mode,\n onmkdir(\n part,\n parts,\n mode,\n cache,\n unlink,\n cwd,\n created,\n cb,\n ),\n )\n })\n } else if (st.isSymbolicLink()) {\n return cb(\n new SymlinkError(part, part + '/' + parts.join('/')),\n )\n } else {\n cb(er)\n }\n })\n } else {\n created = created || part\n mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)\n }\n }\n\nconst checkCwdSync = (dir: string) => {\n let ok = false\n let code: string | undefined = undefined\n try {\n ok = fs.statSync(dir).isDirectory()\n } catch (er) {\n code = (er as NodeJS.ErrnoException)?.code\n } finally {\n if (!ok) {\n throw new CwdError(dir, code ?? 'ENOTDIR')\n }\n }\n}\n\nexport const mkdirSync = (dir: string, opt: MkdirOptions) => {\n dir = normalizeWindowsPath(dir)\n // if there's any overlap between mask and mode,\n // then we'll need an explicit chmod\n /* c8 ignore next */\n const umask = opt.umask ?? 0o22\n const mode = opt.mode | 0o700\n const needChmod = (mode & umask) !== 0\n\n const uid = opt.uid\n const gid = opt.gid\n const doChown =\n typeof uid === 'number' &&\n typeof gid === 'number' &&\n (uid !== opt.processUid || gid !== opt.processGid)\n\n const preserve = opt.preserve\n const unlink = opt.unlink\n const cache = opt.cache\n const cwd = normalizeWindowsPath(opt.cwd)\n\n const done = (created?: string | undefined) => {\n cSet(cache, dir, true)\n if (created && doChown) {\n chownrSync(created, uid, gid)\n }\n if (needChmod) {\n fs.chmodSync(dir, mode)\n }\n }\n\n if (cache && cGet(cache, dir) === true) {\n return done()\n }\n\n if (dir === cwd) {\n checkCwdSync(cwd)\n return done()\n }\n\n if (preserve) {\n return done(mkdirpSync(dir, mode) ?? undefined)\n }\n\n const sub = normalizeWindowsPath(path.relative(cwd, dir))\n const parts = sub.split('/')\n let created: string | undefined = undefined\n for (\n let p = parts.shift(), part = cwd;\n p && (part += '/' + p);\n p = parts.shift()\n ) {\n part = normalizeWindowsPath(path.resolve(part))\n if (cGet(cache, part)) {\n continue\n }\n\n try {\n fs.mkdirSync(part, mode)\n created = created || part\n cSet(cache, part, true)\n } catch (er) {\n const st = fs.lstatSync(part)\n if (st.isDirectory()) {\n cSet(cache, part, true)\n continue\n } else if (unlink) {\n fs.unlinkSync(part)\n fs.mkdirSync(part, mode)\n created = created || part\n cSet(cache, part, true)\n continue\n } else if (st.isSymbolicLink()) {\n return new SymlinkError(part, part + '/' + parts.join('/'))\n }\n }\n }\n\n return done(created)\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/mode-fix.d.ts b/node_modules/tar/dist/esm/mode-fix.d.ts new file mode 100644 index 0000000..38f3d93 --- /dev/null +++ b/node_modules/tar/dist/esm/mode-fix.d.ts @@ -0,0 +1,2 @@ +export declare const modeFix: (mode: number, isDir: boolean, portable: boolean) => number; +//# sourceMappingURL=mode-fix.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/mode-fix.d.ts.map b/node_modules/tar/dist/esm/mode-fix.d.ts.map new file mode 100644 index 0000000..dbef3bc --- /dev/null +++ b/node_modules/tar/dist/esm/mode-fix.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"mode-fix.d.ts","sourceRoot":"","sources":["../../src/mode-fix.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,SACZ,MAAM,SACL,OAAO,YACJ,OAAO,WA0BlB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/mode-fix.js b/node_modules/tar/dist/esm/mode-fix.js new file mode 100644 index 0000000..5fd3bb8 --- /dev/null +++ b/node_modules/tar/dist/esm/mode-fix.js @@ -0,0 +1,25 @@ +export const modeFix = (mode, isDir, portable) => { + mode &= 0o7777; + // in portable mode, use the minimum reasonable umask + // if this system creates files with 0o664 by default + // (as some linux distros do), then we'll write the + // archive with 0o644 instead. Also, don't ever create + // a file that is not readable/writable by the owner. + if (portable) { + mode = (mode | 0o600) & ~0o22; + } + // if dirs are readable, then they should be listable + if (isDir) { + if (mode & 0o400) { + mode |= 0o100; + } + if (mode & 0o40) { + mode |= 0o10; + } + if (mode & 0o4) { + mode |= 0o1; + } + } + return mode; +}; +//# sourceMappingURL=mode-fix.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/mode-fix.js.map b/node_modules/tar/dist/esm/mode-fix.js.map new file mode 100644 index 0000000..84efa64 --- /dev/null +++ b/node_modules/tar/dist/esm/mode-fix.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mode-fix.js","sourceRoot":"","sources":["../../src/mode-fix.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,CACrB,IAAY,EACZ,KAAc,EACd,QAAiB,EACjB,EAAE;IACF,IAAI,IAAI,MAAM,CAAA;IAEd,qDAAqD;IACrD,qDAAqD;IACrD,mDAAmD;IACnD,uDAAuD;IACvD,qDAAqD;IACrD,IAAI,QAAQ,EAAE,CAAC;QACb,IAAI,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAA;IAC/B,CAAC;IAED,qDAAqD;IACrD,IAAI,KAAK,EAAE,CAAC;QACV,IAAI,IAAI,GAAG,KAAK,EAAE,CAAC;YACjB,IAAI,IAAI,KAAK,CAAA;QACf,CAAC;QACD,IAAI,IAAI,GAAG,IAAI,EAAE,CAAC;YAChB,IAAI,IAAI,IAAI,CAAA;QACd,CAAC;QACD,IAAI,IAAI,GAAG,GAAG,EAAE,CAAC;YACf,IAAI,IAAI,GAAG,CAAA;QACb,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA","sourcesContent":["export const modeFix = (\n mode: number,\n isDir: boolean,\n portable: boolean,\n) => {\n mode &= 0o7777\n\n // in portable mode, use the minimum reasonable umask\n // if this system creates files with 0o664 by default\n // (as some linux distros do), then we'll write the\n // archive with 0o644 instead. Also, don't ever create\n // a file that is not readable/writable by the owner.\n if (portable) {\n mode = (mode | 0o600) & ~0o22\n }\n\n // if dirs are readable, then they should be listable\n if (isDir) {\n if (mode & 0o400) {\n mode |= 0o100\n }\n if (mode & 0o40) {\n mode |= 0o10\n }\n if (mode & 0o4) {\n mode |= 0o1\n }\n }\n return mode\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/normalize-unicode.d.ts b/node_modules/tar/dist/esm/normalize-unicode.d.ts new file mode 100644 index 0000000..0413bd7 --- /dev/null +++ b/node_modules/tar/dist/esm/normalize-unicode.d.ts @@ -0,0 +1,2 @@ +export declare const normalizeUnicode: (s: string) => any; +//# sourceMappingURL=normalize-unicode.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/normalize-unicode.d.ts.map b/node_modules/tar/dist/esm/normalize-unicode.d.ts.map new file mode 100644 index 0000000..9c26ec8 --- /dev/null +++ b/node_modules/tar/dist/esm/normalize-unicode.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"normalize-unicode.d.ts","sourceRoot":"","sources":["../../src/normalize-unicode.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,MAAO,MAAM,QAKzC,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/normalize-unicode.js b/node_modules/tar/dist/esm/normalize-unicode.js new file mode 100644 index 0000000..94e5095 --- /dev/null +++ b/node_modules/tar/dist/esm/normalize-unicode.js @@ -0,0 +1,13 @@ +// warning: extremely hot code path. +// This has been meticulously optimized for use +// within npm install on large package trees. +// Do not edit without careful benchmarking. +const normalizeCache = Object.create(null); +const { hasOwnProperty } = Object.prototype; +export const normalizeUnicode = (s) => { + if (!hasOwnProperty.call(normalizeCache, s)) { + normalizeCache[s] = s.normalize('NFD'); + } + return normalizeCache[s]; +}; +//# sourceMappingURL=normalize-unicode.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/normalize-unicode.js.map b/node_modules/tar/dist/esm/normalize-unicode.js.map new file mode 100644 index 0000000..4377c6f --- /dev/null +++ b/node_modules/tar/dist/esm/normalize-unicode.js.map @@ -0,0 +1 @@ +{"version":3,"file":"normalize-unicode.js","sourceRoot":"","sources":["../../src/normalize-unicode.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,+CAA+C;AAC/C,6CAA6C;AAC7C,4CAA4C;AAC5C,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;AAC1C,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC,SAAS,CAAA;AAC3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAS,EAAE,EAAE;IAC5C,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE,CAAC;QAC5C,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;IACxC,CAAC;IACD,OAAO,cAAc,CAAC,CAAC,CAAC,CAAA;AAC1B,CAAC,CAAA","sourcesContent":["// warning: extremely hot code path.\n// This has been meticulously optimized for use\n// within npm install on large package trees.\n// Do not edit without careful benchmarking.\nconst normalizeCache = Object.create(null)\nconst { hasOwnProperty } = Object.prototype\nexport const normalizeUnicode = (s: string) => {\n if (!hasOwnProperty.call(normalizeCache, s)) {\n normalizeCache[s] = s.normalize('NFD')\n }\n return normalizeCache[s]\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/normalize-windows-path.d.ts b/node_modules/tar/dist/esm/normalize-windows-path.d.ts new file mode 100644 index 0000000..8581105 --- /dev/null +++ b/node_modules/tar/dist/esm/normalize-windows-path.d.ts @@ -0,0 +1,2 @@ +export declare const normalizeWindowsPath: (p: string) => string; +//# sourceMappingURL=normalize-windows-path.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/normalize-windows-path.d.ts.map b/node_modules/tar/dist/esm/normalize-windows-path.d.ts.map new file mode 100644 index 0000000..25de3c0 --- /dev/null +++ b/node_modules/tar/dist/esm/normalize-windows-path.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"normalize-windows-path.d.ts","sourceRoot":"","sources":["../../src/normalize-windows-path.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,oBAAoB,MAEzB,MAAM,WAC+B,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/normalize-windows-path.js b/node_modules/tar/dist/esm/normalize-windows-path.js new file mode 100644 index 0000000..2d97d2b --- /dev/null +++ b/node_modules/tar/dist/esm/normalize-windows-path.js @@ -0,0 +1,9 @@ +// on windows, either \ or / are valid directory separators. +// on unix, \ is a valid character in filenames. +// so, on windows, and only on windows, we replace all \ chars with /, +// so that we can use / as our one and only directory separator char. +const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform; +export const normalizeWindowsPath = platform !== 'win32' ? + (p) => p + : (p) => p && p.replace(/\\/g, '/'); +//# sourceMappingURL=normalize-windows-path.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/normalize-windows-path.js.map b/node_modules/tar/dist/esm/normalize-windows-path.js.map new file mode 100644 index 0000000..03be019 --- /dev/null +++ b/node_modules/tar/dist/esm/normalize-windows-path.js.map @@ -0,0 +1 @@ +{"version":3,"file":"normalize-windows-path.js","sourceRoot":"","sources":["../../src/normalize-windows-path.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,gDAAgD;AAChD,sEAAsE;AACtE,qEAAqE;AAErE,MAAM,QAAQ,GACZ,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,OAAO,CAAC,QAAQ,CAAA;AAE3D,MAAM,CAAC,MAAM,oBAAoB,GAC/B,QAAQ,KAAK,OAAO,CAAC,CAAC;IACpB,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA","sourcesContent":["// on windows, either \\ or / are valid directory separators.\n// on unix, \\ is a valid character in filenames.\n// so, on windows, and only on windows, we replace all \\ chars with /,\n// so that we can use / as our one and only directory separator char.\n\nconst platform =\n process.env.TESTING_TAR_FAKE_PLATFORM || process.platform\n\nexport const normalizeWindowsPath =\n platform !== 'win32' ?\n (p: string) => p\n : (p: string) => p && p.replace(/\\\\/g, '/')\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/options.d.ts b/node_modules/tar/dist/esm/options.d.ts new file mode 100644 index 0000000..bcf68fe --- /dev/null +++ b/node_modules/tar/dist/esm/options.d.ts @@ -0,0 +1,605 @@ +/// +import { type GzipOptions, type ZlibOptions } from 'minizlib'; +import { type Stats } from 'node:fs'; +import { type ReadEntry } from './read-entry.js'; +import { type WarnData } from './warn-method.js'; +import { WriteEntry } from './write-entry.js'; +/** + * The options that can be provided to tar commands. + * + * Note that some of these are only relevant for certain commands, since + * they are specific to reading or writing. + * + * Aliases are provided in the {@link TarOptionsWithAliases} type. + */ +export interface TarOptions { + /** + * Perform all I/O operations synchronously. If the stream is ended + * immediately, then it will be processed entirely synchronously. + */ + sync?: boolean; + /** + * The tar file to be read and/or written. When this is set, a stream + * is not returned. Asynchronous commands will return a promise indicating + * when the operation is completed, and synchronous commands will return + * immediately. + */ + file?: string; + /** + * Treat warnings as crash-worthy errors. Defaults false. + */ + strict?: boolean; + /** + * The effective current working directory for this tar command + */ + cwd?: string; + /** + * When creating a tar archive, this can be used to compress it as well. + * Set to `true` to use the default gzip options, or customize them as + * needed. + * + * When reading, if this is unset, then the compression status will be + * inferred from the archive data. This is generally best, unless you are + * sure of the compression settings in use to create the archive, and want to + * fail if the archive doesn't match expectations. + */ + gzip?: boolean | GzipOptions; + /** + * When creating archives, preserve absolute and `..` paths in the archive, + * rather than sanitizing them under the cwd. + * + * When extracting, allow absolute paths, paths containing `..`, and + * extracting through symbolic links. By default, the root `/` is stripped + * from absolute paths (eg, turning `/x/y/z` into `x/y/z`), paths containing + * `..` are not extracted, and any file whose location would be modified by a + * symbolic link is not extracted. + * + * **WARNING** This is almost always unsafe, and must NEVER be used on + * archives from untrusted sources, such as user input, and every entry must + * be validated to ensure it is safe to write. Even if the input is not + * malicious, mistakes can cause a lot of damage! + */ + preservePaths?: boolean; + /** + * When extracting, do not set the `mtime` value for extracted entries to + * match the `mtime` in the archive. + * + * When creating archives, do not store the `mtime` value in the entry. Note + * that this prevents properly using other mtime-based features (such as + * `tar.update` or the `newer` option) with the resulting archive. + */ + noMtime?: boolean; + /** + * Set to `true` or an object with settings for `zlib.BrotliCompress()` to + * create a brotli-compressed archive + * + * When extracting, this will cause the archive to be treated as a + * brotli-compressed file if set to `true` or a ZlibOptions object. + * + * If set `false`, then brotli options will not be used. + * + * If both this and the `gzip` option are left `undefined`, then tar will + * attempt to infer the brotli compression status, but can only do so based + * on the filename. If the filename ends in `.tbr` or `.tar.br`, and the + * first 512 bytes are not a valid tar header, then brotli decompression + * will be attempted. + */ + brotli?: boolean | ZlibOptions; + /** + * A function that is called with `(path, stat)` when creating an archive, or + * `(path, entry)` when extracting. Return true to process the file/entry, or + * false to exclude it. + */ + filter?: (path: string, entry: Stats | ReadEntry) => boolean; + /** + * A function that gets called for any warning encountered. + * + * Note: if `strict` is set, then the warning will throw, and this method + * will not be called. + */ + onwarn?: (code: string, message: string, data: WarnData) => any; + /** + * When extracting, unlink files before creating them. Without this option, + * tar overwrites existing files, which preserves existing hardlinks. With + * this option, existing hardlinks will be broken, as will any symlink that + * would affect the location of an extracted file. + */ + unlink?: boolean; + /** + * When extracting, strip the specified number of path portions from the + * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be + * extracted to `{cwd}/c/d`. + * + * Any entry whose entire path is stripped will be excluded. + */ + strip?: number; + /** + * When extracting, keep the existing file on disk if it's newer than the + * file in the archive. + */ + newer?: boolean; + /** + * When extracting, do not overwrite existing files at all. + */ + keep?: boolean; + /** + * When extracting, set the `uid` and `gid` of extracted entries to the `uid` + * and `gid` fields in the archive. Defaults to true when run as root, and + * false otherwise. + * + * If false, then files and directories will be set with the owner and group + * of the user running the process. This is similar to `-p` in `tar(1)`, but + * ACLs and other system-specific data is never unpacked in this + * implementation, and modes are set by default already. + */ + preserveOwner?: boolean; + /** + * The maximum depth of subfolders to extract into. This defaults to 1024. + * Anything deeper than the limit will raise a warning and skip the entry. + * Set to `Infinity` to remove the limitation. + */ + maxDepth?: number; + /** + * When extracting, force all created files and directories, and all + * implicitly created directories, to be owned by the specified user id, + * regardless of the `uid` field in the archive. + * + * Cannot be used along with `preserveOwner`. Requires also setting the `gid` + * option. + */ + uid?: number; + /** + * When extracting, force all created files and directories, and all + * implicitly created directories, to be owned by the specified group id, + * regardless of the `gid` field in the archive. + * + * Cannot be used along with `preserveOwner`. Requires also setting the `uid` + * option. + */ + gid?: number; + /** + * When extracting, provide a function that takes an `entry` object, and + * returns a stream, or any falsey value. If a stream is provided, then that + * stream's data will be written instead of the contents of the archive + * entry. If a falsey value is provided, then the entry is written to disk as + * normal. + * + * To exclude items from extraction, use the `filter` option. + * + * Note that using an asynchronous stream type with the `transform` option + * will cause undefined behavior in synchronous extractions. + * [MiniPass](http://npm.im/minipass)-based streams are designed for this use + * case. + */ + transform?: (entry: ReadEntry) => any; + /** + * Call `chmod()` to ensure that extracted files match the entry's mode + * field. Without this field set, all mode fields in archive entries are a + * best effort attempt only. + * + * Setting this necessitates a call to the deprecated `process.umask()` + * method to determine the default umask value, unless a `processUmask` + * config is provided as well. + * + * If not set, tar will attempt to create file system entries with whatever + * mode is provided, and let the implicit process `umask` apply normally, but + * if a file already exists to be written to, then its existing mode will not + * be modified. + * + * When setting `chmod: true`, it is highly recommend to set the + * {@link TarOptions#processUmask} option as well, to avoid the call to the + * deprecated (and thread-unsafe) `process.umask()` method. + */ + chmod?: boolean; + /** + * When setting the {@link TarOptions#chmod} option to `true`, you may + * provide a value here to avoid having to call the deprecated and + * thread-unsafe `process.umask()` method. + * + * This has no effect with `chmod` is not set to true, as mode values are not + * set explicitly anyway. If `chmod` is set to `true`, and a value is not + * provided here, then `process.umask()` must be called, which will result in + * deprecation warnings. + * + * The most common values for this are `0o22` (resulting in directories + * created with mode `0o755` and files with `0o644` by default) and `0o2` + * (resulting in directores created with mode `0o775` and files `0o664`, so + * they are group-writable). + */ + processUmask?: number; + /** + * When parsing/listing archives, `entry` streams are by default resumed + * (set into "flowing" mode) immediately after the call to `onReadEntry()`. + * Set `noResume: true` to suppress this behavior. + * + * Note that when this is set, the stream will never complete until the + * data is consumed somehow. + * + * Set automatically in extract operations, since the entry is piped to + * a file system entry right away. Only relevant when parsing. + */ + noResume?: boolean; + /** + * When creating, updating, or replacing within archives, this method will + * be called with each WriteEntry that is created. + */ + onWriteEntry?: (entry: WriteEntry) => any; + /** + * When extracting or listing archives, this method will be called with + * each entry that is not excluded by a `filter`. + * + * Important when listing archives synchronously from a file, because there + * is otherwise no way to interact with the data! + */ + onReadEntry?: (entry: ReadEntry) => any; + /** + * Pack the targets of symbolic links rather than the link itself. + */ + follow?: boolean; + /** + * When creating archives, omit any metadata that is system-specific: + * `ctime`, `atime`, `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and + * `nlink`. Note that `mtime` is still included, because this is necessary + * for other time-based operations such as `tar.update`. Additionally, `mode` + * is set to a "reasonable default" for mose unix systems, based on an + * effective `umask` of `0o22`. + * + * This also defaults the `portable` option in the gzip configs when creating + * a compressed archive, in order to produce deterministic archives that are + * not operating-system specific. + */ + portable?: boolean; + /** + * When creating archives, do not recursively archive the contents of + * directories. By default, archiving a directory archives all of its + * contents as well. + */ + noDirRecurse?: boolean; + /** + * Suppress Pax extended headers when creating archives. Note that this means + * long paths and linkpaths will be truncated, and large or negative numeric + * values may be interpreted incorrectly. + */ + noPax?: boolean; + /** + * Set to a `Date` object to force a specific `mtime` value for everything + * written to an archive. + * + * This is useful when creating archives that are intended to be + * deterministic based on their contents, irrespective of the file's last + * modification time. + * + * Overridden by `noMtime`. + */ + mtime?: Date; + /** + * A path portion to prefix onto the entries added to an archive. + */ + prefix?: string; + /** + * The mode to set on any created file archive, defaults to 0o666 + * masked by the process umask, often resulting in 0o644. + * + * This does *not* affect the mode fields of individual entries, or the + * mode status of extracted entries on the filesystem. + */ + mode?: number; + /** + * A cache of mtime values, to avoid having to stat the same file repeatedly. + * + * @internal + */ + mtimeCache?: Map; + /** + * maximum buffer size for `fs.read()` operations. + * + * @internal + */ + maxReadSize?: number; + /** + * Filter modes of entries being unpacked, like `process.umask()` + * + * @internal + */ + umask?: number; + /** + * Default mode for directories. Used for all implicitly created directories, + * and any directories in the archive that do not have a mode field. + * + * @internal + */ + dmode?: number; + /** + * default mode for files + * + * @internal + */ + fmode?: number; + /** + * Map that tracks which directories already exist, for extraction + * + * @internal + */ + dirCache?: Map; + /** + * maximum supported size of meta entries. Defaults to 1MB + * + * @internal + */ + maxMetaEntrySize?: number; + /** + * A Map object containing the device and inode value for any file whose + * `nlink` value is greater than 1, to identify hard links when creating + * archives. + * + * @internal + */ + linkCache?: Map; + /** + * A map object containing the results of `fs.readdir()` calls. + * + * @internal + */ + readdirCache?: Map; + /** + * A cache of all `lstat` results, for use in creating archives. + * + * @internal + */ + statCache?: Map; + /** + * Number of concurrent jobs to run when creating archives. + * + * Defaults to 4. + * + * @internal + */ + jobs?: number; + /** + * Automatically set to true on Windows systems. + * + * When extracting, causes behavior where filenames containing `<|>?:` + * characters are converted to windows-compatible escape sequences in the + * created filesystem entries. + * + * When packing, causes behavior where paths replace `\` with `/`, and + * filenames containing the windows-compatible escaped forms of `<|>?:` are + * converted to actual `<|>?:` characters in the archive. + * + * @internal + */ + win32?: boolean; + /** + * For `WriteEntry` objects, the absolute path to the entry on the + * filesystem. By default, this is `resolve(cwd, entry.path)`, but it can be + * overridden explicitly. + * + * @internal + */ + absolute?: string; + /** + * Used with Parser stream interface, to attach and take over when the + * stream is completely parsed. If this is set, then the prefinish, + * finish, and end events will not fire, and are the responsibility of + * the ondone method to emit properly. + * + * @internal + */ + ondone?: () => void; + /** + * Mostly for testing, but potentially useful in some cases. + * Forcibly trigger a chown on every entry, no matter what. + */ + forceChown?: boolean; + /** + * ambiguous deprecated name for {@link onReadEntry} + * + * @deprecated + */ + onentry?: (entry: ReadEntry) => any; +} +export type TarOptionsSync = TarOptions & { + sync: true; +}; +export type TarOptionsAsync = TarOptions & { + sync?: false; +}; +export type TarOptionsFile = TarOptions & { + file: string; +}; +export type TarOptionsNoFile = TarOptions & { + file?: undefined; +}; +export type TarOptionsSyncFile = TarOptionsSync & TarOptionsFile; +export type TarOptionsAsyncFile = TarOptionsAsync & TarOptionsFile; +export type TarOptionsSyncNoFile = TarOptionsSync & TarOptionsNoFile; +export type TarOptionsAsyncNoFile = TarOptionsAsync & TarOptionsNoFile; +export type LinkCacheKey = `${number}:${number}`; +export interface TarOptionsWithAliases extends TarOptions { + /** + * The effective current working directory for this tar command + */ + C?: TarOptions['cwd']; + /** + * The tar file to be read and/or written. When this is set, a stream + * is not returned. Asynchronous commands will return a promise indicating + * when the operation is completed, and synchronous commands will return + * immediately. + */ + f?: TarOptions['file']; + /** + * When creating a tar archive, this can be used to compress it as well. + * Set to `true` to use the default gzip options, or customize them as + * needed. + * + * When reading, if this is unset, then the compression status will be + * inferred from the archive data. This is generally best, unless you are + * sure of the compression settings in use to create the archive, and want to + * fail if the archive doesn't match expectations. + */ + z?: TarOptions['gzip']; + /** + * When creating archives, preserve absolute and `..` paths in the archive, + * rather than sanitizing them under the cwd. + * + * When extracting, allow absolute paths, paths containing `..`, and + * extracting through symbolic links. By default, the root `/` is stripped + * from absolute paths (eg, turning `/x/y/z` into `x/y/z`), paths containing + * `..` are not extracted, and any file whose location would be modified by a + * symbolic link is not extracted. + * + * **WARNING** This is almost always unsafe, and must NEVER be used on + * archives from untrusted sources, such as user input, and every entry must + * be validated to ensure it is safe to write. Even if the input is not + * malicious, mistakes can cause a lot of damage! + */ + P?: TarOptions['preservePaths']; + /** + * When extracting, unlink files before creating them. Without this option, + * tar overwrites existing files, which preserves existing hardlinks. With + * this option, existing hardlinks will be broken, as will any symlink that + * would affect the location of an extracted file. + */ + U?: TarOptions['unlink']; + /** + * When extracting, strip the specified number of path portions from the + * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be + * extracted to `{cwd}/c/d`. + */ + 'strip-components'?: TarOptions['strip']; + /** + * When extracting, strip the specified number of path portions from the + * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be + * extracted to `{cwd}/c/d`. + */ + stripComponents?: TarOptions['strip']; + /** + * When extracting, keep the existing file on disk if it's newer than the + * file in the archive. + */ + 'keep-newer'?: TarOptions['newer']; + /** + * When extracting, keep the existing file on disk if it's newer than the + * file in the archive. + */ + keepNewer?: TarOptions['newer']; + /** + * When extracting, keep the existing file on disk if it's newer than the + * file in the archive. + */ + 'keep-newer-files'?: TarOptions['newer']; + /** + * When extracting, keep the existing file on disk if it's newer than the + * file in the archive. + */ + keepNewerFiles?: TarOptions['newer']; + /** + * When extracting, do not overwrite existing files at all. + */ + k?: TarOptions['keep']; + /** + * When extracting, do not overwrite existing files at all. + */ + 'keep-existing'?: TarOptions['keep']; + /** + * When extracting, do not overwrite existing files at all. + */ + keepExisting?: TarOptions['keep']; + /** + * When extracting, do not set the `mtime` value for extracted entries to + * match the `mtime` in the archive. + * + * When creating archives, do not store the `mtime` value in the entry. Note + * that this prevents properly using other mtime-based features (such as + * `tar.update` or the `newer` option) with the resulting archive. + */ + m?: TarOptions['noMtime']; + /** + * When extracting, do not set the `mtime` value for extracted entries to + * match the `mtime` in the archive. + * + * When creating archives, do not store the `mtime` value in the entry. Note + * that this prevents properly using other mtime-based features (such as + * `tar.update` or the `newer` option) with the resulting archive. + */ + 'no-mtime'?: TarOptions['noMtime']; + /** + * When extracting, set the `uid` and `gid` of extracted entries to the `uid` + * and `gid` fields in the archive. Defaults to true when run as root, and + * false otherwise. + * + * If false, then files and directories will be set with the owner and group + * of the user running the process. This is similar to `-p` in `tar(1)`, but + * ACLs and other system-specific data is never unpacked in this + * implementation, and modes are set by default already. + */ + p?: TarOptions['preserveOwner']; + /** + * Pack the targets of symbolic links rather than the link itself. + */ + L?: TarOptions['follow']; + /** + * Pack the targets of symbolic links rather than the link itself. + */ + h?: TarOptions['follow']; + /** + * Deprecated option. Set explicitly false to set `chmod: true`. Ignored + * if {@link TarOptions#chmod} is set to any boolean value. + * + * @deprecated + */ + noChmod?: boolean; +} +export type TarOptionsWithAliasesSync = TarOptionsWithAliases & { + sync: true; +}; +export type TarOptionsWithAliasesAsync = TarOptionsWithAliases & { + sync?: false; +}; +export type TarOptionsWithAliasesFile = (TarOptionsWithAliases & { + file: string; +}) | (TarOptionsWithAliases & { + f: string; +}); +export type TarOptionsWithAliasesSyncFile = TarOptionsWithAliasesSync & TarOptionsWithAliasesFile; +export type TarOptionsWithAliasesAsyncFile = TarOptionsWithAliasesAsync & TarOptionsWithAliasesFile; +export type TarOptionsWithAliasesNoFile = TarOptionsWithAliases & { + f?: undefined; + file?: undefined; +}; +export type TarOptionsWithAliasesSyncNoFile = TarOptionsWithAliasesSync & TarOptionsWithAliasesNoFile; +export type TarOptionsWithAliasesAsyncNoFile = TarOptionsWithAliasesAsync & TarOptionsWithAliasesNoFile; +export declare const isSyncFile: (o: O) => o is O & TarOptions & { + sync: true; +} & { + file: string; +}; +export declare const isAsyncFile: (o: O) => o is O & TarOptions & { + sync?: false | undefined; +} & { + file: string; +}; +export declare const isSyncNoFile: (o: O) => o is O & TarOptions & { + sync: true; +} & { + file?: undefined; +}; +export declare const isAsyncNoFile: (o: O) => o is O & TarOptions & { + sync?: false | undefined; +} & { + file?: undefined; +}; +export declare const isSync: (o: O) => o is O & TarOptions & { + sync: true; +}; +export declare const isAsync: (o: O) => o is O & TarOptions & { + sync?: false | undefined; +}; +export declare const isFile: (o: O) => o is O & TarOptions & { + file: string; +}; +export declare const isNoFile: (o: O) => o is O & TarOptions & { + file?: undefined; +}; +export declare const dealias: (opt?: TarOptionsWithAliases) => TarOptions; +//# sourceMappingURL=options.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/options.d.ts.map b/node_modules/tar/dist/esm/options.d.ts.map new file mode 100644 index 0000000..cd32241 --- /dev/null +++ b/node_modules/tar/dist/esm/options.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AAC7D,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AA2B7C;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU;IAIzB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,WAAW,CAAA;IAE5B;;;;;;;;;;;;;;OAcG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,WAAW,CAAA;IAE9B;;;;OAIG;IAC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AAC,CAAA;AAC3C,MAAM,MAAM,6BAA6B,GACvC,yBAAyB,GAAG,yBAAyB,CAAA;AACvD,MAAM,MAAM,8BAA8B,GACxC,0BAA0B,GAAG,yBAAyB,CAAA;AAExD,MAAM,MAAM,2BAA2B,GAAG,qBAAqB,GAAG;IAChE,CAAC,CAAC,EAAE,SAAS,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,+BAA+B,GACzC,yBAAyB,GAAG,2BAA2B,CAAA;AACzD,MAAM,MAAM,gCAAgC,GAC1C,0BAA0B,GAAG,2BAA2B,CAAA;AAE1D,eAAO,MAAM,UAAU,4BAClB,CAAC;UA/K4C,IAAI;;UAEJ,MAAM;CA8KF,CAAA;AACtD,eAAO,MAAM,WAAW,4BACnB,CAAC;;;UAhL4C,MAAM;CAiLF,CAAA;AACtD,eAAO,MAAM,YAAY,4BACpB,CAAC;UArL4C,IAAI;;WAGD,SAAS;CAmLP,CAAA;AACvD,eAAO,MAAM,aAAa,4BACrB,CAAC;;;WArL+C,SAAS;CAsLP,CAAA;AACvD,eAAO,MAAM,MAAM,4BACd,CAAC;UA3L4C,IAAI;CA4LhB,CAAA;AACtC,eAAO,MAAM,OAAO,4BACf,CAAC;;CACgC,CAAA;AACtC,eAAO,MAAM,MAAM,4BACd,CAAC;UA/L4C,MAAM;CAgMlB,CAAA;AACtC,eAAO,MAAM,QAAQ,4BAChB,CAAC;WAjM+C,SAAS;CAkMvB,CAAA;AAUvC,eAAO,MAAM,OAAO,SACb,qBAAqB,KACzB,UAiBF,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/options.js b/node_modules/tar/dist/esm/options.js new file mode 100644 index 0000000..a006d36 --- /dev/null +++ b/node_modules/tar/dist/esm/options.js @@ -0,0 +1,54 @@ +// turn tar(1) style args like `C` into the more verbose things like `cwd` +const argmap = new Map([ + ['C', 'cwd'], + ['f', 'file'], + ['z', 'gzip'], + ['P', 'preservePaths'], + ['U', 'unlink'], + ['strip-components', 'strip'], + ['stripComponents', 'strip'], + ['keep-newer', 'newer'], + ['keepNewer', 'newer'], + ['keep-newer-files', 'newer'], + ['keepNewerFiles', 'newer'], + ['k', 'keep'], + ['keep-existing', 'keep'], + ['keepExisting', 'keep'], + ['m', 'noMtime'], + ['no-mtime', 'noMtime'], + ['p', 'preserveOwner'], + ['L', 'follow'], + ['h', 'follow'], + ['onentry', 'onReadEntry'], +]); +export const isSyncFile = (o) => !!o.sync && !!o.file; +export const isAsyncFile = (o) => !o.sync && !!o.file; +export const isSyncNoFile = (o) => !!o.sync && !o.file; +export const isAsyncNoFile = (o) => !o.sync && !o.file; +export const isSync = (o) => !!o.sync; +export const isAsync = (o) => !o.sync; +export const isFile = (o) => !!o.file; +export const isNoFile = (o) => !o.file; +const dealiasKey = (k) => { + const d = argmap.get(k); + if (d) + return d; + return k; +}; +export const dealias = (opt = {}) => { + if (!opt) + return {}; + const result = {}; + for (const [key, v] of Object.entries(opt)) { + // TS doesn't know that aliases are going to always be the same type + const k = dealiasKey(key); + result[k] = v; + } + // affordance for deprecated noChmod -> chmod + if (result.chmod === undefined && result.noChmod === false) { + result.chmod = true; + } + delete result.noChmod; + return result; +}; +//# sourceMappingURL=options.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/options.js.map b/node_modules/tar/dist/esm/options.js.map new file mode 100644 index 0000000..8b599ce --- /dev/null +++ b/node_modules/tar/dist/esm/options.js.map @@ -0,0 +1 @@ +{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAQ1E,MAAM,MAAM,GAAG,IAAI,GAAG,CACpB;IACE,CAAC,GAAG,EAAE,KAAK,CAAC;IACZ,CAAC,GAAG,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,eAAe,CAAC;IACtB,CAAC,GAAG,EAAE,QAAQ,CAAC;IACf,CAAC,kBAAkB,EAA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AI,EACsB,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;AACtC,MAAM,CAAC,MAAM,MAAM,GAAG,CACpB,CAAI,EACqB,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;AACtC,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,CAAI,EACuB,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;AAEvC,MAAM,UAAU,GAAG,CACjB,CAA8B,EACZ,EAAE;IACpB,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IACvB,IAAI,CAAC;QAAE,OAAO,CAAC,CAAA;IACf,OAAO,CAAqB,CAAA;AAC9B,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,CACrB,MAA6B,EAAE,EACnB,EAAE;IACd,IAAI,CAAC,GAAG;QAAE,OAAO,EAAE,CAAA;IACnB,MAAM,MAAM,GAAwB,EAAE,CAAA;IACtC,KAAK,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAGtC,EAAE,CAAC;QACJ,oEAAoE;QACpE,MAAM,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,CAAA;QACzB,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;IACf,CAAC;IACD,6CAA6C;IAC7C,IAAI,MAAM,CAAC,KAAK,KAAK,SAAS,IAAI,MAAM,CAAC,OAAO,KAAK,KAAK,EAAE,CAAC;QAC3D,MAAM,CAAC,KAAK,GAAG,IAAI,CAAA;IACrB,CAAC;IACD,OAAO,MAAM,CAAC,OAAO,CAAA;IACrB,OAAO,MAAoB,CAAA;AAC7B,CAAC,CAAA","sourcesContent":["// turn tar(1) style args like `C` into the more verbose things like `cwd`\n\nimport { type GzipOptions, type ZlibOptions } from 'minizlib'\nimport { type Stats } from 'node:fs'\nimport { type ReadEntry } from './read-entry.js'\nimport { type WarnData } from './warn-method.js'\nimport { WriteEntry } from './write-entry.js'\n\nconst argmap = new Map(\n [\n ['C', 'cwd'],\n ['f', 'file'],\n ['z', 'gzip'],\n ['P', 'preservePaths'],\n ['U', 'unlink'],\n ['strip-components', 'strip'],\n ['stripComponents', 'strip'],\n ['keep-newer', 'newer'],\n ['keepNewer', 'newer'],\n ['keep-newer-files', 'newer'],\n ['keepNewerFiles', 'newer'],\n ['k', 'keep'],\n ['keep-existing', 'keep'],\n ['keepExisting', 'keep'],\n ['m', 'noMtime'],\n ['no-mtime', 'noMtime'],\n ['p', 'preserveOwner'],\n ['L', 'follow'],\n ['h', 'follow'],\n ['onentry', 'onReadEntry'],\n ],\n)\n\n/**\n * The options that can be provided to tar commands.\n *\n * Note that some of these are only relevant for certain commands, since\n * they are specific to reading or writing.\n *\n * Aliases are provided in the {@link TarOptionsWithAliases} type.\n */\nexport interface TarOptions {\n //////////////////////////\n // shared options\n\n /**\n * Perform all I/O operations synchronously. If the stream is ended\n * immediately, then it will be processed entirely synchronously.\n */\n sync?: boolean\n\n /**\n * The tar file to be read and/or written. When this is set, a stream\n * is not returned. Asynchronous commands will return a promise indicating\n * when the operation is completed, and synchronous commands will return\n * immediately.\n */\n file?: string\n\n /**\n * Treat warnings as crash-worthy errors. Defaults false.\n */\n strict?: boolean\n\n /**\n * The effective current working directory for this tar command\n */\n cwd?: string\n\n /**\n * When creating a tar archive, this can be used to compress it as well.\n * Set to `true` to use the default gzip options, or customize them as\n * needed.\n *\n * When reading, if this is unset, then the compression status will be\n * inferred from the archive data. This is generally best, unless you are\n * sure of the compression settings in use to create the archive, and want to\n * fail if the archive doesn't match expectations.\n */\n gzip?: boolean | GzipOptions\n\n /**\n * When creating archives, preserve absolute and `..` paths in the archive,\n * rather than sanitizing them under the cwd.\n *\n * When extracting, allow absolute paths, paths containing `..`, and\n * extracting through symbolic links. By default, the root `/` is stripped\n * from absolute paths (eg, turning `/x/y/z` into `x/y/z`), paths containing\n * `..` are not extracted, and any file whose location would be modified by a\n * symbolic link is not extracted.\n *\n * **WARNING** This is almost always unsafe, and must NEVER be used on\n * archives from untrusted sources, such as user input, and every entry must\n * be validated to ensure it is safe to write. Even if the input is not\n * malicious, mistakes can cause a lot of damage!\n */\n preservePaths?: boolean\n\n /**\n * When extracting, do not set the `mtime` value for extracted entries to\n * match the `mtime` in the archive.\n *\n * When creating archives, do not store the `mtime` value in the entry. Note\n * that this prevents properly using other mtime-based features (such as\n * `tar.update` or the `newer` option) with the resulting archive.\n */\n noMtime?: boolean\n\n /**\n * Set to `true` or an object with settings for `zlib.BrotliCompress()` to\n * create a brotli-compressed archive\n *\n * When extracting, this will cause the archive to be treated as a\n * brotli-compressed file if set to `true` or a ZlibOptions object.\n *\n * If set `false`, then brotli options will not be used.\n *\n * If both this and the `gzip` option are left `undefined`, then tar will\n * attempt to infer the brotli compression status, but can only do so based\n * on the filename. If the filename ends in `.tbr` or `.tar.br`, and the\n * first 512 bytes are not a valid tar header, then brotli decompression\n * will be attempted.\n */\n brotli?: boolean | ZlibOptions\n\n /**\n * A function that is called with `(path, stat)` when creating an archive, or\n * `(path, entry)` when extracting. Return true to process the file/entry, or\n * false to exclude it.\n */\n filter?: (path: string, entry: Stats | ReadEntry) => boolean\n\n /**\n * A function that gets called for any warning encountered.\n *\n * Note: if `strict` is set, then the warning will throw, and this method\n * will not be called.\n */\n onwarn?: (code: string, message: string, data: WarnData) => any\n\n //////////////////////////\n // extraction options\n\n /**\n * When extracting, unlink files before creating them. Without this option,\n * tar overwrites existing files, which preserves existing hardlinks. With\n * this option, existing hardlinks will be broken, as will any symlink that\n * would affect the location of an extracted file.\n */\n unlink?: boolean\n\n /**\n * When extracting, strip the specified number of path portions from the\n * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be\n * extracted to `{cwd}/c/d`.\n *\n * Any entry whose entire path is stripped will be excluded.\n */\n strip?: number\n\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n newer?: boolean\n\n /**\n * When extracting, do not overwrite existing files at all.\n */\n keep?: boolean\n\n /**\n * When extracting, set the `uid` and `gid` of extracted entries to the `uid`\n * and `gid` fields in the archive. Defaults to true when run as root, and\n * false otherwise.\n *\n * If false, then files and directories will be set with the owner and group\n * of the user running the process. This is similar to `-p` in `tar(1)`, but\n * ACLs and other system-specific data is never unpacked in this\n * implementation, and modes are set by default already.\n */\n preserveOwner?: boolean\n\n /**\n * The maximum depth of subfolders to extract into. This defaults to 1024.\n * Anything deeper than the limit will raise a warning and skip the entry.\n * Set to `Infinity` to remove the limitation.\n */\n maxDepth?: number\n\n /**\n * When extracting, force all created files and directories, and all\n * implicitly created directories, to be owned by the specified user id,\n * regardless of the `uid` field in the archive.\n *\n * Cannot be used along with `preserveOwner`. Requires also setting the `gid`\n * option.\n */\n uid?: number\n\n /**\n * When extracting, force all created files and directories, and all\n * implicitly created directories, to be owned by the specified group id,\n * regardless of the `gid` field in the archive.\n *\n * Cannot be used along with `preserveOwner`. Requires also setting the `uid`\n * option.\n */\n gid?: number\n\n /**\n * When extracting, provide a function that takes an `entry` object, and\n * returns a stream, or any falsey value. If a stream is provided, then that\n * stream's data will be written instead of the contents of the archive\n * entry. If a falsey value is provided, then the entry is written to disk as\n * normal.\n *\n * To exclude items from extraction, use the `filter` option.\n *\n * Note that using an asynchronous stream type with the `transform` option\n * will cause undefined behavior in synchronous extractions.\n * [MiniPass](http://npm.im/minipass)-based streams are designed for this use\n * case.\n */\n transform?: (entry: ReadEntry) => any\n\n /**\n * Call `chmod()` to ensure that extracted files match the entry's mode\n * field. Without this field set, all mode fields in archive entries are a\n * best effort attempt only.\n *\n * Setting this necessitates a call to the deprecated `process.umask()`\n * method to determine the default umask value, unless a `processUmask`\n * config is provided as well.\n *\n * If not set, tar will attempt to create file system entries with whatever\n * mode is provided, and let the implicit process `umask` apply normally, but\n * if a file already exists to be written to, then its existing mode will not\n * be modified.\n *\n * When setting `chmod: true`, it is highly recommend to set the\n * {@link TarOptions#processUmask} option as well, to avoid the call to the\n * deprecated (and thread-unsafe) `process.umask()` method.\n */\n chmod?: boolean\n\n /**\n * When setting the {@link TarOptions#chmod} option to `true`, you may\n * provide a value here to avoid having to call the deprecated and\n * thread-unsafe `process.umask()` method.\n *\n * This has no effect with `chmod` is not set to true, as mode values are not\n * set explicitly anyway. If `chmod` is set to `true`, and a value is not\n * provided here, then `process.umask()` must be called, which will result in\n * deprecation warnings.\n *\n * The most common values for this are `0o22` (resulting in directories\n * created with mode `0o755` and files with `0o644` by default) and `0o2`\n * (resulting in directores created with mode `0o775` and files `0o664`, so\n * they are group-writable).\n */\n processUmask?: number\n\n //////////////////////////\n // archive creation options\n\n /**\n * When parsing/listing archives, `entry` streams are by default resumed\n * (set into \"flowing\" mode) immediately after the call to `onReadEntry()`.\n * Set `noResume: true` to suppress this behavior.\n *\n * Note that when this is set, the stream will never complete until the\n * data is consumed somehow.\n *\n * Set automatically in extract operations, since the entry is piped to\n * a file system entry right away. Only relevant when parsing.\n */\n noResume?: boolean\n\n /**\n * When creating, updating, or replacing within archives, this method will\n * be called with each WriteEntry that is created.\n */\n onWriteEntry?: (entry: WriteEntry) => any\n\n /**\n * When extracting or listing archives, this method will be called with\n * each entry that is not excluded by a `filter`.\n *\n * Important when listing archives synchronously from a file, because there\n * is otherwise no way to interact with the data!\n */\n onReadEntry?: (entry: ReadEntry) => any\n\n /**\n * Pack the targets of symbolic links rather than the link itself.\n */\n follow?: boolean\n\n /**\n * When creating archives, omit any metadata that is system-specific:\n * `ctime`, `atime`, `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and\n * `nlink`. Note that `mtime` is still included, because this is necessary\n * for other time-based operations such as `tar.update`. Additionally, `mode`\n * is set to a \"reasonable default\" for mose unix systems, based on an\n * effective `umask` of `0o22`.\n *\n * This also defaults the `portable` option in the gzip configs when creating\n * a compressed archive, in order to produce deterministic archives that are\n * not operating-system specific.\n */\n portable?: boolean\n\n /**\n * When creating archives, do not recursively archive the contents of\n * directories. By default, archiving a directory archives all of its\n * contents as well.\n */\n noDirRecurse?: boolean\n\n /**\n * Suppress Pax extended headers when creating archives. Note that this means\n * long paths and linkpaths will be truncated, and large or negative numeric\n * values may be interpreted incorrectly.\n */\n noPax?: boolean\n\n /**\n * Set to a `Date` object to force a specific `mtime` value for everything\n * written to an archive.\n *\n * This is useful when creating archives that are intended to be\n * deterministic based on their contents, irrespective of the file's last\n * modification time.\n *\n * Overridden by `noMtime`.\n */\n mtime?: Date\n\n /**\n * A path portion to prefix onto the entries added to an archive.\n */\n prefix?: string\n\n /**\n * The mode to set on any created file archive, defaults to 0o666\n * masked by the process umask, often resulting in 0o644.\n *\n * This does *not* affect the mode fields of individual entries, or the\n * mode status of extracted entries on the filesystem.\n */\n mode?: number\n\n //////////////////////////\n // internal options\n\n /**\n * A cache of mtime values, to avoid having to stat the same file repeatedly.\n *\n * @internal\n */\n mtimeCache?: Map\n\n /**\n * maximum buffer size for `fs.read()` operations.\n *\n * @internal\n */\n maxReadSize?: number\n\n /**\n * Filter modes of entries being unpacked, like `process.umask()`\n *\n * @internal\n */\n umask?: number\n\n /**\n * Default mode for directories. Used for all implicitly created directories,\n * and any directories in the archive that do not have a mode field.\n *\n * @internal\n */\n dmode?: number\n\n /**\n * default mode for files\n *\n * @internal\n */\n fmode?: number\n\n /**\n * Map that tracks which directories already exist, for extraction\n *\n * @internal\n */\n dirCache?: Map\n /**\n * maximum supported size of meta entries. Defaults to 1MB\n *\n * @internal\n */\n maxMetaEntrySize?: number\n\n /**\n * A Map object containing the device and inode value for any file whose\n * `nlink` value is greater than 1, to identify hard links when creating\n * archives.\n *\n * @internal\n */\n linkCache?: Map\n\n /**\n * A map object containing the results of `fs.readdir()` calls.\n *\n * @internal\n */\n readdirCache?: Map\n\n /**\n * A cache of all `lstat` results, for use in creating archives.\n *\n * @internal\n */\n statCache?: Map\n\n /**\n * Number of concurrent jobs to run when creating archives.\n *\n * Defaults to 4.\n *\n * @internal\n */\n jobs?: number\n\n /**\n * Automatically set to true on Windows systems.\n *\n * When extracting, causes behavior where filenames containing `<|>?:`\n * characters are converted to windows-compatible escape sequences in the\n * created filesystem entries.\n *\n * When packing, causes behavior where paths replace `\\` with `/`, and\n * filenames containing the windows-compatible escaped forms of `<|>?:` are\n * converted to actual `<|>?:` characters in the archive.\n *\n * @internal\n */\n win32?: boolean\n\n /**\n * For `WriteEntry` objects, the absolute path to the entry on the\n * filesystem. By default, this is `resolve(cwd, entry.path)`, but it can be\n * overridden explicitly.\n *\n * @internal\n */\n absolute?: string\n\n /**\n * Used with Parser stream interface, to attach and take over when the\n * stream is completely parsed. If this is set, then the prefinish,\n * finish, and end events will not fire, and are the responsibility of\n * the ondone method to emit properly.\n *\n * @internal\n */\n ondone?: () => void\n\n /**\n * Mostly for testing, but potentially useful in some cases.\n * Forcibly trigger a chown on every entry, no matter what.\n */\n forceChown?: boolean\n\n /**\n * ambiguous deprecated name for {@link onReadEntry}\n *\n * @deprecated\n */\n onentry?: (entry: ReadEntry) => any\n}\n\nexport type TarOptionsSync = TarOptions & { sync: true }\nexport type TarOptionsAsync = TarOptions & { sync?: false }\nexport type TarOptionsFile = TarOptions & { file: string }\nexport type TarOptionsNoFile = TarOptions & { file?: undefined }\nexport type TarOptionsSyncFile = TarOptionsSync & TarOptionsFile\nexport type TarOptionsAsyncFile = TarOptionsAsync & TarOptionsFile\nexport type TarOptionsSyncNoFile = TarOptionsSync & TarOptionsNoFile\nexport type TarOptionsAsyncNoFile = TarOptionsAsync & TarOptionsNoFile\n\nexport type LinkCacheKey = `${number}:${number}`\n\nexport interface TarOptionsWithAliases extends TarOptions {\n /**\n * The effective current working directory for this tar command\n */\n C?: TarOptions['cwd']\n /**\n * The tar file to be read and/or written. When this is set, a stream\n * is not returned. Asynchronous commands will return a promise indicating\n * when the operation is completed, and synchronous commands will return\n * immediately.\n */\n f?: TarOptions['file']\n /**\n * When creating a tar archive, this can be used to compress it as well.\n * Set to `true` to use the default gzip options, or customize them as\n * needed.\n *\n * When reading, if this is unset, then the compression status will be\n * inferred from the archive data. This is generally best, unless you are\n * sure of the compression settings in use to create the archive, and want to\n * fail if the archive doesn't match expectations.\n */\n z?: TarOptions['gzip']\n /**\n * When creating archives, preserve absolute and `..` paths in the archive,\n * rather than sanitizing them under the cwd.\n *\n * When extracting, allow absolute paths, paths containing `..`, and\n * extracting through symbolic links. By default, the root `/` is stripped\n * from absolute paths (eg, turning `/x/y/z` into `x/y/z`), paths containing\n * `..` are not extracted, and any file whose location would be modified by a\n * symbolic link is not extracted.\n *\n * **WARNING** This is almost always unsafe, and must NEVER be used on\n * archives from untrusted sources, such as user input, and every entry must\n * be validated to ensure it is safe to write. Even if the input is not\n * malicious, mistakes can cause a lot of damage!\n */\n P?: TarOptions['preservePaths']\n /**\n * When extracting, unlink files before creating them. Without this option,\n * tar overwrites existing files, which preserves existing hardlinks. With\n * this option, existing hardlinks will be broken, as will any symlink that\n * would affect the location of an extracted file.\n */\n U?: TarOptions['unlink']\n /**\n * When extracting, strip the specified number of path portions from the\n * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be\n * extracted to `{cwd}/c/d`.\n */\n 'strip-components'?: TarOptions['strip']\n /**\n * When extracting, strip the specified number of path portions from the\n * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be\n * extracted to `{cwd}/c/d`.\n */\n stripComponents?: TarOptions['strip']\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n 'keep-newer'?: TarOptions['newer']\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n keepNewer?: TarOptions['newer']\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n 'keep-newer-files'?: TarOptions['newer']\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n keepNewerFiles?: TarOptions['newer']\n /**\n * When extracting, do not overwrite existing files at all.\n */\n k?: TarOptions['keep']\n /**\n * When extracting, do not overwrite existing files at all.\n */\n 'keep-existing'?: TarOptions['keep']\n /**\n * When extracting, do not overwrite existing files at all.\n */\n keepExisting?: TarOptions['keep']\n /**\n * When extracting, do not set the `mtime` value for extracted entries to\n * match the `mtime` in the archive.\n *\n * When creating archives, do not store the `mtime` value in the entry. Note\n * that this prevents properly using other mtime-based features (such as\n * `tar.update` or the `newer` option) with the resulting archive.\n */\n m?: TarOptions['noMtime']\n /**\n * When extracting, do not set the `mtime` value for extracted entries to\n * match the `mtime` in the archive.\n *\n * When creating archives, do not store the `mtime` value in the entry. Note\n * that this prevents properly using other mtime-based features (such as\n * `tar.update` or the `newer` option) with the resulting archive.\n */\n 'no-mtime'?: TarOptions['noMtime']\n /**\n * When extracting, set the `uid` and `gid` of extracted entries to the `uid`\n * and `gid` fields in the archive. Defaults to true when run as root, and\n * false otherwise.\n *\n * If false, then files and directories will be set with the owner and group\n * of the user running the process. This is similar to `-p` in `tar(1)`, but\n * ACLs and other system-specific data is never unpacked in this\n * implementation, and modes are set by default already.\n */\n p?: TarOptions['preserveOwner']\n /**\n * Pack the targets of symbolic links rather than the link itself.\n */\n L?: TarOptions['follow']\n /**\n * Pack the targets of symbolic links rather than the link itself.\n */\n h?: TarOptions['follow']\n\n /**\n * Deprecated option. Set explicitly false to set `chmod: true`. Ignored\n * if {@link TarOptions#chmod} is set to any boolean value.\n *\n * @deprecated\n */\n noChmod?: boolean\n}\n\nexport type TarOptionsWithAliasesSync = TarOptionsWithAliases & {\n sync: true\n}\nexport type TarOptionsWithAliasesAsync = TarOptionsWithAliases & {\n sync?: false\n}\nexport type TarOptionsWithAliasesFile =\n | (TarOptionsWithAliases & {\n file: string\n })\n | (TarOptionsWithAliases & { f: string })\nexport type TarOptionsWithAliasesSyncFile =\n TarOptionsWithAliasesSync & TarOptionsWithAliasesFile\nexport type TarOptionsWithAliasesAsyncFile =\n TarOptionsWithAliasesAsync & TarOptionsWithAliasesFile\n\nexport type TarOptionsWithAliasesNoFile = TarOptionsWithAliases & {\n f?: undefined\n file?: undefined\n}\n\nexport type TarOptionsWithAliasesSyncNoFile =\n TarOptionsWithAliasesSync & TarOptionsWithAliasesNoFile\nexport type TarOptionsWithAliasesAsyncNoFile =\n TarOptionsWithAliasesAsync & TarOptionsWithAliasesNoFile\n\nexport const isSyncFile = (\n o: O,\n): o is O & TarOptionsSyncFile => !!o.sync && !!o.file\nexport const isAsyncFile = (\n o: O,\n): o is O & TarOptionsAsyncFile => !o.sync && !!o.file\nexport const isSyncNoFile = (\n o: O,\n): o is O & TarOptionsSyncNoFile => !!o.sync && !o.file\nexport const isAsyncNoFile = (\n o: O,\n): o is O & TarOptionsAsyncNoFile => !o.sync && !o.file\nexport const isSync = (\n o: O,\n): o is O & TarOptionsSync => !!o.sync\nexport const isAsync = (\n o: O,\n): o is O & TarOptionsAsync => !o.sync\nexport const isFile = (\n o: O,\n): o is O & TarOptionsFile => !!o.file\nexport const isNoFile = (\n o: O,\n): o is O & TarOptionsNoFile => !o.file\n\nconst dealiasKey = (\n k: keyof TarOptionsWithAliases,\n): keyof TarOptions => {\n const d = argmap.get(k)\n if (d) return d\n return k as keyof TarOptions\n}\n\nexport const dealias = (\n opt: TarOptionsWithAliases = {},\n): TarOptions => {\n if (!opt) return {}\n const result: Record = {}\n for (const [key, v] of Object.entries(opt) as [\n keyof TarOptionsWithAliases,\n any,\n ][]) {\n // TS doesn't know that aliases are going to always be the same type\n const k = dealiasKey(key)\n result[k] = v\n }\n // affordance for deprecated noChmod -> chmod\n if (result.chmod === undefined && result.noChmod === false) {\n result.chmod = true\n }\n delete result.noChmod\n return result as TarOptions\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/pack.d.ts b/node_modules/tar/dist/esm/pack.d.ts new file mode 100644 index 0000000..e0e9656 --- /dev/null +++ b/node_modules/tar/dist/esm/pack.d.ts @@ -0,0 +1,102 @@ +/// +/// +import { type Stats } from 'fs'; +import { WriteEntry, WriteEntrySync, WriteEntryTar } from './write-entry.js'; +export declare class PackJob { + path: string; + absolute: string; + entry?: WriteEntry | WriteEntryTar; + stat?: Stats; + readdir?: string[]; + pending: boolean; + ignore: boolean; + piped: boolean; + constructor(path: string, absolute: string); +} +import { Minipass } from 'minipass'; +import * as zlib from 'minizlib'; +import { Yallist } from 'yallist'; +import { ReadEntry } from './read-entry.js'; +import { WarnEvent, type WarnData, type Warner } from './warn-method.js'; +declare const ONSTAT: unique symbol; +declare const ENDED: unique symbol; +declare const QUEUE: unique symbol; +declare const CURRENT: unique symbol; +declare const PROCESS: unique symbol; +declare const PROCESSING: unique symbol; +declare const PROCESSJOB: unique symbol; +declare const JOBS: unique symbol; +declare const JOBDONE: unique symbol; +declare const ADDFSENTRY: unique symbol; +declare const ADDTARENTRY: unique symbol; +declare const STAT: unique symbol; +declare const READDIR: unique symbol; +declare const ONREADDIR: unique symbol; +declare const PIPE: unique symbol; +declare const ENTRY: unique symbol; +declare const ENTRYOPT: unique symbol; +declare const WRITEENTRYCLASS: unique symbol; +declare const WRITE: unique symbol; +declare const ONDRAIN: unique symbol; +import { TarOptions } from './options.js'; +export declare class Pack extends Minipass> implements Warner { + opt: TarOptions; + cwd: string; + maxReadSize?: number; + preservePaths: boolean; + strict: boolean; + noPax: boolean; + prefix: string; + linkCache: Exclude; + statCache: Exclude; + file: string; + portable: boolean; + zip?: zlib.BrotliCompress | zlib.Gzip; + readdirCache: Exclude; + noDirRecurse: boolean; + follow: boolean; + noMtime: boolean; + mtime?: Date; + filter: Exclude; + jobs: number; + [WRITEENTRYCLASS]: typeof WriteEntry | typeof WriteEntrySync; + onWriteEntry?: (entry: WriteEntry) => void; + [QUEUE]: Yallist; + [JOBS]: number; + [PROCESSING]: boolean; + [ENDED]: boolean; + constructor(opt?: TarOptions); + [WRITE](chunk: Buffer): boolean; + add(path: string | ReadEntry): this; + end(cb?: () => void): this; + end(path: string | ReadEntry, cb?: () => void): this; + end(path: string | ReadEntry, encoding?: Minipass.Encoding, cb?: () => void): this; + write(path: string | ReadEntry): boolean; + [ADDTARENTRY](p: ReadEntry): void; + [ADDFSENTRY](p: string): void; + [STAT](job: PackJob): void; + [ONSTAT](job: PackJob, stat: Stats): void; + [READDIR](job: PackJob): void; + [ONREADDIR](job: PackJob, entries: string[]): void; + [PROCESS](): void; + get [CURRENT](): PackJob | undefined; + [JOBDONE](_job: PackJob): void; + [PROCESSJOB](job: PackJob): void; + [ENTRYOPT](job: PackJob): TarOptions; + [ENTRY](job: PackJob): WriteEntry | undefined; + [ONDRAIN](): void; + [PIPE](job: PackJob): void; + pause(): void; + warn(code: string, message: string | Error, data?: WarnData): void; +} +export declare class PackSync extends Pack { + sync: true; + constructor(opt: TarOptions); + pause(): void; + resume(): void; + [STAT](job: PackJob): void; + [READDIR](job: PackJob): void; + [PIPE](job: PackJob): void; +} +export {}; +//# sourceMappingURL=pack.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/pack.d.ts.map b/node_modules/tar/dist/esm/pack.d.ts.map new file mode 100644 index 0000000..bc8e9f0 --- /dev/null +++ b/node_modules/tar/dist/esm/pack.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pack.d.ts","sourceRoot":"","sources":["../../src/pack.ts"],"names":[],"mappings":";;AASA,OAAW,EAAE,KAAK,KAAK,EAAE,MAAM,IAAI,CAAA;AACnC,OAAO,EACL,UAAU,EACV,cAAc,EACd,aAAa,EACd,MAAM,kBAAkB,CAAA;AAEzB,qBAAa,OAAO;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,UAAU,GAAG,aAAa,CAAA;IAClC,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,OAAO,EAAE,OAAO,CAAQ;IACxB,MAAM,EAAE,OAAO,CAAQ;IACvB,KAAK,EAAE,OAAO,CAAQ;gBACV,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAI3C;AAED,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,KAAK,IAAI,MAAM,UAA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,GAAG,EAAE,OAAO;IAKnB,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,OAAO;IAKtB,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,OAAO;CA0BpB"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/pack.js b/node_modules/tar/dist/esm/pack.js new file mode 100644 index 0000000..f59f32f --- /dev/null +++ b/node_modules/tar/dist/esm/pack.js @@ -0,0 +1,445 @@ +// A readable tar stream creator +// Technically, this is a transform stream that you write paths into, +// and tar format comes out of. +// The `add()` method is like `write()` but returns this, +// and end() return `this` as well, so you can +// do `new Pack(opt).add('files').add('dir').end().pipe(output) +// You could also do something like: +// streamOfPaths().pipe(new Pack()).pipe(new fs.WriteStream('out.tar')) +import fs from 'fs'; +import { WriteEntry, WriteEntrySync, WriteEntryTar, } from './write-entry.js'; +export class PackJob { + path; + absolute; + entry; + stat; + readdir; + pending = false; + ignore = false; + piped = false; + constructor(path, absolute) { + this.path = path || './'; + this.absolute = absolute; + } +} +import { Minipass } from 'minipass'; +import * as zlib from 'minizlib'; +import { Yallist } from 'yallist'; +import { ReadEntry } from './read-entry.js'; +import { warnMethod, } from './warn-method.js'; +const EOF = Buffer.alloc(1024); +const ONSTAT = Symbol('onStat'); +const ENDED = Symbol('ended'); +const QUEUE = Symbol('queue'); +const CURRENT = Symbol('current'); +const PROCESS = Symbol('process'); +const PROCESSING = Symbol('processing'); +const PROCESSJOB = Symbol('processJob'); +const JOBS = Symbol('jobs'); +const JOBDONE = Symbol('jobDone'); +const ADDFSENTRY = Symbol('addFSEntry'); +const ADDTARENTRY = Symbol('addTarEntry'); +const STAT = Symbol('stat'); +const READDIR = Symbol('readdir'); +const ONREADDIR = Symbol('onreaddir'); +const PIPE = Symbol('pipe'); +const ENTRY = Symbol('entry'); +const ENTRYOPT = Symbol('entryOpt'); +const WRITEENTRYCLASS = Symbol('writeEntryClass'); +const WRITE = Symbol('write'); +const ONDRAIN = Symbol('ondrain'); +import path from 'path'; +import { normalizeWindowsPath } from './normalize-windows-path.js'; +export class Pack extends Minipass { + opt; + cwd; + maxReadSize; + preservePaths; + strict; + noPax; + prefix; + linkCache; + statCache; + file; + portable; + zip; + readdirCache; + noDirRecurse; + follow; + noMtime; + mtime; + filter; + jobs; + [WRITEENTRYCLASS]; + onWriteEntry; + [QUEUE]; + [JOBS] = 0; + [PROCESSING] = false; + [ENDED] = false; + constructor(opt = {}) { + //@ts-ignore + super(); + this.opt = opt; + this.file = opt.file || ''; + this.cwd = opt.cwd || process.cwd(); + this.maxReadSize = opt.maxReadSize; + this.preservePaths = !!opt.preservePaths; + this.strict = !!opt.strict; + this.noPax = !!opt.noPax; + this.prefix = normalizeWindowsPath(opt.prefix || ''); + this.linkCache = opt.linkCache || new Map(); + this.statCache = opt.statCache || new Map(); + this.readdirCache = opt.readdirCache || new Map(); + this.onWriteEntry = opt.onWriteEntry; + this[WRITEENTRYCLASS] = WriteEntry; + if (typeof opt.onwarn === 'function') { + this.on('warn', opt.onwarn); + } + this.portable = !!opt.portable; + if (opt.gzip || opt.brotli) { + if (opt.gzip && opt.brotli) { + throw new TypeError('gzip and brotli are mutually exclusive'); + } + if (opt.gzip) { + if (typeof opt.gzip !== 'object') { + opt.gzip = {}; + } + if (this.portable) { + opt.gzip.portable = true; + } + this.zip = new zlib.Gzip(opt.gzip); + } + if (opt.brotli) { + if (typeof opt.brotli !== 'object') { + opt.brotli = {}; + } + this.zip = new zlib.BrotliCompress(opt.brotli); + } + /* c8 ignore next */ + if (!this.zip) + throw new Error('impossible'); + const zip = this.zip; + zip.on('data', chunk => super.write(chunk)); + zip.on('end', () => super.end()); + zip.on('drain', () => this[ONDRAIN]()); + this.on('resume', () => zip.resume()); + } + else { + this.on('drain', this[ONDRAIN]); + } + this.noDirRecurse = !!opt.noDirRecurse; + this.follow = !!opt.follow; + this.noMtime = !!opt.noMtime; + if (opt.mtime) + this.mtime = opt.mtime; + this.filter = + typeof opt.filter === 'function' ? opt.filter : () => true; + this[QUEUE] = new Yallist(); + this[JOBS] = 0; + this.jobs = Number(opt.jobs) || 4; + this[PROCESSING] = false; + this[ENDED] = false; + } + [WRITE](chunk) { + return super.write(chunk); + } + add(path) { + this.write(path); + return this; + } + end(path, encoding, cb) { + /* c8 ignore start */ + if (typeof path === 'function') { + cb = path; + path = undefined; + } + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + /* c8 ignore stop */ + if (path) { + this.add(path); + } + this[ENDED] = true; + this[PROCESS](); + /* c8 ignore next */ + if (cb) + cb(); + return this; + } + write(path) { + if (this[ENDED]) { + throw new Error('write after end'); + } + if (path instanceof ReadEntry) { + this[ADDTARENTRY](path); + } + else { + this[ADDFSENTRY](path); + } + return this.flowing; + } + [ADDTARENTRY](p) { + const absolute = normalizeWindowsPath(path.resolve(this.cwd, p.path)); + // in this case, we don't have to wait for the stat + if (!this.filter(p.path, p)) { + p.resume(); + } + else { + const job = new PackJob(p.path, absolute); + job.entry = new WriteEntryTar(p, this[ENTRYOPT](job)); + job.entry.on('end', () => this[JOBDONE](job)); + this[JOBS] += 1; + this[QUEUE].push(job); + } + this[PROCESS](); + } + [ADDFSENTRY](p) { + const absolute = normalizeWindowsPath(path.resolve(this.cwd, p)); + this[QUEUE].push(new PackJob(p, absolute)); + this[PROCESS](); + } + [STAT](job) { + job.pending = true; + this[JOBS] += 1; + const stat = this.follow ? 'stat' : 'lstat'; + fs[stat](job.absolute, (er, stat) => { + job.pending = false; + this[JOBS] -= 1; + if (er) { + this.emit('error', er); + } + else { + this[ONSTAT](job, stat); + } + }); + } + [ONSTAT](job, stat) { + this.statCache.set(job.absolute, stat); + job.stat = stat; + // now we have the stat, we can filter it. + if (!this.filter(job.path, stat)) { + job.ignore = true; + } + this[PROCESS](); + } + [READDIR](job) { + job.pending = true; + this[JOBS] += 1; + fs.readdir(job.absolute, (er, entries) => { + job.pending = false; + this[JOBS] -= 1; + if (er) { + return this.emit('error', er); + } + this[ONREADDIR](job, entries); + }); + } + [ONREADDIR](job, entries) { + this.readdirCache.set(job.absolute, entries); + job.readdir = entries; + this[PROCESS](); + } + [PROCESS]() { + if (this[PROCESSING]) { + return; + } + this[PROCESSING] = true; + for (let w = this[QUEUE].head; !!w && this[JOBS] < this.jobs; w = w.next) { + this[PROCESSJOB](w.value); + if (w.value.ignore) { + const p = w.next; + this[QUEUE].removeNode(w); + w.next = p; + } + } + this[PROCESSING] = false; + if (this[ENDED] && !this[QUEUE].length && this[JOBS] === 0) { + if (this.zip) { + this.zip.end(EOF); + } + else { + super.write(EOF); + super.end(); + } + } + } + get [CURRENT]() { + return this[QUEUE] && this[QUEUE].head && this[QUEUE].head.value; + } + [JOBDONE](_job) { + this[QUEUE].shift(); + this[JOBS] -= 1; + this[PROCESS](); + } + [PROCESSJOB](job) { + if (job.pending) { + return; + } + if (job.entry) { + if (job === this[CURRENT] && !job.piped) { + this[PIPE](job); + } + return; + } + if (!job.stat) { + const sc = this.statCache.get(job.absolute); + if (sc) { + this[ONSTAT](job, sc); + } + else { + this[STAT](job); + } + } + if (!job.stat) { + return; + } + // filtered out! + if (job.ignore) { + return; + } + if (!this.noDirRecurse && + job.stat.isDirectory() && + !job.readdir) { + const rc = this.readdirCache.get(job.absolute); + if (rc) { + this[ONREADDIR](job, rc); + } + else { + this[READDIR](job); + } + if (!job.readdir) { + return; + } + } + // we know it doesn't have an entry, because that got checked above + job.entry = this[ENTRY](job); + if (!job.entry) { + job.ignore = true; + return; + } + if (job === this[CURRENT] && !job.piped) { + this[PIPE](job); + } + } + [ENTRYOPT](job) { + return { + onwarn: (code, msg, data) => this.warn(code, msg, data), + noPax: this.noPax, + cwd: this.cwd, + absolute: job.absolute, + preservePaths: this.preservePaths, + maxReadSize: this.maxReadSize, + strict: this.strict, + portable: this.portable, + linkCache: this.linkCache, + statCache: this.statCache, + noMtime: this.noMtime, + mtime: this.mtime, + prefix: this.prefix, + onWriteEntry: this.onWriteEntry, + }; + } + [ENTRY](job) { + this[JOBS] += 1; + try { + const e = new this[WRITEENTRYCLASS](job.path, this[ENTRYOPT](job)); + return e + .on('end', () => this[JOBDONE](job)) + .on('error', er => this.emit('error', er)); + } + catch (er) { + this.emit('error', er); + } + } + [ONDRAIN]() { + if (this[CURRENT] && this[CURRENT].entry) { + this[CURRENT].entry.resume(); + } + } + // like .pipe() but using super, because our write() is special + [PIPE](job) { + job.piped = true; + if (job.readdir) { + job.readdir.forEach(entry => { + const p = job.path; + const base = p === './' ? '' : p.replace(/\/*$/, '/'); + this[ADDFSENTRY](base + entry); + }); + } + const source = job.entry; + const zip = this.zip; + /* c8 ignore start */ + if (!source) + throw new Error('cannot pipe without source'); + /* c8 ignore stop */ + if (zip) { + source.on('data', chunk => { + if (!zip.write(chunk)) { + source.pause(); + } + }); + } + else { + source.on('data', chunk => { + if (!super.write(chunk)) { + source.pause(); + } + }); + } + } + pause() { + if (this.zip) { + this.zip.pause(); + } + return super.pause(); + } + warn(code, message, data = {}) { + warnMethod(this, code, message, data); + } +} +export class PackSync extends Pack { + sync = true; + constructor(opt) { + super(opt); + this[WRITEENTRYCLASS] = WriteEntrySync; + } + // pause/resume are no-ops in sync streams. + pause() { } + resume() { } + [STAT](job) { + const stat = this.follow ? 'statSync' : 'lstatSync'; + this[ONSTAT](job, fs[stat](job.absolute)); + } + [READDIR](job) { + this[ONREADDIR](job, fs.readdirSync(job.absolute)); + } + // gotta get it all in this tick + [PIPE](job) { + const source = job.entry; + const zip = this.zip; + if (job.readdir) { + job.readdir.forEach(entry => { + const p = job.path; + const base = p === './' ? '' : p.replace(/\/*$/, '/'); + this[ADDFSENTRY](base + entry); + }); + } + /* c8 ignore start */ + if (!source) + throw new Error('Cannot pipe without source'); + /* c8 ignore stop */ + if (zip) { + source.on('data', chunk => { + zip.write(chunk); + }); + } + else { + source.on('data', chunk => { + super[WRITE](chunk); + }); + } + } +} +//# sourceMappingURL=pack.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/pack.js.map b/node_modules/tar/dist/esm/pack.js.map new file mode 100644 index 0000000..17db32c --- /dev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;gBAClB,MAAM,IAAI,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;gBACrD,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAA;YAChC,CAAC,CAAC,CAAA;QACJ,CAAC;QAED,qBAAqB;QACrB,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;QAC1D,oBAAoB;QAEpB,IAAI,GAAG,EAAE,CAAC;YACR,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE;gBACxB,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;YAClB,CAAC,CAAC,CAAA;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE;gBACxB,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAA;YACrB,CAAC,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;CACF","sourcesContent":["// A readable tar stream creator\n// Technically, this is a transform stream that you write paths into,\n// and tar format comes out of.\n// The `add()` method is like `write()` but returns this,\n// and end() return `this` as well, so you can\n// do `new Pack(opt).add('files').add('dir').end().pipe(output)\n// You could also do something like:\n// streamOfPaths().pipe(new Pack()).pipe(new fs.WriteStream('out.tar'))\n\nimport fs, { type Stats } from 'fs'\nimport {\n WriteEntry,\n WriteEntrySync,\n WriteEntryTar,\n} from './write-entry.js'\n\nexport class PackJob {\n path: string\n absolute: string\n entry?: WriteEntry | WriteEntryTar\n stat?: Stats\n readdir?: string[]\n pending: boolean = false\n ignore: boolean = false\n piped: boolean = false\n constructor(path: string, absolute: string) {\n this.path = path || './'\n this.absolute = absolute\n }\n}\n\nimport { Minipass } from 'minipass'\nimport * as zlib from 'minizlib'\nimport { Yallist } from 'yallist'\nimport { ReadEntry } from './read-entry.js'\nimport {\n WarnEvent,\n warnMethod,\n type WarnData,\n type Warner,\n} from './warn-method.js'\n\nconst EOF = Buffer.alloc(1024)\nconst ONSTAT = Symbol('onStat')\nconst ENDED = Symbol('ended')\nconst QUEUE = Symbol('queue')\nconst CURRENT = Symbol('current')\nconst PROCESS = Symbol('process')\nconst PROCESSING = Symbol('processing')\nconst PROCESSJOB = Symbol('processJob')\nconst JOBS = Symbol('jobs')\nconst JOBDONE = Symbol('jobDone')\nconst ADDFSENTRY = Symbol('addFSEntry')\nconst ADDTARENTRY = Symbol('addTarEntry')\nconst STAT = Symbol('stat')\nconst READDIR = Symbol('readdir')\nconst ONREADDIR = Symbol('onreaddir')\nconst PIPE = Symbol('pipe')\nconst ENTRY = Symbol('entry')\nconst ENTRYOPT = Symbol('entryOpt')\nconst WRITEENTRYCLASS = Symbol('writeEntryClass')\nconst WRITE = Symbol('write')\nconst ONDRAIN = Symbol('ondrain')\n\nimport path from 'path'\nimport { normalizeWindowsPath } from './normalize-windows-path.js'\nimport { TarOptions } from './options.js'\n\nexport class Pack\n extends Minipass>\n implements Warner\n{\n opt: TarOptions\n cwd: string\n maxReadSize?: number\n preservePaths: boolean\n strict: boolean\n noPax: boolean\n prefix: string\n linkCache: Exclude\n statCache: Exclude\n file: string\n portable: boolean\n zip?: zlib.BrotliCompress | zlib.Gzip\n readdirCache: Exclude\n noDirRecurse: boolean\n follow: boolean\n noMtime: boolean\n mtime?: Date\n filter: Exclude\n jobs: number;\n\n [WRITEENTRYCLASS]: typeof WriteEntry | typeof WriteEntrySync\n onWriteEntry?: (entry: WriteEntry) => void;\n [QUEUE]: Yallist;\n [JOBS]: number = 0;\n [PROCESSING]: boolean = false;\n [ENDED]: boolean = false\n\n constructor(opt: TarOptions = {}) {\n //@ts-ignore\n super()\n this.opt = opt\n this.file = opt.file || ''\n this.cwd = opt.cwd || process.cwd()\n this.maxReadSize = opt.maxReadSize\n this.preservePaths = !!opt.preservePaths\n this.strict = !!opt.strict\n this.noPax = !!opt.noPax\n this.prefix = normalizeWindowsPath(opt.prefix || '')\n this.linkCache = opt.linkCache || new Map()\n this.statCache = opt.statCache || new Map()\n this.readdirCache = opt.readdirCache || new Map()\n this.onWriteEntry = opt.onWriteEntry\n\n this[WRITEENTRYCLASS] = WriteEntry\n if (typeof opt.onwarn === 'function') {\n this.on('warn', opt.onwarn)\n }\n\n this.portable = !!opt.portable\n\n if (opt.gzip || opt.brotli) {\n if (opt.gzip && opt.brotli) {\n throw new TypeError('gzip and brotli are mutually exclusive')\n }\n if (opt.gzip) {\n if (typeof opt.gzip !== 'object') {\n opt.gzip = {}\n }\n if (this.portable) {\n opt.gzip.portable = true\n }\n this.zip = new zlib.Gzip(opt.gzip)\n }\n if (opt.brotli) {\n if (typeof opt.brotli !== 'object') {\n opt.brotli = {}\n }\n this.zip = new zlib.BrotliCompress(opt.brotli)\n }\n /* c8 ignore next */\n if (!this.zip) throw new Error('impossible')\n const zip = this.zip\n zip.on('data', chunk => super.write(chunk as unknown as string))\n zip.on('end', () => super.end())\n zip.on('drain', () => this[ONDRAIN]())\n this.on('resume', () => zip.resume())\n } else {\n this.on('drain', this[ONDRAIN])\n }\n\n this.noDirRecurse = !!opt.noDirRecurse\n this.follow = !!opt.follow\n this.noMtime = !!opt.noMtime\n if (opt.mtime) this.mtime = opt.mtime\n\n this.filter =\n typeof opt.filter === 'function' ? opt.filter : () => true\n\n this[QUEUE] = new Yallist()\n this[JOBS] = 0\n this.jobs = Number(opt.jobs) || 4\n this[PROCESSING] = false\n this[ENDED] = false\n }\n\n [WRITE](chunk: Buffer) {\n return super.write(chunk as unknown as string)\n }\n\n add(path: string | ReadEntry) {\n this.write(path)\n return this\n }\n\n end(cb?: () => void): this\n end(path: string | ReadEntry, cb?: () => void): this\n end(\n path: string | ReadEntry,\n encoding?: Minipass.Encoding,\n cb?: () => void,\n ): this\n end(\n path?: string | ReadEntry | (() => void),\n encoding?: Minipass.Encoding | (() => void),\n cb?: () => void,\n ) {\n /* c8 ignore start */\n if (typeof path === 'function') {\n cb = path\n path = undefined\n }\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n /* c8 ignore stop */\n if (path) {\n this.add(path)\n }\n this[ENDED] = true\n this[PROCESS]()\n /* c8 ignore next */\n if (cb) cb()\n return this\n }\n\n write(path: string | ReadEntry) {\n if (this[ENDED]) {\n throw new Error('write after end')\n }\n\n if (path instanceof ReadEntry) {\n this[ADDTARENTRY](path)\n } else {\n this[ADDFSENTRY](path)\n }\n return this.flowing\n }\n\n [ADDTARENTRY](p: ReadEntry) {\n const absolute = normalizeWindowsPath(\n path.resolve(this.cwd, p.path),\n )\n // in this case, we don't have to wait for the stat\n if (!this.filter(p.path, p)) {\n p.resume()\n } else {\n const job = new PackJob(p.path, absolute)\n job.entry = new WriteEntryTar(p, this[ENTRYOPT](job))\n job.entry.on('end', () => this[JOBDONE](job))\n this[JOBS] += 1\n this[QUEUE].push(job)\n }\n\n this[PROCESS]()\n }\n\n [ADDFSENTRY](p: string) {\n const absolute = normalizeWindowsPath(path.resolve(this.cwd, p))\n this[QUEUE].push(new PackJob(p, absolute))\n this[PROCESS]()\n }\n\n [STAT](job: PackJob) {\n job.pending = true\n this[JOBS] += 1\n const stat = this.follow ? 'stat' : 'lstat'\n fs[stat](job.absolute, (er, stat) => {\n job.pending = false\n this[JOBS] -= 1\n if (er) {\n this.emit('error', er)\n } else {\n this[ONSTAT](job, stat)\n }\n })\n }\n\n [ONSTAT](job: PackJob, stat: Stats) {\n this.statCache.set(job.absolute, stat)\n job.stat = stat\n\n // now we have the stat, we can filter it.\n if (!this.filter(job.path, stat)) {\n job.ignore = true\n }\n\n this[PROCESS]()\n }\n\n [READDIR](job: PackJob) {\n job.pending = true\n this[JOBS] += 1\n fs.readdir(job.absolute, (er, entries) => {\n job.pending = false\n this[JOBS] -= 1\n if (er) {\n return this.emit('error', er)\n }\n this[ONREADDIR](job, entries)\n })\n }\n\n [ONREADDIR](job: PackJob, entries: string[]) {\n this.readdirCache.set(job.absolute, entries)\n job.readdir = entries\n this[PROCESS]()\n }\n\n [PROCESS]() {\n if (this[PROCESSING]) {\n return\n }\n\n this[PROCESSING] = true\n for (\n let w = this[QUEUE].head;\n !!w && this[JOBS] < this.jobs;\n w = w.next\n ) {\n this[PROCESSJOB](w.value)\n if (w.value.ignore) {\n const p = w.next\n this[QUEUE].removeNode(w)\n w.next = p\n }\n }\n\n this[PROCESSING] = false\n\n if (this[ENDED] && !this[QUEUE].length && this[JOBS] === 0) {\n if (this.zip) {\n this.zip.end(EOF)\n } else {\n super.write(EOF as unknown as string)\n super.end()\n }\n }\n }\n\n get [CURRENT]() {\n return this[QUEUE] && this[QUEUE].head && this[QUEUE].head.value\n }\n\n [JOBDONE](_job: PackJob) {\n this[QUEUE].shift()\n this[JOBS] -= 1\n this[PROCESS]()\n }\n\n [PROCESSJOB](job: PackJob) {\n if (job.pending) {\n return\n }\n\n if (job.entry) {\n if (job === this[CURRENT] && !job.piped) {\n this[PIPE](job)\n }\n return\n }\n\n if (!job.stat) {\n const sc = this.statCache.get(job.absolute)\n if (sc) {\n this[ONSTAT](job, sc)\n } else {\n this[STAT](job)\n }\n }\n if (!job.stat) {\n return\n }\n\n // filtered out!\n if (job.ignore) {\n return\n }\n\n if (\n !this.noDirRecurse &&\n job.stat.isDirectory() &&\n !job.readdir\n ) {\n const rc = this.readdirCache.get(job.absolute)\n if (rc) {\n this[ONREADDIR](job, rc)\n } else {\n this[READDIR](job)\n }\n if (!job.readdir) {\n return\n }\n }\n\n // we know it doesn't have an entry, because that got checked above\n job.entry = this[ENTRY](job)\n if (!job.entry) {\n job.ignore = true\n return\n }\n\n if (job === this[CURRENT] && !job.piped) {\n this[PIPE](job)\n }\n }\n\n [ENTRYOPT](job: PackJob): TarOptions {\n return {\n onwarn: (code, msg, data) => this.warn(code, msg, data),\n noPax: this.noPax,\n cwd: this.cwd,\n absolute: job.absolute,\n preservePaths: this.preservePaths,\n maxReadSize: this.maxReadSize,\n strict: this.strict,\n portable: this.portable,\n linkCache: this.linkCache,\n statCache: this.statCache,\n noMtime: this.noMtime,\n mtime: this.mtime,\n prefix: this.prefix,\n onWriteEntry: this.onWriteEntry,\n }\n }\n\n [ENTRY](job: PackJob) {\n this[JOBS] += 1\n try {\n const e = new this[WRITEENTRYCLASS](\n job.path,\n this[ENTRYOPT](job),\n )\n return e\n .on('end', () => this[JOBDONE](job))\n .on('error', er => this.emit('error', er))\n } catch (er) {\n this.emit('error', er)\n }\n }\n\n [ONDRAIN]() {\n if (this[CURRENT] && this[CURRENT].entry) {\n this[CURRENT].entry.resume()\n }\n }\n\n // like .pipe() but using super, because our write() is special\n [PIPE](job: PackJob) {\n job.piped = true\n\n if (job.readdir) {\n job.readdir.forEach(entry => {\n const p = job.path\n const base = p === './' ? '' : p.replace(/\\/*$/, '/')\n this[ADDFSENTRY](base + entry)\n })\n }\n\n const source = job.entry\n const zip = this.zip\n /* c8 ignore start */\n if (!source) throw new Error('cannot pipe without source')\n /* c8 ignore stop */\n\n if (zip) {\n source.on('data', chunk => {\n if (!zip.write(chunk)) {\n source.pause()\n }\n })\n } else {\n source.on('data', chunk => {\n if (!super.write(chunk as unknown as string)) {\n source.pause()\n }\n })\n }\n }\n\n pause() {\n if (this.zip) {\n this.zip.pause()\n }\n return super.pause()\n }\n warn(\n code: string,\n message: string | Error,\n data: WarnData = {},\n ): void {\n warnMethod(this, code, message, data)\n }\n}\n\nexport class PackSync extends Pack {\n sync: true = true\n constructor(opt: TarOptions) {\n super(opt)\n this[WRITEENTRYCLASS] = WriteEntrySync\n }\n\n // pause/resume are no-ops in sync streams.\n pause() {}\n resume() {}\n\n [STAT](job: PackJob) {\n const stat = this.follow ? 'statSync' : 'lstatSync'\n this[ONSTAT](job, fs[stat](job.absolute))\n }\n\n [READDIR](job: PackJob) {\n this[ONREADDIR](job, fs.readdirSync(job.absolute))\n }\n\n // gotta get it all in this tick\n [PIPE](job: PackJob) {\n const source = job.entry\n const zip = this.zip\n\n if (job.readdir) {\n job.readdir.forEach(entry => {\n const p = job.path\n const base = p === './' ? '' : p.replace(/\\/*$/, '/')\n this[ADDFSENTRY](base + entry)\n })\n }\n\n /* c8 ignore start */\n if (!source) throw new Error('Cannot pipe without source')\n /* c8 ignore stop */\n\n if (zip) {\n source.on('data', chunk => {\n zip.write(chunk)\n })\n } else {\n source.on('data', chunk => {\n super[WRITE](chunk)\n })\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/package.json b/node_modules/tar/dist/esm/package.json new file mode 100644 index 0000000..3dbc1ca --- /dev/null +++ b/node_modules/tar/dist/esm/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/node_modules/tar/dist/esm/parse.d.ts b/node_modules/tar/dist/esm/parse.d.ts new file mode 100644 index 0000000..e871ff7 --- /dev/null +++ b/node_modules/tar/dist/esm/parse.d.ts @@ -0,0 +1,87 @@ +/// +/// +import { EventEmitter as EE } from 'events'; +import { BrotliDecompress, Unzip } from 'minizlib'; +import { Yallist } from 'yallist'; +import { TarOptions } from './options.js'; +import { Pax } from './pax.js'; +import { ReadEntry } from './read-entry.js'; +import { type WarnData, type Warner } from './warn-method.js'; +declare const STATE: unique symbol; +declare const WRITEENTRY: unique symbol; +declare const READENTRY: unique symbol; +declare const NEXTENTRY: unique symbol; +declare const PROCESSENTRY: unique symbol; +declare const EX: unique symbol; +declare const GEX: unique symbol; +declare const META: unique symbol; +declare const EMITMETA: unique symbol; +declare const BUFFER: unique symbol; +declare const QUEUE: unique symbol; +declare const ENDED: unique symbol; +declare const EMITTEDEND: unique symbol; +declare const EMIT: unique symbol; +declare const UNZIP: unique symbol; +declare const CONSUMECHUNK: unique symbol; +declare const CONSUMECHUNKSUB: unique symbol; +declare const CONSUMEBODY: unique symbol; +declare const CONSUMEMETA: unique symbol; +declare const CONSUMEHEADER: unique symbol; +declare const CONSUMING: unique symbol; +declare const BUFFERCONCAT: unique symbol; +declare const MAYBEEND: unique symbol; +declare const WRITING: unique symbol; +declare const ABORTED: unique symbol; +declare const SAW_VALID_ENTRY: unique symbol; +declare const SAW_NULL_BLOCK: unique symbol; +declare const SAW_EOF: unique symbol; +declare const CLOSESTREAM: unique symbol; +export type State = 'begin' | 'header' | 'ignore' | 'meta' | 'body'; +export declare class Parser extends EE implements Warner { + file: string; + strict: boolean; + maxMetaEntrySize: number; + filter: Exclude; + brotli?: TarOptions['brotli']; + writable: true; + readable: false; + [QUEUE]: Yallist; + [BUFFER]?: Buffer; + [READENTRY]?: ReadEntry; + [WRITEENTRY]?: ReadEntry; + [STATE]: State; + [META]: string; + [EX]?: Pax; + [GEX]?: Pax; + [ENDED]: boolean; + [UNZIP]?: false | Unzip | BrotliDecompress; + [ABORTED]: boolean; + [SAW_VALID_ENTRY]?: boolean; + [SAW_NULL_BLOCK]: boolean; + [SAW_EOF]: boolean; + [WRITING]: boolean; + [CONSUMING]: boolean; + [EMITTEDEND]: boolean; + constructor(opt?: TarOptions); + warn(code: string, message: string | Error, data?: WarnData): void; + [CONSUMEHEADER](chunk: Buffer, position: number): void; + [CLOSESTREAM](): void; + [PROCESSENTRY](entry?: ReadEntry | [string | symbol, any, any]): boolean; + [NEXTENTRY](): void; + [CONSUMEBODY](chunk: Buffer, position: number): number; + [CONSUMEMETA](chunk: Buffer, position: number): number; + [EMIT](ev: string | symbol, data?: any, extra?: any): void; + [EMITMETA](entry: ReadEntry): void; + abort(error: Error): void; + write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; + write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean; + [BUFFERCONCAT](c: Buffer): void; + [MAYBEEND](): void; + [CONSUMECHUNK](chunk?: Buffer): void; + [CONSUMECHUNKSUB](chunk: Buffer): void; + end(cb?: () => void): this; + end(data: string | Buffer, cb?: () => void): this; + end(str: string, encoding?: BufferEncoding, cb?: () => void): this; +} +export {}; +//# sourceMappingURL=parse.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/parse.d.ts.map b/node_modules/tar/dist/esm/parse.d.ts.map new file mode 100644 index 0000000..7d8ff6b --- /dev/null +++ b/node_modules/tar/dist/esm/parse.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/parse.ts"],"names":[],"mappings":";;AAoBA,OAAO,EAAE,YAAY,IAAI,EAAE,EAAE,MAAM,QAAQ,CAAA;AAC3C,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAEL,KAAK,QAAQ,EACb,KAAK,MAAM,EACZ,MAAM,kBAAkB,CAAA;AAKzB,QAAA,MAAM,KAAK,eAAkB,CAAA;AAC7B,QAAA,MAAM,UAAU,eAAuB,CAAA;AACvC,QAAA,MAAM,SAAS,eAAsB,CAAA;AACrC,QAAA,MAAM,SAAS,eAAsB,CAAA;AACrC,QAAA,MAAM,YAAY,eAAyB,CAAA;AAC3C,QAAA,MAAM,EAAE,eAA2B,CAAA;AACnC,QAAA,MAAM,GAAG,eAAiC,CAAA;AAC1C,QAAA,MAAM,IAAI,eAAiB,CAAA;AAC3B,QAAA,MAAM,QAAQ,eAAqB,CAAA;AACnC,QAAA,MAAM,MAAM,eAAmB,CAAA;AAC/B,QAAA,MAAM,KAAK,eAAkB,CAAA;AAC7B,QAAA,MAAM,KAAK,eAAkB,CAAA;AAC7B,QAAA,MAAM,UAAU,eAAuB,CAAA;AACvC,QAAA,MAAM,IAAI,eAAiB,CAAA;AAC3B,QAAA,MAAM,KAAK,eAAkB,CAAA;AAC7B,QAAA,MAAM,YAAY,eAAyB,CAAA;AAC3C,QAAA,MAAM,eAAe,eAA4B,CAAA;AACjD,QA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C,KAAK,EAAE,KAAK;IAOlB,KAAK,CACH,MAAM,EAAE,UAAU,GAAG,MAAM,EAC3B,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,KAAK,IAAI,GAChC,OAAO;IACV,KAAK,CACH,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,cAAc,EACzB,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,KAAK,IAAI,GAChC,OAAO;IA6HV,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,MAAM;IAOxB,CAAC,QAAQ,CAAC;IA0BV,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,EAAE,MAAM;IAkC7B,CAAC,eAAe,CAAC,CAAC,KAAK,EAAE,MAAM;IA6C/B,GAAG,CAAC,EAAE,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;IAC1B,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;IACjD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,cAAc,EAAE,EAAE,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;CAmCnE"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/parse.js b/node_modules/tar/dist/esm/parse.js new file mode 100644 index 0000000..cce4304 --- /dev/null +++ b/node_modules/tar/dist/esm/parse.js @@ -0,0 +1,595 @@ +// this[BUFFER] is the remainder of a chunk if we're waiting for +// the full 512 bytes of a header to come in. We will Buffer.concat() +// it to the next write(), which is a mem copy, but a small one. +// +// this[QUEUE] is a Yallist of entries that haven't been emitted +// yet this can only get filled up if the user keeps write()ing after +// a write() returns false, or does a write() with more than one entry +// +// We don't buffer chunks, we always parse them and either create an +// entry, or push it into the active entry. The ReadEntry class knows +// to throw data away if .ignore=true +// +// Shift entry off the buffer when it emits 'end', and emit 'entry' for +// the next one in the list. +// +// At any time, we're pushing body chunks into the entry at WRITEENTRY, +// and waiting for 'end' on the entry at READENTRY +// +// ignored entries get .resume() called on them straight away +import { EventEmitter as EE } from 'events'; +import { BrotliDecompress, Unzip } from 'minizlib'; +import { Yallist } from 'yallist'; +import { Header } from './header.js'; +import { Pax } from './pax.js'; +import { ReadEntry } from './read-entry.js'; +import { warnMethod, } from './warn-method.js'; +const maxMetaEntrySize = 1024 * 1024; +const gzipHeader = Buffer.from([0x1f, 0x8b]); +const STATE = Symbol('state'); +const WRITEENTRY = Symbol('writeEntry'); +const READENTRY = Symbol('readEntry'); +const NEXTENTRY = Symbol('nextEntry'); +const PROCESSENTRY = Symbol('processEntry'); +const EX = Symbol('extendedHeader'); +const GEX = Symbol('globalExtendedHeader'); +const META = Symbol('meta'); +const EMITMETA = Symbol('emitMeta'); +const BUFFER = Symbol('buffer'); +const QUEUE = Symbol('queue'); +const ENDED = Symbol('ended'); +const EMITTEDEND = Symbol('emittedEnd'); +const EMIT = Symbol('emit'); +const UNZIP = Symbol('unzip'); +const CONSUMECHUNK = Symbol('consumeChunk'); +const CONSUMECHUNKSUB = Symbol('consumeChunkSub'); +const CONSUMEBODY = Symbol('consumeBody'); +const CONSUMEMETA = Symbol('consumeMeta'); +const CONSUMEHEADER = Symbol('consumeHeader'); +const CONSUMING = Symbol('consuming'); +const BUFFERCONCAT = Symbol('bufferConcat'); +const MAYBEEND = Symbol('maybeEnd'); +const WRITING = Symbol('writing'); +const ABORTED = Symbol('aborted'); +const DONE = Symbol('onDone'); +const SAW_VALID_ENTRY = Symbol('sawValidEntry'); +const SAW_NULL_BLOCK = Symbol('sawNullBlock'); +const SAW_EOF = Symbol('sawEOF'); +const CLOSESTREAM = Symbol('closeStream'); +const noop = () => true; +export class Parser extends EE { + file; + strict; + maxMetaEntrySize; + filter; + brotli; + writable = true; + readable = false; + [QUEUE] = new Yallist(); + [BUFFER]; + [READENTRY]; + [WRITEENTRY]; + [STATE] = 'begin'; + [META] = ''; + [EX]; + [GEX]; + [ENDED] = false; + [UNZIP]; + [ABORTED] = false; + [SAW_VALID_ENTRY]; + [SAW_NULL_BLOCK] = false; + [SAW_EOF] = false; + [WRITING] = false; + [CONSUMING] = false; + [EMITTEDEND] = false; + constructor(opt = {}) { + super(); + this.file = opt.file || ''; + // these BADARCHIVE errors can't be detected early. listen on DONE. + this.on(DONE, () => { + if (this[STATE] === 'begin' || + this[SAW_VALID_ENTRY] === false) { + // either less than 1 block of data, or all entries were invalid. + // Either way, probably not even a tarball. + this.warn('TAR_BAD_ARCHIVE', 'Unrecognized archive format'); + } + }); + if (opt.ondone) { + this.on(DONE, opt.ondone); + } + else { + this.on(DONE, () => { + this.emit('prefinish'); + this.emit('finish'); + this.emit('end'); + }); + } + this.strict = !!opt.strict; + this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize; + this.filter = typeof opt.filter === 'function' ? opt.filter : noop; + // Unlike gzip, brotli doesn't have any magic bytes to identify it + // Users need to explicitly tell us they're extracting a brotli file + // Or we infer from the file extension + const isTBR = opt.file && + (opt.file.endsWith('.tar.br') || opt.file.endsWith('.tbr')); + // if it's a tbr file it MIGHT be brotli, but we don't know until + // we look at it and verify it's not a valid tar file. + this.brotli = + !opt.gzip && opt.brotli !== undefined ? opt.brotli + : isTBR ? undefined + : false; + // have to set this so that streams are ok piping into it + this.on('end', () => this[CLOSESTREAM]()); + if (typeof opt.onwarn === 'function') { + this.on('warn', opt.onwarn); + } + if (typeof opt.onReadEntry === 'function') { + this.on('entry', opt.onReadEntry); + } + } + warn(code, message, data = {}) { + warnMethod(this, code, message, data); + } + [CONSUMEHEADER](chunk, position) { + if (this[SAW_VALID_ENTRY] === undefined) { + this[SAW_VALID_ENTRY] = false; + } + let header; + try { + header = new Header(chunk, position, this[EX], this[GEX]); + } + catch (er) { + return this.warn('TAR_ENTRY_INVALID', er); + } + if (header.nullBlock) { + if (this[SAW_NULL_BLOCK]) { + this[SAW_EOF] = true; + // ending an archive with no entries. pointless, but legal. + if (this[STATE] === 'begin') { + this[STATE] = 'header'; + } + this[EMIT]('eof'); + } + else { + this[SAW_NULL_BLOCK] = true; + this[EMIT]('nullBlock'); + } + } + else { + this[SAW_NULL_BLOCK] = false; + if (!header.cksumValid) { + this.warn('TAR_ENTRY_INVALID', 'checksum failure', { header }); + } + else if (!header.path) { + this.warn('TAR_ENTRY_INVALID', 'path is required', { header }); + } + else { + const type = header.type; + if (/^(Symbolic)?Link$/.test(type) && !header.linkpath) { + this.warn('TAR_ENTRY_INVALID', 'linkpath required', { + header, + }); + } + else if (!/^(Symbolic)?Link$/.test(type) && + !/^(Global)?ExtendedHeader$/.test(type) && + header.linkpath) { + this.warn('TAR_ENTRY_INVALID', 'linkpath forbidden', { + header, + }); + } + else { + const entry = (this[WRITEENTRY] = new ReadEntry(header, this[EX], this[GEX])); + // we do this for meta & ignored entries as well, because they + // are still valid tar, or else we wouldn't know to ignore them + if (!this[SAW_VALID_ENTRY]) { + if (entry.remain) { + // this might be the one! + const onend = () => { + if (!entry.invalid) { + this[SAW_VALID_ENTRY] = true; + } + }; + entry.on('end', onend); + } + else { + this[SAW_VALID_ENTRY] = true; + } + } + if (entry.meta) { + if (entry.size > this.maxMetaEntrySize) { + entry.ignore = true; + this[EMIT]('ignoredEntry', entry); + this[STATE] = 'ignore'; + entry.resume(); + } + else if (entry.size > 0) { + this[META] = ''; + entry.on('data', c => (this[META] += c)); + this[STATE] = 'meta'; + } + } + else { + this[EX] = undefined; + entry.ignore = + entry.ignore || !this.filter(entry.path, entry); + if (entry.ignore) { + // probably valid, just not something we care about + this[EMIT]('ignoredEntry', entry); + this[STATE] = entry.remain ? 'ignore' : 'header'; + entry.resume(); + } + else { + if (entry.remain) { + this[STATE] = 'body'; + } + else { + this[STATE] = 'header'; + entry.end(); + } + if (!this[READENTRY]) { + this[QUEUE].push(entry); + this[NEXTENTRY](); + } + else { + this[QUEUE].push(entry); + } + } + } + } + } + } + } + [CLOSESTREAM]() { + queueMicrotask(() => this.emit('close')); + } + [PROCESSENTRY](entry) { + let go = true; + if (!entry) { + this[READENTRY] = undefined; + go = false; + } + else if (Array.isArray(entry)) { + const [ev, ...args] = entry; + this.emit(ev, ...args); + } + else { + this[READENTRY] = entry; + this.emit('entry', entry); + if (!entry.emittedEnd) { + entry.on('end', () => this[NEXTENTRY]()); + go = false; + } + } + return go; + } + [NEXTENTRY]() { + do { } while (this[PROCESSENTRY](this[QUEUE].shift())); + if (!this[QUEUE].length) { + // At this point, there's nothing in the queue, but we may have an + // entry which is being consumed (readEntry). + // If we don't, then we definitely can handle more data. + // If we do, and either it's flowing, or it has never had any data + // written to it, then it needs more. + // The only other possibility is that it has returned false from a + // write() call, so we wait for the next drain to continue. + const re = this[READENTRY]; + const drainNow = !re || re.flowing || re.size === re.remain; + if (drainNow) { + if (!this[WRITING]) { + this.emit('drain'); + } + } + else { + re.once('drain', () => this.emit('drain')); + } + } + } + [CONSUMEBODY](chunk, position) { + // write up to but no more than writeEntry.blockRemain + const entry = this[WRITEENTRY]; + /* c8 ignore start */ + if (!entry) { + throw new Error('attempt to consume body without entry??'); + } + const br = entry.blockRemain ?? 0; + /* c8 ignore stop */ + const c = br >= chunk.length && position === 0 ? + chunk + : chunk.subarray(position, position + br); + entry.write(c); + if (!entry.blockRemain) { + this[STATE] = 'header'; + this[WRITEENTRY] = undefined; + entry.end(); + } + return c.length; + } + [CONSUMEMETA](chunk, position) { + const entry = this[WRITEENTRY]; + const ret = this[CONSUMEBODY](chunk, position); + // if we finished, then the entry is reset + if (!this[WRITEENTRY] && entry) { + this[EMITMETA](entry); + } + return ret; + } + [EMIT](ev, data, extra) { + if (!this[QUEUE].length && !this[READENTRY]) { + this.emit(ev, data, extra); + } + else { + this[QUEUE].push([ev, data, extra]); + } + } + [EMITMETA](entry) { + this[EMIT]('meta', this[META]); + switch (entry.type) { + case 'ExtendedHeader': + case 'OldExtendedHeader': + this[EX] = Pax.parse(this[META], this[EX], false); + break; + case 'GlobalExtendedHeader': + this[GEX] = Pax.parse(this[META], this[GEX], true); + break; + case 'NextFileHasLongPath': + case 'OldGnuLongPath': { + const ex = this[EX] ?? Object.create(null); + this[EX] = ex; + ex.path = this[META].replace(/\0.*/, ''); + break; + } + case 'NextFileHasLongLinkpath': { + const ex = this[EX] || Object.create(null); + this[EX] = ex; + ex.linkpath = this[META].replace(/\0.*/, ''); + break; + } + /* c8 ignore start */ + default: + throw new Error('unknown meta: ' + entry.type); + /* c8 ignore stop */ + } + } + abort(error) { + this[ABORTED] = true; + this.emit('abort', error); + // always throws, even in non-strict mode + this.warn('TAR_ABORT', error, { recoverable: false }); + } + write(chunk, encoding, cb) { + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + if (typeof chunk === 'string') { + chunk = Buffer.from(chunk, + /* c8 ignore next */ + typeof encoding === 'string' ? encoding : 'utf8'); + } + if (this[ABORTED]) { + /* c8 ignore next */ + cb?.(); + return false; + } + // first write, might be gzipped + const needSniff = this[UNZIP] === undefined || + (this.brotli === undefined && this[UNZIP] === false); + if (needSniff && chunk) { + if (this[BUFFER]) { + chunk = Buffer.concat([this[BUFFER], chunk]); + this[BUFFER] = undefined; + } + if (chunk.length < gzipHeader.length) { + this[BUFFER] = chunk; + /* c8 ignore next */ + cb?.(); + return true; + } + // look for gzip header + for (let i = 0; this[UNZIP] === undefined && i < gzipHeader.length; i++) { + if (chunk[i] !== gzipHeader[i]) { + this[UNZIP] = false; + } + } + const maybeBrotli = this.brotli === undefined; + if (this[UNZIP] === false && maybeBrotli) { + // read the first header to see if it's a valid tar file. If so, + // we can safely assume that it's not actually brotli, despite the + // .tbr or .tar.br file extension. + // if we ended before getting a full chunk, yes, def brotli + if (chunk.length < 512) { + if (this[ENDED]) { + this.brotli = true; + } + else { + this[BUFFER] = chunk; + /* c8 ignore next */ + cb?.(); + return true; + } + } + else { + // if it's tar, it's pretty reliably not brotli, chances of + // that happening are astronomical. + try { + new Header(chunk.subarray(0, 512)); + this.brotli = false; + } + catch (_) { + this.brotli = true; + } + } + } + if (this[UNZIP] === undefined || + (this[UNZIP] === false && this.brotli)) { + const ended = this[ENDED]; + this[ENDED] = false; + this[UNZIP] = + this[UNZIP] === undefined ? + new Unzip({}) + : new BrotliDecompress({}); + this[UNZIP].on('data', chunk => this[CONSUMECHUNK](chunk)); + this[UNZIP].on('error', er => this.abort(er)); + this[UNZIP].on('end', () => { + this[ENDED] = true; + this[CONSUMECHUNK](); + }); + this[WRITING] = true; + const ret = !!this[UNZIP][ended ? 'end' : 'write'](chunk); + this[WRITING] = false; + cb?.(); + return ret; + } + } + this[WRITING] = true; + if (this[UNZIP]) { + this[UNZIP].write(chunk); + } + else { + this[CONSUMECHUNK](chunk); + } + this[WRITING] = false; + // return false if there's a queue, or if the current entry isn't flowing + const ret = this[QUEUE].length ? false + : this[READENTRY] ? this[READENTRY].flowing + : true; + // if we have no queue, then that means a clogged READENTRY + if (!ret && !this[QUEUE].length) { + this[READENTRY]?.once('drain', () => this.emit('drain')); + } + /* c8 ignore next */ + cb?.(); + return ret; + } + [BUFFERCONCAT](c) { + if (c && !this[ABORTED]) { + this[BUFFER] = + this[BUFFER] ? Buffer.concat([this[BUFFER], c]) : c; + } + } + [MAYBEEND]() { + if (this[ENDED] && + !this[EMITTEDEND] && + !this[ABORTED] && + !this[CONSUMING]) { + this[EMITTEDEND] = true; + const entry = this[WRITEENTRY]; + if (entry && entry.blockRemain) { + // truncated, likely a damaged file + const have = this[BUFFER] ? this[BUFFER].length : 0; + this.warn('TAR_BAD_ARCHIVE', `Truncated input (needed ${entry.blockRemain} more bytes, only ${have} available)`, { entry }); + if (this[BUFFER]) { + entry.write(this[BUFFER]); + } + entry.end(); + } + this[EMIT](DONE); + } + } + [CONSUMECHUNK](chunk) { + if (this[CONSUMING] && chunk) { + this[BUFFERCONCAT](chunk); + } + else if (!chunk && !this[BUFFER]) { + this[MAYBEEND](); + } + else if (chunk) { + this[CONSUMING] = true; + if (this[BUFFER]) { + this[BUFFERCONCAT](chunk); + const c = this[BUFFER]; + this[BUFFER] = undefined; + this[CONSUMECHUNKSUB](c); + } + else { + this[CONSUMECHUNKSUB](chunk); + } + while (this[BUFFER] && + this[BUFFER]?.length >= 512 && + !this[ABORTED] && + !this[SAW_EOF]) { + const c = this[BUFFER]; + this[BUFFER] = undefined; + this[CONSUMECHUNKSUB](c); + } + this[CONSUMING] = false; + } + if (!this[BUFFER] || this[ENDED]) { + this[MAYBEEND](); + } + } + [CONSUMECHUNKSUB](chunk) { + // we know that we are in CONSUMING mode, so anything written goes into + // the buffer. Advance the position and put any remainder in the buffer. + let position = 0; + const length = chunk.length; + while (position + 512 <= length && + !this[ABORTED] && + !this[SAW_EOF]) { + switch (this[STATE]) { + case 'begin': + case 'header': + this[CONSUMEHEADER](chunk, position); + position += 512; + break; + case 'ignore': + case 'body': + position += this[CONSUMEBODY](chunk, position); + break; + case 'meta': + position += this[CONSUMEMETA](chunk, position); + break; + /* c8 ignore start */ + default: + throw new Error('invalid state: ' + this[STATE]); + /* c8 ignore stop */ + } + } + if (position < length) { + if (this[BUFFER]) { + this[BUFFER] = Buffer.concat([ + chunk.subarray(position), + this[BUFFER], + ]); + } + else { + this[BUFFER] = chunk.subarray(position); + } + } + } + end(chunk, encoding, cb) { + if (typeof chunk === 'function') { + cb = chunk; + encoding = undefined; + chunk = undefined; + } + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + if (typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding); + } + if (cb) + this.once('finish', cb); + if (!this[ABORTED]) { + if (this[UNZIP]) { + /* c8 ignore start */ + if (chunk) + this[UNZIP].write(chunk); + /* c8 ignore stop */ + this[UNZIP].end(); + } + else { + this[ENDED] = true; + if (this.brotli === undefined) + chunk = chunk || Buffer.alloc(0); + if (chunk) + this.write(chunk); + this[MAYBEEND](); + } + } + return this; + } +} +//# sourceMappingURL=parse.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/parse.js.map b/node_modules/tar/dist/esm/parse.js.map new file mode 100644 index 0000000..07d716d --- /dev/null +++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AClB,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS;oBAC3B,KAAK,GAAG,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;gBAClC,IAAI,KAAK;oBAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;gBAC5B,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAA;YAClB,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC;CACF","sourcesContent":["// this[BUFFER] is the remainder of a chunk if we're waiting for\n// the full 512 bytes of a header to come in. We will Buffer.concat()\n// it to the next write(), which is a mem copy, but a small one.\n//\n// this[QUEUE] is a Yallist of entries that haven't been emitted\n// yet this can only get filled up if the user keeps write()ing after\n// a write() returns false, or does a write() with more than one entry\n//\n// We don't buffer chunks, we always parse them and either create an\n// entry, or push it into the active entry. The ReadEntry class knows\n// to throw data away if .ignore=true\n//\n// Shift entry off the buffer when it emits 'end', and emit 'entry' for\n// the next one in the list.\n//\n// At any time, we're pushing body chunks into the entry at WRITEENTRY,\n// and waiting for 'end' on the entry at READENTRY\n//\n// ignored entries get .resume() called on them straight away\n\nimport { EventEmitter as EE } from 'events'\nimport { BrotliDecompress, Unzip } from 'minizlib'\nimport { Yallist } from 'yallist'\nimport { Header } from './header.js'\nimport { TarOptions } from './options.js'\nimport { Pax } from './pax.js'\nimport { ReadEntry } from './read-entry.js'\nimport {\n warnMethod,\n type WarnData,\n type Warner,\n} from './warn-method.js'\n\nconst maxMetaEntrySize = 1024 * 1024\nconst gzipHeader = Buffer.from([0x1f, 0x8b])\n\nconst STATE = Symbol('state')\nconst WRITEENTRY = Symbol('writeEntry')\nconst READENTRY = Symbol('readEntry')\nconst NEXTENTRY = Symbol('nextEntry')\nconst PROCESSENTRY = Symbol('processEntry')\nconst EX = Symbol('extendedHeader')\nconst GEX = Symbol('globalExtendedHeader')\nconst META = Symbol('meta')\nconst EMITMETA = Symbol('emitMeta')\nconst BUFFER = Symbol('buffer')\nconst QUEUE = Symbol('queue')\nconst ENDED = Symbol('ended')\nconst EMITTEDEND = Symbol('emittedEnd')\nconst EMIT = Symbol('emit')\nconst UNZIP = Symbol('unzip')\nconst CONSUMECHUNK = Symbol('consumeChunk')\nconst CONSUMECHUNKSUB = Symbol('consumeChunkSub')\nconst CONSUMEBODY = Symbol('consumeBody')\nconst CONSUMEMETA = Symbol('consumeMeta')\nconst CONSUMEHEADER = Symbol('consumeHeader')\nconst CONSUMING = Symbol('consuming')\nconst BUFFERCONCAT = Symbol('bufferConcat')\nconst MAYBEEND = Symbol('maybeEnd')\nconst WRITING = Symbol('writing')\nconst ABORTED = Symbol('aborted')\nconst DONE = Symbol('onDone')\nconst SAW_VALID_ENTRY = Symbol('sawValidEntry')\nconst SAW_NULL_BLOCK = Symbol('sawNullBlock')\nconst SAW_EOF = Symbol('sawEOF')\nconst CLOSESTREAM = Symbol('closeStream')\n\nconst noop = () => true\n\nexport type State = 'begin' | 'header' | 'ignore' | 'meta' | 'body'\n\nexport class Parser extends EE implements Warner {\n file: string\n strict: boolean\n maxMetaEntrySize: number\n filter: Exclude\n brotli?: TarOptions['brotli']\n\n writable: true = true\n readable: false = false;\n\n [QUEUE]: Yallist =\n new Yallist();\n [BUFFER]?: Buffer;\n [READENTRY]?: ReadEntry;\n [WRITEENTRY]?: ReadEntry;\n [STATE]: State = 'begin';\n [META]: string = '';\n [EX]?: Pax;\n [GEX]?: Pax;\n [ENDED]: boolean = false;\n [UNZIP]?: false | Unzip | BrotliDecompress;\n [ABORTED]: boolean = false;\n [SAW_VALID_ENTRY]?: boolean;\n [SAW_NULL_BLOCK]: boolean = false;\n [SAW_EOF]: boolean = false;\n [WRITING]: boolean = false;\n [CONSUMING]: boolean = false;\n [EMITTEDEND]: boolean = false\n\n constructor(opt: TarOptions = {}) {\n super()\n\n this.file = opt.file || ''\n\n // these BADARCHIVE errors can't be detected early. listen on DONE.\n this.on(DONE, () => {\n if (\n this[STATE] === 'begin' ||\n this[SAW_VALID_ENTRY] === false\n ) {\n // either less than 1 block of data, or all entries were invalid.\n // Either way, probably not even a tarball.\n this.warn('TAR_BAD_ARCHIVE', 'Unrecognized archive format')\n }\n })\n\n if (opt.ondone) {\n this.on(DONE, opt.ondone)\n } else {\n this.on(DONE, () => {\n this.emit('prefinish')\n this.emit('finish')\n this.emit('end')\n })\n }\n\n this.strict = !!opt.strict\n this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize\n this.filter = typeof opt.filter === 'function' ? opt.filter : noop\n // Unlike gzip, brotli doesn't have any magic bytes to identify it\n // Users need to explicitly tell us they're extracting a brotli file\n // Or we infer from the file extension\n const isTBR =\n opt.file &&\n (opt.file.endsWith('.tar.br') || opt.file.endsWith('.tbr'))\n // if it's a tbr file it MIGHT be brotli, but we don't know until\n // we look at it and verify it's not a valid tar file.\n this.brotli =\n !opt.gzip && opt.brotli !== undefined ? opt.brotli\n : isTBR ? undefined\n : false\n\n // have to set this so that streams are ok piping into it\n this.on('end', () => this[CLOSESTREAM]())\n\n if (typeof opt.onwarn === 'function') {\n this.on('warn', opt.onwarn)\n }\n if (typeof opt.onReadEntry === 'function') {\n this.on('entry', opt.onReadEntry)\n }\n }\n\n warn(\n code: string,\n message: string | Error,\n data: WarnData = {},\n ): void {\n warnMethod(this, code, message, data)\n }\n\n [CONSUMEHEADER](chunk: Buffer, position: number) {\n if (this[SAW_VALID_ENTRY] === undefined) {\n this[SAW_VALID_ENTRY] = false\n }\n let header\n try {\n header = new Header(chunk, position, this[EX], this[GEX])\n } catch (er) {\n return this.warn('TAR_ENTRY_INVALID', er as Error)\n }\n\n if (header.nullBlock) {\n if (this[SAW_NULL_BLOCK]) {\n this[SAW_EOF] = true\n // ending an archive with no entries. pointless, but legal.\n if (this[STATE] === 'begin') {\n this[STATE] = 'header'\n }\n this[EMIT]('eof')\n } else {\n this[SAW_NULL_BLOCK] = true\n this[EMIT]('nullBlock')\n }\n } else {\n this[SAW_NULL_BLOCK] = false\n if (!header.cksumValid) {\n this.warn('TAR_ENTRY_INVALID', 'checksum failure', { header })\n } else if (!header.path) {\n this.warn('TAR_ENTRY_INVALID', 'path is required', { header })\n } else {\n const type = header.type\n if (/^(Symbolic)?Link$/.test(type) && !header.linkpath) {\n this.warn('TAR_ENTRY_INVALID', 'linkpath required', {\n header,\n })\n } else if (\n !/^(Symbolic)?Link$/.test(type) &&\n !/^(Global)?ExtendedHeader$/.test(type) &&\n header.linkpath\n ) {\n this.warn('TAR_ENTRY_INVALID', 'linkpath forbidden', {\n header,\n })\n } else {\n const entry = (this[WRITEENTRY] = new ReadEntry(\n header,\n this[EX],\n this[GEX],\n ))\n\n // we do this for meta & ignored entries as well, because they\n // are still valid tar, or else we wouldn't know to ignore them\n if (!this[SAW_VALID_ENTRY]) {\n if (entry.remain) {\n // this might be the one!\n const onend = () => {\n if (!entry.invalid) {\n this[SAW_VALID_ENTRY] = true\n }\n }\n entry.on('end', onend)\n } else {\n this[SAW_VALID_ENTRY] = true\n }\n }\n\n if (entry.meta) {\n if (entry.size > this.maxMetaEntrySize) {\n entry.ignore = true\n this[EMIT]('ignoredEntry', entry)\n this[STATE] = 'ignore'\n entry.resume()\n } else if (entry.size > 0) {\n this[META] = ''\n entry.on('data', c => (this[META] += c))\n this[STATE] = 'meta'\n }\n } else {\n this[EX] = undefined\n entry.ignore =\n entry.ignore || !this.filter(entry.path, entry)\n\n if (entry.ignore) {\n // probably valid, just not something we care about\n this[EMIT]('ignoredEntry', entry)\n this[STATE] = entry.remain ? 'ignore' : 'header'\n entry.resume()\n } else {\n if (entry.remain) {\n this[STATE] = 'body'\n } else {\n this[STATE] = 'header'\n entry.end()\n }\n\n if (!this[READENTRY]) {\n this[QUEUE].push(entry)\n this[NEXTENTRY]()\n } else {\n this[QUEUE].push(entry)\n }\n }\n }\n }\n }\n }\n }\n\n [CLOSESTREAM]() {\n queueMicrotask(() => this.emit('close'))\n }\n\n [PROCESSENTRY](entry?: ReadEntry | [string | symbol, any, any]) {\n let go = true\n\n if (!entry) {\n this[READENTRY] = undefined\n go = false\n } else if (Array.isArray(entry)) {\n const [ev, ...args]: [string | symbol, any, any] = entry\n this.emit(ev, ...args)\n } else {\n this[READENTRY] = entry\n this.emit('entry', entry)\n if (!entry.emittedEnd) {\n entry.on('end', () => this[NEXTENTRY]())\n go = false\n }\n }\n\n return go\n }\n\n [NEXTENTRY]() {\n do {} while (this[PROCESSENTRY](this[QUEUE].shift()))\n\n if (!this[QUEUE].length) {\n // At this point, there's nothing in the queue, but we may have an\n // entry which is being consumed (readEntry).\n // If we don't, then we definitely can handle more data.\n // If we do, and either it's flowing, or it has never had any data\n // written to it, then it needs more.\n // The only other possibility is that it has returned false from a\n // write() call, so we wait for the next drain to continue.\n const re = this[READENTRY]\n const drainNow = !re || re.flowing || re.size === re.remain\n if (drainNow) {\n if (!this[WRITING]) {\n this.emit('drain')\n }\n } else {\n re.once('drain', () => this.emit('drain'))\n }\n }\n }\n\n [CONSUMEBODY](chunk: Buffer, position: number) {\n // write up to but no more than writeEntry.blockRemain\n const entry = this[WRITEENTRY]\n /* c8 ignore start */\n if (!entry) {\n throw new Error('attempt to consume body without entry??')\n }\n const br = entry.blockRemain ?? 0\n /* c8 ignore stop */\n const c =\n br >= chunk.length && position === 0 ?\n chunk\n : chunk.subarray(position, position + br)\n\n entry.write(c)\n\n if (!entry.blockRemain) {\n this[STATE] = 'header'\n this[WRITEENTRY] = undefined\n entry.end()\n }\n\n return c.length\n }\n\n [CONSUMEMETA](chunk: Buffer, position: number) {\n const entry = this[WRITEENTRY]\n const ret = this[CONSUMEBODY](chunk, position)\n\n // if we finished, then the entry is reset\n if (!this[WRITEENTRY] && entry) {\n this[EMITMETA](entry)\n }\n\n return ret\n }\n\n [EMIT](ev: string | symbol, data?: any, extra?: any) {\n if (!this[QUEUE].length && !this[READENTRY]) {\n this.emit(ev, data, extra)\n } else {\n this[QUEUE].push([ev, data, extra])\n }\n }\n\n [EMITMETA](entry: ReadEntry) {\n this[EMIT]('meta', this[META])\n switch (entry.type) {\n case 'ExtendedHeader':\n case 'OldExtendedHeader':\n this[EX] = Pax.parse(this[META], this[EX], false)\n break\n\n case 'GlobalExtendedHeader':\n this[GEX] = Pax.parse(this[META], this[GEX], true)\n break\n\n case 'NextFileHasLongPath':\n case 'OldGnuLongPath': {\n const ex = this[EX] ?? Object.create(null)\n this[EX] = ex\n ex.path = this[META].replace(/\\0.*/, '')\n break\n }\n\n case 'NextFileHasLongLinkpath': {\n const ex = this[EX] || Object.create(null)\n this[EX] = ex\n ex.linkpath = this[META].replace(/\\0.*/, '')\n break\n }\n\n /* c8 ignore start */\n default:\n throw new Error('unknown meta: ' + entry.type)\n /* c8 ignore stop */\n }\n }\n\n abort(error: Error) {\n this[ABORTED] = true\n this.emit('abort', error)\n // always throws, even in non-strict mode\n this.warn('TAR_ABORT', error, { recoverable: false })\n }\n\n write(\n buffer: Uint8Array | string,\n cb?: (err?: Error | null) => void,\n ): boolean\n write(\n str: string,\n encoding?: BufferEncoding,\n cb?: (err?: Error | null) => void,\n ): boolean\n write(\n chunk: Buffer | string,\n encoding?: BufferEncoding | (() => any),\n cb?: () => any,\n ): boolean {\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(\n chunk,\n /* c8 ignore next */\n typeof encoding === 'string' ? encoding : 'utf8',\n )\n }\n if (this[ABORTED]) {\n /* c8 ignore next */\n cb?.()\n return false\n }\n\n // first write, might be gzipped\n const needSniff =\n this[UNZIP] === undefined ||\n (this.brotli === undefined && this[UNZIP] === false)\n if (needSniff && chunk) {\n if (this[BUFFER]) {\n chunk = Buffer.concat([this[BUFFER], chunk])\n this[BUFFER] = undefined\n }\n if (chunk.length < gzipHeader.length) {\n this[BUFFER] = chunk\n /* c8 ignore next */\n cb?.()\n return true\n }\n\n // look for gzip header\n for (\n let i = 0;\n this[UNZIP] === undefined && i < gzipHeader.length;\n i++\n ) {\n if (chunk[i] !== gzipHeader[i]) {\n this[UNZIP] = false\n }\n }\n\n const maybeBrotli = this.brotli === undefined\n if (this[UNZIP] === false && maybeBrotli) {\n // read the first header to see if it's a valid tar file. If so,\n // we can safely assume that it's not actually brotli, despite the\n // .tbr or .tar.br file extension.\n // if we ended before getting a full chunk, yes, def brotli\n if (chunk.length < 512) {\n if (this[ENDED]) {\n this.brotli = true\n } else {\n this[BUFFER] = chunk\n /* c8 ignore next */\n cb?.()\n return true\n }\n } else {\n // if it's tar, it's pretty reliably not brotli, chances of\n // that happening are astronomical.\n try {\n new Header(chunk.subarray(0, 512))\n this.brotli = false\n } catch (_) {\n this.brotli = true\n }\n }\n }\n\n if (\n this[UNZIP] === undefined ||\n (this[UNZIP] === false && this.brotli)\n ) {\n const ended = this[ENDED]\n this[ENDED] = false\n this[UNZIP] =\n this[UNZIP] === undefined ?\n new Unzip({})\n : new BrotliDecompress({})\n this[UNZIP].on('data', chunk => this[CONSUMECHUNK](chunk))\n this[UNZIP].on('error', er => this.abort(er as Error))\n this[UNZIP].on('end', () => {\n this[ENDED] = true\n this[CONSUMECHUNK]()\n })\n this[WRITING] = true\n const ret = !!this[UNZIP][ended ? 'end' : 'write'](chunk)\n this[WRITING] = false\n cb?.()\n return ret\n }\n }\n\n this[WRITING] = true\n if (this[UNZIP]) {\n this[UNZIP].write(chunk)\n } else {\n this[CONSUMECHUNK](chunk)\n }\n this[WRITING] = false\n\n // return false if there's a queue, or if the current entry isn't flowing\n const ret =\n this[QUEUE].length ? false\n : this[READENTRY] ? this[READENTRY].flowing\n : true\n\n // if we have no queue, then that means a clogged READENTRY\n if (!ret && !this[QUEUE].length) {\n this[READENTRY]?.once('drain', () => this.emit('drain'))\n }\n\n /* c8 ignore next */\n cb?.()\n return ret\n }\n\n [BUFFERCONCAT](c: Buffer) {\n if (c && !this[ABORTED]) {\n this[BUFFER] =\n this[BUFFER] ? Buffer.concat([this[BUFFER], c]) : c\n }\n }\n\n [MAYBEEND]() {\n if (\n this[ENDED] &&\n !this[EMITTEDEND] &&\n !this[ABORTED] &&\n !this[CONSUMING]\n ) {\n this[EMITTEDEND] = true\n const entry = this[WRITEENTRY]\n if (entry && entry.blockRemain) {\n // truncated, likely a damaged file\n const have = this[BUFFER] ? this[BUFFER].length : 0\n this.warn(\n 'TAR_BAD_ARCHIVE',\n `Truncated input (needed ${entry.blockRemain} more bytes, only ${have} available)`,\n { entry },\n )\n if (this[BUFFER]) {\n entry.write(this[BUFFER])\n }\n entry.end()\n }\n this[EMIT](DONE)\n }\n }\n\n [CONSUMECHUNK](chunk?: Buffer) {\n if (this[CONSUMING] && chunk) {\n this[BUFFERCONCAT](chunk)\n } else if (!chunk && !this[BUFFER]) {\n this[MAYBEEND]()\n } else if (chunk) {\n this[CONSUMING] = true\n if (this[BUFFER]) {\n this[BUFFERCONCAT](chunk)\n const c = this[BUFFER]\n this[BUFFER] = undefined\n this[CONSUMECHUNKSUB](c)\n } else {\n this[CONSUMECHUNKSUB](chunk)\n }\n\n while (\n this[BUFFER] &&\n (this[BUFFER] as Buffer)?.length >= 512 &&\n !this[ABORTED] &&\n !this[SAW_EOF]\n ) {\n const c = this[BUFFER]\n this[BUFFER] = undefined\n this[CONSUMECHUNKSUB](c)\n }\n this[CONSUMING] = false\n }\n\n if (!this[BUFFER] || this[ENDED]) {\n this[MAYBEEND]()\n }\n }\n\n [CONSUMECHUNKSUB](chunk: Buffer) {\n // we know that we are in CONSUMING mode, so anything written goes into\n // the buffer. Advance the position and put any remainder in the buffer.\n let position = 0\n const length = chunk.length\n while (\n position + 512 <= length &&\n !this[ABORTED] &&\n !this[SAW_EOF]\n ) {\n switch (this[STATE]) {\n case 'begin':\n case 'header':\n this[CONSUMEHEADER](chunk, position)\n position += 512\n break\n\n case 'ignore':\n case 'body':\n position += this[CONSUMEBODY](chunk, position)\n break\n\n case 'meta':\n position += this[CONSUMEMETA](chunk, position)\n break\n\n /* c8 ignore start */\n default:\n throw new Error('invalid state: ' + this[STATE])\n /* c8 ignore stop */\n }\n }\n\n if (position < length) {\n if (this[BUFFER]) {\n this[BUFFER] = Buffer.concat([\n chunk.subarray(position),\n this[BUFFER],\n ])\n } else {\n this[BUFFER] = chunk.subarray(position)\n }\n }\n }\n\n end(cb?: () => void): this\n end(data: string | Buffer, cb?: () => void): this\n end(str: string, encoding?: BufferEncoding, cb?: () => void): this\n end(\n chunk?: string | Buffer | (() => void),\n encoding?: BufferEncoding | (() => void),\n cb?: () => void,\n ) {\n if (typeof chunk === 'function') {\n cb = chunk\n encoding = undefined\n chunk = undefined\n }\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding)\n }\n if (cb) this.once('finish', cb)\n if (!this[ABORTED]) {\n if (this[UNZIP]) {\n /* c8 ignore start */\n if (chunk) this[UNZIP].write(chunk)\n /* c8 ignore stop */\n this[UNZIP].end()\n } else {\n this[ENDED] = true\n if (this.brotli === undefined)\n chunk = chunk || Buffer.alloc(0)\n if (chunk) this.write(chunk)\n this[MAYBEEND]()\n }\n }\n return this\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/path-reservations.d.ts b/node_modules/tar/dist/esm/path-reservations.d.ts new file mode 100644 index 0000000..44f0482 --- /dev/null +++ b/node_modules/tar/dist/esm/path-reservations.d.ts @@ -0,0 +1,11 @@ +export type Reservation = { + paths: string[]; + dirs: Set; +}; +export type Handler = (clear: () => void) => void; +export declare class PathReservations { + #private; + reserve(paths: string[], fn: Handler): boolean; + check(fn: Handler): boolean; +} +//# sourceMappingURL=path-reservations.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/path-reservations.d.ts.map b/node_modules/tar/dist/esm/path-reservations.d.ts.map new file mode 100644 index 0000000..2763014 --- /dev/null +++ b/node_modules/tar/dist/esm/path-reservations.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"path-reservations.d.ts","sourceRoot":"","sources":["../../src/path-reservations.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,MAAM,IAAI,KAAK,IAAI,CAAA;AAmBjD,qBAAa,gBAAgB;;IAY3B,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,OAAO;IAgEpC,KAAK,CAAC,EAAE,EAAE,OAAO;CA8ElB"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/path-reservations.js b/node_modules/tar/dist/esm/path-reservations.js new file mode 100644 index 0000000..e63b9c9 --- /dev/null +++ b/node_modules/tar/dist/esm/path-reservations.js @@ -0,0 +1,166 @@ +// A path exclusive reservation system +// reserve([list, of, paths], fn) +// When the fn is first in line for all its paths, it +// is called with a cb that clears the reservation. +// +// Used by async unpack to avoid clobbering paths in use, +// while still allowing maximal safe parallelization. +import { join } from 'node:path'; +import { normalizeUnicode } from './normalize-unicode.js'; +import { stripTrailingSlashes } from './strip-trailing-slashes.js'; +const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform; +const isWindows = platform === 'win32'; +// return a set of parent dirs for a given path +// '/a/b/c/d' -> ['/', '/a', '/a/b', '/a/b/c', '/a/b/c/d'] +const getDirs = (path) => { + const dirs = path + .split('/') + .slice(0, -1) + .reduce((set, path) => { + const s = set[set.length - 1]; + if (s !== undefined) { + path = join(s, path); + } + set.push(path || '/'); + return set; + }, []); + return dirs; +}; +export class PathReservations { + // path => [function or Set] + // A Set object means a directory reservation + // A fn is a direct reservation on that path + #queues = new Map(); + // fn => {paths:[path,...], dirs:[path, ...]} + #reservations = new Map(); + // functions currently running + #running = new Set(); + reserve(paths, fn) { + paths = + isWindows ? + ['win32 parallelization disabled'] + : paths.map(p => { + // don't need normPath, because we skip this entirely for windows + return stripTrailingSlashes(join(normalizeUnicode(p))).toLowerCase(); + }); + const dirs = new Set(paths.map(path => getDirs(path)).reduce((a, b) => a.concat(b))); + this.#reservations.set(fn, { dirs, paths }); + for (const p of paths) { + const q = this.#queues.get(p); + if (!q) { + this.#queues.set(p, [fn]); + } + else { + q.push(fn); + } + } + for (const dir of dirs) { + const q = this.#queues.get(dir); + if (!q) { + this.#queues.set(dir, [new Set([fn])]); + } + else { + const l = q[q.length - 1]; + if (l instanceof Set) { + l.add(fn); + } + else { + q.push(new Set([fn])); + } + } + } + return this.#run(fn); + } + // return the queues for each path the function cares about + // fn => {paths, dirs} + #getQueues(fn) { + const res = this.#reservations.get(fn); + /* c8 ignore start */ + if (!res) { + throw new Error('function does not have any path reservations'); + } + /* c8 ignore stop */ + return { + paths: res.paths.map((path) => this.#queues.get(path)), + dirs: [...res.dirs].map(path => this.#queues.get(path)), + }; + } + // check if fn is first in line for all its paths, and is + // included in the first set for all its dir queues + check(fn) { + const { paths, dirs } = this.#getQueues(fn); + return (paths.every(q => q && q[0] === fn) && + dirs.every(q => q && q[0] instanceof Set && q[0].has(fn))); + } + // run the function if it's first in line and not already running + #run(fn) { + if (this.#running.has(fn) || !this.check(fn)) { + return false; + } + this.#running.add(fn); + fn(() => this.#clear(fn)); + return true; + } + #clear(fn) { + if (!this.#running.has(fn)) { + return false; + } + const res = this.#reservations.get(fn); + /* c8 ignore start */ + if (!res) { + throw new Error('invalid reservation'); + } + /* c8 ignore stop */ + const { paths, dirs } = res; + const next = new Set(); + for (const path of paths) { + const q = this.#queues.get(path); + /* c8 ignore start */ + if (!q || q?.[0] !== fn) { + continue; + } + /* c8 ignore stop */ + const q0 = q[1]; + if (!q0) { + this.#queues.delete(path); + continue; + } + q.shift(); + if (typeof q0 === 'function') { + next.add(q0); + } + else { + for (const f of q0) { + next.add(f); + } + } + } + for (const dir of dirs) { + const q = this.#queues.get(dir); + const q0 = q?.[0]; + /* c8 ignore next - type safety only */ + if (!q || !(q0 instanceof Set)) + continue; + if (q0.size === 1 && q.length === 1) { + this.#queues.delete(dir); + continue; + } + else if (q0.size === 1) { + q.shift(); + // next one must be a function, + // or else the Set would've been reused + const n = q[0]; + if (typeof n === 'function') { + next.add(n); + } + } + else { + q0.delete(fn); + } + } + this.#running.delete(fn); + next.forEach(fn => this.#run(fn)); + return true; + } +} +//# sourceMappingURL=path-reservations.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/path-reservations.js.map b/node_modules/tar/dist/esm/path-reservations.js.map new file mode 100644 index 0000000..66f54b2 --- /dev/null +++ b/node_modules/tar/dist/esm/path-reservations.js.map @@ -0,0 +1 @@ +{"version":3,"file":"path-reservations.js","sourceRoot":"","sources":["../../src/path-reservations.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,iCAAiC;AACjC,qDAAqD;AACrD,mDAAmD;AACnD,EAAE;AACF,yDAAyD;AACzD,qDAAqD;AAErD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAElE,MAAM,QAAQ,GACZ,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,OAAO,CAAC,QAAQ,CAAA;AAC3D,MAAM,SAAS,GAAG,QAAQ,KAAK,OAAO,CAAA;AAStC,+CAA+C;AAC/C,0DAA0D;AAC1D,MAAM,OAAO,GAAG,CAAC,IAAY,EAAE,EAAE;IAC/B,MAAM,IAAI,GAAG,IAAI;SACd,KAAK,CAAC,GAAG,CAAC;SACV,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SACZ,MAAM,CAAC,CAAC,GAAa,EAAE,IAAI,EAAE,EAAE;QAC9B,MAAM,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;QAC7B,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;YACpB,IAAI,GAAG,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;QACtB,CAAC;QACD,GAAG,CAAC,IA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CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACpC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;gBACxB,SAAQ;YACV,CAAC;iBAAM,IAAI,EAAE,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;gBACzB,CAAC,CAAC,KAAK,EAAE,CAAA;gBACT,+BAA+B;gBAC/B,uCAAuC;gBACvC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;gBACd,IAAI,OAAO,CAAC,KAAK,UAAU,EAAE,CAAC;oBAC5B,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;gBACb,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;YACf,CAAC;QACH,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;QACxB,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAA;QACjC,OAAO,IAAI,CAAA;IACb,CAAC;CACF","sourcesContent":["// A path exclusive reservation system\n// reserve([list, of, paths], fn)\n// When the fn is first in line for all its paths, it\n// is called with a cb that clears the reservation.\n//\n// Used by async unpack to avoid clobbering paths in use,\n// while still allowing maximal safe parallelization.\n\nimport { join } from 'node:path'\nimport { normalizeUnicode } from './normalize-unicode.js'\nimport { stripTrailingSlashes } from './strip-trailing-slashes.js'\n\nconst platform =\n process.env.TESTING_TAR_FAKE_PLATFORM || process.platform\nconst isWindows = platform === 'win32'\n\nexport type Reservation = {\n paths: string[]\n dirs: Set\n}\n\nexport type Handler = (clear: () => void) => void\n\n// return a set of parent dirs for a given path\n// '/a/b/c/d' -> ['/', '/a', '/a/b', '/a/b/c', '/a/b/c/d']\nconst getDirs = (path: string) => {\n const dirs = path\n .split('/')\n .slice(0, -1)\n .reduce((set: string[], path) => {\n const s = set[set.length - 1]\n if (s !== undefined) {\n path = join(s, path)\n }\n set.push(path || '/')\n return set\n }, [])\n return dirs\n}\n\nexport class PathReservations {\n // path => [function or Set]\n // A Set object means a directory reservation\n // A fn is a direct reservation on that path\n #queues = new Map)[]>()\n\n // fn => {paths:[path,...], dirs:[path, ...]}\n #reservations = new Map()\n\n // functions currently running\n #running = new Set()\n\n reserve(paths: string[], fn: Handler) {\n paths =\n isWindows ?\n ['win32 parallelization disabled']\n : paths.map(p => {\n // don't need normPath, because we skip this entirely for windows\n return stripTrailingSlashes(\n join(normalizeUnicode(p)),\n ).toLowerCase()\n })\n\n const dirs = new Set(\n paths.map(path => getDirs(path)).reduce((a, b) => a.concat(b)),\n )\n this.#reservations.set(fn, { dirs, paths })\n for (const p of paths) {\n const q = this.#queues.get(p)\n if (!q) {\n this.#queues.set(p, [fn])\n } else {\n q.push(fn)\n }\n }\n for (const dir of dirs) {\n const q = this.#queues.get(dir)\n if (!q) {\n this.#queues.set(dir, [new Set([fn])])\n } else {\n const l = q[q.length - 1]\n if (l instanceof Set) {\n l.add(fn)\n } else {\n q.push(new Set([fn]))\n }\n }\n }\n return this.#run(fn)\n }\n\n // return the queues for each path the function cares about\n // fn => {paths, dirs}\n #getQueues(fn: Handler): {\n paths: Handler[][]\n dirs: (Handler | Set)[][]\n } {\n const res = this.#reservations.get(fn)\n /* c8 ignore start */\n if (!res) {\n throw new Error('function does not have any path reservations')\n }\n /* c8 ignore stop */\n return {\n paths: res.paths.map((path: string) =>\n this.#queues.get(path),\n ) as Handler[][],\n dirs: [...res.dirs].map(path => this.#queues.get(path)) as (\n | Handler\n | Set\n )[][],\n }\n }\n\n // check if fn is first in line for all its paths, and is\n // included in the first set for all its dir queues\n check(fn: Handler) {\n const { paths, dirs } = this.#getQueues(fn)\n return (\n paths.every(q => q && q[0] === fn) &&\n dirs.every(q => q && q[0] instanceof Set && q[0].has(fn))\n )\n }\n\n // run the function if it's first in line and not already running\n #run(fn: Handler) {\n if (this.#running.has(fn) || !this.check(fn)) {\n return false\n }\n this.#running.add(fn)\n fn(() => this.#clear(fn))\n return true\n }\n\n #clear(fn: Handler) {\n if (!this.#running.has(fn)) {\n return false\n }\n const res = this.#reservations.get(fn)\n /* c8 ignore start */\n if (!res) {\n throw new Error('invalid reservation')\n }\n /* c8 ignore stop */\n const { paths, dirs } = res\n\n const next = new Set()\n for (const path of paths) {\n const q = this.#queues.get(path)\n /* c8 ignore start */\n if (!q || q?.[0] !== fn) {\n continue\n }\n /* c8 ignore stop */\n const q0 = q[1]\n if (!q0) {\n this.#queues.delete(path)\n continue\n }\n q.shift()\n if (typeof q0 === 'function') {\n next.add(q0)\n } else {\n for (const f of q0) {\n next.add(f)\n }\n }\n }\n\n for (const dir of dirs) {\n const q = this.#queues.get(dir)\n const q0 = q?.[0]\n /* c8 ignore next - type safety only */\n if (!q || !(q0 instanceof Set)) continue\n if (q0.size === 1 && q.length === 1) {\n this.#queues.delete(dir)\n continue\n } else if (q0.size === 1) {\n q.shift()\n // next one must be a function,\n // or else the Set would've been reused\n const n = q[0]\n if (typeof n === 'function') {\n next.add(n)\n }\n } else {\n q0.delete(fn)\n }\n }\n\n this.#running.delete(fn)\n next.forEach(fn => this.#run(fn))\n return true\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/pax.d.ts b/node_modules/tar/dist/esm/pax.d.ts new file mode 100644 index 0000000..6749558 --- /dev/null +++ b/node_modules/tar/dist/esm/pax.d.ts @@ -0,0 +1,27 @@ +/// +import { HeaderData } from './header.js'; +export declare class Pax implements HeaderData { + atime?: Date; + mtime?: Date; + ctime?: Date; + charset?: string; + comment?: string; + gid?: number; + uid?: number; + gname?: string; + uname?: string; + linkpath?: string; + dev?: number; + ino?: number; + nlink?: number; + path?: string; + size?: number; + mode?: number; + global: boolean; + constructor(obj: HeaderData, global?: boolean); + encode(): Buffer; + encodeBody(): string; + encodeField(field: keyof Pax): string; + static parse(str: string, ex?: HeaderData, g?: boolean): Pax; +} +//# sourceMappingURL=pax.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/pax.d.ts.map b/node_modules/tar/dist/esm/pax.d.ts.map new file mode 100644 index 0000000..803755c --- /dev/null +++ b/node_modules/tar/dist/esm/pax.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pax.d.ts","sourceRoot":"","sources":["../../src/pax.ts"],"names":[],"mappings":";AACA,OAAO,EAAU,UAAU,EAAE,MAAM,aAAa,CAAA;AAEhD,qBAAa,GAAI,YAAW,UAAU;IACpC,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IAEZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,MAAM,EAAE,OAAO,CAAA;gBAEH,GAAG,EAAE,UAAU,EAAE,MAAM,GAAE,OAAe;IAmBpD,MAAM;IAiDN,UAAU;IAoBV,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,MAAM;IA2BrC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,GAAE,OAAe;CAG9D"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/pax.js b/node_modules/tar/dist/esm/pax.js new file mode 100644 index 0000000..832808f --- /dev/null +++ b/node_modules/tar/dist/esm/pax.js @@ -0,0 +1,154 @@ +import { basename } from 'node:path'; +import { Header } from './header.js'; +export class Pax { + atime; + mtime; + ctime; + charset; + comment; + gid; + uid; + gname; + uname; + linkpath; + dev; + ino; + nlink; + path; + size; + mode; + global; + constructor(obj, global = false) { + this.atime = obj.atime; + this.charset = obj.charset; + this.comment = obj.comment; + this.ctime = obj.ctime; + this.dev = obj.dev; + this.gid = obj.gid; + this.global = global; + this.gname = obj.gname; + this.ino = obj.ino; + this.linkpath = obj.linkpath; + this.mtime = obj.mtime; + this.nlink = obj.nlink; + this.path = obj.path; + this.size = obj.size; + this.uid = obj.uid; + this.uname = obj.uname; + } + encode() { + const body = this.encodeBody(); + if (body === '') { + return Buffer.allocUnsafe(0); + } + const bodyLen = Buffer.byteLength(body); + // round up to 512 bytes + // add 512 for header + const bufLen = 512 * Math.ceil(1 + bodyLen / 512); + const buf = Buffer.allocUnsafe(bufLen); + // 0-fill the header section, it might not hit every field + for (let i = 0; i < 512; i++) { + buf[i] = 0; + } + new Header({ + // XXX split the path + // then the path should be PaxHeader + basename, but less than 99, + // prepend with the dirname + /* c8 ignore start */ + path: ('PaxHeader/' + basename(this.path ?? '')).slice(0, 99), + /* c8 ignore stop */ + mode: this.mode || 0o644, + uid: this.uid, + gid: this.gid, + size: bodyLen, + mtime: this.mtime, + type: this.global ? 'GlobalExtendedHeader' : 'ExtendedHeader', + linkpath: '', + uname: this.uname || '', + gname: this.gname || '', + devmaj: 0, + devmin: 0, + atime: this.atime, + ctime: this.ctime, + }).encode(buf); + buf.write(body, 512, bodyLen, 'utf8'); + // null pad after the body + for (let i = bodyLen + 512; i < buf.length; i++) { + buf[i] = 0; + } + return buf; + } + encodeBody() { + return (this.encodeField('path') + + this.encodeField('ctime') + + this.encodeField('atime') + + this.encodeField('dev') + + this.encodeField('ino') + + this.encodeField('nlink') + + this.encodeField('charset') + + this.encodeField('comment') + + this.encodeField('gid') + + this.encodeField('gname') + + this.encodeField('linkpath') + + this.encodeField('mtime') + + this.encodeField('size') + + this.encodeField('uid') + + this.encodeField('uname')); + } + encodeField(field) { + if (this[field] === undefined) { + return ''; + } + const r = this[field]; + const v = r instanceof Date ? r.getTime() / 1000 : r; + const s = ' ' + + (field === 'dev' || field === 'ino' || field === 'nlink' ? + 'SCHILY.' + : '') + + field + + '=' + + v + + '\n'; + const byteLen = Buffer.byteLength(s); + // the digits includes the length of the digits in ascii base-10 + // so if it's 9 characters, then adding 1 for the 9 makes it 10 + // which makes it 11 chars. + let digits = Math.floor(Math.log(byteLen) / Math.log(10)) + 1; + if (byteLen + digits >= Math.pow(10, digits)) { + digits += 1; + } + const len = digits + byteLen; + return len + s; + } + static parse(str, ex, g = false) { + return new Pax(merge(parseKV(str), ex), g); + } +} +const merge = (a, b) => b ? Object.assign({}, b, a) : a; +const parseKV = (str) => str + .replace(/\n$/, '') + .split('\n') + .reduce(parseKVLine, Object.create(null)); +const parseKVLine = (set, line) => { + const n = parseInt(line, 10); + // XXX Values with \n in them will fail this. + // Refactor to not be a naive line-by-line parse. + if (n !== Buffer.byteLength(line) + 1) { + return set; + } + line = line.slice((n + ' ').length); + const kv = line.split('='); + const r = kv.shift(); + if (!r) { + return set; + } + const k = r.replace(/^SCHILY\.(dev|ino|nlink)/, '$1'); + const v = kv.join('='); + set[k] = + /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(k) ? + new Date(Number(v) * 1000) + : /^[0-9]+$/.test(v) ? +v + : v; + return set; +}; +//# sourceMappingURL=pax.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/pax.js.map b/node_modules/tar/dist/esm/pax.js.map new file mode 100644 index 0000000..ae71361 --- /dev/null +++ b/node_modules/tar/dist/esm/pax.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pax.js","sourceRoot":"","sources":["../../src/pax.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,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CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACzB,CAAC,CAAC,CAAC,CAAA;IACL,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA","sourcesContent":["import { basename } from 'node:path'\nimport { Header, HeaderData } from './header.js'\n\nexport class Pax implements HeaderData {\n atime?: Date\n mtime?: Date\n ctime?: Date\n\n charset?: string\n comment?: string\n\n gid?: number\n uid?: number\n\n gname?: string\n uname?: string\n linkpath?: string\n dev?: number\n ino?: number\n nlink?: number\n path?: string\n size?: number\n mode?: number\n\n global: boolean\n\n constructor(obj: HeaderData, global: boolean = false) {\n this.atime = obj.atime\n this.charset = obj.charset\n this.comment = obj.comment\n this.ctime = obj.ctime\n this.dev = obj.dev\n this.gid = obj.gid\n this.global = global\n this.gname = obj.gname\n this.ino = obj.ino\n this.linkpath = obj.linkpath\n this.mtime = obj.mtime\n this.nlink = obj.nlink\n this.path = obj.path\n this.size = obj.size\n this.uid = obj.uid\n this.uname = obj.uname\n }\n\n encode() {\n const body = this.encodeBody()\n if (body === '') {\n return Buffer.allocUnsafe(0)\n }\n\n const bodyLen = Buffer.byteLength(body)\n // round up to 512 bytes\n // add 512 for header\n const bufLen = 512 * Math.ceil(1 + bodyLen / 512)\n const buf = Buffer.allocUnsafe(bufLen)\n\n // 0-fill the header section, it might not hit every field\n for (let i = 0; i < 512; i++) {\n buf[i] = 0\n }\n\n new Header({\n // XXX split the path\n // then the path should be PaxHeader + basename, but less than 99,\n // prepend with the dirname\n /* c8 ignore start */\n path: ('PaxHeader/' + basename(this.path ?? '')).slice(0, 99),\n /* c8 ignore stop */\n mode: this.mode || 0o644,\n uid: this.uid,\n gid: this.gid,\n size: bodyLen,\n mtime: this.mtime,\n type: this.global ? 'GlobalExtendedHeader' : 'ExtendedHeader',\n linkpath: '',\n uname: this.uname || '',\n gname: this.gname || '',\n devmaj: 0,\n devmin: 0,\n atime: this.atime,\n ctime: this.ctime,\n }).encode(buf)\n\n buf.write(body, 512, bodyLen, 'utf8')\n\n // null pad after the body\n for (let i = bodyLen + 512; i < buf.length; i++) {\n buf[i] = 0\n }\n\n return buf\n }\n\n encodeBody() {\n return (\n this.encodeField('path') +\n this.encodeField('ctime') +\n this.encodeField('atime') +\n this.encodeField('dev') +\n this.encodeField('ino') +\n this.encodeField('nlink') +\n this.encodeField('charset') +\n this.encodeField('comment') +\n this.encodeField('gid') +\n this.encodeField('gname') +\n this.encodeField('linkpath') +\n this.encodeField('mtime') +\n this.encodeField('size') +\n this.encodeField('uid') +\n this.encodeField('uname')\n )\n }\n\n encodeField(field: keyof Pax): string {\n if (this[field] === undefined) {\n return ''\n }\n const r = this[field]\n const v = r instanceof Date ? r.getTime() / 1000 : r\n const s =\n ' ' +\n (field === 'dev' || field === 'ino' || field === 'nlink' ?\n 'SCHILY.'\n : '') +\n field +\n '=' +\n v +\n '\\n'\n const byteLen = Buffer.byteLength(s)\n // the digits includes the length of the digits in ascii base-10\n // so if it's 9 characters, then adding 1 for the 9 makes it 10\n // which makes it 11 chars.\n let digits = Math.floor(Math.log(byteLen) / Math.log(10)) + 1\n if (byteLen + digits >= Math.pow(10, digits)) {\n digits += 1\n }\n const len = digits + byteLen\n return len + s\n }\n\n static parse(str: string, ex?: HeaderData, g: boolean = false) {\n return new Pax(merge(parseKV(str), ex), g)\n }\n}\n\nconst merge = (a: HeaderData, b?: HeaderData) =>\n b ? Object.assign({}, b, a) : a\n\nconst parseKV = (str: string) =>\n str\n .replace(/\\n$/, '')\n .split('\\n')\n .reduce(parseKVLine, Object.create(null))\n\nconst parseKVLine = (set: Record, line: string) => {\n const n = parseInt(line, 10)\n\n // XXX Values with \\n in them will fail this.\n // Refactor to not be a naive line-by-line parse.\n if (n !== Buffer.byteLength(line) + 1) {\n return set\n }\n\n line = line.slice((n + ' ').length)\n const kv = line.split('=')\n const r = kv.shift()\n\n if (!r) {\n return set\n }\n\n const k = r.replace(/^SCHILY\\.(dev|ino|nlink)/, '$1')\n\n const v = kv.join('=')\n set[k] =\n /^([A-Z]+\\.)?([mac]|birth|creation)time$/.test(k) ?\n new Date(Number(v) * 1000)\n : /^[0-9]+$/.test(v) ? +v\n : v\n return set\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/read-entry.d.ts b/node_modules/tar/dist/esm/read-entry.d.ts new file mode 100644 index 0000000..60a91cf --- /dev/null +++ b/node_modules/tar/dist/esm/read-entry.d.ts @@ -0,0 +1,37 @@ +/// +import { Minipass } from 'minipass'; +import { Header } from './header.js'; +import { Pax } from './pax.js'; +import { EntryTypeName } from './types.js'; +export declare class ReadEntry extends Minipass { + #private; + extended?: Pax; + globalExtended?: Pax; + header: Header; + startBlockSize: number; + blockRemain: number; + remain: number; + type: EntryTypeName; + meta: boolean; + ignore: boolean; + path: string; + mode?: number; + uid?: number; + gid?: number; + uname?: string; + gname?: string; + size: number; + mtime?: Date; + atime?: Date; + ctime?: Date; + linkpath?: string; + dev?: number; + ino?: number; + nlink?: number; + invalid: boolean; + absolute?: string; + unsupported: boolean; + constructor(header: Header, ex?: Pax, gex?: Pax); + write(data: Buffer): boolean; +} +//# sourceMappingURL=read-entry.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/read-entry.d.ts.map b/node_modules/tar/dist/esm/read-entry.d.ts.map new file mode 100644 index 0000000..b4ec30f --- /dev/null +++ b/node_modules/tar/dist/esm/read-entry.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"read-entry.d.ts","sourceRoot":"","sources":["../../src/read-entry.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE1C,qBAAa,SAAU,SAAQ,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;;IACrD,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,cAAc,CAAC,EAAE,GAAG,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,aAAa,CAAA;IACnB,IAAI,EAAE,OAAO,CAAQ;IACrB,MAAM,EAAE,OAAO,CAAQ;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAI;IAChB,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,OAAO,CAAQ;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,OAAO,CAAQ;gBAEhB,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG;IA+E/C,KAAK,CAAC,IAAI,EAAE,MAAM;CAyCnB"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/read-entry.js b/node_modules/tar/dist/esm/read-entry.js new file mode 100644 index 0000000..23cc673 --- /dev/null +++ b/node_modules/tar/dist/esm/read-entry.js @@ -0,0 +1,136 @@ +import { Minipass } from 'minipass'; +import { normalizeWindowsPath } from './normalize-windows-path.js'; +export class ReadEntry extends Minipass { + extended; + globalExtended; + header; + startBlockSize; + blockRemain; + remain; + type; + meta = false; + ignore = false; + path; + mode; + uid; + gid; + uname; + gname; + size = 0; + mtime; + atime; + ctime; + linkpath; + dev; + ino; + nlink; + invalid = false; + absolute; + unsupported = false; + constructor(header, ex, gex) { + super({}); + // read entries always start life paused. this is to avoid the + // situation where Minipass's auto-ending empty streams results + // in an entry ending before we're ready for it. + this.pause(); + this.extended = ex; + this.globalExtended = gex; + this.header = header; + /* c8 ignore start */ + this.remain = header.size ?? 0; + /* c8 ignore stop */ + this.startBlockSize = 512 * Math.ceil(this.remain / 512); + this.blockRemain = this.startBlockSize; + this.type = header.type; + switch (this.type) { + case 'File': + case 'OldFile': + case 'Link': + case 'SymbolicLink': + case 'CharacterDevice': + case 'BlockDevice': + case 'Directory': + case 'FIFO': + case 'ContiguousFile': + case 'GNUDumpDir': + break; + case 'NextFileHasLongLinkpath': + case 'NextFileHasLongPath': + case 'OldGnuLongPath': + case 'GlobalExtendedHeader': + case 'ExtendedHeader': + case 'OldExtendedHeader': + this.meta = true; + break; + // NOTE: gnutar and bsdtar treat unrecognized types as 'File' + // it may be worth doing the same, but with a warning. + default: + this.ignore = true; + } + /* c8 ignore start */ + if (!header.path) { + throw new Error('no path provided for tar.ReadEntry'); + } + /* c8 ignore stop */ + this.path = normalizeWindowsPath(header.path); + this.mode = header.mode; + if (this.mode) { + this.mode = this.mode & 0o7777; + } + this.uid = header.uid; + this.gid = header.gid; + this.uname = header.uname; + this.gname = header.gname; + this.size = this.remain; + this.mtime = header.mtime; + this.atime = header.atime; + this.ctime = header.ctime; + /* c8 ignore start */ + this.linkpath = + header.linkpath ? + normalizeWindowsPath(header.linkpath) + : undefined; + /* c8 ignore stop */ + this.uname = header.uname; + this.gname = header.gname; + if (ex) { + this.#slurp(ex); + } + if (gex) { + this.#slurp(gex, true); + } + } + write(data) { + const writeLen = data.length; + if (writeLen > this.blockRemain) { + throw new Error('writing more to entry than is appropriate'); + } + const r = this.remain; + const br = this.blockRemain; + this.remain = Math.max(0, r - writeLen); + this.blockRemain = Math.max(0, br - writeLen); + if (this.ignore) { + return true; + } + if (r >= writeLen) { + return super.write(data); + } + // r < writeLen + return super.write(data.subarray(0, r)); + } + #slurp(ex, gex = false) { + if (ex.path) + ex.path = normalizeWindowsPath(ex.path); + if (ex.linkpath) + ex.linkpath = normalizeWindowsPath(ex.linkpath); + Object.assign(this, Object.fromEntries(Object.entries(ex).filter(([k, v]) => { + // we slurp in everything except for the path attribute in + // a global extended header, because that's weird. Also, any + // null/undefined values are ignored. + return !(v === null || + v === undefined || + (k === 'path' && gex)); + }))); + } +} +//# sourceMappingURL=read-entry.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/read-entry.js.map b/node_modules/tar/dist/esm/read-entry.js.map new file mode 100644 index 0000000..f704154 --- /dev/null +++ b/node_modules/tar/dist/esm/read-entry.js.map @@ -0,0 +1 @@ +{"version":3,"file":"read-entry.js","sourceRoot":"","sources":["../../src/read-entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAIlE,MAAM,OAAO,SAAU,SAAQ,QAAwB;IACrD,QAAQ,CAAM;IACd,cAAc,CAAM;IACpB,MAAM,CAAQ;IACd,cAAc,CAAQ;IACtB,WAAW,CAAQ;IACnB,MAAM,CAAQ;IACd,IAAI,CAAe;IACnB,IAAI,GAAY,KAAK,CAAA;IACrB,MAAM,GAAY,KAAK,CAAA;IACvB,IAAI,CAAQ;IACZ,IAAI,CAAS;IACb,GAAG,CAAS;IACZ,GAAG,CAAS;IACZ,KAAK,CAAS;IACd,KAAK,CAAS;IACd,IAAI,GAAW,CAAC,CAAA;IAChB,KAAK,CAAO;IACZ,KAAK,CAAO;IACZ,KAAK,CAAO;IACZ,QAAQ,CAAS;IAEjB,GAAG,CAAS;IACZ,GAAG,CAAS;IACZ,KAAK,CAAS;IACd,OAAO,GAAY,KA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,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE;YACnC,0DAA0D;YAC1D,4DAA4D;YAC5D,qCAAqC;YACrC,OAAO,CAAC,CACN,CAAC,KAAK,IAAI;gBACV,CAAC,KAAK,SAAS;gBACf,CAAC,CAAC,KAAK,MAAM,IAAI,GAAG,CAAC,CACtB,CAAA;QACH,CAAC,CAAC,CACH,CACF,CAAA;IACH,CAAC;CACF","sourcesContent":["import { Minipass } from 'minipass'\nimport { Header } from './header.js'\nimport { normalizeWindowsPath } from './normalize-windows-path.js'\nimport { Pax } from './pax.js'\nimport { EntryTypeName } from './types.js'\n\nexport class ReadEntry extends Minipass {\n extended?: Pax\n globalExtended?: Pax\n header: Header\n startBlockSize: number\n blockRemain: number\n remain: number\n type: EntryTypeName\n meta: boolean = false\n ignore: boolean = false\n path: string\n mode?: number\n uid?: number\n gid?: number\n uname?: string\n gname?: string\n size: number = 0\n mtime?: Date\n atime?: Date\n ctime?: Date\n linkpath?: string\n\n dev?: number\n ino?: number\n nlink?: number\n invalid: boolean = false\n absolute?: string\n unsupported: boolean = false\n\n constructor(header: Header, ex?: Pax, gex?: Pax) {\n super({})\n // read entries always start life paused. this is to avoid the\n // situation where Minipass's auto-ending empty streams results\n // in an entry ending before we're ready for it.\n this.pause()\n this.extended = ex\n this.globalExtended = gex\n this.header = header\n /* c8 ignore start */\n this.remain = header.size ?? 0\n /* c8 ignore stop */\n this.startBlockSize = 512 * Math.ceil(this.remain / 512)\n this.blockRemain = this.startBlockSize\n this.type = header.type\n switch (this.type) {\n case 'File':\n case 'OldFile':\n case 'Link':\n case 'SymbolicLink':\n case 'CharacterDevice':\n case 'BlockDevice':\n case 'Directory':\n case 'FIFO':\n case 'ContiguousFile':\n case 'GNUDumpDir':\n break\n\n case 'NextFileHasLongLinkpath':\n case 'NextFileHasLongPath':\n case 'OldGnuLongPath':\n case 'GlobalExtendedHeader':\n case 'ExtendedHeader':\n case 'OldExtendedHeader':\n this.meta = true\n break\n\n // NOTE: gnutar and bsdtar treat unrecognized types as 'File'\n // it may be worth doing the same, but with a warning.\n default:\n this.ignore = true\n }\n\n /* c8 ignore start */\n if (!header.path) {\n throw new Error('no path provided for tar.ReadEntry')\n }\n /* c8 ignore stop */\n\n this.path = normalizeWindowsPath(header.path) as string\n this.mode = header.mode\n if (this.mode) {\n this.mode = this.mode & 0o7777\n }\n this.uid = header.uid\n this.gid = header.gid\n this.uname = header.uname\n this.gname = header.gname\n this.size = this.remain\n this.mtime = header.mtime\n this.atime = header.atime\n this.ctime = header.ctime\n /* c8 ignore start */\n this.linkpath =\n header.linkpath ?\n normalizeWindowsPath(header.linkpath)\n : undefined\n /* c8 ignore stop */\n this.uname = header.uname\n this.gname = header.gname\n\n if (ex) {\n this.#slurp(ex)\n }\n if (gex) {\n this.#slurp(gex, true)\n }\n }\n\n write(data: Buffer) {\n const writeLen = data.length\n if (writeLen > this.blockRemain) {\n throw new Error('writing more to entry than is appropriate')\n }\n\n const r = this.remain\n const br = this.blockRemain\n this.remain = Math.max(0, r - writeLen)\n this.blockRemain = Math.max(0, br - writeLen)\n if (this.ignore) {\n return true\n }\n\n if (r >= writeLen) {\n return super.write(data)\n }\n\n // r < writeLen\n return super.write(data.subarray(0, r))\n }\n\n #slurp(ex: Pax, gex: boolean = false) {\n if (ex.path) ex.path = normalizeWindowsPath(ex.path)\n if (ex.linkpath) ex.linkpath = normalizeWindowsPath(ex.linkpath)\n Object.assign(\n this,\n Object.fromEntries(\n Object.entries(ex).filter(([k, v]) => {\n // we slurp in everything except for the path attribute in\n // a global extended header, because that's weird. Also, any\n // null/undefined values are ignored.\n return !(\n v === null ||\n v === undefined ||\n (k === 'path' && gex)\n )\n }),\n ),\n )\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/replace.d.ts b/node_modules/tar/dist/esm/replace.d.ts new file mode 100644 index 0000000..8ae4035 --- /dev/null +++ b/node_modules/tar/dist/esm/replace.d.ts @@ -0,0 +1,2 @@ +export declare const replace: import("./make-command.js").TarCommand; +//# sourceMappingURL=replace.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/replace.d.ts.map b/node_modules/tar/dist/esm/replace.d.ts.map new file mode 100644 index 0000000..66838f5 --- /dev/null +++ b/node_modules/tar/dist/esm/replace.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"replace.d.ts","sourceRoot":"","sources":["../../src/replace.ts"],"names":[],"mappings":"AA6QA,eAAO,MAAM,OAAO,sDA6BnB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/replace.js b/node_modules/tar/dist/esm/replace.js new file mode 100644 index 0000000..bab622b --- /dev/null +++ b/node_modules/tar/dist/esm/replace.js @@ -0,0 +1,225 @@ +// tar -r +import { WriteStream, WriteStreamSync } from '@isaacs/fs-minipass'; +import fs from 'node:fs'; +import path from 'node:path'; +import { Header } from './header.js'; +import { list } from './list.js'; +import { makeCommand } from './make-command.js'; +import { isFile, } from './options.js'; +import { Pack, PackSync } from './pack.js'; +// starting at the head of the file, read a Header +// If the checksum is invalid, that's our position to start writing +// If it is, jump forward by the specified size (round up to 512) +// and try again. +// Write the new Pack stream starting there. +const replaceSync = (opt, files) => { + const p = new PackSync(opt); + let threw = true; + let fd; + let position; + try { + try { + fd = fs.openSync(opt.file, 'r+'); + } + catch (er) { + if (er?.code === 'ENOENT') { + fd = fs.openSync(opt.file, 'w+'); + } + else { + throw er; + } + } + const st = fs.fstatSync(fd); + const headBuf = Buffer.alloc(512); + POSITION: for (position = 0; position < st.size; position += 512) { + for (let bufPos = 0, bytes = 0; bufPos < 512; bufPos += bytes) { + bytes = fs.readSync(fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos); + if (position === 0 && + headBuf[0] === 0x1f && + headBuf[1] === 0x8b) { + throw new Error('cannot append to compressed archives'); + } + if (!bytes) { + break POSITION; + } + } + const h = new Header(headBuf); + if (!h.cksumValid) { + break; + } + const entryBlockSize = 512 * Math.ceil((h.size || 0) / 512); + if (position + entryBlockSize + 512 > st.size) { + break; + } + // the 512 for the header we just parsed will be added as well + // also jump ahead all the blocks for the body + position += entryBlockSize; + if (opt.mtimeCache && h.mtime) { + opt.mtimeCache.set(String(h.path), h.mtime); + } + } + threw = false; + streamSync(opt, p, position, fd, files); + } + finally { + if (threw) { + try { + fs.closeSync(fd); + } + catch (er) { } + } + } +}; +const streamSync = (opt, p, position, fd, files) => { + const stream = new WriteStreamSync(opt.file, { + fd: fd, + start: position, + }); + p.pipe(stream); + addFilesSync(p, files); +}; +const replaceAsync = (opt, files) => { + files = Array.from(files); + const p = new Pack(opt); + const getPos = (fd, size, cb_) => { + const cb = (er, pos) => { + if (er) { + fs.close(fd, _ => cb_(er)); + } + else { + cb_(null, pos); + } + }; + let position = 0; + if (size === 0) { + return cb(null, 0); + } + let bufPos = 0; + const headBuf = Buffer.alloc(512); + const onread = (er, bytes) => { + if (er || typeof bytes === 'undefined') { + return cb(er); + } + bufPos += bytes; + if (bufPos < 512 && bytes) { + return fs.read(fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos, onread); + } + if (position === 0 && + headBuf[0] === 0x1f && + headBuf[1] === 0x8b) { + return cb(new Error('cannot append to compressed archives')); + } + // truncated header + if (bufPos < 512) { + return cb(null, position); + } + const h = new Header(headBuf); + if (!h.cksumValid) { + return cb(null, position); + } + /* c8 ignore next */ + const entryBlockSize = 512 * Math.ceil((h.size ?? 0) / 512); + if (position + entryBlockSize + 512 > size) { + return cb(null, position); + } + position += entryBlockSize + 512; + if (position >= size) { + return cb(null, position); + } + if (opt.mtimeCache && h.mtime) { + opt.mtimeCache.set(String(h.path), h.mtime); + } + bufPos = 0; + fs.read(fd, headBuf, 0, 512, position, onread); + }; + fs.read(fd, headBuf, 0, 512, position, onread); + }; + const promise = new Promise((resolve, reject) => { + p.on('error', reject); + let flag = 'r+'; + const onopen = (er, fd) => { + if (er && er.code === 'ENOENT' && flag === 'r+') { + flag = 'w+'; + return fs.open(opt.file, flag, onopen); + } + if (er || !fd) { + return reject(er); + } + fs.fstat(fd, (er, st) => { + if (er) { + return fs.close(fd, () => reject(er)); + } + getPos(fd, st.size, (er, position) => { + if (er) { + return reject(er); + } + const stream = new WriteStream(opt.file, { + fd: fd, + start: position, + }); + p.pipe(stream); + stream.on('error', reject); + stream.on('close', resolve); + addFilesAsync(p, files); + }); + }); + }; + fs.open(opt.file, flag, onopen); + }); + return promise; +}; +const addFilesSync = (p, files) => { + files.forEach(file => { + if (file.charAt(0) === '@') { + list({ + file: path.resolve(p.cwd, file.slice(1)), + sync: true, + noResume: true, + onReadEntry: entry => p.add(entry), + }); + } + else { + p.add(file); + } + }); + p.end(); +}; +const addFilesAsync = async (p, files) => { + for (let i = 0; i < files.length; i++) { + const file = String(files[i]); + if (file.charAt(0) === '@') { + await list({ + file: path.resolve(String(p.cwd), file.slice(1)), + noResume: true, + onReadEntry: entry => p.add(entry), + }); + } + else { + p.add(file); + } + } + p.end(); +}; +export const replace = makeCommand(replaceSync, replaceAsync, +/* c8 ignore start */ +() => { + throw new TypeError('file is required'); +}, () => { + throw new TypeError('file is required'); +}, +/* c8 ignore stop */ +(opt, entries) => { + if (!isFile(opt)) { + throw new TypeError('file is required'); + } + if (opt.gzip || + opt.brotli || + opt.file.endsWith('.br') || + opt.file.endsWith('.tbr')) { + throw new TypeError('cannot append to compressed archives'); + } + if (!entries?.length) { + throw new TypeError('no paths specified to add/replace'); + } +}); +//# sourceMappingURL=replace.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/replace.js.map b/node_modules/tar/dist/esm/replace.js.map new file mode 100644 index 0000000..f92d2c8 --- /dev/null +++ b/node_modules/tar/dist/esm/replace.js.map @@ -0,0 +1 @@ +{"version":3,"file":"replace.js","sourceRoot":"","sources":["../../src/replace.ts"],"names":[],"mappings":"AAAA,SAAS;AACT,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAElE,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,O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B;AACrB,GAAU,EAAE;IACV,MAAM,IAAI,SAAS,CAAC,kBAAkB,CAAC,CAAA;AACzC,CAAC,EACD,GAAU,EAAE;IACV,MAAM,IAAI,SAAS,CAAC,kBAAkB,CAAC,CAAA;AACzC,CAAC;AACD,oBAAoB;AACpB,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;IACf,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;QACjB,MAAM,IAAI,SAAS,CAAC,kBAAkB,CAAC,CAAA;IACzC,CAAC;IAED,IACE,GAAG,CAAC,IAAI;QACR,GAAG,CAAC,MAAM;QACV,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;QACxB,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EACzB,CAAC;QACD,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAA;IAC7D,CAAC;IAED,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;QACrB,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;IAC1D,CAAC;AACH,CAAC,CACF,CAAA","sourcesContent":["// tar -r\nimport { WriteStream, WriteStreamSync } from '@isaacs/fs-minipass'\nimport { Minipass } from 'minipass'\nimport fs from 'node:fs'\nimport path from 'node:path'\nimport { Header } from './header.js'\nimport { list } from './list.js'\nimport { makeCommand } from './make-command.js'\nimport {\n isFile,\n TarOptionsFile,\n TarOptionsSyncFile,\n} from './options.js'\nimport { Pack, PackSync } from './pack.js'\n\n// starting at the head of the file, read a Header\n// If the checksum is invalid, that's our position to start writing\n// If it is, jump forward by the specified size (round up to 512)\n// and try again.\n// Write the new Pack stream starting there.\n\nconst replaceSync = (opt: TarOptionsSyncFile, files: string[]) => {\n const p = new PackSync(opt)\n\n let threw = true\n let fd\n let position\n\n try {\n try {\n fd = fs.openSync(opt.file, 'r+')\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') {\n fd = fs.openSync(opt.file, 'w+')\n } else {\n throw er\n }\n }\n\n const st = fs.fstatSync(fd)\n const headBuf = Buffer.alloc(512)\n\n POSITION: for (\n position = 0;\n position < st.size;\n position += 512\n ) {\n for (let bufPos = 0, bytes = 0; bufPos < 512; bufPos += bytes) {\n bytes = fs.readSync(\n fd,\n headBuf,\n bufPos,\n headBuf.length - bufPos,\n position + bufPos,\n )\n\n if (\n position === 0 &&\n headBuf[0] === 0x1f &&\n headBuf[1] === 0x8b\n ) {\n throw new Error('cannot append to compressed archives')\n }\n\n if (!bytes) {\n break POSITION\n }\n }\n\n const h = new Header(headBuf)\n if (!h.cksumValid) {\n break\n }\n const entryBlockSize = 512 * Math.ceil((h.size || 0) / 512)\n if (position + entryBlockSize + 512 > st.size) {\n break\n }\n // the 512 for the header we just parsed will be added as well\n // also jump ahead all the blocks for the body\n position += entryBlockSize\n if (opt.mtimeCache && h.mtime) {\n opt.mtimeCache.set(String(h.path), h.mtime)\n }\n }\n threw = false\n\n streamSync(opt, p, position, fd, files)\n } finally {\n if (threw) {\n try {\n fs.closeSync(fd as number)\n } catch (er) {}\n }\n }\n}\n\nconst streamSync = (\n opt: TarOptionsSyncFile,\n p: Pack,\n position: number,\n fd: number,\n files: string[],\n) => {\n const stream = new WriteStreamSync(opt.file, {\n fd: fd,\n start: position,\n })\n p.pipe(stream as unknown as Minipass.Writable)\n addFilesSync(p, files)\n}\n\nconst replaceAsync = (\n opt: TarOptionsFile,\n files: string[],\n): Promise => {\n files = Array.from(files)\n const p = new Pack(opt)\n\n const getPos = (\n fd: number,\n size: number,\n cb_: (er?: null | Error, pos?: number) => void,\n ) => {\n const cb = (er?: Error | null, pos?: number) => {\n if (er) {\n fs.close(fd, _ => cb_(er))\n } else {\n cb_(null, pos)\n }\n }\n\n let position = 0\n if (size === 0) {\n return cb(null, 0)\n }\n\n let bufPos = 0\n const headBuf = Buffer.alloc(512)\n const onread = (er?: null | Error, bytes?: number): void => {\n if (er || typeof bytes === 'undefined') {\n return cb(er)\n }\n bufPos += bytes\n if (bufPos < 512 && bytes) {\n return fs.read(\n fd,\n headBuf,\n bufPos,\n headBuf.length - bufPos,\n position + bufPos,\n onread,\n )\n }\n\n if (\n position === 0 &&\n headBuf[0] === 0x1f &&\n headBuf[1] === 0x8b\n ) {\n return cb(new Error('cannot append to compressed archives'))\n }\n\n // truncated header\n if (bufPos < 512) {\n return cb(null, position)\n }\n\n const h = new Header(headBuf)\n if (!h.cksumValid) {\n return cb(null, position)\n }\n\n /* c8 ignore next */\n const entryBlockSize = 512 * Math.ceil((h.size ?? 0) / 512)\n if (position + entryBlockSize + 512 > size) {\n return cb(null, position)\n }\n\n position += entryBlockSize + 512\n if (position >= size) {\n return cb(null, position)\n }\n\n if (opt.mtimeCache && h.mtime) {\n opt.mtimeCache.set(String(h.path), h.mtime)\n }\n bufPos = 0\n fs.read(fd, headBuf, 0, 512, position, onread)\n }\n fs.read(fd, headBuf, 0, 512, position, onread)\n }\n\n const promise = new Promise((resolve, reject) => {\n p.on('error', reject)\n let flag = 'r+'\n const onopen = (\n er?: NodeJS.ErrnoException | null,\n fd?: number,\n ) => {\n if (er && er.code === 'ENOENT' && flag === 'r+') {\n flag = 'w+'\n return fs.open(opt.file, flag, onopen)\n }\n\n if (er || !fd) {\n return reject(er)\n }\n\n fs.fstat(fd, (er, st) => {\n if (er) {\n return fs.close(fd, () => reject(er))\n }\n\n getPos(fd, st.size, (er, position) => {\n if (er) {\n return reject(er)\n }\n const stream = new WriteStream(opt.file, {\n fd: fd,\n start: position,\n })\n p.pipe(stream as unknown as Minipass.Writable)\n stream.on('error', reject)\n stream.on('close', resolve)\n addFilesAsync(p, files)\n })\n })\n }\n fs.open(opt.file, flag, onopen)\n })\n\n return promise\n}\n\nconst addFilesSync = (p: Pack, files: string[]) => {\n files.forEach(file => {\n if (file.charAt(0) === '@') {\n list({\n file: path.resolve(p.cwd, file.slice(1)),\n sync: true,\n noResume: true,\n onReadEntry: entry => p.add(entry),\n })\n } else {\n p.add(file)\n }\n })\n p.end()\n}\n\nconst addFilesAsync = async (\n p: Pack,\n files: string[],\n): Promise => {\n for (let i = 0; i < files.length; i++) {\n const file = String(files[i])\n if (file.charAt(0) === '@') {\n await list({\n file: path.resolve(String(p.cwd), file.slice(1)),\n noResume: true,\n onReadEntry: entry => p.add(entry),\n })\n } else {\n p.add(file)\n }\n }\n p.end()\n}\n\nexport const replace = makeCommand(\n replaceSync,\n replaceAsync,\n /* c8 ignore start */\n (): never => {\n throw new TypeError('file is required')\n },\n (): never => {\n throw new TypeError('file is required')\n },\n /* c8 ignore stop */\n (opt, entries) => {\n if (!isFile(opt)) {\n throw new TypeError('file is required')\n }\n\n if (\n opt.gzip ||\n opt.brotli ||\n opt.file.endsWith('.br') ||\n opt.file.endsWith('.tbr')\n ) {\n throw new TypeError('cannot append to compressed archives')\n }\n\n if (!entries?.length) {\n throw new TypeError('no paths specified to add/replace')\n }\n },\n)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/strip-absolute-path.d.ts b/node_modules/tar/dist/esm/strip-absolute-path.d.ts new file mode 100644 index 0000000..170ce2c --- /dev/null +++ b/node_modules/tar/dist/esm/strip-absolute-path.d.ts @@ -0,0 +1,2 @@ +export declare const stripAbsolutePath: (path: string) => string[]; +//# sourceMappingURL=strip-absolute-path.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/strip-absolute-path.d.ts.map b/node_modules/tar/dist/esm/strip-absolute-path.d.ts.map new file mode 100644 index 0000000..83ca6ed --- /dev/null +++ b/node_modules/tar/dist/esm/strip-absolute-path.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"strip-absolute-path.d.ts","sourceRoot":"","sources":["../../src/strip-absolute-path.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,iBAAiB,SAAU,MAAM,aAgB7C,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/strip-absolute-path.js b/node_modules/tar/dist/esm/strip-absolute-path.js new file mode 100644 index 0000000..cce5ff8 --- /dev/null +++ b/node_modules/tar/dist/esm/strip-absolute-path.js @@ -0,0 +1,25 @@ +// unix absolute paths are also absolute on win32, so we use this for both +import { win32 } from 'node:path'; +const { isAbsolute, parse } = win32; +// returns [root, stripped] +// Note that windows will think that //x/y/z/a has a "root" of //x/y, and in +// those cases, we want to sanitize it to x/y/z/a, not z/a, so we strip / +// explicitly if it's the first character. +// drive-specific relative paths on Windows get their root stripped off even +// though they are not absolute, so `c:../foo` becomes ['c:', '../foo'] +export const stripAbsolutePath = (path) => { + let r = ''; + let parsed = parse(path); + while (isAbsolute(path) || parsed.root) { + // windows will think that //x/y/z has a "root" of //x/y/ + // but strip the //?/C:/ off of //?/C:/path + const root = path.charAt(0) === '/' && path.slice(0, 4) !== '//?/' ? + '/' + : parsed.root; + path = path.slice(root.length); + r += root; + parsed = parse(path); + } + return [r, path]; +}; +//# sourceMappingURL=strip-absolute-path.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/strip-absolute-path.js.map b/node_modules/tar/dist/esm/strip-absolute-path.js.map new file mode 100644 index 0000000..4f84fa6 --- /dev/null +++ b/node_modules/tar/dist/esm/strip-absolute-path.js.map @@ -0,0 +1 @@ +{"version":3,"file":"strip-absolute-path.js","sourceRoot":"","sources":["../../src/strip-absolute-path.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AACjC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,KAAK,CAAA;AAEnC,2BAA2B;AAC3B,4EAA4E;AAC5E,yEAAyE;AACzE,0CAA0C;AAC1C,4EAA4E;AAC5E,uEAAuE;AACvE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,EAAE;IAChD,IAAI,CAAC,GAAG,EAAE,CAAA;IAEV,IAAI,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,CAAA;IACxB,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QACvC,yDAAyD;QACzD,2CAA2C;QAC3C,MAAM,IAAI,GACR,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC;YACrD,GAAG;YACL,CAAC,CAAC,MAAM,CAAC,IAAI,CAAA;QACf,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAC9B,CAAC,IAAI,IAAI,CAAA;QACT,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,CAAA;IACtB,CAAC;IACD,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;AAClB,CAAC,CAAA","sourcesContent":["// unix absolute paths are also absolute on win32, so we use this for both\nimport { win32 } from 'node:path'\nconst { isAbsolute, parse } = win32\n\n// returns [root, stripped]\n// Note that windows will think that //x/y/z/a has a \"root\" of //x/y, and in\n// those cases, we want to sanitize it to x/y/z/a, not z/a, so we strip /\n// explicitly if it's the first character.\n// drive-specific relative paths on Windows get their root stripped off even\n// though they are not absolute, so `c:../foo` becomes ['c:', '../foo']\nexport const stripAbsolutePath = (path: string) => {\n let r = ''\n\n let parsed = parse(path)\n while (isAbsolute(path) || parsed.root) {\n // windows will think that //x/y/z has a \"root\" of //x/y/\n // but strip the //?/C:/ off of //?/C:/path\n const root =\n path.charAt(0) === '/' && path.slice(0, 4) !== '//?/' ?\n '/'\n : parsed.root\n path = path.slice(root.length)\n r += root\n parsed = parse(path)\n }\n return [r, path]\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts b/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts new file mode 100644 index 0000000..dcc4637 --- /dev/null +++ b/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts @@ -0,0 +1,2 @@ +export declare const stripTrailingSlashes: (str: string) => string; +//# sourceMappingURL=strip-trailing-slashes.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts.map b/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts.map new file mode 100644 index 0000000..bf43978 --- /dev/null +++ b/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"strip-trailing-slashes.d.ts","sourceRoot":"","sources":["../../src/strip-trailing-slashes.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB,QAAS,MAAM,WAQ/C,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/strip-trailing-slashes.js b/node_modules/tar/dist/esm/strip-trailing-slashes.js new file mode 100644 index 0000000..ace4218 --- /dev/null +++ b/node_modules/tar/dist/esm/strip-trailing-slashes.js @@ -0,0 +1,14 @@ +// warning: extremely hot code path. +// This has been meticulously optimized for use +// within npm install on large package trees. +// Do not edit without careful benchmarking. +export const stripTrailingSlashes = (str) => { + let i = str.length - 1; + let slashesStart = -1; + while (i > -1 && str.charAt(i) === '/') { + slashesStart = i; + i--; + } + return slashesStart === -1 ? str : str.slice(0, slashesStart); +}; +//# sourceMappingURL=strip-trailing-slashes.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/strip-trailing-slashes.js.map b/node_modules/tar/dist/esm/strip-trailing-slashes.js.map new file mode 100644 index 0000000..dc4d01b --- /dev/null +++ b/node_modules/tar/dist/esm/strip-trailing-slashes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"strip-trailing-slashes.js","sourceRoot":"","sources":["../../src/strip-trailing-slashes.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,+CAA+C;AAC/C,6CAA6C;AAC7C,4CAA4C;AAC5C,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,GAAW,EAAE,EAAE;IAClD,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,CAAA;IACtB,IAAI,YAAY,GAAG,CAAC,CAAC,CAAA;IACrB,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QACvC,YAAY,GAAG,CAAC,CAAA;QAChB,CAAC,EAAE,CAAA;IACL,CAAC;IACD,OAAO,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,YAAY,CAAC,CAAA;AAC/D,CAAC,CAAA","sourcesContent":["// warning: extremely hot code path.\n// This has been meticulously optimized for use\n// within npm install on large package trees.\n// Do not edit without careful benchmarking.\nexport const stripTrailingSlashes = (str: string) => {\n let i = str.length - 1\n let slashesStart = -1\n while (i > -1 && str.charAt(i) === '/') {\n slashesStart = i\n i--\n }\n return slashesStart === -1 ? str : str.slice(0, slashesStart)\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/symlink-error.d.ts b/node_modules/tar/dist/esm/symlink-error.d.ts new file mode 100644 index 0000000..61b400f --- /dev/null +++ b/node_modules/tar/dist/esm/symlink-error.d.ts @@ -0,0 +1,9 @@ +export declare class SymlinkError extends Error { + path: string; + symlink: string; + syscall: 'symlink'; + code: 'TAR_SYMLINK_ERROR'; + constructor(symlink: string, path: string); + get name(): string; +} +//# sourceMappingURL=symlink-error.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/symlink-error.d.ts.map b/node_modules/tar/dist/esm/symlink-error.d.ts.map new file mode 100644 index 0000000..5716e8e --- /dev/null +++ b/node_modules/tar/dist/esm/symlink-error.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"symlink-error.d.ts","sourceRoot":"","sources":["../../src/symlink-error.ts"],"names":[],"mappings":"AAAA,qBAAa,YAAa,SAAQ,KAAK;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,SAAS,CAAY;IAC9B,IAAI,EAAE,mBAAmB,CAAsB;gBACnC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAKzC,IAAI,IAAI,WAEP;CACF"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/symlink-error.js b/node_modules/tar/dist/esm/symlink-error.js new file mode 100644 index 0000000..d31766e --- /dev/null +++ b/node_modules/tar/dist/esm/symlink-error.js @@ -0,0 +1,15 @@ +export class SymlinkError extends Error { + path; + symlink; + syscall = 'symlink'; + code = 'TAR_SYMLINK_ERROR'; + constructor(symlink, path) { + super('TAR_SYMLINK_ERROR: Cannot extract through symbolic link'); + this.symlink = symlink; + this.path = path; + } + get name() { + return 'SymlinkError'; + } +} +//# sourceMappingURL=symlink-error.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/symlink-error.js.map b/node_modules/tar/dist/esm/symlink-error.js.map new file mode 100644 index 0000000..98ae1a2 --- /dev/null +++ b/node_modules/tar/dist/esm/symlink-error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"symlink-error.js","sourceRoot":"","sources":["../../src/symlink-error.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,YAAa,SAAQ,KAAK;IACrC,IAAI,CAAQ;IACZ,OAAO,CAAQ;IACf,OAAO,GAAc,SAAS,CAAA;IAC9B,IAAI,GAAwB,mBAAmB,CAAA;IAC/C,YAAY,OAAe,EAAE,IAAY;QACvC,KAAK,CAAC,yDAAyD,CAAC,CAAA;QAChE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IACD,IAAI,IAAI;QACN,OAAO,cAAc,CAAA;IACvB,CAAC;CACF","sourcesContent":["export class SymlinkError extends Error {\n path: string\n symlink: string\n syscall: 'symlink' = 'symlink'\n code: 'TAR_SYMLINK_ERROR' = 'TAR_SYMLINK_ERROR'\n constructor(symlink: string, path: string) {\n super('TAR_SYMLINK_ERROR: Cannot extract through symbolic link')\n this.symlink = symlink\n this.path = path\n }\n get name() {\n return 'SymlinkError'\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/types.d.ts b/node_modules/tar/dist/esm/types.d.ts new file mode 100644 index 0000000..a39f054 --- /dev/null +++ b/node_modules/tar/dist/esm/types.d.ts @@ -0,0 +1,7 @@ +export declare const isCode: (c: string) => c is EntryTypeCode; +export declare const isName: (c: string) => c is EntryTypeName; +export type EntryTypeCode = '0' | '' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | 'g' | 'x' | 'A' | 'D' | 'I' | 'K' | 'L' | 'M' | 'N' | 'S' | 'V' | 'X'; +export type EntryTypeName = 'File' | 'OldFile' | 'Link' | 'SymbolicLink' | 'CharacterDevice' | 'BlockDevice' | 'Directory' | 'FIFO' | 'ContiguousFile' | 'GlobalExtendedHeader' | 'ExtendedHeader' | 'SolarisACL' | 'GNUDumpDir' | 'Inode' | 'NextFileHasLongLinkpath' | 'NextFileHasLongPath' | 'ContinuationFile' | 'OldGnuLongPath' | 'SparseFile' | 'TapeVolumeHeader' | 'OldExtendedHeader' | 'Unsupported'; +export declare const name: Map; +export declare const code: Map; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/types.d.ts.map b/node_modules/tar/dist/esm/types.d.ts.map new file mode 100644 index 0000000..6e21eeb --- /dev/null +++ b/node_modules/tar/dist/esm/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,MAAO,MAAM,uBACF,CAAA;AAE9B,eAAO,MAAM,MAAM,MAAO,MAAM,uBACF,CAAA;AAE9B,MAAM,MAAM,aAAa,GACrB,GAAG,GACH,EAAE,GACF,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,CAAA;AAEP,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,SAAS,GACT,MAAM,GACN,cAAc,GACd,iBAAiB,GACjB,aAAa,GACb,WAAW,GACX,MAAM,GACN,gBAAgB,GAChB,sBAAsB,GACtB,gBAAgB,GAChB,YAAY,GACZ,YAAY,GACZ,OAAO,GACP,yBAAyB,GACzB,qBAAqB,GACrB,kBAAkB,GAClB,gBAAgB,GAChB,YAAY,GACZ,kBAAkB,GAClB,mBAAmB,GACnB,aAAa,CAAA;AAGjB,eAAO,MAAM,IAAI,mCAsCf,CAAA;AAGF,eAAO,MAAM,IAAI,mCAEhB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/types.js b/node_modules/tar/dist/esm/types.js new file mode 100644 index 0000000..27b982a --- /dev/null +++ b/node_modules/tar/dist/esm/types.js @@ -0,0 +1,45 @@ +export const isCode = (c) => name.has(c); +export const isName = (c) => code.has(c); +// map types from key to human-friendly name +export const name = new Map([ + ['0', 'File'], + // same as File + ['', 'OldFile'], + ['1', 'Link'], + ['2', 'SymbolicLink'], + // Devices and FIFOs aren't fully supported + // they are parsed, but skipped when unpacking + ['3', 'CharacterDevice'], + ['4', 'BlockDevice'], + ['5', 'Directory'], + ['6', 'FIFO'], + // same as File + ['7', 'ContiguousFile'], + // pax headers + ['g', 'GlobalExtendedHeader'], + ['x', 'ExtendedHeader'], + // vendor-specific stuff + // skip + ['A', 'SolarisACL'], + // like 5, but with data, which should be skipped + ['D', 'GNUDumpDir'], + // metadata only, skip + ['I', 'Inode'], + // data = link path of next file + ['K', 'NextFileHasLongLinkpath'], + // data = path of next file + ['L', 'NextFileHasLongPath'], + // skip + ['M', 'ContinuationFile'], + // like L + ['N', 'OldGnuLongPath'], + // skip + ['S', 'SparseFile'], + // skip + ['V', 'TapeVolumeHeader'], + // like x + ['X', 'OldExtendedHeader'], +]); +// map the other direction +export const code = new Map(Array.from(name).map(kv => [kv[1], kv[0]])); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/types.js.map b/node_modules/tar/dist/esm/types.js.map new file mode 100644 index 0000000..f7e8ec7 --- /dev/null +++ b/node_modules/tar/dist/esm/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAS,EAAsB,EAAE,CACtD,IAAI,CAAC,GAAG,CAAC,CAAkB,CAAC,CAAA;AAE9B,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAS,EAAsB,EAAE,CACtD,IAAI,CAAC,GAAG,CAAC,CAAkB,CAAC,CAAA;AAiD9B,4CAA4C;AAC5C,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,GAAG,CAA+B;IACxD,CAAC,GAAG,EAAE,MAAM,CAAC;IACb,eAAe;IACf,CAAC,EAAE,EAAE,SAAS,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,cAAc,CAAC;IACrB,2CAA2C;IAC3C,8CAA8C;IAC9C,CAAC,GAAG,EAAE,iBAAiB,CAAC;IACxB,CAAC,GAAG,EAAE,aAAa,CAAC;IACpB,CAAC,GAAG,EAAE,WAAW,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,CAAC;IACb,eAAe;IACf,CAAC,GAAG,EAAE,gBAAgB,CAAC;IACvB,cAAc;IACd,CAAC,GAAG,EAAE,sBAAsB,CAAC;IAC7B,CAAC,GAAG,EAAE,gBAAgB,CAAC;IACvB,wBAAwB;IACxB,OAAO;IACP,CAAC,GAAG,EAAE,YAAY,CAAC;IACnB,iDAAiD;IACjD,CAAC,GAAG,EAAE,YAAY,CAAC;IACnB,sBAAsB;IACtB,CAAC,GAAG,EAAE,OAAO,CAAC;IACd,gCAAgC;IAChC,CAAC,GAAG,EAAE,yBAAyB,CAAC;IAChC,2BAA2B;IAC3B,CAAC,GAAG,EAAE,qBAAqB,CAAC;IAC5B,OAAO;IACP,CAAC,GAAG,EAAE,kBAAkB,CAAC;IACzB,SAAS;IACT,CAAC,GAAG,EAAE,gBAAgB,CAAC;IACvB,OAAO;IACP,CAAC,GAAG,EAAE,YAAY,CAAC;IACnB,OAAO;IACP,CAAC,GAAG,EAAE,kBAAkB,CAAC;IACzB,SAAS;IACT,CAAC,GAAG,EAAE,mBAAmB,CAAC;CAC3B,CAAC,CAAA;AAEF,0BAA0B;AAC1B,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,GAAG,CACzB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAC3C,CAAA","sourcesContent":["export const isCode = (c: string): c is EntryTypeCode =>\n name.has(c as EntryTypeCode)\n\nexport const isName = (c: string): c is EntryTypeName =>\n code.has(c as EntryTypeName)\n\nexport type EntryTypeCode =\n | '0'\n | ''\n | '1'\n | '2'\n | '3'\n | '4'\n | '5'\n | '6'\n | '7'\n | 'g'\n | 'x'\n | 'A'\n | 'D'\n | 'I'\n | 'K'\n | 'L'\n | 'M'\n | 'N'\n | 'S'\n | 'V'\n | 'X'\n\nexport type EntryTypeName =\n | 'File'\n | 'OldFile'\n | 'Link'\n | 'SymbolicLink'\n | 'CharacterDevice'\n | 'BlockDevice'\n | 'Directory'\n | 'FIFO'\n | 'ContiguousFile'\n | 'GlobalExtendedHeader'\n | 'ExtendedHeader'\n | 'SolarisACL'\n | 'GNUDumpDir'\n | 'Inode'\n | 'NextFileHasLongLinkpath'\n | 'NextFileHasLongPath'\n | 'ContinuationFile'\n | 'OldGnuLongPath'\n | 'SparseFile'\n | 'TapeVolumeHeader'\n | 'OldExtendedHeader'\n | 'Unsupported'\n\n// map types from key to human-friendly name\nexport const name = new Map([\n ['0', 'File'],\n // same as File\n ['', 'OldFile'],\n ['1', 'Link'],\n ['2', 'SymbolicLink'],\n // Devices and FIFOs aren't fully supported\n // they are parsed, but skipped when unpacking\n ['3', 'CharacterDevice'],\n ['4', 'BlockDevice'],\n ['5', 'Directory'],\n ['6', 'FIFO'],\n // same as File\n ['7', 'ContiguousFile'],\n // pax headers\n ['g', 'GlobalExtendedHeader'],\n ['x', 'ExtendedHeader'],\n // vendor-specific stuff\n // skip\n ['A', 'SolarisACL'],\n // like 5, but with data, which should be skipped\n ['D', 'GNUDumpDir'],\n // metadata only, skip\n ['I', 'Inode'],\n // data = link path of next file\n ['K', 'NextFileHasLongLinkpath'],\n // data = path of next file\n ['L', 'NextFileHasLongPath'],\n // skip\n ['M', 'ContinuationFile'],\n // like L\n ['N', 'OldGnuLongPath'],\n // skip\n ['S', 'SparseFile'],\n // skip\n ['V', 'TapeVolumeHeader'],\n // like x\n ['X', 'OldExtendedHeader'],\n])\n\n// map the other direction\nexport const code = new Map(\n Array.from(name).map(kv => [kv[1], kv[0]]),\n)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/unpack.d.ts b/node_modules/tar/dist/esm/unpack.d.ts new file mode 100644 index 0000000..d4542e0 --- /dev/null +++ b/node_modules/tar/dist/esm/unpack.d.ts @@ -0,0 +1,99 @@ +/// +import { type Stats } from 'node:fs'; +import { MkdirError } from './mkdir.js'; +import { Parser } from './parse.js'; +import { TarOptions } from './options.js'; +import { PathReservations } from './path-reservations.js'; +import { ReadEntry } from './read-entry.js'; +import { WarnData } from './warn-method.js'; +declare const ONENTRY: unique symbol; +declare const CHECKFS: unique symbol; +declare const CHECKFS2: unique symbol; +declare const PRUNECACHE: unique symbol; +declare const ISREUSABLE: unique symbol; +declare const MAKEFS: unique symbol; +declare const FILE: unique symbol; +declare const DIRECTORY: unique symbol; +declare const LINK: unique symbol; +declare const SYMLINK: unique symbol; +declare const HARDLINK: unique symbol; +declare const UNSUPPORTED: unique symbol; +declare const CHECKPATH: unique symbol; +declare const MKDIR: unique symbol; +declare const ONERROR: unique symbol; +declare const PENDING: unique symbol; +declare const PEND: unique symbol; +declare const UNPEND: unique symbol; +declare const ENDED: unique symbol; +declare const MAYBECLOSE: unique symbol; +declare const SKIP: unique symbol; +declare const DOCHOWN: unique symbol; +declare const UID: unique symbol; +declare const GID: unique symbol; +declare const CHECKED_CWD: unique symbol; +export declare class Unpack extends Parser { + [ENDED]: boolean; + [CHECKED_CWD]: boolean; + [PENDING]: number; + reservations: PathReservations; + transform?: TarOptions['transform']; + writable: true; + readable: false; + dirCache: Exclude; + uid?: number; + gid?: number; + setOwner: boolean; + preserveOwner: boolean; + processGid?: number; + processUid?: number; + maxDepth: number; + forceChown: boolean; + win32: boolean; + newer: boolean; + keep: boolean; + noMtime: boolean; + preservePaths: boolean; + unlink: boolean; + cwd: string; + strip: number; + processUmask: number; + umask: number; + dmode: number; + fmode: number; + chmod: boolean; + constructor(opt?: TarOptions); + warn(code: string, msg: string | Error, data?: WarnData): void; + [MAYBECLOSE](): void; + [CHECKPATH](entry: ReadEntry): boolean; + [ONENTRY](entry: ReadEntry): void; + [ONERROR](er: Error, entry: ReadEntry): void; + [MKDIR](dir: string, mode: number, cb: (er?: null | MkdirError, made?: string) => void): void; + [DOCHOWN](entry: ReadEntry): boolean; + [UID](entry: ReadEntry): number | undefined; + [GID](entry: ReadEntry): number | undefined; + [FILE](entry: ReadEntry, fullyDone: () => void): void; + [DIRECTORY](entry: ReadEntry, fullyDone: () => void): void; + [UNSUPPORTED](entry: ReadEntry): void; + [SYMLINK](entry: ReadEntry, done: () => void): void; + [HARDLINK](entry: ReadEntry, done: () => void): void; + [PEND](): void; + [UNPEND](): void; + [SKIP](entry: ReadEntry): void; + [ISREUSABLE](entry: ReadEntry, st: Stats): boolean; + [CHECKFS](entry: ReadEntry): void; + [PRUNECACHE](entry: ReadEntry): void; + [CHECKFS2](entry: ReadEntry, fullyDone: (er?: Error) => void): void; + [MAKEFS](er: null | undefined | Error, entry: ReadEntry, done: () => void): void; + [LINK](entry: ReadEntry, linkpath: string, link: 'link' | 'symlink', done: () => void): void; +} +export declare class UnpackSync extends Unpack { + sync: true; + [MAKEFS](er: null | Error | undefined, entry: ReadEntry): void; + [CHECKFS](entry: ReadEntry): void; + [FILE](entry: ReadEntry, done: () => void): void; + [DIRECTORY](entry: ReadEntry, done: () => void): void; + [MKDIR](dir: string, mode: number): unknown; + [LINK](entry: ReadEntry, linkpath: string, link: 'link' | 'symlink', done: () => void): void; +} +export {}; +//# sourceMappingURL=unpack.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/unpack.d.ts.map b/node_modules/tar/dist/esm/unpack.d.ts.map new file mode 100644 index 0000000..d36f103 --- /dev/null +++ b/node_modules/tar/dist/esm/unpack.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"unpack.d.ts","sourceRoot":"","sources":["../../src/unpack.ts"],"names":[],"mappings":";AASA,OAAW,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAA;AAGxC,OAAO,EAAS,UAAU,EAAa,MAAM,YAAY,CAAA;AAGzD,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAKnC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAE3C,QAAA,MAAM,OAAO,eAAoB,CAAA;AACjC,QAAA,MAAM,OAAO,eAAoB,CAAA;AACjC,QAAA,MAAM,QAAQ,eAAqB,CAAA;AACnC,QAAA,MAAM,UAAU,eAAuB,CAAA;AACvC,QAAA,MAAM,UAAU,eAAuB,CAAA;AACvC,QAAA,MAAM,MAAM,eAAmB,CAAA;AAC/B,QAAA,MAAM,IAAI,eAAiB,CAAA;AAC3B,QAAA,MAAM,SAAS,eAAsB,CAAA;AACrC,QAAA,MAAM,IAAI,eAAiB,CAAA;AAC3B,Q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AAK,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAmBjC,CAAC,IAAI,CAAC,CACJ,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,IAAI,EAAE,MAAM,IAAI;CAWnB"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/unpack.js b/node_modules/tar/dist/esm/unpack.js new file mode 100644 index 0000000..6e744cf --- /dev/null +++ b/node_modules/tar/dist/esm/unpack.js @@ -0,0 +1,888 @@ +// the PEND/UNPEND stuff tracks whether we're ready to emit end/close yet. +// but the path reservations are required to avoid race conditions where +// parallelized unpack ops may mess with one another, due to dependencies +// (like a Link depending on its target) or destructive operations (like +// clobbering an fs object to create one of a different type.) +import * as fsm from '@isaacs/fs-minipass'; +import assert from 'node:assert'; +import { randomBytes } from 'node:crypto'; +import fs from 'node:fs'; +import path from 'node:path'; +import { getWriteFlag } from './get-write-flag.js'; +import { mkdir, mkdirSync } from './mkdir.js'; +import { normalizeUnicode } from './normalize-unicode.js'; +import { normalizeWindowsPath } from './normalize-windows-path.js'; +import { Parser } from './parse.js'; +import { stripAbsolutePath } from './strip-absolute-path.js'; +import { stripTrailingSlashes } from './strip-trailing-slashes.js'; +import * as wc from './winchars.js'; +import { PathReservations } from './path-reservations.js'; +const ONENTRY = Symbol('onEntry'); +const CHECKFS = Symbol('checkFs'); +const CHECKFS2 = Symbol('checkFs2'); +const PRUNECACHE = Symbol('pruneCache'); +const ISREUSABLE = Symbol('isReusable'); +const MAKEFS = Symbol('makeFs'); +const FILE = Symbol('file'); +const DIRECTORY = Symbol('directory'); +const LINK = Symbol('link'); +const SYMLINK = Symbol('symlink'); +const HARDLINK = Symbol('hardlink'); +const UNSUPPORTED = Symbol('unsupported'); +const CHECKPATH = Symbol('checkPath'); +const MKDIR = Symbol('mkdir'); +const ONERROR = Symbol('onError'); +const PENDING = Symbol('pending'); +const PEND = Symbol('pend'); +const UNPEND = Symbol('unpend'); +const ENDED = Symbol('ended'); +const MAYBECLOSE = Symbol('maybeClose'); +const SKIP = Symbol('skip'); +const DOCHOWN = Symbol('doChown'); +const UID = Symbol('uid'); +const GID = Symbol('gid'); +const CHECKED_CWD = Symbol('checkedCwd'); +const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform; +const isWindows = platform === 'win32'; +const DEFAULT_MAX_DEPTH = 1024; +// Unlinks on Windows are not atomic. +// +// This means that if you have a file entry, followed by another +// file entry with an identical name, and you cannot re-use the file +// (because it's a hardlink, or because unlink:true is set, or it's +// Windows, which does not have useful nlink values), then the unlink +// will be committed to the disk AFTER the new file has been written +// over the old one, deleting the new file. +// +// To work around this, on Windows systems, we rename the file and then +// delete the renamed file. It's a sloppy kludge, but frankly, I do not +// know of a better way to do this, given windows' non-atomic unlink +// semantics. +// +// See: https://github.com/npm/node-tar/issues/183 +/* c8 ignore start */ +const unlinkFile = (path, cb) => { + if (!isWindows) { + return fs.unlink(path, cb); + } + const name = path + '.DELETE.' + randomBytes(16).toString('hex'); + fs.rename(path, name, er => { + if (er) { + return cb(er); + } + fs.unlink(name, cb); + }); +}; +/* c8 ignore stop */ +/* c8 ignore start */ +const unlinkFileSync = (path) => { + if (!isWindows) { + return fs.unlinkSync(path); + } + const name = path + '.DELETE.' + randomBytes(16).toString('hex'); + fs.renameSync(path, name); + fs.unlinkSync(name); +}; +/* c8 ignore stop */ +// this.gid, entry.gid, this.processUid +const uint32 = (a, b, c) => a !== undefined && a === a >>> 0 ? a + : b !== undefined && b === b >>> 0 ? b + : c; +// clear the cache if it's a case-insensitive unicode-squashing match. +// we can't know if the current file system is case-sensitive or supports +// unicode fully, so we check for similarity on the maximally compatible +// representation. Err on the side of pruning, since all it's doing is +// preventing lstats, and it's not the end of the world if we get a false +// positive. +// Note that on windows, we always drop the entire cache whenever a +// symbolic link is encountered, because 8.3 filenames are impossible +// to reason about, and collisions are hazards rather than just failures. +const cacheKeyNormalize = (path) => stripTrailingSlashes(normalizeWindowsPath(normalizeUnicode(path))).toLowerCase(); +// remove all cache entries matching ${abs}/** +const pruneCache = (cache, abs) => { + abs = cacheKeyNormalize(abs); + for (const path of cache.keys()) { + const pnorm = cacheKeyNormalize(path); + if (pnorm === abs || pnorm.indexOf(abs + '/') === 0) { + cache.delete(path); + } + } +}; +const dropCache = (cache) => { + for (const key of cache.keys()) { + cache.delete(key); + } +}; +export class Unpack extends Parser { + [ENDED] = false; + [CHECKED_CWD] = false; + [PENDING] = 0; + reservations = new PathReservations(); + transform; + writable = true; + readable = false; + dirCache; + uid; + gid; + setOwner; + preserveOwner; + processGid; + processUid; + maxDepth; + forceChown; + win32; + newer; + keep; + noMtime; + preservePaths; + unlink; + cwd; + strip; + processUmask; + umask; + dmode; + fmode; + chmod; + constructor(opt = {}) { + opt.ondone = () => { + this[ENDED] = true; + this[MAYBECLOSE](); + }; + super(opt); + this.transform = opt.transform; + this.dirCache = opt.dirCache || new Map(); + this.chmod = !!opt.chmod; + if (typeof opt.uid === 'number' || typeof opt.gid === 'number') { + // need both or neither + if (typeof opt.uid !== 'number' || + typeof opt.gid !== 'number') { + throw new TypeError('cannot set owner without number uid and gid'); + } + if (opt.preserveOwner) { + throw new TypeError('cannot preserve owner in archive and also set owner explicitly'); + } + this.uid = opt.uid; + this.gid = opt.gid; + this.setOwner = true; + } + else { + this.uid = undefined; + this.gid = undefined; + this.setOwner = false; + } + // default true for root + if (opt.preserveOwner === undefined && + typeof opt.uid !== 'number') { + this.preserveOwner = !!(process.getuid && process.getuid() === 0); + } + else { + this.preserveOwner = !!opt.preserveOwner; + } + this.processUid = + (this.preserveOwner || this.setOwner) && process.getuid ? + process.getuid() + : undefined; + this.processGid = + (this.preserveOwner || this.setOwner) && process.getgid ? + process.getgid() + : undefined; + // prevent excessively deep nesting of subfolders + // set to `Infinity` to remove this restriction + this.maxDepth = + typeof opt.maxDepth === 'number' ? + opt.maxDepth + : DEFAULT_MAX_DEPTH; + // mostly just for testing, but useful in some cases. + // Forcibly trigger a chown on every entry, no matter what + this.forceChown = opt.forceChown === true; + // turn > this[ONENTRY](entry)); + } + // a bad or damaged archive is a warning for Parser, but an error + // when extracting. Mark those errors as unrecoverable, because + // the Unpack contract cannot be met. + warn(code, msg, data = {}) { + if (code === 'TAR_BAD_ARCHIVE' || code === 'TAR_ABORT') { + data.recoverable = false; + } + return super.warn(code, msg, data); + } + [MAYBECLOSE]() { + if (this[ENDED] && this[PENDING] === 0) { + this.emit('prefinish'); + this.emit('finish'); + this.emit('end'); + } + } + [CHECKPATH](entry) { + const p = normalizeWindowsPath(entry.path); + const parts = p.split('/'); + if (this.strip) { + if (parts.length < this.strip) { + return false; + } + if (entry.type === 'Link') { + const linkparts = normalizeWindowsPath(String(entry.linkpath)).split('/'); + if (linkparts.length >= this.strip) { + entry.linkpath = linkparts.slice(this.strip).join('/'); + } + else { + return false; + } + } + parts.splice(0, this.strip); + entry.path = parts.join('/'); + } + if (isFinite(this.maxDepth) && parts.length > this.maxDepth) { + this.warn('TAR_ENTRY_ERROR', 'path excessively deep', { + entry, + path: p, + depth: parts.length, + maxDepth: this.maxDepth, + }); + return false; + } + if (!this.preservePaths) { + if (parts.includes('..') || + /* c8 ignore next */ + (isWindows && /^[a-z]:\.\.$/i.test(parts[0] ?? ''))) { + this.warn('TAR_ENTRY_ERROR', `path contains '..'`, { + entry, + path: p, + }); + return false; + } + // strip off the root + const [root, stripped] = stripAbsolutePath(p); + if (root) { + entry.path = String(stripped); + this.warn('TAR_ENTRY_INFO', `stripping ${root} from absolute path`, { + entry, + path: p, + }); + } + } + if (path.isAbsolute(entry.path)) { + entry.absolute = normalizeWindowsPath(path.resolve(entry.path)); + } + else { + entry.absolute = normalizeWindowsPath(path.resolve(this.cwd, entry.path)); + } + // if we somehow ended up with a path that escapes the cwd, and we are + // not in preservePaths mode, then something is fishy! This should have + // been prevented above, so ignore this for coverage. + /* c8 ignore start - defense in depth */ + if (!this.preservePaths && + typeof entry.absolute === 'string' && + entry.absolute.indexOf(this.cwd + '/') !== 0 && + entry.absolute !== this.cwd) { + this.warn('TAR_ENTRY_ERROR', 'path escaped extraction target', { + entry, + path: normalizeWindowsPath(entry.path), + resolvedPath: entry.absolute, + cwd: this.cwd, + }); + return false; + } + /* c8 ignore stop */ + // an archive can set properties on the extraction directory, but it + // may not replace the cwd with a different kind of thing entirely. + if (entry.absolute === this.cwd && + entry.type !== 'Directory' && + entry.type !== 'GNUDumpDir') { + return false; + } + // only encode : chars that aren't drive letter indicators + if (this.win32) { + const { root: aRoot } = path.win32.parse(String(entry.absolute)); + entry.absolute = + aRoot + wc.encode(String(entry.absolute).slice(aRoot.length)); + const { root: pRoot } = path.win32.parse(entry.path); + entry.path = pRoot + wc.encode(entry.path.slice(pRoot.length)); + } + return true; + } + [ONENTRY](entry) { + if (!this[CHECKPATH](entry)) { + return entry.resume(); + } + assert.equal(typeof entry.absolute, 'string'); + switch (entry.type) { + case 'Directory': + case 'GNUDumpDir': + if (entry.mode) { + entry.mode = entry.mode | 0o700; + } + // eslint-disable-next-line no-fallthrough + case 'File': + case 'OldFile': + case 'ContiguousFile': + case 'Link': + case 'SymbolicLink': + return this[CHECKFS](entry); + case 'CharacterDevice': + case 'BlockDevice': + case 'FIFO': + default: + return this[UNSUPPORTED](entry); + } + } + [ONERROR](er, entry) { + // Cwd has to exist, or else nothing works. That's serious. + // Other errors are warnings, which raise the error in strict + // mode, but otherwise continue on. + if (er.name === 'CwdError') { + this.emit('error', er); + } + else { + this.warn('TAR_ENTRY_ERROR', er, { entry }); + this[UNPEND](); + entry.resume(); + } + } + [MKDIR](dir, mode, cb) { + mkdir(normalizeWindowsPath(dir), { + uid: this.uid, + gid: this.gid, + processUid: this.processUid, + processGid: this.processGid, + umask: this.processUmask, + preserve: this.preservePaths, + unlink: this.unlink, + cache: this.dirCache, + cwd: this.cwd, + mode: mode, + }, cb); + } + [DOCHOWN](entry) { + // in preserve owner mode, chown if the entry doesn't match process + // in set owner mode, chown if setting doesn't match process + return (this.forceChown || + (this.preserveOwner && + ((typeof entry.uid === 'number' && + entry.uid !== this.processUid) || + (typeof entry.gid === 'number' && + entry.gid !== this.processGid))) || + (typeof this.uid === 'number' && + this.uid !== this.processUid) || + (typeof this.gid === 'number' && this.gid !== this.processGid)); + } + [UID](entry) { + return uint32(this.uid, entry.uid, this.processUid); + } + [GID](entry) { + return uint32(this.gid, entry.gid, this.processGid); + } + [FILE](entry, fullyDone) { + const mode = typeof entry.mode === 'number' ? + entry.mode & 0o7777 + : this.fmode; + const stream = new fsm.WriteStream(String(entry.absolute), { + // slight lie, but it can be numeric flags + flags: getWriteFlag(entry.size), + mode: mode, + autoClose: false, + }); + stream.on('error', (er) => { + if (stream.fd) { + fs.close(stream.fd, () => { }); + } + // flush all the data out so that we aren't left hanging + // if the error wasn't actually fatal. otherwise the parse + // is blocked, and we never proceed. + stream.write = () => true; + this[ONERROR](er, entry); + fullyDone(); + }); + let actions = 1; + const done = (er) => { + if (er) { + /* c8 ignore start - we should always have a fd by now */ + if (stream.fd) { + fs.close(stream.fd, () => { }); + } + /* c8 ignore stop */ + this[ONERROR](er, entry); + fullyDone(); + return; + } + if (--actions === 0) { + if (stream.fd !== undefined) { + fs.close(stream.fd, er => { + if (er) { + this[ONERROR](er, entry); + } + else { + this[UNPEND](); + } + fullyDone(); + }); + } + } + }; + stream.on('finish', () => { + // if futimes fails, try utimes + // if utimes fails, fail with the original error + // same for fchown/chown + const abs = String(entry.absolute); + const fd = stream.fd; + if (typeof fd === 'number' && entry.mtime && !this.noMtime) { + actions++; + const atime = entry.atime || new Date(); + const mtime = entry.mtime; + fs.futimes(fd, atime, mtime, er => er ? + fs.utimes(abs, atime, mtime, er2 => done(er2 && er)) + : done()); + } + if (typeof fd === 'number' && this[DOCHOWN](entry)) { + actions++; + const uid = this[UID](entry); + const gid = this[GID](entry); + if (typeof uid === 'number' && typeof gid === 'number') { + fs.fchown(fd, uid, gid, er => er ? + fs.chown(abs, uid, gid, er2 => done(er2 && er)) + : done()); + } + } + done(); + }); + const tx = this.transform ? this.transform(entry) || entry : entry; + if (tx !== entry) { + tx.on('error', (er) => { + this[ONERROR](er, entry); + fullyDone(); + }); + entry.pipe(tx); + } + tx.pipe(stream); + } + [DIRECTORY](entry, fullyDone) { + const mode = typeof entry.mode === 'number' ? + entry.mode & 0o7777 + : this.dmode; + this[MKDIR](String(entry.absolute), mode, er => { + if (er) { + this[ONERROR](er, entry); + fullyDone(); + return; + } + let actions = 1; + const done = () => { + if (--actions === 0) { + fullyDone(); + this[UNPEND](); + entry.resume(); + } + }; + if (entry.mtime && !this.noMtime) { + actions++; + fs.utimes(String(entry.absolute), entry.atime || new Date(), entry.mtime, done); + } + if (this[DOCHOWN](entry)) { + actions++; + fs.chown(String(entry.absolute), Number(this[UID](entry)), Number(this[GID](entry)), done); + } + done(); + }); + } + [UNSUPPORTED](entry) { + entry.unsupported = true; + this.warn('TAR_ENTRY_UNSUPPORTED', `unsupported entry type: ${entry.type}`, { entry }); + entry.resume(); + } + [SYMLINK](entry, done) { + this[LINK](entry, String(entry.linkpath), 'symlink', done); + } + [HARDLINK](entry, done) { + const linkpath = normalizeWindowsPath(path.resolve(this.cwd, String(entry.linkpath))); + this[LINK](entry, linkpath, 'link', done); + } + [PEND]() { + this[PENDING]++; + } + [UNPEND]() { + this[PENDING]--; + this[MAYBECLOSE](); + } + [SKIP](entry) { + this[UNPEND](); + entry.resume(); + } + // Check if we can reuse an existing filesystem entry safely and + // overwrite it, rather than unlinking and recreating + // Windows doesn't report a useful nlink, so we just never reuse entries + [ISREUSABLE](entry, st) { + return (entry.type === 'File' && + !this.unlink && + st.isFile() && + st.nlink <= 1 && + !isWindows); + } + // check if a thing is there, and if so, try to clobber it + [CHECKFS](entry) { + this[PEND](); + const paths = [entry.path]; + if (entry.linkpath) { + paths.push(entry.linkpath); + } + this.reservations.reserve(paths, done => this[CHECKFS2](entry, done)); + } + [PRUNECACHE](entry) { + // if we are not creating a directory, and the path is in the dirCache, + // then that means we are about to delete the directory we created + // previously, and it is no longer going to be a directory, and neither + // is any of its children. + // If a symbolic link is encountered, all bets are off. There is no + // reasonable way to sanitize the cache in such a way we will be able to + // avoid having filesystem collisions. If this happens with a non-symlink + // entry, it'll just fail to unpack, but a symlink to a directory, using an + // 8.3 shortname or certain unicode attacks, can evade detection and lead + // to arbitrary writes to anywhere on the system. + if (entry.type === 'SymbolicLink') { + dropCache(this.dirCache); + } + else if (entry.type !== 'Directory') { + pruneCache(this.dirCache, String(entry.absolute)); + } + } + [CHECKFS2](entry, fullyDone) { + this[PRUNECACHE](entry); + const done = (er) => { + this[PRUNECACHE](entry); + fullyDone(er); + }; + const checkCwd = () => { + this[MKDIR](this.cwd, this.dmode, er => { + if (er) { + this[ONERROR](er, entry); + done(); + return; + } + this[CHECKED_CWD] = true; + start(); + }); + }; + const start = () => { + if (entry.absolute !== this.cwd) { + const parent = normalizeWindowsPath(path.dirname(String(entry.absolute))); + if (parent !== this.cwd) { + return this[MKDIR](parent, this.dmode, er => { + if (er) { + this[ONERROR](er, entry); + done(); + return; + } + afterMakeParent(); + }); + } + } + afterMakeParent(); + }; + const afterMakeParent = () => { + fs.lstat(String(entry.absolute), (lstatEr, st) => { + if (st && + (this.keep || + /* c8 ignore next */ + (this.newer && st.mtime > (entry.mtime ?? st.mtime)))) { + this[SKIP](entry); + done(); + return; + } + if (lstatEr || this[ISREUSABLE](entry, st)) { + return this[MAKEFS](null, entry, done); + } + if (st.isDirectory()) { + if (entry.type === 'Directory') { + const needChmod = this.chmod && + entry.mode && + (st.mode & 0o7777) !== entry.mode; + const afterChmod = (er) => this[MAKEFS](er ?? null, entry, done); + if (!needChmod) { + return afterChmod(); + } + return fs.chmod(String(entry.absolute), Number(entry.mode), afterChmod); + } + // Not a dir entry, have to remove it. + // NB: the only way to end up with an entry that is the cwd + // itself, in such a way that == does not detect, is a + // tricky windows absolute path with UNC or 8.3 parts (and + // preservePaths:true, or else it will have been stripped). + // In that case, the user has opted out of path protections + // explicitly, so if they blow away the cwd, c'est la vie. + if (entry.absolute !== this.cwd) { + return fs.rmdir(String(entry.absolute), (er) => this[MAKEFS](er ?? null, entry, done)); + } + } + // not a dir, and not reusable + // don't remove if the cwd, we want that error + if (entry.absolute === this.cwd) { + return this[MAKEFS](null, entry, done); + } + unlinkFile(String(entry.absolute), er => this[MAKEFS](er ?? null, entry, done)); + }); + }; + if (this[CHECKED_CWD]) { + start(); + } + else { + checkCwd(); + } + } + [MAKEFS](er, entry, done) { + if (er) { + this[ONERROR](er, entry); + done(); + return; + } + switch (entry.type) { + case 'File': + case 'OldFile': + case 'ContiguousFile': + return this[FILE](entry, done); + case 'Link': + return this[HARDLINK](entry, done); + case 'SymbolicLink': + return this[SYMLINK](entry, done); + case 'Directory': + case 'GNUDumpDir': + return this[DIRECTORY](entry, done); + } + } + [LINK](entry, linkpath, link, done) { + // XXX: get the type ('symlink' or 'junction') for windows + fs[link](linkpath, String(entry.absolute), er => { + if (er) { + this[ONERROR](er, entry); + } + else { + this[UNPEND](); + entry.resume(); + } + done(); + }); + } +} +const callSync = (fn) => { + try { + return [null, fn()]; + } + catch (er) { + return [er, null]; + } +}; +export class UnpackSync extends Unpack { + sync = true; + [MAKEFS](er, entry) { + return super[MAKEFS](er, entry, () => { }); + } + [CHECKFS](entry) { + this[PRUNECACHE](entry); + if (!this[CHECKED_CWD]) { + const er = this[MKDIR](this.cwd, this.dmode); + if (er) { + return this[ONERROR](er, entry); + } + this[CHECKED_CWD] = true; + } + // don't bother to make the parent if the current entry is the cwd, + // we've already checked it. + if (entry.absolute !== this.cwd) { + const parent = normalizeWindowsPath(path.dirname(String(entry.absolute))); + if (parent !== this.cwd) { + const mkParent = this[MKDIR](parent, this.dmode); + if (mkParent) { + return this[ONERROR](mkParent, entry); + } + } + } + const [lstatEr, st] = callSync(() => fs.lstatSync(String(entry.absolute))); + if (st && + (this.keep || + /* c8 ignore next */ + (this.newer && st.mtime > (entry.mtime ?? st.mtime)))) { + return this[SKIP](entry); + } + if (lstatEr || this[ISREUSABLE](entry, st)) { + return this[MAKEFS](null, entry); + } + if (st.isDirectory()) { + if (entry.type === 'Directory') { + const needChmod = this.chmod && + entry.mode && + (st.mode & 0o7777) !== entry.mode; + const [er] = needChmod ? + callSync(() => { + fs.chmodSync(String(entry.absolute), Number(entry.mode)); + }) + : []; + return this[MAKEFS](er, entry); + } + // not a dir entry, have to remove it + const [er] = callSync(() => fs.rmdirSync(String(entry.absolute))); + this[MAKEFS](er, entry); + } + // not a dir, and not reusable. + // don't remove if it's the cwd, since we want that error. + const [er] = entry.absolute === this.cwd ? + [] + : callSync(() => unlinkFileSync(String(entry.absolute))); + this[MAKEFS](er, entry); + } + [FILE](entry, done) { + const mode = typeof entry.mode === 'number' ? + entry.mode & 0o7777 + : this.fmode; + const oner = (er) => { + let closeError; + try { + fs.closeSync(fd); + } + catch (e) { + closeError = e; + } + if (er || closeError) { + this[ONERROR](er || closeError, entry); + } + done(); + }; + let fd; + try { + fd = fs.openSync(String(entry.absolute), getWriteFlag(entry.size), mode); + } + catch (er) { + return oner(er); + } + const tx = this.transform ? this.transform(entry) || entry : entry; + if (tx !== entry) { + tx.on('error', (er) => this[ONERROR](er, entry)); + entry.pipe(tx); + } + tx.on('data', (chunk) => { + try { + fs.writeSync(fd, chunk, 0, chunk.length); + } + catch (er) { + oner(er); + } + }); + tx.on('end', () => { + let er = null; + // try both, falling futimes back to utimes + // if either fails, handle the first error + if (entry.mtime && !this.noMtime) { + const atime = entry.atime || new Date(); + const mtime = entry.mtime; + try { + fs.futimesSync(fd, atime, mtime); + } + catch (futimeser) { + try { + fs.utimesSync(String(entry.absolute), atime, mtime); + } + catch (utimeser) { + er = futimeser; + } + } + } + if (this[DOCHOWN](entry)) { + const uid = this[UID](entry); + const gid = this[GID](entry); + try { + fs.fchownSync(fd, Number(uid), Number(gid)); + } + catch (fchowner) { + try { + fs.chownSync(String(entry.absolute), Number(uid), Number(gid)); + } + catch (chowner) { + er = er || fchowner; + } + } + } + oner(er); + }); + } + [DIRECTORY](entry, done) { + const mode = typeof entry.mode === 'number' ? + entry.mode & 0o7777 + : this.dmode; + const er = this[MKDIR](String(entry.absolute), mode); + if (er) { + this[ONERROR](er, entry); + done(); + return; + } + if (entry.mtime && !this.noMtime) { + try { + fs.utimesSync(String(entry.absolute), entry.atime || new Date(), entry.mtime); + /* c8 ignore next */ + } + catch (er) { } + } + if (this[DOCHOWN](entry)) { + try { + fs.chownSync(String(entry.absolute), Number(this[UID](entry)), Number(this[GID](entry))); + } + catch (er) { } + } + done(); + entry.resume(); + } + [MKDIR](dir, mode) { + try { + return mkdirSync(normalizeWindowsPath(dir), { + uid: this.uid, + gid: this.gid, + processUid: this.processUid, + processGid: this.processGid, + umask: this.processUmask, + preserve: this.preservePaths, + unlink: this.unlink, + cache: this.dirCache, + cwd: this.cwd, + mode: mode, + }); + } + catch (er) { + return er; + } + } + [LINK](entry, linkpath, link, done) { + const ls = `${link}Sync`; + try { + fs[ls](linkpath, String(entry.absolute)); + done(); + entry.resume(); + } + catch (er) { + return this[ONERROR](er, entry); + } + } +} +//# sourceMappingURL=unpack.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/unpack.js.map b/node_modules/tar/dist/esm/unpack.js.map new file mode 100644 index 0000000..fc0a620 --- /dev/null +++ b/node_modules/tar/dist/esm/unpack.js.map @@ -0,0 +1 @@ +{"version":3,"file":"unpack.js","sourceRoot":"","sources":["../../src/unpack.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,wEAAwE;AACxE,yEAAyE;AACzE,wEAAwE;AACxE,8DAA8D;AAE9D,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAA;AAC1C,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAkB,MAAM,SAAS,CAAA;AACxC,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAA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CAAC;QAAC,OAAO,EAAE,EAAE,CAAC;YACZ,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,EAAW,EAAE,KAAK,CAAC,CAAA;QAC1C,CAAC;IACH,CAAC;CACF","sourcesContent":["// the PEND/UNPEND stuff tracks whether we're ready to emit end/close yet.\n// but the path reservations are required to avoid race conditions where\n// parallelized unpack ops may mess with one another, due to dependencies\n// (like a Link depending on its target) or destructive operations (like\n// clobbering an fs object to create one of a different type.)\n\nimport * as fsm from '@isaacs/fs-minipass'\nimport assert from 'node:assert'\nimport { randomBytes } from 'node:crypto'\nimport fs, { type Stats } from 'node:fs'\nimport path from 'node:path'\nimport { getWriteFlag } from './get-write-flag.js'\nimport { mkdir, MkdirError, mkdirSync } from './mkdir.js'\nimport { normalizeUnicode } from './normalize-unicode.js'\nimport { normalizeWindowsPath } from './normalize-windows-path.js'\nimport { Parser } from './parse.js'\nimport { stripAbsolutePath } from './strip-absolute-path.js'\nimport { stripTrailingSlashes } from './strip-trailing-slashes.js'\nimport * as wc from './winchars.js'\n\nimport { TarOptions } from './options.js'\nimport { PathReservations } from './path-reservations.js'\nimport { ReadEntry } from './read-entry.js'\nimport { WarnData } from './warn-method.js'\n\nconst ONENTRY = Symbol('onEntry')\nconst CHECKFS = Symbol('checkFs')\nconst CHECKFS2 = Symbol('checkFs2')\nconst PRUNECACHE = Symbol('pruneCache')\nconst ISREUSABLE = Symbol('isReusable')\nconst MAKEFS = Symbol('makeFs')\nconst FILE = Symbol('file')\nconst DIRECTORY = Symbol('directory')\nconst LINK = Symbol('link')\nconst SYMLINK = Symbol('symlink')\nconst HARDLINK = Symbol('hardlink')\nconst UNSUPPORTED = Symbol('unsupported')\nconst CHECKPATH = Symbol('checkPath')\nconst MKDIR = Symbol('mkdir')\nconst ONERROR = Symbol('onError')\nconst PENDING = Symbol('pending')\nconst PEND = Symbol('pend')\nconst UNPEND = Symbol('unpend')\nconst ENDED = Symbol('ended')\nconst MAYBECLOSE = Symbol('maybeClose')\nconst SKIP = Symbol('skip')\nconst DOCHOWN = Symbol('doChown')\nconst UID = Symbol('uid')\nconst GID = Symbol('gid')\nconst CHECKED_CWD = Symbol('checkedCwd')\nconst platform =\n process.env.TESTING_TAR_FAKE_PLATFORM || process.platform\nconst isWindows = platform === 'win32'\nconst DEFAULT_MAX_DEPTH = 1024\n\n// Unlinks on Windows are not atomic.\n//\n// This means that if you have a file entry, followed by another\n// file entry with an identical name, and you cannot re-use the file\n// (because it's a hardlink, or because unlink:true is set, or it's\n// Windows, which does not have useful nlink values), then the unlink\n// will be committed to the disk AFTER the new file has been written\n// over the old one, deleting the new file.\n//\n// To work around this, on Windows systems, we rename the file and then\n// delete the renamed file. It's a sloppy kludge, but frankly, I do not\n// know of a better way to do this, given windows' non-atomic unlink\n// semantics.\n//\n// See: https://github.com/npm/node-tar/issues/183\n/* c8 ignore start */\nconst unlinkFile = (\n path: string,\n cb: (er?: Error | null) => void,\n) => {\n if (!isWindows) {\n return fs.unlink(path, cb)\n }\n\n const name = path + '.DELETE.' + randomBytes(16).toString('hex')\n fs.rename(path, name, er => {\n if (er) {\n return cb(er)\n }\n fs.unlink(name, cb)\n })\n}\n/* c8 ignore stop */\n\n/* c8 ignore start */\nconst unlinkFileSync = (path: string) => {\n if (!isWindows) {\n return fs.unlinkSync(path)\n }\n\n const name = path + '.DELETE.' + randomBytes(16).toString('hex')\n fs.renameSync(path, name)\n fs.unlinkSync(name)\n}\n/* c8 ignore stop */\n\n// this.gid, entry.gid, this.processUid\nconst uint32 = (\n a: number | undefined,\n b: number | undefined,\n c: number | undefined,\n) =>\n a !== undefined && a === a >>> 0 ? a\n : b !== undefined && b === b >>> 0 ? b\n : c\n\n// clear the cache if it's a case-insensitive unicode-squashing match.\n// we can't know if the current file system is case-sensitive or supports\n// unicode fully, so we check for similarity on the maximally compatible\n// representation. Err on the side of pruning, since all it's doing is\n// preventing lstats, and it's not the end of the world if we get a false\n// positive.\n// Note that on windows, we always drop the entire cache whenever a\n// symbolic link is encountered, because 8.3 filenames are impossible\n// to reason about, and collisions are hazards rather than just failures.\nconst cacheKeyNormalize = (path: string) =>\n stripTrailingSlashes(\n normalizeWindowsPath(normalizeUnicode(path)),\n ).toLowerCase()\n\n// remove all cache entries matching ${abs}/**\nconst pruneCache = (cache: Map, abs: string) => {\n abs = cacheKeyNormalize(abs)\n for (const path of cache.keys()) {\n const pnorm = cacheKeyNormalize(path)\n if (pnorm === abs || pnorm.indexOf(abs + '/') === 0) {\n cache.delete(path)\n }\n }\n}\n\nconst dropCache = (cache: Map) => {\n for (const key of cache.keys()) {\n cache.delete(key)\n }\n}\n\nexport class Unpack extends Parser {\n [ENDED]: boolean = false;\n [CHECKED_CWD]: boolean = false;\n [PENDING]: number = 0\n\n reservations: PathReservations = new PathReservations()\n transform?: TarOptions['transform']\n writable: true = true\n readable: false = false\n dirCache: Exclude\n uid?: number\n gid?: number\n setOwner: boolean\n preserveOwner: boolean\n processGid?: number\n processUid?: number\n maxDepth: number\n forceChown: boolean\n win32: boolean\n newer: boolean\n keep: boolean\n noMtime: boolean\n preservePaths: boolean\n unlink: boolean\n cwd: string\n strip: number\n processUmask: number\n umask: number\n dmode: number\n fmode: number\n chmod: boolean\n\n constructor(opt: TarOptions = {}) {\n opt.ondone = () => {\n this[ENDED] = true\n this[MAYBECLOSE]()\n }\n\n super(opt)\n\n this.transform = opt.transform\n\n this.dirCache = opt.dirCache || new Map()\n this.chmod = !!opt.chmod\n\n if (typeof opt.uid === 'number' || typeof opt.gid === 'number') {\n // need both or neither\n if (\n typeof opt.uid !== 'number' ||\n typeof opt.gid !== 'number'\n ) {\n throw new TypeError(\n 'cannot set owner without number uid and gid',\n )\n }\n if (opt.preserveOwner) {\n throw new TypeError(\n 'cannot preserve owner in archive and also set owner explicitly',\n )\n }\n this.uid = opt.uid\n this.gid = opt.gid\n this.setOwner = true\n } else {\n this.uid = undefined\n this.gid = undefined\n this.setOwner = false\n }\n\n // default true for root\n if (\n opt.preserveOwner === undefined &&\n typeof opt.uid !== 'number'\n ) {\n this.preserveOwner = !!(\n process.getuid && process.getuid() === 0\n )\n } else {\n this.preserveOwner = !!opt.preserveOwner\n }\n\n this.processUid =\n (this.preserveOwner || this.setOwner) && process.getuid ?\n process.getuid()\n : undefined\n this.processGid =\n (this.preserveOwner || this.setOwner) && process.getgid ?\n process.getgid()\n : undefined\n\n // prevent excessively deep nesting of subfolders\n // set to `Infinity` to remove this restriction\n this.maxDepth =\n typeof opt.maxDepth === 'number' ?\n opt.maxDepth\n : DEFAULT_MAX_DEPTH\n\n // mostly just for testing, but useful in some cases.\n // Forcibly trigger a chown on every entry, no matter what\n this.forceChown = opt.forceChown === true\n\n // turn > this[ONENTRY](entry))\n }\n\n // a bad or damaged archive is a warning for Parser, but an error\n // when extracting. Mark those errors as unrecoverable, because\n // the Unpack contract cannot be met.\n warn(code: string, msg: string | Error, data: WarnData = {}) {\n if (code === 'TAR_BAD_ARCHIVE' || code === 'TAR_ABORT') {\n data.recoverable = false\n }\n return super.warn(code, msg, data)\n }\n\n [MAYBECLOSE]() {\n if (this[ENDED] && this[PENDING] === 0) {\n this.emit('prefinish')\n this.emit('finish')\n this.emit('end')\n }\n }\n\n [CHECKPATH](entry: ReadEntry) {\n const p = normalizeWindowsPath(entry.path)\n const parts = p.split('/')\n\n if (this.strip) {\n if (parts.length < this.strip) {\n return false\n }\n if (entry.type === 'Link') {\n const linkparts = normalizeWindowsPath(\n String(entry.linkpath),\n ).split('/')\n if (linkparts.length >= this.strip) {\n entry.linkpath = linkparts.slice(this.strip).join('/')\n } else {\n return false\n }\n }\n parts.splice(0, this.strip)\n entry.path = parts.join('/')\n }\n\n if (isFinite(this.maxDepth) && parts.length > this.maxDepth) {\n this.warn('TAR_ENTRY_ERROR', 'path excessively deep', {\n entry,\n path: p,\n depth: parts.length,\n maxDepth: this.maxDepth,\n })\n return false\n }\n\n if (!this.preservePaths) {\n if (\n parts.includes('..') ||\n /* c8 ignore next */\n (isWindows && /^[a-z]:\\.\\.$/i.test(parts[0] ?? ''))\n ) {\n this.warn('TAR_ENTRY_ERROR', `path contains '..'`, {\n entry,\n path: p,\n })\n return false\n }\n\n // strip off the root\n const [root, stripped] = stripAbsolutePath(p)\n if (root) {\n entry.path = String(stripped)\n this.warn(\n 'TAR_ENTRY_INFO',\n `stripping ${root} from absolute path`,\n {\n entry,\n path: p,\n },\n )\n }\n }\n\n if (path.isAbsolute(entry.path)) {\n entry.absolute = normalizeWindowsPath(path.resolve(entry.path))\n } else {\n entry.absolute = normalizeWindowsPath(\n path.resolve(this.cwd, entry.path),\n )\n }\n\n // if we somehow ended up with a path that escapes the cwd, and we are\n // not in preservePaths mode, then something is fishy! This should have\n // been prevented above, so ignore this for coverage.\n /* c8 ignore start - defense in depth */\n if (\n !this.preservePaths &&\n typeof entry.absolute === 'string' &&\n entry.absolute.indexOf(this.cwd + '/') !== 0 &&\n entry.absolute !== this.cwd\n ) {\n this.warn('TAR_ENTRY_ERROR', 'path escaped extraction target', {\n entry,\n path: normalizeWindowsPath(entry.path),\n resolvedPath: entry.absolute,\n cwd: this.cwd,\n })\n return false\n }\n /* c8 ignore stop */\n\n // an archive can set properties on the extraction directory, but it\n // may not replace the cwd with a different kind of thing entirely.\n if (\n entry.absolute === this.cwd &&\n entry.type !== 'Directory' &&\n entry.type !== 'GNUDumpDir'\n ) {\n return false\n }\n\n // only encode : chars that aren't drive letter indicators\n if (this.win32) {\n const { root: aRoot } = path.win32.parse(String(entry.absolute))\n entry.absolute =\n aRoot + wc.encode(String(entry.absolute).slice(aRoot.length))\n const { root: pRoot } = path.win32.parse(entry.path)\n entry.path = pRoot + wc.encode(entry.path.slice(pRoot.length))\n }\n\n return true\n }\n\n [ONENTRY](entry: ReadEntry) {\n if (!this[CHECKPATH](entry)) {\n return entry.resume()\n }\n\n assert.equal(typeof entry.absolute, 'string')\n\n switch (entry.type) {\n case 'Directory':\n case 'GNUDumpDir':\n if (entry.mode) {\n entry.mode = entry.mode | 0o700\n }\n\n // eslint-disable-next-line no-fallthrough\n case 'File':\n case 'OldFile':\n case 'ContiguousFile':\n case 'Link':\n case 'SymbolicLink':\n return this[CHECKFS](entry)\n\n case 'CharacterDevice':\n case 'BlockDevice':\n case 'FIFO':\n default:\n return this[UNSUPPORTED](entry)\n }\n }\n\n [ONERROR](er: Error, entry: ReadEntry) {\n // Cwd has to exist, or else nothing works. That's serious.\n // Other errors are warnings, which raise the error in strict\n // mode, but otherwise continue on.\n if (er.name === 'CwdError') {\n this.emit('error', er)\n } else {\n this.warn('TAR_ENTRY_ERROR', er, { entry })\n this[UNPEND]()\n entry.resume()\n }\n }\n\n [MKDIR](\n dir: string,\n mode: number,\n cb: (er?: null | MkdirError, made?: string) => void,\n ) {\n mkdir(\n normalizeWindowsPath(dir),\n {\n uid: this.uid,\n gid: this.gid,\n processUid: this.processUid,\n processGid: this.processGid,\n umask: this.processUmask,\n preserve: this.preservePaths,\n unlink: this.unlink,\n cache: this.dirCache,\n cwd: this.cwd,\n mode: mode,\n },\n cb,\n )\n }\n\n [DOCHOWN](entry: ReadEntry) {\n // in preserve owner mode, chown if the entry doesn't match process\n // in set owner mode, chown if setting doesn't match process\n return (\n this.forceChown ||\n (this.preserveOwner &&\n ((typeof entry.uid === 'number' &&\n entry.uid !== this.processUid) ||\n (typeof entry.gid === 'number' &&\n entry.gid !== this.processGid))) ||\n (typeof this.uid === 'number' &&\n this.uid !== this.processUid) ||\n (typeof this.gid === 'number' && this.gid !== this.processGid)\n )\n }\n\n [UID](entry: ReadEntry) {\n return uint32(this.uid, entry.uid, this.processUid)\n }\n\n [GID](entry: ReadEntry) {\n return uint32(this.gid, entry.gid, this.processGid)\n }\n\n [FILE](entry: ReadEntry, fullyDone: () => void) {\n const mode =\n typeof entry.mode === 'number' ?\n entry.mode & 0o7777\n : this.fmode\n const stream = new fsm.WriteStream(String(entry.absolute), {\n // slight lie, but it can be numeric flags\n flags: getWriteFlag(entry.size) as string,\n mode: mode,\n autoClose: false,\n })\n stream.on('error', (er: Error) => {\n if (stream.fd) {\n fs.close(stream.fd, () => {})\n }\n\n // flush all the data out so that we aren't left hanging\n // if the error wasn't actually fatal. otherwise the parse\n // is blocked, and we never proceed.\n stream.write = () => true\n this[ONERROR](er, entry)\n fullyDone()\n })\n\n let actions = 1\n const done = (er?: null | Error) => {\n if (er) {\n /* c8 ignore start - we should always have a fd by now */\n if (stream.fd) {\n fs.close(stream.fd, () => {})\n }\n /* c8 ignore stop */\n\n this[ONERROR](er, entry)\n fullyDone()\n return\n }\n\n if (--actions === 0) {\n if (stream.fd !== undefined) {\n fs.close(stream.fd, er => {\n if (er) {\n this[ONERROR](er, entry)\n } else {\n this[UNPEND]()\n }\n fullyDone()\n })\n }\n }\n }\n\n stream.on('finish', () => {\n // if futimes fails, try utimes\n // if utimes fails, fail with the original error\n // same for fchown/chown\n const abs = String(entry.absolute)\n const fd = stream.fd\n\n if (typeof fd === 'number' && entry.mtime && !this.noMtime) {\n actions++\n const atime = entry.atime || new Date()\n const mtime = entry.mtime\n fs.futimes(fd, atime, mtime, er =>\n er ?\n fs.utimes(abs, atime, mtime, er2 => done(er2 && er))\n : done(),\n )\n }\n\n if (typeof fd === 'number' && this[DOCHOWN](entry)) {\n actions++\n const uid = this[UID](entry)\n const gid = this[GID](entry)\n if (typeof uid === 'number' && typeof gid === 'number') {\n fs.fchown(fd, uid, gid, er =>\n er ?\n fs.chown(abs, uid, gid, er2 => done(er2 && er))\n : done(),\n )\n }\n }\n\n done()\n })\n\n const tx = this.transform ? this.transform(entry) || entry : entry\n if (tx !== entry) {\n tx.on('error', (er: Error) => {\n this[ONERROR](er, entry)\n fullyDone()\n })\n entry.pipe(tx)\n }\n tx.pipe(stream)\n }\n\n [DIRECTORY](entry: ReadEntry, fullyDone: () => void) {\n const mode =\n typeof entry.mode === 'number' ?\n entry.mode & 0o7777\n : this.dmode\n this[MKDIR](String(entry.absolute), mode, er => {\n if (er) {\n this[ONERROR](er, entry)\n fullyDone()\n return\n }\n\n let actions = 1\n const done = () => {\n if (--actions === 0) {\n fullyDone()\n this[UNPEND]()\n entry.resume()\n }\n }\n\n if (entry.mtime && !this.noMtime) {\n actions++\n fs.utimes(\n String(entry.absolute),\n entry.atime || new Date(),\n entry.mtime,\n done,\n )\n }\n\n if (this[DOCHOWN](entry)) {\n actions++\n fs.chown(\n String(entry.absolute),\n Number(this[UID](entry)),\n Number(this[GID](entry)),\n done,\n )\n }\n\n done()\n })\n }\n\n [UNSUPPORTED](entry: ReadEntry) {\n entry.unsupported = true\n this.warn(\n 'TAR_ENTRY_UNSUPPORTED',\n `unsupported entry type: ${entry.type}`,\n { entry },\n )\n entry.resume()\n }\n\n [SYMLINK](entry: ReadEntry, done: () => void) {\n this[LINK](entry, String(entry.linkpath), 'symlink', done)\n }\n\n [HARDLINK](entry: ReadEntry, done: () => void) {\n const linkpath = normalizeWindowsPath(\n path.resolve(this.cwd, String(entry.linkpath)),\n )\n this[LINK](entry, linkpath, 'link', done)\n }\n\n [PEND]() {\n this[PENDING]++\n }\n\n [UNPEND]() {\n this[PENDING]--\n this[MAYBECLOSE]()\n }\n\n [SKIP](entry: ReadEntry) {\n this[UNPEND]()\n entry.resume()\n }\n\n // Check if we can reuse an existing filesystem entry safely and\n // overwrite it, rather than unlinking and recreating\n // Windows doesn't report a useful nlink, so we just never reuse entries\n [ISREUSABLE](entry: ReadEntry, st: Stats) {\n return (\n entry.type === 'File' &&\n !this.unlink &&\n st.isFile() &&\n st.nlink <= 1 &&\n !isWindows\n )\n }\n\n // check if a thing is there, and if so, try to clobber it\n [CHECKFS](entry: ReadEntry) {\n this[PEND]()\n const paths = [entry.path]\n if (entry.linkpath) {\n paths.push(entry.linkpath)\n }\n this.reservations.reserve(paths, done =>\n this[CHECKFS2](entry, done),\n )\n }\n\n [PRUNECACHE](entry: ReadEntry) {\n // if we are not creating a directory, and the path is in the dirCache,\n // then that means we are about to delete the directory we created\n // previously, and it is no longer going to be a directory, and neither\n // is any of its children.\n // If a symbolic link is encountered, all bets are off. There is no\n // reasonable way to sanitize the cache in such a way we will be able to\n // avoid having filesystem collisions. If this happens with a non-symlink\n // entry, it'll just fail to unpack, but a symlink to a directory, using an\n // 8.3 shortname or certain unicode attacks, can evade detection and lead\n // to arbitrary writes to anywhere on the system.\n if (entry.type === 'SymbolicLink') {\n dropCache(this.dirCache)\n } else if (entry.type !== 'Directory') {\n pruneCache(this.dirCache, String(entry.absolute))\n }\n }\n\n [CHECKFS2](entry: ReadEntry, fullyDone: (er?: Error) => void) {\n this[PRUNECACHE](entry)\n\n const done = (er?: Error) => {\n this[PRUNECACHE](entry)\n fullyDone(er)\n }\n\n const checkCwd = () => {\n this[MKDIR](this.cwd, this.dmode, er => {\n if (er) {\n this[ONERROR](er, entry)\n done()\n return\n }\n this[CHECKED_CWD] = true\n start()\n })\n }\n\n const start = () => {\n if (entry.absolute !== this.cwd) {\n const parent = normalizeWindowsPath(\n path.dirname(String(entry.absolute)),\n )\n if (parent !== this.cwd) {\n return this[MKDIR](parent, this.dmode, er => {\n if (er) {\n this[ONERROR](er, entry)\n done()\n return\n }\n afterMakeParent()\n })\n }\n }\n afterMakeParent()\n }\n\n const afterMakeParent = () => {\n fs.lstat(String(entry.absolute), (lstatEr, st) => {\n if (\n st &&\n (this.keep ||\n /* c8 ignore next */\n (this.newer && st.mtime > (entry.mtime ?? st.mtime)))\n ) {\n this[SKIP](entry)\n done()\n return\n }\n if (lstatEr || this[ISREUSABLE](entry, st)) {\n return this[MAKEFS](null, entry, done)\n }\n\n if (st.isDirectory()) {\n if (entry.type === 'Directory') {\n const needChmod =\n this.chmod &&\n entry.mode &&\n (st.mode & 0o7777) !== entry.mode\n const afterChmod = (er?: Error | null | undefined) =>\n this[MAKEFS](er ?? null, entry, done)\n if (!needChmod) {\n return afterChmod()\n }\n return fs.chmod(\n String(entry.absolute),\n Number(entry.mode),\n afterChmod,\n )\n }\n // Not a dir entry, have to remove it.\n // NB: the only way to end up with an entry that is the cwd\n // itself, in such a way that == does not detect, is a\n // tricky windows absolute path with UNC or 8.3 parts (and\n // preservePaths:true, or else it will have been stripped).\n // In that case, the user has opted out of path protections\n // explicitly, so if they blow away the cwd, c'est la vie.\n if (entry.absolute !== this.cwd) {\n return fs.rmdir(\n String(entry.absolute),\n (er?: null | Error) =>\n this[MAKEFS](er ?? null, entry, done),\n )\n }\n }\n\n // not a dir, and not reusable\n // don't remove if the cwd, we want that error\n if (entry.absolute === this.cwd) {\n return this[MAKEFS](null, entry, done)\n }\n\n unlinkFile(String(entry.absolute), er =>\n this[MAKEFS](er ?? null, entry, done),\n )\n })\n }\n\n if (this[CHECKED_CWD]) {\n start()\n } else {\n checkCwd()\n }\n }\n\n [MAKEFS](\n er: null | undefined | Error,\n entry: ReadEntry,\n done: () => void,\n ) {\n if (er) {\n this[ONERROR](er, entry)\n done()\n return\n }\n\n switch (entry.type) {\n case 'File':\n case 'OldFile':\n case 'ContiguousFile':\n return this[FILE](entry, done)\n\n case 'Link':\n return this[HARDLINK](entry, done)\n\n case 'SymbolicLink':\n return this[SYMLINK](entry, done)\n\n case 'Directory':\n case 'GNUDumpDir':\n return this[DIRECTORY](entry, done)\n }\n }\n\n [LINK](\n entry: ReadEntry,\n linkpath: string,\n link: 'link' | 'symlink',\n done: () => void,\n ) {\n // XXX: get the type ('symlink' or 'junction') for windows\n fs[link](linkpath, String(entry.absolute), er => {\n if (er) {\n this[ONERROR](er, entry)\n } else {\n this[UNPEND]()\n entry.resume()\n }\n done()\n })\n }\n}\n\nconst callSync = (fn: () => any) => {\n try {\n return [null, fn()]\n } catch (er) {\n return [er, null]\n }\n}\n\nexport class UnpackSync extends Unpack {\n sync: true = true;\n\n [MAKEFS](er: null | Error | undefined, entry: ReadEntry) {\n return super[MAKEFS](er, entry, () => {})\n }\n\n [CHECKFS](entry: ReadEntry) {\n this[PRUNECACHE](entry)\n\n if (!this[CHECKED_CWD]) {\n const er = this[MKDIR](this.cwd, this.dmode)\n if (er) {\n return this[ONERROR](er as Error, entry)\n }\n this[CHECKED_CWD] = true\n }\n\n // don't bother to make the parent if the current entry is the cwd,\n // we've already checked it.\n if (entry.absolute !== this.cwd) {\n const parent = normalizeWindowsPath(\n path.dirname(String(entry.absolute)),\n )\n if (parent !== this.cwd) {\n const mkParent = this[MKDIR](parent, this.dmode)\n if (mkParent) {\n return this[ONERROR](mkParent as Error, entry)\n }\n }\n }\n\n const [lstatEr, st] = callSync(() =>\n fs.lstatSync(String(entry.absolute)),\n )\n if (\n st &&\n (this.keep ||\n /* c8 ignore next */\n (this.newer && st.mtime > (entry.mtime ?? st.mtime)))\n ) {\n return this[SKIP](entry)\n }\n\n if (lstatEr || this[ISREUSABLE](entry, st)) {\n return this[MAKEFS](null, entry)\n }\n\n if (st.isDirectory()) {\n if (entry.type === 'Directory') {\n const needChmod =\n this.chmod &&\n entry.mode &&\n (st.mode & 0o7777) !== entry.mode\n const [er] =\n needChmod ?\n callSync(() => {\n fs.chmodSync(String(entry.absolute), Number(entry.mode))\n })\n : []\n return this[MAKEFS](er, entry)\n }\n // not a dir entry, have to remove it\n const [er] = callSync(() =>\n fs.rmdirSync(String(entry.absolute)),\n )\n this[MAKEFS](er, entry)\n }\n\n // not a dir, and not reusable.\n // don't remove if it's the cwd, since we want that error.\n const [er] =\n entry.absolute === this.cwd ?\n []\n : callSync(() => unlinkFileSync(String(entry.absolute)))\n this[MAKEFS](er, entry)\n }\n\n [FILE](entry: ReadEntry, done: () => void) {\n const mode =\n typeof entry.mode === 'number' ?\n entry.mode & 0o7777\n : this.fmode\n\n const oner = (er?: null | Error | undefined) => {\n let closeError\n try {\n fs.closeSync(fd)\n } catch (e) {\n closeError = e\n }\n if (er || closeError) {\n this[ONERROR]((er as Error) || closeError, entry)\n }\n done()\n }\n\n let fd: number\n try {\n fd = fs.openSync(\n String(entry.absolute),\n getWriteFlag(entry.size),\n mode,\n )\n } catch (er) {\n return oner(er as Error)\n }\n const tx = this.transform ? this.transform(entry) || entry : entry\n if (tx !== entry) {\n tx.on('error', (er: Error) => this[ONERROR](er, entry))\n entry.pipe(tx)\n }\n\n tx.on('data', (chunk: Buffer) => {\n try {\n fs.writeSync(fd, chunk, 0, chunk.length)\n } catch (er) {\n oner(er as Error)\n }\n })\n\n tx.on('end', () => {\n let er = null\n // try both, falling futimes back to utimes\n // if either fails, handle the first error\n if (entry.mtime && !this.noMtime) {\n const atime = entry.atime || new Date()\n const mtime = entry.mtime\n try {\n fs.futimesSync(fd, atime, mtime)\n } catch (futimeser) {\n try {\n fs.utimesSync(String(entry.absolute), atime, mtime)\n } catch (utimeser) {\n er = futimeser\n }\n }\n }\n\n if (this[DOCHOWN](entry)) {\n const uid = this[UID](entry)\n const gid = this[GID](entry)\n\n try {\n fs.fchownSync(fd, Number(uid), Number(gid))\n } catch (fchowner) {\n try {\n fs.chownSync(\n String(entry.absolute),\n Number(uid),\n Number(gid),\n )\n } catch (chowner) {\n er = er || fchowner\n }\n }\n }\n\n oner(er as Error)\n })\n }\n\n [DIRECTORY](entry: ReadEntry, done: () => void) {\n const mode =\n typeof entry.mode === 'number' ?\n entry.mode & 0o7777\n : this.dmode\n const er = this[MKDIR](String(entry.absolute), mode)\n if (er) {\n this[ONERROR](er as Error, entry)\n done()\n return\n }\n if (entry.mtime && !this.noMtime) {\n try {\n fs.utimesSync(\n String(entry.absolute),\n entry.atime || new Date(),\n entry.mtime,\n )\n /* c8 ignore next */\n } catch (er) {}\n }\n if (this[DOCHOWN](entry)) {\n try {\n fs.chownSync(\n String(entry.absolute),\n Number(this[UID](entry)),\n Number(this[GID](entry)),\n )\n } catch (er) {}\n }\n done()\n entry.resume()\n }\n\n [MKDIR](dir: string, mode: number) {\n try {\n return mkdirSync(normalizeWindowsPath(dir), {\n uid: this.uid,\n gid: this.gid,\n processUid: this.processUid,\n processGid: this.processGid,\n umask: this.processUmask,\n preserve: this.preservePaths,\n unlink: this.unlink,\n cache: this.dirCache,\n cwd: this.cwd,\n mode: mode,\n })\n } catch (er) {\n return er\n }\n }\n\n [LINK](\n entry: ReadEntry,\n linkpath: string,\n link: 'link' | 'symlink',\n done: () => void,\n ) {\n const ls: `${typeof link}Sync` = `${link}Sync`\n try {\n fs[ls](linkpath, String(entry.absolute))\n done()\n entry.resume()\n } catch (er) {\n return this[ONERROR](er as Error, entry)\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/update.d.ts b/node_modules/tar/dist/esm/update.d.ts new file mode 100644 index 0000000..45784eb --- /dev/null +++ b/node_modules/tar/dist/esm/update.d.ts @@ -0,0 +1,2 @@ +export declare const update: import("./make-command.js").TarCommand; +//# sourceMappingURL=update.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/update.d.ts.map b/node_modules/tar/dist/esm/update.d.ts.map new file mode 100644 index 0000000..4f2ff18 --- /dev/null +++ b/node_modules/tar/dist/esm/update.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/update.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM,sDASlB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/update.js b/node_modules/tar/dist/esm/update.js new file mode 100644 index 0000000..21398e9 --- /dev/null +++ b/node_modules/tar/dist/esm/update.js @@ -0,0 +1,30 @@ +// tar -u +import { makeCommand } from './make-command.js'; +import { replace as r } from './replace.js'; +// just call tar.r with the filter and mtimeCache +export const update = makeCommand(r.syncFile, r.asyncFile, r.syncNoFile, r.asyncNoFile, (opt, entries = []) => { + r.validate?.(opt, entries); + mtimeFilter(opt); +}); +const mtimeFilter = (opt) => { + const filter = opt.filter; + if (!opt.mtimeCache) { + opt.mtimeCache = new Map(); + } + opt.filter = + filter ? + (path, stat) => filter(path, stat) && + !( + /* c8 ignore start */ + ((opt.mtimeCache?.get(path) ?? stat.mtime ?? 0) > + (stat.mtime ?? 0)) + /* c8 ignore stop */ + ) + : (path, stat) => !( + /* c8 ignore start */ + ((opt.mtimeCache?.get(path) ?? stat.mtime ?? 0) > + (stat.mtime ?? 0)) + /* c8 ignore stop */ + ); +}; +//# sourceMappingURL=update.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/update.js.map b/node_modules/tar/dist/esm/update.js.map new file mode 100644 index 0000000..611fae1 --- /dev/null +++ b/node_modules/tar/dist/esm/update.js.map @@ -0,0 +1 @@ +{"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/update.ts"],"names":[],"mappings":"AAAA,SAAS;AAET,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAG/C,OAAO,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,cAAc,CAAA;AAE3C,iDAAiD;AACjD,MAAM,CAAC,MAAM,MAAM,GAAG,WAAW,CAC/B,CAAC,CAAC,QAAQ,EACV,CAAC,CAAC,SAAS,EACX,CAAC,CAAC,UAAU,EACZ,CAAC,CAAC,WAAW,EACb,CAAC,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,EAAE;IACpB,CAAC,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;IAC1B,WAAW,CAAC,GAAG,CAAC,CAAA;AAClB,CAAC,CACF,CAAA;AAED,MAAM,WAAW,GAAG,CAAC,GAA0B,EAAE,EAAE;IACjD,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAA;IAEzB,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;QACpB,GAAG,CAAC,UAAU,GAAG,IAAI,GAAG,EAAE,CAAA;IAC5B,CAAC;IAED,GAAG,CAAC,MAAM;QACR,MAAM,CAAC,CAAC;YACN,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CACb,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC;gBAClB,CAAC;gBACC,qBAAqB;gBACrB,CACE,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;oBAC9C,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAClB;gBACD,oBAAoB;iBACrB;YACL,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CACb,CAAC;YACC,qBAAqB;YACrB,CACE,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;gBAC9C,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAClB;YACD,oBAAoB;aACrB,CAAA;AACT,CAAC,CAAA","sourcesContent":["// tar -u\n\nimport { makeCommand } from './make-command.js'\nimport { type TarOptionsWithAliases } from './options.js'\n\nimport { replace as r } from './replace.js'\n\n// just call tar.r with the filter and mtimeCache\nexport const update = makeCommand(\n r.syncFile,\n r.asyncFile,\n r.syncNoFile,\n r.asyncNoFile,\n (opt, entries = []) => {\n r.validate?.(opt, entries)\n mtimeFilter(opt)\n },\n)\n\nconst mtimeFilter = (opt: TarOptionsWithAliases) => {\n const filter = opt.filter\n\n if (!opt.mtimeCache) {\n opt.mtimeCache = new Map()\n }\n\n opt.filter =\n filter ?\n (path, stat) =>\n filter(path, stat) &&\n !(\n /* c8 ignore start */\n (\n (opt.mtimeCache?.get(path) ?? stat.mtime ?? 0) >\n (stat.mtime ?? 0)\n )\n /* c8 ignore stop */\n )\n : (path, stat) =>\n !(\n /* c8 ignore start */\n (\n (opt.mtimeCache?.get(path) ?? stat.mtime ?? 0) >\n (stat.mtime ?? 0)\n )\n /* c8 ignore stop */\n )\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/warn-method.d.ts b/node_modules/tar/dist/esm/warn-method.d.ts new file mode 100644 index 0000000..9d6a67f --- /dev/null +++ b/node_modules/tar/dist/esm/warn-method.d.ts @@ -0,0 +1,25 @@ +/// +import { type Minipass } from 'minipass'; +/** has a warn method */ +export type Warner = { + warn(code: string, message: string | Error, data: any): void; + file?: string; + cwd?: string; + strict?: boolean; + emit(event: 'warn', code: string, message: string, data?: WarnData): void; + emit(event: 'error', error: TarError): void; +}; +export type WarnEvent = Minipass.Events & { + warn: [code: string, message: string, data: WarnData]; +}; +export type WarnData = { + file?: string; + cwd?: string; + code?: string; + tarCode?: string; + recoverable?: boolean; + [k: string]: any; +}; +export type TarError = Error & WarnData; +export declare const warnMethod: (self: Warner, code: string, message: string | Error, data?: WarnData) => void; +//# sourceMappingURL=warn-method.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/warn-method.d.ts.map b/node_modules/tar/dist/esm/warn-method.d.ts.map new file mode 100644 index 0000000..1338043 --- /dev/null +++ b/node_modules/tar/dist/esm/warn-method.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"warn-method.d.ts","sourceRoot":"","sources":["../../src/warn-method.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC,wBAAwB;AACxB,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,EAAE,IAAI,EAAE,GAAG,GAAG,IAAI,CAAA;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB,IAAI,CACF,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,QAAQ,GACd,IAAI,CAAA;IACP,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAA;CAC5C,CAAA;AAED,MAAM,MAAM,SAAS,CAAC,CAAC,GAAG,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG;IACvD,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;CACtD,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAA;AAEvC,eAAO,MAAM,UAAU,SACf,MAAM,QACN,MAAM,WACH,MAAM,GAAG,KAAK,SACjB,QAAQ,SA2Bf,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/warn-method.js b/node_modules/tar/dist/esm/warn-method.js new file mode 100644 index 0000000..13e798a --- /dev/null +++ b/node_modules/tar/dist/esm/warn-method.js @@ -0,0 +1,27 @@ +export const warnMethod = (self, code, message, data = {}) => { + if (self.file) { + data.file = self.file; + } + if (self.cwd) { + data.cwd = self.cwd; + } + data.code = + (message instanceof Error && + message.code) || + code; + data.tarCode = code; + if (!self.strict && data.recoverable !== false) { + if (message instanceof Error) { + data = Object.assign(message, data); + message = message.message; + } + self.emit('warn', code, message, data); + } + else if (message instanceof Error) { + self.emit('error', Object.assign(message, data)); + } + else { + self.emit('error', Object.assign(new Error(`${code}: ${message}`), data)); + } +}; +//# sourceMappingURL=warn-method.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/warn-method.js.map b/node_modules/tar/dist/esm/warn-method.js.map new file mode 100644 index 0000000..1c1bbd3 --- /dev/null +++ b/node_modules/tar/dist/esm/warn-method.js.map @@ -0,0 +1 @@ +{"version":3,"file":"warn-method.js","sourceRoot":"","sources":["../../src/warn-method.ts"],"names":[],"mappings":"AAiCA,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,IAAY,EACZ,IAAY,EACZ,OAAuB,EACvB,OAAiB,EAAE,EACnB,EAAE;IACF,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;IACvB,CAAC;IACD,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAA;IACrB,CAAC;IACD,IAAI,CAAC,IAAI;QACP,CAAC,OAAO,YAAY,KAAK;YACtB,OAAiC,CAAC,IAAI,CAAC;YAC1C,IAAI,CAAA;IACN,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA;IACnB,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,KAAK,KAAK,EAAE,CAAC;QAC/C,IAAI,OAAO,YAAY,KAAK,EAAE,CAAC;YAC7B,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;YACnC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;QAC3B,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAA;IACxC,CAAC;SAAM,IAAI,OAAO,YAAY,KAAK,EAAE,CAAC;QACpC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAA;IAClD,CAAC;SAAM,CAAC;QACN,IAAI,CAAC,IAAI,CACP,OAAO,EACP,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,GAAG,IAAI,KAAK,OAAO,EAAE,CAAC,EAAE,IAAI,CAAC,CACtD,CAAA;IACH,CAAC;AACH,CAAC,CAAA","sourcesContent":["import { type Minipass } from 'minipass'\n\n/** has a warn method */\nexport type Warner = {\n warn(code: string, message: string | Error, data: any): void\n file?: string\n cwd?: string\n strict?: boolean\n\n emit(\n event: 'warn',\n code: string,\n message: string,\n data?: WarnData,\n ): void\n emit(event: 'error', error: TarError): void\n}\n\nexport type WarnEvent = Minipass.Events & {\n warn: [code: string, message: string, data: WarnData]\n}\n\nexport type WarnData = {\n file?: string\n cwd?: string\n code?: string\n tarCode?: string\n recoverable?: boolean\n [k: string]: any\n}\n\nexport type TarError = Error & WarnData\n\nexport const warnMethod = (\n self: Warner,\n code: string,\n message: string | Error,\n data: WarnData = {},\n) => {\n if (self.file) {\n data.file = self.file\n }\n if (self.cwd) {\n data.cwd = self.cwd\n }\n data.code =\n (message instanceof Error &&\n (message as NodeJS.ErrnoException).code) ||\n code\n data.tarCode = code\n if (!self.strict && data.recoverable !== false) {\n if (message instanceof Error) {\n data = Object.assign(message, data)\n message = message.message\n }\n self.emit('warn', code, message, data)\n } else if (message instanceof Error) {\n self.emit('error', Object.assign(message, data))\n } else {\n self.emit(\n 'error',\n Object.assign(new Error(`${code}: ${message}`), data),\n )\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/winchars.d.ts b/node_modules/tar/dist/esm/winchars.d.ts new file mode 100644 index 0000000..6c24143 --- /dev/null +++ b/node_modules/tar/dist/esm/winchars.d.ts @@ -0,0 +1,3 @@ +export declare const encode: (s: string) => string; +export declare const decode: (s: string) => string; +//# sourceMappingURL=winchars.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/winchars.d.ts.map b/node_modules/tar/dist/esm/winchars.d.ts.map new file mode 100644 index 0000000..7a6cd50 --- /dev/null +++ b/node_modules/tar/dist/esm/winchars.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"winchars.d.ts","sourceRoot":"","sources":["../../src/winchars.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,MAAM,MAAO,MAAM,WACwB,CAAA;AACxD,eAAO,MAAM,MAAM,MAAO,MAAM,WACwB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/winchars.js b/node_modules/tar/dist/esm/winchars.js new file mode 100644 index 0000000..c41eb86 --- /dev/null +++ b/node_modules/tar/dist/esm/winchars.js @@ -0,0 +1,9 @@ +// When writing files on Windows, translate the characters to their +// 0xf000 higher-encoded versions. +const raw = ['|', '<', '>', '?', ':']; +const win = raw.map(char => String.fromCharCode(0xf000 + char.charCodeAt(0))); +const toWin = new Map(raw.map((char, i) => [char, win[i]])); +const toRaw = new Map(win.map((char, i) => [char, raw[i]])); +export const encode = (s) => raw.reduce((s, c) => s.split(c).join(toWin.get(c)), s); +export const decode = (s) => win.reduce((s, c) => s.split(c).join(toRaw.get(c)), s); +//# sourceMappingURL=winchars.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/winchars.js.map b/node_modules/tar/dist/esm/winchars.js.map new file mode 100644 index 0000000..4394ba2 --- /dev/null +++ b/node_modules/tar/dist/esm/winchars.js.map @@ -0,0 +1 @@ +{"version":3,"file":"winchars.js","sourceRoot":"","sources":["../../src/winchars.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,kCAAkC;AAElC,MAAM,GAAG,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;AAErC,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CACzB,MAAM,CAAC,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CACjD,CAAA;AAED,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAC3D,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAE3D,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAS,EAAE,EAAE,CAClC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AACxD,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAS,EAAE,EAAE,CAClC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA","sourcesContent":["// When writing files on Windows, translate the characters to their\n// 0xf000 higher-encoded versions.\n\nconst raw = ['|', '<', '>', '?', ':']\n\nconst win = raw.map(char =>\n String.fromCharCode(0xf000 + char.charCodeAt(0)),\n)\n\nconst toWin = new Map(raw.map((char, i) => [char, win[i]]))\nconst toRaw = new Map(win.map((char, i) => [char, raw[i]]))\n\nexport const encode = (s: string) =>\n raw.reduce((s, c) => s.split(c).join(toWin.get(c)), s)\nexport const decode = (s: string) =>\n win.reduce((s, c) => s.split(c).join(toRaw.get(c)), s)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/write-entry.d.ts b/node_modules/tar/dist/esm/write-entry.d.ts new file mode 100644 index 0000000..2caeaf1 --- /dev/null +++ b/node_modules/tar/dist/esm/write-entry.d.ts @@ -0,0 +1,132 @@ +/// +/// +/// +import { type Stats } from 'fs'; +import { Minipass } from 'minipass'; +import { Header } from './header.js'; +import { TarOptions, TarOptionsWithAliases } from './options.js'; +import { ReadEntry } from './read-entry.js'; +import { EntryTypeName } from './types.js'; +import { WarnData, Warner, WarnEvent } from './warn-method.js'; +declare const PROCESS: unique symbol; +declare const FILE: unique symbol; +declare const DIRECTORY: unique symbol; +declare const SYMLINK: unique symbol; +declare const HARDLINK: unique symbol; +declare const HEADER: unique symbol; +declare const READ: unique symbol; +declare const LSTAT: unique symbol; +declare const ONLSTAT: unique symbol; +declare const ONREAD: unique symbol; +declare const ONREADLINK: unique symbol; +declare const OPENFILE: unique symbol; +declare const ONOPENFILE: unique symbol; +declare const CLOSE: unique symbol; +declare const MODE: unique symbol; +declare const AWAITDRAIN: unique symbol; +declare const ONDRAIN: unique symbol; +declare const PREFIX: unique symbol; +export declare class WriteEntry extends Minipass implements Warner { + #private; + path: string; + portable: boolean; + myuid: number; + myuser: string; + maxReadSize: number; + linkCache: Exclude; + statCache: Exclude; + preservePaths: boolean; + cwd: string; + strict: boolean; + mtime?: Date; + noPax: boolean; + noMtime: boolean; + prefix?: string; + fd?: number; + blockLen: number; + blockRemain: number; + buf?: Buffer; + pos: number; + remain: number; + length: number; + offset: number; + win32: boolean; + absolute: string; + header?: Header; + type?: EntryTypeName | 'Unsupported'; + linkpath?: string; + stat?: Stats; + onWriteEntry?: (entry: WriteEntry) => any; + constructor(p: string, opt_?: TarOptionsWithAliases); + warn(code: string, message: string | Error, data?: WarnData): void; + emit(ev: keyof WarnEvent, ...data: any[]): boolean; + [LSTAT](): void; + [ONLSTAT](stat: Stats): void; + [PROCESS](): void | this; + [MODE](mode: number): number; + [PREFIX](path: string): string; + [HEADER](): void; + [DIRECTORY](): void; + [SYMLINK](): void; + [ONREADLINK](linkpath: string): void; + [HARDLINK](linkpath: string): void; + [FILE](): void | this; + [OPENFILE](): void; + [ONOPENFILE](fd: number): void; + [READ](): void; + [CLOSE](cb?: (er?: null | Error | NodeJS.ErrnoException) => any): void; + [ONREAD](bytesRead: number): void; + [AWAITDRAIN](cb: () => any): void; + write(buffer: Buffer | string, cb?: () => void): boolean; + write(str: Buffer | string, encoding?: BufferEncoding | null, cb?: () => void): boolean; + [ONDRAIN](): void; +} +export declare class WriteEntrySync extends WriteEntry implements Warner { + sync: true; + [LSTAT](): void; + [SYMLINK](): void; + [OPENFILE](): void; + [READ](): void; + [AWAITDRAIN](cb: () => any): void; + [CLOSE](cb?: (er?: null | Error | NodeJS.ErrnoException) => any): void; +} +export declare class WriteEntryTar extends Minipass implements Warner { + blockLen: number; + blockRemain: number; + buf: number; + pos: number; + remain: number; + length: number; + preservePaths: boolean; + portable: boolean; + strict: boolean; + noPax: boolean; + noMtime: boolean; + readEntry: ReadEntry; + type: EntryTypeName; + prefix?: string; + path: string; + mode?: number; + uid?: number; + gid?: number; + uname?: string; + gname?: string; + header?: Header; + mtime?: Date; + atime?: Date; + ctime?: Date; + linkpath?: string; + size: number; + onWriteEntry?: (entry: WriteEntry) => any; + warn(code: string, message: string | Error, data?: WarnData): void; + constructor(readEntry: ReadEntry, opt_?: TarOptionsWithAliases); + [PREFIX](path: string): string; + [MODE](mode: number): number; + write(buffer: Buffer | string, cb?: () => void): boolean; + write(str: Buffer | string, encoding?: BufferEncoding | null, cb?: () => void): boolean; + end(cb?: () => void): this; + end(chunk: Buffer | string, cb?: () => void): this; + end(chunk: Buffer | string, encoding?: BufferEncoding, cb?: () => void): this; +} +export {}; +//# sourceMappingURL=write-entry.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/write-entry.d.ts.map b/node_modules/tar/dist/esm/write-entry.d.ts.map new file mode 100644 index 0000000..1fa474a --- /dev/null +++ b/node_modules/tar/dist/esm/write-entry.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"write-entry.d.ts","sourceRoot":"","sources":["../../src/write-entry.ts"],"names":[],"mappings":";;;AAAA,OAAW,EAAE,KAAK,KAAK,EAAE,MAAM,IAAI,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAGpC,OAAO,EAGL,UAAU,EACV,qBAAqB,EACtB,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAG3C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC1C,OAAO,EACL,QAAQ,EACR,MAAM,EACN,SAAS,EAEV,MAAM,kBAAkB,CAAA;AA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AC,EAAE,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;IAC1B,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;IAClD,GAAG,CACD,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,QAAQ,CAAC,EAAE,cAAc,EACzB,EAAE,CAAC,EAAE,MAAM,IAAI,GACd,IAAI;CA2BR"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/write-entry.js b/node_modules/tar/dist/esm/write-entry.js new file mode 100644 index 0000000..9028cd6 --- /dev/null +++ b/node_modules/tar/dist/esm/write-entry.js @@ -0,0 +1,657 @@ +import fs from 'fs'; +import { Minipass } from 'minipass'; +import path from 'path'; +import { Header } from './header.js'; +import { modeFix } from './mode-fix.js'; +import { normalizeWindowsPath } from './normalize-windows-path.js'; +import { dealias, } from './options.js'; +import { Pax } from './pax.js'; +import { stripAbsolutePath } from './strip-absolute-path.js'; +import { stripTrailingSlashes } from './strip-trailing-slashes.js'; +import { warnMethod, } from './warn-method.js'; +import * as winchars from './winchars.js'; +const prefixPath = (path, prefix) => { + if (!prefix) { + return normalizeWindowsPath(path); + } + path = normalizeWindowsPath(path).replace(/^\.(\/|$)/, ''); + return stripTrailingSlashes(prefix) + '/' + path; +}; +const maxReadSize = 16 * 1024 * 1024; +const PROCESS = Symbol('process'); +const FILE = Symbol('file'); +const DIRECTORY = Symbol('directory'); +const SYMLINK = Symbol('symlink'); +const HARDLINK = Symbol('hardlink'); +const HEADER = Symbol('header'); +const READ = Symbol('read'); +const LSTAT = Symbol('lstat'); +const ONLSTAT = Symbol('onlstat'); +const ONREAD = Symbol('onread'); +const ONREADLINK = Symbol('onreadlink'); +const OPENFILE = Symbol('openfile'); +const ONOPENFILE = Symbol('onopenfile'); +const CLOSE = Symbol('close'); +const MODE = Symbol('mode'); +const AWAITDRAIN = Symbol('awaitDrain'); +const ONDRAIN = Symbol('ondrain'); +const PREFIX = Symbol('prefix'); +export class WriteEntry extends Minipass { + path; + portable; + myuid = (process.getuid && process.getuid()) || 0; + // until node has builtin pwnam functions, this'll have to do + myuser = process.env.USER || ''; + maxReadSize; + linkCache; + statCache; + preservePaths; + cwd; + strict; + mtime; + noPax; + noMtime; + prefix; + fd; + blockLen = 0; + blockRemain = 0; + buf; + pos = 0; + remain = 0; + length = 0; + offset = 0; + win32; + absolute; + header; + type; + linkpath; + stat; + onWriteEntry; + #hadError = false; + constructor(p, opt_ = {}) { + const opt = dealias(opt_); + super(); + this.path = normalizeWindowsPath(p); + // suppress atime, ctime, uid, gid, uname, gname + this.portable = !!opt.portable; + this.maxReadSize = opt.maxReadSize || maxReadSize; + this.linkCache = opt.linkCache || new Map(); + this.statCache = opt.statCache || new Map(); + this.preservePaths = !!opt.preservePaths; + this.cwd = normalizeWindowsPath(opt.cwd || process.cwd()); + this.strict = !!opt.strict; + this.noPax = !!opt.noPax; + this.noMtime = !!opt.noMtime; + this.mtime = opt.mtime; + this.prefix = + opt.prefix ? normalizeWindowsPath(opt.prefix) : undefined; + this.onWriteEntry = opt.onWriteEntry; + if (typeof opt.onwarn === 'function') { + this.on('warn', opt.onwarn); + } + let pathWarn = false; + if (!this.preservePaths) { + const [root, stripped] = stripAbsolutePath(this.path); + if (root && typeof stripped === 'string') { + this.path = stripped; + pathWarn = root; + } + } + this.win32 = !!opt.win32 || process.platform === 'win32'; + if (this.win32) { + // force the \ to / normalization, since we might not *actually* + // be on windows, but want \ to be considered a path separator. + this.path = winchars.decode(this.path.replace(/\\/g, '/')); + p = p.replace(/\\/g, '/'); + } + this.absolute = normalizeWindowsPath(opt.absolute || path.resolve(this.cwd, p)); + if (this.path === '') { + this.path = './'; + } + if (pathWarn) { + this.warn('TAR_ENTRY_INFO', `stripping ${pathWarn} from absolute path`, { + entry: this, + path: pathWarn + this.path, + }); + } + const cs = this.statCache.get(this.absolute); + if (cs) { + this[ONLSTAT](cs); + } + else { + this[LSTAT](); + } + } + warn(code, message, data = {}) { + return warnMethod(this, code, message, data); + } + emit(ev, ...data) { + if (ev === 'error') { + this.#hadError = true; + } + return super.emit(ev, ...data); + } + [LSTAT]() { + fs.lstat(this.absolute, (er, stat) => { + if (er) { + return this.emit('error', er); + } + this[ONLSTAT](stat); + }); + } + [ONLSTAT](stat) { + this.statCache.set(this.absolute, stat); + this.stat = stat; + if (!stat.isFile()) { + stat.size = 0; + } + this.type = getType(stat); + this.emit('stat', stat); + this[PROCESS](); + } + [PROCESS]() { + switch (this.type) { + case 'File': + return this[FILE](); + case 'Directory': + return this[DIRECTORY](); + case 'SymbolicLink': + return this[SYMLINK](); + // unsupported types are ignored. + default: + return this.end(); + } + } + [MODE](mode) { + return modeFix(mode, this.type === 'Directory', this.portable); + } + [PREFIX](path) { + return prefixPath(path, this.prefix); + } + [HEADER]() { + /* c8 ignore start */ + if (!this.stat) { + throw new Error('cannot write header before stat'); + } + /* c8 ignore stop */ + if (this.type === 'Directory' && this.portable) { + this.noMtime = true; + } + this.onWriteEntry?.(this); + this.header = new Header({ + path: this[PREFIX](this.path), + // only apply the prefix to hard links. + linkpath: this.type === 'Link' && this.linkpath !== undefined ? + this[PREFIX](this.linkpath) + : this.linkpath, + // only the permissions and setuid/setgid/sticky bitflags + // not the higher-order bits that specify file type + mode: this[MODE](this.stat.mode), + uid: this.portable ? undefined : this.stat.uid, + gid: this.portable ? undefined : this.stat.gid, + size: this.stat.size, + mtime: this.noMtime ? undefined : this.mtime || this.stat.mtime, + /* c8 ignore next */ + type: this.type === 'Unsupported' ? undefined : this.type, + uname: this.portable ? undefined + : this.stat.uid === this.myuid ? this.myuser + : '', + atime: this.portable ? undefined : this.stat.atime, + ctime: this.portable ? undefined : this.stat.ctime, + }); + if (this.header.encode() && !this.noPax) { + super.write(new Pax({ + atime: this.portable ? undefined : this.header.atime, + ctime: this.portable ? undefined : this.header.ctime, + gid: this.portable ? undefined : this.header.gid, + mtime: this.noMtime ? undefined : (this.mtime || this.header.mtime), + path: this[PREFIX](this.path), + linkpath: this.type === 'Link' && this.linkpath !== undefined ? + this[PREFIX](this.linkpath) + : this.linkpath, + size: this.header.size, + uid: this.portable ? undefined : this.header.uid, + uname: this.portable ? undefined : this.header.uname, + dev: this.portable ? undefined : this.stat.dev, + ino: this.portable ? undefined : this.stat.ino, + nlink: this.portable ? undefined : this.stat.nlink, + }).encode()); + } + const block = this.header?.block; + /* c8 ignore start */ + if (!block) { + throw new Error('failed to encode header'); + } + /* c8 ignore stop */ + super.write(block); + } + [DIRECTORY]() { + /* c8 ignore start */ + if (!this.stat) { + throw new Error('cannot create directory entry without stat'); + } + /* c8 ignore stop */ + if (this.path.slice(-1) !== '/') { + this.path += '/'; + } + this.stat.size = 0; + this[HEADER](); + this.end(); + } + [SYMLINK]() { + fs.readlink(this.absolute, (er, linkpath) => { + if (er) { + return this.emit('error', er); + } + this[ONREADLINK](linkpath); + }); + } + [ONREADLINK](linkpath) { + this.linkpath = normalizeWindowsPath(linkpath); + this[HEADER](); + this.end(); + } + [HARDLINK](linkpath) { + /* c8 ignore start */ + if (!this.stat) { + throw new Error('cannot create link entry without stat'); + } + /* c8 ignore stop */ + this.type = 'Link'; + this.linkpath = normalizeWindowsPath(path.relative(this.cwd, linkpath)); + this.stat.size = 0; + this[HEADER](); + this.end(); + } + [FILE]() { + /* c8 ignore start */ + if (!this.stat) { + throw new Error('cannot create file entry without stat'); + } + /* c8 ignore stop */ + if (this.stat.nlink > 1) { + const linkKey = `${this.stat.dev}:${this.stat.ino}`; + const linkpath = this.linkCache.get(linkKey); + if (linkpath?.indexOf(this.cwd) === 0) { + return this[HARDLINK](linkpath); + } + this.linkCache.set(linkKey, this.absolute); + } + this[HEADER](); + if (this.stat.size === 0) { + return this.end(); + } + this[OPENFILE](); + } + [OPENFILE]() { + fs.open(this.absolute, 'r', (er, fd) => { + if (er) { + return this.emit('error', er); + } + this[ONOPENFILE](fd); + }); + } + [ONOPENFILE](fd) { + this.fd = fd; + if (this.#hadError) { + return this[CLOSE](); + } + /* c8 ignore start */ + if (!this.stat) { + throw new Error('should stat before calling onopenfile'); + } + /* c8 ignore start */ + this.blockLen = 512 * Math.ceil(this.stat.size / 512); + this.blockRemain = this.blockLen; + const bufLen = Math.min(this.blockLen, this.maxReadSize); + this.buf = Buffer.allocUnsafe(bufLen); + this.offset = 0; + this.pos = 0; + this.remain = this.stat.size; + this.length = this.buf.length; + this[READ](); + } + [READ]() { + const { fd, buf, offset, length, pos } = this; + if (fd === undefined || buf === undefined) { + throw new Error('cannot read file without first opening'); + } + fs.read(fd, buf, offset, length, pos, (er, bytesRead) => { + if (er) { + // ignoring the error from close(2) is a bad practice, but at + // this point we already have an error, don't need another one + return this[CLOSE](() => this.emit('error', er)); + } + this[ONREAD](bytesRead); + }); + } + /* c8 ignore start */ + [CLOSE](cb = () => { }) { + /* c8 ignore stop */ + if (this.fd !== undefined) + fs.close(this.fd, cb); + } + [ONREAD](bytesRead) { + if (bytesRead <= 0 && this.remain > 0) { + const er = Object.assign(new Error('encountered unexpected EOF'), { + path: this.absolute, + syscall: 'read', + code: 'EOF', + }); + return this[CLOSE](() => this.emit('error', er)); + } + if (bytesRead > this.remain) { + const er = Object.assign(new Error('did not encounter expected EOF'), { + path: this.absolute, + syscall: 'read', + code: 'EOF', + }); + return this[CLOSE](() => this.emit('error', er)); + } + /* c8 ignore start */ + if (!this.buf) { + throw new Error('should have created buffer prior to reading'); + } + /* c8 ignore stop */ + // null out the rest of the buffer, if we could fit the block padding + // at the end of this loop, we've incremented bytesRead and this.remain + // to be incremented up to the blockRemain level, as if we had expected + // to get a null-padded file, and read it until the end. then we will + // decrement both remain and blockRemain by bytesRead, and know that we + // reached the expected EOF, without any null buffer to append. + if (bytesRead === this.remain) { + for (let i = bytesRead; i < this.length && bytesRead < this.blockRemain; i++) { + this.buf[i + this.offset] = 0; + bytesRead++; + this.remain++; + } + } + const chunk = this.offset === 0 && bytesRead === this.buf.length ? + this.buf + : this.buf.subarray(this.offset, this.offset + bytesRead); + const flushed = this.write(chunk); + if (!flushed) { + this[AWAITDRAIN](() => this[ONDRAIN]()); + } + else { + this[ONDRAIN](); + } + } + [AWAITDRAIN](cb) { + this.once('drain', cb); + } + write(chunk, encoding, cb) { + /* c8 ignore start - just junk to comply with NodeJS.WritableStream */ + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + if (typeof chunk === 'string') { + chunk = Buffer.from(chunk, typeof encoding === 'string' ? encoding : 'utf8'); + } + /* c8 ignore stop */ + if (this.blockRemain < chunk.length) { + const er = Object.assign(new Error('writing more data than expected'), { + path: this.absolute, + }); + return this.emit('error', er); + } + this.remain -= chunk.length; + this.blockRemain -= chunk.length; + this.pos += chunk.length; + this.offset += chunk.length; + return super.write(chunk, null, cb); + } + [ONDRAIN]() { + if (!this.remain) { + if (this.blockRemain) { + super.write(Buffer.alloc(this.blockRemain)); + } + return this[CLOSE](er => er ? this.emit('error', er) : this.end()); + } + /* c8 ignore start */ + if (!this.buf) { + throw new Error('buffer lost somehow in ONDRAIN'); + } + /* c8 ignore stop */ + if (this.offset >= this.length) { + // if we only have a smaller bit left to read, alloc a smaller buffer + // otherwise, keep it the same length it was before. + this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)); + this.offset = 0; + } + this.length = this.buf.length - this.offset; + this[READ](); + } +} +export class WriteEntrySync extends WriteEntry { + sync = true; + [LSTAT]() { + this[ONLSTAT](fs.lstatSync(this.absolute)); + } + [SYMLINK]() { + this[ONREADLINK](fs.readlinkSync(this.absolute)); + } + [OPENFILE]() { + this[ONOPENFILE](fs.openSync(this.absolute, 'r')); + } + [READ]() { + let threw = true; + try { + const { fd, buf, offset, length, pos } = this; + /* c8 ignore start */ + if (fd === undefined || buf === undefined) { + throw new Error('fd and buf must be set in READ method'); + } + /* c8 ignore stop */ + const bytesRead = fs.readSync(fd, buf, offset, length, pos); + this[ONREAD](bytesRead); + threw = false; + } + finally { + // ignoring the error from close(2) is a bad practice, but at + // this point we already have an error, don't need another one + if (threw) { + try { + this[CLOSE](() => { }); + } + catch (er) { } + } + } + } + [AWAITDRAIN](cb) { + cb(); + } + /* c8 ignore start */ + [CLOSE](cb = () => { }) { + /* c8 ignore stop */ + if (this.fd !== undefined) + fs.closeSync(this.fd); + cb(); + } +} +export class WriteEntryTar extends Minipass { + blockLen = 0; + blockRemain = 0; + buf = 0; + pos = 0; + remain = 0; + length = 0; + preservePaths; + portable; + strict; + noPax; + noMtime; + readEntry; + type; + prefix; + path; + mode; + uid; + gid; + uname; + gname; + header; + mtime; + atime; + ctime; + linkpath; + size; + onWriteEntry; + warn(code, message, data = {}) { + return warnMethod(this, code, message, data); + } + constructor(readEntry, opt_ = {}) { + const opt = dealias(opt_); + super(); + this.preservePaths = !!opt.preservePaths; + this.portable = !!opt.portable; + this.strict = !!opt.strict; + this.noPax = !!opt.noPax; + this.noMtime = !!opt.noMtime; + this.onWriteEntry = opt.onWriteEntry; + this.readEntry = readEntry; + const { type } = readEntry; + /* c8 ignore start */ + if (type === 'Unsupported') { + throw new Error('writing entry that should be ignored'); + } + /* c8 ignore stop */ + this.type = type; + if (this.type === 'Directory' && this.portable) { + this.noMtime = true; + } + this.prefix = opt.prefix; + this.path = normalizeWindowsPath(readEntry.path); + this.mode = + readEntry.mode !== undefined ? + this[MODE](readEntry.mode) + : undefined; + this.uid = this.portable ? undefined : readEntry.uid; + this.gid = this.portable ? undefined : readEntry.gid; + this.uname = this.portable ? undefined : readEntry.uname; + this.gname = this.portable ? undefined : readEntry.gname; + this.size = readEntry.size; + this.mtime = + this.noMtime ? undefined : opt.mtime || readEntry.mtime; + this.atime = this.portable ? undefined : readEntry.atime; + this.ctime = this.portable ? undefined : readEntry.ctime; + this.linkpath = + readEntry.linkpath !== undefined ? + normalizeWindowsPath(readEntry.linkpath) + : undefined; + if (typeof opt.onwarn === 'function') { + this.on('warn', opt.onwarn); + } + let pathWarn = false; + if (!this.preservePaths) { + const [root, stripped] = stripAbsolutePath(this.path); + if (root && typeof stripped === 'string') { + this.path = stripped; + pathWarn = root; + } + } + this.remain = readEntry.size; + this.blockRemain = readEntry.startBlockSize; + this.onWriteEntry?.(this); + this.header = new Header({ + path: this[PREFIX](this.path), + linkpath: this.type === 'Link' && this.linkpath !== undefined ? + this[PREFIX](this.linkpath) + : this.linkpath, + // only the permissions and setuid/setgid/sticky bitflags + // not the higher-order bits that specify file type + mode: this.mode, + uid: this.portable ? undefined : this.uid, + gid: this.portable ? undefined : this.gid, + size: this.size, + mtime: this.noMtime ? undefined : this.mtime, + type: this.type, + uname: this.portable ? undefined : this.uname, + atime: this.portable ? undefined : this.atime, + ctime: this.portable ? undefined : this.ctime, + }); + if (pathWarn) { + this.warn('TAR_ENTRY_INFO', `stripping ${pathWarn} from absolute path`, { + entry: this, + path: pathWarn + this.path, + }); + } + if (this.header.encode() && !this.noPax) { + super.write(new Pax({ + atime: this.portable ? undefined : this.atime, + ctime: this.portable ? undefined : this.ctime, + gid: this.portable ? undefined : this.gid, + mtime: this.noMtime ? undefined : this.mtime, + path: this[PREFIX](this.path), + linkpath: this.type === 'Link' && this.linkpath !== undefined ? + this[PREFIX](this.linkpath) + : this.linkpath, + size: this.size, + uid: this.portable ? undefined : this.uid, + uname: this.portable ? undefined : this.uname, + dev: this.portable ? undefined : this.readEntry.dev, + ino: this.portable ? undefined : this.readEntry.ino, + nlink: this.portable ? undefined : this.readEntry.nlink, + }).encode()); + } + const b = this.header?.block; + /* c8 ignore start */ + if (!b) + throw new Error('failed to encode header'); + /* c8 ignore stop */ + super.write(b); + readEntry.pipe(this); + } + [PREFIX](path) { + return prefixPath(path, this.prefix); + } + [MODE](mode) { + return modeFix(mode, this.type === 'Directory', this.portable); + } + write(chunk, encoding, cb) { + /* c8 ignore start - just junk to comply with NodeJS.WritableStream */ + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + if (typeof chunk === 'string') { + chunk = Buffer.from(chunk, typeof encoding === 'string' ? encoding : 'utf8'); + } + /* c8 ignore stop */ + const writeLen = chunk.length; + if (writeLen > this.blockRemain) { + throw new Error('writing more to entry than is appropriate'); + } + this.blockRemain -= writeLen; + return super.write(chunk, cb); + } + end(chunk, encoding, cb) { + if (this.blockRemain) { + super.write(Buffer.alloc(this.blockRemain)); + } + /* c8 ignore start - just junk to comply with NodeJS.WritableStream */ + if (typeof chunk === 'function') { + cb = chunk; + encoding = undefined; + chunk = undefined; + } + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + if (typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding ?? 'utf8'); + } + if (cb) + this.once('finish', cb); + chunk ? super.end(chunk, cb) : super.end(cb); + /* c8 ignore stop */ + return this; + } +} +const getType = (stat) => stat.isFile() ? 'File' + : stat.isDirectory() ? 'Directory' + : stat.isSymbolicLink() ? 'SymbolicLink' + : 'Unsupported'; +//# sourceMappingURL=write-entry.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/write-entry.js.map b/node_modules/tar/dist/esm/write-entry.js.map new file mode 100644 index 0000000..0ef345a --- /dev/null +++ b/node_modules/tar/dist/esm/write-entry.js.map @@ -0,0 +1 @@ +{"version":3,"file":"write-entry.js","sourceRoot":"","sources":["../../src/write-entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,MAAM,IAAI,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,EACL,OAAO,GAIR,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAE9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAElE,OAAO,EAIL,UAAU,GACX,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Q,GAAG,SAAS,CAAA;QACtB,CAAC;QACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,IAAI,MAAM,CAAC,CAAA;QAChD,CAAC;QACD,IAAI,EAAE;YAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;QAC/B,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QAC5C,oBAAoB;QACpB,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAED,MAAM,OAAO,GAAG,CAAC,IAAW,EAAiC,EAAE,CAC7D,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM;IACtB,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,WAAW;QAClC,CAAC,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,cAAc;YACxC,CAAC,CAAC,aAAa,CAAA","sourcesContent":["import fs, { type Stats } from 'fs'\nimport { Minipass } from 'minipass'\nimport path from 'path'\nimport { Header } from './header.js'\nimport { modeFix } from './mode-fix.js'\nimport { normalizeWindowsPath } from './normalize-windows-path.js'\nimport {\n dealias,\n LinkCacheKey,\n TarOptions,\n TarOptionsWithAliases,\n} from './options.js'\nimport { Pax } from './pax.js'\nimport { ReadEntry } from './read-entry.js'\nimport { stripAbsolutePath } from './strip-absolute-path.js'\nimport { stripTrailingSlashes } from './strip-trailing-slashes.js'\nimport { EntryTypeName } from './types.js'\nimport {\n WarnData,\n Warner,\n WarnEvent,\n warnMethod,\n} from './warn-method.js'\nimport * as winchars from './winchars.js'\n\nconst prefixPath = (path: string, prefix?: string) => {\n if (!prefix) {\n return normalizeWindowsPath(path)\n }\n path = normalizeWindowsPath(path).replace(/^\\.(\\/|$)/, '')\n return stripTrailingSlashes(prefix) + '/' + path\n}\n\nconst maxReadSize = 16 * 1024 * 1024\n\nconst PROCESS = Symbol('process')\nconst FILE = Symbol('file')\nconst DIRECTORY = Symbol('directory')\nconst SYMLINK = Symbol('symlink')\nconst HARDLINK = Symbol('hardlink')\nconst HEADER = Symbol('header')\nconst READ = Symbol('read')\nconst LSTAT = Symbol('lstat')\nconst ONLSTAT = Symbol('onlstat')\nconst ONREAD = Symbol('onread')\nconst ONREADLINK = Symbol('onreadlink')\nconst OPENFILE = Symbol('openfile')\nconst ONOPENFILE = Symbol('onopenfile')\nconst CLOSE = Symbol('close')\nconst MODE = Symbol('mode')\nconst AWAITDRAIN = Symbol('awaitDrain')\nconst ONDRAIN = Symbol('ondrain')\nconst PREFIX = Symbol('prefix')\n\nexport class WriteEntry\n extends Minipass\n implements Warner\n{\n path: string\n portable: boolean\n myuid: number = (process.getuid && process.getuid()) || 0\n // until node has builtin pwnam functions, this'll have to do\n myuser: string = process.env.USER || ''\n maxReadSize: number\n linkCache: Exclude\n statCache: Exclude\n preservePaths: boolean\n cwd: string\n strict: boolean\n mtime?: Date\n noPax: boolean\n noMtime: boolean\n prefix?: string\n fd?: number\n\n blockLen: number = 0\n blockRemain: number = 0\n buf?: Buffer\n pos: number = 0\n remain: number = 0\n length: number = 0\n offset: number = 0\n\n win32: boolean\n absolute: string\n\n header?: Header\n type?: EntryTypeName | 'Unsupported'\n linkpath?: string\n stat?: Stats\n onWriteEntry?: (entry: WriteEntry) => any\n\n #hadError: boolean = false\n\n constructor(p: string, opt_: TarOptionsWithAliases = {}) {\n const opt = dealias(opt_)\n super()\n this.path = normalizeWindowsPath(p)\n // suppress atime, ctime, uid, gid, uname, gname\n this.portable = !!opt.portable\n this.maxReadSize = opt.maxReadSize || maxReadSize\n this.linkCache = opt.linkCache || new Map()\n this.statCache = opt.statCache || new Map()\n this.preservePaths = !!opt.preservePaths\n this.cwd = normalizeWindowsPath(opt.cwd || process.cwd())\n this.strict = !!opt.strict\n this.noPax = !!opt.noPax\n this.noMtime = !!opt.noMtime\n this.mtime = opt.mtime\n this.prefix =\n opt.prefix ? normalizeWindowsPath(opt.prefix) : undefined\n this.onWriteEntry = opt.onWriteEntry\n\n if (typeof opt.onwarn === 'function') {\n this.on('warn', opt.onwarn)\n }\n\n let pathWarn: string | boolean = false\n if (!this.preservePaths) {\n const [root, stripped] = stripAbsolutePath(this.path)\n if (root && typeof stripped === 'string') {\n this.path = stripped\n pathWarn = root\n }\n }\n\n this.win32 = !!opt.win32 || process.platform === 'win32'\n if (this.win32) {\n // force the \\ to / normalization, since we might not *actually*\n // be on windows, but want \\ to be considered a path separator.\n this.path = winchars.decode(this.path.replace(/\\\\/g, '/'))\n p = p.replace(/\\\\/g, '/')\n }\n\n this.absolute = normalizeWindowsPath(\n opt.absolute || path.resolve(this.cwd, p),\n )\n\n if (this.path === '') {\n this.path = './'\n }\n\n if (pathWarn) {\n this.warn(\n 'TAR_ENTRY_INFO',\n `stripping ${pathWarn} from absolute path`,\n {\n entry: this,\n path: pathWarn + this.path,\n },\n )\n }\n\n const cs = this.statCache.get(this.absolute)\n if (cs) {\n this[ONLSTAT](cs)\n } else {\n this[LSTAT]()\n }\n }\n\n warn(code: string, message: string | Error, data: WarnData = {}) {\n return warnMethod(this, code, message, data)\n }\n\n emit(ev: keyof WarnEvent, ...data: any[]) {\n if (ev === 'error') {\n this.#hadError = true\n }\n return super.emit(ev, ...data)\n }\n\n [LSTAT]() {\n fs.lstat(this.absolute, (er, stat) => {\n if (er) {\n return this.emit('error', er)\n }\n this[ONLSTAT](stat)\n })\n }\n\n [ONLSTAT](stat: Stats) {\n this.statCache.set(this.absolute, stat)\n this.stat = stat\n if (!stat.isFile()) {\n stat.size = 0\n }\n this.type = getType(stat)\n this.emit('stat', stat)\n this[PROCESS]()\n }\n\n [PROCESS]() {\n switch (this.type) {\n case 'File':\n return this[FILE]()\n case 'Directory':\n return this[DIRECTORY]()\n case 'SymbolicLink':\n return this[SYMLINK]()\n // unsupported types are ignored.\n default:\n return this.end()\n }\n }\n\n [MODE](mode: number) {\n return modeFix(mode, this.type === 'Directory', this.portable)\n }\n\n [PREFIX](path: string) {\n return prefixPath(path, this.prefix)\n }\n\n [HEADER]() {\n /* c8 ignore start */\n if (!this.stat) {\n throw new Error('cannot write header before stat')\n }\n /* c8 ignore stop */\n\n if (this.type === 'Directory' && this.portable) {\n this.noMtime = true\n }\n\n this.onWriteEntry?.(this)\n this.header = new Header({\n path: this[PREFIX](this.path),\n // only apply the prefix to hard links.\n linkpath:\n this.type === 'Link' && this.linkpath !== undefined ?\n this[PREFIX](this.linkpath)\n : this.linkpath,\n // only the permissions and setuid/setgid/sticky bitflags\n // not the higher-order bits that specify file type\n mode: this[MODE](this.stat.mode),\n uid: this.portable ? undefined : this.stat.uid,\n gid: this.portable ? undefined : this.stat.gid,\n size: this.stat.size,\n mtime: this.noMtime ? undefined : this.mtime || this.stat.mtime,\n /* c8 ignore next */\n type: this.type === 'Unsupported' ? undefined : this.type,\n uname:\n this.portable ? undefined\n : this.stat.uid === this.myuid ? this.myuser\n : '',\n atime: this.portable ? undefined : this.stat.atime,\n ctime: this.portable ? undefined : this.stat.ctime,\n })\n\n if (this.header.encode() && !this.noPax) {\n super.write(\n new Pax({\n atime: this.portable ? undefined : this.header.atime,\n ctime: this.portable ? undefined : this.header.ctime,\n gid: this.portable ? undefined : this.header.gid,\n mtime:\n this.noMtime ? undefined : (\n this.mtime || this.header.mtime\n ),\n path: this[PREFIX](this.path),\n linkpath:\n this.type === 'Link' && this.linkpath !== undefined ?\n this[PREFIX](this.linkpath)\n : this.linkpath,\n size: this.header.size,\n uid: this.portable ? undefined : this.header.uid,\n uname: this.portable ? undefined : this.header.uname,\n dev: this.portable ? undefined : this.stat.dev,\n ino: this.portable ? undefined : this.stat.ino,\n nlink: this.portable ? undefined : this.stat.nlink,\n }).encode(),\n )\n }\n const block = this.header?.block\n /* c8 ignore start */\n if (!block) {\n throw new Error('failed to encode header')\n }\n /* c8 ignore stop */\n super.write(block)\n }\n\n [DIRECTORY]() {\n /* c8 ignore start */\n if (!this.stat) {\n throw new Error('cannot create directory entry without stat')\n }\n /* c8 ignore stop */\n if (this.path.slice(-1) !== '/') {\n this.path += '/'\n }\n this.stat.size = 0\n this[HEADER]()\n this.end()\n }\n\n [SYMLINK]() {\n fs.readlink(this.absolute, (er, linkpath) => {\n if (er) {\n return this.emit('error', er)\n }\n this[ONREADLINK](linkpath)\n })\n }\n\n [ONREADLINK](linkpath: string) {\n this.linkpath = normalizeWindowsPath(linkpath)\n this[HEADER]()\n this.end()\n }\n\n [HARDLINK](linkpath: string) {\n /* c8 ignore start */\n if (!this.stat) {\n throw new Error('cannot create link entry without stat')\n }\n /* c8 ignore stop */\n this.type = 'Link'\n this.linkpath = normalizeWindowsPath(\n path.relative(this.cwd, linkpath),\n )\n this.stat.size = 0\n this[HEADER]()\n this.end()\n }\n\n [FILE]() {\n /* c8 ignore start */\n if (!this.stat) {\n throw new Error('cannot create file entry without stat')\n }\n /* c8 ignore stop */\n if (this.stat.nlink > 1) {\n const linkKey =\n `${this.stat.dev}:${this.stat.ino}` as LinkCacheKey\n const linkpath = this.linkCache.get(linkKey)\n if (linkpath?.indexOf(this.cwd) === 0) {\n return this[HARDLINK](linkpath)\n }\n this.linkCache.set(linkKey, this.absolute)\n }\n\n this[HEADER]()\n if (this.stat.size === 0) {\n return this.end()\n }\n\n this[OPENFILE]()\n }\n\n [OPENFILE]() {\n fs.open(this.absolute, 'r', (er, fd) => {\n if (er) {\n return this.emit('error', er)\n }\n this[ONOPENFILE](fd)\n })\n }\n\n [ONOPENFILE](fd: number) {\n this.fd = fd\n if (this.#hadError) {\n return this[CLOSE]()\n }\n /* c8 ignore start */\n if (!this.stat) {\n throw new Error('should stat before calling onopenfile')\n }\n /* c8 ignore start */\n\n this.blockLen = 512 * Math.ceil(this.stat.size / 512)\n this.blockRemain = this.blockLen\n const bufLen = Math.min(this.blockLen, this.maxReadSize)\n this.buf = Buffer.allocUnsafe(bufLen)\n this.offset = 0\n this.pos = 0\n this.remain = this.stat.size\n this.length = this.buf.length\n this[READ]()\n }\n\n [READ]() {\n const { fd, buf, offset, length, pos } = this\n if (fd === undefined || buf === undefined) {\n throw new Error('cannot read file without first opening')\n }\n fs.read(fd, buf, offset, length, pos, (er, bytesRead) => {\n if (er) {\n // ignoring the error from close(2) is a bad practice, but at\n // this point we already have an error, don't need another one\n return this[CLOSE](() => this.emit('error', er))\n }\n this[ONREAD](bytesRead)\n })\n }\n\n /* c8 ignore start */\n [CLOSE](\n cb: (er?: null | Error | NodeJS.ErrnoException) => any = () => {},\n ) {\n /* c8 ignore stop */\n if (this.fd !== undefined) fs.close(this.fd, cb)\n }\n\n [ONREAD](bytesRead: number) {\n if (bytesRead <= 0 && this.remain > 0) {\n const er = Object.assign(\n new Error('encountered unexpected EOF'),\n {\n path: this.absolute,\n syscall: 'read',\n code: 'EOF',\n },\n )\n return this[CLOSE](() => this.emit('error', er))\n }\n\n if (bytesRead > this.remain) {\n const er = Object.assign(\n new Error('did not encounter expected EOF'),\n {\n path: this.absolute,\n syscall: 'read',\n code: 'EOF',\n },\n )\n return this[CLOSE](() => this.emit('error', er))\n }\n\n /* c8 ignore start */\n if (!this.buf) {\n throw new Error('should have created buffer prior to reading')\n }\n /* c8 ignore stop */\n\n // null out the rest of the buffer, if we could fit the block padding\n // at the end of this loop, we've incremented bytesRead and this.remain\n // to be incremented up to the blockRemain level, as if we had expected\n // to get a null-padded file, and read it until the end. then we will\n // decrement both remain and blockRemain by bytesRead, and know that we\n // reached the expected EOF, without any null buffer to append.\n if (bytesRead === this.remain) {\n for (\n let i = bytesRead;\n i < this.length && bytesRead < this.blockRemain;\n i++\n ) {\n this.buf[i + this.offset] = 0\n bytesRead++\n this.remain++\n }\n }\n\n const chunk =\n this.offset === 0 && bytesRead === this.buf.length ?\n this.buf\n : this.buf.subarray(this.offset, this.offset + bytesRead)\n\n const flushed = this.write(chunk)\n if (!flushed) {\n this[AWAITDRAIN](() => this[ONDRAIN]())\n } else {\n this[ONDRAIN]()\n }\n }\n\n [AWAITDRAIN](cb: () => any) {\n this.once('drain', cb)\n }\n\n write(buffer: Buffer | string, cb?: () => void): boolean\n write(\n str: Buffer | string,\n encoding?: BufferEncoding | null,\n cb?: () => void,\n ): boolean\n write(\n chunk: Buffer | string,\n encoding?: BufferEncoding | (() => any) | null,\n cb?: () => any,\n ): boolean {\n /* c8 ignore start - just junk to comply with NodeJS.WritableStream */\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(\n chunk,\n typeof encoding === 'string' ? encoding : 'utf8',\n )\n }\n /* c8 ignore stop */\n\n if (this.blockRemain < chunk.length) {\n const er = Object.assign(\n new Error('writing more data than expected'),\n {\n path: this.absolute,\n },\n )\n return this.emit('error', er)\n }\n this.remain -= chunk.length\n this.blockRemain -= chunk.length\n this.pos += chunk.length\n this.offset += chunk.length\n return super.write(chunk, null, cb)\n }\n\n [ONDRAIN]() {\n if (!this.remain) {\n if (this.blockRemain) {\n super.write(Buffer.alloc(this.blockRemain))\n }\n return this[CLOSE](er =>\n er ? this.emit('error', er) : this.end(),\n )\n }\n\n /* c8 ignore start */\n if (!this.buf) {\n throw new Error('buffer lost somehow in ONDRAIN')\n }\n /* c8 ignore stop */\n\n if (this.offset >= this.length) {\n // if we only have a smaller bit left to read, alloc a smaller buffer\n // otherwise, keep it the same length it was before.\n this.buf = Buffer.allocUnsafe(\n Math.min(this.blockRemain, this.buf.length),\n )\n this.offset = 0\n }\n this.length = this.buf.length - this.offset\n this[READ]()\n }\n}\n\nexport class WriteEntrySync extends WriteEntry implements Warner {\n sync: true = true;\n\n [LSTAT]() {\n this[ONLSTAT](fs.lstatSync(this.absolute))\n }\n\n [SYMLINK]() {\n this[ONREADLINK](fs.readlinkSync(this.absolute))\n }\n\n [OPENFILE]() {\n this[ONOPENFILE](fs.openSync(this.absolute, 'r'))\n }\n\n [READ]() {\n let threw = true\n try {\n const { fd, buf, offset, length, pos } = this\n /* c8 ignore start */\n if (fd === undefined || buf === undefined) {\n throw new Error('fd and buf must be set in READ method')\n }\n /* c8 ignore stop */\n const bytesRead = fs.readSync(fd, buf, offset, length, pos)\n this[ONREAD](bytesRead)\n threw = false\n } finally {\n // ignoring the error from close(2) is a bad practice, but at\n // this point we already have an error, don't need another one\n if (threw) {\n try {\n this[CLOSE](() => {})\n } catch (er) {}\n }\n }\n }\n\n [AWAITDRAIN](cb: () => any) {\n cb()\n }\n\n /* c8 ignore start */\n [CLOSE](\n cb: (er?: null | Error | NodeJS.ErrnoException) => any = () => {},\n ) {\n /* c8 ignore stop */\n if (this.fd !== undefined) fs.closeSync(this.fd)\n cb()\n }\n}\n\nexport class WriteEntryTar\n extends Minipass\n implements Warner\n{\n blockLen: number = 0\n blockRemain: number = 0\n buf: number = 0\n pos: number = 0\n remain: number = 0\n length: number = 0\n preservePaths: boolean\n portable: boolean\n strict: boolean\n noPax: boolean\n noMtime: boolean\n readEntry: ReadEntry\n type: EntryTypeName\n prefix?: string\n path: string\n mode?: number\n uid?: number\n gid?: number\n uname?: string\n gname?: string\n header?: Header\n mtime?: Date\n atime?: Date\n ctime?: Date\n linkpath?: string\n size: number\n onWriteEntry?: (entry: WriteEntry) => any\n\n warn(code: string, message: string | Error, data: WarnData = {}) {\n return warnMethod(this, code, message, data)\n }\n\n constructor(\n readEntry: ReadEntry,\n opt_: TarOptionsWithAliases = {},\n ) {\n const opt = dealias(opt_)\n super()\n this.preservePaths = !!opt.preservePaths\n this.portable = !!opt.portable\n this.strict = !!opt.strict\n this.noPax = !!opt.noPax\n this.noMtime = !!opt.noMtime\n this.onWriteEntry = opt.onWriteEntry\n\n this.readEntry = readEntry\n const { type } = readEntry\n /* c8 ignore start */\n if (type === 'Unsupported') {\n throw new Error('writing entry that should be ignored')\n }\n /* c8 ignore stop */\n this.type = type\n if (this.type === 'Directory' && this.portable) {\n this.noMtime = true\n }\n\n this.prefix = opt.prefix\n\n this.path = normalizeWindowsPath(readEntry.path)\n this.mode =\n readEntry.mode !== undefined ?\n this[MODE](readEntry.mode)\n : undefined\n this.uid = this.portable ? undefined : readEntry.uid\n this.gid = this.portable ? undefined : readEntry.gid\n this.uname = this.portable ? undefined : readEntry.uname\n this.gname = this.portable ? undefined : readEntry.gname\n this.size = readEntry.size\n this.mtime =\n this.noMtime ? undefined : opt.mtime || readEntry.mtime\n this.atime = this.portable ? undefined : readEntry.atime\n this.ctime = this.portable ? undefined : readEntry.ctime\n this.linkpath =\n readEntry.linkpath !== undefined ?\n normalizeWindowsPath(readEntry.linkpath)\n : undefined\n\n if (typeof opt.onwarn === 'function') {\n this.on('warn', opt.onwarn)\n }\n\n let pathWarn: false | string = false\n if (!this.preservePaths) {\n const [root, stripped] = stripAbsolutePath(this.path)\n if (root && typeof stripped === 'string') {\n this.path = stripped\n pathWarn = root\n }\n }\n\n this.remain = readEntry.size\n this.blockRemain = readEntry.startBlockSize\n\n this.onWriteEntry?.(this as unknown as WriteEntry)\n this.header = new Header({\n path: this[PREFIX](this.path),\n linkpath:\n this.type === 'Link' && this.linkpath !== undefined ?\n this[PREFIX](this.linkpath)\n : this.linkpath,\n // only the permissions and setuid/setgid/sticky bitflags\n // not the higher-order bits that specify file type\n mode: this.mode,\n uid: this.portable ? undefined : this.uid,\n gid: this.portable ? undefined : this.gid,\n size: this.size,\n mtime: this.noMtime ? undefined : this.mtime,\n type: this.type,\n uname: this.portable ? undefined : this.uname,\n atime: this.portable ? undefined : this.atime,\n ctime: this.portable ? undefined : this.ctime,\n })\n\n if (pathWarn) {\n this.warn(\n 'TAR_ENTRY_INFO',\n `stripping ${pathWarn} from absolute path`,\n {\n entry: this,\n path: pathWarn + this.path,\n },\n )\n }\n\n if (this.header.encode() && !this.noPax) {\n super.write(\n new Pax({\n atime: this.portable ? undefined : this.atime,\n ctime: this.portable ? undefined : this.ctime,\n gid: this.portable ? undefined : this.gid,\n mtime: this.noMtime ? undefined : this.mtime,\n path: this[PREFIX](this.path),\n linkpath:\n this.type === 'Link' && this.linkpath !== undefined ?\n this[PREFIX](this.linkpath)\n : this.linkpath,\n size: this.size,\n uid: this.portable ? undefined : this.uid,\n uname: this.portable ? undefined : this.uname,\n dev: this.portable ? undefined : this.readEntry.dev,\n ino: this.portable ? undefined : this.readEntry.ino,\n nlink: this.portable ? undefined : this.readEntry.nlink,\n }).encode(),\n )\n }\n\n const b = this.header?.block\n /* c8 ignore start */\n if (!b) throw new Error('failed to encode header')\n /* c8 ignore stop */\n super.write(b)\n readEntry.pipe(this)\n }\n\n [PREFIX](path: string) {\n return prefixPath(path, this.prefix)\n }\n\n [MODE](mode: number) {\n return modeFix(mode, this.type === 'Directory', this.portable)\n }\n\n write(buffer: Buffer | string, cb?: () => void): boolean\n write(\n str: Buffer | string,\n encoding?: BufferEncoding | null,\n cb?: () => void,\n ): boolean\n write(\n chunk: Buffer | string,\n encoding?: BufferEncoding | (() => any) | null,\n cb?: () => any,\n ): boolean {\n /* c8 ignore start - just junk to comply with NodeJS.WritableStream */\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(\n chunk,\n typeof encoding === 'string' ? encoding : 'utf8',\n )\n }\n /* c8 ignore stop */\n const writeLen = chunk.length\n if (writeLen > this.blockRemain) {\n throw new Error('writing more to entry than is appropriate')\n }\n this.blockRemain -= writeLen\n return super.write(chunk, cb)\n }\n\n end(cb?: () => void): this\n end(chunk: Buffer | string, cb?: () => void): this\n end(\n chunk: Buffer | string,\n encoding?: BufferEncoding,\n cb?: () => void,\n ): this\n end(\n chunk?: Buffer | string | (() => void),\n encoding?: BufferEncoding | (() => void),\n cb?: () => void,\n ): this {\n if (this.blockRemain) {\n super.write(Buffer.alloc(this.blockRemain))\n }\n /* c8 ignore start - just junk to comply with NodeJS.WritableStream */\n if (typeof chunk === 'function') {\n cb = chunk\n encoding = undefined\n chunk = undefined\n }\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding ?? 'utf8')\n }\n if (cb) this.once('finish', cb)\n chunk ? super.end(chunk, cb) : super.end(cb)\n /* c8 ignore stop */\n return this\n }\n}\n\nconst getType = (stat: Stats): EntryTypeName | 'Unsupported' =>\n stat.isFile() ? 'File'\n : stat.isDirectory() ? 'Directory'\n : stat.isSymbolicLink() ? 'SymbolicLink'\n : 'Unsupported'\n"]} \ No newline at end of file diff --git a/node_modules/tar/package.json b/node_modules/tar/package.json new file mode 100644 index 0000000..0283103 --- /dev/null +++ b/node_modules/tar/package.json @@ -0,0 +1,325 @@ +{ + "author": "Isaac Z. Schlueter", + "name": "tar", + "description": "tar for node", + "version": "7.4.3", + "repository": { + "type": "git", + "url": "https://github.com/isaacs/node-tar.git" + }, + "scripts": { + "genparse": "node scripts/generate-parse-fixtures.js", + "snap": "tap", + "test": "tap", + "pretest": "npm run prepare", + "presnap": "npm run prepare", + "prepare": "tshy", + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "format": "prettier --write . --log-level warn", + "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts" + }, + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.0.1", + "mkdirp": "^3.0.1", + "yallist": "^5.0.0" + }, + "devDependencies": { + "chmodr": "^1.2.0", + "end-of-stream": "^1.4.3", + "events-to-array": "^2.0.3", + "mutate-fs": "^2.1.1", + "nock": "^13.5.4", + "prettier": "^3.2.5", + "rimraf": "^5.0.5", + "tap": "^18.7.2", + "tshy": "^1.13.1", + "typedoc": "^0.25.13" + }, + "license": "ISC", + "engines": { + "node": ">=18" + }, + "files": [ + "dist" + ], + "tap": { + "coverage-map": "map.js", + "timeout": 0, + "typecheck": true + }, + "prettier": { + "experimentalTernaries": true, + "semi": false, + "printWidth": 70, + "tabWidth": 2, + "useTabs": false, + "singleQuote": true, + "jsxSingleQuote": false, + "bracketSameLine": true, + "arrowParens": "avoid", + "endOfLine": "lf" + }, + "tshy": { + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts", + "./c": "./src/create.ts", + "./create": "./src/create.ts", + "./replace": "./src/create.ts", + "./r": "./src/create.ts", + "./list": "./src/list.ts", + "./t": "./src/list.ts", + "./update": "./src/update.ts", + "./u": "./src/update.ts", + "./extract": "./src/extract.ts", + "./x": "./src/extract.ts", + "./pack": "./src/pack.ts", + "./unpack": "./src/unpack.ts", + "./parse": "./src/parse.ts", + "./read-entry": "./src/read-entry.ts", + "./write-entry": "./src/write-entry.ts", + "./header": "./src/header.ts", + "./pax": "./src/pax.ts", + "./types": "./src/types.ts" + } + }, + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "source": "./src/index.ts", + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "source": "./src/index.ts", + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + }, + "./c": { + "import": { + "source": "./src/create.ts", + "types": "./dist/esm/create.d.ts", + "default": "./dist/esm/create.js" + }, + "require": { + "source": "./src/create.ts", + "types": "./dist/commonjs/create.d.ts", + "default": "./dist/commonjs/create.js" + } + }, + "./create": { + "import": { + "source": "./src/create.ts", + "types": "./dist/esm/create.d.ts", + "default": "./dist/esm/create.js" + }, + "require": { + "source": "./src/create.ts", + "types": "./dist/commonjs/create.d.ts", + "default": "./dist/commonjs/create.js" + } + }, + "./replace": { + "import": { + "source": "./src/create.ts", + "types": "./dist/esm/create.d.ts", + "default": "./dist/esm/create.js" + }, + "require": { + "source": "./src/create.ts", + "types": "./dist/commonjs/create.d.ts", + "default": "./dist/commonjs/create.js" + } + }, + "./r": { + "import": { + "source": "./src/create.ts", + "types": "./dist/esm/create.d.ts", + "default": "./dist/esm/create.js" + }, + "require": { + "source": "./src/create.ts", + "types": "./dist/commonjs/create.d.ts", + "default": "./dist/commonjs/create.js" + } + }, + "./list": { + "import": { + "source": "./src/list.ts", + "types": "./dist/esm/list.d.ts", + "default": "./dist/esm/list.js" + }, + "require": { + "source": "./src/list.ts", + "types": "./dist/commonjs/list.d.ts", + "default": "./dist/commonjs/list.js" + } + }, + "./t": { + "import": { + "source": "./src/list.ts", + "types": "./dist/esm/list.d.ts", + "default": "./dist/esm/list.js" + }, + "require": { + "source": "./src/list.ts", + "types": "./dist/commonjs/list.d.ts", + "default": "./dist/commonjs/list.js" + } + }, + "./update": { + "import": { + "source": "./src/update.ts", + "types": "./dist/esm/update.d.ts", + "default": "./dist/esm/update.js" + }, + "require": { + "source": "./src/update.ts", + "types": "./dist/commonjs/update.d.ts", + "default": "./dist/commonjs/update.js" + } + }, + "./u": { + "import": { + "source": "./src/update.ts", + "types": "./dist/esm/update.d.ts", + "default": "./dist/esm/update.js" + }, + "require": { + "source": "./src/update.ts", + "types": "./dist/commonjs/update.d.ts", + "default": "./dist/commonjs/update.js" + } + }, + "./extract": { + "import": { + "source": "./src/extract.ts", + "types": "./dist/esm/extract.d.ts", + "default": "./dist/esm/extract.js" + }, + "require": { + "source": "./src/extract.ts", + "types": "./dist/commonjs/extract.d.ts", + "default": "./dist/commonjs/extract.js" + } + }, + "./x": { + "import": { + "source": "./src/extract.ts", + "types": "./dist/esm/extract.d.ts", + "default": "./dist/esm/extract.js" + }, + "require": { + "source": "./src/extract.ts", + "types": "./dist/commonjs/extract.d.ts", + "default": "./dist/commonjs/extract.js" + } + }, + "./pack": { + "import": { + "source": "./src/pack.ts", + "types": "./dist/esm/pack.d.ts", + "default": "./dist/esm/pack.js" + }, + "require": { + "source": "./src/pack.ts", + "types": "./dist/commonjs/pack.d.ts", + "default": "./dist/commonjs/pack.js" + } + }, + "./unpack": { + "import": { + "source": "./src/unpack.ts", + "types": "./dist/esm/unpack.d.ts", + "default": "./dist/esm/unpack.js" + }, + "require": { + "source": "./src/unpack.ts", + "types": "./dist/commonjs/unpack.d.ts", + "default": "./dist/commonjs/unpack.js" + } + }, + "./parse": { + "import": { + "source": "./src/parse.ts", + "types": "./dist/esm/parse.d.ts", + "default": "./dist/esm/parse.js" + }, + "require": { + "source": "./src/parse.ts", + "types": "./dist/commonjs/parse.d.ts", + "default": "./dist/commonjs/parse.js" + } + }, + "./read-entry": { + "import": { + "source": "./src/read-entry.ts", + "types": "./dist/esm/read-entry.d.ts", + "default": "./dist/esm/read-entry.js" + }, + "require": { + "source": "./src/read-entry.ts", + "types": "./dist/commonjs/read-entry.d.ts", + "default": "./dist/commonjs/read-entry.js" + } + }, + "./write-entry": { + "import": { + "source": "./src/write-entry.ts", + "types": "./dist/esm/write-entry.d.ts", + "default": "./dist/esm/write-entry.js" + }, + "require": { + "source": "./src/write-entry.ts", + "types": "./dist/commonjs/write-entry.d.ts", + "default": "./dist/commonjs/write-entry.js" + } + }, + "./header": { + "import": { + "source": "./src/header.ts", + "types": "./dist/esm/header.d.ts", + "default": "./dist/esm/header.js" + }, + "require": { + "source": "./src/header.ts", + "types": "./dist/commonjs/header.d.ts", + "default": "./dist/commonjs/header.js" + } + }, + "./pax": { + "import": { + "source": "./src/pax.ts", + "types": "./dist/esm/pax.d.ts", + "default": "./dist/esm/pax.js" + }, + "require": { + "source": "./src/pax.ts", + "types": "./dist/commonjs/pax.d.ts", + "default": "./dist/commonjs/pax.js" + } + }, + "./types": { + "import": { + "source": "./src/types.ts", + "types": "./dist/esm/types.d.ts", + "default": "./dist/esm/types.js" + }, + "require": { + "source": "./src/types.ts", + "types": "./dist/commonjs/types.d.ts", + "default": "./dist/commonjs/types.js" + } + } + }, + "type": "module", + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts" +} diff --git a/node_modules/tinyglobby/LICENSE b/node_modules/tinyglobby/LICENSE new file mode 100644 index 0000000..8657364 --- /dev/null +++ b/node_modules/tinyglobby/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Madeline Gurriarán + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/tinyglobby/README.md b/node_modules/tinyglobby/README.md new file mode 100644 index 0000000..1a64a97 --- /dev/null +++ b/node_modules/tinyglobby/README.md @@ -0,0 +1,71 @@ +# tinyglobby + +[![npm version](https://img.shields.io/npm/v/tinyglobby.svg?maxAge=3600)](https://npmjs.com/package/tinyglobby) +[![monthly downloads](https://img.shields.io/npm/dm/tinyglobby.svg?maxAge=3600)](https://npmjs.com/package/tinyglobby) + +A fast and minimal alternative to globby and fast-glob, meant to behave the same way. + +Both globby and fast-glob present some behavior no other globbing lib has, +which makes it hard to manually replace with something smaller and better. + +This library uses only two subdependencies, compared to `globby`'s [23](https://npmgraph.js.org/?q=globby@14.1.0) +and `fast-glob`'s [17](https://npmgraph.js.org/?q=fast-glob@3.3.3). + +## Usage + +```js +import { glob, globSync } from 'tinyglobby'; + +await glob(['files/*.ts', '!**/*.d.ts'], { cwd: 'src' }); +globSync(['src/**/*.ts'], { ignore: ['**/*.d.ts'] }); +``` + +## API + +- `glob(patterns: string | string[], options: GlobOptions): Promise`: Returns a promise with an array of matches. +- `globSync(patterns: string | string[], options: GlobOptions): string[]`: Returns an array of matches. +- `convertPathToPattern(path: string): string`: Converts a path to a pattern depending on the platform. +- `escapePath(path: string): string`: Escapes a path's special characters depending on the platform. +- `isDynamicPattern(pattern: string, options?: GlobOptions): boolean`: Checks if a pattern is dynamic. + +## Options + +- `patterns`: An array of glob patterns to search for. Defaults to `['**/*']`. +- `ignore`: An array of glob patterns to ignore. +- `cwd`: The current working directory in which to search. Defaults to `process.cwd()`. +- `absolute`: Whether to return absolute paths. Defaults to `false`. +- `dot`: Whether to allow entries starting with a dot. Defaults to `false`. +- `deep`: Maximum depth of a directory. Defaults to `Infinity`. +- `followSymbolicLinks`: Whether to traverse and include symbolic links. Defaults to `true`. +- `caseSensitiveMatch`: Whether to match in case-sensitive mode. Defaults to `true`. +- `expandDirectories`: Whether to expand directories. Disable to best match `fast-glob`. Defaults to `true`. +- `onlyDirectories`: Enable to only return directories. Disables `onlyFiles` if set. Defaults to `false`. +- `onlyFiles`: Enable to only return files. Defaults to `true`. +- `debug`: Enable debug logs. Useful for development purposes. + +## Used by + +`tinyglobby` is downloaded many times by projects all around the world. Here's a list of notable projects that use it: + + +- [`vite`](https://github.com/vitejs/vite) +- [`pnpm`](https://github.com/pnpm/pnpm) +- [`node-gyp`](https://github.com/nodejs/node-gyp) +- [`eslint-import-resolver-typescript`](https://github.com/import-js/eslint-import-resolver-typescript) +- [`vitest`](https://github.com/vitest-dev/vitest) +- [`copy-webpack-plugin`](https://github.com/webpack-contrib/copy-webpack-plugin) +- [`ts-morph`](https://github.com/dsherret/ts-morph) +- [`nx`](https://github.com/nrwl/nx) +- [`sort-package-json`](https://github.com/keithamus/sort-package-json) +- [`unimport`](https://github.com/unjs/unimport) +- [`tsup`](https://github.com/egoist/tsup) +- [`lerna`](https://github.com/lerna/lerna) +- [`cspell`](https://github.com/streetsidesoftware/cspell) +- [`nuxt`](https://github.com/nuxt/nuxt) +- [`postcss-mixins`](https://github.com/postcss/postcss-mixins) +- [`astro`](https://github.com/withastro/astro) +- [`unocss`](https://github.com/unocss/unocss) +- [`vitepress`](https://github.com/vuejs/vitepress) +- [`pkg-pr-new`](https://github.com/stackblitz-labs/pkg.pr.new) +- Your own project? [Open an issue](https://github.com/SuperchupuDev/tinyglobby/issues) +if you feel like this list is incomplete. diff --git a/node_modules/tinyglobby/dist/index.d.mts b/node_modules/tinyglobby/dist/index.d.mts new file mode 100644 index 0000000..c60f4f8 --- /dev/null +++ b/node_modules/tinyglobby/dist/index.d.mts @@ -0,0 +1,26 @@ +declare const convertPathToPattern: (path: string) => string; +declare const escapePath: (path: string) => string; +declare function isDynamicPattern(pattern: string, options?: { + caseSensitiveMatch: boolean; +}): boolean; + +interface GlobOptions { + absolute?: boolean; + cwd?: string; + patterns?: string | string[]; + ignore?: string | string[]; + dot?: boolean; + deep?: number; + followSymbolicLinks?: boolean; + caseSensitiveMatch?: boolean; + expandDirectories?: boolean; + onlyDirectories?: boolean; + onlyFiles?: boolean; + debug?: boolean; +} +declare function glob(patterns: string | string[], options?: Omit): Promise; +declare function glob(options: GlobOptions): Promise; +declare function globSync(patterns: string | string[], options?: Omit): string[]; +declare function globSync(options: GlobOptions): string[]; + +export { type GlobOptions, convertPathToPattern, escapePath, glob, globSync, isDynamicPattern }; diff --git a/node_modules/tinyglobby/dist/index.d.ts b/node_modules/tinyglobby/dist/index.d.ts new file mode 100644 index 0000000..c60f4f8 --- /dev/null +++ b/node_modules/tinyglobby/dist/index.d.ts @@ -0,0 +1,26 @@ +declare const convertPathToPattern: (path: string) => string; +declare const escapePath: (path: string) => string; +declare function isDynamicPattern(pattern: string, options?: { + caseSensitiveMatch: boolean; +}): boolean; + +interface GlobOptions { + absolute?: boolean; + cwd?: string; + patterns?: string | string[]; + ignore?: string | string[]; + dot?: boolean; + deep?: number; + followSymbolicLinks?: boolean; + caseSensitiveMatch?: boolean; + expandDirectories?: boolean; + onlyDirectories?: boolean; + onlyFiles?: boolean; + debug?: boolean; +} +declare function glob(patterns: string | string[], options?: Omit): Promise; +declare function glob(options: GlobOptions): Promise; +declare function globSync(patterns: string | string[], options?: Omit): string[]; +declare function globSync(options: GlobOptions): string[]; + +export { type GlobOptions, convertPathToPattern, escapePath, glob, globSync, isDynamicPattern }; diff --git a/node_modules/tinyglobby/dist/index.js b/node_modules/tinyglobby/dist/index.js new file mode 100644 index 0000000..445fc31 --- /dev/null +++ b/node_modules/tinyglobby/dist/index.js @@ -0,0 +1,333 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + convertPathToPattern: () => convertPathToPattern, + escapePath: () => escapePath, + glob: () => glob, + globSync: () => globSync, + isDynamicPattern: () => isDynamicPattern +}); +module.exports = __toCommonJS(index_exports); +var import_node_path = __toESM(require("path")); +var import_fdir = require("fdir"); +var import_picomatch2 = __toESM(require("picomatch")); + +// src/utils.ts +var import_picomatch = __toESM(require("picomatch")); +var ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/; +function getPartialMatcher(patterns, options) { + const patternsCount = patterns.length; + const patternsParts = Array(patternsCount); + const regexes = Array(patternsCount); + for (let i = 0; i < patternsCount; i++) { + const parts = splitPattern(patterns[i]); + patternsParts[i] = parts; + const partsCount = parts.length; + const partRegexes = Array(partsCount); + for (let j = 0; j < partsCount; j++) { + partRegexes[j] = import_picomatch.default.makeRe(parts[j], options); + } + regexes[i] = partRegexes; + } + return (input) => { + const inputParts = input.split("/"); + if (inputParts[0] === ".." && ONLY_PARENT_DIRECTORIES.test(input)) { + return true; + } + for (let i = 0; i < patterns.length; i++) { + const patternParts = patternsParts[i]; + const regex = regexes[i]; + const inputPatternCount = inputParts.length; + const minParts = Math.min(inputPatternCount, patternParts.length); + let j = 0; + while (j < minParts) { + const part = patternParts[j]; + if (part.includes("/")) { + return true; + } + const match = regex[j].test(inputParts[j]); + if (!match) { + break; + } + if (part === "**") { + return true; + } + j++; + } + if (j === inputPatternCount) { + return true; + } + } + return false; + }; +} +var splitPatternOptions = { parts: true }; +function splitPattern(path2) { + var _a; + const result = import_picomatch.default.scan(path2, splitPatternOptions); + return ((_a = result.parts) == null ? void 0 : _a.length) ? result.parts : [path2]; +} +var isWin = process.platform === "win32"; +var ESCAPED_WIN32_BACKSLASHES = /\\(?![()[\]{}!+@])/g; +function convertPosixPathToPattern(path2) { + return escapePosixPath(path2); +} +function convertWin32PathToPattern(path2) { + return escapeWin32Path(path2).replace(ESCAPED_WIN32_BACKSLASHES, "/"); +} +var convertPathToPattern = isWin ? convertWin32PathToPattern : convertPosixPathToPattern; +var POSIX_UNESCAPED_GLOB_SYMBOLS = /(? path2.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&"); +var escapeWin32Path = (path2) => path2.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&"); +var escapePath = isWin ? escapeWin32Path : escapePosixPath; +function isDynamicPattern(pattern, options) { + if ((options == null ? void 0 : options.caseSensitiveMatch) === false) { + return true; + } + const scan = import_picomatch.default.scan(pattern); + return scan.isGlob || scan.negated; +} +function log(...tasks) { + console.log(`[tinyglobby ${(/* @__PURE__ */ new Date()).toLocaleTimeString("es")}]`, ...tasks); +} + +// src/index.ts +var PARENT_DIRECTORY = /^(\/?\.\.)+/; +var ESCAPING_BACKSLASHES = /\\(?=[()[\]{}!*+?@|])/g; +var BACKSLASHES = /\\/g; +function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) { + var _a; + let result = pattern; + if (pattern.endsWith("/")) { + result = pattern.slice(0, -1); + } + if (!result.endsWith("*") && expandDirectories) { + result += "/**"; + } + if (import_node_path.default.isAbsolute(result.replace(ESCAPING_BACKSLASHES, ""))) { + result = import_node_path.posix.relative(escapePath(cwd), result); + } else { + result = import_node_path.posix.normalize(result); + } + const parentDirectoryMatch = PARENT_DIRECTORY.exec(result); + if (parentDirectoryMatch == null ? void 0 : parentDirectoryMatch[0]) { + const potentialRoot = import_node_path.posix.join(cwd, parentDirectoryMatch[0]); + if (props.root.length > potentialRoot.length) { + props.root = potentialRoot; + props.depthOffset = -(parentDirectoryMatch[0].length + 1) / 3; + } + } else if (!isIgnore && props.depthOffset >= 0) { + const parts = splitPattern(result); + (_a = props.commonPath) != null ? _a : props.commonPath = parts; + const newCommonPath = []; + const length = Math.min(props.commonPath.length, parts.length); + for (let i = 0; i < length; i++) { + const part = parts[i]; + if (part === "**" && !parts[i + 1]) { + newCommonPath.pop(); + break; + } + if (part !== props.commonPath[i] || isDynamicPattern(part) || i === parts.length - 1) { + break; + } + newCommonPath.push(part); + } + props.depthOffset = newCommonPath.length; + props.commonPath = newCommonPath; + props.root = newCommonPath.length > 0 ? import_node_path.default.posix.join(cwd, ...newCommonPath) : cwd; + } + return result; +} +function processPatterns({ patterns, ignore = [], expandDirectories = true }, cwd, props) { + if (typeof patterns === "string") { + patterns = [patterns]; + } else if (!patterns) { + patterns = ["**/*"]; + } + if (typeof ignore === "string") { + ignore = [ignore]; + } + const matchPatterns = []; + const ignorePatterns = []; + for (const pattern of ignore) { + if (!pattern) { + continue; + } + if (pattern[0] !== "!" || pattern[1] === "(") { + ignorePatterns.push(normalizePattern(pattern, expandDirectories, cwd, props, true)); + } + } + for (const pattern of patterns) { + if (!pattern) { + continue; + } + if (pattern[0] !== "!" || pattern[1] === "(") { + matchPatterns.push(normalizePattern(pattern, expandDirectories, cwd, props, false)); + } else if (pattern[1] !== "!" || pattern[2] === "(") { + ignorePatterns.push(normalizePattern(pattern.slice(1), expandDirectories, cwd, props, true)); + } + } + return { match: matchPatterns, ignore: ignorePatterns }; +} +function getRelativePath(path2, cwd, root) { + return import_node_path.posix.relative(cwd, `${root}/${path2}`) || "."; +} +function processPath(path2, cwd, root, isDirectory, absolute) { + const relativePath = absolute ? path2.slice(root === "/" ? 1 : root.length + 1) || "." : path2; + if (root === cwd) { + return isDirectory && relativePath !== "." ? relativePath.slice(0, -1) : relativePath; + } + return getRelativePath(relativePath, cwd, root); +} +function formatPaths(paths, cwd, root) { + for (let i = paths.length - 1; i >= 0; i--) { + const path2 = paths[i]; + paths[i] = getRelativePath(path2, cwd, root) + (!path2 || path2.endsWith("/") ? "/" : ""); + } + return paths; +} +function crawl(options, cwd, sync) { + if (process.env.TINYGLOBBY_DEBUG) { + options.debug = true; + } + if (options.debug) { + log("globbing with options:", options, "cwd:", cwd); + } + if (Array.isArray(options.patterns) && options.patterns.length === 0) { + return sync ? [] : Promise.resolve([]); + } + const props = { + root: cwd, + commonPath: null, + depthOffset: 0 + }; + const processed = processPatterns(options, cwd, props); + const nocase = options.caseSensitiveMatch === false; + if (options.debug) { + log("internal processing patterns:", processed); + } + const matcher = (0, import_picomatch2.default)(processed.match, { + dot: options.dot, + nocase, + ignore: processed.ignore + }); + const ignore = (0, import_picomatch2.default)(processed.ignore, { + dot: options.dot, + nocase + }); + const partialMatcher = getPartialMatcher(processed.match, { + dot: options.dot, + nocase + }); + const fdirOptions = { + // use relative paths in the matcher + filters: [ + options.debug ? (p, isDirectory) => { + const path2 = processPath(p, cwd, props.root, isDirectory, options.absolute); + const matches = matcher(path2); + if (matches) { + log(`matched ${path2}`); + } + return matches; + } : (p, isDirectory) => matcher(processPath(p, cwd, props.root, isDirectory, options.absolute)) + ], + exclude: options.debug ? (_, p) => { + const relativePath = processPath(p, cwd, props.root, true, true); + const skipped = relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath); + if (skipped) { + log(`skipped ${p}`); + } else { + log(`crawling ${p}`); + } + return skipped; + } : (_, p) => { + const relativePath = processPath(p, cwd, props.root, true, true); + return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath); + }, + pathSeparator: "/", + relativePaths: true, + resolveSymlinks: true + }; + if (options.deep) { + fdirOptions.maxDepth = Math.round(options.deep - props.depthOffset); + } + if (options.absolute) { + fdirOptions.relativePaths = false; + fdirOptions.resolvePaths = true; + fdirOptions.includeBasePath = true; + } + if (options.followSymbolicLinks === false) { + fdirOptions.resolveSymlinks = false; + fdirOptions.excludeSymlinks = true; + } + if (options.onlyDirectories) { + fdirOptions.excludeFiles = true; + fdirOptions.includeDirs = true; + } else if (options.onlyFiles === false) { + fdirOptions.includeDirs = true; + } + props.root = props.root.replace(BACKSLASHES, ""); + const root = props.root; + if (options.debug) { + log("internal properties:", props); + } + const api = new import_fdir.fdir(fdirOptions).crawl(root); + if (cwd === root || options.absolute) { + return sync ? api.sync() : api.withPromise(); + } + return sync ? formatPaths(api.sync(), cwd, root) : api.withPromise().then((paths) => formatPaths(paths, cwd, root)); +} +async function glob(patternsOrOptions, options) { + if (patternsOrOptions && (options == null ? void 0 : options.patterns)) { + throw new Error("Cannot pass patterns as both an argument and an option"); + } + const opts = Array.isArray(patternsOrOptions) || typeof patternsOrOptions === "string" ? { ...options, patterns: patternsOrOptions } : patternsOrOptions; + const cwd = opts.cwd ? import_node_path.default.resolve(opts.cwd).replace(BACKSLASHES, "/") : process.cwd().replace(BACKSLASHES, "/"); + return crawl(opts, cwd, false); +} +function globSync(patternsOrOptions, options) { + if (patternsOrOptions && (options == null ? void 0 : options.patterns)) { + throw new Error("Cannot pass patterns as both an argument and an option"); + } + const opts = Array.isArray(patternsOrOptions) || typeof patternsOrOptions === "string" ? { ...options, patterns: patternsOrOptions } : patternsOrOptions; + const cwd = opts.cwd ? import_node_path.default.resolve(opts.cwd).replace(BACKSLASHES, "/") : process.cwd().replace(BACKSLASHES, "/"); + return crawl(opts, cwd, true); +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + convertPathToPattern, + escapePath, + glob, + globSync, + isDynamicPattern +}); diff --git a/node_modules/tinyglobby/dist/index.mjs b/node_modules/tinyglobby/dist/index.mjs new file mode 100644 index 0000000..ec737e6 --- /dev/null +++ b/node_modules/tinyglobby/dist/index.mjs @@ -0,0 +1,294 @@ +// src/index.ts +import path, { posix } from "path"; +import { fdir } from "fdir"; +import picomatch2 from "picomatch"; + +// src/utils.ts +import picomatch from "picomatch"; +var ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/; +function getPartialMatcher(patterns, options) { + const patternsCount = patterns.length; + const patternsParts = Array(patternsCount); + const regexes = Array(patternsCount); + for (let i = 0; i < patternsCount; i++) { + const parts = splitPattern(patterns[i]); + patternsParts[i] = parts; + const partsCount = parts.length; + const partRegexes = Array(partsCount); + for (let j = 0; j < partsCount; j++) { + partRegexes[j] = picomatch.makeRe(parts[j], options); + } + regexes[i] = partRegexes; + } + return (input) => { + const inputParts = input.split("/"); + if (inputParts[0] === ".." && ONLY_PARENT_DIRECTORIES.test(input)) { + return true; + } + for (let i = 0; i < patterns.length; i++) { + const patternParts = patternsParts[i]; + const regex = regexes[i]; + const inputPatternCount = inputParts.length; + const minParts = Math.min(inputPatternCount, patternParts.length); + let j = 0; + while (j < minParts) { + const part = patternParts[j]; + if (part.includes("/")) { + return true; + } + const match = regex[j].test(inputParts[j]); + if (!match) { + break; + } + if (part === "**") { + return true; + } + j++; + } + if (j === inputPatternCount) { + return true; + } + } + return false; + }; +} +var splitPatternOptions = { parts: true }; +function splitPattern(path2) { + var _a; + const result = picomatch.scan(path2, splitPatternOptions); + return ((_a = result.parts) == null ? void 0 : _a.length) ? result.parts : [path2]; +} +var isWin = process.platform === "win32"; +var ESCAPED_WIN32_BACKSLASHES = /\\(?![()[\]{}!+@])/g; +function convertPosixPathToPattern(path2) { + return escapePosixPath(path2); +} +function convertWin32PathToPattern(path2) { + return escapeWin32Path(path2).replace(ESCAPED_WIN32_BACKSLASHES, "/"); +} +var convertPathToPattern = isWin ? convertWin32PathToPattern : convertPosixPathToPattern; +var POSIX_UNESCAPED_GLOB_SYMBOLS = /(? path2.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&"); +var escapeWin32Path = (path2) => path2.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&"); +var escapePath = isWin ? escapeWin32Path : escapePosixPath; +function isDynamicPattern(pattern, options) { + if ((options == null ? void 0 : options.caseSensitiveMatch) === false) { + return true; + } + const scan = picomatch.scan(pattern); + return scan.isGlob || scan.negated; +} +function log(...tasks) { + console.log(`[tinyglobby ${(/* @__PURE__ */ new Date()).toLocaleTimeString("es")}]`, ...tasks); +} + +// src/index.ts +var PARENT_DIRECTORY = /^(\/?\.\.)+/; +var ESCAPING_BACKSLASHES = /\\(?=[()[\]{}!*+?@|])/g; +var BACKSLASHES = /\\/g; +function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) { + var _a; + let result = pattern; + if (pattern.endsWith("/")) { + result = pattern.slice(0, -1); + } + if (!result.endsWith("*") && expandDirectories) { + result += "/**"; + } + if (path.isAbsolute(result.replace(ESCAPING_BACKSLASHES, ""))) { + result = posix.relative(escapePath(cwd), result); + } else { + result = posix.normalize(result); + } + const parentDirectoryMatch = PARENT_DIRECTORY.exec(result); + if (parentDirectoryMatch == null ? void 0 : parentDirectoryMatch[0]) { + const potentialRoot = posix.join(cwd, parentDirectoryMatch[0]); + if (props.root.length > potentialRoot.length) { + props.root = potentialRoot; + props.depthOffset = -(parentDirectoryMatch[0].length + 1) / 3; + } + } else if (!isIgnore && props.depthOffset >= 0) { + const parts = splitPattern(result); + (_a = props.commonPath) != null ? _a : props.commonPath = parts; + const newCommonPath = []; + const length = Math.min(props.commonPath.length, parts.length); + for (let i = 0; i < length; i++) { + const part = parts[i]; + if (part === "**" && !parts[i + 1]) { + newCommonPath.pop(); + break; + } + if (part !== props.commonPath[i] || isDynamicPattern(part) || i === parts.length - 1) { + break; + } + newCommonPath.push(part); + } + props.depthOffset = newCommonPath.length; + props.commonPath = newCommonPath; + props.root = newCommonPath.length > 0 ? path.posix.join(cwd, ...newCommonPath) : cwd; + } + return result; +} +function processPatterns({ patterns, ignore = [], expandDirectories = true }, cwd, props) { + if (typeof patterns === "string") { + patterns = [patterns]; + } else if (!patterns) { + patterns = ["**/*"]; + } + if (typeof ignore === "string") { + ignore = [ignore]; + } + const matchPatterns = []; + const ignorePatterns = []; + for (const pattern of ignore) { + if (!pattern) { + continue; + } + if (pattern[0] !== "!" || pattern[1] === "(") { + ignorePatterns.push(normalizePattern(pattern, expandDirectories, cwd, props, true)); + } + } + for (const pattern of patterns) { + if (!pattern) { + continue; + } + if (pattern[0] !== "!" || pattern[1] === "(") { + matchPatterns.push(normalizePattern(pattern, expandDirectories, cwd, props, false)); + } else if (pattern[1] !== "!" || pattern[2] === "(") { + ignorePatterns.push(normalizePattern(pattern.slice(1), expandDirectories, cwd, props, true)); + } + } + return { match: matchPatterns, ignore: ignorePatterns }; +} +function getRelativePath(path2, cwd, root) { + return posix.relative(cwd, `${root}/${path2}`) || "."; +} +function processPath(path2, cwd, root, isDirectory, absolute) { + const relativePath = absolute ? path2.slice(root === "/" ? 1 : root.length + 1) || "." : path2; + if (root === cwd) { + return isDirectory && relativePath !== "." ? relativePath.slice(0, -1) : relativePath; + } + return getRelativePath(relativePath, cwd, root); +} +function formatPaths(paths, cwd, root) { + for (let i = paths.length - 1; i >= 0; i--) { + const path2 = paths[i]; + paths[i] = getRelativePath(path2, cwd, root) + (!path2 || path2.endsWith("/") ? "/" : ""); + } + return paths; +} +function crawl(options, cwd, sync) { + if (process.env.TINYGLOBBY_DEBUG) { + options.debug = true; + } + if (options.debug) { + log("globbing with options:", options, "cwd:", cwd); + } + if (Array.isArray(options.patterns) && options.patterns.length === 0) { + return sync ? [] : Promise.resolve([]); + } + const props = { + root: cwd, + commonPath: null, + depthOffset: 0 + }; + const processed = processPatterns(options, cwd, props); + const nocase = options.caseSensitiveMatch === false; + if (options.debug) { + log("internal processing patterns:", processed); + } + const matcher = picomatch2(processed.match, { + dot: options.dot, + nocase, + ignore: processed.ignore + }); + const ignore = picomatch2(processed.ignore, { + dot: options.dot, + nocase + }); + const partialMatcher = getPartialMatcher(processed.match, { + dot: options.dot, + nocase + }); + const fdirOptions = { + // use relative paths in the matcher + filters: [ + options.debug ? (p, isDirectory) => { + const path2 = processPath(p, cwd, props.root, isDirectory, options.absolute); + const matches = matcher(path2); + if (matches) { + log(`matched ${path2}`); + } + return matches; + } : (p, isDirectory) => matcher(processPath(p, cwd, props.root, isDirectory, options.absolute)) + ], + exclude: options.debug ? (_, p) => { + const relativePath = processPath(p, cwd, props.root, true, true); + const skipped = relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath); + if (skipped) { + log(`skipped ${p}`); + } else { + log(`crawling ${p}`); + } + return skipped; + } : (_, p) => { + const relativePath = processPath(p, cwd, props.root, true, true); + return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath); + }, + pathSeparator: "/", + relativePaths: true, + resolveSymlinks: true + }; + if (options.deep) { + fdirOptions.maxDepth = Math.round(options.deep - props.depthOffset); + } + if (options.absolute) { + fdirOptions.relativePaths = false; + fdirOptions.resolvePaths = true; + fdirOptions.includeBasePath = true; + } + if (options.followSymbolicLinks === false) { + fdirOptions.resolveSymlinks = false; + fdirOptions.excludeSymlinks = true; + } + if (options.onlyDirectories) { + fdirOptions.excludeFiles = true; + fdirOptions.includeDirs = true; + } else if (options.onlyFiles === false) { + fdirOptions.includeDirs = true; + } + props.root = props.root.replace(BACKSLASHES, ""); + const root = props.root; + if (options.debug) { + log("internal properties:", props); + } + const api = new fdir(fdirOptions).crawl(root); + if (cwd === root || options.absolute) { + return sync ? api.sync() : api.withPromise(); + } + return sync ? formatPaths(api.sync(), cwd, root) : api.withPromise().then((paths) => formatPaths(paths, cwd, root)); +} +async function glob(patternsOrOptions, options) { + if (patternsOrOptions && (options == null ? void 0 : options.patterns)) { + throw new Error("Cannot pass patterns as both an argument and an option"); + } + const opts = Array.isArray(patternsOrOptions) || typeof patternsOrOptions === "string" ? { ...options, patterns: patternsOrOptions } : patternsOrOptions; + const cwd = opts.cwd ? path.resolve(opts.cwd).replace(BACKSLASHES, "/") : process.cwd().replace(BACKSLASHES, "/"); + return crawl(opts, cwd, false); +} +function globSync(patternsOrOptions, options) { + if (patternsOrOptions && (options == null ? void 0 : options.patterns)) { + throw new Error("Cannot pass patterns as both an argument and an option"); + } + const opts = Array.isArray(patternsOrOptions) || typeof patternsOrOptions === "string" ? { ...options, patterns: patternsOrOptions } : patternsOrOptions; + const cwd = opts.cwd ? path.resolve(opts.cwd).replace(BACKSLASHES, "/") : process.cwd().replace(BACKSLASHES, "/"); + return crawl(opts, cwd, true); +} +export { + convertPathToPattern, + escapePath, + glob, + globSync, + isDynamicPattern +}; diff --git a/node_modules/tinyglobby/package.json b/node_modules/tinyglobby/package.json new file mode 100644 index 0000000..04b46be --- /dev/null +++ b/node_modules/tinyglobby/package.json @@ -0,0 +1,65 @@ +{ + "name": "tinyglobby", + "version": "0.2.13", + "description": "A fast and minimal alternative to globby and fast-glob", + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "exports": { + "import": "./dist/index.mjs", + "require": "./dist/index.js" + }, + "sideEffects": false, + "files": [ + "dist" + ], + "author": "Superchupu", + "license": "MIT", + "keywords": [ + "glob", + "patterns", + "fast", + "implementation" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/SuperchupuDev/tinyglobby.git" + }, + "bugs": { + "url": "https://github.com/SuperchupuDev/tinyglobby/issues" + }, + "homepage": "https://github.com/SuperchupuDev/tinyglobby#readme", + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + }, + "dependencies": { + "fdir": "^6.4.4", + "picomatch": "^4.0.2" + }, + "devDependencies": { + "@biomejs/biome": "^1.9.4", + "@types/node": "^22.14.1", + "@types/picomatch": "^4.0.0", + "fs-fixture": "^2.7.1", + "tsup": "^8.4.0", + "typescript": "^5.8.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "publishConfig": { + "access": "public", + "provenance": true + }, + "scripts": { + "build": "tsup", + "check": "biome check", + "format": "biome format --write", + "lint": "biome lint", + "lint:fix": "biome lint --fix --unsafe", + "test": "node --experimental-transform-types --test", + "test:coverage": "node --experimental-transform-types --test --experimental-test-coverage", + "test:only": "node --experimental-transform-types --test --test-only", + "typecheck": "tsc --noEmit" + } +} \ No newline at end of file diff --git a/node_modules/totalist/dist/index.js b/node_modules/totalist/dist/index.js new file mode 100644 index 0000000..ad75d83 --- /dev/null +++ b/node_modules/totalist/dist/index.js @@ -0,0 +1,24 @@ +const { join, resolve } = require('path'); +const { readdir, stat } = require('fs'); +const { promisify } = require('util'); + +const toStats = promisify(stat); +const toRead = promisify(readdir); + +async function totalist(dir, callback, pre='') { + dir = resolve('.', dir); + await toRead(dir).then(arr => { + return Promise.all( + arr.map(str => { + let abs = join(dir, str); + return toStats(abs).then(stats => { + return stats.isDirectory() + ? totalist(abs, callback, join(pre, str)) + : callback(join(pre, str), abs, stats) + }); + }) + ); + }); +} + +exports.totalist = totalist; \ No newline at end of file diff --git a/node_modules/totalist/dist/index.mjs b/node_modules/totalist/dist/index.mjs new file mode 100644 index 0000000..e445936 --- /dev/null +++ b/node_modules/totalist/dist/index.mjs @@ -0,0 +1,22 @@ +import { join, resolve } from 'path'; +import { readdir, stat } from 'fs'; +import { promisify } from 'util'; + +const toStats = promisify(stat); +const toRead = promisify(readdir); + +export async function totalist(dir, callback, pre='') { + dir = resolve('.', dir); + await toRead(dir).then(arr => { + return Promise.all( + arr.map(str => { + let abs = join(dir, str); + return toStats(abs).then(stats => { + return stats.isDirectory() + ? totalist(abs, callback, join(pre, str)) + : callback(join(pre, str), abs, stats) + }); + }) + ); + }); +} diff --git a/node_modules/totalist/index.d.ts b/node_modules/totalist/index.d.ts new file mode 100644 index 0000000..bbb3698 --- /dev/null +++ b/node_modules/totalist/index.d.ts @@ -0,0 +1,3 @@ +import { Stats } from 'fs'; +export type Caller = (relPath: string, absPath: string, stats: Stats) => any; +export function totalist(dir: string, callback: Caller, prefix?: string): Promise; diff --git a/node_modules/totalist/license b/node_modules/totalist/license new file mode 100644 index 0000000..a3f96f8 --- /dev/null +++ b/node_modules/totalist/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Luke Edwards (lukeed.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/totalist/package.json b/node_modules/totalist/package.json new file mode 100644 index 0000000..764ec86 --- /dev/null +++ b/node_modules/totalist/package.json @@ -0,0 +1,55 @@ +{ + "name": "totalist", + "version": "3.0.1", + "repository": "lukeed/totalist", + "description": "A tiny (195B to 220B) utility to recursively list all (total) files in a directory", + "module": "dist/index.mjs", + "main": "dist/index.js", + "types": "index.d.ts", + "exports": { + ".": { + "types": "./index.d.ts", + "import": "./dist/index.mjs", + "require": "./dist/index.js" + }, + "./sync": { + "types": "./sync/index.d.ts", + "import": "./sync/index.mjs", + "require": "./sync/index.js" + } + }, + "license": "MIT", + "files": [ + "index.d.ts", + "dist", + "sync" + ], + "author": { + "name": "Luke Edwards", + "email": "luke.edwards05@gmail.com", + "url": "https://lukeed.com" + }, + "engines": { + "node": ">=6" + }, + "keywords": [ + "list", + "recursive", + "files", + "glob", + "tree" + ], + "scripts": { + "build": "bundt", + "test": "uvu -r esm test -i fixtures" + }, + "modes": { + "sync": "src/sync.js", + "default": "src/async.js" + }, + "devDependencies": { + "bundt": "1.1.1", + "esm": "3.2.25", + "uvu": "0.3.3" + } +} diff --git a/node_modules/totalist/readme.md b/node_modules/totalist/readme.md new file mode 100644 index 0000000..79491ee --- /dev/null +++ b/node_modules/totalist/readme.md @@ -0,0 +1,109 @@ +# totalist [![build status](https://badgen.now.sh/github/status/lukeed/totalist)](https://github.com/lukeed/totalist/actions) [![codecov](https://badgen.now.sh/codecov/c/github/lukeed/totalist)](https://codecov.io/gh/lukeed/totalist) + +> A tiny (195B to 224B) utility to recursively list all (total) files in a directory + +Traverse a directory recursively, running a function for **every file** found. + +With this module, you easily apply custom logic to decide which file(s) to process without worrying about accidentally accessing a directory or making repeat `fs.Stats` requests. + +## Install + +``` +$ npm install --save totalist +``` + + +## Modes + +There are two "versions" of `totalist` available: + +#### "async" +> **Node.js:** >= 8.x
+> **Size (gzip):** 220 bytes
+> **Availability:** [CommonJS](https://unpkg.com/totalist/dist/index.js), [ES Module](https://unpkg.com/totalist/dist/index.mjs) + +This is the primary/default mode. It makes use of `async`/`await` and [`util.promisify`](https://nodejs.org/api/util.html#util_util_promisify_original). + +#### "sync" +> **Node.js:** >= 6.x
+> **Size (gzip):** 195 bytes
+> **Availability:** [CommonJS](https://unpkg.com/totalist/sync/index.js), [ES Module](https://unpkg.com/totalist/sync/index.mjs) + +This is the opt-in mode, ideal for scenarios where `async` usage cannot be supported. + + +## Usage + +***Selecting a Mode*** + +```js +// import via npm module +import { totalist } from 'totalist'; +import { totalist } from 'totalist/sync'; +``` + +***Example Usage*** + +```js +import { totalist } from 'totalist/sync'; + +const styles = new Set(); +const scripts = new Set(); + +totalist('src', (name, abs, stats) => { + if (/\.js$/.test(name)) { + scripts.add(abs); + if (stats.size >= 100e3) { + console.warn(`[WARN] "${name}" might cause performance issues (${stats.size})`); + } + } else if (/\.css$/.test(name)) { + styles.add(abs); + } +}); + +console.log([...scripts]); +//=> [..., '/Users/lukeed/.../src/path/to/example.css', ...] +``` + + +## API + +### totalist(dir, callback) +Returns: `void` + +> **Important:** The "async" usage must be `await`ed or included within a Promise chain. + +#### dir +Type: `string`
+Required: `true` + +The directory to traverse. + +This may be a relative _or_ an absolute path. + +> **Note**: Node.js will assume a relative path is meant to be resolved from the current location (`process.cwd()`). + +#### callback +Type: `Function`
+Required: `true` + +The callback function to run for _every_ file. + +The function receives three parameters: + +##### relPath +Type: `String`
+The path _relative to_ the initial `dir` value you provided. + +##### absPath +Type: `String`
+The absolute path of the file. + +##### stats +Type: `fs.Stats`
+The [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) object for the file. + + +## License + +MIT © [Luke Edwards](https://lukeed.com) diff --git a/node_modules/totalist/sync/index.d.ts b/node_modules/totalist/sync/index.d.ts new file mode 100644 index 0000000..5f2d6d5 --- /dev/null +++ b/node_modules/totalist/sync/index.d.ts @@ -0,0 +1,3 @@ +import { Stats } from 'fs'; +export type Caller = (relPath: string, absPath: string, stats: Stats) => any; +export function totalist(dir: string, callback: Caller, prefix?: string): void; diff --git a/node_modules/totalist/sync/index.js b/node_modules/totalist/sync/index.js new file mode 100644 index 0000000..9e5bc46 --- /dev/null +++ b/node_modules/totalist/sync/index.js @@ -0,0 +1,17 @@ +const { join, resolve } = require('path'); +const { readdirSync, statSync } = require('fs'); + +function totalist(dir, callback, pre='') { + dir = resolve('.', dir); + let arr = readdirSync(dir); + let i=0, abs, stats; + for (; i < arr.length; i++) { + abs = join(dir, arr[i]); + stats = statSync(abs); + stats.isDirectory() + ? totalist(abs, callback, join(pre, arr[i])) + : callback(join(pre, arr[i]), abs, stats); + } +} + +exports.totalist = totalist; \ No newline at end of file diff --git a/node_modules/totalist/sync/index.mjs b/node_modules/totalist/sync/index.mjs new file mode 100644 index 0000000..e751c3f --- /dev/null +++ b/node_modules/totalist/sync/index.mjs @@ -0,0 +1,15 @@ +import { join, resolve } from 'path'; +import { readdirSync, statSync } from 'fs'; + +export function totalist(dir, callback, pre='') { + dir = resolve('.', dir); + let arr = readdirSync(dir); + let i=0, abs, stats; + for (; i < arr.length; i++) { + abs = join(dir, arr[i]); + stats = statSync(abs); + stats.isDirectory() + ? totalist(abs, callback, join(pre, arr[i])) + : callback(join(pre, arr[i]), abs, stats); + } +} diff --git a/node_modules/tr46/.npmignore b/node_modules/tr46/.npmignore new file mode 100644 index 0000000..96e9161 --- /dev/null +++ b/node_modules/tr46/.npmignore @@ -0,0 +1,4 @@ +scripts/ +test/ + +!lib/mapping_table.json diff --git a/node_modules/tr46/index.js b/node_modules/tr46/index.js new file mode 100644 index 0000000..9ce12ca --- /dev/null +++ b/node_modules/tr46/index.js @@ -0,0 +1,193 @@ +"use strict"; + +var punycode = require("punycode"); +var mappingTable = require("./lib/mappingTable.json"); + +var PROCESSING_OPTIONS = { + TRANSITIONAL: 0, + NONTRANSITIONAL: 1 +}; + +function normalize(str) { // fix bug in v8 + return str.split('\u0000').map(function (s) { return s.normalize('NFC'); }).join('\u0000'); +} + +function findStatus(val) { + var start = 0; + var end = mappingTable.length - 1; + + while (start <= end) { + var mid = Math.floor((start + end) / 2); + + var target = mappingTable[mid]; + if (target[0][0] <= val && target[0][1] >= val) { + return target; + } else if (target[0][0] > val) { + end = mid - 1; + } else { + start = mid + 1; + } + } + + return null; +} + +var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; + +function countSymbols(string) { + return string + // replace every surrogate pair with a BMP symbol + .replace(regexAstralSymbols, '_') + // then get the length + .length; +} + +function mapChars(domain_name, useSTD3, processing_option) { + var hasError = false; + var processed = ""; + + var len = countSymbols(domain_name); + for (var i = 0; i < len; ++i) { + var codePoint = domain_name.codePointAt(i); + var status = findStatus(codePoint); + + switch (status[1]) { + case "disallowed": + hasError = true; + processed += String.fromCodePoint(codePoint); + break; + case "ignored": + break; + case "mapped": + processed += String.fromCodePoint.apply(String, status[2]); + break; + case "deviation": + if (processing_option === PROCESSING_OPTIONS.TRANSITIONAL) { + processed += String.fromCodePoint.apply(String, status[2]); + } else { + processed += String.fromCodePoint(codePoint); + } + break; + case "valid": + processed += String.fromCodePoint(codePoint); + break; + case "disallowed_STD3_mapped": + if (useSTD3) { + hasError = true; + processed += String.fromCodePoint(codePoint); + } else { + processed += String.fromCodePoint.apply(String, status[2]); + } + break; + case "disallowed_STD3_valid": + if (useSTD3) { + hasError = true; + } + + processed += String.fromCodePoint(codePoint); + break; + } + } + + return { + string: processed, + error: hasError + }; +} + +var combiningMarksRegex = /[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/; + +function validateLabel(label, processing_option) { + if (label.substr(0, 4) === "xn--") { + label = punycode.toUnicode(label); + processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL; + } + + var error = false; + + if (normalize(label) !== label || + (label[3] === "-" && label[4] === "-") || + label[0] === "-" || label[label.length - 1] === "-" || + label.indexOf(".") !== -1 || + label.search(combiningMarksRegex) === 0) { + error = true; + } + + var len = countSymbols(label); + for (var i = 0; i < len; ++i) { + var status = findStatus(label.codePointAt(i)); + if ((processing === PROCESSING_OPTIONS.TRANSITIONAL && status[1] !== "valid") || + (processing === PROCESSING_OPTIONS.NONTRANSITIONAL && + status[1] !== "valid" && status[1] !== "deviation")) { + error = true; + break; + } + } + + return { + label: label, + error: error + }; +} + +function processing(domain_name, useSTD3, processing_option) { + var result = mapChars(domain_name, useSTD3, processing_option); + result.string = normalize(result.string); + + var labels = result.string.split("."); + for (var i = 0; i < labels.length; ++i) { + try { + var validation = validateLabel(labels[i]); + labels[i] = validation.label; + result.error = result.error || validation.error; + } catch(e) { + result.error = true; + } + } + + return { + string: labels.join("."), + error: result.error + }; +} + +module.exports.toASCII = function(domain_name, useSTD3, processing_option, verifyDnsLength) { + var result = processing(domain_name, useSTD3, processing_option); + var labels = result.string.split("."); + labels = labels.map(function(l) { + try { + return punycode.toASCII(l); + } catch(e) { + result.error = true; + return l; + } + }); + + if (verifyDnsLength) { + var total = labels.slice(0, labels.length - 1).join(".").length; + if (total.length > 253 || total.length === 0) { + result.error = true; + } + + for (var i=0; i < labels.length; ++i) { + if (labels.length > 63 || labels.length === 0) { + result.error = true; + break; + } + } + } + + if (result.error) return null; + return labels.join("."); +}; + +module.exports.toUnicode = function(domain_name, useSTD3) { + var result = processing(domain_name, useSTD3, PROCESSING_OPTIONS.NONTRANSITIONAL); + + return { + domain: result.string, + error: result.error + }; +}; + +module.exports.PROCESSING_OPTIONS = PROCESSING_OPTIONS; diff --git a/node_modules/tr46/lib/.gitkeep b/node_modules/tr46/lib/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/tr46/lib/mappingTable.json b/node_modules/tr46/lib/mappingTable.json new file mode 100644 index 0000000..89cf19a --- /dev/null +++ b/node_modules/tr46/lib/mappingTable.json @@ -0,0 +1 @@ +[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"],[[47,47],"disallowed_STD3_valid"],[[48,57],"valid"],[[58,64],"disallowed_STD3_valid"],[[65,65],"mapped",[97]],[[66,66],"mapped",[98]],[[67,67],"mapped",[99]],[[68,68],"mapped",[100]],[[69,69],"mapped",[101]],[[70,70],"mapped",[102]],[[71,71],"mapped",[103]],[[72,72],"mapped",[104]],[[73,73],"mapped",[105]],[[74,74],"mapped",[106]],[[75,75],"mapped",[107]],[[76,76],"mapped",[108]],[[77,77],"mapped",[109]],[[78,78],"mapped",[110]],[[79,79],"mapped",[111]],[[80,80],"mapped",[112]],[[81,81],"mapped",[113]],[[82,82],"mapped",[114]],[[83,83],"mapped",[115]],[[84,84],"mapped",[116]],[[85,85],"mapped",[117]],[[86,86],"mapped",[118]],[[87,87],"mapped",[119]],[[88,88],"mapped",[120]],[[89,89],"mapped",[121]],[[90,90],"mapped",[122]],[[91,96],"disallowed_STD3_valid"],[[97,122],"valid"],[[123,127],"disallowed_STD3_valid"],[[128,159],"disallowed"],[[160,160],"disallowed_STD3_mapped",[32]],[[161,167],"valid",[],"NV8"],[[168,168],"disallowed_STD3_mapped",[32,776]],[[169,169],"valid",[],"NV8"],[[170,170],"mapped",[97]],[[171,172],"valid",[],"NV8"],[[173,173],"ignored"],[[174,174],"valid",[],"NV8"],[[175,175],"disallowed_STD3_mapped",[32,772]],[[176,177],"valid",[],"NV8"],[[178,178],"mapped",[50]],[[179,179],"mapped",[51]],[[180,180],"disallowed_STD3_mapped",[32,769]],[[181,181],"mapped",[956]],[[182,182],"valid",[],"NV8"],[[183,183],"valid"],[[184,184],"disallowed_STD3_mapped",[32,807]],[[185,185],"mapped",[49]],[[186,186],"mapped",[111]],[[187,187],"valid",[],"NV8"],[[188,188],"mapped",[49,8260,52]],[[189,189],"mapped",[49,8260,50]],[[190,190],"mapped",[51,8260,52]],[[191,191],"valid",[],"NV8"],[[192,192],"mapped",[224]],[[193,193],"mapped",[225]],[[194,194],"mapped",[226]],[[195,195],"mapped",[227]],[[196,196],"mapped",[228]],[[197,197],"mapped",[229]],[[198,198],"mapped",[230]],[[199,199],"mapped",[231]],[[200,200],"mapped",[232]],[[201,201],"mapped",[233]],[[202,202],"mapped",[234]],[[203,203],"mapped",[235]],[[204,204],"mapped",[236]],[[205,205],"mapped",[237]],[[206,206],"mapped",[238]],[[207,207],"mapped",[239]],[[208,208],"mapped",[240]],[[209,209],"mapped",[241]],[[210,210],"mapped",[242]],[[211,211],"mapped",[243]],[[212,212],"mapped",[244]],[[213,213],"mapped",[245]],[[214,214],"mapped",[246]],[[215,215],"valid",[],"NV8"],[[216,216],"mapped",[248]],[[217,217],"mapped",[249]],[[218,218],"mapped",[250]],[[219,219],"mapped",[251]],[[220,220],"mapped",[252]],[[221,221],"mapped",[253]],[[222,222],"mapped",[254]],[[223,223],"deviation",[115,115]],[[224,246],"valid"],[[247,247],"valid",[],"NV8"],[[248,255],"valid"],[[256,256],"mapped",[257]],[[257,257],"valid"],[[258,258],"mapped",[259]],[[259,259],"valid"],[[260,260],"mapped",[261]],[[261,261],"valid"],[[262,262],"mapped",[263]],[[263,263],"valid"],[[264,264],"mapped",[265]],[[265,265],"valid"],[[266,266],"mapped",[267]],[[267,267],"valid"],[[268,268],"mapped",[269]],[[269,269],"valid"],[[270,270],"mapped",[271]],[[271,271],"valid"],[[272,272],"mapped",[273]],[[273,273],"valid"],[[274,274],"mapped",[275]],[[275,275],"valid"],[[276,276],"mapped",[277]],[[277,277],"valid"],[[278,278],"mapped",[279]],[[279,279],"valid"],[[280,280],"mapped",[281]],[[281,281],"valid"],[[282,282],"mapped",[283]],[[283,283],"valid"],[[284,284],"mapped",[285]],[[285,285],"valid"],[[286,286],"mapped",[287]],[[287,287],"valid"],[[288,288],"mapped",[289]],[[289,289],"valid"],[[290,290],"mapped",[291]],[[291,291],"valid"],[[292,292],"mapped",[293]],[[293,293],"valid"],[[294,294],"mapped",[295]],[[295,295],"valid"],[[296,296],"mapped",[297]],[[297,297],"valid"],[[298,298],"mapped",[299]],[[299,299],"valid"],[[300,300],"mapped",[301]],[[301,301],"valid"],[[302,302],"mapped",[303]],[[303,303],"valid"],[[304,304],"mapped",[105,775]],[[305,305],"valid"],[[306,307],"mapped",[105,106]],[[308,308],"mapped",[309]],[[309,309],"valid"],[[310,310],"mapped",[311]],[[311,312],"valid"],[[313,313],"mapped",[314]],[[314,314],"valid"],[[315,315],"mapped",[316]],[[316,316],"valid"],[[317,317],"mapped",[318]],[[318,318],"valid"],[[319,320],"mapped",[108,183]],[[321,321],"mapped",[322]],[[322,322],"valid"],[[323,323],"mapped",[324]],[[324,324],"valid"],[[325,325],"mapped",[326]],[[326,326],"valid"],[[327,327],"mapped",[328]],[[328,328],"valid"],[[329,329],"mapped",[700,110]],[[330,330],"mapped",[331]],[[331,331],"valid"],[[332,332],"mapped",[333]],[[333,333],"valid"],[[334,334],"mapped",[335]],[[335,335],"valid"],[[336,336],"mapped",[337]],[[337,337],"valid"],[[338,338],"mapped",[339]],[[339,339],"valid"],[[340,340],"mapped",[341]],[[341,341],"valid"],[[342,342],"mapped",[343]],[[343,343],"valid"],[[344,344],"mapped",[345]],[[345,345],"valid"],[[346,346],"mapped",[347]],[[347,347],"valid"],[[348,348],"mapped",[349]],[[349,349],"valid"],[[350,350],"mapped",[351]],[[351,351],"valid"],[[352,352],"mapped",[353]],[[353,353],"valid"],[[354,354],"mapped",[355]],[[355,355],"valid"],[[356,356],"mapped",[357]],[[357,357],"valid"],[[358,358],"mapped",[359]],[[359,359],"valid"],[[360,360],"mapped",[361]],[[361,361],"valid"],[[362,362],"mapped",[363]],[[363,363],"valid"],[[364,364],"mapped",[365]],[[365,365],"valid"],[[366,366],"mapped",[367]],[[367,367],"valid"],[[368,368],"mapped",[369]],[[369,369],"valid"],[[370,370],"mapped",[371]],[[371,371],"valid"],[[372,372],"mapped",[373]],[[373,373],"valid"],[[374,374],"mapped",[375]],[[375,375],"valid"],[[376,376],"mapped",[255]],[[377,377],"mapped",[378]],[[378,378],"valid"],[[379,379],"mapped",[380]],[[380,380],"valid"],[[381,381],"mapped",[382]],[[382,382],"valid"],[[383,383],"mapped",[115]],[[384,384],"valid"],[[385,385],"mapped",[595]],[[386,386],"mapped",[387]],[[387,387],"valid"],[[388,388],"mapped",[389]],[[389,389],"valid"],[[390,390],"mapped",[596]],[[391,391],"mapped",[392]],[[392,392],"valid"],[[393,393],"mapped",[598]],[[394,394],"mapped",[599]],[[395,395],"mapped",[396]],[[396,397],"valid"],[[398,398],"mapped",[477]],[[399,399],"mapped",[601]],[[400,400],"mapped",[603]],[[401,401],"mapped",[402]],[[402,402],"valid"],[[403,403],"mapped",[608]],[[404,404],"mapped",[611]],[[405,405],"valid"],[[406,406],"mapped",[617]],[[407,407],"mapped",[616]],[[408,408],"mapped",[409]],[[409,411],"valid"],[[412,412],"mapped",[623]],[[413,413],"mapped",[626]],[[414,414],"valid"],[[415,415],"mapped",[629]],[[416,416],"mapped",[417]],[[417,417],"valid"],[[418,418],"mapped",[419]],[[419,419],"valid"],[[420,420],"mapped",[421]],[[421,421],"valid"],[[422,422],"mapped",[640]],[[423,423],"mapped",[424]],[[424,424],"valid"],[[425,425],"mapped",[643]],[[426,427],"valid"],[[428,428],"mapped",[429]],[[429,429],"valid"],[[430,430],"mapped",[648]],[[431,431],"mapped",[432]],[[432,432],"valid"],[[433,433],"mapped",[650]],[[434,434],"mapped",[651]],[[435,435],"mapped",[436]],[[436,436],"valid"],[[437,437],"mapped",[438]],[[438,438],"valid"],[[439,439],"mapped",[658]],[[440,440],"mapped",[441]],[[441,443],"valid"],[[444,444],"mapped",[445]],[[445,451],"valid"],[[452,454],"mapped",[100,382]],[[455,457],"mapped",[108,106]],[[458,460],"mapped",[110,106]],[[461,461],"mapped",[462]],[[462,462],"valid"],[[463,463],"mapped",[464]],[[464,464],"valid"],[[465,465],"mapped",[466]],[[466,466],"valid"],[[467,467],"mapped",[468]],[[468,468],"valid"],[[469,469],"mapped",[470]],[[470,470],"valid"],[[471,471],"mapped",[472]],[[472,472],"valid"],[[473,473],"mapped",[474]],[[474,474],"valid"],[[475,475],"mapped",[476]],[[476,477],"valid"],[[478,478],"mapped",[479]],[[479,479],"valid"],[[480,480],"mapped",[481]],[[481,481],"valid"],[[482,482],"mapped",[483]],[[483,483],"valid"],[[484,484],"mapped",[485]],[[485,485],"valid"],[[486,486],"mapped",[487]],[[487,487],"valid"],[[488,488],"mapped",[489]],[[489,489],"valid"],[[490,490],"mapped",[491]],[[491,491],"valid"],[[492,492],"mapped",[493]],[[493,493],"valid"],[[494,494],"mapped",[495]],[[495,496],"valid"],[[497,499],"mapped",[100,122]],[[500,500],"mapped",[501]],[[501,501],"valid"],[[502,502],"mapped",[405]],[[503,503],"mapped",[447]],[[504,504],"mapped",[505]],[[505,505],"valid"],[[506,506],"mapped",[507]],[[507,507],"valid"],[[508,508],"mapped",[509]],[[509,509],"valid"],[[510,510],"mapped",[511]],[[511,511],"valid"],[[512,512],"mapped",[513]],[[513,513],"valid"],[[514,514],"mapped",[515]],[[515,515],"valid"],[[516,516],"mapped",[517]],[[517,517],"valid"],[[518,518],"mapped",[519]],[[519,519],"valid"],[[520,520],"mapped",[521]],[[521,521],"valid"],[[522,522],"mapped",[523]],[[523,523],"valid"],[[524,524],"mapped",[525]],[[525,525],"valid"],[[526,526],"mapped",[527]],[[527,527],"valid"],[[528,528],"mapped",[529]],[[529,529],"valid"],[[530,530],"mapped",[531]],[[531,531],"valid"],[[532,532],"mapped",[533]],[[533,533],"valid"],[[534,534],"mapped",[535]],[[535,535],"valid"],[[536,536],"mapped",[537]],[[537,537],"valid"],[[538,538],"mapped",[539]],[[539,539],"valid"],[[540,540],"mapped",[541]],[[541,541],"valid"],[[542,542],"mapped",[543]],[[543,543],"valid"],[[544,544],"mapped",[414]],[[545,545],"valid"],[[546,546],"mapped",[547]],[[547,547],"valid"],[[548,548],"mapped",[549]],[[549,549],"valid"],[[550,550],"mapped",[551]],[[551,551],"valid"],[[552,552],"mapped",[553]],[[553,553],"valid"],[[554,554],"mapped",[555]],[[555,555],"valid"],[[556,556],"mapped",[557]],[[557,557],"valid"],[[558,558],"mapped",[559]],[[559,559],"valid"],[[560,560],"mapped",[561]],[[561,561],"valid"],[[562,562],"mapped",[563]],[[563,563],"valid"],[[564,566],"valid"],[[567,569],"valid"],[[570,570],"mapped",[11365]],[[571,571],"mapped",[572]],[[572,572],"valid"],[[573,573],"mapped",[410]],[[574,574],"mapped",[11366]],[[575,576],"valid"],[[577,577],"mapped",[578]],[[578,578],"valid"],[[579,579],"mapped",[384]],[[580,580],"mapped",[649]],[[581,581],"mapped",[652]],[[582,582],"mapped",[583]],[[583,583],"valid"],[[584,584],"mapped",[585]],[[585,585],"valid"],[[586,586],"mapped",[587]],[[587,587],"valid"],[[588,588],"mapped",[589]],[[589,589],"valid"],[[590,590],"mapped",[591]],[[591,591],"valid"],[[592,680],"valid"],[[681,685],"valid"],[[686,687],"valid"],[[688,688],"mapped",[104]],[[689,689],"mapped",[614]],[[690,690],"mapped",[106]],[[691,691],"mapped",[114]],[[692,692],"mapped",[633]],[[693,693],"mapped",[635]],[[694,694],"mapped",[641]],[[695,695],"mapped",[119]],[[696,696],"mapped",[121]],[[697,705],"valid"],[[706,709],"valid",[],"NV8"],[[710,721],"valid"],[[722,727],"valid",[],"NV8"],[[728,728],"disallowed_STD3_mapped",[32,774]],[[729,729],"disallowed_STD3_mapped",[32,775]],[[730,730],"disallowed_STD3_mapped",[32,778]],[[731,731],"disallowed_STD3_mapped",[32,808]],[[732,732],"disallowed_STD3_mapped",[32,771]],[[733,733],"disallowed_STD3_mapped",[32,779]],[[734,734],"valid",[],"NV8"],[[735,735],"valid",[],"NV8"],[[736,736],"mapped",[611]],[[737,737],"mapped",[108]],[[738,738],"mapped",[115]],[[739,739],"mapped",[120]],[[740,740],"mapped",[661]],[[741,745],"valid",[],"NV8"],[[746,747],"valid",[],"NV8"],[[748,748],"valid"],[[749,749],"valid",[],"NV8"],[[750,750],"valid"],[[751,767],"valid",[],"NV8"],[[768,831],"valid"],[[832,832],"mapped",[768]],[[833,833],"mapped",[769]],[[834,834],"valid"],[[835,835],"mapped",[787]],[[836,836],"mapped",[776,769]],[[837,837],"mapped",[953]],[[838,846],"valid"],[[847,847],"ignored"],[[848,855],"valid"],[[856,860],"valid"],[[861,863],"valid"],[[864,865],"valid"],[[866,866],"valid"],[[867,879],"valid"],[[880,880],"mapped",[881]],[[881,881],"valid"],[[882,882],"mapped",[883]],[[883,883],"valid"],[[884,884],"mapped",[697]],[[885,885],"valid"],[[886,886],"mapped",[887]],[[887,887],"valid"],[[888,889],"disallowed"],[[890,890],"disallowed_STD3_mapped",[32,953]],[[891,893],"valid"],[[894,894],"disallowed_STD3_mapped",[59]],[[895,895],"mapped",[1011]],[[896,899],"disallowed"],[[900,900],"disallowed_STD3_mapped",[32,769]],[[901,901],"disallowed_STD3_mapped",[32,776,769]],[[902,902],"mapped",[940]],[[903,903],"mapped",[183]],[[904,904],"mapped",[941]],[[905,905],"mapped",[942]],[[906,906],"mapped",[943]],[[907,907],"disallowed"],[[908,908],"mapped",[972]],[[909,909],"disallowed"],[[910,910],"mapped",[973]],[[911,911],"mapped",[974]],[[912,912],"valid"],[[913,913],"mapped",[945]],[[914,914],"mapped",[946]],[[915,915],"mapped",[947]],[[916,916],"mapped",[948]],[[917,917],"mapped",[949]],[[918,918],"mapped",[950]],[[919,919],"mapped",[951]],[[920,920],"mapped",[952]],[[921,921],"mapped",[953]],[[922,922],"mapped",[954]],[[923,923],"mapped",[955]],[[924,924],"mapped",[956]],[[925,925],"mapped",[957]],[[926,926],"mapped",[958]],[[927,927],"mapped",[959]],[[928,928],"mapped",[960]],[[929,929],"mapped",[961]],[[930,930],"disallowed"],[[931,931],"mapped",[963]],[[932,932],"mapped",[964]],[[933,933],"mapped",[965]],[[934,934],"mapped",[966]],[[935,935],"mapped",[967]],[[936,936],"mapped",[968]],[[937,937],"mapped",[969]],[[938,938],"mapped",[970]],[[939,939],"mapped",[971]],[[940,961],"valid"],[[962,962],"deviation",[963]],[[963,974],"valid"],[[975,975],"mapped",[983]],[[976,976],"mapped",[946]],[[977,977],"mapped",[952]],[[978,978],"mapped",[965]],[[979,979],"mapped",[973]],[[980,980],"mapped",[971]],[[981,981],"mapped",[966]],[[982,982],"mapped",[960]],[[983,983],"valid"],[[984,984],"mapped",[985]],[[985,985],"valid"],[[986,986],"mapped",[987]],[[987,987],"valid"],[[988,988],"mapped",[989]],[[989,989],"valid"],[[990,990],"mapped",[991]],[[991,991],"valid"],[[992,992],"mapped",[993]],[[993,993],"valid"],[[994,994],"mapped",[995]],[[995,995],"valid"],[[996,996],"mapped",[997]],[[997,997],"valid"],[[998,998],"mapped",[999]],[[999,999],"valid"],[[1000,1000],"mapped",[1001]],[[1001,1001],"valid"],[[1002,1002],"mapped",[1003]],[[1003,1003],"valid"],[[1004,1004],"mapped",[1005]],[[1005,1005],"valid"],[[1006,1006],"mapped",[1007]],[[1007,1007],"valid"],[[1008,1008],"mapped",[954]],[[1009,1009],"mapped",[961]],[[1010,1010],"mapped",[963]],[[1011,1011],"valid"],[[1012,1012],"mapped",[952]],[[1013,1013],"mapped",[949]],[[1014,1014],"valid",[],"NV8"],[[1015,1015],"mapped",[1016]],[[1016,1016],"valid"],[[1017,1017],"mapped",[963]],[[1018,1018],"mapped",[1019]],[[1019,1019],"valid"],[[1020,1020],"valid"],[[1021,1021],"mapped",[891]],[[1022,1022],"mapped",[892]],[[1023,1023],"mapped",[893]],[[1024,1024],"mapped",[1104]],[[1025,1025],"mapped",[1105]],[[1026,1026],"mapped",[1106]],[[1027,1027],"mapped",[1107]],[[1028,1028],"mapped",[1108]],[[1029,1029],"mapped",[1109]],[[1030,1030],"mapped",[1110]],[[1031,1031],"mapped",[1111]],[[1032,1032],"mapped",[1112]],[[1033,1033],"mapped",[1113]],[[1034,1034],"mapped",[1114]],[[1035,1035],"mapped",[1115]],[[1036,1036],"mapped",[1116]],[[1037,1037],"mapped",[1117]],[[1038,1038],"mapped",[1118]],[[1039,1039],"mapped",[1119]],[[1040,1040],"mapped",[1072]],[[1041,1041],"mapped",[1073]],[[1042,1042],"mapped",[1074]],[[1043,1043],"mapped",[1075]],[[1044,1044],"mapped",[1076]],[[1045,1045],"mapped",[1077]],[[1046,1046],"mapped",[1078]],[[1047,1047],"mapped",[1079]],[[1048,1048],"mapped",[1080]],[[1049,1049],"mapped",[1081]],[[1050,1050],"mapped",[1082]],[[1051,1051],"mapped",[1083]],[[1052,1052],"mapped",[1084]],[[1053,1053],"mapped",[1085]],[[1054,1054],"mapped",[1086]],[[1055,1055],"mapped",[1087]],[[1056,1056],"mapped",[1088]],[[1057,1057],"mapped",[1089]],[[1058,1058],"mapped",[1090]],[[1059,1059],"mapped",[1091]],[[1060,1060],"mapped",[1092]],[[1061,1061],"mapped",[1093]],[[1062,1062],"mapped",[1094]],[[1063,1063],"mapped",[1095]],[[1064,1064],"mapped",[1096]],[[1065,1065],"mapped",[1097]],[[1066,1066],"mapped",[1098]],[[1067,1067],"mapped",[1099]],[[1068,1068],"mapped",[1100]],[[1069,1069],"mapped",[1101]],[[1070,1070],"mapped",[1102]],[[1071,1071],"mapped",[1103]],[[1072,1103],"valid"],[[1104,1104],"valid"],[[1105,1116],"valid"],[[1117,1117],"valid"],[[1118,1119],"valid"],[[1120,1120],"mapped",[1121]],[[1121,1121],"valid"],[[1122,1122],"mapped",[1123]],[[1123,1123],"valid"],[[1124,1124],"mapped",[1125]],[[1125,1125],"valid"],[[1126,1126],"mapped",[1127]],[[1127,1127],"valid"],[[1128,1128],"mapped",[1129]],[[1129,1129],"valid"],[[1130,1130],"mapped",[1131]],[[1131,1131],"valid"],[[1132,1132],"mapped",[1133]],[[1133,1133],"valid"],[[1134,1134],"mapped",[1135]],[[1135,1135],"valid"],[[1136,1136],"mapped",[1137]],[[1137,1137],"valid"],[[1138,1138],"mapped",[1139]],[[1139,1139],"valid"],[[1140,1140],"mapped",[1141]],[[1141,1141],"valid"],[[1142,1142],"mapped",[1143]],[[1143,1143],"valid"],[[1144,1144],"mapped",[1145]],[[1145,1145],"valid"],[[1146,1146],"mapped",[1147]],[[1147,1147],"valid"],[[1148,1148],"mapped",[1149]],[[1149,1149],"valid"],[[1150,1150],"mapped",[1151]],[[1151,1151],"valid"],[[1152,1152],"mapped",[1153]],[[1153,1153],"valid"],[[1154,1154],"valid",[],"NV8"],[[1155,1158],"valid"],[[1159,1159],"valid"],[[1160,1161],"valid",[],"NV8"],[[1162,1162],"mapped",[1163]],[[1163,1163],"valid"],[[1164,1164],"mapped",[1165]],[[1165,1165],"valid"],[[1166,1166],"mapped",[1167]],[[1167,1167],"valid"],[[1168,1168],"mapped",[1169]],[[1169,1169],"valid"],[[1170,1170],"mapped",[1171]],[[1171,1171],"valid"],[[1172,1172],"mapped",[1173]],[[1173,1173],"valid"],[[1174,1174],"mapped",[1175]],[[1175,1175],"valid"],[[1176,1176],"mapped",[1177]],[[1177,1177],"valid"],[[1178,1178],"mapped",[1179]],[[1179,1179],"valid"],[[1180,1180],"mapped",[1181]],[[1181,1181],"valid"],[[1182,1182],"mapped",[1183]],[[1183,1183],"valid"],[[1184,1184],"mapped",[1185]],[[1185,1185],"valid"],[[1186,1186],"mapped",[1187]],[[1187,1187],"valid"],[[1188,1188],"mapped",[1189]],[[1189,1189],"valid"],[[1190,1190],"mapped",[1191]],[[1191,1191],"valid"],[[1192,1192],"mapped",[1193]],[[1193,1193],"valid"],[[1194,1194],"mapped",[1195]],[[1195,1195],"valid"],[[1196,1196],"mapped",[1197]],[[1197,1197],"valid"],[[1198,1198],"mapped",[1199]],[[1199,1199],"valid"],[[1200,1200],"mapped",[1201]],[[1201,1201],"valid"],[[1202,1202],"mapped",[1203]],[[1203,1203],"valid"],[[1204,1204],"mapped",[1205]],[[1205,1205],"valid"],[[1206,1206],"mapped",[1207]],[[1207,1207],"valid"],[[1208,1208],"mapped",[1209]],[[1209,1209],"valid"],[[1210,1210],"mapped",[1211]],[[1211,1211],"valid"],[[1212,1212],"mapped",[1213]],[[1213,1213],"valid"],[[1214,1214],"mapped",[1215]],[[1215,1215],"valid"],[[1216,1216],"disallowed"],[[1217,1217],"mapped",[1218]],[[1218,1218],"valid"],[[1219,1219],"mapped",[1220]],[[1220,1220],"valid"],[[1221,1221],"mapped",[1222]],[[1222,1222],"valid"],[[1223,1223],"mapped",[1224]],[[1224,1224],"valid"],[[1225,1225],"mapped",[1226]],[[1226,1226],"valid"],[[1227,1227],"mapped",[1228]],[[1228,1228],"valid"],[[1229,1229],"mapped",[1230]],[[1230,1230],"valid"],[[1231,1231],"valid"],[[1232,1232],"mapped",[1233]],[[1233,1233],"valid"],[[1234,1234],"mapped",[1235]],[[1235,1235],"valid"],[[1236,1236],"mapped",[1237]],[[1237,1237],"valid"],[[1238,1238],"mapped",[1239]],[[1239,1239],"valid"],[[1240,1240],"mapped",[1241]],[[1241,1241],"valid"],[[1242,1242],"mapped",[1243]],[[1243,1243],"valid"],[[1244,1244],"mapped",[1245]],[[1245,1245],"valid"],[[1246,1246],"mapped",[1247]],[[1247,1247],"valid"],[[1248,1248],"mapped",[1249]],[[1249,1249],"valid"],[[1250,1250],"mapped",[1251]],[[1251,1251],"valid"],[[1252,1252],"mapped",[1253]],[[1253,1253],"valid"],[[1254,1254],"mapped",[1255]],[[1255,1255],"valid"],[[1256,1256],"mapped",[1257]],[[1257,1257],"valid"],[[1258,1258],"mapped",[1259]],[[1259,1259],"valid"],[[1260,1260],"mapped",[1261]],[[1261,1261],"valid"],[[1262,1262],"mapped",[1263]],[[1263,1263],"valid"],[[1264,1264],"mapped",[1265]],[[1265,1265],"valid"],[[1266,1266],"mapped",[1267]],[[1267,1267],"valid"],[[1268,1268],"mapped",[1269]],[[1269,1269],"valid"],[[1270,1270],"mapped",[1271]],[[1271,1271],"valid"],[[1272,1272],"mapped",[1273]],[[1273,1273],"valid"],[[1274,1274],"mapped",[1275]],[[1275,1275],"valid"],[[1276,1276],"mapped",[1277]],[[1277,1277],"valid"],[[1278,1278],"mapped",[1279]],[[1279,1279],"valid"],[[1280,1280],"mapped",[1281]],[[1281,1281],"valid"],[[1282,1282],"mapped",[1283]],[[1283,1283],"valid"],[[1284,1284],"mapped",[1285]],[[1285,1285],"valid"],[[1286,1286],"mapped",[1287]],[[1287,1287],"valid"],[[1288,1288],"mapped",[1289]],[[1289,1289],"valid"],[[1290,1290],"mapped",[1291]],[[1291,1291],"valid"],[[1292,1292],"mapped",[1293]],[[1293,1293],"valid"],[[1294,1294],"mapped",[1295]],[[1295,1295],"valid"],[[1296,1296],"mapped",[1297]],[[1297,1297],"valid"],[[1298,1298],"mapped",[1299]],[[1299,1299],"valid"],[[1300,1300],"mapped",[1301]],[[1301,1301],"valid"],[[1302,1302],"mapped",[1303]],[[1303,1303],"valid"],[[1304,1304],"mapped",[1305]],[[1305,1305],"valid"],[[1306,1306],"mapped",[1307]],[[1307,1307],"valid"],[[1308,1308],"mapped",[1309]],[[1309,1309],"valid"],[[1310,1310],"mapped",[1311]],[[1311,1311],"valid"],[[1312,1312],"mapped",[1313]],[[1313,1313],"valid"],[[1314,1314],"mapped",[1315]],[[1315,1315],"valid"],[[1316,1316],"mapped",[1317]],[[1317,1317],"valid"],[[1318,1318],"mapped",[1319]],[[1319,1319],"valid"],[[1320,1320],"mapped",[1321]],[[1321,1321],"valid"],[[1322,1322],"mapped",[1323]],[[1323,1323],"valid"],[[1324,1324],"mapped",[1325]],[[1325,1325],"valid"],[[1326,1326],"mapped",[1327]],[[1327,1327],"valid"],[[1328,1328],"disallowed"],[[1329,1329],"mapped",[1377]],[[1330,1330],"mapped",[1378]],[[1331,1331],"mapped",[1379]],[[1332,1332],"mapped",[1380]],[[1333,1333],"mapped",[1381]],[[1334,1334],"mapped",[1382]],[[1335,1335],"mapped",[1383]],[[1336,1336],"mapped",[1384]],[[1337,1337],"mapped",[1385]],[[1338,1338],"mapped",[1386]],[[1339,1339],"mapped",[1387]],[[1340,1340],"mapped",[1388]],[[1341,1341],"mapped",[1389]],[[1342,1342],"mapped",[1390]],[[1343,1343],"mapped",[1391]],[[1344,1344],"mapped",[1392]],[[1345,1345],"mapped",[1393]],[[1346,1346],"mapped",[1394]],[[1347,1347],"mapped",[1395]],[[1348,1348],"mapped",[1396]],[[1349,1349],"mapped",[1397]],[[1350,1350],"mapped",[1398]],[[1351,1351],"mapped",[1399]],[[1352,1352],"mapped",[1400]],[[1353,1353],"mapped",[1401]],[[1354,1354],"mapped",[1402]],[[1355,1355],"mapped",[1403]],[[1356,1356],"mapped",[1404]],[[1357,1357],"mapped",[1405]],[[1358,1358],"mapped",[1406]],[[1359,1359],"mapped",[1407]],[[1360,1360],"mapped",[1408]],[[1361,1361],"mapped",[1409]],[[1362,1362],"mapped",[1410]],[[1363,1363],"mapped",[1411]],[[1364,1364],"mapped",[1412]],[[1365,1365],"mapped",[1413]],[[1366,1366],"mapped",[1414]],[[1367,1368],"disallowed"],[[1369,1369],"valid"],[[1370,1375],"valid",[],"NV8"],[[1376,1376],"disallowed"],[[1377,1414],"valid"],[[1415,1415],"mapped",[1381,1410]],[[1416,1416],"disallowed"],[[1417,1417],"valid",[],"NV8"],[[1418,1418],"valid",[],"NV8"],[[1419,1420],"disallowed"],[[1421,1422],"valid",[],"NV8"],[[1423,1423],"valid",[],"NV8"],[[1424,1424],"disallowed"],[[1425,1441],"valid"],[[1442,1442],"valid"],[[1443,1455],"valid"],[[1456,1465],"valid"],[[1466,1466],"valid"],[[1467,1469],"valid"],[[1470,1470],"valid",[],"NV8"],[[1471,1471],"valid"],[[1472,1472],"valid",[],"NV8"],[[1473,1474],"valid"],[[1475,1475],"valid",[],"NV8"],[[1476,1476],"valid"],[[1477,1477],"valid"],[[1478,1478],"valid",[],"NV8"],[[1479,1479],"valid"],[[1480,1487],"disallowed"],[[1488,1514],"valid"],[[1515,1519],"disallowed"],[[1520,1524],"valid"],[[1525,1535],"disallowed"],[[1536,1539],"disallowed"],[[1540,1540],"disallowed"],[[1541,1541],"disallowed"],[[1542,1546],"valid",[],"NV8"],[[1547,1547],"valid",[],"NV8"],[[1548,1548],"valid",[],"NV8"],[[1549,1551],"valid",[],"NV8"],[[1552,1557],"valid"],[[1558,1562],"valid"],[[1563,1563],"valid",[],"NV8"],[[1564,1564],"disallowed"],[[1565,1565],"disallowed"],[[1566,1566],"valid",[],"NV8"],[[1567,1567],"valid",[],"NV8"],[[1568,1568],"valid"],[[1569,1594],"valid"],[[1595,1599],"valid"],[[1600,1600],"valid",[],"NV8"],[[1601,1618],"valid"],[[1619,1621],"valid"],[[1622,1624],"valid"],[[1625,1630],"valid"],[[1631,1631],"valid"],[[1632,1641],"valid"],[[1642,1645],"valid",[],"NV8"],[[1646,1647],"valid"],[[1648,1652],"valid"],[[1653,1653],"mapped",[1575,1652]],[[1654,1654],"mapped",[1608,1652]],[[1655,1655],"mapped",[1735,1652]],[[1656,1656],"mapped",[1610,1652]],[[1657,1719],"valid"],[[1720,1721],"valid"],[[1722,1726],"valid"],[[1727,1727],"valid"],[[1728,1742],"valid"],[[1743,1743],"valid"],[[1744,1747],"valid"],[[1748,1748],"valid",[],"NV8"],[[1749,1756],"valid"],[[1757,1757],"disallowed"],[[1758,1758],"valid",[],"NV8"],[[1759,1768],"valid"],[[1769,1769],"valid",[],"NV8"],[[1770,1773],"valid"],[[1774,1775],"valid"],[[1776,1785],"valid"],[[1786,1790],"valid"],[[1791,1791],"valid"],[[1792,1805],"valid",[],"NV8"],[[1806,1806],"disallowed"],[[1807,1807],"disallowed"],[[1808,1836],"valid"],[[1837,1839],"valid"],[[1840,1866],"valid"],[[1867,1868],"disallowed"],[[1869,1871],"valid"],[[1872,1901],"valid"],[[1902,1919],"valid"],[[1920,1968],"valid"],[[1969,1969],"valid"],[[1970,1983],"disallowed"],[[1984,2037],"valid"],[[2038,2042],"valid",[],"NV8"],[[2043,2047],"disallowed"],[[2048,2093],"valid"],[[2094,2095],"disallowed"],[[2096,2110],"valid",[],"NV8"],[[2111,2111],"disallowed"],[[2112,2139],"valid"],[[2140,2141],"disallowed"],[[2142,2142],"valid",[],"NV8"],[[2143,2207],"disallowed"],[[2208,2208],"valid"],[[2209,2209],"valid"],[[2210,2220],"valid"],[[2221,2226],"valid"],[[2227,2228],"valid"],[[2229,2274],"disallowed"],[[2275,2275],"valid"],[[2276,2302],"valid"],[[2303,2303],"valid"],[[2304,2304],"valid"],[[2305,2307],"valid"],[[2308,2308],"valid"],[[2309,2361],"valid"],[[2362,2363],"valid"],[[2364,2381],"valid"],[[2382,2382],"valid"],[[2383,2383],"valid"],[[2384,2388],"valid"],[[2389,2389],"valid"],[[2390,2391],"valid"],[[2392,2392],"mapped",[2325,2364]],[[2393,2393],"mapped",[2326,2364]],[[2394,2394],"mapped",[2327,2364]],[[2395,2395],"mapped",[2332,2364]],[[2396,2396],"mapped",[2337,2364]],[[2397,2397],"mapped",[2338,2364]],[[2398,2398],"mapped",[2347,2364]],[[2399,2399],"mapped",[2351,2364]],[[2400,2403],"valid"],[[2404,2405],"valid",[],"NV8"],[[2406,2415],"valid"],[[2416,2416],"valid",[],"NV8"],[[2417,2418],"valid"],[[2419,2423],"valid"],[[2424,2424],"valid"],[[2425,2426],"valid"],[[2427,2428],"valid"],[[2429,2429],"valid"],[[2430,2431],"valid"],[[2432,2432],"valid"],[[2433,2435],"valid"],[[2436,2436],"disallowed"],[[2437,2444],"valid"],[[2445,2446],"disallowed"],[[2447,2448],"valid"],[[2449,2450],"disallowed"],[[2451,2472],"valid"],[[2473,2473],"disallowed"],[[2474,2480],"valid"],[[2481,2481],"disallowed"],[[2482,2482],"valid"],[[2483,2485],"disallowed"],[[2486,2489],"valid"],[[2490,2491],"disallowed"],[[2492,2492],"valid"],[[2493,2493],"valid"],[[2494,2500],"valid"],[[2501,2502],"disallowed"],[[2503,2504],"valid"],[[2505,2506],"disallowed"],[[2507,2509],"valid"],[[2510,2510],"valid"],[[2511,2518],"disallowed"],[[2519,2519],"valid"],[[2520,2523],"disallowed"],[[2524,2524],"mapped",[2465,2492]],[[2525,2525],"mapped",[2466,2492]],[[2526,2526],"disallowed"],[[2527,2527],"mapped",[2479,2492]],[[2528,2531],"valid"],[[2532,2533],"disallowed"],[[2534,2545],"valid"],[[2546,2554],"valid",[],"NV8"],[[2555,2555],"valid",[],"NV8"],[[2556,2560],"disallowed"],[[2561,2561],"valid"],[[2562,2562],"valid"],[[2563,2563],"valid"],[[2564,2564],"disallowed"],[[2565,2570],"valid"],[[2571,2574],"disallowed"],[[2575,2576],"valid"],[[2577,2578],"disallowed"],[[2579,2600],"valid"],[[2601,2601],"disallowed"],[[2602,2608],"valid"],[[2609,2609],"disallowed"],[[2610,2610],"valid"],[[2611,2611],"mapped",[2610,2620]],[[2612,2612],"disallowed"],[[2613,2613],"valid"],[[2614,2614],"mapped",[2616,2620]],[[2615,2615],"disallowed"],[[2616,2617],"valid"],[[2618,2619],"disallowed"],[[2620,2620],"valid"],[[2621,2621],"disallowed"],[[2622,2626],"valid"],[[2627,2630],"disallowed"],[[2631,2632],"valid"],[[2633,2634],"disallowed"],[[2635,2637],"valid"],[[2638,2640],"disallowed"],[[2641,2641],"valid"],[[2642,2648],"disallowed"],[[2649,2649],"mapped",[2582,2620]],[[2650,2650],"mapped",[2583,2620]],[[2651,2651],"mapped",[2588,2620]],[[2652,2652],"valid"],[[2653,2653],"disallowed"],[[2654,2654],"mapped",[2603,2620]],[[2655,2661],"disallowed"],[[2662,2676],"valid"],[[2677,2677],"valid"],[[2678,2688],"disallowed"],[[2689,2691],"valid"],[[2692,2692],"disallowed"],[[2693,2699],"valid"],[[2700,2700],"valid"],[[2701,2701],"valid"],[[2702,2702],"disallowed"],[[2703,2705],"valid"],[[2706,2706],"disallowed"],[[2707,2728],"valid"],[[2729,2729],"disallowed"],[[2730,2736],"valid"],[[2737,2737],"disallowed"],[[2738,2739],"valid"],[[2740,2740],"disallowed"],[[2741,2745],"valid"],[[2746,2747],"disallowed"],[[2748,2757],"valid"],[[2758,2758],"disallowed"],[[2759,2761],"valid"],[[2762,2762],"disallowed"],[[2763,2765],"valid"],[[2766,2767],"disallowed"],[[2768,2768],"valid"],[[2769,2783],"disallowed"],[[2784,2784],"valid"],[[2785,2787],"valid"],[[2788,2789],"disallowed"],[[2790,2799],"valid"],[[2800,2800],"valid",[],"NV8"],[[2801,2801],"valid",[],"NV8"],[[2802,2808],"disallowed"],[[2809,2809],"valid"],[[2810,2816],"disallowed"],[[2817,2819],"valid"],[[2820,2820],"disallowed"],[[2821,2828],"valid"],[[2829,2830],"disallowed"],[[2831,2832],"valid"],[[2833,2834],"disallowed"],[[2835,2856],"valid"],[[2857,2857],"disallowed"],[[2858,2864],"valid"],[[2865,2865],"disallowed"],[[2866,2867],"valid"],[[2868,2868],"disallowed"],[[2869,2869],"valid"],[[2870,2873],"valid"],[[2874,2875],"disallowed"],[[2876,2883],"valid"],[[2884,2884],"valid"],[[2885,2886],"disallowed"],[[2887,2888],"valid"],[[2889,2890],"disallowed"],[[2891,2893],"valid"],[[2894,2901],"disallowed"],[[2902,2903],"valid"],[[2904,2907],"disallowed"],[[2908,2908],"mapped",[2849,2876]],[[2909,2909],"mapped",[2850,2876]],[[2910,2910],"disallowed"],[[2911,2913],"valid"],[[2914,2915],"valid"],[[2916,2917],"disallowed"],[[2918,2927],"valid"],[[2928,2928],"valid",[],"NV8"],[[2929,2929],"valid"],[[2930,2935],"valid",[],"NV8"],[[2936,2945],"disallowed"],[[2946,2947],"valid"],[[2948,2948],"disallowed"],[[2949,2954],"valid"],[[2955,2957],"disallowed"],[[2958,2960],"valid"],[[2961,2961],"disallowed"],[[2962,2965],"valid"],[[2966,2968],"disallowed"],[[2969,2970],"valid"],[[2971,2971],"disallowed"],[[2972,2972],"valid"],[[2973,2973],"disallowed"],[[2974,2975],"valid"],[[2976,2978],"disallowed"],[[2979,2980],"valid"],[[2981,2983],"disallowed"],[[2984,2986],"valid"],[[2987,2989],"disallowed"],[[2990,2997],"valid"],[[2998,2998],"valid"],[[2999,3001],"valid"],[[3002,3005],"disallowed"],[[3006,3010],"valid"],[[3011,3013],"disallowed"],[[3014,3016],"valid"],[[3017,3017],"disallowed"],[[3018,3021],"valid"],[[3022,3023],"disallowed"],[[3024,3024],"valid"],[[3025,3030],"disallowed"],[[3031,3031],"valid"],[[3032,3045],"disallowed"],[[3046,3046],"valid"],[[3047,3055],"valid"],[[3056,3058],"valid",[],"NV8"],[[3059,3066],"valid",[],"NV8"],[[3067,3071],"disallowed"],[[3072,3072],"valid"],[[3073,3075],"valid"],[[3076,3076],"disallowed"],[[3077,3084],"valid"],[[3085,3085],"disallowed"],[[3086,3088],"valid"],[[3089,3089],"disallowed"],[[3090,3112],"valid"],[[3113,3113],"disallowed"],[[3114,3123],"valid"],[[3124,3124],"valid"],[[3125,3129],"valid"],[[3130,3132],"disallowed"],[[3133,3133],"valid"],[[3134,3140],"valid"],[[3141,3141],"disallowed"],[[3142,3144],"valid"],[[3145,3145],"disallowed"],[[3146,3149],"valid"],[[3150,3156],"disallowed"],[[3157,3158],"valid"],[[3159,3159],"disallowed"],[[3160,3161],"valid"],[[3162,3162],"valid"],[[3163,3167],"disallowed"],[[3168,3169],"valid"],[[3170,3171],"valid"],[[3172,3173],"disallowed"],[[3174,3183],"valid"],[[3184,3191],"disallowed"],[[3192,3199],"valid",[],"NV8"],[[3200,3200],"disallowed"],[[3201,3201],"valid"],[[3202,3203],"valid"],[[3204,3204],"disallowed"],[[3205,3212],"valid"],[[3213,3213],"disallowed"],[[3214,3216],"valid"],[[3217,3217],"disallowed"],[[3218,3240],"valid"],[[3241,3241],"disallowed"],[[3242,3251],"valid"],[[3252,3252],"disallowed"],[[3253,3257],"valid"],[[3258,3259],"disallowed"],[[3260,3261],"valid"],[[3262,3268],"valid"],[[3269,3269],"disallowed"],[[3270,3272],"valid"],[[3273,3273],"disallowed"],[[3274,3277],"valid"],[[3278,3284],"disallowed"],[[3285,3286],"valid"],[[3287,3293],"disallowed"],[[3294,3294],"valid"],[[3295,3295],"disallowed"],[[3296,3297],"valid"],[[3298,3299],"valid"],[[3300,3301],"disallowed"],[[3302,3311],"valid"],[[3312,3312],"disallowed"],[[3313,3314],"valid"],[[3315,3328],"disallowed"],[[3329,3329],"valid"],[[3330,3331],"valid"],[[3332,3332],"disallowed"],[[3333,3340],"valid"],[[3341,3341],"disallowed"],[[3342,3344],"valid"],[[3345,3345],"disallowed"],[[3346,3368],"valid"],[[3369,3369],"valid"],[[3370,3385],"valid"],[[3386,3386],"valid"],[[3387,3388],"disallowed"],[[3389,3389],"valid"],[[3390,3395],"valid"],[[3396,3396],"valid"],[[3397,3397],"disallowed"],[[3398,3400],"valid"],[[3401,3401],"disallowed"],[[3402,3405],"valid"],[[3406,3406],"valid"],[[3407,3414],"disallowed"],[[3415,3415],"valid"],[[3416,3422],"disallowed"],[[3423,3423],"valid"],[[3424,3425],"valid"],[[3426,3427],"valid"],[[3428,3429],"disallowed"],[[3430,3439],"valid"],[[3440,3445],"valid",[],"NV8"],[[3446,3448],"disallowed"],[[3449,3449],"valid",[],"NV8"],[[3450,3455],"valid"],[[3456,3457],"disallowed"],[[3458,3459],"valid"],[[3460,3460],"disallowed"],[[3461,3478],"valid"],[[3479,3481],"disallowed"],[[3482,3505],"valid"],[[3506,3506],"disallowed"],[[3507,3515],"valid"],[[3516,3516],"disallowed"],[[3517,3517],"valid"],[[3518,3519],"disallowed"],[[3520,3526],"valid"],[[3527,3529],"disallowed"],[[3530,3530],"valid"],[[3531,3534],"disallowed"],[[3535,3540],"valid"],[[3541,3541],"disallowed"],[[3542,3542],"valid"],[[3543,3543],"disallowed"],[[3544,3551],"valid"],[[3552,3557],"disallowed"],[[3558,3567],"valid"],[[3568,3569],"disallowed"],[[3570,3571],"valid"],[[3572,3572],"valid",[],"NV8"],[[3573,3584],"disallowed"],[[3585,3634],"valid"],[[3635,3635],"mapped",[3661,3634]],[[3636,3642],"valid"],[[3643,3646],"disallowed"],[[3647,3647],"valid",[],"NV8"],[[3648,3662],"valid"],[[3663,3663],"valid",[],"NV8"],[[3664,3673],"valid"],[[3674,3675],"valid",[],"NV8"],[[3676,3712],"disallowed"],[[3713,3714],"valid"],[[3715,3715],"disallowed"],[[3716,3716],"valid"],[[3717,3718],"disallowed"],[[3719,3720],"valid"],[[3721,3721],"disallowed"],[[3722,3722],"valid"],[[3723,3724],"disallowed"],[[3725,3725],"valid"],[[3726,3731],"disallowed"],[[3732,3735],"valid"],[[3736,3736],"disallowed"],[[3737,3743],"valid"],[[3744,3744],"disallowed"],[[3745,3747],"valid"],[[3748,3748],"disallowed"],[[3749,3749],"valid"],[[3750,3750],"disallowed"],[[3751,3751],"valid"],[[3752,3753],"disallowed"],[[3754,3755],"valid"],[[3756,3756],"disallowed"],[[3757,3762],"valid"],[[3763,3763],"mapped",[3789,3762]],[[3764,3769],"valid"],[[3770,3770],"disallowed"],[[3771,3773],"valid"],[[3774,3775],"disallowed"],[[3776,3780],"valid"],[[3781,3781],"disallowed"],[[3782,3782],"valid"],[[3783,3783],"disallowed"],[[3784,3789],"valid"],[[3790,3791],"disallowed"],[[3792,3801],"valid"],[[3802,3803],"disallowed"],[[3804,3804],"mapped",[3755,3737]],[[3805,3805],"mapped",[3755,3745]],[[3806,3807],"valid"],[[3808,3839],"disallowed"],[[3840,3840],"valid"],[[3841,3850],"valid",[],"NV8"],[[3851,3851],"valid"],[[3852,3852],"mapped",[3851]],[[3853,3863],"valid",[],"NV8"],[[3864,3865],"valid"],[[3866,3871],"valid",[],"NV8"],[[3872,3881],"valid"],[[3882,3892],"valid",[],"NV8"],[[3893,3893],"valid"],[[3894,3894],"valid",[],"NV8"],[[3895,3895],"valid"],[[3896,3896],"valid",[],"NV8"],[[3897,3897],"valid"],[[3898,3901],"valid",[],"NV8"],[[3902,3906],"valid"],[[3907,3907],"mapped",[3906,4023]],[[3908,3911],"valid"],[[3912,3912],"disallowed"],[[3913,3916],"valid"],[[3917,3917],"mapped",[3916,4023]],[[3918,3921],"valid"],[[3922,3922],"mapped",[3921,4023]],[[3923,3926],"valid"],[[3927,3927],"mapped",[3926,4023]],[[3928,3931],"valid"],[[3932,3932],"mapped",[3931,4023]],[[3933,3944],"valid"],[[3945,3945],"mapped",[3904,4021]],[[3946,3946],"valid"],[[3947,3948],"valid"],[[3949,3952],"disallowed"],[[3953,3954],"valid"],[[3955,3955],"mapped",[3953,3954]],[[3956,3956],"valid"],[[3957,3957],"mapped",[3953,3956]],[[3958,3958],"mapped",[4018,3968]],[[3959,3959],"mapped",[4018,3953,3968]],[[3960,3960],"mapped",[4019,3968]],[[3961,3961],"mapped",[4019,3953,3968]],[[3962,3968],"valid"],[[3969,3969],"mapped",[3953,3968]],[[3970,3972],"valid"],[[3973,3973],"valid",[],"NV8"],[[3974,3979],"valid"],[[3980,3983],"valid"],[[3984,3986],"valid"],[[3987,3987],"mapped",[3986,4023]],[[3988,3989],"valid"],[[3990,3990],"valid"],[[3991,3991],"valid"],[[3992,3992],"disallowed"],[[3993,3996],"valid"],[[3997,3997],"mapped",[3996,4023]],[[3998,4001],"valid"],[[4002,4002],"mapped",[4001,4023]],[[4003,4006],"valid"],[[4007,4007],"mapped",[4006,4023]],[[4008,4011],"valid"],[[4012,4012],"mapped",[4011,4023]],[[4013,4013],"valid"],[[4014,4016],"valid"],[[4017,4023],"valid"],[[4024,4024],"valid"],[[4025,4025],"mapped",[3984,4021]],[[4026,4028],"valid"],[[4029,4029],"disallowed"],[[4030,4037],"valid",[],"NV8"],[[4038,4038],"valid"],[[4039,4044],"valid",[],"NV8"],[[4045,4045],"disallowed"],[[4046,4046],"valid",[],"NV8"],[[4047,4047],"valid",[],"NV8"],[[4048,4049],"valid",[],"NV8"],[[4050,4052],"valid",[],"NV8"],[[4053,4056],"valid",[],"NV8"],[[4057,4058],"valid",[],"NV8"],[[4059,4095],"disallowed"],[[4096,4129],"valid"],[[4130,4130],"valid"],[[4131,4135],"valid"],[[4136,4136],"valid"],[[4137,4138],"valid"],[[4139,4139],"valid"],[[4140,4146],"valid"],[[4147,4149],"valid"],[[4150,4153],"valid"],[[4154,4159],"valid"],[[4160,4169],"valid"],[[4170,4175],"valid",[],"NV8"],[[4176,4185],"valid"],[[4186,4249],"valid"],[[4250,4253],"valid"],[[4254,4255],"valid",[],"NV8"],[[4256,4293],"disallowed"],[[4294,4294],"disallowed"],[[4295,4295],"mapped",[11559]],[[4296,4300],"disallowed"],[[4301,4301],"mapped",[11565]],[[4302,4303],"disallowed"],[[4304,4342],"valid"],[[4343,4344],"valid"],[[4345,4346],"valid"],[[4347,4347],"valid",[],"NV8"],[[4348,4348],"mapped",[4316]],[[4349,4351],"valid"],[[4352,4441],"valid",[],"NV8"],[[4442,4446],"valid",[],"NV8"],[[4447,4448],"disallowed"],[[4449,4514],"valid",[],"NV8"],[[4515,4519],"valid",[],"NV8"],[[4520,4601],"valid",[],"NV8"],[[4602,4607],"valid",[],"NV8"],[[4608,4614],"valid"],[[4615,4615],"valid"],[[4616,4678],"valid"],[[4679,4679],"valid"],[[4680,4680],"valid"],[[4681,4681],"disallowed"],[[4682,4685],"valid"],[[4686,4687],"disallowed"],[[4688,4694],"valid"],[[4695,4695],"disallowed"],[[4696,4696],"valid"],[[4697,4697],"disallowed"],[[4698,4701],"valid"],[[4702,4703],"disallowed"],[[4704,4742],"valid"],[[4743,4743],"valid"],[[4744,4744],"valid"],[[4745,4745],"disallowed"],[[4746,4749],"valid"],[[4750,4751],"disallowed"],[[4752,4782],"valid"],[[4783,4783],"valid"],[[4784,4784],"valid"],[[4785,4785],"disallowed"],[[4786,4789],"valid"],[[4790,4791],"disallowed"],[[4792,4798],"valid"],[[4799,4799],"disallowed"],[[4800,4800],"valid"],[[4801,4801],"disallowed"],[[4802,4805],"valid"],[[4806,4807],"disallowed"],[[4808,4814],"valid"],[[4815,4815],"valid"],[[4816,4822],"valid"],[[4823,4823],"disallowed"],[[4824,4846],"valid"],[[4847,4847],"valid"],[[4848,4878],"valid"],[[4879,4879],"valid"],[[4880,4880],"valid"],[[4881,4881],"disallowed"],[[4882,4885],"valid"],[[4886,4887],"disallowed"],[[4888,4894],"valid"],[[4895,4895],"valid"],[[4896,4934],"valid"],[[4935,4935],"valid"],[[4936,4954],"valid"],[[4955,4956],"disallowed"],[[4957,4958],"valid"],[[4959,4959],"valid"],[[4960,4960],"valid",[],"NV8"],[[4961,4988],"valid",[],"NV8"],[[4989,4991],"disallowed"],[[4992,5007],"valid"],[[5008,5017],"valid",[],"NV8"],[[5018,5023],"disallowed"],[[5024,5108],"valid"],[[5109,5109],"valid"],[[5110,5111],"disallowed"],[[5112,5112],"mapped",[5104]],[[5113,5113],"mapped",[5105]],[[5114,5114],"mapped",[5106]],[[5115,5115],"mapped",[5107]],[[5116,5116],"mapped",[5108]],[[5117,5117],"mapped",[5109]],[[5118,5119],"disallowed"],[[5120,5120],"valid",[],"NV8"],[[5121,5740],"valid"],[[5741,5742],"valid",[],"NV8"],[[5743,5750],"valid"],[[5751,5759],"valid"],[[5760,5760],"disallowed"],[[5761,5786],"valid"],[[5787,5788],"valid",[],"NV8"],[[5789,5791],"disallowed"],[[5792,5866],"valid"],[[5867,5872],"valid",[],"NV8"],[[5873,5880],"valid"],[[5881,5887],"disallowed"],[[5888,5900],"valid"],[[5901,5901],"disallowed"],[[5902,5908],"valid"],[[5909,5919],"disallowed"],[[5920,5940],"valid"],[[5941,5942],"valid",[],"NV8"],[[5943,5951],"disallowed"],[[5952,5971],"valid"],[[5972,5983],"disallowed"],[[5984,5996],"valid"],[[5997,5997],"disallowed"],[[5998,6000],"valid"],[[6001,6001],"disallowed"],[[6002,6003],"valid"],[[6004,6015],"disallowed"],[[6016,6067],"valid"],[[6068,6069],"disallowed"],[[6070,6099],"valid"],[[6100,6102],"valid",[],"NV8"],[[6103,6103],"valid"],[[6104,6107],"valid",[],"NV8"],[[6108,6108],"valid"],[[6109,6109],"valid"],[[6110,6111],"disallowed"],[[6112,6121],"valid"],[[6122,6127],"disallowed"],[[6128,6137],"valid",[],"NV8"],[[6138,6143],"disallowed"],[[6144,6149],"valid",[],"NV8"],[[6150,6150],"disallowed"],[[6151,6154],"valid",[],"NV8"],[[6155,6157],"ignored"],[[6158,6158],"disallowed"],[[6159,6159],"disallowed"],[[6160,6169],"valid"],[[6170,6175],"disallowed"],[[6176,6263],"valid"],[[6264,6271],"disallowed"],[[6272,6313],"valid"],[[6314,6314],"valid"],[[6315,6319],"disallowed"],[[6320,6389],"valid"],[[6390,6399],"disallowed"],[[6400,6428],"valid"],[[6429,6430],"valid"],[[6431,6431],"disallowed"],[[6432,6443],"valid"],[[6444,6447],"disallowed"],[[6448,6459],"valid"],[[6460,6463],"disallowed"],[[6464,6464],"valid",[],"NV8"],[[6465,6467],"disallowed"],[[6468,6469],"valid",[],"NV8"],[[6470,6509],"valid"],[[6510,6511],"disallowed"],[[6512,6516],"valid"],[[6517,6527],"disallowed"],[[6528,6569],"valid"],[[6570,6571],"valid"],[[6572,6575],"disallowed"],[[6576,6601],"valid"],[[6602,6607],"disallowed"],[[6608,6617],"valid"],[[6618,6618],"valid",[],"XV8"],[[6619,6621],"disallowed"],[[6622,6623],"valid",[],"NV8"],[[6624,6655],"valid",[],"NV8"],[[6656,6683],"valid"],[[6684,6685],"disallowed"],[[6686,6687],"valid",[],"NV8"],[[6688,6750],"valid"],[[6751,6751],"disallowed"],[[6752,6780],"valid"],[[6781,6782],"disallowed"],[[6783,6793],"valid"],[[6794,6799],"disallowed"],[[6800,6809],"valid"],[[6810,6815],"disallowed"],[[6816,6822],"valid",[],"NV8"],[[6823,6823],"valid"],[[6824,6829],"valid",[],"NV8"],[[6830,6831],"disallowed"],[[6832,6845],"valid"],[[6846,6846],"valid",[],"NV8"],[[6847,6911],"disallowed"],[[6912,6987],"valid"],[[6988,6991],"disallowed"],[[6992,7001],"valid"],[[7002,7018],"valid",[],"NV8"],[[7019,7027],"valid"],[[7028,7036],"valid",[],"NV8"],[[7037,7039],"disallowed"],[[7040,7082],"valid"],[[7083,7085],"valid"],[[7086,7097],"valid"],[[7098,7103],"valid"],[[7104,7155],"valid"],[[7156,7163],"disallowed"],[[7164,7167],"valid",[],"NV8"],[[7168,7223],"valid"],[[7224,7226],"disallowed"],[[7227,7231],"valid",[],"NV8"],[[7232,7241],"valid"],[[7242,7244],"disallowed"],[[7245,7293],"valid"],[[7294,7295],"valid",[],"NV8"],[[7296,7359],"disallowed"],[[7360,7367],"valid",[],"NV8"],[[7368,7375],"disallowed"],[[7376,7378],"valid"],[[7379,7379],"valid",[],"NV8"],[[7380,7410],"valid"],[[7411,7414],"valid"],[[7415,7415],"disallowed"],[[7416,7417],"valid"],[[7418,7423],"disallowed"],[[7424,7467],"valid"],[[7468,7468],"mapped",[97]],[[7469,7469],"mapped",[230]],[[7470,7470],"mapped",[98]],[[7471,7471],"valid"],[[7472,7472],"mapped",[100]],[[7473,7473],"mapped",[101]],[[7474,7474],"mapped",[477]],[[7475,7475],"mapped",[103]],[[7476,7476],"mapped",[104]],[[7477,7477],"mapped",[105]],[[7478,7478],"mapped",[106]],[[7479,7479],"mapped",[107]],[[7480,7480],"mapped",[108]],[[7481,7481],"mapped",[109]],[[7482,7482],"mapped",[110]],[[7483,7483],"valid"],[[7484,7484],"mapped",[111]],[[7485,7485],"mapped",[547]],[[7486,7486],"mapped",[112]],[[7487,7487],"mapped",[114]],[[7488,7488],"mapped",[116]],[[7489,7489],"mapped",[117]],[[7490,7490],"mapped",[119]],[[7491,7491],"mapped",[97]],[[7492,7492],"mapped",[592]],[[7493,7493],"mapped",[593]],[[7494,7494],"mapped",[7426]],[[7495,7495],"mapped",[98]],[[7496,7496],"mapped",[100]],[[7497,7497],"mapped",[101]],[[7498,7498],"mapped",[601]],[[7499,7499],"mapped",[603]],[[7500,7500],"mapped",[604]],[[7501,7501],"mapped",[103]],[[7502,7502],"valid"],[[7503,7503],"mapped",[107]],[[7504,7504],"mapped",[109]],[[7505,7505],"mapped",[331]],[[7506,7506],"mapped",[111]],[[7507,7507],"mapped",[596]],[[7508,7508],"mapped",[7446]],[[7509,7509],"mapped",[7447]],[[7510,7510],"mapped",[112]],[[7511,7511],"mapped",[116]],[[7512,7512],"mapped",[117]],[[7513,7513],"mapped",[7453]],[[7514,7514],"mapped",[623]],[[7515,7515],"mapped",[118]],[[7516,7516],"mapped",[7461]],[[7517,7517],"mapped",[946]],[[7518,7518],"mapped",[947]],[[7519,7519],"mapped",[948]],[[7520,7520],"mapped",[966]],[[7521,7521],"mapped",[967]],[[7522,7522],"mapped",[105]],[[7523,7523],"mapped",[114]],[[7524,7524],"mapped",[117]],[[7525,7525],"mapped",[118]],[[7526,7526],"mapped",[946]],[[7527,7527],"mapped",[947]],[[7528,7528],"mapped",[961]],[[7529,7529],"mapped",[966]],[[7530,7530],"mapped",[967]],[[7531,7531],"valid"],[[7532,7543],"valid"],[[7544,7544],"mapped",[1085]],[[7545,7578],"valid"],[[7579,7579],"mapped",[594]],[[7580,7580],"mapped",[99]],[[7581,7581],"mapped",[597]],[[7582,7582],"mapped",[240]],[[7583,7583],"mapped",[604]],[[7584,7584],"mapped",[102]],[[7585,7585],"mapped",[607]],[[7586,7586],"mapped",[609]],[[7587,7587],"mapped",[613]],[[7588,7588],"mapped",[616]],[[7589,7589],"mapped",[617]],[[7590,7590],"mapped",[618]],[[7591,7591],"mapped",[7547]],[[7592,7592],"mapped",[669]],[[7593,7593],"mapped",[621]],[[7594,7594],"mapped",[7557]],[[7595,7595],"mapped",[671]],[[7596,7596],"mapped",[625]],[[7597,7597],"mapped",[624]],[[7598,7598],"mapped",[626]],[[7599,7599],"mapped",[627]],[[7600,7600],"mapped",[628]],[[7601,7601],"mapped",[629]],[[7602,7602],"mapped",[632]],[[7603,7603],"mapped",[642]],[[7604,7604],"mapped",[643]],[[7605,7605],"mapped",[427]],[[7606,7606],"mapped",[649]],[[7607,7607],"mapped",[650]],[[7608,7608],"mapped",[7452]],[[7609,7609],"mapped",[651]],[[7610,7610],"mapped",[652]],[[7611,7611],"mapped",[122]],[[7612,7612],"mapped",[656]],[[7613,7613],"mapped",[657]],[[7614,7614],"mapped",[658]],[[7615,7615],"mapped",[952]],[[7616,7619],"valid"],[[7620,7626],"valid"],[[7627,7654],"valid"],[[7655,7669],"valid"],[[7670,7675],"disallowed"],[[7676,7676],"valid"],[[7677,7677],"valid"],[[7678,7679],"valid"],[[7680,7680],"mapped",[7681]],[[7681,7681],"valid"],[[7682,7682],"mapped",[7683]],[[7683,7683],"valid"],[[7684,7684],"mapped",[7685]],[[7685,7685],"valid"],[[7686,7686],"mapped",[7687]],[[7687,7687],"valid"],[[7688,7688],"mapped",[7689]],[[7689,7689],"valid"],[[7690,7690],"mapped",[7691]],[[7691,7691],"valid"],[[7692,7692],"mapped",[7693]],[[7693,7693],"valid"],[[7694,7694],"mapped",[7695]],[[7695,7695],"valid"],[[7696,7696],"mapped",[7697]],[[7697,7697],"valid"],[[7698,7698],"mapped",[7699]],[[7699,7699],"valid"],[[7700,7700],"mapped",[7701]],[[7701,7701],"valid"],[[7702,7702],"mapped",[7703]],[[7703,7703],"valid"],[[7704,7704],"mapped",[7705]],[[7705,7705],"valid"],[[7706,7706],"mapped",[7707]],[[7707,7707],"valid"],[[7708,7708],"mapped",[7709]],[[7709,7709],"valid"],[[7710,7710],"mapped",[7711]],[[7711,7711],"valid"],[[7712,7712],"mapped",[7713]],[[7713,7713],"valid"],[[7714,7714],"mapped",[7715]],[[7715,7715],"valid"],[[7716,7716],"mapped",[7717]],[[7717,7717],"valid"],[[7718,7718],"mapped",[7719]],[[7719,7719],"valid"],[[7720,7720],"mapped",[7721]],[[7721,7721],"valid"],[[7722,7722],"mapped",[7723]],[[7723,7723],"valid"],[[7724,7724],"mapped",[7725]],[[7725,7725],"valid"],[[7726,7726],"mapped",[7727]],[[7727,7727],"valid"],[[7728,7728],"mapped",[7729]],[[7729,7729],"valid"],[[7730,7730],"mapped",[7731]],[[7731,7731],"valid"],[[7732,7732],"mapped",[7733]],[[7733,7733],"valid"],[[7734,7734],"mapped",[7735]],[[7735,7735],"valid"],[[7736,7736],"mapped",[7737]],[[7737,7737],"valid"],[[7738,7738],"mapped",[7739]],[[7739,7739],"valid"],[[7740,7740],"mapped",[7741]],[[7741,7741],"valid"],[[7742,7742],"mapped",[7743]],[[7743,7743],"valid"],[[7744,7744],"mapped",[7745]],[[7745,7745],"valid"],[[7746,7746],"mapped",[7747]],[[7747,7747],"valid"],[[7748,7748],"mapped",[7749]],[[7749,7749],"valid"],[[7750,7750],"mapped",[7751]],[[7751,7751],"valid"],[[7752,7752],"mapped",[7753]],[[7753,7753],"valid"],[[7754,7754],"mapped",[7755]],[[7755,7755],"valid"],[[7756,7756],"mapped",[7757]],[[7757,7757],"valid"],[[7758,7758],"mapped",[7759]],[[7759,7759],"valid"],[[7760,7760],"mapped",[7761]],[[7761,7761],"valid"],[[7762,7762],"mapped",[7763]],[[7763,7763],"valid"],[[7764,7764],"mapped",[7765]],[[7765,7765],"valid"],[[7766,7766],"mapped",[7767]],[[7767,7767],"valid"],[[7768,7768],"mapped",[7769]],[[7769,7769],"valid"],[[7770,7770],"mapped",[7771]],[[7771,7771],"valid"],[[7772,7772],"mapped",[7773]],[[7773,7773],"valid"],[[7774,7774],"mapped",[7775]],[[7775,7775],"valid"],[[7776,7776],"mapped",[7777]],[[7777,7777],"valid"],[[7778,7778],"mapped",[7779]],[[7779,7779],"valid"],[[7780,7780],"mapped",[7781]],[[7781,7781],"valid"],[[7782,7782],"mapped",[7783]],[[7783,7783],"valid"],[[7784,7784],"mapped",[7785]],[[7785,7785],"valid"],[[7786,7786],"mapped",[7787]],[[7787,7787],"valid"],[[7788,7788],"mapped",[7789]],[[7789,7789],"valid"],[[7790,7790],"mapped",[7791]],[[7791,7791],"valid"],[[7792,7792],"mapped",[7793]],[[7793,7793],"valid"],[[7794,7794],"mapped",[7795]],[[7795,7795],"valid"],[[7796,7796],"mapped",[7797]],[[7797,7797],"valid"],[[7798,7798],"mapped",[7799]],[[7799,7799],"valid"],[[7800,7800],"mapped",[7801]],[[7801,7801],"valid"],[[7802,7802],"mapped",[7803]],[[7803,7803],"valid"],[[7804,7804],"mapped",[7805]],[[7805,7805],"valid"],[[7806,7806],"mapped",[7807]],[[7807,7807],"valid"],[[7808,7808],"mapped",[7809]],[[7809,7809],"valid"],[[7810,7810],"mapped",[7811]],[[7811,7811],"valid"],[[7812,7812],"mapped",[7813]],[[7813,7813],"valid"],[[7814,7814],"mapped",[7815]],[[7815,7815],"valid"],[[7816,7816],"mapped",[7817]],[[7817,7817],"valid"],[[7818,7818],"mapped",[7819]],[[7819,7819],"valid"],[[7820,7820],"mapped",[7821]],[[7821,7821],"valid"],[[7822,7822],"mapped",[7823]],[[7823,7823],"valid"],[[7824,7824],"mapped",[7825]],[[7825,7825],"valid"],[[7826,7826],"mapped",[7827]],[[7827,7827],"valid"],[[7828,7828],"mapped",[7829]],[[7829,7833],"valid"],[[7834,7834],"mapped",[97,702]],[[7835,7835],"mapped",[7777]],[[7836,7837],"valid"],[[7838,7838],"mapped",[115,115]],[[7839,7839],"valid"],[[7840,7840],"mapped",[7841]],[[7841,7841],"valid"],[[7842,7842],"mapped",[7843]],[[7843,7843],"valid"],[[7844,7844],"mapped",[7845]],[[7845,7845],"valid"],[[7846,7846],"mapped",[7847]],[[7847,7847],"valid"],[[7848,7848],"mapped",[7849]],[[7849,7849],"valid"],[[7850,7850],"mapped",[7851]],[[7851,7851],"valid"],[[7852,7852],"mapped",[7853]],[[7853,7853],"valid"],[[7854,7854],"mapped",[7855]],[[7855,7855],"valid"],[[7856,7856],"mapped",[7857]],[[7857,7857],"valid"],[[7858,7858],"mapped",[7859]],[[7859,7859],"valid"],[[7860,7860],"mapped",[7861]],[[7861,7861],"valid"],[[7862,7862],"mapped",[7863]],[[7863,7863],"valid"],[[7864,7864],"mapped",[7865]],[[7865,7865],"valid"],[[7866,7866],"mapped",[7867]],[[7867,7867],"valid"],[[7868,7868],"mapped",[7869]],[[7869,7869],"valid"],[[7870,7870],"mapped",[7871]],[[7871,7871],"valid"],[[7872,7872],"mapped",[7873]],[[7873,7873],"valid"],[[7874,7874],"mapped",[7875]],[[7875,7875],"valid"],[[7876,7876],"mapped",[7877]],[[7877,7877],"valid"],[[7878,7878],"mapped",[7879]],[[7879,7879],"valid"],[[7880,7880],"mapped",[7881]],[[7881,7881],"valid"],[[7882,7882],"mapped",[7883]],[[7883,7883],"valid"],[[7884,7884],"mapped",[7885]],[[7885,7885],"valid"],[[7886,7886],"mapped",[7887]],[[7887,7887],"valid"],[[7888,7888],"mapped",[7889]],[[7889,7889],"valid"],[[7890,7890],"mapped",[7891]],[[7891,7891],"valid"],[[7892,7892],"mapped",[7893]],[[7893,7893],"valid"],[[7894,7894],"mapped",[7895]],[[7895,7895],"valid"],[[7896,7896],"mapped",[7897]],[[7897,7897],"valid"],[[7898,7898],"mapped",[7899]],[[7899,7899],"valid"],[[7900,7900],"mapped",[7901]],[[7901,7901],"valid"],[[7902,7902],"mapped",[7903]],[[7903,7903],"valid"],[[7904,7904],"mapped",[7905]],[[7905,7905],"valid"],[[7906,7906],"mapped",[7907]],[[7907,7907],"valid"],[[7908,7908],"mapped",[7909]],[[7909,7909],"valid"],[[7910,7910],"mapped",[7911]],[[7911,7911],"valid"],[[7912,7912],"mapped",[7913]],[[7913,7913],"valid"],[[7914,7914],"mapped",[7915]],[[7915,7915],"valid"],[[7916,7916],"mapped",[7917]],[[7917,7917],"valid"],[[7918,7918],"mapped",[7919]],[[7919,7919],"valid"],[[7920,7920],"mapped",[7921]],[[7921,7921],"valid"],[[7922,7922],"mapped",[7923]],[[7923,7923],"valid"],[[7924,7924],"mapped",[7925]],[[7925,7925],"valid"],[[7926,7926],"mapped",[7927]],[[7927,7927],"valid"],[[7928,7928],"mapped",[7929]],[[7929,7929],"valid"],[[7930,7930],"mapped",[7931]],[[7931,7931],"valid"],[[7932,7932],"mapped",[7933]],[[7933,7933],"valid"],[[7934,7934],"mapped",[7935]],[[7935,7935],"valid"],[[7936,7943],"valid"],[[7944,7944],"mapped",[7936]],[[7945,7945],"mapped",[7937]],[[7946,7946],"mapped",[7938]],[[7947,7947],"mapped",[7939]],[[7948,7948],"mapped",[7940]],[[7949,7949],"mapped",[7941]],[[7950,7950],"mapped",[7942]],[[7951,7951],"mapped",[7943]],[[7952,7957],"valid"],[[7958,7959],"disallowed"],[[7960,7960],"mapped",[7952]],[[7961,7961],"mapped",[7953]],[[7962,7962],"mapped",[7954]],[[7963,7963],"mapped",[7955]],[[7964,7964],"mapped",[7956]],[[7965,7965],"mapped",[7957]],[[7966,7967],"disallowed"],[[7968,7975],"valid"],[[7976,7976],"mapped",[7968]],[[7977,7977],"mapped",[7969]],[[7978,7978],"mapped",[7970]],[[7979,7979],"mapped",[7971]],[[7980,7980],"mapped",[7972]],[[7981,7981],"mapped",[7973]],[[7982,7982],"mapped",[7974]],[[7983,7983],"mapped",[7975]],[[7984,7991],"valid"],[[7992,7992],"mapped",[7984]],[[7993,7993],"mapped",[7985]],[[7994,7994],"mapped",[7986]],[[7995,7995],"mapped",[7987]],[[7996,7996],"mapped",[7988]],[[7997,7997],"mapped",[7989]],[[7998,7998],"mapped",[7990]],[[7999,7999],"mapped",[7991]],[[8000,8005],"valid"],[[8006,8007],"disallowed"],[[8008,8008],"mapped",[8000]],[[8009,8009],"mapped",[8001]],[[8010,8010],"mapped",[8002]],[[8011,8011],"mapped",[8003]],[[8012,8012],"mapped",[8004]],[[8013,8013],"mapped",[8005]],[[8014,8015],"disallowed"],[[8016,8023],"valid"],[[8024,8024],"disallowed"],[[8025,8025],"mapped",[8017]],[[8026,8026],"disallowed"],[[8027,8027],"mapped",[8019]],[[8028,8028],"disallowed"],[[8029,8029],"mapped",[8021]],[[8030,8030],"disallowed"],[[8031,8031],"mapped",[8023]],[[8032,8039],"valid"],[[8040,8040],"mapped",[8032]],[[8041,8041],"mapped",[8033]],[[8042,8042],"mapped",[8034]],[[8043,8043],"mapped",[8035]],[[8044,8044],"mapped",[8036]],[[8045,8045],"mapped",[8037]],[[8046,8046],"mapped",[8038]],[[8047,8047],"mapped",[8039]],[[8048,8048],"valid"],[[8049,8049],"mapped",[940]],[[8050,8050],"valid"],[[8051,8051],"mapped",[941]],[[8052,8052],"valid"],[[8053,8053],"mapped",[942]],[[8054,8054],"valid"],[[8055,8055],"mapped",[943]],[[8056,8056],"valid"],[[8057,8057],"mapped",[972]],[[8058,8058],"valid"],[[8059,8059],"mapped",[973]],[[8060,8060],"valid"],[[8061,8061],"mapped",[974]],[[8062,8063],"disallowed"],[[8064,8064],"mapped",[7936,953]],[[8065,8065],"mapped",[7937,953]],[[8066,8066],"mapped",[7938,953]],[[8067,8067],"mapped",[7939,953]],[[8068,8068],"mapped",[7940,953]],[[8069,8069],"mapped",[7941,953]],[[8070,8070],"mapped",[7942,953]],[[8071,8071],"mapped",[7943,953]],[[8072,8072],"mapped",[7936,953]],[[8073,8073],"mapped",[7937,953]],[[8074,8074],"mapped",[7938,953]],[[8075,8075],"mapped",[7939,953]],[[8076,8076],"mapped",[7940,953]],[[8077,8077],"mapped",[7941,953]],[[8078,8078],"mapped",[7942,953]],[[8079,8079],"mapped",[7943,953]],[[8080,8080],"mapped",[7968,953]],[[8081,8081],"mapped",[7969,953]],[[8082,8082],"mapped",[7970,953]],[[8083,8083],"mapped",[7971,953]],[[8084,8084],"mapped",[7972,953]],[[8085,8085],"mapped",[7973,953]],[[8086,8086],"mapped",[7974,953]],[[8087,8087],"mapped",[7975,953]],[[8088,8088],"mapped",[7968,953]],[[8089,8089],"mapped",[7969,953]],[[8090,8090],"mapped",[7970,953]],[[8091,8091],"mapped",[7971,953]],[[8092,8092],"mapped",[7972,953]],[[8093,8093],"mapped",[7973,953]],[[8094,8094],"mapped",[7974,953]],[[8095,8095],"mapped",[7975,953]],[[8096,8096],"mapped",[8032,953]],[[8097,8097],"mapped",[8033,953]],[[8098,8098],"mapped",[8034,953]],[[8099,8099],"mapped",[8035,953]],[[8100,8100],"mapped",[8036,953]],[[8101,8101],"mapped",[8037,953]],[[8102,8102],"mapped",[8038,953]],[[8103,8103],"mapped",[8039,953]],[[8104,8104],"mapped",[8032,953]],[[8105,8105],"mapped",[8033,953]],[[8106,8106],"mapped",[8034,953]],[[8107,8107],"mapped",[8035,953]],[[8108,8108],"mapped",[8036,953]],[[8109,8109],"mapped",[8037,953]],[[8110,8110],"mapped",[8038,953]],[[8111,8111],"mapped",[8039,953]],[[8112,8113],"valid"],[[8114,8114],"mapped",[8048,953]],[[8115,8115],"mapped",[945,953]],[[8116,8116],"mapped",[940,953]],[[8117,8117],"disallowed"],[[8118,8118],"valid"],[[8119,8119],"mapped",[8118,953]],[[8120,8120],"mapped",[8112]],[[8121,8121],"mapped",[8113]],[[8122,8122],"mapped",[8048]],[[8123,8123],"mapped",[940]],[[8124,8124],"mapped",[945,953]],[[8125,8125],"disallowed_STD3_mapped",[32,787]],[[8126,8126],"mapped",[953]],[[8127,8127],"disallowed_STD3_mapped",[32,787]],[[8128,8128],"disallowed_STD3_mapped",[32,834]],[[8129,8129],"disallowed_STD3_mapped",[32,776,834]],[[8130,8130],"mapped",[8052,953]],[[8131,8131],"mapped",[951,953]],[[8132,8132],"mapped",[942,953]],[[8133,8133],"disallowed"],[[8134,8134],"valid"],[[8135,8135],"mapped",[8134,953]],[[8136,8136],"mapped",[8050]],[[8137,8137],"mapped",[941]],[[8138,8138],"mapped",[8052]],[[8139,8139],"mapped",[942]],[[8140,8140],"mapped",[951,953]],[[8141,8141],"disallowed_STD3_mapped",[32,787,768]],[[8142,8142],"disallowed_STD3_mapped",[32,787,769]],[[8143,8143],"disallowed_STD3_mapped",[32,787,834]],[[8144,8146],"valid"],[[8147,8147],"mapped",[912]],[[8148,8149],"disallowed"],[[8150,8151],"valid"],[[8152,8152],"mapped",[8144]],[[8153,8153],"mapped",[8145]],[[8154,8154],"mapped",[8054]],[[8155,8155],"mapped",[943]],[[8156,8156],"disallowed"],[[8157,8157],"disallowed_STD3_mapped",[32,788,768]],[[8158,8158],"disallowed_STD3_mapped",[32,788,769]],[[8159,8159],"disallowed_STD3_mapped",[32,788,834]],[[8160,8162],"valid"],[[8163,8163],"mapped",[944]],[[8164,8167],"valid"],[[8168,8168],"mapped",[8160]],[[8169,8169],"mapped",[8161]],[[8170,8170],"mapped",[8058]],[[8171,8171],"mapped",[973]],[[8172,8172],"mapped",[8165]],[[8173,8173],"disallowed_STD3_mapped",[32,776,768]],[[8174,8174],"disallowed_STD3_mapped",[32,776,769]],[[8175,8175],"disallowed_STD3_mapped",[96]],[[8176,8177],"disallowed"],[[8178,8178],"mapped",[8060,953]],[[8179,8179],"mapped",[969,953]],[[8180,8180],"mapped",[974,953]],[[8181,8181],"disallowed"],[[8182,8182],"valid"],[[8183,8183],"mapped",[8182,953]],[[8184,8184],"mapped",[8056]],[[8185,8185],"mapped",[972]],[[8186,8186],"mapped",[8060]],[[8187,8187],"mapped",[974]],[[8188,8188],"mapped",[969,953]],[[8189,8189],"disallowed_STD3_mapped",[32,769]],[[8190,8190],"disallowed_STD3_mapped",[32,788]],[[8191,8191],"disallowed"],[[8192,8202],"disallowed_STD3_mapped",[32]],[[8203,8203],"ignored"],[[8204,8205],"deviation",[]],[[8206,8207],"disallowed"],[[8208,8208],"valid",[],"NV8"],[[8209,8209],"mapped",[8208]],[[8210,8214],"valid",[],"NV8"],[[8215,8215],"disallowed_STD3_mapped",[32,819]],[[8216,8227],"valid",[],"NV8"],[[8228,8230],"disallowed"],[[8231,8231],"valid",[],"NV8"],[[8232,8238],"disallowed"],[[8239,8239],"disallowed_STD3_mapped",[32]],[[8240,8242],"valid",[],"NV8"],[[8243,8243],"mapped",[8242,8242]],[[8244,8244],"mapped",[8242,8242,8242]],[[8245,8245],"valid",[],"NV8"],[[8246,8246],"mapped",[8245,8245]],[[8247,8247],"mapped",[8245,8245,8245]],[[8248,8251],"valid",[],"NV8"],[[8252,8252],"disallowed_STD3_mapped",[33,33]],[[8253,8253],"valid",[],"NV8"],[[8254,8254],"disallowed_STD3_mapped",[32,773]],[[8255,8262],"valid",[],"NV8"],[[8263,8263],"disallowed_STD3_mapped",[63,63]],[[8264,8264],"disallowed_STD3_mapped",[63,33]],[[8265,8265],"disallowed_STD3_mapped",[33,63]],[[8266,8269],"valid",[],"NV8"],[[8270,8274],"valid",[],"NV8"],[[8275,8276],"valid",[],"NV8"],[[8277,8278],"valid",[],"NV8"],[[8279,8279],"mapped",[8242,8242,8242,8242]],[[8280,8286],"valid",[],"NV8"],[[8287,8287],"disallowed_STD3_mapped",[32]],[[8288,8288],"ignored"],[[8289,8291],"disallowed"],[[8292,8292],"ignored"],[[8293,8293],"disallowed"],[[8294,8297],"disallowed"],[[8298,8303],"disallowed"],[[8304,8304],"mapped",[48]],[[8305,8305],"mapped",[105]],[[8306,8307],"disallowed"],[[8308,8308],"mapped",[52]],[[8309,8309],"mapped",[53]],[[8310,8310],"mapped",[54]],[[8311,8311],"mapped",[55]],[[8312,8312],"mapped",[56]],[[8313,8313],"mapped",[57]],[[8314,8314],"disallowed_STD3_mapped",[43]],[[8315,8315],"mapped",[8722]],[[8316,8316],"disallowed_STD3_mapped",[61]],[[8317,8317],"disallowed_STD3_mapped",[40]],[[8318,8318],"disallowed_STD3_mapped",[41]],[[8319,8319],"mapped",[110]],[[8320,8320],"mapped",[48]],[[8321,8321],"mapped",[49]],[[8322,8322],"mapped",[50]],[[8323,8323],"mapped",[51]],[[8324,8324],"mapped",[52]],[[8325,8325],"mapped",[53]],[[8326,8326],"mapped",[54]],[[8327,8327],"mapped",[55]],[[8328,8328],"mapped",[56]],[[8329,8329],"mapped",[57]],[[8330,8330],"disallowed_STD3_mapped",[43]],[[8331,8331],"mapped",[8722]],[[8332,8332],"disallowed_STD3_mapped",[61]],[[8333,8333],"disallowed_STD3_mapped",[40]],[[8334,8334],"disallowed_STD3_mapped",[41]],[[8335,8335],"disallowed"],[[8336,8336],"mapped",[97]],[[8337,8337],"mapped",[101]],[[8338,8338],"mapped",[111]],[[8339,8339],"mapped",[120]],[[8340,8340],"mapped",[601]],[[8341,8341],"mapped",[104]],[[8342,8342],"mapped",[107]],[[8343,8343],"mapped",[108]],[[8344,8344],"mapped",[109]],[[8345,8345],"mapped",[110]],[[8346,8346],"mapped",[112]],[[8347,8347],"mapped",[115]],[[8348,8348],"mapped",[116]],[[8349,8351],"disallowed"],[[8352,8359],"valid",[],"NV8"],[[8360,8360],"mapped",[114,115]],[[8361,8362],"valid",[],"NV8"],[[8363,8363],"valid",[],"NV8"],[[8364,8364],"valid",[],"NV8"],[[8365,8367],"valid",[],"NV8"],[[8368,8369],"valid",[],"NV8"],[[8370,8373],"valid",[],"NV8"],[[8374,8376],"valid",[],"NV8"],[[8377,8377],"valid",[],"NV8"],[[8378,8378],"valid",[],"NV8"],[[8379,8381],"valid",[],"NV8"],[[8382,8382],"valid",[],"NV8"],[[8383,8399],"disallowed"],[[8400,8417],"valid",[],"NV8"],[[8418,8419],"valid",[],"NV8"],[[8420,8426],"valid",[],"NV8"],[[8427,8427],"valid",[],"NV8"],[[8428,8431],"valid",[],"NV8"],[[8432,8432],"valid",[],"NV8"],[[8433,8447],"disallowed"],[[8448,8448],"disallowed_STD3_mapped",[97,47,99]],[[8449,8449],"disallowed_STD3_mapped",[97,47,115]],[[8450,8450],"mapped",[99]],[[8451,8451],"mapped",[176,99]],[[8452,8452],"valid",[],"NV8"],[[8453,8453],"disallowed_STD3_mapped",[99,47,111]],[[8454,8454],"disallowed_STD3_mapped",[99,47,117]],[[8455,8455],"mapped",[603]],[[8456,8456],"valid",[],"NV8"],[[8457,8457],"mapped",[176,102]],[[8458,8458],"mapped",[103]],[[8459,8462],"mapped",[104]],[[8463,8463],"mapped",[295]],[[8464,8465],"mapped",[105]],[[8466,8467],"mapped",[108]],[[8468,8468],"valid",[],"NV8"],[[8469,8469],"mapped",[110]],[[8470,8470],"mapped",[110,111]],[[8471,8472],"valid",[],"NV8"],[[8473,8473],"mapped",[112]],[[8474,8474],"mapped",[113]],[[8475,8477],"mapped",[114]],[[8478,8479],"valid",[],"NV8"],[[8480,8480],"mapped",[115,109]],[[8481,8481],"mapped",[116,101,108]],[[8482,8482],"mapped",[116,109]],[[8483,8483],"valid",[],"NV8"],[[8484,8484],"mapped",[122]],[[8485,8485],"valid",[],"NV8"],[[8486,8486],"mapped",[969]],[[8487,8487],"valid",[],"NV8"],[[8488,8488],"mapped",[122]],[[8489,8489],"valid",[],"NV8"],[[8490,8490],"mapped",[107]],[[8491,8491],"mapped",[229]],[[8492,8492],"mapped",[98]],[[8493,8493],"mapped",[99]],[[8494,8494],"valid",[],"NV8"],[[8495,8496],"mapped",[101]],[[8497,8497],"mapped",[102]],[[8498,8498],"disallowed"],[[8499,8499],"mapped",[109]],[[8500,8500],"mapped",[111]],[[8501,8501],"mapped",[1488]],[[8502,8502],"mapped",[1489]],[[8503,8503],"mapped",[1490]],[[8504,8504],"mapped",[1491]],[[8505,8505],"mapped",[105]],[[8506,8506],"valid",[],"NV8"],[[8507,8507],"mapped",[102,97,120]],[[8508,8508],"mapped",[960]],[[8509,8510],"mapped",[947]],[[8511,8511],"mapped",[960]],[[8512,8512],"mapped",[8721]],[[8513,8516],"valid",[],"NV8"],[[8517,8518],"mapped",[100]],[[8519,8519],"mapped",[101]],[[8520,8520],"mapped",[105]],[[8521,8521],"mapped",[106]],[[8522,8523],"valid",[],"NV8"],[[8524,8524],"valid",[],"NV8"],[[8525,8525],"valid",[],"NV8"],[[8526,8526],"valid"],[[8527,8527],"valid",[],"NV8"],[[8528,8528],"mapped",[49,8260,55]],[[8529,8529],"mapped",[49,8260,57]],[[8530,8530],"mapped",[49,8260,49,48]],[[8531,8531],"mapped",[49,8260,51]],[[8532,8532],"mapped",[50,8260,51]],[[8533,8533],"mapped",[49,8260,53]],[[8534,8534],"mapped",[50,8260,53]],[[8535,8535],"mapped",[51,8260,53]],[[8536,8536],"mapped",[52,8260,53]],[[8537,8537],"mapped",[49,8260,54]],[[8538,8538],"mapped",[53,8260,54]],[[8539,8539],"mapped",[49,8260,56]],[[8540,8540],"mapped",[51,8260,56]],[[8541,8541],"mapped",[53,8260,56]],[[8542,8542],"mapped",[55,8260,56]],[[8543,8543],"mapped",[49,8260]],[[8544,8544],"mapped",[105]],[[8545,8545],"mapped",[105,105]],[[8546,8546],"mapped",[105,105,105]],[[8547,8547],"mapped",[105,118]],[[8548,8548],"mapped",[118]],[[8549,8549],"mapped",[118,105]],[[8550,8550],"mapped",[118,105,105]],[[8551,8551],"mapped",[118,105,105,105]],[[8552,8552],"mapped",[105,120]],[[8553,8553],"mapped",[120]],[[8554,8554],"mapped",[120,105]],[[8555,8555],"mapped",[120,105,105]],[[8556,8556],"mapped",[108]],[[8557,8557],"mapped",[99]],[[8558,8558],"mapped",[100]],[[8559,8559],"mapped",[109]],[[8560,8560],"mapped",[105]],[[8561,8561],"mapped",[105,105]],[[8562,8562],"mapped",[105,105,105]],[[8563,8563],"mapped",[105,118]],[[8564,8564],"mapped",[118]],[[8565,8565],"mapped",[118,105]],[[8566,8566],"mapped",[118,105,105]],[[8567,8567],"mapped",[118,105,105,105]],[[8568,8568],"mapped",[105,120]],[[8569,8569],"mapped",[120]],[[8570,8570],"mapped",[120,105]],[[8571,8571],"mapped",[120,105,105]],[[8572,8572],"mapped",[108]],[[8573,8573],"mapped",[99]],[[8574,8574],"mapped",[100]],[[8575,8575],"mapped",[109]],[[8576,8578],"valid",[],"NV8"],[[8579,8579],"disallowed"],[[8580,8580],"valid"],[[8581,8584],"valid",[],"NV8"],[[8585,8585],"mapped",[48,8260,51]],[[8586,8587],"valid",[],"NV8"],[[8588,8591],"disallowed"],[[8592,8682],"valid",[],"NV8"],[[8683,8691],"valid",[],"NV8"],[[8692,8703],"valid",[],"NV8"],[[8704,8747],"valid",[],"NV8"],[[8748,8748],"mapped",[8747,8747]],[[8749,8749],"mapped",[8747,8747,8747]],[[8750,8750],"valid",[],"NV8"],[[8751,8751],"mapped",[8750,8750]],[[8752,8752],"mapped",[8750,8750,8750]],[[8753,8799],"valid",[],"NV8"],[[8800,8800],"disallowed_STD3_valid"],[[8801,8813],"valid",[],"NV8"],[[8814,8815],"disallowed_STD3_valid"],[[8816,8945],"valid",[],"NV8"],[[8946,8959],"valid",[],"NV8"],[[8960,8960],"valid",[],"NV8"],[[8961,8961],"valid",[],"NV8"],[[8962,9000],"valid",[],"NV8"],[[9001,9001],"mapped",[12296]],[[9002,9002],"mapped",[12297]],[[9003,9082],"valid",[],"NV8"],[[9083,9083],"valid",[],"NV8"],[[9084,9084],"valid",[],"NV8"],[[9085,9114],"valid",[],"NV8"],[[9115,9166],"valid",[],"NV8"],[[9167,9168],"valid",[],"NV8"],[[9169,9179],"valid",[],"NV8"],[[9180,9191],"valid",[],"NV8"],[[9192,9192],"valid",[],"NV8"],[[9193,9203],"valid",[],"NV8"],[[9204,9210],"valid",[],"NV8"],[[9211,9215],"disallowed"],[[9216,9252],"valid",[],"NV8"],[[9253,9254],"valid",[],"NV8"],[[9255,9279],"disallowed"],[[9280,9290],"valid",[],"NV8"],[[9291,9311],"disallowed"],[[9312,9312],"mapped",[49]],[[9313,9313],"mapped",[50]],[[9314,9314],"mapped",[51]],[[9315,9315],"mapped",[52]],[[9316,9316],"mapped",[53]],[[9317,9317],"mapped",[54]],[[9318,9318],"mapped",[55]],[[9319,9319],"mapped",[56]],[[9320,9320],"mapped",[57]],[[9321,9321],"mapped",[49,48]],[[9322,9322],"mapped",[49,49]],[[9323,9323],"mapped",[49,50]],[[9324,9324],"mapped",[49,51]],[[9325,9325],"mapped",[49,52]],[[9326,9326],"mapped",[49,53]],[[9327,9327],"mapped",[49,54]],[[9328,9328],"mapped",[49,55]],[[9329,9329],"mapped",[49,56]],[[9330,9330],"mapped",[49,57]],[[9331,9331],"mapped",[50,48]],[[9332,9332],"disallowed_STD3_mapped",[40,49,41]],[[9333,9333],"disallowed_STD3_mapped",[40,50,41]],[[9334,9334],"disallowed_STD3_mapped",[40,51,41]],[[9335,9335],"disallowed_STD3_mapped",[40,52,41]],[[9336,9336],"disallowed_STD3_mapped",[40,53,41]],[[9337,9337],"disallowed_STD3_mapped",[40,54,41]],[[9338,9338],"disallowed_STD3_mapped",[40,55,41]],[[9339,9339],"disallowed_STD3_mapped",[40,56,41]],[[9340,9340],"disallowed_STD3_mapped",[40,57,41]],[[9341,9341],"disallowed_STD3_mapped",[40,49,48,41]],[[9342,9342],"disallowed_STD3_mapped",[40,49,49,41]],[[9343,9343],"disallowed_STD3_mapped",[40,49,50,41]],[[9344,9344],"disallowed_STD3_mapped",[40,49,51,41]],[[9345,9345],"disallowed_STD3_mapped",[40,49,52,41]],[[9346,9346],"disallowed_STD3_mapped",[40,49,53,41]],[[9347,9347],"disallowed_STD3_mapped",[40,49,54,41]],[[9348,9348],"disallowed_STD3_mapped",[40,49,55,41]],[[9349,9349],"disallowed_STD3_mapped",[40,49,56,41]],[[9350,9350],"disallowed_STD3_mapped",[40,49,57,41]],[[9351,9351],"disallowed_STD3_mapped",[40,50,48,41]],[[9352,9371],"disallowed"],[[9372,9372],"disallowed_STD3_mapped",[40,97,41]],[[9373,9373],"disallowed_STD3_mapped",[40,98,41]],[[9374,9374],"disallowed_STD3_mapped",[40,99,41]],[[9375,9375],"disallowed_STD3_mapped",[40,100,41]],[[9376,9376],"disallowed_STD3_mapped",[40,101,41]],[[9377,9377],"disallowed_STD3_mapped",[40,102,41]],[[9378,9378],"disallowed_STD3_mapped",[40,103,41]],[[9379,9379],"disallowed_STD3_mapped",[40,104,41]],[[9380,9380],"disallowed_STD3_mapped",[40,105,41]],[[9381,9381],"disallowed_STD3_mapped",[40,106,41]],[[9382,9382],"disallowed_STD3_mapped",[40,107,41]],[[9383,9383],"disallowed_STD3_mapped",[40,108,41]],[[9384,9384],"disallowed_STD3_mapped",[40,109,41]],[[9385,9385],"disallowed_STD3_mapped",[40,110,41]],[[9386,9386],"disallowed_STD3_mapped",[40,111,41]],[[9387,9387],"disallowed_STD3_mapped",[40,112,41]],[[9388,9388],"disallowed_STD3_mapped",[40,113,41]],[[9389,9389],"disallowed_STD3_mapped",[40,114,41]],[[9390,9390],"disallowed_STD3_mapped",[40,115,41]],[[9391,9391],"disallowed_STD3_mapped",[40,116,41]],[[9392,9392],"disallowed_STD3_mapped",[40,117,41]],[[9393,9393],"disallowed_STD3_mapped",[40,118,41]],[[9394,9394],"disallowed_STD3_mapped",[40,119,41]],[[9395,9395],"disallowed_STD3_mapped",[40,120,41]],[[9396,9396],"disallowed_STD3_mapped",[40,121,41]],[[9397,9397],"disallowed_STD3_mapped",[40,122,41]],[[9398,9398],"mapped",[97]],[[9399,9399],"mapped",[98]],[[9400,9400],"mapped",[99]],[[9401,9401],"mapped",[100]],[[9402,9402],"mapped",[101]],[[9403,9403],"mapped",[102]],[[9404,9404],"mapped",[103]],[[9405,9405],"mapped",[104]],[[9406,9406],"mapped",[105]],[[9407,9407],"mapped",[106]],[[9408,9408],"mapped",[107]],[[9409,9409],"mapped",[108]],[[9410,9410],"mapped",[109]],[[9411,9411],"mapped",[110]],[[9412,9412],"mapped",[111]],[[9413,9413],"mapped",[112]],[[9414,9414],"mapped",[113]],[[9415,9415],"mapped",[114]],[[9416,9416],"mapped",[115]],[[9417,9417],"mapped",[116]],[[9418,9418],"mapped",[117]],[[9419,9419],"mapped",[118]],[[9420,9420],"mapped",[119]],[[9421,9421],"mapped",[120]],[[9422,9422],"mapped",[121]],[[9423,9423],"mapped",[122]],[[9424,9424],"mapped",[97]],[[9425,9425],"mapped",[98]],[[9426,9426],"mapped",[99]],[[9427,9427],"mapped",[100]],[[9428,9428],"mapped",[101]],[[9429,9429],"mapped",[102]],[[9430,9430],"mapped",[103]],[[9431,9431],"mapped",[104]],[[9432,9432],"mapped",[105]],[[9433,9433],"mapped",[106]],[[9434,9434],"mapped",[107]],[[9435,9435],"mapped",[108]],[[9436,9436],"mapped",[109]],[[9437,9437],"mapped",[110]],[[9438,9438],"mapped",[111]],[[9439,9439],"mapped",[112]],[[9440,9440],"mapped",[113]],[[9441,9441],"mapped",[114]],[[9442,9442],"mapped",[115]],[[9443,9443],"mapped",[116]],[[9444,9444],"mapped",[117]],[[9445,9445],"mapped",[118]],[[9446,9446],"mapped",[119]],[[9447,9447],"mapped",[120]],[[9448,9448],"mapped",[121]],[[9449,9449],"mapped",[122]],[[9450,9450],"mapped",[48]],[[9451,9470],"valid",[],"NV8"],[[9471,9471],"valid",[],"NV8"],[[9472,9621],"valid",[],"NV8"],[[9622,9631],"valid",[],"NV8"],[[9632,9711],"valid",[],"NV8"],[[9712,9719],"valid",[],"NV8"],[[9720,9727],"valid",[],"NV8"],[[9728,9747],"valid",[],"NV8"],[[9748,9749],"valid",[],"NV8"],[[9750,9751],"valid",[],"NV8"],[[9752,9752],"valid",[],"NV8"],[[9753,9753],"valid",[],"NV8"],[[9754,9839],"valid",[],"NV8"],[[9840,9841],"valid",[],"NV8"],[[9842,9853],"valid",[],"NV8"],[[9854,9855],"valid",[],"NV8"],[[9856,9865],"valid",[],"NV8"],[[9866,9873],"valid",[],"NV8"],[[9874,9884],"valid",[],"NV8"],[[9885,9885],"valid",[],"NV8"],[[9886,9887],"valid",[],"NV8"],[[9888,9889],"valid",[],"NV8"],[[9890,9905],"valid",[],"NV8"],[[9906,9906],"valid",[],"NV8"],[[9907,9916],"valid",[],"NV8"],[[9917,9919],"valid",[],"NV8"],[[9920,9923],"valid",[],"NV8"],[[9924,9933],"valid",[],"NV8"],[[9934,9934],"valid",[],"NV8"],[[9935,9953],"valid",[],"NV8"],[[9954,9954],"valid",[],"NV8"],[[9955,9955],"valid",[],"NV8"],[[9956,9959],"valid",[],"NV8"],[[9960,9983],"valid",[],"NV8"],[[9984,9984],"valid",[],"NV8"],[[9985,9988],"valid",[],"NV8"],[[9989,9989],"valid",[],"NV8"],[[9990,9993],"valid",[],"NV8"],[[9994,9995],"valid",[],"NV8"],[[9996,10023],"valid",[],"NV8"],[[10024,10024],"valid",[],"NV8"],[[10025,10059],"valid",[],"NV8"],[[10060,10060],"valid",[],"NV8"],[[10061,10061],"valid",[],"NV8"],[[10062,10062],"valid",[],"NV8"],[[10063,10066],"valid",[],"NV8"],[[10067,10069],"valid",[],"NV8"],[[10070,10070],"valid",[],"NV8"],[[10071,10071],"valid",[],"NV8"],[[10072,10078],"valid",[],"NV8"],[[10079,10080],"valid",[],"NV8"],[[10081,10087],"valid",[],"NV8"],[[10088,10101],"valid",[],"NV8"],[[10102,10132],"valid",[],"NV8"],[[10133,10135],"valid",[],"NV8"],[[10136,10159],"valid",[],"NV8"],[[10160,10160],"valid",[],"NV8"],[[10161,10174],"valid",[],"NV8"],[[10175,10175],"valid",[],"NV8"],[[10176,10182],"valid",[],"NV8"],[[10183,10186],"valid",[],"NV8"],[[10187,10187],"valid",[],"NV8"],[[10188,10188],"valid",[],"NV8"],[[10189,10189],"valid",[],"NV8"],[[10190,10191],"valid",[],"NV8"],[[10192,10219],"valid",[],"NV8"],[[10220,10223],"valid",[],"NV8"],[[10224,10239],"valid",[],"NV8"],[[10240,10495],"valid",[],"NV8"],[[10496,10763],"valid",[],"NV8"],[[10764,10764],"mapped",[8747,8747,8747,8747]],[[10765,10867],"valid",[],"NV8"],[[10868,10868],"disallowed_STD3_mapped",[58,58,61]],[[10869,10869],"disallowed_STD3_mapped",[61,61]],[[10870,10870],"disallowed_STD3_mapped",[61,61,61]],[[10871,10971],"valid",[],"NV8"],[[10972,10972],"mapped",[10973,824]],[[10973,11007],"valid",[],"NV8"],[[11008,11021],"valid",[],"NV8"],[[11022,11027],"valid",[],"NV8"],[[11028,11034],"valid",[],"NV8"],[[11035,11039],"valid",[],"NV8"],[[11040,11043],"valid",[],"NV8"],[[11044,11084],"valid",[],"NV8"],[[11085,11087],"valid",[],"NV8"],[[11088,11092],"valid",[],"NV8"],[[11093,11097],"valid",[],"NV8"],[[11098,11123],"valid",[],"NV8"],[[11124,11125],"disallowed"],[[11126,11157],"valid",[],"NV8"],[[11158,11159],"disallowed"],[[11160,11193],"valid",[],"NV8"],[[11194,11196],"disallowed"],[[11197,11208],"valid",[],"NV8"],[[11209,11209],"disallowed"],[[11210,11217],"valid",[],"NV8"],[[11218,11243],"disallowed"],[[11244,11247],"valid",[],"NV8"],[[11248,11263],"disallowed"],[[11264,11264],"mapped",[11312]],[[11265,11265],"mapped",[11313]],[[11266,11266],"mapped",[11314]],[[11267,11267],"mapped",[11315]],[[11268,11268],"mapped",[11316]],[[11269,11269],"mapped",[11317]],[[11270,11270],"mapped",[11318]],[[11271,11271],"mapped",[11319]],[[11272,11272],"mapped",[11320]],[[11273,11273],"mapped",[11321]],[[11274,11274],"mapped",[11322]],[[11275,11275],"mapped",[11323]],[[11276,11276],"mapped",[11324]],[[11277,11277],"mapped",[11325]],[[11278,11278],"mapped",[11326]],[[11279,11279],"mapped",[11327]],[[11280,11280],"mapped",[11328]],[[11281,11281],"mapped",[11329]],[[11282,11282],"mapped",[11330]],[[11283,11283],"mapped",[11331]],[[11284,11284],"mapped",[11332]],[[11285,11285],"mapped",[11333]],[[11286,11286],"mapped",[11334]],[[11287,11287],"mapped",[11335]],[[11288,11288],"mapped",[11336]],[[11289,11289],"mapped",[11337]],[[11290,11290],"mapped",[11338]],[[11291,11291],"mapped",[11339]],[[11292,11292],"mapped",[11340]],[[11293,11293],"mapped",[11341]],[[11294,11294],"mapped",[11342]],[[11295,11295],"mapped",[11343]],[[11296,11296],"mapped",[11344]],[[11297,11297],"mapped",[11345]],[[11298,11298],"mapped",[11346]],[[11299,11299],"mapped",[11347]],[[11300,11300],"mapped",[11348]],[[11301,11301],"mapped",[11349]],[[11302,11302],"mapped",[11350]],[[11303,11303],"mapped",[11351]],[[11304,11304],"mapped",[11352]],[[11305,11305],"mapped",[11353]],[[11306,11306],"mapped",[11354]],[[11307,11307],"mapped",[11355]],[[11308,11308],"mapped",[11356]],[[11309,11309],"mapped",[11357]],[[11310,11310],"mapped",[11358]],[[11311,11311],"disallowed"],[[11312,11358],"valid"],[[11359,11359],"disallowed"],[[11360,11360],"mapped",[11361]],[[11361,11361],"valid"],[[11362,11362],"mapped",[619]],[[11363,11363],"mapped",[7549]],[[11364,11364],"mapped",[637]],[[11365,11366],"valid"],[[11367,11367],"mapped",[11368]],[[11368,11368],"valid"],[[11369,11369],"mapped",[11370]],[[11370,11370],"valid"],[[11371,11371],"mapped",[11372]],[[11372,11372],"valid"],[[11373,11373],"mapped",[593]],[[11374,11374],"mapped",[625]],[[11375,11375],"mapped",[592]],[[11376,11376],"mapped",[594]],[[11377,11377],"valid"],[[11378,11378],"mapped",[11379]],[[11379,11379],"valid"],[[11380,11380],"valid"],[[11381,11381],"mapped",[11382]],[[11382,11383],"valid"],[[11384,11387],"valid"],[[11388,11388],"mapped",[106]],[[11389,11389],"mapped",[118]],[[11390,11390],"mapped",[575]],[[11391,11391],"mapped",[576]],[[11392,11392],"mapped",[11393]],[[11393,11393],"valid"],[[11394,11394],"mapped",[11395]],[[11395,11395],"valid"],[[11396,11396],"mapped",[11397]],[[11397,11397],"valid"],[[11398,11398],"mapped",[11399]],[[11399,11399],"valid"],[[11400,11400],"mapped",[11401]],[[11401,11401],"valid"],[[11402,11402],"mapped",[11403]],[[11403,11403],"valid"],[[11404,11404],"mapped",[11405]],[[11405,11405],"valid"],[[11406,11406],"mapped",[11407]],[[11407,11407],"valid"],[[11408,11408],"mapped",[11409]],[[11409,11409],"valid"],[[11410,11410],"mapped",[11411]],[[11411,11411],"valid"],[[11412,11412],"mapped",[11413]],[[11413,11413],"valid"],[[11414,11414],"mapped",[11415]],[[11415,11415],"valid"],[[11416,11416],"mapped",[11417]],[[11417,11417],"valid"],[[11418,11418],"mapped",[11419]],[[11419,11419],"valid"],[[11420,11420],"mapped",[11421]],[[11421,11421],"valid"],[[11422,11422],"mapped",[11423]],[[11423,11423],"valid"],[[11424,11424],"mapped",[11425]],[[11425,11425],"valid"],[[11426,11426],"mapped",[11427]],[[11427,11427],"valid"],[[11428,11428],"mapped",[11429]],[[11429,11429],"valid"],[[11430,11430],"mapped",[11431]],[[11431,11431],"valid"],[[11432,11432],"mapped",[11433]],[[11433,11433],"valid"],[[11434,11434],"mapped",[11435]],[[11435,11435],"valid"],[[11436,11436],"mapped",[11437]],[[11437,11437],"valid"],[[11438,11438],"mapped",[11439]],[[11439,11439],"valid"],[[11440,11440],"mapped",[11441]],[[11441,11441],"valid"],[[11442,11442],"mapped",[11443]],[[11443,11443],"valid"],[[11444,11444],"mapped",[11445]],[[11445,11445],"valid"],[[11446,11446],"mapped",[11447]],[[11447,11447],"valid"],[[11448,11448],"mapped",[11449]],[[11449,11449],"valid"],[[11450,11450],"mapped",[11451]],[[11451,11451],"valid"],[[11452,11452],"mapped",[11453]],[[11453,11453],"valid"],[[11454,11454],"mapped",[11455]],[[11455,11455],"valid"],[[11456,11456],"mapped",[11457]],[[11457,11457],"valid"],[[11458,11458],"mapped",[11459]],[[11459,11459],"valid"],[[11460,11460],"mapped",[11461]],[[11461,11461],"valid"],[[11462,11462],"mapped",[11463]],[[11463,11463],"valid"],[[11464,11464],"mapped",[11465]],[[11465,11465],"valid"],[[11466,11466],"mapped",[11467]],[[11467,11467],"valid"],[[11468,11468],"mapped",[11469]],[[11469,11469],"valid"],[[11470,11470],"mapped",[11471]],[[11471,11471],"valid"],[[11472,11472],"mapped",[11473]],[[11473,11473],"valid"],[[11474,11474],"mapped",[11475]],[[11475,11475],"valid"],[[11476,11476],"mapped",[11477]],[[11477,11477],"valid"],[[11478,11478],"mapped",[11479]],[[11479,11479],"valid"],[[11480,11480],"mapped",[11481]],[[11481,11481],"valid"],[[11482,11482],"mapped",[11483]],[[11483,11483],"valid"],[[11484,11484],"mapped",[11485]],[[11485,11485],"valid"],[[11486,11486],"mapped",[11487]],[[11487,11487],"valid"],[[11488,11488],"mapped",[11489]],[[11489,11489],"valid"],[[11490,11490],"mapped",[11491]],[[11491,11492],"valid"],[[11493,11498],"valid",[],"NV8"],[[11499,11499],"mapped",[11500]],[[11500,11500],"valid"],[[11501,11501],"mapped",[11502]],[[11502,11505],"valid"],[[11506,11506],"mapped",[11507]],[[11507,11507],"valid"],[[11508,11512],"disallowed"],[[11513,11519],"valid",[],"NV8"],[[11520,11557],"valid"],[[11558,11558],"disallowed"],[[11559,11559],"valid"],[[11560,11564],"disallowed"],[[11565,11565],"valid"],[[11566,11567],"disallowed"],[[11568,11621],"valid"],[[11622,11623],"valid"],[[11624,11630],"disallowed"],[[11631,11631],"mapped",[11617]],[[11632,11632],"valid",[],"NV8"],[[11633,11646],"disallowed"],[[11647,11647],"valid"],[[11648,11670],"valid"],[[11671,11679],"disallowed"],[[11680,11686],"valid"],[[11687,11687],"disallowed"],[[11688,11694],"valid"],[[11695,11695],"disallowed"],[[11696,11702],"valid"],[[11703,11703],"disallowed"],[[11704,11710],"valid"],[[11711,11711],"disallowed"],[[11712,11718],"valid"],[[11719,11719],"disallowed"],[[11720,11726],"valid"],[[11727,11727],"disallowed"],[[11728,11734],"valid"],[[11735,11735],"disallowed"],[[11736,11742],"valid"],[[11743,11743],"disallowed"],[[11744,11775],"valid"],[[11776,11799],"valid",[],"NV8"],[[11800,11803],"valid",[],"NV8"],[[11804,11805],"valid",[],"NV8"],[[11806,11822],"valid",[],"NV8"],[[11823,11823],"valid"],[[11824,11824],"valid",[],"NV8"],[[11825,11825],"valid",[],"NV8"],[[11826,11835],"valid",[],"NV8"],[[11836,11842],"valid",[],"NV8"],[[11843,11903],"disallowed"],[[11904,11929],"valid",[],"NV8"],[[11930,11930],"disallowed"],[[11931,11934],"valid",[],"NV8"],[[11935,11935],"mapped",[27597]],[[11936,12018],"valid",[],"NV8"],[[12019,12019],"mapped",[40863]],[[12020,12031],"disallowed"],[[12032,12032],"mapped",[19968]],[[12033,12033],"mapped",[20008]],[[12034,12034],"mapped",[20022]],[[12035,12035],"mapped",[20031]],[[12036,12036],"mapped",[20057]],[[12037,12037],"mapped",[20101]],[[12038,12038],"mapped",[20108]],[[12039,12039],"mapped",[20128]],[[12040,12040],"mapped",[20154]],[[12041,12041],"mapped",[20799]],[[12042,12042],"mapped",[20837]],[[12043,12043],"mapped",[20843]],[[12044,12044],"mapped",[20866]],[[12045,12045],"mapped",[20886]],[[12046,12046],"mapped",[20907]],[[12047,12047],"mapped",[20960]],[[12048,12048],"mapped",[20981]],[[12049,12049],"mapped",[20992]],[[12050,12050],"mapped",[21147]],[[12051,12051],"mapped",[21241]],[[12052,12052],"mapped",[21269]],[[12053,12053],"mapped",[21274]],[[12054,12054],"mapped",[21304]],[[12055,12055],"mapped",[21313]],[[12056,12056],"mapped",[21340]],[[12057,12057],"mapped",[21353]],[[12058,12058],"mapped",[21378]],[[12059,12059],"mapped",[21430]],[[12060,12060],"mapped",[21448]],[[12061,12061],"mapped",[21475]],[[12062,12062],"mapped",[22231]],[[12063,12063],"mapped",[22303]],[[12064,12064],"mapped",[22763]],[[12065,12065],"mapped",[22786]],[[12066,12066],"mapped",[22794]],[[12067,12067],"mapped",[22805]],[[12068,12068],"mapped",[22823]],[[12069,12069],"mapped",[22899]],[[12070,12070],"mapped",[23376]],[[12071,12071],"mapped",[23424]],[[12072,12072],"mapped",[23544]],[[12073,12073],"mapped",[23567]],[[12074,12074],"mapped",[23586]],[[12075,12075],"mapped",[23608]],[[12076,12076],"mapped",[23662]],[[12077,12077],"mapped",[23665]],[[12078,12078],"mapped",[24027]],[[12079,12079],"mapped",[24037]],[[12080,12080],"mapped",[24049]],[[12081,12081],"mapped",[24062]],[[12082,12082],"mapped",[24178]],[[12083,12083],"mapped",[24186]],[[12084,12084],"mapped",[24191]],[[12085,12085],"mapped",[24308]],[[12086,12086],"mapped",[24318]],[[12087,12087],"mapped",[24331]],[[12088,12088],"mapped",[24339]],[[12089,12089],"mapped",[24400]],[[12090,12090],"mapped",[24417]],[[12091,12091],"mapped",[24435]],[[12092,12092],"mapped",[24515]],[[12093,12093],"mapped",[25096]],[[12094,12094],"mapped",[25142]],[[12095,12095],"mapped",[25163]],[[12096,12096],"mapped",[25903]],[[12097,12097],"mapped",[25908]],[[12098,12098],"mapped",[25991]],[[12099,12099],"mapped",[26007]],[[12100,12100],"mapped",[26020]],[[12101,12101],"mapped",[26041]],[[12102,12102],"mapped",[26080]],[[12103,12103],"mapped",[26085]],[[12104,12104],"mapped",[26352]],[[12105,12105],"mapped",[26376]],[[12106,12106],"mapped",[26408]],[[12107,12107],"mapped",[27424]],[[12108,12108],"mapped",[27490]],[[12109,12109],"mapped",[27513]],[[12110,12110],"mapped",[27571]],[[12111,12111],"mapped",[27595]],[[12112,12112],"mapped",[27604]],[[12113,12113],"mapped",[27611]],[[12114,12114],"mapped",[27663]],[[12115,12115],"mapped",[27668]],[[12116,12116],"mapped",[27700]],[[12117,12117],"mapped",[28779]],[[12118,12118],"mapped",[29226]],[[12119,12119],"mapped",[29238]],[[12120,12120],"mapped",[29243]],[[12121,12121],"mapped",[29247]],[[12122,12122],"mapped",[29255]],[[12123,12123],"mapped",[29273]],[[12124,12124],"mapped",[29275]],[[12125,12125],"mapped",[29356]],[[12126,12126],"mapped",[29572]],[[12127,12127],"mapped",[29577]],[[12128,12128],"mapped",[29916]],[[12129,12129],"mapped",[29926]],[[12130,12130],"mapped",[29976]],[[12131,12131],"mapped",[29983]],[[12132,12132],"mapped",[29992]],[[12133,12133],"mapped",[30000]],[[12134,12134],"mapped",[30091]],[[12135,12135],"mapped",[30098]],[[12136,12136],"mapped",[30326]],[[12137,12137],"mapped",[30333]],[[12138,12138],"mapped",[30382]],[[12139,12139],"mapped",[30399]],[[12140,12140],"mapped",[30446]],[[12141,12141],"mapped",[30683]],[[12142,12142],"mapped",[30690]],[[12143,12143],"mapped",[30707]],[[12144,12144],"mapped",[31034]],[[12145,12145],"mapped",[31160]],[[12146,12146],"mapped",[31166]],[[12147,12147],"mapped",[31348]],[[12148,12148],"mapped",[31435]],[[12149,12149],"mapped",[31481]],[[12150,12150],"mapped",[31859]],[[12151,12151],"mapped",[31992]],[[12152,12152],"mapped",[32566]],[[12153,12153],"mapped",[32593]],[[12154,12154],"mapped",[32650]],[[12155,12155],"mapped",[32701]],[[12156,12156],"mapped",[32769]],[[12157,12157],"mapped",[32780]],[[12158,12158],"mapped",[32786]],[[12159,12159],"mapped",[32819]],[[12160,12160],"mapped",[32895]],[[12161,12161],"mapped",[32905]],[[12162,12162],"mapped",[33251]],[[12163,12163],"mapped",[33258]],[[12164,12164],"mapped",[33267]],[[12165,12165],"mapped",[33276]],[[12166,12166],"mapped",[33292]],[[12167,12167],"mapped",[33307]],[[12168,12168],"mapped",[33311]],[[12169,12169],"mapped",[33390]],[[12170,12170],"mapped",[33394]],[[12171,12171],"mapped",[33400]],[[12172,12172],"mapped",[34381]],[[12173,12173],"mapped",[34411]],[[12174,12174],"mapped",[34880]],[[12175,12175],"mapped",[34892]],[[12176,12176],"mapped",[34915]],[[12177,12177],"mapped",[35198]],[[12178,12178],"mapped",[35211]],[[12179,12179],"mapped",[35282]],[[12180,12180],"mapped",[35328]],[[12181,12181],"mapped",[35895]],[[12182,12182],"mapped",[35910]],[[12183,12183],"mapped",[35925]],[[12184,12184],"mapped",[35960]],[[12185,12185],"mapped",[35997]],[[12186,12186],"mapped",[36196]],[[12187,12187],"mapped",[36208]],[[12188,12188],"mapped",[36275]],[[12189,12189],"mapped",[36523]],[[12190,12190],"mapped",[36554]],[[12191,12191],"mapped",[36763]],[[12192,12192],"mapped",[36784]],[[12193,12193],"mapped",[36789]],[[12194,12194],"mapped",[37009]],[[12195,12195],"mapped",[37193]],[[12196,12196],"mapped",[37318]],[[12197,12197],"mapped",[37324]],[[12198,12198],"mapped",[37329]],[[12199,12199],"mapped",[38263]],[[12200,12200],"mapped",[38272]],[[12201,12201],"mapped",[38428]],[[12202,12202],"mapped",[38582]],[[12203,12203],"mapped",[38585]],[[12204,12204],"mapped",[38632]],[[12205,12205],"mapped",[38737]],[[12206,12206],"mapped",[38750]],[[12207,12207],"mapped",[38754]],[[12208,12208],"mapped",[38761]],[[12209,12209],"mapped",[38859]],[[12210,12210],"mapped",[38893]],[[12211,12211],"mapped",[38899]],[[12212,12212],"mapped",[38913]],[[12213,12213],"mapped",[39080]],[[12214,12214],"mapped",[39131]],[[12215,12215],"mapped",[39135]],[[12216,12216],"mapped",[39318]],[[12217,12217],"mapped",[39321]],[[12218,12218],"mapped",[39340]],[[12219,12219],"mapped",[39592]],[[12220,12220],"mapped",[39640]],[[12221,12221],"mapped",[39647]],[[12222,12222],"mapped",[39717]],[[12223,12223],"mapped",[39727]],[[12224,12224],"mapped",[39730]],[[12225,12225],"mapped",[39740]],[[12226,12226],"mapped",[39770]],[[12227,12227],"mapped",[40165]],[[12228,12228],"mapped",[40565]],[[12229,12229],"mapped",[40575]],[[12230,12230],"mapped",[40613]],[[12231,12231],"mapped",[40635]],[[12232,12232],"mapped",[40643]],[[12233,12233],"mapped",[40653]],[[12234,12234],"mapped",[40657]],[[12235,12235],"mapped",[40697]],[[12236,12236],"mapped",[40701]],[[12237,12237],"mapped",[40718]],[[12238,12238],"mapped",[40723]],[[12239,12239],"mapped",[40736]],[[12240,12240],"mapped",[40763]],[[12241,12241],"mapped",[40778]],[[12242,12242],"mapped",[40786]],[[12243,12243],"mapped",[40845]],[[12244,12244],"mapped",[40860]],[[12245,12245],"mapped",[40864]],[[12246,12271],"disallowed"],[[12272,12283],"disallowed"],[[12284,12287],"disallowed"],[[12288,12288],"disallowed_STD3_mapped",[32]],[[12289,12289],"valid",[],"NV8"],[[12290,12290],"mapped",[46]],[[12291,12292],"valid",[],"NV8"],[[12293,12295],"valid"],[[12296,12329],"valid",[],"NV8"],[[12330,12333],"valid"],[[12334,12341],"valid",[],"NV8"],[[12342,12342],"mapped",[12306]],[[12343,12343],"valid",[],"NV8"],[[12344,12344],"mapped",[21313]],[[12345,12345],"mapped",[21316]],[[12346,12346],"mapped",[21317]],[[12347,12347],"valid",[],"NV8"],[[12348,12348],"valid"],[[12349,12349],"valid",[],"NV8"],[[12350,12350],"valid",[],"NV8"],[[12351,12351],"valid",[],"NV8"],[[12352,12352],"disallowed"],[[12353,12436],"valid"],[[12437,12438],"valid"],[[12439,12440],"disallowed"],[[12441,12442],"valid"],[[12443,12443],"disallowed_STD3_mapped",[32,12441]],[[12444,12444],"disallowed_STD3_mapped",[32,12442]],[[12445,12446],"valid"],[[12447,12447],"mapped",[12424,12426]],[[12448,12448],"valid",[],"NV8"],[[12449,12542],"valid"],[[12543,12543],"mapped",[12467,12488]],[[12544,12548],"disallowed"],[[12549,12588],"valid"],[[12589,12589],"valid"],[[12590,12592],"disallowed"],[[12593,12593],"mapped",[4352]],[[12594,12594],"mapped",[4353]],[[12595,12595],"mapped",[4522]],[[12596,12596],"mapped",[4354]],[[12597,12597],"mapped",[4524]],[[12598,12598],"mapped",[4525]],[[12599,12599],"mapped",[4355]],[[12600,12600],"mapped",[4356]],[[12601,12601],"mapped",[4357]],[[12602,12602],"mapped",[4528]],[[12603,12603],"mapped",[4529]],[[12604,12604],"mapped",[4530]],[[12605,12605],"mapped",[4531]],[[12606,12606],"mapped",[4532]],[[12607,12607],"mapped",[4533]],[[12608,12608],"mapped",[4378]],[[12609,12609],"mapped",[4358]],[[12610,12610],"mapped",[4359]],[[12611,12611],"mapped",[4360]],[[12612,12612],"mapped",[4385]],[[12613,12613],"mapped",[4361]],[[12614,12614],"mapped",[4362]],[[12615,12615],"mapped",[4363]],[[12616,12616],"mapped",[4364]],[[12617,12617],"mapped",[4365]],[[12618,12618],"mapped",[4366]],[[12619,12619],"mapped",[4367]],[[12620,12620],"mapped",[4368]],[[12621,12621],"mapped",[4369]],[[12622,12622],"mapped",[4370]],[[12623,12623],"mapped",[4449]],[[12624,12624],"mapped",[4450]],[[12625,12625],"mapped",[4451]],[[12626,12626],"mapped",[4452]],[[12627,12627],"mapped",[4453]],[[12628,12628],"mapped",[4454]],[[12629,12629],"mapped",[4455]],[[12630,12630],"mapped",[4456]],[[12631,12631],"mapped",[4457]],[[12632,12632],"mapped",[4458]],[[12633,12633],"mapped",[4459]],[[12634,12634],"mapped",[4460]],[[12635,12635],"mapped",[4461]],[[12636,12636],"mapped",[4462]],[[12637,12637],"mapped",[4463]],[[12638,12638],"mapped",[4464]],[[12639,12639],"mapped",[4465]],[[12640,12640],"mapped",[4466]],[[12641,12641],"mapped",[4467]],[[12642,12642],"mapped",[4468]],[[12643,12643],"mapped",[4469]],[[12644,12644],"disallowed"],[[12645,12645],"mapped",[4372]],[[12646,12646],"mapped",[4373]],[[12647,12647],"mapped",[4551]],[[12648,12648],"mapped",[4552]],[[12649,12649],"mapped",[4556]],[[12650,12650],"mapped",[4558]],[[12651,12651],"mapped",[4563]],[[12652,12652],"mapped",[4567]],[[12653,12653],"mapped",[4569]],[[12654,12654],"mapped",[4380]],[[12655,12655],"mapped",[4573]],[[12656,12656],"mapped",[4575]],[[12657,12657],"mapped",[4381]],[[12658,12658],"mapped",[4382]],[[12659,12659],"mapped",[4384]],[[12660,12660],"mapped",[4386]],[[12661,12661],"mapped",[4387]],[[12662,12662],"mapped",[4391]],[[12663,12663],"mapped",[4393]],[[12664,12664],"mapped",[4395]],[[12665,12665],"mapped",[4396]],[[12666,12666],"mapped",[4397]],[[12667,12667],"mapped",[4398]],[[12668,12668],"mapped",[4399]],[[12669,12669],"mapped",[4402]],[[12670,12670],"mapped",[4406]],[[12671,12671],"mapped",[4416]],[[12672,12672],"mapped",[4423]],[[12673,12673],"mapped",[4428]],[[12674,12674],"mapped",[4593]],[[12675,12675],"mapped",[4594]],[[12676,12676],"mapped",[4439]],[[12677,12677],"mapped",[4440]],[[12678,12678],"mapped",[4441]],[[12679,12679],"mapped",[4484]],[[12680,12680],"mapped",[4485]],[[12681,12681],"mapped",[4488]],[[12682,12682],"mapped",[4497]],[[12683,12683],"mapped",[4498]],[[12684,12684],"mapped",[4500]],[[12685,12685],"mapped",[4510]],[[12686,12686],"mapped",[4513]],[[12687,12687],"disallowed"],[[12688,12689],"valid",[],"NV8"],[[12690,12690],"mapped",[19968]],[[12691,12691],"mapped",[20108]],[[12692,12692],"mapped",[19977]],[[12693,12693],"mapped",[22235]],[[12694,12694],"mapped",[19978]],[[12695,12695],"mapped",[20013]],[[12696,12696],"mapped",[19979]],[[12697,12697],"mapped",[30002]],[[12698,12698],"mapped",[20057]],[[12699,12699],"mapped",[19993]],[[12700,12700],"mapped",[19969]],[[12701,12701],"mapped",[22825]],[[12702,12702],"mapped",[22320]],[[12703,12703],"mapped",[20154]],[[12704,12727],"valid"],[[12728,12730],"valid"],[[12731,12735],"disallowed"],[[12736,12751],"valid",[],"NV8"],[[12752,12771],"valid",[],"NV8"],[[12772,12783],"disallowed"],[[12784,12799],"valid"],[[12800,12800],"disallowed_STD3_mapped",[40,4352,41]],[[12801,12801],"disallowed_STD3_mapped",[40,4354,41]],[[12802,12802],"disallowed_STD3_mapped",[40,4355,41]],[[12803,12803],"disallowed_STD3_mapped",[40,4357,41]],[[12804,12804],"disallowed_STD3_mapped",[40,4358,41]],[[12805,12805],"disallowed_STD3_mapped",[40,4359,41]],[[12806,12806],"disallowed_STD3_mapped",[40,4361,41]],[[12807,12807],"disallowed_STD3_mapped",[40,4363,41]],[[12808,12808],"disallowed_STD3_mapped",[40,4364,41]],[[12809,12809],"disallowed_STD3_mapped",[40,4366,41]],[[12810,12810],"disallowed_STD3_mapped",[40,4367,41]],[[12811,12811],"disallowed_STD3_mapped",[40,4368,41]],[[12812,12812],"disallowed_STD3_mapped",[40,4369,41]],[[12813,12813],"disallowed_STD3_mapped",[40,4370,41]],[[12814,12814],"disallowed_STD3_mapped",[40,44032,41]],[[12815,12815],"disallowed_STD3_mapped",[40,45208,41]],[[12816,12816],"disallowed_STD3_mapped",[40,45796,41]],[[12817,12817],"disallowed_STD3_mapped",[40,46972,41]],[[12818,12818],"disallowed_STD3_mapped",[40,47560,41]],[[12819,12819],"disallowed_STD3_mapped",[40,48148,41]],[[12820,12820],"disallowed_STD3_mapped",[40,49324,41]],[[12821,12821],"disallowed_STD3_mapped",[40,50500,41]],[[12822,12822],"disallowed_STD3_mapped",[40,51088,41]],[[12823,12823],"disallowed_STD3_mapped",[40,52264,41]],[[12824,12824],"disallowed_STD3_mapped",[40,52852,41]],[[12825,12825],"disallowed_STD3_mapped",[40,53440,41]],[[12826,12826],"disallowed_STD3_mapped",[40,54028,41]],[[12827,12827],"disallowed_STD3_mapped",[40,54616,41]],[[12828,12828],"disallowed_STD3_mapped",[40,51452,41]],[[12829,12829],"disallowed_STD3_mapped",[40,50724,51204,41]],[[12830,12830],"disallowed_STD3_mapped",[40,50724,54980,41]],[[12831,12831],"disallowed"],[[12832,12832],"disallowed_STD3_mapped",[40,19968,41]],[[12833,12833],"disallowed_STD3_mapped",[40,20108,41]],[[12834,12834],"disallowed_STD3_mapped",[40,19977,41]],[[12835,12835],"disallowed_STD3_mapped",[40,22235,41]],[[12836,12836],"disallowed_STD3_mapped",[40,20116,41]],[[12837,12837],"disallowed_STD3_mapped",[40,20845,41]],[[12838,12838],"disallowed_STD3_mapped",[40,19971,41]],[[12839,12839],"disallowed_STD3_mapped",[40,20843,41]],[[12840,12840],"disallowed_STD3_mapped",[40,20061,41]],[[12841,12841],"disallowed_STD3_mapped",[40,21313,41]],[[12842,12842],"disallowed_STD3_mapped",[40,26376,41]],[[12843,12843],"disallowed_STD3_mapped",[40,28779,41]],[[12844,12844],"disallowed_STD3_mapped",[40,27700,41]],[[12845,12845],"disallowed_STD3_mapped",[40,26408,41]],[[12846,12846],"disallowed_STD3_mapped",[40,37329,41]],[[12847,12847],"disallowed_STD3_mapped",[40,22303,41]],[[12848,12848],"disallowed_STD3_mapped",[40,26085,41]],[[12849,12849],"disallowed_STD3_mapped",[40,26666,41]],[[12850,12850],"disallowed_STD3_mapped",[40,26377,41]],[[12851,12851],"disallowed_STD3_mapped",[40,31038,41]],[[12852,12852],"disallowed_STD3_mapped",[40,21517,41]],[[12853,12853],"disallowed_STD3_mapped",[40,29305,41]],[[12854,12854],"disallowed_STD3_mapped",[40,36001,41]],[[12855,12855],"disallowed_STD3_mapped",[40,31069,41]],[[12856,12856],"disallowed_STD3_mapped",[40,21172,41]],[[12857,12857],"disallowed_STD3_mapped",[40,20195,41]],[[12858,12858],"disallowed_STD3_mapped",[40,21628,41]],[[12859,12859],"disallowed_STD3_mapped",[40,23398,41]],[[12860,12860],"disallowed_STD3_mapped",[40,30435,41]],[[12861,12861],"disallowed_STD3_mapped",[40,20225,41]],[[12862,12862],"disallowed_STD3_mapped",[40,36039,41]],[[12863,12863],"disallowed_STD3_mapped",[40,21332,41]],[[12864,12864],"disallowed_STD3_mapped",[40,31085,41]],[[12865,12865],"disallowed_STD3_mapped",[40,20241,41]],[[12866,12866],"disallowed_STD3_mapped",[40,33258,41]],[[12867,12867],"disallowed_STD3_mapped",[40,33267,41]],[[12868,12868],"mapped",[21839]],[[12869,12869],"mapped",[24188]],[[12870,12870],"mapped",[25991]],[[12871,12871],"mapped",[31631]],[[12872,12879],"valid",[],"NV8"],[[12880,12880],"mapped",[112,116,101]],[[12881,12881],"mapped",[50,49]],[[12882,12882],"mapped",[50,50]],[[12883,12883],"mapped",[50,51]],[[12884,12884],"mapped",[50,52]],[[12885,12885],"mapped",[50,53]],[[12886,12886],"mapped",[50,54]],[[12887,12887],"mapped",[50,55]],[[12888,12888],"mapped",[50,56]],[[12889,12889],"mapped",[50,57]],[[12890,12890],"mapped",[51,48]],[[12891,12891],"mapped",[51,49]],[[12892,12892],"mapped",[51,50]],[[12893,12893],"mapped",[51,51]],[[12894,12894],"mapped",[51,52]],[[12895,12895],"mapped",[51,53]],[[12896,12896],"mapped",[4352]],[[12897,12897],"mapped",[4354]],[[12898,12898],"mapped",[4355]],[[12899,12899],"mapped",[4357]],[[12900,12900],"mapped",[4358]],[[12901,12901],"mapped",[4359]],[[12902,12902],"mapped",[4361]],[[12903,12903],"mapped",[4363]],[[12904,12904],"mapped",[4364]],[[12905,12905],"mapped",[4366]],[[12906,12906],"mapped",[4367]],[[12907,12907],"mapped",[4368]],[[12908,12908],"mapped",[4369]],[[12909,12909],"mapped",[4370]],[[12910,12910],"mapped",[44032]],[[12911,12911],"mapped",[45208]],[[12912,12912],"mapped",[45796]],[[12913,12913],"mapped",[46972]],[[12914,12914],"mapped",[47560]],[[12915,12915],"mapped",[48148]],[[12916,12916],"mapped",[49324]],[[12917,12917],"mapped",[50500]],[[12918,12918],"mapped",[51088]],[[12919,12919],"mapped",[52264]],[[12920,12920],"mapped",[52852]],[[12921,12921],"mapped",[53440]],[[12922,12922],"mapped",[54028]],[[12923,12923],"mapped",[54616]],[[12924,12924],"mapped",[52280,44256]],[[12925,12925],"mapped",[51452,51032]],[[12926,12926],"mapped",[50864]],[[12927,12927],"valid",[],"NV8"],[[12928,12928],"mapped",[19968]],[[12929,12929],"mapped",[20108]],[[12930,12930],"mapped",[19977]],[[12931,12931],"mapped",[22235]],[[12932,12932],"mapped",[20116]],[[12933,12933],"mapped",[20845]],[[12934,12934],"mapped",[19971]],[[12935,12935],"mapped",[20843]],[[12936,12936],"mapped",[20061]],[[12937,12937],"mapped",[21313]],[[12938,12938],"mapped",[26376]],[[12939,12939],"mapped",[28779]],[[12940,12940],"mapped",[27700]],[[12941,12941],"mapped",[26408]],[[12942,12942],"mapped",[37329]],[[12943,12943],"mapped",[22303]],[[12944,12944],"mapped",[26085]],[[12945,12945],"mapped",[26666]],[[12946,12946],"mapped",[26377]],[[12947,12947],"mapped",[31038]],[[12948,12948],"mapped",[21517]],[[12949,12949],"mapped",[29305]],[[12950,12950],"mapped",[36001]],[[12951,12951],"mapped",[31069]],[[12952,12952],"mapped",[21172]],[[12953,12953],"mapped",[31192]],[[12954,12954],"mapped",[30007]],[[12955,12955],"mapped",[22899]],[[12956,12956],"mapped",[36969]],[[12957,12957],"mapped",[20778]],[[12958,12958],"mapped",[21360]],[[12959,12959],"mapped",[27880]],[[12960,12960],"mapped",[38917]],[[12961,12961],"mapped",[20241]],[[12962,12962],"mapped",[20889]],[[12963,12963],"mapped",[27491]],[[12964,12964],"mapped",[19978]],[[12965,12965],"mapped",[20013]],[[12966,12966],"mapped",[19979]],[[12967,12967],"mapped",[24038]],[[12968,12968],"mapped",[21491]],[[12969,12969],"mapped",[21307]],[[12970,12970],"mapped",[23447]],[[12971,12971],"mapped",[23398]],[[12972,12972],"mapped",[30435]],[[12973,12973],"mapped",[20225]],[[12974,12974],"mapped",[36039]],[[12975,12975],"mapped",[21332]],[[12976,12976],"mapped",[22812]],[[12977,12977],"mapped",[51,54]],[[12978,12978],"mapped",[51,55]],[[12979,12979],"mapped",[51,56]],[[12980,12980],"mapped",[51,57]],[[12981,12981],"mapped",[52,48]],[[12982,12982],"mapped",[52,49]],[[12983,12983],"mapped",[52,50]],[[12984,12984],"mapped",[52,51]],[[12985,12985],"mapped",[52,52]],[[12986,12986],"mapped",[52,53]],[[12987,12987],"mapped",[52,54]],[[12988,12988],"mapped",[52,55]],[[12989,12989],"mapped",[52,56]],[[12990,12990],"mapped",[52,57]],[[12991,12991],"mapped",[53,48]],[[12992,12992],"mapped",[49,26376]],[[12993,12993],"mapped",[50,26376]],[[12994,12994],"mapped",[51,26376]],[[12995,12995],"mapped",[52,26376]],[[12996,12996],"mapped",[53,26376]],[[12997,12997],"mapped",[54,26376]],[[12998,12998],"mapped",[55,26376]],[[12999,12999],"mapped",[56,26376]],[[13000,13000],"mapped",[57,26376]],[[13001,13001],"mapped",[49,48,26376]],[[13002,13002],"mapped",[49,49,26376]],[[13003,13003],"mapped",[49,50,26376]],[[13004,13004],"mapped",[104,103]],[[13005,13005],"mapped",[101,114,103]],[[13006,13006],"mapped",[101,118]],[[13007,13007],"mapped",[108,116,100]],[[13008,13008],"mapped",[12450]],[[13009,13009],"mapped",[12452]],[[13010,13010],"mapped",[12454]],[[13011,13011],"mapped",[12456]],[[13012,13012],"mapped",[12458]],[[13013,13013],"mapped",[12459]],[[13014,13014],"mapped",[12461]],[[13015,13015],"mapped",[12463]],[[13016,13016],"mapped",[12465]],[[13017,13017],"mapped",[12467]],[[13018,13018],"mapped",[12469]],[[13019,13019],"mapped",[12471]],[[13020,13020],"mapped",[12473]],[[13021,13021],"mapped",[12475]],[[13022,13022],"mapped",[12477]],[[13023,13023],"mapped",[12479]],[[13024,13024],"mapped",[12481]],[[13025,13025],"mapped",[12484]],[[13026,13026],"mapped",[12486]],[[13027,13027],"mapped",[12488]],[[13028,13028],"mapped",[12490]],[[13029,13029],"mapped",[12491]],[[13030,13030],"mapped",[12492]],[[13031,13031],"mapped",[12493]],[[13032,13032],"mapped",[12494]],[[13033,13033],"mapped",[12495]],[[13034,13034],"mapped",[12498]],[[13035,13035],"mapped",[12501]],[[13036,13036],"mapped",[12504]],[[13037,13037],"mapped",[12507]],[[13038,13038],"mapped",[12510]],[[13039,13039],"mapped",[12511]],[[13040,13040],"mapped",[12512]],[[13041,13041],"mapped",[12513]],[[13042,13042],"mapped",[12514]],[[13043,13043],"mapped",[12516]],[[13044,13044],"mapped",[12518]],[[13045,13045],"mapped",[12520]],[[13046,13046],"mapped",[12521]],[[13047,13047],"mapped",[12522]],[[13048,13048],"mapped",[12523]],[[13049,13049],"mapped",[12524]],[[13050,13050],"mapped",[12525]],[[13051,13051],"mapped",[12527]],[[13052,13052],"mapped",[12528]],[[13053,13053],"mapped",[12529]],[[13054,13054],"mapped",[12530]],[[13055,13055],"disallowed"],[[13056,13056],"mapped",[12450,12497,12540,12488]],[[13057,13057],"mapped",[12450,12523,12501,12449]],[[13058,13058],"mapped",[12450,12531,12506,12450]],[[13059,13059],"mapped",[12450,12540,12523]],[[13060,13060],"mapped",[12452,12491,12531,12464]],[[13061,13061],"mapped",[12452,12531,12481]],[[13062,13062],"mapped",[12454,12457,12531]],[[13063,13063],"mapped",[12456,12473,12463,12540,12489]],[[13064,13064],"mapped",[12456,12540,12459,12540]],[[13065,13065],"mapped",[12458,12531,12473]],[[13066,13066],"mapped",[12458,12540,12512]],[[13067,13067],"mapped",[12459,12452,12522]],[[13068,13068],"mapped",[12459,12521,12483,12488]],[[13069,13069],"mapped",[12459,12525,12522,12540]],[[13070,13070],"mapped",[12460,12525,12531]],[[13071,13071],"mapped",[12460,12531,12510]],[[13072,13072],"mapped",[12462,12460]],[[13073,13073],"mapped",[12462,12491,12540]],[[13074,13074],"mapped",[12461,12517,12522,12540]],[[13075,13075],"mapped",[12462,12523,12480,12540]],[[13076,13076],"mapped",[12461,12525]],[[13077,13077],"mapped",[12461,12525,12464,12521,12512]],[[13078,13078],"mapped",[12461,12525,12513,12540,12488,12523]],[[13079,13079],"mapped",[12461,12525,12527,12483,12488]],[[13080,13080],"mapped",[12464,12521,12512]],[[13081,13081],"mapped",[12464,12521,12512,12488,12531]],[[13082,13082],"mapped",[12463,12523,12476,12452,12525]],[[13083,13083],"mapped",[12463,12525,12540,12493]],[[13084,13084],"mapped",[12465,12540,12473]],[[13085,13085],"mapped",[12467,12523,12490]],[[13086,13086],"mapped",[12467,12540,12509]],[[13087,13087],"mapped",[12469,12452,12463,12523]],[[13088,13088],"mapped",[12469,12531,12481,12540,12512]],[[13089,13089],"mapped",[12471,12522,12531,12464]],[[13090,13090],"mapped",[12475,12531,12481]],[[13091,13091],"mapped",[12475,12531,12488]],[[13092,13092],"mapped",[12480,12540,12473]],[[13093,13093],"mapped",[12487,12471]],[[13094,13094],"mapped",[12489,12523]],[[13095,13095],"mapped",[12488,12531]],[[13096,13096],"mapped",[12490,12494]],[[13097,13097],"mapped",[12494,12483,12488]],[[13098,13098],"mapped",[12495,12452,12484]],[[13099,13099],"mapped",[12497,12540,12475,12531,12488]],[[13100,13100],"mapped",[12497,12540,12484]],[[13101,13101],"mapped",[12496,12540,12524,12523]],[[13102,13102],"mapped",[12500,12450,12473,12488,12523]],[[13103,13103],"mapped",[12500,12463,12523]],[[13104,13104],"mapped",[12500,12467]],[[13105,13105],"mapped",[12499,12523]],[[13106,13106],"mapped",[12501,12449,12521,12483,12489]],[[13107,13107],"mapped",[12501,12451,12540,12488]],[[13108,13108],"mapped",[12502,12483,12471,12455,12523]],[[13109,13109],"mapped",[12501,12521,12531]],[[13110,13110],"mapped",[12504,12463,12479,12540,12523]],[[13111,13111],"mapped",[12506,12477]],[[13112,13112],"mapped",[12506,12491,12498]],[[13113,13113],"mapped",[12504,12523,12484]],[[13114,13114],"mapped",[12506,12531,12473]],[[13115,13115],"mapped",[12506,12540,12472]],[[13116,13116],"mapped",[12505,12540,12479]],[[13117,13117],"mapped",[12509,12452,12531,12488]],[[13118,13118],"mapped",[12508,12523,12488]],[[13119,13119],"mapped",[12507,12531]],[[13120,13120],"mapped",[12509,12531,12489]],[[13121,13121],"mapped",[12507,12540,12523]],[[13122,13122],"mapped",[12507,12540,12531]],[[13123,13123],"mapped",[12510,12452,12463,12525]],[[13124,13124],"mapped",[12510,12452,12523]],[[13125,13125],"mapped",[12510,12483,12495]],[[13126,13126],"mapped",[12510,12523,12463]],[[13127,13127],"mapped",[12510,12531,12471,12519,12531]],[[13128,13128],"mapped",[12511,12463,12525,12531]],[[13129,13129],"mapped",[12511,12522]],[[13130,13130],"mapped",[12511,12522,12496,12540,12523]],[[13131,13131],"mapped",[12513,12460]],[[13132,13132],"mapped",[12513,12460,12488,12531]],[[13133,13133],"mapped",[12513,12540,12488,12523]],[[13134,13134],"mapped",[12516,12540,12489]],[[13135,13135],"mapped",[12516,12540,12523]],[[13136,13136],"mapped",[12518,12450,12531]],[[13137,13137],"mapped",[12522,12483,12488,12523]],[[13138,13138],"mapped",[12522,12521]],[[13139,13139],"mapped",[12523,12500,12540]],[[13140,13140],"mapped",[12523,12540,12502,12523]],[[13141,13141],"mapped",[12524,12512]],[[13142,13142],"mapped",[12524,12531,12488,12466,12531]],[[13143,13143],"mapped",[12527,12483,12488]],[[13144,13144],"mapped",[48,28857]],[[13145,13145],"mapped",[49,28857]],[[13146,13146],"mapped",[50,28857]],[[13147,13147],"mapped",[51,28857]],[[13148,13148],"mapped",[52,28857]],[[13149,13149],"mapped",[53,28857]],[[13150,13150],"mapped",[54,28857]],[[13151,13151],"mapped",[55,28857]],[[13152,13152],"mapped",[56,28857]],[[13153,13153],"mapped",[57,28857]],[[13154,13154],"mapped",[49,48,28857]],[[13155,13155],"mapped",[49,49,28857]],[[13156,13156],"mapped",[49,50,28857]],[[13157,13157],"mapped",[49,51,28857]],[[13158,13158],"mapped",[49,52,28857]],[[13159,13159],"mapped",[49,53,28857]],[[13160,13160],"mapped",[49,54,28857]],[[13161,13161],"mapped",[49,55,28857]],[[13162,13162],"mapped",[49,56,28857]],[[13163,13163],"mapped",[49,57,28857]],[[13164,13164],"mapped",[50,48,28857]],[[13165,13165],"mapped",[50,49,28857]],[[13166,13166],"mapped",[50,50,28857]],[[13167,13167],"mapped",[50,51,28857]],[[13168,13168],"mapped",[50,52,28857]],[[13169,13169],"mapped",[104,112,97]],[[13170,13170],"mapped",[100,97]],[[13171,13171],"mapped",[97,117]],[[13172,13172],"mapped",[98,97,114]],[[13173,13173],"mapped",[111,118]],[[13174,13174],"mapped",[112,99]],[[13175,13175],"mapped",[100,109]],[[13176,13176],"mapped",[100,109,50]],[[13177,13177],"mapped",[100,109,51]],[[13178,13178],"mapped",[105,117]],[[13179,13179],"mapped",[24179,25104]],[[13180,13180],"mapped",[26157,21644]],[[13181,13181],"mapped",[22823,27491]],[[13182,13182],"mapped",[26126,27835]],[[13183,13183],"mapped",[26666,24335,20250,31038]],[[13184,13184],"mapped",[112,97]],[[13185,13185],"mapped",[110,97]],[[13186,13186],"mapped",[956,97]],[[13187,13187],"mapped",[109,97]],[[13188,13188],"mapped",[107,97]],[[13189,13189],"mapped",[107,98]],[[13190,13190],"mapped",[109,98]],[[13191,13191],"mapped",[103,98]],[[13192,13192],"mapped",[99,97,108]],[[13193,13193],"mapped",[107,99,97,108]],[[13194,13194],"mapped",[112,102]],[[13195,13195],"mapped",[110,102]],[[13196,13196],"mapped",[956,102]],[[13197,13197],"mapped",[956,103]],[[13198,13198],"mapped",[109,103]],[[13199,13199],"mapped",[107,103]],[[13200,13200],"mapped",[104,122]],[[13201,13201],"mapped",[107,104,122]],[[13202,13202],"mapped",[109,104,122]],[[13203,13203],"mapped",[103,104,122]],[[13204,13204],"mapped",[116,104,122]],[[13205,13205],"mapped",[956,108]],[[13206,13206],"mapped",[109,108]],[[13207,13207],"mapped",[100,108]],[[13208,13208],"mapped",[107,108]],[[13209,13209],"mapped",[102,109]],[[13210,13210],"mapped",[110,109]],[[13211,13211],"mapped",[956,109]],[[13212,13212],"mapped",[109,109]],[[13213,13213],"mapped",[99,109]],[[13214,13214],"mapped",[107,109]],[[13215,13215],"mapped",[109,109,50]],[[13216,13216],"mapped",[99,109,50]],[[13217,13217],"mapped",[109,50]],[[13218,13218],"mapped",[107,109,50]],[[13219,13219],"mapped",[109,109,51]],[[13220,13220],"mapped",[99,109,51]],[[13221,13221],"mapped",[109,51]],[[13222,13222],"mapped",[107,109,51]],[[13223,13223],"mapped",[109,8725,115]],[[13224,13224],"mapped",[109,8725,115,50]],[[13225,13225],"mapped",[112,97]],[[13226,13226],"mapped",[107,112,97]],[[13227,13227],"mapped",[109,112,97]],[[13228,13228],"mapped",[103,112,97]],[[13229,13229],"mapped",[114,97,100]],[[13230,13230],"mapped",[114,97,100,8725,115]],[[13231,13231],"mapped",[114,97,100,8725,115,50]],[[13232,13232],"mapped",[112,115]],[[13233,13233],"mapped",[110,115]],[[13234,13234],"mapped",[956,115]],[[13235,13235],"mapped",[109,115]],[[13236,13236],"mapped",[112,118]],[[13237,13237],"mapped",[110,118]],[[13238,13238],"mapped",[956,118]],[[13239,13239],"mapped",[109,118]],[[13240,13240],"mapped",[107,118]],[[13241,13241],"mapped",[109,118]],[[13242,13242],"mapped",[112,119]],[[13243,13243],"mapped",[110,119]],[[13244,13244],"mapped",[956,119]],[[13245,13245],"mapped",[109,119]],[[13246,13246],"mapped",[107,119]],[[13247,13247],"mapped",[109,119]],[[13248,13248],"mapped",[107,969]],[[13249,13249],"mapped",[109,969]],[[13250,13250],"disallowed"],[[13251,13251],"mapped",[98,113]],[[13252,13252],"mapped",[99,99]],[[13253,13253],"mapped",[99,100]],[[13254,13254],"mapped",[99,8725,107,103]],[[13255,13255],"disallowed"],[[13256,13256],"mapped",[100,98]],[[13257,13257],"mapped",[103,121]],[[13258,13258],"mapped",[104,97]],[[13259,13259],"mapped",[104,112]],[[13260,13260],"mapped",[105,110]],[[13261,13261],"mapped",[107,107]],[[13262,13262],"mapped",[107,109]],[[13263,13263],"mapped",[107,116]],[[13264,13264],"mapped",[108,109]],[[13265,13265],"mapped",[108,110]],[[13266,13266],"mapped",[108,111,103]],[[13267,13267],"mapped",[108,120]],[[13268,13268],"mapped",[109,98]],[[13269,13269],"mapped",[109,105,108]],[[13270,13270],"mapped",[109,111,108]],[[13271,13271],"mapped",[112,104]],[[13272,13272],"disallowed"],[[13273,13273],"mapped",[112,112,109]],[[13274,13274],"mapped",[112,114]],[[13275,13275],"mapped",[115,114]],[[13276,13276],"mapped",[115,118]],[[13277,13277],"mapped",[119,98]],[[13278,13278],"mapped",[118,8725,109]],[[13279,13279],"mapped",[97,8725,109]],[[13280,13280],"mapped",[49,26085]],[[13281,13281],"mapped",[50,26085]],[[13282,13282],"mapped",[51,26085]],[[13283,13283],"mapped",[52,26085]],[[13284,13284],"mapped",[53,26085]],[[13285,13285],"mapped",[54,26085]],[[13286,13286],"mapped",[55,26085]],[[13287,13287],"mapped",[56,26085]],[[13288,13288],"mapped",[57,26085]],[[13289,13289],"mapped",[49,48,26085]],[[13290,13290],"mapped",[49,49,26085]],[[13291,13291],"mapped",[49,50,26085]],[[13292,13292],"mapped",[49,51,26085]],[[13293,13293],"mapped",[49,52,26085]],[[13294,13294],"mapped",[49,53,26085]],[[13295,13295],"mapped",[49,54,26085]],[[13296,13296],"mapped",[49,55,26085]],[[13297,13297],"mapped",[49,56,26085]],[[13298,13298],"mapped",[49,57,26085]],[[13299,13299],"mapped",[50,48,26085]],[[13300,13300],"mapped",[50,49,26085]],[[13301,13301],"mapped",[50,50,26085]],[[13302,13302],"mapped",[50,51,26085]],[[13303,13303],"mapped",[50,52,26085]],[[13304,13304],"mapped",[50,53,26085]],[[13305,13305],"mapped",[50,54,26085]],[[13306,13306],"mapped",[50,55,26085]],[[13307,13307],"mapped",[50,56,26085]],[[13308,13308],"mapped",[50,57,26085]],[[13309,13309],"mapped",[51,48,26085]],[[13310,13310],"mapped",[51,49,26085]],[[13311,13311],"mapped",[103,97,108]],[[13312,19893],"valid"],[[19894,19903],"disallowed"],[[19904,19967],"valid",[],"NV8"],[[19968,40869],"valid"],[[40870,40891],"valid"],[[40892,40899],"valid"],[[40900,40907],"valid"],[[40908,40908],"valid"],[[40909,40917],"valid"],[[40918,40959],"disallowed"],[[40960,42124],"valid"],[[42125,42127],"disallowed"],[[42128,42145],"valid",[],"NV8"],[[42146,42147],"valid",[],"NV8"],[[42148,42163],"valid",[],"NV8"],[[42164,42164],"valid",[],"NV8"],[[42165,42176],"valid",[],"NV8"],[[42177,42177],"valid",[],"NV8"],[[42178,42180],"valid",[],"NV8"],[[42181,42181],"valid",[],"NV8"],[[42182,42182],"valid",[],"NV8"],[[42183,42191],"disallowed"],[[42192,42237],"valid"],[[42238,42239],"valid",[],"NV8"],[[42240,42508],"valid"],[[42509,42511],"valid",[],"NV8"],[[42512,42539],"valid"],[[42540,42559],"disallowed"],[[42560,42560],"mapped",[42561]],[[42561,42561],"valid"],[[42562,42562],"mapped",[42563]],[[42563,42563],"valid"],[[42564,42564],"mapped",[42565]],[[42565,42565],"valid"],[[42566,42566],"mapped",[42567]],[[42567,42567],"valid"],[[42568,42568],"mapped",[42569]],[[42569,42569],"valid"],[[42570,42570],"mapped",[42571]],[[42571,42571],"valid"],[[42572,42572],"mapped",[42573]],[[42573,42573],"valid"],[[42574,42574],"mapped",[42575]],[[42575,42575],"valid"],[[42576,42576],"mapped",[42577]],[[42577,42577],"valid"],[[42578,42578],"mapped",[42579]],[[42579,42579],"valid"],[[42580,42580],"mapped",[42581]],[[42581,42581],"valid"],[[42582,42582],"mapped",[42583]],[[42583,42583],"valid"],[[42584,42584],"mapped",[42585]],[[42585,42585],"valid"],[[42586,42586],"mapped",[42587]],[[42587,42587],"valid"],[[42588,42588],"mapped",[42589]],[[42589,42589],"valid"],[[42590,42590],"mapped",[42591]],[[42591,42591],"valid"],[[42592,42592],"mapped",[42593]],[[42593,42593],"valid"],[[42594,42594],"mapped",[42595]],[[42595,42595],"valid"],[[42596,42596],"mapped",[42597]],[[42597,42597],"valid"],[[42598,42598],"mapped",[42599]],[[42599,42599],"valid"],[[42600,42600],"mapped",[42601]],[[42601,42601],"valid"],[[42602,42602],"mapped",[42603]],[[42603,42603],"valid"],[[42604,42604],"mapped",[42605]],[[42605,42607],"valid"],[[42608,42611],"valid",[],"NV8"],[[42612,42619],"valid"],[[42620,42621],"valid"],[[42622,42622],"valid",[],"NV8"],[[42623,42623],"valid"],[[42624,42624],"mapped",[42625]],[[42625,42625],"valid"],[[42626,42626],"mapped",[42627]],[[42627,42627],"valid"],[[42628,42628],"mapped",[42629]],[[42629,42629],"valid"],[[42630,42630],"mapped",[42631]],[[42631,42631],"valid"],[[42632,42632],"mapped",[42633]],[[42633,42633],"valid"],[[42634,42634],"mapped",[42635]],[[42635,42635],"valid"],[[42636,42636],"mapped",[42637]],[[42637,42637],"valid"],[[42638,42638],"mapped",[42639]],[[42639,42639],"valid"],[[42640,42640],"mapped",[42641]],[[42641,42641],"valid"],[[42642,42642],"mapped",[42643]],[[42643,42643],"valid"],[[42644,42644],"mapped",[42645]],[[42645,42645],"valid"],[[42646,42646],"mapped",[42647]],[[42647,42647],"valid"],[[42648,42648],"mapped",[42649]],[[42649,42649],"valid"],[[42650,42650],"mapped",[42651]],[[42651,42651],"valid"],[[42652,42652],"mapped",[1098]],[[42653,42653],"mapped",[1100]],[[42654,42654],"valid"],[[42655,42655],"valid"],[[42656,42725],"valid"],[[42726,42735],"valid",[],"NV8"],[[42736,42737],"valid"],[[42738,42743],"valid",[],"NV8"],[[42744,42751],"disallowed"],[[42752,42774],"valid",[],"NV8"],[[42775,42778],"valid"],[[42779,42783],"valid"],[[42784,42785],"valid",[],"NV8"],[[42786,42786],"mapped",[42787]],[[42787,42787],"valid"],[[42788,42788],"mapped",[42789]],[[42789,42789],"valid"],[[42790,42790],"mapped",[42791]],[[42791,42791],"valid"],[[42792,42792],"mapped",[42793]],[[42793,42793],"valid"],[[42794,42794],"mapped",[42795]],[[42795,42795],"valid"],[[42796,42796],"mapped",[42797]],[[42797,42797],"valid"],[[42798,42798],"mapped",[42799]],[[42799,42801],"valid"],[[42802,42802],"mapped",[42803]],[[42803,42803],"valid"],[[42804,42804],"mapped",[42805]],[[42805,42805],"valid"],[[42806,42806],"mapped",[42807]],[[42807,42807],"valid"],[[42808,42808],"mapped",[42809]],[[42809,42809],"valid"],[[42810,42810],"mapped",[42811]],[[42811,42811],"valid"],[[42812,42812],"mapped",[42813]],[[42813,42813],"valid"],[[42814,42814],"mapped",[42815]],[[42815,42815],"valid"],[[42816,42816],"mapped",[42817]],[[42817,42817],"valid"],[[42818,42818],"mapped",[42819]],[[42819,42819],"valid"],[[42820,42820],"mapped",[42821]],[[42821,42821],"valid"],[[42822,42822],"mapped",[42823]],[[42823,42823],"valid"],[[42824,42824],"mapped",[42825]],[[42825,42825],"valid"],[[42826,42826],"mapped",[42827]],[[42827,42827],"valid"],[[42828,42828],"mapped",[42829]],[[42829,42829],"valid"],[[42830,42830],"mapped",[42831]],[[42831,42831],"valid"],[[42832,42832],"mapped",[42833]],[[42833,42833],"valid"],[[42834,42834],"mapped",[42835]],[[42835,42835],"valid"],[[42836,42836],"mapped",[42837]],[[42837,42837],"valid"],[[42838,42838],"mapped",[42839]],[[42839,42839],"valid"],[[42840,42840],"mapped",[42841]],[[42841,42841],"valid"],[[42842,42842],"mapped",[42843]],[[42843,42843],"valid"],[[42844,42844],"mapped",[42845]],[[42845,42845],"valid"],[[42846,42846],"mapped",[42847]],[[42847,42847],"valid"],[[42848,42848],"mapped",[42849]],[[42849,42849],"valid"],[[42850,42850],"mapped",[42851]],[[42851,42851],"valid"],[[42852,42852],"mapped",[42853]],[[42853,42853],"valid"],[[42854,42854],"mapped",[42855]],[[42855,42855],"valid"],[[42856,42856],"mapped",[42857]],[[42857,42857],"valid"],[[42858,42858],"mapped",[42859]],[[42859,42859],"valid"],[[42860,42860],"mapped",[42861]],[[42861,42861],"valid"],[[42862,42862],"mapped",[42863]],[[42863,42863],"valid"],[[42864,42864],"mapped",[42863]],[[42865,42872],"valid"],[[42873,42873],"mapped",[42874]],[[42874,42874],"valid"],[[42875,42875],"mapped",[42876]],[[42876,42876],"valid"],[[42877,42877],"mapped",[7545]],[[42878,42878],"mapped",[42879]],[[42879,42879],"valid"],[[42880,42880],"mapped",[42881]],[[42881,42881],"valid"],[[42882,42882],"mapped",[42883]],[[42883,42883],"valid"],[[42884,42884],"mapped",[42885]],[[42885,42885],"valid"],[[42886,42886],"mapped",[42887]],[[42887,42888],"valid"],[[42889,42890],"valid",[],"NV8"],[[42891,42891],"mapped",[42892]],[[42892,42892],"valid"],[[42893,42893],"mapped",[613]],[[42894,42894],"valid"],[[42895,42895],"valid"],[[42896,42896],"mapped",[42897]],[[42897,42897],"valid"],[[42898,42898],"mapped",[42899]],[[42899,42899],"valid"],[[42900,42901],"valid"],[[42902,42902],"mapped",[42903]],[[42903,42903],"valid"],[[42904,42904],"mapped",[42905]],[[42905,42905],"valid"],[[42906,42906],"mapped",[42907]],[[42907,42907],"valid"],[[42908,42908],"mapped",[42909]],[[42909,42909],"valid"],[[42910,42910],"mapped",[42911]],[[42911,42911],"valid"],[[42912,42912],"mapped",[42913]],[[42913,42913],"valid"],[[42914,42914],"mapped",[42915]],[[42915,42915],"valid"],[[42916,42916],"mapped",[42917]],[[42917,42917],"valid"],[[42918,42918],"mapped",[42919]],[[42919,42919],"valid"],[[42920,42920],"mapped",[42921]],[[42921,42921],"valid"],[[42922,42922],"mapped",[614]],[[42923,42923],"mapped",[604]],[[42924,42924],"mapped",[609]],[[42925,42925],"mapped",[620]],[[42926,42927],"disallowed"],[[42928,42928],"mapped",[670]],[[42929,42929],"mapped",[647]],[[42930,42930],"mapped",[669]],[[42931,42931],"mapped",[43859]],[[42932,42932],"mapped",[42933]],[[42933,42933],"valid"],[[42934,42934],"mapped",[42935]],[[42935,42935],"valid"],[[42936,42998],"disallowed"],[[42999,42999],"valid"],[[43000,43000],"mapped",[295]],[[43001,43001],"mapped",[339]],[[43002,43002],"valid"],[[43003,43007],"valid"],[[43008,43047],"valid"],[[43048,43051],"valid",[],"NV8"],[[43052,43055],"disallowed"],[[43056,43065],"valid",[],"NV8"],[[43066,43071],"disallowed"],[[43072,43123],"valid"],[[43124,43127],"valid",[],"NV8"],[[43128,43135],"disallowed"],[[43136,43204],"valid"],[[43205,43213],"disallowed"],[[43214,43215],"valid",[],"NV8"],[[43216,43225],"valid"],[[43226,43231],"disallowed"],[[43232,43255],"valid"],[[43256,43258],"valid",[],"NV8"],[[43259,43259],"valid"],[[43260,43260],"valid",[],"NV8"],[[43261,43261],"valid"],[[43262,43263],"disallowed"],[[43264,43309],"valid"],[[43310,43311],"valid",[],"NV8"],[[43312,43347],"valid"],[[43348,43358],"disallowed"],[[43359,43359],"valid",[],"NV8"],[[43360,43388],"valid",[],"NV8"],[[43389,43391],"disallowed"],[[43392,43456],"valid"],[[43457,43469],"valid",[],"NV8"],[[43470,43470],"disallowed"],[[43471,43481],"valid"],[[43482,43485],"disallowed"],[[43486,43487],"valid",[],"NV8"],[[43488,43518],"valid"],[[43519,43519],"disallowed"],[[43520,43574],"valid"],[[43575,43583],"disallowed"],[[43584,43597],"valid"],[[43598,43599],"disallowed"],[[43600,43609],"valid"],[[43610,43611],"disallowed"],[[43612,43615],"valid",[],"NV8"],[[43616,43638],"valid"],[[43639,43641],"valid",[],"NV8"],[[43642,43643],"valid"],[[43644,43647],"valid"],[[43648,43714],"valid"],[[43715,43738],"disallowed"],[[43739,43741],"valid"],[[43742,43743],"valid",[],"NV8"],[[43744,43759],"valid"],[[43760,43761],"valid",[],"NV8"],[[43762,43766],"valid"],[[43767,43776],"disallowed"],[[43777,43782],"valid"],[[43783,43784],"disallowed"],[[43785,43790],"valid"],[[43791,43792],"disallowed"],[[43793,43798],"valid"],[[43799,43807],"disallowed"],[[43808,43814],"valid"],[[43815,43815],"disallowed"],[[43816,43822],"valid"],[[43823,43823],"disallowed"],[[43824,43866],"valid"],[[43867,43867],"valid",[],"NV8"],[[43868,43868],"mapped",[42791]],[[43869,43869],"mapped",[43831]],[[43870,43870],"mapped",[619]],[[43871,43871],"mapped",[43858]],[[43872,43875],"valid"],[[43876,43877],"valid"],[[43878,43887],"disallowed"],[[43888,43888],"mapped",[5024]],[[43889,43889],"mapped",[5025]],[[43890,43890],"mapped",[5026]],[[43891,43891],"mapped",[5027]],[[43892,43892],"mapped",[5028]],[[43893,43893],"mapped",[5029]],[[43894,43894],"mapped",[5030]],[[43895,43895],"mapped",[5031]],[[43896,43896],"mapped",[5032]],[[43897,43897],"mapped",[5033]],[[43898,43898],"mapped",[5034]],[[43899,43899],"mapped",[5035]],[[43900,43900],"mapped",[5036]],[[43901,43901],"mapped",[5037]],[[43902,43902],"mapped",[5038]],[[43903,43903],"mapped",[5039]],[[43904,43904],"mapped",[5040]],[[43905,43905],"mapped",[5041]],[[43906,43906],"mapped",[5042]],[[43907,43907],"mapped",[5043]],[[43908,43908],"mapped",[5044]],[[43909,43909],"mapped",[5045]],[[43910,43910],"mapped",[5046]],[[43911,43911],"mapped",[5047]],[[43912,43912],"mapped",[5048]],[[43913,43913],"mapped",[5049]],[[43914,43914],"mapped",[5050]],[[43915,43915],"mapped",[5051]],[[43916,43916],"mapped",[5052]],[[43917,43917],"mapped",[5053]],[[43918,43918],"mapped",[5054]],[[43919,43919],"mapped",[5055]],[[43920,43920],"mapped",[5056]],[[43921,43921],"mapped",[5057]],[[43922,43922],"mapped",[5058]],[[43923,43923],"mapped",[5059]],[[43924,43924],"mapped",[5060]],[[43925,43925],"mapped",[5061]],[[43926,43926],"mapped",[5062]],[[43927,43927],"mapped",[5063]],[[43928,43928],"mapped",[5064]],[[43929,43929],"mapped",[5065]],[[43930,43930],"mapped",[5066]],[[43931,43931],"mapped",[5067]],[[43932,43932],"mapped",[5068]],[[43933,43933],"mapped",[5069]],[[43934,43934],"mapped",[5070]],[[43935,43935],"mapped",[5071]],[[43936,43936],"mapped",[5072]],[[43937,43937],"mapped",[5073]],[[43938,43938],"mapped",[5074]],[[43939,43939],"mapped",[5075]],[[43940,43940],"mapped",[5076]],[[43941,43941],"mapped",[5077]],[[43942,43942],"mapped",[5078]],[[43943,43943],"mapped",[5079]],[[43944,43944],"mapped",[5080]],[[43945,43945],"mapped",[5081]],[[43946,43946],"mapped",[5082]],[[43947,43947],"mapped",[5083]],[[43948,43948],"mapped",[5084]],[[43949,43949],"mapped",[5085]],[[43950,43950],"mapped",[5086]],[[43951,43951],"mapped",[5087]],[[43952,43952],"mapped",[5088]],[[43953,43953],"mapped",[5089]],[[43954,43954],"mapped",[5090]],[[43955,43955],"mapped",[5091]],[[43956,43956],"mapped",[5092]],[[43957,43957],"mapped",[5093]],[[43958,43958],"mapped",[5094]],[[43959,43959],"mapped",[5095]],[[43960,43960],"mapped",[5096]],[[43961,43961],"mapped",[5097]],[[43962,43962],"mapped",[5098]],[[43963,43963],"mapped",[5099]],[[43964,43964],"mapped",[5100]],[[43965,43965],"mapped",[5101]],[[43966,43966],"mapped",[5102]],[[43967,43967],"mapped",[5103]],[[43968,44010],"valid"],[[44011,44011],"valid",[],"NV8"],[[44012,44013],"valid"],[[44014,44015],"disallowed"],[[44016,44025],"valid"],[[44026,44031],"disallowed"],[[44032,55203],"valid"],[[55204,55215],"disallowed"],[[55216,55238],"valid",[],"NV8"],[[55239,55242],"disallowed"],[[55243,55291],"valid",[],"NV8"],[[55292,55295],"disallowed"],[[55296,57343],"disallowed"],[[57344,63743],"disallowed"],[[63744,63744],"mapped",[35912]],[[63745,63745],"mapped",[26356]],[[63746,63746],"mapped",[36554]],[[63747,63747],"mapped",[36040]],[[63748,63748],"mapped",[28369]],[[63749,63749],"mapped",[20018]],[[63750,63750],"mapped",[21477]],[[63751,63752],"mapped",[40860]],[[63753,63753],"mapped",[22865]],[[63754,63754],"mapped",[37329]],[[63755,63755],"mapped",[21895]],[[63756,63756],"mapped",[22856]],[[63757,63757],"mapped",[25078]],[[63758,63758],"mapped",[30313]],[[63759,63759],"mapped",[32645]],[[63760,63760],"mapped",[34367]],[[63761,63761],"mapped",[34746]],[[63762,63762],"mapped",[35064]],[[63763,63763],"mapped",[37007]],[[63764,63764],"mapped",[27138]],[[63765,63765],"mapped",[27931]],[[63766,63766],"mapped",[28889]],[[63767,63767],"mapped",[29662]],[[63768,63768],"mapped",[33853]],[[63769,63769],"mapped",[37226]],[[63770,63770],"mapped",[39409]],[[63771,63771],"mapped",[20098]],[[63772,63772],"mapped",[21365]],[[63773,63773],"mapped",[27396]],[[63774,63774],"mapped",[29211]],[[63775,63775],"mapped",[34349]],[[63776,63776],"mapped",[40478]],[[63777,63777],"mapped",[23888]],[[63778,63778],"mapped",[28651]],[[63779,63779],"mapped",[34253]],[[63780,63780],"mapped",[35172]],[[63781,63781],"mapped",[25289]],[[63782,63782],"mapped",[33240]],[[63783,63783],"mapped",[34847]],[[63784,63784],"mapped",[24266]],[[63785,63785],"mapped",[26391]],[[63786,63786],"mapped",[28010]],[[63787,63787],"mapped",[29436]],[[63788,63788],"mapped",[37070]],[[63789,63789],"mapped",[20358]],[[63790,63790],"mapped",[20919]],[[63791,63791],"mapped",[21214]],[[63792,63792],"mapped",[25796]],[[63793,63793],"mapped",[27347]],[[63794,63794],"mapped",[29200]],[[63795,63795],"mapped",[30439]],[[63796,63796],"mapped",[32769]],[[63797,63797],"mapped",[34310]],[[63798,63798],"mapped",[34396]],[[63799,63799],"mapped",[36335]],[[63800,63800],"mapped",[38706]],[[63801,63801],"mapped",[39791]],[[63802,63802],"mapped",[40442]],[[63803,63803],"mapped",[30860]],[[63804,63804],"mapped",[31103]],[[63805,63805],"mapped",[32160]],[[63806,63806],"mapped",[33737]],[[63807,63807],"mapped",[37636]],[[63808,63808],"mapped",[40575]],[[63809,63809],"mapped",[35542]],[[63810,63810],"mapped",[22751]],[[63811,63811],"mapped",[24324]],[[63812,63812],"mapped",[31840]],[[63813,63813],"mapped",[32894]],[[63814,63814],"mapped",[29282]],[[63815,63815],"mapped",[30922]],[[63816,63816],"mapped",[36034]],[[63817,63817],"mapped",[38647]],[[63818,63818],"mapped",[22744]],[[63819,63819],"mapped",[23650]],[[63820,63820],"mapped",[27155]],[[63821,63821],"mapped",[28122]],[[63822,63822],"mapped",[28431]],[[63823,63823],"mapped",[32047]],[[63824,63824],"mapped",[32311]],[[63825,63825],"mapped",[38475]],[[63826,63826],"mapped",[21202]],[[63827,63827],"mapped",[32907]],[[63828,63828],"mapped",[20956]],[[63829,63829],"mapped",[20940]],[[63830,63830],"mapped",[31260]],[[63831,63831],"mapped",[32190]],[[63832,63832],"mapped",[33777]],[[63833,63833],"mapped",[38517]],[[63834,63834],"mapped",[35712]],[[63835,63835],"mapped",[25295]],[[63836,63836],"mapped",[27138]],[[63837,63837],"mapped",[35582]],[[63838,63838],"mapped",[20025]],[[63839,63839],"mapped",[23527]],[[63840,63840],"mapped",[24594]],[[63841,63841],"mapped",[29575]],[[63842,63842],"mapped",[30064]],[[63843,63843],"mapped",[21271]],[[63844,63844],"mapped",[30971]],[[63845,63845],"mapped",[20415]],[[63846,63846],"mapped",[24489]],[[63847,63847],"mapped",[19981]],[[63848,63848],"mapped",[27852]],[[63849,63849],"mapped",[25976]],[[63850,63850],"mapped",[32034]],[[63851,63851],"mapped",[21443]],[[63852,63852],"mapped",[22622]],[[63853,63853],"mapped",[30465]],[[63854,63854],"mapped",[33865]],[[63855,63855],"mapped",[35498]],[[63856,63856],"mapped",[27578]],[[63857,63857],"mapped",[36784]],[[63858,63858],"mapped",[27784]],[[63859,63859],"mapped",[25342]],[[63860,63860],"mapped",[33509]],[[63861,63861],"mapped",[25504]],[[63862,63862],"mapped",[30053]],[[63863,63863],"mapped",[20142]],[[63864,63864],"mapped",[20841]],[[63865,63865],"mapped",[20937]],[[63866,63866],"mapped",[26753]],[[63867,63867],"mapped",[31975]],[[63868,63868],"mapped",[33391]],[[63869,63869],"mapped",[35538]],[[63870,63870],"mapped",[37327]],[[63871,63871],"mapped",[21237]],[[63872,63872],"mapped",[21570]],[[63873,63873],"mapped",[22899]],[[63874,63874],"mapped",[24300]],[[63875,63875],"mapped",[26053]],[[63876,63876],"mapped",[28670]],[[63877,63877],"mapped",[31018]],[[63878,63878],"mapped",[38317]],[[63879,63879],"mapped",[39530]],[[63880,63880],"mapped",[40599]],[[63881,63881],"mapped",[40654]],[[63882,63882],"mapped",[21147]],[[63883,63883],"mapped",[26310]],[[63884,63884],"mapped",[27511]],[[63885,63885],"mapped",[36706]],[[63886,63886],"mapped",[24180]],[[63887,63887],"mapped",[24976]],[[63888,63888],"mapped",[25088]],[[63889,63889],"mapped",[25754]],[[63890,63890],"mapped",[28451]],[[63891,63891],"mapped",[29001]],[[63892,63892],"mapped",[29833]],[[63893,63893],"mapped",[31178]],[[63894,63894],"mapped",[32244]],[[63895,63895],"mapped",[32879]],[[63896,63896],"mapped",[36646]],[[63897,63897],"mapped",[34030]],[[63898,63898],"mapped",[36899]],[[63899,63899],"mapped",[37706]],[[63900,63900],"mapped",[21015]],[[63901,63901],"mapped",[21155]],[[63902,63902],"mapped",[21693]],[[63903,63903],"mapped",[28872]],[[63904,63904],"mapped",[35010]],[[63905,63905],"mapped",[35498]],[[63906,63906],"mapped",[24265]],[[63907,63907],"mapped",[24565]],[[63908,63908],"mapped",[25467]],[[63909,63909],"mapped",[27566]],[[63910,63910],"mapped",[31806]],[[63911,63911],"mapped",[29557]],[[63912,63912],"mapped",[20196]],[[63913,63913],"mapped",[22265]],[[63914,63914],"mapped",[23527]],[[63915,63915],"mapped",[23994]],[[63916,63916],"mapped",[24604]],[[63917,63917],"mapped",[29618]],[[63918,63918],"mapped",[29801]],[[63919,63919],"mapped",[32666]],[[63920,63920],"mapped",[32838]],[[63921,63921],"mapped",[37428]],[[63922,63922],"mapped",[38646]],[[63923,63923],"mapped",[38728]],[[63924,63924],"mapped",[38936]],[[63925,63925],"mapped",[20363]],[[63926,63926],"mapped",[31150]],[[63927,63927],"mapped",[37300]],[[63928,63928],"mapped",[38584]],[[63929,63929],"mapped",[24801]],[[63930,63930],"mapped",[20102]],[[63931,63931],"mapped",[20698]],[[63932,63932],"mapped",[23534]],[[63933,63933],"mapped",[23615]],[[63934,63934],"mapped",[26009]],[[63935,63935],"mapped",[27138]],[[63936,63936],"mapped",[29134]],[[63937,63937],"mapped",[30274]],[[63938,63938],"mapped",[34044]],[[63939,63939],"mapped",[36988]],[[63940,63940],"mapped",[40845]],[[63941,63941],"mapped",[26248]],[[63942,63942],"mapped",[38446]],[[63943,63943],"mapped",[21129]],[[63944,63944],"mapped",[26491]],[[63945,63945],"mapped",[26611]],[[63946,63946],"mapped",[27969]],[[63947,63947],"mapped",[28316]],[[63948,63948],"mapped",[29705]],[[63949,63949],"mapped",[30041]],[[63950,63950],"mapped",[30827]],[[63951,63951],"mapped",[32016]],[[63952,63952],"mapped",[39006]],[[63953,63953],"mapped",[20845]],[[63954,63954],"mapped",[25134]],[[63955,63955],"mapped",[38520]],[[63956,63956],"mapped",[20523]],[[63957,63957],"mapped",[23833]],[[63958,63958],"mapped",[28138]],[[63959,63959],"mapped",[36650]],[[63960,63960],"mapped",[24459]],[[63961,63961],"mapped",[24900]],[[63962,63962],"mapped",[26647]],[[63963,63963],"mapped",[29575]],[[63964,63964],"mapped",[38534]],[[63965,63965],"mapped",[21033]],[[63966,63966],"mapped",[21519]],[[63967,63967],"mapped",[23653]],[[63968,63968],"mapped",[26131]],[[63969,63969],"mapped",[26446]],[[63970,63970],"mapped",[26792]],[[63971,63971],"mapped",[27877]],[[63972,63972],"mapped",[29702]],[[63973,63973],"mapped",[30178]],[[63974,63974],"mapped",[32633]],[[63975,63975],"mapped",[35023]],[[63976,63976],"mapped",[35041]],[[63977,63977],"mapped",[37324]],[[63978,63978],"mapped",[38626]],[[63979,63979],"mapped",[21311]],[[63980,63980],"mapped",[28346]],[[63981,63981],"mapped",[21533]],[[63982,63982],"mapped",[29136]],[[63983,63983],"mapped",[29848]],[[63984,63984],"mapped",[34298]],[[63985,63985],"mapped",[38563]],[[63986,63986],"mapped",[40023]],[[63987,63987],"mapped",[40607]],[[63988,63988],"mapped",[26519]],[[63989,63989],"mapped",[28107]],[[63990,63990],"mapped",[33256]],[[63991,63991],"mapped",[31435]],[[63992,63992],"mapped",[31520]],[[63993,63993],"mapped",[31890]],[[63994,63994],"mapped",[29376]],[[63995,63995],"mapped",[28825]],[[63996,63996],"mapped",[35672]],[[63997,63997],"mapped",[20160]],[[63998,63998],"mapped",[33590]],[[63999,63999],"mapped",[21050]],[[64000,64000],"mapped",[20999]],[[64001,64001],"mapped",[24230]],[[64002,64002],"mapped",[25299]],[[64003,64003],"mapped",[31958]],[[64004,64004],"mapped",[23429]],[[64005,64005],"mapped",[27934]],[[64006,64006],"mapped",[26292]],[[64007,64007],"mapped",[36667]],[[64008,64008],"mapped",[34892]],[[64009,64009],"mapped",[38477]],[[64010,64010],"mapped",[35211]],[[64011,64011],"mapped",[24275]],[[64012,64012],"mapped",[20800]],[[64013,64013],"mapped",[21952]],[[64014,64015],"valid"],[[64016,64016],"mapped",[22618]],[[64017,64017],"valid"],[[64018,64018],"mapped",[26228]],[[64019,64020],"valid"],[[64021,64021],"mapped",[20958]],[[64022,64022],"mapped",[29482]],[[64023,64023],"mapped",[30410]],[[64024,64024],"mapped",[31036]],[[64025,64025],"mapped",[31070]],[[64026,64026],"mapped",[31077]],[[64027,64027],"mapped",[31119]],[[64028,64028],"mapped",[38742]],[[64029,64029],"mapped",[31934]],[[64030,64030],"mapped",[32701]],[[64031,64031],"valid"],[[64032,64032],"mapped",[34322]],[[64033,64033],"valid"],[[64034,64034],"mapped",[35576]],[[64035,64036],"valid"],[[64037,64037],"mapped",[36920]],[[64038,64038],"mapped",[37117]],[[64039,64041],"valid"],[[64042,64042],"mapped",[39151]],[[64043,64043],"mapped",[39164]],[[64044,64044],"mapped",[39208]],[[64045,64045],"mapped",[40372]],[[64046,64046],"mapped",[37086]],[[64047,64047],"mapped",[38583]],[[64048,64048],"mapped",[20398]],[[64049,64049],"mapped",[20711]],[[64050,64050],"mapped",[20813]],[[64051,64051],"mapped",[21193]],[[64052,64052],"mapped",[21220]],[[64053,64053],"mapped",[21329]],[[64054,64054],"mapped",[21917]],[[64055,64055],"mapped",[22022]],[[64056,64056],"mapped",[22120]],[[64057,64057],"mapped",[22592]],[[64058,64058],"mapped",[22696]],[[64059,64059],"mapped",[23652]],[[64060,64060],"mapped",[23662]],[[64061,64061],"mapped",[24724]],[[64062,64062],"mapped",[24936]],[[64063,64063],"mapped",[24974]],[[64064,64064],"mapped",[25074]],[[64065,64065],"mapped",[25935]],[[64066,64066],"mapped",[26082]],[[64067,64067],"mapped",[26257]],[[64068,64068],"mapped",[26757]],[[64069,64069],"mapped",[28023]],[[64070,64070],"mapped",[28186]],[[64071,64071],"mapped",[28450]],[[64072,64072],"mapped",[29038]],[[64073,64073],"mapped",[29227]],[[64074,64074],"mapped",[29730]],[[64075,64075],"mapped",[30865]],[[64076,64076],"mapped",[31038]],[[64077,64077],"mapped",[31049]],[[64078,64078],"mapped",[31048]],[[64079,64079],"mapped",[31056]],[[64080,64080],"mapped",[31062]],[[64081,64081],"mapped",[31069]],[[64082,64082],"mapped",[31117]],[[64083,64083],"mapped",[31118]],[[64084,64084],"mapped",[31296]],[[64085,64085],"mapped",[31361]],[[64086,64086],"mapped",[31680]],[[64087,64087],"mapped",[32244]],[[64088,64088],"mapped",[32265]],[[64089,64089],"mapped",[32321]],[[64090,64090],"mapped",[32626]],[[64091,64091],"mapped",[32773]],[[64092,64092],"mapped",[33261]],[[64093,64094],"mapped",[33401]],[[64095,64095],"mapped",[33879]],[[64096,64096],"mapped",[35088]],[[64097,64097],"mapped",[35222]],[[64098,64098],"mapped",[35585]],[[64099,64099],"mapped",[35641]],[[64100,64100],"mapped",[36051]],[[64101,64101],"mapped",[36104]],[[64102,64102],"mapped",[36790]],[[64103,64103],"mapped",[36920]],[[64104,64104],"mapped",[38627]],[[64105,64105],"mapped",[38911]],[[64106,64106],"mapped",[38971]],[[64107,64107],"mapped",[24693]],[[64108,64108],"mapped",[148206]],[[64109,64109],"mapped",[33304]],[[64110,64111],"disallowed"],[[64112,64112],"mapped",[20006]],[[64113,64113],"mapped",[20917]],[[64114,64114],"mapped",[20840]],[[64115,64115],"mapped",[20352]],[[64116,64116],"mapped",[20805]],[[64117,64117],"mapped",[20864]],[[64118,64118],"mapped",[21191]],[[64119,64119],"mapped",[21242]],[[64120,64120],"mapped",[21917]],[[64121,64121],"mapped",[21845]],[[64122,64122],"mapped",[21913]],[[64123,64123],"mapped",[21986]],[[64124,64124],"mapped",[22618]],[[64125,64125],"mapped",[22707]],[[64126,64126],"mapped",[22852]],[[64127,64127],"mapped",[22868]],[[64128,64128],"mapped",[23138]],[[64129,64129],"mapped",[23336]],[[64130,64130],"mapped",[24274]],[[64131,64131],"mapped",[24281]],[[64132,64132],"mapped",[24425]],[[64133,64133],"mapped",[24493]],[[64134,64134],"mapped",[24792]],[[64135,64135],"mapped",[24910]],[[64136,64136],"mapped",[24840]],[[64137,64137],"mapped",[24974]],[[64138,64138],"mapped",[24928]],[[64139,64139],"mapped",[25074]],[[64140,64140],"mapped",[25140]],[[64141,64141],"mapped",[25540]],[[64142,64142],"mapped",[25628]],[[64143,64143],"mapped",[25682]],[[64144,64144],"mapped",[25942]],[[64145,64145],"mapped",[26228]],[[64146,64146],"mapped",[26391]],[[64147,64147],"mapped",[26395]],[[64148,64148],"mapped",[26454]],[[64149,64149],"mapped",[27513]],[[64150,64150],"mapped",[27578]],[[64151,64151],"mapped",[27969]],[[64152,64152],"mapped",[28379]],[[64153,64153],"mapped",[28363]],[[64154,64154],"mapped",[28450]],[[64155,64155],"mapped",[28702]],[[64156,64156],"mapped",[29038]],[[64157,64157],"mapped",[30631]],[[64158,64158],"mapped",[29237]],[[64159,64159],"mapped",[29359]],[[64160,64160],"mapped",[29482]],[[64161,64161],"mapped",[29809]],[[64162,64162],"mapped",[29958]],[[64163,64163],"mapped",[30011]],[[64164,64164],"mapped",[30237]],[[64165,64165],"mapped",[30239]],[[64166,64166],"mapped",[30410]],[[64167,64167],"mapped",[30427]],[[64168,64168],"mapped",[30452]],[[64169,64169],"mapped",[30538]],[[64170,64170],"mapped",[30528]],[[64171,64171],"mapped",[30924]],[[64172,64172],"mapped",[31409]],[[64173,64173],"mapped",[31680]],[[64174,64174],"mapped",[31867]],[[64175,64175],"mapped",[32091]],[[64176,64176],"mapped",[32244]],[[64177,64177],"mapped",[32574]],[[64178,64178],"mapped",[32773]],[[64179,64179],"mapped",[33618]],[[64180,64180],"mapped",[33775]],[[64181,64181],"mapped",[34681]],[[64182,64182],"mapped",[35137]],[[64183,64183],"mapped",[35206]],[[64184,64184],"mapped",[35222]],[[64185,64185],"mapped",[35519]],[[64186,64186],"mapped",[35576]],[[64187,64187],"mapped",[35531]],[[64188,64188],"mapped",[35585]],[[64189,64189],"mapped",[35582]],[[64190,64190],"mapped",[35565]],[[64191,64191],"mapped",[35641]],[[64192,64192],"mapped",[35722]],[[64193,64193],"mapped",[36104]],[[64194,64194],"mapped",[36664]],[[64195,64195],"mapped",[36978]],[[64196,64196],"mapped",[37273]],[[64197,64197],"mapped",[37494]],[[64198,64198],"mapped",[38524]],[[64199,64199],"mapped",[38627]],[[64200,64200],"mapped",[38742]],[[64201,64201],"mapped",[38875]],[[64202,64202],"mapped",[38911]],[[64203,64203],"mapped",[38923]],[[64204,64204],"mapped",[38971]],[[64205,64205],"mapped",[39698]],[[64206,64206],"mapped",[40860]],[[64207,64207],"mapped",[141386]],[[64208,64208],"mapped",[141380]],[[64209,64209],"mapped",[144341]],[[64210,64210],"mapped",[15261]],[[64211,64211],"mapped",[16408]],[[64212,64212],"mapped",[16441]],[[64213,64213],"mapped",[152137]],[[64214,64214],"mapped",[154832]],[[64215,64215],"mapped",[163539]],[[64216,64216],"mapped",[40771]],[[64217,64217],"mapped",[40846]],[[64218,64255],"disallowed"],[[64256,64256],"mapped",[102,102]],[[64257,64257],"mapped",[102,105]],[[64258,64258],"mapped",[102,108]],[[64259,64259],"mapped",[102,102,105]],[[64260,64260],"mapped",[102,102,108]],[[64261,64262],"mapped",[115,116]],[[64263,64274],"disallowed"],[[64275,64275],"mapped",[1396,1398]],[[64276,64276],"mapped",[1396,1381]],[[64277,64277],"mapped",[1396,1387]],[[64278,64278],"mapped",[1406,1398]],[[64279,64279],"mapped",[1396,1389]],[[64280,64284],"disallowed"],[[64285,64285],"mapped",[1497,1460]],[[64286,64286],"valid"],[[64287,64287],"mapped",[1522,1463]],[[64288,64288],"mapped",[1506]],[[64289,64289],"mapped",[1488]],[[64290,64290],"mapped",[1491]],[[64291,64291],"mapped",[1492]],[[64292,64292],"mapped",[1499]],[[64293,64293],"mapped",[1500]],[[64294,64294],"mapped",[1501]],[[64295,64295],"mapped",[1512]],[[64296,64296],"mapped",[1514]],[[64297,64297],"disallowed_STD3_mapped",[43]],[[64298,64298],"mapped",[1513,1473]],[[64299,64299],"mapped",[1513,1474]],[[64300,64300],"mapped",[1513,1468,1473]],[[64301,64301],"mapped",[1513,1468,1474]],[[64302,64302],"mapped",[1488,1463]],[[64303,64303],"mapped",[1488,1464]],[[64304,64304],"mapped",[1488,1468]],[[64305,64305],"mapped",[1489,1468]],[[64306,64306],"mapped",[1490,1468]],[[64307,64307],"mapped",[1491,1468]],[[64308,64308],"mapped",[1492,1468]],[[64309,64309],"mapped",[1493,1468]],[[64310,64310],"mapped",[1494,1468]],[[64311,64311],"disallowed"],[[64312,64312],"mapped",[1496,1468]],[[64313,64313],"mapped",[1497,1468]],[[64314,64314],"mapped",[1498,1468]],[[64315,64315],"mapped",[1499,1468]],[[64316,64316],"mapped",[1500,1468]],[[64317,64317],"disallowed"],[[64318,64318],"mapped",[1502,1468]],[[64319,64319],"disallowed"],[[64320,64320],"mapped",[1504,1468]],[[64321,64321],"mapped",[1505,1468]],[[64322,64322],"disallowed"],[[64323,64323],"mapped",[1507,1468]],[[64324,64324],"mapped",[1508,1468]],[[64325,64325],"disallowed"],[[64326,64326],"mapped",[1510,1468]],[[64327,64327],"mapped",[1511,1468]],[[64328,64328],"mapped",[1512,1468]],[[64329,64329],"mapped",[1513,1468]],[[64330,64330],"mapped",[1514,1468]],[[64331,64331],"mapped",[1493,1465]],[[64332,64332],"mapped",[1489,1471]],[[64333,64333],"mapped",[1499,1471]],[[64334,64334],"mapped",[1508,1471]],[[64335,64335],"mapped",[1488,1500]],[[64336,64337],"mapped",[1649]],[[64338,64341],"mapped",[1659]],[[64342,64345],"mapped",[1662]],[[64346,64349],"mapped",[1664]],[[64350,64353],"mapped",[1658]],[[64354,64357],"mapped",[1663]],[[64358,64361],"mapped",[1657]],[[64362,64365],"mapped",[1700]],[[64366,64369],"mapped",[1702]],[[64370,64373],"mapped",[1668]],[[64374,64377],"mapped",[1667]],[[64378,64381],"mapped",[1670]],[[64382,64385],"mapped",[1671]],[[64386,64387],"mapped",[1677]],[[64388,64389],"mapped",[1676]],[[64390,64391],"mapped",[1678]],[[64392,64393],"mapped",[1672]],[[64394,64395],"mapped",[1688]],[[64396,64397],"mapped",[1681]],[[64398,64401],"mapped",[1705]],[[64402,64405],"mapped",[1711]],[[64406,64409],"mapped",[1715]],[[64410,64413],"mapped",[1713]],[[64414,64415],"mapped",[1722]],[[64416,64419],"mapped",[1723]],[[64420,64421],"mapped",[1728]],[[64422,64425],"mapped",[1729]],[[64426,64429],"mapped",[1726]],[[64430,64431],"mapped",[1746]],[[64432,64433],"mapped",[1747]],[[64434,64449],"valid",[],"NV8"],[[64450,64466],"disallowed"],[[64467,64470],"mapped",[1709]],[[64471,64472],"mapped",[1735]],[[64473,64474],"mapped",[1734]],[[64475,64476],"mapped",[1736]],[[64477,64477],"mapped",[1735,1652]],[[64478,64479],"mapped",[1739]],[[64480,64481],"mapped",[1733]],[[64482,64483],"mapped",[1737]],[[64484,64487],"mapped",[1744]],[[64488,64489],"mapped",[1609]],[[64490,64491],"mapped",[1574,1575]],[[64492,64493],"mapped",[1574,1749]],[[64494,64495],"mapped",[1574,1608]],[[64496,64497],"mapped",[1574,1735]],[[64498,64499],"mapped",[1574,1734]],[[64500,64501],"mapped",[1574,1736]],[[64502,64504],"mapped",[1574,1744]],[[64505,64507],"mapped",[1574,1609]],[[64508,64511],"mapped",[1740]],[[64512,64512],"mapped",[1574,1580]],[[64513,64513],"mapped",[1574,1581]],[[64514,64514],"mapped",[1574,1605]],[[64515,64515],"mapped",[1574,1609]],[[64516,64516],"mapped",[1574,1610]],[[64517,64517],"mapped",[1576,1580]],[[64518,64518],"mapped",[1576,1581]],[[64519,64519],"mapped",[1576,1582]],[[64520,64520],"mapped",[1576,1605]],[[64521,64521],"mapped",[1576,1609]],[[64522,64522],"mapped",[1576,1610]],[[64523,64523],"mapped",[1578,1580]],[[64524,64524],"mapped",[1578,1581]],[[64525,64525],"mapped",[1578,1582]],[[64526,64526],"mapped",[1578,1605]],[[64527,64527],"mapped",[1578,1609]],[[64528,64528],"mapped",[1578,1610]],[[64529,64529],"mapped",[1579,1580]],[[64530,64530],"mapped",[1579,1605]],[[64531,64531],"mapped",[1579,1609]],[[64532,64532],"mapped",[1579,1610]],[[64533,64533],"mapped",[1580,1581]],[[64534,64534],"mapped",[1580,1605]],[[64535,64535],"mapped",[1581,1580]],[[64536,64536],"mapped",[1581,1605]],[[64537,64537],"mapped",[1582,1580]],[[64538,64538],"mapped",[1582,1581]],[[64539,64539],"mapped",[1582,1605]],[[64540,64540],"mapped",[1587,1580]],[[64541,64541],"mapped",[1587,1581]],[[64542,64542],"mapped",[1587,1582]],[[64543,64543],"mapped",[1587,1605]],[[64544,64544],"mapped",[1589,1581]],[[64545,64545],"mapped",[1589,1605]],[[64546,64546],"mapped",[1590,1580]],[[64547,64547],"mapped",[1590,1581]],[[64548,64548],"mapped",[1590,1582]],[[64549,64549],"mapped",[1590,1605]],[[64550,64550],"mapped",[1591,1581]],[[64551,64551],"mapped",[1591,1605]],[[64552,64552],"mapped",[1592,1605]],[[64553,64553],"mapped",[1593,1580]],[[64554,64554],"mapped",[1593,1605]],[[64555,64555],"mapped",[1594,1580]],[[64556,64556],"mapped",[1594,1605]],[[64557,64557],"mapped",[1601,1580]],[[64558,64558],"mapped",[1601,1581]],[[64559,64559],"mapped",[1601,1582]],[[64560,64560],"mapped",[1601,1605]],[[64561,64561],"mapped",[1601,1609]],[[64562,64562],"mapped",[1601,1610]],[[64563,64563],"mapped",[1602,1581]],[[64564,64564],"mapped",[1602,1605]],[[64565,64565],"mapped",[1602,1609]],[[64566,64566],"mapped",[1602,1610]],[[64567,64567],"mapped",[1603,1575]],[[64568,64568],"mapped",[1603,1580]],[[64569,64569],"mapped",[1603,1581]],[[64570,64570],"mapped",[1603,1582]],[[64571,64571],"mapped",[1603,1604]],[[64572,64572],"mapped",[1603,1605]],[[64573,64573],"mapped",[1603,1609]],[[64574,64574],"mapped",[1603,1610]],[[64575,64575],"mapped",[1604,1580]],[[64576,64576],"mapped",[1604,1581]],[[64577,64577],"mapped",[1604,1582]],[[64578,64578],"mapped",[1604,1605]],[[64579,64579],"mapped",[1604,1609]],[[64580,64580],"mapped",[1604,1610]],[[64581,64581],"mapped",[1605,1580]],[[64582,64582],"mapped",[1605,1581]],[[64583,64583],"mapped",[1605,1582]],[[64584,64584],"mapped",[1605,1605]],[[64585,64585],"mapped",[1605,1609]],[[64586,64586],"mapped",[1605,1610]],[[64587,64587],"mapped",[1606,1580]],[[64588,64588],"mapped",[1606,1581]],[[64589,64589],"mapped",[1606,1582]],[[64590,64590],"mapped",[1606,1605]],[[64591,64591],"mapped",[1606,1609]],[[64592,64592],"mapped",[1606,1610]],[[64593,64593],"mapped",[1607,1580]],[[64594,64594],"mapped",[1607,1605]],[[64595,64595],"mapped",[1607,1609]],[[64596,64596],"mapped",[1607,1610]],[[64597,64597],"mapped",[1610,1580]],[[64598,64598],"mapped",[1610,1581]],[[64599,64599],"mapped",[1610,1582]],[[64600,64600],"mapped",[1610,1605]],[[64601,64601],"mapped",[1610,1609]],[[64602,64602],"mapped",[1610,1610]],[[64603,64603],"mapped",[1584,1648]],[[64604,64604],"mapped",[1585,1648]],[[64605,64605],"mapped",[1609,1648]],[[64606,64606],"disallowed_STD3_mapped",[32,1612,1617]],[[64607,64607],"disallowed_STD3_mapped",[32,1613,1617]],[[64608,64608],"disallowed_STD3_mapped",[32,1614,1617]],[[64609,64609],"disallowed_STD3_mapped",[32,1615,1617]],[[64610,64610],"disallowed_STD3_mapped",[32,1616,1617]],[[64611,64611],"disallowed_STD3_mapped",[32,1617,1648]],[[64612,64612],"mapped",[1574,1585]],[[64613,64613],"mapped",[1574,1586]],[[64614,64614],"mapped",[1574,1605]],[[64615,64615],"mapped",[1574,1606]],[[64616,64616],"mapped",[1574,1609]],[[64617,64617],"mapped",[1574,1610]],[[64618,64618],"mapped",[1576,1585]],[[64619,64619],"mapped",[1576,1586]],[[64620,64620],"mapped",[1576,1605]],[[64621,64621],"mapped",[1576,1606]],[[64622,64622],"mapped",[1576,1609]],[[64623,64623],"mapped",[1576,1610]],[[64624,64624],"mapped",[1578,1585]],[[64625,64625],"mapped",[1578,1586]],[[64626,64626],"mapped",[1578,1605]],[[64627,64627],"mapped",[1578,1606]],[[64628,64628],"mapped",[1578,1609]],[[64629,64629],"mapped",[1578,1610]],[[64630,64630],"mapped",[1579,1585]],[[64631,64631],"mapped",[1579,1586]],[[64632,64632],"mapped",[1579,1605]],[[64633,64633],"mapped",[1579,1606]],[[64634,64634],"mapped",[1579,1609]],[[64635,64635],"mapped",[1579,1610]],[[64636,64636],"mapped",[1601,1609]],[[64637,64637],"mapped",[1601,1610]],[[64638,64638],"mapped",[1602,1609]],[[64639,64639],"mapped",[1602,1610]],[[64640,64640],"mapped",[1603,1575]],[[64641,64641],"mapped",[1603,1604]],[[64642,64642],"mapped",[1603,1605]],[[64643,64643],"mapped",[1603,1609]],[[64644,64644],"mapped",[1603,1610]],[[64645,64645],"mapped",[1604,1605]],[[64646,64646],"mapped",[1604,1609]],[[64647,64647],"mapped",[1604,1610]],[[64648,64648],"mapped",[1605,1575]],[[64649,64649],"mapped",[1605,1605]],[[64650,64650],"mapped",[1606,1585]],[[64651,64651],"mapped",[1606,1586]],[[64652,64652],"mapped",[1606,1605]],[[64653,64653],"mapped",[1606,1606]],[[64654,64654],"mapped",[1606,1609]],[[64655,64655],"mapped",[1606,1610]],[[64656,64656],"mapped",[1609,1648]],[[64657,64657],"mapped",[1610,1585]],[[64658,64658],"mapped",[1610,1586]],[[64659,64659],"mapped",[1610,1605]],[[64660,64660],"mapped",[1610,1606]],[[64661,64661],"mapped",[1610,1609]],[[64662,64662],"mapped",[1610,1610]],[[64663,64663],"mapped",[1574,1580]],[[64664,64664],"mapped",[1574,1581]],[[64665,64665],"mapped",[1574,1582]],[[64666,64666],"mapped",[1574,1605]],[[64667,64667],"mapped",[1574,1607]],[[64668,64668],"mapped",[1576,1580]],[[64669,64669],"mapped",[1576,1581]],[[64670,64670],"mapped",[1576,1582]],[[64671,64671],"mapped",[1576,1605]],[[64672,64672],"mapped",[1576,1607]],[[64673,64673],"mapped",[1578,1580]],[[64674,64674],"mapped",[1578,1581]],[[64675,64675],"mapped",[1578,1582]],[[64676,64676],"mapped",[1578,1605]],[[64677,64677],"mapped",[1578,1607]],[[64678,64678],"mapped",[1579,1605]],[[64679,64679],"mapped",[1580,1581]],[[64680,64680],"mapped",[1580,1605]],[[64681,64681],"mapped",[1581,1580]],[[64682,64682],"mapped",[1581,1605]],[[64683,64683],"mapped",[1582,1580]],[[64684,64684],"mapped",[1582,1605]],[[64685,64685],"mapped",[1587,1580]],[[64686,64686],"mapped",[1587,1581]],[[64687,64687],"mapped",[1587,1582]],[[64688,64688],"mapped",[1587,1605]],[[64689,64689],"mapped",[1589,1581]],[[64690,64690],"mapped",[1589,1582]],[[64691,64691],"mapped",[1589,1605]],[[64692,64692],"mapped",[1590,1580]],[[64693,64693],"mapped",[1590,1581]],[[64694,64694],"mapped",[1590,1582]],[[64695,64695],"mapped",[1590,1605]],[[64696,64696],"mapped",[1591,1581]],[[64697,64697],"mapped",[1592,1605]],[[64698,64698],"mapped",[1593,1580]],[[64699,64699],"mapped",[1593,1605]],[[64700,64700],"mapped",[1594,1580]],[[64701,64701],"mapped",[1594,1605]],[[64702,64702],"mapped",[1601,1580]],[[64703,64703],"mapped",[1601,1581]],[[64704,64704],"mapped",[1601,1582]],[[64705,64705],"mapped",[1601,1605]],[[64706,64706],"mapped",[1602,1581]],[[64707,64707],"mapped",[1602,1605]],[[64708,64708],"mapped",[1603,1580]],[[64709,64709],"mapped",[1603,1581]],[[64710,64710],"mapped",[1603,1582]],[[64711,64711],"mapped",[1603,1604]],[[64712,64712],"mapped",[1603,1605]],[[64713,64713],"mapped",[1604,1580]],[[64714,64714],"mapped",[1604,1581]],[[64715,64715],"mapped",[1604,1582]],[[64716,64716],"mapped",[1604,1605]],[[64717,64717],"mapped",[1604,1607]],[[64718,64718],"mapped",[1605,1580]],[[64719,64719],"mapped",[1605,1581]],[[64720,64720],"mapped",[1605,1582]],[[64721,64721],"mapped",[1605,1605]],[[64722,64722],"mapped",[1606,1580]],[[64723,64723],"mapped",[1606,1581]],[[64724,64724],"mapped",[1606,1582]],[[64725,64725],"mapped",[1606,1605]],[[64726,64726],"mapped",[1606,1607]],[[64727,64727],"mapped",[1607,1580]],[[64728,64728],"mapped",[1607,1605]],[[64729,64729],"mapped",[1607,1648]],[[64730,64730],"mapped",[1610,1580]],[[64731,64731],"mapped",[1610,1581]],[[64732,64732],"mapped",[1610,1582]],[[64733,64733],"mapped",[1610,1605]],[[64734,64734],"mapped",[1610,1607]],[[64735,64735],"mapped",[1574,1605]],[[64736,64736],"mapped",[1574,1607]],[[64737,64737],"mapped",[1576,1605]],[[64738,64738],"mapped",[1576,1607]],[[64739,64739],"mapped",[1578,1605]],[[64740,64740],"mapped",[1578,1607]],[[64741,64741],"mapped",[1579,1605]],[[64742,64742],"mapped",[1579,1607]],[[64743,64743],"mapped",[1587,1605]],[[64744,64744],"mapped",[1587,1607]],[[64745,64745],"mapped",[1588,1605]],[[64746,64746],"mapped",[1588,1607]],[[64747,64747],"mapped",[1603,1604]],[[64748,64748],"mapped",[1603,1605]],[[64749,64749],"mapped",[1604,1605]],[[64750,64750],"mapped",[1606,1605]],[[64751,64751],"mapped",[1606,1607]],[[64752,64752],"mapped",[1610,1605]],[[64753,64753],"mapped",[1610,1607]],[[64754,64754],"mapped",[1600,1614,1617]],[[64755,64755],"mapped",[1600,1615,1617]],[[64756,64756],"mapped",[1600,1616,1617]],[[64757,64757],"mapped",[1591,1609]],[[64758,64758],"mapped",[1591,1610]],[[64759,64759],"mapped",[1593,1609]],[[64760,64760],"mapped",[1593,1610]],[[64761,64761],"mapped",[1594,1609]],[[64762,64762],"mapped",[1594,1610]],[[64763,64763],"mapped",[1587,1609]],[[64764,64764],"mapped",[1587,1610]],[[64765,64765],"mapped",[1588,1609]],[[64766,64766],"mapped",[1588,1610]],[[64767,64767],"mapped",[1581,1609]],[[64768,64768],"mapped",[1581,1610]],[[64769,64769],"mapped",[1580,1609]],[[64770,64770],"mapped",[1580,1610]],[[64771,64771],"mapped",[1582,1609]],[[64772,64772],"mapped",[1582,1610]],[[64773,64773],"mapped",[1589,1609]],[[64774,64774],"mapped",[1589,1610]],[[64775,64775],"mapped",[1590,1609]],[[64776,64776],"mapped",[1590,1610]],[[64777,64777],"mapped",[1588,1580]],[[64778,64778],"mapped",[1588,1581]],[[64779,64779],"mapped",[1588,1582]],[[64780,64780],"mapped",[1588,1605]],[[64781,64781],"mapped",[1588,1585]],[[64782,64782],"mapped",[1587,1585]],[[64783,64783],"mapped",[1589,1585]],[[64784,64784],"mapped",[1590,1585]],[[64785,64785],"mapped",[1591,1609]],[[64786,64786],"mapped",[1591,1610]],[[64787,64787],"mapped",[1593,1609]],[[64788,64788],"mapped",[1593,1610]],[[64789,64789],"mapped",[1594,1609]],[[64790,64790],"mapped",[1594,1610]],[[64791,64791],"mapped",[1587,1609]],[[64792,64792],"mapped",[1587,1610]],[[64793,64793],"mapped",[1588,1609]],[[64794,64794],"mapped",[1588,1610]],[[64795,64795],"mapped",[1581,1609]],[[64796,64796],"mapped",[1581,1610]],[[64797,64797],"mapped",[1580,1609]],[[64798,64798],"mapped",[1580,1610]],[[64799,64799],"mapped",[1582,1609]],[[64800,64800],"mapped",[1582,1610]],[[64801,64801],"mapped",[1589,1609]],[[64802,64802],"mapped",[1589,1610]],[[64803,64803],"mapped",[1590,1609]],[[64804,64804],"mapped",[1590,1610]],[[64805,64805],"mapped",[1588,1580]],[[64806,64806],"mapped",[1588,1581]],[[64807,64807],"mapped",[1588,1582]],[[64808,64808],"mapped",[1588,1605]],[[64809,64809],"mapped",[1588,1585]],[[64810,64810],"mapped",[1587,1585]],[[64811,64811],"mapped",[1589,1585]],[[64812,64812],"mapped",[1590,1585]],[[64813,64813],"mapped",[1588,1580]],[[64814,64814],"mapped",[1588,1581]],[[64815,64815],"mapped",[1588,1582]],[[64816,64816],"mapped",[1588,1605]],[[64817,64817],"mapped",[1587,1607]],[[64818,64818],"mapped",[1588,1607]],[[64819,64819],"mapped",[1591,1605]],[[64820,64820],"mapped",[1587,1580]],[[64821,64821],"mapped",[1587,1581]],[[64822,64822],"mapped",[1587,1582]],[[64823,64823],"mapped",[1588,1580]],[[64824,64824],"mapped",[1588,1581]],[[64825,64825],"mapped",[1588,1582]],[[64826,64826],"mapped",[1591,1605]],[[64827,64827],"mapped",[1592,1605]],[[64828,64829],"mapped",[1575,1611]],[[64830,64831],"valid",[],"NV8"],[[64832,64847],"disallowed"],[[64848,64848],"mapped",[1578,1580,1605]],[[64849,64850],"mapped",[1578,1581,1580]],[[64851,64851],"mapped",[1578,1581,1605]],[[64852,64852],"mapped",[1578,1582,1605]],[[64853,64853],"mapped",[1578,1605,1580]],[[64854,64854],"mapped",[1578,1605,1581]],[[64855,64855],"mapped",[1578,1605,1582]],[[64856,64857],"mapped",[1580,1605,1581]],[[64858,64858],"mapped",[1581,1605,1610]],[[64859,64859],"mapped",[1581,1605,1609]],[[64860,64860],"mapped",[1587,1581,1580]],[[64861,64861],"mapped",[1587,1580,1581]],[[64862,64862],"mapped",[1587,1580,1609]],[[64863,64864],"mapped",[1587,1605,1581]],[[64865,64865],"mapped",[1587,1605,1580]],[[64866,64867],"mapped",[1587,1605,1605]],[[64868,64869],"mapped",[1589,1581,1581]],[[64870,64870],"mapped",[1589,1605,1605]],[[64871,64872],"mapped",[1588,1581,1605]],[[64873,64873],"mapped",[1588,1580,1610]],[[64874,64875],"mapped",[1588,1605,1582]],[[64876,64877],"mapped",[1588,1605,1605]],[[64878,64878],"mapped",[1590,1581,1609]],[[64879,64880],"mapped",[1590,1582,1605]],[[64881,64882],"mapped",[1591,1605,1581]],[[64883,64883],"mapped",[1591,1605,1605]],[[64884,64884],"mapped",[1591,1605,1610]],[[64885,64885],"mapped",[1593,1580,1605]],[[64886,64887],"mapped",[1593,1605,1605]],[[64888,64888],"mapped",[1593,1605,1609]],[[64889,64889],"mapped",[1594,1605,1605]],[[64890,64890],"mapped",[1594,1605,1610]],[[64891,64891],"mapped",[1594,1605,1609]],[[64892,64893],"mapped",[1601,1582,1605]],[[64894,64894],"mapped",[1602,1605,1581]],[[64895,64895],"mapped",[1602,1605,1605]],[[64896,64896],"mapped",[1604,1581,1605]],[[64897,64897],"mapped",[1604,1581,1610]],[[64898,64898],"mapped",[1604,1581,1609]],[[64899,64900],"mapped",[1604,1580,1580]],[[64901,64902],"mapped",[1604,1582,1605]],[[64903,64904],"mapped",[1604,1605,1581]],[[64905,64905],"mapped",[1605,1581,1580]],[[64906,64906],"mapped",[1605,1581,1605]],[[64907,64907],"mapped",[1605,1581,1610]],[[64908,64908],"mapped",[1605,1580,1581]],[[64909,64909],"mapped",[1605,1580,1605]],[[64910,64910],"mapped",[1605,1582,1580]],[[64911,64911],"mapped",[1605,1582,1605]],[[64912,64913],"disallowed"],[[64914,64914],"mapped",[1605,1580,1582]],[[64915,64915],"mapped",[1607,1605,1580]],[[64916,64916],"mapped",[1607,1605,1605]],[[64917,64917],"mapped",[1606,1581,1605]],[[64918,64918],"mapped",[1606,1581,1609]],[[64919,64920],"mapped",[1606,1580,1605]],[[64921,64921],"mapped",[1606,1580,1609]],[[64922,64922],"mapped",[1606,1605,1610]],[[64923,64923],"mapped",[1606,1605,1609]],[[64924,64925],"mapped",[1610,1605,1605]],[[64926,64926],"mapped",[1576,1582,1610]],[[64927,64927],"mapped",[1578,1580,1610]],[[64928,64928],"mapped",[1578,1580,1609]],[[64929,64929],"mapped",[1578,1582,1610]],[[64930,64930],"mapped",[1578,1582,1609]],[[64931,64931],"mapped",[1578,1605,1610]],[[64932,64932],"mapped",[1578,1605,1609]],[[64933,64933],"mapped",[1580,1605,1610]],[[64934,64934],"mapped",[1580,1581,1609]],[[64935,64935],"mapped",[1580,1605,1609]],[[64936,64936],"mapped",[1587,1582,1609]],[[64937,64937],"mapped",[1589,1581,1610]],[[64938,64938],"mapped",[1588,1581,1610]],[[64939,64939],"mapped",[1590,1581,1610]],[[64940,64940],"mapped",[1604,1580,1610]],[[64941,64941],"mapped",[1604,1605,1610]],[[64942,64942],"mapped",[1610,1581,1610]],[[64943,64943],"mapped",[1610,1580,1610]],[[64944,64944],"mapped",[1610,1605,1610]],[[64945,64945],"mapped",[1605,1605,1610]],[[64946,64946],"mapped",[1602,1605,1610]],[[64947,64947],"mapped",[1606,1581,1610]],[[64948,64948],"mapped",[1602,1605,1581]],[[64949,64949],"mapped",[1604,1581,1605]],[[64950,64950],"mapped",[1593,1605,1610]],[[64951,64951],"mapped",[1603,1605,1610]],[[64952,64952],"mapped",[1606,1580,1581]],[[64953,64953],"mapped",[1605,1582,1610]],[[64954,64954],"mapped",[1604,1580,1605]],[[64955,64955],"mapped",[1603,1605,1605]],[[64956,64956],"mapped",[1604,1580,1605]],[[64957,64957],"mapped",[1606,1580,1581]],[[64958,64958],"mapped",[1580,1581,1610]],[[64959,64959],"mapped",[1581,1580,1610]],[[64960,64960],"mapped",[1605,1580,1610]],[[64961,64961],"mapped",[1601,1605,1610]],[[64962,64962],"mapped",[1576,1581,1610]],[[64963,64963],"mapped",[1603,1605,1605]],[[64964,64964],"mapped",[1593,1580,1605]],[[64965,64965],"mapped",[1589,1605,1605]],[[64966,64966],"mapped",[1587,1582,1610]],[[64967,64967],"mapped",[1606,1580,1610]],[[64968,64975],"disallowed"],[[64976,65007],"disallowed"],[[65008,65008],"mapped",[1589,1604,1746]],[[65009,65009],"mapped",[1602,1604,1746]],[[65010,65010],"mapped",[1575,1604,1604,1607]],[[65011,65011],"mapped",[1575,1603,1576,1585]],[[65012,65012],"mapped",[1605,1581,1605,1583]],[[65013,65013],"mapped",[1589,1604,1593,1605]],[[65014,65014],"mapped",[1585,1587,1608,1604]],[[65015,65015],"mapped",[1593,1604,1610,1607]],[[65016,65016],"mapped",[1608,1587,1604,1605]],[[65017,65017],"mapped",[1589,1604,1609]],[[65018,65018],"disallowed_STD3_mapped",[1589,1604,1609,32,1575,1604,1604,1607,32,1593,1604,1610,1607,32,1608,1587,1604,1605]],[[65019,65019],"disallowed_STD3_mapped",[1580,1604,32,1580,1604,1575,1604,1607]],[[65020,65020],"mapped",[1585,1740,1575,1604]],[[65021,65021],"valid",[],"NV8"],[[65022,65023],"disallowed"],[[65024,65039],"ignored"],[[65040,65040],"disallowed_STD3_mapped",[44]],[[65041,65041],"mapped",[12289]],[[65042,65042],"disallowed"],[[65043,65043],"disallowed_STD3_mapped",[58]],[[65044,65044],"disallowed_STD3_mapped",[59]],[[65045,65045],"disallowed_STD3_mapped",[33]],[[65046,65046],"disallowed_STD3_mapped",[63]],[[65047,65047],"mapped",[12310]],[[65048,65048],"mapped",[12311]],[[65049,65049],"disallowed"],[[65050,65055],"disallowed"],[[65056,65059],"valid"],[[65060,65062],"valid"],[[65063,65069],"valid"],[[65070,65071],"valid"],[[65072,65072],"disallowed"],[[65073,65073],"mapped",[8212]],[[65074,65074],"mapped",[8211]],[[65075,65076],"disallowed_STD3_mapped",[95]],[[65077,65077],"disallowed_STD3_mapped",[40]],[[65078,65078],"disallowed_STD3_mapped",[41]],[[65079,65079],"disallowed_STD3_mapped",[123]],[[65080,65080],"disallowed_STD3_mapped",[125]],[[65081,65081],"mapped",[12308]],[[65082,65082],"mapped",[12309]],[[65083,65083],"mapped",[12304]],[[65084,65084],"mapped",[12305]],[[65085,65085],"mapped",[12298]],[[65086,65086],"mapped",[12299]],[[65087,65087],"mapped",[12296]],[[65088,65088],"mapped",[12297]],[[65089,65089],"mapped",[12300]],[[65090,65090],"mapped",[12301]],[[65091,65091],"mapped",[12302]],[[65092,65092],"mapped",[12303]],[[65093,65094],"valid",[],"NV8"],[[65095,65095],"disallowed_STD3_mapped",[91]],[[65096,65096],"disallowed_STD3_mapped",[93]],[[65097,65100],"disallowed_STD3_mapped",[32,773]],[[65101,65103],"disallowed_STD3_mapped",[95]],[[65104,65104],"disallowed_STD3_mapped",[44]],[[65105,65105],"mapped",[12289]],[[65106,65106],"disallowed"],[[65107,65107],"disallowed"],[[65108,65108],"disallowed_STD3_mapped",[59]],[[65109,65109],"disallowed_STD3_mapped",[58]],[[65110,65110],"disallowed_STD3_mapped",[63]],[[65111,65111],"disallowed_STD3_mapped",[33]],[[65112,65112],"mapped",[8212]],[[65113,65113],"disallowed_STD3_mapped",[40]],[[65114,65114],"disallowed_STD3_mapped",[41]],[[65115,65115],"disallowed_STD3_mapped",[123]],[[65116,65116],"disallowed_STD3_mapped",[125]],[[65117,65117],"mapped",[12308]],[[65118,65118],"mapped",[12309]],[[65119,65119],"disallowed_STD3_mapped",[35]],[[65120,65120],"disallowed_STD3_mapped",[38]],[[65121,65121],"disallowed_STD3_mapped",[42]],[[65122,65122],"disallowed_STD3_mapped",[43]],[[65123,65123],"mapped",[45]],[[65124,65124],"disallowed_STD3_mapped",[60]],[[65125,65125],"disallowed_STD3_mapped",[62]],[[65126,65126],"disallowed_STD3_mapped",[61]],[[65127,65127],"disallowed"],[[65128,65128],"disallowed_STD3_mapped",[92]],[[65129,65129],"disallowed_STD3_mapped",[36]],[[65130,65130],"disallowed_STD3_mapped",[37]],[[65131,65131],"disallowed_STD3_mapped",[64]],[[65132,65135],"disallowed"],[[65136,65136],"disallowed_STD3_mapped",[32,1611]],[[65137,65137],"mapped",[1600,1611]],[[65138,65138],"disallowed_STD3_mapped",[32,1612]],[[65139,65139],"valid"],[[65140,65140],"disallowed_STD3_mapped",[32,1613]],[[65141,65141],"disallowed"],[[65142,65142],"disallowed_STD3_mapped",[32,1614]],[[65143,65143],"mapped",[1600,1614]],[[65144,65144],"disallowed_STD3_mapped",[32,1615]],[[65145,65145],"mapped",[1600,1615]],[[65146,65146],"disallowed_STD3_mapped",[32,1616]],[[65147,65147],"mapped",[1600,1616]],[[65148,65148],"disallowed_STD3_mapped",[32,1617]],[[65149,65149],"mapped",[1600,1617]],[[65150,65150],"disallowed_STD3_mapped",[32,1618]],[[65151,65151],"mapped",[1600,1618]],[[65152,65152],"mapped",[1569]],[[65153,65154],"mapped",[1570]],[[65155,65156],"mapped",[1571]],[[65157,65158],"mapped",[1572]],[[65159,65160],"mapped",[1573]],[[65161,65164],"mapped",[1574]],[[65165,65166],"mapped",[1575]],[[65167,65170],"mapped",[1576]],[[65171,65172],"mapped",[1577]],[[65173,65176],"mapped",[1578]],[[65177,65180],"mapped",[1579]],[[65181,65184],"mapped",[1580]],[[65185,65188],"mapped",[1581]],[[65189,65192],"mapped",[1582]],[[65193,65194],"mapped",[1583]],[[65195,65196],"mapped",[1584]],[[65197,65198],"mapped",[1585]],[[65199,65200],"mapped",[1586]],[[65201,65204],"mapped",[1587]],[[65205,65208],"mapped",[1588]],[[65209,65212],"mapped",[1589]],[[65213,65216],"mapped",[1590]],[[65217,65220],"mapped",[1591]],[[65221,65224],"mapped",[1592]],[[65225,65228],"mapped",[1593]],[[65229,65232],"mapped",[1594]],[[65233,65236],"mapped",[1601]],[[65237,65240],"mapped",[1602]],[[65241,65244],"mapped",[1603]],[[65245,65248],"mapped",[1604]],[[65249,65252],"mapped",[1605]],[[65253,65256],"mapped",[1606]],[[65257,65260],"mapped",[1607]],[[65261,65262],"mapped",[1608]],[[65263,65264],"mapped",[1609]],[[65265,65268],"mapped",[1610]],[[65269,65270],"mapped",[1604,1570]],[[65271,65272],"mapped",[1604,1571]],[[65273,65274],"mapped",[1604,1573]],[[65275,65276],"mapped",[1604,1575]],[[65277,65278],"disallowed"],[[65279,65279],"ignored"],[[65280,65280],"disallowed"],[[65281,65281],"disallowed_STD3_mapped",[33]],[[65282,65282],"disallowed_STD3_mapped",[34]],[[65283,65283],"disallowed_STD3_mapped",[35]],[[65284,65284],"disallowed_STD3_mapped",[36]],[[65285,65285],"disallowed_STD3_mapped",[37]],[[65286,65286],"disallowed_STD3_mapped",[38]],[[65287,65287],"disallowed_STD3_mapped",[39]],[[65288,65288],"disallowed_STD3_mapped",[40]],[[65289,65289],"disallowed_STD3_mapped",[41]],[[65290,65290],"disallowed_STD3_mapped",[42]],[[65291,65291],"disallowed_STD3_mapped",[43]],[[65292,65292],"disallowed_STD3_mapped",[44]],[[65293,65293],"mapped",[45]],[[65294,65294],"mapped",[46]],[[65295,65295],"disallowed_STD3_mapped",[47]],[[65296,65296],"mapped",[48]],[[65297,65297],"mapped",[49]],[[65298,65298],"mapped",[50]],[[65299,65299],"mapped",[51]],[[65300,65300],"mapped",[52]],[[65301,65301],"mapped",[53]],[[65302,65302],"mapped",[54]],[[65303,65303],"mapped",[55]],[[65304,65304],"mapped",[56]],[[65305,65305],"mapped",[57]],[[65306,65306],"disallowed_STD3_mapped",[58]],[[65307,65307],"disallowed_STD3_mapped",[59]],[[65308,65308],"disallowed_STD3_mapped",[60]],[[65309,65309],"disallowed_STD3_mapped",[61]],[[65310,65310],"disallowed_STD3_mapped",[62]],[[65311,65311],"disallowed_STD3_mapped",[63]],[[65312,65312],"disallowed_STD3_mapped",[64]],[[65313,65313],"mapped",[97]],[[65314,65314],"mapped",[98]],[[65315,65315],"mapped",[99]],[[65316,65316],"mapped",[100]],[[65317,65317],"mapped",[101]],[[65318,65318],"mapped",[102]],[[65319,65319],"mapped",[103]],[[65320,65320],"mapped",[104]],[[65321,65321],"mapped",[105]],[[65322,65322],"mapped",[106]],[[65323,65323],"mapped",[107]],[[65324,65324],"mapped",[108]],[[65325,65325],"mapped",[109]],[[65326,65326],"mapped",[110]],[[65327,65327],"mapped",[111]],[[65328,65328],"mapped",[112]],[[65329,65329],"mapped",[113]],[[65330,65330],"mapped",[114]],[[65331,65331],"mapped",[115]],[[65332,65332],"mapped",[116]],[[65333,65333],"mapped",[117]],[[65334,65334],"mapped",[118]],[[65335,65335],"mapped",[119]],[[65336,65336],"mapped",[120]],[[65337,65337],"mapped",[121]],[[65338,65338],"mapped",[122]],[[65339,65339],"disallowed_STD3_mapped",[91]],[[65340,65340],"disallowed_STD3_mapped",[92]],[[65341,65341],"disallowed_STD3_mapped",[93]],[[65342,65342],"disallowed_STD3_mapped",[94]],[[65343,65343],"disallowed_STD3_mapped",[95]],[[65344,65344],"disallowed_STD3_mapped",[96]],[[65345,65345],"mapped",[97]],[[65346,65346],"mapped",[98]],[[65347,65347],"mapped",[99]],[[65348,65348],"mapped",[100]],[[65349,65349],"mapped",[101]],[[65350,65350],"mapped",[102]],[[65351,65351],"mapped",[103]],[[65352,65352],"mapped",[104]],[[65353,65353],"mapped",[105]],[[65354,65354],"mapped",[106]],[[65355,65355],"mapped",[107]],[[65356,65356],"mapped",[108]],[[65357,65357],"mapped",[109]],[[65358,65358],"mapped",[110]],[[65359,65359],"mapped",[111]],[[65360,65360],"mapped",[112]],[[65361,65361],"mapped",[113]],[[65362,65362],"mapped",[114]],[[65363,65363],"mapped",[115]],[[65364,65364],"mapped",[116]],[[65365,65365],"mapped",[117]],[[65366,65366],"mapped",[118]],[[65367,65367],"mapped",[119]],[[65368,65368],"mapped",[120]],[[65369,65369],"mapped",[121]],[[65370,65370],"mapped",[122]],[[65371,65371],"disallowed_STD3_mapped",[123]],[[65372,65372],"disallowed_STD3_mapped",[124]],[[65373,65373],"disallowed_STD3_mapped",[125]],[[65374,65374],"disallowed_STD3_mapped",[126]],[[65375,65375],"mapped",[10629]],[[65376,65376],"mapped",[10630]],[[65377,65377],"mapped",[46]],[[65378,65378],"mapped",[12300]],[[65379,65379],"mapped",[12301]],[[65380,65380],"mapped",[12289]],[[65381,65381],"mapped",[12539]],[[65382,65382],"mapped",[12530]],[[65383,65383],"mapped",[12449]],[[65384,65384],"mapped",[12451]],[[65385,65385],"mapped",[12453]],[[65386,65386],"mapped",[12455]],[[65387,65387],"mapped",[12457]],[[65388,65388],"mapped",[12515]],[[65389,65389],"mapped",[12517]],[[65390,65390],"mapped",[12519]],[[65391,65391],"mapped",[12483]],[[65392,65392],"mapped",[12540]],[[65393,65393],"mapped",[12450]],[[65394,65394],"mapped",[12452]],[[65395,65395],"mapped",[12454]],[[65396,65396],"mapped",[12456]],[[65397,65397],"mapped",[12458]],[[65398,65398],"mapped",[12459]],[[65399,65399],"mapped",[12461]],[[65400,65400],"mapped",[12463]],[[65401,65401],"mapped",[12465]],[[65402,65402],"mapped",[12467]],[[65403,65403],"mapped",[12469]],[[65404,65404],"mapped",[12471]],[[65405,65405],"mapped",[12473]],[[65406,65406],"mapped",[12475]],[[65407,65407],"mapped",[12477]],[[65408,65408],"mapped",[12479]],[[65409,65409],"mapped",[12481]],[[65410,65410],"mapped",[12484]],[[65411,65411],"mapped",[12486]],[[65412,65412],"mapped",[12488]],[[65413,65413],"mapped",[12490]],[[65414,65414],"mapped",[12491]],[[65415,65415],"mapped",[12492]],[[65416,65416],"mapped",[12493]],[[65417,65417],"mapped",[12494]],[[65418,65418],"mapped",[12495]],[[65419,65419],"mapped",[12498]],[[65420,65420],"mapped",[12501]],[[65421,65421],"mapped",[12504]],[[65422,65422],"mapped",[12507]],[[65423,65423],"mapped",[12510]],[[65424,65424],"mapped",[12511]],[[65425,65425],"mapped",[12512]],[[65426,65426],"mapped",[12513]],[[65427,65427],"mapped",[12514]],[[65428,65428],"mapped",[12516]],[[65429,65429],"mapped",[12518]],[[65430,65430],"mapped",[12520]],[[65431,65431],"mapped",[12521]],[[65432,65432],"mapped",[12522]],[[65433,65433],"mapped",[12523]],[[65434,65434],"mapped",[12524]],[[65435,65435],"mapped",[12525]],[[65436,65436],"mapped",[12527]],[[65437,65437],"mapped",[12531]],[[65438,65438],"mapped",[12441]],[[65439,65439],"mapped",[12442]],[[65440,65440],"disallowed"],[[65441,65441],"mapped",[4352]],[[65442,65442],"mapped",[4353]],[[65443,65443],"mapped",[4522]],[[65444,65444],"mapped",[4354]],[[65445,65445],"mapped",[4524]],[[65446,65446],"mapped",[4525]],[[65447,65447],"mapped",[4355]],[[65448,65448],"mapped",[4356]],[[65449,65449],"mapped",[4357]],[[65450,65450],"mapped",[4528]],[[65451,65451],"mapped",[4529]],[[65452,65452],"mapped",[4530]],[[65453,65453],"mapped",[4531]],[[65454,65454],"mapped",[4532]],[[65455,65455],"mapped",[4533]],[[65456,65456],"mapped",[4378]],[[65457,65457],"mapped",[4358]],[[65458,65458],"mapped",[4359]],[[65459,65459],"mapped",[4360]],[[65460,65460],"mapped",[4385]],[[65461,65461],"mapped",[4361]],[[65462,65462],"mapped",[4362]],[[65463,65463],"mapped",[4363]],[[65464,65464],"mapped",[4364]],[[65465,65465],"mapped",[4365]],[[65466,65466],"mapped",[4366]],[[65467,65467],"mapped",[4367]],[[65468,65468],"mapped",[4368]],[[65469,65469],"mapped",[4369]],[[65470,65470],"mapped",[4370]],[[65471,65473],"disallowed"],[[65474,65474],"mapped",[4449]],[[65475,65475],"mapped",[4450]],[[65476,65476],"mapped",[4451]],[[65477,65477],"mapped",[4452]],[[65478,65478],"mapped",[4453]],[[65479,65479],"mapped",[4454]],[[65480,65481],"disallowed"],[[65482,65482],"mapped",[4455]],[[65483,65483],"mapped",[4456]],[[65484,65484],"mapped",[4457]],[[65485,65485],"mapped",[4458]],[[65486,65486],"mapped",[4459]],[[65487,65487],"mapped",[4460]],[[65488,65489],"disallowed"],[[65490,65490],"mapped",[4461]],[[65491,65491],"mapped",[4462]],[[65492,65492],"mapped",[4463]],[[65493,65493],"mapped",[4464]],[[65494,65494],"mapped",[4465]],[[65495,65495],"mapped",[4466]],[[65496,65497],"disallowed"],[[65498,65498],"mapped",[4467]],[[65499,65499],"mapped",[4468]],[[65500,65500],"mapped",[4469]],[[65501,65503],"disallowed"],[[65504,65504],"mapped",[162]],[[65505,65505],"mapped",[163]],[[65506,65506],"mapped",[172]],[[65507,65507],"disallowed_STD3_mapped",[32,772]],[[65508,65508],"mapped",[166]],[[65509,65509],"mapped",[165]],[[65510,65510],"mapped",[8361]],[[65511,65511],"disallowed"],[[65512,65512],"mapped",[9474]],[[65513,65513],"mapped",[8592]],[[65514,65514],"mapped",[8593]],[[65515,65515],"mapped",[8594]],[[65516,65516],"mapped",[8595]],[[65517,65517],"mapped",[9632]],[[65518,65518],"mapped",[9675]],[[65519,65528],"disallowed"],[[65529,65531],"disallowed"],[[65532,65532],"disallowed"],[[65533,65533],"disallowed"],[[65534,65535],"disallowed"],[[65536,65547],"valid"],[[65548,65548],"disallowed"],[[65549,65574],"valid"],[[65575,65575],"disallowed"],[[65576,65594],"valid"],[[65595,65595],"disallowed"],[[65596,65597],"valid"],[[65598,65598],"disallowed"],[[65599,65613],"valid"],[[65614,65615],"disallowed"],[[65616,65629],"valid"],[[65630,65663],"disallowed"],[[65664,65786],"valid"],[[65787,65791],"disallowed"],[[65792,65794],"valid",[],"NV8"],[[65795,65798],"disallowed"],[[65799,65843],"valid",[],"NV8"],[[65844,65846],"disallowed"],[[65847,65855],"valid",[],"NV8"],[[65856,65930],"valid",[],"NV8"],[[65931,65932],"valid",[],"NV8"],[[65933,65935],"disallowed"],[[65936,65947],"valid",[],"NV8"],[[65948,65951],"disallowed"],[[65952,65952],"valid",[],"NV8"],[[65953,65999],"disallowed"],[[66000,66044],"valid",[],"NV8"],[[66045,66045],"valid"],[[66046,66175],"disallowed"],[[66176,66204],"valid"],[[66205,66207],"disallowed"],[[66208,66256],"valid"],[[66257,66271],"disallowed"],[[66272,66272],"valid"],[[66273,66299],"valid",[],"NV8"],[[66300,66303],"disallowed"],[[66304,66334],"valid"],[[66335,66335],"valid"],[[66336,66339],"valid",[],"NV8"],[[66340,66351],"disallowed"],[[66352,66368],"valid"],[[66369,66369],"valid",[],"NV8"],[[66370,66377],"valid"],[[66378,66378],"valid",[],"NV8"],[[66379,66383],"disallowed"],[[66384,66426],"valid"],[[66427,66431],"disallowed"],[[66432,66461],"valid"],[[66462,66462],"disallowed"],[[66463,66463],"valid",[],"NV8"],[[66464,66499],"valid"],[[66500,66503],"disallowed"],[[66504,66511],"valid"],[[66512,66517],"valid",[],"NV8"],[[66518,66559],"disallowed"],[[66560,66560],"mapped",[66600]],[[66561,66561],"mapped",[66601]],[[66562,66562],"mapped",[66602]],[[66563,66563],"mapped",[66603]],[[66564,66564],"mapped",[66604]],[[66565,66565],"mapped",[66605]],[[66566,66566],"mapped",[66606]],[[66567,66567],"mapped",[66607]],[[66568,66568],"mapped",[66608]],[[66569,66569],"mapped",[66609]],[[66570,66570],"mapped",[66610]],[[66571,66571],"mapped",[66611]],[[66572,66572],"mapped",[66612]],[[66573,66573],"mapped",[66613]],[[66574,66574],"mapped",[66614]],[[66575,66575],"mapped",[66615]],[[66576,66576],"mapped",[66616]],[[66577,66577],"mapped",[66617]],[[66578,66578],"mapped",[66618]],[[66579,66579],"mapped",[66619]],[[66580,66580],"mapped",[66620]],[[66581,66581],"mapped",[66621]],[[66582,66582],"mapped",[66622]],[[66583,66583],"mapped",[66623]],[[66584,66584],"mapped",[66624]],[[66585,66585],"mapped",[66625]],[[66586,66586],"mapped",[66626]],[[66587,66587],"mapped",[66627]],[[66588,66588],"mapped",[66628]],[[66589,66589],"mapped",[66629]],[[66590,66590],"mapped",[66630]],[[66591,66591],"mapped",[66631]],[[66592,66592],"mapped",[66632]],[[66593,66593],"mapped",[66633]],[[66594,66594],"mapped",[66634]],[[66595,66595],"mapped",[66635]],[[66596,66596],"mapped",[66636]],[[66597,66597],"mapped",[66637]],[[66598,66598],"mapped",[66638]],[[66599,66599],"mapped",[66639]],[[66600,66637],"valid"],[[66638,66717],"valid"],[[66718,66719],"disallowed"],[[66720,66729],"valid"],[[66730,66815],"disallowed"],[[66816,66855],"valid"],[[66856,66863],"disallowed"],[[66864,66915],"valid"],[[66916,66926],"disallowed"],[[66927,66927],"valid",[],"NV8"],[[66928,67071],"disallowed"],[[67072,67382],"valid"],[[67383,67391],"disallowed"],[[67392,67413],"valid"],[[67414,67423],"disallowed"],[[67424,67431],"valid"],[[67432,67583],"disallowed"],[[67584,67589],"valid"],[[67590,67591],"disallowed"],[[67592,67592],"valid"],[[67593,67593],"disallowed"],[[67594,67637],"valid"],[[67638,67638],"disallowed"],[[67639,67640],"valid"],[[67641,67643],"disallowed"],[[67644,67644],"valid"],[[67645,67646],"disallowed"],[[67647,67647],"valid"],[[67648,67669],"valid"],[[67670,67670],"disallowed"],[[67671,67679],"valid",[],"NV8"],[[67680,67702],"valid"],[[67703,67711],"valid",[],"NV8"],[[67712,67742],"valid"],[[67743,67750],"disallowed"],[[67751,67759],"valid",[],"NV8"],[[67760,67807],"disallowed"],[[67808,67826],"valid"],[[67827,67827],"disallowed"],[[67828,67829],"valid"],[[67830,67834],"disallowed"],[[67835,67839],"valid",[],"NV8"],[[67840,67861],"valid"],[[67862,67865],"valid",[],"NV8"],[[67866,67867],"valid",[],"NV8"],[[67868,67870],"disallowed"],[[67871,67871],"valid",[],"NV8"],[[67872,67897],"valid"],[[67898,67902],"disallowed"],[[67903,67903],"valid",[],"NV8"],[[67904,67967],"disallowed"],[[67968,68023],"valid"],[[68024,68027],"disallowed"],[[68028,68029],"valid",[],"NV8"],[[68030,68031],"valid"],[[68032,68047],"valid",[],"NV8"],[[68048,68049],"disallowed"],[[68050,68095],"valid",[],"NV8"],[[68096,68099],"valid"],[[68100,68100],"disallowed"],[[68101,68102],"valid"],[[68103,68107],"disallowed"],[[68108,68115],"valid"],[[68116,68116],"disallowed"],[[68117,68119],"valid"],[[68120,68120],"disallowed"],[[68121,68147],"valid"],[[68148,68151],"disallowed"],[[68152,68154],"valid"],[[68155,68158],"disallowed"],[[68159,68159],"valid"],[[68160,68167],"valid",[],"NV8"],[[68168,68175],"disallowed"],[[68176,68184],"valid",[],"NV8"],[[68185,68191],"disallowed"],[[68192,68220],"valid"],[[68221,68223],"valid",[],"NV8"],[[68224,68252],"valid"],[[68253,68255],"valid",[],"NV8"],[[68256,68287],"disallowed"],[[68288,68295],"valid"],[[68296,68296],"valid",[],"NV8"],[[68297,68326],"valid"],[[68327,68330],"disallowed"],[[68331,68342],"valid",[],"NV8"],[[68343,68351],"disallowed"],[[68352,68405],"valid"],[[68406,68408],"disallowed"],[[68409,68415],"valid",[],"NV8"],[[68416,68437],"valid"],[[68438,68439],"disallowed"],[[68440,68447],"valid",[],"NV8"],[[68448,68466],"valid"],[[68467,68471],"disallowed"],[[68472,68479],"valid",[],"NV8"],[[68480,68497],"valid"],[[68498,68504],"disallowed"],[[68505,68508],"valid",[],"NV8"],[[68509,68520],"disallowed"],[[68521,68527],"valid",[],"NV8"],[[68528,68607],"disallowed"],[[68608,68680],"valid"],[[68681,68735],"disallowed"],[[68736,68736],"mapped",[68800]],[[68737,68737],"mapped",[68801]],[[68738,68738],"mapped",[68802]],[[68739,68739],"mapped",[68803]],[[68740,68740],"mapped",[68804]],[[68741,68741],"mapped",[68805]],[[68742,68742],"mapped",[68806]],[[68743,68743],"mapped",[68807]],[[68744,68744],"mapped",[68808]],[[68745,68745],"mapped",[68809]],[[68746,68746],"mapped",[68810]],[[68747,68747],"mapped",[68811]],[[68748,68748],"mapped",[68812]],[[68749,68749],"mapped",[68813]],[[68750,68750],"mapped",[68814]],[[68751,68751],"mapped",[68815]],[[68752,68752],"mapped",[68816]],[[68753,68753],"mapped",[68817]],[[68754,68754],"mapped",[68818]],[[68755,68755],"mapped",[68819]],[[68756,68756],"mapped",[68820]],[[68757,68757],"mapped",[68821]],[[68758,68758],"mapped",[68822]],[[68759,68759],"mapped",[68823]],[[68760,68760],"mapped",[68824]],[[68761,68761],"mapped",[68825]],[[68762,68762],"mapped",[68826]],[[68763,68763],"mapped",[68827]],[[68764,68764],"mapped",[68828]],[[68765,68765],"mapped",[68829]],[[68766,68766],"mapped",[68830]],[[68767,68767],"mapped",[68831]],[[68768,68768],"mapped",[68832]],[[68769,68769],"mapped",[68833]],[[68770,68770],"mapped",[68834]],[[68771,68771],"mapped",[68835]],[[68772,68772],"mapped",[68836]],[[68773,68773],"mapped",[68837]],[[68774,68774],"mapped",[68838]],[[68775,68775],"mapped",[68839]],[[68776,68776],"mapped",[68840]],[[68777,68777],"mapped",[68841]],[[68778,68778],"mapped",[68842]],[[68779,68779],"mapped",[68843]],[[68780,68780],"mapped",[68844]],[[68781,68781],"mapped",[68845]],[[68782,68782],"mapped",[68846]],[[68783,68783],"mapped",[68847]],[[68784,68784],"mapped",[68848]],[[68785,68785],"mapped",[68849]],[[68786,68786],"mapped",[68850]],[[68787,68799],"disallowed"],[[68800,68850],"valid"],[[68851,68857],"disallowed"],[[68858,68863],"valid",[],"NV8"],[[68864,69215],"disallowed"],[[69216,69246],"valid",[],"NV8"],[[69247,69631],"disallowed"],[[69632,69702],"valid"],[[69703,69709],"valid",[],"NV8"],[[69710,69713],"disallowed"],[[69714,69733],"valid",[],"NV8"],[[69734,69743],"valid"],[[69744,69758],"disallowed"],[[69759,69759],"valid"],[[69760,69818],"valid"],[[69819,69820],"valid",[],"NV8"],[[69821,69821],"disallowed"],[[69822,69825],"valid",[],"NV8"],[[69826,69839],"disallowed"],[[69840,69864],"valid"],[[69865,69871],"disallowed"],[[69872,69881],"valid"],[[69882,69887],"disallowed"],[[69888,69940],"valid"],[[69941,69941],"disallowed"],[[69942,69951],"valid"],[[69952,69955],"valid",[],"NV8"],[[69956,69967],"disallowed"],[[69968,70003],"valid"],[[70004,70005],"valid",[],"NV8"],[[70006,70006],"valid"],[[70007,70015],"disallowed"],[[70016,70084],"valid"],[[70085,70088],"valid",[],"NV8"],[[70089,70089],"valid",[],"NV8"],[[70090,70092],"valid"],[[70093,70093],"valid",[],"NV8"],[[70094,70095],"disallowed"],[[70096,70105],"valid"],[[70106,70106],"valid"],[[70107,70107],"valid",[],"NV8"],[[70108,70108],"valid"],[[70109,70111],"valid",[],"NV8"],[[70112,70112],"disallowed"],[[70113,70132],"valid",[],"NV8"],[[70133,70143],"disallowed"],[[70144,70161],"valid"],[[70162,70162],"disallowed"],[[70163,70199],"valid"],[[70200,70205],"valid",[],"NV8"],[[70206,70271],"disallowed"],[[70272,70278],"valid"],[[70279,70279],"disallowed"],[[70280,70280],"valid"],[[70281,70281],"disallowed"],[[70282,70285],"valid"],[[70286,70286],"disallowed"],[[70287,70301],"valid"],[[70302,70302],"disallowed"],[[70303,70312],"valid"],[[70313,70313],"valid",[],"NV8"],[[70314,70319],"disallowed"],[[70320,70378],"valid"],[[70379,70383],"disallowed"],[[70384,70393],"valid"],[[70394,70399],"disallowed"],[[70400,70400],"valid"],[[70401,70403],"valid"],[[70404,70404],"disallowed"],[[70405,70412],"valid"],[[70413,70414],"disallowed"],[[70415,70416],"valid"],[[70417,70418],"disallowed"],[[70419,70440],"valid"],[[70441,70441],"disallowed"],[[70442,70448],"valid"],[[70449,70449],"disallowed"],[[70450,70451],"valid"],[[70452,70452],"disallowed"],[[70453,70457],"valid"],[[70458,70459],"disallowed"],[[70460,70468],"valid"],[[70469,70470],"disallowed"],[[70471,70472],"valid"],[[70473,70474],"disallowed"],[[70475,70477],"valid"],[[70478,70479],"disallowed"],[[70480,70480],"valid"],[[70481,70486],"disallowed"],[[70487,70487],"valid"],[[70488,70492],"disallowed"],[[70493,70499],"valid"],[[70500,70501],"disallowed"],[[70502,70508],"valid"],[[70509,70511],"disallowed"],[[70512,70516],"valid"],[[70517,70783],"disallowed"],[[70784,70853],"valid"],[[70854,70854],"valid",[],"NV8"],[[70855,70855],"valid"],[[70856,70863],"disallowed"],[[70864,70873],"valid"],[[70874,71039],"disallowed"],[[71040,71093],"valid"],[[71094,71095],"disallowed"],[[71096,71104],"valid"],[[71105,71113],"valid",[],"NV8"],[[71114,71127],"valid",[],"NV8"],[[71128,71133],"valid"],[[71134,71167],"disallowed"],[[71168,71232],"valid"],[[71233,71235],"valid",[],"NV8"],[[71236,71236],"valid"],[[71237,71247],"disallowed"],[[71248,71257],"valid"],[[71258,71295],"disallowed"],[[71296,71351],"valid"],[[71352,71359],"disallowed"],[[71360,71369],"valid"],[[71370,71423],"disallowed"],[[71424,71449],"valid"],[[71450,71452],"disallowed"],[[71453,71467],"valid"],[[71468,71471],"disallowed"],[[71472,71481],"valid"],[[71482,71487],"valid",[],"NV8"],[[71488,71839],"disallowed"],[[71840,71840],"mapped",[71872]],[[71841,71841],"mapped",[71873]],[[71842,71842],"mapped",[71874]],[[71843,71843],"mapped",[71875]],[[71844,71844],"mapped",[71876]],[[71845,71845],"mapped",[71877]],[[71846,71846],"mapped",[71878]],[[71847,71847],"mapped",[71879]],[[71848,71848],"mapped",[71880]],[[71849,71849],"mapped",[71881]],[[71850,71850],"mapped",[71882]],[[71851,71851],"mapped",[71883]],[[71852,71852],"mapped",[71884]],[[71853,71853],"mapped",[71885]],[[71854,71854],"mapped",[71886]],[[71855,71855],"mapped",[71887]],[[71856,71856],"mapped",[71888]],[[71857,71857],"mapped",[71889]],[[71858,71858],"mapped",[71890]],[[71859,71859],"mapped",[71891]],[[71860,71860],"mapped",[71892]],[[71861,71861],"mapped",[71893]],[[71862,71862],"mapped",[71894]],[[71863,71863],"mapped",[71895]],[[71864,71864],"mapped",[71896]],[[71865,71865],"mapped",[71897]],[[71866,71866],"mapped",[71898]],[[71867,71867],"mapped",[71899]],[[71868,71868],"mapped",[71900]],[[71869,71869],"mapped",[71901]],[[71870,71870],"mapped",[71902]],[[71871,71871],"mapped",[71903]],[[71872,71913],"valid"],[[71914,71922],"valid",[],"NV8"],[[71923,71934],"disallowed"],[[71935,71935],"valid"],[[71936,72383],"disallowed"],[[72384,72440],"valid"],[[72441,73727],"disallowed"],[[73728,74606],"valid"],[[74607,74648],"valid"],[[74649,74649],"valid"],[[74650,74751],"disallowed"],[[74752,74850],"valid",[],"NV8"],[[74851,74862],"valid",[],"NV8"],[[74863,74863],"disallowed"],[[74864,74867],"valid",[],"NV8"],[[74868,74868],"valid",[],"NV8"],[[74869,74879],"disallowed"],[[74880,75075],"valid"],[[75076,77823],"disallowed"],[[77824,78894],"valid"],[[78895,82943],"disallowed"],[[82944,83526],"valid"],[[83527,92159],"disallowed"],[[92160,92728],"valid"],[[92729,92735],"disallowed"],[[92736,92766],"valid"],[[92767,92767],"disallowed"],[[92768,92777],"valid"],[[92778,92781],"disallowed"],[[92782,92783],"valid",[],"NV8"],[[92784,92879],"disallowed"],[[92880,92909],"valid"],[[92910,92911],"disallowed"],[[92912,92916],"valid"],[[92917,92917],"valid",[],"NV8"],[[92918,92927],"disallowed"],[[92928,92982],"valid"],[[92983,92991],"valid",[],"NV8"],[[92992,92995],"valid"],[[92996,92997],"valid",[],"NV8"],[[92998,93007],"disallowed"],[[93008,93017],"valid"],[[93018,93018],"disallowed"],[[93019,93025],"valid",[],"NV8"],[[93026,93026],"disallowed"],[[93027,93047],"valid"],[[93048,93052],"disallowed"],[[93053,93071],"valid"],[[93072,93951],"disallowed"],[[93952,94020],"valid"],[[94021,94031],"disallowed"],[[94032,94078],"valid"],[[94079,94094],"disallowed"],[[94095,94111],"valid"],[[94112,110591],"disallowed"],[[110592,110593],"valid"],[[110594,113663],"disallowed"],[[113664,113770],"valid"],[[113771,113775],"disallowed"],[[113776,113788],"valid"],[[113789,113791],"disallowed"],[[113792,113800],"valid"],[[113801,113807],"disallowed"],[[113808,113817],"valid"],[[113818,113819],"disallowed"],[[113820,113820],"valid",[],"NV8"],[[113821,113822],"valid"],[[113823,113823],"valid",[],"NV8"],[[113824,113827],"ignored"],[[113828,118783],"disallowed"],[[118784,119029],"valid",[],"NV8"],[[119030,119039],"disallowed"],[[119040,119078],"valid",[],"NV8"],[[119079,119080],"disallowed"],[[119081,119081],"valid",[],"NV8"],[[119082,119133],"valid",[],"NV8"],[[119134,119134],"mapped",[119127,119141]],[[119135,119135],"mapped",[119128,119141]],[[119136,119136],"mapped",[119128,119141,119150]],[[119137,119137],"mapped",[119128,119141,119151]],[[119138,119138],"mapped",[119128,119141,119152]],[[119139,119139],"mapped",[119128,119141,119153]],[[119140,119140],"mapped",[119128,119141,119154]],[[119141,119154],"valid",[],"NV8"],[[119155,119162],"disallowed"],[[119163,119226],"valid",[],"NV8"],[[119227,119227],"mapped",[119225,119141]],[[119228,119228],"mapped",[119226,119141]],[[119229,119229],"mapped",[119225,119141,119150]],[[119230,119230],"mapped",[119226,119141,119150]],[[119231,119231],"mapped",[119225,119141,119151]],[[119232,119232],"mapped",[119226,119141,119151]],[[119233,119261],"valid",[],"NV8"],[[119262,119272],"valid",[],"NV8"],[[119273,119295],"disallowed"],[[119296,119365],"valid",[],"NV8"],[[119366,119551],"disallowed"],[[119552,119638],"valid",[],"NV8"],[[119639,119647],"disallowed"],[[119648,119665],"valid",[],"NV8"],[[119666,119807],"disallowed"],[[119808,119808],"mapped",[97]],[[119809,119809],"mapped",[98]],[[119810,119810],"mapped",[99]],[[119811,119811],"mapped",[100]],[[119812,119812],"mapped",[101]],[[119813,119813],"mapped",[102]],[[119814,119814],"mapped",[103]],[[119815,119815],"mapped",[104]],[[119816,119816],"mapped",[105]],[[119817,119817],"mapped",[106]],[[119818,119818],"mapped",[107]],[[119819,119819],"mapped",[108]],[[119820,119820],"mapped",[109]],[[119821,119821],"mapped",[110]],[[119822,119822],"mapped",[111]],[[119823,119823],"mapped",[112]],[[119824,119824],"mapped",[113]],[[119825,119825],"mapped",[114]],[[119826,119826],"mapped",[115]],[[119827,119827],"mapped",[116]],[[119828,119828],"mapped",[117]],[[119829,119829],"mapped",[118]],[[119830,119830],"mapped",[119]],[[119831,119831],"mapped",[120]],[[119832,119832],"mapped",[121]],[[119833,119833],"mapped",[122]],[[119834,119834],"mapped",[97]],[[119835,119835],"mapped",[98]],[[119836,119836],"mapped",[99]],[[119837,119837],"mapped",[100]],[[119838,119838],"mapped",[101]],[[119839,119839],"mapped",[102]],[[119840,119840],"mapped",[103]],[[119841,119841],"mapped",[104]],[[119842,119842],"mapped",[105]],[[119843,119843],"mapped",[106]],[[119844,119844],"mapped",[107]],[[119845,119845],"mapped",[108]],[[119846,119846],"mapped",[109]],[[119847,119847],"mapped",[110]],[[119848,119848],"mapped",[111]],[[119849,119849],"mapped",[112]],[[119850,119850],"mapped",[113]],[[119851,119851],"mapped",[114]],[[119852,119852],"mapped",[115]],[[119853,119853],"mapped",[116]],[[119854,119854],"mapped",[117]],[[119855,119855],"mapped",[118]],[[119856,119856],"mapped",[119]],[[119857,119857],"mapped",[120]],[[119858,119858],"mapped",[121]],[[119859,119859],"mapped",[122]],[[119860,119860],"mapped",[97]],[[119861,119861],"mapped",[98]],[[119862,119862],"mapped",[99]],[[119863,119863],"mapped",[100]],[[119864,119864],"mapped",[101]],[[119865,119865],"mapped",[102]],[[119866,119866],"mapped",[103]],[[119867,119867],"mapped",[104]],[[119868,119868],"mapped",[105]],[[119869,119869],"mapped",[106]],[[119870,119870],"mapped",[107]],[[119871,119871],"mapped",[108]],[[119872,119872],"mapped",[109]],[[119873,119873],"mapped",[110]],[[119874,119874],"mapped",[111]],[[119875,119875],"mapped",[112]],[[119876,119876],"mapped",[113]],[[119877,119877],"mapped",[114]],[[119878,119878],"mapped",[115]],[[119879,119879],"mapped",[116]],[[119880,119880],"mapped",[117]],[[119881,119881],"mapped",[118]],[[119882,119882],"mapped",[119]],[[119883,119883],"mapped",[120]],[[119884,119884],"mapped",[121]],[[119885,119885],"mapped",[122]],[[119886,119886],"mapped",[97]],[[119887,119887],"mapped",[98]],[[119888,119888],"mapped",[99]],[[119889,119889],"mapped",[100]],[[119890,119890],"mapped",[101]],[[119891,119891],"mapped",[102]],[[119892,119892],"mapped",[103]],[[119893,119893],"disallowed"],[[119894,119894],"mapped",[105]],[[119895,119895],"mapped",[106]],[[119896,119896],"mapped",[107]],[[119897,119897],"mapped",[108]],[[119898,119898],"mapped",[109]],[[119899,119899],"mapped",[110]],[[119900,119900],"mapped",[111]],[[119901,119901],"mapped",[112]],[[119902,119902],"mapped",[113]],[[119903,119903],"mapped",[114]],[[119904,119904],"mapped",[115]],[[119905,119905],"mapped",[116]],[[119906,119906],"mapped",[117]],[[119907,119907],"mapped",[118]],[[119908,119908],"mapped",[119]],[[119909,119909],"mapped",[120]],[[119910,119910],"mapped",[121]],[[119911,119911],"mapped",[122]],[[119912,119912],"mapped",[97]],[[119913,119913],"mapped",[98]],[[119914,119914],"mapped",[99]],[[119915,119915],"mapped",[100]],[[119916,119916],"mapped",[101]],[[119917,119917],"mapped",[102]],[[119918,119918],"mapped",[103]],[[119919,119919],"mapped",[104]],[[119920,119920],"mapped",[105]],[[119921,119921],"mapped",[106]],[[119922,119922],"mapped",[107]],[[119923,119923],"mapped",[108]],[[119924,119924],"mapped",[109]],[[119925,119925],"mapped",[110]],[[119926,119926],"mapped",[111]],[[119927,119927],"mapped",[112]],[[119928,119928],"mapped",[113]],[[119929,119929],"mapped",[114]],[[119930,119930],"mapped",[115]],[[119931,119931],"mapped",[116]],[[119932,119932],"mapped",[117]],[[119933,119933],"mapped",[118]],[[119934,119934],"mapped",[119]],[[119935,119935],"mapped",[120]],[[119936,119936],"mapped",[121]],[[119937,119937],"mapped",[122]],[[119938,119938],"mapped",[97]],[[119939,119939],"mapped",[98]],[[119940,119940],"mapped",[99]],[[119941,119941],"mapped",[100]],[[119942,119942],"mapped",[101]],[[119943,119943],"mapped",[102]],[[119944,119944],"mapped",[103]],[[119945,119945],"mapped",[104]],[[119946,119946],"mapped",[105]],[[119947,119947],"mapped",[106]],[[119948,119948],"mapped",[107]],[[119949,119949],"mapped",[108]],[[119950,119950],"mapped",[109]],[[119951,119951],"mapped",[110]],[[119952,119952],"mapped",[111]],[[119953,119953],"mapped",[112]],[[119954,119954],"mapped",[113]],[[119955,119955],"mapped",[114]],[[119956,119956],"mapped",[115]],[[119957,119957],"mapped",[116]],[[119958,119958],"mapped",[117]],[[119959,119959],"mapped",[118]],[[119960,119960],"mapped",[119]],[[119961,119961],"mapped",[120]],[[119962,119962],"mapped",[121]],[[119963,119963],"mapped",[122]],[[119964,119964],"mapped",[97]],[[119965,119965],"disallowed"],[[119966,119966],"mapped",[99]],[[119967,119967],"mapped",[100]],[[119968,119969],"disallowed"],[[119970,119970],"mapped",[103]],[[119971,119972],"disallowed"],[[119973,119973],"mapped",[106]],[[119974,119974],"mapped",[107]],[[119975,119976],"disallowed"],[[119977,119977],"mapped",[110]],[[119978,119978],"mapped",[111]],[[119979,119979],"mapped",[112]],[[119980,119980],"mapped",[113]],[[119981,119981],"disallowed"],[[119982,119982],"mapped",[115]],[[119983,119983],"mapped",[116]],[[119984,119984],"mapped",[117]],[[119985,119985],"mapped",[118]],[[119986,119986],"mapped",[119]],[[119987,119987],"mapped",[120]],[[119988,119988],"mapped",[121]],[[119989,119989],"mapped",[122]],[[119990,119990],"mapped",[97]],[[119991,119991],"mapped",[98]],[[119992,119992],"mapped",[99]],[[119993,119993],"mapped",[100]],[[119994,119994],"disallowed"],[[119995,119995],"mapped",[102]],[[119996,119996],"disallowed"],[[119997,119997],"mapped",[104]],[[119998,119998],"mapped",[105]],[[119999,119999],"mapped",[106]],[[120000,120000],"mapped",[107]],[[120001,120001],"mapped",[108]],[[120002,120002],"mapped",[109]],[[120003,120003],"mapped",[110]],[[120004,120004],"disallowed"],[[120005,120005],"mapped",[112]],[[120006,120006],"mapped",[113]],[[120007,120007],"mapped",[114]],[[120008,120008],"mapped",[115]],[[120009,120009],"mapped",[116]],[[120010,120010],"mapped",[117]],[[120011,120011],"mapped",[118]],[[120012,120012],"mapped",[119]],[[120013,120013],"mapped",[120]],[[120014,120014],"mapped",[121]],[[120015,120015],"mapped",[122]],[[120016,120016],"mapped",[97]],[[120017,120017],"mapped",[98]],[[120018,120018],"mapped",[99]],[[120019,120019],"mapped",[100]],[[120020,120020],"mapped",[101]],[[120021,120021],"mapped",[102]],[[120022,120022],"mapped",[103]],[[120023,120023],"mapped",[104]],[[120024,120024],"mapped",[105]],[[120025,120025],"mapped",[106]],[[120026,120026],"mapped",[107]],[[120027,120027],"mapped",[108]],[[120028,120028],"mapped",[109]],[[120029,120029],"mapped",[110]],[[120030,120030],"mapped",[111]],[[120031,120031],"mapped",[112]],[[120032,120032],"mapped",[113]],[[120033,120033],"mapped",[114]],[[120034,120034],"mapped",[115]],[[120035,120035],"mapped",[116]],[[120036,120036],"mapped",[117]],[[120037,120037],"mapped",[118]],[[120038,120038],"mapped",[119]],[[120039,120039],"mapped",[120]],[[120040,120040],"mapped",[121]],[[120041,120041],"mapped",[122]],[[120042,120042],"mapped",[97]],[[120043,120043],"mapped",[98]],[[120044,120044],"mapped",[99]],[[120045,120045],"mapped",[100]],[[120046,120046],"mapped",[101]],[[120047,120047],"mapped",[102]],[[120048,120048],"mapped",[103]],[[120049,120049],"mapped",[104]],[[120050,120050],"mapped",[105]],[[120051,120051],"mapped",[106]],[[120052,120052],"mapped",[107]],[[120053,120053],"mapped",[108]],[[120054,120054],"mapped",[109]],[[120055,120055],"mapped",[110]],[[120056,120056],"mapped",[111]],[[120057,120057],"mapped",[112]],[[120058,120058],"mapped",[113]],[[120059,120059],"mapped",[114]],[[120060,120060],"mapped",[115]],[[120061,120061],"mapped",[116]],[[120062,120062],"mapped",[117]],[[120063,120063],"mapped",[118]],[[120064,120064],"mapped",[119]],[[120065,120065],"mapped",[120]],[[120066,120066],"mapped",[121]],[[120067,120067],"mapped",[122]],[[120068,120068],"mapped",[97]],[[120069,120069],"mapped",[98]],[[120070,120070],"disallowed"],[[120071,120071],"mapped",[100]],[[120072,120072],"mapped",[101]],[[120073,120073],"mapped",[102]],[[120074,120074],"mapped",[103]],[[120075,120076],"disallowed"],[[120077,120077],"mapped",[106]],[[120078,120078],"mapped",[107]],[[120079,120079],"mapped",[108]],[[120080,120080],"mapped",[109]],[[120081,120081],"mapped",[110]],[[120082,120082],"mapped",[111]],[[120083,120083],"mapped",[112]],[[120084,120084],"mapped",[113]],[[120085,120085],"disallowed"],[[120086,120086],"mapped",[115]],[[120087,120087],"mapped",[116]],[[120088,120088],"mapped",[117]],[[120089,120089],"mapped",[118]],[[120090,120090],"mapped",[119]],[[120091,120091],"mapped",[120]],[[120092,120092],"mapped",[121]],[[120093,120093],"disallowed"],[[120094,120094],"mapped",[97]],[[120095,120095],"mapped",[98]],[[120096,120096],"mapped",[99]],[[120097,120097],"mapped",[100]],[[120098,120098],"mapped",[101]],[[120099,120099],"mapped",[102]],[[120100,120100],"mapped",[103]],[[120101,120101],"mapped",[104]],[[120102,120102],"mapped",[105]],[[120103,120103],"mapped",[106]],[[120104,120104],"mapped",[107]],[[120105,120105],"mapped",[108]],[[120106,120106],"mapped",[109]],[[120107,120107],"mapped",[110]],[[120108,120108],"mapped",[111]],[[120109,120109],"mapped",[112]],[[120110,120110],"mapped",[113]],[[120111,120111],"mapped",[114]],[[120112,120112],"mapped",[115]],[[120113,120113],"mapped",[116]],[[120114,120114],"mapped",[117]],[[120115,120115],"mapped",[118]],[[120116,120116],"mapped",[119]],[[120117,120117],"mapped",[120]],[[120118,120118],"mapped",[121]],[[120119,120119],"mapped",[122]],[[120120,120120],"mapped",[97]],[[120121,120121],"mapped",[98]],[[120122,120122],"disallowed"],[[120123,120123],"mapped",[100]],[[120124,120124],"mapped",[101]],[[120125,120125],"mapped",[102]],[[120126,120126],"mapped",[103]],[[120127,120127],"disallowed"],[[120128,120128],"mapped",[105]],[[120129,120129],"mapped",[106]],[[120130,120130],"mapped",[107]],[[120131,120131],"mapped",[108]],[[120132,120132],"mapped",[109]],[[120133,120133],"disallowed"],[[120134,120134],"mapped",[111]],[[120135,120137],"disallowed"],[[120138,120138],"mapped",[115]],[[120139,120139],"mapped",[116]],[[120140,120140],"mapped",[117]],[[120141,120141],"mapped",[118]],[[120142,120142],"mapped",[119]],[[120143,120143],"mapped",[120]],[[120144,120144],"mapped",[121]],[[120145,120145],"disallowed"],[[120146,120146],"mapped",[97]],[[120147,120147],"mapped",[98]],[[120148,120148],"mapped",[99]],[[120149,120149],"mapped",[100]],[[120150,120150],"mapped",[101]],[[120151,120151],"mapped",[102]],[[120152,120152],"mapped",[103]],[[120153,120153],"mapped",[104]],[[120154,120154],"mapped",[105]],[[120155,120155],"mapped",[106]],[[120156,120156],"mapped",[107]],[[120157,120157],"mapped",[108]],[[120158,120158],"mapped",[109]],[[120159,120159],"mapped",[110]],[[120160,120160],"mapped",[111]],[[120161,120161],"mapped",[112]],[[120162,120162],"mapped",[113]],[[120163,120163],"mapped",[114]],[[120164,120164],"mapped",[115]],[[120165,120165],"mapped",[116]],[[120166,120166],"mapped",[117]],[[120167,120167],"mapped",[118]],[[120168,120168],"mapped",[119]],[[120169,120169],"mapped",[120]],[[120170,120170],"mapped",[121]],[[120171,120171],"mapped",[122]],[[120172,120172],"mapped",[97]],[[120173,120173],"mapped",[98]],[[120174,120174],"mapped",[99]],[[120175,120175],"mapped",[100]],[[120176,120176],"mapped",[101]],[[120177,120177],"mapped",[102]],[[120178,120178],"mapped",[103]],[[120179,120179],"mapped",[104]],[[120180,120180],"mapped",[105]],[[120181,120181],"mapped",[106]],[[120182,120182],"mapped",[107]],[[120183,120183],"mapped",[108]],[[120184,120184],"mapped",[109]],[[120185,120185],"mapped",[110]],[[120186,120186],"mapped",[111]],[[120187,120187],"mapped",[112]],[[120188,120188],"mapped",[113]],[[120189,120189],"mapped",[114]],[[120190,120190],"mapped",[115]],[[120191,120191],"mapped",[116]],[[120192,120192],"mapped",[117]],[[120193,120193],"mapped",[118]],[[120194,120194],"mapped",[119]],[[120195,120195],"mapped",[120]],[[120196,120196],"mapped",[121]],[[120197,120197],"mapped",[122]],[[120198,120198],"mapped",[97]],[[120199,120199],"mapped",[98]],[[120200,120200],"mapped",[99]],[[120201,120201],"mapped",[100]],[[120202,120202],"mapped",[101]],[[120203,120203],"mapped",[102]],[[120204,120204],"mapped",[103]],[[120205,120205],"mapped",[104]],[[120206,120206],"mapped",[105]],[[120207,120207],"mapped",[106]],[[120208,120208],"mapped",[107]],[[120209,120209],"mapped",[108]],[[120210,120210],"mapped",[109]],[[120211,120211],"mapped",[110]],[[120212,120212],"mapped",[111]],[[120213,120213],"mapped",[112]],[[120214,120214],"mapped",[113]],[[120215,120215],"mapped",[114]],[[120216,120216],"mapped",[115]],[[120217,120217],"mapped",[116]],[[120218,120218],"mapped",[117]],[[120219,120219],"mapped",[118]],[[120220,120220],"mapped",[119]],[[120221,120221],"mapped",[120]],[[120222,120222],"mapped",[121]],[[120223,120223],"mapped",[122]],[[120224,120224],"mapped",[97]],[[120225,120225],"mapped",[98]],[[120226,120226],"mapped",[99]],[[120227,120227],"mapped",[100]],[[120228,120228],"mapped",[101]],[[120229,120229],"mapped",[102]],[[120230,120230],"mapped",[103]],[[120231,120231],"mapped",[104]],[[120232,120232],"mapped",[105]],[[120233,120233],"mapped",[106]],[[120234,120234],"mapped",[107]],[[120235,120235],"mapped",[108]],[[120236,120236],"mapped",[109]],[[120237,120237],"mapped",[110]],[[120238,120238],"mapped",[111]],[[120239,120239],"mapped",[112]],[[120240,120240],"mapped",[113]],[[120241,120241],"mapped",[114]],[[120242,120242],"mapped",[115]],[[120243,120243],"mapped",[116]],[[120244,120244],"mapped",[117]],[[120245,120245],"mapped",[118]],[[120246,120246],"mapped",[119]],[[120247,120247],"mapped",[120]],[[120248,120248],"mapped",[121]],[[120249,120249],"mapped",[122]],[[120250,120250],"mapped",[97]],[[120251,120251],"mapped",[98]],[[120252,120252],"mapped",[99]],[[120253,120253],"mapped",[100]],[[120254,120254],"mapped",[101]],[[120255,120255],"mapped",[102]],[[120256,120256],"mapped",[103]],[[120257,120257],"mapped",[104]],[[120258,120258],"mapped",[105]],[[120259,120259],"mapped",[106]],[[120260,120260],"mapped",[107]],[[120261,120261],"mapped",[108]],[[120262,120262],"mapped",[109]],[[120263,120263],"mapped",[110]],[[120264,120264],"mapped",[111]],[[120265,120265],"mapped",[112]],[[120266,120266],"mapped",[113]],[[120267,120267],"mapped",[114]],[[120268,120268],"mapped",[115]],[[120269,120269],"mapped",[116]],[[120270,120270],"mapped",[117]],[[120271,120271],"mapped",[118]],[[120272,120272],"mapped",[119]],[[120273,120273],"mapped",[120]],[[120274,120274],"mapped",[121]],[[120275,120275],"mapped",[122]],[[120276,120276],"mapped",[97]],[[120277,120277],"mapped",[98]],[[120278,120278],"mapped",[99]],[[120279,120279],"mapped",[100]],[[120280,120280],"mapped",[101]],[[120281,120281],"mapped",[102]],[[120282,120282],"mapped",[103]],[[120283,120283],"mapped",[104]],[[120284,120284],"mapped",[105]],[[120285,120285],"mapped",[106]],[[120286,120286],"mapped",[107]],[[120287,120287],"mapped",[108]],[[120288,120288],"mapped",[109]],[[120289,120289],"mapped",[110]],[[120290,120290],"mapped",[111]],[[120291,120291],"mapped",[112]],[[120292,120292],"mapped",[113]],[[120293,120293],"mapped",[114]],[[120294,120294],"mapped",[115]],[[120295,120295],"mapped",[116]],[[120296,120296],"mapped",[117]],[[120297,120297],"mapped",[118]],[[120298,120298],"mapped",[119]],[[120299,120299],"mapped",[120]],[[120300,120300],"mapped",[121]],[[120301,120301],"mapped",[122]],[[120302,120302],"mapped",[97]],[[120303,120303],"mapped",[98]],[[120304,120304],"mapped",[99]],[[120305,120305],"mapped",[100]],[[120306,120306],"mapped",[101]],[[120307,120307],"mapped",[102]],[[120308,120308],"mapped",[103]],[[120309,120309],"mapped",[104]],[[120310,120310],"mapped",[105]],[[120311,120311],"mapped",[106]],[[120312,120312],"mapped",[107]],[[120313,120313],"mapped",[108]],[[120314,120314],"mapped",[109]],[[120315,120315],"mapped",[110]],[[120316,120316],"mapped",[111]],[[120317,120317],"mapped",[112]],[[120318,120318],"mapped",[113]],[[120319,120319],"mapped",[114]],[[120320,120320],"mapped",[115]],[[120321,120321],"mapped",[116]],[[120322,120322],"mapped",[117]],[[120323,120323],"mapped",[118]],[[120324,120324],"mapped",[119]],[[120325,120325],"mapped",[120]],[[120326,120326],"mapped",[121]],[[120327,120327],"mapped",[122]],[[120328,120328],"mapped",[97]],[[120329,120329],"mapped",[98]],[[120330,120330],"mapped",[99]],[[120331,120331],"mapped",[100]],[[120332,120332],"mapped",[101]],[[120333,120333],"mapped",[102]],[[120334,120334],"mapped",[103]],[[120335,120335],"mapped",[104]],[[120336,120336],"mapped",[105]],[[120337,120337],"mapped",[106]],[[120338,120338],"mapped",[107]],[[120339,120339],"mapped",[108]],[[120340,120340],"mapped",[109]],[[120341,120341],"mapped",[110]],[[120342,120342],"mapped",[111]],[[120343,120343],"mapped",[112]],[[120344,120344],"mapped",[113]],[[120345,120345],"mapped",[114]],[[120346,120346],"mapped",[115]],[[120347,120347],"mapped",[116]],[[120348,120348],"mapped",[117]],[[120349,120349],"mapped",[118]],[[120350,120350],"mapped",[119]],[[120351,120351],"mapped",[120]],[[120352,120352],"mapped",[121]],[[120353,120353],"mapped",[122]],[[120354,120354],"mapped",[97]],[[120355,120355],"mapped",[98]],[[120356,120356],"mapped",[99]],[[120357,120357],"mapped",[100]],[[120358,120358],"mapped",[101]],[[120359,120359],"mapped",[102]],[[120360,120360],"mapped",[103]],[[120361,120361],"mapped",[104]],[[120362,120362],"mapped",[105]],[[120363,120363],"mapped",[106]],[[120364,120364],"mapped",[107]],[[120365,120365],"mapped",[108]],[[120366,120366],"mapped",[109]],[[120367,120367],"mapped",[110]],[[120368,120368],"mapped",[111]],[[120369,120369],"mapped",[112]],[[120370,120370],"mapped",[113]],[[120371,120371],"mapped",[114]],[[120372,120372],"mapped",[115]],[[120373,120373],"mapped",[116]],[[120374,120374],"mapped",[117]],[[120375,120375],"mapped",[118]],[[120376,120376],"mapped",[119]],[[120377,120377],"mapped",[120]],[[120378,120378],"mapped",[121]],[[120379,120379],"mapped",[122]],[[120380,120380],"mapped",[97]],[[120381,120381],"mapped",[98]],[[120382,120382],"mapped",[99]],[[120383,120383],"mapped",[100]],[[120384,120384],"mapped",[101]],[[120385,120385],"mapped",[102]],[[120386,120386],"mapped",[103]],[[120387,120387],"mapped",[104]],[[120388,120388],"mapped",[105]],[[120389,120389],"mapped",[106]],[[120390,120390],"mapped",[107]],[[120391,120391],"mapped",[108]],[[120392,120392],"mapped",[109]],[[120393,120393],"mapped",[110]],[[120394,120394],"mapped",[111]],[[120395,120395],"mapped",[112]],[[120396,120396],"mapped",[113]],[[120397,120397],"mapped",[114]],[[120398,120398],"mapped",[115]],[[120399,120399],"mapped",[116]],[[120400,120400],"mapped",[117]],[[120401,120401],"mapped",[118]],[[120402,120402],"mapped",[119]],[[120403,120403],"mapped",[120]],[[120404,120404],"mapped",[121]],[[120405,120405],"mapped",[122]],[[120406,120406],"mapped",[97]],[[120407,120407],"mapped",[98]],[[120408,120408],"mapped",[99]],[[120409,120409],"mapped",[100]],[[120410,120410],"mapped",[101]],[[120411,120411],"mapped",[102]],[[120412,120412],"mapped",[103]],[[120413,120413],"mapped",[104]],[[120414,120414],"mapped",[105]],[[120415,120415],"mapped",[106]],[[120416,120416],"mapped",[107]],[[120417,120417],"mapped",[108]],[[120418,120418],"mapped",[109]],[[120419,120419],"mapped",[110]],[[120420,120420],"mapped",[111]],[[120421,120421],"mapped",[112]],[[120422,120422],"mapped",[113]],[[120423,120423],"mapped",[114]],[[120424,120424],"mapped",[115]],[[120425,120425],"mapped",[116]],[[120426,120426],"mapped",[117]],[[120427,120427],"mapped",[118]],[[120428,120428],"mapped",[119]],[[120429,120429],"mapped",[120]],[[120430,120430],"mapped",[121]],[[120431,120431],"mapped",[122]],[[120432,120432],"mapped",[97]],[[120433,120433],"mapped",[98]],[[120434,120434],"mapped",[99]],[[120435,120435],"mapped",[100]],[[120436,120436],"mapped",[101]],[[120437,120437],"mapped",[102]],[[120438,120438],"mapped",[103]],[[120439,120439],"mapped",[104]],[[120440,120440],"mapped",[105]],[[120441,120441],"mapped",[106]],[[120442,120442],"mapped",[107]],[[120443,120443],"mapped",[108]],[[120444,120444],"mapped",[109]],[[120445,120445],"mapped",[110]],[[120446,120446],"mapped",[111]],[[120447,120447],"mapped",[112]],[[120448,120448],"mapped",[113]],[[120449,120449],"mapped",[114]],[[120450,120450],"mapped",[115]],[[120451,120451],"mapped",[116]],[[120452,120452],"mapped",[117]],[[120453,120453],"mapped",[118]],[[120454,120454],"mapped",[119]],[[120455,120455],"mapped",[120]],[[120456,120456],"mapped",[121]],[[120457,120457],"mapped",[122]],[[120458,120458],"mapped",[97]],[[120459,120459],"mapped",[98]],[[120460,120460],"mapped",[99]],[[120461,120461],"mapped",[100]],[[120462,120462],"mapped",[101]],[[120463,120463],"mapped",[102]],[[120464,120464],"mapped",[103]],[[120465,120465],"mapped",[104]],[[120466,120466],"mapped",[105]],[[120467,120467],"mapped",[106]],[[120468,120468],"mapped",[107]],[[120469,120469],"mapped",[108]],[[120470,120470],"mapped",[109]],[[120471,120471],"mapped",[110]],[[120472,120472],"mapped",[111]],[[120473,120473],"mapped",[112]],[[120474,120474],"mapped",[113]],[[120475,120475],"mapped",[114]],[[120476,120476],"mapped",[115]],[[120477,120477],"mapped",[116]],[[120478,120478],"mapped",[117]],[[120479,120479],"mapped",[118]],[[120480,120480],"mapped",[119]],[[120481,120481],"mapped",[120]],[[120482,120482],"mapped",[121]],[[120483,120483],"mapped",[122]],[[120484,120484],"mapped",[305]],[[120485,120485],"mapped",[567]],[[120486,120487],"disallowed"],[[120488,120488],"mapped",[945]],[[120489,120489],"mapped",[946]],[[120490,120490],"mapped",[947]],[[120491,120491],"mapped",[948]],[[120492,120492],"mapped",[949]],[[120493,120493],"mapped",[950]],[[120494,120494],"mapped",[951]],[[120495,120495],"mapped",[952]],[[120496,120496],"mapped",[953]],[[120497,120497],"mapped",[954]],[[120498,120498],"mapped",[955]],[[120499,120499],"mapped",[956]],[[120500,120500],"mapped",[957]],[[120501,120501],"mapped",[958]],[[120502,120502],"mapped",[959]],[[120503,120503],"mapped",[960]],[[120504,120504],"mapped",[961]],[[120505,120505],"mapped",[952]],[[120506,120506],"mapped",[963]],[[120507,120507],"mapped",[964]],[[120508,120508],"mapped",[965]],[[120509,120509],"mapped",[966]],[[120510,120510],"mapped",[967]],[[120511,120511],"mapped",[968]],[[120512,120512],"mapped",[969]],[[120513,120513],"mapped",[8711]],[[120514,120514],"mapped",[945]],[[120515,120515],"mapped",[946]],[[120516,120516],"mapped",[947]],[[120517,120517],"mapped",[948]],[[120518,120518],"mapped",[949]],[[120519,120519],"mapped",[950]],[[120520,120520],"mapped",[951]],[[120521,120521],"mapped",[952]],[[120522,120522],"mapped",[953]],[[120523,120523],"mapped",[954]],[[120524,120524],"mapped",[955]],[[120525,120525],"mapped",[956]],[[120526,120526],"mapped",[957]],[[120527,120527],"mapped",[958]],[[120528,120528],"mapped",[959]],[[120529,120529],"mapped",[960]],[[120530,120530],"mapped",[961]],[[120531,120532],"mapped",[963]],[[120533,120533],"mapped",[964]],[[120534,120534],"mapped",[965]],[[120535,120535],"mapped",[966]],[[120536,120536],"mapped",[967]],[[120537,120537],"mapped",[968]],[[120538,120538],"mapped",[969]],[[120539,120539],"mapped",[8706]],[[120540,120540],"mapped",[949]],[[120541,120541],"mapped",[952]],[[120542,120542],"mapped",[954]],[[120543,120543],"mapped",[966]],[[120544,120544],"mapped",[961]],[[120545,120545],"mapped",[960]],[[120546,120546],"mapped",[945]],[[120547,120547],"mapped",[946]],[[120548,120548],"mapped",[947]],[[120549,120549],"mapped",[948]],[[120550,120550],"mapped",[949]],[[120551,120551],"mapped",[950]],[[120552,120552],"mapped",[951]],[[120553,120553],"mapped",[952]],[[120554,120554],"mapped",[953]],[[120555,120555],"mapped",[954]],[[120556,120556],"mapped",[955]],[[120557,120557],"mapped",[956]],[[120558,120558],"mapped",[957]],[[120559,120559],"mapped",[958]],[[120560,120560],"mapped",[959]],[[120561,120561],"mapped",[960]],[[120562,120562],"mapped",[961]],[[120563,120563],"mapped",[952]],[[120564,120564],"mapped",[963]],[[120565,120565],"mapped",[964]],[[120566,120566],"mapped",[965]],[[120567,120567],"mapped",[966]],[[120568,120568],"mapped",[967]],[[120569,120569],"mapped",[968]],[[120570,120570],"mapped",[969]],[[120571,120571],"mapped",[8711]],[[120572,120572],"mapped",[945]],[[120573,120573],"mapped",[946]],[[120574,120574],"mapped",[947]],[[120575,120575],"mapped",[948]],[[120576,120576],"mapped",[949]],[[120577,120577],"mapped",[950]],[[120578,120578],"mapped",[951]],[[120579,120579],"mapped",[952]],[[120580,120580],"mapped",[953]],[[120581,120581],"mapped",[954]],[[120582,120582],"mapped",[955]],[[120583,120583],"mapped",[956]],[[120584,120584],"mapped",[957]],[[120585,120585],"mapped",[958]],[[120586,120586],"mapped",[959]],[[120587,120587],"mapped",[960]],[[120588,120588],"mapped",[961]],[[120589,120590],"mapped",[963]],[[120591,120591],"mapped",[964]],[[120592,120592],"mapped",[965]],[[120593,120593],"mapped",[966]],[[120594,120594],"mapped",[967]],[[120595,120595],"mapped",[968]],[[120596,120596],"mapped",[969]],[[120597,120597],"mapped",[8706]],[[120598,120598],"mapped",[949]],[[120599,120599],"mapped",[952]],[[120600,120600],"mapped",[954]],[[120601,120601],"mapped",[966]],[[120602,120602],"mapped",[961]],[[120603,120603],"mapped",[960]],[[120604,120604],"mapped",[945]],[[120605,120605],"mapped",[946]],[[120606,120606],"mapped",[947]],[[120607,120607],"mapped",[948]],[[120608,120608],"mapped",[949]],[[120609,120609],"mapped",[950]],[[120610,120610],"mapped",[951]],[[120611,120611],"mapped",[952]],[[120612,120612],"mapped",[953]],[[120613,120613],"mapped",[954]],[[120614,120614],"mapped",[955]],[[120615,120615],"mapped",[956]],[[120616,120616],"mapped",[957]],[[120617,120617],"mapped",[958]],[[120618,120618],"mapped",[959]],[[120619,120619],"mapped",[960]],[[120620,120620],"mapped",[961]],[[120621,120621],"mapped",[952]],[[120622,120622],"mapped",[963]],[[120623,120623],"mapped",[964]],[[120624,120624],"mapped",[965]],[[120625,120625],"mapped",[966]],[[120626,120626],"mapped",[967]],[[120627,120627],"mapped",[968]],[[120628,120628],"mapped",[969]],[[120629,120629],"mapped",[8711]],[[120630,120630],"mapped",[945]],[[120631,120631],"mapped",[946]],[[120632,120632],"mapped",[947]],[[120633,120633],"mapped",[948]],[[120634,120634],"mapped",[949]],[[120635,120635],"mapped",[950]],[[120636,120636],"mapped",[951]],[[120637,120637],"mapped",[952]],[[120638,120638],"mapped",[953]],[[120639,120639],"mapped",[954]],[[120640,120640],"mapped",[955]],[[120641,120641],"mapped",[956]],[[120642,120642],"mapped",[957]],[[120643,120643],"mapped",[958]],[[120644,120644],"mapped",[959]],[[120645,120645],"mapped",[960]],[[120646,120646],"mapped",[961]],[[120647,120648],"mapped",[963]],[[120649,120649],"mapped",[964]],[[120650,120650],"mapped",[965]],[[120651,120651],"mapped",[966]],[[120652,120652],"mapped",[967]],[[120653,120653],"mapped",[968]],[[120654,120654],"mapped",[969]],[[120655,120655],"mapped",[8706]],[[120656,120656],"mapped",[949]],[[120657,120657],"mapped",[952]],[[120658,120658],"mapped",[954]],[[120659,120659],"mapped",[966]],[[120660,120660],"mapped",[961]],[[120661,120661],"mapped",[960]],[[120662,120662],"mapped",[945]],[[120663,120663],"mapped",[946]],[[120664,120664],"mapped",[947]],[[120665,120665],"mapped",[948]],[[120666,120666],"mapped",[949]],[[120667,120667],"mapped",[950]],[[120668,120668],"mapped",[951]],[[120669,120669],"mapped",[952]],[[120670,120670],"mapped",[953]],[[120671,120671],"mapped",[954]],[[120672,120672],"mapped",[955]],[[120673,120673],"mapped",[956]],[[120674,120674],"mapped",[957]],[[120675,120675],"mapped",[958]],[[120676,120676],"mapped",[959]],[[120677,120677],"mapped",[960]],[[120678,120678],"mapped",[961]],[[120679,120679],"mapped",[952]],[[120680,120680],"mapped",[963]],[[120681,120681],"mapped",[964]],[[120682,120682],"mapped",[965]],[[120683,120683],"mapped",[966]],[[120684,120684],"mapped",[967]],[[120685,120685],"mapped",[968]],[[120686,120686],"mapped",[969]],[[120687,120687],"mapped",[8711]],[[120688,120688],"mapped",[945]],[[120689,120689],"mapped",[946]],[[120690,120690],"mapped",[947]],[[120691,120691],"mapped",[948]],[[120692,120692],"mapped",[949]],[[120693,120693],"mapped",[950]],[[120694,120694],"mapped",[951]],[[120695,120695],"mapped",[952]],[[120696,120696],"mapped",[953]],[[120697,120697],"mapped",[954]],[[120698,120698],"mapped",[955]],[[120699,120699],"mapped",[956]],[[120700,120700],"mapped",[957]],[[120701,120701],"mapped",[958]],[[120702,120702],"mapped",[959]],[[120703,120703],"mapped",[960]],[[120704,120704],"mapped",[961]],[[120705,120706],"mapped",[963]],[[120707,120707],"mapped",[964]],[[120708,120708],"mapped",[965]],[[120709,120709],"mapped",[966]],[[120710,120710],"mapped",[967]],[[120711,120711],"mapped",[968]],[[120712,120712],"mapped",[969]],[[120713,120713],"mapped",[8706]],[[120714,120714],"mapped",[949]],[[120715,120715],"mapped",[952]],[[120716,120716],"mapped",[954]],[[120717,120717],"mapped",[966]],[[120718,120718],"mapped",[961]],[[120719,120719],"mapped",[960]],[[120720,120720],"mapped",[945]],[[120721,120721],"mapped",[946]],[[120722,120722],"mapped",[947]],[[120723,120723],"mapped",[948]],[[120724,120724],"mapped",[949]],[[120725,120725],"mapped",[950]],[[120726,120726],"mapped",[951]],[[120727,120727],"mapped",[952]],[[120728,120728],"mapped",[953]],[[120729,120729],"mapped",[954]],[[120730,120730],"mapped",[955]],[[120731,120731],"mapped",[956]],[[120732,120732],"mapped",[957]],[[120733,120733],"mapped",[958]],[[120734,120734],"mapped",[959]],[[120735,120735],"mapped",[960]],[[120736,120736],"mapped",[961]],[[120737,120737],"mapped",[952]],[[120738,120738],"mapped",[963]],[[120739,120739],"mapped",[964]],[[120740,120740],"mapped",[965]],[[120741,120741],"mapped",[966]],[[120742,120742],"mapped",[967]],[[120743,120743],"mapped",[968]],[[120744,120744],"mapped",[969]],[[120745,120745],"mapped",[8711]],[[120746,120746],"mapped",[945]],[[120747,120747],"mapped",[946]],[[120748,120748],"mapped",[947]],[[120749,120749],"mapped",[948]],[[120750,120750],"mapped",[949]],[[120751,120751],"mapped",[950]],[[120752,120752],"mapped",[951]],[[120753,120753],"mapped",[952]],[[120754,120754],"mapped",[953]],[[120755,120755],"mapped",[954]],[[120756,120756],"mapped",[955]],[[120757,120757],"mapped",[956]],[[120758,120758],"mapped",[957]],[[120759,120759],"mapped",[958]],[[120760,120760],"mapped",[959]],[[120761,120761],"mapped",[960]],[[120762,120762],"mapped",[961]],[[120763,120764],"mapped",[963]],[[120765,120765],"mapped",[964]],[[120766,120766],"mapped",[965]],[[120767,120767],"mapped",[966]],[[120768,120768],"mapped",[967]],[[120769,120769],"mapped",[968]],[[120770,120770],"mapped",[969]],[[120771,120771],"mapped",[8706]],[[120772,120772],"mapped",[949]],[[120773,120773],"mapped",[952]],[[120774,120774],"mapped",[954]],[[120775,120775],"mapped",[966]],[[120776,120776],"mapped",[961]],[[120777,120777],"mapped",[960]],[[120778,120779],"mapped",[989]],[[120780,120781],"disallowed"],[[120782,120782],"mapped",[48]],[[120783,120783],"mapped",[49]],[[120784,120784],"mapped",[50]],[[120785,120785],"mapped",[51]],[[120786,120786],"mapped",[52]],[[120787,120787],"mapped",[53]],[[120788,120788],"mapped",[54]],[[120789,120789],"mapped",[55]],[[120790,120790],"mapped",[56]],[[120791,120791],"mapped",[57]],[[120792,120792],"mapped",[48]],[[120793,120793],"mapped",[49]],[[120794,120794],"mapped",[50]],[[120795,120795],"mapped",[51]],[[120796,120796],"mapped",[52]],[[120797,120797],"mapped",[53]],[[120798,120798],"mapped",[54]],[[120799,120799],"mapped",[55]],[[120800,120800],"mapped",[56]],[[120801,120801],"mapped",[57]],[[120802,120802],"mapped",[48]],[[120803,120803],"mapped",[49]],[[120804,120804],"mapped",[50]],[[120805,120805],"mapped",[51]],[[120806,120806],"mapped",[52]],[[120807,120807],"mapped",[53]],[[120808,120808],"mapped",[54]],[[120809,120809],"mapped",[55]],[[120810,120810],"mapped",[56]],[[120811,120811],"mapped",[57]],[[120812,120812],"mapped",[48]],[[120813,120813],"mapped",[49]],[[120814,120814],"mapped",[50]],[[120815,120815],"mapped",[51]],[[120816,120816],"mapped",[52]],[[120817,120817],"mapped",[53]],[[120818,120818],"mapped",[54]],[[120819,120819],"mapped",[55]],[[120820,120820],"mapped",[56]],[[120821,120821],"mapped",[57]],[[120822,120822],"mapped",[48]],[[120823,120823],"mapped",[49]],[[120824,120824],"mapped",[50]],[[120825,120825],"mapped",[51]],[[120826,120826],"mapped",[52]],[[120827,120827],"mapped",[53]],[[120828,120828],"mapped",[54]],[[120829,120829],"mapped",[55]],[[120830,120830],"mapped",[56]],[[120831,120831],"mapped",[57]],[[120832,121343],"valid",[],"NV8"],[[121344,121398],"valid"],[[121399,121402],"valid",[],"NV8"],[[121403,121452],"valid"],[[121453,121460],"valid",[],"NV8"],[[121461,121461],"valid"],[[121462,121475],"valid",[],"NV8"],[[121476,121476],"valid"],[[121477,121483],"valid",[],"NV8"],[[121484,121498],"disallowed"],[[121499,121503],"valid"],[[121504,121504],"disallowed"],[[121505,121519],"valid"],[[121520,124927],"disallowed"],[[124928,125124],"valid"],[[125125,125126],"disallowed"],[[125127,125135],"valid",[],"NV8"],[[125136,125142],"valid"],[[125143,126463],"disallowed"],[[126464,126464],"mapped",[1575]],[[126465,126465],"mapped",[1576]],[[126466,126466],"mapped",[1580]],[[126467,126467],"mapped",[1583]],[[126468,126468],"disallowed"],[[126469,126469],"mapped",[1608]],[[126470,126470],"mapped",[1586]],[[126471,126471],"mapped",[1581]],[[126472,126472],"mapped",[1591]],[[126473,126473],"mapped",[1610]],[[126474,126474],"mapped",[1603]],[[126475,126475],"mapped",[1604]],[[126476,126476],"mapped",[1605]],[[126477,126477],"mapped",[1606]],[[126478,126478],"mapped",[1587]],[[126479,126479],"mapped",[1593]],[[126480,126480],"mapped",[1601]],[[126481,126481],"mapped",[1589]],[[126482,126482],"mapped",[1602]],[[126483,126483],"mapped",[1585]],[[126484,126484],"mapped",[1588]],[[126485,126485],"mapped",[1578]],[[126486,126486],"mapped",[1579]],[[126487,126487],"mapped",[1582]],[[126488,126488],"mapped",[1584]],[[126489,126489],"mapped",[1590]],[[126490,126490],"mapped",[1592]],[[126491,126491],"mapped",[1594]],[[126492,126492],"mapped",[1646]],[[126493,126493],"mapped",[1722]],[[126494,126494],"mapped",[1697]],[[126495,126495],"mapped",[1647]],[[126496,126496],"disallowed"],[[126497,126497],"mapped",[1576]],[[126498,126498],"mapped",[1580]],[[126499,126499],"disallowed"],[[126500,126500],"mapped",[1607]],[[126501,126502],"disallowed"],[[126503,126503],"mapped",[1581]],[[126504,126504],"disallowed"],[[126505,126505],"mapped",[1610]],[[126506,126506],"mapped",[1603]],[[126507,126507],"mapped",[1604]],[[126508,126508],"mapped",[1605]],[[126509,126509],"mapped",[1606]],[[126510,126510],"mapped",[1587]],[[126511,126511],"mapped",[1593]],[[126512,126512],"mapped",[1601]],[[126513,126513],"mapped",[1589]],[[126514,126514],"mapped",[1602]],[[126515,126515],"disallowed"],[[126516,126516],"mapped",[1588]],[[126517,126517],"mapped",[1578]],[[126518,126518],"mapped",[1579]],[[126519,126519],"mapped",[1582]],[[126520,126520],"disallowed"],[[126521,126521],"mapped",[1590]],[[126522,126522],"disallowed"],[[126523,126523],"mapped",[1594]],[[126524,126529],"disallowed"],[[126530,126530],"mapped",[1580]],[[126531,126534],"disallowed"],[[126535,126535],"mapped",[1581]],[[126536,126536],"disallowed"],[[126537,126537],"mapped",[1610]],[[126538,126538],"disallowed"],[[126539,126539],"mapped",[1604]],[[126540,126540],"disallowed"],[[126541,126541],"mapped",[1606]],[[126542,126542],"mapped",[1587]],[[126543,126543],"mapped",[1593]],[[126544,126544],"disallowed"],[[126545,126545],"mapped",[1589]],[[126546,126546],"mapped",[1602]],[[126547,126547],"disallowed"],[[126548,126548],"mapped",[1588]],[[126549,126550],"disallowed"],[[126551,126551],"mapped",[1582]],[[126552,126552],"disallowed"],[[126553,126553],"mapped",[1590]],[[126554,126554],"disallowed"],[[126555,126555],"mapped",[1594]],[[126556,126556],"disallowed"],[[126557,126557],"mapped",[1722]],[[126558,126558],"disallowed"],[[126559,126559],"mapped",[1647]],[[126560,126560],"disallowed"],[[126561,126561],"mapped",[1576]],[[126562,126562],"mapped",[1580]],[[126563,126563],"disallowed"],[[126564,126564],"mapped",[1607]],[[126565,126566],"disallowed"],[[126567,126567],"mapped",[1581]],[[126568,126568],"mapped",[1591]],[[126569,126569],"mapped",[1610]],[[126570,126570],"mapped",[1603]],[[126571,126571],"disallowed"],[[126572,126572],"mapped",[1605]],[[126573,126573],"mapped",[1606]],[[126574,126574],"mapped",[1587]],[[126575,126575],"mapped",[1593]],[[126576,126576],"mapped",[1601]],[[126577,126577],"mapped",[1589]],[[126578,126578],"mapped",[1602]],[[126579,126579],"disallowed"],[[126580,126580],"mapped",[1588]],[[126581,126581],"mapped",[1578]],[[126582,126582],"mapped",[1579]],[[126583,126583],"mapped",[1582]],[[126584,126584],"disallowed"],[[126585,126585],"mapped",[1590]],[[126586,126586],"mapped",[1592]],[[126587,126587],"mapped",[1594]],[[126588,126588],"mapped",[1646]],[[126589,126589],"disallowed"],[[126590,126590],"mapped",[1697]],[[126591,126591],"disallowed"],[[126592,126592],"mapped",[1575]],[[126593,126593],"mapped",[1576]],[[126594,126594],"mapped",[1580]],[[126595,126595],"mapped",[1583]],[[126596,126596],"mapped",[1607]],[[126597,126597],"mapped",[1608]],[[126598,126598],"mapped",[1586]],[[126599,126599],"mapped",[1581]],[[126600,126600],"mapped",[1591]],[[126601,126601],"mapped",[1610]],[[126602,126602],"disallowed"],[[126603,126603],"mapped",[1604]],[[126604,126604],"mapped",[1605]],[[126605,126605],"mapped",[1606]],[[126606,126606],"mapped",[1587]],[[126607,126607],"mapped",[1593]],[[126608,126608],"mapped",[1601]],[[126609,126609],"mapped",[1589]],[[126610,126610],"mapped",[1602]],[[126611,126611],"mapped",[1585]],[[126612,126612],"mapped",[1588]],[[126613,126613],"mapped",[1578]],[[126614,126614],"mapped",[1579]],[[126615,126615],"mapped",[1582]],[[126616,126616],"mapped",[1584]],[[126617,126617],"mapped",[1590]],[[126618,126618],"mapped",[1592]],[[126619,126619],"mapped",[1594]],[[126620,126624],"disallowed"],[[126625,126625],"mapped",[1576]],[[126626,126626],"mapped",[1580]],[[126627,126627],"mapped",[1583]],[[126628,126628],"disallowed"],[[126629,126629],"mapped",[1608]],[[126630,126630],"mapped",[1586]],[[126631,126631],"mapped",[1581]],[[126632,126632],"mapped",[1591]],[[126633,126633],"mapped",[1610]],[[126634,126634],"disallowed"],[[126635,126635],"mapped",[1604]],[[126636,126636],"mapped",[1605]],[[126637,126637],"mapped",[1606]],[[126638,126638],"mapped",[1587]],[[126639,126639],"mapped",[1593]],[[126640,126640],"mapped",[1601]],[[126641,126641],"mapped",[1589]],[[126642,126642],"mapped",[1602]],[[126643,126643],"mapped",[1585]],[[126644,126644],"mapped",[1588]],[[126645,126645],"mapped",[1578]],[[126646,126646],"mapped",[1579]],[[126647,126647],"mapped",[1582]],[[126648,126648],"mapped",[1584]],[[126649,126649],"mapped",[1590]],[[126650,126650],"mapped",[1592]],[[126651,126651],"mapped",[1594]],[[126652,126703],"disallowed"],[[126704,126705],"valid",[],"NV8"],[[126706,126975],"disallowed"],[[126976,127019],"valid",[],"NV8"],[[127020,127023],"disallowed"],[[127024,127123],"valid",[],"NV8"],[[127124,127135],"disallowed"],[[127136,127150],"valid",[],"NV8"],[[127151,127152],"disallowed"],[[127153,127166],"valid",[],"NV8"],[[127167,127167],"valid",[],"NV8"],[[127168,127168],"disallowed"],[[127169,127183],"valid",[],"NV8"],[[127184,127184],"disallowed"],[[127185,127199],"valid",[],"NV8"],[[127200,127221],"valid",[],"NV8"],[[127222,127231],"disallowed"],[[127232,127232],"disallowed"],[[127233,127233],"disallowed_STD3_mapped",[48,44]],[[127234,127234],"disallowed_STD3_mapped",[49,44]],[[127235,127235],"disallowed_STD3_mapped",[50,44]],[[127236,127236],"disallowed_STD3_mapped",[51,44]],[[127237,127237],"disallowed_STD3_mapped",[52,44]],[[127238,127238],"disallowed_STD3_mapped",[53,44]],[[127239,127239],"disallowed_STD3_mapped",[54,44]],[[127240,127240],"disallowed_STD3_mapped",[55,44]],[[127241,127241],"disallowed_STD3_mapped",[56,44]],[[127242,127242],"disallowed_STD3_mapped",[57,44]],[[127243,127244],"valid",[],"NV8"],[[127245,127247],"disallowed"],[[127248,127248],"disallowed_STD3_mapped",[40,97,41]],[[127249,127249],"disallowed_STD3_mapped",[40,98,41]],[[127250,127250],"disallowed_STD3_mapped",[40,99,41]],[[127251,127251],"disallowed_STD3_mapped",[40,100,41]],[[127252,127252],"disallowed_STD3_mapped",[40,101,41]],[[127253,127253],"disallowed_STD3_mapped",[40,102,41]],[[127254,127254],"disallowed_STD3_mapped",[40,103,41]],[[127255,127255],"disallowed_STD3_mapped",[40,104,41]],[[127256,127256],"disallowed_STD3_mapped",[40,105,41]],[[127257,127257],"disallowed_STD3_mapped",[40,106,41]],[[127258,127258],"disallowed_STD3_mapped",[40,107,41]],[[127259,127259],"disallowed_STD3_mapped",[40,108,41]],[[127260,127260],"disallowed_STD3_mapped",[40,109,41]],[[127261,127261],"disallowed_STD3_mapped",[40,110,41]],[[127262,127262],"disallowed_STD3_mapped",[40,111,41]],[[127263,127263],"disallowed_STD3_mapped",[40,112,41]],[[127264,127264],"disallowed_STD3_mapped",[40,113,41]],[[127265,127265],"disallowed_STD3_mapped",[40,114,41]],[[127266,127266],"disallowed_STD3_mapped",[40,115,41]],[[127267,127267],"disallowed_STD3_mapped",[40,116,41]],[[127268,127268],"disallowed_STD3_mapped",[40,117,41]],[[127269,127269],"disallowed_STD3_mapped",[40,118,41]],[[127270,127270],"disallowed_STD3_mapped",[40,119,41]],[[127271,127271],"disallowed_STD3_mapped",[40,120,41]],[[127272,127272],"disallowed_STD3_mapped",[40,121,41]],[[127273,127273],"disallowed_STD3_mapped",[40,122,41]],[[127274,127274],"mapped",[12308,115,12309]],[[127275,127275],"mapped",[99]],[[127276,127276],"mapped",[114]],[[127277,127277],"mapped",[99,100]],[[127278,127278],"mapped",[119,122]],[[127279,127279],"disallowed"],[[127280,127280],"mapped",[97]],[[127281,127281],"mapped",[98]],[[127282,127282],"mapped",[99]],[[127283,127283],"mapped",[100]],[[127284,127284],"mapped",[101]],[[127285,127285],"mapped",[102]],[[127286,127286],"mapped",[103]],[[127287,127287],"mapped",[104]],[[127288,127288],"mapped",[105]],[[127289,127289],"mapped",[106]],[[127290,127290],"mapped",[107]],[[127291,127291],"mapped",[108]],[[127292,127292],"mapped",[109]],[[127293,127293],"mapped",[110]],[[127294,127294],"mapped",[111]],[[127295,127295],"mapped",[112]],[[127296,127296],"mapped",[113]],[[127297,127297],"mapped",[114]],[[127298,127298],"mapped",[115]],[[127299,127299],"mapped",[116]],[[127300,127300],"mapped",[117]],[[127301,127301],"mapped",[118]],[[127302,127302],"mapped",[119]],[[127303,127303],"mapped",[120]],[[127304,127304],"mapped",[121]],[[127305,127305],"mapped",[122]],[[127306,127306],"mapped",[104,118]],[[127307,127307],"mapped",[109,118]],[[127308,127308],"mapped",[115,100]],[[127309,127309],"mapped",[115,115]],[[127310,127310],"mapped",[112,112,118]],[[127311,127311],"mapped",[119,99]],[[127312,127318],"valid",[],"NV8"],[[127319,127319],"valid",[],"NV8"],[[127320,127326],"valid",[],"NV8"],[[127327,127327],"valid",[],"NV8"],[[127328,127337],"valid",[],"NV8"],[[127338,127338],"mapped",[109,99]],[[127339,127339],"mapped",[109,100]],[[127340,127343],"disallowed"],[[127344,127352],"valid",[],"NV8"],[[127353,127353],"valid",[],"NV8"],[[127354,127354],"valid",[],"NV8"],[[127355,127356],"valid",[],"NV8"],[[127357,127358],"valid",[],"NV8"],[[127359,127359],"valid",[],"NV8"],[[127360,127369],"valid",[],"NV8"],[[127370,127373],"valid",[],"NV8"],[[127374,127375],"valid",[],"NV8"],[[127376,127376],"mapped",[100,106]],[[127377,127386],"valid",[],"NV8"],[[127387,127461],"disallowed"],[[127462,127487],"valid",[],"NV8"],[[127488,127488],"mapped",[12411,12363]],[[127489,127489],"mapped",[12467,12467]],[[127490,127490],"mapped",[12469]],[[127491,127503],"disallowed"],[[127504,127504],"mapped",[25163]],[[127505,127505],"mapped",[23383]],[[127506,127506],"mapped",[21452]],[[127507,127507],"mapped",[12487]],[[127508,127508],"mapped",[20108]],[[127509,127509],"mapped",[22810]],[[127510,127510],"mapped",[35299]],[[127511,127511],"mapped",[22825]],[[127512,127512],"mapped",[20132]],[[127513,127513],"mapped",[26144]],[[127514,127514],"mapped",[28961]],[[127515,127515],"mapped",[26009]],[[127516,127516],"mapped",[21069]],[[127517,127517],"mapped",[24460]],[[127518,127518],"mapped",[20877]],[[127519,127519],"mapped",[26032]],[[127520,127520],"mapped",[21021]],[[127521,127521],"mapped",[32066]],[[127522,127522],"mapped",[29983]],[[127523,127523],"mapped",[36009]],[[127524,127524],"mapped",[22768]],[[127525,127525],"mapped",[21561]],[[127526,127526],"mapped",[28436]],[[127527,127527],"mapped",[25237]],[[127528,127528],"mapped",[25429]],[[127529,127529],"mapped",[19968]],[[127530,127530],"mapped",[19977]],[[127531,127531],"mapped",[36938]],[[127532,127532],"mapped",[24038]],[[127533,127533],"mapped",[20013]],[[127534,127534],"mapped",[21491]],[[127535,127535],"mapped",[25351]],[[127536,127536],"mapped",[36208]],[[127537,127537],"mapped",[25171]],[[127538,127538],"mapped",[31105]],[[127539,127539],"mapped",[31354]],[[127540,127540],"mapped",[21512]],[[127541,127541],"mapped",[28288]],[[127542,127542],"mapped",[26377]],[[127543,127543],"mapped",[26376]],[[127544,127544],"mapped",[30003]],[[127545,127545],"mapped",[21106]],[[127546,127546],"mapped",[21942]],[[127547,127551],"disallowed"],[[127552,127552],"mapped",[12308,26412,12309]],[[127553,127553],"mapped",[12308,19977,12309]],[[127554,127554],"mapped",[12308,20108,12309]],[[127555,127555],"mapped",[12308,23433,12309]],[[127556,127556],"mapped",[12308,28857,12309]],[[127557,127557],"mapped",[12308,25171,12309]],[[127558,127558],"mapped",[12308,30423,12309]],[[127559,127559],"mapped",[12308,21213,12309]],[[127560,127560],"mapped",[12308,25943,12309]],[[127561,127567],"disallowed"],[[127568,127568],"mapped",[24471]],[[127569,127569],"mapped",[21487]],[[127570,127743],"disallowed"],[[127744,127776],"valid",[],"NV8"],[[127777,127788],"valid",[],"NV8"],[[127789,127791],"valid",[],"NV8"],[[127792,127797],"valid",[],"NV8"],[[127798,127798],"valid",[],"NV8"],[[127799,127868],"valid",[],"NV8"],[[127869,127869],"valid",[],"NV8"],[[127870,127871],"valid",[],"NV8"],[[127872,127891],"valid",[],"NV8"],[[127892,127903],"valid",[],"NV8"],[[127904,127940],"valid",[],"NV8"],[[127941,127941],"valid",[],"NV8"],[[127942,127946],"valid",[],"NV8"],[[127947,127950],"valid",[],"NV8"],[[127951,127955],"valid",[],"NV8"],[[127956,127967],"valid",[],"NV8"],[[127968,127984],"valid",[],"NV8"],[[127985,127991],"valid",[],"NV8"],[[127992,127999],"valid",[],"NV8"],[[128000,128062],"valid",[],"NV8"],[[128063,128063],"valid",[],"NV8"],[[128064,128064],"valid",[],"NV8"],[[128065,128065],"valid",[],"NV8"],[[128066,128247],"valid",[],"NV8"],[[128248,128248],"valid",[],"NV8"],[[128249,128252],"valid",[],"NV8"],[[128253,128254],"valid",[],"NV8"],[[128255,128255],"valid",[],"NV8"],[[128256,128317],"valid",[],"NV8"],[[128318,128319],"valid",[],"NV8"],[[128320,128323],"valid",[],"NV8"],[[128324,128330],"valid",[],"NV8"],[[128331,128335],"valid",[],"NV8"],[[128336,128359],"valid",[],"NV8"],[[128360,128377],"valid",[],"NV8"],[[128378,128378],"disallowed"],[[128379,128419],"valid",[],"NV8"],[[128420,128420],"disallowed"],[[128421,128506],"valid",[],"NV8"],[[128507,128511],"valid",[],"NV8"],[[128512,128512],"valid",[],"NV8"],[[128513,128528],"valid",[],"NV8"],[[128529,128529],"valid",[],"NV8"],[[128530,128532],"valid",[],"NV8"],[[128533,128533],"valid",[],"NV8"],[[128534,128534],"valid",[],"NV8"],[[128535,128535],"valid",[],"NV8"],[[128536,128536],"valid",[],"NV8"],[[128537,128537],"valid",[],"NV8"],[[128538,128538],"valid",[],"NV8"],[[128539,128539],"valid",[],"NV8"],[[128540,128542],"valid",[],"NV8"],[[128543,128543],"valid",[],"NV8"],[[128544,128549],"valid",[],"NV8"],[[128550,128551],"valid",[],"NV8"],[[128552,128555],"valid",[],"NV8"],[[128556,128556],"valid",[],"NV8"],[[128557,128557],"valid",[],"NV8"],[[128558,128559],"valid",[],"NV8"],[[128560,128563],"valid",[],"NV8"],[[128564,128564],"valid",[],"NV8"],[[128565,128576],"valid",[],"NV8"],[[128577,128578],"valid",[],"NV8"],[[128579,128580],"valid",[],"NV8"],[[128581,128591],"valid",[],"NV8"],[[128592,128639],"valid",[],"NV8"],[[128640,128709],"valid",[],"NV8"],[[128710,128719],"valid",[],"NV8"],[[128720,128720],"valid",[],"NV8"],[[128721,128735],"disallowed"],[[128736,128748],"valid",[],"NV8"],[[128749,128751],"disallowed"],[[128752,128755],"valid",[],"NV8"],[[128756,128767],"disallowed"],[[128768,128883],"valid",[],"NV8"],[[128884,128895],"disallowed"],[[128896,128980],"valid",[],"NV8"],[[128981,129023],"disallowed"],[[129024,129035],"valid",[],"NV8"],[[129036,129039],"disallowed"],[[129040,129095],"valid",[],"NV8"],[[129096,129103],"disallowed"],[[129104,129113],"valid",[],"NV8"],[[129114,129119],"disallowed"],[[129120,129159],"valid",[],"NV8"],[[129160,129167],"disallowed"],[[129168,129197],"valid",[],"NV8"],[[129198,129295],"disallowed"],[[129296,129304],"valid",[],"NV8"],[[129305,129407],"disallowed"],[[129408,129412],"valid",[],"NV8"],[[129413,129471],"disallowed"],[[129472,129472],"valid",[],"NV8"],[[129473,131069],"disallowed"],[[131070,131071],"disallowed"],[[131072,173782],"valid"],[[173783,173823],"disallowed"],[[173824,177972],"valid"],[[177973,177983],"disallowed"],[[177984,178205],"valid"],[[178206,178207],"disallowed"],[[178208,183969],"valid"],[[183970,194559],"disallowed"],[[194560,194560],"mapped",[20029]],[[194561,194561],"mapped",[20024]],[[194562,194562],"mapped",[20033]],[[194563,194563],"mapped",[131362]],[[194564,194564],"mapped",[20320]],[[194565,194565],"mapped",[20398]],[[194566,194566],"mapped",[20411]],[[194567,194567],"mapped",[20482]],[[194568,194568],"mapped",[20602]],[[194569,194569],"mapped",[20633]],[[194570,194570],"mapped",[20711]],[[194571,194571],"mapped",[20687]],[[194572,194572],"mapped",[13470]],[[194573,194573],"mapped",[132666]],[[194574,194574],"mapped",[20813]],[[194575,194575],"mapped",[20820]],[[194576,194576],"mapped",[20836]],[[194577,194577],"mapped",[20855]],[[194578,194578],"mapped",[132380]],[[194579,194579],"mapped",[13497]],[[194580,194580],"mapped",[20839]],[[194581,194581],"mapped",[20877]],[[194582,194582],"mapped",[132427]],[[194583,194583],"mapped",[20887]],[[194584,194584],"mapped",[20900]],[[194585,194585],"mapped",[20172]],[[194586,194586],"mapped",[20908]],[[194587,194587],"mapped",[20917]],[[194588,194588],"mapped",[168415]],[[194589,194589],"mapped",[20981]],[[194590,194590],"mapped",[20995]],[[194591,194591],"mapped",[13535]],[[194592,194592],"mapped",[21051]],[[194593,194593],"mapped",[21062]],[[194594,194594],"mapped",[21106]],[[194595,194595],"mapped",[21111]],[[194596,194596],"mapped",[13589]],[[194597,194597],"mapped",[21191]],[[194598,194598],"mapped",[21193]],[[194599,194599],"mapped",[21220]],[[194600,194600],"mapped",[21242]],[[194601,194601],"mapped",[21253]],[[194602,194602],"mapped",[21254]],[[194603,194603],"mapped",[21271]],[[194604,194604],"mapped",[21321]],[[194605,194605],"mapped",[21329]],[[194606,194606],"mapped",[21338]],[[194607,194607],"mapped",[21363]],[[194608,194608],"mapped",[21373]],[[194609,194611],"mapped",[21375]],[[194612,194612],"mapped",[133676]],[[194613,194613],"mapped",[28784]],[[194614,194614],"mapped",[21450]],[[194615,194615],"mapped",[21471]],[[194616,194616],"mapped",[133987]],[[194617,194617],"mapped",[21483]],[[194618,194618],"mapped",[21489]],[[194619,194619],"mapped",[21510]],[[194620,194620],"mapped",[21662]],[[194621,194621],"mapped",[21560]],[[194622,194622],"mapped",[21576]],[[194623,194623],"mapped",[21608]],[[194624,194624],"mapped",[21666]],[[194625,194625],"mapped",[21750]],[[194626,194626],"mapped",[21776]],[[194627,194627],"mapped",[21843]],[[194628,194628],"mapped",[21859]],[[194629,194630],"mapped",[21892]],[[194631,194631],"mapped",[21913]],[[194632,194632],"mapped",[21931]],[[194633,194633],"mapped",[21939]],[[194634,194634],"mapped",[21954]],[[194635,194635],"mapped",[22294]],[[194636,194636],"mapped",[22022]],[[194637,194637],"mapped",[22295]],[[194638,194638],"mapped",[22097]],[[194639,194639],"mapped",[22132]],[[194640,194640],"mapped",[20999]],[[194641,194641],"mapped",[22766]],[[194642,194642],"mapped",[22478]],[[194643,194643],"mapped",[22516]],[[194644,194644],"mapped",[22541]],[[194645,194645],"mapped",[22411]],[[194646,194646],"mapped",[22578]],[[194647,194647],"mapped",[22577]],[[194648,194648],"mapped",[22700]],[[194649,194649],"mapped",[136420]],[[194650,194650],"mapped",[22770]],[[194651,194651],"mapped",[22775]],[[194652,194652],"mapped",[22790]],[[194653,194653],"mapped",[22810]],[[194654,194654],"mapped",[22818]],[[194655,194655],"mapped",[22882]],[[194656,194656],"mapped",[136872]],[[194657,194657],"mapped",[136938]],[[194658,194658],"mapped",[23020]],[[194659,194659],"mapped",[23067]],[[194660,194660],"mapped",[23079]],[[194661,194661],"mapped",[23000]],[[194662,194662],"mapped",[23142]],[[194663,194663],"mapped",[14062]],[[194664,194664],"disallowed"],[[194665,194665],"mapped",[23304]],[[194666,194667],"mapped",[23358]],[[194668,194668],"mapped",[137672]],[[194669,194669],"mapped",[23491]],[[194670,194670],"mapped",[23512]],[[194671,194671],"mapped",[23527]],[[194672,194672],"mapped",[23539]],[[194673,194673],"mapped",[138008]],[[194674,194674],"mapped",[23551]],[[194675,194675],"mapped",[23558]],[[194676,194676],"disallowed"],[[194677,194677],"mapped",[23586]],[[194678,194678],"mapped",[14209]],[[194679,194679],"mapped",[23648]],[[194680,194680],"mapped",[23662]],[[194681,194681],"mapped",[23744]],[[194682,194682],"mapped",[23693]],[[194683,194683],"mapped",[138724]],[[194684,194684],"mapped",[23875]],[[194685,194685],"mapped",[138726]],[[194686,194686],"mapped",[23918]],[[194687,194687],"mapped",[23915]],[[194688,194688],"mapped",[23932]],[[194689,194689],"mapped",[24033]],[[194690,194690],"mapped",[24034]],[[194691,194691],"mapped",[14383]],[[194692,194692],"mapped",[24061]],[[194693,194693],"mapped",[24104]],[[194694,194694],"mapped",[24125]],[[194695,194695],"mapped",[24169]],[[194696,194696],"mapped",[14434]],[[194697,194697],"mapped",[139651]],[[194698,194698],"mapped",[14460]],[[194699,194699],"mapped",[24240]],[[194700,194700],"mapped",[24243]],[[194701,194701],"mapped",[24246]],[[194702,194702],"mapped",[24266]],[[194703,194703],"mapped",[172946]],[[194704,194704],"mapped",[24318]],[[194705,194706],"mapped",[140081]],[[194707,194707],"mapped",[33281]],[[194708,194709],"mapped",[24354]],[[194710,194710],"mapped",[14535]],[[194711,194711],"mapped",[144056]],[[194712,194712],"mapped",[156122]],[[194713,194713],"mapped",[24418]],[[194714,194714],"mapped",[24427]],[[194715,194715],"mapped",[14563]],[[194716,194716],"mapped",[24474]],[[194717,194717],"mapped",[24525]],[[194718,194718],"mapped",[24535]],[[194719,194719],"mapped",[24569]],[[194720,194720],"mapped",[24705]],[[194721,194721],"mapped",[14650]],[[194722,194722],"mapped",[14620]],[[194723,194723],"mapped",[24724]],[[194724,194724],"mapped",[141012]],[[194725,194725],"mapped",[24775]],[[194726,194726],"mapped",[24904]],[[194727,194727],"mapped",[24908]],[[194728,194728],"mapped",[24910]],[[194729,194729],"mapped",[24908]],[[194730,194730],"mapped",[24954]],[[194731,194731],"mapped",[24974]],[[194732,194732],"mapped",[25010]],[[194733,194733],"mapped",[24996]],[[194734,194734],"mapped",[25007]],[[194735,194735],"mapped",[25054]],[[194736,194736],"mapped",[25074]],[[194737,194737],"mapped",[25078]],[[194738,194738],"mapped",[25104]],[[194739,194739],"mapped",[25115]],[[194740,194740],"mapped",[25181]],[[194741,194741],"mapped",[25265]],[[194742,194742],"mapped",[25300]],[[194743,194743],"mapped",[25424]],[[194744,194744],"mapped",[142092]],[[194745,194745],"mapped",[25405]],[[194746,194746],"mapped",[25340]],[[194747,194747],"mapped",[25448]],[[194748,194748],"mapped",[25475]],[[194749,194749],"mapped",[25572]],[[194750,194750],"mapped",[142321]],[[194751,194751],"mapped",[25634]],[[194752,194752],"mapped",[25541]],[[194753,194753],"mapped",[25513]],[[194754,194754],"mapped",[14894]],[[194755,194755],"mapped",[25705]],[[194756,194756],"mapped",[25726]],[[194757,194757],"mapped",[25757]],[[194758,194758],"mapped",[25719]],[[194759,194759],"mapped",[14956]],[[194760,194760],"mapped",[25935]],[[194761,194761],"mapped",[25964]],[[194762,194762],"mapped",[143370]],[[194763,194763],"mapped",[26083]],[[194764,194764],"mapped",[26360]],[[194765,194765],"mapped",[26185]],[[194766,194766],"mapped",[15129]],[[194767,194767],"mapped",[26257]],[[194768,194768],"mapped",[15112]],[[194769,194769],"mapped",[15076]],[[194770,194770],"mapped",[20882]],[[194771,194771],"mapped",[20885]],[[194772,194772],"mapped",[26368]],[[194773,194773],"mapped",[26268]],[[194774,194774],"mapped",[32941]],[[194775,194775],"mapped",[17369]],[[194776,194776],"mapped",[26391]],[[194777,194777],"mapped",[26395]],[[194778,194778],"mapped",[26401]],[[194779,194779],"mapped",[26462]],[[194780,194780],"mapped",[26451]],[[194781,194781],"mapped",[144323]],[[194782,194782],"mapped",[15177]],[[194783,194783],"mapped",[26618]],[[194784,194784],"mapped",[26501]],[[194785,194785],"mapped",[26706]],[[194786,194786],"mapped",[26757]],[[194787,194787],"mapped",[144493]],[[194788,194788],"mapped",[26766]],[[194789,194789],"mapped",[26655]],[[194790,194790],"mapped",[26900]],[[194791,194791],"mapped",[15261]],[[194792,194792],"mapped",[26946]],[[194793,194793],"mapped",[27043]],[[194794,194794],"mapped",[27114]],[[194795,194795],"mapped",[27304]],[[194796,194796],"mapped",[145059]],[[194797,194797],"mapped",[27355]],[[194798,194798],"mapped",[15384]],[[194799,194799],"mapped",[27425]],[[194800,194800],"mapped",[145575]],[[194801,194801],"mapped",[27476]],[[194802,194802],"mapped",[15438]],[[194803,194803],"mapped",[27506]],[[194804,194804],"mapped",[27551]],[[194805,194805],"mapped",[27578]],[[194806,194806],"mapped",[27579]],[[194807,194807],"mapped",[146061]],[[194808,194808],"mapped",[138507]],[[194809,194809],"mapped",[146170]],[[194810,194810],"mapped",[27726]],[[194811,194811],"mapped",[146620]],[[194812,194812],"mapped",[27839]],[[194813,194813],"mapped",[27853]],[[194814,194814],"mapped",[27751]],[[194815,194815],"mapped",[27926]],[[194816,194816],"mapped",[27966]],[[194817,194817],"mapped",[28023]],[[194818,194818],"mapped",[27969]],[[194819,194819],"mapped",[28009]],[[194820,194820],"mapped",[28024]],[[194821,194821],"mapped",[28037]],[[194822,194822],"mapped",[146718]],[[194823,194823],"mapped",[27956]],[[194824,194824],"mapped",[28207]],[[194825,194825],"mapped",[28270]],[[194826,194826],"mapped",[15667]],[[194827,194827],"mapped",[28363]],[[194828,194828],"mapped",[28359]],[[194829,194829],"mapped",[147153]],[[194830,194830],"mapped",[28153]],[[194831,194831],"mapped",[28526]],[[194832,194832],"mapped",[147294]],[[194833,194833],"mapped",[147342]],[[194834,194834],"mapped",[28614]],[[194835,194835],"mapped",[28729]],[[194836,194836],"mapped",[28702]],[[194837,194837],"mapped",[28699]],[[194838,194838],"mapped",[15766]],[[194839,194839],"mapped",[28746]],[[194840,194840],"mapped",[28797]],[[194841,194841],"mapped",[28791]],[[194842,194842],"mapped",[28845]],[[194843,194843],"mapped",[132389]],[[194844,194844],"mapped",[28997]],[[194845,194845],"mapped",[148067]],[[194846,194846],"mapped",[29084]],[[194847,194847],"disallowed"],[[194848,194848],"mapped",[29224]],[[194849,194849],"mapped",[29237]],[[194850,194850],"mapped",[29264]],[[194851,194851],"mapped",[149000]],[[194852,194852],"mapped",[29312]],[[194853,194853],"mapped",[29333]],[[194854,194854],"mapped",[149301]],[[194855,194855],"mapped",[149524]],[[194856,194856],"mapped",[29562]],[[194857,194857],"mapped",[29579]],[[194858,194858],"mapped",[16044]],[[194859,194859],"mapped",[29605]],[[194860,194861],"mapped",[16056]],[[194862,194862],"mapped",[29767]],[[194863,194863],"mapped",[29788]],[[194864,194864],"mapped",[29809]],[[194865,194865],"mapped",[29829]],[[194866,194866],"mapped",[29898]],[[194867,194867],"mapped",[16155]],[[194868,194868],"mapped",[29988]],[[194869,194869],"mapped",[150582]],[[194870,194870],"mapped",[30014]],[[194871,194871],"mapped",[150674]],[[194872,194872],"mapped",[30064]],[[194873,194873],"mapped",[139679]],[[194874,194874],"mapped",[30224]],[[194875,194875],"mapped",[151457]],[[194876,194876],"mapped",[151480]],[[194877,194877],"mapped",[151620]],[[194878,194878],"mapped",[16380]],[[194879,194879],"mapped",[16392]],[[194880,194880],"mapped",[30452]],[[194881,194881],"mapped",[151795]],[[194882,194882],"mapped",[151794]],[[194883,194883],"mapped",[151833]],[[194884,194884],"mapped",[151859]],[[194885,194885],"mapped",[30494]],[[194886,194887],"mapped",[30495]],[[194888,194888],"mapped",[30538]],[[194889,194889],"mapped",[16441]],[[194890,194890],"mapped",[30603]],[[194891,194891],"mapped",[16454]],[[194892,194892],"mapped",[16534]],[[194893,194893],"mapped",[152605]],[[194894,194894],"mapped",[30798]],[[194895,194895],"mapped",[30860]],[[194896,194896],"mapped",[30924]],[[194897,194897],"mapped",[16611]],[[194898,194898],"mapped",[153126]],[[194899,194899],"mapped",[31062]],[[194900,194900],"mapped",[153242]],[[194901,194901],"mapped",[153285]],[[194902,194902],"mapped",[31119]],[[194903,194903],"mapped",[31211]],[[194904,194904],"mapped",[16687]],[[194905,194905],"mapped",[31296]],[[194906,194906],"mapped",[31306]],[[194907,194907],"mapped",[31311]],[[194908,194908],"mapped",[153980]],[[194909,194910],"mapped",[154279]],[[194911,194911],"disallowed"],[[194912,194912],"mapped",[16898]],[[194913,194913],"mapped",[154539]],[[194914,194914],"mapped",[31686]],[[194915,194915],"mapped",[31689]],[[194916,194916],"mapped",[16935]],[[194917,194917],"mapped",[154752]],[[194918,194918],"mapped",[31954]],[[194919,194919],"mapped",[17056]],[[194920,194920],"mapped",[31976]],[[194921,194921],"mapped",[31971]],[[194922,194922],"mapped",[32000]],[[194923,194923],"mapped",[155526]],[[194924,194924],"mapped",[32099]],[[194925,194925],"mapped",[17153]],[[194926,194926],"mapped",[32199]],[[194927,194927],"mapped",[32258]],[[194928,194928],"mapped",[32325]],[[194929,194929],"mapped",[17204]],[[194930,194930],"mapped",[156200]],[[194931,194931],"mapped",[156231]],[[194932,194932],"mapped",[17241]],[[194933,194933],"mapped",[156377]],[[194934,194934],"mapped",[32634]],[[194935,194935],"mapped",[156478]],[[194936,194936],"mapped",[32661]],[[194937,194937],"mapped",[32762]],[[194938,194938],"mapped",[32773]],[[194939,194939],"mapped",[156890]],[[194940,194940],"mapped",[156963]],[[194941,194941],"mapped",[32864]],[[194942,194942],"mapped",[157096]],[[194943,194943],"mapped",[32880]],[[194944,194944],"mapped",[144223]],[[194945,194945],"mapped",[17365]],[[194946,194946],"mapped",[32946]],[[194947,194947],"mapped",[33027]],[[194948,194948],"mapped",[17419]],[[194949,194949],"mapped",[33086]],[[194950,194950],"mapped",[23221]],[[194951,194951],"mapped",[157607]],[[194952,194952],"mapped",[157621]],[[194953,194953],"mapped",[144275]],[[194954,194954],"mapped",[144284]],[[194955,194955],"mapped",[33281]],[[194956,194956],"mapped",[33284]],[[194957,194957],"mapped",[36766]],[[194958,194958],"mapped",[17515]],[[194959,194959],"mapped",[33425]],[[194960,194960],"mapped",[33419]],[[194961,194961],"mapped",[33437]],[[194962,194962],"mapped",[21171]],[[194963,194963],"mapped",[33457]],[[194964,194964],"mapped",[33459]],[[194965,194965],"mapped",[33469]],[[194966,194966],"mapped",[33510]],[[194967,194967],"mapped",[158524]],[[194968,194968],"mapped",[33509]],[[194969,194969],"mapped",[33565]],[[194970,194970],"mapped",[33635]],[[194971,194971],"mapped",[33709]],[[194972,194972],"mapped",[33571]],[[194973,194973],"mapped",[33725]],[[194974,194974],"mapped",[33767]],[[194975,194975],"mapped",[33879]],[[194976,194976],"mapped",[33619]],[[194977,194977],"mapped",[33738]],[[194978,194978],"mapped",[33740]],[[194979,194979],"mapped",[33756]],[[194980,194980],"mapped",[158774]],[[194981,194981],"mapped",[159083]],[[194982,194982],"mapped",[158933]],[[194983,194983],"mapped",[17707]],[[194984,194984],"mapped",[34033]],[[194985,194985],"mapped",[34035]],[[194986,194986],"mapped",[34070]],[[194987,194987],"mapped",[160714]],[[194988,194988],"mapped",[34148]],[[194989,194989],"mapped",[159532]],[[194990,194990],"mapped",[17757]],[[194991,194991],"mapped",[17761]],[[194992,194992],"mapped",[159665]],[[194993,194993],"mapped",[159954]],[[194994,194994],"mapped",[17771]],[[194995,194995],"mapped",[34384]],[[194996,194996],"mapped",[34396]],[[194997,194997],"mapped",[34407]],[[194998,194998],"mapped",[34409]],[[194999,194999],"mapped",[34473]],[[195000,195000],"mapped",[34440]],[[195001,195001],"mapped",[34574]],[[195002,195002],"mapped",[34530]],[[195003,195003],"mapped",[34681]],[[195004,195004],"mapped",[34600]],[[195005,195005],"mapped",[34667]],[[195006,195006],"mapped",[34694]],[[195007,195007],"disallowed"],[[195008,195008],"mapped",[34785]],[[195009,195009],"mapped",[34817]],[[195010,195010],"mapped",[17913]],[[195011,195011],"mapped",[34912]],[[195012,195012],"mapped",[34915]],[[195013,195013],"mapped",[161383]],[[195014,195014],"mapped",[35031]],[[195015,195015],"mapped",[35038]],[[195016,195016],"mapped",[17973]],[[195017,195017],"mapped",[35066]],[[195018,195018],"mapped",[13499]],[[195019,195019],"mapped",[161966]],[[195020,195020],"mapped",[162150]],[[195021,195021],"mapped",[18110]],[[195022,195022],"mapped",[18119]],[[195023,195023],"mapped",[35488]],[[195024,195024],"mapped",[35565]],[[195025,195025],"mapped",[35722]],[[195026,195026],"mapped",[35925]],[[195027,195027],"mapped",[162984]],[[195028,195028],"mapped",[36011]],[[195029,195029],"mapped",[36033]],[[195030,195030],"mapped",[36123]],[[195031,195031],"mapped",[36215]],[[195032,195032],"mapped",[163631]],[[195033,195033],"mapped",[133124]],[[195034,195034],"mapped",[36299]],[[195035,195035],"mapped",[36284]],[[195036,195036],"mapped",[36336]],[[195037,195037],"mapped",[133342]],[[195038,195038],"mapped",[36564]],[[195039,195039],"mapped",[36664]],[[195040,195040],"mapped",[165330]],[[195041,195041],"mapped",[165357]],[[195042,195042],"mapped",[37012]],[[195043,195043],"mapped",[37105]],[[195044,195044],"mapped",[37137]],[[195045,195045],"mapped",[165678]],[[195046,195046],"mapped",[37147]],[[195047,195047],"mapped",[37432]],[[195048,195048],"mapped",[37591]],[[195049,195049],"mapped",[37592]],[[195050,195050],"mapped",[37500]],[[195051,195051],"mapped",[37881]],[[195052,195052],"mapped",[37909]],[[195053,195053],"mapped",[166906]],[[195054,195054],"mapped",[38283]],[[195055,195055],"mapped",[18837]],[[195056,195056],"mapped",[38327]],[[195057,195057],"mapped",[167287]],[[195058,195058],"mapped",[18918]],[[195059,195059],"mapped",[38595]],[[195060,195060],"mapped",[23986]],[[195061,195061],"mapped",[38691]],[[195062,195062],"mapped",[168261]],[[195063,195063],"mapped",[168474]],[[195064,195064],"mapped",[19054]],[[195065,195065],"mapped",[19062]],[[195066,195066],"mapped",[38880]],[[195067,195067],"mapped",[168970]],[[195068,195068],"mapped",[19122]],[[195069,195069],"mapped",[169110]],[[195070,195071],"mapped",[38923]],[[195072,195072],"mapped",[38953]],[[195073,195073],"mapped",[169398]],[[195074,195074],"mapped",[39138]],[[195075,195075],"mapped",[19251]],[[195076,195076],"mapped",[39209]],[[195077,195077],"mapped",[39335]],[[195078,195078],"mapped",[39362]],[[195079,195079],"mapped",[39422]],[[195080,195080],"mapped",[19406]],[[195081,195081],"mapped",[170800]],[[195082,195082],"mapped",[39698]],[[195083,195083],"mapped",[40000]],[[195084,195084],"mapped",[40189]],[[195085,195085],"mapped",[19662]],[[195086,195086],"mapped",[19693]],[[195087,195087],"mapped",[40295]],[[195088,195088],"mapped",[172238]],[[195089,195089],"mapped",[19704]],[[195090,195090],"mapped",[172293]],[[195091,195091],"mapped",[172558]],[[195092,195092],"mapped",[172689]],[[195093,195093],"mapped",[40635]],[[195094,195094],"mapped",[19798]],[[195095,195095],"mapped",[40697]],[[195096,195096],"mapped",[40702]],[[195097,195097],"mapped",[40709]],[[195098,195098],"mapped",[40719]],[[195099,195099],"mapped",[40726]],[[195100,195100],"mapped",[40763]],[[195101,195101],"mapped",[173568]],[[195102,196605],"disallowed"],[[196606,196607],"disallowed"],[[196608,262141],"disallowed"],[[262142,262143],"disallowed"],[[262144,327677],"disallowed"],[[327678,327679],"disallowed"],[[327680,393213],"disallowed"],[[393214,393215],"disallowed"],[[393216,458749],"disallowed"],[[458750,458751],"disallowed"],[[458752,524285],"disallowed"],[[524286,524287],"disallowed"],[[524288,589821],"disallowed"],[[589822,589823],"disallowed"],[[589824,655357],"disallowed"],[[655358,655359],"disallowed"],[[655360,720893],"disallowed"],[[720894,720895],"disallowed"],[[720896,786429],"disallowed"],[[786430,786431],"disallowed"],[[786432,851965],"disallowed"],[[851966,851967],"disallowed"],[[851968,917501],"disallowed"],[[917502,917503],"disallowed"],[[917504,917504],"disallowed"],[[917505,917505],"disallowed"],[[917506,917535],"disallowed"],[[917536,917631],"disallowed"],[[917632,917759],"disallowed"],[[917760,917999],"ignored"],[[918000,983037],"disallowed"],[[983038,983039],"disallowed"],[[983040,1048573],"disallowed"],[[1048574,1048575],"disallowed"],[[1048576,1114109],"disallowed"],[[1114110,1114111],"disallowed"]] \ No newline at end of file diff --git a/node_modules/tr46/package.json b/node_modules/tr46/package.json new file mode 100644 index 0000000..b6826da --- /dev/null +++ b/node_modules/tr46/package.json @@ -0,0 +1,31 @@ +{ + "name": "tr46", + "version": "0.0.3", + "description": "An implementation of the Unicode TR46 spec", + "main": "index.js", + "scripts": { + "test": "mocha", + "pretest": "node scripts/getLatestUnicodeTests.js", + "prepublish": "node scripts/generateMappingTable.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Sebmaster/tr46.js.git" + }, + "keywords": [ + "unicode", + "tr46", + "url", + "whatwg" + ], + "author": "Sebastian Mayr ", + "license": "MIT", + "bugs": { + "url": "https://github.com/Sebmaster/tr46.js/issues" + }, + "homepage": "https://github.com/Sebmaster/tr46.js#readme", + "devDependencies": { + "mocha": "^2.2.5", + "request": "^2.57.0" + } +} diff --git a/node_modules/vite/LICENSE.md b/node_modules/vite/LICENSE.md new file mode 100644 index 0000000..af33d3a --- /dev/null +++ b/node_modules/vite/LICENSE.md @@ -0,0 +1,2406 @@ +# Vite core license +Vite is released under the MIT license: + +MIT License + +Copyright (c) 2019-present, VoidZero Inc. and Vite contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +# Licenses of bundled dependencies +The published Vite artifact additionally contains code with the following licenses: +Apache-2.0, BSD-2-Clause, CC0-1.0, ISC, MIT + +# Bundled dependencies: +## @ampproject/remapping +License: Apache-2.0 +By: Justin Ridgewell +Repository: git+https://github.com/ampproject/remapping.git + +> Apache License +> Version 2.0, January 2004 +> http://www.apache.org/licenses/ +> +> TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +> +> 1. Definitions. +> +> "License" shall mean the terms and conditions for use, reproduction, +> and distribution as defined by Sections 1 through 9 of this document. +> +> "Licensor" shall mean the copyright owner or entity authorized by +> the copyright owner that is granting the License. +> +> "Legal Entity" shall mean the union of the acting entity and all +> other entities that control, are controlled by, or are under common +> control with that entity. For the purposes of this definition, +> "control" means (i) the power, direct or indirect, to cause the +> direction or management of such entity, whether by contract or +> otherwise, or (ii) ownership of fifty percent (50%) or more of the +> outstanding shares, or (iii) beneficial ownership of such entity. +> +> "You" (or "Your") shall mean an individual or Legal Entity +> exercising permissions granted by this License. +> +> "Source" form shall mean the preferred form for making modifications, +> including but not limited to software source code, documentation +> source, and configuration files. +> +> "Object" form shall mean any form resulting from mechanical +> transformation or translation of a Source form, including but +> not limited to compiled object code, generated documentation, +> and conversions to other media types. +> +> "Work" shall mean the work of authorship, whether in Source or +> Object form, made available under the License, as indicated by a +> copyright notice that is included in or attached to the work +> (an example is provided in the Appendix below). +> +> "Derivative Works" shall mean any work, whether in Source or Object +> form, that is based on (or derived from) the Work and for which the +> editorial revisions, annotations, elaborations, or other modifications +> represent, as a whole, an original work of authorship. For the purposes +> of this License, Derivative Works shall not include works that remain +> separable from, or merely link (or bind by name) to the interfaces of, +> the Work and Derivative Works thereof. +> +> "Contribution" shall mean any work of authorship, including +> the original version of the Work and any modifications or additions +> to that Work or Derivative Works thereof, that is intentionally +> submitted to Licensor for inclusion in the Work by the copyright owner +> or by an individual or Legal Entity authorized to submit on behalf of +> the copyright owner. For the purposes of this definition, "submitted" +> means any form of electronic, verbal, or written communication sent +> to the Licensor or its representatives, including but not limited to +> communication on electronic mailing lists, source code control systems, +> and issue tracking systems that are managed by, or on behalf of, the +> Licensor for the purpose of discussing and improving the Work, but +> excluding communication that is conspicuously marked or otherwise +> designated in writing by the copyright owner as "Not a Contribution." +> +> "Contributor" shall mean Licensor and any individual or Legal Entity +> on behalf of whom a Contribution has been received by Licensor and +> subsequently incorporated within the Work. +> +> 2. Grant of Copyright License. Subject to the terms and conditions of +> this License, each Contributor hereby grants to You a perpetual, +> worldwide, non-exclusive, no-charge, royalty-free, irrevocable +> copyright license to reproduce, prepare Derivative Works of, +> publicly display, publicly perform, sublicense, and distribute the +> Work and such Derivative Works in Source or Object form. +> +> 3. Grant of Patent License. Subject to the terms and conditions of +> this License, each Contributor hereby grants to You a perpetual, +> worldwide, non-exclusive, no-charge, royalty-free, irrevocable +> (except as stated in this section) patent license to make, have made, +> use, offer to sell, sell, import, and otherwise transfer the Work, +> where such license applies only to those patent claims licensable +> by such Contributor that are necessarily infringed by their +> Contribution(s) alone or by combination of their Contribution(s) +> with the Work to which such Contribution(s) was submitted. If You +> institute patent litigation against any entity (including a +> cross-claim or counterclaim in a lawsuit) alleging that the Work +> or a Contribution incorporated within the Work constitutes direct +> or contributory patent infringement, then any patent licenses +> granted to You under this License for that Work shall terminate +> as of the date such litigation is filed. +> +> 4. Redistribution. You may reproduce and distribute copies of the +> Work or Derivative Works thereof in any medium, with or without +> modifications, and in Source or Object form, provided that You +> meet the following conditions: +> +> (a) You must give any other recipients of the Work or +> Derivative Works a copy of this License; and +> +> (b) You must cause any modified files to carry prominent notices +> stating that You changed the files; and +> +> (c) You must retain, in the Source form of any Derivative Works +> that You distribute, all copyright, patent, trademark, and +> attribution notices from the Source form of the Work, +> excluding those notices that do not pertain to any part of +> the Derivative Works; and +> +> (d) If the Work includes a "NOTICE" text file as part of its +> distribution, then any Derivative Works that You distribute must +> include a readable copy of the attribution notices contained +> within such NOTICE file, excluding those notices that do not +> pertain to any part of the Derivative Works, in at least one +> of the following places: within a NOTICE text file distributed +> as part of the Derivative Works; within the Source form or +> documentation, if provided along with the Derivative Works; or, +> within a display generated by the Derivative Works, if and +> wherever such third-party notices normally appear. The contents +> of the NOTICE file are for informational purposes only and +> do not modify the License. You may add Your own attribution +> notices within Derivative Works that You distribute, alongside +> or as an addendum to the NOTICE text from the Work, provided +> that such additional attribution notices cannot be construed +> as modifying the License. +> +> You may add Your own copyright statement to Your modifications and +> may provide additional or different license terms and conditions +> for use, reproduction, or distribution of Your modifications, or +> for any such Derivative Works as a whole, provided Your use, +> reproduction, and distribution of the Work otherwise complies with +> the conditions stated in this License. +> +> 5. Submission of Contributions. Unless You explicitly state otherwise, +> any Contribution intentionally submitted for inclusion in the Work +> by You to the Licensor shall be under the terms and conditions of +> this License, without any additional terms or conditions. +> Notwithstanding the above, nothing herein shall supersede or modify +> the terms of any separate license agreement you may have executed +> with Licensor regarding such Contributions. +> +> 6. Trademarks. This License does not grant permission to use the trade +> names, trademarks, service marks, or product names of the Licensor, +> except as required for reasonable and customary use in describing the +> origin of the Work and reproducing the content of the NOTICE file. +> +> 7. Disclaimer of Warranty. Unless required by applicable law or +> agreed to in writing, Licensor provides the Work (and each +> Contributor provides its Contributions) on an "AS IS" BASIS, +> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +> implied, including, without limitation, any warranties or conditions +> of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +> PARTICULAR PURPOSE. You are solely responsible for determining the +> appropriateness of using or redistributing the Work and assume any +> risks associated with Your exercise of permissions under this License. +> +> 8. Limitation of Liability. In no event and under no legal theory, +> whether in tort (including negligence), contract, or otherwise, +> unless required by applicable law (such as deliberate and grossly +> negligent acts) or agreed to in writing, shall any Contributor be +> liable to You for damages, including any direct, indirect, special, +> incidental, or consequential damages of any character arising as a +> result of this License or out of the use or inability to use the +> Work (including but not limited to damages for loss of goodwill, +> work stoppage, computer failure or malfunction, or any and all +> other commercial damages or losses), even if such Contributor +> has been advised of the possibility of such damages. +> +> 9. Accepting Warranty or Additional Liability. While redistributing +> the Work or Derivative Works thereof, You may choose to offer, +> and charge a fee for, acceptance of support, warranty, indemnity, +> or other liability obligations and/or rights consistent with this +> License. However, in accepting such obligations, You may act only +> on Your own behalf and on Your sole responsibility, not on behalf +> of any other Contributor, and only if You agree to indemnify, +> defend, and hold each Contributor harmless for any liability +> incurred by, or claims asserted against, such Contributor by reason +> of your accepting any such warranty or additional liability. +> +> END OF TERMS AND CONDITIONS +> +> APPENDIX: How to apply the Apache License to your work. +> +> To apply the Apache License to your work, attach the following +> boilerplate notice, with the fields enclosed by brackets "[]" +> replaced with your own identifying information. (Don't include +> the brackets!) The text should be enclosed in the appropriate +> comment syntax for the file format. We also recommend that a +> file or class name and description of purpose be included on the +> same "printed page" as the copyright notice for easier +> identification within third-party archives. +> +> Copyright [yyyy] [name of copyright owner] +> +> Licensed under the Apache License, Version 2.0 (the "License"); +> you may not use this file except in compliance with the License. +> You may obtain a copy of the License at +> +> http://www.apache.org/licenses/LICENSE-2.0 +> +> Unless required by applicable law or agreed to in writing, software +> distributed under the License is distributed on an "AS IS" BASIS, +> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +> See the License for the specific language governing permissions and +> limitations under the License. + +--------------------------------------- + +## @jridgewell/gen-mapping, @jridgewell/set-array +License: MIT +By: Justin Ridgewell +Repositories: https://github.com/jridgewell/gen-mapping, https://github.com/jridgewell/set-array + +> Copyright 2022 Justin Ridgewell +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. + +--------------------------------------- + +## @jridgewell/resolve-uri +License: MIT +By: Justin Ridgewell +Repository: https://github.com/jridgewell/resolve-uri + +> Copyright 2019 Justin Ridgewell +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. + +--------------------------------------- + +## @jridgewell/sourcemap-codec +License: MIT +By: Rich Harris +Repository: git+https://github.com/jridgewell/sourcemap-codec.git + +> The MIT License +> +> Copyright (c) 2015 Rich Harris +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## @jridgewell/trace-mapping +License: MIT +By: Justin Ridgewell +Repository: git+https://github.com/jridgewell/trace-mapping.git + +> Copyright 2022 Justin Ridgewell +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. + +--------------------------------------- + +## @polka/compression +License: MIT +Repository: lukeed/polka + +--------------------------------------- + +## @polka/url +License: MIT +By: Luke Edwards +Repository: lukeed/polka + +--------------------------------------- + +## @rollup/plugin-alias, @rollup/plugin-commonjs, @rollup/plugin-dynamic-import-vars, @rollup/pluginutils +License: MIT +By: Johannes Stein +Repository: rollup/plugins + +License: MIT +By: Rich Harris +Repository: rollup/plugins + +License: MIT +By: LarsDenBakker +Repository: rollup/plugins + +License: MIT +By: Rich Harris +Repository: rollup/plugins + +> The MIT License (MIT) +> +> Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## anymatch +License: ISC +By: Elan Shanker +Repository: https://github.com/micromatch/anymatch + +> The ISC License +> +> Copyright (c) 2019 Elan Shanker, Paul Miller (https://paulmillr.com) +> +> Permission to use, copy, modify, and/or distribute this software for any +> purpose with or without fee is hereby granted, provided that the above +> copyright notice and this permission notice appear in all copies. +> +> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +--------------------------------------- + +## artichokie +License: MIT +By: sapphi-red, Evan You +Repository: git+https://github.com/sapphi-red/artichokie.git + +> MIT License +> +> Copyright (c) 2020-present, Yuxi (Evan) You +> Copyright (c) 2023-present, sapphi-red +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. + +--------------------------------------- + +## binary-extensions +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/binary-extensions + +> MIT License +> +> Copyright (c) Sindre Sorhus (https://sindresorhus.com) +> Copyright (c) Paul Miller (https://paulmillr.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## braces, fill-range, is-number +License: MIT +By: Jon Schlinkert, Brian Woodward, Elan Shanker, Eugene Sharygin, hemanth.hm +Repository: micromatch/braces + +License: MIT +By: Jon Schlinkert, Edo Rivai, Paul Miller, Rouven Weßling +Repository: jonschlinkert/fill-range + +License: MIT +By: Jon Schlinkert, Olsten Larck, Rouven Weßling +Repository: jonschlinkert/is-number + +> The MIT License (MIT) +> +> Copyright (c) 2014-present, Jon Schlinkert. +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## bundle-name, default-browser, default-browser-id, define-lazy-prop, is-docker, is-inside-container, is-wsl, open, run-applescript +License: MIT +By: Sindre Sorhus +Repositories: sindresorhus/bundle-name, sindresorhus/default-browser, sindresorhus/default-browser-id, sindresorhus/define-lazy-prop, sindresorhus/is-docker, sindresorhus/is-inside-container, sindresorhus/is-wsl, sindresorhus/open, sindresorhus/run-applescript + +> MIT License +> +> Copyright (c) Sindre Sorhus (https://sindresorhus.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## cac +License: MIT +By: egoist +Repository: egoist/cac + +> The MIT License (MIT) +> +> Copyright (c) EGOIST <0x142857@gmail.com> (https://github.com/egoist) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## chokidar +License: MIT +By: Paul Miller, Elan Shanker +Repository: git+https://github.com/paulmillr/chokidar.git + +> The MIT License (MIT) +> +> Copyright (c) 2012-2019 Paul Miller (https://paulmillr.com), Elan Shanker +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the “Software”), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## commondir, shell-quote +License: MIT +By: James Halliday +Repositories: http://github.com/substack/node-commondir.git, http://github.com/ljharb/shell-quote.git + +> The MIT License +> +> Copyright (c) 2013 James Halliday (mail@substack.net) +> +> Permission is hereby granted, free of charge, +> to any person obtaining a copy of this software and +> associated documentation files (the "Software"), to +> deal in the Software without restriction, including +> without limitation the rights to use, copy, modify, +> merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom +> the Software is furnished to do so, +> subject to the following conditions: +> +> The above copyright notice and this permission notice +> shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +> OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +> ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## connect +License: MIT +By: TJ Holowaychuk, Douglas Christopher Wilson, Jonathan Ong, Tim Caswell +Repository: senchalabs/connect + +> (The MIT License) +> +> Copyright (c) 2010 Sencha Inc. +> Copyright (c) 2011 LearnBoost +> Copyright (c) 2011-2014 TJ Holowaychuk +> Copyright (c) 2015 Douglas Christopher Wilson +> +> Permission is hereby granted, free of charge, to any person obtaining +> a copy of this software and associated documentation files (the +> 'Software'), to deal in the Software without restriction, including +> without limitation the rights to use, copy, modify, merge, publish, +> distribute, sublicense, and/or sell copies of the Software, and to +> permit persons to whom the Software is furnished to do so, subject to +> the following conditions: +> +> The above copyright notice and this permission notice shall be +> included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## convert-source-map +License: MIT +By: Thorsten Lorenz +Repository: git://github.com/thlorenz/convert-source-map.git + +> Copyright 2013 Thorsten Lorenz. +> All rights reserved. +> +> Permission is hereby granted, free of charge, to any person +> obtaining a copy of this software and associated documentation +> files (the "Software"), to deal in the Software without +> restriction, including without limitation the rights to use, +> copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the +> Software is furnished to do so, subject to the following +> conditions: +> +> The above copyright notice and this permission notice shall be +> included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +> OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +> HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +> WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +> FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +> OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## cors +License: MIT +By: Troy Goode +Repository: expressjs/cors + +> (The MIT License) +> +> Copyright (c) 2013 Troy Goode +> +> Permission is hereby granted, free of charge, to any person obtaining +> a copy of this software and associated documentation files (the +> 'Software'), to deal in the Software without restriction, including +> without limitation the rights to use, copy, modify, merge, publish, +> distribute, sublicense, and/or sell copies of the Software, and to +> permit persons to whom the Software is furnished to do so, subject to +> the following conditions: +> +> The above copyright notice and this permission notice shall be +> included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## cross-spawn +License: MIT +By: André Cruz +Repository: git@github.com:moxystudio/node-cross-spawn.git + +> The MIT License (MIT) +> +> Copyright (c) 2018 Made With MOXY Lda +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## cssesc +License: MIT +By: Mathias Bynens +Repository: https://github.com/mathiasbynens/cssesc.git + +> Copyright Mathias Bynens +> +> Permission is hereby granted, free of charge, to any person obtaining +> a copy of this software and associated documentation files (the +> "Software"), to deal in the Software without restriction, including +> without limitation the rights to use, copy, modify, merge, publish, +> distribute, sublicense, and/or sell copies of the Software, and to +> permit persons to whom the Software is furnished to do so, subject to +> the following conditions: +> +> The above copyright notice and this permission notice shall be +> included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +> OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +> WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## debug +License: MIT +By: Josh Junon, TJ Holowaychuk, Nathan Rajlich, Andrew Rhyne +Repository: git://github.com/debug-js/debug.git + +> (The MIT License) +> +> Copyright (c) 2014-2017 TJ Holowaychuk +> Copyright (c) 2018-2021 Josh Junon +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software +> and associated documentation files (the 'Software'), to deal in the Software without restriction, +> including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +> and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +> subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial +> portions of the Software. +> +> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +> LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +> WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## dotenv +License: BSD-2-Clause +Repository: git://github.com/motdotla/dotenv.git + +> Copyright (c) 2015, Scott Motte +> All rights reserved. +> +> Redistribution and use in source and binary forms, with or without +> modification, are permitted provided that the following conditions are met: +> +> * Redistributions of source code must retain the above copyright notice, this +> list of conditions and the following disclaimer. +> +> * Redistributions in binary form must reproduce the above copyright notice, +> this list of conditions and the following disclaimer in the documentation +> and/or other materials provided with the distribution. +> +> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +> AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +> IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +> DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +> FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +> DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +> SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +> OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +> OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--------------------------------------- + +## dotenv-expand +License: BSD-2-Clause +By: motdotla +Repository: https://github.com/motdotla/dotenv-expand + +> Copyright (c) 2016, Scott Motte +> All rights reserved. +> +> Redistribution and use in source and binary forms, with or without +> modification, are permitted provided that the following conditions are met: +> +> * Redistributions of source code must retain the above copyright notice, this +> list of conditions and the following disclaimer. +> +> * Redistributions in binary form must reproduce the above copyright notice, +> this list of conditions and the following disclaimer in the documentation +> and/or other materials provided with the distribution. +> +> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +> AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +> IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +> DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +> FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +> DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +> SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +> OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +> OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--------------------------------------- + +## ee-first +License: MIT +By: Jonathan Ong, Douglas Christopher Wilson +Repository: jonathanong/ee-first + +> The MIT License (MIT) +> +> Copyright (c) 2014 Jonathan Ong me@jongleberry.com +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## encodeurl +License: MIT +By: Douglas Christopher Wilson +Repository: pillarjs/encodeurl + +> (The MIT License) +> +> Copyright (c) 2016 Douglas Christopher Wilson +> +> Permission is hereby granted, free of charge, to any person obtaining +> a copy of this software and associated documentation files (the +> 'Software'), to deal in the Software without restriction, including +> without limitation the rights to use, copy, modify, merge, publish, +> distribute, sublicense, and/or sell copies of the Software, and to +> permit persons to whom the Software is furnished to do so, subject to +> the following conditions: +> +> The above copyright notice and this permission notice shall be +> included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## entities +License: BSD-2-Clause +By: Felix Boehm +Repository: git://github.com/fb55/entities.git + +> Copyright (c) Felix Böhm +> All rights reserved. +> +> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +> +> Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +> +> Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +> +> THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS, +> EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--------------------------------------- + +## es-module-lexer +License: MIT +By: Guy Bedford +Repository: git+https://github.com/guybedford/es-module-lexer.git + +> MIT License +> ----------- +> +> Copyright (C) 2018-2022 Guy Bedford +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## escape-html +License: MIT +Repository: component/escape-html + +> (The MIT License) +> +> Copyright (c) 2012-2013 TJ Holowaychuk +> Copyright (c) 2015 Andreas Lubbe +> Copyright (c) 2015 Tiancheng "Timothy" Gu +> +> Permission is hereby granted, free of charge, to any person obtaining +> a copy of this software and associated documentation files (the +> 'Software'), to deal in the Software without restriction, including +> without limitation the rights to use, copy, modify, merge, publish, +> distribute, sublicense, and/or sell copies of the Software, and to +> permit persons to whom the Software is furnished to do so, subject to +> the following conditions: +> +> The above copyright notice and this permission notice shall be +> included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## estree-walker +License: MIT +By: Rich Harris +Repository: https://github.com/Rich-Harris/estree-walker + +> Copyright (c) 2015-20 [these people](https://github.com/Rich-Harris/estree-walker/graphs/contributors) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## etag +License: MIT +By: Douglas Christopher Wilson, David Björklund +Repository: jshttp/etag + +> (The MIT License) +> +> Copyright (c) 2014-2016 Douglas Christopher Wilson +> +> Permission is hereby granted, free of charge, to any person obtaining +> a copy of this software and associated documentation files (the +> 'Software'), to deal in the Software without restriction, including +> without limitation the rights to use, copy, modify, merge, publish, +> distribute, sublicense, and/or sell copies of the Software, and to +> permit persons to whom the Software is furnished to do so, subject to +> the following conditions: +> +> The above copyright notice and this permission notice shall be +> included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## eventemitter3 +License: MIT +By: Arnout Kazemier +Repository: git://github.com/primus/eventemitter3.git + +> The MIT License (MIT) +> +> Copyright (c) 2014 Arnout Kazemier +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. + +--------------------------------------- + +## finalhandler +License: MIT +By: Douglas Christopher Wilson +Repository: pillarjs/finalhandler + +> (The MIT License) +> +> Copyright (c) 2014-2017 Douglas Christopher Wilson +> +> Permission is hereby granted, free of charge, to any person obtaining +> a copy of this software and associated documentation files (the +> 'Software'), to deal in the Software without restriction, including +> without limitation the rights to use, copy, modify, merge, publish, +> distribute, sublicense, and/or sell copies of the Software, and to +> permit persons to whom the Software is furnished to do so, subject to +> the following conditions: +> +> The above copyright notice and this permission notice shall be +> included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## follow-redirects +License: MIT +By: Ruben Verborgh, Olivier Lalonde, James Talmage +Repository: git+ssh://git@github.com/follow-redirects/follow-redirects.git + +> Copyright 2014–present Olivier Lalonde , James Talmage , Ruben Verborgh +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of +> this software and associated documentation files (the "Software"), to deal in +> the Software without restriction, including without limitation the rights to +> use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +> of the Software, and to permit persons to whom the Software is furnished to do +> so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +> WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +> IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## generic-names +License: MIT +By: Alexey Litvinov +Repository: git+https://github.com/css-modules/generic-names.git + +> The MIT License (MIT) +> +> Copyright (c) 2015 Alexey Litvinov +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. + +--------------------------------------- + +## glob-parent +License: ISC +By: Gulp Team, Elan Shanker, Blaine Bublitz +Repository: gulpjs/glob-parent + +> The ISC License +> +> Copyright (c) 2015, 2019 Elan Shanker +> +> Permission to use, copy, modify, and/or distribute this software for any +> purpose with or without fee is hereby granted, provided that the above +> copyright notice and this permission notice appear in all copies. +> +> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +--------------------------------------- + +## http-proxy +License: MIT +By: Charlie Robbins, jcrugzz +Repository: https://github.com/http-party/node-http-proxy.git + +> node-http-proxy +> +> Copyright (c) 2010-2016 Charlie Robbins, Jarrett Cruger & the Contributors. +> +> Permission is hereby granted, free of charge, to any person obtaining +> a copy of this software and associated documentation files (the +> "Software"), to deal in the Software without restriction, including +> without limitation the rights to use, copy, modify, merge, publish, +> distribute, sublicense, and/or sell copies of the Software, and to +> permit persons to whom the Software is furnished to do so, subject to +> the following conditions: +> +> The above copyright notice and this permission notice shall be +> included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +> OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +> WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## icss-utils +License: ISC +By: Glen Maddern +Repository: git+https://github.com/css-modules/icss-utils.git + +> ISC License (ISC) +> Copyright 2018 Glen Maddern +> +> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. +> +> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +--------------------------------------- + +## is-binary-path +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/is-binary-path + +> MIT License +> +> Copyright (c) 2019 Sindre Sorhus (https://sindresorhus.com), Paul Miller (https://paulmillr.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## is-extglob +License: MIT +By: Jon Schlinkert +Repository: jonschlinkert/is-extglob + +> The MIT License (MIT) +> +> Copyright (c) 2014-2016, Jon Schlinkert +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## is-glob +License: MIT +By: Jon Schlinkert, Brian Woodward, Daniel Perez +Repository: micromatch/is-glob + +> The MIT License (MIT) +> +> Copyright (c) 2014-2017, Jon Schlinkert. +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## is-reference +License: MIT +By: Rich Harris +Repository: git+https://github.com/Rich-Harris/is-reference.git + +--------------------------------------- + +## isexe, which +License: ISC +By: Isaac Z. Schlueter +Repositories: git+https://github.com/isaacs/isexe.git, git://github.com/isaacs/node-which.git + +> The ISC License +> +> Copyright (c) Isaac Z. Schlueter and Contributors +> +> Permission to use, copy, modify, and/or distribute this software for any +> purpose with or without fee is hereby granted, provided that the above +> copyright notice and this permission notice appear in all copies. +> +> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +--------------------------------------- + +## js-tokens +License: MIT +By: Simon Lydell +Repository: lydell/js-tokens + +> The MIT License (MIT) +> +> Copyright (c) 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 Simon Lydell +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## launch-editor, launch-editor-middleware +License: MIT +By: Evan You +Repositories: git+https://github.com/yyx990803/launch-editor.git, git+https://github.com/yyx990803/launch-editor.git + +> The MIT License (MIT) +> +> Copyright (c) 2017-present, Yuxi (Evan) You +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## lilconfig +License: MIT +By: antonk52 +Repository: https://github.com/antonk52/lilconfig + +> MIT License +> +> Copyright (c) 2022 Anton Kastritskiy +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. + +--------------------------------------- + +## loader-utils +License: MIT +By: Tobias Koppers @sokra +Repository: https://github.com/webpack/loader-utils.git + +> Copyright JS Foundation and other contributors +> +> Permission is hereby granted, free of charge, to any person obtaining +> a copy of this software and associated documentation files (the +> 'Software'), to deal in the Software without restriction, including +> without limitation the rights to use, copy, modify, merge, publish, +> distribute, sublicense, and/or sell copies of the Software, and to +> permit persons to whom the Software is furnished to do so, subject to +> the following conditions: +> +> The above copyright notice and this permission notice shall be +> included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## lodash.camelcase +License: MIT +By: John-David Dalton, Blaine Bublitz, Mathias Bynens +Repository: lodash/lodash + +> Copyright jQuery Foundation and other contributors +> +> Based on Underscore.js, copyright Jeremy Ashkenas, +> DocumentCloud and Investigative Reporters & Editors +> +> This software consists of voluntary contributions made by many +> individuals. For exact contribution history, see the revision history +> available at https://github.com/lodash/lodash +> +> The following license applies to all parts of this software except as +> documented below: +> +> ==== +> +> Permission is hereby granted, free of charge, to any person obtaining +> a copy of this software and associated documentation files (the +> "Software"), to deal in the Software without restriction, including +> without limitation the rights to use, copy, modify, merge, publish, +> distribute, sublicense, and/or sell copies of the Software, and to +> permit persons to whom the Software is furnished to do so, subject to +> the following conditions: +> +> The above copyright notice and this permission notice shall be +> included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +> OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +> WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +> +> ==== +> +> Copyright and related rights for sample code are waived via CC0. Sample +> code is defined as all source code displayed within the prose of the +> documentation. +> +> CC0: http://creativecommons.org/publicdomain/zero/1.0/ +> +> ==== +> +> Files located in the node_modules and vendor directories are externally +> maintained libraries used by this software which have their own +> licenses; we recommend you read them, as their terms may differ from the +> terms above. + +--------------------------------------- + +## magic-string +License: MIT +By: Rich Harris +Repository: https://github.com/rich-harris/magic-string + +> Copyright 2018 Rich Harris +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## mlly, ufo +License: MIT +Repositories: unjs/mlly, unjs/ufo + +> MIT License +> +> Copyright (c) Pooya Parsa +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. + +--------------------------------------- + +## mrmime +License: MIT +By: Luke Edwards +Repository: lukeed/mrmime + +> The MIT License (MIT) +> +> Copyright (c) Luke Edwards (https://lukeed.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## ms +License: MIT +Repository: vercel/ms + +> The MIT License (MIT) +> +> Copyright (c) 2020 Vercel, Inc. +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. + +--------------------------------------- + +## normalize-path +License: MIT +By: Jon Schlinkert, Blaine Bublitz +Repository: jonschlinkert/normalize-path + +> The MIT License (MIT) +> +> Copyright (c) 2014-2018, Jon Schlinkert. +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## object-assign +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/object-assign + +> The MIT License (MIT) +> +> Copyright (c) Sindre Sorhus (sindresorhus.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## on-finished +License: MIT +By: Douglas Christopher Wilson, Jonathan Ong +Repository: jshttp/on-finished + +> (The MIT License) +> +> Copyright (c) 2013 Jonathan Ong +> Copyright (c) 2014 Douglas Christopher Wilson +> +> Permission is hereby granted, free of charge, to any person obtaining +> a copy of this software and associated documentation files (the +> 'Software'), to deal in the Software without restriction, including +> without limitation the rights to use, copy, modify, merge, publish, +> distribute, sublicense, and/or sell copies of the Software, and to +> permit persons to whom the Software is furnished to do so, subject to +> the following conditions: +> +> The above copyright notice and this permission notice shall be +> included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## parse5 +License: MIT +By: Ivan Nikulin, https://github.com/inikulin/parse5/graphs/contributors +Repository: git://github.com/inikulin/parse5.git + +> Copyright (c) 2013-2019 Ivan Nikulin (ifaaan@gmail.com, https://github.com/inikulin) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## parseurl +License: MIT +By: Douglas Christopher Wilson, Jonathan Ong +Repository: pillarjs/parseurl + +> (The MIT License) +> +> Copyright (c) 2014 Jonathan Ong +> Copyright (c) 2014-2017 Douglas Christopher Wilson +> +> Permission is hereby granted, free of charge, to any person obtaining +> a copy of this software and associated documentation files (the +> 'Software'), to deal in the Software without restriction, including +> without limitation the rights to use, copy, modify, merge, publish, +> distribute, sublicense, and/or sell copies of the Software, and to +> permit persons to whom the Software is furnished to do so, subject to +> the following conditions: +> +> The above copyright notice and this permission notice shall be +> included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## path-key, shebang-regex +License: MIT +By: Sindre Sorhus +Repositories: sindresorhus/path-key, sindresorhus/shebang-regex + +> MIT License +> +> Copyright (c) Sindre Sorhus (sindresorhus.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## periscopic +License: MIT +Repository: Rich-Harris/periscopic + +> Copyright (c) 2019 Rich Harris +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## picocolors +License: ISC +By: Alexey Raspopov +Repository: alexeyraspopov/picocolors + +> ISC License +> +> Copyright (c) 2021-2024 Oleksii Raspopov, Kostiantyn Denysov, Anton Verinov +> +> Permission to use, copy, modify, and/or distribute this software for any +> purpose with or without fee is hereby granted, provided that the above +> copyright notice and this permission notice appear in all copies. +> +> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +> OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +--------------------------------------- + +## postcss-import +License: MIT +By: Maxime Thirouin +Repository: https://github.com/postcss/postcss-import.git + +> The MIT License (MIT) +> +> Copyright (c) 2014 Maxime Thirouin, Jason Campbell & Kevin Mårtensson +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of +> this software and associated documentation files (the "Software"), to deal in +> the Software without restriction, including without limitation the rights to +> use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +> the Software, and to permit persons to whom the Software is furnished to do so, +> subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +> FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +> COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +> IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +> CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## postcss-load-config +License: MIT +By: Michael Ciniawky, Ryan Dunckel, Mateusz Derks, Dalton Santos, Patrick Gilday, François Wouts +Repository: postcss/postcss-load-config + +> The MIT License (MIT) +> +> Copyright Michael Ciniawsky +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of +> this software and associated documentation files (the "Software"), to deal in +> the Software without restriction, including without limitation the rights to +> use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +> the Software, and to permit persons to whom the Software is furnished to do so, +> subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +> FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +> COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +> IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +> CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## postcss-modules +License: MIT +By: Alexander Madyankin +Repository: https://github.com/css-modules/postcss-modules.git + +> The MIT License (MIT) +> +> Copyright 2015-present Alexander Madyankin +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of +> this software and associated documentation files (the "Software"), to deal in +> the Software without restriction, including without limitation the rights to +> use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +> the Software, and to permit persons to whom the Software is furnished to do so, +> subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +> FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +> COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +> IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +> CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## postcss-modules-extract-imports +License: ISC +By: Glen Maddern +Repository: https://github.com/css-modules/postcss-modules-extract-imports.git + +> Copyright 2015 Glen Maddern +> +> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. +> +> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +--------------------------------------- + +## postcss-modules-local-by-default +License: MIT +By: Mark Dalgleish +Repository: https://github.com/css-modules/postcss-modules-local-by-default.git + +> The MIT License (MIT) +> +> Copyright 2015 Mark Dalgleish +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of +> this software and associated documentation files (the "Software"), to deal in +> the Software without restriction, including without limitation the rights to +> use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +> the Software, and to permit persons to whom the Software is furnished to do so, +> subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +> FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +> COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +> IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +> CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## postcss-modules-scope +License: ISC +By: Glen Maddern +Repository: https://github.com/css-modules/postcss-modules-scope.git + +> ISC License (ISC) +> +> Copyright (c) 2015, Glen Maddern +> +> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. +> +> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +--------------------------------------- + +## postcss-modules-values +License: ISC +By: Glen Maddern +Repository: git+https://github.com/css-modules/postcss-modules-values.git + +> ISC License (ISC) +> +> Copyright (c) 2015, Glen Maddern +> +> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. +> +> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +--------------------------------------- + +## postcss-selector-parser +License: MIT +By: Ben Briggs, Chris Eppstein +Repository: postcss/postcss-selector-parser + +> Copyright (c) Ben Briggs (http://beneb.info) +> +> Permission is hereby granted, free of charge, to any person +> obtaining a copy of this software and associated documentation +> files (the "Software"), to deal in the Software without +> restriction, including without limitation the rights to use, +> copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the +> Software is furnished to do so, subject to the following +> conditions: +> +> The above copyright notice and this permission notice shall be +> included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +> OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +> HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +> WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +> FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +> OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## postcss-value-parser +License: MIT +By: Bogdan Chadkin +Repository: https://github.com/TrySound/postcss-value-parser.git + +> Copyright (c) Bogdan Chadkin +> +> Permission is hereby granted, free of charge, to any person +> obtaining a copy of this software and associated documentation +> files (the "Software"), to deal in the Software without +> restriction, including without limitation the rights to use, +> copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the +> Software is furnished to do so, subject to the following +> conditions: +> +> The above copyright notice and this permission notice shall be +> included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +> OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +> HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +> WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +> FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +> OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## readdirp +License: MIT +By: Thorsten Lorenz, Paul Miller +Repository: git://github.com/paulmillr/readdirp.git + +> MIT License +> +> Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. + +--------------------------------------- + +## requires-port +License: MIT +By: Arnout Kazemier +Repository: https://github.com/unshiftio/requires-port + +> The MIT License (MIT) +> +> Copyright (c) 2015 Unshift.io, Arnout Kazemier, the Contributors. +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. + +--------------------------------------- + +## resolve.exports, totalist +License: MIT +By: Luke Edwards +Repositories: lukeed/resolve.exports, lukeed/totalist + +> The MIT License (MIT) +> +> Copyright (c) Luke Edwards (lukeed.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## shebang-command +License: MIT +By: Kevin Mårtensson +Repository: kevva/shebang-command + +> MIT License +> +> Copyright (c) Kevin Mårtensson (github.com/kevva) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## sirv +License: MIT +By: Luke Edwards +Repository: lukeed/sirv + +--------------------------------------- + +## statuses +License: MIT +By: Douglas Christopher Wilson, Jonathan Ong +Repository: jshttp/statuses + +> The MIT License (MIT) +> +> Copyright (c) 2014 Jonathan Ong +> Copyright (c) 2016 Douglas Christopher Wilson +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## string-hash +License: CC0-1.0 +By: The Dark Sky Company +Repository: git://github.com/darkskyapp/string-hash.git + +--------------------------------------- + +## strip-literal +License: MIT +By: Anthony Fu +Repository: git+https://github.com/antfu/strip-literal.git + +> MIT License +> +> Copyright (c) 2022 Anthony Fu +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. + +--------------------------------------- + +## to-regex-range +License: MIT +By: Jon Schlinkert, Rouven Weßling +Repository: micromatch/to-regex-range + +> The MIT License (MIT) +> +> Copyright (c) 2015-present, Jon Schlinkert. +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## tsconfck +License: MIT +By: dominikg +Repository: git+https://github.com/dominikg/tsconfck.git + +> MIT License +> +> Copyright (c) 2021-present dominikg and [contributors](https://github.com/dominikg/tsconfck/graphs/contributors) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. +> +> -- Licenses for 3rd-party code included in tsconfck -- +> +> # strip-bom and strip-json-comments +> MIT License +> +> Copyright (c) Sindre Sorhus (https://sindresorhus.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. + +--------------------------------------- + +## unpipe +License: MIT +By: Douglas Christopher Wilson +Repository: stream-utils/unpipe + +> (The MIT License) +> +> Copyright (c) 2015 Douglas Christopher Wilson +> +> Permission is hereby granted, free of charge, to any person obtaining +> a copy of this software and associated documentation files (the +> 'Software'), to deal in the Software without restriction, including +> without limitation the rights to use, copy, modify, merge, publish, +> distribute, sublicense, and/or sell copies of the Software, and to +> permit persons to whom the Software is furnished to do so, subject to +> the following conditions: +> +> The above copyright notice and this permission notice shall be +> included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## util-deprecate +License: MIT +By: Nathan Rajlich +Repository: git://github.com/TooTallNate/util-deprecate.git + +> (The MIT License) +> +> Copyright (c) 2014 Nathan Rajlich +> +> Permission is hereby granted, free of charge, to any person +> obtaining a copy of this software and associated documentation +> files (the "Software"), to deal in the Software without +> restriction, including without limitation the rights to use, +> copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the +> Software is furnished to do so, subject to the following +> conditions: +> +> The above copyright notice and this permission notice shall be +> included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +> OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +> HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +> WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +> FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +> OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## utils-merge +License: MIT +By: Jared Hanson +Repository: git://github.com/jaredhanson/utils-merge.git + +> The MIT License (MIT) +> +> Copyright (c) 2013-2017 Jared Hanson +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of +> this software and associated documentation files (the "Software"), to deal in +> the Software without restriction, including without limitation the rights to +> use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +> the Software, and to permit persons to whom the Software is furnished to do so, +> subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +> FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +> COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +> IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +> CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## vary +License: MIT +By: Douglas Christopher Wilson +Repository: jshttp/vary + +> (The MIT License) +> +> Copyright (c) 2014-2017 Douglas Christopher Wilson +> +> Permission is hereby granted, free of charge, to any person obtaining +> a copy of this software and associated documentation files (the +> 'Software'), to deal in the Software without restriction, including +> without limitation the rights to use, copy, modify, merge, publish, +> distribute, sublicense, and/or sell copies of the Software, and to +> permit persons to whom the Software is furnished to do so, subject to +> the following conditions: +> +> The above copyright notice and this permission notice shall be +> included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## ws +License: MIT +By: Einar Otto Stangvik +Repository: git+https://github.com/websockets/ws.git + +> Copyright (c) 2011 Einar Otto Stangvik +> Copyright (c) 2013 Arnout Kazemier and contributors +> Copyright (c) 2016 Luigi Pinca and contributors +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of +> this software and associated documentation files (the "Software"), to deal in +> the Software without restriction, including without limitation the rights to +> use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +> the Software, and to permit persons to whom the Software is furnished to do so, +> subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +> FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +> COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +> IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +> CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/vite/README.md b/node_modules/vite/README.md new file mode 100644 index 0000000..28fb80b --- /dev/null +++ b/node_modules/vite/README.md @@ -0,0 +1,20 @@ +# vite ⚡ + +> Next Generation Frontend Tooling + +- 💡 Instant Server Start +- ⚡️ Lightning Fast HMR +- 🛠️ Rich Features +- 📦 Optimized Build +- 🔩 Universal Plugin Interface +- 🔑 Fully Typed APIs + +Vite (French word for "fast", pronounced `/vit/`) is a new breed of frontend build tool that significantly improves the frontend development experience. It consists of two major parts: + +- A dev server that serves your source files over [native ES modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), with [rich built-in features](https://vite.dev/guide/features.html) and astonishingly fast [Hot Module Replacement (HMR)](https://vite.dev/guide/features.html#hot-module-replacement). + +- A [build command](https://vite.dev/guide/build.html) that bundles your code with [Rollup](https://rollupjs.org), pre-configured to output highly optimized static assets for production. + +In addition, Vite is highly extensible via its [Plugin API](https://vite.dev/guide/api-plugin.html) and [JavaScript API](https://vite.dev/guide/api-javascript.html) with full typing support. + +[Read the Docs to Learn More](https://vite.dev). diff --git a/node_modules/vite/bin/openChrome.applescript b/node_modules/vite/bin/openChrome.applescript new file mode 100644 index 0000000..9ce2293 --- /dev/null +++ b/node_modules/vite/bin/openChrome.applescript @@ -0,0 +1,95 @@ +(* +Copyright (c) 2015-present, Facebook, Inc. + +This source code is licensed under the MIT license found in the +LICENSE file at +https://github.com/facebookincubator/create-react-app/blob/master/LICENSE +*) + +property targetTab: null +property targetTabIndex: -1 +property targetWindow: null +property theProgram: "Google Chrome" + +on run argv + set theURL to item 1 of argv + + -- Allow requested program to be optional, + -- default to Google Chrome + if (count of argv) > 1 then + set theProgram to item 2 of argv + end if + + using terms from application "Google Chrome" + tell application theProgram + + if (count every window) = 0 then + make new window + end if + + -- 1: Looking for tab running debugger + -- then, Reload debugging tab if found + -- then return + set found to my lookupTabWithUrl(theURL) + if found then + set targetWindow's active tab index to targetTabIndex + tell targetTab to reload + tell targetWindow to activate + set index of targetWindow to 1 + return + end if + + -- 2: Looking for Empty tab + -- In case debugging tab was not found + -- We try to find an empty tab instead + set found to my lookupTabWithUrl("chrome://newtab/") + if found then + set targetWindow's active tab index to targetTabIndex + set URL of targetTab to theURL + tell targetWindow to activate + return + end if + + -- 3: Create new tab + -- both debugging and empty tab were not found + -- make a new tab with url + tell window 1 + activate + make new tab with properties {URL:theURL} + end tell + end tell + end using terms from +end run + +-- Function: +-- Lookup tab with given url +-- if found, store tab, index, and window in properties +-- (properties were declared on top of file) +on lookupTabWithUrl(lookupUrl) + using terms from application "Google Chrome" + tell application theProgram + -- Find a tab with the given url + set found to false + set theTabIndex to -1 + repeat with theWindow in every window + set theTabIndex to 0 + repeat with theTab in every tab of theWindow + set theTabIndex to theTabIndex + 1 + if (theTab's URL as string) contains lookupUrl then + -- assign tab, tab index, and window to properties + set targetTab to theTab + set targetTabIndex to theTabIndex + set targetWindow to theWindow + set found to true + exit repeat + end if + end repeat + + if found then + exit repeat + end if + end repeat + end tell + end using terms from + return found +end lookupTabWithUrl diff --git a/node_modules/vite/bin/vite.js b/node_modules/vite/bin/vite.js new file mode 100755 index 0000000..9286da7 --- /dev/null +++ b/node_modules/vite/bin/vite.js @@ -0,0 +1,79 @@ +#!/usr/bin/env node +import { performance } from 'node:perf_hooks' +import module from 'node:module' + +if (!import.meta.url.includes('node_modules')) { + try { + // only available as dev dependency + await import('source-map-support').then((r) => r.default.install()) + } catch {} + + process.on('unhandledRejection', (err) => { + throw new Error('UNHANDLED PROMISE REJECTION', { cause: err }) + }) +} + +global.__vite_start_time = performance.now() + +// check debug mode first before requiring the CLI. +const debugIndex = process.argv.findIndex((arg) => /^(?:-d|--debug)$/.test(arg)) +const filterIndex = process.argv.findIndex((arg) => + /^(?:-f|--filter)$/.test(arg), +) +const profileIndex = process.argv.indexOf('--profile') + +if (debugIndex > 0) { + let value = process.argv[debugIndex + 1] + if (!value || value.startsWith('-')) { + value = 'vite:*' + } else { + // support debugging multiple flags with comma-separated list + value = value + .split(',') + .map((v) => `vite:${v}`) + .join(',') + } + process.env.DEBUG = `${ + process.env.DEBUG ? process.env.DEBUG + ',' : '' + }${value}` + + if (filterIndex > 0) { + const filter = process.argv[filterIndex + 1] + if (filter && !filter.startsWith('-')) { + process.env.VITE_DEBUG_FILTER = filter + } + } +} + +function start() { + try { + // eslint-disable-next-line n/no-unsupported-features/node-builtins -- it is supported in Node 22.8.0+ and only called if it exists + module.enableCompileCache?.() + // flush the cache after 10s because the cache is not flushed until process end + // for dev server, the cache is never flushed unless manually flushed because the process.exit is called + // also flushing the cache in SIGINT handler seems to cause the process to hang + setTimeout(() => { + try { + // eslint-disable-next-line n/no-unsupported-features/node-builtins -- it is supported in Node 22.12.0+ and only called if it exists + module.flushCompileCache?.() + } catch {} + }, 10 * 1000).unref() + } catch {} + return import('../dist/node/cli.js') +} + +if (profileIndex > 0) { + process.argv.splice(profileIndex, 1) + const next = process.argv[profileIndex] + if (next && !next.startsWith('-')) { + process.argv.splice(profileIndex, 1) + } + const inspector = await import('node:inspector').then((r) => r.default) + const session = (global.__vite_profile_session = new inspector.Session()) + session.connect() + session.post('Profiler.enable', () => { + session.post('Profiler.start', start) + }) +} else { + start() +} diff --git a/node_modules/vite/client.d.ts b/node_modules/vite/client.d.ts new file mode 100644 index 0000000..3a9dd88 --- /dev/null +++ b/node_modules/vite/client.d.ts @@ -0,0 +1,279 @@ +/// + +// CSS modules +type CSSModuleClasses = { readonly [key: string]: string } + +declare module '*.module.css' { + const classes: CSSModuleClasses + export default classes +} +declare module '*.module.scss' { + const classes: CSSModuleClasses + export default classes +} +declare module '*.module.sass' { + const classes: CSSModuleClasses + export default classes +} +declare module '*.module.less' { + const classes: CSSModuleClasses + export default classes +} +declare module '*.module.styl' { + const classes: CSSModuleClasses + export default classes +} +declare module '*.module.stylus' { + const classes: CSSModuleClasses + export default classes +} +declare module '*.module.pcss' { + const classes: CSSModuleClasses + export default classes +} +declare module '*.module.sss' { + const classes: CSSModuleClasses + export default classes +} + +// CSS +declare module '*.css' {} +declare module '*.scss' {} +declare module '*.sass' {} +declare module '*.less' {} +declare module '*.styl' {} +declare module '*.stylus' {} +declare module '*.pcss' {} +declare module '*.sss' {} + +// Built-in asset types +// see `src/node/constants.ts` + +// images +declare module '*.apng' { + const src: string + export default src +} +declare module '*.bmp' { + const src: string + export default src +} +declare module '*.png' { + const src: string + export default src +} +declare module '*.jpg' { + const src: string + export default src +} +declare module '*.jpeg' { + const src: string + export default src +} +declare module '*.jfif' { + const src: string + export default src +} +declare module '*.pjpeg' { + const src: string + export default src +} +declare module '*.pjp' { + const src: string + export default src +} +declare module '*.gif' { + const src: string + export default src +} +declare module '*.svg' { + const src: string + export default src +} +declare module '*.ico' { + const src: string + export default src +} +declare module '*.webp' { + const src: string + export default src +} +declare module '*.avif' { + const src: string + export default src +} +declare module '*.cur' { + const src: string + export default src +} +declare module '*.jxl' { + const src: string + export default src +} + +// media +declare module '*.mp4' { + const src: string + export default src +} +declare module '*.webm' { + const src: string + export default src +} +declare module '*.ogg' { + const src: string + export default src +} +declare module '*.mp3' { + const src: string + export default src +} +declare module '*.wav' { + const src: string + export default src +} +declare module '*.flac' { + const src: string + export default src +} +declare module '*.aac' { + const src: string + export default src +} +declare module '*.opus' { + const src: string + export default src +} +declare module '*.mov' { + const src: string + export default src +} +declare module '*.m4a' { + const src: string + export default src +} +declare module '*.vtt' { + const src: string + export default src +} + +// fonts +declare module '*.woff' { + const src: string + export default src +} +declare module '*.woff2' { + const src: string + export default src +} +declare module '*.eot' { + const src: string + export default src +} +declare module '*.ttf' { + const src: string + export default src +} +declare module '*.otf' { + const src: string + export default src +} + +// other +declare module '*.webmanifest' { + const src: string + export default src +} +declare module '*.pdf' { + const src: string + export default src +} +declare module '*.txt' { + const src: string + export default src +} + +// wasm?init +declare module '*.wasm?init' { + const initWasm: ( + options?: WebAssembly.Imports, + ) => Promise + export default initWasm +} + +// web worker +declare module '*?worker' { + const workerConstructor: { + new (options?: { name?: string }): Worker + } + export default workerConstructor +} + +declare module '*?worker&inline' { + const workerConstructor: { + new (options?: { name?: string }): Worker + } + export default workerConstructor +} + +declare module '*?worker&url' { + const src: string + export default src +} + +declare module '*?sharedworker' { + const sharedWorkerConstructor: { + new (options?: { name?: string }): SharedWorker + } + export default sharedWorkerConstructor +} + +declare module '*?sharedworker&inline' { + const sharedWorkerConstructor: { + new (options?: { name?: string }): SharedWorker + } + export default sharedWorkerConstructor +} + +declare module '*?sharedworker&url' { + const src: string + export default src +} + +declare module '*?raw' { + const src: string + export default src +} + +declare module '*?url' { + const src: string + export default src +} + +declare module '*?inline' { + const src: string + export default src +} + +declare module '*?no-inline' { + const src: string + export default src +} + +declare module '*?url&inline' { + const src: string + export default src +} + +declare module '*?url&no-inline' { + const src: string + export default src +} + +declare interface VitePreloadErrorEvent extends Event { + payload: Error +} + +declare interface WindowEventMap { + 'vite:preloadError': VitePreloadErrorEvent +} diff --git a/node_modules/vite/dist/client/client.mjs b/node_modules/vite/dist/client/client.mjs new file mode 100644 index 0000000..e395b72 --- /dev/null +++ b/node_modules/vite/dist/client/client.mjs @@ -0,0 +1,1134 @@ +import '@vite/env'; + +class HMRContext { + constructor(hmrClient, ownerPath) { + this.hmrClient = hmrClient; + this.ownerPath = ownerPath; + if (!hmrClient.dataMap.has(ownerPath)) { + hmrClient.dataMap.set(ownerPath, {}); + } + const mod = hmrClient.hotModulesMap.get(ownerPath); + if (mod) { + mod.callbacks = []; + } + const staleListeners = hmrClient.ctxToListenersMap.get(ownerPath); + if (staleListeners) { + for (const [event, staleFns] of staleListeners) { + const listeners = hmrClient.customListenersMap.get(event); + if (listeners) { + hmrClient.customListenersMap.set( + event, + listeners.filter((l) => !staleFns.includes(l)) + ); + } + } + } + this.newListeners = /* @__PURE__ */ new Map(); + hmrClient.ctxToListenersMap.set(ownerPath, this.newListeners); + } + get data() { + return this.hmrClient.dataMap.get(this.ownerPath); + } + accept(deps, callback) { + if (typeof deps === "function" || !deps) { + this.acceptDeps([this.ownerPath], ([mod]) => deps?.(mod)); + } else if (typeof deps === "string") { + this.acceptDeps([deps], ([mod]) => callback?.(mod)); + } else if (Array.isArray(deps)) { + this.acceptDeps(deps, callback); + } else { + throw new Error(`invalid hot.accept() usage.`); + } + } + // export names (first arg) are irrelevant on the client side, they're + // extracted in the server for propagation + acceptExports(_, callback) { + this.acceptDeps([this.ownerPath], ([mod]) => callback?.(mod)); + } + dispose(cb) { + this.hmrClient.disposeMap.set(this.ownerPath, cb); + } + prune(cb) { + this.hmrClient.pruneMap.set(this.ownerPath, cb); + } + // Kept for backward compatibility (#11036) + // eslint-disable-next-line @typescript-eslint/no-empty-function + decline() { + } + invalidate(message) { + const firstInvalidatedBy = this.hmrClient.currentFirstInvalidatedBy ?? this.ownerPath; + this.hmrClient.notifyListeners("vite:invalidate", { + path: this.ownerPath, + message, + firstInvalidatedBy + }); + this.send("vite:invalidate", { + path: this.ownerPath, + message, + firstInvalidatedBy + }); + this.hmrClient.logger.debug( + `invalidate ${this.ownerPath}${message ? `: ${message}` : ""}` + ); + } + on(event, cb) { + const addToMap = (map) => { + const existing = map.get(event) || []; + existing.push(cb); + map.set(event, existing); + }; + addToMap(this.hmrClient.customListenersMap); + addToMap(this.newListeners); + } + off(event, cb) { + const removeFromMap = (map) => { + const existing = map.get(event); + if (existing === void 0) { + return; + } + const pruned = existing.filter((l) => l !== cb); + if (pruned.length === 0) { + map.delete(event); + return; + } + map.set(event, pruned); + }; + removeFromMap(this.hmrClient.customListenersMap); + removeFromMap(this.newListeners); + } + send(event, data) { + this.hmrClient.send({ type: "custom", event, data }); + } + acceptDeps(deps, callback = () => { + }) { + const mod = this.hmrClient.hotModulesMap.get(this.ownerPath) || { + id: this.ownerPath, + callbacks: [] + }; + mod.callbacks.push({ + deps, + fn: callback + }); + this.hmrClient.hotModulesMap.set(this.ownerPath, mod); + } +} +class HMRClient { + constructor(logger, transport, importUpdatedModule) { + this.logger = logger; + this.transport = transport; + this.importUpdatedModule = importUpdatedModule; + this.hotModulesMap = /* @__PURE__ */ new Map(); + this.disposeMap = /* @__PURE__ */ new Map(); + this.pruneMap = /* @__PURE__ */ new Map(); + this.dataMap = /* @__PURE__ */ new Map(); + this.customListenersMap = /* @__PURE__ */ new Map(); + this.ctxToListenersMap = /* @__PURE__ */ new Map(); + this.updateQueue = []; + this.pendingUpdateQueue = false; + } + async notifyListeners(event, data) { + const cbs = this.customListenersMap.get(event); + if (cbs) { + await Promise.allSettled(cbs.map((cb) => cb(data))); + } + } + send(payload) { + this.transport.send(payload).catch((err) => { + this.logger.error(err); + }); + } + clear() { + this.hotModulesMap.clear(); + this.disposeMap.clear(); + this.pruneMap.clear(); + this.dataMap.clear(); + this.customListenersMap.clear(); + this.ctxToListenersMap.clear(); + } + // After an HMR update, some modules are no longer imported on the page + // but they may have left behind side effects that need to be cleaned up + // (e.g. style injections) + async prunePaths(paths) { + await Promise.all( + paths.map((path) => { + const disposer = this.disposeMap.get(path); + if (disposer) return disposer(this.dataMap.get(path)); + }) + ); + paths.forEach((path) => { + const fn = this.pruneMap.get(path); + if (fn) { + fn(this.dataMap.get(path)); + } + }); + } + warnFailedUpdate(err, path) { + if (!(err instanceof Error) || !err.message.includes("fetch")) { + this.logger.error(err); + } + this.logger.error( + `Failed to reload ${path}. This could be due to syntax errors or importing non-existent modules. (see errors above)` + ); + } + /** + * buffer multiple hot updates triggered by the same src change + * so that they are invoked in the same order they were sent. + * (otherwise the order may be inconsistent because of the http request round trip) + */ + async queueUpdate(payload) { + this.updateQueue.push(this.fetchUpdate(payload)); + if (!this.pendingUpdateQueue) { + this.pendingUpdateQueue = true; + await Promise.resolve(); + this.pendingUpdateQueue = false; + const loading = [...this.updateQueue]; + this.updateQueue = []; + (await Promise.all(loading)).forEach((fn) => fn && fn()); + } + } + async fetchUpdate(update) { + const { path, acceptedPath, firstInvalidatedBy } = update; + const mod = this.hotModulesMap.get(path); + if (!mod) { + return; + } + let fetchedModule; + const isSelfUpdate = path === acceptedPath; + const qualifiedCallbacks = mod.callbacks.filter( + ({ deps }) => deps.includes(acceptedPath) + ); + if (isSelfUpdate || qualifiedCallbacks.length > 0) { + const disposer = this.disposeMap.get(acceptedPath); + if (disposer) await disposer(this.dataMap.get(acceptedPath)); + try { + fetchedModule = await this.importUpdatedModule(update); + } catch (e) { + this.warnFailedUpdate(e, acceptedPath); + } + } + return () => { + try { + this.currentFirstInvalidatedBy = firstInvalidatedBy; + for (const { deps, fn } of qualifiedCallbacks) { + fn( + deps.map( + (dep) => dep === acceptedPath ? fetchedModule : void 0 + ) + ); + } + const loggedPath = isSelfUpdate ? path : `${acceptedPath} via ${path}`; + this.logger.debug(`hot updated: ${loggedPath}`); + } finally { + this.currentFirstInvalidatedBy = void 0; + } + }; + } +} + +/* @ts-self-types="./index.d.ts" */ +let urlAlphabet = + 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'; +let nanoid = (size = 21) => { + let id = ''; + let i = size | 0; + while (i--) { + id += urlAlphabet[(Math.random() * 64) | 0]; + } + return id +}; + +typeof process !== "undefined" && process.platform === "win32"; +function promiseWithResolvers() { + let resolve; + let reject; + const promise = new Promise((_resolve, _reject) => { + resolve = _resolve; + reject = _reject; + }); + return { promise, resolve, reject }; +} + +function reviveInvokeError(e) { + const error = new Error(e.message || "Unknown invoke error"); + Object.assign(error, e, { + // pass the whole error instead of just the stacktrace + // so that it gets formatted nicely with console.log + runnerError: new Error("RunnerError") + }); + return error; +} +const createInvokeableTransport = (transport) => { + if (transport.invoke) { + return { + ...transport, + async invoke(name, data) { + const result = await transport.invoke({ + type: "custom", + event: "vite:invoke", + data: { + id: "send", + name, + data + } + }); + if ("error" in result) { + throw reviveInvokeError(result.error); + } + return result.result; + } + }; + } + if (!transport.send || !transport.connect) { + throw new Error( + "transport must implement send and connect when invoke is not implemented" + ); + } + const rpcPromises = /* @__PURE__ */ new Map(); + return { + ...transport, + connect({ onMessage, onDisconnection }) { + return transport.connect({ + onMessage(payload) { + if (payload.type === "custom" && payload.event === "vite:invoke") { + const data = payload.data; + if (data.id.startsWith("response:")) { + const invokeId = data.id.slice("response:".length); + const promise = rpcPromises.get(invokeId); + if (!promise) return; + if (promise.timeoutId) clearTimeout(promise.timeoutId); + rpcPromises.delete(invokeId); + const { error, result } = data.data; + if (error) { + promise.reject(error); + } else { + promise.resolve(result); + } + return; + } + } + onMessage(payload); + }, + onDisconnection + }); + }, + disconnect() { + rpcPromises.forEach((promise) => { + promise.reject( + new Error( + `transport was disconnected, cannot call ${JSON.stringify(promise.name)}` + ) + ); + }); + rpcPromises.clear(); + return transport.disconnect?.(); + }, + send(data) { + return transport.send(data); + }, + async invoke(name, data) { + const promiseId = nanoid(); + const wrappedData = { + type: "custom", + event: "vite:invoke", + data: { + name, + id: `send:${promiseId}`, + data + } + }; + const sendPromise = transport.send(wrappedData); + const { promise, resolve, reject } = promiseWithResolvers(); + const timeout = transport.timeout ?? 6e4; + let timeoutId; + if (timeout > 0) { + timeoutId = setTimeout(() => { + rpcPromises.delete(promiseId); + reject( + new Error( + `transport invoke timed out after ${timeout}ms (data: ${JSON.stringify(wrappedData)})` + ) + ); + }, timeout); + timeoutId?.unref?.(); + } + rpcPromises.set(promiseId, { resolve, reject, name, timeoutId }); + if (sendPromise) { + sendPromise.catch((err) => { + clearTimeout(timeoutId); + rpcPromises.delete(promiseId); + reject(err); + }); + } + try { + return await promise; + } catch (err) { + throw reviveInvokeError(err); + } + } + }; +}; +const normalizeModuleRunnerTransport = (transport) => { + const invokeableTransport = createInvokeableTransport(transport); + let isConnected = !invokeableTransport.connect; + let connectingPromise; + return { + ...transport, + ...invokeableTransport.connect ? { + async connect(onMessage) { + if (isConnected) return; + if (connectingPromise) { + await connectingPromise; + return; + } + const maybePromise = invokeableTransport.connect({ + onMessage: onMessage ?? (() => { + }), + onDisconnection() { + isConnected = false; + } + }); + if (maybePromise) { + connectingPromise = maybePromise; + await connectingPromise; + connectingPromise = void 0; + } + isConnected = true; + } + } : {}, + ...invokeableTransport.disconnect ? { + async disconnect() { + if (!isConnected) return; + if (connectingPromise) { + await connectingPromise; + } + isConnected = false; + await invokeableTransport.disconnect(); + } + } : {}, + async send(data) { + if (!invokeableTransport.send) return; + if (!isConnected) { + if (connectingPromise) { + await connectingPromise; + } else { + throw new Error("send was called before connect"); + } + } + await invokeableTransport.send(data); + }, + async invoke(name, data) { + if (!isConnected) { + if (connectingPromise) { + await connectingPromise; + } else { + throw new Error("invoke was called before connect"); + } + } + return invokeableTransport.invoke(name, data); + } + }; +}; +const createWebSocketModuleRunnerTransport = (options) => { + const pingInterval = options.pingInterval ?? 3e4; + let ws; + let pingIntervalId; + return { + async connect({ onMessage, onDisconnection }) { + const socket = options.createConnection(); + socket.addEventListener("message", async ({ data }) => { + onMessage(JSON.parse(data)); + }); + let isOpened = socket.readyState === socket.OPEN; + if (!isOpened) { + await new Promise((resolve, reject) => { + socket.addEventListener( + "open", + () => { + isOpened = true; + resolve(); + }, + { once: true } + ); + socket.addEventListener("close", async () => { + if (!isOpened) { + reject(new Error("WebSocket closed without opened.")); + return; + } + onMessage({ + type: "custom", + event: "vite:ws:disconnect", + data: { webSocket: socket } + }); + onDisconnection(); + }); + }); + } + onMessage({ + type: "custom", + event: "vite:ws:connect", + data: { webSocket: socket } + }); + ws = socket; + pingIntervalId = setInterval(() => { + if (socket.readyState === socket.OPEN) { + socket.send(JSON.stringify({ type: "ping" })); + } + }, pingInterval); + }, + disconnect() { + clearInterval(pingIntervalId); + ws?.close(); + }, + send(data) { + ws.send(JSON.stringify(data)); + } + }; +}; + +function createHMRHandler(handler) { + const queue = new Queue(); + return (payload) => queue.enqueue(() => handler(payload)); +} +class Queue { + constructor() { + this.queue = []; + this.pending = false; + } + enqueue(promise) { + return new Promise((resolve, reject) => { + this.queue.push({ + promise, + resolve, + reject + }); + this.dequeue(); + }); + } + dequeue() { + if (this.pending) { + return false; + } + const item = this.queue.shift(); + if (!item) { + return false; + } + this.pending = true; + item.promise().then(item.resolve).catch(item.reject).finally(() => { + this.pending = false; + this.dequeue(); + }); + return true; + } +} + +const hmrConfigName = __HMR_CONFIG_NAME__; +const base$1 = __BASE__ || "/"; +function h(e, attrs = {}, ...children) { + const elem = document.createElement(e); + for (const [k, v] of Object.entries(attrs)) { + elem.setAttribute(k, v); + } + elem.append(...children); + return elem; +} +const templateStyle = ( + /*css*/ + ` +:host { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 99999; + --monospace: 'SFMono-Regular', Consolas, + 'Liberation Mono', Menlo, Courier, monospace; + --red: #ff5555; + --yellow: #e2aa53; + --purple: #cfa4ff; + --cyan: #2dd9da; + --dim: #c9c9c9; + + --window-background: #181818; + --window-color: #d8d8d8; +} + +.backdrop { + position: fixed; + z-index: 99999; + top: 0; + left: 0; + width: 100%; + height: 100%; + overflow-y: scroll; + margin: 0; + background: rgba(0, 0, 0, 0.66); +} + +.window { + font-family: var(--monospace); + line-height: 1.5; + max-width: 80vw; + color: var(--window-color); + box-sizing: border-box; + margin: 30px auto; + padding: 2.5vh 4vw; + position: relative; + background: var(--window-background); + border-radius: 6px 6px 8px 8px; + box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22); + overflow: hidden; + border-top: 8px solid var(--red); + direction: ltr; + text-align: left; +} + +pre { + font-family: var(--monospace); + font-size: 16px; + margin-top: 0; + margin-bottom: 1em; + overflow-x: scroll; + scrollbar-width: none; +} + +pre::-webkit-scrollbar { + display: none; +} + +pre.frame::-webkit-scrollbar { + display: block; + height: 5px; +} + +pre.frame::-webkit-scrollbar-thumb { + background: #999; + border-radius: 5px; +} + +pre.frame { + scrollbar-width: thin; +} + +.message { + line-height: 1.3; + font-weight: 600; + white-space: pre-wrap; +} + +.message-body { + color: var(--red); +} + +.plugin { + color: var(--purple); +} + +.file { + color: var(--cyan); + margin-bottom: 0; + white-space: pre-wrap; + word-break: break-all; +} + +.frame { + color: var(--yellow); +} + +.stack { + font-size: 13px; + color: var(--dim); +} + +.tip { + font-size: 13px; + color: #999; + border-top: 1px dotted #999; + padding-top: 13px; + line-height: 1.8; +} + +code { + font-size: 13px; + font-family: var(--monospace); + color: var(--yellow); +} + +.file-link { + text-decoration: underline; + cursor: pointer; +} + +kbd { + line-height: 1.5; + font-family: ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + font-size: 0.75rem; + font-weight: 700; + background-color: rgb(38, 40, 44); + color: rgb(166, 167, 171); + padding: 0.15rem 0.3rem; + border-radius: 0.25rem; + border-width: 0.0625rem 0.0625rem 0.1875rem; + border-style: solid; + border-color: rgb(54, 57, 64); + border-image: initial; +} +` +); +const createTemplate = () => h( + "div", + { class: "backdrop", part: "backdrop" }, + h( + "div", + { class: "window", part: "window" }, + h( + "pre", + { class: "message", part: "message" }, + h("span", { class: "plugin", part: "plugin" }), + h("span", { class: "message-body", part: "message-body" }) + ), + h("pre", { class: "file", part: "file" }), + h("pre", { class: "frame", part: "frame" }), + h("pre", { class: "stack", part: "stack" }), + h( + "div", + { class: "tip", part: "tip" }, + "Click outside, press ", + h("kbd", {}, "Esc"), + " key, or fix the code to dismiss.", + h("br"), + "You can also disable this overlay by setting ", + h("code", { part: "config-option-name" }, "server.hmr.overlay"), + " to ", + h("code", { part: "config-option-value" }, "false"), + " in ", + h("code", { part: "config-file-name" }, hmrConfigName), + "." + ) + ), + h("style", {}, templateStyle) +); +const fileRE = /(?:[a-zA-Z]:\\|\/).*?:\d+:\d+/g; +const codeframeRE = /^(?:>?\s*\d+\s+\|.*|\s+\|\s*\^.*)\r?\n/gm; +const { HTMLElement = class { +} } = globalThis; +class ErrorOverlay extends HTMLElement { + constructor(err, links = true) { + super(); + this.root = this.attachShadow({ mode: "open" }); + this.root.appendChild(createTemplate()); + codeframeRE.lastIndex = 0; + const hasFrame = err.frame && codeframeRE.test(err.frame); + const message = hasFrame ? err.message.replace(codeframeRE, "") : err.message; + if (err.plugin) { + this.text(".plugin", `[plugin:${err.plugin}] `); + } + this.text(".message-body", message.trim()); + const [file] = (err.loc?.file || err.id || "unknown file").split(`?`); + if (err.loc) { + this.text(".file", `${file}:${err.loc.line}:${err.loc.column}`, links); + } else if (err.id) { + this.text(".file", file); + } + if (hasFrame) { + this.text(".frame", err.frame.trim()); + } + this.text(".stack", err.stack, links); + this.root.querySelector(".window").addEventListener("click", (e) => { + e.stopPropagation(); + }); + this.addEventListener("click", () => { + this.close(); + }); + this.closeOnEsc = (e) => { + if (e.key === "Escape" || e.code === "Escape") { + this.close(); + } + }; + document.addEventListener("keydown", this.closeOnEsc); + } + text(selector, text, linkFiles = false) { + const el = this.root.querySelector(selector); + if (!linkFiles) { + el.textContent = text; + } else { + let curIndex = 0; + let match; + fileRE.lastIndex = 0; + while (match = fileRE.exec(text)) { + const { 0: file, index } = match; + const frag = text.slice(curIndex, index); + el.appendChild(document.createTextNode(frag)); + const link = document.createElement("a"); + link.textContent = file; + link.className = "file-link"; + link.onclick = () => { + fetch( + new URL( + `${base$1}__open-in-editor?file=${encodeURIComponent(file)}`, + import.meta.url + ) + ); + }; + el.appendChild(link); + curIndex += frag.length + file.length; + } + } + } + close() { + this.parentNode?.removeChild(this); + document.removeEventListener("keydown", this.closeOnEsc); + } +} +const overlayId = "vite-error-overlay"; +const { customElements } = globalThis; +if (customElements && !customElements.get(overlayId)) { + customElements.define(overlayId, ErrorOverlay); +} + +console.debug("[vite] connecting..."); +const importMetaUrl = new URL(import.meta.url); +const serverHost = __SERVER_HOST__; +const socketProtocol = __HMR_PROTOCOL__ || (importMetaUrl.protocol === "https:" ? "wss" : "ws"); +const hmrPort = __HMR_PORT__; +const socketHost = `${__HMR_HOSTNAME__ || importMetaUrl.hostname}:${hmrPort || importMetaUrl.port}${__HMR_BASE__}`; +const directSocketHost = __HMR_DIRECT_TARGET__; +const base = __BASE__ || "/"; +const hmrTimeout = __HMR_TIMEOUT__; +const wsToken = __WS_TOKEN__; +const transport = normalizeModuleRunnerTransport( + (() => { + let wsTransport = createWebSocketModuleRunnerTransport({ + createConnection: () => new WebSocket( + `${socketProtocol}://${socketHost}?token=${wsToken}`, + "vite-hmr" + ), + pingInterval: hmrTimeout + }); + return { + async connect(handlers) { + try { + await wsTransport.connect(handlers); + } catch (e) { + if (!hmrPort) { + wsTransport = createWebSocketModuleRunnerTransport({ + createConnection: () => new WebSocket( + `${socketProtocol}://${directSocketHost}?token=${wsToken}`, + "vite-hmr" + ), + pingInterval: hmrTimeout + }); + try { + await wsTransport.connect(handlers); + console.info( + "[vite] Direct websocket connection fallback. Check out https://vite.dev/config/server-options.html#server-hmr to remove the previous connection error." + ); + } catch (e2) { + if (e2 instanceof Error && e2.message.includes("WebSocket closed without opened.")) { + const currentScriptHostURL = new URL(import.meta.url); + const currentScriptHost = currentScriptHostURL.host + currentScriptHostURL.pathname.replace(/@vite\/client$/, ""); + console.error( + `[vite] failed to connect to websocket. +your current setup: + (browser) ${currentScriptHost} <--[HTTP]--> ${serverHost} (server) + (browser) ${socketHost} <--[WebSocket (failing)]--> ${directSocketHost} (server) +Check out your Vite / network configuration and https://vite.dev/config/server-options.html#server-hmr .` + ); + } + } + return; + } + console.error(`[vite] failed to connect to websocket (${e}). `); + throw e; + } + }, + async disconnect() { + await wsTransport.disconnect(); + }, + send(data) { + wsTransport.send(data); + } + }; + })() +); +let willUnload = false; +if (typeof window !== "undefined") { + window.addEventListener("beforeunload", () => { + willUnload = true; + }); +} +function cleanUrl(pathname) { + const url = new URL(pathname, "http://vite.dev"); + url.searchParams.delete("direct"); + return url.pathname + url.search; +} +let isFirstUpdate = true; +const outdatedLinkTags = /* @__PURE__ */ new WeakSet(); +const debounceReload = (time) => { + let timer; + return () => { + if (timer) { + clearTimeout(timer); + timer = null; + } + timer = setTimeout(() => { + location.reload(); + }, time); + }; +}; +const pageReload = debounceReload(50); +const hmrClient = new HMRClient( + { + error: (err) => console.error("[vite]", err), + debug: (...msg) => console.debug("[vite]", ...msg) + }, + transport, + async function importUpdatedModule({ + acceptedPath, + timestamp, + explicitImportRequired, + isWithinCircularImport + }) { + const [acceptedPathWithoutQuery, query] = acceptedPath.split(`?`); + const importPromise = import( + /* @vite-ignore */ + base + acceptedPathWithoutQuery.slice(1) + `?${explicitImportRequired ? "import&" : ""}t=${timestamp}${query ? `&${query}` : ""}` + ); + if (isWithinCircularImport) { + importPromise.catch(() => { + console.info( + `[hmr] ${acceptedPath} failed to apply HMR as it's within a circular import. Reloading page to reset the execution order. To debug and break the circular import, you can run \`vite --debug hmr\` to log the circular dependency path if a file change triggered it.` + ); + pageReload(); + }); + } + return await importPromise; + } +); +transport.connect(createHMRHandler(handleMessage)); +async function handleMessage(payload) { + switch (payload.type) { + case "connected": + console.debug(`[vite] connected.`); + break; + case "update": + await hmrClient.notifyListeners("vite:beforeUpdate", payload); + if (hasDocument) { + if (isFirstUpdate && hasErrorOverlay()) { + location.reload(); + return; + } else { + if (enableOverlay) { + clearErrorOverlay(); + } + isFirstUpdate = false; + } + } + await Promise.all( + payload.updates.map(async (update) => { + if (update.type === "js-update") { + return hmrClient.queueUpdate(update); + } + const { path, timestamp } = update; + const searchUrl = cleanUrl(path); + const el = Array.from( + document.querySelectorAll("link") + ).find( + (e) => !outdatedLinkTags.has(e) && cleanUrl(e.href).includes(searchUrl) + ); + if (!el) { + return; + } + const newPath = `${base}${searchUrl.slice(1)}${searchUrl.includes("?") ? "&" : "?"}t=${timestamp}`; + return new Promise((resolve) => { + const newLinkTag = el.cloneNode(); + newLinkTag.href = new URL(newPath, el.href).href; + const removeOldEl = () => { + el.remove(); + console.debug(`[vite] css hot updated: ${searchUrl}`); + resolve(); + }; + newLinkTag.addEventListener("load", removeOldEl); + newLinkTag.addEventListener("error", removeOldEl); + outdatedLinkTags.add(el); + el.after(newLinkTag); + }); + }) + ); + await hmrClient.notifyListeners("vite:afterUpdate", payload); + break; + case "custom": { + await hmrClient.notifyListeners(payload.event, payload.data); + if (payload.event === "vite:ws:disconnect") { + if (hasDocument && !willUnload) { + console.log(`[vite] server connection lost. Polling for restart...`); + const socket = payload.data.webSocket; + const url = new URL(socket.url); + url.search = ""; + await waitForSuccessfulPing(url.href); + location.reload(); + } + } + break; + } + case "full-reload": + await hmrClient.notifyListeners("vite:beforeFullReload", payload); + if (hasDocument) { + if (payload.path && payload.path.endsWith(".html")) { + const pagePath = decodeURI(location.pathname); + const payloadPath = base + payload.path.slice(1); + if (pagePath === payloadPath || payload.path === "/index.html" || pagePath.endsWith("/") && pagePath + "index.html" === payloadPath) { + pageReload(); + } + return; + } else { + pageReload(); + } + } + break; + case "prune": + await hmrClient.notifyListeners("vite:beforePrune", payload); + await hmrClient.prunePaths(payload.paths); + break; + case "error": { + await hmrClient.notifyListeners("vite:error", payload); + if (hasDocument) { + const err = payload.err; + if (enableOverlay) { + createErrorOverlay(err); + } else { + console.error( + `[vite] Internal Server Error +${err.message} +${err.stack}` + ); + } + } + break; + } + case "ping": + break; + default: { + const check = payload; + return check; + } + } +} +const enableOverlay = __HMR_ENABLE_OVERLAY__; +const hasDocument = "document" in globalThis; +function createErrorOverlay(err) { + clearErrorOverlay(); + const { customElements } = globalThis; + if (customElements) { + const ErrorOverlayConstructor = customElements.get(overlayId); + document.body.appendChild(new ErrorOverlayConstructor(err)); + } +} +function clearErrorOverlay() { + document.querySelectorAll(overlayId).forEach((n) => n.close()); +} +function hasErrorOverlay() { + return document.querySelectorAll(overlayId).length; +} +async function waitForSuccessfulPing(socketUrl, ms = 1e3) { + async function ping() { + const socket = new WebSocket(socketUrl, "vite-ping"); + return new Promise((resolve) => { + function onOpen() { + resolve(true); + close(); + } + function onError() { + resolve(false); + close(); + } + function close() { + socket.removeEventListener("open", onOpen); + socket.removeEventListener("error", onError); + socket.close(); + } + socket.addEventListener("open", onOpen); + socket.addEventListener("error", onError); + }); + } + if (await ping()) { + return; + } + await wait(ms); + while (true) { + if (document.visibilityState === "visible") { + if (await ping()) { + break; + } + await wait(ms); + } else { + await waitForWindowShow(); + } + } +} +function wait(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); +} +function waitForWindowShow() { + return new Promise((resolve) => { + const onChange = async () => { + if (document.visibilityState === "visible") { + resolve(); + document.removeEventListener("visibilitychange", onChange); + } + }; + document.addEventListener("visibilitychange", onChange); + }); +} +const sheetsMap = /* @__PURE__ */ new Map(); +if ("document" in globalThis) { + document.querySelectorAll("style[data-vite-dev-id]").forEach((el) => { + sheetsMap.set(el.getAttribute("data-vite-dev-id"), el); + }); +} +const cspNonce = "document" in globalThis ? document.querySelector("meta[property=csp-nonce]")?.nonce : void 0; +let lastInsertedStyle; +function updateStyle(id, content) { + let style = sheetsMap.get(id); + if (!style) { + style = document.createElement("style"); + style.setAttribute("type", "text/css"); + style.setAttribute("data-vite-dev-id", id); + style.textContent = content; + if (cspNonce) { + style.setAttribute("nonce", cspNonce); + } + if (!lastInsertedStyle) { + document.head.appendChild(style); + setTimeout(() => { + lastInsertedStyle = void 0; + }, 0); + } else { + lastInsertedStyle.insertAdjacentElement("afterend", style); + } + lastInsertedStyle = style; + } else { + style.textContent = content; + } + sheetsMap.set(id, style); +} +function removeStyle(id) { + const style = sheetsMap.get(id); + if (style) { + document.head.removeChild(style); + sheetsMap.delete(id); + } +} +function createHotContext(ownerPath) { + return new HMRContext(hmrClient, ownerPath); +} +function injectQuery(url, queryToInject) { + if (url[0] !== "." && url[0] !== "/") { + return url; + } + const pathname = url.replace(/[?#].*$/, ""); + const { search, hash } = new URL(url, "http://vite.dev"); + return `${pathname}?${queryToInject}${search ? `&` + search.slice(1) : ""}${hash || ""}`; +} + +export { ErrorOverlay, createHotContext, injectQuery, removeStyle, updateStyle }; diff --git a/node_modules/vite/dist/client/env.mjs b/node_modules/vite/dist/client/env.mjs new file mode 100644 index 0000000..b58bfc1 --- /dev/null +++ b/node_modules/vite/dist/client/env.mjs @@ -0,0 +1,24 @@ +const context = (() => { + if (typeof globalThis !== "undefined") { + return globalThis; + } else if (typeof self !== "undefined") { + return self; + } else if (typeof window !== "undefined") { + return window; + } else { + return Function("return this")(); + } +})(); +const defines = __DEFINES__; +Object.keys(defines).forEach((key) => { + const segments = key.split("."); + let target = context; + for (let i = 0; i < segments.length; i++) { + const segment = segments[i]; + if (i === segments.length - 1) { + target[segment] = defines[key]; + } else { + target = target[segment] || (target[segment] = {}); + } + } +}); diff --git a/node_modules/vite/dist/node-cjs/publicUtils.cjs b/node_modules/vite/dist/node-cjs/publicUtils.cjs new file mode 100644 index 0000000..aaaa8ff --- /dev/null +++ b/node_modules/vite/dist/node-cjs/publicUtils.cjs @@ -0,0 +1,3986 @@ +'use strict'; + +var path$1 = require('node:path'); +var node_url = require('node:url'); +var fs$1 = require('node:fs'); +var esbuild = require('esbuild'); +var node_child_process = require('node:child_process'); +var node_module = require('node:module'); +var require$$0 = require('tty'); +var require$$1 = require('util'); +var require$$1$1 = require('path'); +var pm = require('picomatch'); +var require$$0$1 = require('crypto'); +var require$$1$2 = require('fs'); +var readline = require('node:readline'); +var require$$2 = require('os'); + +var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null; +const { version: version$2 } = JSON.parse( + fs$1.readFileSync(new URL("../../package.json", (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('node-cjs/publicUtils.cjs', document.baseURI).href)))).toString() +); +const VERSION = version$2; +const DEFAULT_MAIN_FIELDS = [ + "browser", + "module", + "jsnext:main", + // moment still uses this... + "jsnext" +]; +const DEFAULT_CLIENT_MAIN_FIELDS = Object.freeze(DEFAULT_MAIN_FIELDS); +const DEFAULT_SERVER_MAIN_FIELDS = Object.freeze( + DEFAULT_MAIN_FIELDS.filter((f) => f !== "browser") +); +const DEV_PROD_CONDITION = `development|production`; +const DEFAULT_CONDITIONS = ["module", "browser", "node", DEV_PROD_CONDITION]; +const DEFAULT_CLIENT_CONDITIONS = Object.freeze( + DEFAULT_CONDITIONS.filter((c) => c !== "node") +); +const DEFAULT_SERVER_CONDITIONS = Object.freeze( + DEFAULT_CONDITIONS.filter((c) => c !== "browser") +); +const FS_PREFIX = `/@fs/`; +const VITE_PACKAGE_DIR = path$1.resolve( + // import.meta.url is `dist/node/constants.js` after bundle + node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('node-cjs/publicUtils.cjs', document.baseURI).href))), + "../../.." +); +const CLIENT_ENTRY = path$1.resolve(VITE_PACKAGE_DIR, "dist/client/client.mjs"); +path$1.resolve(VITE_PACKAGE_DIR, "dist/client/env.mjs"); +path$1.dirname(CLIENT_ENTRY); +const defaultAllowedOrigins = /^https?:\/\/(?:(?:[^:]+\.)?localhost|127\.0\.0\.1|\[::1\])(?::\d+)?$/; + +const comma = ','.charCodeAt(0); +const semicolon = ';'.charCodeAt(0); +const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; +const intToChar = new Uint8Array(64); // 64 possible chars. +const charToInt = new Uint8Array(128); // z is 122 in ASCII +for (let i = 0; i < chars.length; i++) { + const c = chars.charCodeAt(i); + intToChar[i] = c; + charToInt[c] = i; +} +function encodeInteger(builder, num, relative) { + let delta = num - relative; + delta = delta < 0 ? (-delta << 1) | 1 : delta << 1; + do { + let clamped = delta & 0b011111; + delta >>>= 5; + if (delta > 0) + clamped |= 0b100000; + builder.write(intToChar[clamped]); + } while (delta > 0); + return num; +} + +const bufLength = 1024 * 16; +// Provide a fallback for older environments. +const td = typeof TextDecoder !== 'undefined' + ? /* #__PURE__ */ new TextDecoder() + : typeof Buffer !== 'undefined' + ? { + decode(buf) { + const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); + return out.toString(); + }, + } + : { + decode(buf) { + let out = ''; + for (let i = 0; i < buf.length; i++) { + out += String.fromCharCode(buf[i]); + } + return out; + }, + }; +class StringWriter { + constructor() { + this.pos = 0; + this.out = ''; + this.buffer = new Uint8Array(bufLength); + } + write(v) { + const { buffer } = this; + buffer[this.pos++] = v; + if (this.pos === bufLength) { + this.out += td.decode(buffer); + this.pos = 0; + } + } + flush() { + const { buffer, out, pos } = this; + return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; + } +} +function encode(decoded) { + const writer = new StringWriter(); + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + if (i > 0) + writer.write(semicolon); + if (line.length === 0) + continue; + let genColumn = 0; + for (let j = 0; j < line.length; j++) { + const segment = line[j]; + if (j > 0) + writer.write(comma); + genColumn = encodeInteger(writer, segment[0], genColumn); + if (segment.length === 1) + continue; + sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); + sourceLine = encodeInteger(writer, segment[2], sourceLine); + sourceColumn = encodeInteger(writer, segment[3], sourceColumn); + if (segment.length === 4) + continue; + namesIndex = encodeInteger(writer, segment[4], namesIndex); + } + } + return writer.flush(); +} + +function getDefaultExportFromCjs (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; +} + +var picocolors = {exports: {}}; + +let p = process || {}, argv = p.argv || [], env = p.env || {}; +let isColorSupported = + !(!!env.NO_COLOR || argv.includes("--no-color")) && + (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || ((p.stdout || {}).isTTY && env.TERM !== "dumb") || !!env.CI); + +let formatter = (open, close, replace = open) => + input => { + let string = "" + input, index = string.indexOf(close, open.length); + return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close + }; + +let replaceClose = (string, close, replace, index) => { + let result = "", cursor = 0; + do { + result += string.substring(cursor, index) + replace; + cursor = index + close.length; + index = string.indexOf(close, cursor); + } while (~index) + return result + string.substring(cursor) +}; + +let createColors = (enabled = isColorSupported) => { + let f = enabled ? formatter : () => String; + return { + isColorSupported: enabled, + reset: f("\x1b[0m", "\x1b[0m"), + bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"), + dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"), + italic: f("\x1b[3m", "\x1b[23m"), + underline: f("\x1b[4m", "\x1b[24m"), + inverse: f("\x1b[7m", "\x1b[27m"), + hidden: f("\x1b[8m", "\x1b[28m"), + strikethrough: f("\x1b[9m", "\x1b[29m"), + + black: f("\x1b[30m", "\x1b[39m"), + red: f("\x1b[31m", "\x1b[39m"), + green: f("\x1b[32m", "\x1b[39m"), + yellow: f("\x1b[33m", "\x1b[39m"), + blue: f("\x1b[34m", "\x1b[39m"), + magenta: f("\x1b[35m", "\x1b[39m"), + cyan: f("\x1b[36m", "\x1b[39m"), + white: f("\x1b[37m", "\x1b[39m"), + gray: f("\x1b[90m", "\x1b[39m"), + + bgBlack: f("\x1b[40m", "\x1b[49m"), + bgRed: f("\x1b[41m", "\x1b[49m"), + bgGreen: f("\x1b[42m", "\x1b[49m"), + bgYellow: f("\x1b[43m", "\x1b[49m"), + bgBlue: f("\x1b[44m", "\x1b[49m"), + bgMagenta: f("\x1b[45m", "\x1b[49m"), + bgCyan: f("\x1b[46m", "\x1b[49m"), + bgWhite: f("\x1b[47m", "\x1b[49m"), + + blackBright: f("\x1b[90m", "\x1b[39m"), + redBright: f("\x1b[91m", "\x1b[39m"), + greenBright: f("\x1b[92m", "\x1b[39m"), + yellowBright: f("\x1b[93m", "\x1b[39m"), + blueBright: f("\x1b[94m", "\x1b[39m"), + magentaBright: f("\x1b[95m", "\x1b[39m"), + cyanBright: f("\x1b[96m", "\x1b[39m"), + whiteBright: f("\x1b[97m", "\x1b[39m"), + + bgBlackBright: f("\x1b[100m", "\x1b[49m"), + bgRedBright: f("\x1b[101m", "\x1b[49m"), + bgGreenBright: f("\x1b[102m", "\x1b[49m"), + bgYellowBright: f("\x1b[103m", "\x1b[49m"), + bgBlueBright: f("\x1b[104m", "\x1b[49m"), + bgMagentaBright: f("\x1b[105m", "\x1b[49m"), + bgCyanBright: f("\x1b[106m", "\x1b[49m"), + bgWhiteBright: f("\x1b[107m", "\x1b[49m"), + } +}; + +picocolors.exports = createColors(); +picocolors.exports.createColors = createColors; + +var picocolorsExports = picocolors.exports; +var colors = /*@__PURE__*/getDefaultExportFromCjs(picocolorsExports); + +var node = {exports: {}}; + +/** + * Helpers. + */ + +var ms; +var hasRequiredMs; + +function requireMs () { + if (hasRequiredMs) return ms; + hasRequiredMs = 1; + var s = 1000; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var w = d * 7; + var y = d * 365.25; + + /** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + + ms = function (val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); + }; + + /** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + + function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'weeks': + case 'week': + case 'w': + return n * w; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } + } + + /** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + + function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + 'd'; + } + if (msAbs >= h) { + return Math.round(ms / h) + 'h'; + } + if (msAbs >= m) { + return Math.round(ms / m) + 'm'; + } + if (msAbs >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; + } + + /** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + + function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, 'day'); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, 'hour'); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, 'minute'); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, 'second'); + } + return ms + ' ms'; + } + + /** + * Pluralization helper. + */ + + function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); + } + return ms; +} + +var common; +var hasRequiredCommon; + +function requireCommon () { + if (hasRequiredCommon) return common; + hasRequiredCommon = 1; + /** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + */ + + function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = requireMs(); + createDebug.destroy = destroy; + + Object.keys(env).forEach(key => { + createDebug[key] = env[key]; + }); + + /** + * The currently active debug mode names, and names to skip. + */ + + createDebug.names = []; + createDebug.skips = []; + + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + createDebug.formatters = {}; + + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + function selectColor(namespace) { + let hash = 0; + + for (let i = 0; i < namespace.length; i++) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; + + function debug(...args) { + // Disabled? + if (!debug.enabled) { + return; + } + + const self = debug; + + // Set `diff` timestamp + const curr = Number(new Date()); + const ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + args[0] = createDebug.coerce(args[0]); + + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } + + // Apply any `formatters` transformations + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return '%'; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === 'function') { + const val = args[index]; + match = formatter.call(self, val); + + // Now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // Apply env-specific formatting (colors, etc.) + createDebug.formatArgs.call(self, args); + + const logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.useColors = createDebug.useColors(); + debug.color = createDebug.selectColor(namespace); + debug.extend = extend; + debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. + + Object.defineProperty(debug, 'enabled', { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + + return enabledCache; + }, + set: v => { + enableOverride = v; + } + }); + + // Env-specific initialization logic for debug instances + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + return debug; + } + + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.namespaces = namespaces; + + createDebug.names = []; + createDebug.skips = []; + + const split = (typeof namespaces === 'string' ? namespaces : '') + .trim() + .replace(' ', ',') + .split(',') + .filter(Boolean); + + for (const ns of split) { + if (ns[0] === '-') { + createDebug.skips.push(ns.slice(1)); + } else { + createDebug.names.push(ns); + } + } + } + + /** + * Checks if the given string matches a namespace template, honoring + * asterisks as wildcards. + * + * @param {String} search + * @param {String} template + * @return {Boolean} + */ + function matchesTemplate(search, template) { + let searchIndex = 0; + let templateIndex = 0; + let starIndex = -1; + let matchIndex = 0; + + while (searchIndex < search.length) { + if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) { + // Match character or proceed with wildcard + if (template[templateIndex] === '*') { + starIndex = templateIndex; + matchIndex = searchIndex; + templateIndex++; // Skip the '*' + } else { + searchIndex++; + templateIndex++; + } + } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition + // Backtrack to the last '*' and try to match more characters + templateIndex = starIndex + 1; + matchIndex++; + searchIndex = matchIndex; + } else { + return false; // No match + } + } + + // Handle trailing '*' in template + while (templateIndex < template.length && template[templateIndex] === '*') { + templateIndex++; + } + + return templateIndex === template.length; + } + + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + function disable() { + const namespaces = [ + ...createDebug.names, + ...createDebug.skips.map(namespace => '-' + namespace) + ].join(','); + createDebug.enable(''); + return namespaces; + } + + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + function enabled(name) { + for (const skip of createDebug.skips) { + if (matchesTemplate(name, skip)) { + return false; + } + } + + for (const ns of createDebug.names) { + if (matchesTemplate(name, ns)) { + return true; + } + } + + return false; + } + + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + + /** + * XXX DO NOT USE. This is a temporary stub function. + * XXX It WILL be removed in the next major release. + */ + function destroy() { + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + + createDebug.enable(createDebug.load()); + + return createDebug; + } + + common = setup; + return common; +} + +/** + * Module dependencies. + */ + +(function (module, exports) { + const tty = require$$0; + const util = require$$1; + + /** + * This is the Node.js implementation of `debug()`. + */ + + exports.init = init; + exports.log = log; + exports.formatArgs = formatArgs; + exports.save = save; + exports.load = load; + exports.useColors = useColors; + exports.destroy = util.deprecate( + () => {}, + 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' + ); + + /** + * Colors. + */ + + exports.colors = [6, 2, 3, 4, 5, 1]; + + try { + // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) + // eslint-disable-next-line import/no-extraneous-dependencies + const supportsColor = require('supports-color'); + + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } + } catch (error) { + // Swallow - we only care if `supports-color` is available; it doesn't have to be. + } + + /** + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js + */ + + exports.inspectOpts = Object.keys(process.env).filter(key => { + return /^debug_/i.test(key); + }).reduce((obj, key) => { + // Camel-case + const prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + + // Coerce string value into JS value + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === 'null') { + val = null; + } else { + val = Number(val); + } + + obj[prop] = val; + return obj; + }, {}); + + /** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + + function useColors() { + return 'colors' in exports.inspectOpts ? + Boolean(exports.inspectOpts.colors) : + tty.isatty(process.stderr.fd); + } + + /** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + + function formatArgs(args) { + const {namespace: name, useColors} = this; + + if (useColors) { + const c = this.color; + const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); + const prefix = ` ${colorCode};1m${name} \u001B[0m`; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); + } else { + args[0] = getDate() + name + ' ' + args[0]; + } + } + + function getDate() { + if (exports.inspectOpts.hideDate) { + return ''; + } + return new Date().toISOString() + ' '; + } + + /** + * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr. + */ + + function log(...args) { + return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n'); + } + + /** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } + } + + /** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + + function load() { + return process.env.DEBUG; + } + + /** + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. + */ + + function init(debug) { + debug.inspectOpts = {}; + + const keys = Object.keys(exports.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } + } + + module.exports = requireCommon()(exports); + + const {formatters} = module.exports; + + /** + * Map %o to `util.inspect()`, all on a single line. + */ + + formatters.o = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n') + .map(str => str.trim()) + .join(' '); + }; + + /** + * Map %O to `util.inspect()`, allowing multiple lines if needed. + */ + + formatters.O = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); + }; +} (node, node.exports)); + +var nodeExports = node.exports; +var debug$3 = /*@__PURE__*/getDefaultExportFromCjs(nodeExports); + +// Helper since Typescript can't detect readonly arrays with Array.isArray +function isArray(arg) { + return Array.isArray(arg); +} +function ensureArray(thing) { + if (isArray(thing)) + return thing; + if (thing == null) + return []; + return [thing]; +} + +const normalizePathRegExp = new RegExp(`\\${require$$1$1.win32.sep}`, 'g'); +const normalizePath$1 = function normalizePath(filename) { + return filename.replace(normalizePathRegExp, require$$1$1.posix.sep); +}; + +function getMatcherString(id, resolutionBase) { + if (resolutionBase === false || require$$1$1.isAbsolute(id) || id.startsWith('**')) { + return normalizePath$1(id); + } + // resolve('') is valid and will default to process.cwd() + const basePath = normalizePath$1(require$$1$1.resolve(resolutionBase || '')) + // escape all possible (posix + win) path characters that might interfere with regex + .replace(/[-^$*+?.()|[\]{}]/g, '\\$&'); + // Note that we use posix.join because: + // 1. the basePath has been normalized to use / + // 2. the incoming glob (id) matcher, also uses / + // otherwise Node will force backslash (\) on windows + return require$$1$1.posix.join(basePath, normalizePath$1(id)); +} +const createFilter$1 = function createFilter(include, exclude, options) { + const resolutionBase = options && options.resolve; + const getMatcher = (id) => id instanceof RegExp + ? id + : { + test: (what) => { + // this refactor is a tad overly verbose but makes for easy debugging + const pattern = getMatcherString(id, resolutionBase); + const fn = pm(pattern, { dot: true }); + const result = fn(what); + return result; + } + }; + const includeMatchers = ensureArray(include).map(getMatcher); + const excludeMatchers = ensureArray(exclude).map(getMatcher); + if (!includeMatchers.length && !excludeMatchers.length) + return (id) => typeof id === 'string' && !id.includes('\0'); + return function result(id) { + if (typeof id !== 'string') + return false; + if (id.includes('\0')) + return false; + const pathId = normalizePath$1(id); + for (let i = 0; i < excludeMatchers.length; ++i) { + const matcher = excludeMatchers[i]; + if (matcher instanceof RegExp) { + matcher.lastIndex = 0; + } + if (matcher.test(pathId)) + return false; + } + for (let i = 0; i < includeMatchers.length; ++i) { + const matcher = includeMatchers[i]; + if (matcher instanceof RegExp) { + matcher.lastIndex = 0; + } + if (matcher.test(pathId)) + return true; + } + return !includeMatchers.length; + }; +}; + +const reservedWords = 'break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public'; +const builtins = 'arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl'; +const forbiddenIdentifiers = new Set(`${reservedWords} ${builtins}`.split(' ')); +forbiddenIdentifiers.add(''); + +const isWindows = typeof process !== "undefined" && process.platform === "win32"; +const windowsSlashRE = /\\/g; +function slash(p) { + return p.replace(windowsSlashRE, "/"); +} +const postfixRE = /[?#].*$/; +function cleanUrl(url) { + return url.replace(postfixRE, ""); +} +function withTrailingSlash(path) { + if (path[path.length - 1] !== "/") { + return `${path}/`; + } + return path; +} + +let pnp; +if (process.versions.pnp) { + try { + pnp = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('node-cjs/publicUtils.cjs', document.baseURI).href)))("pnpapi"); + } catch { + } +} +function resolvePackageData(pkgName, basedir, preserveSymlinks = false, packageCache) { + if (pnp) { + try { + const pkg = pnp.resolveToUnqualified(pkgName, basedir, { + considerBuiltins: false + }); + if (!pkg) return null; + const pkgData = loadPackageData(path$1.join(pkg, "package.json")); + return pkgData; + } catch { + return null; + } + } + while (basedir) { + const pkg = path$1.join(basedir, "node_modules", pkgName, "package.json"); + try { + if (fs$1.existsSync(pkg)) { + const pkgPath = preserveSymlinks ? pkg : safeRealpathSync(pkg); + const pkgData = loadPackageData(pkgPath); + return pkgData; + } + } catch { + } + const nextBasedir = path$1.dirname(basedir); + if (nextBasedir === basedir) break; + basedir = nextBasedir; + } + return null; +} +function loadPackageData(pkgPath) { + const data = JSON.parse(stripBomTag(fs$1.readFileSync(pkgPath, "utf-8"))); + const pkgDir = normalizePath(path$1.dirname(pkgPath)); + const { sideEffects } = data; + let hasSideEffects; + if (typeof sideEffects === "boolean") { + hasSideEffects = () => sideEffects; + } else if (Array.isArray(sideEffects)) { + if (sideEffects.length <= 0) { + hasSideEffects = () => false; + } else { + const finalPackageSideEffects = sideEffects.map((sideEffect) => { + if (sideEffect.includes("/")) { + return sideEffect; + } + return `**/${sideEffect}`; + }); + hasSideEffects = createFilter(finalPackageSideEffects, null, { + resolve: pkgDir + }); + } + } else { + hasSideEffects = () => null; + } + const resolvedCache = {}; + const pkg = { + dir: pkgDir, + data, + hasSideEffects, + setResolvedCache(key, entry, options) { + resolvedCache[getResolveCacheKey(key, options)] = entry; + }, + getResolvedCache(key, options) { + return resolvedCache[getResolveCacheKey(key, options)]; + } + }; + return pkg; +} +function getResolveCacheKey(key, options) { + return [ + key, + options.isRequire ? "1" : "0", + options.conditions.join("_"), + options.extensions.join("_"), + options.mainFields.join("_") + ].join("|"); +} + +const createFilter = createFilter$1; +node_module.builtinModules.filter((id) => !id.includes(":")); +function isInNodeModules(id) { + return id.includes("node_modules"); +} +node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('node-cjs/publicUtils.cjs', document.baseURI).href))); +const _dirname = path$1.dirname(node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('node-cjs/publicUtils.cjs', document.baseURI).href)))); +const rollupVersion = resolvePackageData("rollup", _dirname, true)?.data.version ?? ""; +const filter = process.env.VITE_DEBUG_FILTER; +const DEBUG = process.env.DEBUG; +function createDebugger(namespace, options = {}) { + const log = debug$3(namespace); + const { onlyWhenFocused, depth } = options; + if (depth && log.inspectOpts && log.inspectOpts.depth == null) { + log.inspectOpts.depth = options.depth; + } + let enabled = log.enabled; + if (enabled && onlyWhenFocused) { + const ns = typeof onlyWhenFocused === "string" ? onlyWhenFocused : namespace; + enabled = !!DEBUG?.includes(ns); + } + if (enabled) { + return (...args) => { + if (!filter || args.some((a) => a?.includes?.(filter))) { + log(...args); + } + }; + } +} +function testCaseInsensitiveFS() { + if (!CLIENT_ENTRY.endsWith("client.mjs")) { + throw new Error( + `cannot test case insensitive FS, CLIENT_ENTRY const doesn't contain client.mjs` + ); + } + if (!fs$1.existsSync(CLIENT_ENTRY)) { + throw new Error( + "cannot test case insensitive FS, CLIENT_ENTRY does not point to an existing file: " + CLIENT_ENTRY + ); + } + return fs$1.existsSync(CLIENT_ENTRY.replace("client.mjs", "cLiEnT.mjs")); +} +const isCaseInsensitiveFS = testCaseInsensitiveFS(); +const VOLUME_RE = /^[A-Z]:/i; +function normalizePath(id) { + return path$1.posix.normalize(isWindows ? slash(id) : id); +} +function fsPathFromId(id) { + const fsPath = normalizePath( + id.startsWith(FS_PREFIX) ? id.slice(FS_PREFIX.length) : id + ); + return fsPath[0] === "/" || VOLUME_RE.test(fsPath) ? fsPath : `/${fsPath}`; +} +function fsPathFromUrl(url) { + return fsPathFromId(cleanUrl(url)); +} +function isParentDirectory(dir, file) { + dir = withTrailingSlash(dir); + return file.startsWith(dir) || isCaseInsensitiveFS && file.toLowerCase().startsWith(dir.toLowerCase()); +} +function isSameFileUri(file1, file2) { + return file1 === file2 || isCaseInsensitiveFS && file1.toLowerCase() === file2.toLowerCase(); +} +const trailingSeparatorRE = /[?&]$/; +const timestampRE = /\bt=\d{13}&?\b/; +function removeTimestampQuery(url) { + return url.replace(timestampRE, "").replace(trailingSeparatorRE, ""); +} +function isObject$1(value) { + return Object.prototype.toString.call(value) === "[object Object]"; +} +function tryStatSync(file) { + try { + return fs$1.statSync(file, { throwIfNoEntry: false }); + } catch { + } +} +function isFileReadable(filename) { + if (!tryStatSync(filename)) { + return false; + } + try { + fs$1.accessSync(filename, fs$1.constants.R_OK); + return true; + } catch { + return false; + } +} +let safeRealpathSync = isWindows ? windowsSafeRealPathSync : fs$1.realpathSync.native; +const windowsNetworkMap = /* @__PURE__ */ new Map(); +function windowsMappedRealpathSync(path2) { + const realPath = fs$1.realpathSync.native(path2); + if (realPath.startsWith("\\\\")) { + for (const [network, volume] of windowsNetworkMap) { + if (realPath.startsWith(network)) return realPath.replace(network, volume); + } + } + return realPath; +} +const parseNetUseRE = /^\w* +(\w:) +([^ ]+)\s/; +let firstSafeRealPathSyncRun = false; +function windowsSafeRealPathSync(path2) { + if (!firstSafeRealPathSyncRun) { + optimizeSafeRealPathSync(); + firstSafeRealPathSyncRun = true; + } + return fs$1.realpathSync(path2); +} +function optimizeSafeRealPathSync() { + const nodeVersion = process.versions.node.split(".").map(Number); + if (nodeVersion[0] < 18 || nodeVersion[0] === 18 && nodeVersion[1] < 10) { + safeRealpathSync = fs$1.realpathSync; + return; + } + try { + fs$1.realpathSync.native(path$1.resolve("./")); + } catch (error) { + if (error.message.includes("EISDIR: illegal operation on a directory")) { + safeRealpathSync = fs$1.realpathSync; + return; + } + } + node_child_process.exec("net use", (error, stdout) => { + if (error) return; + const lines = stdout.split("\n"); + for (const line of lines) { + const m = parseNetUseRE.exec(line); + if (m) windowsNetworkMap.set(m[2], m[1]); + } + if (windowsNetworkMap.size === 0) { + safeRealpathSync = fs$1.realpathSync.native; + } else { + safeRealpathSync = windowsMappedRealpathSync; + } + }); +} +function arraify(target) { + return Array.isArray(target) ? target : [target]; +} +function backwardCompatibleWorkerPlugins(plugins) { + if (Array.isArray(plugins)) { + return plugins; + } + if (typeof plugins === "function") { + return plugins(); + } + return []; +} +function mergeConfigRecursively(defaults, overrides, rootPath) { + const merged = { ...defaults }; + for (const key in overrides) { + const value = overrides[key]; + if (value == null) { + continue; + } + const existing = merged[key]; + if (existing == null) { + merged[key] = value; + continue; + } + if (key === "alias" && (rootPath === "resolve" || rootPath === "")) { + merged[key] = mergeAlias(existing, value); + continue; + } else if (key === "assetsInclude" && rootPath === "") { + merged[key] = [].concat(existing, value); + continue; + } else if (key === "noExternal" && (rootPath === "ssr" || rootPath === "resolve") && (existing === true || value === true)) { + merged[key] = true; + continue; + } else if (key === "plugins" && rootPath === "worker") { + merged[key] = () => [ + ...backwardCompatibleWorkerPlugins(existing), + ...backwardCompatibleWorkerPlugins(value) + ]; + continue; + } else if (key === "server" && rootPath === "server.hmr") { + merged[key] = value; + continue; + } + if (Array.isArray(existing) || Array.isArray(value)) { + merged[key] = [...arraify(existing), ...arraify(value)]; + continue; + } + if (isObject$1(existing) && isObject$1(value)) { + merged[key] = mergeConfigRecursively( + existing, + value, + rootPath ? `${rootPath}.${key}` : key + ); + continue; + } + merged[key] = value; + } + return merged; +} +function mergeConfig(defaults, overrides, isRoot = true) { + if (typeof defaults === "function" || typeof overrides === "function") { + throw new Error(`Cannot merge config in form of callback`); + } + return mergeConfigRecursively(defaults, overrides, isRoot ? "" : "."); +} +function mergeAlias(a, b) { + if (!a) return b; + if (!b) return a; + if (isObject$1(a) && isObject$1(b)) { + return { ...a, ...b }; + } + return [...normalizeAlias(b), ...normalizeAlias(a)]; +} +function normalizeAlias(o = []) { + return Array.isArray(o) ? o.map(normalizeSingleAlias) : Object.keys(o).map( + (find) => normalizeSingleAlias({ + find, + replacement: o[find] + }) + ); +} +function normalizeSingleAlias({ + find, + replacement, + customResolver +}) { + if (typeof find === "string" && find.endsWith("/") && replacement.endsWith("/")) { + find = find.slice(0, find.length - 1); + replacement = replacement.slice(0, replacement.length - 1); + } + const alias = { + find, + replacement + }; + if (customResolver) { + alias.customResolver = customResolver; + } + return alias; +} +function stripBomTag(content) { + if (content.charCodeAt(0) === 65279) { + return content.slice(1); + } + return content; +} + +const CSS_LANGS_RE = ( + // eslint-disable-next-line regexp/no-unused-capturing-group + /\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)(?:$|\?)/ +); +const isCSSRequest = (request) => CSS_LANGS_RE.test(request); +class SplitVendorChunkCache { + cache; + constructor() { + this.cache = /* @__PURE__ */ new Map(); + } + reset() { + this.cache = /* @__PURE__ */ new Map(); + } +} +function splitVendorChunk(options = {}) { + const cache = options.cache ?? new SplitVendorChunkCache(); + return (id, { getModuleInfo }) => { + if (isInNodeModules(id) && !isCSSRequest(id) && staticImportedByEntry(id, getModuleInfo, cache.cache)) { + return "vendor"; + } + }; +} +function staticImportedByEntry(id, getModuleInfo, cache, importStack = []) { + if (cache.has(id)) { + return cache.get(id); + } + if (importStack.includes(id)) { + cache.set(id, false); + return false; + } + const mod = getModuleInfo(id); + if (!mod) { + cache.set(id, false); + return false; + } + if (mod.isEntry) { + cache.set(id, true); + return true; + } + const someImporterIs = mod.importers.some( + (importer) => staticImportedByEntry( + importer, + getModuleInfo, + cache, + importStack.concat(id) + ) + ); + cache.set(id, someImporterIs); + return someImporterIs; +} +function splitVendorChunkPlugin() { + const caches = []; + function createSplitVendorChunk(output, config) { + const cache = new SplitVendorChunkCache(); + caches.push(cache); + const build = config.build ?? {}; + const format = output.format; + if (!build.ssr && !build.lib && format !== "umd" && format !== "iife") { + return splitVendorChunk({ cache }); + } + } + return { + name: "vite:split-vendor-chunk", + config(config) { + let outputs = config.build?.rollupOptions?.output; + if (outputs) { + outputs = arraify(outputs); + for (const output of outputs) { + const viteManualChunks = createSplitVendorChunk(output, config); + if (viteManualChunks) { + if (output.manualChunks) { + if (typeof output.manualChunks === "function") { + const userManualChunks = output.manualChunks; + output.manualChunks = (id, api) => { + return userManualChunks(id, api) ?? viteManualChunks(id, api); + }; + } else { + console.warn( + "(!) the `splitVendorChunk` plugin doesn't have any effect when using the object form of `build.rollupOptions.output.manualChunks`. Consider using the function form instead." + ); + } + } else { + output.manualChunks = viteManualChunks; + } + } + } + } else { + return { + build: { + rollupOptions: { + output: { + manualChunks: createSplitVendorChunk({}, config) + } + } + } + }; + } + }, + buildStart() { + caches.forEach((cache) => cache.reset()); + } + }; +} + +function perEnvironmentPlugin(name, applyToEnvironment) { + return { + name, + applyToEnvironment + }; +} + +function perEnvironmentState(initial) { + const stateMap = /* @__PURE__ */ new WeakMap(); + return function(context) { + const { environment } = context; + let state = stateMap.get(environment); + if (!state) { + state = initial(environment); + stateMap.set(environment, state); + } + return state; + }; +} + +var convertSourceMap$1 = {}; + +(function (exports) { + + Object.defineProperty(exports, 'commentRegex', { + get: function getCommentRegex () { + // Groups: 1: media type, 2: MIME type, 3: charset, 4: encoding, 5: data. + return /^\s*?\/[\/\*][@#]\s+?sourceMappingURL=data:(((?:application|text)\/json)(?:;charset=([^;,]+?)?)?)?(?:;(base64))?,(.*?)$/mg; + } + }); + + + Object.defineProperty(exports, 'mapFileCommentRegex', { + get: function getMapFileCommentRegex () { + // Matches sourceMappingURL in either // or /* comment styles. + return /(?:\/\/[@#][ \t]+?sourceMappingURL=([^\s'"`]+?)[ \t]*?$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*?(?:\*\/){1}[ \t]*?$)/mg; + } + }); + + var decodeBase64; + if (typeof Buffer !== 'undefined') { + if (typeof Buffer.from === 'function') { + decodeBase64 = decodeBase64WithBufferFrom; + } else { + decodeBase64 = decodeBase64WithNewBuffer; + } + } else { + decodeBase64 = decodeBase64WithAtob; + } + + function decodeBase64WithBufferFrom(base64) { + return Buffer.from(base64, 'base64').toString(); + } + + function decodeBase64WithNewBuffer(base64) { + if (typeof value === 'number') { + throw new TypeError('The value to decode must not be of type number.'); + } + return new Buffer(base64, 'base64').toString(); + } + + function decodeBase64WithAtob(base64) { + return decodeURIComponent(escape(atob(base64))); + } + + function stripComment(sm) { + return sm.split(',').pop(); + } + + function readFromFileMap(sm, read) { + var r = exports.mapFileCommentRegex.exec(sm); + // for some odd reason //# .. captures in 1 and /* .. */ in 2 + var filename = r[1] || r[2]; + + try { + var sm = read(filename); + if (sm != null && typeof sm.catch === 'function') { + return sm.catch(throwError); + } else { + return sm; + } + } catch (e) { + throwError(e); + } + + function throwError(e) { + throw new Error('An error occurred while trying to read the map file at ' + filename + '\n' + e.stack); + } + } + + function Converter (sm, opts) { + opts = opts || {}; + + if (opts.hasComment) { + sm = stripComment(sm); + } + + if (opts.encoding === 'base64') { + sm = decodeBase64(sm); + } else if (opts.encoding === 'uri') { + sm = decodeURIComponent(sm); + } + + if (opts.isJSON || opts.encoding) { + sm = JSON.parse(sm); + } + + this.sourcemap = sm; + } + + Converter.prototype.toJSON = function (space) { + return JSON.stringify(this.sourcemap, null, space); + }; + + if (typeof Buffer !== 'undefined') { + if (typeof Buffer.from === 'function') { + Converter.prototype.toBase64 = encodeBase64WithBufferFrom; + } else { + Converter.prototype.toBase64 = encodeBase64WithNewBuffer; + } + } else { + Converter.prototype.toBase64 = encodeBase64WithBtoa; + } + + function encodeBase64WithBufferFrom() { + var json = this.toJSON(); + return Buffer.from(json, 'utf8').toString('base64'); + } + + function encodeBase64WithNewBuffer() { + var json = this.toJSON(); + if (typeof json === 'number') { + throw new TypeError('The json to encode must not be of type number.'); + } + return new Buffer(json, 'utf8').toString('base64'); + } + + function encodeBase64WithBtoa() { + var json = this.toJSON(); + return btoa(unescape(encodeURIComponent(json))); + } + + Converter.prototype.toURI = function () { + var json = this.toJSON(); + return encodeURIComponent(json); + }; + + Converter.prototype.toComment = function (options) { + var encoding, content, data; + if (options != null && options.encoding === 'uri') { + encoding = ''; + content = this.toURI(); + } else { + encoding = ';base64'; + content = this.toBase64(); + } + data = 'sourceMappingURL=data:application/json;charset=utf-8' + encoding + ',' + content; + return options != null && options.multiline ? '/*# ' + data + ' */' : '//# ' + data; + }; + + // returns copy instead of original + Converter.prototype.toObject = function () { + return JSON.parse(this.toJSON()); + }; + + Converter.prototype.addProperty = function (key, value) { + if (this.sourcemap.hasOwnProperty(key)) throw new Error('property "' + key + '" already exists on the sourcemap, use set property instead'); + return this.setProperty(key, value); + }; + + Converter.prototype.setProperty = function (key, value) { + this.sourcemap[key] = value; + return this; + }; + + Converter.prototype.getProperty = function (key) { + return this.sourcemap[key]; + }; + + exports.fromObject = function (obj) { + return new Converter(obj); + }; + + exports.fromJSON = function (json) { + return new Converter(json, { isJSON: true }); + }; + + exports.fromURI = function (uri) { + return new Converter(uri, { encoding: 'uri' }); + }; + + exports.fromBase64 = function (base64) { + return new Converter(base64, { encoding: 'base64' }); + }; + + exports.fromComment = function (comment) { + var m, encoding; + comment = comment + .replace(/^\/\*/g, '//') + .replace(/\*\/$/g, ''); + m = exports.commentRegex.exec(comment); + encoding = m && m[4] || 'uri'; + return new Converter(comment, { encoding: encoding, hasComment: true }); + }; + + function makeConverter(sm) { + return new Converter(sm, { isJSON: true }); + } + + exports.fromMapFileComment = function (comment, read) { + if (typeof read === 'string') { + throw new Error( + 'String directory paths are no longer supported with `fromMapFileComment`\n' + + 'Please review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading' + ) + } + + var sm = readFromFileMap(comment, read); + if (sm != null && typeof sm.then === 'function') { + return sm.then(makeConverter); + } else { + return makeConverter(sm); + } + }; + + // Finds last sourcemap comment in file or returns null if none was found + exports.fromSource = function (content) { + var m = content.match(exports.commentRegex); + return m ? exports.fromComment(m.pop()) : null; + }; + + // Finds last sourcemap comment in file or returns null if none was found + exports.fromMapFileSource = function (content, read) { + if (typeof read === 'string') { + throw new Error( + 'String directory paths are no longer supported with `fromMapFileSource`\n' + + 'Please review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading' + ) + } + var m = content.match(exports.mapFileCommentRegex); + return m ? exports.fromMapFileComment(m.pop(), read) : null; + }; + + exports.removeComments = function (src) { + return src.replace(exports.commentRegex, ''); + }; + + exports.removeMapFileComments = function (src) { + return src.replace(exports.mapFileCommentRegex, ''); + }; + + exports.generateMapFileComment = function (file, options) { + var data = 'sourceMappingURL=' + file; + return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data; + }; +} (convertSourceMap$1)); + +var convertSourceMap = /*@__PURE__*/getDefaultExportFromCjs(convertSourceMap$1); + +/*! + * etag + * Copyright(c) 2014-2016 Douglas Christopher Wilson + * MIT Licensed + */ + +/** + * Module exports. + * @public + */ + +var etag_1 = etag; + +/** + * Module dependencies. + * @private + */ + +var crypto$1 = require$$0$1; +var Stats = require$$1$2.Stats; + +/** + * Module variables. + * @private + */ + +var toString$1 = Object.prototype.toString; + +/** + * Generate an entity tag. + * + * @param {Buffer|string} entity + * @return {string} + * @private + */ + +function entitytag (entity) { + if (entity.length === 0) { + // fast-path empty + return '"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk"' + } + + // compute hash of entity + var hash = crypto$1 + .createHash('sha1') + .update(entity, 'utf8') + .digest('base64') + .substring(0, 27); + + // compute length of entity + var len = typeof entity === 'string' + ? Buffer.byteLength(entity, 'utf8') + : entity.length; + + return '"' + len.toString(16) + '-' + hash + '"' +} + +/** + * Create a simple ETag. + * + * @param {string|Buffer|Stats} entity + * @param {object} [options] + * @param {boolean} [options.weak] + * @return {String} + * @public + */ + +function etag (entity, options) { + if (entity == null) { + throw new TypeError('argument entity is required') + } + + // support fs.Stats object + var isStats = isstats(entity); + var weak = options && typeof options.weak === 'boolean' + ? options.weak + : isStats; + + // validate argument + if (!isStats && typeof entity !== 'string' && !Buffer.isBuffer(entity)) { + throw new TypeError('argument entity must be string, Buffer, or fs.Stats') + } + + // generate entity tag + var tag = isStats + ? stattag(entity) + : entitytag(entity); + + return weak + ? 'W/' + tag + : tag +} + +/** + * Determine if object is a Stats object. + * + * @param {object} obj + * @return {boolean} + * @api private + */ + +function isstats (obj) { + // genuine fs.Stats + if (typeof Stats === 'function' && obj instanceof Stats) { + return true + } + + // quack quack + return obj && typeof obj === 'object' && + 'ctime' in obj && toString$1.call(obj.ctime) === '[object Date]' && + 'mtime' in obj && toString$1.call(obj.mtime) === '[object Date]' && + 'ino' in obj && typeof obj.ino === 'number' && + 'size' in obj && typeof obj.size === 'number' +} + +/** + * Generate a tag for a stat. + * + * @param {object} stat + * @return {string} + * @private + */ + +function stattag (stat) { + var mtime = stat.mtime.getTime().toString(16); + var size = stat.size.toString(16); + + return '"' + size + '-' + mtime + '"' +} + +var getEtag = /*@__PURE__*/getDefaultExportFromCjs(etag_1); + +class BitSet { + constructor(arg) { + this.bits = arg instanceof BitSet ? arg.bits.slice() : []; + } + + add(n) { + this.bits[n >> 5] |= 1 << (n & 31); + } + + has(n) { + return !!(this.bits[n >> 5] & (1 << (n & 31))); + } +} + +class Chunk { + constructor(start, end, content) { + this.start = start; + this.end = end; + this.original = content; + + this.intro = ''; + this.outro = ''; + + this.content = content; + this.storeName = false; + this.edited = false; + + { + this.previous = null; + this.next = null; + } + } + + appendLeft(content) { + this.outro += content; + } + + appendRight(content) { + this.intro = this.intro + content; + } + + clone() { + const chunk = new Chunk(this.start, this.end, this.original); + + chunk.intro = this.intro; + chunk.outro = this.outro; + chunk.content = this.content; + chunk.storeName = this.storeName; + chunk.edited = this.edited; + + return chunk; + } + + contains(index) { + return this.start < index && index < this.end; + } + + eachNext(fn) { + let chunk = this; + while (chunk) { + fn(chunk); + chunk = chunk.next; + } + } + + eachPrevious(fn) { + let chunk = this; + while (chunk) { + fn(chunk); + chunk = chunk.previous; + } + } + + edit(content, storeName, contentOnly) { + this.content = content; + if (!contentOnly) { + this.intro = ''; + this.outro = ''; + } + this.storeName = storeName; + + this.edited = true; + + return this; + } + + prependLeft(content) { + this.outro = content + this.outro; + } + + prependRight(content) { + this.intro = content + this.intro; + } + + reset() { + this.intro = ''; + this.outro = ''; + if (this.edited) { + this.content = this.original; + this.storeName = false; + this.edited = false; + } + } + + split(index) { + const sliceIndex = index - this.start; + + const originalBefore = this.original.slice(0, sliceIndex); + const originalAfter = this.original.slice(sliceIndex); + + this.original = originalBefore; + + const newChunk = new Chunk(index, this.end, originalAfter); + newChunk.outro = this.outro; + this.outro = ''; + + this.end = index; + + if (this.edited) { + // after split we should save the edit content record into the correct chunk + // to make sure sourcemap correct + // For example: + // ' test'.trim() + // split -> ' ' + 'test' + // ✔️ edit -> '' + 'test' + // ✖️ edit -> 'test' + '' + // TODO is this block necessary?... + newChunk.edit('', false); + this.content = ''; + } else { + this.content = originalBefore; + } + + newChunk.next = this.next; + if (newChunk.next) newChunk.next.previous = newChunk; + newChunk.previous = this; + this.next = newChunk; + + return newChunk; + } + + toString() { + return this.intro + this.content + this.outro; + } + + trimEnd(rx) { + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + + const trimmed = this.content.replace(rx, ''); + + if (trimmed.length) { + if (trimmed !== this.content) { + this.split(this.start + trimmed.length).edit('', undefined, true); + if (this.edited) { + // save the change, if it has been edited + this.edit(trimmed, this.storeName, true); + } + } + return true; + } else { + this.edit('', undefined, true); + + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + } + } + + trimStart(rx) { + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + + const trimmed = this.content.replace(rx, ''); + + if (trimmed.length) { + if (trimmed !== this.content) { + const newChunk = this.split(this.end - trimmed.length); + if (this.edited) { + // save the change, if it has been edited + newChunk.edit(trimmed, this.storeName, true); + } + this.edit('', undefined, true); + } + return true; + } else { + this.edit('', undefined, true); + + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + } + } +} + +function getBtoa() { + if (typeof globalThis !== 'undefined' && typeof globalThis.btoa === 'function') { + return (str) => globalThis.btoa(unescape(encodeURIComponent(str))); + } else if (typeof Buffer === 'function') { + return (str) => Buffer.from(str, 'utf-8').toString('base64'); + } else { + return () => { + throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.'); + }; + } +} + +const btoa$1 = /*#__PURE__*/ getBtoa(); + +class SourceMap { + constructor(properties) { + this.version = 3; + this.file = properties.file; + this.sources = properties.sources; + this.sourcesContent = properties.sourcesContent; + this.names = properties.names; + this.mappings = encode(properties.mappings); + if (typeof properties.x_google_ignoreList !== 'undefined') { + this.x_google_ignoreList = properties.x_google_ignoreList; + } + if (typeof properties.debugId !== 'undefined') { + this.debugId = properties.debugId; + } + } + + toString() { + return JSON.stringify(this); + } + + toUrl() { + return 'data:application/json;charset=utf-8;base64,' + btoa$1(this.toString()); + } +} + +function guessIndent(code) { + const lines = code.split('\n'); + + const tabbed = lines.filter((line) => /^\t+/.test(line)); + const spaced = lines.filter((line) => /^ {2,}/.test(line)); + + if (tabbed.length === 0 && spaced.length === 0) { + return null; + } + + // More lines tabbed than spaced? Assume tabs, and + // default to tabs in the case of a tie (or nothing + // to go on) + if (tabbed.length >= spaced.length) { + return '\t'; + } + + // Otherwise, we need to guess the multiple + const min = spaced.reduce((previous, current) => { + const numSpaces = /^ +/.exec(current)[0].length; + return Math.min(numSpaces, previous); + }, Infinity); + + return new Array(min + 1).join(' '); +} + +function getRelativePath(from, to) { + const fromParts = from.split(/[/\\]/); + const toParts = to.split(/[/\\]/); + + fromParts.pop(); // get dirname + + while (fromParts[0] === toParts[0]) { + fromParts.shift(); + toParts.shift(); + } + + if (fromParts.length) { + let i = fromParts.length; + while (i--) fromParts[i] = '..'; + } + + return fromParts.concat(toParts).join('/'); +} + +const toString = Object.prototype.toString; + +function isObject(thing) { + return toString.call(thing) === '[object Object]'; +} + +function getLocator(source) { + const originalLines = source.split('\n'); + const lineOffsets = []; + + for (let i = 0, pos = 0; i < originalLines.length; i++) { + lineOffsets.push(pos); + pos += originalLines[i].length + 1; + } + + return function locate(index) { + let i = 0; + let j = lineOffsets.length; + while (i < j) { + const m = (i + j) >> 1; + if (index < lineOffsets[m]) { + j = m; + } else { + i = m + 1; + } + } + const line = i - 1; + const column = index - lineOffsets[line]; + return { line, column }; + }; +} + +const wordRegex = /\w/; + +class Mappings { + constructor(hires) { + this.hires = hires; + this.generatedCodeLine = 0; + this.generatedCodeColumn = 0; + this.raw = []; + this.rawSegments = this.raw[this.generatedCodeLine] = []; + this.pending = null; + } + + addEdit(sourceIndex, content, loc, nameIndex) { + if (content.length) { + const contentLengthMinusOne = content.length - 1; + let contentLineEnd = content.indexOf('\n', 0); + let previousContentLineEnd = -1; + // Loop through each line in the content and add a segment, but stop if the last line is empty, + // else code afterwards would fill one line too many + while (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) { + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + if (nameIndex >= 0) { + segment.push(nameIndex); + } + this.rawSegments.push(segment); + + this.generatedCodeLine += 1; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + this.generatedCodeColumn = 0; + + previousContentLineEnd = contentLineEnd; + contentLineEnd = content.indexOf('\n', contentLineEnd + 1); + } + + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + if (nameIndex >= 0) { + segment.push(nameIndex); + } + this.rawSegments.push(segment); + + this.advance(content.slice(previousContentLineEnd + 1)); + } else if (this.pending) { + this.rawSegments.push(this.pending); + this.advance(content); + } + + this.pending = null; + } + + addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) { + let originalCharIndex = chunk.start; + let first = true; + // when iterating each char, check if it's in a word boundary + let charInHiresBoundary = false; + + while (originalCharIndex < chunk.end) { + if (original[originalCharIndex] === '\n') { + loc.line += 1; + loc.column = 0; + this.generatedCodeLine += 1; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + this.generatedCodeColumn = 0; + first = true; + charInHiresBoundary = false; + } else { + if (this.hires || first || sourcemapLocations.has(originalCharIndex)) { + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + + if (this.hires === 'boundary') { + // in hires "boundary", group segments per word boundary than per char + if (wordRegex.test(original[originalCharIndex])) { + // for first char in the boundary found, start the boundary by pushing a segment + if (!charInHiresBoundary) { + this.rawSegments.push(segment); + charInHiresBoundary = true; + } + } else { + // for non-word char, end the boundary by pushing a segment + this.rawSegments.push(segment); + charInHiresBoundary = false; + } + } else { + this.rawSegments.push(segment); + } + } + + loc.column += 1; + this.generatedCodeColumn += 1; + first = false; + } + + originalCharIndex += 1; + } + + this.pending = null; + } + + advance(str) { + if (!str) return; + + const lines = str.split('\n'); + + if (lines.length > 1) { + for (let i = 0; i < lines.length - 1; i++) { + this.generatedCodeLine++; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + } + this.generatedCodeColumn = 0; + } + + this.generatedCodeColumn += lines[lines.length - 1].length; + } +} + +const n = '\n'; + +const warned = { + insertLeft: false, + insertRight: false, + storeName: false, +}; + +class MagicString { + constructor(string, options = {}) { + const chunk = new Chunk(0, string.length, string); + + Object.defineProperties(this, { + original: { writable: true, value: string }, + outro: { writable: true, value: '' }, + intro: { writable: true, value: '' }, + firstChunk: { writable: true, value: chunk }, + lastChunk: { writable: true, value: chunk }, + lastSearchedChunk: { writable: true, value: chunk }, + byStart: { writable: true, value: {} }, + byEnd: { writable: true, value: {} }, + filename: { writable: true, value: options.filename }, + indentExclusionRanges: { writable: true, value: options.indentExclusionRanges }, + sourcemapLocations: { writable: true, value: new BitSet() }, + storedNames: { writable: true, value: {} }, + indentStr: { writable: true, value: undefined }, + ignoreList: { writable: true, value: options.ignoreList }, + offset: { writable: true, value: options.offset || 0 }, + }); + + this.byStart[0] = chunk; + this.byEnd[string.length] = chunk; + } + + addSourcemapLocation(char) { + this.sourcemapLocations.add(char); + } + + append(content) { + if (typeof content !== 'string') throw new TypeError('outro content must be a string'); + + this.outro += content; + return this; + } + + appendLeft(index, content) { + index = index + this.offset; + + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byEnd[index]; + + if (chunk) { + chunk.appendLeft(content); + } else { + this.intro += content; + } + return this; + } + + appendRight(index, content) { + index = index + this.offset; + + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byStart[index]; + + if (chunk) { + chunk.appendRight(content); + } else { + this.outro += content; + } + return this; + } + + clone() { + const cloned = new MagicString(this.original, { filename: this.filename, offset: this.offset }); + + let originalChunk = this.firstChunk; + let clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone()); + + while (originalChunk) { + cloned.byStart[clonedChunk.start] = clonedChunk; + cloned.byEnd[clonedChunk.end] = clonedChunk; + + const nextOriginalChunk = originalChunk.next; + const nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone(); + + if (nextClonedChunk) { + clonedChunk.next = nextClonedChunk; + nextClonedChunk.previous = clonedChunk; + + clonedChunk = nextClonedChunk; + } + + originalChunk = nextOriginalChunk; + } + + cloned.lastChunk = clonedChunk; + + if (this.indentExclusionRanges) { + cloned.indentExclusionRanges = this.indentExclusionRanges.slice(); + } + + cloned.sourcemapLocations = new BitSet(this.sourcemapLocations); + + cloned.intro = this.intro; + cloned.outro = this.outro; + + return cloned; + } + + generateDecodedMap(options) { + options = options || {}; + + const sourceIndex = 0; + const names = Object.keys(this.storedNames); + const mappings = new Mappings(options.hires); + + const locate = getLocator(this.original); + + if (this.intro) { + mappings.advance(this.intro); + } + + this.firstChunk.eachNext((chunk) => { + const loc = locate(chunk.start); + + if (chunk.intro.length) mappings.advance(chunk.intro); + + if (chunk.edited) { + mappings.addEdit( + sourceIndex, + chunk.content, + loc, + chunk.storeName ? names.indexOf(chunk.original) : -1, + ); + } else { + mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations); + } + + if (chunk.outro.length) mappings.advance(chunk.outro); + }); + + return { + file: options.file ? options.file.split(/[/\\]/).pop() : undefined, + sources: [ + options.source ? getRelativePath(options.file || '', options.source) : options.file || '', + ], + sourcesContent: options.includeContent ? [this.original] : undefined, + names, + mappings: mappings.raw, + x_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined, + }; + } + + generateMap(options) { + return new SourceMap(this.generateDecodedMap(options)); + } + + _ensureindentStr() { + if (this.indentStr === undefined) { + this.indentStr = guessIndent(this.original); + } + } + + _getRawIndentString() { + this._ensureindentStr(); + return this.indentStr; + } + + getIndentString() { + this._ensureindentStr(); + return this.indentStr === null ? '\t' : this.indentStr; + } + + indent(indentStr, options) { + const pattern = /^[^\r\n]/gm; + + if (isObject(indentStr)) { + options = indentStr; + indentStr = undefined; + } + + if (indentStr === undefined) { + this._ensureindentStr(); + indentStr = this.indentStr || '\t'; + } + + if (indentStr === '') return this; // noop + + options = options || {}; + + // Process exclusion ranges + const isExcluded = {}; + + if (options.exclude) { + const exclusions = + typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude; + exclusions.forEach((exclusion) => { + for (let i = exclusion[0]; i < exclusion[1]; i += 1) { + isExcluded[i] = true; + } + }); + } + + let shouldIndentNextCharacter = options.indentStart !== false; + const replacer = (match) => { + if (shouldIndentNextCharacter) return `${indentStr}${match}`; + shouldIndentNextCharacter = true; + return match; + }; + + this.intro = this.intro.replace(pattern, replacer); + + let charIndex = 0; + let chunk = this.firstChunk; + + while (chunk) { + const end = chunk.end; + + if (chunk.edited) { + if (!isExcluded[charIndex]) { + chunk.content = chunk.content.replace(pattern, replacer); + + if (chunk.content.length) { + shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n'; + } + } + } else { + charIndex = chunk.start; + + while (charIndex < end) { + if (!isExcluded[charIndex]) { + const char = this.original[charIndex]; + + if (char === '\n') { + shouldIndentNextCharacter = true; + } else if (char !== '\r' && shouldIndentNextCharacter) { + shouldIndentNextCharacter = false; + + if (charIndex === chunk.start) { + chunk.prependRight(indentStr); + } else { + this._splitChunk(chunk, charIndex); + chunk = chunk.next; + chunk.prependRight(indentStr); + } + } + } + + charIndex += 1; + } + } + + charIndex = chunk.end; + chunk = chunk.next; + } + + this.outro = this.outro.replace(pattern, replacer); + + return this; + } + + insert() { + throw new Error( + 'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)', + ); + } + + insertLeft(index, content) { + if (!warned.insertLeft) { + console.warn( + 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead', + ); + warned.insertLeft = true; + } + + return this.appendLeft(index, content); + } + + insertRight(index, content) { + if (!warned.insertRight) { + console.warn( + 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead', + ); + warned.insertRight = true; + } + + return this.prependRight(index, content); + } + + move(start, end, index) { + start = start + this.offset; + end = end + this.offset; + index = index + this.offset; + + if (index >= start && index <= end) throw new Error('Cannot move a selection inside itself'); + + this._split(start); + this._split(end); + this._split(index); + + const first = this.byStart[start]; + const last = this.byEnd[end]; + + const oldLeft = first.previous; + const oldRight = last.next; + + const newRight = this.byStart[index]; + if (!newRight && last === this.lastChunk) return this; + const newLeft = newRight ? newRight.previous : this.lastChunk; + + if (oldLeft) oldLeft.next = oldRight; + if (oldRight) oldRight.previous = oldLeft; + + if (newLeft) newLeft.next = first; + if (newRight) newRight.previous = last; + + if (!first.previous) this.firstChunk = last.next; + if (!last.next) { + this.lastChunk = first.previous; + this.lastChunk.next = null; + } + + first.previous = newLeft; + last.next = newRight || null; + + if (!newLeft) this.firstChunk = first; + if (!newRight) this.lastChunk = last; + return this; + } + + overwrite(start, end, content, options) { + options = options || {}; + return this.update(start, end, content, { ...options, overwrite: !options.contentOnly }); + } + + update(start, end, content, options) { + start = start + this.offset; + end = end + this.offset; + + if (typeof content !== 'string') throw new TypeError('replacement content must be a string'); + + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + if (end > this.original.length) throw new Error('end is out of bounds'); + if (start === end) + throw new Error( + 'Cannot overwrite a zero-length range – use appendLeft or prependRight instead', + ); + + this._split(start); + this._split(end); + + if (options === true) { + if (!warned.storeName) { + console.warn( + 'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string', + ); + warned.storeName = true; + } + + options = { storeName: true }; + } + const storeName = options !== undefined ? options.storeName : false; + const overwrite = options !== undefined ? options.overwrite : false; + + if (storeName) { + const original = this.original.slice(start, end); + Object.defineProperty(this.storedNames, original, { + writable: true, + value: true, + enumerable: true, + }); + } + + const first = this.byStart[start]; + const last = this.byEnd[end]; + + if (first) { + let chunk = first; + while (chunk !== last) { + if (chunk.next !== this.byStart[chunk.end]) { + throw new Error('Cannot overwrite across a split point'); + } + chunk = chunk.next; + chunk.edit('', false); + } + + first.edit(content, storeName, !overwrite); + } else { + // must be inserting at the end + const newChunk = new Chunk(start, end, '').edit(content, storeName); + + // TODO last chunk in the array may not be the last chunk, if it's moved... + last.next = newChunk; + newChunk.previous = last; + } + return this; + } + + prepend(content) { + if (typeof content !== 'string') throw new TypeError('outro content must be a string'); + + this.intro = content + this.intro; + return this; + } + + prependLeft(index, content) { + index = index + this.offset; + + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byEnd[index]; + + if (chunk) { + chunk.prependLeft(content); + } else { + this.intro = content + this.intro; + } + return this; + } + + prependRight(index, content) { + index = index + this.offset; + + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byStart[index]; + + if (chunk) { + chunk.prependRight(content); + } else { + this.outro = content + this.outro; + } + return this; + } + + remove(start, end) { + start = start + this.offset; + end = end + this.offset; + + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + if (start === end) return this; + + if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); + if (start > end) throw new Error('end must be greater than start'); + + this._split(start); + this._split(end); + + let chunk = this.byStart[start]; + + while (chunk) { + chunk.intro = ''; + chunk.outro = ''; + chunk.edit(''); + + chunk = end > chunk.end ? this.byStart[chunk.end] : null; + } + return this; + } + + reset(start, end) { + start = start + this.offset; + end = end + this.offset; + + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + if (start === end) return this; + + if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); + if (start > end) throw new Error('end must be greater than start'); + + this._split(start); + this._split(end); + + let chunk = this.byStart[start]; + + while (chunk) { + chunk.reset(); + + chunk = end > chunk.end ? this.byStart[chunk.end] : null; + } + return this; + } + + lastChar() { + if (this.outro.length) return this.outro[this.outro.length - 1]; + let chunk = this.lastChunk; + do { + if (chunk.outro.length) return chunk.outro[chunk.outro.length - 1]; + if (chunk.content.length) return chunk.content[chunk.content.length - 1]; + if (chunk.intro.length) return chunk.intro[chunk.intro.length - 1]; + } while ((chunk = chunk.previous)); + if (this.intro.length) return this.intro[this.intro.length - 1]; + return ''; + } + + lastLine() { + let lineIndex = this.outro.lastIndexOf(n); + if (lineIndex !== -1) return this.outro.substr(lineIndex + 1); + let lineStr = this.outro; + let chunk = this.lastChunk; + do { + if (chunk.outro.length > 0) { + lineIndex = chunk.outro.lastIndexOf(n); + if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr; + lineStr = chunk.outro + lineStr; + } + + if (chunk.content.length > 0) { + lineIndex = chunk.content.lastIndexOf(n); + if (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr; + lineStr = chunk.content + lineStr; + } + + if (chunk.intro.length > 0) { + lineIndex = chunk.intro.lastIndexOf(n); + if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr; + lineStr = chunk.intro + lineStr; + } + } while ((chunk = chunk.previous)); + lineIndex = this.intro.lastIndexOf(n); + if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr; + return this.intro + lineStr; + } + + slice(start = 0, end = this.original.length - this.offset) { + start = start + this.offset; + end = end + this.offset; + + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + let result = ''; + + // find start chunk + let chunk = this.firstChunk; + while (chunk && (chunk.start > start || chunk.end <= start)) { + // found end chunk before start + if (chunk.start < end && chunk.end >= end) { + return result; + } + + chunk = chunk.next; + } + + if (chunk && chunk.edited && chunk.start !== start) + throw new Error(`Cannot use replaced character ${start} as slice start anchor.`); + + const startChunk = chunk; + while (chunk) { + if (chunk.intro && (startChunk !== chunk || chunk.start === start)) { + result += chunk.intro; + } + + const containsEnd = chunk.start < end && chunk.end >= end; + if (containsEnd && chunk.edited && chunk.end !== end) + throw new Error(`Cannot use replaced character ${end} as slice end anchor.`); + + const sliceStart = startChunk === chunk ? start - chunk.start : 0; + const sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length; + + result += chunk.content.slice(sliceStart, sliceEnd); + + if (chunk.outro && (!containsEnd || chunk.end === end)) { + result += chunk.outro; + } + + if (containsEnd) { + break; + } + + chunk = chunk.next; + } + + return result; + } + + // TODO deprecate this? not really very useful + snip(start, end) { + const clone = this.clone(); + clone.remove(0, start); + clone.remove(end, clone.original.length); + + return clone; + } + + _split(index) { + if (this.byStart[index] || this.byEnd[index]) return; + + let chunk = this.lastSearchedChunk; + const searchForward = index > chunk.end; + + while (chunk) { + if (chunk.contains(index)) return this._splitChunk(chunk, index); + + chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start]; + } + } + + _splitChunk(chunk, index) { + if (chunk.edited && chunk.content.length) { + // zero-length edited chunks are a special case (overlapping replacements) + const loc = getLocator(this.original)(index); + throw new Error( + `Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`, + ); + } + + const newChunk = chunk.split(index); + + this.byEnd[index] = chunk; + this.byStart[index] = newChunk; + this.byEnd[newChunk.end] = newChunk; + + if (chunk === this.lastChunk) this.lastChunk = newChunk; + + this.lastSearchedChunk = chunk; + return true; + } + + toString() { + let str = this.intro; + + let chunk = this.firstChunk; + while (chunk) { + str += chunk.toString(); + chunk = chunk.next; + } + + return str + this.outro; + } + + isEmpty() { + let chunk = this.firstChunk; + do { + if ( + (chunk.intro.length && chunk.intro.trim()) || + (chunk.content.length && chunk.content.trim()) || + (chunk.outro.length && chunk.outro.trim()) + ) + return false; + } while ((chunk = chunk.next)); + return true; + } + + length() { + let chunk = this.firstChunk; + let length = 0; + do { + length += chunk.intro.length + chunk.content.length + chunk.outro.length; + } while ((chunk = chunk.next)); + return length; + } + + trimLines() { + return this.trim('[\\r\\n]'); + } + + trim(charType) { + return this.trimStart(charType).trimEnd(charType); + } + + trimEndAborted(charType) { + const rx = new RegExp((charType || '\\s') + '+$'); + + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + + let chunk = this.lastChunk; + + do { + const end = chunk.end; + const aborted = chunk.trimEnd(rx); + + // if chunk was trimmed, we have a new lastChunk + if (chunk.end !== end) { + if (this.lastChunk === chunk) { + this.lastChunk = chunk.next; + } + + this.byEnd[chunk.end] = chunk; + this.byStart[chunk.next.start] = chunk.next; + this.byEnd[chunk.next.end] = chunk.next; + } + + if (aborted) return true; + chunk = chunk.previous; + } while (chunk); + + return false; + } + + trimEnd(charType) { + this.trimEndAborted(charType); + return this; + } + trimStartAborted(charType) { + const rx = new RegExp('^' + (charType || '\\s') + '+'); + + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + + let chunk = this.firstChunk; + + do { + const end = chunk.end; + const aborted = chunk.trimStart(rx); + + if (chunk.end !== end) { + // special case... + if (chunk === this.lastChunk) this.lastChunk = chunk.next; + + this.byEnd[chunk.end] = chunk; + this.byStart[chunk.next.start] = chunk.next; + this.byEnd[chunk.next.end] = chunk.next; + } + + if (aborted) return true; + chunk = chunk.next; + } while (chunk); + + return false; + } + + trimStart(charType) { + this.trimStartAborted(charType); + return this; + } + + hasChanged() { + return this.original !== this.toString(); + } + + _replaceRegexp(searchValue, replacement) { + function getReplacement(match, str) { + if (typeof replacement === 'string') { + return replacement.replace(/\$(\$|&|\d+)/g, (_, i) => { + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter + if (i === '$') return '$'; + if (i === '&') return match[0]; + const num = +i; + if (num < match.length) return match[+i]; + return `$${i}`; + }); + } else { + return replacement(...match, match.index, str, match.groups); + } + } + function matchAll(re, str) { + let match; + const matches = []; + while ((match = re.exec(str))) { + matches.push(match); + } + return matches; + } + if (searchValue.global) { + const matches = matchAll(searchValue, this.original); + matches.forEach((match) => { + if (match.index != null) { + const replacement = getReplacement(match, this.original); + if (replacement !== match[0]) { + this.overwrite(match.index, match.index + match[0].length, replacement); + } + } + }); + } else { + const match = this.original.match(searchValue); + if (match && match.index != null) { + const replacement = getReplacement(match, this.original); + if (replacement !== match[0]) { + this.overwrite(match.index, match.index + match[0].length, replacement); + } + } + } + return this; + } + + _replaceString(string, replacement) { + const { original } = this; + const index = original.indexOf(string); + + if (index !== -1) { + this.overwrite(index, index + string.length, replacement); + } + + return this; + } + + replace(searchValue, replacement) { + if (typeof searchValue === 'string') { + return this._replaceString(searchValue, replacement); + } + + return this._replaceRegexp(searchValue, replacement); + } + + _replaceAllString(string, replacement) { + const { original } = this; + const stringLength = string.length; + for ( + let index = original.indexOf(string); + index !== -1; + index = original.indexOf(string, index + stringLength) + ) { + const previous = original.slice(index, index + stringLength); + if (previous !== replacement) this.overwrite(index, index + stringLength, replacement); + } + + return this; + } + + replaceAll(searchValue, replacement) { + if (typeof searchValue === 'string') { + return this._replaceAllString(searchValue, replacement); + } + + if (!searchValue.global) { + throw new TypeError( + 'MagicString.prototype.replaceAll called with a non-global RegExp argument', + ); + } + + return this._replaceRegexp(searchValue, replacement); + } +} + +const debug$2 = createDebugger("vite:sourcemap", { + onlyWhenFocused: true +}); +function genSourceMapUrl(map) { + if (typeof map !== "string") { + map = JSON.stringify(map); + } + return `data:application/json;base64,${Buffer.from(map).toString("base64")}`; +} +function getCodeWithSourcemap(type, code, map) { + if (debug$2) { + code += ` +/*${JSON.stringify(map, null, 2).replace(/\*\//g, "*\\/")}*/ +`; + } + if (type === "js") { + code += ` +//# sourceMappingURL=${genSourceMapUrl(map)}`; + } else if (type === "css") { + code += ` +/*# sourceMappingURL=${genSourceMapUrl(map)} */`; + } + return code; +} + +const debug$1 = createDebugger("vite:send", { + onlyWhenFocused: true +}); +const alias = { + js: "text/javascript", + css: "text/css", + html: "text/html", + json: "application/json" +}; +function send(req, res, content, type, options) { + const { + etag = getEtag(content, { weak: true }), + cacheControl = "no-cache", + headers, + map + } = options; + if (res.writableEnded) { + return; + } + if (req.headers["if-none-match"] === etag) { + res.statusCode = 304; + res.end(); + return; + } + res.setHeader("Content-Type", alias[type] || type); + res.setHeader("Cache-Control", cacheControl); + res.setHeader("Etag", etag); + if (headers) { + for (const name in headers) { + res.setHeader(name, headers[name]); + } + } + if (map && "version" in map && map.mappings) { + if (type === "js" || type === "css") { + content = getCodeWithSourcemap(type, content.toString(), map); + } + } else if (type === "js" && (!map || map.mappings !== "")) { + const code = content.toString(); + if (convertSourceMap.mapFileCommentRegex.test(code)) { + debug$1?.(`Skipped injecting fallback sourcemap for ${req.url}`); + } else { + const urlWithoutTimestamp = removeTimestampQuery(req.url); + const ms = new MagicString(code); + content = getCodeWithSourcemap( + type, + code, + ms.generateMap({ + source: path$1.basename(urlWithoutTimestamp), + hires: "boundary", + includeContent: true + }) + ); + } + } + res.statusCode = 200; + res.end(content); + return; +} + +const LogLevels = { + silent: 0, + error: 1, + warn: 2, + info: 3 +}; +let lastType; +let lastMsg; +let sameCount = 0; +function clearScreen() { + const repeatCount = process.stdout.rows - 2; + const blank = repeatCount > 0 ? "\n".repeat(repeatCount) : ""; + console.log(blank); + readline.cursorTo(process.stdout, 0, 0); + readline.clearScreenDown(process.stdout); +} +let timeFormatter; +function getTimeFormatter() { + timeFormatter ??= new Intl.DateTimeFormat(void 0, { + hour: "numeric", + minute: "numeric", + second: "numeric" + }); + return timeFormatter; +} +function createLogger(level = "info", options = {}) { + if (options.customLogger) { + return options.customLogger; + } + const loggedErrors = /* @__PURE__ */ new WeakSet(); + const { + prefix = "[vite]", + allowClearScreen = true, + console: console2 = globalThis.console + } = options; + const thresh = LogLevels[level]; + const canClearScreen = allowClearScreen && process.stdout.isTTY && !process.env.CI; + const clear = canClearScreen ? clearScreen : () => { + }; + function format(type, msg, options2 = {}) { + if (options2.timestamp) { + let tag = ""; + if (type === "info") { + tag = colors.cyan(colors.bold(prefix)); + } else if (type === "warn") { + tag = colors.yellow(colors.bold(prefix)); + } else { + tag = colors.red(colors.bold(prefix)); + } + const environment = options2.environment ? options2.environment + " " : ""; + return `${colors.dim(getTimeFormatter().format(/* @__PURE__ */ new Date()))} ${tag} ${environment}${msg}`; + } else { + return msg; + } + } + function output(type, msg, options2 = {}) { + if (thresh >= LogLevels[type]) { + const method = type === "info" ? "log" : type; + if (options2.error) { + loggedErrors.add(options2.error); + } + if (canClearScreen) { + if (type === lastType && msg === lastMsg) { + sameCount++; + clear(); + console2[method]( + format(type, msg, options2), + colors.yellow(`(x${sameCount + 1})`) + ); + } else { + sameCount = 0; + lastMsg = msg; + lastType = type; + if (options2.clear) { + clear(); + } + console2[method](format(type, msg, options2)); + } + } else { + console2[method](format(type, msg, options2)); + } + } + } + const warnedMessages = /* @__PURE__ */ new Set(); + const logger = { + hasWarned: false, + info(msg, opts) { + output("info", msg, opts); + }, + warn(msg, opts) { + logger.hasWarned = true; + output("warn", msg, opts); + }, + warnOnce(msg, opts) { + if (warnedMessages.has(msg)) return; + logger.hasWarned = true; + output("warn", msg, opts); + warnedMessages.add(msg); + }, + error(msg, opts) { + logger.hasWarned = true; + output("error", msg, opts); + }, + clearScreen(type) { + if (thresh >= LogLevels[type]) { + clear(); + } + }, + hasErrorLogged(error) { + return loggedErrors.has(error); + } + }; + return logger; +} + +const ROOT_FILES = [ + // '.git', + // https://pnpm.io/workspaces/ + "pnpm-workspace.yaml", + // https://rushjs.io/pages/advanced/config_files/ + // 'rush.json', + // https://nx.dev/latest/react/getting-started/nx-setup + // 'workspace.json', + // 'nx.json', + // https://github.com/lerna/lerna#lernajson + "lerna.json" +]; +function hasWorkspacePackageJSON(root) { + const path = path$1.join(root, "package.json"); + if (!isFileReadable(path)) { + return false; + } + try { + const content = JSON.parse(fs$1.readFileSync(path, "utf-8")) || {}; + return !!content.workspaces; + } catch { + return false; + } +} +function hasRootFile(root) { + return ROOT_FILES.some((file) => fs$1.existsSync(path$1.join(root, file))); +} +function hasPackageJSON(root) { + const path = path$1.join(root, "package.json"); + return fs$1.existsSync(path); +} +function searchForPackageRoot(current, root = current) { + if (hasPackageJSON(current)) return current; + const dir = path$1.dirname(current); + if (!dir || dir === current) return root; + return searchForPackageRoot(dir, root); +} +function searchForWorkspaceRoot(current, root = searchForPackageRoot(current)) { + if (hasRootFile(current)) return current; + if (hasWorkspacePackageJSON(current)) return current; + const dir = path$1.dirname(current); + if (!dir || dir === current) return root; + return searchForWorkspaceRoot(dir, root); +} + +function isFileServingAllowed(configOrUrl, urlOrServer) { + const config = typeof urlOrServer === "string" ? configOrUrl : urlOrServer.config; + const url = typeof urlOrServer === "string" ? urlOrServer : configOrUrl; + if (!config.server.fs.strict) return true; + const filePath = fsPathFromUrl(url); + return isFileLoadingAllowed(config, filePath); +} +function isUriInFilePath(uri, filePath) { + return isSameFileUri(uri, filePath) || isParentDirectory(uri, filePath); +} +function isFileLoadingAllowed(config, filePath) { + const { fs } = config.server; + if (!fs.strict) return true; + if (config.fsDenyGlob(filePath)) return false; + if (config.safeModulePaths.has(filePath)) return true; + if (fs.allow.some((uri) => isUriInFilePath(uri, filePath))) return true; + return false; +} + +var main = {exports: {}}; + +var version$1 = "16.5.0"; +var require$$4 = { + version: version$1}; + +const fs = require$$1$2; +const path = require$$1$1; +const os = require$$2; +const crypto = require$$0$1; +const packageJson = require$$4; + +const version = packageJson.version; + +const LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg; + +// Parse src into an Object +function parse (src) { + const obj = {}; + + // Convert buffer to string + let lines = src.toString(); + + // Convert line breaks to same format + lines = lines.replace(/\r\n?/mg, '\n'); + + let match; + while ((match = LINE.exec(lines)) != null) { + const key = match[1]; + + // Default undefined or null to empty string + let value = (match[2] || ''); + + // Remove whitespace + value = value.trim(); + + // Check if double quoted + const maybeQuote = value[0]; + + // Remove surrounding quotes + value = value.replace(/^(['"`])([\s\S]*)\1$/mg, '$2'); + + // Expand newlines if double quoted + if (maybeQuote === '"') { + value = value.replace(/\\n/g, '\n'); + value = value.replace(/\\r/g, '\r'); + } + + // Add to object + obj[key] = value; + } + + return obj +} + +function _parseVault (options) { + const vaultPath = _vaultPath(options); + + // Parse .env.vault + const result = DotenvModule.configDotenv({ path: vaultPath }); + if (!result.parsed) { + const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`); + err.code = 'MISSING_DATA'; + throw err + } + + // handle scenario for comma separated keys - for use with key rotation + // example: DOTENV_KEY="dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=prod,dotenv://:key_7890@dotenvx.com/vault/.env.vault?environment=prod" + const keys = _dotenvKey(options).split(','); + const length = keys.length; + + let decrypted; + for (let i = 0; i < length; i++) { + try { + // Get full key + const key = keys[i].trim(); + + // Get instructions for decrypt + const attrs = _instructions(result, key); + + // Decrypt + decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key); + + break + } catch (error) { + // last key + if (i + 1 >= length) { + throw error + } + // try next key + } + } + + // Parse decrypted .env string + return DotenvModule.parse(decrypted) +} + +function _warn (message) { + console.log(`[dotenv@${version}][WARN] ${message}`); +} + +function _debug (message) { + console.log(`[dotenv@${version}][DEBUG] ${message}`); +} + +function _dotenvKey (options) { + // prioritize developer directly setting options.DOTENV_KEY + if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) { + return options.DOTENV_KEY + } + + // secondary infra already contains a DOTENV_KEY environment variable + if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) { + return process.env.DOTENV_KEY + } + + // fallback to empty string + return '' +} + +function _instructions (result, dotenvKey) { + // Parse DOTENV_KEY. Format is a URI + let uri; + try { + uri = new URL(dotenvKey); + } catch (error) { + if (error.code === 'ERR_INVALID_URL') { + const err = new Error('INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development'); + err.code = 'INVALID_DOTENV_KEY'; + throw err + } + + throw error + } + + // Get decrypt key + const key = uri.password; + if (!key) { + const err = new Error('INVALID_DOTENV_KEY: Missing key part'); + err.code = 'INVALID_DOTENV_KEY'; + throw err + } + + // Get environment + const environment = uri.searchParams.get('environment'); + if (!environment) { + const err = new Error('INVALID_DOTENV_KEY: Missing environment part'); + err.code = 'INVALID_DOTENV_KEY'; + throw err + } + + // Get ciphertext payload + const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`; + const ciphertext = result.parsed[environmentKey]; // DOTENV_VAULT_PRODUCTION + if (!ciphertext) { + const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`); + err.code = 'NOT_FOUND_DOTENV_ENVIRONMENT'; + throw err + } + + return { ciphertext, key } +} + +function _vaultPath (options) { + let possibleVaultPath = null; + + if (options && options.path && options.path.length > 0) { + if (Array.isArray(options.path)) { + for (const filepath of options.path) { + if (fs.existsSync(filepath)) { + possibleVaultPath = filepath.endsWith('.vault') ? filepath : `${filepath}.vault`; + } + } + } else { + possibleVaultPath = options.path.endsWith('.vault') ? options.path : `${options.path}.vault`; + } + } else { + possibleVaultPath = path.resolve(process.cwd(), '.env.vault'); + } + + if (fs.existsSync(possibleVaultPath)) { + return possibleVaultPath + } + + return null +} + +function _resolveHome (envPath) { + return envPath[0] === '~' ? path.join(os.homedir(), envPath.slice(1)) : envPath +} + +function _configVault (options) { + const debug = Boolean(options && options.debug); + if (debug) { + _debug('Loading env from encrypted .env.vault'); + } + + const parsed = DotenvModule._parseVault(options); + + let processEnv = process.env; + if (options && options.processEnv != null) { + processEnv = options.processEnv; + } + + DotenvModule.populate(processEnv, parsed, options); + + return { parsed } +} + +function configDotenv (options) { + const dotenvPath = path.resolve(process.cwd(), '.env'); + let encoding = 'utf8'; + const debug = Boolean(options && options.debug); + + if (options && options.encoding) { + encoding = options.encoding; + } else { + if (debug) { + _debug('No encoding is specified. UTF-8 is used by default'); + } + } + + let optionPaths = [dotenvPath]; // default, look for .env + if (options && options.path) { + if (!Array.isArray(options.path)) { + optionPaths = [_resolveHome(options.path)]; + } else { + optionPaths = []; // reset default + for (const filepath of options.path) { + optionPaths.push(_resolveHome(filepath)); + } + } + } + + // Build the parsed data in a temporary object (because we need to return it). Once we have the final + // parsed data, we will combine it with process.env (or options.processEnv if provided). + let lastError; + const parsedAll = {}; + for (const path of optionPaths) { + try { + // Specifying an encoding returns a string instead of a buffer + const parsed = DotenvModule.parse(fs.readFileSync(path, { encoding })); + + DotenvModule.populate(parsedAll, parsed, options); + } catch (e) { + if (debug) { + _debug(`Failed to load ${path} ${e.message}`); + } + lastError = e; + } + } + + let processEnv = process.env; + if (options && options.processEnv != null) { + processEnv = options.processEnv; + } + + DotenvModule.populate(processEnv, parsedAll, options); + + if (lastError) { + return { parsed: parsedAll, error: lastError } + } else { + return { parsed: parsedAll } + } +} + +// Populates process.env from .env file +function config (options) { + // fallback to original dotenv if DOTENV_KEY is not set + if (_dotenvKey(options).length === 0) { + return DotenvModule.configDotenv(options) + } + + const vaultPath = _vaultPath(options); + + // dotenvKey exists but .env.vault file does not exist + if (!vaultPath) { + _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`); + + return DotenvModule.configDotenv(options) + } + + return DotenvModule._configVault(options) +} + +function decrypt (encrypted, keyStr) { + const key = Buffer.from(keyStr.slice(-64), 'hex'); + let ciphertext = Buffer.from(encrypted, 'base64'); + + const nonce = ciphertext.subarray(0, 12); + const authTag = ciphertext.subarray(-16); + ciphertext = ciphertext.subarray(12, -16); + + try { + const aesgcm = crypto.createDecipheriv('aes-256-gcm', key, nonce); + aesgcm.setAuthTag(authTag); + return `${aesgcm.update(ciphertext)}${aesgcm.final()}` + } catch (error) { + const isRange = error instanceof RangeError; + const invalidKeyLength = error.message === 'Invalid key length'; + const decryptionFailed = error.message === 'Unsupported state or unable to authenticate data'; + + if (isRange || invalidKeyLength) { + const err = new Error('INVALID_DOTENV_KEY: It must be 64 characters long (or more)'); + err.code = 'INVALID_DOTENV_KEY'; + throw err + } else if (decryptionFailed) { + const err = new Error('DECRYPTION_FAILED: Please check your DOTENV_KEY'); + err.code = 'DECRYPTION_FAILED'; + throw err + } else { + throw error + } + } +} + +// Populate process.env with parsed values +function populate (processEnv, parsed, options = {}) { + const debug = Boolean(options && options.debug); + const override = Boolean(options && options.override); + + if (typeof parsed !== 'object') { + const err = new Error('OBJECT_REQUIRED: Please check the processEnv argument being passed to populate'); + err.code = 'OBJECT_REQUIRED'; + throw err + } + + // Set process.env + for (const key of Object.keys(parsed)) { + if (Object.prototype.hasOwnProperty.call(processEnv, key)) { + if (override === true) { + processEnv[key] = parsed[key]; + } + + if (debug) { + if (override === true) { + _debug(`"${key}" is already defined and WAS overwritten`); + } else { + _debug(`"${key}" is already defined and was NOT overwritten`); + } + } + } else { + processEnv[key] = parsed[key]; + } + } +} + +const DotenvModule = { + configDotenv, + _configVault, + _parseVault, + config, + decrypt, + parse, + populate +}; + +main.exports.configDotenv = DotenvModule.configDotenv; +main.exports._configVault = DotenvModule._configVault; +main.exports._parseVault = DotenvModule._parseVault; +main.exports.config = DotenvModule.config; +main.exports.decrypt = DotenvModule.decrypt; +var parse_1 = main.exports.parse = DotenvModule.parse; +main.exports.populate = DotenvModule.populate; + +main.exports = DotenvModule; + +function _resolveEscapeSequences (value) { + return value.replace(/\\\$/g, '$') +} + +function expandValue (value, processEnv, runningParsed) { + const env = { ...runningParsed, ...processEnv }; // process.env wins + + const regex = /(? normalizePath(path$1.join(envDir, file))); + } + return []; +} +function loadEnv(mode, envDir, prefixes = "VITE_") { + const start = performance.now(); + const getTime = () => `${(performance.now() - start).toFixed(2)}ms`; + if (mode === "local") { + throw new Error( + `"local" cannot be used as a mode name because it conflicts with the .local postfix for .env files.` + ); + } + prefixes = arraify(prefixes); + const env = {}; + const envFiles = getEnvFilesForMode(mode, envDir); + debug?.(`loading env files: %O`, envFiles); + const parsed = Object.fromEntries( + envFiles.flatMap((filePath) => { + if (!tryStatSync(filePath)?.isFile()) return []; + return Object.entries(parse_1(fs$1.readFileSync(filePath))); + }) + ); + debug?.(`env files loaded in ${getTime()}`); + if (parsed.NODE_ENV && process.env.VITE_USER_NODE_ENV === void 0) { + process.env.VITE_USER_NODE_ENV = parsed.NODE_ENV; + } + if (parsed.BROWSER && process.env.BROWSER === void 0) { + process.env.BROWSER = parsed.BROWSER; + } + if (parsed.BROWSER_ARGS && process.env.BROWSER_ARGS === void 0) { + process.env.BROWSER_ARGS = parsed.BROWSER_ARGS; + } + const processEnv = { ...process.env }; + expand_1({ parsed, processEnv }); + for (const [key, value] of Object.entries(parsed)) { + if (prefixes.some((prefix) => key.startsWith(prefix))) { + env[key] = value; + } + } + for (const key in process.env) { + if (prefixes.some((prefix) => key.startsWith(prefix))) { + env[key] = process.env[key]; + } + } + debug?.(`using resolved env: %O`, env); + return env; +} +function resolveEnvPrefix({ + envPrefix = "VITE_" +}) { + envPrefix = arraify(envPrefix); + if (envPrefix.includes("")) { + throw new Error( + `envPrefix option contains value '', which could lead unexpected exposure of sensitive information.` + ); + } + return envPrefix; +} + +exports.esbuildVersion = esbuild.version; +exports.createFilter = createFilter; +exports.createLogger = createLogger; +exports.defaultAllowedOrigins = defaultAllowedOrigins; +exports.defaultClientConditions = DEFAULT_CLIENT_CONDITIONS; +exports.defaultClientMainFields = DEFAULT_CLIENT_MAIN_FIELDS; +exports.defaultServerConditions = DEFAULT_SERVER_CONDITIONS; +exports.defaultServerMainFields = DEFAULT_SERVER_MAIN_FIELDS; +exports.isCSSRequest = isCSSRequest; +exports.isFileLoadingAllowed = isFileLoadingAllowed; +exports.isFileServingAllowed = isFileServingAllowed; +exports.loadEnv = loadEnv; +exports.mergeAlias = mergeAlias; +exports.mergeConfig = mergeConfig; +exports.normalizePath = normalizePath; +exports.perEnvironmentPlugin = perEnvironmentPlugin; +exports.perEnvironmentState = perEnvironmentState; +exports.resolveEnvPrefix = resolveEnvPrefix; +exports.rollupVersion = rollupVersion; +exports.searchForWorkspaceRoot = searchForWorkspaceRoot; +exports.send = send; +exports.splitVendorChunk = splitVendorChunk; +exports.splitVendorChunkPlugin = splitVendorChunkPlugin; +exports.version = VERSION; diff --git a/node_modules/vite/dist/node/chunks/dep-3RmXg9uo.js b/node_modules/vite/dist/node/chunks/dep-3RmXg9uo.js new file mode 100644 index 0000000..b9185fa --- /dev/null +++ b/node_modules/vite/dist/node/chunks/dep-3RmXg9uo.js @@ -0,0 +1,553 @@ +var openParentheses = "(".charCodeAt(0); +var closeParentheses = ")".charCodeAt(0); +var singleQuote = "'".charCodeAt(0); +var doubleQuote = '"'.charCodeAt(0); +var backslash = "\\".charCodeAt(0); +var slash = "/".charCodeAt(0); +var comma = ",".charCodeAt(0); +var colon = ":".charCodeAt(0); +var star = "*".charCodeAt(0); +var uLower = "u".charCodeAt(0); +var uUpper = "U".charCodeAt(0); +var plus = "+".charCodeAt(0); +var isUnicodeRange = /^[a-f0-9?-]+$/i; + +var parse$1 = function(input) { + var tokens = []; + var value = input; + + var next, + quote, + prev, + token, + escape, + escapePos, + whitespacePos, + parenthesesOpenPos; + var pos = 0; + var code = value.charCodeAt(pos); + var max = value.length; + var stack = [{ nodes: tokens }]; + var balanced = 0; + var parent; + + var name = ""; + var before = ""; + var after = ""; + + while (pos < max) { + // Whitespaces + if (code <= 32) { + next = pos; + do { + next += 1; + code = value.charCodeAt(next); + } while (code <= 32); + token = value.slice(pos, next); + + prev = tokens[tokens.length - 1]; + if (code === closeParentheses && balanced) { + after = token; + } else if (prev && prev.type === "div") { + prev.after = token; + prev.sourceEndIndex += token.length; + } else if ( + code === comma || + code === colon || + (code === slash && + value.charCodeAt(next + 1) !== star && + (!parent || + (parent && parent.type === "function" && parent.value !== "calc"))) + ) { + before = token; + } else { + tokens.push({ + type: "space", + sourceIndex: pos, + sourceEndIndex: next, + value: token + }); + } + + pos = next; + + // Quotes + } else if (code === singleQuote || code === doubleQuote) { + next = pos; + quote = code === singleQuote ? "'" : '"'; + token = { + type: "string", + sourceIndex: pos, + quote: quote + }; + do { + escape = false; + next = value.indexOf(quote, next + 1); + if (~next) { + escapePos = next; + while (value.charCodeAt(escapePos - 1) === backslash) { + escapePos -= 1; + escape = !escape; + } + } else { + value += quote; + next = value.length - 1; + token.unclosed = true; + } + } while (escape); + token.value = value.slice(pos + 1, next); + token.sourceEndIndex = token.unclosed ? next : next + 1; + tokens.push(token); + pos = next + 1; + code = value.charCodeAt(pos); + + // Comments + } else if (code === slash && value.charCodeAt(pos + 1) === star) { + next = value.indexOf("*/", pos); + + token = { + type: "comment", + sourceIndex: pos, + sourceEndIndex: next + 2 + }; + + if (next === -1) { + token.unclosed = true; + next = value.length; + token.sourceEndIndex = next; + } + + token.value = value.slice(pos + 2, next); + tokens.push(token); + + pos = next + 2; + code = value.charCodeAt(pos); + + // Operation within calc + } else if ( + (code === slash || code === star) && + parent && + parent.type === "function" && + parent.value === "calc" + ) { + token = value[pos]; + tokens.push({ + type: "word", + sourceIndex: pos - before.length, + sourceEndIndex: pos + token.length, + value: token + }); + pos += 1; + code = value.charCodeAt(pos); + + // Dividers + } else if (code === slash || code === comma || code === colon) { + token = value[pos]; + + tokens.push({ + type: "div", + sourceIndex: pos - before.length, + sourceEndIndex: pos + token.length, + value: token, + before: before, + after: "" + }); + before = ""; + + pos += 1; + code = value.charCodeAt(pos); + + // Open parentheses + } else if (openParentheses === code) { + // Whitespaces after open parentheses + next = pos; + do { + next += 1; + code = value.charCodeAt(next); + } while (code <= 32); + parenthesesOpenPos = pos; + token = { + type: "function", + sourceIndex: pos - name.length, + value: name, + before: value.slice(parenthesesOpenPos + 1, next) + }; + pos = next; + + if (name === "url" && code !== singleQuote && code !== doubleQuote) { + next -= 1; + do { + escape = false; + next = value.indexOf(")", next + 1); + if (~next) { + escapePos = next; + while (value.charCodeAt(escapePos - 1) === backslash) { + escapePos -= 1; + escape = !escape; + } + } else { + value += ")"; + next = value.length - 1; + token.unclosed = true; + } + } while (escape); + // Whitespaces before closed + whitespacePos = next; + do { + whitespacePos -= 1; + code = value.charCodeAt(whitespacePos); + } while (code <= 32); + if (parenthesesOpenPos < whitespacePos) { + if (pos !== whitespacePos + 1) { + token.nodes = [ + { + type: "word", + sourceIndex: pos, + sourceEndIndex: whitespacePos + 1, + value: value.slice(pos, whitespacePos + 1) + } + ]; + } else { + token.nodes = []; + } + if (token.unclosed && whitespacePos + 1 !== next) { + token.after = ""; + token.nodes.push({ + type: "space", + sourceIndex: whitespacePos + 1, + sourceEndIndex: next, + value: value.slice(whitespacePos + 1, next) + }); + } else { + token.after = value.slice(whitespacePos + 1, next); + token.sourceEndIndex = next; + } + } else { + token.after = ""; + token.nodes = []; + } + pos = next + 1; + token.sourceEndIndex = token.unclosed ? next : pos; + code = value.charCodeAt(pos); + tokens.push(token); + } else { + balanced += 1; + token.after = ""; + token.sourceEndIndex = pos + 1; + tokens.push(token); + stack.push(token); + tokens = token.nodes = []; + parent = token; + } + name = ""; + + // Close parentheses + } else if (closeParentheses === code && balanced) { + pos += 1; + code = value.charCodeAt(pos); + + parent.after = after; + parent.sourceEndIndex += after.length; + after = ""; + balanced -= 1; + stack[stack.length - 1].sourceEndIndex = pos; + stack.pop(); + parent = stack[balanced]; + tokens = parent.nodes; + + // Words + } else { + next = pos; + do { + if (code === backslash) { + next += 1; + } + next += 1; + code = value.charCodeAt(next); + } while ( + next < max && + !( + code <= 32 || + code === singleQuote || + code === doubleQuote || + code === comma || + code === colon || + code === slash || + code === openParentheses || + (code === star && + parent && + parent.type === "function" && + parent.value === "calc") || + (code === slash && + parent.type === "function" && + parent.value === "calc") || + (code === closeParentheses && balanced) + ) + ); + token = value.slice(pos, next); + + if (openParentheses === code) { + name = token; + } else if ( + (uLower === token.charCodeAt(0) || uUpper === token.charCodeAt(0)) && + plus === token.charCodeAt(1) && + isUnicodeRange.test(token.slice(2)) + ) { + tokens.push({ + type: "unicode-range", + sourceIndex: pos, + sourceEndIndex: next, + value: token + }); + } else { + tokens.push({ + type: "word", + sourceIndex: pos, + sourceEndIndex: next, + value: token + }); + } + + pos = next; + } + } + + for (pos = stack.length - 1; pos; pos -= 1) { + stack[pos].unclosed = true; + stack[pos].sourceEndIndex = value.length; + } + + return stack[0].nodes; +}; + +var walk$1 = function walk(nodes, cb, bubble) { + var i, max, node, result; + + for (i = 0, max = nodes.length; i < max; i += 1) { + node = nodes[i]; + if (!bubble) { + result = cb(node, i, nodes); + } + + if ( + result !== false && + node.type === "function" && + Array.isArray(node.nodes) + ) { + walk(node.nodes, cb, bubble); + } + + if (bubble) { + cb(node, i, nodes); + } + } +}; + +function stringifyNode(node, custom) { + var type = node.type; + var value = node.value; + var buf; + var customResult; + + if (custom && (customResult = custom(node)) !== undefined) { + return customResult; + } else if (type === "word" || type === "space") { + return value; + } else if (type === "string") { + buf = node.quote || ""; + return buf + value + (node.unclosed ? "" : buf); + } else if (type === "comment") { + return "/*" + value + (node.unclosed ? "" : "*/"); + } else if (type === "div") { + return (node.before || "") + value + (node.after || ""); + } else if (Array.isArray(node.nodes)) { + buf = stringify$1(node.nodes, custom); + if (type !== "function") { + return buf; + } + return ( + value + + "(" + + (node.before || "") + + buf + + (node.after || "") + + (node.unclosed ? "" : ")") + ); + } + return value; +} + +function stringify$1(nodes, custom) { + var result, i; + + if (Array.isArray(nodes)) { + result = ""; + for (i = nodes.length - 1; ~i; i -= 1) { + result = stringifyNode(nodes[i], custom) + result; + } + return result; + } + return stringifyNode(nodes, custom); +} + +var stringify_1 = stringify$1; + +var unit; +var hasRequiredUnit; + +function requireUnit () { + if (hasRequiredUnit) return unit; + hasRequiredUnit = 1; + var minus = "-".charCodeAt(0); + var plus = "+".charCodeAt(0); + var dot = ".".charCodeAt(0); + var exp = "e".charCodeAt(0); + var EXP = "E".charCodeAt(0); + + // Check if three code points would start a number + // https://www.w3.org/TR/css-syntax-3/#starts-with-a-number + function likeNumber(value) { + var code = value.charCodeAt(0); + var nextCode; + + if (code === plus || code === minus) { + nextCode = value.charCodeAt(1); + + if (nextCode >= 48 && nextCode <= 57) { + return true; + } + + var nextNextCode = value.charCodeAt(2); + + if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) { + return true; + } + + return false; + } + + if (code === dot) { + nextCode = value.charCodeAt(1); + + if (nextCode >= 48 && nextCode <= 57) { + return true; + } + + return false; + } + + if (code >= 48 && code <= 57) { + return true; + } + + return false; + } + + // Consume a number + // https://www.w3.org/TR/css-syntax-3/#consume-number + unit = function(value) { + var pos = 0; + var length = value.length; + var code; + var nextCode; + var nextNextCode; + + if (length === 0 || !likeNumber(value)) { + return false; + } + + code = value.charCodeAt(pos); + + if (code === plus || code === minus) { + pos++; + } + + while (pos < length) { + code = value.charCodeAt(pos); + + if (code < 48 || code > 57) { + break; + } + + pos += 1; + } + + code = value.charCodeAt(pos); + nextCode = value.charCodeAt(pos + 1); + + if (code === dot && nextCode >= 48 && nextCode <= 57) { + pos += 2; + + while (pos < length) { + code = value.charCodeAt(pos); + + if (code < 48 || code > 57) { + break; + } + + pos += 1; + } + } + + code = value.charCodeAt(pos); + nextCode = value.charCodeAt(pos + 1); + nextNextCode = value.charCodeAt(pos + 2); + + if ( + (code === exp || code === EXP) && + ((nextCode >= 48 && nextCode <= 57) || + ((nextCode === plus || nextCode === minus) && + nextNextCode >= 48 && + nextNextCode <= 57)) + ) { + pos += nextCode === plus || nextCode === minus ? 3 : 2; + + while (pos < length) { + code = value.charCodeAt(pos); + + if (code < 48 || code > 57) { + break; + } + + pos += 1; + } + } + + return { + number: value.slice(0, pos), + unit: value.slice(pos) + }; + }; + return unit; +} + +var parse = parse$1; +var walk = walk$1; +var stringify = stringify_1; + +function ValueParser(value) { + if (this instanceof ValueParser) { + this.nodes = parse(value); + return this; + } + return new ValueParser(value); +} + +ValueParser.prototype.toString = function() { + return Array.isArray(this.nodes) ? stringify(this.nodes) : ""; +}; + +ValueParser.prototype.walk = function(cb, bubble) { + walk(this.nodes, cb, bubble); + return this; +}; + +ValueParser.unit = requireUnit(); + +ValueParser.walk = walk; + +ValueParser.stringify = stringify; + +var lib = ValueParser; + +export { lib as l }; diff --git a/node_modules/vite/dist/node/chunks/dep-Bn81Esdm.js b/node_modules/vite/dist/node/chunks/dep-Bn81Esdm.js new file mode 100644 index 0000000..89dd739 --- /dev/null +++ b/node_modules/vite/dist/node/chunks/dep-Bn81Esdm.js @@ -0,0 +1,49496 @@ +import * as fs$8 from 'node:fs'; +import fs__default, { promises as promises$1, existsSync as existsSync$1, readFileSync as readFileSync$1 } from 'node:fs'; +import path$b, { posix as posix$1, isAbsolute as isAbsolute$1, join as join$1, resolve as resolve$4, normalize, dirname as dirname$2, relative as relative$2, basename as basename$2, extname as extname$1 } from 'node:path'; +import fsp, { constants as constants$3 } from 'node:fs/promises'; +import require$$1$1, { fileURLToPath as fileURLToPath$1, URL as URL$3, pathToFileURL as pathToFileURL$1 } from 'node:url'; +import { promisify as promisify$4, format as format$2, inspect, stripVTControlCharacters } from 'node:util'; +import { performance as performance$1 } from 'node:perf_hooks'; +import require$$0$6, { createRequire as createRequire$1, builtinModules } from 'node:module'; +import crypto$2 from 'node:crypto'; +import picomatch$2 from 'picomatch'; +import esbuild, { transform as transform$1, formatMessages, build as build$3 } from 'esbuild'; +import { CLIENT_ENTRY, wildcardHosts, loopbackHosts, OPTIMIZABLE_ENTRY_RE, FS_PREFIX, CLIENT_PUBLIC_PATH, ENV_PUBLIC_PATH, DEFAULT_ASSETS_INLINE_LIMIT, SPECIAL_QUERY_RE, KNOWN_ASSET_TYPES, JS_TYPES_RE, CSS_LANGS_RE, METADATA_FILENAME, ESBUILD_MODULES_TARGET, ENV_ENTRY, DEP_VERSION_RE, DEV_PROD_CONDITION, ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, VITE_PACKAGE_DIR, defaultAllowedOrigins, DEFAULT_DEV_PORT, CLIENT_DIR, VERSION, ROLLUP_HOOKS, DEFAULT_PREVIEW_PORT, DEFAULT_ASSETS_RE, DEFAULT_CONFIG_FILES, DEFAULT_CLIENT_CONDITIONS, DEFAULT_SERVER_CONDITIONS, DEFAULT_CLIENT_MAIN_FIELDS, DEFAULT_SERVER_MAIN_FIELDS } from '../constants.js'; +import require$$0$2, { posix, isAbsolute, resolve as resolve$3, win32, relative as relative$1, join, dirname as dirname$1, extname, basename as basename$1, sep } from 'path'; +import require$$0$4, { statSync, existsSync, readFileSync, readdirSync } from 'fs'; +import { fdir } from 'fdir'; +import childProcess$2, { exec, execFile, execSync } from 'node:child_process'; +import { createServer as createServer$3, STATUS_CODES, get as get$2 } from 'node:http'; +import { createServer as createServer$2, get as get$1 } from 'node:https'; +import require$$0$3 from 'tty'; +import require$$1 from 'util'; +import require$$4$1 from 'net'; +import require$$0$7 from 'events'; +import require$$0$5 from 'url'; +import require$$1$2 from 'http'; +import require$$0$8 from 'stream'; +import require$$2 from 'os'; +import require$$2$1 from 'child_process'; +import os$3 from 'node:os'; +import net$1 from 'node:net'; +import { promises } from 'node:dns'; +import { ModuleRunner, ESModulesEvaluator } from 'vite/module-runner'; +import { parseAstAsync, parseAst } from 'rollup/parseAst'; +import { Buffer as Buffer$1 } from 'node:buffer'; +import { createRequire as createRequire$2 } from 'module'; +import readline from 'node:readline'; +import process$1 from 'node:process'; +import { EventEmitter as EventEmitter$4 } from 'node:events'; +import { glob, escapePath, isDynamicPattern, globSync } from 'tinyglobby'; +import require$$3 from 'crypto'; +import assert$1 from 'node:assert'; +import v8 from 'node:v8'; +import { Worker as Worker$1, MessageChannel } from 'node:worker_threads'; +import require$$1$3 from 'https'; +import require$$4$2 from 'tls'; +import zlib$1 from 'zlib'; +import require$$0$9 from 'buffer'; +import require$$4$3 from 'assert'; +import * as qs from 'node:querystring'; +import { gzip } from 'node:zlib'; + +import { createRequire as __cjs_createRequire } from 'node:module'; + +const __require = __cjs_createRequire(import.meta.url); +var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +function getDefaultExportFromCjs (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; +} + +var picocolors = {exports: {}}; + +let p = process || {}, argv = p.argv || [], env$1 = p.env || {}; +let isColorSupported = + !(!!env$1.NO_COLOR || argv.includes("--no-color")) && + (!!env$1.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || ((p.stdout || {}).isTTY && env$1.TERM !== "dumb") || !!env$1.CI); + +let formatter = (open, close, replace = open) => + input => { + let string = "" + input, index = string.indexOf(close, open.length); + return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close + }; + +let replaceClose = (string, close, replace, index) => { + let result = "", cursor = 0; + do { + result += string.substring(cursor, index) + replace; + cursor = index + close.length; + index = string.indexOf(close, cursor); + } while (~index) + return result + string.substring(cursor) +}; + +let createColors = (enabled = isColorSupported) => { + let f = enabled ? formatter : () => String; + return { + isColorSupported: enabled, + reset: f("\x1b[0m", "\x1b[0m"), + bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"), + dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"), + italic: f("\x1b[3m", "\x1b[23m"), + underline: f("\x1b[4m", "\x1b[24m"), + inverse: f("\x1b[7m", "\x1b[27m"), + hidden: f("\x1b[8m", "\x1b[28m"), + strikethrough: f("\x1b[9m", "\x1b[29m"), + + black: f("\x1b[30m", "\x1b[39m"), + red: f("\x1b[31m", "\x1b[39m"), + green: f("\x1b[32m", "\x1b[39m"), + yellow: f("\x1b[33m", "\x1b[39m"), + blue: f("\x1b[34m", "\x1b[39m"), + magenta: f("\x1b[35m", "\x1b[39m"), + cyan: f("\x1b[36m", "\x1b[39m"), + white: f("\x1b[37m", "\x1b[39m"), + gray: f("\x1b[90m", "\x1b[39m"), + + bgBlack: f("\x1b[40m", "\x1b[49m"), + bgRed: f("\x1b[41m", "\x1b[49m"), + bgGreen: f("\x1b[42m", "\x1b[49m"), + bgYellow: f("\x1b[43m", "\x1b[49m"), + bgBlue: f("\x1b[44m", "\x1b[49m"), + bgMagenta: f("\x1b[45m", "\x1b[49m"), + bgCyan: f("\x1b[46m", "\x1b[49m"), + bgWhite: f("\x1b[47m", "\x1b[49m"), + + blackBright: f("\x1b[90m", "\x1b[39m"), + redBright: f("\x1b[91m", "\x1b[39m"), + greenBright: f("\x1b[92m", "\x1b[39m"), + yellowBright: f("\x1b[93m", "\x1b[39m"), + blueBright: f("\x1b[94m", "\x1b[39m"), + magentaBright: f("\x1b[95m", "\x1b[39m"), + cyanBright: f("\x1b[96m", "\x1b[39m"), + whiteBright: f("\x1b[97m", "\x1b[39m"), + + bgBlackBright: f("\x1b[100m", "\x1b[49m"), + bgRedBright: f("\x1b[101m", "\x1b[49m"), + bgGreenBright: f("\x1b[102m", "\x1b[49m"), + bgYellowBright: f("\x1b[103m", "\x1b[49m"), + bgBlueBright: f("\x1b[104m", "\x1b[49m"), + bgMagentaBright: f("\x1b[105m", "\x1b[49m"), + bgCyanBright: f("\x1b[106m", "\x1b[49m"), + bgWhiteBright: f("\x1b[107m", "\x1b[49m"), + } +}; + +picocolors.exports = createColors(); +picocolors.exports.createColors = createColors; + +var picocolorsExports = picocolors.exports; +var colors$1 = /*@__PURE__*/getDefaultExportFromCjs(picocolorsExports); + +const VALID_ID_PREFIX = `/@id/`; +const NULL_BYTE_PLACEHOLDER = `__x00__`; +let SOURCEMAPPING_URL = "sourceMa"; +SOURCEMAPPING_URL += "ppingURL"; +const MODULE_RUNNER_SOURCEMAPPING_SOURCE = "//# sourceMappingSource=vite-generated"; +const ERR_OUTDATED_OPTIMIZED_DEP = "ERR_OUTDATED_OPTIMIZED_DEP"; + +const isWindows$3 = typeof process !== "undefined" && process.platform === "win32"; +function wrapId$1(id) { + return id.startsWith(VALID_ID_PREFIX) ? id : VALID_ID_PREFIX + id.replace("\0", NULL_BYTE_PLACEHOLDER); +} +function unwrapId$1(id) { + return id.startsWith(VALID_ID_PREFIX) ? id.slice(VALID_ID_PREFIX.length).replace(NULL_BYTE_PLACEHOLDER, "\0") : id; +} +const windowsSlashRE = /\\/g; +function slash$1(p) { + return p.replace(windowsSlashRE, "/"); +} +const postfixRE = /[?#].*$/; +function cleanUrl(url) { + return url.replace(postfixRE, ""); +} +function splitFileAndPostfix(path) { + const file = cleanUrl(path); + return { file, postfix: path.slice(file.length) }; +} +function withTrailingSlash(path) { + if (path[path.length - 1] !== "/") { + return `${path}/`; + } + return path; +} +function promiseWithResolvers() { + let resolve; + let reject; + const promise = new Promise((_resolve, _reject) => { + resolve = _resolve; + reject = _reject; + }); + return { promise, resolve, reject }; +} + +// @ts-check +/** @typedef { import('estree').BaseNode} BaseNode */ + +/** @typedef {{ + skip: () => void; + remove: () => void; + replace: (node: BaseNode) => void; +}} WalkerContext */ + +let WalkerBase$1 = class WalkerBase { + constructor() { + /** @type {boolean} */ + this.should_skip = false; + + /** @type {boolean} */ + this.should_remove = false; + + /** @type {BaseNode | null} */ + this.replacement = null; + + /** @type {WalkerContext} */ + this.context = { + skip: () => (this.should_skip = true), + remove: () => (this.should_remove = true), + replace: (node) => (this.replacement = node) + }; + } + + /** + * + * @param {any} parent + * @param {string} prop + * @param {number} index + * @param {BaseNode} node + */ + replace(parent, prop, index, node) { + if (parent) { + if (index !== null) { + parent[prop][index] = node; + } else { + parent[prop] = node; + } + } + } + + /** + * + * @param {any} parent + * @param {string} prop + * @param {number} index + */ + remove(parent, prop, index) { + if (parent) { + if (index !== null) { + parent[prop].splice(index, 1); + } else { + delete parent[prop]; + } + } + } +}; + +// @ts-check + +/** @typedef { import('estree').BaseNode} BaseNode */ +/** @typedef { import('./walker.js').WalkerContext} WalkerContext */ + +/** @typedef {( + * this: WalkerContext, + * node: BaseNode, + * parent: BaseNode, + * key: string, + * index: number + * ) => void} SyncHandler */ + +let SyncWalker$1 = class SyncWalker extends WalkerBase$1 { + /** + * + * @param {SyncHandler} enter + * @param {SyncHandler} leave + */ + constructor(enter, leave) { + super(); + + /** @type {SyncHandler} */ + this.enter = enter; + + /** @type {SyncHandler} */ + this.leave = leave; + } + + /** + * + * @param {BaseNode} node + * @param {BaseNode} parent + * @param {string} [prop] + * @param {number} [index] + * @returns {BaseNode} + */ + visit(node, parent, prop, index) { + if (node) { + if (this.enter) { + const _should_skip = this.should_skip; + const _should_remove = this.should_remove; + const _replacement = this.replacement; + this.should_skip = false; + this.should_remove = false; + this.replacement = null; + + this.enter.call(this.context, node, parent, prop, index); + + if (this.replacement) { + node = this.replacement; + this.replace(parent, prop, index, node); + } + + if (this.should_remove) { + this.remove(parent, prop, index); + } + + const skipped = this.should_skip; + const removed = this.should_remove; + + this.should_skip = _should_skip; + this.should_remove = _should_remove; + this.replacement = _replacement; + + if (skipped) return node; + if (removed) return null; + } + + for (const key in node) { + const value = node[key]; + + if (typeof value !== "object") { + continue; + } else if (Array.isArray(value)) { + for (let i = 0; i < value.length; i += 1) { + if (value[i] !== null && typeof value[i].type === 'string') { + if (!this.visit(value[i], node, key, i)) { + // removed + i--; + } + } + } + } else if (value !== null && typeof value.type === "string") { + this.visit(value, node, key, null); + } + } + + if (this.leave) { + const _replacement = this.replacement; + const _should_remove = this.should_remove; + this.replacement = null; + this.should_remove = false; + + this.leave.call(this.context, node, parent, prop, index); + + if (this.replacement) { + node = this.replacement; + this.replace(parent, prop, index, node); + } + + if (this.should_remove) { + this.remove(parent, prop, index); + } + + const removed = this.should_remove; + + this.replacement = _replacement; + this.should_remove = _should_remove; + + if (removed) return null; + } + } + + return node; + } +}; + +// @ts-check + +/** @typedef { import('estree').BaseNode} BaseNode */ +/** @typedef { import('./sync.js').SyncHandler} SyncHandler */ +/** @typedef { import('./async.js').AsyncHandler} AsyncHandler */ + +/** + * + * @param {BaseNode} ast + * @param {{ + * enter?: SyncHandler + * leave?: SyncHandler + * }} walker + * @returns {BaseNode} + */ +function walk$2(ast, { enter, leave }) { + const instance = new SyncWalker$1(enter, leave); + return instance.visit(ast, null); +} + +const extractors = { + ArrayPattern(names, param) { + for (const element of param.elements) { + if (element) + extractors[element.type](names, element); + } + }, + AssignmentPattern(names, param) { + extractors[param.left.type](names, param.left); + }, + Identifier(names, param) { + names.push(param.name); + }, + MemberExpression() { }, + ObjectPattern(names, param) { + for (const prop of param.properties) { + // @ts-ignore Typescript reports that this is not a valid type + if (prop.type === 'RestElement') { + extractors.RestElement(names, prop); + } + else { + extractors[prop.value.type](names, prop.value); + } + } + }, + RestElement(names, param) { + extractors[param.argument.type](names, param.argument); + } +}; +const extractAssignedNames = function extractAssignedNames(param) { + const names = []; + extractors[param.type](names, param); + return names; +}; + +const blockDeclarations = { + const: true, + let: true +}; +class Scope { + constructor(options = {}) { + this.parent = options.parent; + this.isBlockScope = !!options.block; + this.declarations = Object.create(null); + if (options.params) { + options.params.forEach((param) => { + extractAssignedNames(param).forEach((name) => { + this.declarations[name] = true; + }); + }); + } + } + addDeclaration(node, isBlockDeclaration, isVar) { + if (!isBlockDeclaration && this.isBlockScope) { + // it's a `var` or function node, and this + // is a block scope, so we need to go up + this.parent.addDeclaration(node, isBlockDeclaration, isVar); + } + else if (node.id) { + extractAssignedNames(node.id).forEach((name) => { + this.declarations[name] = true; + }); + } + } + contains(name) { + return this.declarations[name] || (this.parent ? this.parent.contains(name) : false); + } +} +const attachScopes = function attachScopes(ast, propertyName = 'scope') { + let scope = new Scope(); + walk$2(ast, { + enter(n, parent) { + const node = n; + // function foo () {...} + // class Foo {...} + if (/(?:Function|Class)Declaration/.test(node.type)) { + scope.addDeclaration(node, false, false); + } + // var foo = 1 + if (node.type === 'VariableDeclaration') { + const { kind } = node; + const isBlockDeclaration = blockDeclarations[kind]; + node.declarations.forEach((declaration) => { + scope.addDeclaration(declaration, isBlockDeclaration, true); + }); + } + let newScope; + // create new function scope + if (node.type.includes('Function')) { + const func = node; + newScope = new Scope({ + parent: scope, + block: false, + params: func.params + }); + // named function expressions - the name is considered + // part of the function's scope + if (func.type === 'FunctionExpression' && func.id) { + newScope.addDeclaration(func, false, false); + } + } + // create new for scope + if (/For(?:In|Of)?Statement/.test(node.type)) { + newScope = new Scope({ + parent: scope, + block: true + }); + } + // create new block scope + if (node.type === 'BlockStatement' && !parent.type.includes('Function')) { + newScope = new Scope({ + parent: scope, + block: true + }); + } + // catch clause has its own block scope + if (node.type === 'CatchClause') { + newScope = new Scope({ + parent: scope, + params: node.param ? [node.param] : [], + block: true + }); + } + if (newScope) { + Object.defineProperty(node, propertyName, { + value: newScope, + configurable: true + }); + scope = newScope; + } + }, + leave(n) { + const node = n; + if (node[propertyName]) + scope = scope.parent; + } + }); + return scope; +}; + +// Helper since Typescript can't detect readonly arrays with Array.isArray +function isArray(arg) { + return Array.isArray(arg); +} +function ensureArray(thing) { + if (isArray(thing)) + return thing; + if (thing == null) + return []; + return [thing]; +} + +const normalizePathRegExp = new RegExp(`\\${win32.sep}`, 'g'); +const normalizePath$5 = function normalizePath(filename) { + return filename.replace(normalizePathRegExp, posix.sep); +}; + +function getMatcherString$1(id, resolutionBase) { + if (resolutionBase === false || isAbsolute(id) || id.startsWith('**')) { + return normalizePath$5(id); + } + // resolve('') is valid and will default to process.cwd() + const basePath = normalizePath$5(resolve$3(resolutionBase || '')) + // escape all possible (posix + win) path characters that might interfere with regex + .replace(/[-^$*+?.()|[\]{}]/g, '\\$&'); + // Note that we use posix.join because: + // 1. the basePath has been normalized to use / + // 2. the incoming glob (id) matcher, also uses / + // otherwise Node will force backslash (\) on windows + return posix.join(basePath, normalizePath$5(id)); +} +const createFilter$2 = function createFilter(include, exclude, options) { + const resolutionBase = options && options.resolve; + const getMatcher = (id) => id instanceof RegExp + ? id + : { + test: (what) => { + // this refactor is a tad overly verbose but makes for easy debugging + const pattern = getMatcherString$1(id, resolutionBase); + const fn = picomatch$2(pattern, { dot: true }); + const result = fn(what); + return result; + } + }; + const includeMatchers = ensureArray(include).map(getMatcher); + const excludeMatchers = ensureArray(exclude).map(getMatcher); + if (!includeMatchers.length && !excludeMatchers.length) + return (id) => typeof id === 'string' && !id.includes('\0'); + return function result(id) { + if (typeof id !== 'string') + return false; + if (id.includes('\0')) + return false; + const pathId = normalizePath$5(id); + for (let i = 0; i < excludeMatchers.length; ++i) { + const matcher = excludeMatchers[i]; + if (matcher instanceof RegExp) { + matcher.lastIndex = 0; + } + if (matcher.test(pathId)) + return false; + } + for (let i = 0; i < includeMatchers.length; ++i) { + const matcher = includeMatchers[i]; + if (matcher instanceof RegExp) { + matcher.lastIndex = 0; + } + if (matcher.test(pathId)) + return true; + } + return !includeMatchers.length; + }; +}; + +const reservedWords = 'break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public'; +const builtins = 'arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl'; +const forbiddenIdentifiers = new Set(`${reservedWords} ${builtins}`.split(' ')); +forbiddenIdentifiers.add(''); +const makeLegalIdentifier = function makeLegalIdentifier(str) { + let identifier = str + .replace(/-(\w)/g, (_, letter) => letter.toUpperCase()) + .replace(/[^$_a-zA-Z0-9]/g, '_'); + if (/\d/.test(identifier[0]) || forbiddenIdentifiers.has(identifier)) { + identifier = `_${identifier}`; + } + return identifier || '_'; +}; + +function stringify$5(obj) { + return (JSON.stringify(obj) || 'undefined').replace(/[\u2028\u2029]/g, (char) => `\\u${`000${char.charCodeAt(0).toString(16)}`.slice(-4)}`); +} +function serializeArray(arr, indent, baseIndent) { + let output = '['; + const separator = indent ? `\n${baseIndent}${indent}` : ''; + for (let i = 0; i < arr.length; i++) { + const key = arr[i]; + output += `${i > 0 ? ',' : ''}${separator}${serialize(key, indent, baseIndent + indent)}`; + } + return `${output}${indent ? `\n${baseIndent}` : ''}]`; +} +function serializeObject(obj, indent, baseIndent) { + let output = '{'; + const separator = indent ? `\n${baseIndent}${indent}` : ''; + const entries = Object.entries(obj); + for (let i = 0; i < entries.length; i++) { + const [key, value] = entries[i]; + const stringKey = makeLegalIdentifier(key) === key ? key : stringify$5(key); + output += `${i > 0 ? ',' : ''}${separator}${stringKey}:${indent ? ' ' : ''}${serialize(value, indent, baseIndent + indent)}`; + } + return `${output}${indent ? `\n${baseIndent}` : ''}}`; +} +function serialize(obj, indent, baseIndent) { + if (typeof obj === 'object' && obj !== null) { + if (Array.isArray(obj)) + return serializeArray(obj, indent, baseIndent); + if (obj instanceof Date) + return `new Date(${obj.getTime()})`; + if (obj instanceof RegExp) + return obj.toString(); + return serializeObject(obj, indent, baseIndent); + } + if (typeof obj === 'number') { + if (obj === Infinity) + return 'Infinity'; + if (obj === -Infinity) + return '-Infinity'; + if (obj === 0) + return 1 / obj === Infinity ? '0' : '-0'; + if (obj !== obj) + return 'NaN'; // eslint-disable-line no-self-compare + } + if (typeof obj === 'symbol') { + const key = Symbol.keyFor(obj); + // eslint-disable-next-line no-undefined + if (key !== undefined) + return `Symbol.for(${stringify$5(key)})`; + } + if (typeof obj === 'bigint') + return `${obj}n`; + return stringify$5(obj); +} +// isWellFormed exists from Node.js 20 +const hasStringIsWellFormed = 'isWellFormed' in String.prototype; +function isWellFormedString(input) { + // @ts-expect-error String::isWellFormed exists from ES2024. tsconfig lib is set to ES6 + if (hasStringIsWellFormed) + return input.isWellFormed(); + // https://github.com/tc39/proposal-is-usv-string/blob/main/README.md#algorithm + return !/\p{Surrogate}/u.test(input); +} +const dataToEsm = function dataToEsm(data, options = {}) { + var _a, _b; + const t = options.compact ? '' : 'indent' in options ? options.indent : '\t'; + const _ = options.compact ? '' : ' '; + const n = options.compact ? '' : '\n'; + const declarationType = options.preferConst ? 'const' : 'var'; + if (options.namedExports === false || + typeof data !== 'object' || + Array.isArray(data) || + data instanceof Date || + data instanceof RegExp || + data === null) { + const code = serialize(data, options.compact ? null : t, ''); + const magic = _ || (/^[{[\-\/]/.test(code) ? '' : ' '); // eslint-disable-line no-useless-escape + return `export default${magic}${code};`; + } + let maxUnderbarPrefixLength = 0; + for (const key of Object.keys(data)) { + const underbarPrefixLength = (_b = (_a = /^(_+)/.exec(key)) === null || _a === void 0 ? void 0 : _a[0].length) !== null && _b !== void 0 ? _b : 0; + if (underbarPrefixLength > maxUnderbarPrefixLength) { + maxUnderbarPrefixLength = underbarPrefixLength; + } + } + const arbitraryNamePrefix = `${'_'.repeat(maxUnderbarPrefixLength + 1)}arbitrary`; + let namedExportCode = ''; + const defaultExportRows = []; + const arbitraryNameExportRows = []; + for (const [key, value] of Object.entries(data)) { + if (key === makeLegalIdentifier(key)) { + if (options.objectShorthand) + defaultExportRows.push(key); + else + defaultExportRows.push(`${key}:${_}${key}`); + namedExportCode += `export ${declarationType} ${key}${_}=${_}${serialize(value, options.compact ? null : t, '')};${n}`; + } + else { + defaultExportRows.push(`${stringify$5(key)}:${_}${serialize(value, options.compact ? null : t, '')}`); + if (options.includeArbitraryNames && isWellFormedString(key)) { + const variableName = `${arbitraryNamePrefix}${arbitraryNameExportRows.length}`; + namedExportCode += `${declarationType} ${variableName}${_}=${_}${serialize(value, options.compact ? null : t, '')};${n}`; + arbitraryNameExportRows.push(`${variableName} as ${JSON.stringify(key)}`); + } + } + } + const arbitraryExportCode = arbitraryNameExportRows.length > 0 + ? `export${_}{${n}${t}${arbitraryNameExportRows.join(`,${n}${t}`)}${n}};${n}` + : ''; + const defaultExportCode = `export default${_}{${n}${t}${defaultExportRows.join(`,${n}${t}`)}${n}};${n}`; + return `${namedExportCode}${arbitraryExportCode}${defaultExportCode}`; +}; + +var path$a = require$$0$2; + +var commondir = function (basedir, relfiles) { + if (relfiles) { + var files = relfiles.map(function (r) { + return path$a.resolve(basedir, r); + }); + } + else { + var files = basedir; + } + + var res = files.slice(1).reduce(function (ps, file) { + if (!file.match(/^([A-Za-z]:)?\/|\\/)) { + throw new Error('relative path without a basedir'); + } + + var xs = file.split(/\/+|\\+/); + for ( + var i = 0; + ps[i] === xs[i] && i < Math.min(ps.length, xs.length); + i++ + ); + return ps.slice(0, i); + }, files[0].split(/\/+|\\+/)); + + // Windows correctly handles paths with forward-slashes + return res.length > 1 ? res.join('/') : '/' +}; + +var getCommonDir = /*@__PURE__*/getDefaultExportFromCjs(commondir); + +const comma = ','.charCodeAt(0); +const semicolon = ';'.charCodeAt(0); +const chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; +const intToChar = new Uint8Array(64); // 64 possible chars. +const charToInt = new Uint8Array(128); // z is 122 in ASCII +for (let i = 0; i < chars$1.length; i++) { + const c = chars$1.charCodeAt(i); + intToChar[i] = c; + charToInt[c] = i; +} +function decodeInteger(reader, relative) { + let value = 0; + let shift = 0; + let integer = 0; + do { + const c = reader.next(); + integer = charToInt[c]; + value |= (integer & 31) << shift; + shift += 5; + } while (integer & 32); + const shouldNegate = value & 1; + value >>>= 1; + if (shouldNegate) { + value = -2147483648 | -value; + } + return relative + value; +} +function encodeInteger(builder, num, relative) { + let delta = num - relative; + delta = delta < 0 ? (-delta << 1) | 1 : delta << 1; + do { + let clamped = delta & 0b011111; + delta >>>= 5; + if (delta > 0) + clamped |= 0b100000; + builder.write(intToChar[clamped]); + } while (delta > 0); + return num; +} +function hasMoreVlq(reader, max) { + if (reader.pos >= max) + return false; + return reader.peek() !== comma; +} + +const bufLength = 1024 * 16; +// Provide a fallback for older environments. +const td = typeof TextDecoder !== 'undefined' + ? /* #__PURE__ */ new TextDecoder() + : typeof Buffer !== 'undefined' + ? { + decode(buf) { + const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); + return out.toString(); + }, + } + : { + decode(buf) { + let out = ''; + for (let i = 0; i < buf.length; i++) { + out += String.fromCharCode(buf[i]); + } + return out; + }, + }; +class StringWriter { + constructor() { + this.pos = 0; + this.out = ''; + this.buffer = new Uint8Array(bufLength); + } + write(v) { + const { buffer } = this; + buffer[this.pos++] = v; + if (this.pos === bufLength) { + this.out += td.decode(buffer); + this.pos = 0; + } + } + flush() { + const { buffer, out, pos } = this; + return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; + } +} +class StringReader { + constructor(buffer) { + this.pos = 0; + this.buffer = buffer; + } + next() { + return this.buffer.charCodeAt(this.pos++); + } + peek() { + return this.buffer.charCodeAt(this.pos); + } + indexOf(char) { + const { buffer, pos } = this; + const idx = buffer.indexOf(char, pos); + return idx === -1 ? buffer.length : idx; + } +} + +function decode(mappings) { + const { length } = mappings; + const reader = new StringReader(mappings); + const decoded = []; + let genColumn = 0; + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + do { + const semi = reader.indexOf(';'); + const line = []; + let sorted = true; + let lastCol = 0; + genColumn = 0; + while (reader.pos < semi) { + let seg; + genColumn = decodeInteger(reader, genColumn); + if (genColumn < lastCol) + sorted = false; + lastCol = genColumn; + if (hasMoreVlq(reader, semi)) { + sourcesIndex = decodeInteger(reader, sourcesIndex); + sourceLine = decodeInteger(reader, sourceLine); + sourceColumn = decodeInteger(reader, sourceColumn); + if (hasMoreVlq(reader, semi)) { + namesIndex = decodeInteger(reader, namesIndex); + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; + } + else { + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; + } + } + else { + seg = [genColumn]; + } + line.push(seg); + reader.pos++; + } + if (!sorted) + sort(line); + decoded.push(line); + reader.pos = semi + 1; + } while (reader.pos <= length); + return decoded; +} +function sort(line) { + line.sort(sortComparator$1); +} +function sortComparator$1(a, b) { + return a[0] - b[0]; +} +function encode$1(decoded) { + const writer = new StringWriter(); + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + if (i > 0) + writer.write(semicolon); + if (line.length === 0) + continue; + let genColumn = 0; + for (let j = 0; j < line.length; j++) { + const segment = line[j]; + if (j > 0) + writer.write(comma); + genColumn = encodeInteger(writer, segment[0], genColumn); + if (segment.length === 1) + continue; + sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); + sourceLine = encodeInteger(writer, segment[2], sourceLine); + sourceColumn = encodeInteger(writer, segment[3], sourceColumn); + if (segment.length === 4) + continue; + namesIndex = encodeInteger(writer, segment[4], namesIndex); + } + } + return writer.flush(); +} + +class BitSet { + constructor(arg) { + this.bits = arg instanceof BitSet ? arg.bits.slice() : []; + } + + add(n) { + this.bits[n >> 5] |= 1 << (n & 31); + } + + has(n) { + return !!(this.bits[n >> 5] & (1 << (n & 31))); + } +} + +class Chunk { + constructor(start, end, content) { + this.start = start; + this.end = end; + this.original = content; + + this.intro = ''; + this.outro = ''; + + this.content = content; + this.storeName = false; + this.edited = false; + + { + this.previous = null; + this.next = null; + } + } + + appendLeft(content) { + this.outro += content; + } + + appendRight(content) { + this.intro = this.intro + content; + } + + clone() { + const chunk = new Chunk(this.start, this.end, this.original); + + chunk.intro = this.intro; + chunk.outro = this.outro; + chunk.content = this.content; + chunk.storeName = this.storeName; + chunk.edited = this.edited; + + return chunk; + } + + contains(index) { + return this.start < index && index < this.end; + } + + eachNext(fn) { + let chunk = this; + while (chunk) { + fn(chunk); + chunk = chunk.next; + } + } + + eachPrevious(fn) { + let chunk = this; + while (chunk) { + fn(chunk); + chunk = chunk.previous; + } + } + + edit(content, storeName, contentOnly) { + this.content = content; + if (!contentOnly) { + this.intro = ''; + this.outro = ''; + } + this.storeName = storeName; + + this.edited = true; + + return this; + } + + prependLeft(content) { + this.outro = content + this.outro; + } + + prependRight(content) { + this.intro = content + this.intro; + } + + reset() { + this.intro = ''; + this.outro = ''; + if (this.edited) { + this.content = this.original; + this.storeName = false; + this.edited = false; + } + } + + split(index) { + const sliceIndex = index - this.start; + + const originalBefore = this.original.slice(0, sliceIndex); + const originalAfter = this.original.slice(sliceIndex); + + this.original = originalBefore; + + const newChunk = new Chunk(index, this.end, originalAfter); + newChunk.outro = this.outro; + this.outro = ''; + + this.end = index; + + if (this.edited) { + // after split we should save the edit content record into the correct chunk + // to make sure sourcemap correct + // For example: + // ' test'.trim() + // split -> ' ' + 'test' + // ✔️ edit -> '' + 'test' + // ✖️ edit -> 'test' + '' + // TODO is this block necessary?... + newChunk.edit('', false); + this.content = ''; + } else { + this.content = originalBefore; + } + + newChunk.next = this.next; + if (newChunk.next) newChunk.next.previous = newChunk; + newChunk.previous = this; + this.next = newChunk; + + return newChunk; + } + + toString() { + return this.intro + this.content + this.outro; + } + + trimEnd(rx) { + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + + const trimmed = this.content.replace(rx, ''); + + if (trimmed.length) { + if (trimmed !== this.content) { + this.split(this.start + trimmed.length).edit('', undefined, true); + if (this.edited) { + // save the change, if it has been edited + this.edit(trimmed, this.storeName, true); + } + } + return true; + } else { + this.edit('', undefined, true); + + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + } + } + + trimStart(rx) { + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + + const trimmed = this.content.replace(rx, ''); + + if (trimmed.length) { + if (trimmed !== this.content) { + const newChunk = this.split(this.end - trimmed.length); + if (this.edited) { + // save the change, if it has been edited + newChunk.edit(trimmed, this.storeName, true); + } + this.edit('', undefined, true); + } + return true; + } else { + this.edit('', undefined, true); + + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + } + } +} + +function getBtoa() { + if (typeof globalThis !== 'undefined' && typeof globalThis.btoa === 'function') { + return (str) => globalThis.btoa(unescape(encodeURIComponent(str))); + } else if (typeof Buffer === 'function') { + return (str) => Buffer.from(str, 'utf-8').toString('base64'); + } else { + return () => { + throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.'); + }; + } +} + +const btoa$1 = /*#__PURE__*/ getBtoa(); + +let SourceMap$1 = class SourceMap { + constructor(properties) { + this.version = 3; + this.file = properties.file; + this.sources = properties.sources; + this.sourcesContent = properties.sourcesContent; + this.names = properties.names; + this.mappings = encode$1(properties.mappings); + if (typeof properties.x_google_ignoreList !== 'undefined') { + this.x_google_ignoreList = properties.x_google_ignoreList; + } + if (typeof properties.debugId !== 'undefined') { + this.debugId = properties.debugId; + } + } + + toString() { + return JSON.stringify(this); + } + + toUrl() { + return 'data:application/json;charset=utf-8;base64,' + btoa$1(this.toString()); + } +}; + +function guessIndent(code) { + const lines = code.split('\n'); + + const tabbed = lines.filter((line) => /^\t+/.test(line)); + const spaced = lines.filter((line) => /^ {2,}/.test(line)); + + if (tabbed.length === 0 && spaced.length === 0) { + return null; + } + + // More lines tabbed than spaced? Assume tabs, and + // default to tabs in the case of a tie (or nothing + // to go on) + if (tabbed.length >= spaced.length) { + return '\t'; + } + + // Otherwise, we need to guess the multiple + const min = spaced.reduce((previous, current) => { + const numSpaces = /^ +/.exec(current)[0].length; + return Math.min(numSpaces, previous); + }, Infinity); + + return new Array(min + 1).join(' '); +} + +function getRelativePath(from, to) { + const fromParts = from.split(/[/\\]/); + const toParts = to.split(/[/\\]/); + + fromParts.pop(); // get dirname + + while (fromParts[0] === toParts[0]) { + fromParts.shift(); + toParts.shift(); + } + + if (fromParts.length) { + let i = fromParts.length; + while (i--) fromParts[i] = '..'; + } + + return fromParts.concat(toParts).join('/'); +} + +const toString$1 = Object.prototype.toString; + +function isObject$2(thing) { + return toString$1.call(thing) === '[object Object]'; +} + +function getLocator(source) { + const originalLines = source.split('\n'); + const lineOffsets = []; + + for (let i = 0, pos = 0; i < originalLines.length; i++) { + lineOffsets.push(pos); + pos += originalLines[i].length + 1; + } + + return function locate(index) { + let i = 0; + let j = lineOffsets.length; + while (i < j) { + const m = (i + j) >> 1; + if (index < lineOffsets[m]) { + j = m; + } else { + i = m + 1; + } + } + const line = i - 1; + const column = index - lineOffsets[line]; + return { line, column }; + }; +} + +const wordRegex = /\w/; + +class Mappings { + constructor(hires) { + this.hires = hires; + this.generatedCodeLine = 0; + this.generatedCodeColumn = 0; + this.raw = []; + this.rawSegments = this.raw[this.generatedCodeLine] = []; + this.pending = null; + } + + addEdit(sourceIndex, content, loc, nameIndex) { + if (content.length) { + const contentLengthMinusOne = content.length - 1; + let contentLineEnd = content.indexOf('\n', 0); + let previousContentLineEnd = -1; + // Loop through each line in the content and add a segment, but stop if the last line is empty, + // else code afterwards would fill one line too many + while (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) { + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + if (nameIndex >= 0) { + segment.push(nameIndex); + } + this.rawSegments.push(segment); + + this.generatedCodeLine += 1; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + this.generatedCodeColumn = 0; + + previousContentLineEnd = contentLineEnd; + contentLineEnd = content.indexOf('\n', contentLineEnd + 1); + } + + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + if (nameIndex >= 0) { + segment.push(nameIndex); + } + this.rawSegments.push(segment); + + this.advance(content.slice(previousContentLineEnd + 1)); + } else if (this.pending) { + this.rawSegments.push(this.pending); + this.advance(content); + } + + this.pending = null; + } + + addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) { + let originalCharIndex = chunk.start; + let first = true; + // when iterating each char, check if it's in a word boundary + let charInHiresBoundary = false; + + while (originalCharIndex < chunk.end) { + if (original[originalCharIndex] === '\n') { + loc.line += 1; + loc.column = 0; + this.generatedCodeLine += 1; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + this.generatedCodeColumn = 0; + first = true; + charInHiresBoundary = false; + } else { + if (this.hires || first || sourcemapLocations.has(originalCharIndex)) { + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + + if (this.hires === 'boundary') { + // in hires "boundary", group segments per word boundary than per char + if (wordRegex.test(original[originalCharIndex])) { + // for first char in the boundary found, start the boundary by pushing a segment + if (!charInHiresBoundary) { + this.rawSegments.push(segment); + charInHiresBoundary = true; + } + } else { + // for non-word char, end the boundary by pushing a segment + this.rawSegments.push(segment); + charInHiresBoundary = false; + } + } else { + this.rawSegments.push(segment); + } + } + + loc.column += 1; + this.generatedCodeColumn += 1; + first = false; + } + + originalCharIndex += 1; + } + + this.pending = null; + } + + advance(str) { + if (!str) return; + + const lines = str.split('\n'); + + if (lines.length > 1) { + for (let i = 0; i < lines.length - 1; i++) { + this.generatedCodeLine++; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + } + this.generatedCodeColumn = 0; + } + + this.generatedCodeColumn += lines[lines.length - 1].length; + } +} + +const n$1 = '\n'; + +const warned = { + insertLeft: false, + insertRight: false, + storeName: false, +}; + +class MagicString { + constructor(string, options = {}) { + const chunk = new Chunk(0, string.length, string); + + Object.defineProperties(this, { + original: { writable: true, value: string }, + outro: { writable: true, value: '' }, + intro: { writable: true, value: '' }, + firstChunk: { writable: true, value: chunk }, + lastChunk: { writable: true, value: chunk }, + lastSearchedChunk: { writable: true, value: chunk }, + byStart: { writable: true, value: {} }, + byEnd: { writable: true, value: {} }, + filename: { writable: true, value: options.filename }, + indentExclusionRanges: { writable: true, value: options.indentExclusionRanges }, + sourcemapLocations: { writable: true, value: new BitSet() }, + storedNames: { writable: true, value: {} }, + indentStr: { writable: true, value: undefined }, + ignoreList: { writable: true, value: options.ignoreList }, + offset: { writable: true, value: options.offset || 0 }, + }); + + this.byStart[0] = chunk; + this.byEnd[string.length] = chunk; + } + + addSourcemapLocation(char) { + this.sourcemapLocations.add(char); + } + + append(content) { + if (typeof content !== 'string') throw new TypeError('outro content must be a string'); + + this.outro += content; + return this; + } + + appendLeft(index, content) { + index = index + this.offset; + + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byEnd[index]; + + if (chunk) { + chunk.appendLeft(content); + } else { + this.intro += content; + } + return this; + } + + appendRight(index, content) { + index = index + this.offset; + + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byStart[index]; + + if (chunk) { + chunk.appendRight(content); + } else { + this.outro += content; + } + return this; + } + + clone() { + const cloned = new MagicString(this.original, { filename: this.filename, offset: this.offset }); + + let originalChunk = this.firstChunk; + let clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone()); + + while (originalChunk) { + cloned.byStart[clonedChunk.start] = clonedChunk; + cloned.byEnd[clonedChunk.end] = clonedChunk; + + const nextOriginalChunk = originalChunk.next; + const nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone(); + + if (nextClonedChunk) { + clonedChunk.next = nextClonedChunk; + nextClonedChunk.previous = clonedChunk; + + clonedChunk = nextClonedChunk; + } + + originalChunk = nextOriginalChunk; + } + + cloned.lastChunk = clonedChunk; + + if (this.indentExclusionRanges) { + cloned.indentExclusionRanges = this.indentExclusionRanges.slice(); + } + + cloned.sourcemapLocations = new BitSet(this.sourcemapLocations); + + cloned.intro = this.intro; + cloned.outro = this.outro; + + return cloned; + } + + generateDecodedMap(options) { + options = options || {}; + + const sourceIndex = 0; + const names = Object.keys(this.storedNames); + const mappings = new Mappings(options.hires); + + const locate = getLocator(this.original); + + if (this.intro) { + mappings.advance(this.intro); + } + + this.firstChunk.eachNext((chunk) => { + const loc = locate(chunk.start); + + if (chunk.intro.length) mappings.advance(chunk.intro); + + if (chunk.edited) { + mappings.addEdit( + sourceIndex, + chunk.content, + loc, + chunk.storeName ? names.indexOf(chunk.original) : -1, + ); + } else { + mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations); + } + + if (chunk.outro.length) mappings.advance(chunk.outro); + }); + + return { + file: options.file ? options.file.split(/[/\\]/).pop() : undefined, + sources: [ + options.source ? getRelativePath(options.file || '', options.source) : options.file || '', + ], + sourcesContent: options.includeContent ? [this.original] : undefined, + names, + mappings: mappings.raw, + x_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined, + }; + } + + generateMap(options) { + return new SourceMap$1(this.generateDecodedMap(options)); + } + + _ensureindentStr() { + if (this.indentStr === undefined) { + this.indentStr = guessIndent(this.original); + } + } + + _getRawIndentString() { + this._ensureindentStr(); + return this.indentStr; + } + + getIndentString() { + this._ensureindentStr(); + return this.indentStr === null ? '\t' : this.indentStr; + } + + indent(indentStr, options) { + const pattern = /^[^\r\n]/gm; + + if (isObject$2(indentStr)) { + options = indentStr; + indentStr = undefined; + } + + if (indentStr === undefined) { + this._ensureindentStr(); + indentStr = this.indentStr || '\t'; + } + + if (indentStr === '') return this; // noop + + options = options || {}; + + // Process exclusion ranges + const isExcluded = {}; + + if (options.exclude) { + const exclusions = + typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude; + exclusions.forEach((exclusion) => { + for (let i = exclusion[0]; i < exclusion[1]; i += 1) { + isExcluded[i] = true; + } + }); + } + + let shouldIndentNextCharacter = options.indentStart !== false; + const replacer = (match) => { + if (shouldIndentNextCharacter) return `${indentStr}${match}`; + shouldIndentNextCharacter = true; + return match; + }; + + this.intro = this.intro.replace(pattern, replacer); + + let charIndex = 0; + let chunk = this.firstChunk; + + while (chunk) { + const end = chunk.end; + + if (chunk.edited) { + if (!isExcluded[charIndex]) { + chunk.content = chunk.content.replace(pattern, replacer); + + if (chunk.content.length) { + shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n'; + } + } + } else { + charIndex = chunk.start; + + while (charIndex < end) { + if (!isExcluded[charIndex]) { + const char = this.original[charIndex]; + + if (char === '\n') { + shouldIndentNextCharacter = true; + } else if (char !== '\r' && shouldIndentNextCharacter) { + shouldIndentNextCharacter = false; + + if (charIndex === chunk.start) { + chunk.prependRight(indentStr); + } else { + this._splitChunk(chunk, charIndex); + chunk = chunk.next; + chunk.prependRight(indentStr); + } + } + } + + charIndex += 1; + } + } + + charIndex = chunk.end; + chunk = chunk.next; + } + + this.outro = this.outro.replace(pattern, replacer); + + return this; + } + + insert() { + throw new Error( + 'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)', + ); + } + + insertLeft(index, content) { + if (!warned.insertLeft) { + console.warn( + 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead', + ); + warned.insertLeft = true; + } + + return this.appendLeft(index, content); + } + + insertRight(index, content) { + if (!warned.insertRight) { + console.warn( + 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead', + ); + warned.insertRight = true; + } + + return this.prependRight(index, content); + } + + move(start, end, index) { + start = start + this.offset; + end = end + this.offset; + index = index + this.offset; + + if (index >= start && index <= end) throw new Error('Cannot move a selection inside itself'); + + this._split(start); + this._split(end); + this._split(index); + + const first = this.byStart[start]; + const last = this.byEnd[end]; + + const oldLeft = first.previous; + const oldRight = last.next; + + const newRight = this.byStart[index]; + if (!newRight && last === this.lastChunk) return this; + const newLeft = newRight ? newRight.previous : this.lastChunk; + + if (oldLeft) oldLeft.next = oldRight; + if (oldRight) oldRight.previous = oldLeft; + + if (newLeft) newLeft.next = first; + if (newRight) newRight.previous = last; + + if (!first.previous) this.firstChunk = last.next; + if (!last.next) { + this.lastChunk = first.previous; + this.lastChunk.next = null; + } + + first.previous = newLeft; + last.next = newRight || null; + + if (!newLeft) this.firstChunk = first; + if (!newRight) this.lastChunk = last; + return this; + } + + overwrite(start, end, content, options) { + options = options || {}; + return this.update(start, end, content, { ...options, overwrite: !options.contentOnly }); + } + + update(start, end, content, options) { + start = start + this.offset; + end = end + this.offset; + + if (typeof content !== 'string') throw new TypeError('replacement content must be a string'); + + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + if (end > this.original.length) throw new Error('end is out of bounds'); + if (start === end) + throw new Error( + 'Cannot overwrite a zero-length range – use appendLeft or prependRight instead', + ); + + this._split(start); + this._split(end); + + if (options === true) { + if (!warned.storeName) { + console.warn( + 'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string', + ); + warned.storeName = true; + } + + options = { storeName: true }; + } + const storeName = options !== undefined ? options.storeName : false; + const overwrite = options !== undefined ? options.overwrite : false; + + if (storeName) { + const original = this.original.slice(start, end); + Object.defineProperty(this.storedNames, original, { + writable: true, + value: true, + enumerable: true, + }); + } + + const first = this.byStart[start]; + const last = this.byEnd[end]; + + if (first) { + let chunk = first; + while (chunk !== last) { + if (chunk.next !== this.byStart[chunk.end]) { + throw new Error('Cannot overwrite across a split point'); + } + chunk = chunk.next; + chunk.edit('', false); + } + + first.edit(content, storeName, !overwrite); + } else { + // must be inserting at the end + const newChunk = new Chunk(start, end, '').edit(content, storeName); + + // TODO last chunk in the array may not be the last chunk, if it's moved... + last.next = newChunk; + newChunk.previous = last; + } + return this; + } + + prepend(content) { + if (typeof content !== 'string') throw new TypeError('outro content must be a string'); + + this.intro = content + this.intro; + return this; + } + + prependLeft(index, content) { + index = index + this.offset; + + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byEnd[index]; + + if (chunk) { + chunk.prependLeft(content); + } else { + this.intro = content + this.intro; + } + return this; + } + + prependRight(index, content) { + index = index + this.offset; + + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byStart[index]; + + if (chunk) { + chunk.prependRight(content); + } else { + this.outro = content + this.outro; + } + return this; + } + + remove(start, end) { + start = start + this.offset; + end = end + this.offset; + + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + if (start === end) return this; + + if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); + if (start > end) throw new Error('end must be greater than start'); + + this._split(start); + this._split(end); + + let chunk = this.byStart[start]; + + while (chunk) { + chunk.intro = ''; + chunk.outro = ''; + chunk.edit(''); + + chunk = end > chunk.end ? this.byStart[chunk.end] : null; + } + return this; + } + + reset(start, end) { + start = start + this.offset; + end = end + this.offset; + + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + if (start === end) return this; + + if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); + if (start > end) throw new Error('end must be greater than start'); + + this._split(start); + this._split(end); + + let chunk = this.byStart[start]; + + while (chunk) { + chunk.reset(); + + chunk = end > chunk.end ? this.byStart[chunk.end] : null; + } + return this; + } + + lastChar() { + if (this.outro.length) return this.outro[this.outro.length - 1]; + let chunk = this.lastChunk; + do { + if (chunk.outro.length) return chunk.outro[chunk.outro.length - 1]; + if (chunk.content.length) return chunk.content[chunk.content.length - 1]; + if (chunk.intro.length) return chunk.intro[chunk.intro.length - 1]; + } while ((chunk = chunk.previous)); + if (this.intro.length) return this.intro[this.intro.length - 1]; + return ''; + } + + lastLine() { + let lineIndex = this.outro.lastIndexOf(n$1); + if (lineIndex !== -1) return this.outro.substr(lineIndex + 1); + let lineStr = this.outro; + let chunk = this.lastChunk; + do { + if (chunk.outro.length > 0) { + lineIndex = chunk.outro.lastIndexOf(n$1); + if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr; + lineStr = chunk.outro + lineStr; + } + + if (chunk.content.length > 0) { + lineIndex = chunk.content.lastIndexOf(n$1); + if (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr; + lineStr = chunk.content + lineStr; + } + + if (chunk.intro.length > 0) { + lineIndex = chunk.intro.lastIndexOf(n$1); + if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr; + lineStr = chunk.intro + lineStr; + } + } while ((chunk = chunk.previous)); + lineIndex = this.intro.lastIndexOf(n$1); + if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr; + return this.intro + lineStr; + } + + slice(start = 0, end = this.original.length - this.offset) { + start = start + this.offset; + end = end + this.offset; + + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + let result = ''; + + // find start chunk + let chunk = this.firstChunk; + while (chunk && (chunk.start > start || chunk.end <= start)) { + // found end chunk before start + if (chunk.start < end && chunk.end >= end) { + return result; + } + + chunk = chunk.next; + } + + if (chunk && chunk.edited && chunk.start !== start) + throw new Error(`Cannot use replaced character ${start} as slice start anchor.`); + + const startChunk = chunk; + while (chunk) { + if (chunk.intro && (startChunk !== chunk || chunk.start === start)) { + result += chunk.intro; + } + + const containsEnd = chunk.start < end && chunk.end >= end; + if (containsEnd && chunk.edited && chunk.end !== end) + throw new Error(`Cannot use replaced character ${end} as slice end anchor.`); + + const sliceStart = startChunk === chunk ? start - chunk.start : 0; + const sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length; + + result += chunk.content.slice(sliceStart, sliceEnd); + + if (chunk.outro && (!containsEnd || chunk.end === end)) { + result += chunk.outro; + } + + if (containsEnd) { + break; + } + + chunk = chunk.next; + } + + return result; + } + + // TODO deprecate this? not really very useful + snip(start, end) { + const clone = this.clone(); + clone.remove(0, start); + clone.remove(end, clone.original.length); + + return clone; + } + + _split(index) { + if (this.byStart[index] || this.byEnd[index]) return; + + let chunk = this.lastSearchedChunk; + const searchForward = index > chunk.end; + + while (chunk) { + if (chunk.contains(index)) return this._splitChunk(chunk, index); + + chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start]; + } + } + + _splitChunk(chunk, index) { + if (chunk.edited && chunk.content.length) { + // zero-length edited chunks are a special case (overlapping replacements) + const loc = getLocator(this.original)(index); + throw new Error( + `Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`, + ); + } + + const newChunk = chunk.split(index); + + this.byEnd[index] = chunk; + this.byStart[index] = newChunk; + this.byEnd[newChunk.end] = newChunk; + + if (chunk === this.lastChunk) this.lastChunk = newChunk; + + this.lastSearchedChunk = chunk; + return true; + } + + toString() { + let str = this.intro; + + let chunk = this.firstChunk; + while (chunk) { + str += chunk.toString(); + chunk = chunk.next; + } + + return str + this.outro; + } + + isEmpty() { + let chunk = this.firstChunk; + do { + if ( + (chunk.intro.length && chunk.intro.trim()) || + (chunk.content.length && chunk.content.trim()) || + (chunk.outro.length && chunk.outro.trim()) + ) + return false; + } while ((chunk = chunk.next)); + return true; + } + + length() { + let chunk = this.firstChunk; + let length = 0; + do { + length += chunk.intro.length + chunk.content.length + chunk.outro.length; + } while ((chunk = chunk.next)); + return length; + } + + trimLines() { + return this.trim('[\\r\\n]'); + } + + trim(charType) { + return this.trimStart(charType).trimEnd(charType); + } + + trimEndAborted(charType) { + const rx = new RegExp((charType || '\\s') + '+$'); + + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + + let chunk = this.lastChunk; + + do { + const end = chunk.end; + const aborted = chunk.trimEnd(rx); + + // if chunk was trimmed, we have a new lastChunk + if (chunk.end !== end) { + if (this.lastChunk === chunk) { + this.lastChunk = chunk.next; + } + + this.byEnd[chunk.end] = chunk; + this.byStart[chunk.next.start] = chunk.next; + this.byEnd[chunk.next.end] = chunk.next; + } + + if (aborted) return true; + chunk = chunk.previous; + } while (chunk); + + return false; + } + + trimEnd(charType) { + this.trimEndAborted(charType); + return this; + } + trimStartAborted(charType) { + const rx = new RegExp('^' + (charType || '\\s') + '+'); + + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + + let chunk = this.firstChunk; + + do { + const end = chunk.end; + const aborted = chunk.trimStart(rx); + + if (chunk.end !== end) { + // special case... + if (chunk === this.lastChunk) this.lastChunk = chunk.next; + + this.byEnd[chunk.end] = chunk; + this.byStart[chunk.next.start] = chunk.next; + this.byEnd[chunk.next.end] = chunk.next; + } + + if (aborted) return true; + chunk = chunk.next; + } while (chunk); + + return false; + } + + trimStart(charType) { + this.trimStartAborted(charType); + return this; + } + + hasChanged() { + return this.original !== this.toString(); + } + + _replaceRegexp(searchValue, replacement) { + function getReplacement(match, str) { + if (typeof replacement === 'string') { + return replacement.replace(/\$(\$|&|\d+)/g, (_, i) => { + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter + if (i === '$') return '$'; + if (i === '&') return match[0]; + const num = +i; + if (num < match.length) return match[+i]; + return `$${i}`; + }); + } else { + return replacement(...match, match.index, str, match.groups); + } + } + function matchAll(re, str) { + let match; + const matches = []; + while ((match = re.exec(str))) { + matches.push(match); + } + return matches; + } + if (searchValue.global) { + const matches = matchAll(searchValue, this.original); + matches.forEach((match) => { + if (match.index != null) { + const replacement = getReplacement(match, this.original); + if (replacement !== match[0]) { + this.overwrite(match.index, match.index + match[0].length, replacement); + } + } + }); + } else { + const match = this.original.match(searchValue); + if (match && match.index != null) { + const replacement = getReplacement(match, this.original); + if (replacement !== match[0]) { + this.overwrite(match.index, match.index + match[0].length, replacement); + } + } + } + return this; + } + + _replaceString(string, replacement) { + const { original } = this; + const index = original.indexOf(string); + + if (index !== -1) { + this.overwrite(index, index + string.length, replacement); + } + + return this; + } + + replace(searchValue, replacement) { + if (typeof searchValue === 'string') { + return this._replaceString(searchValue, replacement); + } + + return this._replaceRegexp(searchValue, replacement); + } + + _replaceAllString(string, replacement) { + const { original } = this; + const stringLength = string.length; + for ( + let index = original.indexOf(string); + index !== -1; + index = original.indexOf(string, index + stringLength) + ) { + const previous = original.slice(index, index + stringLength); + if (previous !== replacement) this.overwrite(index, index + stringLength, replacement); + } + + return this; + } + + replaceAll(searchValue, replacement) { + if (typeof searchValue === 'string') { + return this._replaceAllString(searchValue, replacement); + } + + if (!searchValue.global) { + throw new TypeError( + 'MagicString.prototype.replaceAll called with a non-global RegExp argument', + ); + } + + return this._replaceRegexp(searchValue, replacement); + } +} + +function isReference(node, parent) { + if (node.type === 'MemberExpression') { + return !node.computed && isReference(node.object, node); + } + if (node.type === 'Identifier') { + if (!parent) + return true; + switch (parent.type) { + // disregard `bar` in `foo.bar` + case 'MemberExpression': return parent.computed || node === parent.object; + // disregard the `foo` in `class {foo(){}}` but keep it in `class {[foo](){}}` + case 'MethodDefinition': return parent.computed; + // disregard the `foo` in `class {foo=bar}` but keep it in `class {[foo]=bar}` and `class {bar=foo}` + case 'FieldDefinition': return parent.computed || node === parent.value; + // disregard the `bar` in `{ bar: foo }`, but keep it in `{ [bar]: foo }` + case 'Property': return parent.computed || node === parent.value; + // disregard the `bar` in `export { foo as bar }` or + // the foo in `import { foo as bar }` + case 'ExportSpecifier': + case 'ImportSpecifier': return node === parent.local; + // disregard the `foo` in `foo: while (...) { ... break foo; ... continue foo;}` + case 'LabeledStatement': + case 'BreakStatement': + case 'ContinueStatement': return false; + default: return true; + } + } + return false; +} + +var version$2 = "28.0.3"; +var peerDependencies = { + rollup: "^2.68.0||^3.0.0||^4.0.0" +}; + +function tryParse(parse, code, id) { + try { + return parse(code, { allowReturnOutsideFunction: true }); + } catch (err) { + err.message += ` in ${id}`; + throw err; + } +} + +const firstpassGlobal = /\b(?:require|module|exports|global)\b/; + +const firstpassNoGlobal = /\b(?:require|module|exports)\b/; + +function hasCjsKeywords(code, ignoreGlobal) { + const firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal; + return firstpass.test(code); +} + +/* eslint-disable no-underscore-dangle */ + + +function analyzeTopLevelStatements(parse, code, id) { + const ast = tryParse(parse, code, id); + + let isEsModule = false; + let hasDefaultExport = false; + let hasNamedExports = false; + + for (const node of ast.body) { + switch (node.type) { + case 'ExportDefaultDeclaration': + isEsModule = true; + hasDefaultExport = true; + break; + case 'ExportNamedDeclaration': + isEsModule = true; + if (node.declaration) { + hasNamedExports = true; + } else { + for (const specifier of node.specifiers) { + if (specifier.exported.name === 'default') { + hasDefaultExport = true; + } else { + hasNamedExports = true; + } + } + } + break; + case 'ExportAllDeclaration': + isEsModule = true; + if (node.exported && node.exported.name === 'default') { + hasDefaultExport = true; + } else { + hasNamedExports = true; + } + break; + case 'ImportDeclaration': + isEsModule = true; + break; + } + } + + return { isEsModule, hasDefaultExport, hasNamedExports, ast }; +} + +/* eslint-disable import/prefer-default-export */ + + +function deconflict(scopes, globals, identifier) { + let i = 1; + let deconflicted = makeLegalIdentifier(identifier); + const hasConflicts = () => + scopes.some((scope) => scope.contains(deconflicted)) || globals.has(deconflicted); + + while (hasConflicts()) { + deconflicted = makeLegalIdentifier(`${identifier}_${i}`); + i += 1; + } + + for (const scope of scopes) { + scope.declarations[deconflicted] = true; + } + + return deconflicted; +} + +function getName(id) { + const name = makeLegalIdentifier(basename$1(id, extname(id))); + if (name !== 'index') { + return name; + } + return makeLegalIdentifier(basename$1(dirname$1(id))); +} + +function normalizePathSlashes(path) { + return path.replace(/\\/g, '/'); +} + +const getVirtualPathForDynamicRequirePath = (path, commonDir) => + `/${normalizePathSlashes(relative$1(commonDir, path))}`; + +function capitalize(name) { + return name[0].toUpperCase() + name.slice(1); +} + +function getStrictRequiresFilter({ strictRequires }) { + switch (strictRequires) { + // eslint-disable-next-line no-undefined + case undefined: + case true: + return { strictRequiresFilter: () => true, detectCyclesAndConditional: false }; + case 'auto': + case 'debug': + case null: + return { strictRequiresFilter: () => false, detectCyclesAndConditional: true }; + case false: + return { strictRequiresFilter: () => false, detectCyclesAndConditional: false }; + default: + if (typeof strictRequires === 'string' || Array.isArray(strictRequires)) { + return { + strictRequiresFilter: createFilter$2(strictRequires), + detectCyclesAndConditional: false + }; + } + throw new Error('Unexpected value for "strictRequires" option.'); + } +} + +function getPackageEntryPoint(dirPath) { + let entryPoint = 'index.js'; + + try { + if (existsSync(join(dirPath, 'package.json'))) { + entryPoint = + JSON.parse(readFileSync(join(dirPath, 'package.json'), { encoding: 'utf8' })).main || + entryPoint; + } + } catch (ignored) { + // ignored + } + + return entryPoint; +} + +function isDirectory$1(path) { + try { + if (statSync(path).isDirectory()) return true; + } catch (ignored) { + // Nothing to do here + } + return false; +} + +function getDynamicRequireModules(patterns, dynamicRequireRoot) { + const dynamicRequireModules = new Map(); + const dirNames = new Set(); + for (const pattern of !patterns || Array.isArray(patterns) ? patterns || [] : [patterns]) { + const isNegated = pattern.startsWith('!'); + const modifyMap = (targetPath, resolvedPath) => + isNegated + ? dynamicRequireModules.delete(targetPath) + : dynamicRequireModules.set(targetPath, resolvedPath); + // eslint-disable-next-line new-cap + for (const path of new fdir() + .withBasePath() + .withDirs() + .glob(isNegated ? pattern.substr(1) : pattern) + .crawl() + .sync() + .sort((a, b) => a.localeCompare(b, 'en'))) { + const resolvedPath = resolve$3(path); + const requirePath = normalizePathSlashes(resolvedPath); + if (isDirectory$1(resolvedPath)) { + dirNames.add(resolvedPath); + const modulePath = resolve$3(join(resolvedPath, getPackageEntryPoint(path))); + modifyMap(requirePath, modulePath); + modifyMap(normalizePathSlashes(modulePath), modulePath); + } else { + dirNames.add(dirname$1(resolvedPath)); + modifyMap(requirePath, resolvedPath); + } + } + } + return { + commonDir: dirNames.size ? getCommonDir([...dirNames, dynamicRequireRoot]) : null, + dynamicRequireModules + }; +} + +const FAILED_REQUIRE_ERROR = `throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');`; + +const COMMONJS_REQUIRE_EXPORT = 'commonjsRequire'; +const CREATE_COMMONJS_REQUIRE_EXPORT = 'createCommonjsRequire'; + +function getDynamicModuleRegistry( + isDynamicRequireModulesEnabled, + dynamicRequireModules, + commonDir, + ignoreDynamicRequires +) { + if (!isDynamicRequireModulesEnabled) { + return `export function ${COMMONJS_REQUIRE_EXPORT}(path) { + ${FAILED_REQUIRE_ERROR} +}`; + } + const dynamicModuleImports = [...dynamicRequireModules.values()] + .map( + (id, index) => + `import ${ + id.endsWith('.json') ? `json${index}` : `{ __require as require${index} }` + } from ${JSON.stringify(id)};` + ) + .join('\n'); + const dynamicModuleProps = [...dynamicRequireModules.keys()] + .map( + (id, index) => + `\t\t${JSON.stringify(getVirtualPathForDynamicRequirePath(id, commonDir))}: ${ + id.endsWith('.json') ? `function () { return json${index}; }` : `require${index}` + }` + ) + .join(',\n'); + return `${dynamicModuleImports} + +var dynamicModules; + +function getDynamicModules() { + return dynamicModules || (dynamicModules = { +${dynamicModuleProps} + }); +} + +export function ${CREATE_COMMONJS_REQUIRE_EXPORT}(originalModuleDir) { + function handleRequire(path) { + var resolvedPath = commonjsResolve(path, originalModuleDir); + if (resolvedPath !== null) { + return getDynamicModules()[resolvedPath](); + } + ${ignoreDynamicRequires ? 'return require(path);' : FAILED_REQUIRE_ERROR} + } + handleRequire.resolve = function (path) { + var resolvedPath = commonjsResolve(path, originalModuleDir); + if (resolvedPath !== null) { + return resolvedPath; + } + return require.resolve(path); + } + return handleRequire; +} + +function commonjsResolve (path, originalModuleDir) { + var shouldTryNodeModules = isPossibleNodeModulesPath(path); + path = normalize(path); + var relPath; + if (path[0] === '/') { + originalModuleDir = ''; + } + var modules = getDynamicModules(); + var checkedExtensions = ['', '.js', '.json']; + while (true) { + if (!shouldTryNodeModules) { + relPath = normalize(originalModuleDir + '/' + path); + } else { + relPath = normalize(originalModuleDir + '/node_modules/' + path); + } + + if (relPath.endsWith('/..')) { + break; // Travelled too far up, avoid infinite loop + } + + for (var extensionIndex = 0; extensionIndex < checkedExtensions.length; extensionIndex++) { + var resolvedPath = relPath + checkedExtensions[extensionIndex]; + if (modules[resolvedPath]) { + return resolvedPath; + } + } + if (!shouldTryNodeModules) break; + var nextDir = normalize(originalModuleDir + '/..'); + if (nextDir === originalModuleDir) break; + originalModuleDir = nextDir; + } + return null; +} + +function isPossibleNodeModulesPath (modulePath) { + var c0 = modulePath[0]; + if (c0 === '/' || c0 === '\\\\') return false; + var c1 = modulePath[1], c2 = modulePath[2]; + if ((c0 === '.' && (!c1 || c1 === '/' || c1 === '\\\\')) || + (c0 === '.' && c1 === '.' && (!c2 || c2 === '/' || c2 === '\\\\'))) return false; + if (c1 === ':' && (c2 === '/' || c2 === '\\\\')) return false; + return true; +} + +function normalize (path) { + path = path.replace(/\\\\/g, '/'); + var parts = path.split('/'); + var slashed = parts[0] === ''; + for (var i = 1; i < parts.length; i++) { + if (parts[i] === '.' || parts[i] === '') { + parts.splice(i--, 1); + } + } + for (var i = 1; i < parts.length; i++) { + if (parts[i] !== '..') continue; + if (i > 0 && parts[i - 1] !== '..' && parts[i - 1] !== '.') { + parts.splice(--i, 2); + i--; + } + } + path = parts.join('/'); + if (slashed && path[0] !== '/') path = '/' + path; + else if (path.length === 0) path = '.'; + return path; +}`; +} + +const isWrappedId = (id, suffix) => id.endsWith(suffix); +const wrapId = (id, suffix) => `\0${id}${suffix}`; +const unwrapId = (wrappedId, suffix) => wrappedId.slice(1, -suffix.length); + +// A proxy module when a module is required from non-wrapped CommonJS. Is different for ESM and CommonJS requires. +const PROXY_SUFFIX = '?commonjs-proxy'; +// Indicates that a required module is wrapped commonjs and needs special handling. +const WRAPPED_SUFFIX = '?commonjs-wrapped'; +// Indicates that a required module is external +const EXTERNAL_SUFFIX = '?commonjs-external'; +// A helper module that contains the exports object of a module +const EXPORTS_SUFFIX = '?commonjs-exports'; +// A helper module that contains the module object of a module, e.g. when module.exports is reassigned +const MODULE_SUFFIX = '?commonjs-module'; +// A special proxy for CommonJS entry points +const ENTRY_SUFFIX = '?commonjs-entry'; +// A proxy when wrapped ESM is required from CommonJS +const ES_IMPORT_SUFFIX = '?commonjs-es-import'; + +const DYNAMIC_MODULES_ID = '\0commonjs-dynamic-modules'; +const HELPERS_ID = '\0commonjsHelpers.js'; + +const IS_WRAPPED_COMMONJS = 'withRequireFunction'; + +// `x['default']` is used instead of `x.default` for backward compatibility with ES3 browsers. +// Minifiers like uglify will usually transpile it back if compatibility with ES3 is not enabled. +// This could be improved by inspecting Rollup's "generatedCode" option + +const HELPERS = ` +export var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +export function getDefaultExportFromCjs (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; +} + +export function getDefaultExportFromNamespaceIfPresent (n) { + return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n; +} + +export function getDefaultExportFromNamespaceIfNotNamed (n) { + return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n; +} + +export function getAugmentedNamespace(n) { + if (Object.prototype.hasOwnProperty.call(n, '__esModule')) return n; + var f = n.default; + if (typeof f == "function") { + var a = function a () { + if (this instanceof a) { + return Reflect.construct(f, arguments, this.constructor); + } + return f.apply(this, arguments); + }; + a.prototype = f.prototype; + } else a = {}; + Object.defineProperty(a, '__esModule', {value: true}); + Object.keys(n).forEach(function (k) { + var d = Object.getOwnPropertyDescriptor(n, k); + Object.defineProperty(a, k, d.get ? d : { + enumerable: true, + get: function () { + return n[k]; + } + }); + }); + return a; +} +`; + +function getHelpersModule() { + return HELPERS; +} + +function getUnknownRequireProxy(id, requireReturnsDefault) { + if (requireReturnsDefault === true || id.endsWith('.json')) { + return `export { default } from ${JSON.stringify(id)};`; + } + const name = getName(id); + const exported = + requireReturnsDefault === 'auto' + ? `import { getDefaultExportFromNamespaceIfNotNamed } from "${HELPERS_ID}"; export default /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(${name});` + : requireReturnsDefault === 'preferred' + ? `import { getDefaultExportFromNamespaceIfPresent } from "${HELPERS_ID}"; export default /*@__PURE__*/getDefaultExportFromNamespaceIfPresent(${name});` + : !requireReturnsDefault + ? `import { getAugmentedNamespace } from "${HELPERS_ID}"; export default /*@__PURE__*/getAugmentedNamespace(${name});` + : `export default ${name};`; + return `import * as ${name} from ${JSON.stringify(id)}; ${exported}`; +} + +async function getStaticRequireProxy(id, requireReturnsDefault, loadModule) { + const name = getName(id); + const { + meta: { commonjs: commonjsMeta } + } = await loadModule({ id }); + if (!commonjsMeta) { + return getUnknownRequireProxy(id, requireReturnsDefault); + } + if (commonjsMeta.isCommonJS) { + return `export { __moduleExports as default } from ${JSON.stringify(id)};`; + } + if (!requireReturnsDefault) { + return `import { getAugmentedNamespace } from "${HELPERS_ID}"; import * as ${name} from ${JSON.stringify( + id + )}; export default /*@__PURE__*/getAugmentedNamespace(${name});`; + } + if ( + requireReturnsDefault !== true && + (requireReturnsDefault === 'namespace' || + !commonjsMeta.hasDefaultExport || + (requireReturnsDefault === 'auto' && commonjsMeta.hasNamedExports)) + ) { + return `import * as ${name} from ${JSON.stringify(id)}; export default ${name};`; + } + return `export { default } from ${JSON.stringify(id)};`; +} + +function getEntryProxy(id, defaultIsModuleExports, getModuleInfo, shebang) { + const { + meta: { commonjs: commonjsMeta }, + hasDefaultExport + } = getModuleInfo(id); + if (!commonjsMeta || commonjsMeta.isCommonJS !== IS_WRAPPED_COMMONJS) { + const stringifiedId = JSON.stringify(id); + let code = `export * from ${stringifiedId};`; + if (hasDefaultExport) { + code += `export { default } from ${stringifiedId};`; + } + return shebang + code; + } + const result = getEsImportProxy(id, defaultIsModuleExports, true); + return { + ...result, + code: shebang + result.code + }; +} + +function getEsImportProxy(id, defaultIsModuleExports, moduleSideEffects) { + const name = getName(id); + const exportsName = `${name}Exports`; + const requireModule = `require${capitalize(name)}`; + let code = + `import { getDefaultExportFromCjs } from "${HELPERS_ID}";\n` + + `import { __require as ${requireModule} } from ${JSON.stringify(id)};\n` + + `var ${exportsName} = ${moduleSideEffects ? '' : '/*@__PURE__*/ '}${requireModule}();\n` + + `export { ${exportsName} as __moduleExports };`; + if (defaultIsModuleExports === true) { + code += `\nexport { ${exportsName} as default };`; + } else if (defaultIsModuleExports === false) { + code += `\nexport default ${exportsName}.default;`; + } else { + code += `\nexport default /*@__PURE__*/getDefaultExportFromCjs(${exportsName});`; + } + return { + code, + syntheticNamedExports: '__moduleExports' + }; +} + +/* eslint-disable no-param-reassign, no-undefined */ + + +function getCandidatesForExtension(resolved, extension) { + return [resolved + extension, `${resolved}${sep}index${extension}`]; +} + +function getCandidates(resolved, extensions) { + return extensions.reduce( + (paths, extension) => paths.concat(getCandidatesForExtension(resolved, extension)), + [resolved] + ); +} + +function resolveExtensions(importee, importer, extensions) { + // not our problem + if (importee[0] !== '.' || !importer) return undefined; + + const resolved = resolve$3(dirname$1(importer), importee); + const candidates = getCandidates(resolved, extensions); + + for (let i = 0; i < candidates.length; i += 1) { + try { + const stats = statSync(candidates[i]); + if (stats.isFile()) return { id: candidates[i] }; + } catch (err) { + /* noop */ + } + } + + return undefined; +} + +function getResolveId(extensions, isPossibleCjsId) { + const currentlyResolving = new Map(); + + return { + /** + * This is a Maps of importers to Sets of require sources being resolved at + * the moment by resolveRequireSourcesAndUpdateMeta + */ + currentlyResolving, + async resolveId(importee, importer, resolveOptions) { + const customOptions = resolveOptions.custom; + // All logic below is specific to ES imports. + // Also, if we do not skip this logic for requires that are resolved while + // transforming a commonjs file, it can easily lead to deadlocks. + if (customOptions?.['node-resolve']?.isRequire) { + return null; + } + const currentlyResolvingForParent = currentlyResolving.get(importer); + if (currentlyResolvingForParent && currentlyResolvingForParent.has(importee)) { + this.warn({ + code: 'THIS_RESOLVE_WITHOUT_OPTIONS', + message: + 'It appears a plugin has implemented a "resolveId" hook that uses "this.resolve" without forwarding the third "options" parameter of "resolveId". This is problematic as it can lead to wrong module resolutions especially for the node-resolve plugin and in certain cases cause early exit errors for the commonjs plugin.\nIn rare cases, this warning can appear if the same file is both imported and required from the same mixed ES/CommonJS module, in which case it can be ignored.', + url: 'https://rollupjs.org/guide/en/#resolveid' + }); + return null; + } + + if (isWrappedId(importee, WRAPPED_SUFFIX)) { + return unwrapId(importee, WRAPPED_SUFFIX); + } + + if ( + importee.endsWith(ENTRY_SUFFIX) || + isWrappedId(importee, MODULE_SUFFIX) || + isWrappedId(importee, EXPORTS_SUFFIX) || + isWrappedId(importee, PROXY_SUFFIX) || + isWrappedId(importee, ES_IMPORT_SUFFIX) || + isWrappedId(importee, EXTERNAL_SUFFIX) || + importee.startsWith(HELPERS_ID) || + importee === DYNAMIC_MODULES_ID + ) { + return importee; + } + + if (importer) { + if ( + importer === DYNAMIC_MODULES_ID || + // Proxies are only importing resolved ids, no need to resolve again + isWrappedId(importer, PROXY_SUFFIX) || + isWrappedId(importer, ES_IMPORT_SUFFIX) || + importer.endsWith(ENTRY_SUFFIX) + ) { + return importee; + } + if (isWrappedId(importer, EXTERNAL_SUFFIX)) { + // We need to return null for unresolved imports so that the proper warning is shown + if ( + !(await this.resolve( + importee, + importer, + Object.assign({ skipSelf: true }, resolveOptions) + )) + ) { + return null; + } + // For other external imports, we need to make sure they are handled as external + return { id: importee, external: true }; + } + } + + if (importee.startsWith('\0')) { + return null; + } + + // If this is an entry point or ESM import, we need to figure out if the importee is wrapped and + // if that is the case, we need to add a proxy. + const resolved = + (await this.resolve( + importee, + importer, + Object.assign({ skipSelf: true }, resolveOptions) + )) || resolveExtensions(importee, importer, extensions); + // Make sure that even if other plugins resolve again, we ignore our own proxies + if ( + !resolved || + resolved.external || + resolved.id.endsWith(ENTRY_SUFFIX) || + isWrappedId(resolved.id, ES_IMPORT_SUFFIX) || + !isPossibleCjsId(resolved.id) + ) { + return resolved; + } + const moduleInfo = await this.load(resolved); + const { + meta: { commonjs: commonjsMeta } + } = moduleInfo; + if (commonjsMeta) { + const { isCommonJS } = commonjsMeta; + if (isCommonJS) { + if (resolveOptions.isEntry) { + moduleInfo.moduleSideEffects = true; + // We must not precede entry proxies with a `\0` as that will mess up relative external resolution + return resolved.id + ENTRY_SUFFIX; + } + if (isCommonJS === IS_WRAPPED_COMMONJS) { + return { id: wrapId(resolved.id, ES_IMPORT_SUFFIX), meta: { commonjs: { resolved } } }; + } + } + } + return resolved; + } + }; +} + +function getRequireResolver(extensions, detectCyclesAndConditional, currentlyResolving) { + const knownCjsModuleTypes = Object.create(null); + const requiredIds = Object.create(null); + const unconditionallyRequiredIds = Object.create(null); + const dependencies = Object.create(null); + const getDependencies = (id) => dependencies[id] || (dependencies[id] = new Set()); + + const isCyclic = (id) => { + const dependenciesToCheck = new Set(getDependencies(id)); + for (const dependency of dependenciesToCheck) { + if (dependency === id) { + return true; + } + for (const childDependency of getDependencies(dependency)) { + dependenciesToCheck.add(childDependency); + } + } + return false; + }; + + // Once a module is listed here, its type (wrapped or not) is fixed and may + // not change for the rest of the current build, to not break already + // transformed modules. + const fullyAnalyzedModules = Object.create(null); + + const getTypeForFullyAnalyzedModule = (id) => { + const knownType = knownCjsModuleTypes[id]; + if (knownType !== true || !detectCyclesAndConditional || fullyAnalyzedModules[id]) { + return knownType; + } + if (isCyclic(id)) { + return (knownCjsModuleTypes[id] = IS_WRAPPED_COMMONJS); + } + return knownType; + }; + + const setInitialParentType = (id, initialCommonJSType) => { + // Fully analyzed modules may never change type + if (fullyAnalyzedModules[id]) { + return; + } + knownCjsModuleTypes[id] = initialCommonJSType; + if ( + detectCyclesAndConditional && + knownCjsModuleTypes[id] === true && + requiredIds[id] && + !unconditionallyRequiredIds[id] + ) { + knownCjsModuleTypes[id] = IS_WRAPPED_COMMONJS; + } + }; + + const analyzeRequiredModule = async (parentId, resolved, isConditional, loadModule) => { + const childId = resolved.id; + requiredIds[childId] = true; + if (!(isConditional || knownCjsModuleTypes[parentId] === IS_WRAPPED_COMMONJS)) { + unconditionallyRequiredIds[childId] = true; + } + + getDependencies(parentId).add(childId); + if (!isCyclic(childId)) { + // This makes sure the current transform handler waits for all direct + // dependencies to be loaded and transformed and therefore for all + // transitive CommonJS dependencies to be loaded as well so that all + // cycles have been found and knownCjsModuleTypes is reliable. + await loadModule(resolved); + } + }; + + const getTypeForImportedModule = async (resolved, loadModule) => { + if (resolved.id in knownCjsModuleTypes) { + // This handles cyclic ES dependencies + return knownCjsModuleTypes[resolved.id]; + } + const { + meta: { commonjs } + } = await loadModule(resolved); + return (commonjs && commonjs.isCommonJS) || false; + }; + + return { + getWrappedIds: () => + Object.keys(knownCjsModuleTypes).filter( + (id) => knownCjsModuleTypes[id] === IS_WRAPPED_COMMONJS + ), + isRequiredId: (id) => requiredIds[id], + async shouldTransformCachedModule({ + id: parentId, + resolvedSources, + meta: { commonjs: parentMeta } + }) { + // We explicitly track ES modules to handle circular imports + if (!(parentMeta && parentMeta.isCommonJS)) knownCjsModuleTypes[parentId] = false; + if (isWrappedId(parentId, ES_IMPORT_SUFFIX)) return false; + const parentRequires = parentMeta && parentMeta.requires; + if (parentRequires) { + setInitialParentType(parentId, parentMeta.initialCommonJSType); + await Promise.all( + parentRequires.map(({ resolved, isConditional }) => + analyzeRequiredModule(parentId, resolved, isConditional, this.load) + ) + ); + if (getTypeForFullyAnalyzedModule(parentId) !== parentMeta.isCommonJS) { + return true; + } + for (const { + resolved: { id } + } of parentRequires) { + if (getTypeForFullyAnalyzedModule(id) !== parentMeta.isRequiredCommonJS[id]) { + return true; + } + } + // Now that we decided to go with the cached copy, neither the parent + // module nor any of its children may change types anymore + fullyAnalyzedModules[parentId] = true; + for (const { + resolved: { id } + } of parentRequires) { + fullyAnalyzedModules[id] = true; + } + } + const parentRequireSet = new Set((parentRequires || []).map(({ resolved: { id } }) => id)); + return ( + await Promise.all( + Object.keys(resolvedSources) + .map((source) => resolvedSources[source]) + .filter(({ id, external }) => !(external || parentRequireSet.has(id))) + .map(async (resolved) => { + if (isWrappedId(resolved.id, ES_IMPORT_SUFFIX)) { + return ( + (await getTypeForImportedModule( + ( + await this.load({ id: resolved.id }) + ).meta.commonjs.resolved, + this.load + )) !== IS_WRAPPED_COMMONJS + ); + } + return (await getTypeForImportedModule(resolved, this.load)) === IS_WRAPPED_COMMONJS; + }) + ) + ).some((shouldTransform) => shouldTransform); + }, + /* eslint-disable no-param-reassign */ + resolveRequireSourcesAndUpdateMeta: + (rollupContext) => async (parentId, isParentCommonJS, parentMeta, sources) => { + parentMeta.initialCommonJSType = isParentCommonJS; + parentMeta.requires = []; + parentMeta.isRequiredCommonJS = Object.create(null); + setInitialParentType(parentId, isParentCommonJS); + const currentlyResolvingForParent = currentlyResolving.get(parentId) || new Set(); + currentlyResolving.set(parentId, currentlyResolvingForParent); + const requireTargets = await Promise.all( + sources.map(async ({ source, isConditional }) => { + // Never analyze or proxy internal modules + if (source.startsWith('\0')) { + return { id: source, allowProxy: false }; + } + currentlyResolvingForParent.add(source); + const resolved = + (await rollupContext.resolve(source, parentId, { + skipSelf: false, + custom: { 'node-resolve': { isRequire: true } } + })) || resolveExtensions(source, parentId, extensions); + currentlyResolvingForParent.delete(source); + if (!resolved) { + return { id: wrapId(source, EXTERNAL_SUFFIX), allowProxy: false }; + } + const childId = resolved.id; + if (resolved.external) { + return { id: wrapId(childId, EXTERNAL_SUFFIX), allowProxy: false }; + } + parentMeta.requires.push({ resolved, isConditional }); + await analyzeRequiredModule(parentId, resolved, isConditional, rollupContext.load); + return { id: childId, allowProxy: true }; + }) + ); + parentMeta.isCommonJS = getTypeForFullyAnalyzedModule(parentId); + fullyAnalyzedModules[parentId] = true; + return requireTargets.map(({ id: dependencyId, allowProxy }, index) => { + // eslint-disable-next-line no-multi-assign + const isCommonJS = (parentMeta.isRequiredCommonJS[dependencyId] = + getTypeForFullyAnalyzedModule(dependencyId)); + const isWrappedCommonJS = isCommonJS === IS_WRAPPED_COMMONJS; + fullyAnalyzedModules[dependencyId] = true; + return { + wrappedModuleSideEffects: + isWrappedCommonJS && rollupContext.getModuleInfo(dependencyId).moduleSideEffects, + source: sources[index].source, + id: allowProxy + ? wrapId(dependencyId, isWrappedCommonJS ? WRAPPED_SUFFIX : PROXY_SUFFIX) + : dependencyId, + isCommonJS + }; + }); + }, + isCurrentlyResolving(source, parentId) { + const currentlyResolvingForParent = currentlyResolving.get(parentId); + return currentlyResolvingForParent && currentlyResolvingForParent.has(source); + } + }; +} + +function validateVersion(actualVersion, peerDependencyVersion, name) { + const versionRegexp = /\^(\d+\.\d+\.\d+)/g; + let minMajor = Infinity; + let minMinor = Infinity; + let minPatch = Infinity; + let foundVersion; + // eslint-disable-next-line no-cond-assign + while ((foundVersion = versionRegexp.exec(peerDependencyVersion))) { + const [foundMajor, foundMinor, foundPatch] = foundVersion[1].split('.').map(Number); + if (foundMajor < minMajor) { + minMajor = foundMajor; + minMinor = foundMinor; + minPatch = foundPatch; + } + } + if (!actualVersion) { + throw new Error( + `Insufficient ${name} version: "@rollup/plugin-commonjs" requires at least ${name}@${minMajor}.${minMinor}.${minPatch}.` + ); + } + const [major, minor, patch] = actualVersion.split('.').map(Number); + if ( + major < minMajor || + (major === minMajor && (minor < minMinor || (minor === minMinor && patch < minPatch))) + ) { + throw new Error( + `Insufficient ${name} version: "@rollup/plugin-commonjs" requires at least ${name}@${minMajor}.${minMinor}.${minPatch} but found ${name}@${actualVersion}.` + ); + } +} + +const operators = { + '==': (x) => equals(x.left, x.right, false), + + '!=': (x) => not(operators['=='](x)), + + '===': (x) => equals(x.left, x.right, true), + + '!==': (x) => not(operators['==='](x)), + + '!': (x) => isFalsy(x.argument), + + '&&': (x) => isTruthy(x.left) && isTruthy(x.right), + + '||': (x) => isTruthy(x.left) || isTruthy(x.right) +}; + +function not(value) { + return value === null ? value : !value; +} + +function equals(a, b, strict) { + if (a.type !== b.type) return null; + // eslint-disable-next-line eqeqeq + if (a.type === 'Literal') return strict ? a.value === b.value : a.value == b.value; + return null; +} + +function isTruthy(node) { + if (!node) return false; + if (node.type === 'Literal') return !!node.value; + if (node.type === 'ParenthesizedExpression') return isTruthy(node.expression); + if (node.operator in operators) return operators[node.operator](node); + return null; +} + +function isFalsy(node) { + return not(isTruthy(node)); +} + +function getKeypath(node) { + const parts = []; + + while (node.type === 'MemberExpression') { + if (node.computed) return null; + + parts.unshift(node.property.name); + // eslint-disable-next-line no-param-reassign + node = node.object; + } + + if (node.type !== 'Identifier') return null; + + const { name } = node; + parts.unshift(name); + + return { name, keypath: parts.join('.') }; +} + +const KEY_COMPILED_ESM = '__esModule'; + +function getDefineCompiledEsmType(node) { + const definedPropertyWithExports = getDefinePropertyCallName(node, 'exports'); + const definedProperty = + definedPropertyWithExports || getDefinePropertyCallName(node, 'module.exports'); + if (definedProperty && definedProperty.key === KEY_COMPILED_ESM) { + return isTruthy(definedProperty.value) + ? definedPropertyWithExports + ? 'exports' + : 'module' + : false; + } + return false; +} + +function getDefinePropertyCallName(node, targetName) { + const { + callee: { object, property } + } = node; + if (!object || object.type !== 'Identifier' || object.name !== 'Object') return; + if (!property || property.type !== 'Identifier' || property.name !== 'defineProperty') return; + if (node.arguments.length !== 3) return; + + const targetNames = targetName.split('.'); + const [target, key, value] = node.arguments; + if (targetNames.length === 1) { + if (target.type !== 'Identifier' || target.name !== targetNames[0]) { + return; + } + } + + if (targetNames.length === 2) { + if ( + target.type !== 'MemberExpression' || + target.object.name !== targetNames[0] || + target.property.name !== targetNames[1] + ) { + return; + } + } + + if (value.type !== 'ObjectExpression' || !value.properties) return; + + const valueProperty = value.properties.find((p) => p.key && p.key.name === 'value'); + if (!valueProperty || !valueProperty.value) return; + + // eslint-disable-next-line consistent-return + return { key: key.value, value: valueProperty.value }; +} + +function isShorthandProperty(parent) { + return parent && parent.type === 'Property' && parent.shorthand; +} + +function wrapCode(magicString, uses, moduleName, exportsName, indentExclusionRanges) { + const args = []; + const passedArgs = []; + if (uses.module) { + args.push('module'); + passedArgs.push(moduleName); + } + if (uses.exports) { + args.push('exports'); + passedArgs.push(uses.module ? `${moduleName}.exports` : exportsName); + } + magicString + .trim() + .indent('\t', { exclude: indentExclusionRanges }) + .prepend(`(function (${args.join(', ')}) {\n`) + // For some reason, this line is only indented correctly when using a + // require-wrapper if we have this leading space + .append(` \n} (${passedArgs.join(', ')}));`); +} + +function rewriteExportsAndGetExportsBlock( + magicString, + moduleName, + exportsName, + exportedExportsName, + wrapped, + moduleExportsAssignments, + firstTopLevelModuleExportsAssignment, + exportsAssignmentsByName, + topLevelAssignments, + defineCompiledEsmExpressions, + deconflictedExportNames, + code, + HELPERS_NAME, + exportMode, + defaultIsModuleExports, + usesRequireWrapper, + requireName +) { + const exports = []; + const exportDeclarations = []; + + if (usesRequireWrapper) { + getExportsWhenUsingRequireWrapper( + magicString, + wrapped, + exportMode, + exports, + moduleExportsAssignments, + exportsAssignmentsByName, + moduleName, + exportsName, + requireName, + defineCompiledEsmExpressions + ); + } else if (exportMode === 'replace') { + getExportsForReplacedModuleExports( + magicString, + exports, + exportDeclarations, + moduleExportsAssignments, + firstTopLevelModuleExportsAssignment, + exportsName, + defaultIsModuleExports, + HELPERS_NAME + ); + } else { + if (exportMode === 'module') { + exportDeclarations.push(`var ${exportedExportsName} = ${moduleName}.exports`); + exports.push(`${exportedExportsName} as __moduleExports`); + } else { + exports.push(`${exportsName} as __moduleExports`); + } + if (wrapped) { + exportDeclarations.push( + getDefaultExportDeclaration(exportedExportsName, defaultIsModuleExports, HELPERS_NAME) + ); + } else { + getExports( + magicString, + exports, + exportDeclarations, + moduleExportsAssignments, + exportsAssignmentsByName, + deconflictedExportNames, + topLevelAssignments, + moduleName, + exportsName, + exportedExportsName, + defineCompiledEsmExpressions, + HELPERS_NAME, + defaultIsModuleExports, + exportMode + ); + } + } + if (exports.length) { + exportDeclarations.push(`export { ${exports.join(', ')} }`); + } + + return `\n\n${exportDeclarations.join(';\n')};`; +} + +function getExportsWhenUsingRequireWrapper( + magicString, + wrapped, + exportMode, + exports, + moduleExportsAssignments, + exportsAssignmentsByName, + moduleName, + exportsName, + requireName, + defineCompiledEsmExpressions +) { + exports.push(`${requireName} as __require`); + if (wrapped) return; + if (exportMode === 'replace') { + rewriteModuleExportsAssignments(magicString, moduleExportsAssignments, exportsName); + } else { + rewriteModuleExportsAssignments(magicString, moduleExportsAssignments, `${moduleName}.exports`); + // Collect and rewrite named exports + for (const [exportName, { nodes }] of exportsAssignmentsByName) { + for (const { node, type } of nodes) { + magicString.overwrite( + node.start, + node.left.end, + `${ + exportMode === 'module' && type === 'module' ? `${moduleName}.exports` : exportsName + }.${exportName}` + ); + } + } + replaceDefineCompiledEsmExpressionsAndGetIfRestorable( + defineCompiledEsmExpressions, + magicString, + exportMode, + moduleName, + exportsName + ); + } +} + +function getExportsForReplacedModuleExports( + magicString, + exports, + exportDeclarations, + moduleExportsAssignments, + firstTopLevelModuleExportsAssignment, + exportsName, + defaultIsModuleExports, + HELPERS_NAME +) { + for (const { left } of moduleExportsAssignments) { + magicString.overwrite(left.start, left.end, exportsName); + } + magicString.prependRight(firstTopLevelModuleExportsAssignment.left.start, 'var '); + exports.push(`${exportsName} as __moduleExports`); + exportDeclarations.push( + getDefaultExportDeclaration(exportsName, defaultIsModuleExports, HELPERS_NAME) + ); +} + +function getDefaultExportDeclaration(exportedExportsName, defaultIsModuleExports, HELPERS_NAME) { + return `export default ${ + defaultIsModuleExports === true + ? exportedExportsName + : defaultIsModuleExports === false + ? `${exportedExportsName}.default` + : `/*@__PURE__*/${HELPERS_NAME}.getDefaultExportFromCjs(${exportedExportsName})` + }`; +} + +function getExports( + magicString, + exports, + exportDeclarations, + moduleExportsAssignments, + exportsAssignmentsByName, + deconflictedExportNames, + topLevelAssignments, + moduleName, + exportsName, + exportedExportsName, + defineCompiledEsmExpressions, + HELPERS_NAME, + defaultIsModuleExports, + exportMode +) { + let deconflictedDefaultExportName; + // Collect and rewrite module.exports assignments + for (const { left } of moduleExportsAssignments) { + magicString.overwrite(left.start, left.end, `${moduleName}.exports`); + } + + // Collect and rewrite named exports + for (const [exportName, { nodes }] of exportsAssignmentsByName) { + const deconflicted = deconflictedExportNames[exportName]; + let needsDeclaration = true; + for (const { node, type } of nodes) { + let replacement = `${deconflicted} = ${ + exportMode === 'module' && type === 'module' ? `${moduleName}.exports` : exportsName + }.${exportName}`; + if (needsDeclaration && topLevelAssignments.has(node)) { + replacement = `var ${replacement}`; + needsDeclaration = false; + } + magicString.overwrite(node.start, node.left.end, replacement); + } + if (needsDeclaration) { + magicString.prepend(`var ${deconflicted};\n`); + } + + if (exportName === 'default') { + deconflictedDefaultExportName = deconflicted; + } else { + exports.push(exportName === deconflicted ? exportName : `${deconflicted} as ${exportName}`); + } + } + + const isRestorableCompiledEsm = replaceDefineCompiledEsmExpressionsAndGetIfRestorable( + defineCompiledEsmExpressions, + magicString, + exportMode, + moduleName, + exportsName + ); + + if ( + defaultIsModuleExports === false || + (defaultIsModuleExports === 'auto' && + isRestorableCompiledEsm && + moduleExportsAssignments.length === 0) + ) { + // If there is no deconflictedDefaultExportName, then we use the namespace as + // fallback because there can be no "default" property on the namespace + exports.push(`${deconflictedDefaultExportName || exportedExportsName} as default`); + } else if ( + defaultIsModuleExports === true || + (!isRestorableCompiledEsm && moduleExportsAssignments.length === 0) + ) { + exports.push(`${exportedExportsName} as default`); + } else { + exportDeclarations.push( + getDefaultExportDeclaration(exportedExportsName, defaultIsModuleExports, HELPERS_NAME) + ); + } +} + +function rewriteModuleExportsAssignments(magicString, moduleExportsAssignments, exportsName) { + for (const { left } of moduleExportsAssignments) { + magicString.overwrite(left.start, left.end, exportsName); + } +} + +function replaceDefineCompiledEsmExpressionsAndGetIfRestorable( + defineCompiledEsmExpressions, + magicString, + exportMode, + moduleName, + exportsName +) { + let isRestorableCompiledEsm = false; + for (const { node, type } of defineCompiledEsmExpressions) { + isRestorableCompiledEsm = true; + const moduleExportsExpression = + node.type === 'CallExpression' ? node.arguments[0] : node.left.object; + magicString.overwrite( + moduleExportsExpression.start, + moduleExportsExpression.end, + exportMode === 'module' && type === 'module' ? `${moduleName}.exports` : exportsName + ); + } + return isRestorableCompiledEsm; +} + +function isRequireExpression(node, scope) { + if (!node) return false; + if (node.type !== 'CallExpression') return false; + + // Weird case of `require()` or `module.require()` without arguments + if (node.arguments.length === 0) return false; + + return isRequire(node.callee, scope); +} + +function isRequire(node, scope) { + return ( + (node.type === 'Identifier' && node.name === 'require' && !scope.contains('require')) || + (node.type === 'MemberExpression' && isModuleRequire(node, scope)) + ); +} + +function isModuleRequire({ object, property }, scope) { + return ( + object.type === 'Identifier' && + object.name === 'module' && + property.type === 'Identifier' && + property.name === 'require' && + !scope.contains('module') + ); +} + +function hasDynamicArguments(node) { + return ( + node.arguments.length > 1 || + (node.arguments[0].type !== 'Literal' && + (node.arguments[0].type !== 'TemplateLiteral' || node.arguments[0].expressions.length > 0)) + ); +} + +const reservedMethod = { resolve: true, cache: true, main: true }; + +function isNodeRequirePropertyAccess(parent) { + return parent && parent.property && reservedMethod[parent.property.name]; +} + +function getRequireStringArg(node) { + return node.arguments[0].type === 'Literal' + ? node.arguments[0].value + : node.arguments[0].quasis[0].value.cooked; +} + +function getRequireHandlers() { + const requireExpressions = []; + + function addRequireExpression( + sourceId, + node, + scope, + usesReturnValue, + isInsideTryBlock, + isInsideConditional, + toBeRemoved + ) { + requireExpressions.push({ + sourceId, + node, + scope, + usesReturnValue, + isInsideTryBlock, + isInsideConditional, + toBeRemoved + }); + } + + async function rewriteRequireExpressionsAndGetImportBlock( + magicString, + topLevelDeclarations, + reassignedNames, + helpersName, + dynamicRequireName, + moduleName, + exportsName, + id, + exportMode, + resolveRequireSourcesAndUpdateMeta, + needsRequireWrapper, + isEsModule, + isDynamicRequireModulesEnabled, + getIgnoreTryCatchRequireStatementMode, + commonjsMeta + ) { + const imports = []; + imports.push(`import * as ${helpersName} from "${HELPERS_ID}"`); + if (dynamicRequireName) { + imports.push( + `import { ${ + isDynamicRequireModulesEnabled ? CREATE_COMMONJS_REQUIRE_EXPORT : COMMONJS_REQUIRE_EXPORT + } as ${dynamicRequireName} } from "${DYNAMIC_MODULES_ID}"` + ); + } + if (exportMode === 'module') { + imports.push( + `import { __module as ${moduleName} } from ${JSON.stringify(wrapId(id, MODULE_SUFFIX))}`, + `var ${exportsName} = ${moduleName}.exports` + ); + } else if (exportMode === 'exports') { + imports.push( + `import { __exports as ${exportsName} } from ${JSON.stringify(wrapId(id, EXPORTS_SUFFIX))}` + ); + } + const requiresBySource = collectSources(requireExpressions); + const requireTargets = await resolveRequireSourcesAndUpdateMeta( + id, + needsRequireWrapper ? IS_WRAPPED_COMMONJS : !isEsModule, + commonjsMeta, + Object.keys(requiresBySource).map((source) => { + return { + source, + isConditional: requiresBySource[source].every((require) => require.isInsideConditional) + }; + }) + ); + processRequireExpressions( + imports, + requireTargets, + requiresBySource, + getIgnoreTryCatchRequireStatementMode, + magicString + ); + return imports.length ? `${imports.join(';\n')};\n\n` : ''; + } + + return { + addRequireExpression, + rewriteRequireExpressionsAndGetImportBlock + }; +} + +function collectSources(requireExpressions) { + const requiresBySource = Object.create(null); + for (const requireExpression of requireExpressions) { + const { sourceId } = requireExpression; + if (!requiresBySource[sourceId]) { + requiresBySource[sourceId] = []; + } + const requires = requiresBySource[sourceId]; + requires.push(requireExpression); + } + return requiresBySource; +} + +function processRequireExpressions( + imports, + requireTargets, + requiresBySource, + getIgnoreTryCatchRequireStatementMode, + magicString +) { + const generateRequireName = getGenerateRequireName(); + for (const { source, id: resolvedId, isCommonJS, wrappedModuleSideEffects } of requireTargets) { + const requires = requiresBySource[source]; + const name = generateRequireName(requires); + let usesRequired = false; + let needsImport = false; + for (const { node, usesReturnValue, toBeRemoved, isInsideTryBlock } of requires) { + const { canConvertRequire, shouldRemoveRequire } = + isInsideTryBlock && isWrappedId(resolvedId, EXTERNAL_SUFFIX) + ? getIgnoreTryCatchRequireStatementMode(source) + : { canConvertRequire: true, shouldRemoveRequire: false }; + if (shouldRemoveRequire) { + if (usesReturnValue) { + magicString.overwrite(node.start, node.end, 'undefined'); + } else { + magicString.remove(toBeRemoved.start, toBeRemoved.end); + } + } else if (canConvertRequire) { + needsImport = true; + if (isCommonJS === IS_WRAPPED_COMMONJS) { + magicString.overwrite( + node.start, + node.end, + `${wrappedModuleSideEffects ? '' : '/*@__PURE__*/ '}${name}()` + ); + } else if (usesReturnValue) { + usesRequired = true; + magicString.overwrite(node.start, node.end, name); + } else { + magicString.remove(toBeRemoved.start, toBeRemoved.end); + } + } + } + if (needsImport) { + if (isCommonJS === IS_WRAPPED_COMMONJS) { + imports.push(`import { __require as ${name} } from ${JSON.stringify(resolvedId)}`); + } else { + imports.push(`import ${usesRequired ? `${name} from ` : ''}${JSON.stringify(resolvedId)}`); + } + } + } +} + +function getGenerateRequireName() { + let uid = 0; + return (requires) => { + let name; + const hasNameConflict = ({ scope }) => scope.contains(name); + do { + name = `require$$${uid}`; + uid += 1; + } while (requires.some(hasNameConflict)); + return name; + }; +} + +/* eslint-disable no-param-reassign, no-shadow, no-underscore-dangle, no-continue */ + + +const exportsPattern = /^(?:module\.)?exports(?:\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/; + +const functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/; + +// There are three different types of CommonJS modules, described by their +// "exportMode": +// - exports: Only assignments to (module.)exports properties +// - replace: A single assignment to module.exports itself +// - module: Anything else +// Special cases: +// - usesRequireWrapper +// - isWrapped +async function transformCommonjs( + parse, + code, + id, + isEsModule, + ignoreGlobal, + ignoreRequire, + ignoreDynamicRequires, + getIgnoreTryCatchRequireStatementMode, + sourceMap, + isDynamicRequireModulesEnabled, + dynamicRequireModules, + commonDir, + astCache, + defaultIsModuleExports, + needsRequireWrapper, + resolveRequireSourcesAndUpdateMeta, + isRequired, + checkDynamicRequire, + commonjsMeta +) { + const ast = astCache || tryParse(parse, code, id); + const magicString = new MagicString(code); + const uses = { + module: false, + exports: false, + global: false, + require: false + }; + const virtualDynamicRequirePath = + isDynamicRequireModulesEnabled && getVirtualPathForDynamicRequirePath(dirname$1(id), commonDir); + let scope = attachScopes(ast, 'scope'); + let lexicalDepth = 0; + let programDepth = 0; + let classBodyDepth = 0; + let currentTryBlockEnd = null; + let shouldWrap = false; + + const globals = new Set(); + // A conditionalNode is a node for which execution is not guaranteed. If such a node is a require + // or contains nested requires, those should be handled as function calls unless there is an + // unconditional require elsewhere. + let currentConditionalNodeEnd = null; + const conditionalNodes = new Set(); + const { addRequireExpression, rewriteRequireExpressionsAndGetImportBlock } = getRequireHandlers(); + + // See which names are assigned to. This is necessary to prevent + // illegally replacing `var foo = require('foo')` with `import foo from 'foo'`, + // where `foo` is later reassigned. (This happens in the wild. CommonJS, sigh) + const reassignedNames = new Set(); + const topLevelDeclarations = []; + const skippedNodes = new Set(); + const moduleAccessScopes = new Set([scope]); + const exportsAccessScopes = new Set([scope]); + const moduleExportsAssignments = []; + let firstTopLevelModuleExportsAssignment = null; + const exportsAssignmentsByName = new Map(); + const topLevelAssignments = new Set(); + const topLevelDefineCompiledEsmExpressions = []; + const replacedGlobal = []; + const replacedThis = []; + const replacedDynamicRequires = []; + const importedVariables = new Set(); + const indentExclusionRanges = []; + + walk$2(ast, { + enter(node, parent) { + if (skippedNodes.has(node)) { + this.skip(); + return; + } + + if (currentTryBlockEnd !== null && node.start > currentTryBlockEnd) { + currentTryBlockEnd = null; + } + if (currentConditionalNodeEnd !== null && node.start > currentConditionalNodeEnd) { + currentConditionalNodeEnd = null; + } + if (currentConditionalNodeEnd === null && conditionalNodes.has(node)) { + currentConditionalNodeEnd = node.end; + } + + programDepth += 1; + if (node.scope) ({ scope } = node); + if (functionType.test(node.type)) lexicalDepth += 1; + if (sourceMap) { + magicString.addSourcemapLocation(node.start); + magicString.addSourcemapLocation(node.end); + } + + // eslint-disable-next-line default-case + switch (node.type) { + case 'AssignmentExpression': + if (node.left.type === 'MemberExpression') { + const flattened = getKeypath(node.left); + if (!flattened || scope.contains(flattened.name)) return; + + const exportsPatternMatch = exportsPattern.exec(flattened.keypath); + if (!exportsPatternMatch || flattened.keypath === 'exports') return; + + const [, exportName] = exportsPatternMatch; + uses[flattened.name] = true; + + // we're dealing with `module.exports = ...` or `[module.]exports.foo = ...` – + if (flattened.keypath === 'module.exports') { + moduleExportsAssignments.push(node); + if (programDepth > 3) { + moduleAccessScopes.add(scope); + } else if (!firstTopLevelModuleExportsAssignment) { + firstTopLevelModuleExportsAssignment = node; + } + } else if (exportName === KEY_COMPILED_ESM) { + if (programDepth > 3) { + shouldWrap = true; + } else { + // The "type" is either "module" or "exports" to discern + // assignments to module.exports vs exports if needed + topLevelDefineCompiledEsmExpressions.push({ node, type: flattened.name }); + } + } else { + const exportsAssignments = exportsAssignmentsByName.get(exportName) || { + nodes: [], + scopes: new Set() + }; + exportsAssignments.nodes.push({ node, type: flattened.name }); + exportsAssignments.scopes.add(scope); + exportsAccessScopes.add(scope); + exportsAssignmentsByName.set(exportName, exportsAssignments); + if (programDepth <= 3) { + topLevelAssignments.add(node); + } + } + + skippedNodes.add(node.left); + } else { + for (const name of extractAssignedNames(node.left)) { + reassignedNames.add(name); + } + } + return; + case 'CallExpression': { + const defineCompiledEsmType = getDefineCompiledEsmType(node); + if (defineCompiledEsmType) { + if (programDepth === 3 && parent.type === 'ExpressionStatement') { + // skip special handling for [module.]exports until we know we render this + skippedNodes.add(node.arguments[0]); + topLevelDefineCompiledEsmExpressions.push({ node, type: defineCompiledEsmType }); + } else { + shouldWrap = true; + } + return; + } + + // Transform require.resolve + if ( + isDynamicRequireModulesEnabled && + node.callee.object && + isRequire(node.callee.object, scope) && + node.callee.property.name === 'resolve' + ) { + checkDynamicRequire(node.start); + uses.require = true; + const requireNode = node.callee.object; + replacedDynamicRequires.push(requireNode); + skippedNodes.add(node.callee); + return; + } + + if (!isRequireExpression(node, scope)) { + const keypath = getKeypath(node.callee); + if (keypath && importedVariables.has(keypath.name)) { + // Heuristic to deoptimize requires after a required function has been called + currentConditionalNodeEnd = Infinity; + } + return; + } + + skippedNodes.add(node.callee); + uses.require = true; + + if (hasDynamicArguments(node)) { + if (isDynamicRequireModulesEnabled) { + checkDynamicRequire(node.start); + } + if (!ignoreDynamicRequires) { + replacedDynamicRequires.push(node.callee); + } + return; + } + + const requireStringArg = getRequireStringArg(node); + if (!ignoreRequire(requireStringArg)) { + const usesReturnValue = parent.type !== 'ExpressionStatement'; + const toBeRemoved = + parent.type === 'ExpressionStatement' && + (!currentConditionalNodeEnd || + // We should completely remove requires directly in a try-catch + // so that Rollup can remove up the try-catch + (currentTryBlockEnd !== null && currentTryBlockEnd < currentConditionalNodeEnd)) + ? parent + : node; + addRequireExpression( + requireStringArg, + node, + scope, + usesReturnValue, + currentTryBlockEnd !== null, + currentConditionalNodeEnd !== null, + toBeRemoved + ); + if (parent.type === 'VariableDeclarator' && parent.id.type === 'Identifier') { + for (const name of extractAssignedNames(parent.id)) { + importedVariables.add(name); + } + } + } + return; + } + case 'ClassBody': + classBodyDepth += 1; + return; + case 'ConditionalExpression': + case 'IfStatement': + // skip dead branches + if (isFalsy(node.test)) { + skippedNodes.add(node.consequent); + } else if (isTruthy(node.test)) { + if (node.alternate) { + skippedNodes.add(node.alternate); + } + } else { + conditionalNodes.add(node.consequent); + if (node.alternate) { + conditionalNodes.add(node.alternate); + } + } + return; + case 'ArrowFunctionExpression': + case 'FunctionDeclaration': + case 'FunctionExpression': + // requires in functions should be conditional unless it is an IIFE + if ( + currentConditionalNodeEnd === null && + !(parent.type === 'CallExpression' && parent.callee === node) + ) { + currentConditionalNodeEnd = node.end; + } + return; + case 'Identifier': { + const { name } = node; + if ( + !isReference(node, parent) || + scope.contains(name) || + (parent.type === 'PropertyDefinition' && parent.key === node) + ) + return; + switch (name) { + case 'require': + uses.require = true; + if (isNodeRequirePropertyAccess(parent)) { + return; + } + if (!ignoreDynamicRequires) { + if (isShorthandProperty(parent)) { + // as key and value are the same object, isReference regards + // both as references, so we need to skip now + skippedNodes.add(parent.value); + magicString.prependRight(node.start, 'require: '); + } + replacedDynamicRequires.push(node); + } + return; + case 'module': + case 'exports': + shouldWrap = true; + uses[name] = true; + return; + case 'global': + uses.global = true; + if (!ignoreGlobal) { + replacedGlobal.push(node); + } + return; + case 'define': + magicString.overwrite(node.start, node.end, 'undefined', { + storeName: true + }); + return; + default: + globals.add(name); + return; + } + } + case 'LogicalExpression': + // skip dead branches + if (node.operator === '&&') { + if (isFalsy(node.left)) { + skippedNodes.add(node.right); + } else if (!isTruthy(node.left)) { + conditionalNodes.add(node.right); + } + } else if (node.operator === '||') { + if (isTruthy(node.left)) { + skippedNodes.add(node.right); + } else if (!isFalsy(node.left)) { + conditionalNodes.add(node.right); + } + } + return; + case 'MemberExpression': + if (!isDynamicRequireModulesEnabled && isModuleRequire(node, scope)) { + uses.require = true; + replacedDynamicRequires.push(node); + skippedNodes.add(node.object); + skippedNodes.add(node.property); + } + return; + case 'ReturnStatement': + // if top-level return, we need to wrap it + if (lexicalDepth === 0) { + shouldWrap = true; + } + return; + case 'ThisExpression': + // rewrite top-level `this` as `commonjsHelpers.commonjsGlobal` + if (lexicalDepth === 0 && !classBodyDepth) { + uses.global = true; + if (!ignoreGlobal) { + replacedThis.push(node); + } + } + return; + case 'TryStatement': + if (currentTryBlockEnd === null) { + currentTryBlockEnd = node.block.end; + } + if (currentConditionalNodeEnd === null) { + currentConditionalNodeEnd = node.end; + } + return; + case 'UnaryExpression': + // rewrite `typeof module`, `typeof module.exports` and `typeof exports` (https://github.com/rollup/rollup-plugin-commonjs/issues/151) + if (node.operator === 'typeof') { + const flattened = getKeypath(node.argument); + if (!flattened) return; + + if (scope.contains(flattened.name)) return; + + if ( + !isEsModule && + (flattened.keypath === 'module.exports' || + flattened.keypath === 'module' || + flattened.keypath === 'exports') + ) { + magicString.overwrite(node.start, node.end, `'object'`, { + storeName: false + }); + } + } + return; + case 'VariableDeclaration': + if (!scope.parent) { + topLevelDeclarations.push(node); + } + return; + case 'TemplateElement': + if (node.value.raw.includes('\n')) { + indentExclusionRanges.push([node.start, node.end]); + } + } + }, + + leave(node) { + programDepth -= 1; + if (node.scope) scope = scope.parent; + if (functionType.test(node.type)) lexicalDepth -= 1; + if (node.type === 'ClassBody') classBodyDepth -= 1; + } + }); + + const nameBase = getName(id); + const exportsName = deconflict([...exportsAccessScopes], globals, nameBase); + const moduleName = deconflict([...moduleAccessScopes], globals, `${nameBase}Module`); + const requireName = deconflict([scope], globals, `require${capitalize(nameBase)}`); + const isRequiredName = deconflict([scope], globals, `hasRequired${capitalize(nameBase)}`); + const helpersName = deconflict([scope], globals, 'commonjsHelpers'); + const dynamicRequireName = + replacedDynamicRequires.length > 0 && + deconflict( + [scope], + globals, + isDynamicRequireModulesEnabled ? CREATE_COMMONJS_REQUIRE_EXPORT : COMMONJS_REQUIRE_EXPORT + ); + const deconflictedExportNames = Object.create(null); + for (const [exportName, { scopes }] of exportsAssignmentsByName) { + deconflictedExportNames[exportName] = deconflict([...scopes], globals, exportName); + } + + for (const node of replacedGlobal) { + magicString.overwrite(node.start, node.end, `${helpersName}.commonjsGlobal`, { + storeName: true + }); + } + for (const node of replacedThis) { + magicString.overwrite(node.start, node.end, exportsName, { + storeName: true + }); + } + for (const node of replacedDynamicRequires) { + magicString.overwrite( + node.start, + node.end, + isDynamicRequireModulesEnabled + ? `${dynamicRequireName}(${JSON.stringify(virtualDynamicRequirePath)})` + : dynamicRequireName, + { + contentOnly: true, + storeName: true + } + ); + } + + // We cannot wrap ES/mixed modules + shouldWrap = !isEsModule && (shouldWrap || (uses.exports && moduleExportsAssignments.length > 0)); + + if ( + !( + shouldWrap || + isRequired || + needsRequireWrapper || + uses.module || + uses.exports || + uses.require || + topLevelDefineCompiledEsmExpressions.length > 0 + ) && + (ignoreGlobal || !uses.global) + ) { + return { meta: { commonjs: { isCommonJS: false } } }; + } + + let leadingComment = ''; + if (code.startsWith('/*')) { + const commentEnd = code.indexOf('*/', 2) + 2; + leadingComment = `${code.slice(0, commentEnd)}\n`; + magicString.remove(0, commentEnd).trim(); + } + + let shebang = ''; + if (code.startsWith('#!')) { + const shebangEndPosition = code.indexOf('\n') + 1; + shebang = code.slice(0, shebangEndPosition); + magicString.remove(0, shebangEndPosition).trim(); + } + + const exportMode = isEsModule + ? 'none' + : shouldWrap + ? uses.module + ? 'module' + : 'exports' + : firstTopLevelModuleExportsAssignment + ? exportsAssignmentsByName.size === 0 && topLevelDefineCompiledEsmExpressions.length === 0 + ? 'replace' + : 'module' + : moduleExportsAssignments.length === 0 + ? 'exports' + : 'module'; + + const exportedExportsName = + exportMode === 'module' ? deconflict([], globals, `${nameBase}Exports`) : exportsName; + + const importBlock = await rewriteRequireExpressionsAndGetImportBlock( + magicString, + topLevelDeclarations, + reassignedNames, + helpersName, + dynamicRequireName, + moduleName, + exportsName, + id, + exportMode, + resolveRequireSourcesAndUpdateMeta, + needsRequireWrapper, + isEsModule, + isDynamicRequireModulesEnabled, + getIgnoreTryCatchRequireStatementMode, + commonjsMeta + ); + const usesRequireWrapper = commonjsMeta.isCommonJS === IS_WRAPPED_COMMONJS; + const exportBlock = isEsModule + ? '' + : rewriteExportsAndGetExportsBlock( + magicString, + moduleName, + exportsName, + exportedExportsName, + shouldWrap, + moduleExportsAssignments, + firstTopLevelModuleExportsAssignment, + exportsAssignmentsByName, + topLevelAssignments, + topLevelDefineCompiledEsmExpressions, + deconflictedExportNames, + code, + helpersName, + exportMode, + defaultIsModuleExports, + usesRequireWrapper, + requireName + ); + + if (shouldWrap) { + wrapCode(magicString, uses, moduleName, exportsName, indentExclusionRanges); + } + + if (usesRequireWrapper) { + magicString.trim().indent('\t', { + exclude: indentExclusionRanges + }); + const exported = exportMode === 'module' ? `${moduleName}.exports` : exportsName; + magicString.prepend( + `var ${isRequiredName}; + +function ${requireName} () { +\tif (${isRequiredName}) return ${exported}; +\t${isRequiredName} = 1; +` + ).append(` +\treturn ${exported}; +}`); + if (exportMode === 'replace') { + magicString.prepend(`var ${exportsName};\n`); + } + } + + magicString + .trim() + .prepend(shebang + leadingComment + importBlock) + .append(exportBlock); + + return { + code: magicString.toString(), + map: sourceMap ? magicString.generateMap() : null, + syntheticNamedExports: isEsModule || usesRequireWrapper ? false : '__moduleExports', + meta: { commonjs: { ...commonjsMeta, shebang } } + }; +} + +const PLUGIN_NAME = 'commonjs'; + +function commonjs(options = {}) { + const { + ignoreGlobal, + ignoreDynamicRequires, + requireReturnsDefault: requireReturnsDefaultOption, + defaultIsModuleExports: defaultIsModuleExportsOption, + esmExternals + } = options; + const extensions = options.extensions || ['.js']; + const filter = createFilter$2(options.include, options.exclude); + const isPossibleCjsId = (id) => { + const extName = extname(id); + return extName === '.cjs' || (extensions.includes(extName) && filter(id)); + }; + + const { strictRequiresFilter, detectCyclesAndConditional } = getStrictRequiresFilter(options); + + const getRequireReturnsDefault = + typeof requireReturnsDefaultOption === 'function' + ? requireReturnsDefaultOption + : () => requireReturnsDefaultOption; + + let esmExternalIds; + const isEsmExternal = + typeof esmExternals === 'function' + ? esmExternals + : Array.isArray(esmExternals) + ? ((esmExternalIds = new Set(esmExternals)), (id) => esmExternalIds.has(id)) + : () => esmExternals; + + const getDefaultIsModuleExports = + typeof defaultIsModuleExportsOption === 'function' + ? defaultIsModuleExportsOption + : () => + typeof defaultIsModuleExportsOption === 'boolean' ? defaultIsModuleExportsOption : 'auto'; + + const dynamicRequireRoot = + typeof options.dynamicRequireRoot === 'string' + ? resolve$3(options.dynamicRequireRoot) + : process.cwd(); + const { commonDir, dynamicRequireModules } = getDynamicRequireModules( + options.dynamicRequireTargets, + dynamicRequireRoot + ); + const isDynamicRequireModulesEnabled = dynamicRequireModules.size > 0; + + const ignoreRequire = + typeof options.ignore === 'function' + ? options.ignore + : Array.isArray(options.ignore) + ? (id) => options.ignore.includes(id) + : () => false; + + const getIgnoreTryCatchRequireStatementMode = (id) => { + const mode = + typeof options.ignoreTryCatch === 'function' + ? options.ignoreTryCatch(id) + : Array.isArray(options.ignoreTryCatch) + ? options.ignoreTryCatch.includes(id) + : typeof options.ignoreTryCatch !== 'undefined' + ? options.ignoreTryCatch + : true; + + return { + canConvertRequire: mode !== 'remove' && mode !== true, + shouldRemoveRequire: mode === 'remove' + }; + }; + + const { currentlyResolving, resolveId } = getResolveId(extensions, isPossibleCjsId); + + const sourceMap = options.sourceMap !== false; + + // Initialized in buildStart + let requireResolver; + + function transformAndCheckExports(code, id) { + const normalizedId = normalizePathSlashes(id); + const { isEsModule, hasDefaultExport, hasNamedExports, ast } = analyzeTopLevelStatements( + this.parse, + code, + id + ); + + const commonjsMeta = this.getModuleInfo(id).meta.commonjs || {}; + if (hasDefaultExport) { + commonjsMeta.hasDefaultExport = true; + } + if (hasNamedExports) { + commonjsMeta.hasNamedExports = true; + } + + if ( + !dynamicRequireModules.has(normalizedId) && + (!(hasCjsKeywords(code, ignoreGlobal) || requireResolver.isRequiredId(id)) || + (isEsModule && !options.transformMixedEsModules)) + ) { + commonjsMeta.isCommonJS = false; + return { meta: { commonjs: commonjsMeta } }; + } + + const needsRequireWrapper = + !isEsModule && (dynamicRequireModules.has(normalizedId) || strictRequiresFilter(id)); + + const checkDynamicRequire = (position) => { + const normalizedDynamicRequireRoot = normalizePathSlashes(dynamicRequireRoot); + + if (normalizedId.indexOf(normalizedDynamicRequireRoot) !== 0) { + this.error( + { + code: 'DYNAMIC_REQUIRE_OUTSIDE_ROOT', + normalizedId, + normalizedDynamicRequireRoot, + message: `"${normalizedId}" contains dynamic require statements but it is not within the current dynamicRequireRoot "${normalizedDynamicRequireRoot}". You should set dynamicRequireRoot to "${dirname$1( + normalizedId + )}" or one of its parent directories.` + }, + position + ); + } + }; + + return transformCommonjs( + this.parse, + code, + id, + isEsModule, + ignoreGlobal || isEsModule, + ignoreRequire, + ignoreDynamicRequires && !isDynamicRequireModulesEnabled, + getIgnoreTryCatchRequireStatementMode, + sourceMap, + isDynamicRequireModulesEnabled, + dynamicRequireModules, + commonDir, + ast, + getDefaultIsModuleExports(id), + needsRequireWrapper, + requireResolver.resolveRequireSourcesAndUpdateMeta(this), + requireResolver.isRequiredId(id), + checkDynamicRequire, + commonjsMeta + ); + } + + return { + name: PLUGIN_NAME, + + version: version$2, + + options(rawOptions) { + // We inject the resolver in the beginning so that "catch-all-resolver" like node-resolver + // do not prevent our plugin from resolving entry points ot proxies. + const plugins = Array.isArray(rawOptions.plugins) + ? [...rawOptions.plugins] + : rawOptions.plugins + ? [rawOptions.plugins] + : []; + plugins.unshift({ + name: 'commonjs--resolver', + resolveId + }); + return { ...rawOptions, plugins }; + }, + + buildStart({ plugins }) { + validateVersion(this.meta.rollupVersion, peerDependencies.rollup, 'rollup'); + const nodeResolve = plugins.find(({ name }) => name === 'node-resolve'); + if (nodeResolve) { + validateVersion(nodeResolve.version, '^13.0.6', '@rollup/plugin-node-resolve'); + } + if (options.namedExports != null) { + this.warn( + 'The namedExports option from "@rollup/plugin-commonjs" is deprecated. Named exports are now handled automatically.' + ); + } + requireResolver = getRequireResolver( + extensions, + detectCyclesAndConditional, + currentlyResolving + ); + }, + + buildEnd() { + if (options.strictRequires === 'debug') { + const wrappedIds = requireResolver.getWrappedIds(); + if (wrappedIds.length) { + this.warn({ + code: 'WRAPPED_IDS', + ids: wrappedIds, + message: `The commonjs plugin automatically wrapped the following files:\n[\n${wrappedIds + .map((id) => `\t${JSON.stringify(relative$1(process.cwd(), id))}`) + .join(',\n')}\n]` + }); + } else { + this.warn({ + code: 'WRAPPED_IDS', + ids: wrappedIds, + message: 'The commonjs plugin did not wrap any files.' + }); + } + } + }, + + async load(id) { + if (id === HELPERS_ID) { + return getHelpersModule(); + } + + if (isWrappedId(id, MODULE_SUFFIX)) { + const name = getName(unwrapId(id, MODULE_SUFFIX)); + return { + code: `var ${name} = {exports: {}}; export {${name} as __module}`, + meta: { commonjs: { isCommonJS: false } } + }; + } + + if (isWrappedId(id, EXPORTS_SUFFIX)) { + const name = getName(unwrapId(id, EXPORTS_SUFFIX)); + return { + code: `var ${name} = {}; export {${name} as __exports}`, + meta: { commonjs: { isCommonJS: false } } + }; + } + + if (isWrappedId(id, EXTERNAL_SUFFIX)) { + const actualId = unwrapId(id, EXTERNAL_SUFFIX); + return getUnknownRequireProxy( + actualId, + isEsmExternal(actualId) ? getRequireReturnsDefault(actualId) : true + ); + } + + // entry suffix is just appended to not mess up relative external resolution + if (id.endsWith(ENTRY_SUFFIX)) { + const acutalId = id.slice(0, -ENTRY_SUFFIX.length); + const { + meta: { commonjs: commonjsMeta } + } = this.getModuleInfo(acutalId); + const shebang = commonjsMeta?.shebang ?? ''; + return getEntryProxy( + acutalId, + getDefaultIsModuleExports(acutalId), + this.getModuleInfo, + shebang + ); + } + + if (isWrappedId(id, ES_IMPORT_SUFFIX)) { + const actualId = unwrapId(id, ES_IMPORT_SUFFIX); + return getEsImportProxy( + actualId, + getDefaultIsModuleExports(actualId), + (await this.load({ id: actualId })).moduleSideEffects + ); + } + + if (id === DYNAMIC_MODULES_ID) { + return getDynamicModuleRegistry( + isDynamicRequireModulesEnabled, + dynamicRequireModules, + commonDir, + ignoreDynamicRequires + ); + } + + if (isWrappedId(id, PROXY_SUFFIX)) { + const actualId = unwrapId(id, PROXY_SUFFIX); + return getStaticRequireProxy(actualId, getRequireReturnsDefault(actualId), this.load); + } + + return null; + }, + + shouldTransformCachedModule(...args) { + return requireResolver.shouldTransformCachedModule.call(this, ...args); + }, + + transform(code, id) { + if (!isPossibleCjsId(id)) return null; + + try { + return transformAndCheckExports.call(this, code, id); + } catch (err) { + return this.error(err, err.pos); + } + } + }; +} + +function perEnvironmentState(initial) { + const stateMap = /* @__PURE__ */ new WeakMap(); + return function(context) { + const { environment } = context; + let state = stateMap.get(environment); + if (!state) { + state = initial(environment); + stateMap.set(environment, state); + } + return state; + }; +} + +// Matches the scheme of a URL, eg "http://" +const schemeRegex = /^[\w+.-]+:\/\//; +/** + * Matches the parts of a URL: + * 1. Scheme, including ":", guaranteed. + * 2. User/password, including "@", optional. + * 3. Host, guaranteed. + * 4. Port, including ":", optional. + * 5. Path, including "/", optional. + * 6. Query, including "?", optional. + * 7. Hash, including "#", optional. + */ +const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; +/** + * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start + * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive). + * + * 1. Host, optional. + * 2. Path, which may include "/", guaranteed. + * 3. Query, including "?", optional. + * 4. Hash, including "#", optional. + */ +const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; +function isAbsoluteUrl(input) { + return schemeRegex.test(input); +} +function isSchemeRelativeUrl(input) { + return input.startsWith('//'); +} +function isAbsolutePath(input) { + return input.startsWith('/'); +} +function isFileUrl(input) { + return input.startsWith('file:'); +} +function isRelative(input) { + return /^[.?#]/.test(input); +} +function parseAbsoluteUrl(input) { + const match = urlRegex.exec(input); + return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); +} +function parseFileUrl(input) { + const match = fileRegex.exec(input); + const path = match[2]; + return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); +} +function makeUrl(scheme, user, host, port, path, query, hash) { + return { + scheme, + user, + host, + port, + path, + query, + hash, + type: 7 /* Absolute */, + }; +} +function parseUrl$3(input) { + if (isSchemeRelativeUrl(input)) { + const url = parseAbsoluteUrl('http:' + input); + url.scheme = ''; + url.type = 6 /* SchemeRelative */; + return url; + } + if (isAbsolutePath(input)) { + const url = parseAbsoluteUrl('http://foo.com' + input); + url.scheme = ''; + url.host = ''; + url.type = 5 /* AbsolutePath */; + return url; + } + if (isFileUrl(input)) + return parseFileUrl(input); + if (isAbsoluteUrl(input)) + return parseAbsoluteUrl(input); + const url = parseAbsoluteUrl('http://foo.com/' + input); + url.scheme = ''; + url.host = ''; + url.type = input + ? input.startsWith('?') + ? 3 /* Query */ + : input.startsWith('#') + ? 2 /* Hash */ + : 4 /* RelativePath */ + : 1 /* Empty */; + return url; +} +function stripPathFilename(path) { + // If a path ends with a parent directory "..", then it's a relative path with excess parent + // paths. It's not a file, so we can't strip it. + if (path.endsWith('/..')) + return path; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); +} +function mergePaths(url, base) { + normalizePath$4(base, base.type); + // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative + // path). + if (url.path === '/') { + url.path = base.path; + } + else { + // Resolution happens relative to the base path's directory, not the file. + url.path = stripPathFilename(base.path) + url.path; + } +} +/** + * The path can have empty directories "//", unneeded parents "foo/..", or current directory + * "foo/.". We need to normalize to a standard representation. + */ +function normalizePath$4(url, type) { + const rel = type <= 4 /* RelativePath */; + const pieces = url.path.split('/'); + // We need to preserve the first piece always, so that we output a leading slash. The item at + // pieces[0] is an empty string. + let pointer = 1; + // Positive is the number of real directories we've output, used for popping a parent directory. + // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". + let positive = 0; + // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will + // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a + // real directory, we won't need to append, unless the other conditions happen again. + let addTrailingSlash = false; + for (let i = 1; i < pieces.length; i++) { + const piece = pieces[i]; + // An empty directory, could be a trailing slash, or just a double "//" in the path. + if (!piece) { + addTrailingSlash = true; + continue; + } + // If we encounter a real directory, then we don't need to append anymore. + addTrailingSlash = false; + // A current directory, which we can always drop. + if (piece === '.') + continue; + // A parent directory, we need to see if there are any real directories we can pop. Else, we + // have an excess of parents, and we'll need to keep the "..". + if (piece === '..') { + if (positive) { + addTrailingSlash = true; + positive--; + pointer--; + } + else if (rel) { + // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute + // URL, protocol relative URL, or an absolute path, we don't need to keep excess. + pieces[pointer++] = piece; + } + continue; + } + // We've encountered a real directory. Move it to the next insertion pointer, which accounts for + // any popped or dropped directories. + pieces[pointer++] = piece; + positive++; + } + let path = ''; + for (let i = 1; i < pointer; i++) { + path += '/' + pieces[i]; + } + if (!path || (addTrailingSlash && !path.endsWith('/..'))) { + path += '/'; + } + url.path = path; +} +/** + * Attempts to resolve `input` URL/path relative to `base`. + */ +function resolve$2(input, base) { + if (!input && !base) + return ''; + const url = parseUrl$3(input); + let inputType = url.type; + if (base && inputType !== 7 /* Absolute */) { + const baseUrl = parseUrl$3(base); + const baseType = baseUrl.type; + switch (inputType) { + case 1 /* Empty */: + url.hash = baseUrl.hash; + // fall through + case 2 /* Hash */: + url.query = baseUrl.query; + // fall through + case 3 /* Query */: + case 4 /* RelativePath */: + mergePaths(url, baseUrl); + // fall through + case 5 /* AbsolutePath */: + // The host, user, and port are joined, you can't copy one without the others. + url.user = baseUrl.user; + url.host = baseUrl.host; + url.port = baseUrl.port; + // fall through + case 6 /* SchemeRelative */: + // The input doesn't have a schema at least, so we need to copy at least that over. + url.scheme = baseUrl.scheme; + } + if (baseType > inputType) + inputType = baseType; + } + normalizePath$4(url, inputType); + const queryHash = url.query + url.hash; + switch (inputType) { + // This is impossible, because of the empty checks at the start of the function. + // case UrlType.Empty: + case 2 /* Hash */: + case 3 /* Query */: + return queryHash; + case 4 /* RelativePath */: { + // The first char is always a "/", and we need it to be relative. + const path = url.path.slice(1); + if (!path) + return queryHash || '.'; + if (isRelative(base || input) && !isRelative(path)) { + // If base started with a leading ".", or there is no base and input started with a ".", + // then we need to ensure that the relative path starts with a ".". We don't know if + // relative starts with a "..", though, so check before prepending. + return './' + path + queryHash; + } + return path + queryHash; + } + case 5 /* AbsolutePath */: + return url.path + queryHash; + default: + return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; + } +} + +function resolve$1(input, base) { + // The base is always treated as a directory, if it's not empty. + // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327 + // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401 + if (base && !base.endsWith('/')) + base += '/'; + return resolve$2(input, base); +} + +/** + * Removes everything after the last "/", but leaves the slash. + */ +function stripFilename(path) { + if (!path) + return ''; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); +} + +const COLUMN$1 = 0; +const SOURCES_INDEX$1 = 1; +const SOURCE_LINE$1 = 2; +const SOURCE_COLUMN$1 = 3; +const NAMES_INDEX$1 = 4; + +function maybeSort(mappings, owned) { + const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); + if (unsortedIndex === mappings.length) + return mappings; + // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If + // not, we do not want to modify the consumer's input array. + if (!owned) + mappings = mappings.slice(); + for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { + mappings[i] = sortSegments(mappings[i], owned); + } + return mappings; +} +function nextUnsortedSegmentLine(mappings, start) { + for (let i = start; i < mappings.length; i++) { + if (!isSorted(mappings[i])) + return i; + } + return mappings.length; +} +function isSorted(line) { + for (let j = 1; j < line.length; j++) { + if (line[j][COLUMN$1] < line[j - 1][COLUMN$1]) { + return false; + } + } + return true; +} +function sortSegments(line, owned) { + if (!owned) + line = line.slice(); + return line.sort(sortComparator); +} +function sortComparator(a, b) { + return a[COLUMN$1] - b[COLUMN$1]; +} + +let found = false; +/** + * A binary search implementation that returns the index if a match is found. + * If no match is found, then the left-index (the index associated with the item that comes just + * before the desired index) is returned. To maintain proper sort order, a splice would happen at + * the next index: + * + * ```js + * const array = [1, 3]; + * const needle = 2; + * const index = binarySearch(array, needle, (item, needle) => item - needle); + * + * assert.equal(index, 0); + * array.splice(index + 1, 0, needle); + * assert.deepEqual(array, [1, 2, 3]); + * ``` + */ +function binarySearch(haystack, needle, low, high) { + while (low <= high) { + const mid = low + ((high - low) >> 1); + const cmp = haystack[mid][COLUMN$1] - needle; + if (cmp === 0) { + found = true; + return mid; + } + if (cmp < 0) { + low = mid + 1; + } + else { + high = mid - 1; + } + } + found = false; + return low - 1; +} +function upperBound(haystack, needle, index) { + for (let i = index + 1; i < haystack.length; index = i++) { + if (haystack[i][COLUMN$1] !== needle) + break; + } + return index; +} +function lowerBound(haystack, needle, index) { + for (let i = index - 1; i >= 0; index = i--) { + if (haystack[i][COLUMN$1] !== needle) + break; + } + return index; +} +function memoizedState() { + return { + lastKey: -1, + lastNeedle: -1, + lastIndex: -1, + }; +} +/** + * This overly complicated beast is just to record the last tested line/column and the resulting + * index, allowing us to skip a few tests if mappings are monotonically increasing. + */ +function memoizedBinarySearch(haystack, needle, state, key) { + const { lastKey, lastNeedle, lastIndex } = state; + let low = 0; + let high = haystack.length - 1; + if (key === lastKey) { + if (needle === lastNeedle) { + found = lastIndex !== -1 && haystack[lastIndex][COLUMN$1] === needle; + return lastIndex; + } + if (needle >= lastNeedle) { + // lastIndex may be -1 if the previous needle was not found. + low = lastIndex === -1 ? 0 : lastIndex; + } + else { + high = lastIndex; + } + } + state.lastKey = key; + state.lastNeedle = needle; + return (state.lastIndex = binarySearch(haystack, needle, low, high)); +} + +const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)'; +const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)'; +const LEAST_UPPER_BOUND = -1; +const GREATEST_LOWER_BOUND = 1; +class TraceMap { + constructor(map, mapUrl) { + const isString = typeof map === 'string'; + if (!isString && map._decodedMemo) + return map; + const parsed = (isString ? JSON.parse(map) : map); + const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; + this.version = version; + this.file = file; + this.names = names || []; + this.sourceRoot = sourceRoot; + this.sources = sources; + this.sourcesContent = sourcesContent; + this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || undefined; + const from = resolve$1(sourceRoot || '', stripFilename(mapUrl)); + this.resolvedSources = sources.map((s) => resolve$1(s || '', from)); + const { mappings } = parsed; + if (typeof mappings === 'string') { + this._encoded = mappings; + this._decoded = undefined; + } + else { + this._encoded = undefined; + this._decoded = maybeSort(mappings, isString); + } + this._decodedMemo = memoizedState(); + this._bySources = undefined; + this._bySourceMemos = undefined; + } +} +/** + * Typescript doesn't allow friend access to private fields, so this just casts the map into a type + * with public access modifiers. + */ +function cast$2(map) { + return map; +} +/** + * Returns the encoded (VLQ string) form of the SourceMap's mappings field. + */ +function encodedMappings(map) { + var _a; + var _b; + return ((_a = (_b = cast$2(map))._encoded) !== null && _a !== void 0 ? _a : (_b._encoded = encode$1(cast$2(map)._decoded))); +} +/** + * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. + */ +function decodedMappings(map) { + var _a; + return ((_a = cast$2(map))._decoded || (_a._decoded = decode(cast$2(map)._encoded))); +} +/** + * A low-level API to find the segment associated with a generated line/column (think, from a + * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. + */ +function traceSegment(map, line, column) { + const decoded = decodedMappings(map); + // It's common for parent source maps to have pointers to lines that have no + // mapping (like a "//# sourceMappingURL=") at the end of the child file. + if (line >= decoded.length) + return null; + const segments = decoded[line]; + const index = traceSegmentInternal(segments, cast$2(map)._decodedMemo, line, column, GREATEST_LOWER_BOUND); + return index === -1 ? null : segments[index]; +} +/** + * A higher-level API to find the source/line/column associated with a generated line/column + * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in + * `source-map` library. + */ +function originalPositionFor$1(map, needle) { + let { line, column, bias } = needle; + line--; + if (line < 0) + throw new Error(LINE_GTR_ZERO); + if (column < 0) + throw new Error(COL_GTR_EQ_ZERO); + const decoded = decodedMappings(map); + // It's common for parent source maps to have pointers to lines that have no + // mapping (like a "//# sourceMappingURL=") at the end of the child file. + if (line >= decoded.length) + return OMapping(null, null, null, null); + const segments = decoded[line]; + const index = traceSegmentInternal(segments, cast$2(map)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND); + if (index === -1) + return OMapping(null, null, null, null); + const segment = segments[index]; + if (segment.length === 1) + return OMapping(null, null, null, null); + const { names, resolvedSources } = map; + return OMapping(resolvedSources[segment[SOURCES_INDEX$1]], segment[SOURCE_LINE$1] + 1, segment[SOURCE_COLUMN$1], segment.length === 5 ? names[segment[NAMES_INDEX$1]] : null); +} +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +function decodedMap(map) { + return clone(map, decodedMappings(map)); +} +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +function encodedMap(map) { + return clone(map, encodedMappings(map)); +} +function clone(map, mappings) { + return { + version: map.version, + file: map.file, + names: map.names, + sourceRoot: map.sourceRoot, + sources: map.sources, + sourcesContent: map.sourcesContent, + mappings, + ignoreList: map.ignoreList || map.x_google_ignoreList, + }; +} +function OMapping(source, line, column, name) { + return { source, line, column, name }; +} +function traceSegmentInternal(segments, memo, line, column, bias) { + let index = memoizedBinarySearch(segments, column, memo, line); + if (found) { + index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); + } + else if (bias === LEAST_UPPER_BOUND) + index++; + if (index === -1 || index === segments.length) + return -1; + return index; +} + +/** + * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the + * index of the `key` in the backing array. + * + * This is designed to allow synchronizing a second array with the contents of the backing array, + * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`, + * and there are never duplicates. + */ +class SetArray { + constructor() { + this._indexes = { __proto__: null }; + this.array = []; + } +} +/** + * Typescript doesn't allow friend access to private fields, so this just casts the set into a type + * with public access modifiers. + */ +function cast$1(set) { + return set; +} +/** + * Gets the index associated with `key` in the backing array, if it is already present. + */ +function get(setarr, key) { + return cast$1(setarr)._indexes[key]; +} +/** + * Puts `key` into the backing array, if it is not already present. Returns + * the index of the `key` in the backing array. + */ +function put(setarr, key) { + // The key may or may not be present. If it is present, it's a number. + const index = get(setarr, key); + if (index !== undefined) + return index; + const { array, _indexes: indexes } = cast$1(setarr); + const length = array.push(key); + return (indexes[key] = length - 1); +} +/** + * Removes the key, if it exists in the set. + */ +function remove(setarr, key) { + const index = get(setarr, key); + if (index === undefined) + return; + const { array, _indexes: indexes } = cast$1(setarr); + for (let i = index + 1; i < array.length; i++) { + const k = array[i]; + array[i - 1] = k; + indexes[k]--; + } + indexes[key] = undefined; + array.pop(); +} + +const COLUMN = 0; +const SOURCES_INDEX = 1; +const SOURCE_LINE = 2; +const SOURCE_COLUMN = 3; +const NAMES_INDEX = 4; + +const NO_NAME = -1; +/** + * Provides the state to generate a sourcemap. + */ +class GenMapping { + constructor({ file, sourceRoot } = {}) { + this._names = new SetArray(); + this._sources = new SetArray(); + this._sourcesContent = []; + this._mappings = []; + this.file = file; + this.sourceRoot = sourceRoot; + this._ignoreList = new SetArray(); + } +} +/** + * Typescript doesn't allow friend access to private fields, so this just casts the map into a type + * with public access modifiers. + */ +function cast(map) { + return map; +} +/** + * Same as `addSegment`, but will only add the segment if it generates useful information in the + * resulting map. This only works correctly if segments are added **in order**, meaning you should + * not add a segment with a lower generated line/column than one that came before. + */ +const maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => { + return addSegmentInternal(true, map, genLine, genColumn, source, sourceLine, sourceColumn, name); +}; +/** + * Adds/removes the content of the source file to the source map. + */ +function setSourceContent(map, source, content) { + const { _sources: sources, _sourcesContent: sourcesContent } = cast(map); + const index = put(sources, source); + sourcesContent[index] = content; +} +function setIgnore(map, source, ignore = true) { + const { _sources: sources, _sourcesContent: sourcesContent, _ignoreList: ignoreList } = cast(map); + const index = put(sources, source); + if (index === sourcesContent.length) + sourcesContent[index] = null; + if (ignore) + put(ignoreList, index); + else + remove(ignoreList, index); +} +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +function toDecodedMap(map) { + const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, _ignoreList: ignoreList, } = cast(map); + removeEmptyFinalLines(mappings); + return { + version: 3, + file: map.file || undefined, + names: names.array, + sourceRoot: map.sourceRoot || undefined, + sources: sources.array, + sourcesContent, + mappings, + ignoreList: ignoreList.array, + }; +} +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +function toEncodedMap(map) { + const decoded = toDecodedMap(map); + return Object.assign(Object.assign({}, decoded), { mappings: encode$1(decoded.mappings) }); +} +// This split declaration is only so that terser can elminiate the static initialization block. +function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { + const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = cast(map); + const line = getLine(mappings, genLine); + const index = getColumnIndex(line, genColumn); + if (!source) { + if (skipSourceless(line, index)) + return; + return insert(line, index, [genColumn]); + } + const sourcesIndex = put(sources, source); + const namesIndex = name ? put(names, name) : NO_NAME; + if (sourcesIndex === sourcesContent.length) + sourcesContent[sourcesIndex] = null; + if (skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) { + return; + } + return insert(line, index, name + ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] + : [genColumn, sourcesIndex, sourceLine, sourceColumn]); +} +function getLine(mappings, index) { + for (let i = mappings.length; i <= index; i++) { + mappings[i] = []; + } + return mappings[index]; +} +function getColumnIndex(line, genColumn) { + let index = line.length; + for (let i = index - 1; i >= 0; index = i--) { + const current = line[i]; + if (genColumn >= current[COLUMN]) + break; + } + return index; +} +function insert(array, index, value) { + for (let i = array.length; i > index; i--) { + array[i] = array[i - 1]; + } + array[index] = value; +} +function removeEmptyFinalLines(mappings) { + const { length } = mappings; + let len = length; + for (let i = len - 1; i >= 0; len = i, i--) { + if (mappings[i].length > 0) + break; + } + if (len < length) + mappings.length = len; +} +function skipSourceless(line, index) { + // The start of a line is already sourceless, so adding a sourceless segment to the beginning + // doesn't generate any useful information. + if (index === 0) + return true; + const prev = line[index - 1]; + // If the previous segment is also sourceless, then adding another sourceless segment doesn't + // genrate any new information. Else, this segment will end the source/named segment and point to + // a sourceless position, which is useful. + return prev.length === 1; +} +function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) { + // A source/named segment at the start of a line gives position at that genColumn + if (index === 0) + return false; + const prev = line[index - 1]; + // If the previous segment is sourceless, then we're transitioning to a source. + if (prev.length === 1) + return false; + // If the previous segment maps to the exact same source position, then this segment doesn't + // provide any new position information. + return (sourcesIndex === prev[SOURCES_INDEX] && + sourceLine === prev[SOURCE_LINE] && + sourceColumn === prev[SOURCE_COLUMN] && + namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME)); +} + +const SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null, false); +const EMPTY_SOURCES = []; +function SegmentObject(source, line, column, name, content, ignore) { + return { source, line, column, name, content, ignore }; +} +function Source(map, sources, source, content, ignore) { + return { + map, + sources, + source, + content, + ignore, + }; +} +/** + * MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes + * (which may themselves be SourceMapTrees). + */ +function MapSource(map, sources) { + return Source(map, sources, '', null, false); +} +/** + * A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive + * segment tracing ends at the `OriginalSource`. + */ +function OriginalSource(source, content, ignore) { + return Source(null, EMPTY_SOURCES, source, content, ignore); +} +/** + * traceMappings is only called on the root level SourceMapTree, and begins the process of + * resolving each mapping in terms of the original source files. + */ +function traceMappings(tree) { + // TODO: Eventually support sourceRoot, which has to be removed because the sources are already + // fully resolved. We'll need to make sources relative to the sourceRoot before adding them. + const gen = new GenMapping({ file: tree.map.file }); + const { sources: rootSources, map } = tree; + const rootNames = map.names; + const rootMappings = decodedMappings(map); + for (let i = 0; i < rootMappings.length; i++) { + const segments = rootMappings[i]; + for (let j = 0; j < segments.length; j++) { + const segment = segments[j]; + const genCol = segment[0]; + let traced = SOURCELESS_MAPPING; + // 1-length segments only move the current generated column, there's no source information + // to gather from it. + if (segment.length !== 1) { + const source = rootSources[segment[1]]; + traced = originalPositionFor(source, segment[2], segment[3], segment.length === 5 ? rootNames[segment[4]] : ''); + // If the trace is invalid, then the trace ran into a sourcemap that doesn't contain a + // respective segment into an original source. + if (traced == null) + continue; + } + const { column, line, name, content, source, ignore } = traced; + maybeAddSegment(gen, i, genCol, source, line, column, name); + if (source && content != null) + setSourceContent(gen, source, content); + if (ignore) + setIgnore(gen, source, true); + } + } + return gen; +} +/** + * originalPositionFor is only called on children SourceMapTrees. It recurses down into its own + * child SourceMapTrees, until we find the original source map. + */ +function originalPositionFor(source, line, column, name) { + if (!source.map) { + return SegmentObject(source.source, line, column, name, source.content, source.ignore); + } + const segment = traceSegment(source.map, line, column); + // If we couldn't find a segment, then this doesn't exist in the sourcemap. + if (segment == null) + return null; + // 1-length segments only move the current generated column, there's no source information + // to gather from it. + if (segment.length === 1) + return SOURCELESS_MAPPING; + return originalPositionFor(source.sources[segment[1]], segment[2], segment[3], segment.length === 5 ? source.map.names[segment[4]] : name); +} + +function asArray(value) { + if (Array.isArray(value)) + return value; + return [value]; +} +/** + * Recursively builds a tree structure out of sourcemap files, with each node + * being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of + * `OriginalSource`s and `SourceMapTree`s. + * + * Every sourcemap is composed of a collection of source files and mappings + * into locations of those source files. When we generate a `SourceMapTree` for + * the sourcemap, we attempt to load each source file's own sourcemap. If it + * does not have an associated sourcemap, it is considered an original, + * unmodified source file. + */ +function buildSourceMapTree(input, loader) { + const maps = asArray(input).map((m) => new TraceMap(m, '')); + const map = maps.pop(); + for (let i = 0; i < maps.length; i++) { + if (maps[i].sources.length > 1) { + throw new Error(`Transformation map ${i} must have exactly one source file.\n` + + 'Did you specify these with the most recent transformation maps first?'); + } + } + let tree = build$2(map, loader, '', 0); + for (let i = maps.length - 1; i >= 0; i--) { + tree = MapSource(maps[i], [tree]); + } + return tree; +} +function build$2(map, loader, importer, importerDepth) { + const { resolvedSources, sourcesContent, ignoreList } = map; + const depth = importerDepth + 1; + const children = resolvedSources.map((sourceFile, i) => { + // The loading context gives the loader more information about why this file is being loaded + // (eg, from which importer). It also allows the loader to override the location of the loaded + // sourcemap/original source, or to override the content in the sourcesContent field if it's + // an unmodified source file. + const ctx = { + importer, + depth, + source: sourceFile || '', + content: undefined, + ignore: undefined, + }; + // Use the provided loader callback to retrieve the file's sourcemap. + // TODO: We should eventually support async loading of sourcemap files. + const sourceMap = loader(ctx.source, ctx); + const { source} = ctx; + // If there is a sourcemap, then we need to recurse into it to load its source files. + if (sourceMap) + return build$2(new TraceMap(sourceMap, source), loader, source, depth); + // Else, it's an unmodified source file. + // The contents of this unmodified source file can be overridden via the loader context, + // allowing it to be explicitly null or a string. If it remains undefined, we fall back to + // the importing sourcemap's `sourcesContent` field. + const sourceContent = sourcesContent ? sourcesContent[i] : null; + const ignored = ignoreList ? ignoreList.includes(i) : false; + return OriginalSource(source, sourceContent, ignored); + }); + return MapSource(map, children); +} + +/** + * A SourceMap v3 compatible sourcemap, which only includes fields that were + * provided to it. + */ +class SourceMap { + constructor(map, options) { + const out = options.decodedMappings ? toDecodedMap(map) : toEncodedMap(map); + this.version = out.version; // SourceMap spec says this should be first. + this.file = out.file; + this.mappings = out.mappings; + this.names = out.names; + this.ignoreList = out.ignoreList; + this.sourceRoot = out.sourceRoot; + this.sources = out.sources; + if (!options.excludeContent) { + this.sourcesContent = out.sourcesContent; + } + } + toString() { + return JSON.stringify(this); + } +} + +/** + * Traces through all the mappings in the root sourcemap, through the sources + * (and their sourcemaps), all the way back to the original source location. + * + * `loader` will be called every time we encounter a source file. If it returns + * a sourcemap, we will recurse into that sourcemap to continue the trace. If + * it returns a falsey value, that source file is treated as an original, + * unmodified source file. + * + * Pass `excludeContent` to exclude any self-containing source file content + * from the output sourcemap. + * + * Pass `decodedMappings` to receive a SourceMap with decoded (instead of + * VLQ encoded) mappings. + */ +function remapping(input, loader, options) { + const opts = { excludeContent: false, decodedMappings: false }; + const tree = buildSourceMapTree(input, loader); + return new SourceMap(traceMappings(tree), opts); +} + +var node$1 = {exports: {}}; + +/** + * Helpers. + */ + +var ms$1; +var hasRequiredMs; + +function requireMs () { + if (hasRequiredMs) return ms$1; + hasRequiredMs = 1; + var s = 1000; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var w = d * 7; + var y = d * 365.25; + + /** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + + ms$1 = function (val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); + }; + + /** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + + function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'weeks': + case 'week': + case 'w': + return n * w; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } + } + + /** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + + function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + 'd'; + } + if (msAbs >= h) { + return Math.round(ms / h) + 'h'; + } + if (msAbs >= m) { + return Math.round(ms / m) + 'm'; + } + if (msAbs >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; + } + + /** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + + function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, 'day'); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, 'hour'); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, 'minute'); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, 'second'); + } + return ms + ' ms'; + } + + /** + * Pluralization helper. + */ + + function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); + } + return ms$1; +} + +var common$4; +var hasRequiredCommon; + +function requireCommon () { + if (hasRequiredCommon) return common$4; + hasRequiredCommon = 1; + /** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + */ + + function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = requireMs(); + createDebug.destroy = destroy; + + Object.keys(env).forEach(key => { + createDebug[key] = env[key]; + }); + + /** + * The currently active debug mode names, and names to skip. + */ + + createDebug.names = []; + createDebug.skips = []; + + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + createDebug.formatters = {}; + + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + function selectColor(namespace) { + let hash = 0; + + for (let i = 0; i < namespace.length; i++) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; + + function debug(...args) { + // Disabled? + if (!debug.enabled) { + return; + } + + const self = debug; + + // Set `diff` timestamp + const curr = Number(new Date()); + const ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + args[0] = createDebug.coerce(args[0]); + + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } + + // Apply any `formatters` transformations + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return '%'; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === 'function') { + const val = args[index]; + match = formatter.call(self, val); + + // Now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // Apply env-specific formatting (colors, etc.) + createDebug.formatArgs.call(self, args); + + const logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.useColors = createDebug.useColors(); + debug.color = createDebug.selectColor(namespace); + debug.extend = extend; + debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. + + Object.defineProperty(debug, 'enabled', { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + + return enabledCache; + }, + set: v => { + enableOverride = v; + } + }); + + // Env-specific initialization logic for debug instances + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + return debug; + } + + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.namespaces = namespaces; + + createDebug.names = []; + createDebug.skips = []; + + const split = (typeof namespaces === 'string' ? namespaces : '') + .trim() + .replace(' ', ',') + .split(',') + .filter(Boolean); + + for (const ns of split) { + if (ns[0] === '-') { + createDebug.skips.push(ns.slice(1)); + } else { + createDebug.names.push(ns); + } + } + } + + /** + * Checks if the given string matches a namespace template, honoring + * asterisks as wildcards. + * + * @param {String} search + * @param {String} template + * @return {Boolean} + */ + function matchesTemplate(search, template) { + let searchIndex = 0; + let templateIndex = 0; + let starIndex = -1; + let matchIndex = 0; + + while (searchIndex < search.length) { + if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) { + // Match character or proceed with wildcard + if (template[templateIndex] === '*') { + starIndex = templateIndex; + matchIndex = searchIndex; + templateIndex++; // Skip the '*' + } else { + searchIndex++; + templateIndex++; + } + } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition + // Backtrack to the last '*' and try to match more characters + templateIndex = starIndex + 1; + matchIndex++; + searchIndex = matchIndex; + } else { + return false; // No match + } + } + + // Handle trailing '*' in template + while (templateIndex < template.length && template[templateIndex] === '*') { + templateIndex++; + } + + return templateIndex === template.length; + } + + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + function disable() { + const namespaces = [ + ...createDebug.names, + ...createDebug.skips.map(namespace => '-' + namespace) + ].join(','); + createDebug.enable(''); + return namespaces; + } + + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + function enabled(name) { + for (const skip of createDebug.skips) { + if (matchesTemplate(name, skip)) { + return false; + } + } + + for (const ns of createDebug.names) { + if (matchesTemplate(name, ns)) { + return true; + } + } + + return false; + } + + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + + /** + * XXX DO NOT USE. This is a temporary stub function. + * XXX It WILL be removed in the next major release. + */ + function destroy() { + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + + createDebug.enable(createDebug.load()); + + return createDebug; + } + + common$4 = setup; + return common$4; +} + +/** + * Module dependencies. + */ + +(function (module, exports) { + const tty = require$$0$3; + const util = require$$1; + + /** + * This is the Node.js implementation of `debug()`. + */ + + exports.init = init; + exports.log = log; + exports.formatArgs = formatArgs; + exports.save = save; + exports.load = load; + exports.useColors = useColors; + exports.destroy = util.deprecate( + () => {}, + 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' + ); + + /** + * Colors. + */ + + exports.colors = [6, 2, 3, 4, 5, 1]; + + try { + // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) + // eslint-disable-next-line import/no-extraneous-dependencies + const supportsColor = require('supports-color'); + + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } + } catch (error) { + // Swallow - we only care if `supports-color` is available; it doesn't have to be. + } + + /** + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js + */ + + exports.inspectOpts = Object.keys(process.env).filter(key => { + return /^debug_/i.test(key); + }).reduce((obj, key) => { + // Camel-case + const prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + + // Coerce string value into JS value + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === 'null') { + val = null; + } else { + val = Number(val); + } + + obj[prop] = val; + return obj; + }, {}); + + /** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + + function useColors() { + return 'colors' in exports.inspectOpts ? + Boolean(exports.inspectOpts.colors) : + tty.isatty(process.stderr.fd); + } + + /** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + + function formatArgs(args) { + const {namespace: name, useColors} = this; + + if (useColors) { + const c = this.color; + const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); + const prefix = ` ${colorCode};1m${name} \u001B[0m`; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); + } else { + args[0] = getDate() + name + ' ' + args[0]; + } + } + + function getDate() { + if (exports.inspectOpts.hideDate) { + return ''; + } + return new Date().toISOString() + ' '; + } + + /** + * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr. + */ + + function log(...args) { + return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n'); + } + + /** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } + } + + /** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + + function load() { + return process.env.DEBUG; + } + + /** + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. + */ + + function init(debug) { + debug.inspectOpts = {}; + + const keys = Object.keys(exports.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } + } + + module.exports = requireCommon()(exports); + + const {formatters} = module.exports; + + /** + * Map %o to `util.inspect()`, all on a single line. + */ + + formatters.o = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n') + .map(str => str.trim()) + .join(' '); + }; + + /** + * Map %O to `util.inspect()`, allowing multiple lines if needed. + */ + + formatters.O = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); + }; +} (node$1, node$1.exports)); + +var nodeExports$1 = node$1.exports; +var debug$j = /*@__PURE__*/getDefaultExportFromCjs(nodeExports$1); + +let pnp; +if (process.versions.pnp) { + try { + pnp = createRequire$1(import.meta.url)("pnpapi"); + } catch { + } +} +function invalidatePackageData(packageCache, pkgPath) { + const pkgDir = normalizePath$3(path$b.dirname(pkgPath)); + packageCache.forEach((pkg, cacheKey) => { + if (pkg.dir === pkgDir) { + packageCache.delete(cacheKey); + } + }); +} +function resolvePackageData(pkgName, basedir, preserveSymlinks = false, packageCache) { + if (pnp) { + const cacheKey = getRpdCacheKey(pkgName, basedir, preserveSymlinks); + if (packageCache?.has(cacheKey)) return packageCache.get(cacheKey); + try { + const pkg = pnp.resolveToUnqualified(pkgName, basedir, { + considerBuiltins: false + }); + if (!pkg) return null; + const pkgData = loadPackageData(path$b.join(pkg, "package.json")); + packageCache?.set(cacheKey, pkgData); + return pkgData; + } catch { + return null; + } + } + const originalBasedir = basedir; + while (basedir) { + if (packageCache) { + const cached = getRpdCache( + packageCache, + pkgName, + basedir, + originalBasedir, + preserveSymlinks + ); + if (cached) return cached; + } + const pkg = path$b.join(basedir, "node_modules", pkgName, "package.json"); + try { + if (fs__default.existsSync(pkg)) { + const pkgPath = preserveSymlinks ? pkg : safeRealpathSync(pkg); + const pkgData = loadPackageData(pkgPath); + if (packageCache) { + setRpdCache( + packageCache, + pkgData, + pkgName, + basedir, + originalBasedir, + preserveSymlinks + ); + } + return pkgData; + } + } catch { + } + const nextBasedir = path$b.dirname(basedir); + if (nextBasedir === basedir) break; + basedir = nextBasedir; + } + return null; +} +function findNearestPackageData(basedir, packageCache) { + const originalBasedir = basedir; + while (basedir) { + if (packageCache) { + const cached = getFnpdCache(packageCache, basedir, originalBasedir); + if (cached) return cached; + } + const pkgPath = path$b.join(basedir, "package.json"); + if (tryStatSync(pkgPath)?.isFile()) { + try { + const pkgData = loadPackageData(pkgPath); + if (packageCache) { + setFnpdCache(packageCache, pkgData, basedir, originalBasedir); + } + return pkgData; + } catch { + } + } + const nextBasedir = path$b.dirname(basedir); + if (nextBasedir === basedir) break; + basedir = nextBasedir; + } + return null; +} +function findNearestMainPackageData(basedir, packageCache) { + const nearestPackage = findNearestPackageData(basedir, packageCache); + return nearestPackage && (nearestPackage.data.name ? nearestPackage : findNearestMainPackageData( + path$b.dirname(nearestPackage.dir), + packageCache + )); +} +function loadPackageData(pkgPath) { + const data = JSON.parse(stripBomTag(fs__default.readFileSync(pkgPath, "utf-8"))); + const pkgDir = normalizePath$3(path$b.dirname(pkgPath)); + const { sideEffects } = data; + let hasSideEffects; + if (typeof sideEffects === "boolean") { + hasSideEffects = () => sideEffects; + } else if (Array.isArray(sideEffects)) { + if (sideEffects.length <= 0) { + hasSideEffects = () => false; + } else { + const finalPackageSideEffects = sideEffects.map((sideEffect) => { + if (sideEffect.includes("/")) { + return sideEffect; + } + return `**/${sideEffect}`; + }); + hasSideEffects = createFilter$1(finalPackageSideEffects, null, { + resolve: pkgDir + }); + } + } else { + hasSideEffects = () => null; + } + const resolvedCache = {}; + const pkg = { + dir: pkgDir, + data, + hasSideEffects, + setResolvedCache(key, entry, options) { + resolvedCache[getResolveCacheKey(key, options)] = entry; + }, + getResolvedCache(key, options) { + return resolvedCache[getResolveCacheKey(key, options)]; + } + }; + return pkg; +} +function getResolveCacheKey(key, options) { + return [ + key, + options.isRequire ? "1" : "0", + options.conditions.join("_"), + options.extensions.join("_"), + options.mainFields.join("_") + ].join("|"); +} +function findNearestNodeModules(basedir) { + while (basedir) { + const pkgPath = path$b.join(basedir, "node_modules"); + if (tryStatSync(pkgPath)?.isDirectory()) { + return pkgPath; + } + const nextBasedir = path$b.dirname(basedir); + if (nextBasedir === basedir) break; + basedir = nextBasedir; + } + return null; +} +function watchPackageDataPlugin(packageCache) { + const watchQueue = /* @__PURE__ */ new Set(); + const watchedDirs = /* @__PURE__ */ new Set(); + const watchFileStub = (id) => { + watchQueue.add(id); + }; + let watchFile = watchFileStub; + const setPackageData = packageCache.set.bind(packageCache); + packageCache.set = (id, pkg) => { + if (!isInNodeModules$1(pkg.dir) && !watchedDirs.has(pkg.dir)) { + watchedDirs.add(pkg.dir); + watchFile(path$b.join(pkg.dir, "package.json")); + } + return setPackageData(id, pkg); + }; + return { + name: "vite:watch-package-data", + buildStart() { + watchFile = this.addWatchFile.bind(this); + watchQueue.forEach(watchFile); + watchQueue.clear(); + }, + buildEnd() { + watchFile = watchFileStub; + }, + watchChange(id) { + if (id.endsWith("/package.json")) { + invalidatePackageData(packageCache, path$b.normalize(id)); + } + } + }; +} +function getRpdCache(packageCache, pkgName, basedir, originalBasedir, preserveSymlinks) { + const cacheKey = getRpdCacheKey(pkgName, basedir, preserveSymlinks); + const pkgData = packageCache.get(cacheKey); + if (pkgData) { + traverseBetweenDirs(originalBasedir, basedir, (dir) => { + packageCache.set(getRpdCacheKey(pkgName, dir, preserveSymlinks), pkgData); + }); + return pkgData; + } +} +function setRpdCache(packageCache, pkgData, pkgName, basedir, originalBasedir, preserveSymlinks) { + packageCache.set(getRpdCacheKey(pkgName, basedir, preserveSymlinks), pkgData); + traverseBetweenDirs(originalBasedir, basedir, (dir) => { + packageCache.set(getRpdCacheKey(pkgName, dir, preserveSymlinks), pkgData); + }); +} +function getRpdCacheKey(pkgName, basedir, preserveSymlinks) { + return `rpd_${pkgName}_${basedir}_${preserveSymlinks}`; +} +function getFnpdCache(packageCache, basedir, originalBasedir) { + const cacheKey = getFnpdCacheKey(basedir); + const pkgData = packageCache.get(cacheKey); + if (pkgData) { + traverseBetweenDirs(originalBasedir, basedir, (dir) => { + packageCache.set(getFnpdCacheKey(dir), pkgData); + }); + return pkgData; + } +} +function setFnpdCache(packageCache, pkgData, basedir, originalBasedir) { + packageCache.set(getFnpdCacheKey(basedir), pkgData); + traverseBetweenDirs(originalBasedir, basedir, (dir) => { + packageCache.set(getFnpdCacheKey(dir), pkgData); + }); +} +function getFnpdCacheKey(basedir) { + return `fnpd_${basedir}`; +} +function traverseBetweenDirs(longerDir, shorterDir, cb) { + while (longerDir !== shorterDir) { + cb(longerDir); + longerDir = path$b.dirname(longerDir); + } +} + +const createFilter$1 = createFilter$2; +const replaceSlashOrColonRE = /[/:]/g; +const replaceDotRE = /\./g; +const replaceNestedIdRE = /\s*>\s*/g; +const replaceHashRE = /#/g; +const flattenId = (id) => { + const flatId = limitFlattenIdLength( + id.replace(replaceSlashOrColonRE, "_").replace(replaceDotRE, "__").replace(replaceNestedIdRE, "___").replace(replaceHashRE, "____") + ); + return flatId; +}; +const FLATTEN_ID_HASH_LENGTH = 8; +const FLATTEN_ID_MAX_FILE_LENGTH = 170; +const limitFlattenIdLength = (id, limit = FLATTEN_ID_MAX_FILE_LENGTH) => { + if (id.length <= limit) { + return id; + } + return id.slice(0, limit - (FLATTEN_ID_HASH_LENGTH + 1)) + "_" + getHash(id); +}; +const normalizeId = (id) => id.replace(replaceNestedIdRE, " > "); +const NODE_BUILTIN_NAMESPACE = "node:"; +const NPM_BUILTIN_NAMESPACE = "npm:"; +const BUN_BUILTIN_NAMESPACE = "bun:"; +const nodeBuiltins = builtinModules.filter((id) => !id.includes(":")); +const isBuiltinCache = /* @__PURE__ */ new WeakMap(); +function isBuiltin(builtins, id) { + let isBuiltin2 = isBuiltinCache.get(builtins); + if (!isBuiltin2) { + isBuiltin2 = createIsBuiltin(builtins); + isBuiltinCache.set(builtins, isBuiltin2); + } + return isBuiltin2(id); +} +function createIsBuiltin(builtins) { + const plainBuiltinsSet = new Set( + builtins.filter((builtin) => typeof builtin === "string") + ); + const regexBuiltins = builtins.filter( + (builtin) => typeof builtin !== "string" + ); + return (id) => plainBuiltinsSet.has(id) || regexBuiltins.some((regexp) => regexp.test(id)); +} +const nodeLikeBuiltins = [ + ...nodeBuiltins, + new RegExp(`^${NODE_BUILTIN_NAMESPACE}`), + new RegExp(`^${NPM_BUILTIN_NAMESPACE}`), + new RegExp(`^${BUN_BUILTIN_NAMESPACE}`) +]; +function isNodeLikeBuiltin(id) { + return isBuiltin(nodeLikeBuiltins, id); +} +function isNodeBuiltin(id) { + if (id.startsWith(NODE_BUILTIN_NAMESPACE)) return true; + return nodeBuiltins.includes(id); +} +function isInNodeModules$1(id) { + return id.includes("node_modules"); +} +function moduleListContains(moduleList, id) { + return moduleList?.some( + (m) => m === id || id.startsWith(withTrailingSlash(m)) + ); +} +function isOptimizable(id, optimizeDeps) { + const { extensions } = optimizeDeps; + return OPTIMIZABLE_ENTRY_RE.test(id) || (extensions?.some((ext) => id.endsWith(ext)) ?? false); +} +const bareImportRE = /^(?![a-zA-Z]:)[\w@](?!.*:\/\/)/; +const deepImportRE = /^([^@][^/]*)\/|^(@[^/]+\/[^/]+)\//; +const _require$1 = createRequire$1(import.meta.url); +const _dirname = path$b.dirname(fileURLToPath$1(import.meta.url)); +const rollupVersion = resolvePackageData("rollup", _dirname, true)?.data.version ?? ""; +const filter = process.env.VITE_DEBUG_FILTER; +const DEBUG = process.env.DEBUG; +function createDebugger(namespace, options = {}) { + const log = debug$j(namespace); + const { onlyWhenFocused, depth } = options; + if (depth && log.inspectOpts && log.inspectOpts.depth == null) { + log.inspectOpts.depth = options.depth; + } + let enabled = log.enabled; + if (enabled && onlyWhenFocused) { + const ns = typeof onlyWhenFocused === "string" ? onlyWhenFocused : namespace; + enabled = !!DEBUG?.includes(ns); + } + if (enabled) { + return (...args) => { + if (!filter || args.some((a) => a?.includes?.(filter))) { + log(...args); + } + }; + } +} +function testCaseInsensitiveFS() { + if (!CLIENT_ENTRY.endsWith("client.mjs")) { + throw new Error( + `cannot test case insensitive FS, CLIENT_ENTRY const doesn't contain client.mjs` + ); + } + if (!fs__default.existsSync(CLIENT_ENTRY)) { + throw new Error( + "cannot test case insensitive FS, CLIENT_ENTRY does not point to an existing file: " + CLIENT_ENTRY + ); + } + return fs__default.existsSync(CLIENT_ENTRY.replace("client.mjs", "cLiEnT.mjs")); +} +const urlCanParse = ( + // eslint-disable-next-line n/no-unsupported-features/node-builtins + URL$3.canParse ?? // URL.canParse is supported from Node.js 18.17.0+, 20.0.0+ + ((path2, base) => { + try { + new URL$3(path2, base); + return true; + } catch { + return false; + } + }) +); +const isCaseInsensitiveFS = testCaseInsensitiveFS(); +const VOLUME_RE = /^[A-Z]:/i; +function normalizePath$3(id) { + return path$b.posix.normalize(isWindows$3 ? slash$1(id) : id); +} +function fsPathFromId(id) { + const fsPath = normalizePath$3( + id.startsWith(FS_PREFIX) ? id.slice(FS_PREFIX.length) : id + ); + return fsPath[0] === "/" || VOLUME_RE.test(fsPath) ? fsPath : `/${fsPath}`; +} +function fsPathFromUrl(url) { + return fsPathFromId(cleanUrl(url)); +} +function isParentDirectory(dir, file) { + dir = withTrailingSlash(dir); + return file.startsWith(dir) || isCaseInsensitiveFS && file.toLowerCase().startsWith(dir.toLowerCase()); +} +function isSameFileUri(file1, file2) { + return file1 === file2 || isCaseInsensitiveFS && file1.toLowerCase() === file2.toLowerCase(); +} +const externalRE = /^([a-z]+:)?\/\//; +const isExternalUrl = (url) => externalRE.test(url); +const dataUrlRE = /^\s*data:/i; +const isDataUrl = (url) => dataUrlRE.test(url); +const virtualModuleRE = /^virtual-module:.*/; +const virtualModulePrefix = "virtual-module:"; +const knownJsSrcRE = /\.(?:[jt]sx?|m[jt]s|vue|marko|svelte|astro|imba|mdx)(?:$|\?)/; +const isJSRequest = (url) => { + url = cleanUrl(url); + if (knownJsSrcRE.test(url)) { + return true; + } + if (!path$b.extname(url) && url[url.length - 1] !== "/") { + return true; + } + return false; +}; +const importQueryRE = /(\?|&)import=?(?:&|$)/; +const directRequestRE$1 = /(\?|&)direct=?(?:&|$)/; +const internalPrefixes = [ + FS_PREFIX, + VALID_ID_PREFIX, + CLIENT_PUBLIC_PATH, + ENV_PUBLIC_PATH +]; +const InternalPrefixRE = new RegExp(`^(?:${internalPrefixes.join("|")})`); +const trailingSeparatorRE = /[?&]$/; +const isImportRequest = (url) => importQueryRE.test(url); +const isInternalRequest = (url) => InternalPrefixRE.test(url); +function removeImportQuery(url) { + return url.replace(importQueryRE, "$1").replace(trailingSeparatorRE, ""); +} +function removeDirectQuery(url) { + return url.replace(directRequestRE$1, "$1").replace(trailingSeparatorRE, ""); +} +const urlRE$1 = /(\?|&)url(?:&|$)/; +const rawRE$1 = /(\?|&)raw(?:&|$)/; +function removeUrlQuery(url) { + return url.replace(urlRE$1, "$1").replace(trailingSeparatorRE, ""); +} +function injectQuery(url, queryToInject) { + const { file, postfix } = splitFileAndPostfix(url); + const normalizedFile = isWindows$3 ? slash$1(file) : file; + return `${normalizedFile}?${queryToInject}${postfix[0] === "?" ? `&${postfix.slice(1)}` : ( + /* hash only */ + postfix + )}`; +} +const timestampRE = /\bt=\d{13}&?\b/; +function removeTimestampQuery(url) { + return url.replace(timestampRE, "").replace(trailingSeparatorRE, ""); +} +async function asyncReplace(input, re, replacer) { + let match; + let remaining = input; + let rewritten = ""; + while (match = re.exec(remaining)) { + rewritten += remaining.slice(0, match.index); + rewritten += await replacer(match); + remaining = remaining.slice(match.index + match[0].length); + } + rewritten += remaining; + return rewritten; +} +function timeFrom(start, subtract = 0) { + const time = performance$1.now() - start - subtract; + const timeString = (time.toFixed(2) + `ms`).padEnd(5, " "); + if (time < 10) { + return colors$1.green(timeString); + } else if (time < 50) { + return colors$1.yellow(timeString); + } else { + return colors$1.red(timeString); + } +} +function prettifyUrl(url, root) { + url = removeTimestampQuery(url); + const isAbsoluteFile = url.startsWith(root); + if (isAbsoluteFile || url.startsWith(FS_PREFIX)) { + const file = path$b.posix.relative( + root, + isAbsoluteFile ? url : fsPathFromId(url) + ); + return colors$1.dim(file); + } else { + return colors$1.dim(url); + } +} +function isObject$1(value) { + return Object.prototype.toString.call(value) === "[object Object]"; +} +function isDefined(value) { + return value != null; +} +function tryStatSync(file) { + try { + return fs__default.statSync(file, { throwIfNoEntry: false }); + } catch { + } +} +function lookupFile(dir, fileNames) { + while (dir) { + for (const fileName of fileNames) { + const fullPath = path$b.join(dir, fileName); + if (tryStatSync(fullPath)?.isFile()) return fullPath; + } + const parentDir = path$b.dirname(dir); + if (parentDir === dir) return; + dir = parentDir; + } +} +function isFilePathESM(filePath, packageCache) { + if (/\.m[jt]s$/.test(filePath)) { + return true; + } else if (/\.c[jt]s$/.test(filePath)) { + return false; + } else { + try { + const pkg = findNearestPackageData(path$b.dirname(filePath), packageCache); + return pkg?.data.type === "module"; + } catch { + return false; + } + } +} +const splitRE = /\r?\n/g; +const range = 2; +function pad$1(source, n = 2) { + const lines = source.split(splitRE); + return lines.map((l) => ` `.repeat(n) + l).join(` +`); +} +function posToNumber(source, pos) { + if (typeof pos === "number") return pos; + const lines = source.split(splitRE); + const { line, column } = pos; + let start = 0; + for (let i = 0; i < line - 1 && i < lines.length; i++) { + start += lines[i].length + 1; + } + return start + column; +} +function numberToPos(source, offset) { + if (typeof offset !== "number") return offset; + if (offset > source.length) { + throw new Error( + `offset is longer than source length! offset ${offset} > length ${source.length}` + ); + } + const lines = source.split(splitRE); + let counted = 0; + let line = 0; + let column = 0; + for (; line < lines.length; line++) { + const lineLength = lines[line].length + 1; + if (counted + lineLength >= offset) { + column = offset - counted + 1; + break; + } + counted += lineLength; + } + return { line: line + 1, column }; +} +function generateCodeFrame(source, start = 0, end) { + start = Math.max(posToNumber(source, start), 0); + end = Math.min( + end !== void 0 ? posToNumber(source, end) : start, + source.length + ); + const lines = source.split(splitRE); + let count = 0; + const res = []; + for (let i = 0; i < lines.length; i++) { + count += lines[i].length; + if (count >= start) { + for (let j = i - range; j <= i + range || end > count; j++) { + if (j < 0 || j >= lines.length) continue; + const line = j + 1; + res.push( + `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` + ); + const lineLength = lines[j].length; + if (j === i) { + const pad2 = Math.max(start - (count - lineLength), 0); + const length = Math.max( + 1, + end > count ? lineLength - pad2 : end - start + ); + res.push(` | ` + " ".repeat(pad2) + "^".repeat(length)); + } else if (j > i) { + if (end > count) { + const length = Math.max(Math.min(end - count, lineLength), 1); + res.push(` | ` + "^".repeat(length)); + } + count += lineLength + 1; + } + } + break; + } + count++; + } + return res.join("\n"); +} +function isFileReadable(filename) { + if (!tryStatSync(filename)) { + return false; + } + try { + fs__default.accessSync(filename, fs__default.constants.R_OK); + return true; + } catch { + return false; + } +} +const splitFirstDirRE = /(.+?)[\\/](.+)/; +function emptyDir(dir, skip) { + const skipInDir = []; + let nested = null; + if (skip?.length) { + for (const file of skip) { + if (path$b.dirname(file) !== ".") { + const matched = splitFirstDirRE.exec(file); + if (matched) { + nested ??= /* @__PURE__ */ new Map(); + const [, nestedDir, skipPath] = matched; + let nestedSkip = nested.get(nestedDir); + if (!nestedSkip) { + nestedSkip = []; + nested.set(nestedDir, nestedSkip); + } + if (!nestedSkip.includes(skipPath)) { + nestedSkip.push(skipPath); + } + } + } else { + skipInDir.push(file); + } + } + } + for (const file of fs__default.readdirSync(dir)) { + if (skipInDir.includes(file)) { + continue; + } + if (nested?.has(file)) { + emptyDir(path$b.resolve(dir, file), nested.get(file)); + } else { + fs__default.rmSync(path$b.resolve(dir, file), { recursive: true, force: true }); + } + } +} +function copyDir(srcDir, destDir) { + fs__default.mkdirSync(destDir, { recursive: true }); + for (const file of fs__default.readdirSync(srcDir)) { + const srcFile = path$b.resolve(srcDir, file); + if (srcFile === destDir) { + continue; + } + const destFile = path$b.resolve(destDir, file); + const stat = fs__default.statSync(srcFile); + if (stat.isDirectory()) { + copyDir(srcFile, destFile); + } else { + fs__default.copyFileSync(srcFile, destFile); + } + } +} +const ERR_SYMLINK_IN_RECURSIVE_READDIR = "ERR_SYMLINK_IN_RECURSIVE_READDIR"; +async function recursiveReaddir(dir) { + if (!fs__default.existsSync(dir)) { + return []; + } + let dirents; + try { + dirents = await fsp.readdir(dir, { withFileTypes: true }); + } catch (e) { + if (e.code === "EACCES") { + return []; + } + throw e; + } + if (dirents.some((dirent) => dirent.isSymbolicLink())) { + const err = new Error( + "Symbolic links are not supported in recursiveReaddir" + ); + err.code = ERR_SYMLINK_IN_RECURSIVE_READDIR; + throw err; + } + const files = await Promise.all( + dirents.map((dirent) => { + const res = path$b.resolve(dir, dirent.name); + return dirent.isDirectory() ? recursiveReaddir(res) : normalizePath$3(res); + }) + ); + return files.flat(1); +} +let safeRealpathSync = isWindows$3 ? windowsSafeRealPathSync : fs__default.realpathSync.native; +const windowsNetworkMap = /* @__PURE__ */ new Map(); +function windowsMappedRealpathSync(path2) { + const realPath = fs__default.realpathSync.native(path2); + if (realPath.startsWith("\\\\")) { + for (const [network, volume] of windowsNetworkMap) { + if (realPath.startsWith(network)) return realPath.replace(network, volume); + } + } + return realPath; +} +const parseNetUseRE = /^\w* +(\w:) +([^ ]+)\s/; +let firstSafeRealPathSyncRun = false; +function windowsSafeRealPathSync(path2) { + if (!firstSafeRealPathSyncRun) { + optimizeSafeRealPathSync(); + firstSafeRealPathSyncRun = true; + } + return fs__default.realpathSync(path2); +} +function optimizeSafeRealPathSync() { + const nodeVersion = process.versions.node.split(".").map(Number); + if (nodeVersion[0] < 18 || nodeVersion[0] === 18 && nodeVersion[1] < 10) { + safeRealpathSync = fs__default.realpathSync; + return; + } + try { + fs__default.realpathSync.native(path$b.resolve("./")); + } catch (error) { + if (error.message.includes("EISDIR: illegal operation on a directory")) { + safeRealpathSync = fs__default.realpathSync; + return; + } + } + exec("net use", (error, stdout) => { + if (error) return; + const lines = stdout.split("\n"); + for (const line of lines) { + const m = parseNetUseRE.exec(line); + if (m) windowsNetworkMap.set(m[2], m[1]); + } + if (windowsNetworkMap.size === 0) { + safeRealpathSync = fs__default.realpathSync.native; + } else { + safeRealpathSync = windowsMappedRealpathSync; + } + }); +} +function ensureWatchedFile(watcher, file, root) { + if (file && // only need to watch if out of root + !file.startsWith(withTrailingSlash(root)) && // some rollup plugins use null bytes for private resolved Ids + !file.includes("\0") && fs__default.existsSync(file)) { + watcher.add(path$b.resolve(file)); + } +} +function joinSrcset(ret) { + return ret.map(({ url, descriptor }) => url + (descriptor ? ` ${descriptor}` : "")).join(", "); +} +const imageCandidateRegex = /(?:^|\s|(?<=,))(?[\w-]+\([^)]*\)|"[^"]*"|'[^']*'|[^,]\S*[^,])\s*(?:\s(?\w[^,]+))?(?:,|$)/g; +const escapedSpaceCharacters = /(?: |\\t|\\n|\\f|\\r)+/g; +function parseSrcset(string) { + const matches = string.trim().replace(escapedSpaceCharacters, " ").replace(/\r?\n/, "").replace(/,\s+/, ", ").replaceAll(/\s+/g, " ").matchAll(imageCandidateRegex); + return Array.from(matches, ({ groups }) => ({ + url: groups?.url?.trim() ?? "", + descriptor: groups?.descriptor?.trim() ?? "" + })).filter(({ url }) => !!url); +} +function processSrcSet(srcs, replacer) { + return Promise.all( + parseSrcset(srcs).map(async ({ url, descriptor }) => ({ + url: await replacer({ url, descriptor }), + descriptor + })) + ).then(joinSrcset); +} +function processSrcSetSync(srcs, replacer) { + return joinSrcset( + parseSrcset(srcs).map(({ url, descriptor }) => ({ + url: replacer({ url, descriptor }), + descriptor + })) + ); +} +const windowsDriveRE = /^[A-Z]:/; +const replaceWindowsDriveRE = /^([A-Z]):\//; +const linuxAbsolutePathRE = /^\/[^/]/; +function escapeToLinuxLikePath(path2) { + if (windowsDriveRE.test(path2)) { + return path2.replace(replaceWindowsDriveRE, "/windows/$1/"); + } + if (linuxAbsolutePathRE.test(path2)) { + return `/linux${path2}`; + } + return path2; +} +const revertWindowsDriveRE = /^\/windows\/([A-Z])\//; +function unescapeToLinuxLikePath(path2) { + if (path2.startsWith("/linux/")) { + return path2.slice("/linux".length); + } + if (path2.startsWith("/windows/")) { + return path2.replace(revertWindowsDriveRE, "$1:/"); + } + return path2; +} +const nullSourceMap = { + names: [], + sources: [], + mappings: "", + version: 3 +}; +function combineSourcemaps(filename, sourcemapList) { + if (sourcemapList.length === 0 || sourcemapList.every((m) => m.sources.length === 0)) { + return { ...nullSourceMap }; + } + sourcemapList = sourcemapList.map((sourcemap) => { + const newSourcemaps = { ...sourcemap }; + newSourcemaps.sources = sourcemap.sources.map( + (source) => source ? escapeToLinuxLikePath(source) : null + ); + if (sourcemap.sourceRoot) { + newSourcemaps.sourceRoot = escapeToLinuxLikePath(sourcemap.sourceRoot); + } + return newSourcemaps; + }); + const escapedFilename = escapeToLinuxLikePath(filename); + let map; + let mapIndex = 1; + const useArrayInterface = sourcemapList.slice(0, -1).find((m) => m.sources.length !== 1) === void 0; + if (useArrayInterface) { + map = remapping(sourcemapList, () => null); + } else { + map = remapping(sourcemapList[0], function loader(sourcefile) { + if (sourcefile === escapedFilename && sourcemapList[mapIndex]) { + return sourcemapList[mapIndex++]; + } else { + return null; + } + }); + } + if (!map.file) { + delete map.file; + } + map.sources = map.sources.map( + (source) => source ? unescapeToLinuxLikePath(source) : source + ); + map.file = filename; + return map; +} +function unique(arr) { + return Array.from(new Set(arr)); +} +async function getLocalhostAddressIfDiffersFromDNS() { + const [nodeResult, dnsResult] = await Promise.all([ + promises.lookup("localhost"), + promises.lookup("localhost", { verbatim: true }) + ]); + const isSame = nodeResult.family === dnsResult.family && nodeResult.address === dnsResult.address; + return isSame ? void 0 : nodeResult.address; +} +function diffDnsOrderChange(oldUrls, newUrls) { + return !(oldUrls === newUrls || oldUrls && newUrls && arrayEqual(oldUrls.local, newUrls.local) && arrayEqual(oldUrls.network, newUrls.network)); +} +async function resolveHostname(optionsHost) { + let host; + if (optionsHost === void 0 || optionsHost === false) { + host = "localhost"; + } else if (optionsHost === true) { + host = void 0; + } else { + host = optionsHost; + } + let name = host === void 0 || wildcardHosts.has(host) ? "localhost" : host; + if (host === "localhost") { + const localhostAddr = await getLocalhostAddressIfDiffersFromDNS(); + if (localhostAddr) { + name = localhostAddr; + } + } + return { host, name }; +} +async function resolveServerUrls(server, options, httpsOptions, config) { + const address = server.address(); + const isAddressInfo = (x) => x?.address; + if (!isAddressInfo(address)) { + return { local: [], network: [] }; + } + const local = []; + const network = []; + const hostname = await resolveHostname(options.host); + const protocol = options.https ? "https" : "http"; + const port = address.port; + const base = config.rawBase === "./" || config.rawBase === "" ? "/" : config.rawBase; + if (hostname.host !== void 0 && !wildcardHosts.has(hostname.host)) { + let hostnameName = hostname.name; + if (hostnameName.includes(":")) { + hostnameName = `[${hostnameName}]`; + } + const address2 = `${protocol}://${hostnameName}:${port}${base}`; + if (loopbackHosts.has(hostname.host)) { + local.push(address2); + } else { + network.push(address2); + } + } else { + Object.values(os$3.networkInterfaces()).flatMap((nInterface) => nInterface ?? []).filter( + (detail) => detail.address && (detail.family === "IPv4" || // @ts-expect-error Node 18.0 - 18.3 returns number + detail.family === 4) + ).forEach((detail) => { + let host = detail.address.replace("127.0.0.1", hostname.name); + if (host.includes(":")) { + host = `[${host}]`; + } + const url = `${protocol}://${host}:${port}${base}`; + if (detail.address.includes("127.0.0.1")) { + local.push(url); + } else { + network.push(url); + } + }); + } + const cert = httpsOptions?.cert && !Array.isArray(httpsOptions.cert) ? new crypto$2.X509Certificate(httpsOptions.cert) : void 0; + const hostnameFromCert = cert?.subjectAltName ? extractHostnamesFromSubjectAltName(cert.subjectAltName) : []; + if (hostnameFromCert.length > 0) { + const existings = /* @__PURE__ */ new Set([...local, ...network]); + local.push( + ...hostnameFromCert.map((hostname2) => `https://${hostname2}:${port}${base}`).filter((url) => !existings.has(url)) + ); + } + return { local, network }; +} +function extractHostnamesFromSubjectAltName(subjectAltName) { + const hostnames = []; + let remaining = subjectAltName; + while (remaining) { + const nameEndIndex = remaining.indexOf(":"); + const name = remaining.slice(0, nameEndIndex); + remaining = remaining.slice(nameEndIndex + 1); + if (!remaining) break; + const isQuoted = remaining[0] === '"'; + let value; + if (isQuoted) { + const endQuoteIndex = remaining.indexOf('"', 1); + value = JSON.parse(remaining.slice(0, endQuoteIndex + 1)); + remaining = remaining.slice(endQuoteIndex + 1); + } else { + const maybeEndIndex = remaining.indexOf(","); + const endIndex = maybeEndIndex === -1 ? remaining.length : maybeEndIndex; + value = remaining.slice(0, endIndex); + remaining = remaining.slice(endIndex); + } + remaining = remaining.slice( + /* for , */ + 1 + ).trimStart(); + if (name === "DNS" && // [::1] might be included but skip it as it's already included as a local address + value !== "[::1]" && // skip *.IPv4 addresses, which is invalid + !(value.startsWith("*.") && net$1.isIPv4(value.slice(2)))) { + hostnames.push(value.replace("*", "vite")); + } + } + return hostnames; +} +function arraify(target) { + return Array.isArray(target) ? target : [target]; +} +const multilineCommentsRE = /\/\*[^*]*\*+(?:[^/*][^*]*\*+)*\//g; +const singlelineCommentsRE = /\/\/.*/g; +const requestQuerySplitRE = /\?(?!.*[/|}])/; +const requestQueryMaybeEscapedSplitRE = /\\?\?(?!.*[/|}])/; +const blankReplacer = (match) => " ".repeat(match.length); +const hash$1 = ( + // eslint-disable-next-line n/no-unsupported-features/node-builtins -- crypto.hash is supported in Node 21.7.0+, 20.12.0+ + crypto$2.hash ?? ((algorithm, data, outputEncoding) => crypto$2.createHash(algorithm).update(data).digest(outputEncoding)) +); +function getHash(text, length = 8) { + const h = hash$1("sha256", text, "hex").substring(0, length); + if (length <= 64) return h; + return h.padEnd(length, "_"); +} +const requireResolveFromRootWithFallback = (root, id) => { + const found = resolvePackageData(id, root) || resolvePackageData(id, _dirname); + if (!found) { + const error = new Error(`${JSON.stringify(id)} not found.`); + error.code = "MODULE_NOT_FOUND"; + throw error; + } + return _require$1.resolve(id, { paths: [root, _dirname] }); +}; +function emptyCssComments(raw) { + return raw.replace(multilineCommentsRE, blankReplacer); +} +function backwardCompatibleWorkerPlugins(plugins) { + if (Array.isArray(plugins)) { + return plugins; + } + if (typeof plugins === "function") { + return plugins(); + } + return []; +} +function deepClone(value) { + if (Array.isArray(value)) { + return value.map((v) => deepClone(v)); + } + if (isObject$1(value)) { + const cloned = {}; + for (const key in value) { + cloned[key] = deepClone(value[key]); + } + return cloned; + } + if (typeof value === "function") { + return value; + } + if (value instanceof RegExp) { + return new RegExp(value); + } + if (typeof value === "object" && value != null) { + throw new Error("Cannot deep clone non-plain object"); + } + return value; +} +function mergeWithDefaultsRecursively(defaults, values) { + const merged = defaults; + for (const key in values) { + const value = values[key]; + if (value === void 0) continue; + const existing = merged[key]; + if (existing === void 0) { + merged[key] = value; + continue; + } + if (isObject$1(existing) && isObject$1(value)) { + merged[key] = mergeWithDefaultsRecursively(existing, value); + continue; + } + merged[key] = value; + } + return merged; +} +function mergeWithDefaults(defaults, values) { + const clonedDefaults = deepClone(defaults); + return mergeWithDefaultsRecursively(clonedDefaults, values); +} +function mergeConfigRecursively(defaults, overrides, rootPath) { + const merged = { ...defaults }; + for (const key in overrides) { + const value = overrides[key]; + if (value == null) { + continue; + } + const existing = merged[key]; + if (existing == null) { + merged[key] = value; + continue; + } + if (key === "alias" && (rootPath === "resolve" || rootPath === "")) { + merged[key] = mergeAlias(existing, value); + continue; + } else if (key === "assetsInclude" && rootPath === "") { + merged[key] = [].concat(existing, value); + continue; + } else if (key === "noExternal" && (rootPath === "ssr" || rootPath === "resolve") && (existing === true || value === true)) { + merged[key] = true; + continue; + } else if (key === "plugins" && rootPath === "worker") { + merged[key] = () => [ + ...backwardCompatibleWorkerPlugins(existing), + ...backwardCompatibleWorkerPlugins(value) + ]; + continue; + } else if (key === "server" && rootPath === "server.hmr") { + merged[key] = value; + continue; + } + if (Array.isArray(existing) || Array.isArray(value)) { + merged[key] = [...arraify(existing), ...arraify(value)]; + continue; + } + if (isObject$1(existing) && isObject$1(value)) { + merged[key] = mergeConfigRecursively( + existing, + value, + rootPath ? `${rootPath}.${key}` : key + ); + continue; + } + merged[key] = value; + } + return merged; +} +function mergeConfig(defaults, overrides, isRoot = true) { + if (typeof defaults === "function" || typeof overrides === "function") { + throw new Error(`Cannot merge config in form of callback`); + } + return mergeConfigRecursively(defaults, overrides, isRoot ? "" : "."); +} +function mergeAlias(a, b) { + if (!a) return b; + if (!b) return a; + if (isObject$1(a) && isObject$1(b)) { + return { ...a, ...b }; + } + return [...normalizeAlias(b), ...normalizeAlias(a)]; +} +function normalizeAlias(o = []) { + return Array.isArray(o) ? o.map(normalizeSingleAlias) : Object.keys(o).map( + (find) => normalizeSingleAlias({ + find, + replacement: o[find] + }) + ); +} +function normalizeSingleAlias({ + find, + replacement, + customResolver +}) { + if (typeof find === "string" && find.endsWith("/") && replacement.endsWith("/")) { + find = find.slice(0, find.length - 1); + replacement = replacement.slice(0, replacement.length - 1); + } + const alias = { + find, + replacement + }; + if (customResolver) { + alias.customResolver = customResolver; + } + return alias; +} +function transformStableResult(s, id, config) { + return { + code: s.toString(), + map: config.command === "build" && config.build.sourcemap ? s.generateMap({ hires: "boundary", source: id }) : null + }; +} +async function asyncFlatten(arr) { + do { + arr = (await Promise.all(arr)).flat(Infinity); + } while (arr.some((v) => v?.then)); + return arr; +} +function stripBomTag(content) { + if (content.charCodeAt(0) === 65279) { + return content.slice(1); + } + return content; +} +const windowsDrivePathPrefixRE = /^[A-Za-z]:[/\\]/; +const isNonDriveRelativeAbsolutePath = (p) => { + if (!isWindows$3) return p[0] === "/"; + return windowsDrivePathPrefixRE.test(p); +}; +function shouldServeFile(filePath, root) { + if (!isCaseInsensitiveFS) return true; + return hasCorrectCase(filePath, root); +} +function hasCorrectCase(file, assets) { + if (file === assets) return true; + const parent = path$b.dirname(file); + if (fs__default.readdirSync(parent).includes(path$b.basename(file))) { + return hasCorrectCase(parent, assets); + } + return false; +} +function joinUrlSegments(a, b) { + if (!a || !b) { + return a || b || ""; + } + if (a.endsWith("/")) { + a = a.substring(0, a.length - 1); + } + if (b[0] !== "/") { + b = "/" + b; + } + return a + b; +} +function removeLeadingSlash(str) { + return str[0] === "/" ? str.slice(1) : str; +} +function stripBase(path2, base) { + if (path2 === base) { + return "/"; + } + const devBase = withTrailingSlash(base); + return path2.startsWith(devBase) ? path2.slice(devBase.length - 1) : path2; +} +function arrayEqual(a, b) { + if (a === b) return true; + if (a.length !== b.length) return false; + for (let i = 0; i < a.length; i++) { + if (a[i] !== b[i]) return false; + } + return true; +} +function evalValue(rawValue) { + const fn = new Function(` + var console, exports, global, module, process, require + return ( +${rawValue} +) + `); + return fn(); +} +function getNpmPackageName(importPath) { + const parts = importPath.split("/"); + if (parts[0][0] === "@") { + if (!parts[1]) return null; + return `${parts[0]}/${parts[1]}`; + } else { + return parts[0]; + } +} +function getPkgName(name) { + return name[0] === "@" ? name.split("/")[1] : name; +} +const escapeRegexRE = /[-/\\^$*+?.()|[\]{}]/g; +function escapeRegex(str) { + return str.replace(escapeRegexRE, "\\$&"); +} +function getPackageManagerCommand(type = "install") { + const packageManager = process.env.npm_config_user_agent?.split(" ")[0].split("/")[0] || "npm"; + switch (type) { + case "install": + return packageManager === "npm" ? "npm install" : `${packageManager} add`; + case "uninstall": + return packageManager === "npm" ? "npm uninstall" : `${packageManager} remove`; + case "update": + return packageManager === "yarn" ? "yarn upgrade" : `${packageManager} update`; + default: + throw new TypeError(`Unknown command type: ${type}`); + } +} +function isDevServer(server) { + return "pluginContainer" in server; +} +function createSerialPromiseQueue() { + let previousTask; + return { + async run(f) { + const thisTask = f(); + const depTasks = Promise.all([previousTask, thisTask]); + previousTask = depTasks; + const [, result] = await depTasks; + if (previousTask === depTasks) { + previousTask = void 0; + } + return result; + } + }; +} +function sortObjectKeys(obj) { + const sorted = {}; + for (const key of Object.keys(obj).sort()) { + sorted[key] = obj[key]; + } + return sorted; +} +function displayTime(time) { + if (time < 1e3) { + return `${time}ms`; + } + time = time / 1e3; + if (time < 60) { + return `${time.toFixed(2)}s`; + } + const mins = Math.floor(time / 60); + const seconds = Math.round(time % 60); + if (seconds === 60) { + return `${mins + 1}m`; + } + return `${mins}m${seconds < 1 ? "" : ` ${seconds}s`}`; +} +function encodeURIPath(uri) { + if (uri.startsWith("data:")) return uri; + const filePath = cleanUrl(uri); + const postfix = filePath !== uri ? uri.slice(filePath.length) : ""; + return encodeURI(filePath) + postfix; +} +function partialEncodeURIPath(uri) { + if (uri.startsWith("data:")) return uri; + const filePath = cleanUrl(uri); + const postfix = filePath !== uri ? uri.slice(filePath.length) : ""; + return filePath.replaceAll("%", "%25") + postfix; +} +const sigtermCallbacks = /* @__PURE__ */ new Set(); +const parentSigtermCallback = async (signal, exitCode) => { + await Promise.all([...sigtermCallbacks].map((cb) => cb(signal, exitCode))); +}; +const setupSIGTERMListener = (callback) => { + if (sigtermCallbacks.size === 0) { + process.once("SIGTERM", parentSigtermCallback); + if (process.env.CI !== "true") { + process.stdin.on("end", parentSigtermCallback); + } + } + sigtermCallbacks.add(callback); +}; +const teardownSIGTERMListener = (callback) => { + sigtermCallbacks.delete(callback); + if (sigtermCallbacks.size === 0) { + process.off("SIGTERM", parentSigtermCallback); + if (process.env.CI !== "true") { + process.stdin.off("end", parentSigtermCallback); + } + } +}; +function getServerUrlByHost(resolvedUrls, host) { + if (typeof host === "string") { + const matchedUrl = [ + ...resolvedUrls?.local ?? [], + ...resolvedUrls?.network ?? [] + ].find((url) => url.includes(host)); + if (matchedUrl) { + return matchedUrl; + } + } + return resolvedUrls?.local[0] ?? resolvedUrls?.network[0]; +} + +const LogLevels = { + silent: 0, + error: 1, + warn: 2, + info: 3 +}; +let lastType; +let lastMsg; +let sameCount = 0; +function clearScreen() { + const repeatCount = process.stdout.rows - 2; + const blank = repeatCount > 0 ? "\n".repeat(repeatCount) : ""; + console.log(blank); + readline.cursorTo(process.stdout, 0, 0); + readline.clearScreenDown(process.stdout); +} +let timeFormatter; +function getTimeFormatter() { + timeFormatter ??= new Intl.DateTimeFormat(void 0, { + hour: "numeric", + minute: "numeric", + second: "numeric" + }); + return timeFormatter; +} +function createLogger(level = "info", options = {}) { + if (options.customLogger) { + return options.customLogger; + } + const loggedErrors = /* @__PURE__ */ new WeakSet(); + const { + prefix = "[vite]", + allowClearScreen = true, + console: console2 = globalThis.console + } = options; + const thresh = LogLevels[level]; + const canClearScreen = allowClearScreen && process.stdout.isTTY && !process.env.CI; + const clear = canClearScreen ? clearScreen : () => { + }; + function format(type, msg, options2 = {}) { + if (options2.timestamp) { + let tag = ""; + if (type === "info") { + tag = colors$1.cyan(colors$1.bold(prefix)); + } else if (type === "warn") { + tag = colors$1.yellow(colors$1.bold(prefix)); + } else { + tag = colors$1.red(colors$1.bold(prefix)); + } + const environment = options2.environment ? options2.environment + " " : ""; + return `${colors$1.dim(getTimeFormatter().format(/* @__PURE__ */ new Date()))} ${tag} ${environment}${msg}`; + } else { + return msg; + } + } + function output(type, msg, options2 = {}) { + if (thresh >= LogLevels[type]) { + const method = type === "info" ? "log" : type; + if (options2.error) { + loggedErrors.add(options2.error); + } + if (canClearScreen) { + if (type === lastType && msg === lastMsg) { + sameCount++; + clear(); + console2[method]( + format(type, msg, options2), + colors$1.yellow(`(x${sameCount + 1})`) + ); + } else { + sameCount = 0; + lastMsg = msg; + lastType = type; + if (options2.clear) { + clear(); + } + console2[method](format(type, msg, options2)); + } + } else { + console2[method](format(type, msg, options2)); + } + } + } + const warnedMessages = /* @__PURE__ */ new Set(); + const logger = { + hasWarned: false, + info(msg, opts) { + output("info", msg, opts); + }, + warn(msg, opts) { + logger.hasWarned = true; + output("warn", msg, opts); + }, + warnOnce(msg, opts) { + if (warnedMessages.has(msg)) return; + logger.hasWarned = true; + output("warn", msg, opts); + warnedMessages.add(msg); + }, + error(msg, opts) { + logger.hasWarned = true; + output("error", msg, opts); + }, + clearScreen(type) { + if (thresh >= LogLevels[type]) { + clear(); + } + }, + hasErrorLogged(error) { + return loggedErrors.has(error); + } + }; + return logger; +} +function printServerUrls(urls, optionsHost, info) { + const colorUrl = (url) => colors$1.cyan(url.replace(/:(\d+)\//, (_, port) => `:${colors$1.bold(port)}/`)); + for (const url of urls.local) { + info(` ${colors$1.green("\u279C")} ${colors$1.bold("Local")}: ${colorUrl(url)}`); + } + for (const url of urls.network) { + info(` ${colors$1.green("\u279C")} ${colors$1.bold("Network")}: ${colorUrl(url)}`); + } + if (urls.network.length === 0 && optionsHost === void 0) { + info( + colors$1.dim(` ${colors$1.green("\u279C")} ${colors$1.bold("Network")}: use `) + colors$1.bold("--host") + colors$1.dim(" to expose") + ); + } +} + +const groups = [ + { name: "Assets", color: colors$1.green }, + { name: "CSS", color: colors$1.magenta }, + { name: "JS", color: colors$1.cyan } +]; +const COMPRESSIBLE_ASSETS_RE = /\.(?:html|json|svg|txt|xml|xhtml|wasm)$/; +function buildReporterPlugin(config) { + const compress = promisify$4(gzip); + const numberFormatter = new Intl.NumberFormat("en", { + maximumFractionDigits: 2, + minimumFractionDigits: 2 + }); + const displaySize = (bytes) => { + return `${numberFormatter.format(bytes / 1e3)} kB`; + }; + const tty = process.stdout.isTTY && !process.env.CI; + const shouldLogInfo = LogLevels[config.logLevel || "info"] >= LogLevels.info; + const modulesReporter = shouldLogInfo ? perEnvironmentState((environment) => { + let hasTransformed = false; + let transformedCount = 0; + const logTransform = throttle((id) => { + writeLine( + `transforming (${transformedCount}) ${colors$1.dim( + path$b.relative(config.root, id) + )}` + ); + }); + return { + reset() { + transformedCount = 0; + }, + register(id) { + transformedCount++; + if (!tty) { + if (!hasTransformed) { + config.logger.info(`transforming...`); + } + } else { + if (id.includes(`?`)) return; + logTransform(id); + } + hasTransformed = true; + }, + log() { + if (tty) { + clearLine$1(); + } + environment.logger.info( + `${colors$1.green(`\u2713`)} ${transformedCount} modules transformed.` + ); + } + }; + }) : void 0; + const chunksReporter = perEnvironmentState((environment) => { + let hasRenderedChunk = false; + let hasCompressChunk = false; + let chunkCount = 0; + let compressedCount = 0; + async function getCompressedSize(code) { + if (environment.config.consumer !== "client" || !environment.config.build.reportCompressedSize) { + return null; + } + if (shouldLogInfo && !hasCompressChunk) { + if (!tty) { + config.logger.info("computing gzip size..."); + } else { + writeLine("computing gzip size (0)..."); + } + hasCompressChunk = true; + } + const compressed = await compress( + typeof code === "string" ? code : Buffer.from(code) + ); + compressedCount++; + if (shouldLogInfo && tty) { + writeLine(`computing gzip size (${compressedCount})...`); + } + return compressed.length; + } + return { + reset() { + chunkCount = 0; + compressedCount = 0; + }, + register() { + chunkCount++; + if (shouldLogInfo) { + if (!tty) { + if (!hasRenderedChunk) { + environment.logger.info("rendering chunks..."); + } + } else { + writeLine(`rendering chunks (${chunkCount})...`); + } + hasRenderedChunk = true; + } + }, + async log(output, outDir) { + const chunkLimit = environment.config.build.chunkSizeWarningLimit; + let hasLargeChunks = false; + if (shouldLogInfo) { + const entries = (await Promise.all( + Object.values(output).map( + async (chunk) => { + if (chunk.type === "chunk") { + return { + name: chunk.fileName, + group: "JS", + size: Buffer.byteLength(chunk.code), + compressedSize: await getCompressedSize(chunk.code), + mapSize: chunk.map ? Buffer.byteLength(chunk.map.toString()) : null + }; + } else { + if (chunk.fileName.endsWith(".map")) return null; + const isCSS = chunk.fileName.endsWith(".css"); + const isCompressible = isCSS || COMPRESSIBLE_ASSETS_RE.test(chunk.fileName); + return { + name: chunk.fileName, + group: isCSS ? "CSS" : "Assets", + size: Buffer.byteLength(chunk.source), + mapSize: null, + // Rollup doesn't support CSS maps? + compressedSize: isCompressible ? await getCompressedSize(chunk.source) : null + }; + } + } + ) + )).filter(isDefined); + if (tty) clearLine$1(); + let longest = 0; + let biggestSize = 0; + let biggestMap = 0; + let biggestCompressSize = 0; + for (const entry of entries) { + if (entry.name.length > longest) longest = entry.name.length; + if (entry.size > biggestSize) biggestSize = entry.size; + if (entry.mapSize && entry.mapSize > biggestMap) { + biggestMap = entry.mapSize; + } + if (entry.compressedSize && entry.compressedSize > biggestCompressSize) { + biggestCompressSize = entry.compressedSize; + } + } + const sizePad = displaySize(biggestSize).length; + const mapPad = displaySize(biggestMap).length; + const compressPad = displaySize(biggestCompressSize).length; + const relativeOutDir = normalizePath$3( + path$b.relative( + config.root, + path$b.resolve( + config.root, + outDir ?? environment.config.build.outDir + ) + ) + ); + const assetsDir = path$b.join(environment.config.build.assetsDir, "/"); + for (const group of groups) { + const filtered = entries.filter((e) => e.group === group.name); + if (!filtered.length) continue; + for (const entry of filtered.sort((a, z) => a.size - z.size)) { + const isLarge = group.name === "JS" && entry.size / 1e3 > chunkLimit; + if (isLarge) hasLargeChunks = true; + const sizeColor = isLarge ? colors$1.yellow : colors$1.dim; + let log = colors$1.dim(withTrailingSlash(relativeOutDir)); + log += !config.build.lib && entry.name.startsWith(withTrailingSlash(assetsDir)) ? colors$1.dim(assetsDir) + group.color( + entry.name.slice(assetsDir.length).padEnd(longest + 2 - assetsDir.length) + ) : group.color(entry.name.padEnd(longest + 2)); + log += colors$1.bold( + sizeColor(displaySize(entry.size).padStart(sizePad)) + ); + if (entry.compressedSize) { + log += colors$1.dim( + ` \u2502 gzip: ${displaySize(entry.compressedSize).padStart( + compressPad + )}` + ); + } + if (entry.mapSize) { + log += colors$1.dim( + ` \u2502 map: ${displaySize(entry.mapSize).padStart(mapPad)}` + ); + } + config.logger.info(log); + } + } + } else { + hasLargeChunks = Object.values(output).some((chunk) => { + return chunk.type === "chunk" && chunk.code.length / 1e3 > chunkLimit; + }); + } + if (hasLargeChunks && environment.config.build.minify && !config.build.lib && environment.config.consumer === "client") { + environment.logger.warn( + colors$1.yellow( + ` +(!) Some chunks are larger than ${chunkLimit} kB after minification. Consider: +- Using dynamic import() to code-split the application +- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks +- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.` + ) + ); + } + } + }; + }); + return { + name: "vite:reporter", + sharedDuringBuild: true, + perEnvironmentStartEndDuringDev: true, + ...modulesReporter ? { + transform(_, id) { + modulesReporter(this).register(id); + }, + buildStart() { + modulesReporter(this).reset(); + }, + buildEnd() { + modulesReporter(this).log(); + } + } : {}, + renderStart() { + chunksReporter(this).reset(); + }, + renderChunk(_, chunk, options) { + if (!options.inlineDynamicImports) { + for (const id of chunk.moduleIds) { + const module = this.getModuleInfo(id); + if (!module) continue; + if (module.importers.length && module.dynamicImporters.length) { + const detectedIneffectiveDynamicImport = module.dynamicImporters.some( + (id2) => !isInNodeModules$1(id2) && chunk.moduleIds.includes(id2) + ); + if (detectedIneffectiveDynamicImport) { + this.warn( + ` +(!) ${module.id} is dynamically imported by ${module.dynamicImporters.join( + ", " + )} but also statically imported by ${module.importers.join( + ", " + )}, dynamic import will not move module into another chunk. +` + ); + } + } + } + } + chunksReporter(this).register(); + }, + generateBundle() { + if (shouldLogInfo && tty) clearLine$1(); + }, + async writeBundle({ dir }, output) { + await chunksReporter(this).log(output, dir); + } + }; +} +function writeLine(output) { + clearLine$1(); + if (output.length < process.stdout.columns) { + process.stdout.write(output); + } else { + process.stdout.write(output.substring(0, process.stdout.columns - 1)); + } +} +function clearLine$1() { + process.stdout.clearLine(0); + process.stdout.cursorTo(0); +} +function throttle(fn) { + let timerHandle = null; + return (...args) => { + if (timerHandle) return; + fn(...args); + timerHandle = setTimeout(() => { + timerHandle = null; + }, 100); + }; +} + +const POSIX_SEP_RE = new RegExp('\\' + path$b.posix.sep, 'g'); +const NATIVE_SEP_RE = new RegExp('\\' + path$b.sep, 'g'); +/** @type {Map}*/ +const PATTERN_REGEX_CACHE = new Map(); +const GLOB_ALL_PATTERN = `**/*`; +const TS_EXTENSIONS = ['.ts', '.tsx', '.mts', '.cts']; +const JS_EXTENSIONS = ['.js', '.jsx', '.mjs', '.cjs']; +const TSJS_EXTENSIONS = TS_EXTENSIONS.concat(JS_EXTENSIONS); +const TS_EXTENSIONS_RE_GROUP = `\\.(?:${TS_EXTENSIONS.map((ext) => ext.substring(1)).join('|')})`; +const TSJS_EXTENSIONS_RE_GROUP = `\\.(?:${TSJS_EXTENSIONS.map((ext) => ext.substring(1)).join( + '|' +)})`; +const IS_POSIX = path$b.posix.sep === path$b.sep; + +/** + * @template T + * @returns {{resolve:(result:T)=>void, reject:(error:any)=>void, promise: Promise}} + */ +function makePromise() { + let resolve, reject; + const promise = new Promise((res, rej) => { + resolve = res; + reject = rej; + }); + return { promise, resolve, reject }; +} + +/** + * @param {string} filename + * @param {import('./cache.js').TSConfckCache} [cache] + * @returns {Promise} + */ +async function resolveTSConfigJson(filename, cache) { + if (path$b.extname(filename) !== '.json') { + return; // ignore files that are not json + } + const tsconfig = path$b.resolve(filename); + if (cache && (cache.hasParseResult(tsconfig) || cache.hasParseResult(filename))) { + return tsconfig; + } + return promises$1.stat(tsconfig).then((stat) => { + if (stat.isFile() || stat.isFIFO()) { + return tsconfig; + } else { + throw new Error(`${filename} exists but is not a regular file.`); + } + }); +} + +/** + * + * @param {string} dir an absolute directory path + * @returns {boolean} if dir path includes a node_modules segment + */ +const isInNodeModules = IS_POSIX + ? (dir) => dir.includes('/node_modules/') + : (dir) => dir.match(/[/\\]node_modules[/\\]/); + +/** + * convert posix separator to native separator + * + * eg. + * windows: C:/foo/bar -> c:\foo\bar + * linux: /foo/bar -> /foo/bar + * + * @param {string} filename with posix separators + * @returns {string} filename with native separators + */ +const posix2native = IS_POSIX + ? (filename) => filename + : (filename) => filename.replace(POSIX_SEP_RE, path$b.sep); + +/** + * convert native separator to posix separator + * + * eg. + * windows: C:\foo\bar -> c:/foo/bar + * linux: /foo/bar -> /foo/bar + * + * @param {string} filename - filename with native separators + * @returns {string} filename with posix separators + */ +const native2posix = IS_POSIX + ? (filename) => filename + : (filename) => filename.replace(NATIVE_SEP_RE, path$b.posix.sep); + +/** + * converts params to native separator, resolves path and converts native back to posix + * + * needed on windows to handle posix paths in tsconfig + * + * @param dir {string|null} directory to resolve from + * @param filename {string} filename or pattern to resolve + * @returns string + */ +const resolve2posix = IS_POSIX + ? (dir, filename) => (dir ? path$b.resolve(dir, filename) : path$b.resolve(filename)) + : (dir, filename) => + native2posix( + dir + ? path$b.resolve(posix2native(dir), posix2native(filename)) + : path$b.resolve(posix2native(filename)) + ); + +/** + * + * @param {import('./public.d.ts').TSConfckParseResult} result + * @param {import('./public.d.ts').TSConfckParseOptions} [options] + * @returns {string[]} + */ +function resolveReferencedTSConfigFiles(result, options) { + const dir = path$b.dirname(result.tsconfigFile); + return result.tsconfig.references.map((ref) => { + const refPath = ref.path.endsWith('.json') + ? ref.path + : path$b.join(ref.path, options?.configName ?? 'tsconfig.json'); + return resolve2posix(dir, refPath); + }); +} + +/** + * @param {string} filename + * @param {import('./public.d.ts').TSConfckParseResult} result + * @returns {import('./public.d.ts').TSConfckParseResult} + */ +function resolveSolutionTSConfig(filename, result) { + const allowJs = result.tsconfig.compilerOptions?.allowJs; + const extensions = allowJs ? TSJS_EXTENSIONS : TS_EXTENSIONS; + if ( + result.referenced && + extensions.some((ext) => filename.endsWith(ext)) && + !isIncluded(filename, result) + ) { + const solutionTSConfig = result.referenced.find((referenced) => + isIncluded(filename, referenced) + ); + if (solutionTSConfig) { + return solutionTSConfig; + } + } + return result; +} + +/** + * + * @param {string} filename + * @param {import('./public.d.ts').TSConfckParseResult} result + * @returns {boolean} + */ +function isIncluded(filename, result) { + const dir = native2posix(path$b.dirname(result.tsconfigFile)); + const files = (result.tsconfig.files || []).map((file) => resolve2posix(dir, file)); + const absoluteFilename = resolve2posix(null, filename); + if (files.includes(filename)) { + return true; + } + const allowJs = result.tsconfig.compilerOptions?.allowJs; + const isIncluded = isGlobMatch( + absoluteFilename, + dir, + result.tsconfig.include || (result.tsconfig.files ? [] : [GLOB_ALL_PATTERN]), + allowJs + ); + if (isIncluded) { + const isExcluded = isGlobMatch(absoluteFilename, dir, result.tsconfig.exclude || [], allowJs); + return !isExcluded; + } + return false; +} + +/** + * test filenames agains glob patterns in tsconfig + * + * @param filename {string} posix style abolute path to filename to test + * @param dir {string} posix style absolute path to directory of tsconfig containing patterns + * @param patterns {string[]} glob patterns to match against + * @param allowJs {boolean} allowJs setting in tsconfig to include js extensions in checks + * @returns {boolean} true when at least one pattern matches filename + */ +function isGlobMatch(filename, dir, patterns, allowJs) { + const extensions = allowJs ? TSJS_EXTENSIONS : TS_EXTENSIONS; + return patterns.some((pattern) => { + // filename must end with part of pattern that comes after last wildcard + let lastWildcardIndex = pattern.length; + let hasWildcard = false; + let hasExtension = false; + let hasSlash = false; + let lastSlashIndex = -1; + for (let i = pattern.length - 1; i > -1; i--) { + const c = pattern[i]; + if (!hasWildcard) { + if (c === '*' || c === '?') { + lastWildcardIndex = i; + hasWildcard = true; + } + } + if (!hasSlash) { + if (c === '.') { + hasExtension = true; + } else if (c === '/') { + lastSlashIndex = i; + hasSlash = true; + } + } + if (hasWildcard && hasSlash) { + break; + } + } + if (!hasExtension && (!hasWildcard || lastWildcardIndex < lastSlashIndex)) { + // add implicit glob + pattern += `${pattern.endsWith('/') ? '' : '/'}${GLOB_ALL_PATTERN}`; + lastWildcardIndex = pattern.length - 1; + hasWildcard = true; + } + + // if pattern does not end with wildcard, filename must end with pattern after last wildcard + if ( + lastWildcardIndex < pattern.length - 1 && + !filename.endsWith(pattern.slice(lastWildcardIndex + 1)) + ) { + return false; + } + + // if pattern ends with *, filename must end with a default extension + if (pattern.endsWith('*') && !extensions.some((ext) => filename.endsWith(ext))) { + return false; + } + + // for **/* , filename must start with the dir + if (pattern === GLOB_ALL_PATTERN) { + return filename.startsWith(`${dir}/`); + } + + const resolvedPattern = resolve2posix(dir, pattern); + + // filename must start with part of pattern that comes before first wildcard + let firstWildcardIndex = -1; + for (let i = 0; i < resolvedPattern.length; i++) { + if (resolvedPattern[i] === '*' || resolvedPattern[i] === '?') { + firstWildcardIndex = i; + hasWildcard = true; + break; + } + } + if ( + firstWildcardIndex > 1 && + !filename.startsWith(resolvedPattern.slice(0, firstWildcardIndex - 1)) + ) { + return false; + } + + if (!hasWildcard) { + // no wildcard in pattern, filename must be equal to resolved pattern + return filename === resolvedPattern; + } else if ( + firstWildcardIndex + GLOB_ALL_PATTERN.length === + resolvedPattern.length - (pattern.length - 1 - lastWildcardIndex) && + resolvedPattern.slice(firstWildcardIndex, firstWildcardIndex + GLOB_ALL_PATTERN.length) === + GLOB_ALL_PATTERN + ) { + // singular glob-all pattern and we already validated prefix and suffix matches + return true; + } + // complex pattern, use regex to check it + if (PATTERN_REGEX_CACHE.has(resolvedPattern)) { + return PATTERN_REGEX_CACHE.get(resolvedPattern).test(filename); + } + const regex = pattern2regex(resolvedPattern, allowJs); + PATTERN_REGEX_CACHE.set(resolvedPattern, regex); + return regex.test(filename); + }); +} + +/** + * @param {string} resolvedPattern + * @param {boolean} allowJs + * @returns {RegExp} + */ +function pattern2regex(resolvedPattern, allowJs) { + let regexStr = '^'; + for (let i = 0; i < resolvedPattern.length; i++) { + const char = resolvedPattern[i]; + if (char === '?') { + regexStr += '[^\\/]'; + continue; + } + if (char === '*') { + if (resolvedPattern[i + 1] === '*' && resolvedPattern[i + 2] === '/') { + i += 2; + regexStr += '(?:[^\\/]*\\/)*'; // zero or more path segments + continue; + } + regexStr += '[^\\/]*'; + continue; + } + if ('/.+^${}()|[]\\'.includes(char)) { + regexStr += `\\`; + } + regexStr += char; + } + + // add known file endings if pattern ends on * + if (resolvedPattern.endsWith('*')) { + regexStr += allowJs ? TSJS_EXTENSIONS_RE_GROUP : TS_EXTENSIONS_RE_GROUP; + } + regexStr += '$'; + + return new RegExp(regexStr); +} + +/** + * replace tokens like ${configDir} + * @param {import('./public.d.ts').TSConfckParseResult} result + */ +function replaceTokens(result) { + if (result.tsconfig) { + result.tsconfig = JSON.parse( + JSON.stringify(result.tsconfig) + // replace ${configDir} + .replaceAll(/"\${configDir}/g, `"${native2posix(path$b.dirname(result.tsconfigFile))}`) + ); + } +} + +/** + * find the closest tsconfig.json file + * + * @param {string} filename - path to file to find tsconfig for (absolute or relative to cwd) + * @param {import('./public.d.ts').TSConfckFindOptions} [options] - options + * @returns {Promise} absolute path to closest tsconfig.json or null if not found + */ +async function find(filename, options) { + let dir = path$b.dirname(path$b.resolve(filename)); + if (isInNodeModules(dir)) { + return null; + } + const cache = options?.cache; + const configName = options?.configName ?? 'tsconfig.json'; + if (cache?.hasConfigPath(dir, configName)) { + return cache.getConfigPath(dir, configName); + } + const { /** @type {Promise} */ promise, resolve, reject } = makePromise(); + if (options?.root && !path$b.isAbsolute(options.root)) { + options.root = path$b.resolve(options.root); + } + findUp(dir, { promise, resolve, reject }, options); + return promise; +} + +/** + * + * @param {string} dir + * @param {{promise:Promise,resolve:(result:string|null)=>void,reject:(err:any)=>void}} madePromise + * @param {import('./public.d.ts').TSConfckFindOptions} [options] - options + */ +function findUp(dir, { resolve, reject, promise }, options) { + const { cache, root, configName } = options ?? {}; + if (cache) { + if (cache.hasConfigPath(dir, configName)) { + let cached; + try { + cached = cache.getConfigPath(dir, configName); + } catch (e) { + reject(e); + return; + } + if (cached?.then) { + cached.then(resolve).catch(reject); + } else { + resolve(cached); + } + } else { + cache.setConfigPath(dir, promise, configName); + } + } + const tsconfig = path$b.join(dir, options?.configName ?? 'tsconfig.json'); + fs__default.stat(tsconfig, (err, stats) => { + if (stats && (stats.isFile() || stats.isFIFO())) { + resolve(tsconfig); + } else if (err?.code !== 'ENOENT') { + reject(err); + } else { + let parent; + if (root === dir || (parent = path$b.dirname(dir)) === dir) { + resolve(null); + } else { + findUp(parent, { promise, resolve, reject }, options); + } + } + }); +} + +/* + this file contains code from strip-bom and strip-json-comments by Sindre Sorhus + https://github.com/sindresorhus/strip-json-comments/blob/v4.0.0/index.js + https://github.com/sindresorhus/strip-bom/blob/v5.0.0/index.js + licensed under MIT, see ../LICENSE +*/ + +/** + * convert content of tsconfig.json to regular json + * + * @param {string} tsconfigJson - content of tsconfig.json + * @returns {string} content as regular json, comments and dangling commas have been replaced with whitespace + */ +function toJson(tsconfigJson) { + const stripped = stripDanglingComma(stripJsonComments(stripBom(tsconfigJson))); + if (stripped.trim() === '') { + // only whitespace left after stripping, return empty object so that JSON.parse still works + return '{}'; + } else { + return stripped; + } +} + +/** + * replace dangling commas from pseudo-json string with single space + * implementation heavily inspired by strip-json-comments + * + * @param {string} pseudoJson + * @returns {string} + */ +function stripDanglingComma(pseudoJson) { + let insideString = false; + let offset = 0; + let result = ''; + let danglingCommaPos = null; + for (let i = 0; i < pseudoJson.length; i++) { + const currentCharacter = pseudoJson[i]; + if (currentCharacter === '"') { + const escaped = isEscaped(pseudoJson, i); + if (!escaped) { + insideString = !insideString; + } + } + if (insideString) { + danglingCommaPos = null; + continue; + } + if (currentCharacter === ',') { + danglingCommaPos = i; + continue; + } + if (danglingCommaPos) { + if (currentCharacter === '}' || currentCharacter === ']') { + result += pseudoJson.slice(offset, danglingCommaPos) + ' '; + offset = danglingCommaPos + 1; + danglingCommaPos = null; + } else if (!currentCharacter.match(/\s/)) { + danglingCommaPos = null; + } + } + } + return result + pseudoJson.substring(offset); +} + +// start strip-json-comments +/** + * + * @param {string} jsonString + * @param {number} quotePosition + * @returns {boolean} + */ +function isEscaped(jsonString, quotePosition) { + let index = quotePosition - 1; + let backslashCount = 0; + + while (jsonString[index] === '\\') { + index -= 1; + backslashCount += 1; + } + + return Boolean(backslashCount % 2); +} + +/** + * + * @param {string} string + * @param {number?} start + * @param {number?} end + */ +function strip(string, start, end) { + return string.slice(start, end).replace(/\S/g, ' '); +} + +const singleComment = Symbol('singleComment'); +const multiComment = Symbol('multiComment'); + +/** + * @param {string} jsonString + * @returns {string} + */ +function stripJsonComments(jsonString) { + let isInsideString = false; + /** @type {false | symbol} */ + let isInsideComment = false; + let offset = 0; + let result = ''; + + for (let index = 0; index < jsonString.length; index++) { + const currentCharacter = jsonString[index]; + const nextCharacter = jsonString[index + 1]; + + if (!isInsideComment && currentCharacter === '"') { + const escaped = isEscaped(jsonString, index); + if (!escaped) { + isInsideString = !isInsideString; + } + } + + if (isInsideString) { + continue; + } + + if (!isInsideComment && currentCharacter + nextCharacter === '//') { + result += jsonString.slice(offset, index); + offset = index; + isInsideComment = singleComment; + index++; + } else if (isInsideComment === singleComment && currentCharacter + nextCharacter === '\r\n') { + index++; + isInsideComment = false; + result += strip(jsonString, offset, index); + offset = index; + } else if (isInsideComment === singleComment && currentCharacter === '\n') { + isInsideComment = false; + result += strip(jsonString, offset, index); + offset = index; + } else if (!isInsideComment && currentCharacter + nextCharacter === '/*') { + result += jsonString.slice(offset, index); + offset = index; + isInsideComment = multiComment; + index++; + } else if (isInsideComment === multiComment && currentCharacter + nextCharacter === '*/') { + index++; + isInsideComment = false; + result += strip(jsonString, offset, index + 1); + offset = index + 1; + } + } + + return result + (isInsideComment ? strip(jsonString.slice(offset)) : jsonString.slice(offset)); +} +// end strip-json-comments + +// start strip-bom +/** + * @param {string} string + * @returns {string} + */ +function stripBom(string) { + // Catches EFBBBF (UTF-8 BOM) because the buffer-to-string + // conversion translates it to FEFF (UTF-16 BOM). + if (string.charCodeAt(0) === 0xfeff) { + return string.slice(1); + } + return string; +} +// end strip-bom + +const not_found_result = { + tsconfigFile: null, + tsconfig: {} +}; + +/** + * parse the closest tsconfig.json file + * + * @param {string} filename - path to a tsconfig .json or a source file or directory (absolute or relative to cwd) + * @param {import('./public.d.ts').TSConfckParseOptions} [options] - options + * @returns {Promise} + * @throws {TSConfckParseError} + */ +async function parse$e(filename, options) { + /** @type {import('./cache.js').TSConfckCache} */ + const cache = options?.cache; + if (cache?.hasParseResult(filename)) { + return getParsedDeep(filename, cache, options); + } + const { + resolve, + reject, + /** @type {Promise}*/ + promise + } = makePromise(); + cache?.setParseResult(filename, promise, true); + try { + let tsconfigFile = + (await resolveTSConfigJson(filename, cache)) || (await find(filename, options)); + if (!tsconfigFile) { + resolve(not_found_result); + return promise; + } + let result; + if (filename !== tsconfigFile && cache?.hasParseResult(tsconfigFile)) { + result = await getParsedDeep(tsconfigFile, cache, options); + } else { + result = await parseFile$1(tsconfigFile, cache, filename === tsconfigFile); + await Promise.all([parseExtends(result, cache), parseReferences(result, options)]); + } + replaceTokens(result); + resolve(resolveSolutionTSConfig(filename, result)); + } catch (e) { + reject(e); + } + return promise; +} + +/** + * ensure extends and references are parsed + * + * @param {string} filename - cached file + * @param {import('./cache.js').TSConfckCache} cache - cache + * @param {import('./public.d.ts').TSConfckParseOptions} options - options + */ +async function getParsedDeep(filename, cache, options) { + const result = await cache.getParseResult(filename); + if ( + (result.tsconfig.extends && !result.extended) || + (result.tsconfig.references && !result.referenced) + ) { + const promise = Promise.all([ + parseExtends(result, cache), + parseReferences(result, options) + ]).then(() => result); + cache.setParseResult(filename, promise, true); + return promise; + } + return result; +} + +/** + * + * @param {string} tsconfigFile - path to tsconfig file + * @param {import('./cache.js').TSConfckCache} [cache] - cache + * @param {boolean} [skipCache] - skip cache + * @returns {Promise} + */ +async function parseFile$1(tsconfigFile, cache, skipCache) { + if ( + !skipCache && + cache?.hasParseResult(tsconfigFile) && + !cache.getParseResult(tsconfigFile)._isRootFile_ + ) { + return cache.getParseResult(tsconfigFile); + } + const promise = promises$1 + .readFile(tsconfigFile, 'utf-8') + .then(toJson) + .then((json) => { + const parsed = JSON.parse(json); + applyDefaults(parsed, tsconfigFile); + return { + tsconfigFile, + tsconfig: normalizeTSConfig(parsed, path$b.dirname(tsconfigFile)) + }; + }) + .catch((e) => { + throw new TSConfckParseError( + `parsing ${tsconfigFile} failed: ${e}`, + 'PARSE_FILE', + tsconfigFile, + e + ); + }); + if ( + !skipCache && + (!cache?.hasParseResult(tsconfigFile) || !cache.getParseResult(tsconfigFile)._isRootFile_) + ) { + cache?.setParseResult(tsconfigFile, promise); + } + return promise; +} + +/** + * normalize to match the output of ts.parseJsonConfigFileContent + * + * @param {any} tsconfig - typescript tsconfig output + * @param {string} dir - directory + */ +function normalizeTSConfig(tsconfig, dir) { + // set baseUrl to absolute path + const baseUrl = tsconfig.compilerOptions?.baseUrl; + if (baseUrl && !baseUrl.startsWith('${') && !path$b.isAbsolute(baseUrl)) { + tsconfig.compilerOptions.baseUrl = resolve2posix(dir, baseUrl); + } + return tsconfig; +} + +/** + * + * @param {import('./public.d.ts').TSConfckParseResult} result + * @param {import('./public.d.ts').TSConfckParseOptions} [options] + * @returns {Promise} + */ +async function parseReferences(result, options) { + if (!result.tsconfig.references) { + return; + } + const referencedFiles = resolveReferencedTSConfigFiles(result, options); + const referenced = await Promise.all( + referencedFiles.map((file) => parseFile$1(file, options?.cache)) + ); + await Promise.all(referenced.map((ref) => parseExtends(ref, options?.cache))); + referenced.forEach((ref) => { + ref.solution = result; + replaceTokens(ref); + }); + result.referenced = referenced; +} + +/** + * @param {import('./public.d.ts').TSConfckParseResult} result + * @param {import('./cache.js').TSConfckCache}[cache] + * @returns {Promise} + */ +async function parseExtends(result, cache) { + if (!result.tsconfig.extends) { + return; + } + // use result as first element in extended + // but dereference tsconfig so that mergeExtended can modify the original without affecting extended[0] + /** @type {import('./public.d.ts').TSConfckParseResult[]} */ + const extended = [ + { tsconfigFile: result.tsconfigFile, tsconfig: JSON.parse(JSON.stringify(result.tsconfig)) } + ]; + + // flatten extends graph into extended + let pos = 0; + /** @type {string[]} */ + const extendsPath = []; + let currentBranchDepth = 0; + while (pos < extended.length) { + const extending = extended[pos]; + extendsPath.push(extending.tsconfigFile); + if (extending.tsconfig.extends) { + // keep following this branch + currentBranchDepth += 1; + /** @type {string[]} */ + let resolvedExtends; + if (!Array.isArray(extending.tsconfig.extends)) { + resolvedExtends = [resolveExtends(extending.tsconfig.extends, extending.tsconfigFile)]; + } else { + // reverse because typescript 5.0 treats ['a','b','c'] as c extends b extends a + resolvedExtends = extending.tsconfig.extends + .reverse() + .map((ex) => resolveExtends(ex, extending.tsconfigFile)); + } + + const circularExtends = resolvedExtends.find((tsconfigFile) => + extendsPath.includes(tsconfigFile) + ); + if (circularExtends) { + const circle = extendsPath.concat([circularExtends]).join(' -> '); + throw new TSConfckParseError( + `Circular dependency in "extends": ${circle}`, + 'EXTENDS_CIRCULAR', + result.tsconfigFile + ); + } + // add new extends to the list directly after current + extended.splice( + pos + 1, + 0, + ...(await Promise.all(resolvedExtends.map((file) => parseFile$1(file, cache)))) + ); + } else { + // reached a leaf, backtrack to the last branching point and continue + extendsPath.splice(-currentBranchDepth); + currentBranchDepth = 0; + } + pos = pos + 1; + } + result.extended = extended; + // skip first as it is the original config + for (const ext of result.extended.slice(1)) { + extendTSConfig(result, ext); + } +} + +/** + * + * @param {string} extended + * @param {string} from + * @returns {string} + */ +function resolveExtends(extended, from) { + if (extended === '..') { + // see #149 + extended = '../tsconfig.json'; + } + const req = createRequire$2(from); + let error; + try { + return req.resolve(extended); + } catch (e) { + error = e; + } + if (extended[0] !== '.' && !path$b.isAbsolute(extended)) { + try { + return req.resolve(`${extended}/tsconfig.json`); + } catch (e) { + error = e; + } + } + + throw new TSConfckParseError( + `failed to resolve "extends":"${extended}" in ${from}`, + 'EXTENDS_RESOLVE', + from, + error + ); +} + +// references, extends and custom keys are not carried over +const EXTENDABLE_KEYS = [ + 'compilerOptions', + 'files', + 'include', + 'exclude', + 'watchOptions', + 'compileOnSave', + 'typeAcquisition', + 'buildOptions' +]; + +/** + * + * @param {import('./public.d.ts').TSConfckParseResult} extending + * @param {import('./public.d.ts').TSConfckParseResult} extended + * @returns void + */ +function extendTSConfig(extending, extended) { + const extendingConfig = extending.tsconfig; + const extendedConfig = extended.tsconfig; + const relativePath = native2posix( + path$b.relative(path$b.dirname(extending.tsconfigFile), path$b.dirname(extended.tsconfigFile)) + ); + for (const key of Object.keys(extendedConfig).filter((key) => EXTENDABLE_KEYS.includes(key))) { + if (key === 'compilerOptions') { + if (!extendingConfig.compilerOptions) { + extendingConfig.compilerOptions = {}; + } + for (const option of Object.keys(extendedConfig.compilerOptions)) { + if (Object.prototype.hasOwnProperty.call(extendingConfig.compilerOptions, option)) { + continue; // already set + } + extendingConfig.compilerOptions[option] = rebaseRelative( + option, + extendedConfig.compilerOptions[option], + relativePath + ); + } + } else if (extendingConfig[key] === undefined) { + if (key === 'watchOptions') { + extendingConfig.watchOptions = {}; + for (const option of Object.keys(extendedConfig.watchOptions)) { + extendingConfig.watchOptions[option] = rebaseRelative( + option, + extendedConfig.watchOptions[option], + relativePath + ); + } + } else { + extendingConfig[key] = rebaseRelative(key, extendedConfig[key], relativePath); + } + } + } +} + +const REBASE_KEYS = [ + // root + 'files', + 'include', + 'exclude', + // compilerOptions + 'baseUrl', + 'rootDir', + 'rootDirs', + 'typeRoots', + 'outDir', + 'outFile', + 'declarationDir', + // watchOptions + 'excludeDirectories', + 'excludeFiles' +]; + +/** @typedef {string | string[]} PathValue */ + +/** + * + * @param {string} key + * @param {PathValue} value + * @param {string} prependPath + * @returns {PathValue} + */ +function rebaseRelative(key, value, prependPath) { + if (!REBASE_KEYS.includes(key)) { + return value; + } + if (Array.isArray(value)) { + return value.map((x) => rebasePath(x, prependPath)); + } else { + return rebasePath(value, prependPath); + } +} + +/** + * + * @param {string} value + * @param {string} prependPath + * @returns {string} + */ +function rebasePath(value, prependPath) { + if (path$b.isAbsolute(value) || value.startsWith('${configDir}')) { + return value; + } else { + // relative paths use posix syntax in tsconfig + return path$b.posix.normalize(path$b.posix.join(prependPath, value)); + } +} + +class TSConfckParseError extends Error { + /** + * error code + * @type {string} + */ + code; + /** + * error cause + * @type { Error | undefined} + */ + cause; + + /** + * absolute path of tsconfig file where the error happened + * @type {string} + */ + tsconfigFile; + /** + * + * @param {string} message - error message + * @param {string} code - error code + * @param {string} tsconfigFile - path to tsconfig file + * @param {Error?} cause - cause of this error + */ + constructor(message, code, tsconfigFile, cause) { + super(message); + // Set the prototype explicitly. + Object.setPrototypeOf(this, TSConfckParseError.prototype); + this.name = TSConfckParseError.name; + this.code = code; + this.cause = cause; + this.tsconfigFile = tsconfigFile; + } +} + +/** + * + * @param {any} tsconfig + * @param {string} tsconfigFile + */ +function applyDefaults(tsconfig, tsconfigFile) { + if (isJSConfig(tsconfigFile)) { + tsconfig.compilerOptions = { + ...DEFAULT_JSCONFIG_COMPILER_OPTIONS, + ...tsconfig.compilerOptions + }; + } +} + +const DEFAULT_JSCONFIG_COMPILER_OPTIONS = { + allowJs: true, + maxNodeModuleJsDepth: 2, + allowSyntheticDefaultImports: true, + skipLibCheck: true, + noEmit: true +}; + +/** + * @param {string} configFileName + */ +function isJSConfig(configFileName) { + return path$b.basename(configFileName) === 'jsconfig.json'; +} + +/** @template T */ +class TSConfckCache { + /** + * clear cache, use this if you have a long running process and tsconfig files have been added,changed or deleted + */ + clear() { + this.#configPaths.clear(); + this.#parsed.clear(); + } + + /** + * has cached closest config for files in dir + * @param {string} dir + * @param {string} [configName=tsconfig.json] + * @returns {boolean} + */ + hasConfigPath(dir, configName = 'tsconfig.json') { + return this.#configPaths.has(`${dir}/${configName}`); + } + + /** + * get cached closest tsconfig for files in dir + * @param {string} dir + * @param {string} [configName=tsconfig.json] + * @returns {Promise|string|null} + * @throws {unknown} if cached value is an error + */ + getConfigPath(dir, configName = 'tsconfig.json') { + const key = `${dir}/${configName}`; + const value = this.#configPaths.get(key); + if (value == null || value.length || value.then) { + return value; + } else { + throw value; + } + } + + /** + * has parsed tsconfig for file + * @param {string} file + * @returns {boolean} + */ + hasParseResult(file) { + return this.#parsed.has(file); + } + + /** + * get parsed tsconfig for file + * @param {string} file + * @returns {Promise|T} + * @throws {unknown} if cached value is an error + */ + getParseResult(file) { + const value = this.#parsed.get(file); + if (value.then || value.tsconfig) { + return value; + } else { + throw value; // cached error, rethrow + } + } + + /** + * @internal + * @private + * @param file + * @param {boolean} isRootFile a flag to check if current file which involking the parse() api, used to distinguish the normal cache which only parsed by parseFile() + * @param {Promise} result + */ + setParseResult(file, result, isRootFile = false) { + // _isRootFile_ is a temporary property for Promise result, used to prevent deadlock with cache + Object.defineProperty(result, '_isRootFile_', { + value: isRootFile, + writable: false, + enumerable: false, + configurable: false + }); + this.#parsed.set(file, result); + result + .then((parsed) => { + if (this.#parsed.get(file) === result) { + this.#parsed.set(file, parsed); + } + }) + .catch((e) => { + if (this.#parsed.get(file) === result) { + this.#parsed.set(file, e); + } + }); + } + + /** + * @internal + * @private + * @param {string} dir + * @param {Promise} configPath + * @param {string} [configName=tsconfig.json] + */ + setConfigPath(dir, configPath, configName = 'tsconfig.json') { + const key = `${dir}/${configName}`; + this.#configPaths.set(key, configPath); + configPath + .then((path) => { + if (this.#configPaths.get(key) === configPath) { + this.#configPaths.set(key, path); + } + }) + .catch((e) => { + if (this.#configPaths.get(key) === configPath) { + this.#configPaths.set(key, e); + } + }); + } + + /** + * map directories to their closest tsconfig.json + * @internal + * @private + * @type{Map|string|null)>} + */ + #configPaths = new Map(); + + /** + * map files to their parsed tsconfig result + * @internal + * @private + * @type {Map|T)> } + */ + #parsed = new Map(); +} + +const debug$i = createDebugger("vite:esbuild"); +const IIFE_BEGIN_RE = /(?:const|var)\s+\S+\s*=\s*function\([^()]*\)\s*\{\s*"use strict";/; +const validExtensionRE = /\.\w+$/; +const jsxExtensionsRE = /\.(?:j|t)sx\b/; +const defaultEsbuildSupported = { + "dynamic-import": true, + "import-meta": true +}; +async function transformWithEsbuild(code, filename, options, inMap, config, watcher) { + let loader = options?.loader; + if (!loader) { + const ext = path$b.extname(validExtensionRE.test(filename) ? filename : cleanUrl(filename)).slice(1); + if (ext === "cjs" || ext === "mjs") { + loader = "js"; + } else if (ext === "cts" || ext === "mts") { + loader = "ts"; + } else { + loader = ext; + } + } + let tsconfigRaw = options?.tsconfigRaw; + if (typeof tsconfigRaw !== "string") { + const meaningfulFields = [ + "alwaysStrict", + "experimentalDecorators", + "importsNotUsedAsValues", + "jsx", + "jsxFactory", + "jsxFragmentFactory", + "jsxImportSource", + "preserveValueImports", + "target", + "useDefineForClassFields", + "verbatimModuleSyntax" + ]; + const compilerOptionsForFile = {}; + if (loader === "ts" || loader === "tsx") { + try { + const { tsconfig: loadedTsconfig, tsconfigFile } = await loadTsconfigJsonForFile(filename, config); + if (watcher && tsconfigFile && config) { + ensureWatchedFile(watcher, tsconfigFile, config.root); + } + const loadedCompilerOptions = loadedTsconfig.compilerOptions ?? {}; + for (const field of meaningfulFields) { + if (field in loadedCompilerOptions) { + compilerOptionsForFile[field] = loadedCompilerOptions[field]; + } + } + } catch (e) { + if (e instanceof TSConfckParseError) { + if (watcher && e.tsconfigFile && config) { + ensureWatchedFile(watcher, e.tsconfigFile, config.root); + } + } + throw e; + } + } + const compilerOptions = { + ...compilerOptionsForFile, + ...tsconfigRaw?.compilerOptions + }; + if (compilerOptions.useDefineForClassFields === void 0 && compilerOptions.target === void 0) { + compilerOptions.useDefineForClassFields = false; + } + if (options) { + if (options.jsx) compilerOptions.jsx = void 0; + if (options.jsxFactory) compilerOptions.jsxFactory = void 0; + if (options.jsxFragment) compilerOptions.jsxFragmentFactory = void 0; + if (options.jsxImportSource) compilerOptions.jsxImportSource = void 0; + } + tsconfigRaw = { + ...tsconfigRaw, + compilerOptions + }; + } + const resolvedOptions = { + sourcemap: true, + // ensure source file name contains full query + sourcefile: filename, + ...options, + loader, + tsconfigRaw + }; + delete resolvedOptions.include; + delete resolvedOptions.exclude; + delete resolvedOptions.jsxInject; + try { + const result = await transform$1(code, resolvedOptions); + let map; + if (inMap && resolvedOptions.sourcemap) { + const nextMap = JSON.parse(result.map); + nextMap.sourcesContent = []; + map = combineSourcemaps(filename, [ + nextMap, + inMap + ]); + } else { + map = resolvedOptions.sourcemap && resolvedOptions.sourcemap !== "inline" ? JSON.parse(result.map) : { mappings: "" }; + } + return { + ...result, + map + }; + } catch (e) { + debug$i?.(`esbuild error with options used: `, resolvedOptions); + if (e.errors) { + e.frame = ""; + e.errors.forEach((m) => { + if (m.text === "Experimental decorators are not currently enabled" || m.text === "Parameter decorators only work when experimental decorators are enabled") { + m.text += '. Vite 5 now uses esbuild 0.18 and you need to enable them by adding "experimentalDecorators": true in your "tsconfig.json" file.'; + } + e.frame += ` +` + prettifyMessage(m, code); + }); + e.loc = e.errors[0].location; + } + throw e; + } +} +function esbuildPlugin(config) { + const options = config.esbuild; + const { jsxInject, include, exclude, ...esbuildTransformOptions } = options; + const filter = createFilter$1(include || /\.(m?ts|[jt]sx)$/, exclude || /\.js$/); + const transformOptions = { + target: "esnext", + charset: "utf8", + ...esbuildTransformOptions, + minify: false, + minifyIdentifiers: false, + minifySyntax: false, + minifyWhitespace: false, + treeShaking: false, + // keepNames is not needed when minify is disabled. + // Also transforming multiple times with keepNames enabled breaks + // tree-shaking. (#9164) + keepNames: false, + supported: { + ...defaultEsbuildSupported, + ...esbuildTransformOptions.supported + } + }; + let server; + return { + name: "vite:esbuild", + configureServer(_server) { + server = _server; + }, + async transform(code, id) { + if (filter(id) || filter(cleanUrl(id))) { + const result = await transformWithEsbuild( + code, + id, + transformOptions, + void 0, + config, + server?.watcher + ); + if (result.warnings.length) { + result.warnings.forEach((m) => { + this.warn(prettifyMessage(m, code)); + }); + } + if (jsxInject && jsxExtensionsRE.test(id)) { + result.code = jsxInject + ";" + result.code; + } + return { + code: result.code, + map: result.map + }; + } + } + }; +} +const rollupToEsbuildFormatMap = { + es: "esm", + cjs: "cjs", + // passing `var Lib = (() => {})()` to esbuild with format = "iife" + // will turn it to `(() => { var Lib = (() => {})() })()`, + // so we remove the format config to tell esbuild not doing this + // + // although esbuild doesn't change format, there is still possibility + // that `{ treeShaking: true }` removes a top-level no-side-effect variable + // like: `var Lib = 1`, which becomes `` after esbuild transforming, + // but thankfully rollup does not do this optimization now + iife: void 0 +}; +const buildEsbuildPlugin = () => { + return { + name: "vite:esbuild-transpile", + applyToEnvironment(environment) { + return environment.config.esbuild !== false; + }, + async renderChunk(code, chunk, opts) { + if (opts.__vite_skip_esbuild__) { + return null; + } + const config = this.environment.config; + const options = resolveEsbuildTranspileOptions(config, opts.format); + if (!options) { + return null; + } + const res = await transformWithEsbuild( + code, + chunk.fileName, + options, + void 0, + config + ); + if (config.build.lib) { + const esbuildCode = res.code; + const contentIndex = opts.format === "iife" ? Math.max(esbuildCode.search(IIFE_BEGIN_RE), 0) : opts.format === "umd" ? esbuildCode.indexOf(`(function(`) : 0; + if (contentIndex > 0) { + const esbuildHelpers = esbuildCode.slice(0, contentIndex); + res.code = esbuildCode.slice(contentIndex).replace(`"use strict";`, `"use strict";` + esbuildHelpers); + } + } + return res; + } + }; +}; +function resolveEsbuildTranspileOptions(config, format) { + const target = config.build.target; + const minify = config.build.minify === "esbuild"; + if ((!target || target === "esnext") && !minify) { + return null; + } + const isEsLibBuild = config.build.lib && format === "es"; + const esbuildOptions = config.esbuild || {}; + const options = { + charset: "utf8", + ...esbuildOptions, + loader: "js", + target: target || void 0, + format: rollupToEsbuildFormatMap[format], + supported: { + ...defaultEsbuildSupported, + ...esbuildOptions.supported + } + }; + if (!minify) { + return { + ...options, + minify: false, + minifyIdentifiers: false, + minifySyntax: false, + minifyWhitespace: false, + treeShaking: false + }; + } + if (options.minifyIdentifiers != null || options.minifySyntax != null || options.minifyWhitespace != null) { + if (isEsLibBuild) { + return { + ...options, + minify: false, + minifyIdentifiers: options.minifyIdentifiers ?? true, + minifySyntax: options.minifySyntax ?? true, + minifyWhitespace: false, + treeShaking: true + }; + } else { + return { + ...options, + minify: false, + minifyIdentifiers: options.minifyIdentifiers ?? true, + minifySyntax: options.minifySyntax ?? true, + minifyWhitespace: options.minifyWhitespace ?? true, + treeShaking: true + }; + } + } + if (isEsLibBuild) { + return { + ...options, + minify: false, + minifyIdentifiers: true, + minifySyntax: true, + minifyWhitespace: false, + treeShaking: true + }; + } else { + return { + ...options, + minify: true, + treeShaking: true + }; + } +} +function prettifyMessage(m, code) { + let res = colors$1.yellow(m.text); + if (m.location) { + res += ` +` + generateCodeFrame(code, m.location); + } + return res + ` +`; +} +let globalTSConfckCache; +const tsconfckCacheMap = /* @__PURE__ */ new WeakMap(); +function getTSConfckCache(config) { + if (!config) { + return globalTSConfckCache ??= new TSConfckCache(); + } + let cache = tsconfckCacheMap.get(config); + if (!cache) { + cache = new TSConfckCache(); + tsconfckCacheMap.set(config, cache); + } + return cache; +} +async function loadTsconfigJsonForFile(filename, config) { + const { tsconfig, tsconfigFile } = await parse$e(filename, { + cache: getTSConfckCache(config)}); + return { tsconfigFile, tsconfig }; +} +async function reloadOnTsconfigChange(server, changedFile) { + if (changedFile.endsWith(".json")) { + const cache = getTSConfckCache(server.config); + if (changedFile.endsWith("/tsconfig.json") || cache.hasParseResult(changedFile)) { + server.config.logger.info( + `changed tsconfig file detected: ${changedFile} - Clearing cache and forcing full-reload to ensure TypeScript is compiled with updated config values.`, + { clear: server.config.clearScreen, timestamp: true } + ); + for (const environment of Object.values(server.environments)) { + environment.moduleGraph.invalidateAll(); + } + cache.clear(); + for (const environment of Object.values(server.environments)) { + environment.hot.send({ + type: "full-reload", + path: "*" + }); + } + } + } +} + +// src/realWorker.ts + +// src/utils.ts +var AsyncFunction = async function() { +}.constructor; +var codeToDataUrl = (code) => `data:application/javascript,${encodeURIComponent(code + "\n//# sourceURL=[worker-eval(artichokie)]")}`; +var viteSsrDynamicImport = "__vite_ssr_dynamic_import__"; + +// src/realWorker.ts +var Worker = class { + /** @internal */ + _isModule; + /** @internal */ + _code; + /** @internal */ + _parentFunctions; + /** @internal */ + _max; + /** @internal */ + _pool; + /** @internal */ + _idlePool; + /** @internal */ + _queue; + constructor(fn, options = {}) { + this._isModule = options.type === "module"; + this._code = genWorkerCode( + fn, + this._isModule, + options.parentFunctions ?? {} + ); + this._parentFunctions = options.parentFunctions ?? {}; + const defaultMax = Math.max( + 1, + // os.availableParallelism is available from Node.js 18.14.0 + (os$3.availableParallelism?.() ?? os$3.cpus().length) - 1 + ); + this._max = options.max || defaultMax; + this._pool = []; + this._idlePool = []; + this._queue = []; + } + async run(...args) { + const worker = await this._getAvailableWorker(); + return new Promise((resolve, reject) => { + worker.currentResolve = resolve; + worker.currentReject = reject; + worker.postMessage({ args }); + }); + } + stop() { + this._pool.forEach((w) => w.unref()); + this._queue.forEach( + ([, reject]) => reject( + new Error("Main worker pool stopped before a worker was available.") + ) + ); + this._pool = []; + this._idlePool = []; + this._queue = []; + } + /** @internal */ + _createWorker(parentFunctionSyncMessagePort, parentFunctionAsyncMessagePort, lockState) { + const options = { + workerData: [ + parentFunctionSyncMessagePort, + parentFunctionAsyncMessagePort, + lockState + ], + transferList: [ + parentFunctionSyncMessagePort, + parentFunctionAsyncMessagePort + ] + }; + if (this._isModule) { + return new Worker$1( + new URL(codeToDataUrl(this._code)), + options + ); + } + return new Worker$1(this._code, { + ...options, + eval: true + }); + } + /** @internal */ + async _getAvailableWorker() { + if (this._idlePool.length) { + return this._idlePool.shift(); + } + if (this._pool.length < this._max) { + const parentFunctionResponder = createParentFunctionResponder( + this._parentFunctions + ); + const worker = this._createWorker( + parentFunctionResponder.workerPorts.sync, + parentFunctionResponder.workerPorts.async, + parentFunctionResponder.lockState + ); + worker.on("message", async (args) => { + if ("result" in args) { + worker.currentResolve?.(args.result); + worker.currentResolve = null; + } else { + if (args.error instanceof ReferenceError) { + args.error.message += ". Maybe you forgot to pass the function to parentFunction?"; + } + worker.currentReject?.(args.error); + worker.currentReject = null; + } + this._assignDoneWorker(worker); + }); + worker.on("error", (err) => { + worker.currentReject?.(err); + worker.currentReject = null; + parentFunctionResponder.close(); + }); + worker.on("exit", (code) => { + const i = this._pool.indexOf(worker); + if (i > -1) this._pool.splice(i, 1); + if (code !== 0 && worker.currentReject) { + worker.currentReject( + new Error(`Worker stopped with non-0 exit code ${code}`) + ); + worker.currentReject = null; + parentFunctionResponder.close(); + } + }); + this._pool.push(worker); + return worker; + } + let resolve; + let reject; + const onWorkerAvailablePromise = new Promise((r, rj) => { + resolve = r; + reject = rj; + }); + this._queue.push([resolve, reject]); + return onWorkerAvailablePromise; + } + /** @internal */ + _assignDoneWorker(worker) { + if (this._queue.length) { + const [resolve] = this._queue.shift(); + resolve(worker); + return; + } + this._idlePool.push(worker); + } +}; +function createParentFunctionResponder(parentFunctions) { + const lockState = new Int32Array(new SharedArrayBuffer(4)); + const unlock = () => { + Atomics.store(lockState, 0, 0); + Atomics.notify(lockState, 0); + }; + const parentFunctionSyncMessageChannel = new MessageChannel(); + const parentFunctionAsyncMessageChannel = new MessageChannel(); + const parentFunctionSyncMessagePort = parentFunctionSyncMessageChannel.port1; + const parentFunctionAsyncMessagePort = parentFunctionAsyncMessageChannel.port1; + const syncResponse = (data) => { + parentFunctionSyncMessagePort.postMessage(data); + unlock(); + }; + parentFunctionSyncMessagePort.on("message", async (args) => { + let syncResult; + try { + syncResult = parentFunctions[args.name](...args.args); + } catch (error) { + syncResponse({ id: args.id, error }); + return; + } + if (!(typeof syncResult === "object" && syncResult !== null && "then" in syncResult && typeof syncResult.then === "function")) { + syncResponse({ + id: args.id, + result: syncResult + }); + return; + } + syncResponse({ + id: args.id, + isAsync: true + }); + try { + const result = await syncResult; + parentFunctionAsyncMessagePort.postMessage({ id: args.id, result }); + } catch (error) { + parentFunctionAsyncMessagePort.postMessage({ id: args.id, error }); + } + }); + parentFunctionSyncMessagePort.unref(); + return { + close: () => { + parentFunctionSyncMessagePort.close(); + parentFunctionAsyncMessagePort.close(); + }, + lockState, + workerPorts: { + sync: parentFunctionSyncMessageChannel.port2, + async: parentFunctionAsyncMessageChannel.port2 + } + }; +} +function genWorkerCode(fn, isModule, parentFunctions) { + const createLock = (lockState) => { + return { + lock: () => { + Atomics.store(lockState, 0, 1); + }, + waitUnlock: () => { + const status = Atomics.wait(lockState, 0, 1, 10 * 1e3); + if (status === "timed-out") { + throw new Error(status); + } + } + }; + }; + const createParentFunctionRequester = (syncPort, asyncPort, receive, lock) => { + let id = 0; + const resolvers = /* @__PURE__ */ new Map(); + const call = (key) => (...args) => { + id++; + lock.lock(); + syncPort.postMessage({ id, name: key, args }); + lock.waitUnlock(); + const resArgs = receive(syncPort).message; + if (resArgs.isAsync) { + let resolve, reject; + const promise = new Promise((res, rej) => { + resolve = res; + reject = rej; + }); + resolvers.set(id, { resolve, reject }); + return promise; + } + if ("error" in resArgs) { + throw resArgs.error; + } else { + return resArgs.result; + } + }; + asyncPort.on("message", (args) => { + const id2 = args.id; + if (resolvers.has(id2)) { + const { resolve, reject } = resolvers.get(id2); + resolvers.delete(id2); + if ("result" in args) { + resolve(args.result); + } else { + reject(args.error); + } + } + }); + return { call }; + }; + const fnString = fn.toString().replaceAll(viteSsrDynamicImport, "import"); + return ` +${isModule ? "import { parentPort, receiveMessageOnPort, workerData } from 'worker_threads'" : "const { parentPort, receiveMessageOnPort, workerData } = require('worker_threads')"} +const [parentFunctionSyncMessagePort, parentFunctionAsyncMessagePort, lockState] = workerData +const createLock = ${createLock.toString()} +const parentFunctionRequester = (${createParentFunctionRequester.toString()})( + parentFunctionSyncMessagePort, + parentFunctionAsyncMessagePort, + receiveMessageOnPort, + createLock(lockState) +) + +const doWorkPromise = (async () => { + ${Object.keys(parentFunctions).map( + (key) => `const ${key} = parentFunctionRequester.call(${JSON.stringify(key)});` + ).join("\n")} + return await (${fnString})() +})() +let doWork + +parentPort.on('message', async (args) => { + doWork ||= await doWorkPromise + + try { + const res = await doWork(...args.args) + parentPort.postMessage({ result: res }) + } catch (e) { + parentPort.postMessage({ error: e }) + } +}) + `; +} +var importRe = /\bimport\s*\(/; +var internalImportName = "__artichokie_local_import__"; +var FakeWorker = class { + /** @internal */ + _fn; + constructor(fn, options = {}) { + const declareRequire = options.type !== "module"; + const argsAndCode = genFakeWorkerArgsAndCode( + fn, + declareRequire, + options.parentFunctions ?? {} + ); + const localImport = (specifier) => import(specifier); + const args = [ + ...declareRequire ? [createRequire$1(import.meta.url)] : [], + localImport, + options.parentFunctions + ]; + this._fn = new AsyncFunction(...argsAndCode)(...args); + } + async run(...args) { + try { + return await (await this._fn)(...args); + } catch (err) { + if (err instanceof ReferenceError) { + err.message += ". Maybe you forgot to pass the function to parentFunction?"; + } + throw err; + } + } + stop() { + } +}; +function genFakeWorkerArgsAndCode(fn, declareRequire, parentFunctions) { + const fnString = fn.toString().replace(importRe, `${internalImportName}(`).replaceAll(viteSsrDynamicImport, internalImportName); + return [ + ...declareRequire ? ["require"] : [], + internalImportName, + "parentFunctions", + ` +${Object.keys(parentFunctions).map((key) => `const ${key} = parentFunctions[${JSON.stringify(key)}];`).join("\n")} +return await (${fnString})() + ` + ]; +} + +// src/workerWithFallback.ts +var WorkerWithFallback = class { + /** @internal */ + _disableReal; + /** @internal */ + _realWorker; + /** @internal */ + _fakeWorker; + /** @internal */ + _shouldUseFake; + constructor(fn, options) { + this._disableReal = options.max !== void 0 && options.max <= 0; + this._realWorker = new Worker(fn, options); + this._fakeWorker = new FakeWorker(fn, options); + this._shouldUseFake = options.shouldUseFake; + } + async run(...args) { + const useFake = this._disableReal || this._shouldUseFake(...args); + return this[useFake ? "_fakeWorker" : "_realWorker"].run(...args); + } + stop() { + this._realWorker.stop(); + this._fakeWorker.stop(); + } +}; + +let terserPath; +const loadTerserPath = (root) => { + if (terserPath) return terserPath; + try { + terserPath = requireResolveFromRootWithFallback(root, "terser"); + } catch (e) { + if (e.code === "MODULE_NOT_FOUND") { + throw new Error( + "terser not found. Since Vite v3, terser has become an optional dependency. You need to install it." + ); + } else { + const message = new Error(`terser failed to load: +${e.message}`); + message.stack = e.stack + "\n" + message.stack; + throw message; + } + } + return terserPath; +}; +function terserPlugin(config) { + const { maxWorkers, ...terserOptions } = config.build.terserOptions; + const makeWorker = () => new WorkerWithFallback( + () => async (terserPath2, code, options) => { + const terser = require(terserPath2); + return terser.minify(code, options); + }, + { + shouldUseFake(_terserPath, _code, options) { + return !!(typeof options.mangle === "object" && (options.mangle.nth_identifier?.get || typeof options.mangle.properties === "object" && options.mangle.properties.nth_identifier?.get) || typeof options.format?.comments === "function" || typeof options.output?.comments === "function"); + }, + max: maxWorkers + } + ); + let worker; + return { + name: "vite:terser", + applyToEnvironment(environment) { + return !!environment.config.build.minify; + }, + async renderChunk(code, _chunk, outputOptions) { + if (config.build.minify !== "terser" && // @ts-expect-error injected by @vitejs/plugin-legacy + !outputOptions.__vite_force_terser__) { + return null; + } + if (config.build.lib && outputOptions.format === "es") { + return null; + } + worker ||= makeWorker(); + const terserPath2 = loadTerserPath(config.root); + const res = await worker.run(terserPath2, code, { + safari10: true, + ...terserOptions, + sourceMap: !!outputOptions.sourcemap, + module: outputOptions.format.startsWith("es"), + toplevel: outputOptions.format === "cjs" + }); + return { + code: res.code, + map: res.map + }; + }, + closeBundle() { + worker?.stop(); + } + }; +} + +async function resolveEnvironmentPlugins(environment) { + const environmentPlugins = []; + for (const plugin of environment.getTopLevelConfig().plugins) { + if (plugin.applyToEnvironment) { + const applied = await plugin.applyToEnvironment(environment); + if (!applied) { + continue; + } + if (applied !== true) { + environmentPlugins.push( + ...(await asyncFlatten(arraify(applied))).filter( + Boolean + ) + ); + continue; + } + } + environmentPlugins.push(plugin); + } + return environmentPlugins; +} +function perEnvironmentPlugin(name, applyToEnvironment) { + return { + name, + applyToEnvironment + }; +} + +const mimes = { + "3g2": "video/3gpp2", + "3gp": "video/3gpp", + "3gpp": "video/3gpp", + "3mf": "model/3mf", + "aac": "audio/aac", + "ac": "application/pkix-attr-cert", + "adp": "audio/adpcm", + "adts": "audio/aac", + "ai": "application/postscript", + "aml": "application/automationml-aml+xml", + "amlx": "application/automationml-amlx+zip", + "amr": "audio/amr", + "apng": "image/apng", + "appcache": "text/cache-manifest", + "appinstaller": "application/appinstaller", + "appx": "application/appx", + "appxbundle": "application/appxbundle", + "asc": "application/pgp-keys", + "atom": "application/atom+xml", + "atomcat": "application/atomcat+xml", + "atomdeleted": "application/atomdeleted+xml", + "atomsvc": "application/atomsvc+xml", + "au": "audio/basic", + "avci": "image/avci", + "avcs": "image/avcs", + "avif": "image/avif", + "aw": "application/applixware", + "bdoc": "application/bdoc", + "bin": "application/octet-stream", + "bmp": "image/bmp", + "bpk": "application/octet-stream", + "btf": "image/prs.btif", + "btif": "image/prs.btif", + "buffer": "application/octet-stream", + "ccxml": "application/ccxml+xml", + "cdfx": "application/cdfx+xml", + "cdmia": "application/cdmi-capability", + "cdmic": "application/cdmi-container", + "cdmid": "application/cdmi-domain", + "cdmio": "application/cdmi-object", + "cdmiq": "application/cdmi-queue", + "cer": "application/pkix-cert", + "cgm": "image/cgm", + "cjs": "application/node", + "class": "application/java-vm", + "coffee": "text/coffeescript", + "conf": "text/plain", + "cpl": "application/cpl+xml", + "cpt": "application/mac-compactpro", + "crl": "application/pkix-crl", + "css": "text/css", + "csv": "text/csv", + "cu": "application/cu-seeme", + "cwl": "application/cwl", + "cww": "application/prs.cww", + "davmount": "application/davmount+xml", + "dbk": "application/docbook+xml", + "deb": "application/octet-stream", + "def": "text/plain", + "deploy": "application/octet-stream", + "dib": "image/bmp", + "disposition-notification": "message/disposition-notification", + "dist": "application/octet-stream", + "distz": "application/octet-stream", + "dll": "application/octet-stream", + "dmg": "application/octet-stream", + "dms": "application/octet-stream", + "doc": "application/msword", + "dot": "application/msword", + "dpx": "image/dpx", + "drle": "image/dicom-rle", + "dsc": "text/prs.lines.tag", + "dssc": "application/dssc+der", + "dtd": "application/xml-dtd", + "dump": "application/octet-stream", + "dwd": "application/atsc-dwd+xml", + "ear": "application/java-archive", + "ecma": "application/ecmascript", + "elc": "application/octet-stream", + "emf": "image/emf", + "eml": "message/rfc822", + "emma": "application/emma+xml", + "emotionml": "application/emotionml+xml", + "eps": "application/postscript", + "epub": "application/epub+zip", + "exe": "application/octet-stream", + "exi": "application/exi", + "exp": "application/express", + "exr": "image/aces", + "ez": "application/andrew-inset", + "fdf": "application/fdf", + "fdt": "application/fdt+xml", + "fits": "image/fits", + "g3": "image/g3fax", + "gbr": "application/rpki-ghostbusters", + "geojson": "application/geo+json", + "gif": "image/gif", + "glb": "model/gltf-binary", + "gltf": "model/gltf+json", + "gml": "application/gml+xml", + "gpx": "application/gpx+xml", + "gram": "application/srgs", + "grxml": "application/srgs+xml", + "gxf": "application/gxf", + "gz": "application/gzip", + "h261": "video/h261", + "h263": "video/h263", + "h264": "video/h264", + "heic": "image/heic", + "heics": "image/heic-sequence", + "heif": "image/heif", + "heifs": "image/heif-sequence", + "hej2": "image/hej2k", + "held": "application/atsc-held+xml", + "hjson": "application/hjson", + "hlp": "application/winhlp", + "hqx": "application/mac-binhex40", + "hsj2": "image/hsj2", + "htm": "text/html", + "html": "text/html", + "ics": "text/calendar", + "ief": "image/ief", + "ifb": "text/calendar", + "iges": "model/iges", + "igs": "model/iges", + "img": "application/octet-stream", + "in": "text/plain", + "ini": "text/plain", + "ink": "application/inkml+xml", + "inkml": "application/inkml+xml", + "ipfix": "application/ipfix", + "iso": "application/octet-stream", + "its": "application/its+xml", + "jade": "text/jade", + "jar": "application/java-archive", + "jhc": "image/jphc", + "jls": "image/jls", + "jp2": "image/jp2", + "jpe": "image/jpeg", + "jpeg": "image/jpeg", + "jpf": "image/jpx", + "jpg": "image/jpeg", + "jpg2": "image/jp2", + "jpgm": "image/jpm", + "jpgv": "video/jpeg", + "jph": "image/jph", + "jpm": "image/jpm", + "jpx": "image/jpx", + "js": "text/javascript", + "json": "application/json", + "json5": "application/json5", + "jsonld": "application/ld+json", + "jsonml": "application/jsonml+json", + "jsx": "text/jsx", + "jt": "model/jt", + "jxl": "image/jxl", + "jxr": "image/jxr", + "jxra": "image/jxra", + "jxrs": "image/jxrs", + "jxs": "image/jxs", + "jxsc": "image/jxsc", + "jxsi": "image/jxsi", + "jxss": "image/jxss", + "kar": "audio/midi", + "ktx": "image/ktx", + "ktx2": "image/ktx2", + "less": "text/less", + "lgr": "application/lgr+xml", + "list": "text/plain", + "litcoffee": "text/coffeescript", + "log": "text/plain", + "lostxml": "application/lost+xml", + "lrf": "application/octet-stream", + "m1v": "video/mpeg", + "m21": "application/mp21", + "m2a": "audio/mpeg", + "m2t": "video/mp2t", + "m2ts": "video/mp2t", + "m2v": "video/mpeg", + "m3a": "audio/mpeg", + "m4a": "audio/mp4", + "m4p": "application/mp4", + "m4s": "video/iso.segment", + "ma": "application/mathematica", + "mads": "application/mads+xml", + "maei": "application/mmt-aei+xml", + "man": "text/troff", + "manifest": "text/cache-manifest", + "map": "application/json", + "mar": "application/octet-stream", + "markdown": "text/markdown", + "mathml": "application/mathml+xml", + "mb": "application/mathematica", + "mbox": "application/mbox", + "md": "text/markdown", + "mdx": "text/mdx", + "me": "text/troff", + "mesh": "model/mesh", + "meta4": "application/metalink4+xml", + "metalink": "application/metalink+xml", + "mets": "application/mets+xml", + "mft": "application/rpki-manifest", + "mid": "audio/midi", + "midi": "audio/midi", + "mime": "message/rfc822", + "mj2": "video/mj2", + "mjp2": "video/mj2", + "mjs": "text/javascript", + "mml": "text/mathml", + "mods": "application/mods+xml", + "mov": "video/quicktime", + "mp2": "audio/mpeg", + "mp21": "application/mp21", + "mp2a": "audio/mpeg", + "mp3": "audio/mpeg", + "mp4": "video/mp4", + "mp4a": "audio/mp4", + "mp4s": "application/mp4", + "mp4v": "video/mp4", + "mpd": "application/dash+xml", + "mpe": "video/mpeg", + "mpeg": "video/mpeg", + "mpf": "application/media-policy-dataset+xml", + "mpg": "video/mpeg", + "mpg4": "video/mp4", + "mpga": "audio/mpeg", + "mpp": "application/dash-patch+xml", + "mrc": "application/marc", + "mrcx": "application/marcxml+xml", + "ms": "text/troff", + "mscml": "application/mediaservercontrol+xml", + "msh": "model/mesh", + "msi": "application/octet-stream", + "msix": "application/msix", + "msixbundle": "application/msixbundle", + "msm": "application/octet-stream", + "msp": "application/octet-stream", + "mtl": "model/mtl", + "mts": "video/mp2t", + "musd": "application/mmt-usd+xml", + "mxf": "application/mxf", + "mxmf": "audio/mobile-xmf", + "mxml": "application/xv+xml", + "n3": "text/n3", + "nb": "application/mathematica", + "nq": "application/n-quads", + "nt": "application/n-triples", + "obj": "model/obj", + "oda": "application/oda", + "oga": "audio/ogg", + "ogg": "audio/ogg", + "ogv": "video/ogg", + "ogx": "application/ogg", + "omdoc": "application/omdoc+xml", + "onepkg": "application/onenote", + "onetmp": "application/onenote", + "onetoc": "application/onenote", + "onetoc2": "application/onenote", + "opf": "application/oebps-package+xml", + "opus": "audio/ogg", + "otf": "font/otf", + "owl": "application/rdf+xml", + "oxps": "application/oxps", + "p10": "application/pkcs10", + "p7c": "application/pkcs7-mime", + "p7m": "application/pkcs7-mime", + "p7s": "application/pkcs7-signature", + "p8": "application/pkcs8", + "pdf": "application/pdf", + "pfr": "application/font-tdpfr", + "pgp": "application/pgp-encrypted", + "pkg": "application/octet-stream", + "pki": "application/pkixcmp", + "pkipath": "application/pkix-pkipath", + "pls": "application/pls+xml", + "png": "image/png", + "prc": "model/prc", + "prf": "application/pics-rules", + "provx": "application/provenance+xml", + "ps": "application/postscript", + "pskcxml": "application/pskc+xml", + "pti": "image/prs.pti", + "qt": "video/quicktime", + "raml": "application/raml+yaml", + "rapd": "application/route-apd+xml", + "rdf": "application/rdf+xml", + "relo": "application/p2p-overlay+xml", + "rif": "application/reginfo+xml", + "rl": "application/resource-lists+xml", + "rld": "application/resource-lists-diff+xml", + "rmi": "audio/midi", + "rnc": "application/relax-ng-compact-syntax", + "rng": "application/xml", + "roa": "application/rpki-roa", + "roff": "text/troff", + "rq": "application/sparql-query", + "rs": "application/rls-services+xml", + "rsat": "application/atsc-rsat+xml", + "rsd": "application/rsd+xml", + "rsheet": "application/urc-ressheet+xml", + "rss": "application/rss+xml", + "rtf": "text/rtf", + "rtx": "text/richtext", + "rusd": "application/route-usd+xml", + "s3m": "audio/s3m", + "sbml": "application/sbml+xml", + "scq": "application/scvp-cv-request", + "scs": "application/scvp-cv-response", + "sdp": "application/sdp", + "senmlx": "application/senml+xml", + "sensmlx": "application/sensml+xml", + "ser": "application/java-serialized-object", + "setpay": "application/set-payment-initiation", + "setreg": "application/set-registration-initiation", + "sgi": "image/sgi", + "sgm": "text/sgml", + "sgml": "text/sgml", + "shex": "text/shex", + "shf": "application/shf+xml", + "shtml": "text/html", + "sieve": "application/sieve", + "sig": "application/pgp-signature", + "sil": "audio/silk", + "silo": "model/mesh", + "siv": "application/sieve", + "slim": "text/slim", + "slm": "text/slim", + "sls": "application/route-s-tsid+xml", + "smi": "application/smil+xml", + "smil": "application/smil+xml", + "snd": "audio/basic", + "so": "application/octet-stream", + "spdx": "text/spdx", + "spp": "application/scvp-vp-response", + "spq": "application/scvp-vp-request", + "spx": "audio/ogg", + "sql": "application/sql", + "sru": "application/sru+xml", + "srx": "application/sparql-results+xml", + "ssdl": "application/ssdl+xml", + "ssml": "application/ssml+xml", + "stk": "application/hyperstudio", + "stl": "model/stl", + "stpx": "model/step+xml", + "stpxz": "model/step-xml+zip", + "stpz": "model/step+zip", + "styl": "text/stylus", + "stylus": "text/stylus", + "svg": "image/svg+xml", + "svgz": "image/svg+xml", + "swidtag": "application/swid+xml", + "t": "text/troff", + "t38": "image/t38", + "td": "application/urc-targetdesc+xml", + "tei": "application/tei+xml", + "teicorpus": "application/tei+xml", + "text": "text/plain", + "tfi": "application/thraud+xml", + "tfx": "image/tiff-fx", + "tif": "image/tiff", + "tiff": "image/tiff", + "toml": "application/toml", + "tr": "text/troff", + "trig": "application/trig", + "ts": "video/mp2t", + "tsd": "application/timestamped-data", + "tsv": "text/tab-separated-values", + "ttc": "font/collection", + "ttf": "font/ttf", + "ttl": "text/turtle", + "ttml": "application/ttml+xml", + "txt": "text/plain", + "u3d": "model/u3d", + "u8dsn": "message/global-delivery-status", + "u8hdr": "message/global-headers", + "u8mdn": "message/global-disposition-notification", + "u8msg": "message/global", + "ubj": "application/ubjson", + "uri": "text/uri-list", + "uris": "text/uri-list", + "urls": "text/uri-list", + "vcard": "text/vcard", + "vrml": "model/vrml", + "vtt": "text/vtt", + "vxml": "application/voicexml+xml", + "war": "application/java-archive", + "wasm": "application/wasm", + "wav": "audio/wav", + "weba": "audio/webm", + "webm": "video/webm", + "webmanifest": "application/manifest+json", + "webp": "image/webp", + "wgsl": "text/wgsl", + "wgt": "application/widget", + "wif": "application/watcherinfo+xml", + "wmf": "image/wmf", + "woff": "font/woff", + "woff2": "font/woff2", + "wrl": "model/vrml", + "wsdl": "application/wsdl+xml", + "wspolicy": "application/wspolicy+xml", + "x3d": "model/x3d+xml", + "x3db": "model/x3d+fastinfoset", + "x3dbz": "model/x3d+binary", + "x3dv": "model/x3d-vrml", + "x3dvz": "model/x3d+vrml", + "x3dz": "model/x3d+xml", + "xaml": "application/xaml+xml", + "xav": "application/xcap-att+xml", + "xca": "application/xcap-caps+xml", + "xcs": "application/calendar+xml", + "xdf": "application/xcap-diff+xml", + "xdssc": "application/dssc+xml", + "xel": "application/xcap-el+xml", + "xenc": "application/xenc+xml", + "xer": "application/patch-ops-error+xml", + "xfdf": "application/xfdf", + "xht": "application/xhtml+xml", + "xhtml": "application/xhtml+xml", + "xhvml": "application/xv+xml", + "xlf": "application/xliff+xml", + "xm": "audio/xm", + "xml": "text/xml", + "xns": "application/xcap-ns+xml", + "xop": "application/xop+xml", + "xpl": "application/xproc+xml", + "xsd": "application/xml", + "xsf": "application/prs.xsf+xml", + "xsl": "application/xml", + "xslt": "application/xml", + "xspf": "application/xspf+xml", + "xvm": "application/xv+xml", + "xvml": "application/xv+xml", + "yaml": "text/yaml", + "yang": "application/yang", + "yin": "application/yin+xml", + "yml": "text/yaml", + "zip": "application/zip" +}; + +function lookup(extn) { + let tmp = ('' + extn).trim().toLowerCase(); + let idx = tmp.lastIndexOf('.'); + return mimes[!~idx ? tmp : tmp.substring(++idx)]; +} + +const publicFilesMap = /* @__PURE__ */ new WeakMap(); +async function initPublicFiles(config) { + let fileNames; + try { + fileNames = await recursiveReaddir(config.publicDir); + } catch (e) { + if (e.code === ERR_SYMLINK_IN_RECURSIVE_READDIR) { + return; + } + throw e; + } + const publicFiles = new Set( + fileNames.map((fileName) => fileName.slice(config.publicDir.length)) + ); + publicFilesMap.set(config, publicFiles); + return publicFiles; +} +function getPublicFiles(config) { + return publicFilesMap.get(config); +} +function checkPublicFile(url, config) { + const { publicDir } = config; + if (!publicDir || url[0] !== "/") { + return; + } + const fileName = cleanUrl(url); + const publicFiles = getPublicFiles(config); + if (publicFiles) { + return publicFiles.has(fileName) ? normalizePath$3(path$b.join(publicDir, fileName)) : void 0; + } + const publicFile = normalizePath$3(path$b.join(publicDir, fileName)); + if (!publicFile.startsWith(withTrailingSlash(publicDir))) { + return; + } + return fs__default.existsSync(publicFile) ? publicFile : void 0; +} + +const assetUrlRE = /__VITE_ASSET__([\w$]+)__(?:\$_(.*?)__)?/g; +const jsSourceMapRE = /\.[cm]?js\.map$/; +const noInlineRE = /[?&]no-inline\b/; +const inlineRE$3 = /[?&]inline\b/; +const svgExtRE = /\.svg(?:$|\?)/; +const assetCache = /* @__PURE__ */ new WeakMap(); +const cssEntriesMap = /* @__PURE__ */ new WeakMap(); +function registerCustomMime() { + mimes["ico"] = "image/x-icon"; + mimes["cur"] = "image/x-icon"; + mimes["flac"] = "audio/flac"; + mimes["eot"] = "application/vnd.ms-fontobject"; +} +function renderAssetUrlInJS(pluginContext, chunk, opts, code) { + const { environment } = pluginContext; + const toRelativeRuntime = createToImportMetaURLBasedRelativeRuntime( + opts.format, + environment.config.isWorker + ); + let match; + let s; + assetUrlRE.lastIndex = 0; + while (match = assetUrlRE.exec(code)) { + s ||= new MagicString(code); + const [full, referenceId, postfix = ""] = match; + const file = pluginContext.getFileName(referenceId); + chunk.viteMetadata.importedAssets.add(cleanUrl(file)); + const filename = file + postfix; + const replacement = toOutputFilePathInJS( + environment, + filename, + "asset", + chunk.fileName, + "js", + toRelativeRuntime + ); + const replacementString = typeof replacement === "string" ? JSON.stringify(encodeURIPath(replacement)).slice(1, -1) : `"+${replacement.runtime}+"`; + s.update(match.index, match.index + full.length, replacementString); + } + const publicAssetUrlMap = publicAssetUrlCache.get( + environment.getTopLevelConfig() + ); + publicAssetUrlRE.lastIndex = 0; + while (match = publicAssetUrlRE.exec(code)) { + s ||= new MagicString(code); + const [full, hash] = match; + const publicUrl = publicAssetUrlMap.get(hash).slice(1); + const replacement = toOutputFilePathInJS( + environment, + publicUrl, + "public", + chunk.fileName, + "js", + toRelativeRuntime + ); + const replacementString = typeof replacement === "string" ? JSON.stringify(encodeURIPath(replacement)).slice(1, -1) : `"+${replacement.runtime}+"`; + s.update(match.index, match.index + full.length, replacementString); + } + return s; +} +function assetPlugin(config) { + registerCustomMime(); + return { + name: "vite:asset", + perEnvironmentStartEndDuringDev: true, + buildStart() { + assetCache.set(this.environment, /* @__PURE__ */ new Map()); + cssEntriesMap.set(this.environment, /* @__PURE__ */ new Set()); + }, + resolveId: { + handler(id) { + if (!config.assetsInclude(cleanUrl(id)) && !urlRE$1.test(id)) { + return; + } + const publicFile = checkPublicFile(id, config); + if (publicFile) { + return id; + } + } + }, + load: { + async handler(id) { + if (id[0] === "\0") { + return; + } + if (rawRE$1.test(id)) { + const file = checkPublicFile(id, config) || cleanUrl(id); + this.addWatchFile(file); + return `export default ${JSON.stringify( + await fsp.readFile(file, "utf-8") + )}`; + } + if (!urlRE$1.test(id) && !config.assetsInclude(cleanUrl(id))) { + return; + } + id = removeUrlQuery(id); + let url = await fileToUrl$1(this, id); + if (!url.startsWith("data:") && this.environment.mode === "dev") { + const mod = this.environment.moduleGraph.getModuleById(id); + if (mod && mod.lastHMRTimestamp > 0) { + url = injectQuery(url, `t=${mod.lastHMRTimestamp}`); + } + } + return { + code: `export default ${JSON.stringify(encodeURIPath(url))}`, + // Force rollup to keep this module from being shared between other entry points if it's an entrypoint. + // If the resulting chunk is empty, it will be removed in generateBundle. + moduleSideEffects: config.command === "build" && this.getModuleInfo(id)?.isEntry ? "no-treeshake" : false, + meta: config.command === "build" ? { "vite:asset": true } : void 0 + }; + } + }, + renderChunk(code, chunk, opts) { + const s = renderAssetUrlInJS(this, chunk, opts, code); + if (s) { + return { + code: s.toString(), + map: this.environment.config.build.sourcemap ? s.generateMap({ hires: "boundary" }) : null + }; + } else { + return null; + } + }, + generateBundle(_, bundle) { + let importedFiles; + for (const file in bundle) { + const chunk = bundle[file]; + if (chunk.type === "chunk" && chunk.isEntry && chunk.moduleIds.length === 1 && config.assetsInclude(chunk.moduleIds[0]) && this.getModuleInfo(chunk.moduleIds[0])?.meta["vite:asset"]) { + if (!importedFiles) { + importedFiles = /* @__PURE__ */ new Set(); + for (const file2 in bundle) { + const chunk2 = bundle[file2]; + if (chunk2.type === "chunk") { + for (const importedFile of chunk2.imports) { + importedFiles.add(importedFile); + } + for (const importedFile of chunk2.dynamicImports) { + importedFiles.add(importedFile); + } + } + } + } + if (!importedFiles.has(file)) { + delete bundle[file]; + } + } + } + if (config.command === "build" && !this.environment.config.build.emitAssets) { + for (const file in bundle) { + if (bundle[file].type === "asset" && !file.endsWith("ssr-manifest.json") && !jsSourceMapRE.test(file)) { + delete bundle[file]; + } + } + } + } + }; +} +async function fileToUrl$1(pluginContext, id) { + const { environment } = pluginContext; + if (environment.config.command === "serve") { + return fileToDevUrl(environment, id); + } else { + return fileToBuiltUrl(pluginContext, id); + } +} +async function fileToDevUrl(environment, id, skipBase = false) { + const config = environment.getTopLevelConfig(); + const publicFile = checkPublicFile(id, config); + if (inlineRE$3.test(id)) { + const file = publicFile || cleanUrl(id); + const content = await fsp.readFile(file); + return assetToDataURL(environment, file, content); + } + const cleanedId = cleanUrl(id); + if (svgExtRE.test(cleanedId)) { + const file = publicFile || cleanedId; + const content = await fsp.readFile(file); + if (shouldInline(environment, file, id, content, void 0, void 0)) { + return assetToDataURL(environment, file, content); + } + } + let rtn; + if (publicFile) { + rtn = id; + } else if (id.startsWith(withTrailingSlash(config.root))) { + rtn = "/" + path$b.posix.relative(config.root, id); + } else { + rtn = path$b.posix.join(FS_PREFIX, id); + } + if (skipBase) { + return rtn; + } + const base = joinUrlSegments(config.server.origin ?? "", config.decodedBase); + return joinUrlSegments(base, removeLeadingSlash(rtn)); +} +function getPublicAssetFilename(hash, config) { + return publicAssetUrlCache.get(config)?.get(hash); +} +const publicAssetUrlCache = /* @__PURE__ */ new WeakMap(); +const publicAssetUrlRE = /__VITE_PUBLIC_ASSET__([a-z\d]{8})__/g; +function publicFileToBuiltUrl(url, config) { + if (config.command !== "build") { + return joinUrlSegments(config.decodedBase, url); + } + const hash = getHash(url); + let cache = publicAssetUrlCache.get(config); + if (!cache) { + cache = /* @__PURE__ */ new Map(); + publicAssetUrlCache.set(config, cache); + } + if (!cache.get(hash)) { + cache.set(hash, url); + } + return `__VITE_PUBLIC_ASSET__${hash}__`; +} +const GIT_LFS_PREFIX = Buffer$1.from("version https://git-lfs.github.com"); +function isGitLfsPlaceholder(content) { + if (content.length < GIT_LFS_PREFIX.length) return false; + return GIT_LFS_PREFIX.compare(content, 0, GIT_LFS_PREFIX.length) === 0; +} +async function fileToBuiltUrl(pluginContext, id, skipPublicCheck = false, forceInline) { + const environment = pluginContext.environment; + const topLevelConfig = environment.getTopLevelConfig(); + if (!skipPublicCheck) { + const publicFile = checkPublicFile(id, topLevelConfig); + if (publicFile) { + if (inlineRE$3.test(id)) { + id = publicFile; + } else { + return publicFileToBuiltUrl(id, topLevelConfig); + } + } + } + const cache = assetCache.get(environment); + const cached = cache.get(id); + if (cached) { + return cached; + } + let { file, postfix } = splitFileAndPostfix(id); + const content = await fsp.readFile(file); + let url; + if (shouldInline(environment, file, id, content, pluginContext, forceInline)) { + url = assetToDataURL(environment, file, content); + } else { + const originalFileName = normalizePath$3( + path$b.relative(environment.config.root, file) + ); + const referenceId = pluginContext.emitFile({ + type: "asset", + // Ignore directory structure for asset file names + name: path$b.basename(file), + originalFileName, + source: content + }); + if (environment.config.command === "build" && noInlineRE.test(postfix)) { + postfix = postfix.replace(noInlineRE, "").replace(/^&/, "?"); + } + url = `__VITE_ASSET__${referenceId}__${postfix ? `$_${postfix}__` : ``}`; + } + cache.set(id, url); + return url; +} +async function urlToBuiltUrl(pluginContext, url, importer, forceInline) { + const topLevelConfig = pluginContext.environment.getTopLevelConfig(); + if (checkPublicFile(url, topLevelConfig)) { + return publicFileToBuiltUrl(url, topLevelConfig); + } + const file = url[0] === "/" ? path$b.join(topLevelConfig.root, url) : path$b.join(path$b.dirname(importer), url); + return fileToBuiltUrl( + pluginContext, + file, + // skip public check since we just did it above + true, + forceInline + ); +} +function shouldInline(environment, file, id, content, buildPluginContext, forceInline) { + if (noInlineRE.test(id)) return false; + if (inlineRE$3.test(id)) return true; + if (buildPluginContext) { + if (environment.config.build.lib) return true; + if (buildPluginContext.getModuleInfo(id)?.isEntry) return false; + } + if (forceInline !== void 0) return forceInline; + if (file.endsWith(".html")) return false; + if (file.endsWith(".svg") && id.includes("#")) return false; + let limit; + const { assetsInlineLimit } = environment.config.build; + if (typeof assetsInlineLimit === "function") { + const userShouldInline = assetsInlineLimit(file, content); + if (userShouldInline != null) return userShouldInline; + limit = DEFAULT_ASSETS_INLINE_LIMIT; + } else { + limit = Number(assetsInlineLimit); + } + return content.length < limit && !isGitLfsPlaceholder(content); +} +function assetToDataURL(environment, file, content) { + if (environment.config.build.lib && isGitLfsPlaceholder(content)) { + environment.logger.warn( + colors$1.yellow(`Inlined file ${file} was not downloaded via Git LFS`) + ); + } + if (file.endsWith(".svg")) { + return svgToDataURL(content); + } else { + const mimeType = lookup(file) ?? "application/octet-stream"; + return `data:${mimeType};base64,${content.toString("base64")}`; + } +} +const nestedQuotesRE = /"[^"']*'[^"]*"|'[^'"]*"[^']*'/; +function svgToDataURL(content) { + const stringContent = content.toString(); + if (stringContent.includes("\s+<").replaceAll('"', "'").replaceAll("%", "%25").replaceAll("#", "%23").replaceAll("<", "%3c").replaceAll(">", "%3e").replaceAll(/\s+/g, "%20"); + } +} + +const endsWithJSRE = /\.[cm]?js$/; +function manifestPlugin() { + const getState = perEnvironmentState(() => { + return { + manifest: {}, + outputCount: 0, + reset() { + this.manifest = {}; + this.outputCount = 0; + } + }; + }); + return { + name: "vite:manifest", + perEnvironmentStartEndDuringDev: true, + applyToEnvironment(environment) { + return !!environment.config.build.manifest; + }, + buildStart() { + getState(this).reset(); + }, + generateBundle({ format }, bundle) { + const state = getState(this); + const { manifest } = state; + const { root } = this.environment.config; + const buildOptions = this.environment.config.build; + function getChunkName(chunk) { + return getChunkOriginalFileName(chunk, root, format) ?? `_${path$b.basename(chunk.fileName)}`; + } + function getInternalImports(imports) { + const filteredImports = []; + for (const file of imports) { + if (bundle[file] === void 0) { + continue; + } + filteredImports.push(getChunkName(bundle[file])); + } + return filteredImports; + } + function createChunk(chunk) { + const manifestChunk = { + file: chunk.fileName, + name: chunk.name + }; + if (chunk.facadeModuleId) { + manifestChunk.src = getChunkName(chunk); + } + if (chunk.isEntry) { + manifestChunk.isEntry = true; + } + if (chunk.isDynamicEntry) { + manifestChunk.isDynamicEntry = true; + } + if (chunk.imports.length) { + const internalImports = getInternalImports(chunk.imports); + if (internalImports.length > 0) { + manifestChunk.imports = internalImports; + } + } + if (chunk.dynamicImports.length) { + const internalImports = getInternalImports(chunk.dynamicImports); + if (internalImports.length > 0) { + manifestChunk.dynamicImports = internalImports; + } + } + if (chunk.viteMetadata?.importedCss.size) { + manifestChunk.css = [...chunk.viteMetadata.importedCss]; + } + if (chunk.viteMetadata?.importedAssets.size) { + manifestChunk.assets = [...chunk.viteMetadata.importedAssets]; + } + return manifestChunk; + } + function createAsset(asset, src, isEntry) { + const manifestChunk = { + file: asset.fileName, + src + }; + if (isEntry) manifestChunk.isEntry = true; + return manifestChunk; + } + const entryCssReferenceIds = cssEntriesMap.get(this.environment); + const entryCssAssetFileNames = new Set(entryCssReferenceIds); + for (const id of entryCssReferenceIds) { + try { + const fileName = this.getFileName(id); + entryCssAssetFileNames.add(fileName); + } catch { + } + } + for (const file in bundle) { + const chunk = bundle[file]; + if (chunk.type === "chunk") { + manifest[getChunkName(chunk)] = createChunk(chunk); + } else if (chunk.type === "asset" && chunk.names.length > 0) { + const src = chunk.originalFileNames.length > 0 ? chunk.originalFileNames[0] : `_${path$b.basename(chunk.fileName)}`; + const isEntry = entryCssAssetFileNames.has(chunk.fileName); + const asset = createAsset(chunk, src, isEntry); + const file2 = manifest[src]?.file; + if (!(file2 && endsWithJSRE.test(file2))) { + manifest[src] = asset; + } + for (const originalFileName of chunk.originalFileNames.slice(1)) { + const file3 = manifest[originalFileName]?.file; + if (!(file3 && endsWithJSRE.test(file3))) { + manifest[originalFileName] = asset; + } + } + } + } + state.outputCount++; + const output = buildOptions.rollupOptions.output; + const outputLength = Array.isArray(output) ? output.length : 1; + if (state.outputCount >= outputLength) { + this.emitFile({ + fileName: typeof buildOptions.manifest === "string" ? buildOptions.manifest : ".vite/manifest.json", + type: "asset", + source: JSON.stringify(sortObjectKeys(manifest), void 0, 2) + }); + } + } + }; +} +function getChunkOriginalFileName(chunk, root, format) { + if (chunk.facadeModuleId) { + let name = normalizePath$3(path$b.relative(root, chunk.facadeModuleId)); + if (format === "system" && !chunk.name.includes("-legacy")) { + const ext = path$b.extname(name); + const endPos = ext.length !== 0 ? -ext.length : void 0; + name = `${name.slice(0, endPos)}-legacy${ext}`; + } + return name.replace(/\0/g, ""); + } +} + +const dataUriRE = /^([^/]+\/[^;,]+)(;base64)?,([\s\S]*)$/; +const base64RE = /base64/i; +const dataUriPrefix = `\0/@data-uri/`; +function dataURIPlugin() { + let resolved; + return { + name: "vite:data-uri", + buildStart() { + resolved = /* @__PURE__ */ new Map(); + }, + resolveId(id) { + if (!id.trimStart().startsWith("data:")) { + return; + } + const uri = new URL$3(id); + if (uri.protocol !== "data:") { + return; + } + const match = dataUriRE.exec(uri.pathname); + if (!match) { + return; + } + const [, mime, format, data] = match; + if (mime !== "text/javascript") { + throw new Error( + `data URI with non-JavaScript mime type is not supported. If you're using legacy JavaScript MIME types (such as 'application/javascript'), please use 'text/javascript' instead.` + ); + } + const base64 = format && base64RE.test(format.substring(1)); + const content = base64 ? Buffer.from(data, "base64").toString("utf-8") : data; + resolved.set(id, content); + return dataUriPrefix + id; + }, + load(id) { + if (id.startsWith(dataUriPrefix)) { + return resolved.get(id.slice(dataUriPrefix.length)); + } + } + }; +} + +/* es-module-lexer 1.6.0 */ +var ImportType;!function(A){A[A.Static=1]="Static",A[A.Dynamic=2]="Dynamic",A[A.ImportMeta=3]="ImportMeta",A[A.StaticSourcePhase=4]="StaticSourcePhase",A[A.DynamicSourcePhase=5]="DynamicSourcePhase";}(ImportType||(ImportType={}));const A=1===new Uint8Array(new Uint16Array([1]).buffer)[0];function parse$d(E,g="@"){if(!C)return init.then((()=>parse$d(E)));const I=E.length+1,w=(C.__heap_base.value||C.__heap_base)+4*I-C.memory.buffer.byteLength;w>0&&C.memory.grow(Math.ceil(w/65536));const K=C.sa(I-1);if((A?B:Q)(E,new Uint16Array(C.memory.buffer,K,I)),!C.parse())throw Object.assign(new Error(`Parse error ${g}:${E.slice(0,C.e()).split("\n").length}:${C.e()-E.lastIndexOf("\n",C.e()-1)}`),{idx:C.e()});const o=[],D=[];for(;C.ri();){const A=C.is(),Q=C.ie(),B=C.it(),g=C.ai(),I=C.id(),w=C.ss(),K=C.se();let D;C.ip()&&(D=k(E.slice(-1===I?A-1:A,-1===I?Q+1:Q))),o.push({n:D,t:B,s:A,e:Q,ss:w,se:K,d:I,a:g});}for(;C.re();){const A=C.es(),Q=C.ee(),B=C.els(),g=C.ele(),I=E.slice(A,Q),w=I[0],K=B<0?void 0:E.slice(B,g),o=K?K[0]:"";D.push({s:A,e:Q,ls:B,le:g,n:'"'===w||"'"===w?k(I):I,ln:'"'===o||"'"===o?k(K):K});}function k(A){try{return (0, eval)(A)}catch(A){}}return [o,D,!!C.f(),!!C.ms()]}function Q(A,Q){const B=A.length;let C=0;for(;C>>8;}}function B(A,Q){const B=A.length;let C=0;for(;C{return A="AGFzbQEAAAABKwhgAX8Bf2AEf39/fwBgAAF/YAAAYAF/AGADf39/AX9gAn9/AX9gA39/fwADMTAAAQECAgICAgICAgICAgICAgICAgIAAwMDBAQAAAUAAAAAAAMDAwAGAAAABwAGAgUEBQFwAQEBBQMBAAEGDwJ/AUHA8gALfwBBwPIACwd6FQZtZW1vcnkCAAJzYQAAAWUAAwJpcwAEAmllAAUCc3MABgJzZQAHAml0AAgCYWkACQJpZAAKAmlwAAsCZXMADAJlZQANA2VscwAOA2VsZQAPAnJpABACcmUAEQFmABICbXMAEwVwYXJzZQAUC19faGVhcF9iYXNlAwEKm0EwaAEBf0EAIAA2AoAKQQAoAtw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AJAA0AgAC0AACIEIAEtAAAiBUcNASABQQFqIQEgAEEBaiEAIAJBf2oiAg0ADAILCyAEIAVrIQMLIAMLC+wBAgBBgAgLzgEAAHgAcABvAHIAdABtAHAAbwByAHQAZgBvAHIAZQB0AGEAbwB1AHIAYwBlAHIAbwBtAHUAbgBjAHQAaQBvAG4AcwBzAGUAcgB0AHYAbwB5AGkAZQBkAGUAbABlAGMAbwBuAHQAaQBuAGkAbgBzAHQAYQBuAHQAeQBiAHIAZQBhAHIAZQB0AHUAcgBkAGUAYgB1AGcAZwBlAGEAdwBhAGkAdABoAHIAdwBoAGkAbABlAGkAZgBjAGEAdABjAGYAaQBuAGEAbABsAGUAbABzAABB0AkLEAEAAAACAAAAAAQAAEA5AAA=","undefined"!=typeof Buffer?Buffer.from(A,"base64"):Uint8Array.from(atob(A),(A=>A.charCodeAt(0)));var A;};const init=WebAssembly.compile(E()).then(WebAssembly.instantiate).then((({exports:A})=>{C=A;})); + +var convertSourceMap$1 = {}; + +(function (exports) { + + Object.defineProperty(exports, 'commentRegex', { + get: function getCommentRegex () { + // Groups: 1: media type, 2: MIME type, 3: charset, 4: encoding, 5: data. + return /^\s*?\/[\/\*][@#]\s+?sourceMappingURL=data:(((?:application|text)\/json)(?:;charset=([^;,]+?)?)?)?(?:;(base64))?,(.*?)$/mg; + } + }); + + + Object.defineProperty(exports, 'mapFileCommentRegex', { + get: function getMapFileCommentRegex () { + // Matches sourceMappingURL in either // or /* comment styles. + return /(?:\/\/[@#][ \t]+?sourceMappingURL=([^\s'"`]+?)[ \t]*?$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*?(?:\*\/){1}[ \t]*?$)/mg; + } + }); + + var decodeBase64; + if (typeof Buffer !== 'undefined') { + if (typeof Buffer.from === 'function') { + decodeBase64 = decodeBase64WithBufferFrom; + } else { + decodeBase64 = decodeBase64WithNewBuffer; + } + } else { + decodeBase64 = decodeBase64WithAtob; + } + + function decodeBase64WithBufferFrom(base64) { + return Buffer.from(base64, 'base64').toString(); + } + + function decodeBase64WithNewBuffer(base64) { + if (typeof value === 'number') { + throw new TypeError('The value to decode must not be of type number.'); + } + return new Buffer(base64, 'base64').toString(); + } + + function decodeBase64WithAtob(base64) { + return decodeURIComponent(escape(atob(base64))); + } + + function stripComment(sm) { + return sm.split(',').pop(); + } + + function readFromFileMap(sm, read) { + var r = exports.mapFileCommentRegex.exec(sm); + // for some odd reason //# .. captures in 1 and /* .. */ in 2 + var filename = r[1] || r[2]; + + try { + var sm = read(filename); + if (sm != null && typeof sm.catch === 'function') { + return sm.catch(throwError); + } else { + return sm; + } + } catch (e) { + throwError(e); + } + + function throwError(e) { + throw new Error('An error occurred while trying to read the map file at ' + filename + '\n' + e.stack); + } + } + + function Converter (sm, opts) { + opts = opts || {}; + + if (opts.hasComment) { + sm = stripComment(sm); + } + + if (opts.encoding === 'base64') { + sm = decodeBase64(sm); + } else if (opts.encoding === 'uri') { + sm = decodeURIComponent(sm); + } + + if (opts.isJSON || opts.encoding) { + sm = JSON.parse(sm); + } + + this.sourcemap = sm; + } + + Converter.prototype.toJSON = function (space) { + return JSON.stringify(this.sourcemap, null, space); + }; + + if (typeof Buffer !== 'undefined') { + if (typeof Buffer.from === 'function') { + Converter.prototype.toBase64 = encodeBase64WithBufferFrom; + } else { + Converter.prototype.toBase64 = encodeBase64WithNewBuffer; + } + } else { + Converter.prototype.toBase64 = encodeBase64WithBtoa; + } + + function encodeBase64WithBufferFrom() { + var json = this.toJSON(); + return Buffer.from(json, 'utf8').toString('base64'); + } + + function encodeBase64WithNewBuffer() { + var json = this.toJSON(); + if (typeof json === 'number') { + throw new TypeError('The json to encode must not be of type number.'); + } + return new Buffer(json, 'utf8').toString('base64'); + } + + function encodeBase64WithBtoa() { + var json = this.toJSON(); + return btoa(unescape(encodeURIComponent(json))); + } + + Converter.prototype.toURI = function () { + var json = this.toJSON(); + return encodeURIComponent(json); + }; + + Converter.prototype.toComment = function (options) { + var encoding, content, data; + if (options != null && options.encoding === 'uri') { + encoding = ''; + content = this.toURI(); + } else { + encoding = ';base64'; + content = this.toBase64(); + } + data = 'sourceMappingURL=data:application/json;charset=utf-8' + encoding + ',' + content; + return options != null && options.multiline ? '/*# ' + data + ' */' : '//# ' + data; + }; + + // returns copy instead of original + Converter.prototype.toObject = function () { + return JSON.parse(this.toJSON()); + }; + + Converter.prototype.addProperty = function (key, value) { + if (this.sourcemap.hasOwnProperty(key)) throw new Error('property "' + key + '" already exists on the sourcemap, use set property instead'); + return this.setProperty(key, value); + }; + + Converter.prototype.setProperty = function (key, value) { + this.sourcemap[key] = value; + return this; + }; + + Converter.prototype.getProperty = function (key) { + return this.sourcemap[key]; + }; + + exports.fromObject = function (obj) { + return new Converter(obj); + }; + + exports.fromJSON = function (json) { + return new Converter(json, { isJSON: true }); + }; + + exports.fromURI = function (uri) { + return new Converter(uri, { encoding: 'uri' }); + }; + + exports.fromBase64 = function (base64) { + return new Converter(base64, { encoding: 'base64' }); + }; + + exports.fromComment = function (comment) { + var m, encoding; + comment = comment + .replace(/^\/\*/g, '//') + .replace(/\*\/$/g, ''); + m = exports.commentRegex.exec(comment); + encoding = m && m[4] || 'uri'; + return new Converter(comment, { encoding: encoding, hasComment: true }); + }; + + function makeConverter(sm) { + return new Converter(sm, { isJSON: true }); + } + + exports.fromMapFileComment = function (comment, read) { + if (typeof read === 'string') { + throw new Error( + 'String directory paths are no longer supported with `fromMapFileComment`\n' + + 'Please review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading' + ) + } + + var sm = readFromFileMap(comment, read); + if (sm != null && typeof sm.then === 'function') { + return sm.then(makeConverter); + } else { + return makeConverter(sm); + } + }; + + // Finds last sourcemap comment in file or returns null if none was found + exports.fromSource = function (content) { + var m = content.match(exports.commentRegex); + return m ? exports.fromComment(m.pop()) : null; + }; + + // Finds last sourcemap comment in file or returns null if none was found + exports.fromMapFileSource = function (content, read) { + if (typeof read === 'string') { + throw new Error( + 'String directory paths are no longer supported with `fromMapFileSource`\n' + + 'Please review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading' + ) + } + var m = content.match(exports.mapFileCommentRegex); + return m ? exports.fromMapFileComment(m.pop(), read) : null; + }; + + exports.removeComments = function (src) { + return src.replace(exports.commentRegex, ''); + }; + + exports.removeMapFileComments = function (src) { + return src.replace(exports.mapFileCommentRegex, ''); + }; + + exports.generateMapFileComment = function (file, options) { + var data = 'sourceMappingURL=' + file; + return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data; + }; +} (convertSourceMap$1)); + +var convertSourceMap = /*@__PURE__*/getDefaultExportFromCjs(convertSourceMap$1); + +const debug$h = createDebugger("vite:sourcemap", { + onlyWhenFocused: true +}); +const virtualSourceRE = /^(?:dep:|browser-external:|virtual:)|\0/; +async function computeSourceRoute(map, file) { + let sourceRoot; + try { + sourceRoot = await fsp.realpath( + path$b.resolve(path$b.dirname(file), map.sourceRoot || "") + ); + } catch { + } + return sourceRoot; +} +async function injectSourcesContent(map, file, logger) { + let sourceRootPromise; + const missingSources = []; + const sourcesContent = map.sourcesContent || []; + const sourcesContentPromises = []; + for (let index = 0; index < map.sources.length; index++) { + const sourcePath = map.sources[index]; + if (sourcesContent[index] == null && sourcePath && !virtualSourceRE.test(sourcePath)) { + sourcesContentPromises.push( + (async () => { + sourceRootPromise ??= computeSourceRoute(map, file); + const sourceRoot = await sourceRootPromise; + let resolvedSourcePath = cleanUrl(decodeURI(sourcePath)); + if (sourceRoot) { + resolvedSourcePath = path$b.resolve(sourceRoot, resolvedSourcePath); + } + sourcesContent[index] = await fsp.readFile(resolvedSourcePath, "utf-8").catch(() => { + missingSources.push(resolvedSourcePath); + return null; + }); + })() + ); + } + } + await Promise.all(sourcesContentPromises); + map.sourcesContent = sourcesContent; + if (missingSources.length) { + logger.warnOnce(`Sourcemap for "${file}" points to missing source files`); + debug$h?.(`Missing sources: + ` + missingSources.join(` + `)); + } +} +function genSourceMapUrl(map) { + if (typeof map !== "string") { + map = JSON.stringify(map); + } + return `data:application/json;base64,${Buffer.from(map).toString("base64")}`; +} +function getCodeWithSourcemap(type, code, map) { + if (debug$h) { + code += ` +/*${JSON.stringify(map, null, 2).replace(/\*\//g, "*\\/")}*/ +`; + } + if (type === "js") { + code += ` +//# sourceMappingURL=${genSourceMapUrl(map)}`; + } else if (type === "css") { + code += ` +/*# sourceMappingURL=${genSourceMapUrl(map)} */`; + } + return code; +} +function applySourcemapIgnoreList(map, sourcemapPath, sourcemapIgnoreList, logger) { + let { x_google_ignoreList } = map; + if (x_google_ignoreList === void 0) { + x_google_ignoreList = []; + } + for (let sourcesIndex = 0; sourcesIndex < map.sources.length; ++sourcesIndex) { + const sourcePath = map.sources[sourcesIndex]; + if (!sourcePath) continue; + const ignoreList = sourcemapIgnoreList( + path$b.isAbsolute(sourcePath) ? sourcePath : path$b.resolve(path$b.dirname(sourcemapPath), sourcePath), + sourcemapPath + ); + if (logger && typeof ignoreList !== "boolean") { + logger.warn("sourcemapIgnoreList function must return a boolean."); + } + if (ignoreList && !x_google_ignoreList.includes(sourcesIndex)) { + x_google_ignoreList.push(sourcesIndex); + } + } + if (x_google_ignoreList.length > 0) { + if (!map.x_google_ignoreList) map.x_google_ignoreList = x_google_ignoreList; + } +} +async function extractSourcemapFromFile(code, filePath) { + const map = (convertSourceMap.fromSource(code) || await convertSourceMap.fromMapFileSource( + code, + createConvertSourceMapReadMap(filePath) + ))?.toObject(); + if (map) { + return { + code: code.replace(convertSourceMap.mapFileCommentRegex, blankReplacer), + map + }; + } +} +function createConvertSourceMapReadMap(originalFileName) { + return (filename) => { + return fsp.readFile( + path$b.resolve(path$b.dirname(originalFileName), filename), + "utf-8" + ); + }; +} + +var src$1 = {}; + +// @ts-check +const path$9 = require$$0$2; +const fs$7 = require$$0$4; +const os$2 = require$$2; +const url$4 = require$$0$5; + +const fsReadFileAsync = fs$7.promises.readFile; + +/** @type {(name: string, sync: boolean) => string[]} */ +function getDefaultSearchPlaces(name, sync) { + return [ + 'package.json', + `.${name}rc.json`, + `.${name}rc.js`, + `.${name}rc.cjs`, + ...(sync ? [] : [`.${name}rc.mjs`]), + `.config/${name}rc`, + `.config/${name}rc.json`, + `.config/${name}rc.js`, + `.config/${name}rc.cjs`, + ...(sync ? [] : [`.config/${name}rc.mjs`]), + `${name}.config.js`, + `${name}.config.cjs`, + ...(sync ? [] : [`${name}.config.mjs`]), + ]; +} + +/** + * @type {(p: string) => string} + * + * see #17 + * On *nix, if cwd is not under homedir, + * the last path will be '', ('/build' -> '') + * but it should be '/' actually. + * And on Windows, this will never happen. ('C:\build' -> 'C:') + */ +function parentDir(p) { + return path$9.dirname(p) || path$9.sep; +} + +/** @type {import('./index').LoaderSync} */ +const jsonLoader = (_, content) => JSON.parse(content); +// Use plain require in webpack context for dynamic import +const requireFunc = + typeof __webpack_require__ === 'function' ? __non_webpack_require__ : __require; +/** @type {import('./index').LoadersSync} */ +const defaultLoadersSync = Object.freeze({ + '.js': requireFunc, + '.json': requireFunc, + '.cjs': requireFunc, + noExt: jsonLoader, +}); +src$1.defaultLoadersSync = defaultLoadersSync; + +/** @type {import('./index').Loader} */ +const dynamicImport = async id => { + try { + const fileUrl = url$4.pathToFileURL(id).href; + const mod = await import(/* webpackIgnore: true */ fileUrl); + + return mod.default; + } catch (e) { + try { + return requireFunc(id); + } catch (/** @type {any} */ requireE) { + if ( + requireE.code === 'ERR_REQUIRE_ESM' || + (requireE instanceof SyntaxError && + requireE + .toString() + .includes('Cannot use import statement outside a module')) + ) { + throw e; + } + throw requireE; + } + } +}; + +/** @type {import('./index').Loaders} */ +const defaultLoaders = Object.freeze({ + '.js': dynamicImport, + '.mjs': dynamicImport, + '.cjs': dynamicImport, + '.json': jsonLoader, + noExt: jsonLoader, +}); +src$1.defaultLoaders = defaultLoaders; + +/** + * @param {string} name + * @param {import('./index').Options | import('./index').OptionsSync} options + * @param {boolean} sync + * @returns {Required} + */ +function getOptions(name, options, sync) { + /** @type {Required} */ + const conf = { + stopDir: os$2.homedir(), + searchPlaces: getDefaultSearchPlaces(name, sync), + ignoreEmptySearchPlaces: true, + cache: true, + transform: x => x, + packageProp: [name], + ...options, + loaders: { + ...(sync ? defaultLoadersSync : defaultLoaders), + ...options.loaders, + }, + }; + conf.searchPlaces.forEach(place => { + const key = path$9.extname(place) || 'noExt'; + const loader = conf.loaders[key]; + if (!loader) { + throw new Error(`Missing loader for extension "${place}"`); + } + + if (typeof loader !== 'function') { + throw new Error( + `Loader for extension "${place}" is not a function: Received ${typeof loader}.`, + ); + } + }); + + return conf; +} + +/** @type {(props: string | string[], obj: Record) => unknown} */ +function getPackageProp(props, obj) { + if (typeof props === 'string' && props in obj) return obj[props]; + return ( + (Array.isArray(props) ? props : props.split('.')).reduce( + (acc, prop) => (acc === undefined ? acc : acc[prop]), + obj, + ) || null + ); +} + +/** @param {string} filepath */ +function validateFilePath(filepath) { + if (!filepath) throw new Error('load must pass a non-empty string'); +} + +/** @type {(loader: import('./index').Loader, ext: string) => void} */ +function validateLoader(loader, ext) { + if (!loader) throw new Error(`No loader specified for extension "${ext}"`); + if (typeof loader !== 'function') throw new Error('loader is not a function'); +} + +/** @type {(enableCache: boolean) => (c: Map, filepath: string, res: T) => T} */ +const makeEmplace = enableCache => (c, filepath, res) => { + if (enableCache) c.set(filepath, res); + return res; +}; + +/** @type {import('./index').lilconfig} */ +src$1.lilconfig = function lilconfig(name, options) { + const { + ignoreEmptySearchPlaces, + loaders, + packageProp, + searchPlaces, + stopDir, + transform, + cache, + } = getOptions(name, options ?? {}, false); + const searchCache = new Map(); + const loadCache = new Map(); + const emplace = makeEmplace(cache); + + return { + async search(searchFrom = process.cwd()) { + /** @type {import('./index').LilconfigResult} */ + const result = { + config: null, + filepath: '', + }; + + /** @type {Set} */ + const visited = new Set(); + let dir = searchFrom; + dirLoop: while (true) { + if (cache) { + const r = searchCache.get(dir); + if (r !== undefined) { + for (const p of visited) searchCache.set(p, r); + return r; + } + visited.add(dir); + } + + for (const searchPlace of searchPlaces) { + const filepath = path$9.join(dir, searchPlace); + try { + await fs$7.promises.access(filepath); + } catch { + continue; + } + const content = String(await fsReadFileAsync(filepath)); + const loaderKey = path$9.extname(searchPlace) || 'noExt'; + const loader = loaders[loaderKey]; + + // handle package.json + if (searchPlace === 'package.json') { + const pkg = await loader(filepath, content); + const maybeConfig = getPackageProp(packageProp, pkg); + if (maybeConfig != null) { + result.config = maybeConfig; + result.filepath = filepath; + break dirLoop; + } + + continue; + } + + // handle other type of configs + const isEmpty = content.trim() === ''; + if (isEmpty && ignoreEmptySearchPlaces) continue; + + if (isEmpty) { + result.isEmpty = true; + result.config = undefined; + } else { + validateLoader(loader, loaderKey); + result.config = await loader(filepath, content); + } + result.filepath = filepath; + break dirLoop; + } + if (dir === stopDir || dir === parentDir(dir)) break dirLoop; + dir = parentDir(dir); + } + + const transformed = + // not found + result.filepath === '' && result.config === null + ? transform(null) + : transform(result); + + if (cache) { + for (const p of visited) searchCache.set(p, transformed); + } + + return transformed; + }, + async load(filepath) { + validateFilePath(filepath); + const absPath = path$9.resolve(process.cwd(), filepath); + if (cache && loadCache.has(absPath)) { + return loadCache.get(absPath); + } + const {base, ext} = path$9.parse(absPath); + const loaderKey = ext || 'noExt'; + const loader = loaders[loaderKey]; + validateLoader(loader, loaderKey); + const content = String(await fsReadFileAsync(absPath)); + + if (base === 'package.json') { + const pkg = await loader(absPath, content); + return emplace( + loadCache, + absPath, + transform({ + config: getPackageProp(packageProp, pkg), + filepath: absPath, + }), + ); + } + /** @type {import('./index').LilconfigResult} */ + const result = { + config: null, + filepath: absPath, + }; + // handle other type of configs + const isEmpty = content.trim() === ''; + if (isEmpty && ignoreEmptySearchPlaces) + return emplace( + loadCache, + absPath, + transform({ + config: undefined, + filepath: absPath, + isEmpty: true, + }), + ); + + // cosmiconfig returns undefined for empty files + result.config = isEmpty ? undefined : await loader(absPath, content); + + return emplace( + loadCache, + absPath, + transform(isEmpty ? {...result, isEmpty, config: undefined} : result), + ); + }, + clearLoadCache() { + if (cache) loadCache.clear(); + }, + clearSearchCache() { + if (cache) searchCache.clear(); + }, + clearCaches() { + if (cache) { + loadCache.clear(); + searchCache.clear(); + } + }, + }; +}; + +/** @type {import('./index').lilconfigSync} */ +src$1.lilconfigSync = function lilconfigSync(name, options) { + const { + ignoreEmptySearchPlaces, + loaders, + packageProp, + searchPlaces, + stopDir, + transform, + cache, + } = getOptions(name, options ?? {}, true); + const searchCache = new Map(); + const loadCache = new Map(); + const emplace = makeEmplace(cache); + + return { + search(searchFrom = process.cwd()) { + /** @type {import('./index').LilconfigResult} */ + const result = { + config: null, + filepath: '', + }; + + /** @type {Set} */ + const visited = new Set(); + let dir = searchFrom; + dirLoop: while (true) { + if (cache) { + const r = searchCache.get(dir); + if (r !== undefined) { + for (const p of visited) searchCache.set(p, r); + return r; + } + visited.add(dir); + } + + for (const searchPlace of searchPlaces) { + const filepath = path$9.join(dir, searchPlace); + try { + fs$7.accessSync(filepath); + } catch { + continue; + } + const loaderKey = path$9.extname(searchPlace) || 'noExt'; + const loader = loaders[loaderKey]; + const content = String(fs$7.readFileSync(filepath)); + + // handle package.json + if (searchPlace === 'package.json') { + const pkg = loader(filepath, content); + const maybeConfig = getPackageProp(packageProp, pkg); + if (maybeConfig != null) { + result.config = maybeConfig; + result.filepath = filepath; + break dirLoop; + } + + continue; + } + + // handle other type of configs + const isEmpty = content.trim() === ''; + if (isEmpty && ignoreEmptySearchPlaces) continue; + + if (isEmpty) { + result.isEmpty = true; + result.config = undefined; + } else { + validateLoader(loader, loaderKey); + result.config = loader(filepath, content); + } + result.filepath = filepath; + break dirLoop; + } + if (dir === stopDir || dir === parentDir(dir)) break dirLoop; + dir = parentDir(dir); + } + + const transformed = + // not found + result.filepath === '' && result.config === null + ? transform(null) + : transform(result); + + if (cache) { + for (const p of visited) searchCache.set(p, transformed); + } + + return transformed; + }, + load(filepath) { + validateFilePath(filepath); + const absPath = path$9.resolve(process.cwd(), filepath); + if (cache && loadCache.has(absPath)) { + return loadCache.get(absPath); + } + const {base, ext} = path$9.parse(absPath); + const loaderKey = ext || 'noExt'; + const loader = loaders[loaderKey]; + validateLoader(loader, loaderKey); + + const content = String(fs$7.readFileSync(absPath)); + + if (base === 'package.json') { + const pkg = loader(absPath, content); + return transform({ + config: getPackageProp(packageProp, pkg), + filepath: absPath, + }); + } + const result = { + config: null, + filepath: absPath, + }; + // handle other type of configs + const isEmpty = content.trim() === ''; + if (isEmpty && ignoreEmptySearchPlaces) + return emplace( + loadCache, + absPath, + transform({ + filepath: absPath, + config: undefined, + isEmpty: true, + }), + ); + + // cosmiconfig returns undefined for empty files + result.config = isEmpty ? undefined : loader(absPath, content); + + return emplace( + loadCache, + absPath, + transform(isEmpty ? {...result, isEmpty, config: undefined} : result), + ); + }, + clearLoadCache() { + if (cache) loadCache.clear(); + }, + clearSearchCache() { + if (cache) searchCache.clear(); + }, + clearCaches() { + if (cache) { + loadCache.clear(); + searchCache.clear(); + } + }, + }; +}; + +// @ts-check +const { createRequire } = require$$0$6; +const { fileURLToPath, pathToFileURL } = require$$1$1; + +const TS_EXT_RE = /\.[mc]?ts$/; + +let tsx; + +let jiti; + +let importError = []; + +/** + * @param {string} name + * @param {string} rootFile + * @returns {Promise} + */ +async function req$3(name, rootFile = fileURLToPath(import.meta.url)) { + let url = createRequire(rootFile).resolve(name); + + try { + return (await import(`${pathToFileURL(url)}?t=${Date.now()}`)).default + } catch (err) { + if (!TS_EXT_RE.test(url)) { + /* c8 ignore start */ + throw err + } + } + + if (tsx === undefined) { + try { + tsx = await import('tsx/cjs/api'); + } catch (error) { + importError.push(error); + } + } + + if (tsx) { + let loaded = tsx.require(name, rootFile); + return loaded && '__esModule' in loaded ? loaded.default : loaded + } + + if (jiti === undefined) { + try { + jiti = (await import('jiti')).default; + } catch (error) { + importError.push(error); + } + } + + if (jiti) { + return jiti(rootFile, { interopDefault: true })(name) + } + + throw new Error( + `'tsx' or 'jiti' is required for the TypeScript configuration files. Make sure it is installed\nError: ${importError + .map(error => error.message) + .join('\n')}` + ) +} + +var req_1 = req$3; + +// @ts-check +const req$2 = req_1; + +/** + * Load Options + * + * @private + * @method options + * + * @param {Object} config PostCSS Config + * + * @return {Promise} options PostCSS Options + */ +async function options(config, file) { + if (config.parser && typeof config.parser === 'string') { + try { + config.parser = await req$2(config.parser, file); + } catch (err) { + throw new Error( + `Loading PostCSS Parser failed: ${err.message}\n\n(@${file})` + ) + } + } + + if (config.syntax && typeof config.syntax === 'string') { + try { + config.syntax = await req$2(config.syntax, file); + } catch (err) { + throw new Error( + `Loading PostCSS Syntax failed: ${err.message}\n\n(@${file})` + ) + } + } + + if (config.stringifier && typeof config.stringifier === 'string') { + try { + config.stringifier = await req$2(config.stringifier, file); + } catch (err) { + throw new Error( + `Loading PostCSS Stringifier failed: ${err.message}\n\n(@${file})` + ) + } + } + + return config +} + +var options_1 = options; + +// @ts-check +const req$1 = req_1; + +/** + * Plugin Loader + * + * @private + * @method load + * + * @param {String} plugin PostCSS Plugin Name + * @param {Object} options PostCSS Plugin Options + * + * @return {Promise} PostCSS Plugin + */ +async function load(plugin, options, file) { + try { + if ( + options === null || + options === undefined || + Object.keys(options).length === 0 + ) { + return await req$1(plugin, file) + } else { + return (await req$1(plugin, file))(options) + /* c8 ignore next */ + } + } catch (err) { + throw new Error( + `Loading PostCSS Plugin failed: ${err.message}\n\n(@${file})` + ) + } +} + +/** + * Load Plugins + * + * @private + * @method plugins + * + * @param {Object} config PostCSS Config Plugins + * + * @return {Promise} plugins PostCSS Plugins + */ +async function plugins(config, file) { + let list = []; + + if (Array.isArray(config.plugins)) { + list = config.plugins.filter(Boolean); + } else { + list = Object.entries(config.plugins) + .filter(([, options]) => { + return options !== false + }) + .map(([plugin, options]) => { + return load(plugin, options, file) + }); + list = await Promise.all(list); + } + + if (list.length && list.length > 0) { + list.forEach((plugin, i) => { + if (plugin.default) { + plugin = plugin.default; + } + + if (plugin.postcss === true) { + plugin = plugin(); + } else if (plugin.postcss) { + plugin = plugin.postcss; + } + + if ( + !( + (typeof plugin === 'object' && Array.isArray(plugin.plugins)) || + (typeof plugin === 'object' && plugin.postcssPlugin) || + typeof plugin === 'function' + ) + ) { + throw new TypeError( + `Invalid PostCSS Plugin found at: plugins[${i}]\n\n(@${file})` + ) + } + }); + } + + return list +} + +var plugins_1 = plugins; + +// @ts-check +const { resolve } = path$b; + +const config$1 = src$1; + +const loadOptions = options_1; +const loadPlugins = plugins_1; +const req = req_1; + +const interopRequireDefault = obj => + obj && obj.__esModule ? obj : { default: obj }; + +/** + * Process the result from cosmiconfig + * + * @param {Object} ctx Config Context + * @param {Object} result Cosmiconfig result + * + * @return {Promise} PostCSS Config + */ +async function processResult(ctx, result) { + let file = result.filepath || ''; + let projectConfig = interopRequireDefault(result.config).default || {}; + + if (typeof projectConfig === 'function') { + projectConfig = projectConfig(ctx); + } else { + projectConfig = Object.assign({}, projectConfig, ctx); + } + + if (!projectConfig.plugins) { + projectConfig.plugins = []; + } + + let res = { + file, + options: await loadOptions(projectConfig, file), + plugins: await loadPlugins(projectConfig, file) + }; + delete projectConfig.plugins; + return res +} + +/** + * Builds the Config Context + * + * @param {Object} ctx Config Context + * + * @return {Object} Config Context + */ +function createContext(ctx) { + /** + * @type {Object} + * + * @prop {String} cwd=process.cwd() Config search start location + * @prop {String} env=process.env.NODE_ENV Config Enviroment, will be set to `development` by `postcss-load-config` if `process.env.NODE_ENV` is `undefined` + */ + ctx = Object.assign( + { + cwd: process.cwd(), + env: process.env.NODE_ENV + }, + ctx + ); + + if (!ctx.env) { + process.env.NODE_ENV = 'development'; + } + + return ctx +} + +async function loader(filepath) { + return req(filepath) +} + +let yaml; +async function yamlLoader(_, content) { + if (!yaml) { + try { + yaml = await import('yaml'); + } catch (e) { + /* c8 ignore start */ + throw new Error( + `'yaml' is required for the YAML configuration files. Make sure it is installed\nError: ${e.message}` + ) + } + } + return yaml.parse(content); +} + +/** @return {import('lilconfig').Options} */ +const withLoaders = (options = {}) => { + let moduleName = 'postcss'; + + return { + ...options, + loaders: { + ...options.loaders, + '.cjs': loader, + '.cts': loader, + '.js': loader, + '.mjs': loader, + '.mts': loader, + '.ts': loader, + '.yaml': yamlLoader, + '.yml': yamlLoader + }, + searchPlaces: [ + ...(options.searchPlaces || []), + 'package.json', + `.${moduleName}rc`, + `.${moduleName}rc.json`, + `.${moduleName}rc.yaml`, + `.${moduleName}rc.yml`, + `.${moduleName}rc.ts`, + `.${moduleName}rc.cts`, + `.${moduleName}rc.mts`, + `.${moduleName}rc.js`, + `.${moduleName}rc.cjs`, + `.${moduleName}rc.mjs`, + `${moduleName}.config.ts`, + `${moduleName}.config.cts`, + `${moduleName}.config.mts`, + `${moduleName}.config.js`, + `${moduleName}.config.cjs`, + `${moduleName}.config.mjs` + ] + } +}; + +/** + * Load Config + * + * @method rc + * + * @param {Object} ctx Config Context + * @param {String} path Config Path + * @param {Object} options Config Options + * + * @return {Promise} config PostCSS Config + */ +function rc(ctx, path, options) { + /** + * @type {Object} The full Config Context + */ + ctx = createContext(ctx); + + /** + * @type {String} `process.cwd()` + */ + path = path ? resolve(path) : process.cwd(); + + return config$1 + .lilconfig('postcss', withLoaders(options)) + .search(path) + .then(result => { + if (!result) { + throw new Error(`No PostCSS Config found in: ${path}`) + } + return processResult(ctx, result) + }) +} + +/** + * Autoload Config for PostCSS + * + * @author Michael Ciniawsky @michael-ciniawsky + * @license MIT + * + * @module postcss-load-config + * @version 2.1.0 + * + * @requires comsiconfig + * @requires ./options + * @requires ./plugins + */ +var src = rc; + +var postcssrc = /*@__PURE__*/getDefaultExportFromCjs(src); + +function matches$1(pattern, importee) { + if (pattern instanceof RegExp) { + return pattern.test(importee); + } + if (importee.length < pattern.length) { + return false; + } + if (importee === pattern) { + return true; + } + // eslint-disable-next-line prefer-template + return importee.startsWith(pattern + '/'); +} +function getEntries({ entries, customResolver }) { + if (!entries) { + return []; + } + const resolverFunctionFromOptions = resolveCustomResolver(customResolver); + if (Array.isArray(entries)) { + return entries.map((entry) => { + return { + find: entry.find, + replacement: entry.replacement, + resolverFunction: resolveCustomResolver(entry.customResolver) || resolverFunctionFromOptions + }; + }); + } + return Object.entries(entries).map(([key, value]) => { + return { find: key, replacement: value, resolverFunction: resolverFunctionFromOptions }; + }); +} +function getHookFunction(hook) { + if (typeof hook === 'function') { + return hook; + } + if (hook && 'handler' in hook && typeof hook.handler === 'function') { + return hook.handler; + } + return null; +} +function resolveCustomResolver(customResolver) { + if (typeof customResolver === 'function') { + return customResolver; + } + if (customResolver) { + return getHookFunction(customResolver.resolveId); + } + return null; +} +function alias$1(options = {}) { + const entries = getEntries(options); + if (entries.length === 0) { + return { + name: 'alias', + resolveId: () => null + }; + } + return { + name: 'alias', + async buildStart(inputOptions) { + await Promise.all([...(Array.isArray(options.entries) ? options.entries : []), options].map(({ customResolver }) => { var _a; return customResolver && ((_a = getHookFunction(customResolver.buildStart)) === null || _a === void 0 ? void 0 : _a.call(this, inputOptions)); })); + }, + resolveId(importee, importer, resolveOptions) { + // First match is supposed to be the correct one + const matchedEntry = entries.find((entry) => matches$1(entry.find, importee)); + if (!matchedEntry) { + return null; + } + const updatedId = importee.replace(matchedEntry.find, matchedEntry.replacement); + if (matchedEntry.resolverFunction) { + return matchedEntry.resolverFunction.call(this, updatedId, importer, resolveOptions); + } + return this.resolve(updatedId, importer, Object.assign({ skipSelf: true }, resolveOptions)).then((resolved) => { + if (resolved) + return resolved; + if (!require$$0$2.isAbsolute(updatedId)) { + this.warn(`rewrote ${importee} to ${updatedId} but was not an abolute path and was not handled by other plugins. ` + + `This will lead to duplicated modules for the same path. ` + + `To avoid duplicating modules, you should resolve to an absolute path.`); + } + return { id: updatedId }; + }); + } + }; +} + +const jsonExtRE = /\.json(?:$|\?)(?!commonjs-(?:proxy|external))/; +const jsonObjRE = /^\s*\{/; +const jsonLangs = `\\.(?:json|json5)(?:$|\\?)`; +const jsonLangRE = new RegExp(jsonLangs); +const isJSONRequest = (request) => jsonLangRE.test(request); +function jsonPlugin(options, isBuild) { + const plugin = { + name: "vite:json", + transform: { + handler(json, id) { + if (!jsonExtRE.test(id)) return null; + if (SPECIAL_QUERY_RE.test(id)) return null; + if (inlineRE$3.test(id) || noInlineRE.test(id)) { + this.warn( + ` +Using ?inline or ?no-inline for JSON imports will have no effect. +Please use ?url&inline or ?url&no-inline to control JSON file inlining behavior. +` + ); + } + json = stripBomTag(json); + try { + if (options.stringify !== false) { + if (options.namedExports && jsonObjRE.test(json)) { + const parsed = JSON.parse(json); + const keys = Object.keys(parsed); + let code = ""; + let defaultObjectCode = "{\n"; + for (const key of keys) { + if (key === makeLegalIdentifier(key)) { + code += `export const ${key} = ${serializeValue(parsed[key])}; +`; + defaultObjectCode += ` ${key}, +`; + } else { + defaultObjectCode += ` ${JSON.stringify(key)}: ${serializeValue(parsed[key])}, +`; + } + } + defaultObjectCode += "}"; + code += `export default ${defaultObjectCode}; +`; + return { + code, + map: { mappings: "" } + }; + } + if (options.stringify === true || // use 10kB as a threshold for 'auto' + // https://v8.dev/blog/cost-of-javascript-2019#:~:text=A%20good%20rule%20of%20thumb%20is%20to%20apply%20this%20technique%20for%20objects%20of%2010%20kB%20or%20larger + json.length > 10 * 1e3) { + if (isBuild) { + json = JSON.stringify(JSON.parse(json)); + } + return { + code: `export default /* #__PURE__ */ JSON.parse(${JSON.stringify(json)})`, + map: { mappings: "" } + }; + } + } + return { + code: dataToEsm(JSON.parse(json), { + preferConst: true, + namedExports: options.namedExports + }), + map: { mappings: "" } + }; + } catch (e) { + const position = extractJsonErrorPosition(e.message, json.length); + const msg = position ? `, invalid JSON syntax found at position ${position}` : `.`; + this.error(`Failed to parse JSON file` + msg, position); + } + } + } + }; + const handler = plugin.transform.handler; + plugin.transform = handler; + plugin.transform.handler = handler; + return plugin; +} +function serializeValue(value) { + const valueAsString = JSON.stringify(value); + if (typeof value === "object" && value != null && valueAsString.length > 10 * 1e3) { + return `/* #__PURE__ */ JSON.parse(${JSON.stringify(valueAsString)})`; + } + return valueAsString; +} +function extractJsonErrorPosition(errorMessage, inputLength) { + if (errorMessage.startsWith("Unexpected end of JSON input")) { + return inputLength - 1; + } + const errorMessageList = /at position (\d+)/.exec(errorMessage); + return errorMessageList ? Math.max(parseInt(errorMessageList[1], 10) - 1, 0) : void 0; +} + +function e(e,n,r){throw new Error(r?`No known conditions for "${n}" specifier in "${e}" package`:`Missing "${n}" specifier in "${e}" package`)}function n(n,i,o,f){let s,u,l=r(n,o),c=function(e){let n=new Set(["default",...e.conditions||[]]);return e.unsafe||n.add(e.require?"require":"import"),e.unsafe||n.add(e.browser?"browser":"node"),n}(f||{}),a=i[l];if(void 0===a){let e,n,r,t;for(t in i)n&&t.length1&&(r=t.indexOf("*",1),~r&&(e=RegExp("^"+t.substring(0,r)+"(.*)"+t.substring(1+r)+"$").exec(l),e&&e[1]&&(u=e[1],n=t))));a=i[n];}return a||e(n,l),s=t(a,c),s||e(n,l,1),u&&function(e,n){let r,t=0,i=e.length,o=/[*]/g,f=/[/]$/;for(;t `${encodeQueryKey(key)}=${encodeQueryValue(_value)}` + ).join("&"); + } + return `${encodeQueryKey(key)}=${encodeQueryValue(value)}`; +} +function stringifyQuery(query) { + return Object.keys(query).filter((k) => query[k] !== void 0).map((k) => encodeQueryItem(k, query[k])).filter(Boolean).join("&"); +} + +new Set(builtinModules); +function clearImports(imports) { + return (imports || "").replace(/(\/\/[^\n]*\n|\/\*.*\*\/)/g, "").replace(/\s+/g, " "); +} +function getImportNames(cleanedImports) { + const topLevelImports = cleanedImports.replace(/{([^}]*)}/, ""); + const namespacedImport = topLevelImports.match(/\* as \s*(\S*)/)?.[1]; + const defaultImport = topLevelImports.split(",").find((index) => !/[*{}]/.test(index))?.trim() || undefined; + return { + namespacedImport, + defaultImport + }; +} + +/** + * @typedef ErrnoExceptionFields + * @property {number | undefined} [errnode] + * @property {string | undefined} [code] + * @property {string | undefined} [path] + * @property {string | undefined} [syscall] + * @property {string | undefined} [url] + * + * @typedef {Error & ErrnoExceptionFields} ErrnoException + */ + + +const own$1 = {}.hasOwnProperty; + +const classRegExp = /^([A-Z][a-z\d]*)+$/; +// Sorted by a rough estimate on most frequently used entries. +const kTypes = new Set([ + 'string', + 'function', + 'number', + 'object', + // Accept 'Function' and 'Object' as alternative to the lower cased version. + 'Function', + 'Object', + 'boolean', + 'bigint', + 'symbol' +]); + +/** + * Create a list string in the form like 'A and B' or 'A, B, ..., and Z'. + * We cannot use Intl.ListFormat because it's not available in + * --without-intl builds. + * + * @param {Array} array + * An array of strings. + * @param {string} [type] + * The list type to be inserted before the last element. + * @returns {string} + */ +function formatList(array, type = 'and') { + return array.length < 3 + ? array.join(` ${type} `) + : `${array.slice(0, -1).join(', ')}, ${type} ${array[array.length - 1]}` +} + +/** @type {Map} */ +const messages = new Map(); +const nodeInternalPrefix = '__node_internal_'; +/** @type {number} */ +let userStackTraceLimit; + +createError( + 'ERR_INVALID_ARG_TYPE', + /** + * @param {string} name + * @param {Array | string} expected + * @param {unknown} actual + */ + (name, expected, actual) => { + assert$1(typeof name === 'string', "'name' must be a string"); + if (!Array.isArray(expected)) { + expected = [expected]; + } + + let message = 'The '; + if (name.endsWith(' argument')) { + // For cases like 'first argument' + message += `${name} `; + } else { + const type = name.includes('.') ? 'property' : 'argument'; + message += `"${name}" ${type} `; + } + + message += 'must be '; + + /** @type {Array} */ + const types = []; + /** @type {Array} */ + const instances = []; + /** @type {Array} */ + const other = []; + + for (const value of expected) { + assert$1( + typeof value === 'string', + 'All expected entries have to be of type string' + ); + + if (kTypes.has(value)) { + types.push(value.toLowerCase()); + } else if (classRegExp.exec(value) === null) { + assert$1( + value !== 'object', + 'The value "object" should be written as "Object"' + ); + other.push(value); + } else { + instances.push(value); + } + } + + // Special handle `object` in case other instances are allowed to outline + // the differences between each other. + if (instances.length > 0) { + const pos = types.indexOf('object'); + if (pos !== -1) { + types.slice(pos, 1); + instances.push('Object'); + } + } + + if (types.length > 0) { + message += `${types.length > 1 ? 'one of type' : 'of type'} ${formatList( + types, + 'or' + )}`; + if (instances.length > 0 || other.length > 0) message += ' or '; + } + + if (instances.length > 0) { + message += `an instance of ${formatList(instances, 'or')}`; + if (other.length > 0) message += ' or '; + } + + if (other.length > 0) { + if (other.length > 1) { + message += `one of ${formatList(other, 'or')}`; + } else { + if (other[0].toLowerCase() !== other[0]) message += 'an '; + message += `${other[0]}`; + } + } + + message += `. Received ${determineSpecificType(actual)}`; + + return message + }, + TypeError +); + +createError( + 'ERR_INVALID_MODULE_SPECIFIER', + /** + * @param {string} request + * @param {string} reason + * @param {string} [base] + */ + (request, reason, base = undefined) => { + return `Invalid module "${request}" ${reason}${ + base ? ` imported from ${base}` : '' + }` + }, + TypeError +); + +createError( + 'ERR_INVALID_PACKAGE_CONFIG', + /** + * @param {string} path + * @param {string} [base] + * @param {string} [message] + */ + (path, base, message) => { + return `Invalid package config ${path}${ + base ? ` while importing ${base}` : '' + }${message ? `. ${message}` : ''}` + }, + Error +); + +createError( + 'ERR_INVALID_PACKAGE_TARGET', + /** + * @param {string} packagePath + * @param {string} key + * @param {unknown} target + * @param {boolean} [isImport=false] + * @param {string} [base] + */ + (packagePath, key, target, isImport = false, base = undefined) => { + const relatedError = + typeof target === 'string' && + !isImport && + target.length > 0 && + !target.startsWith('./'); + if (key === '.') { + assert$1(isImport === false); + return ( + `Invalid "exports" main target ${JSON.stringify(target)} defined ` + + `in the package config ${packagePath}package.json${ + base ? ` imported from ${base}` : '' + }${relatedError ? '; targets must start with "./"' : ''}` + ) + } + + return `Invalid "${ + isImport ? 'imports' : 'exports' + }" target ${JSON.stringify( + target + )} defined for '${key}' in the package config ${packagePath}package.json${ + base ? ` imported from ${base}` : '' + }${relatedError ? '; targets must start with "./"' : ''}` + }, + Error +); + +createError( + 'ERR_MODULE_NOT_FOUND', + /** + * @param {string} path + * @param {string} base + * @param {boolean} [exactUrl] + */ + (path, base, exactUrl = false) => { + return `Cannot find ${ + exactUrl ? 'module' : 'package' + } '${path}' imported from ${base}` + }, + Error +); + +createError( + 'ERR_NETWORK_IMPORT_DISALLOWED', + "import of '%s' by %s is not supported: %s", + Error +); + +createError( + 'ERR_PACKAGE_IMPORT_NOT_DEFINED', + /** + * @param {string} specifier + * @param {string} packagePath + * @param {string} base + */ + (specifier, packagePath, base) => { + return `Package import specifier "${specifier}" is not defined${ + packagePath ? ` in package ${packagePath}package.json` : '' + } imported from ${base}` + }, + TypeError +); + +createError( + 'ERR_PACKAGE_PATH_NOT_EXPORTED', + /** + * @param {string} packagePath + * @param {string} subpath + * @param {string} [base] + */ + (packagePath, subpath, base = undefined) => { + if (subpath === '.') + return `No "exports" main defined in ${packagePath}package.json${ + base ? ` imported from ${base}` : '' + }` + return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${ + base ? ` imported from ${base}` : '' + }` + }, + Error +); + +createError( + 'ERR_UNSUPPORTED_DIR_IMPORT', + "Directory import '%s' is not supported " + + 'resolving ES modules imported from %s', + Error +); + +createError( + 'ERR_UNSUPPORTED_RESOLVE_REQUEST', + 'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.', + TypeError +); + +createError( + 'ERR_UNKNOWN_FILE_EXTENSION', + /** + * @param {string} extension + * @param {string} path + */ + (extension, path) => { + return `Unknown file extension "${extension}" for ${path}` + }, + TypeError +); + +createError( + 'ERR_INVALID_ARG_VALUE', + /** + * @param {string} name + * @param {unknown} value + * @param {string} [reason='is invalid'] + */ + (name, value, reason = 'is invalid') => { + let inspected = inspect(value); + + if (inspected.length > 128) { + inspected = `${inspected.slice(0, 128)}...`; + } + + const type = name.includes('.') ? 'property' : 'argument'; + + return `The ${type} '${name}' ${reason}. Received ${inspected}` + }, + TypeError + // Note: extra classes have been shaken out. + // , RangeError +); + +/** + * Utility function for registering the error codes. Only used here. Exported + * *only* to allow for testing. + * @param {string} sym + * @param {MessageFunction | string} value + * @param {ErrorConstructor} constructor + * @returns {new (...parameters: Array) => Error} + */ +function createError(sym, value, constructor) { + // Special case for SystemError that formats the error message differently + // The SystemErrors only have SystemError as their base classes. + messages.set(sym, value); + + return makeNodeErrorWithCode(constructor, sym) +} + +/** + * @param {ErrorConstructor} Base + * @param {string} key + * @returns {ErrorConstructor} + */ +function makeNodeErrorWithCode(Base, key) { + // @ts-expect-error It’s a Node error. + return NodeError + /** + * @param {Array} parameters + */ + function NodeError(...parameters) { + const limit = Error.stackTraceLimit; + if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0; + const error = new Base(); + // Reset the limit and setting the name property. + if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = limit; + const message = getMessage(key, parameters, error); + Object.defineProperties(error, { + // Note: no need to implement `kIsNodeError` symbol, would be hard, + // probably. + message: { + value: message, + enumerable: false, + writable: true, + configurable: true + }, + toString: { + /** @this {Error} */ + value() { + return `${this.name} [${key}]: ${this.message}` + }, + enumerable: false, + writable: true, + configurable: true + } + }); + + captureLargerStackTrace(error); + // @ts-expect-error It’s a Node error. + error.code = key; + return error + } +} + +/** + * @returns {boolean} + */ +function isErrorStackTraceLimitWritable() { + // Do no touch Error.stackTraceLimit as V8 would attempt to install + // it again during deserialization. + try { + if (v8.startupSnapshot.isBuildingSnapshot()) { + return false + } + } catch {} + + const desc = Object.getOwnPropertyDescriptor(Error, 'stackTraceLimit'); + if (desc === undefined) { + return Object.isExtensible(Error) + } + + return own$1.call(desc, 'writable') && desc.writable !== undefined + ? desc.writable + : desc.set !== undefined +} + +/** + * This function removes unnecessary frames from Node.js core errors. + * @template {(...parameters: unknown[]) => unknown} T + * @param {T} wrappedFunction + * @returns {T} + */ +function hideStackFrames(wrappedFunction) { + // We rename the functions that will be hidden to cut off the stacktrace + // at the outermost one + const hidden = nodeInternalPrefix + wrappedFunction.name; + Object.defineProperty(wrappedFunction, 'name', {value: hidden}); + return wrappedFunction +} + +const captureLargerStackTrace = hideStackFrames( + /** + * @param {Error} error + * @returns {Error} + */ + // @ts-expect-error: fine + function (error) { + const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable(); + if (stackTraceLimitIsWritable) { + userStackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = Number.POSITIVE_INFINITY; + } + + Error.captureStackTrace(error); + + // Reset the limit + if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit; + + return error + } +); + +/** + * @param {string} key + * @param {Array} parameters + * @param {Error} self + * @returns {string} + */ +function getMessage(key, parameters, self) { + const message = messages.get(key); + assert$1(message !== undefined, 'expected `message` to be found'); + + if (typeof message === 'function') { + assert$1( + message.length <= parameters.length, // Default options do not count. + `Code: ${key}; The provided arguments length (${parameters.length}) does not ` + + `match the required ones (${message.length}).` + ); + return Reflect.apply(message, self, parameters) + } + + const regex = /%[dfijoOs]/g; + let expectedLength = 0; + while (regex.exec(message) !== null) expectedLength++; + assert$1( + expectedLength === parameters.length, + `Code: ${key}; The provided arguments length (${parameters.length}) does not ` + + `match the required ones (${expectedLength}).` + ); + if (parameters.length === 0) return message + + parameters.unshift(message); + return Reflect.apply(format$2, null, parameters) +} + +/** + * Determine the specific type of a value for type-mismatch errors. + * @param {unknown} value + * @returns {string} + */ +function determineSpecificType(value) { + if (value === null || value === undefined) { + return String(value) + } + + if (typeof value === 'function' && value.name) { + return `function ${value.name}` + } + + if (typeof value === 'object') { + if (value.constructor && value.constructor.name) { + return `an instance of ${value.constructor.name}` + } + + return `${inspect(value, {depth: -1})}` + } + + let inspected = inspect(value, {colors: false}); + + if (inspected.length > 28) { + inspected = `${inspected.slice(0, 25)}...`; + } + + return `type ${typeof value} (${inspected})` +} + +const ESM_STATIC_IMPORT_RE = /(?<=\s|^|;|\})import\s*([\s"']*(?[\p{L}\p{M}\w\t\n\r $*,/{}@.]+)from\s*)?["']\s*(?(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][\s;]*/gmu; +const TYPE_RE = /^\s*?type\s/; +function parseStaticImport(matched) { + const cleanedImports = clearImports(matched.imports); + const namedImports = {}; + const _matches = cleanedImports.match(/{([^}]*)}/)?.[1]?.split(",") || []; + for (const namedImport of _matches) { + const _match = namedImport.match(/^\s*(\S*) as (\S*)\s*$/); + const source = _match?.[1] || namedImport.trim(); + const importName = _match?.[2] || source; + if (source && !TYPE_RE.test(source)) { + namedImports[source] = importName; + } + } + const { namespacedImport, defaultImport } = getImportNames(cleanedImports); + return { + ...matched, + defaultImport, + namespacedImport, + namedImports + }; +} + +const ESM_RE = /([\s;]|^)(import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m; +const COMMENT_RE = /\/\*.+?\*\/|\/\/.*(?=[nr])/g; +function hasESMSyntax(code, opts = {}) { + if (opts.stripComments) { + code = code.replace(COMMENT_RE, ""); + } + return ESM_RE.test(code); +} + +const externalWithConversionNamespace = "vite:dep-pre-bundle:external-conversion"; +const convertedExternalPrefix = "vite-dep-pre-bundle-external:"; +const cjsExternalFacadeNamespace = "vite:cjs-external-facade"; +const nonFacadePrefix = "vite-cjs-external-facade:"; +const externalTypes = [ + "css", + // supported pre-processor types + "less", + "sass", + "scss", + "styl", + "stylus", + "pcss", + "postcss", + // wasm + "wasm", + // known SFC types + "vue", + "svelte", + "marko", + "astro", + "imba", + // JSX/TSX may be configured to be compiled differently from how esbuild + // handles it by default, so exclude them as well + "jsx", + "tsx", + ...KNOWN_ASSET_TYPES +]; +function esbuildDepPlugin(environment, qualified, external) { + const { isProduction } = environment.config; + const { extensions } = environment.config.optimizeDeps; + const allExternalTypes = extensions ? externalTypes.filter((type) => !extensions.includes("." + type)) : externalTypes; + const esmPackageCache = /* @__PURE__ */ new Map(); + const cjsPackageCache = /* @__PURE__ */ new Map(); + const _resolve = createBackCompatIdResolver(environment.getTopLevelConfig(), { + asSrc: false, + scan: true, + packageCache: esmPackageCache + }); + const _resolveRequire = createBackCompatIdResolver( + environment.getTopLevelConfig(), + { + asSrc: false, + isRequire: true, + scan: true, + packageCache: cjsPackageCache + } + ); + const resolve = (id, importer, kind, resolveDir) => { + let _importer; + { + _importer = importer in qualified ? qualified[importer] : importer; + } + const resolver = kind.startsWith("require") ? _resolveRequire : _resolve; + return resolver(environment, id, _importer); + }; + const resolveResult = (id, resolved) => { + if (resolved.startsWith(browserExternalId)) { + return { + path: id, + namespace: "browser-external" + }; + } + if (resolved.startsWith(optionalPeerDepId)) { + return { + path: resolved, + namespace: "optional-peer-dep" + }; + } + if (isBuiltin(environment.config.resolve.builtins, resolved)) { + return; + } + if (isExternalUrl(resolved)) { + return { + path: resolved, + external: true + }; + } + return { + path: path$b.resolve(resolved) + }; + }; + return { + name: "vite:dep-pre-bundle", + setup(build) { + build.onEnd(() => { + esmPackageCache.clear(); + cjsPackageCache.clear(); + }); + build.onResolve( + { + filter: new RegExp( + `\\.(` + allExternalTypes.join("|") + `)(\\?.*)?$` + ) + }, + async ({ path: id, importer, kind }) => { + if (id.startsWith(convertedExternalPrefix)) { + return { + path: id.slice(convertedExternalPrefix.length), + external: true + }; + } + const resolved = await resolve(id, importer, kind); + if (resolved) { + if (JS_TYPES_RE.test(resolved)) { + return { + path: resolved, + external: false + }; + } + if (kind === "require-call") { + return { + path: resolved, + namespace: externalWithConversionNamespace + }; + } + return { + path: resolved, + external: true + }; + } + } + ); + build.onLoad( + { filter: /./, namespace: externalWithConversionNamespace }, + (args) => { + const modulePath = `"${convertedExternalPrefix}${args.path}"`; + return { + contents: isCSSRequest(args.path) && !isModuleCSSRequest(args.path) ? `import ${modulePath};` : `export { default } from ${modulePath};export * from ${modulePath};`, + loader: "js" + }; + } + ); + function resolveEntry(id) { + const flatId = flattenId(id); + if (flatId in qualified) { + return { + path: qualified[flatId] + }; + } + } + build.onResolve( + { filter: /^[\w@][^:]/ }, + async ({ path: id, importer, kind }) => { + if (moduleListContains(external, id)) { + return { + path: id, + external: true + }; + } + let entry; + if (!importer) { + if (entry = resolveEntry(id)) return entry; + const aliased = await _resolve(environment, id, void 0, true); + if (aliased && (entry = resolveEntry(aliased))) { + return entry; + } + } + const resolved = await resolve(id, importer, kind); + if (resolved) { + return resolveResult(id, resolved); + } + } + ); + build.onLoad( + { filter: /.*/, namespace: "browser-external" }, + ({ path: path2 }) => { + if (isProduction) { + return { + contents: "module.exports = {}" + }; + } else { + return { + // Return in CJS to intercept named imports. Use `Object.create` to + // create the Proxy in the prototype to workaround esbuild issue. Why? + // + // In short, esbuild cjs->esm flow: + // 1. Create empty object using `Object.create(Object.getPrototypeOf(module.exports))`. + // 2. Assign props of `module.exports` to the object. + // 3. Return object for ESM use. + // + // If we do `module.exports = new Proxy({}, {})`, step 1 returns empty object, + // step 2 does nothing as there's no props for `module.exports`. The final object + // is just an empty object. + // + // Creating the Proxy in the prototype satisfies step 1 immediately, which means + // the returned object is a Proxy that we can intercept. + // + // Note: Skip keys that are accessed by esbuild and browser devtools. + contents: `module.exports = Object.create(new Proxy({}, { + get(_, key) { + if ( + key !== '__esModule' && + key !== '__proto__' && + key !== 'constructor' && + key !== 'splice' + ) { + console.warn(\`Module "${path2}" has been externalized for browser compatibility. Cannot access "${path2}.\${key}" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.\`) + } + } +}))` + }; + } + } + ); + build.onLoad( + { filter: /.*/, namespace: "optional-peer-dep" }, + ({ path: path2 }) => { + if (isProduction) { + return { + contents: "module.exports = {}" + }; + } else { + const [, peerDep, parentDep] = path2.split(":"); + return { + contents: `throw new Error(\`Could not resolve "${peerDep}" imported by "${parentDep}". Is it installed?\`)` + }; + } + } + ); + } + }; +} +const matchesEntireLine = (text) => `^${escapeRegex(text)}$`; +function esbuildCjsExternalPlugin(externals, platform) { + return { + name: "cjs-external", + setup(build) { + const filter = new RegExp(externals.map(matchesEntireLine).join("|")); + build.onResolve({ filter: new RegExp(`^${nonFacadePrefix}`) }, (args) => { + return { + path: args.path.slice(nonFacadePrefix.length), + external: true + }; + }); + build.onResolve({ filter }, (args) => { + if (args.kind === "require-call" && platform !== "node") { + return { + path: args.path, + namespace: cjsExternalFacadeNamespace + }; + } + return { + path: args.path, + external: true + }; + }); + build.onLoad( + { filter: /.*/, namespace: cjsExternalFacadeNamespace }, + (args) => ({ + contents: `import * as m from ${JSON.stringify( + nonFacadePrefix + args.path + )};module.exports = { ...m };` + }) + ); + } + }; +} + +const environmentColors = [ + colors$1.blue, + colors$1.magenta, + colors$1.green, + colors$1.gray +]; +function getDefaultResolvedEnvironmentOptions(config) { + return { + define: config.define, + resolve: config.resolve, + consumer: "server", + optimizeDeps: config.optimizeDeps, + dev: config.dev, + build: config.build + }; +} +class PartialEnvironment { + name; + getTopLevelConfig() { + return this._topLevelConfig; + } + config; + /** + * @deprecated use environment.config instead + **/ + get options() { + return this._options; + } + logger; + /** + * @internal + */ + _options; + /** + * @internal + */ + _topLevelConfig; + constructor(name, topLevelConfig, options = topLevelConfig.environments[name]) { + if (!/^[\w$]+$/.test(name)) { + throw new Error( + `Invalid environment name "${name}". Environment names must only contain alphanumeric characters and "$", "_".` + ); + } + this.name = name; + this._topLevelConfig = topLevelConfig; + this._options = options; + this.config = new Proxy( + options, + { + get: (target, prop) => { + if (prop === "logger") { + return this.logger; + } + if (prop in target) { + return this._options[prop]; + } + return this._topLevelConfig[prop]; + } + } + ); + const environment = colors$1.dim(`(${this.name})`); + const colorIndex = [...this.name].reduce((acc, c) => acc + c.charCodeAt(0), 0) % environmentColors.length; + const infoColor = environmentColors[colorIndex || 0]; + this.logger = { + get hasWarned() { + return topLevelConfig.logger.hasWarned; + }, + info(msg, opts) { + return topLevelConfig.logger.info(msg, { + ...opts, + environment: infoColor(environment) + }); + }, + warn(msg, opts) { + return topLevelConfig.logger.warn(msg, { + ...opts, + environment: colors$1.yellow(environment) + }); + }, + warnOnce(msg, opts) { + return topLevelConfig.logger.warnOnce(msg, { + ...opts, + environment: colors$1.yellow(environment) + }); + }, + error(msg, opts) { + return topLevelConfig.logger.error(msg, { + ...opts, + environment: colors$1.red(environment) + }); + }, + clearScreen(type) { + return topLevelConfig.logger.clearScreen(type); + }, + hasErrorLogged(error) { + return topLevelConfig.logger.hasErrorLogged(error); + } + }; + } +} +class BaseEnvironment extends PartialEnvironment { + get plugins() { + if (!this._plugins) + throw new Error( + `${this.name} environment.plugins called before initialized` + ); + return this._plugins; + } + /** + * @internal + */ + _plugins; + /** + * @internal + */ + _initiated = false; + constructor(name, config, options = config.environments[name]) { + super(name, config, options); + } +} + +// Copyright 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Simon Lydell +// License: MIT. +var HashbangComment, Identifier, JSXIdentifier, JSXPunctuator, JSXString, JSXText, KeywordsWithExpressionAfter, KeywordsWithNoLineTerminatorAfter, LineTerminatorSequence, MultiLineComment, Newline, NumericLiteral, Punctuator, RegularExpressionLiteral, SingleLineComment, StringLiteral, Template, TokensNotPrecedingObjectLiteral, TokensPrecedingExpression, WhiteSpace; +RegularExpressionLiteral = /\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]?|[^\/[\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu; +Punctuator = /--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y; +Identifier = /(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu; +StringLiteral = /(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y; +NumericLiteral = /(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y; +Template = /[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y; +WhiteSpace = /[\t\v\f\ufeff\p{Zs}]+/yu; +LineTerminatorSequence = /\r?\n|[\r\u2028\u2029]/y; +MultiLineComment = /\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y; +SingleLineComment = /\/\/.*/y; +HashbangComment = /^#!.*/; +JSXPunctuator = /[<>.:={}]|\/(?![\/*])/y; +JSXIdentifier = /[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu; +JSXString = /(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y; +JSXText = /[^<>{}]+/y; +TokensPrecedingExpression = /^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/; +TokensNotPrecedingObjectLiteral = /^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/; +KeywordsWithExpressionAfter = /^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/; +KeywordsWithNoLineTerminatorAfter = /^(?:return|throw|yield)$/; +Newline = RegExp(LineTerminatorSequence.source); +var jsTokens_1 = function*(input, {jsx = false} = {}) { + var braces, firstCodePoint, isExpression, lastIndex, lastSignificantToken, length, match, mode, nextLastIndex, nextLastSignificantToken, parenNesting, postfixIncDec, punctuator, stack; + ({length} = input); + lastIndex = 0; + lastSignificantToken = ""; + stack = [ + {tag: "JS"} + ]; + braces = []; + parenNesting = 0; + postfixIncDec = false; + if (match = HashbangComment.exec(input)) { + yield ({ + type: "HashbangComment", + value: match[0] + }); + lastIndex = match[0].length; + } + while (lastIndex < length) { + mode = stack[stack.length - 1]; + switch (mode.tag) { + case "JS": + case "JSNonExpressionParen": + case "InterpolationInTemplate": + case "InterpolationInJSX": + if (input[lastIndex] === "/" && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken))) { + RegularExpressionLiteral.lastIndex = lastIndex; + if (match = RegularExpressionLiteral.exec(input)) { + lastIndex = RegularExpressionLiteral.lastIndex; + lastSignificantToken = match[0]; + postfixIncDec = true; + yield ({ + type: "RegularExpressionLiteral", + value: match[0], + closed: match[1] !== void 0 && match[1] !== "\\" + }); + continue; + } + } + Punctuator.lastIndex = lastIndex; + if (match = Punctuator.exec(input)) { + punctuator = match[0]; + nextLastIndex = Punctuator.lastIndex; + nextLastSignificantToken = punctuator; + switch (punctuator) { + case "(": + if (lastSignificantToken === "?NonExpressionParenKeyword") { + stack.push({ + tag: "JSNonExpressionParen", + nesting: parenNesting + }); + } + parenNesting++; + postfixIncDec = false; + break; + case ")": + parenNesting--; + postfixIncDec = true; + if (mode.tag === "JSNonExpressionParen" && parenNesting === mode.nesting) { + stack.pop(); + nextLastSignificantToken = "?NonExpressionParenEnd"; + postfixIncDec = false; + } + break; + case "{": + Punctuator.lastIndex = 0; + isExpression = !TokensNotPrecedingObjectLiteral.test(lastSignificantToken) && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken)); + braces.push(isExpression); + postfixIncDec = false; + break; + case "}": + switch (mode.tag) { + case "InterpolationInTemplate": + if (braces.length === mode.nesting) { + Template.lastIndex = lastIndex; + match = Template.exec(input); + lastIndex = Template.lastIndex; + lastSignificantToken = match[0]; + if (match[1] === "${") { + lastSignificantToken = "?InterpolationInTemplate"; + postfixIncDec = false; + yield ({ + type: "TemplateMiddle", + value: match[0] + }); + } else { + stack.pop(); + postfixIncDec = true; + yield ({ + type: "TemplateTail", + value: match[0], + closed: match[1] === "`" + }); + } + continue; + } + break; + case "InterpolationInJSX": + if (braces.length === mode.nesting) { + stack.pop(); + lastIndex += 1; + lastSignificantToken = "}"; + yield ({ + type: "JSXPunctuator", + value: "}" + }); + continue; + } + } + postfixIncDec = braces.pop(); + nextLastSignificantToken = postfixIncDec ? "?ExpressionBraceEnd" : "}"; + break; + case "]": + postfixIncDec = true; + break; + case "++": + case "--": + nextLastSignificantToken = postfixIncDec ? "?PostfixIncDec" : "?UnaryIncDec"; + break; + case "<": + if (jsx && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken))) { + stack.push({tag: "JSXTag"}); + lastIndex += 1; + lastSignificantToken = "<"; + yield ({ + type: "JSXPunctuator", + value: punctuator + }); + continue; + } + postfixIncDec = false; + break; + default: + postfixIncDec = false; + } + lastIndex = nextLastIndex; + lastSignificantToken = nextLastSignificantToken; + yield ({ + type: "Punctuator", + value: punctuator + }); + continue; + } + Identifier.lastIndex = lastIndex; + if (match = Identifier.exec(input)) { + lastIndex = Identifier.lastIndex; + nextLastSignificantToken = match[0]; + switch (match[0]) { + case "for": + case "if": + case "while": + case "with": + if (lastSignificantToken !== "." && lastSignificantToken !== "?.") { + nextLastSignificantToken = "?NonExpressionParenKeyword"; + } + } + lastSignificantToken = nextLastSignificantToken; + postfixIncDec = !KeywordsWithExpressionAfter.test(match[0]); + yield ({ + type: match[1] === "#" ? "PrivateIdentifier" : "IdentifierName", + value: match[0] + }); + continue; + } + StringLiteral.lastIndex = lastIndex; + if (match = StringLiteral.exec(input)) { + lastIndex = StringLiteral.lastIndex; + lastSignificantToken = match[0]; + postfixIncDec = true; + yield ({ + type: "StringLiteral", + value: match[0], + closed: match[2] !== void 0 + }); + continue; + } + NumericLiteral.lastIndex = lastIndex; + if (match = NumericLiteral.exec(input)) { + lastIndex = NumericLiteral.lastIndex; + lastSignificantToken = match[0]; + postfixIncDec = true; + yield ({ + type: "NumericLiteral", + value: match[0] + }); + continue; + } + Template.lastIndex = lastIndex; + if (match = Template.exec(input)) { + lastIndex = Template.lastIndex; + lastSignificantToken = match[0]; + if (match[1] === "${") { + lastSignificantToken = "?InterpolationInTemplate"; + stack.push({ + tag: "InterpolationInTemplate", + nesting: braces.length + }); + postfixIncDec = false; + yield ({ + type: "TemplateHead", + value: match[0] + }); + } else { + postfixIncDec = true; + yield ({ + type: "NoSubstitutionTemplate", + value: match[0], + closed: match[1] === "`" + }); + } + continue; + } + break; + case "JSXTag": + case "JSXTagEnd": + JSXPunctuator.lastIndex = lastIndex; + if (match = JSXPunctuator.exec(input)) { + lastIndex = JSXPunctuator.lastIndex; + nextLastSignificantToken = match[0]; + switch (match[0]) { + case "<": + stack.push({tag: "JSXTag"}); + break; + case ">": + stack.pop(); + if (lastSignificantToken === "/" || mode.tag === "JSXTagEnd") { + nextLastSignificantToken = "?JSX"; + postfixIncDec = true; + } else { + stack.push({tag: "JSXChildren"}); + } + break; + case "{": + stack.push({ + tag: "InterpolationInJSX", + nesting: braces.length + }); + nextLastSignificantToken = "?InterpolationInJSX"; + postfixIncDec = false; + break; + case "/": + if (lastSignificantToken === "<") { + stack.pop(); + if (stack[stack.length - 1].tag === "JSXChildren") { + stack.pop(); + } + stack.push({tag: "JSXTagEnd"}); + } + } + lastSignificantToken = nextLastSignificantToken; + yield ({ + type: "JSXPunctuator", + value: match[0] + }); + continue; + } + JSXIdentifier.lastIndex = lastIndex; + if (match = JSXIdentifier.exec(input)) { + lastIndex = JSXIdentifier.lastIndex; + lastSignificantToken = match[0]; + yield ({ + type: "JSXIdentifier", + value: match[0] + }); + continue; + } + JSXString.lastIndex = lastIndex; + if (match = JSXString.exec(input)) { + lastIndex = JSXString.lastIndex; + lastSignificantToken = match[0]; + yield ({ + type: "JSXString", + value: match[0], + closed: match[2] !== void 0 + }); + continue; + } + break; + case "JSXChildren": + JSXText.lastIndex = lastIndex; + if (match = JSXText.exec(input)) { + lastIndex = JSXText.lastIndex; + lastSignificantToken = match[0]; + yield ({ + type: "JSXText", + value: match[0] + }); + continue; + } + switch (input[lastIndex]) { + case "<": + stack.push({tag: "JSXTag"}); + lastIndex++; + lastSignificantToken = "<"; + yield ({ + type: "JSXPunctuator", + value: "<" + }); + continue; + case "{": + stack.push({ + tag: "InterpolationInJSX", + nesting: braces.length + }); + lastIndex++; + lastSignificantToken = "?InterpolationInJSX"; + postfixIncDec = false; + yield ({ + type: "JSXPunctuator", + value: "{" + }); + continue; + } + } + WhiteSpace.lastIndex = lastIndex; + if (match = WhiteSpace.exec(input)) { + lastIndex = WhiteSpace.lastIndex; + yield ({ + type: "WhiteSpace", + value: match[0] + }); + continue; + } + LineTerminatorSequence.lastIndex = lastIndex; + if (match = LineTerminatorSequence.exec(input)) { + lastIndex = LineTerminatorSequence.lastIndex; + postfixIncDec = false; + if (KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken)) { + lastSignificantToken = "?NoLineTerminatorHere"; + } + yield ({ + type: "LineTerminatorSequence", + value: match[0] + }); + continue; + } + MultiLineComment.lastIndex = lastIndex; + if (match = MultiLineComment.exec(input)) { + lastIndex = MultiLineComment.lastIndex; + if (Newline.test(match[0])) { + postfixIncDec = false; + if (KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken)) { + lastSignificantToken = "?NoLineTerminatorHere"; + } + } + yield ({ + type: "MultiLineComment", + value: match[0], + closed: match[1] !== void 0 + }); + continue; + } + SingleLineComment.lastIndex = lastIndex; + if (match = SingleLineComment.exec(input)) { + lastIndex = SingleLineComment.lastIndex; + postfixIncDec = false; + yield ({ + type: "SingleLineComment", + value: match[0] + }); + continue; + } + firstCodePoint = String.fromCodePoint(input.codePointAt(lastIndex)); + lastIndex += firstCodePoint.length; + lastSignificantToken = firstCodePoint; + postfixIncDec = false; + yield ({ + type: mode.tag.startsWith("JSX") ? "JSXInvalid" : "Invalid", + value: firstCodePoint + }); + } + return void 0; +}; + +var jsTokens = /*@__PURE__*/getDefaultExportFromCjs(jsTokens_1); + +function stripLiteralJsTokens(code, options) { + const FILL = " "; + const FILL_COMMENT = " "; + let result = ""; + const tokens = []; + for (const token of jsTokens(code, { jsx: false })) { + tokens.push(token); + if (token.type === "SingleLineComment") { + result += FILL_COMMENT.repeat(token.value.length); + continue; + } + if (token.type === "MultiLineComment") { + result += token.value.replace(/[^\n]/g, FILL_COMMENT); + continue; + } + if (token.type === "StringLiteral") { + if (!token.closed) { + result += token.value; + continue; + } + const body = token.value.slice(1, -1); + { + result += token.value[0] + FILL.repeat(body.length) + token.value[token.value.length - 1]; + continue; + } + } + if (token.type === "NoSubstitutionTemplate") { + const body = token.value.slice(1, -1); + { + result += `\`${body.replace(/[^\n]/g, FILL)}\``; + continue; + } + } + if (token.type === "RegularExpressionLiteral") { + const body = token.value; + { + result += body.replace(/\/(.*)\/(\w?)$/g, (_, $1, $2) => `/${FILL.repeat($1.length)}/${$2}`); + continue; + } + } + if (token.type === "TemplateHead") { + const body = token.value.slice(1, -2); + { + result += `\`${body.replace(/[^\n]/g, FILL)}\${`; + continue; + } + } + if (token.type === "TemplateTail") { + const body = token.value.slice(0, -2); + { + result += `}${body.replace(/[^\n]/g, FILL)}\``; + continue; + } + } + if (token.type === "TemplateMiddle") { + const body = token.value.slice(1, -2); + { + result += `}${body.replace(/[^\n]/g, FILL)}\${`; + continue; + } + } + result += token.value; + } + return { + result, + tokens + }; +} + +function stripLiteral(code, options) { + return stripLiteralDetailed(code).result; +} +function stripLiteralDetailed(code, options) { + return stripLiteralJsTokens(code); +} + +function importGlobPlugin(config) { + const importGlobMaps = /* @__PURE__ */ new Map(); + return { + name: "vite:import-glob", + buildStart() { + importGlobMaps.clear(); + }, + transform: { + async handler(code, id) { + if (!code.includes("import.meta.glob")) return; + const result = await transformGlobImport( + code, + id, + config.root, + (im, _, options) => this.resolve(im, id, options).then((i) => i?.id || im), + config.experimental.importGlobRestoreExtension, + config.logger + ); + if (result) { + const allGlobs = result.matches.map((i) => i.globsResolved); + if (!importGlobMaps.has(this.environment)) { + importGlobMaps.set(this.environment, /* @__PURE__ */ new Map()); + } + const globMatchers = allGlobs.map((globs) => { + const affirmed = []; + const negated = []; + for (const glob2 of globs) { + (glob2[0] === "!" ? negated : affirmed).push(glob2); + } + const affirmedMatcher = picomatch$2(affirmed); + const negatedMatcher = picomatch$2(negated); + return (file) => { + return (affirmed.length === 0 || affirmedMatcher(file)) && !(negated.length > 0 && negatedMatcher(file)); + }; + }); + importGlobMaps.get(this.environment).set(id, globMatchers); + return transformStableResult(result.s, id, config); + } + } + }, + hotUpdate({ type, file, modules: oldModules }) { + if (type === "update") return; + const importGlobMap = importGlobMaps.get(this.environment); + if (!importGlobMap) return; + const modules = []; + for (const [id, globMatchers] of importGlobMap) { + if (globMatchers.some((matcher) => matcher(file))) { + const mod = this.environment.moduleGraph.getModuleById(id); + if (mod) modules.push(mod); + } + } + return modules.length > 0 ? [...oldModules, ...modules] : void 0; + } + }; +} +const importGlobRE = /\bimport\.meta\.glob(?:<\w+>)?\s*\(/g; +const objectKeysRE = /\bObject\.keys\(\s*$/; +const objectValuesRE = /\bObject\.values\(\s*$/; +const knownOptions = { + as: ["string"], + eager: ["boolean"], + import: ["string"], + exhaustive: ["boolean"], + query: ["object", "string"] +}; +const forceDefaultAs = ["raw", "url"]; +function err$1(e, pos) { + const error = new Error(e); + error.pos = pos; + return error; +} +function parseGlobOptions(rawOpts, optsStartIndex, logger) { + let opts = {}; + try { + opts = evalValue(rawOpts); + } catch { + throw err$1( + "Vite is unable to parse the glob options as the value is not static", + optsStartIndex + ); + } + if (opts == null) { + return {}; + } + for (const key in opts) { + if (!(key in knownOptions)) { + throw err$1(`Unknown glob option "${key}"`, optsStartIndex); + } + const allowedTypes = knownOptions[key]; + const valueType = typeof opts[key]; + if (!allowedTypes.includes(valueType)) { + throw err$1( + `Expected glob option "${key}" to be of type ${allowedTypes.join( + " or " + )}, but got ${valueType}`, + optsStartIndex + ); + } + } + if (typeof opts.query === "object") { + for (const key in opts.query) { + const value = opts.query[key]; + if (!["string", "number", "boolean"].includes(typeof value)) { + throw err$1( + `Expected glob option "query.${key}" to be of type string, number, or boolean, but got ${typeof value}`, + optsStartIndex + ); + } + } + opts.query = stringifyQuery(opts.query); + } + if (opts.as && logger) { + const importSuggestion = forceDefaultAs.includes(opts.as) ? `, import: 'default'` : ""; + logger.warn( + colors$1.yellow( + `The glob option "as" has been deprecated in favour of "query". Please update \`as: '${opts.as}'\` to \`query: '?${opts.as}'${importSuggestion}\`.` + ) + ); + } + if (opts.as && forceDefaultAs.includes(opts.as)) { + if (opts.import && opts.import !== "default" && opts.import !== "*") + throw err$1( + `Option "import" can only be "default" or "*" when "as" is "${opts.as}", but got "${opts.import}"`, + optsStartIndex + ); + opts.import = opts.import || "default"; + } + if (opts.as && opts.query) + throw err$1( + 'Options "as" and "query" cannot be used together', + optsStartIndex + ); + if (opts.as) opts.query = opts.as; + if (opts.query && opts.query[0] !== "?") opts.query = `?${opts.query}`; + return opts; +} +async function parseImportGlob(code, importer, root, resolveId, logger) { + let cleanCode; + try { + cleanCode = stripLiteral(code); + } catch { + return []; + } + const matches = Array.from(cleanCode.matchAll(importGlobRE)); + const tasks = matches.map(async (match, index) => { + const start = match.index; + const err2 = (msg) => { + const e = new Error(`Invalid glob import syntax: ${msg}`); + e.pos = start; + return e; + }; + const end = findCorrespondingCloseParenthesisPosition( + cleanCode, + start + match[0].length + ) + 1; + if (end <= 0) { + throw err2("Close parenthesis not found"); + } + const statementCode = code.slice(start, end); + const rootAst = (await parseAstAsync(statementCode)).body[0]; + if (rootAst.type !== "ExpressionStatement") { + throw err2(`Expect CallExpression, got ${rootAst.type}`); + } + const ast = rootAst.expression; + if (ast.type !== "CallExpression") { + throw err2(`Expect CallExpression, got ${ast.type}`); + } + if (ast.arguments.length < 1 || ast.arguments.length > 2) + throw err2(`Expected 1-2 arguments, but got ${ast.arguments.length}`); + const arg1 = ast.arguments[0]; + const arg2 = ast.arguments[1]; + const globs = []; + const validateLiteral = (element) => { + if (!element) return; + if (element.type === "Literal") { + if (typeof element.value !== "string") + throw err2( + `Expected glob to be a string, but got "${typeof element.value}"` + ); + globs.push(element.value); + } else if (element.type === "TemplateLiteral") { + if (element.expressions.length !== 0) { + throw err2( + `Expected glob to be a string, but got dynamic template literal` + ); + } + globs.push(element.quasis[0].value.raw); + } else { + throw err2("Could only use literals"); + } + }; + if (arg1.type === "ArrayExpression") { + for (const element of arg1.elements) { + validateLiteral(element); + } + } else { + validateLiteral(arg1); + } + let options = {}; + if (arg2) { + if (arg2.type !== "ObjectExpression") + throw err2( + `Expected the second argument to be an object literal, but got "${arg2.type}"` + ); + options = parseGlobOptions( + code.slice(start + arg2.start, start + arg2.end), + start + arg2.start, + logger + ); + } + const globsResolved = await Promise.all( + globs.map((glob2) => toAbsoluteGlob(glob2, root, importer, resolveId)) + ); + const isRelative = globs.every((i) => ".!".includes(i[0])); + const sliceCode = cleanCode.slice(0, start); + const onlyKeys = objectKeysRE.test(sliceCode); + let onlyValues = false; + if (!onlyKeys) { + onlyValues = objectValuesRE.test(sliceCode); + } + return { + index, + globs, + globsResolved, + isRelative, + options, + start, + end, + onlyKeys, + onlyValues + }; + }); + return (await Promise.all(tasks)).filter(Boolean); +} +function findCorrespondingCloseParenthesisPosition(cleanCode, openPos) { + const closePos = cleanCode.indexOf(")", openPos); + if (closePos < 0) return -1; + if (!cleanCode.slice(openPos, closePos).includes("(")) return closePos; + let remainingParenthesisCount = 0; + const cleanCodeLen = cleanCode.length; + for (let pos = openPos; pos < cleanCodeLen; pos++) { + switch (cleanCode[pos]) { + case "(": { + remainingParenthesisCount++; + break; + } + case ")": { + remainingParenthesisCount--; + if (remainingParenthesisCount <= 0) { + return pos; + } + } + } + } + return -1; +} +const importPrefix = "__vite_glob_"; +const { basename, dirname, relative } = posix$1; +async function transformGlobImport(code, id, root, resolveId, restoreQueryExtension = false, logger) { + id = slash$1(id); + root = slash$1(root); + const isVirtual = isVirtualModule(id); + const dir = isVirtual ? void 0 : dirname(id); + const matches = await parseImportGlob( + code, + isVirtual ? void 0 : id, + root, + resolveId, + logger + ); + const matchedFiles = /* @__PURE__ */ new Set(); + if (!matches.length) return null; + const s = new MagicString(code); + const staticImports = (await Promise.all( + matches.map( + async ({ + globsResolved, + isRelative, + options, + index, + start, + end, + onlyKeys, + onlyValues + }) => { + const cwd = getCommonBase(globsResolved) ?? root; + const files = (await glob(globsResolved, { + absolute: true, + cwd, + dot: !!options.exhaustive, + expandDirectories: false, + ignore: options.exhaustive ? [] : ["**/node_modules/**"] + })).filter((file) => file !== id).sort(); + const objectProps = []; + const staticImports2 = []; + const resolvePaths = (file) => { + if (!dir) { + if (isRelative) + throw new Error( + "In virtual modules, all globs must start with '/'" + ); + const filePath2 = `/${relative(root, file)}`; + return { filePath: filePath2, importPath: filePath2 }; + } + let importPath = relative(dir, file); + if (importPath[0] !== ".") importPath = `./${importPath}`; + let filePath; + if (isRelative) { + filePath = importPath; + } else { + filePath = relative(root, file); + if (filePath[0] !== ".") filePath = `/${filePath}`; + } + return { filePath, importPath }; + }; + files.forEach((file, i) => { + const paths = resolvePaths(file); + const filePath = paths.filePath; + let importPath = paths.importPath; + let importQuery = options.query ?? ""; + if (onlyKeys) { + objectProps.push(`${JSON.stringify(filePath)}: 0`); + return; + } + if (importQuery && importQuery !== "?raw") { + const fileExtension = basename(file).split(".").slice(-1)[0]; + if (fileExtension && restoreQueryExtension) + importQuery = `${importQuery}&lang.${fileExtension}`; + } + importPath = `${importPath}${importQuery}`; + const importKey = options.import && options.import !== "*" ? options.import : void 0; + if (options.eager) { + const variableName = `${importPrefix}${index}_${i}`; + const expression = importKey ? `{ ${importKey} as ${variableName} }` : `* as ${variableName}`; + staticImports2.push( + `import ${expression} from ${JSON.stringify(importPath)}` + ); + objectProps.push( + onlyValues ? `${variableName}` : `${JSON.stringify(filePath)}: ${variableName}` + ); + } else { + let importStatement = `import(${JSON.stringify(importPath)})`; + if (importKey) + importStatement += `.then(m => m[${JSON.stringify(importKey)}])`; + objectProps.push( + onlyValues ? `() => ${importStatement}` : `${JSON.stringify(filePath)}: () => ${importStatement}` + ); + } + }); + files.forEach((i) => matchedFiles.add(i)); + const originalLineBreakCount = code.slice(start, end).match(/\n/g)?.length ?? 0; + const lineBreaks = originalLineBreakCount > 0 ? "\n".repeat(originalLineBreakCount) : ""; + let replacement = ""; + if (onlyKeys) { + replacement = `{${objectProps.join(",")}${lineBreaks}}`; + } else if (onlyValues) { + replacement = `[${objectProps.join(",")}${lineBreaks}]`; + } else { + replacement = `/* #__PURE__ */ Object.assign({${objectProps.join( + "," + )}${lineBreaks}})`; + } + s.overwrite(start, end, replacement); + return staticImports2; + } + ) + )).flat(); + if (staticImports.length) s.prepend(`${staticImports.join(";")};`); + return { + s, + matches, + files: matchedFiles + }; +} +function globSafePath(path) { + return escapePath(normalizePath$3(path)); +} +function lastNthChar(str, n) { + return str.charAt(str.length - 1 - n); +} +function globSafeResolvedPath(resolved, glob2) { + let numEqual = 0; + const maxEqual = Math.min(resolved.length, glob2.length); + while (numEqual < maxEqual && lastNthChar(resolved, numEqual) === lastNthChar(glob2, numEqual)) { + numEqual += 1; + } + const staticPartEnd = resolved.length - numEqual; + const staticPart = resolved.slice(0, staticPartEnd); + const dynamicPart = resolved.slice(staticPartEnd); + return globSafePath(staticPart) + dynamicPart; +} +async function toAbsoluteGlob(glob2, root, importer, resolveId) { + let pre = ""; + if (glob2[0] === "!") { + pre = "!"; + glob2 = glob2.slice(1); + } + root = globSafePath(root); + const dir = importer ? globSafePath(dirname(importer)) : root; + if (glob2[0] === "/") return pre + posix$1.join(root, glob2.slice(1)); + if (glob2.startsWith("./")) return pre + posix$1.join(dir, glob2.slice(2)); + if (glob2.startsWith("../")) return pre + posix$1.join(dir, glob2); + if (glob2.startsWith("**")) return pre + glob2; + const isSubImportsPattern = glob2[0] === "#" && glob2.includes("*"); + const resolved = normalizePath$3( + await resolveId(glob2, importer, { + custom: { "vite:import-glob": { isSubImportsPattern } } + }) || glob2 + ); + if (isAbsolute$1(resolved)) { + return pre + globSafeResolvedPath(resolved, glob2); + } + throw new Error( + `Invalid glob: "${glob2}" (resolved: "${resolved}"). It must start with '/' or './'` + ); +} +function getCommonBase(globsResolved) { + const bases = globsResolved.filter((g) => g[0] !== "!").map((glob2) => { + let { base } = picomatch$2.scan(glob2); + if (posix$1.basename(base).includes(".")) base = posix$1.dirname(base); + return base; + }); + if (!bases.length) return null; + let commonAncestor = ""; + const dirS = bases[0].split("/"); + for (let i = 0; i < dirS.length; i++) { + const candidate = dirS.slice(0, i + 1).join("/"); + if (bases.every((base) => base.startsWith(candidate))) + commonAncestor = candidate; + else break; + } + if (!commonAncestor) commonAncestor = "/"; + return commonAncestor; +} +function isVirtualModule(id) { + return id.startsWith("virtual:") || id[0] === "\0" || !id.includes("/"); +} + +class ScanEnvironment extends BaseEnvironment { + mode = "scan"; + get pluginContainer() { + if (!this._pluginContainer) + throw new Error( + `${this.name} environment.pluginContainer called before initialized` + ); + return this._pluginContainer; + } + /** + * @internal + */ + _pluginContainer; + async init() { + if (this._initiated) { + return; + } + this._initiated = true; + this._plugins = await resolveEnvironmentPlugins(this); + this._pluginContainer = await createEnvironmentPluginContainer( + this, + this.plugins, + void 0, + false + ); + } +} +function devToScanEnvironment(environment) { + return { + mode: "scan", + get name() { + return environment.name; + }, + getTopLevelConfig() { + return environment.getTopLevelConfig(); + }, + /** + * @deprecated use environment.config instead + **/ + get options() { + return environment.options; + }, + get config() { + return environment.config; + }, + get logger() { + return environment.logger; + }, + get pluginContainer() { + return environment.pluginContainer; + }, + get plugins() { + return environment.plugins; + } + }; +} +const debug$g = createDebugger("vite:deps"); +const htmlTypesRE = /\.(html|vue|svelte|astro|imba)$/; +const importsRE = /(? { + entries = computedEntries; + if (!entries.length) { + if (!config.optimizeDeps.entries && !config.optimizeDeps.include) { + environment.logger.warn( + colors$1.yellow( + "(!) Could not auto-determine entry point from rollupOptions or html files and there are no explicit optimizeDeps.include patterns. Skipping dependency pre-bundling." + ) + ); + } + return; + } + if (scanContext.cancelled) return; + debug$g?.( + `Crawling dependencies using entries: ${entries.map((entry) => ` + ${colors$1.dim(entry)}`).join("")}` + ); + return prepareEsbuildScanner( + environment, + entries, + deps, + missing, + scanContext + ); + }); + const result = esbuildContext.then((context) => { + function disposeContext() { + return context?.dispose().catch((e) => { + environment.logger.error("Failed to dispose esbuild context", { + error: e + }); + }); + } + if (!context || scanContext.cancelled) { + disposeContext(); + return { deps: {}, missing: {} }; + } + return context.rebuild().then(() => { + return { + // Ensure a fixed order so hashes are stable and improve logs + deps: orderedDependencies(deps), + missing + }; + }).finally(() => { + return disposeContext(); + }); + }).catch(async (e) => { + if (e.errors && e.message.includes("The build was canceled")) { + return { deps: {}, missing: {} }; + } + const prependMessage = colors$1.red(` Failed to scan for dependencies from entries: + ${entries.join("\n")} + + `); + if (e.errors) { + const msgs = await formatMessages(e.errors, { + kind: "error", + color: true + }); + e.message = prependMessage + msgs.join("\n"); + } else { + e.message = prependMessage + e.message; + } + throw e; + }).finally(() => { + if (debug$g) { + const duration = (performance$1.now() - start).toFixed(2); + const depsStr = Object.keys(orderedDependencies(deps)).sort().map((id) => ` + ${colors$1.cyan(id)} -> ${colors$1.dim(deps[id])}`).join("") || colors$1.dim("no dependencies found"); + debug$g(`Scan completed in ${duration}ms: ${depsStr}`); + } + }); + return { + cancel: async () => { + scanContext.cancelled = true; + return esbuildContext.then((context) => context?.cancel()); + }, + result + }; +} +async function computeEntries(environment) { + let entries = []; + const explicitEntryPatterns = environment.config.optimizeDeps.entries; + const buildInput = environment.config.build.rollupOptions.input; + if (explicitEntryPatterns) { + entries = await globEntries(explicitEntryPatterns, environment); + } else if (buildInput) { + const resolvePath = async (p) => { + const id = (await environment.pluginContainer.resolveId(p, void 0, { + scan: true + }))?.id; + if (id === void 0) { + throw new Error( + `failed to resolve rollupOptions.input value: ${JSON.stringify(p)}.` + ); + } + return id; + }; + if (typeof buildInput === "string") { + entries = [await resolvePath(buildInput)]; + } else if (Array.isArray(buildInput)) { + entries = await Promise.all(buildInput.map(resolvePath)); + } else if (isObject$1(buildInput)) { + entries = await Promise.all(Object.values(buildInput).map(resolvePath)); + } else { + throw new Error("invalid rollupOptions.input value."); + } + } else { + entries = await globEntries("**/*.html", environment); + } + entries = entries.filter( + (entry) => isScannable(entry, environment.config.optimizeDeps.extensions) && fs__default.existsSync(entry) + ); + return entries; +} +async function prepareEsbuildScanner(environment, entries, deps, missing, scanContext) { + if (scanContext.cancelled) return; + const plugin = esbuildScanPlugin(environment, deps, missing, entries); + const { plugins = [], ...esbuildOptions } = environment.config.optimizeDeps.esbuildOptions ?? {}; + let tsconfigRaw = esbuildOptions.tsconfigRaw; + if (!tsconfigRaw && !esbuildOptions.tsconfig) { + const { tsconfig } = await loadTsconfigJsonForFile( + path$b.join(environment.config.root, "_dummy.js") + ); + if (tsconfig.compilerOptions?.experimentalDecorators) { + tsconfigRaw = { compilerOptions: { experimentalDecorators: true } }; + } + } + return await esbuild.context({ + absWorkingDir: process.cwd(), + write: false, + stdin: { + contents: entries.map((e) => `import ${JSON.stringify(e)}`).join("\n"), + loader: "js" + }, + bundle: true, + format: "esm", + logLevel: "silent", + plugins: [...plugins, plugin], + ...esbuildOptions, + tsconfigRaw + }); +} +function orderedDependencies(deps) { + const depsList = Object.entries(deps); + depsList.sort((a, b) => a[0].localeCompare(b[0])); + return Object.fromEntries(depsList); +} +function globEntries(pattern, environment) { + const resolvedPatterns = arraify(pattern); + if (resolvedPatterns.every((str) => !isDynamicPattern(str))) { + return resolvedPatterns.map( + (p) => normalizePath$3(path$b.resolve(environment.config.root, p)) + ); + } + return glob(pattern, { + absolute: true, + cwd: environment.config.root, + ignore: [ + "**/node_modules/**", + `**/${environment.config.build.outDir}/**`, + // if there aren't explicit entries, also ignore other common folders + ...environment.config.optimizeDeps.entries ? [] : [`**/__tests__/**`, `**/coverage/**`] + ] + }); +} +const scriptRE = /(=\s]+))?)*\s*>)(.*?)<\/script>/gis; +const commentRE$1 = //gs; +const srcRE = /\bsrc\s*=\s*(?:"([^"]+)"|'([^']+)'|([^\s'">]+))/i; +const typeRE = /\btype\s*=\s*(?:"([^"]+)"|'([^']+)'|([^\s'">]+))/i; +const langRE = /\blang\s*=\s*(?:"([^"]+)"|'([^']+)'|([^\s'">]+))/i; +const svelteScriptModuleRE = /\bcontext\s*=\s*(?:"([^"]+)"|'([^']+)'|([^\s'">]+))/i; +const svelteModuleRE = /\smodule\b/i; +function esbuildScanPlugin(environment, depImports, missing, entries) { + const seen = /* @__PURE__ */ new Map(); + async function resolveId(id, importer) { + return environment.pluginContainer.resolveId( + id, + importer && normalizePath$3(importer), + { scan: true } + ); + } + const resolve = async (id, importer) => { + const key = id + (importer && path$b.dirname(importer)); + if (seen.has(key)) { + return seen.get(key); + } + const resolved = await resolveId(id, importer); + const res = resolved?.id; + seen.set(key, res); + return res; + }; + const optimizeDepsOptions = environment.config.optimizeDeps; + const include = optimizeDepsOptions.include; + const exclude = [ + ...optimizeDepsOptions.exclude ?? [], + "@vite/client", + "@vite/env" + ]; + const isUnlessEntry = (path2) => !entries.includes(path2); + const externalUnlessEntry = ({ path: path2 }) => ({ + path: path2, + external: isUnlessEntry(path2) + }); + const doTransformGlobImport = async (contents, id, loader) => { + let transpiledContents; + if (loader !== "js") { + transpiledContents = (await transform$1(contents, { loader })).code; + } else { + transpiledContents = contents; + } + const result = await transformGlobImport( + transpiledContents, + id, + environment.config.root, + resolve + ); + return result?.s.toString() || transpiledContents; + }; + return { + name: "vite:dep-scan", + setup(build) { + const scripts = {}; + build.onResolve({ filter: externalRE }, ({ path: path2 }) => ({ + path: path2, + external: true + })); + build.onResolve({ filter: dataUrlRE }, ({ path: path2 }) => ({ + path: path2, + external: true + })); + build.onResolve({ filter: virtualModuleRE }, ({ path: path2 }) => { + return { + // strip prefix to get valid filesystem path so esbuild can resolve imports in the file + path: path2.replace(virtualModulePrefix, ""), + namespace: "script" + }; + }); + build.onLoad({ filter: /.*/, namespace: "script" }, ({ path: path2 }) => { + return scripts[path2]; + }); + build.onResolve({ filter: htmlTypesRE }, async ({ path: path2, importer }) => { + const resolved = await resolve(path2, importer); + if (!resolved) return; + if (isInNodeModules$1(resolved) && isOptimizable(resolved, optimizeDepsOptions)) + return; + return { + path: resolved, + namespace: "html" + }; + }); + const htmlTypeOnLoadCallback = async ({ path: p }) => { + let raw = await fsp.readFile(p, "utf-8"); + raw = raw.replace(commentRE$1, ""); + const isHtml = p.endsWith(".html"); + let js = ""; + let scriptId = 0; + const matches = raw.matchAll(scriptRE); + for (const [, openTag, content] of matches) { + const typeMatch = typeRE.exec(openTag); + const type = typeMatch && (typeMatch[1] || typeMatch[2] || typeMatch[3]); + const langMatch = langRE.exec(openTag); + const lang = langMatch && (langMatch[1] || langMatch[2] || langMatch[3]); + if (isHtml && type !== "module") { + continue; + } + if (type && !(type.includes("javascript") || type.includes("ecmascript") || type === "module")) { + continue; + } + let loader = "js"; + if (lang === "ts" || lang === "tsx" || lang === "jsx") { + loader = lang; + } else if (p.endsWith(".astro")) { + loader = "ts"; + } + const srcMatch = srcRE.exec(openTag); + if (srcMatch) { + const src = srcMatch[1] || srcMatch[2] || srcMatch[3]; + js += `import ${JSON.stringify(src)} +`; + } else if (content.trim()) { + const contents = content + (loader.startsWith("ts") ? extractImportPaths(content) : ""); + const key = `${p}?id=${scriptId++}`; + if (contents.includes("import.meta.glob")) { + scripts[key] = { + loader: "js", + // since it is transpiled + contents: await doTransformGlobImport(contents, p, loader), + resolveDir: normalizePath$3(path$b.dirname(p)), + pluginData: { + htmlType: { loader } + } + }; + } else { + scripts[key] = { + loader, + contents, + resolveDir: normalizePath$3(path$b.dirname(p)), + pluginData: { + htmlType: { loader } + } + }; + } + const virtualModulePath = JSON.stringify(virtualModulePrefix + key); + let addedImport = false; + if (p.endsWith(".svelte")) { + let isModule = svelteModuleRE.test(openTag); + if (!isModule) { + const contextMatch = svelteScriptModuleRE.exec(openTag); + const context = contextMatch && (contextMatch[1] || contextMatch[2] || contextMatch[3]); + isModule = context === "module"; + } + if (!isModule) { + addedImport = true; + js += `import ${virtualModulePath} +`; + } + } + if (!addedImport) { + js += `export * from ${virtualModulePath} +`; + } + } + } + if (!p.endsWith(".vue") || !js.includes("export default")) { + js += "\nexport default {}"; + } + return { + loader: "js", + contents: js + }; + }; + build.onLoad( + { filter: htmlTypesRE, namespace: "html" }, + htmlTypeOnLoadCallback + ); + build.onLoad( + { filter: htmlTypesRE, namespace: "file" }, + htmlTypeOnLoadCallback + ); + build.onResolve( + { + // avoid matching windows volume + filter: /^[\w@][^:]/ + }, + async ({ path: id, importer }) => { + if (moduleListContains(exclude, id)) { + return externalUnlessEntry({ path: id }); + } + if (depImports[id]) { + return externalUnlessEntry({ path: id }); + } + const resolved = await resolve(id, importer); + if (resolved) { + if (shouldExternalizeDep(resolved, id)) { + return externalUnlessEntry({ path: id }); + } + if (isInNodeModules$1(resolved) || include?.includes(id)) { + if (isOptimizable(resolved, optimizeDepsOptions)) { + depImports[id] = resolved; + } + return externalUnlessEntry({ path: id }); + } else if (isScannable(resolved, optimizeDepsOptions.extensions)) { + const namespace = htmlTypesRE.test(resolved) ? "html" : void 0; + return { + path: path$b.resolve(resolved), + namespace + }; + } else { + return externalUnlessEntry({ path: id }); + } + } else { + missing[id] = normalizePath$3(importer); + } + } + ); + const setupExternalize = (filter, doExternalize) => { + build.onResolve({ filter }, ({ path: path2 }) => { + return { + path: path2, + external: doExternalize(path2) + }; + }); + }; + setupExternalize(CSS_LANGS_RE, isUnlessEntry); + setupExternalize(/\.(json|json5|wasm)$/, isUnlessEntry); + setupExternalize( + new RegExp(`\\.(${KNOWN_ASSET_TYPES.join("|")})$`), + isUnlessEntry + ); + setupExternalize(SPECIAL_QUERY_RE, () => true); + build.onResolve( + { + filter: /.*/ + }, + async ({ path: id, importer }) => { + const resolved = await resolve(id, importer); + if (resolved) { + if (shouldExternalizeDep(resolved, id) || !isScannable(resolved, optimizeDepsOptions.extensions)) { + return externalUnlessEntry({ path: id }); + } + const namespace = htmlTypesRE.test(resolved) ? "html" : void 0; + return { + path: path$b.resolve(cleanUrl(resolved)), + namespace + }; + } else { + return externalUnlessEntry({ path: id }); + } + } + ); + build.onLoad({ filter: JS_TYPES_RE }, async ({ path: id }) => { + let ext = path$b.extname(id).slice(1); + if (ext === "mjs") ext = "js"; + const esbuildConfig = environment.config.esbuild; + let contents = await fsp.readFile(id, "utf-8"); + if (ext.endsWith("x") && esbuildConfig && esbuildConfig.jsxInject) { + contents = esbuildConfig.jsxInject + ` +` + contents; + } + const loader = optimizeDepsOptions.esbuildOptions?.loader?.[`.${ext}`] ?? ext; + if (contents.includes("import.meta.glob")) { + return { + loader: "js", + // since it is transpiled, + contents: await doTransformGlobImport(contents, id, loader) + }; + } + return { + loader, + contents + }; + }); + build.onLoad({ filter: /.*/, namespace: "file" }, () => { + return { + loader: "js", + contents: "export default {}" + }; + }); + } + }; +} +function extractImportPaths(code) { + code = code.replace(multilineCommentsRE, "/* */").replace(singlelineCommentsRE, ""); + let js = ""; + let m; + importsRE.lastIndex = 0; + while ((m = importsRE.exec(code)) != null) { + js += ` +import ${m[1]}`; + } + return js; +} +function shouldExternalizeDep(resolvedId, rawId) { + if (!path$b.isAbsolute(resolvedId)) { + return true; + } + if (resolvedId === rawId || resolvedId.includes("\0")) { + return true; + } + return false; +} +function isScannable(id, extensions) { + return JS_TYPES_RE.test(id) || htmlTypesRE.test(id) || extensions?.includes(path$b.extname(id)) || false; +} + +function createOptimizeDepsIncludeResolver(environment) { + const topLevelConfig = environment.getTopLevelConfig(); + const resolve = createBackCompatIdResolver(topLevelConfig, { + asSrc: false, + scan: true, + packageCache: /* @__PURE__ */ new Map() + }); + return async (id) => { + const lastArrowIndex = id.lastIndexOf(">"); + if (lastArrowIndex === -1) { + return await resolve(environment, id, void 0); + } + const nestedRoot = id.substring(0, lastArrowIndex).trim(); + const nestedPath = id.substring(lastArrowIndex + 1).trim(); + const basedir = nestedResolveBasedir( + nestedRoot, + topLevelConfig.root, + topLevelConfig.resolve.preserveSymlinks + ); + return await resolve( + environment, + nestedPath, + path$b.resolve(basedir, "package.json") + ); + }; +} +function expandGlobIds(id, config) { + const pkgName = getNpmPackageName(id); + if (!pkgName) return []; + const pkgData = resolvePackageData( + pkgName, + config.root, + config.resolve.preserveSymlinks, + config.packageCache + ); + if (!pkgData) return []; + const pattern = "." + id.slice(pkgName.length); + const exports = pkgData.data.exports; + if (exports) { + if (typeof exports === "string" || Array.isArray(exports)) { + return [pkgName]; + } + const possibleExportPaths = []; + for (const key in exports) { + if (key[0] === ".") { + if (key.includes("*")) { + const exportsValue = getFirstExportStringValue(exports[key]); + if (!exportsValue) continue; + const exportValuePattern = exportsValue.replace(/\*/g, "**/*"); + const exportsValueGlobRe = new RegExp( + exportsValue.split("*").map(escapeRegex).join("(.*)") + ); + possibleExportPaths.push( + ...globSync(exportValuePattern, { + cwd: pkgData.dir, + expandDirectories: false, + ignore: ["node_modules"] + }).map((filePath) => { + if (exportsValue.startsWith("./")) { + filePath = "./" + filePath; + } + const matched2 = exportsValueGlobRe.exec(slash$1(filePath)); + if (matched2) { + let allGlobSame = matched2.length === 2; + if (!allGlobSame) { + allGlobSame = true; + for (let i = 2; i < matched2.length; i++) { + if (matched2[i] !== matched2[i - 1]) { + allGlobSame = false; + break; + } + } + } + if (allGlobSame) { + return key.replace("*", matched2[1]).slice(2); + } + } + return ""; + }).filter(Boolean) + ); + } else { + possibleExportPaths.push(key.slice(2)); + } + } + } + const isMatch = picomatch$2(pattern); + const matched = possibleExportPaths.filter((p) => isMatch(p)).map((match) => path$b.posix.join(pkgName, match)); + matched.unshift(pkgName); + return matched; + } else { + const matched = globSync(pattern, { + cwd: pkgData.dir, + expandDirectories: false, + ignore: ["node_modules"] + }).map((match) => path$b.posix.join(pkgName, slash$1(match))); + matched.unshift(pkgName); + return matched; + } +} +function getFirstExportStringValue(obj) { + if (typeof obj === "string") { + return obj; + } else if (Array.isArray(obj)) { + return obj[0]; + } else { + for (const key in obj) { + return getFirstExportStringValue(obj[key]); + } + } +} +function nestedResolveBasedir(id, basedir, preserveSymlinks = false) { + const pkgs = id.split(">").map((pkg) => pkg.trim()); + for (const pkg of pkgs) { + basedir = resolvePackageData(pkg, basedir, preserveSymlinks)?.dir || basedir; + } + return basedir; +} + +const debug$f = createDebugger("vite:deps"); +const jsExtensionRE = /\.js$/i; +const jsMapExtensionRE = /\.js\.map$/i; +function isDepOptimizationDisabled(optimizeDeps2) { + return optimizeDeps2.disabled === true || optimizeDeps2.disabled === "dev" || !!optimizeDeps2.noDiscovery && !optimizeDeps2.include?.length; +} +async function optimizeDeps(config, force = config.optimizeDeps.force, asCommand = false) { + const log = asCommand ? config.logger.info : debug$f; + config.logger.warn( + colors$1.yellow( + "manually calling optimizeDeps is deprecated. This is done automatically and does not need to be called manually." + ) + ); + const environment = new ScanEnvironment("client", config); + await environment.init(); + const cachedMetadata = await loadCachedDepOptimizationMetadata( + environment, + force, + asCommand + ); + if (cachedMetadata) { + return cachedMetadata; + } + const deps = await discoverProjectDependencies(environment).result; + await addManuallyIncludedOptimizeDeps(environment, deps); + const depsString = depsLogString(Object.keys(deps)); + log?.(colors$1.green(`Optimizing dependencies: + ${depsString}`)); + const depsInfo = toDiscoveredDependencies(environment, deps); + const result = await runOptimizeDeps(environment, depsInfo).result; + await result.commit(); + return result.metadata; +} +async function optimizeExplicitEnvironmentDeps(environment) { + const cachedMetadata = await loadCachedDepOptimizationMetadata( + environment, + environment.config.optimizeDeps.force ?? false, + false + ); + if (cachedMetadata) { + return cachedMetadata; + } + const deps = {}; + await addManuallyIncludedOptimizeDeps(environment, deps); + const depsInfo = toDiscoveredDependencies(environment, deps); + const result = await runOptimizeDeps(environment, depsInfo).result; + await result.commit(); + return result.metadata; +} +function initDepsOptimizerMetadata(environment, timestamp) { + const { lockfileHash, configHash, hash } = getDepHash(environment); + return { + hash, + lockfileHash, + configHash, + browserHash: getOptimizedBrowserHash(hash, {}, timestamp), + optimized: {}, + chunks: {}, + discovered: {}, + depInfoList: [] + }; +} +function addOptimizedDepInfo(metadata, type, depInfo) { + metadata[type][depInfo.id] = depInfo; + metadata.depInfoList.push(depInfo); + return depInfo; +} +let firstLoadCachedDepOptimizationMetadata = true; +async function loadCachedDepOptimizationMetadata(environment, force = environment.config.optimizeDeps.force ?? false, asCommand = false) { + const log = asCommand ? environment.logger.info : debug$f; + if (firstLoadCachedDepOptimizationMetadata) { + firstLoadCachedDepOptimizationMetadata = false; + setTimeout( + () => cleanupDepsCacheStaleDirs(environment.getTopLevelConfig()), + 0 + ); + } + const depsCacheDir = getDepsCacheDir(environment); + if (!force) { + let cachedMetadata; + try { + const cachedMetadataPath = path$b.join(depsCacheDir, METADATA_FILENAME); + cachedMetadata = parseDepsOptimizerMetadata( + await fsp.readFile(cachedMetadataPath, "utf-8"), + depsCacheDir + ); + } catch { + } + if (cachedMetadata) { + if (cachedMetadata.lockfileHash !== getLockfileHash(environment)) { + environment.logger.info( + "Re-optimizing dependencies because lockfile has changed", + { + timestamp: true + } + ); + } else if (cachedMetadata.configHash !== getConfigHash(environment)) { + environment.logger.info( + "Re-optimizing dependencies because vite config has changed", + { + timestamp: true + } + ); + } else { + log?.( + `(${environment.name}) Hash is consistent. Skipping. Use --force to override.` + ); + return cachedMetadata; + } + } + } else { + environment.logger.info("Forced re-optimization of dependencies", { + timestamp: true + }); + } + debug$f?.( + `(${environment.name}) ${colors$1.green(`removing old cache dir ${depsCacheDir}`)}` + ); + await fsp.rm(depsCacheDir, { recursive: true, force: true }); +} +function discoverProjectDependencies(environment) { + const { cancel, result } = scanImports(environment); + return { + cancel, + result: result.then(({ deps, missing }) => { + const missingIds = Object.keys(missing); + if (missingIds.length) { + throw new Error( + `The following dependencies are imported but could not be resolved: + + ${missingIds.map( + (id) => `${colors$1.cyan(id)} ${colors$1.white( + colors$1.dim(`(imported by ${missing[id]})`) + )}` + ).join(` + `)} + +Are they installed?` + ); + } + return deps; + }) + }; +} +function toDiscoveredDependencies(environment, deps, timestamp) { + const browserHash = getOptimizedBrowserHash( + getDepHash(environment).hash, + deps, + timestamp + ); + const discovered = {}; + for (const id in deps) { + const src = deps[id]; + discovered[id] = { + id, + file: getOptimizedDepPath(environment, id), + src, + browserHash, + exportsData: extractExportsData(environment, src) + }; + } + return discovered; +} +function depsLogString(qualifiedIds) { + return colors$1.yellow(qualifiedIds.join(`, `)); +} +function runOptimizeDeps(environment, depsInfo) { + const optimizerContext = { cancelled: false }; + const depsCacheDir = getDepsCacheDir(environment); + const processingCacheDir = getProcessingDepsCacheDir(environment); + fs__default.mkdirSync(processingCacheDir, { recursive: true }); + debug$f?.(colors$1.green(`creating package.json in ${processingCacheDir}`)); + fs__default.writeFileSync( + path$b.resolve(processingCacheDir, "package.json"), + `{ + "type": "module" +} +` + ); + const metadata = initDepsOptimizerMetadata(environment); + metadata.browserHash = getOptimizedBrowserHash( + metadata.hash, + depsFromOptimizedDepInfo(depsInfo) + ); + const qualifiedIds = Object.keys(depsInfo); + let cleaned = false; + let committed = false; + const cleanUp = () => { + if (!cleaned && !committed) { + cleaned = true; + debug$f?.(colors$1.green(`removing cache dir ${processingCacheDir}`)); + try { + fs__default.rmSync(processingCacheDir, { recursive: true, force: true }); + } catch { + } + } + }; + const successfulResult = { + metadata, + cancel: cleanUp, + commit: async () => { + if (cleaned) { + throw new Error( + "Can not commit a Deps Optimization run as it was cancelled" + ); + } + committed = true; + const dataPath = path$b.join(processingCacheDir, METADATA_FILENAME); + debug$f?.( + colors$1.green(`creating ${METADATA_FILENAME} in ${processingCacheDir}`) + ); + fs__default.writeFileSync( + dataPath, + stringifyDepsOptimizerMetadata(metadata, depsCacheDir) + ); + const temporaryPath = depsCacheDir + getTempSuffix(); + const depsCacheDirPresent = fs__default.existsSync(depsCacheDir); + if (isWindows$3) { + if (depsCacheDirPresent) { + debug$f?.(colors$1.green(`renaming ${depsCacheDir} to ${temporaryPath}`)); + await safeRename(depsCacheDir, temporaryPath); + } + debug$f?.( + colors$1.green(`renaming ${processingCacheDir} to ${depsCacheDir}`) + ); + await safeRename(processingCacheDir, depsCacheDir); + } else { + if (depsCacheDirPresent) { + debug$f?.(colors$1.green(`renaming ${depsCacheDir} to ${temporaryPath}`)); + fs__default.renameSync(depsCacheDir, temporaryPath); + } + debug$f?.( + colors$1.green(`renaming ${processingCacheDir} to ${depsCacheDir}`) + ); + fs__default.renameSync(processingCacheDir, depsCacheDir); + } + if (depsCacheDirPresent) { + debug$f?.(colors$1.green(`removing cache temp dir ${temporaryPath}`)); + fsp.rm(temporaryPath, { recursive: true, force: true }); + } + } + }; + if (!qualifiedIds.length) { + return { + cancel: async () => cleanUp(), + result: Promise.resolve(successfulResult) + }; + } + const cancelledResult = { + metadata, + commit: async () => cleanUp(), + cancel: cleanUp + }; + const start = performance$1.now(); + const preparedRun = prepareEsbuildOptimizerRun( + environment, + depsInfo, + processingCacheDir, + optimizerContext + ); + const runResult = preparedRun.then(({ context, idToExports }) => { + function disposeContext() { + return context?.dispose().catch((e) => { + environment.logger.error("Failed to dispose esbuild context", { + error: e + }); + }); + } + if (!context || optimizerContext.cancelled) { + disposeContext(); + return cancelledResult; + } + return context.rebuild().then((result) => { + const meta = result.metafile; + const processingCacheDirOutputPath = path$b.relative( + process.cwd(), + processingCacheDir + ); + for (const id in depsInfo) { + const output = esbuildOutputFromId( + meta.outputs, + id, + processingCacheDir + ); + const { exportsData, ...info } = depsInfo[id]; + addOptimizedDepInfo(metadata, "optimized", { + ...info, + // We only need to hash the output.imports in to check for stability, but adding the hash + // and file path gives us a unique hash that may be useful for other things in the future + fileHash: getHash( + metadata.hash + depsInfo[id].file + JSON.stringify(output.imports) + ), + browserHash: metadata.browserHash, + // After bundling we have more information and can warn the user about legacy packages + // that require manual configuration + needsInterop: needsInterop( + environment, + id, + idToExports[id], + output + ) + }); + } + for (const o of Object.keys(meta.outputs)) { + if (!jsMapExtensionRE.test(o)) { + const id = path$b.relative(processingCacheDirOutputPath, o).replace(jsExtensionRE, ""); + const file = getOptimizedDepPath(environment, id); + if (!findOptimizedDepInfoInRecord( + metadata.optimized, + (depInfo) => depInfo.file === file + )) { + addOptimizedDepInfo(metadata, "chunks", { + id, + file, + needsInterop: false, + browserHash: metadata.browserHash + }); + } + } else { + const output = meta.outputs[o]; + if (output.bytes === 93) { + const jsMapPath = path$b.resolve(o); + const jsPath = jsMapPath.slice(0, -4); + if (fs__default.existsSync(jsPath) && fs__default.existsSync(jsMapPath)) { + const map = JSON.parse(fs__default.readFileSync(jsMapPath, "utf-8")); + if (map.sources.length === 0) { + const js = fs__default.readFileSync(jsPath, "utf-8"); + fs__default.writeFileSync( + jsPath, + js.slice(0, js.lastIndexOf("//# sourceMappingURL=")) + ); + } + } + } + } + } + debug$f?.( + `Dependencies bundled in ${(performance$1.now() - start).toFixed(2)}ms` + ); + return successfulResult; + }).catch((e) => { + if (e.errors && e.message.includes("The build was canceled")) { + return cancelledResult; + } + throw e; + }).finally(() => { + return disposeContext(); + }); + }); + runResult.catch(() => { + cleanUp(); + }); + return { + async cancel() { + optimizerContext.cancelled = true; + const { context } = await preparedRun; + await context?.cancel(); + cleanUp(); + }, + result: runResult + }; +} +async function prepareEsbuildOptimizerRun(environment, depsInfo, processingCacheDir, optimizerContext) { + const flatIdDeps = {}; + const idToExports = {}; + const { optimizeDeps: optimizeDeps2 } = environment.config; + const { plugins: pluginsFromConfig = [], ...esbuildOptions } = optimizeDeps2.esbuildOptions ?? {}; + await Promise.all( + Object.keys(depsInfo).map(async (id) => { + const src = depsInfo[id].src; + const exportsData = await (depsInfo[id].exportsData ?? extractExportsData(environment, src)); + if (exportsData.jsxLoader && !esbuildOptions.loader?.[".js"]) { + esbuildOptions.loader = { + ".js": "jsx", + ...esbuildOptions.loader + }; + } + const flatId = flattenId(id); + flatIdDeps[flatId] = src; + idToExports[id] = exportsData; + }) + ); + if (optimizerContext.cancelled) return { context: void 0, idToExports }; + const define = { + "process.env.NODE_ENV": environment.config.keepProcessEnv ? ( + // define process.env.NODE_ENV even for keepProcessEnv === true + // as esbuild will replace it automatically when `platform` is `'browser'` + "process.env.NODE_ENV" + ) : JSON.stringify(process.env.NODE_ENV || environment.config.mode) + }; + const platform = optimizeDeps2.esbuildOptions?.platform ?? // We generally don't want to use platform 'neutral', as esbuild has custom handling + // when the platform is 'node' or 'browser' that can't be emulated by using mainFields + // and conditions + (environment.config.consumer === "client" || environment.config.ssr.target === "webworker" ? "browser" : "node"); + const external = [...optimizeDeps2.exclude ?? []]; + const plugins = [...pluginsFromConfig]; + if (external.length) { + plugins.push(esbuildCjsExternalPlugin(external, platform)); + } + plugins.push(esbuildDepPlugin(environment, flatIdDeps, external)); + const context = await esbuild.context({ + absWorkingDir: process.cwd(), + entryPoints: Object.keys(flatIdDeps), + bundle: true, + platform, + define, + format: "esm", + // See https://github.com/evanw/esbuild/issues/1921#issuecomment-1152991694 + banner: platform === "node" ? { + js: `import { createRequire } from 'module';const require = createRequire(import.meta.url);` + } : void 0, + target: ESBUILD_MODULES_TARGET, + external, + logLevel: "error", + splitting: true, + sourcemap: true, + outdir: processingCacheDir, + ignoreAnnotations: true, + metafile: true, + plugins, + charset: "utf8", + ...esbuildOptions, + supported: { + ...defaultEsbuildSupported, + ...esbuildOptions.supported + } + }); + return { context, idToExports }; +} +async function addManuallyIncludedOptimizeDeps(environment, deps) { + const { logger } = environment; + const { optimizeDeps: optimizeDeps2 } = environment.config; + const optimizeDepsInclude = optimizeDeps2.include ?? []; + if (optimizeDepsInclude.length) { + const unableToOptimize = (id, msg) => { + if (optimizeDepsInclude.includes(id)) { + logger.warn( + `${msg}: ${colors$1.cyan(id)}, present in ${environment.name} 'optimizeDeps.include'` + ); + } + }; + const includes = [...optimizeDepsInclude]; + for (let i = 0; i < includes.length; i++) { + const id = includes[i]; + if (isDynamicPattern(id)) { + const globIds = expandGlobIds(id, environment.getTopLevelConfig()); + includes.splice(i, 1, ...globIds); + i += globIds.length - 1; + } + } + const resolve = createOptimizeDepsIncludeResolver(environment); + for (const id of includes) { + const normalizedId = normalizeId(id); + if (!deps[normalizedId]) { + const entry = await resolve(id); + if (entry) { + if (isOptimizable(entry, optimizeDeps2)) { + deps[normalizedId] = entry; + } else { + unableToOptimize(id, "Cannot optimize dependency"); + } + } else { + unableToOptimize(id, "Failed to resolve dependency"); + } + } + } + } +} +function depsFromOptimizedDepInfo(depsInfo) { + const obj = {}; + for (const key in depsInfo) { + obj[key] = depsInfo[key].src; + } + return obj; +} +function getOptimizedDepPath(environment, id) { + return normalizePath$3( + path$b.resolve(getDepsCacheDir(environment), flattenId(id) + ".js") + ); +} +function getDepsCacheSuffix(environment) { + return environment.name === "client" ? "" : `_${environment.name}`; +} +function getDepsCacheDir(environment) { + return getDepsCacheDirPrefix(environment) + getDepsCacheSuffix(environment); +} +function getProcessingDepsCacheDir(environment) { + return getDepsCacheDirPrefix(environment) + getDepsCacheSuffix(environment) + getTempSuffix(); +} +function getTempSuffix() { + return "_temp_" + getHash( + `${process.pid}:${Date.now().toString()}:${Math.random().toString(16).slice(2)}` + ); +} +function getDepsCacheDirPrefix(environment) { + return normalizePath$3(path$b.resolve(environment.config.cacheDir, "deps")); +} +function createIsOptimizedDepFile(environment) { + const depsCacheDirPrefix = getDepsCacheDirPrefix(environment); + return (id) => id.startsWith(depsCacheDirPrefix); +} +function createIsOptimizedDepUrl(environment) { + const { root } = environment.config; + const depsCacheDir = getDepsCacheDirPrefix(environment); + const depsCacheDirRelative = normalizePath$3(path$b.relative(root, depsCacheDir)); + const depsCacheDirPrefix = depsCacheDirRelative.startsWith("../") ? ( + // if the cache directory is outside root, the url prefix would be something + // like '/@fs/absolute/path/to/node_modules/.vite' + `/@fs/${removeLeadingSlash(normalizePath$3(depsCacheDir))}` + ) : ( + // if the cache directory is inside root, the url prefix would be something + // like '/node_modules/.vite' + `/${depsCacheDirRelative}` + ); + return function isOptimizedDepUrl(url) { + return url.startsWith(depsCacheDirPrefix); + }; +} +function parseDepsOptimizerMetadata(jsonMetadata, depsCacheDir) { + const { hash, lockfileHash, configHash, browserHash, optimized, chunks } = JSON.parse(jsonMetadata, (key, value) => { + if (key === "file" || key === "src") { + return normalizePath$3(path$b.resolve(depsCacheDir, value)); + } + return value; + }); + if (!chunks || Object.values(optimized).some((depInfo) => !depInfo.fileHash)) { + return; + } + const metadata = { + hash, + lockfileHash, + configHash, + browserHash, + optimized: {}, + discovered: {}, + chunks: {}, + depInfoList: [] + }; + for (const id of Object.keys(optimized)) { + addOptimizedDepInfo(metadata, "optimized", { + ...optimized[id], + id, + browserHash + }); + } + for (const id of Object.keys(chunks)) { + addOptimizedDepInfo(metadata, "chunks", { + ...chunks[id], + id, + browserHash, + needsInterop: false + }); + } + return metadata; +} +function stringifyDepsOptimizerMetadata(metadata, depsCacheDir) { + const { hash, configHash, lockfileHash, browserHash, optimized, chunks } = metadata; + return JSON.stringify( + { + hash, + configHash, + lockfileHash, + browserHash, + optimized: Object.fromEntries( + Object.values(optimized).map( + ({ id, src, file, fileHash, needsInterop: needsInterop2 }) => [ + id, + { + src, + file, + fileHash, + needsInterop: needsInterop2 + } + ] + ) + ), + chunks: Object.fromEntries( + Object.values(chunks).map(({ id, file }) => [id, { file }]) + ) + }, + (key, value) => { + if (key === "file" || key === "src") { + return normalizePath$3(path$b.relative(depsCacheDir, value)); + } + return value; + }, + 2 + ); +} +function esbuildOutputFromId(outputs, id, cacheDirOutputPath) { + const cwd = process.cwd(); + const flatId = flattenId(id) + ".js"; + const normalizedOutputPath = normalizePath$3( + path$b.relative(cwd, path$b.join(cacheDirOutputPath, flatId)) + ); + const output = outputs[normalizedOutputPath]; + if (output) { + return output; + } + for (const [key, value] of Object.entries(outputs)) { + if (normalizePath$3(path$b.relative(cwd, key)) === normalizedOutputPath) { + return value; + } + } +} +async function extractExportsData(environment, filePath) { + await init; + const { optimizeDeps: optimizeDeps2 } = environment.config; + const esbuildOptions = optimizeDeps2.esbuildOptions ?? {}; + if (optimizeDeps2.extensions?.some((ext) => filePath.endsWith(ext))) { + const result = await build$3({ + ...esbuildOptions, + entryPoints: [filePath], + write: false, + format: "esm" + }); + const [, exports2, , hasModuleSyntax2] = parse$d(result.outputFiles[0].text); + return { + hasModuleSyntax: hasModuleSyntax2, + exports: exports2.map((e) => e.n) + }; + } + let parseResult; + let usedJsxLoader = false; + const entryContent = await fsp.readFile(filePath, "utf-8"); + try { + parseResult = parse$d(entryContent); + } catch { + const loader = esbuildOptions.loader?.[path$b.extname(filePath)] || "jsx"; + debug$f?.( + `Unable to parse: ${filePath}. + Trying again with a ${loader} transform.` + ); + const transformed = await transformWithEsbuild( + entryContent, + filePath, + { loader }, + void 0, + environment.config + ); + parseResult = parse$d(transformed.code); + usedJsxLoader = true; + } + const [, exports, , hasModuleSyntax] = parseResult; + const exportsData = { + hasModuleSyntax, + exports: exports.map((e) => e.n), + jsxLoader: usedJsxLoader + }; + return exportsData; +} +function needsInterop(environment, id, exportsData, output) { + if (environment.config.optimizeDeps.needsInterop?.includes(id)) { + return true; + } + const { hasModuleSyntax, exports } = exportsData; + if (!hasModuleSyntax) { + return true; + } + if (output) { + const generatedExports = output.exports; + if (isSingleDefaultExport(generatedExports) && !isSingleDefaultExport(exports)) { + return true; + } + } + return false; +} +function isSingleDefaultExport(exports) { + return exports.length === 1 && exports[0] === "default"; +} +const lockfileFormats = [ + { + path: "node_modules/.package-lock.json", + checkPatchesDir: "patches", + manager: "npm" + }, + { + // Yarn non-PnP + path: "node_modules/.yarn-state.yml", + checkPatchesDir: false, + manager: "yarn" + }, + { + // Yarn v3+ PnP + path: ".pnp.cjs", + checkPatchesDir: ".yarn/patches", + manager: "yarn" + }, + { + // Yarn v2 PnP + path: ".pnp.js", + checkPatchesDir: ".yarn/patches", + manager: "yarn" + }, + { + // yarn 1 + path: "node_modules/.yarn-integrity", + checkPatchesDir: "patches", + manager: "yarn" + }, + { + path: "node_modules/.pnpm/lock.yaml", + // Included in lockfile + checkPatchesDir: false, + manager: "pnpm" + }, + { + path: "bun.lock", + checkPatchesDir: "patches", + manager: "bun" + }, + { + path: "bun.lockb", + checkPatchesDir: "patches", + manager: "bun" + } +].sort((_, { manager }) => { + return process.env.npm_config_user_agent?.startsWith(manager) ? 1 : -1; +}); +const lockfilePaths = lockfileFormats.map((l) => l.path); +function getConfigHash(environment) { + const { config } = environment; + const { optimizeDeps: optimizeDeps2 } = config; + const content = JSON.stringify( + { + define: !config.keepProcessEnv ? process.env.NODE_ENV || config.mode : null, + root: config.root, + resolve: config.resolve, + assetsInclude: config.assetsInclude, + plugins: config.plugins.map((p) => p.name), + optimizeDeps: { + include: optimizeDeps2.include ? unique(optimizeDeps2.include).sort() : void 0, + exclude: optimizeDeps2.exclude ? unique(optimizeDeps2.exclude).sort() : void 0, + esbuildOptions: { + ...optimizeDeps2.esbuildOptions, + plugins: optimizeDeps2.esbuildOptions?.plugins?.map((p) => p.name) + } + } + }, + (_, value) => { + if (typeof value === "function" || value instanceof RegExp) { + return value.toString(); + } + return value; + } + ); + return getHash(content); +} +function getLockfileHash(environment) { + const lockfilePath = lookupFile(environment.config.root, lockfilePaths); + let content = lockfilePath ? fs__default.readFileSync(lockfilePath, "utf-8") : ""; + if (lockfilePath) { + const normalizedLockfilePath = lockfilePath.replaceAll("\\", "/"); + const lockfileFormat = lockfileFormats.find( + (f) => normalizedLockfilePath.endsWith(f.path) + ); + if (lockfileFormat.checkPatchesDir) { + const baseDir = lockfilePath.slice(0, -lockfileFormat.path.length); + const fullPath = path$b.join( + baseDir, + lockfileFormat.checkPatchesDir + ); + const stat = tryStatSync(fullPath); + if (stat?.isDirectory()) { + content += stat.mtimeMs.toString(); + } + } + } + return getHash(content); +} +function getDepHash(environment) { + const lockfileHash = getLockfileHash(environment); + const configHash = getConfigHash(environment); + const hash = getHash(lockfileHash + configHash); + return { + hash, + lockfileHash, + configHash + }; +} +function getOptimizedBrowserHash(hash, deps, timestamp = "") { + return getHash(hash + JSON.stringify(deps) + timestamp); +} +function optimizedDepInfoFromId(metadata, id) { + return metadata.optimized[id] || metadata.discovered[id] || metadata.chunks[id]; +} +function optimizedDepInfoFromFile(metadata, file) { + return metadata.depInfoList.find((depInfo) => depInfo.file === file); +} +function findOptimizedDepInfoInRecord(dependenciesInfo, callbackFn) { + for (const o of Object.keys(dependenciesInfo)) { + const info = dependenciesInfo[o]; + if (callbackFn(info, o)) { + return info; + } + } +} +async function optimizedDepNeedsInterop(environment, metadata, file) { + const depInfo = optimizedDepInfoFromFile(metadata, file); + if (depInfo?.src && depInfo.needsInterop === void 0) { + depInfo.exportsData ??= extractExportsData(environment, depInfo.src); + depInfo.needsInterop = needsInterop( + environment, + depInfo.id, + await depInfo.exportsData + ); + } + return depInfo?.needsInterop; +} +const MAX_TEMP_DIR_AGE_MS = 24 * 60 * 60 * 1e3; +async function cleanupDepsCacheStaleDirs(config) { + try { + const cacheDir = path$b.resolve(config.cacheDir); + if (fs__default.existsSync(cacheDir)) { + const dirents = await fsp.readdir(cacheDir, { withFileTypes: true }); + for (const dirent of dirents) { + if (dirent.isDirectory() && dirent.name.includes("_temp_")) { + const tempDirPath = path$b.resolve(config.cacheDir, dirent.name); + const stats = await fsp.stat(tempDirPath).catch(() => null); + if (stats?.mtime && Date.now() - stats.mtime.getTime() > MAX_TEMP_DIR_AGE_MS) { + debug$f?.(`removing stale cache temp dir ${tempDirPath}`); + await fsp.rm(tempDirPath, { recursive: true, force: true }); + } + } + } + } + } catch (err) { + config.logger.error(err); + } +} +const GRACEFUL_RENAME_TIMEOUT = 5e3; +const safeRename = promisify$4(function gracefulRename(from, to, cb) { + const start = Date.now(); + let backoff = 0; + fs__default.rename(from, to, function CB(er) { + if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < GRACEFUL_RENAME_TIMEOUT) { + setTimeout(function() { + fs__default.stat(to, function(stater, _st) { + if (stater && stater.code === "ENOENT") fs__default.rename(from, to, CB); + else CB(er); + }); + }, backoff); + if (backoff < 100) backoff += 10; + return; + } + cb(er); + }); +}); + +var index$1 = { + __proto__: null, + addManuallyIncludedOptimizeDeps: addManuallyIncludedOptimizeDeps, + addOptimizedDepInfo: addOptimizedDepInfo, + cleanupDepsCacheStaleDirs: cleanupDepsCacheStaleDirs, + createIsOptimizedDepFile: createIsOptimizedDepFile, + createIsOptimizedDepUrl: createIsOptimizedDepUrl, + depsFromOptimizedDepInfo: depsFromOptimizedDepInfo, + depsLogString: depsLogString, + discoverProjectDependencies: discoverProjectDependencies, + extractExportsData: extractExportsData, + getDepsCacheDir: getDepsCacheDir, + getOptimizedDepPath: getOptimizedDepPath, + initDepsOptimizerMetadata: initDepsOptimizerMetadata, + isDepOptimizationDisabled: isDepOptimizationDisabled, + loadCachedDepOptimizationMetadata: loadCachedDepOptimizationMetadata, + optimizeDeps: optimizeDeps, + optimizeExplicitEnvironmentDeps: optimizeExplicitEnvironmentDeps, + optimizedDepInfoFromFile: optimizedDepInfoFromFile, + optimizedDepInfoFromId: optimizedDepInfoFromId, + optimizedDepNeedsInterop: optimizedDepNeedsInterop, + runOptimizeDeps: runOptimizeDeps, + toDiscoveredDependencies: toDiscoveredDependencies +}; + +const debug$e = createDebugger("vite:external"); +const isExternalCache = /* @__PURE__ */ new WeakMap(); +function shouldExternalize(environment, id, importer) { + let isExternal = isExternalCache.get(environment); + if (!isExternal) { + isExternal = createIsExternal(environment); + isExternalCache.set(environment, isExternal); + } + return isExternal(id, importer); +} +function createIsConfiguredAsExternal(environment) { + const { config } = environment; + const { root, resolve } = config; + const { external, noExternal } = resolve; + const noExternalFilter = typeof noExternal !== "boolean" && !(Array.isArray(noExternal) && noExternal.length === 0) && createFilter$1(void 0, noExternal, { resolve: false }); + const targetConditions = resolve.externalConditions; + const resolveOptions = { + ...resolve, + root, + isProduction: false, + isBuild: true, + conditions: targetConditions + }; + const isExternalizable = (id, importer, configuredAsExternal) => { + if (!bareImportRE.test(id) || id.includes("\0")) { + return false; + } + try { + const resolved = tryNodeResolve( + id, + // Skip passing importer in build to avoid externalizing non-hoisted dependencies + // unresolvable from root (which would be unresolvable from output bundles also) + config.command === "build" ? void 0 : importer, + resolveOptions, + void 0, + false + ); + if (!resolved) { + return false; + } + if (!configuredAsExternal && !isInNodeModules$1(resolved.id)) { + return false; + } + return canExternalizeFile(resolved.id); + } catch { + debug$e?.( + `Failed to node resolve "${id}". Skipping externalizing it by default.` + ); + return false; + } + }; + return (id, importer) => { + if ( + // If this id is defined as external, force it as external + // Note that individual package entries are allowed in `external` + external !== true && external.includes(id) + ) { + return true; + } + const pkgName = getNpmPackageName(id); + if (!pkgName) { + return isExternalizable(id, importer, false); + } + if ( + // A package name in ssr.external externalizes every + // externalizable package entry + external !== true && external.includes(pkgName) + ) { + return isExternalizable(id, importer, true); + } + if (typeof noExternal === "boolean") { + return !noExternal; + } + if (noExternalFilter && !noExternalFilter(pkgName)) { + return false; + } + return isExternalizable(id, importer, external === true); + }; +} +function createIsExternal(environment) { + const processedIds = /* @__PURE__ */ new Map(); + const isConfiguredAsExternal = createIsConfiguredAsExternal(environment); + return (id, importer) => { + if (processedIds.has(id)) { + return processedIds.get(id); + } + let isExternal = false; + if (id[0] !== "." && !path$b.isAbsolute(id)) { + isExternal = isBuiltin(environment.config.resolve.builtins, id) || isConfiguredAsExternal(id, importer); + } + processedIds.set(id, isExternal); + return isExternal; + }; +} +function canExternalizeFile(filePath) { + const ext = path$b.extname(filePath); + return !ext || ext === ".js" || ext === ".mjs" || ext === ".cjs"; +} + +const normalizedClientEntry$1 = normalizePath$3(CLIENT_ENTRY); +const normalizedEnvEntry$1 = normalizePath$3(ENV_ENTRY); +const ERR_RESOLVE_PACKAGE_ENTRY_FAIL = "ERR_RESOLVE_PACKAGE_ENTRY_FAIL"; +const browserExternalId = "__vite-browser-external"; +const optionalPeerDepId = "__vite-optional-peer-dep"; +const subpathImportsPrefix = "#"; +const startsWithWordCharRE = /^\w/; +const debug$d = createDebugger("vite:resolve-details", { + onlyWhenFocused: true +}); +function resolvePlugin(resolveOptions) { + const { root, isProduction, asSrc, preferRelative = false } = resolveOptions; + const rootInRoot = tryStatSync(path$b.join(root, root))?.isDirectory() ?? false; + return { + name: "vite:resolve", + async resolveId(id, importer, resolveOpts) { + if (id[0] === "\0" || id.startsWith("virtual:") || // When injected directly in html/client code + id.startsWith("/virtual:")) { + return; + } + const depsOptimizer = resolveOptions.optimizeDeps && this.environment.mode === "dev" ? this.environment.depsOptimizer : void 0; + if (id.startsWith(browserExternalId)) { + return id; + } + const isRequire = resolveOpts.custom?.["node-resolve"]?.isRequire ?? false; + const currentEnvironmentOptions = this.environment.config; + const options = { + isRequire, + ...currentEnvironmentOptions.resolve, + ...resolveOptions, + // plugin options + resolve options overrides + scan: resolveOpts.scan ?? resolveOptions.scan + }; + const resolvedImports = resolveSubpathImports(id, importer, options); + if (resolvedImports) { + id = resolvedImports; + if (resolveOpts.custom?.["vite:import-glob"]?.isSubImportsPattern) { + return normalizePath$3(path$b.join(root, id)); + } + } + let res; + if (asSrc && depsOptimizer?.isOptimizedDepUrl(id)) { + const optimizedPath = id.startsWith(FS_PREFIX) ? fsPathFromId(id) : normalizePath$3(path$b.resolve(root, id.slice(1))); + return optimizedPath; + } + if (asSrc && id.startsWith(FS_PREFIX)) { + res = fsPathFromId(id); + debug$d?.(`[@fs] ${colors$1.cyan(id)} -> ${colors$1.dim(res)}`); + return ensureVersionQuery(res, id, options, depsOptimizer); + } + if (asSrc && id[0] === "/" && (rootInRoot || !id.startsWith(withTrailingSlash(root)))) { + const fsPath = path$b.resolve(root, id.slice(1)); + if (res = tryFsResolve(fsPath, options)) { + debug$d?.(`[url] ${colors$1.cyan(id)} -> ${colors$1.dim(res)}`); + return ensureVersionQuery(res, id, options, depsOptimizer); + } + } + if (id[0] === "." || (preferRelative || importer?.endsWith(".html")) && startsWithWordCharRE.test(id)) { + const basedir = importer ? path$b.dirname(importer) : process.cwd(); + const fsPath = path$b.resolve(basedir, id); + const normalizedFsPath = normalizePath$3(fsPath); + if (depsOptimizer?.isOptimizedDepFile(normalizedFsPath)) { + if (!options.isBuild && !DEP_VERSION_RE.test(normalizedFsPath)) { + const browserHash = optimizedDepInfoFromFile( + depsOptimizer.metadata, + normalizedFsPath + )?.browserHash; + if (browserHash) { + return injectQuery(normalizedFsPath, `v=${browserHash}`); + } + } + return normalizedFsPath; + } + if (options.mainFields.includes("browser") && (res = tryResolveBrowserMapping(fsPath, importer, options, true))) { + return res; + } + if (res = tryFsResolve(fsPath, options)) { + res = ensureVersionQuery(res, id, options, depsOptimizer); + debug$d?.(`[relative] ${colors$1.cyan(id)} -> ${colors$1.dim(res)}`); + if (!options.idOnly && !options.scan && options.isBuild) { + const resPkg = findNearestPackageData( + path$b.dirname(res), + options.packageCache + ); + if (resPkg) { + return { + id: res, + moduleSideEffects: resPkg.hasSideEffects(res) + }; + } + } + return res; + } + } + if (id.startsWith("file://")) { + const { file, postfix } = splitFileAndPostfix(id); + id = fileURLToPath$1(file) + postfix; + } + if (isWindows$3 && id[0] === "/") { + const basedir = importer ? path$b.dirname(importer) : process.cwd(); + const fsPath = path$b.resolve(basedir, id); + if (res = tryFsResolve(fsPath, options)) { + debug$d?.(`[drive-relative] ${colors$1.cyan(id)} -> ${colors$1.dim(res)}`); + return ensureVersionQuery(res, id, options, depsOptimizer); + } + } + if (isNonDriveRelativeAbsolutePath(id) && (res = tryFsResolve(id, options))) { + debug$d?.(`[fs] ${colors$1.cyan(id)} -> ${colors$1.dim(res)}`); + return ensureVersionQuery(res, id, options, depsOptimizer); + } + if (isExternalUrl(id)) { + return options.idOnly ? id : { id, external: true }; + } + if (isDataUrl(id)) { + return null; + } + if (bareImportRE.test(id)) { + const external = options.externalize && options.isBuild && currentEnvironmentOptions.consumer === "server" && shouldExternalize(this.environment, id, importer); + if (!external && asSrc && depsOptimizer && !options.scan && (res = await tryOptimizedResolve( + depsOptimizer, + id, + importer, + options.preserveSymlinks, + options.packageCache + ))) { + return res; + } + if (options.mainFields.includes("browser") && (res = tryResolveBrowserMapping( + id, + importer, + options, + false, + external + ))) { + return res; + } + if (res = tryNodeResolve(id, importer, options, depsOptimizer, external)) { + return res; + } + if (currentEnvironmentOptions.consumer === "server" && isBuiltin(options.builtins, id)) { + return options.idOnly ? id : { id, external: true, moduleSideEffects: false }; + } else if (currentEnvironmentOptions.consumer === "server" && isNodeLikeBuiltin(id)) { + if (!(options.external === true || options.external.includes(id))) { + let message = `Automatically externalized node built-in module "${id}"`; + if (importer) { + message += ` imported from "${path$b.relative( + process.cwd(), + importer + )}"`; + } + message += `. Consider adding it to environments.${this.environment.name}.external if it is intended.`; + this.warn(message); + } + return options.idOnly ? id : { id, external: true, moduleSideEffects: false }; + } else if (currentEnvironmentOptions.consumer === "client" && isNodeLikeBuiltin(id)) { + if (options.noExternal === true && // if both noExternal and external are true, noExternal will take the higher priority and bundle it. + // only if the id is explicitly listed in external, we will externalize it and skip this error. + (options.external === true || !options.external.includes(id))) { + let message = `Cannot bundle built-in module "${id}"`; + if (importer) { + message += ` imported from "${path$b.relative( + process.cwd(), + importer + )}"`; + } + message += `. Consider disabling environments.${this.environment.name}.noExternal or remove the built-in dependency.`; + this.error(message); + } + if (!asSrc) { + debug$d?.( + `externalized node built-in "${id}" to empty module. (imported by: ${colors$1.white(colors$1.dim(importer))})` + ); + } else if (isProduction) { + this.warn( + `Module "${id}" has been externalized for browser compatibility, imported by "${importer}". See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.` + ); + } + return isProduction ? browserExternalId : `${browserExternalId}:${id}`; + } + } + debug$d?.(`[fallthrough] ${colors$1.dim(id)}`); + }, + load: { + handler(id) { + if (id.startsWith(browserExternalId)) { + if (isProduction) { + return `export default {}`; + } else { + id = id.slice(browserExternalId.length + 1); + return ` export default new Proxy({}, { + get(_, key) { + throw new Error(\`Module "${id}" has been externalized for browser compatibility. Cannot access "${id}.\${key}" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.\`) + } + })`; + } + } + if (id.startsWith(optionalPeerDepId)) { + if (isProduction) { + return `export default {}`; + } else { + const [, peerDep, parentDep] = id.split(":"); + return `throw new Error(\`Could not resolve "${peerDep}" imported by "${parentDep}". Is it installed?\`)`; + } + } + } + } + }; +} +function resolveSubpathImports(id, importer, options) { + if (!importer || !id.startsWith(subpathImportsPrefix)) return; + const basedir = path$b.dirname(importer); + const pkgData = findNearestPackageData(basedir, options.packageCache); + if (!pkgData) return; + let { file: idWithoutPostfix, postfix } = splitFileAndPostfix(id.slice(1)); + idWithoutPostfix = "#" + idWithoutPostfix; + let importsPath = resolveExportsOrImports( + pkgData.data, + idWithoutPostfix, + options, + "imports" + ); + if (importsPath?.[0] === ".") { + importsPath = path$b.relative(basedir, path$b.join(pkgData.dir, importsPath)); + if (importsPath[0] !== ".") { + importsPath = `./${importsPath}`; + } + } + return importsPath + postfix; +} +function ensureVersionQuery(resolved, id, options, depsOptimizer) { + if (!options.isBuild && !options.scan && depsOptimizer && !(resolved === normalizedClientEntry$1 || resolved === normalizedEnvEntry$1)) { + const isNodeModule = isInNodeModules$1(id) || isInNodeModules$1(resolved); + if (isNodeModule && !DEP_VERSION_RE.test(resolved)) { + const versionHash = depsOptimizer.metadata.browserHash; + if (versionHash && isOptimizable(resolved, depsOptimizer.options)) { + resolved = injectQuery(resolved, `v=${versionHash}`); + } + } + } + return resolved; +} +function tryFsResolve(fsPath, options, tryIndex = true, skipPackageJson = false) { + const hashIndex = fsPath.indexOf("#"); + if (hashIndex >= 0 && isInNodeModules$1(fsPath)) { + const queryIndex = fsPath.indexOf("?"); + if (queryIndex < 0 || queryIndex > hashIndex) { + const file2 = queryIndex > hashIndex ? fsPath.slice(0, queryIndex) : fsPath; + const res2 = tryCleanFsResolve(file2, options, tryIndex, skipPackageJson); + if (res2) return res2 + fsPath.slice(file2.length); + } + } + const { file, postfix } = splitFileAndPostfix(fsPath); + const res = tryCleanFsResolve(file, options, tryIndex, skipPackageJson); + if (res) return res + postfix; +} +const knownTsOutputRE = /\.(?:js|mjs|cjs|jsx)$/; +const isPossibleTsOutput = (url) => knownTsOutputRE.test(url); +function tryCleanFsResolve(file, options, tryIndex = true, skipPackageJson = false) { + const { tryPrefix, extensions, preserveSymlinks } = options; + const fileResult = tryResolveRealFileOrType(file, options.preserveSymlinks); + if (fileResult?.path) return fileResult.path; + let res; + const possibleJsToTs = isPossibleTsOutput(file); + if (possibleJsToTs || options.extensions.length || tryPrefix) { + const dirPath = path$b.dirname(file); + if (isDirectory(dirPath)) { + if (possibleJsToTs) { + const fileExt = path$b.extname(file); + const fileName = file.slice(0, -fileExt.length); + if (res = tryResolveRealFile( + fileName + fileExt.replace("js", "ts"), + preserveSymlinks + )) + return res; + if (fileExt === ".js" && (res = tryResolveRealFile(fileName + ".tsx", preserveSymlinks))) + return res; + } + if (res = tryResolveRealFileWithExtensions( + file, + extensions, + preserveSymlinks + )) + return res; + if (tryPrefix) { + const prefixed = `${dirPath}/${options.tryPrefix}${path$b.basename(file)}`; + if (res = tryResolveRealFile(prefixed, preserveSymlinks)) return res; + if (res = tryResolveRealFileWithExtensions( + prefixed, + extensions, + preserveSymlinks + )) + return res; + } + } + } + if (tryIndex && fileResult?.type === "directory") { + const dirPath = file; + if (!skipPackageJson) { + let pkgPath = `${dirPath}/package.json`; + try { + if (fs__default.existsSync(pkgPath)) { + if (!options.preserveSymlinks) { + pkgPath = safeRealpathSync(pkgPath); + } + const pkg = loadPackageData(pkgPath); + return resolvePackageEntry(dirPath, pkg, options); + } + } catch (e) { + if (e.code !== ERR_RESOLVE_PACKAGE_ENTRY_FAIL && e.code !== "ENOENT") + throw e; + } + } + if (res = tryResolveRealFileWithExtensions( + `${dirPath}/index`, + extensions, + preserveSymlinks + )) + return res; + if (tryPrefix) { + if (res = tryResolveRealFileWithExtensions( + `${dirPath}/${options.tryPrefix}index`, + extensions, + preserveSymlinks + )) + return res; + } + } +} +function tryNodeResolve(id, importer, options, depsOptimizer, externalize) { + const { root, dedupe, isBuild, preserveSymlinks, packageCache } = options; + const deepMatch = deepImportRE.exec(id); + const pkgId = deepMatch ? deepMatch[1] || deepMatch[2] : cleanUrl(id); + let basedir; + if (dedupe.includes(pkgId)) { + basedir = root; + } else if (importer && path$b.isAbsolute(importer) && // css processing appends `*` for importer + (importer.endsWith("*") || fs__default.existsSync(cleanUrl(importer)))) { + basedir = path$b.dirname(importer); + } else { + basedir = root; + } + const isModuleBuiltin = (id2) => isBuiltin(options.builtins, id2); + let selfPkg = null; + if (!isModuleBuiltin(id) && !id.includes("\0") && bareImportRE.test(id)) { + const selfPackageData = findNearestPackageData(basedir, packageCache); + selfPkg = selfPackageData?.data.exports && selfPackageData.data.name === pkgId ? selfPackageData : null; + } + const pkg = selfPkg || resolvePackageData(pkgId, basedir, preserveSymlinks, packageCache); + if (!pkg) { + if (basedir !== root && // root has no peer dep + !isModuleBuiltin(id) && !id.includes("\0") && bareImportRE.test(id)) { + const mainPkg = findNearestMainPackageData(basedir, packageCache)?.data; + if (mainPkg) { + const pkgName = getNpmPackageName(id); + if (pkgName != null && mainPkg.peerDependencies?.[pkgName] && mainPkg.peerDependenciesMeta?.[pkgName]?.optional) { + return { + id: `${optionalPeerDepId}:${id}:${mainPkg.name}` + }; + } + } + } + return; + } + const resolveId = deepMatch ? resolveDeepImport : resolvePackageEntry; + const unresolvedId = deepMatch ? "." + id.slice(pkgId.length) : id; + let resolved = resolveId(unresolvedId, pkg, options); + if (!resolved) { + return; + } + const processResult = (resolved2) => { + if (!externalize) { + return resolved2; + } + if (!canExternalizeFile(resolved2.id)) { + return resolved2; + } + let resolvedId = id; + if (deepMatch && !pkg.data.exports && path$b.extname(id) !== path$b.extname(resolved2.id)) { + const index = resolved2.id.indexOf(id); + if (index > -1) { + resolvedId = resolved2.id.slice(index); + debug$d?.( + `[processResult] ${colors$1.cyan(id)} -> ${colors$1.dim(resolvedId)}` + ); + } + } + return { ...resolved2, id: resolvedId, external: true }; + }; + if (!options.idOnly && (!options.scan && isBuild || externalize)) { + return processResult({ + id: resolved, + moduleSideEffects: pkg.hasSideEffects(resolved) + }); + } + if (!isInNodeModules$1(resolved) || // linked + !depsOptimizer || // resolving before listening to the server + options.scan) { + return { id: resolved }; + } + const isJsType = isOptimizable(resolved, depsOptimizer.options); + const exclude = depsOptimizer.options.exclude; + const skipOptimization = depsOptimizer.options.noDiscovery || !isJsType || importer && isInNodeModules$1(importer) || exclude?.includes(pkgId) || exclude?.includes(id) || SPECIAL_QUERY_RE.test(resolved); + if (skipOptimization) { + const versionHash = depsOptimizer.metadata.browserHash; + if (versionHash && isJsType) { + resolved = injectQuery(resolved, `v=${versionHash}`); + } + } else { + const optimizedInfo = depsOptimizer.registerMissingImport(id, resolved); + resolved = depsOptimizer.getOptimizedDepId(optimizedInfo); + } + return { id: resolved }; +} +async function tryOptimizedResolve(depsOptimizer, id, importer, preserveSymlinks, packageCache) { + await depsOptimizer.scanProcessing; + const metadata = depsOptimizer.metadata; + const depInfo = optimizedDepInfoFromId(metadata, id); + if (depInfo) { + return depsOptimizer.getOptimizedDepId(depInfo); + } + if (!importer) return; + let idPkgDir; + const nestedIdMatch = `> ${id}`; + for (const optimizedData of metadata.depInfoList) { + if (!optimizedData.src) continue; + if (!optimizedData.id.endsWith(nestedIdMatch)) continue; + if (idPkgDir == null) { + const pkgName = getNpmPackageName(id); + if (!pkgName) break; + idPkgDir = resolvePackageData( + pkgName, + importer, + preserveSymlinks, + packageCache + )?.dir; + if (idPkgDir == null) break; + idPkgDir = normalizePath$3(idPkgDir); + } + if (optimizedData.src.startsWith(withTrailingSlash(idPkgDir))) { + return depsOptimizer.getOptimizedDepId(optimizedData); + } + } +} +function resolvePackageEntry(id, { dir, data, setResolvedCache, getResolvedCache }, options) { + const { file: idWithoutPostfix, postfix } = splitFileAndPostfix(id); + const cached = getResolvedCache(".", options); + if (cached) { + return cached + postfix; + } + try { + let entryPoint; + if (data.exports) { + entryPoint = resolveExportsOrImports(data, ".", options, "exports"); + } + if (!entryPoint) { + for (const field of options.mainFields) { + if (field === "browser") { + entryPoint = tryResolveBrowserEntry(dir, data, options); + if (entryPoint) { + break; + } + } else if (typeof data[field] === "string") { + entryPoint = data[field]; + break; + } + } + } + entryPoint ||= data.main; + const entryPoints = entryPoint ? [entryPoint] : ["index.js", "index.json", "index.node"]; + for (let entry of entryPoints) { + let skipPackageJson = false; + if (options.mainFields[0] === "sass" && !options.extensions.includes(path$b.extname(entry))) { + entry = ""; + skipPackageJson = true; + } else { + const { browser: browserField } = data; + if (options.mainFields.includes("browser") && isObject$1(browserField)) { + entry = mapWithBrowserField(entry, browserField) || entry; + } + } + const entryPointPath = path$b.join(dir, entry); + const resolvedEntryPoint = tryFsResolve( + entryPointPath, + options, + true, + skipPackageJson + ); + if (resolvedEntryPoint) { + debug$d?.( + `[package entry] ${colors$1.cyan(idWithoutPostfix)} -> ${colors$1.dim( + resolvedEntryPoint + )}${postfix !== "" ? ` (postfix: ${postfix})` : ""}` + ); + setResolvedCache(".", resolvedEntryPoint, options); + return resolvedEntryPoint + postfix; + } + } + } catch (e) { + packageEntryFailure(id, e.message); + } + packageEntryFailure(id); +} +function packageEntryFailure(id, details) { + const err = new Error( + `Failed to resolve entry for package "${id}". The package may have incorrect main/module/exports specified in its package.json` + (details ? ": " + details : ".") + ); + err.code = ERR_RESOLVE_PACKAGE_ENTRY_FAIL; + throw err; +} +function resolveExportsOrImports(pkg, key, options, type) { + const conditions = options.conditions.map((condition) => { + if (condition === DEV_PROD_CONDITION) { + return options.isProduction ? "production" : "development"; + } + return condition; + }); + if (options.isRequire) { + conditions.push("require"); + } else { + conditions.push("import"); + } + const fn = type === "imports" ? f : o; + const result = fn(pkg, key, { conditions, unsafe: true }); + return result ? result[0] : void 0; +} +function resolveDeepImport(id, { setResolvedCache, getResolvedCache, dir, data }, options) { + const cache = getResolvedCache(id, options); + if (cache) { + return cache; + } + let relativeId = id; + const { exports: exportsField, browser: browserField } = data; + if (exportsField) { + if (isObject$1(exportsField) && !Array.isArray(exportsField)) { + const { file, postfix } = splitFileAndPostfix(relativeId); + const exportsId = resolveExportsOrImports(data, file, options, "exports"); + if (exportsId !== void 0) { + relativeId = exportsId + postfix; + } else { + relativeId = void 0; + } + } else { + relativeId = void 0; + } + if (!relativeId) { + throw new Error( + `Package subpath '${relativeId}' is not defined by "exports" in ${path$b.join(dir, "package.json")}.` + ); + } + } else if (options.mainFields.includes("browser") && isObject$1(browserField)) { + const { file, postfix } = splitFileAndPostfix(relativeId); + const mapped = mapWithBrowserField(file, browserField); + if (mapped) { + relativeId = mapped + postfix; + } else if (mapped === false) { + setResolvedCache(id, browserExternalId, options); + return browserExternalId; + } + } + if (relativeId) { + const resolved = tryFsResolve( + path$b.join(dir, relativeId), + options, + !exportsField + // try index only if no exports field + ); + if (resolved) { + debug$d?.( + `[node/deep-import] ${colors$1.cyan(id)} -> ${colors$1.dim(resolved)}` + ); + setResolvedCache(id, resolved, options); + return resolved; + } + } +} +function tryResolveBrowserMapping(id, importer, options, isFilePath, externalize) { + let res; + const pkg = importer && findNearestPackageData(path$b.dirname(importer), options.packageCache); + if (pkg && isObject$1(pkg.data.browser)) { + const mapId = isFilePath ? "./" + slash$1(path$b.relative(pkg.dir, id)) : id; + const browserMappedPath = mapWithBrowserField(mapId, pkg.data.browser); + if (browserMappedPath) { + if (res = bareImportRE.test(browserMappedPath) ? tryNodeResolve( + browserMappedPath, + importer, + options, + void 0, + void 0 + )?.id : tryFsResolve(path$b.join(pkg.dir, browserMappedPath), options)) { + debug$d?.(`[browser mapped] ${colors$1.cyan(id)} -> ${colors$1.dim(res)}`); + let result = { id: res }; + if (options.idOnly) { + return result; + } + if (!options.scan && options.isBuild) { + const resPkg = findNearestPackageData( + path$b.dirname(res), + options.packageCache + ); + if (resPkg) { + result = { + id: res, + moduleSideEffects: resPkg.hasSideEffects(res) + }; + } + } + return externalize ? { ...result, external: true } : result; + } + } else if (browserMappedPath === false) { + return browserExternalId; + } + } +} +function tryResolveBrowserEntry(dir, data, options) { + const browserEntry = typeof data.browser === "string" ? data.browser : isObject$1(data.browser) && data.browser["."]; + if (browserEntry) { + if (!options.isRequire && options.mainFields.includes("module") && typeof data.module === "string" && data.module !== browserEntry) { + const resolvedBrowserEntry = tryFsResolve( + path$b.join(dir, browserEntry), + options + ); + if (resolvedBrowserEntry) { + const content = fs__default.readFileSync(resolvedBrowserEntry, "utf-8"); + if (hasESMSyntax(content)) { + return browserEntry; + } else { + return data.module; + } + } + } else { + return browserEntry; + } + } +} +function mapWithBrowserField(relativePathInPkgDir, map) { + const normalizedPath = path$b.posix.normalize(relativePathInPkgDir); + for (const key in map) { + const normalizedKey = path$b.posix.normalize(key); + if (normalizedPath === normalizedKey || equalWithoutSuffix(normalizedPath, normalizedKey, ".js") || equalWithoutSuffix(normalizedPath, normalizedKey, "/index.js")) { + return map[key]; + } + } +} +function equalWithoutSuffix(path2, key, suffix) { + return key.endsWith(suffix) && key.slice(0, -suffix.length) === path2; +} +function tryResolveRealFile(file, preserveSymlinks) { + const stat = tryStatSync(file); + if (stat?.isFile()) return getRealPath(file, preserveSymlinks); +} +function tryResolveRealFileWithExtensions(filePath, extensions, preserveSymlinks) { + for (const ext of extensions) { + const res = tryResolveRealFile(filePath + ext, preserveSymlinks); + if (res) return res; + } +} +function tryResolveRealFileOrType(file, preserveSymlinks) { + const fileStat = tryStatSync(file); + if (fileStat?.isFile()) { + return { path: getRealPath(file, preserveSymlinks), type: "file" }; + } + if (fileStat?.isDirectory()) { + return { type: "directory" }; + } + return; +} +function getRealPath(resolved, preserveSymlinks) { + if (!preserveSymlinks) { + resolved = safeRealpathSync(resolved); + } + return normalizePath$3(resolved); +} +function isDirectory(path2) { + const stat = tryStatSync(path2); + return stat?.isDirectory() ?? false; +} + +const debug$c = createDebugger("vite:optimize-deps"); +function optimizedDepsPlugin() { + return { + name: "vite:optimized-deps", + applyToEnvironment(environment) { + return !isDepOptimizationDisabled(environment.config.optimizeDeps); + }, + resolveId(id) { + const environment = this.environment; + if (environment.depsOptimizer?.isOptimizedDepFile(id)) { + return id; + } + }, + // this.load({ id }) isn't implemented in PluginContainer + // The logic to register an id to wait until it is processed + // is in importAnalysis, see call to delayDepsOptimizerUntil + async load(id) { + const environment = this.environment; + const depsOptimizer = environment.depsOptimizer; + if (depsOptimizer?.isOptimizedDepFile(id)) { + const metadata = depsOptimizer.metadata; + const file = cleanUrl(id); + const versionMatch = DEP_VERSION_RE.exec(file); + const browserHash = versionMatch ? versionMatch[1].split("=")[1] : void 0; + const info = optimizedDepInfoFromFile(metadata, file); + if (info) { + if (browserHash && info.browserHash !== browserHash) { + throwOutdatedRequest(id); + } + try { + await info.processing; + } catch { + throwProcessingError(id); + } + const newMetadata = depsOptimizer.metadata; + if (metadata !== newMetadata) { + const currentInfo = optimizedDepInfoFromFile(newMetadata, file); + if (info.browserHash !== currentInfo?.browserHash) { + throwOutdatedRequest(id); + } + } + } + debug$c?.(`load ${colors$1.cyan(file)}`); + try { + return await fsp.readFile(file, "utf-8"); + } catch { + const newMetadata = depsOptimizer.metadata; + if (optimizedDepInfoFromFile(newMetadata, file)) { + throwOutdatedRequest(id); + } + throwFileNotFoundInOptimizedDep(id); + } + } + } + }; +} +function throwProcessingError(id) { + const err = new Error( + `Something unexpected happened while optimizing "${id}". The current page should have reloaded by now` + ); + err.code = ERR_OPTIMIZE_DEPS_PROCESSING_ERROR; + throw err; +} +function throwOutdatedRequest(id) { + const err = new Error( + `There is a new version of the pre-bundle for "${id}", a page reload is going to ask for it.` + ); + err.code = ERR_OUTDATED_OPTIMIZED_DEP; + throw err; +} +function throwFileNotFoundInOptimizedDep(id) { + const err = new Error( + `The file does not exist at "${id}" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to \`optimizeDeps.exclude\`.` + ); + err.code = ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR; + throw err; +} + +var main = {exports: {}}; + +var version$1 = "16.5.0"; +var require$$4 = { + version: version$1}; + +const fs$6 = require$$0$4; +const path$8 = require$$0$2; +const os$1 = require$$2; +const crypto$1 = require$$3; +const packageJson = require$$4; + +const version = packageJson.version; + +const LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg; + +// Parse src into an Object +function parse$c (src) { + const obj = {}; + + // Convert buffer to string + let lines = src.toString(); + + // Convert line breaks to same format + lines = lines.replace(/\r\n?/mg, '\n'); + + let match; + while ((match = LINE.exec(lines)) != null) { + const key = match[1]; + + // Default undefined or null to empty string + let value = (match[2] || ''); + + // Remove whitespace + value = value.trim(); + + // Check if double quoted + const maybeQuote = value[0]; + + // Remove surrounding quotes + value = value.replace(/^(['"`])([\s\S]*)\1$/mg, '$2'); + + // Expand newlines if double quoted + if (maybeQuote === '"') { + value = value.replace(/\\n/g, '\n'); + value = value.replace(/\\r/g, '\r'); + } + + // Add to object + obj[key] = value; + } + + return obj +} + +function _parseVault (options) { + const vaultPath = _vaultPath(options); + + // Parse .env.vault + const result = DotenvModule.configDotenv({ path: vaultPath }); + if (!result.parsed) { + const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`); + err.code = 'MISSING_DATA'; + throw err + } + + // handle scenario for comma separated keys - for use with key rotation + // example: DOTENV_KEY="dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=prod,dotenv://:key_7890@dotenvx.com/vault/.env.vault?environment=prod" + const keys = _dotenvKey(options).split(','); + const length = keys.length; + + let decrypted; + for (let i = 0; i < length; i++) { + try { + // Get full key + const key = keys[i].trim(); + + // Get instructions for decrypt + const attrs = _instructions(result, key); + + // Decrypt + decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key); + + break + } catch (error) { + // last key + if (i + 1 >= length) { + throw error + } + // try next key + } + } + + // Parse decrypted .env string + return DotenvModule.parse(decrypted) +} + +function _warn (message) { + console.log(`[dotenv@${version}][WARN] ${message}`); +} + +function _debug (message) { + console.log(`[dotenv@${version}][DEBUG] ${message}`); +} + +function _dotenvKey (options) { + // prioritize developer directly setting options.DOTENV_KEY + if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) { + return options.DOTENV_KEY + } + + // secondary infra already contains a DOTENV_KEY environment variable + if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) { + return process.env.DOTENV_KEY + } + + // fallback to empty string + return '' +} + +function _instructions (result, dotenvKey) { + // Parse DOTENV_KEY. Format is a URI + let uri; + try { + uri = new URL(dotenvKey); + } catch (error) { + if (error.code === 'ERR_INVALID_URL') { + const err = new Error('INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development'); + err.code = 'INVALID_DOTENV_KEY'; + throw err + } + + throw error + } + + // Get decrypt key + const key = uri.password; + if (!key) { + const err = new Error('INVALID_DOTENV_KEY: Missing key part'); + err.code = 'INVALID_DOTENV_KEY'; + throw err + } + + // Get environment + const environment = uri.searchParams.get('environment'); + if (!environment) { + const err = new Error('INVALID_DOTENV_KEY: Missing environment part'); + err.code = 'INVALID_DOTENV_KEY'; + throw err + } + + // Get ciphertext payload + const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`; + const ciphertext = result.parsed[environmentKey]; // DOTENV_VAULT_PRODUCTION + if (!ciphertext) { + const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`); + err.code = 'NOT_FOUND_DOTENV_ENVIRONMENT'; + throw err + } + + return { ciphertext, key } +} + +function _vaultPath (options) { + let possibleVaultPath = null; + + if (options && options.path && options.path.length > 0) { + if (Array.isArray(options.path)) { + for (const filepath of options.path) { + if (fs$6.existsSync(filepath)) { + possibleVaultPath = filepath.endsWith('.vault') ? filepath : `${filepath}.vault`; + } + } + } else { + possibleVaultPath = options.path.endsWith('.vault') ? options.path : `${options.path}.vault`; + } + } else { + possibleVaultPath = path$8.resolve(process.cwd(), '.env.vault'); + } + + if (fs$6.existsSync(possibleVaultPath)) { + return possibleVaultPath + } + + return null +} + +function _resolveHome (envPath) { + return envPath[0] === '~' ? path$8.join(os$1.homedir(), envPath.slice(1)) : envPath +} + +function _configVault (options) { + const debug = Boolean(options && options.debug); + if (debug) { + _debug('Loading env from encrypted .env.vault'); + } + + const parsed = DotenvModule._parseVault(options); + + let processEnv = process.env; + if (options && options.processEnv != null) { + processEnv = options.processEnv; + } + + DotenvModule.populate(processEnv, parsed, options); + + return { parsed } +} + +function configDotenv (options) { + const dotenvPath = path$8.resolve(process.cwd(), '.env'); + let encoding = 'utf8'; + const debug = Boolean(options && options.debug); + + if (options && options.encoding) { + encoding = options.encoding; + } else { + if (debug) { + _debug('No encoding is specified. UTF-8 is used by default'); + } + } + + let optionPaths = [dotenvPath]; // default, look for .env + if (options && options.path) { + if (!Array.isArray(options.path)) { + optionPaths = [_resolveHome(options.path)]; + } else { + optionPaths = []; // reset default + for (const filepath of options.path) { + optionPaths.push(_resolveHome(filepath)); + } + } + } + + // Build the parsed data in a temporary object (because we need to return it). Once we have the final + // parsed data, we will combine it with process.env (or options.processEnv if provided). + let lastError; + const parsedAll = {}; + for (const path of optionPaths) { + try { + // Specifying an encoding returns a string instead of a buffer + const parsed = DotenvModule.parse(fs$6.readFileSync(path, { encoding })); + + DotenvModule.populate(parsedAll, parsed, options); + } catch (e) { + if (debug) { + _debug(`Failed to load ${path} ${e.message}`); + } + lastError = e; + } + } + + let processEnv = process.env; + if (options && options.processEnv != null) { + processEnv = options.processEnv; + } + + DotenvModule.populate(processEnv, parsedAll, options); + + if (lastError) { + return { parsed: parsedAll, error: lastError } + } else { + return { parsed: parsedAll } + } +} + +// Populates process.env from .env file +function config (options) { + // fallback to original dotenv if DOTENV_KEY is not set + if (_dotenvKey(options).length === 0) { + return DotenvModule.configDotenv(options) + } + + const vaultPath = _vaultPath(options); + + // dotenvKey exists but .env.vault file does not exist + if (!vaultPath) { + _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`); + + return DotenvModule.configDotenv(options) + } + + return DotenvModule._configVault(options) +} + +function decrypt (encrypted, keyStr) { + const key = Buffer.from(keyStr.slice(-64), 'hex'); + let ciphertext = Buffer.from(encrypted, 'base64'); + + const nonce = ciphertext.subarray(0, 12); + const authTag = ciphertext.subarray(-16); + ciphertext = ciphertext.subarray(12, -16); + + try { + const aesgcm = crypto$1.createDecipheriv('aes-256-gcm', key, nonce); + aesgcm.setAuthTag(authTag); + return `${aesgcm.update(ciphertext)}${aesgcm.final()}` + } catch (error) { + const isRange = error instanceof RangeError; + const invalidKeyLength = error.message === 'Invalid key length'; + const decryptionFailed = error.message === 'Unsupported state or unable to authenticate data'; + + if (isRange || invalidKeyLength) { + const err = new Error('INVALID_DOTENV_KEY: It must be 64 characters long (or more)'); + err.code = 'INVALID_DOTENV_KEY'; + throw err + } else if (decryptionFailed) { + const err = new Error('DECRYPTION_FAILED: Please check your DOTENV_KEY'); + err.code = 'DECRYPTION_FAILED'; + throw err + } else { + throw error + } + } +} + +// Populate process.env with parsed values +function populate (processEnv, parsed, options = {}) { + const debug = Boolean(options && options.debug); + const override = Boolean(options && options.override); + + if (typeof parsed !== 'object') { + const err = new Error('OBJECT_REQUIRED: Please check the processEnv argument being passed to populate'); + err.code = 'OBJECT_REQUIRED'; + throw err + } + + // Set process.env + for (const key of Object.keys(parsed)) { + if (Object.prototype.hasOwnProperty.call(processEnv, key)) { + if (override === true) { + processEnv[key] = parsed[key]; + } + + if (debug) { + if (override === true) { + _debug(`"${key}" is already defined and WAS overwritten`); + } else { + _debug(`"${key}" is already defined and was NOT overwritten`); + } + } + } else { + processEnv[key] = parsed[key]; + } + } +} + +const DotenvModule = { + configDotenv, + _configVault, + _parseVault, + config, + decrypt, + parse: parse$c, + populate +}; + +main.exports.configDotenv = DotenvModule.configDotenv; +main.exports._configVault = DotenvModule._configVault; +main.exports._parseVault = DotenvModule._parseVault; +main.exports.config = DotenvModule.config; +main.exports.decrypt = DotenvModule.decrypt; +var parse_1$2 = main.exports.parse = DotenvModule.parse; +main.exports.populate = DotenvModule.populate; + +main.exports = DotenvModule; + +function _resolveEscapeSequences (value) { + return value.replace(/\\\$/g, '$') +} + +function expandValue (value, processEnv, runningParsed) { + const env = { ...runningParsed, ...processEnv }; // process.env wins + + const regex = /(? normalizePath$3(path$b.join(envDir, file))); + } + return []; +} +function loadEnv(mode, envDir, prefixes = "VITE_") { + const start = performance.now(); + const getTime = () => `${(performance.now() - start).toFixed(2)}ms`; + if (mode === "local") { + throw new Error( + `"local" cannot be used as a mode name because it conflicts with the .local postfix for .env files.` + ); + } + prefixes = arraify(prefixes); + const env = {}; + const envFiles = getEnvFilesForMode(mode, envDir); + debug$b?.(`loading env files: %O`, envFiles); + const parsed = Object.fromEntries( + envFiles.flatMap((filePath) => { + if (!tryStatSync(filePath)?.isFile()) return []; + return Object.entries(parse_1$2(fs__default.readFileSync(filePath))); + }) + ); + debug$b?.(`env files loaded in ${getTime()}`); + if (parsed.NODE_ENV && process.env.VITE_USER_NODE_ENV === void 0) { + process.env.VITE_USER_NODE_ENV = parsed.NODE_ENV; + } + if (parsed.BROWSER && process.env.BROWSER === void 0) { + process.env.BROWSER = parsed.BROWSER; + } + if (parsed.BROWSER_ARGS && process.env.BROWSER_ARGS === void 0) { + process.env.BROWSER_ARGS = parsed.BROWSER_ARGS; + } + const processEnv = { ...process.env }; + expand_1$1({ parsed, processEnv }); + for (const [key, value] of Object.entries(parsed)) { + if (prefixes.some((prefix) => key.startsWith(prefix))) { + env[key] = value; + } + } + for (const key in process.env) { + if (prefixes.some((prefix) => key.startsWith(prefix))) { + env[key] = process.env[key]; + } + } + debug$b?.(`using resolved env: %O`, env); + return env; +} +function resolveEnvPrefix({ + envPrefix = "VITE_" +}) { + envPrefix = arraify(envPrefix); + if (envPrefix.includes("")) { + throw new Error( + `envPrefix option contains value '', which could lead unexpected exposure of sensitive information.` + ); + } + return envPrefix; +} + +const docsURL = "https://vite.dev"; +const deprecationCode = { + removePluginHookSsrArgument: "changes/this-environment-in-hooks", + removePluginHookHandleHotUpdate: "changes/hotupdate-hook", + removeServerModuleGraph: "changes/per-environment-apis", + removeServerHot: "changes/per-environment-apis", + removeServerTransformRequest: "changes/per-environment-apis", + removeSsrLoadModule: "changes/ssr-using-modulerunner" +}; +const deprecationMessages = { + removePluginHookSsrArgument: "Plugin hook `options.ssr` is replaced with `this.environment.config.consumer === 'server'`.", + removePluginHookHandleHotUpdate: "Plugin hook `handleHotUpdate()` is replaced with `hotUpdate()`.", + removeServerModuleGraph: "The `server.moduleGraph` is replaced with `this.environment.moduleGraph`.", + removeServerHot: "The `server.hot` is replaced with `this.environment.hot`.", + removeServerTransformRequest: "The `server.transformRequest` is replaced with `this.environment.transformRequest`.", + removeSsrLoadModule: "The `server.ssrLoadModule` is replaced with Environment Runner." +}; +let _ignoreDeprecationWarnings = false; +function warnFutureDeprecation(config, type, extraMessage, stacktrace = true) { + if (_ignoreDeprecationWarnings || !config.future || config.future[type] !== "warn") + return; + let msg = `[vite future] ${deprecationMessages[type]}`; + if (extraMessage) { + msg += ` ${extraMessage}`; + } + msg = colors$1.yellow(msg); + const docs = `${docsURL}/changes/${deprecationCode[type].toLowerCase()}`; + msg += colors$1.gray(` + ${stacktrace ? "\u251C" : "\u2514"}\u2500\u2500\u2500 `) + colors$1.underline(docs) + "\n"; + if (stacktrace) { + const stack = new Error().stack; + if (stack) { + let stacks = stack.split("\n").slice(3).filter((i) => !i.includes("/node_modules/vite/dist/")); + if (stacks.length === 0) { + stacks.push("No stack trace found."); + } + stacks = stacks.map( + (i, idx) => ` ${idx === stacks.length - 1 ? "\u2514" : "\u2502"} ${i.trim()}` + ); + msg += colors$1.dim(stacks.join("\n")) + "\n"; + } + } + config.logger.warnOnce(msg); +} +function ignoreDeprecationWarnings(fn) { + const before = _ignoreDeprecationWarnings; + _ignoreDeprecationWarnings = true; + const ret = fn(); + _ignoreDeprecationWarnings = before; + return ret; +} + +function prepareError(err) { + return { + message: stripVTControlCharacters(err.message), + stack: stripVTControlCharacters(cleanStack(err.stack || "")), + id: err.id, + frame: stripVTControlCharacters(err.frame || ""), + plugin: err.plugin, + pluginCode: err.pluginCode?.toString(), + loc: err.loc + }; +} +function buildErrorMessage(err, args = [], includeStack = true) { + if (err.plugin) args.push(` Plugin: ${colors$1.magenta(err.plugin)}`); + const loc = err.loc ? `:${err.loc.line}:${err.loc.column}` : ""; + if (err.id) args.push(` File: ${colors$1.cyan(err.id)}${loc}`); + if (err.frame) args.push(colors$1.yellow(pad$1(err.frame))); + if (includeStack && err.stack) args.push(pad$1(cleanStack(err.stack))); + return args.join("\n"); +} +function cleanStack(stack) { + return stack.split(/\n/).filter((l) => /^\s*at/.test(l)).join("\n"); +} +function logError(server, err) { + const msg = buildErrorMessage(err, [ + colors$1.red(`Internal server error: ${err.message}`) + ]); + server.config.logger.error(msg, { + clear: true, + timestamp: true, + error: err + }); + server.environments.client.hot.send({ + type: "error", + err: prepareError(err) + }); +} +function errorMiddleware(server, allowNext = false) { + return function viteErrorMiddleware(err, _req, res, next) { + logError(server, err); + if (allowNext) { + next(); + } else { + res.statusCode = 500; + res.end(` + + + + + Error + + +
+ + + + +

Skills & Technologies

+ +
+ {#each skillCategories as category, categoryIndex} +
+

{category.category}

+
+ {#each category.skills as skill, skillIndex} +
+
+ {skill.name} + {skill.level}% +
+
+
+
+
+ {/each} +
+
+ {/each} +
+
+ + diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 7130fd6..6af884d 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,6 +1,7 @@